axe.js 918 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829
  1. /*! axe v4.4.3
  2. * Copyright (c) 2022 Deque Systems, Inc.
  3. *
  4. * Your use of this Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. *
  8. * This entire copyright notice must appear in every copy of this file you
  9. * distribute or in any file that contains substantial portions of this source
  10. * code.
  11. */
  12. (function axeFunction(window) {
  13. var global = window;
  14. var document = window.document;
  15. 'use strict';
  16. function _typeof(obj) {
  17. '@babel/helpers - typeof';
  18. return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(obj) {
  19. return typeof obj;
  20. } : function(obj) {
  21. return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
  22. }, _typeof(obj);
  23. }
  24. var axe = axe || {};
  25. axe.version = '4.4.3';
  26. if (typeof define === 'function' && define.amd) {
  27. define('axe-core', [], function() {
  28. return axe;
  29. });
  30. }
  31. if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports && typeof axeFunction.toString === 'function') {
  32. axe.source = '(' + axeFunction.toString() + ')(typeof window === "object" ? window : this);';
  33. module.exports = axe;
  34. }
  35. if (typeof window.getComputedStyle === 'function') {
  36. window.axe = axe;
  37. }
  38. var commons;
  39. function SupportError(error) {
  40. this.name = 'SupportError';
  41. this.cause = error.cause;
  42. this.message = '`'.concat(error.cause, '` - feature unsupported in your environment.');
  43. if (error.ruleId) {
  44. this.ruleId = error.ruleId;
  45. this.message += ' Skipping '.concat(this.ruleId, ' rule.');
  46. }
  47. this.stack = new Error().stack;
  48. }
  49. SupportError.prototype = Object.create(Error.prototype);
  50. SupportError.prototype.constructor = SupportError;
  51. 'use strict';
  52. var _excluded = [ 'node' ], _excluded2 = [ 'node' ], _excluded3 = [ 'variant' ], _excluded4 = [ 'matches' ], _excluded5 = [ 'chromium' ], _excluded6 = [ 'noImplicit' ], _excluded7 = [ 'noPresentational' ], _excluded8 = [ 'nodes' ], _excluded9 = [ 'node' ], _excluded10 = [ 'relatedNodes' ], _excluded11 = [ 'environmentData' ], _excluded12 = [ 'environmentData' ], _excluded13 = [ 'node' ], _excluded14 = [ 'environmentData' ], _excluded15 = [ 'environmentData' ], _excluded16 = [ 'environmentData' ];
  53. function _defineProperty(obj, key, value) {
  54. if (key in obj) {
  55. Object.defineProperty(obj, key, {
  56. value: value,
  57. enumerable: true,
  58. configurable: true,
  59. writable: true
  60. });
  61. } else {
  62. obj[key] = value;
  63. }
  64. return obj;
  65. }
  66. function _inherits(subClass, superClass) {
  67. if (typeof superClass !== 'function' && superClass !== null) {
  68. throw new TypeError('Super expression must either be null or a function');
  69. }
  70. subClass.prototype = Object.create(superClass && superClass.prototype, {
  71. constructor: {
  72. value: subClass,
  73. writable: true,
  74. configurable: true
  75. }
  76. });
  77. Object.defineProperty(subClass, 'prototype', {
  78. writable: false
  79. });
  80. if (superClass) {
  81. _setPrototypeOf(subClass, superClass);
  82. }
  83. }
  84. function _setPrototypeOf(o, p) {
  85. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  86. o.__proto__ = p;
  87. return o;
  88. };
  89. return _setPrototypeOf(o, p);
  90. }
  91. function _createSuper(Derived) {
  92. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  93. return function _createSuperInternal() {
  94. var Super = _getPrototypeOf(Derived), result;
  95. if (hasNativeReflectConstruct) {
  96. var NewTarget = _getPrototypeOf(this).constructor;
  97. result = Reflect.construct(Super, arguments, NewTarget);
  98. } else {
  99. result = Super.apply(this, arguments);
  100. }
  101. return _possibleConstructorReturn(this, result);
  102. };
  103. }
  104. function _possibleConstructorReturn(self, call) {
  105. if (call && (_typeof(call) === 'object' || typeof call === 'function')) {
  106. return call;
  107. } else if (call !== void 0) {
  108. throw new TypeError('Derived constructors may only return object or undefined');
  109. }
  110. return _assertThisInitialized(self);
  111. }
  112. function _assertThisInitialized(self) {
  113. if (self === void 0) {
  114. throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');
  115. }
  116. return self;
  117. }
  118. function _isNativeReflectConstruct() {
  119. if (typeof Reflect === 'undefined' || !Reflect.construct) {
  120. return false;
  121. }
  122. if (Reflect.construct.sham) {
  123. return false;
  124. }
  125. if (typeof Proxy === 'function') {
  126. return true;
  127. }
  128. try {
  129. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  130. return true;
  131. } catch (e) {
  132. return false;
  133. }
  134. }
  135. function _getPrototypeOf(o) {
  136. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  137. return o.__proto__ || Object.getPrototypeOf(o);
  138. };
  139. return _getPrototypeOf(o);
  140. }
  141. function _objectWithoutProperties(source, excluded) {
  142. if (source == null) {
  143. return {};
  144. }
  145. var target = _objectWithoutPropertiesLoose(source, excluded);
  146. var key, i;
  147. if (Object.getOwnPropertySymbols) {
  148. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  149. for (i = 0; i < sourceSymbolKeys.length; i++) {
  150. key = sourceSymbolKeys[i];
  151. if (excluded.indexOf(key) >= 0) {
  152. continue;
  153. }
  154. if (!Object.prototype.propertyIsEnumerable.call(source, key)) {
  155. continue;
  156. }
  157. target[key] = source[key];
  158. }
  159. }
  160. return target;
  161. }
  162. function _objectWithoutPropertiesLoose(source, excluded) {
  163. if (source == null) {
  164. return {};
  165. }
  166. var target = {};
  167. var sourceKeys = Object.keys(source);
  168. var key, i;
  169. for (i = 0; i < sourceKeys.length; i++) {
  170. key = sourceKeys[i];
  171. if (excluded.indexOf(key) >= 0) {
  172. continue;
  173. }
  174. target[key] = source[key];
  175. }
  176. return target;
  177. }
  178. function _toConsumableArray(arr) {
  179. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  180. }
  181. function _nonIterableSpread() {
  182. throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
  183. }
  184. function _iterableToArray(iter) {
  185. if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) {
  186. return Array.from(iter);
  187. }
  188. }
  189. function _arrayWithoutHoles(arr) {
  190. if (Array.isArray(arr)) {
  191. return _arrayLikeToArray(arr);
  192. }
  193. }
  194. function _slicedToArray(arr, i) {
  195. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  196. }
  197. function _nonIterableRest() {
  198. throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
  199. }
  200. function _iterableToArrayLimit(arr, i) {
  201. var _i = arr == null ? null : typeof Symbol !== 'undefined' && arr[Symbol.iterator] || arr['@@iterator'];
  202. if (_i == null) {
  203. return;
  204. }
  205. var _arr = [];
  206. var _n = true;
  207. var _d = false;
  208. var _s, _e;
  209. try {
  210. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  211. _arr.push(_s.value);
  212. if (i && _arr.length === i) {
  213. break;
  214. }
  215. }
  216. } catch (err) {
  217. _d = true;
  218. _e = err;
  219. } finally {
  220. try {
  221. if (!_n && _i['return'] != null) {
  222. _i['return']();
  223. }
  224. } finally {
  225. if (_d) {
  226. throw _e;
  227. }
  228. }
  229. }
  230. return _arr;
  231. }
  232. function _arrayWithHoles(arr) {
  233. if (Array.isArray(arr)) {
  234. return arr;
  235. }
  236. }
  237. function _extends() {
  238. _extends = Object.assign || function(target) {
  239. for (var i = 1; i < arguments.length; i++) {
  240. var source = arguments[i];
  241. for (var key in source) {
  242. if (Object.prototype.hasOwnProperty.call(source, key)) {
  243. target[key] = source[key];
  244. }
  245. }
  246. }
  247. return target;
  248. };
  249. return _extends.apply(this, arguments);
  250. }
  251. function _classCallCheck(instance, Constructor) {
  252. if (!(instance instanceof Constructor)) {
  253. throw new TypeError('Cannot call a class as a function');
  254. }
  255. }
  256. function _defineProperties(target, props) {
  257. for (var i = 0; i < props.length; i++) {
  258. var descriptor = props[i];
  259. descriptor.enumerable = descriptor.enumerable || false;
  260. descriptor.configurable = true;
  261. if ('value' in descriptor) {
  262. descriptor.writable = true;
  263. }
  264. Object.defineProperty(target, descriptor.key, descriptor);
  265. }
  266. }
  267. function _createClass(Constructor, protoProps, staticProps) {
  268. if (protoProps) {
  269. _defineProperties(Constructor.prototype, protoProps);
  270. }
  271. if (staticProps) {
  272. _defineProperties(Constructor, staticProps);
  273. }
  274. Object.defineProperty(Constructor, 'prototype', {
  275. writable: false
  276. });
  277. return Constructor;
  278. }
  279. function _createForOfIteratorHelper(o, allowArrayLike) {
  280. var it = typeof Symbol !== 'undefined' && o[Symbol.iterator] || o['@@iterator'];
  281. if (!it) {
  282. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === 'number') {
  283. if (it) {
  284. o = it;
  285. }
  286. var i = 0;
  287. var F = function F() {};
  288. return {
  289. s: F,
  290. n: function n() {
  291. if (i >= o.length) {
  292. return {
  293. done: true
  294. };
  295. }
  296. return {
  297. done: false,
  298. value: o[i++]
  299. };
  300. },
  301. e: function e(_e2) {
  302. throw _e2;
  303. },
  304. f: F
  305. };
  306. }
  307. throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
  308. }
  309. var normalCompletion = true, didErr = false, err;
  310. return {
  311. s: function s() {
  312. it = it.call(o);
  313. },
  314. n: function n() {
  315. var step = it.next();
  316. normalCompletion = step.done;
  317. return step;
  318. },
  319. e: function e(_e3) {
  320. didErr = true;
  321. err = _e3;
  322. },
  323. f: function f() {
  324. try {
  325. if (!normalCompletion && it['return'] != null) {
  326. it['return']();
  327. }
  328. } finally {
  329. if (didErr) {
  330. throw err;
  331. }
  332. }
  333. }
  334. };
  335. }
  336. function _unsupportedIterableToArray(o, minLen) {
  337. if (!o) {
  338. return;
  339. }
  340. if (typeof o === 'string') {
  341. return _arrayLikeToArray(o, minLen);
  342. }
  343. var n = Object.prototype.toString.call(o).slice(8, -1);
  344. if (n === 'Object' && o.constructor) {
  345. n = o.constructor.name;
  346. }
  347. if (n === 'Map' || n === 'Set') {
  348. return Array.from(o);
  349. }
  350. if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) {
  351. return _arrayLikeToArray(o, minLen);
  352. }
  353. }
  354. function _arrayLikeToArray(arr, len) {
  355. if (len == null || len > arr.length) {
  356. len = arr.length;
  357. }
  358. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  359. arr2[i] = arr[i];
  360. }
  361. return arr2;
  362. }
  363. function _typeof(obj) {
  364. '@babel/helpers - typeof';
  365. return _typeof = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function(obj) {
  366. return typeof obj;
  367. } : function(obj) {
  368. return obj && 'function' == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
  369. }, _typeof(obj);
  370. }
  371. (function() {
  372. var __create = Object.create;
  373. var __defProp = Object.defineProperty;
  374. var __getProtoOf = Object.getPrototypeOf;
  375. var __hasOwnProp = Object.prototype.hasOwnProperty;
  376. var __getOwnPropNames = Object.getOwnPropertyNames;
  377. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  378. var __markAsModule = function __markAsModule(target) {
  379. return __defProp(target, '__esModule', {
  380. value: true
  381. });
  382. };
  383. var __commonJS = function __commonJS(callback, module) {
  384. return function() {
  385. if (!module) {
  386. module = {
  387. exports: {}
  388. };
  389. callback(module.exports, module);
  390. }
  391. return module.exports;
  392. };
  393. };
  394. var __export = function __export(target, all) {
  395. __markAsModule(target);
  396. for (var name in all) {
  397. __defProp(target, name, {
  398. get: all[name],
  399. enumerable: true
  400. });
  401. }
  402. };
  403. var __exportStar = function __exportStar(target, module, desc) {
  404. __markAsModule(target);
  405. if (_typeof(module) === 'object' || typeof module === 'function') {
  406. var _iterator = _createForOfIteratorHelper(__getOwnPropNames(module)), _step;
  407. try {
  408. var _loop = function _loop() {
  409. var key = _step.value;
  410. if (!__hasOwnProp.call(target, key) && key !== 'default') {
  411. __defProp(target, key, {
  412. get: function get() {
  413. return module[key];
  414. },
  415. enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable
  416. });
  417. }
  418. };
  419. for (_iterator.s(); !(_step = _iterator.n()).done; ) {
  420. _loop();
  421. }
  422. } catch (err) {
  423. _iterator.e(err);
  424. } finally {
  425. _iterator.f();
  426. }
  427. }
  428. return target;
  429. };
  430. var __toModule = function __toModule(module) {
  431. if (module && module.__esModule) {
  432. return module;
  433. }
  434. return __exportStar(__defProp(__create(__getProtoOf(module)), 'default', {
  435. value: module,
  436. enumerable: true
  437. }), module);
  438. };
  439. var require_utils = __commonJS(function(exports) {
  440. 'use strict';
  441. Object.defineProperty(exports, '__esModule', {
  442. value: true
  443. });
  444. function isIdentStart(c) {
  445. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '-' || c === '_';
  446. }
  447. exports.isIdentStart = isIdentStart;
  448. function isIdent(c) {
  449. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '-' || c === '_';
  450. }
  451. exports.isIdent = isIdent;
  452. function isHex(c) {
  453. return c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' || c >= '0' && c <= '9';
  454. }
  455. exports.isHex = isHex;
  456. function escapeIdentifier(s) {
  457. var len = s.length;
  458. var result = '';
  459. var i = 0;
  460. while (i < len) {
  461. var chr = s.charAt(i);
  462. if (exports.identSpecialChars[chr]) {
  463. result += '\\' + chr;
  464. } else {
  465. if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) {
  466. var charCode = chr.charCodeAt(0);
  467. if ((charCode & 63488) === 55296) {
  468. var extraCharCode = s.charCodeAt(i++);
  469. if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) {
  470. throw Error('UCS-2(decode): illegal sequence');
  471. }
  472. charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536;
  473. }
  474. result += '\\' + charCode.toString(16) + ' ';
  475. } else {
  476. result += chr;
  477. }
  478. }
  479. i++;
  480. }
  481. return result;
  482. }
  483. exports.escapeIdentifier = escapeIdentifier;
  484. function escapeStr(s) {
  485. var len = s.length;
  486. var result = '';
  487. var i = 0;
  488. var replacement;
  489. while (i < len) {
  490. var chr = s.charAt(i);
  491. if (chr === '"') {
  492. chr = '\\"';
  493. } else if (chr === '\\') {
  494. chr = '\\\\';
  495. } else if ((replacement = exports.strReplacementsRev[chr]) !== void 0) {
  496. chr = replacement;
  497. }
  498. result += chr;
  499. i++;
  500. }
  501. return '"' + result + '"';
  502. }
  503. exports.escapeStr = escapeStr;
  504. exports.identSpecialChars = {
  505. '!': true,
  506. '"': true,
  507. '#': true,
  508. $: true,
  509. '%': true,
  510. '&': true,
  511. '\'': true,
  512. '(': true,
  513. ')': true,
  514. '*': true,
  515. '+': true,
  516. ',': true,
  517. '.': true,
  518. '/': true,
  519. ';': true,
  520. '<': true,
  521. '=': true,
  522. '>': true,
  523. '?': true,
  524. '@': true,
  525. '[': true,
  526. '\\': true,
  527. ']': true,
  528. '^': true,
  529. '`': true,
  530. '{': true,
  531. '|': true,
  532. '}': true,
  533. '~': true
  534. };
  535. exports.strReplacementsRev = {
  536. '\n': '\\n',
  537. '\r': '\\r',
  538. '\t': '\\t',
  539. '\f': '\\f',
  540. '\v': '\\v'
  541. };
  542. exports.singleQuoteEscapeChars = {
  543. n: '\n',
  544. r: '\r',
  545. t: '\t',
  546. f: '\f',
  547. '\\': '\\',
  548. '\'': '\''
  549. };
  550. exports.doubleQuotesEscapeChars = {
  551. n: '\n',
  552. r: '\r',
  553. t: '\t',
  554. f: '\f',
  555. '\\': '\\',
  556. '"': '"'
  557. };
  558. });
  559. var require_parser_context = __commonJS(function(exports) {
  560. 'use strict';
  561. Object.defineProperty(exports, '__esModule', {
  562. value: true
  563. });
  564. var utils_1 = require_utils();
  565. function parseCssSelector(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {
  566. var l = str.length;
  567. var chr = '';
  568. function getStr(quote, escapeTable) {
  569. var result = '';
  570. pos++;
  571. chr = str.charAt(pos);
  572. while (pos < l) {
  573. if (chr === quote) {
  574. pos++;
  575. return result;
  576. } else if (chr === '\\') {
  577. pos++;
  578. chr = str.charAt(pos);
  579. var esc = void 0;
  580. if (chr === quote) {
  581. result += quote;
  582. } else if ((esc = escapeTable[chr]) !== void 0) {
  583. result += esc;
  584. } else if (utils_1.isHex(chr)) {
  585. var hex = chr;
  586. pos++;
  587. chr = str.charAt(pos);
  588. while (utils_1.isHex(chr)) {
  589. hex += chr;
  590. pos++;
  591. chr = str.charAt(pos);
  592. }
  593. if (chr === ' ') {
  594. pos++;
  595. chr = str.charAt(pos);
  596. }
  597. result += String.fromCharCode(parseInt(hex, 16));
  598. continue;
  599. } else {
  600. result += chr;
  601. }
  602. } else {
  603. result += chr;
  604. }
  605. pos++;
  606. chr = str.charAt(pos);
  607. }
  608. return result;
  609. }
  610. function getIdent() {
  611. var result = '';
  612. chr = str.charAt(pos);
  613. while (pos < l) {
  614. if (utils_1.isIdent(chr)) {
  615. result += chr;
  616. } else if (chr === '\\') {
  617. pos++;
  618. if (pos >= l) {
  619. throw Error('Expected symbol but end of file reached.');
  620. }
  621. chr = str.charAt(pos);
  622. if (utils_1.identSpecialChars[chr]) {
  623. result += chr;
  624. } else if (utils_1.isHex(chr)) {
  625. var hex = chr;
  626. pos++;
  627. chr = str.charAt(pos);
  628. while (utils_1.isHex(chr)) {
  629. hex += chr;
  630. pos++;
  631. chr = str.charAt(pos);
  632. }
  633. if (chr === ' ') {
  634. pos++;
  635. chr = str.charAt(pos);
  636. }
  637. result += String.fromCharCode(parseInt(hex, 16));
  638. continue;
  639. } else {
  640. result += chr;
  641. }
  642. } else {
  643. return result;
  644. }
  645. pos++;
  646. chr = str.charAt(pos);
  647. }
  648. return result;
  649. }
  650. function skipWhitespace() {
  651. chr = str.charAt(pos);
  652. var result = false;
  653. while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') {
  654. result = true;
  655. pos++;
  656. chr = str.charAt(pos);
  657. }
  658. return result;
  659. }
  660. function parse2() {
  661. var res = parseSelector();
  662. if (pos < l) {
  663. throw Error('Rule expected but "' + str.charAt(pos) + '" found.');
  664. }
  665. return res;
  666. }
  667. function parseSelector() {
  668. var selector = parseSingleSelector();
  669. if (!selector) {
  670. return null;
  671. }
  672. var res = selector;
  673. chr = str.charAt(pos);
  674. while (chr === ',') {
  675. pos++;
  676. skipWhitespace();
  677. if (res.type !== 'selectors') {
  678. res = {
  679. type: 'selectors',
  680. selectors: [ selector ]
  681. };
  682. }
  683. selector = parseSingleSelector();
  684. if (!selector) {
  685. throw Error('Rule expected after ",".');
  686. }
  687. res.selectors.push(selector);
  688. }
  689. return res;
  690. }
  691. function parseSingleSelector() {
  692. skipWhitespace();
  693. var selector = {
  694. type: 'ruleSet'
  695. };
  696. var rule3 = parseRule();
  697. if (!rule3) {
  698. return null;
  699. }
  700. var currentRule = selector;
  701. while (rule3) {
  702. rule3.type = 'rule';
  703. currentRule.rule = rule3;
  704. currentRule = rule3;
  705. skipWhitespace();
  706. chr = str.charAt(pos);
  707. if (pos >= l || chr === ',' || chr === ')') {
  708. break;
  709. }
  710. if (ruleNestingOperators[chr]) {
  711. var op = chr;
  712. pos++;
  713. skipWhitespace();
  714. rule3 = parseRule();
  715. if (!rule3) {
  716. throw Error('Rule expected after "' + op + '".');
  717. }
  718. rule3.nestingOperator = op;
  719. } else {
  720. rule3 = parseRule();
  721. if (rule3) {
  722. rule3.nestingOperator = null;
  723. }
  724. }
  725. }
  726. return selector;
  727. }
  728. function parseRule() {
  729. var rule3 = null;
  730. while (pos < l) {
  731. chr = str.charAt(pos);
  732. if (chr === '*') {
  733. pos++;
  734. (rule3 = rule3 || {}).tagName = '*';
  735. } else if (utils_1.isIdentStart(chr) || chr === '\\') {
  736. (rule3 = rule3 || {}).tagName = getIdent();
  737. } else if (chr === '.') {
  738. pos++;
  739. rule3 = rule3 || {};
  740. (rule3.classNames = rule3.classNames || []).push(getIdent());
  741. } else if (chr === '#') {
  742. pos++;
  743. (rule3 = rule3 || {}).id = getIdent();
  744. } else if (chr === '[') {
  745. pos++;
  746. skipWhitespace();
  747. var attr = {
  748. name: getIdent()
  749. };
  750. skipWhitespace();
  751. if (chr === ']') {
  752. pos++;
  753. } else {
  754. var operator = '';
  755. if (attrEqualityMods[chr]) {
  756. operator = chr;
  757. pos++;
  758. chr = str.charAt(pos);
  759. }
  760. if (pos >= l) {
  761. throw Error('Expected "=" but end of file reached.');
  762. }
  763. if (chr !== '=') {
  764. throw Error('Expected "=" but "' + chr + '" found.');
  765. }
  766. attr.operator = operator + '=';
  767. pos++;
  768. skipWhitespace();
  769. var attrValue = '';
  770. attr.valueType = 'string';
  771. if (chr === '"') {
  772. attrValue = getStr('"', utils_1.doubleQuotesEscapeChars);
  773. } else if (chr === '\'') {
  774. attrValue = getStr('\'', utils_1.singleQuoteEscapeChars);
  775. } else if (substitutesEnabled && chr === '$') {
  776. pos++;
  777. attrValue = getIdent();
  778. attr.valueType = 'substitute';
  779. } else {
  780. while (pos < l) {
  781. if (chr === ']') {
  782. break;
  783. }
  784. attrValue += chr;
  785. pos++;
  786. chr = str.charAt(pos);
  787. }
  788. attrValue = attrValue.trim();
  789. }
  790. skipWhitespace();
  791. if (pos >= l) {
  792. throw Error('Expected "]" but end of file reached.');
  793. }
  794. if (chr !== ']') {
  795. throw Error('Expected "]" but "' + chr + '" found.');
  796. }
  797. pos++;
  798. attr.value = attrValue;
  799. }
  800. rule3 = rule3 || {};
  801. (rule3.attrs = rule3.attrs || []).push(attr);
  802. } else if (chr === ':') {
  803. pos++;
  804. var pseudoName = getIdent();
  805. var pseudo = {
  806. name: pseudoName
  807. };
  808. if (chr === '(') {
  809. pos++;
  810. var value = '';
  811. skipWhitespace();
  812. if (pseudos[pseudoName] === 'selector') {
  813. pseudo.valueType = 'selector';
  814. value = parseSelector();
  815. } else {
  816. pseudo.valueType = pseudos[pseudoName] || 'string';
  817. if (chr === '"') {
  818. value = getStr('"', utils_1.doubleQuotesEscapeChars);
  819. } else if (chr === '\'') {
  820. value = getStr('\'', utils_1.singleQuoteEscapeChars);
  821. } else if (substitutesEnabled && chr === '$') {
  822. pos++;
  823. value = getIdent();
  824. pseudo.valueType = 'substitute';
  825. } else {
  826. while (pos < l) {
  827. if (chr === ')') {
  828. break;
  829. }
  830. value += chr;
  831. pos++;
  832. chr = str.charAt(pos);
  833. }
  834. value = value.trim();
  835. }
  836. skipWhitespace();
  837. }
  838. if (pos >= l) {
  839. throw Error('Expected ")" but end of file reached.');
  840. }
  841. if (chr !== ')') {
  842. throw Error('Expected ")" but "' + chr + '" found.');
  843. }
  844. pos++;
  845. pseudo.value = value;
  846. }
  847. rule3 = rule3 || {};
  848. (rule3.pseudos = rule3.pseudos || []).push(pseudo);
  849. } else {
  850. break;
  851. }
  852. }
  853. return rule3;
  854. }
  855. return parse2();
  856. }
  857. exports.parseCssSelector = parseCssSelector;
  858. });
  859. var require_render = __commonJS(function(exports) {
  860. 'use strict';
  861. Object.defineProperty(exports, '__esModule', {
  862. value: true
  863. });
  864. var utils_1 = require_utils();
  865. function renderEntity(entity) {
  866. var res = '';
  867. switch (entity.type) {
  868. case 'ruleSet':
  869. var currentEntity = entity.rule;
  870. var parts = [];
  871. while (currentEntity) {
  872. if (currentEntity.nestingOperator) {
  873. parts.push(currentEntity.nestingOperator);
  874. }
  875. parts.push(renderEntity(currentEntity));
  876. currentEntity = currentEntity.rule;
  877. }
  878. res = parts.join(' ');
  879. break;
  880. case 'selectors':
  881. res = entity.selectors.map(renderEntity).join(', ');
  882. break;
  883. case 'rule':
  884. if (entity.tagName) {
  885. if (entity.tagName === '*') {
  886. res = '*';
  887. } else {
  888. res = utils_1.escapeIdentifier(entity.tagName);
  889. }
  890. }
  891. if (entity.id) {
  892. res += '#' + utils_1.escapeIdentifier(entity.id);
  893. }
  894. if (entity.classNames) {
  895. res += entity.classNames.map(function(cn) {
  896. return '.' + utils_1.escapeIdentifier(cn);
  897. }).join('');
  898. }
  899. if (entity.attrs) {
  900. res += entity.attrs.map(function(attr) {
  901. if ('operator' in attr) {
  902. if (attr.valueType === 'substitute') {
  903. return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']';
  904. } else {
  905. return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + utils_1.escapeStr(attr.value) + ']';
  906. }
  907. } else {
  908. return '[' + utils_1.escapeIdentifier(attr.name) + ']';
  909. }
  910. }).join('');
  911. }
  912. if (entity.pseudos) {
  913. res += entity.pseudos.map(function(pseudo) {
  914. if (pseudo.valueType) {
  915. if (pseudo.valueType === 'selector') {
  916. return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + renderEntity(pseudo.value) + ')';
  917. } else if (pseudo.valueType === 'substitute') {
  918. return ':' + utils_1.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')';
  919. } else if (pseudo.valueType === 'numeric') {
  920. return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')';
  921. } else {
  922. return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + utils_1.escapeIdentifier(pseudo.value) + ')';
  923. }
  924. } else {
  925. return ':' + utils_1.escapeIdentifier(pseudo.name);
  926. }
  927. }).join('');
  928. }
  929. break;
  930. default:
  931. throw Error('Unknown entity type: "' + entity.type + '".');
  932. }
  933. return res;
  934. }
  935. exports.renderEntity = renderEntity;
  936. });
  937. var require_lib = __commonJS(function(exports) {
  938. 'use strict';
  939. Object.defineProperty(exports, '__esModule', {
  940. value: true
  941. });
  942. var parser_context_1 = require_parser_context();
  943. var render_1 = require_render();
  944. var CssSelectorParser3 = function() {
  945. function CssSelectorParser4() {
  946. this.pseudos = {};
  947. this.attrEqualityMods = {};
  948. this.ruleNestingOperators = {};
  949. this.substitutesEnabled = false;
  950. }
  951. CssSelectorParser4.prototype.registerSelectorPseudos = function() {
  952. var pseudos = [];
  953. for (var _i = 0; _i < arguments.length; _i++) {
  954. pseudos[_i] = arguments[_i];
  955. }
  956. for (var _a = 0, pseudos_1 = pseudos; _a < pseudos_1.length; _a++) {
  957. var pseudo = pseudos_1[_a];
  958. this.pseudos[pseudo] = 'selector';
  959. }
  960. return this;
  961. };
  962. CssSelectorParser4.prototype.unregisterSelectorPseudos = function() {
  963. var pseudos = [];
  964. for (var _i = 0; _i < arguments.length; _i++) {
  965. pseudos[_i] = arguments[_i];
  966. }
  967. for (var _a = 0, pseudos_2 = pseudos; _a < pseudos_2.length; _a++) {
  968. var pseudo = pseudos_2[_a];
  969. delete this.pseudos[pseudo];
  970. }
  971. return this;
  972. };
  973. CssSelectorParser4.prototype.registerNumericPseudos = function() {
  974. var pseudos = [];
  975. for (var _i = 0; _i < arguments.length; _i++) {
  976. pseudos[_i] = arguments[_i];
  977. }
  978. for (var _a = 0, pseudos_3 = pseudos; _a < pseudos_3.length; _a++) {
  979. var pseudo = pseudos_3[_a];
  980. this.pseudos[pseudo] = 'numeric';
  981. }
  982. return this;
  983. };
  984. CssSelectorParser4.prototype.unregisterNumericPseudos = function() {
  985. var pseudos = [];
  986. for (var _i = 0; _i < arguments.length; _i++) {
  987. pseudos[_i] = arguments[_i];
  988. }
  989. for (var _a = 0, pseudos_4 = pseudos; _a < pseudos_4.length; _a++) {
  990. var pseudo = pseudos_4[_a];
  991. delete this.pseudos[pseudo];
  992. }
  993. return this;
  994. };
  995. CssSelectorParser4.prototype.registerNestingOperators = function() {
  996. var operators = [];
  997. for (var _i = 0; _i < arguments.length; _i++) {
  998. operators[_i] = arguments[_i];
  999. }
  1000. for (var _a = 0, operators_1 = operators; _a < operators_1.length; _a++) {
  1001. var operator = operators_1[_a];
  1002. this.ruleNestingOperators[operator] = true;
  1003. }
  1004. return this;
  1005. };
  1006. CssSelectorParser4.prototype.unregisterNestingOperators = function() {
  1007. var operators = [];
  1008. for (var _i = 0; _i < arguments.length; _i++) {
  1009. operators[_i] = arguments[_i];
  1010. }
  1011. for (var _a = 0, operators_2 = operators; _a < operators_2.length; _a++) {
  1012. var operator = operators_2[_a];
  1013. delete this.ruleNestingOperators[operator];
  1014. }
  1015. return this;
  1016. };
  1017. CssSelectorParser4.prototype.registerAttrEqualityMods = function() {
  1018. var mods = [];
  1019. for (var _i = 0; _i < arguments.length; _i++) {
  1020. mods[_i] = arguments[_i];
  1021. }
  1022. for (var _a = 0, mods_1 = mods; _a < mods_1.length; _a++) {
  1023. var mod = mods_1[_a];
  1024. this.attrEqualityMods[mod] = true;
  1025. }
  1026. return this;
  1027. };
  1028. CssSelectorParser4.prototype.unregisterAttrEqualityMods = function() {
  1029. var mods = [];
  1030. for (var _i = 0; _i < arguments.length; _i++) {
  1031. mods[_i] = arguments[_i];
  1032. }
  1033. for (var _a = 0, mods_2 = mods; _a < mods_2.length; _a++) {
  1034. var mod = mods_2[_a];
  1035. delete this.attrEqualityMods[mod];
  1036. }
  1037. return this;
  1038. };
  1039. CssSelectorParser4.prototype.enableSubstitutes = function() {
  1040. this.substitutesEnabled = true;
  1041. return this;
  1042. };
  1043. CssSelectorParser4.prototype.disableSubstitutes = function() {
  1044. this.substitutesEnabled = false;
  1045. return this;
  1046. };
  1047. CssSelectorParser4.prototype.parse = function(str) {
  1048. return parser_context_1.parseCssSelector(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled);
  1049. };
  1050. CssSelectorParser4.prototype.render = function(path) {
  1051. return render_1.renderEntity(path).trim();
  1052. };
  1053. return CssSelectorParser4;
  1054. }();
  1055. exports.CssSelectorParser = CssSelectorParser3;
  1056. });
  1057. var require_noop = __commonJS(function(exports, module) {
  1058. 'use strict';
  1059. module.exports = function() {};
  1060. });
  1061. var require_is_value = __commonJS(function(exports, module) {
  1062. 'use strict';
  1063. var _undefined = require_noop()();
  1064. module.exports = function(val) {
  1065. return val !== _undefined && val !== null;
  1066. };
  1067. });
  1068. var require_normalize_options = __commonJS(function(exports, module) {
  1069. 'use strict';
  1070. var isValue = require_is_value();
  1071. var forEach = Array.prototype.forEach;
  1072. var create = Object.create;
  1073. var process2 = function process2(src, obj) {
  1074. var key;
  1075. for (key in src) {
  1076. obj[key] = src[key];
  1077. }
  1078. };
  1079. module.exports = function(opts1) {
  1080. var result = create(null);
  1081. forEach.call(arguments, function(options) {
  1082. if (!isValue(options)) {
  1083. return;
  1084. }
  1085. process2(Object(options), result);
  1086. });
  1087. return result;
  1088. };
  1089. });
  1090. var require_is_implemented = __commonJS(function(exports, module) {
  1091. 'use strict';
  1092. module.exports = function() {
  1093. var sign = Math.sign;
  1094. if (typeof sign !== 'function') {
  1095. return false;
  1096. }
  1097. return sign(10) === 1 && sign(-20) === -1;
  1098. };
  1099. });
  1100. var require_shim = __commonJS(function(exports, module) {
  1101. 'use strict';
  1102. module.exports = function(value) {
  1103. value = Number(value);
  1104. if (isNaN(value) || value === 0) {
  1105. return value;
  1106. }
  1107. return value > 0 ? 1 : -1;
  1108. };
  1109. });
  1110. var require_sign = __commonJS(function(exports, module) {
  1111. 'use strict';
  1112. module.exports = require_is_implemented()() ? Math.sign : require_shim();
  1113. });
  1114. var require_to_integer = __commonJS(function(exports, module) {
  1115. 'use strict';
  1116. var sign = require_sign();
  1117. var abs = Math.abs;
  1118. var floor = Math.floor;
  1119. module.exports = function(value) {
  1120. if (isNaN(value)) {
  1121. return 0;
  1122. }
  1123. value = Number(value);
  1124. if (value === 0 || !isFinite(value)) {
  1125. return value;
  1126. }
  1127. return sign(value) * floor(abs(value));
  1128. };
  1129. });
  1130. var require_to_pos_integer = __commonJS(function(exports, module) {
  1131. 'use strict';
  1132. var toInteger = require_to_integer();
  1133. var max = Math.max;
  1134. module.exports = function(value) {
  1135. return max(0, toInteger(value));
  1136. };
  1137. });
  1138. var require_resolve_length = __commonJS(function(exports, module) {
  1139. 'use strict';
  1140. var toPosInt = require_to_pos_integer();
  1141. module.exports = function(optsLength, fnLength, isAsync) {
  1142. var length;
  1143. if (isNaN(optsLength)) {
  1144. length = fnLength;
  1145. if (!(length >= 0)) {
  1146. return 1;
  1147. }
  1148. if (isAsync && length) {
  1149. return length - 1;
  1150. }
  1151. return length;
  1152. }
  1153. if (optsLength === false) {
  1154. return false;
  1155. }
  1156. return toPosInt(optsLength);
  1157. };
  1158. });
  1159. var require_valid_callable = __commonJS(function(exports, module) {
  1160. 'use strict';
  1161. module.exports = function(fn) {
  1162. if (typeof fn !== 'function') {
  1163. throw new TypeError(fn + ' is not a function');
  1164. }
  1165. return fn;
  1166. };
  1167. });
  1168. var require_valid_value = __commonJS(function(exports, module) {
  1169. 'use strict';
  1170. var isValue = require_is_value();
  1171. module.exports = function(value) {
  1172. if (!isValue(value)) {
  1173. throw new TypeError('Cannot use null or undefined');
  1174. }
  1175. return value;
  1176. };
  1177. });
  1178. var require_iterate = __commonJS(function(exports, module) {
  1179. 'use strict';
  1180. var callable = require_valid_callable();
  1181. var value = require_valid_value();
  1182. var bind = Function.prototype.bind;
  1183. var call = Function.prototype.call;
  1184. var keys = Object.keys;
  1185. var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
  1186. module.exports = function(method, defVal) {
  1187. return function(obj, cb) {
  1188. var list, thisArg = arguments[2], compareFn = arguments[3];
  1189. obj = Object(value(obj));
  1190. callable(cb);
  1191. list = keys(obj);
  1192. if (compareFn) {
  1193. list.sort(typeof compareFn === 'function' ? bind.call(compareFn, obj) : void 0);
  1194. }
  1195. if (typeof method !== 'function') {
  1196. method = list[method];
  1197. }
  1198. return call.call(method, list, function(key, index) {
  1199. if (!objPropertyIsEnumerable.call(obj, key)) {
  1200. return defVal;
  1201. }
  1202. return call.call(cb, thisArg, obj[key], key, obj, index);
  1203. });
  1204. };
  1205. };
  1206. });
  1207. var require_for_each = __commonJS(function(exports, module) {
  1208. 'use strict';
  1209. module.exports = require_iterate()('forEach');
  1210. });
  1211. var require_registered_extensions = __commonJS(function() {
  1212. 'use strict';
  1213. });
  1214. var require_is_implemented2 = __commonJS(function(exports, module) {
  1215. 'use strict';
  1216. module.exports = function() {
  1217. var assign = Object.assign, obj;
  1218. if (typeof assign !== 'function') {
  1219. return false;
  1220. }
  1221. obj = {
  1222. foo: 'raz'
  1223. };
  1224. assign(obj, {
  1225. bar: 'dwa'
  1226. }, {
  1227. trzy: 'trzy'
  1228. });
  1229. return obj.foo + obj.bar + obj.trzy === 'razdwatrzy';
  1230. };
  1231. });
  1232. var require_is_implemented3 = __commonJS(function(exports, module) {
  1233. 'use strict';
  1234. module.exports = function() {
  1235. try {
  1236. Object.keys('primitive');
  1237. return true;
  1238. } catch (e) {
  1239. return false;
  1240. }
  1241. };
  1242. });
  1243. var require_shim2 = __commonJS(function(exports, module) {
  1244. 'use strict';
  1245. var isValue = require_is_value();
  1246. var keys = Object.keys;
  1247. module.exports = function(object) {
  1248. return keys(isValue(object) ? Object(object) : object);
  1249. };
  1250. });
  1251. var require_keys = __commonJS(function(exports, module) {
  1252. 'use strict';
  1253. module.exports = require_is_implemented3()() ? Object.keys : require_shim2();
  1254. });
  1255. var require_shim3 = __commonJS(function(exports, module) {
  1256. 'use strict';
  1257. var keys = require_keys();
  1258. var value = require_valid_value();
  1259. var max = Math.max;
  1260. module.exports = function(dest, src) {
  1261. var error, i, length = max(arguments.length, 2), assign;
  1262. dest = Object(value(dest));
  1263. assign = function assign(key) {
  1264. try {
  1265. dest[key] = src[key];
  1266. } catch (e) {
  1267. if (!error) {
  1268. error = e;
  1269. }
  1270. }
  1271. };
  1272. for (i = 1; i < length; ++i) {
  1273. src = arguments[i];
  1274. keys(src).forEach(assign);
  1275. }
  1276. if (error !== void 0) {
  1277. throw error;
  1278. }
  1279. return dest;
  1280. };
  1281. });
  1282. var require_assign = __commonJS(function(exports, module) {
  1283. 'use strict';
  1284. module.exports = require_is_implemented2()() ? Object.assign : require_shim3();
  1285. });
  1286. var require_is_object = __commonJS(function(exports, module) {
  1287. 'use strict';
  1288. var isValue = require_is_value();
  1289. var map = {
  1290. function: true,
  1291. object: true
  1292. };
  1293. module.exports = function(value) {
  1294. return isValue(value) && map[_typeof(value)] || false;
  1295. };
  1296. });
  1297. var require_custom = __commonJS(function(exports, module) {
  1298. 'use strict';
  1299. var assign = require_assign();
  1300. var isObject = require_is_object();
  1301. var isValue = require_is_value();
  1302. var captureStackTrace = Error.captureStackTrace;
  1303. module.exports = function(message) {
  1304. var err2 = new Error(message), code = arguments[1], ext = arguments[2];
  1305. if (!isValue(ext)) {
  1306. if (isObject(code)) {
  1307. ext = code;
  1308. code = null;
  1309. }
  1310. }
  1311. if (isValue(ext)) {
  1312. assign(err2, ext);
  1313. }
  1314. if (isValue(code)) {
  1315. err2.code = code;
  1316. }
  1317. if (captureStackTrace) {
  1318. captureStackTrace(err2, module.exports);
  1319. }
  1320. return err2;
  1321. };
  1322. });
  1323. var require_mixin = __commonJS(function(exports, module) {
  1324. 'use strict';
  1325. var value = require_valid_value();
  1326. var defineProperty = Object.defineProperty;
  1327. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1328. var getOwnPropertyNames = Object.getOwnPropertyNames;
  1329. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  1330. module.exports = function(target, source) {
  1331. var error, sourceObject = Object(value(source));
  1332. target = Object(value(target));
  1333. getOwnPropertyNames(sourceObject).forEach(function(name) {
  1334. try {
  1335. defineProperty(target, name, getOwnPropertyDescriptor(source, name));
  1336. } catch (e) {
  1337. error = e;
  1338. }
  1339. });
  1340. if (typeof getOwnPropertySymbols === 'function') {
  1341. getOwnPropertySymbols(sourceObject).forEach(function(symbol) {
  1342. try {
  1343. defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));
  1344. } catch (e) {
  1345. error = e;
  1346. }
  1347. });
  1348. }
  1349. if (error !== void 0) {
  1350. throw error;
  1351. }
  1352. return target;
  1353. };
  1354. });
  1355. var require_define_length = __commonJS(function(exports, module) {
  1356. 'use strict';
  1357. var toPosInt = require_to_pos_integer();
  1358. var test = function test(arg1, arg2) {
  1359. return arg2;
  1360. };
  1361. var desc;
  1362. var defineProperty;
  1363. var generate;
  1364. var mixin;
  1365. try {
  1366. Object.defineProperty(test, 'length', {
  1367. configurable: true,
  1368. writable: false,
  1369. enumerable: false,
  1370. value: 1
  1371. });
  1372. } catch (ignore) {}
  1373. if (test.length === 1) {
  1374. desc = {
  1375. configurable: true,
  1376. writable: false,
  1377. enumerable: false
  1378. };
  1379. defineProperty = Object.defineProperty;
  1380. module.exports = function(fn, length) {
  1381. length = toPosInt(length);
  1382. if (fn.length === length) {
  1383. return fn;
  1384. }
  1385. desc.value = length;
  1386. return defineProperty(fn, 'length', desc);
  1387. };
  1388. } else {
  1389. mixin = require_mixin();
  1390. generate = function() {
  1391. var cache21 = [];
  1392. return function(length) {
  1393. var args, i = 0;
  1394. if (cache21[length]) {
  1395. return cache21[length];
  1396. }
  1397. args = [];
  1398. while (length--) {
  1399. args.push('a' + (++i).toString(36));
  1400. }
  1401. return new Function('fn', 'return function (' + args.join(', ') + ') { return fn.apply(this, arguments); };');
  1402. };
  1403. }();
  1404. module.exports = function(src, length) {
  1405. var target;
  1406. length = toPosInt(length);
  1407. if (src.length === length) {
  1408. return src;
  1409. }
  1410. target = generate(length)(src);
  1411. try {
  1412. mixin(target, src);
  1413. } catch (ignore) {}
  1414. return target;
  1415. };
  1416. }
  1417. });
  1418. var require_is = __commonJS(function(exports, module) {
  1419. 'use strict';
  1420. var _undefined = void 0;
  1421. module.exports = function(value) {
  1422. return value !== _undefined && value !== null;
  1423. };
  1424. });
  1425. var require_is2 = __commonJS(function(exports, module) {
  1426. 'use strict';
  1427. var isValue = require_is();
  1428. var possibleTypes = {
  1429. object: true,
  1430. function: true,
  1431. undefined: true
  1432. };
  1433. module.exports = function(value) {
  1434. if (!isValue(value)) {
  1435. return false;
  1436. }
  1437. return hasOwnProperty.call(possibleTypes, _typeof(value));
  1438. };
  1439. });
  1440. var require_is3 = __commonJS(function(exports, module) {
  1441. 'use strict';
  1442. var isObject = require_is2();
  1443. module.exports = function(value) {
  1444. if (!isObject(value)) {
  1445. return false;
  1446. }
  1447. try {
  1448. if (!value.constructor) {
  1449. return false;
  1450. }
  1451. return value.constructor.prototype === value;
  1452. } catch (error) {
  1453. return false;
  1454. }
  1455. };
  1456. });
  1457. var require_is4 = __commonJS(function(exports, module) {
  1458. 'use strict';
  1459. var isPrototype = require_is3();
  1460. module.exports = function(value) {
  1461. if (typeof value !== 'function') {
  1462. return false;
  1463. }
  1464. if (!hasOwnProperty.call(value, 'length')) {
  1465. return false;
  1466. }
  1467. try {
  1468. if (typeof value.length !== 'number') {
  1469. return false;
  1470. }
  1471. if (typeof value.call !== 'function') {
  1472. return false;
  1473. }
  1474. if (typeof value.apply !== 'function') {
  1475. return false;
  1476. }
  1477. } catch (error) {
  1478. return false;
  1479. }
  1480. return !isPrototype(value);
  1481. };
  1482. });
  1483. var require_is5 = __commonJS(function(exports, module) {
  1484. 'use strict';
  1485. var isFunction = require_is4();
  1486. var classRe = /^\s*class[\s{/}]/;
  1487. var functionToString = Function.prototype.toString;
  1488. module.exports = function(value) {
  1489. if (!isFunction(value)) {
  1490. return false;
  1491. }
  1492. if (classRe.test(functionToString.call(value))) {
  1493. return false;
  1494. }
  1495. return true;
  1496. };
  1497. });
  1498. var require_is_implemented4 = __commonJS(function(exports, module) {
  1499. 'use strict';
  1500. var str = 'razdwatrzy';
  1501. module.exports = function() {
  1502. if (typeof str.contains !== 'function') {
  1503. return false;
  1504. }
  1505. return str.contains('dwa') === true && str.contains('foo') === false;
  1506. };
  1507. });
  1508. var require_shim4 = __commonJS(function(exports, module) {
  1509. 'use strict';
  1510. var indexOf = String.prototype.indexOf;
  1511. module.exports = function(searchString) {
  1512. return indexOf.call(this, searchString, arguments[1]) > -1;
  1513. };
  1514. });
  1515. var require_contains = __commonJS(function(exports, module) {
  1516. 'use strict';
  1517. module.exports = require_is_implemented4()() ? String.prototype.contains : require_shim4();
  1518. });
  1519. var require_d = __commonJS(function(exports, module) {
  1520. 'use strict';
  1521. var isValue = require_is();
  1522. var isPlainFunction = require_is5();
  1523. var assign = require_assign();
  1524. var normalizeOpts = require_normalize_options();
  1525. var contains6 = require_contains();
  1526. var d = module.exports = function(dscr, value) {
  1527. var c, e, w, options, desc;
  1528. if (arguments.length < 2 || typeof dscr !== 'string') {
  1529. options = value;
  1530. value = dscr;
  1531. dscr = null;
  1532. } else {
  1533. options = arguments[2];
  1534. }
  1535. if (isValue(dscr)) {
  1536. c = contains6.call(dscr, 'c');
  1537. e = contains6.call(dscr, 'e');
  1538. w = contains6.call(dscr, 'w');
  1539. } else {
  1540. c = w = true;
  1541. e = false;
  1542. }
  1543. desc = {
  1544. value: value,
  1545. configurable: c,
  1546. enumerable: e,
  1547. writable: w
  1548. };
  1549. return !options ? desc : assign(normalizeOpts(options), desc);
  1550. };
  1551. d.gs = function(dscr, get, set) {
  1552. var c, e, options, desc;
  1553. if (typeof dscr !== 'string') {
  1554. options = set;
  1555. set = get;
  1556. get = dscr;
  1557. dscr = null;
  1558. } else {
  1559. options = arguments[3];
  1560. }
  1561. if (!isValue(get)) {
  1562. get = void 0;
  1563. } else if (!isPlainFunction(get)) {
  1564. options = get;
  1565. get = set = void 0;
  1566. } else if (!isValue(set)) {
  1567. set = void 0;
  1568. } else if (!isPlainFunction(set)) {
  1569. options = set;
  1570. set = void 0;
  1571. }
  1572. if (isValue(dscr)) {
  1573. c = contains6.call(dscr, 'c');
  1574. e = contains6.call(dscr, 'e');
  1575. } else {
  1576. c = true;
  1577. e = false;
  1578. }
  1579. desc = {
  1580. get: get,
  1581. set: set,
  1582. configurable: c,
  1583. enumerable: e
  1584. };
  1585. return !options ? desc : assign(normalizeOpts(options), desc);
  1586. };
  1587. });
  1588. var require_event_emitter = __commonJS(function(exports, module) {
  1589. 'use strict';
  1590. var d = require_d();
  1591. var callable = require_valid_callable();
  1592. var apply = Function.prototype.apply;
  1593. var call = Function.prototype.call;
  1594. var create = Object.create;
  1595. var defineProperty = Object.defineProperty;
  1596. var defineProperties = Object.defineProperties;
  1597. var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  1598. var descriptor = {
  1599. configurable: true,
  1600. enumerable: false,
  1601. writable: true
  1602. };
  1603. var on;
  1604. var once;
  1605. var off;
  1606. var emit;
  1607. var methods;
  1608. var descriptors;
  1609. var base;
  1610. on = function on(type, listener) {
  1611. var data2;
  1612. callable(listener);
  1613. if (!hasOwnProperty2.call(this, '__ee__')) {
  1614. data2 = descriptor.value = create(null);
  1615. defineProperty(this, '__ee__', descriptor);
  1616. descriptor.value = null;
  1617. } else {
  1618. data2 = this.__ee__;
  1619. }
  1620. if (!data2[type]) {
  1621. data2[type] = listener;
  1622. } else if (_typeof(data2[type]) === 'object') {
  1623. data2[type].push(listener);
  1624. } else {
  1625. data2[type] = [ data2[type], listener ];
  1626. }
  1627. return this;
  1628. };
  1629. once = function once(type, listener) {
  1630. var _once, self2;
  1631. callable(listener);
  1632. self2 = this;
  1633. on.call(this, type, _once = function once2() {
  1634. off.call(self2, type, _once);
  1635. apply.call(listener, this, arguments);
  1636. });
  1637. _once.__eeOnceListener__ = listener;
  1638. return this;
  1639. };
  1640. off = function off(type, listener) {
  1641. var data2, listeners, candidate, i;
  1642. callable(listener);
  1643. if (!hasOwnProperty2.call(this, '__ee__')) {
  1644. return this;
  1645. }
  1646. data2 = this.__ee__;
  1647. if (!data2[type]) {
  1648. return this;
  1649. }
  1650. listeners = data2[type];
  1651. if (_typeof(listeners) === 'object') {
  1652. for (i = 0; candidate = listeners[i]; ++i) {
  1653. if (candidate === listener || candidate.__eeOnceListener__ === listener) {
  1654. if (listeners.length === 2) {
  1655. data2[type] = listeners[i ? 0 : 1];
  1656. } else {
  1657. listeners.splice(i, 1);
  1658. }
  1659. }
  1660. }
  1661. } else {
  1662. if (listeners === listener || listeners.__eeOnceListener__ === listener) {
  1663. delete data2[type];
  1664. }
  1665. }
  1666. return this;
  1667. };
  1668. emit = function emit(type) {
  1669. var i, l, listener, listeners, args;
  1670. if (!hasOwnProperty2.call(this, '__ee__')) {
  1671. return;
  1672. }
  1673. listeners = this.__ee__[type];
  1674. if (!listeners) {
  1675. return;
  1676. }
  1677. if (_typeof(listeners) === 'object') {
  1678. l = arguments.length;
  1679. args = new Array(l - 1);
  1680. for (i = 1; i < l; ++i) {
  1681. args[i - 1] = arguments[i];
  1682. }
  1683. listeners = listeners.slice();
  1684. for (i = 0; listener = listeners[i]; ++i) {
  1685. apply.call(listener, this, args);
  1686. }
  1687. } else {
  1688. switch (arguments.length) {
  1689. case 1:
  1690. call.call(listeners, this);
  1691. break;
  1692. case 2:
  1693. call.call(listeners, this, arguments[1]);
  1694. break;
  1695. case 3:
  1696. call.call(listeners, this, arguments[1], arguments[2]);
  1697. break;
  1698. default:
  1699. l = arguments.length;
  1700. args = new Array(l - 1);
  1701. for (i = 1; i < l; ++i) {
  1702. args[i - 1] = arguments[i];
  1703. }
  1704. apply.call(listeners, this, args);
  1705. }
  1706. }
  1707. };
  1708. methods = {
  1709. on: on,
  1710. once: once,
  1711. off: off,
  1712. emit: emit
  1713. };
  1714. descriptors = {
  1715. on: d(on),
  1716. once: d(once),
  1717. off: d(off),
  1718. emit: d(emit)
  1719. };
  1720. base = defineProperties({}, descriptors);
  1721. module.exports = exports = function exports(o) {
  1722. return o == null ? create(base) : defineProperties(Object(o), descriptors);
  1723. };
  1724. exports.methods = methods;
  1725. });
  1726. var require_is_implemented5 = __commonJS(function(exports, module) {
  1727. 'use strict';
  1728. module.exports = function() {
  1729. var from = Array.from, arr, result;
  1730. if (typeof from !== 'function') {
  1731. return false;
  1732. }
  1733. arr = [ 'raz', 'dwa' ];
  1734. result = from(arr);
  1735. return Boolean(result && result !== arr && result[1] === 'dwa');
  1736. };
  1737. });
  1738. var require_is_implemented6 = __commonJS(function(exports, module) {
  1739. 'use strict';
  1740. module.exports = function() {
  1741. if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) !== 'object') {
  1742. return false;
  1743. }
  1744. if (!globalThis) {
  1745. return false;
  1746. }
  1747. return globalThis.Array === Array;
  1748. };
  1749. });
  1750. var require_implementation = __commonJS(function(exports, module) {
  1751. var naiveFallback = function naiveFallback() {
  1752. if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self) {
  1753. return self;
  1754. }
  1755. if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window) {
  1756. return window;
  1757. }
  1758. throw new Error('Unable to resolve global `this`');
  1759. };
  1760. module.exports = function() {
  1761. if (this) {
  1762. return this;
  1763. }
  1764. try {
  1765. Object.defineProperty(Object.prototype, '__global__', {
  1766. get: function get() {
  1767. return this;
  1768. },
  1769. configurable: true
  1770. });
  1771. } catch (error) {
  1772. return naiveFallback();
  1773. }
  1774. try {
  1775. if (!__global__) {
  1776. return naiveFallback();
  1777. }
  1778. return __global__;
  1779. } finally {
  1780. delete Object.prototype.__global__;
  1781. }
  1782. }();
  1783. });
  1784. var require_global_this = __commonJS(function(exports, module) {
  1785. 'use strict';
  1786. module.exports = require_is_implemented6()() ? globalThis : require_implementation();
  1787. });
  1788. var require_is_implemented7 = __commonJS(function(exports, module) {
  1789. 'use strict';
  1790. var global2 = require_global_this();
  1791. var validTypes = {
  1792. object: true,
  1793. symbol: true
  1794. };
  1795. module.exports = function() {
  1796. var _Symbol = global2.Symbol;
  1797. var symbol;
  1798. if (typeof _Symbol !== 'function') {
  1799. return false;
  1800. }
  1801. symbol = _Symbol('test symbol');
  1802. try {
  1803. String(symbol);
  1804. } catch (e) {
  1805. return false;
  1806. }
  1807. if (!validTypes[_typeof(_Symbol.iterator)]) {
  1808. return false;
  1809. }
  1810. if (!validTypes[_typeof(_Symbol.toPrimitive)]) {
  1811. return false;
  1812. }
  1813. if (!validTypes[_typeof(_Symbol.toStringTag)]) {
  1814. return false;
  1815. }
  1816. return true;
  1817. };
  1818. });
  1819. var require_is_symbol = __commonJS(function(exports, module) {
  1820. 'use strict';
  1821. module.exports = function(value) {
  1822. if (!value) {
  1823. return false;
  1824. }
  1825. if (_typeof(value) === 'symbol') {
  1826. return true;
  1827. }
  1828. if (!value.constructor) {
  1829. return false;
  1830. }
  1831. if (value.constructor.name !== 'Symbol') {
  1832. return false;
  1833. }
  1834. return value[value.constructor.toStringTag] === 'Symbol';
  1835. };
  1836. });
  1837. var require_validate_symbol = __commonJS(function(exports, module) {
  1838. 'use strict';
  1839. var isSymbol = require_is_symbol();
  1840. module.exports = function(value) {
  1841. if (!isSymbol(value)) {
  1842. throw new TypeError(value + ' is not a symbol');
  1843. }
  1844. return value;
  1845. };
  1846. });
  1847. var require_generate_name = __commonJS(function(exports, module) {
  1848. 'use strict';
  1849. var d = require_d();
  1850. var create = Object.create;
  1851. var defineProperty = Object.defineProperty;
  1852. var objPrototype = Object.prototype;
  1853. var created = create(null);
  1854. module.exports = function(desc) {
  1855. var postfix = 0, name, ie11BugWorkaround;
  1856. while (created[desc + (postfix || '')]) {
  1857. ++postfix;
  1858. }
  1859. desc += postfix || '';
  1860. created[desc] = true;
  1861. name = '@@' + desc;
  1862. defineProperty(objPrototype, name, d.gs(null, function(value) {
  1863. if (ie11BugWorkaround) {
  1864. return;
  1865. }
  1866. ie11BugWorkaround = true;
  1867. defineProperty(this, name, d(value));
  1868. ie11BugWorkaround = false;
  1869. }));
  1870. return name;
  1871. };
  1872. });
  1873. var require_standard_symbols = __commonJS(function(exports, module) {
  1874. 'use strict';
  1875. var d = require_d();
  1876. var NativeSymbol = require_global_this().Symbol;
  1877. module.exports = function(SymbolPolyfill) {
  1878. return Object.defineProperties(SymbolPolyfill, {
  1879. hasInstance: d('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')),
  1880. isConcatSpreadable: d('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')),
  1881. iterator: d('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')),
  1882. match: d('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')),
  1883. replace: d('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')),
  1884. search: d('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')),
  1885. species: d('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')),
  1886. split: d('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')),
  1887. toPrimitive: d('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')),
  1888. toStringTag: d('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')),
  1889. unscopables: d('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables'))
  1890. });
  1891. };
  1892. });
  1893. var require_symbol_registry = __commonJS(function(exports, module) {
  1894. 'use strict';
  1895. var d = require_d();
  1896. var validateSymbol = require_validate_symbol();
  1897. var registry = Object.create(null);
  1898. module.exports = function(SymbolPolyfill) {
  1899. return Object.defineProperties(SymbolPolyfill, {
  1900. for: d(function(key) {
  1901. if (registry[key]) {
  1902. return registry[key];
  1903. }
  1904. return registry[key] = SymbolPolyfill(String(key));
  1905. }),
  1906. keyFor: d(function(symbol) {
  1907. var key;
  1908. validateSymbol(symbol);
  1909. for (key in registry) {
  1910. if (registry[key] === symbol) {
  1911. return key;
  1912. }
  1913. }
  1914. return void 0;
  1915. })
  1916. });
  1917. };
  1918. });
  1919. var require_polyfill = __commonJS(function(exports, module) {
  1920. 'use strict';
  1921. var d = require_d();
  1922. var validateSymbol = require_validate_symbol();
  1923. var NativeSymbol = require_global_this().Symbol;
  1924. var generateName = require_generate_name();
  1925. var setupStandardSymbols = require_standard_symbols();
  1926. var setupSymbolRegistry = require_symbol_registry();
  1927. var create = Object.create;
  1928. var defineProperties = Object.defineProperties;
  1929. var defineProperty = Object.defineProperty;
  1930. var SymbolPolyfill;
  1931. var HiddenSymbol;
  1932. var isNativeSafe;
  1933. if (typeof NativeSymbol === 'function') {
  1934. try {
  1935. String(NativeSymbol());
  1936. isNativeSafe = true;
  1937. } catch (ignore) {}
  1938. } else {
  1939. NativeSymbol = null;
  1940. }
  1941. HiddenSymbol = function _Symbol2(description) {
  1942. if (this instanceof HiddenSymbol) {
  1943. throw new TypeError('Symbol is not a constructor');
  1944. }
  1945. return SymbolPolyfill(description);
  1946. };
  1947. module.exports = SymbolPolyfill = function _Symbol3(description) {
  1948. var symbol;
  1949. if (this instanceof _Symbol3) {
  1950. throw new TypeError('Symbol is not a constructor');
  1951. }
  1952. if (isNativeSafe) {
  1953. return NativeSymbol(description);
  1954. }
  1955. symbol = create(HiddenSymbol.prototype);
  1956. description = description === void 0 ? '' : String(description);
  1957. return defineProperties(symbol, {
  1958. __description__: d('', description),
  1959. __name__: d('', generateName(description))
  1960. });
  1961. };
  1962. setupStandardSymbols(SymbolPolyfill);
  1963. setupSymbolRegistry(SymbolPolyfill);
  1964. defineProperties(HiddenSymbol.prototype, {
  1965. constructor: d(SymbolPolyfill),
  1966. toString: d('', function() {
  1967. return this.__name__;
  1968. })
  1969. });
  1970. defineProperties(SymbolPolyfill.prototype, {
  1971. toString: d(function() {
  1972. return 'Symbol (' + validateSymbol(this).__description__ + ')';
  1973. }),
  1974. valueOf: d(function() {
  1975. return validateSymbol(this);
  1976. })
  1977. });
  1978. defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function() {
  1979. var symbol = validateSymbol(this);
  1980. if (_typeof(symbol) === 'symbol') {
  1981. return symbol;
  1982. }
  1983. return symbol.toString();
  1984. }));
  1985. defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
  1986. defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
  1987. defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
  1988. });
  1989. var require_es6_symbol = __commonJS(function(exports, module) {
  1990. 'use strict';
  1991. module.exports = require_is_implemented7()() ? require_global_this().Symbol : require_polyfill();
  1992. });
  1993. var require_is_arguments = __commonJS(function(exports, module) {
  1994. 'use strict';
  1995. var objToString = Object.prototype.toString;
  1996. var id = objToString.call(function() {
  1997. return arguments;
  1998. }());
  1999. module.exports = function(value) {
  2000. return objToString.call(value) === id;
  2001. };
  2002. });
  2003. var require_is_function = __commonJS(function(exports, module) {
  2004. 'use strict';
  2005. var objToString = Object.prototype.toString;
  2006. var isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
  2007. module.exports = function(value) {
  2008. return typeof value === 'function' && isFunctionStringTag(objToString.call(value));
  2009. };
  2010. });
  2011. var require_is_string = __commonJS(function(exports, module) {
  2012. 'use strict';
  2013. var objToString = Object.prototype.toString;
  2014. var id = objToString.call('');
  2015. module.exports = function(value) {
  2016. return typeof value === 'string' || value && _typeof(value) === 'object' && (value instanceof String || objToString.call(value) === id) || false;
  2017. };
  2018. });
  2019. var require_shim5 = __commonJS(function(exports, module) {
  2020. 'use strict';
  2021. var iteratorSymbol = require_es6_symbol().iterator;
  2022. var isArguments = require_is_arguments();
  2023. var isFunction = require_is_function();
  2024. var toPosInt = require_to_pos_integer();
  2025. var callable = require_valid_callable();
  2026. var validValue = require_valid_value();
  2027. var isValue = require_is_value();
  2028. var isString = require_is_string();
  2029. var isArray = Array.isArray;
  2030. var call = Function.prototype.call;
  2031. var desc = {
  2032. configurable: true,
  2033. enumerable: true,
  2034. writable: true,
  2035. value: null
  2036. };
  2037. var defineProperty = Object.defineProperty;
  2038. module.exports = function(arrayLike) {
  2039. var mapFn = arguments[1], thisArg = arguments[2], Context2, i, j, arr, length, code, iterator, result, getIterator, value;
  2040. arrayLike = Object(validValue(arrayLike));
  2041. if (isValue(mapFn)) {
  2042. callable(mapFn);
  2043. }
  2044. if (!this || this === Array || !isFunction(this)) {
  2045. if (!mapFn) {
  2046. if (isArguments(arrayLike)) {
  2047. length = arrayLike.length;
  2048. if (length !== 1) {
  2049. return Array.apply(null, arrayLike);
  2050. }
  2051. arr = new Array(1);
  2052. arr[0] = arrayLike[0];
  2053. return arr;
  2054. }
  2055. if (isArray(arrayLike)) {
  2056. arr = new Array(length = arrayLike.length);
  2057. for (i = 0; i < length; ++i) {
  2058. arr[i] = arrayLike[i];
  2059. }
  2060. return arr;
  2061. }
  2062. }
  2063. arr = [];
  2064. } else {
  2065. Context2 = this;
  2066. }
  2067. if (!isArray(arrayLike)) {
  2068. if ((getIterator = arrayLike[iteratorSymbol]) !== void 0) {
  2069. iterator = callable(getIterator).call(arrayLike);
  2070. if (Context2) {
  2071. arr = new Context2();
  2072. }
  2073. result = iterator.next();
  2074. i = 0;
  2075. while (!result.done) {
  2076. value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
  2077. if (Context2) {
  2078. desc.value = value;
  2079. defineProperty(arr, i, desc);
  2080. } else {
  2081. arr[i] = value;
  2082. }
  2083. result = iterator.next();
  2084. ++i;
  2085. }
  2086. length = i;
  2087. } else if (isString(arrayLike)) {
  2088. length = arrayLike.length;
  2089. if (Context2) {
  2090. arr = new Context2();
  2091. }
  2092. for (i = 0, j = 0; i < length; ++i) {
  2093. value = arrayLike[i];
  2094. if (i + 1 < length) {
  2095. code = value.charCodeAt(0);
  2096. if (code >= 55296 && code <= 56319) {
  2097. value += arrayLike[++i];
  2098. }
  2099. }
  2100. value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
  2101. if (Context2) {
  2102. desc.value = value;
  2103. defineProperty(arr, j, desc);
  2104. } else {
  2105. arr[j] = value;
  2106. }
  2107. ++j;
  2108. }
  2109. length = j;
  2110. }
  2111. }
  2112. if (length === void 0) {
  2113. length = toPosInt(arrayLike.length);
  2114. if (Context2) {
  2115. arr = new Context2(length);
  2116. }
  2117. for (i = 0; i < length; ++i) {
  2118. value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
  2119. if (Context2) {
  2120. desc.value = value;
  2121. defineProperty(arr, i, desc);
  2122. } else {
  2123. arr[i] = value;
  2124. }
  2125. }
  2126. }
  2127. if (Context2) {
  2128. desc.value = null;
  2129. arr.length = length;
  2130. }
  2131. return arr;
  2132. };
  2133. });
  2134. var require_from = __commonJS(function(exports, module) {
  2135. 'use strict';
  2136. module.exports = require_is_implemented5()() ? Array.from : require_shim5();
  2137. });
  2138. var require_to_array = __commonJS(function(exports, module) {
  2139. 'use strict';
  2140. var from = require_from();
  2141. var isArray = Array.isArray;
  2142. module.exports = function(arrayLike) {
  2143. return isArray(arrayLike) ? arrayLike : from(arrayLike);
  2144. };
  2145. });
  2146. var require_resolve_resolve = __commonJS(function(exports, module) {
  2147. 'use strict';
  2148. var toArray2 = require_to_array();
  2149. var isValue = require_is_value();
  2150. var callable = require_valid_callable();
  2151. var slice = Array.prototype.slice;
  2152. var resolveArgs;
  2153. resolveArgs = function resolveArgs(args) {
  2154. return this.map(function(resolve, i) {
  2155. return resolve ? resolve(args[i]) : args[i];
  2156. }).concat(slice.call(args, this.length));
  2157. };
  2158. module.exports = function(resolvers) {
  2159. resolvers = toArray2(resolvers);
  2160. resolvers.forEach(function(resolve) {
  2161. if (isValue(resolve)) {
  2162. callable(resolve);
  2163. }
  2164. });
  2165. return resolveArgs.bind(resolvers);
  2166. };
  2167. });
  2168. var require_resolve_normalize = __commonJS(function(exports, module) {
  2169. 'use strict';
  2170. var callable = require_valid_callable();
  2171. module.exports = function(userNormalizer) {
  2172. var normalizer;
  2173. if (typeof userNormalizer === 'function') {
  2174. return {
  2175. set: userNormalizer,
  2176. get: userNormalizer
  2177. };
  2178. }
  2179. normalizer = {
  2180. get: callable(userNormalizer.get)
  2181. };
  2182. if (userNormalizer.set !== void 0) {
  2183. normalizer.set = callable(userNormalizer.set);
  2184. if (userNormalizer['delete']) {
  2185. normalizer['delete'] = callable(userNormalizer['delete']);
  2186. }
  2187. if (userNormalizer.clear) {
  2188. normalizer.clear = callable(userNormalizer.clear);
  2189. }
  2190. return normalizer;
  2191. }
  2192. normalizer.set = normalizer.get;
  2193. return normalizer;
  2194. };
  2195. });
  2196. var require_configure_map = __commonJS(function(exports, module) {
  2197. 'use strict';
  2198. var customError = require_custom();
  2199. var defineLength = require_define_length();
  2200. var d = require_d();
  2201. var ee = require_event_emitter().methods;
  2202. var resolveResolve = require_resolve_resolve();
  2203. var resolveNormalize = require_resolve_normalize();
  2204. var apply = Function.prototype.apply;
  2205. var call = Function.prototype.call;
  2206. var create = Object.create;
  2207. var defineProperties = Object.defineProperties;
  2208. var _on = ee.on;
  2209. var emit = ee.emit;
  2210. module.exports = function(original, length, options) {
  2211. var cache21 = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
  2212. if (length !== false) {
  2213. memLength = length;
  2214. } else if (isNaN(original.length)) {
  2215. memLength = 1;
  2216. } else {
  2217. memLength = original.length;
  2218. }
  2219. if (options.normalizer) {
  2220. normalizer = resolveNormalize(options.normalizer);
  2221. _get = normalizer.get;
  2222. set = normalizer.set;
  2223. del = normalizer['delete'];
  2224. _clear = normalizer.clear;
  2225. }
  2226. if (options.resolvers != null) {
  2227. resolve = resolveResolve(options.resolvers);
  2228. }
  2229. if (_get) {
  2230. memoized = defineLength(function(arg) {
  2231. var id, result, args = arguments;
  2232. if (resolve) {
  2233. args = resolve(args);
  2234. }
  2235. id = _get(args);
  2236. if (id !== null) {
  2237. if (hasOwnProperty.call(cache21, id)) {
  2238. if (getListeners) {
  2239. conf.emit('get', id, args, this);
  2240. }
  2241. return cache21[id];
  2242. }
  2243. }
  2244. if (args.length === 1) {
  2245. result = call.call(original, this, args[0]);
  2246. } else {
  2247. result = apply.call(original, this, args);
  2248. }
  2249. if (id === null) {
  2250. id = _get(args);
  2251. if (id !== null) {
  2252. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2253. }
  2254. id = set(args);
  2255. } else if (hasOwnProperty.call(cache21, id)) {
  2256. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2257. }
  2258. cache21[id] = result;
  2259. if (setListeners) {
  2260. conf.emit('set', id, null, result);
  2261. }
  2262. return result;
  2263. }, memLength);
  2264. } else if (length === 0) {
  2265. memoized = function memoized() {
  2266. var result;
  2267. if (hasOwnProperty.call(cache21, 'data')) {
  2268. if (getListeners) {
  2269. conf.emit('get', 'data', arguments, this);
  2270. }
  2271. return cache21.data;
  2272. }
  2273. if (arguments.length) {
  2274. result = apply.call(original, this, arguments);
  2275. } else {
  2276. result = call.call(original, this);
  2277. }
  2278. if (hasOwnProperty.call(cache21, 'data')) {
  2279. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2280. }
  2281. cache21.data = result;
  2282. if (setListeners) {
  2283. conf.emit('set', 'data', null, result);
  2284. }
  2285. return result;
  2286. };
  2287. } else {
  2288. memoized = function memoized(arg) {
  2289. var result, args = arguments, id;
  2290. if (resolve) {
  2291. args = resolve(arguments);
  2292. }
  2293. id = String(args[0]);
  2294. if (hasOwnProperty.call(cache21, id)) {
  2295. if (getListeners) {
  2296. conf.emit('get', id, args, this);
  2297. }
  2298. return cache21[id];
  2299. }
  2300. if (args.length === 1) {
  2301. result = call.call(original, this, args[0]);
  2302. } else {
  2303. result = apply.call(original, this, args);
  2304. }
  2305. if (hasOwnProperty.call(cache21, id)) {
  2306. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2307. }
  2308. cache21[id] = result;
  2309. if (setListeners) {
  2310. conf.emit('set', id, null, result);
  2311. }
  2312. return result;
  2313. };
  2314. }
  2315. conf = {
  2316. original: original,
  2317. memoized: memoized,
  2318. profileName: options.profileName,
  2319. get: function get(args) {
  2320. if (resolve) {
  2321. args = resolve(args);
  2322. }
  2323. if (_get) {
  2324. return _get(args);
  2325. }
  2326. return String(args[0]);
  2327. },
  2328. has: function has(id) {
  2329. return hasOwnProperty.call(cache21, id);
  2330. },
  2331. delete: function _delete(id) {
  2332. var result;
  2333. if (!hasOwnProperty.call(cache21, id)) {
  2334. return;
  2335. }
  2336. if (del) {
  2337. del(id);
  2338. }
  2339. result = cache21[id];
  2340. delete cache21[id];
  2341. if (deleteListeners) {
  2342. conf.emit('delete', id, result);
  2343. }
  2344. },
  2345. clear: function clear() {
  2346. var oldCache = cache21;
  2347. if (_clear) {
  2348. _clear();
  2349. }
  2350. cache21 = create(null);
  2351. conf.emit('clear', oldCache);
  2352. },
  2353. on: function on(type, listener) {
  2354. if (type === 'get') {
  2355. getListeners = true;
  2356. } else if (type === 'set') {
  2357. setListeners = true;
  2358. } else if (type === 'delete') {
  2359. deleteListeners = true;
  2360. }
  2361. return _on.call(this, type, listener);
  2362. },
  2363. emit: emit,
  2364. updateEnv: function updateEnv() {
  2365. original = conf.original;
  2366. }
  2367. };
  2368. if (_get) {
  2369. extDel = defineLength(function(arg) {
  2370. var id, args = arguments;
  2371. if (resolve) {
  2372. args = resolve(args);
  2373. }
  2374. id = _get(args);
  2375. if (id === null) {
  2376. return;
  2377. }
  2378. conf['delete'](id);
  2379. }, memLength);
  2380. } else if (length === 0) {
  2381. extDel = function extDel() {
  2382. return conf['delete']('data');
  2383. };
  2384. } else {
  2385. extDel = function extDel(arg) {
  2386. if (resolve) {
  2387. arg = resolve(arguments)[0];
  2388. }
  2389. return conf['delete'](arg);
  2390. };
  2391. }
  2392. extGet = defineLength(function() {
  2393. var id, args = arguments;
  2394. if (length === 0) {
  2395. return cache21.data;
  2396. }
  2397. if (resolve) {
  2398. args = resolve(args);
  2399. }
  2400. if (_get) {
  2401. id = _get(args);
  2402. } else {
  2403. id = String(args[0]);
  2404. }
  2405. return cache21[id];
  2406. });
  2407. extHas = defineLength(function() {
  2408. var id, args = arguments;
  2409. if (length === 0) {
  2410. return conf.has('data');
  2411. }
  2412. if (resolve) {
  2413. args = resolve(args);
  2414. }
  2415. if (_get) {
  2416. id = _get(args);
  2417. } else {
  2418. id = String(args[0]);
  2419. }
  2420. if (id === null) {
  2421. return false;
  2422. }
  2423. return conf.has(id);
  2424. });
  2425. defineProperties(memoized, {
  2426. __memoized__: d(true),
  2427. delete: d(extDel),
  2428. clear: d(conf.clear),
  2429. _get: d(extGet),
  2430. _has: d(extHas)
  2431. });
  2432. return conf;
  2433. };
  2434. });
  2435. var require_plain = __commonJS(function(exports, module) {
  2436. 'use strict';
  2437. var callable = require_valid_callable();
  2438. var forEach = require_for_each();
  2439. var extensions = require_registered_extensions();
  2440. var configure5 = require_configure_map();
  2441. var resolveLength = require_resolve_length();
  2442. module.exports = function self2(fn) {
  2443. var options, length, conf;
  2444. callable(fn);
  2445. options = Object(arguments[1]);
  2446. if (options.async && options.promise) {
  2447. throw new Error('Options \'async\' and \'promise\' cannot be used together');
  2448. }
  2449. if (hasOwnProperty.call(fn, '__memoized__') && !options.force) {
  2450. return fn;
  2451. }
  2452. length = resolveLength(options.length, fn.length, options.async && extensions.async);
  2453. conf = configure5(fn, length, options);
  2454. forEach(extensions, function(extFn, name) {
  2455. if (options[name]) {
  2456. extFn(options[name], conf, options);
  2457. }
  2458. });
  2459. if (self2.__profiler__) {
  2460. self2.__profiler__(conf);
  2461. }
  2462. conf.updateEnv();
  2463. return conf.memoized;
  2464. };
  2465. });
  2466. var require_primitive = __commonJS(function(exports, module) {
  2467. 'use strict';
  2468. module.exports = function(args) {
  2469. var id, i, length = args.length;
  2470. if (!length) {
  2471. return '\x02';
  2472. }
  2473. id = String(args[i = 0]);
  2474. while (--length) {
  2475. id += '\x01' + args[++i];
  2476. }
  2477. return id;
  2478. };
  2479. });
  2480. var require_get_primitive_fixed = __commonJS(function(exports, module) {
  2481. 'use strict';
  2482. module.exports = function(length) {
  2483. if (!length) {
  2484. return function() {
  2485. return '';
  2486. };
  2487. }
  2488. return function(args) {
  2489. var id = String(args[0]), i = 0, currentLength = length;
  2490. while (--currentLength) {
  2491. id += '\x01' + args[++i];
  2492. }
  2493. return id;
  2494. };
  2495. };
  2496. });
  2497. var require_is_implemented8 = __commonJS(function(exports, module) {
  2498. 'use strict';
  2499. module.exports = function() {
  2500. var numberIsNaN = Number.isNaN;
  2501. if (typeof numberIsNaN !== 'function') {
  2502. return false;
  2503. }
  2504. return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
  2505. };
  2506. });
  2507. var require_shim6 = __commonJS(function(exports, module) {
  2508. 'use strict';
  2509. module.exports = function(value) {
  2510. return value !== value;
  2511. };
  2512. });
  2513. var require_is_nan = __commonJS(function(exports, module) {
  2514. 'use strict';
  2515. module.exports = require_is_implemented8()() ? Number.isNaN : require_shim6();
  2516. });
  2517. var require_e_index_of = __commonJS(function(exports, module) {
  2518. 'use strict';
  2519. var numberIsNaN = require_is_nan();
  2520. var toPosInt = require_to_pos_integer();
  2521. var value = require_valid_value();
  2522. var indexOf = Array.prototype.indexOf;
  2523. var objHasOwnProperty = Object.prototype.hasOwnProperty;
  2524. var abs = Math.abs;
  2525. var floor = Math.floor;
  2526. module.exports = function(searchElement) {
  2527. var i, length, fromIndex, val;
  2528. if (!numberIsNaN(searchElement)) {
  2529. return indexOf.apply(this, arguments);
  2530. }
  2531. length = toPosInt(value(this).length);
  2532. fromIndex = arguments[1];
  2533. if (isNaN(fromIndex)) {
  2534. fromIndex = 0;
  2535. } else if (fromIndex >= 0) {
  2536. fromIndex = floor(fromIndex);
  2537. } else {
  2538. fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
  2539. }
  2540. for (i = fromIndex; i < length; ++i) {
  2541. if (objHasOwnProperty.call(this, i)) {
  2542. val = this[i];
  2543. if (numberIsNaN(val)) {
  2544. return i;
  2545. }
  2546. }
  2547. }
  2548. return -1;
  2549. };
  2550. });
  2551. var require_get = __commonJS(function(exports, module) {
  2552. 'use strict';
  2553. var indexOf = require_e_index_of();
  2554. var create = Object.create;
  2555. module.exports = function() {
  2556. var lastId = 0, map = [], cache21 = create(null);
  2557. return {
  2558. get: function get(args) {
  2559. var index = 0, set = map, i, length = args.length;
  2560. if (length === 0) {
  2561. return set[length] || null;
  2562. }
  2563. if (set = set[length]) {
  2564. while (index < length - 1) {
  2565. i = indexOf.call(set[0], args[index]);
  2566. if (i === -1) {
  2567. return null;
  2568. }
  2569. set = set[1][i];
  2570. ++index;
  2571. }
  2572. i = indexOf.call(set[0], args[index]);
  2573. if (i === -1) {
  2574. return null;
  2575. }
  2576. return set[1][i] || null;
  2577. }
  2578. return null;
  2579. },
  2580. set: function set(args) {
  2581. var index = 0, set = map, i, length = args.length;
  2582. if (length === 0) {
  2583. set[length] = ++lastId;
  2584. } else {
  2585. if (!set[length]) {
  2586. set[length] = [ [], [] ];
  2587. }
  2588. set = set[length];
  2589. while (index < length - 1) {
  2590. i = indexOf.call(set[0], args[index]);
  2591. if (i === -1) {
  2592. i = set[0].push(args[index]) - 1;
  2593. set[1].push([ [], [] ]);
  2594. }
  2595. set = set[1][i];
  2596. ++index;
  2597. }
  2598. i = indexOf.call(set[0], args[index]);
  2599. if (i === -1) {
  2600. i = set[0].push(args[index]) - 1;
  2601. }
  2602. set[1][i] = ++lastId;
  2603. }
  2604. cache21[lastId] = args;
  2605. return lastId;
  2606. },
  2607. delete: function _delete(id) {
  2608. var index = 0, set = map, i, args = cache21[id], length = args.length, path = [];
  2609. if (length === 0) {
  2610. delete set[length];
  2611. } else if (set = set[length]) {
  2612. while (index < length - 1) {
  2613. i = indexOf.call(set[0], args[index]);
  2614. if (i === -1) {
  2615. return;
  2616. }
  2617. path.push(set, i);
  2618. set = set[1][i];
  2619. ++index;
  2620. }
  2621. i = indexOf.call(set[0], args[index]);
  2622. if (i === -1) {
  2623. return;
  2624. }
  2625. id = set[1][i];
  2626. set[0].splice(i, 1);
  2627. set[1].splice(i, 1);
  2628. while (!set[0].length && path.length) {
  2629. i = path.pop();
  2630. set = path.pop();
  2631. set[0].splice(i, 1);
  2632. set[1].splice(i, 1);
  2633. }
  2634. }
  2635. delete cache21[id];
  2636. },
  2637. clear: function clear() {
  2638. map = [];
  2639. cache21 = create(null);
  2640. }
  2641. };
  2642. };
  2643. });
  2644. var require_get_1 = __commonJS(function(exports, module) {
  2645. 'use strict';
  2646. var indexOf = require_e_index_of();
  2647. module.exports = function() {
  2648. var lastId = 0, argsMap = [], cache21 = [];
  2649. return {
  2650. get: function get(args) {
  2651. var index = indexOf.call(argsMap, args[0]);
  2652. return index === -1 ? null : cache21[index];
  2653. },
  2654. set: function set(args) {
  2655. argsMap.push(args[0]);
  2656. cache21.push(++lastId);
  2657. return lastId;
  2658. },
  2659. delete: function _delete(id) {
  2660. var index = indexOf.call(cache21, id);
  2661. if (index !== -1) {
  2662. argsMap.splice(index, 1);
  2663. cache21.splice(index, 1);
  2664. }
  2665. },
  2666. clear: function clear() {
  2667. argsMap = [];
  2668. cache21 = [];
  2669. }
  2670. };
  2671. };
  2672. });
  2673. var require_get_fixed = __commonJS(function(exports, module) {
  2674. 'use strict';
  2675. var indexOf = require_e_index_of();
  2676. var create = Object.create;
  2677. module.exports = function(length) {
  2678. var lastId = 0, map = [ [], [] ], cache21 = create(null);
  2679. return {
  2680. get: function get(args) {
  2681. var index = 0, set = map, i;
  2682. while (index < length - 1) {
  2683. i = indexOf.call(set[0], args[index]);
  2684. if (i === -1) {
  2685. return null;
  2686. }
  2687. set = set[1][i];
  2688. ++index;
  2689. }
  2690. i = indexOf.call(set[0], args[index]);
  2691. if (i === -1) {
  2692. return null;
  2693. }
  2694. return set[1][i] || null;
  2695. },
  2696. set: function set(args) {
  2697. var index = 0, set = map, i;
  2698. while (index < length - 1) {
  2699. i = indexOf.call(set[0], args[index]);
  2700. if (i === -1) {
  2701. i = set[0].push(args[index]) - 1;
  2702. set[1].push([ [], [] ]);
  2703. }
  2704. set = set[1][i];
  2705. ++index;
  2706. }
  2707. i = indexOf.call(set[0], args[index]);
  2708. if (i === -1) {
  2709. i = set[0].push(args[index]) - 1;
  2710. }
  2711. set[1][i] = ++lastId;
  2712. cache21[lastId] = args;
  2713. return lastId;
  2714. },
  2715. delete: function _delete(id) {
  2716. var index = 0, set = map, i, path = [], args = cache21[id];
  2717. while (index < length - 1) {
  2718. i = indexOf.call(set[0], args[index]);
  2719. if (i === -1) {
  2720. return;
  2721. }
  2722. path.push(set, i);
  2723. set = set[1][i];
  2724. ++index;
  2725. }
  2726. i = indexOf.call(set[0], args[index]);
  2727. if (i === -1) {
  2728. return;
  2729. }
  2730. id = set[1][i];
  2731. set[0].splice(i, 1);
  2732. set[1].splice(i, 1);
  2733. while (!set[0].length && path.length) {
  2734. i = path.pop();
  2735. set = path.pop();
  2736. set[0].splice(i, 1);
  2737. set[1].splice(i, 1);
  2738. }
  2739. delete cache21[id];
  2740. },
  2741. clear: function clear() {
  2742. map = [ [], [] ];
  2743. cache21 = create(null);
  2744. }
  2745. };
  2746. };
  2747. });
  2748. var require_map = __commonJS(function(exports, module) {
  2749. 'use strict';
  2750. var callable = require_valid_callable();
  2751. var forEach = require_for_each();
  2752. var call = Function.prototype.call;
  2753. module.exports = function(obj, cb) {
  2754. var result = {}, thisArg = arguments[2];
  2755. callable(cb);
  2756. forEach(obj, function(value, key, targetObj, index) {
  2757. result[key] = call.call(cb, thisArg, value, key, targetObj, index);
  2758. });
  2759. return result;
  2760. };
  2761. });
  2762. var require_next_tick = __commonJS(function(exports, module) {
  2763. 'use strict';
  2764. var ensureCallable = function ensureCallable(fn) {
  2765. if (typeof fn !== 'function') {
  2766. throw new TypeError(fn + ' is not a function');
  2767. }
  2768. return fn;
  2769. };
  2770. var byObserver = function byObserver(Observer) {
  2771. var node = document.createTextNode(''), queue4, currentQueue, i = 0;
  2772. new Observer(function() {
  2773. var callback;
  2774. if (!queue4) {
  2775. if (!currentQueue) {
  2776. return;
  2777. }
  2778. queue4 = currentQueue;
  2779. } else if (currentQueue) {
  2780. queue4 = currentQueue.concat(queue4);
  2781. }
  2782. currentQueue = queue4;
  2783. queue4 = null;
  2784. if (typeof currentQueue === 'function') {
  2785. callback = currentQueue;
  2786. currentQueue = null;
  2787. callback();
  2788. return;
  2789. }
  2790. node.data = i = ++i % 2;
  2791. while (currentQueue) {
  2792. callback = currentQueue.shift();
  2793. if (!currentQueue.length) {
  2794. currentQueue = null;
  2795. }
  2796. callback();
  2797. }
  2798. }).observe(node, {
  2799. characterData: true
  2800. });
  2801. return function(fn) {
  2802. ensureCallable(fn);
  2803. if (queue4) {
  2804. if (typeof queue4 === 'function') {
  2805. queue4 = [ queue4, fn ];
  2806. } else {
  2807. queue4.push(fn);
  2808. }
  2809. return;
  2810. }
  2811. queue4 = fn;
  2812. node.data = i = ++i % 2;
  2813. };
  2814. };
  2815. module.exports = function() {
  2816. if ((typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && process && typeof process.nextTick === 'function') {
  2817. return process.nextTick;
  2818. }
  2819. if (typeof queueMicrotask === 'function') {
  2820. return function(cb) {
  2821. queueMicrotask(ensureCallable(cb));
  2822. };
  2823. }
  2824. if ((typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object' && document) {
  2825. if (typeof MutationObserver === 'function') {
  2826. return byObserver(MutationObserver);
  2827. }
  2828. if (typeof WebKitMutationObserver === 'function') {
  2829. return byObserver(WebKitMutationObserver);
  2830. }
  2831. }
  2832. if (typeof setImmediate === 'function') {
  2833. return function(cb) {
  2834. setImmediate(ensureCallable(cb));
  2835. };
  2836. }
  2837. if (typeof setTimeout === 'function' || (typeof setTimeout === 'undefined' ? 'undefined' : _typeof(setTimeout)) === 'object') {
  2838. return function(cb) {
  2839. setTimeout(ensureCallable(cb), 0);
  2840. };
  2841. }
  2842. return null;
  2843. }();
  2844. });
  2845. var require_async = __commonJS(function() {
  2846. 'use strict';
  2847. var aFrom = require_from();
  2848. var objectMap = require_map();
  2849. var mixin = require_mixin();
  2850. var defineLength = require_define_length();
  2851. var nextTick = require_next_tick();
  2852. var slice = Array.prototype.slice;
  2853. var apply = Function.prototype.apply;
  2854. var create = Object.create;
  2855. require_registered_extensions().async = function(tbi, conf) {
  2856. var waiting = create(null), cache21 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
  2857. conf.memoized = defineLength(function(arg) {
  2858. var args = arguments, last = args[args.length - 1];
  2859. if (typeof last === 'function') {
  2860. currentCallback = last;
  2861. args = slice.call(args, 0, -1);
  2862. }
  2863. return base.apply(currentContext = this, currentArgs = args);
  2864. }, base);
  2865. try {
  2866. mixin(conf.memoized, base);
  2867. } catch (ignore) {}
  2868. conf.on('get', function(id) {
  2869. var cb, context5, args;
  2870. if (!currentCallback) {
  2871. return;
  2872. }
  2873. if (waiting[id]) {
  2874. if (typeof waiting[id] === 'function') {
  2875. waiting[id] = [ waiting[id], currentCallback ];
  2876. } else {
  2877. waiting[id].push(currentCallback);
  2878. }
  2879. currentCallback = null;
  2880. return;
  2881. }
  2882. cb = currentCallback;
  2883. context5 = currentContext;
  2884. args = currentArgs;
  2885. currentCallback = currentContext = currentArgs = null;
  2886. nextTick(function() {
  2887. var data2;
  2888. if (hasOwnProperty.call(cache21, id)) {
  2889. data2 = cache21[id];
  2890. conf.emit('getasync', id, args, context5);
  2891. apply.call(cb, data2.context, data2.args);
  2892. } else {
  2893. currentCallback = cb;
  2894. currentContext = context5;
  2895. currentArgs = args;
  2896. base.apply(context5, args);
  2897. }
  2898. });
  2899. });
  2900. conf.original = function() {
  2901. var args, cb, origCb, result;
  2902. if (!currentCallback) {
  2903. return apply.call(original, this, arguments);
  2904. }
  2905. args = aFrom(arguments);
  2906. cb = function self2(err2) {
  2907. var cb2, args2, id = self2.id;
  2908. if (id == null) {
  2909. nextTick(apply.bind(self2, this, arguments));
  2910. return void 0;
  2911. }
  2912. delete self2.id;
  2913. cb2 = waiting[id];
  2914. delete waiting[id];
  2915. if (!cb2) {
  2916. return void 0;
  2917. }
  2918. args2 = aFrom(arguments);
  2919. if (conf.has(id)) {
  2920. if (err2) {
  2921. conf['delete'](id);
  2922. } else {
  2923. cache21[id] = {
  2924. context: this,
  2925. args: args2
  2926. };
  2927. conf.emit('setasync', id, typeof cb2 === 'function' ? 1 : cb2.length);
  2928. }
  2929. }
  2930. if (typeof cb2 === 'function') {
  2931. result = apply.call(cb2, this, args2);
  2932. } else {
  2933. cb2.forEach(function(cb3) {
  2934. result = apply.call(cb3, this, args2);
  2935. }, this);
  2936. }
  2937. return result;
  2938. };
  2939. origCb = currentCallback;
  2940. currentCallback = currentContext = currentArgs = null;
  2941. args.push(cb);
  2942. result = apply.call(original, this, args);
  2943. cb.cb = origCb;
  2944. currentCallback = cb;
  2945. return result;
  2946. };
  2947. conf.on('set', function(id) {
  2948. if (!currentCallback) {
  2949. conf['delete'](id);
  2950. return;
  2951. }
  2952. if (waiting[id]) {
  2953. if (typeof waiting[id] === 'function') {
  2954. waiting[id] = [ waiting[id], currentCallback.cb ];
  2955. } else {
  2956. waiting[id].push(currentCallback.cb);
  2957. }
  2958. } else {
  2959. waiting[id] = currentCallback.cb;
  2960. }
  2961. delete currentCallback.cb;
  2962. currentCallback.id = id;
  2963. currentCallback = null;
  2964. });
  2965. conf.on('delete', function(id) {
  2966. var result;
  2967. if (hasOwnProperty.call(waiting, id)) {
  2968. return;
  2969. }
  2970. if (!cache21[id]) {
  2971. return;
  2972. }
  2973. result = cache21[id];
  2974. delete cache21[id];
  2975. conf.emit('deleteasync', id, slice.call(result.args, 1));
  2976. });
  2977. conf.on('clear', function() {
  2978. var oldCache = cache21;
  2979. cache21 = create(null);
  2980. conf.emit('clearasync', objectMap(oldCache, function(data2) {
  2981. return slice.call(data2.args, 1);
  2982. }));
  2983. });
  2984. };
  2985. });
  2986. var require_primitive_set = __commonJS(function(exports, module) {
  2987. 'use strict';
  2988. var forEach = Array.prototype.forEach;
  2989. var create = Object.create;
  2990. module.exports = function(arg) {
  2991. var set = create(null);
  2992. forEach.call(arguments, function(name) {
  2993. set[name] = true;
  2994. });
  2995. return set;
  2996. };
  2997. });
  2998. var require_is_callable = __commonJS(function(exports, module) {
  2999. 'use strict';
  3000. module.exports = function(obj) {
  3001. return typeof obj === 'function';
  3002. };
  3003. });
  3004. var require_validate_stringifiable = __commonJS(function(exports, module) {
  3005. 'use strict';
  3006. var isCallable = require_is_callable();
  3007. module.exports = function(stringifiable) {
  3008. try {
  3009. if (stringifiable && isCallable(stringifiable.toString)) {
  3010. return stringifiable.toString();
  3011. }
  3012. return String(stringifiable);
  3013. } catch (e) {
  3014. throw new TypeError('Passed argument cannot be stringifed');
  3015. }
  3016. };
  3017. });
  3018. var require_validate_stringifiable_value = __commonJS(function(exports, module) {
  3019. 'use strict';
  3020. var ensureValue = require_valid_value();
  3021. var stringifiable = require_validate_stringifiable();
  3022. module.exports = function(value) {
  3023. return stringifiable(ensureValue(value));
  3024. };
  3025. });
  3026. var require_safe_to_string = __commonJS(function(exports, module) {
  3027. 'use strict';
  3028. var isCallable = require_is_callable();
  3029. module.exports = function(value) {
  3030. try {
  3031. if (value && isCallable(value.toString)) {
  3032. return value.toString();
  3033. }
  3034. return String(value);
  3035. } catch (e) {
  3036. return '<Non-coercible to string value>';
  3037. }
  3038. };
  3039. });
  3040. var require_to_short_string_representation = __commonJS(function(exports, module) {
  3041. 'use strict';
  3042. var safeToString = require_safe_to_string();
  3043. var reNewLine = /[\n\r\u2028\u2029]/g;
  3044. module.exports = function(value) {
  3045. var string = safeToString(value);
  3046. if (string.length > 100) {
  3047. string = string.slice(0, 99) + '\u2026';
  3048. }
  3049. string = string.replace(reNewLine, function(_char) {
  3050. return JSON.stringify(_char).slice(1, -1);
  3051. });
  3052. return string;
  3053. };
  3054. });
  3055. var require_is_promise = __commonJS(function(exports, module) {
  3056. module.exports = isPromise;
  3057. module.exports['default'] = isPromise;
  3058. function isPromise(obj) {
  3059. return !!obj && (_typeof(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  3060. }
  3061. });
  3062. var require_promise = __commonJS(function() {
  3063. 'use strict';
  3064. var objectMap = require_map();
  3065. var primitiveSet = require_primitive_set();
  3066. var ensureString = require_validate_stringifiable_value();
  3067. var toShortString = require_to_short_string_representation();
  3068. var isPromise = require_is_promise();
  3069. var nextTick = require_next_tick();
  3070. var create = Object.create;
  3071. var supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');
  3072. require_registered_extensions().promise = function(mode, conf) {
  3073. var waiting = create(null), cache21 = create(null), promises = create(null);
  3074. if (mode === true) {
  3075. mode = null;
  3076. } else {
  3077. mode = ensureString(mode);
  3078. if (!supportedModes[mode]) {
  3079. throw new TypeError('\'' + toShortString(mode) + '\' is not valid promise mode');
  3080. }
  3081. }
  3082. conf.on('set', function(id, ignore, promise) {
  3083. var isFailed = false;
  3084. if (!isPromise(promise)) {
  3085. cache21[id] = promise;
  3086. conf.emit('setasync', id, 1);
  3087. return;
  3088. }
  3089. waiting[id] = 1;
  3090. promises[id] = promise;
  3091. var onSuccess = function onSuccess(result) {
  3092. var count = waiting[id];
  3093. if (isFailed) {
  3094. throw new Error('Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in \'done:finally\' mode)\nConsider to rely on \'then\' or \'done\' mode instead.');
  3095. }
  3096. if (!count) {
  3097. return;
  3098. }
  3099. delete waiting[id];
  3100. cache21[id] = result;
  3101. conf.emit('setasync', id, count);
  3102. };
  3103. var onFailure = function onFailure() {
  3104. isFailed = true;
  3105. if (!waiting[id]) {
  3106. return;
  3107. }
  3108. delete waiting[id];
  3109. delete promises[id];
  3110. conf['delete'](id);
  3111. };
  3112. var resolvedMode = mode;
  3113. if (!resolvedMode) {
  3114. resolvedMode = 'then';
  3115. }
  3116. if (resolvedMode === 'then') {
  3117. var nextTickFailure = function nextTickFailure() {
  3118. nextTick(onFailure);
  3119. };
  3120. promise = promise.then(function(result) {
  3121. nextTick(onSuccess.bind(this, result));
  3122. }, nextTickFailure);
  3123. if (typeof promise['finally'] === 'function') {
  3124. promise['finally'](nextTickFailure);
  3125. }
  3126. } else if (resolvedMode === 'done') {
  3127. if (typeof promise.done !== 'function') {
  3128. throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done\' mode');
  3129. }
  3130. promise.done(onSuccess, onFailure);
  3131. } else if (resolvedMode === 'done:finally') {
  3132. if (typeof promise.done !== 'function') {
  3133. throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done:finally\' mode');
  3134. }
  3135. if (typeof promise['finally'] !== 'function') {
  3136. throw new Error('Memoizee error: Retrieved promise does not implement \'finally\' in \'done:finally\' mode');
  3137. }
  3138. promise.done(onSuccess);
  3139. promise['finally'](onFailure);
  3140. }
  3141. });
  3142. conf.on('get', function(id, args, context5) {
  3143. var promise;
  3144. if (waiting[id]) {
  3145. ++waiting[id];
  3146. return;
  3147. }
  3148. promise = promises[id];
  3149. var emit = function emit() {
  3150. conf.emit('getasync', id, args, context5);
  3151. };
  3152. if (isPromise(promise)) {
  3153. if (typeof promise.done === 'function') {
  3154. promise.done(emit);
  3155. } else {
  3156. promise.then(function() {
  3157. nextTick(emit);
  3158. });
  3159. }
  3160. } else {
  3161. emit();
  3162. }
  3163. });
  3164. conf.on('delete', function(id) {
  3165. delete promises[id];
  3166. if (waiting[id]) {
  3167. delete waiting[id];
  3168. return;
  3169. }
  3170. if (!hasOwnProperty.call(cache21, id)) {
  3171. return;
  3172. }
  3173. var result = cache21[id];
  3174. delete cache21[id];
  3175. conf.emit('deleteasync', id, [ result ]);
  3176. });
  3177. conf.on('clear', function() {
  3178. var oldCache = cache21;
  3179. cache21 = create(null);
  3180. waiting = create(null);
  3181. promises = create(null);
  3182. conf.emit('clearasync', objectMap(oldCache, function(data2) {
  3183. return [ data2 ];
  3184. }));
  3185. });
  3186. };
  3187. });
  3188. var require_dispose = __commonJS(function() {
  3189. 'use strict';
  3190. var callable = require_valid_callable();
  3191. var forEach = require_for_each();
  3192. var extensions = require_registered_extensions();
  3193. var apply = Function.prototype.apply;
  3194. extensions.dispose = function(dispose, conf, options) {
  3195. var del;
  3196. callable(dispose);
  3197. if (options.async && extensions.async || options.promise && extensions.promise) {
  3198. conf.on('deleteasync', del = function del(id, resultArray) {
  3199. apply.call(dispose, null, resultArray);
  3200. });
  3201. conf.on('clearasync', function(cache21) {
  3202. forEach(cache21, function(result, id) {
  3203. del(id, result);
  3204. });
  3205. });
  3206. return;
  3207. }
  3208. conf.on('delete', del = function del(id, result) {
  3209. dispose(result);
  3210. });
  3211. conf.on('clear', function(cache21) {
  3212. forEach(cache21, function(result, id) {
  3213. del(id, result);
  3214. });
  3215. });
  3216. };
  3217. });
  3218. var require_max_timeout = __commonJS(function(exports, module) {
  3219. 'use strict';
  3220. module.exports = 2147483647;
  3221. });
  3222. var require_valid_timeout = __commonJS(function(exports, module) {
  3223. 'use strict';
  3224. var toPosInt = require_to_pos_integer();
  3225. var maxTimeout = require_max_timeout();
  3226. module.exports = function(value) {
  3227. value = toPosInt(value);
  3228. if (value > maxTimeout) {
  3229. throw new TypeError(value + ' exceeds maximum possible timeout');
  3230. }
  3231. return value;
  3232. };
  3233. });
  3234. var require_max_age = __commonJS(function() {
  3235. 'use strict';
  3236. var aFrom = require_from();
  3237. var forEach = require_for_each();
  3238. var nextTick = require_next_tick();
  3239. var isPromise = require_is_promise();
  3240. var timeout = require_valid_timeout();
  3241. var extensions = require_registered_extensions();
  3242. var noop3 = Function.prototype;
  3243. var max = Math.max;
  3244. var min = Math.min;
  3245. var create = Object.create;
  3246. extensions.maxAge = function(maxAge, conf, options) {
  3247. var timeouts, postfix, preFetchAge, preFetchTimeouts;
  3248. maxAge = timeout(maxAge);
  3249. if (!maxAge) {
  3250. return;
  3251. }
  3252. timeouts = create(null);
  3253. postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
  3254. conf.on('set' + postfix, function(id) {
  3255. timeouts[id] = setTimeout(function() {
  3256. conf['delete'](id);
  3257. }, maxAge);
  3258. if (typeof timeouts[id].unref === 'function') {
  3259. timeouts[id].unref();
  3260. }
  3261. if (!preFetchTimeouts) {
  3262. return;
  3263. }
  3264. if (preFetchTimeouts[id]) {
  3265. if (preFetchTimeouts[id] !== 'nextTick') {
  3266. clearTimeout(preFetchTimeouts[id]);
  3267. }
  3268. }
  3269. preFetchTimeouts[id] = setTimeout(function() {
  3270. delete preFetchTimeouts[id];
  3271. }, preFetchAge);
  3272. if (typeof preFetchTimeouts[id].unref === 'function') {
  3273. preFetchTimeouts[id].unref();
  3274. }
  3275. });
  3276. conf.on('delete' + postfix, function(id) {
  3277. clearTimeout(timeouts[id]);
  3278. delete timeouts[id];
  3279. if (!preFetchTimeouts) {
  3280. return;
  3281. }
  3282. if (preFetchTimeouts[id] !== 'nextTick') {
  3283. clearTimeout(preFetchTimeouts[id]);
  3284. }
  3285. delete preFetchTimeouts[id];
  3286. });
  3287. if (options.preFetch) {
  3288. if (options.preFetch === true || isNaN(options.preFetch)) {
  3289. preFetchAge = .333;
  3290. } else {
  3291. preFetchAge = max(min(Number(options.preFetch), 1), 0);
  3292. }
  3293. if (preFetchAge) {
  3294. preFetchTimeouts = {};
  3295. preFetchAge = (1 - preFetchAge) * maxAge;
  3296. conf.on('get' + postfix, function(id, args, context5) {
  3297. if (!preFetchTimeouts[id]) {
  3298. preFetchTimeouts[id] = 'nextTick';
  3299. nextTick(function() {
  3300. var result;
  3301. if (preFetchTimeouts[id] !== 'nextTick') {
  3302. return;
  3303. }
  3304. delete preFetchTimeouts[id];
  3305. conf['delete'](id);
  3306. if (options.async) {
  3307. args = aFrom(args);
  3308. args.push(noop3);
  3309. }
  3310. result = conf.memoized.apply(context5, args);
  3311. if (options.promise) {
  3312. if (isPromise(result)) {
  3313. if (typeof result.done === 'function') {
  3314. result.done(noop3, noop3);
  3315. } else {
  3316. result.then(noop3, noop3);
  3317. }
  3318. }
  3319. }
  3320. });
  3321. }
  3322. });
  3323. }
  3324. }
  3325. conf.on('clear' + postfix, function() {
  3326. forEach(timeouts, function(id) {
  3327. clearTimeout(id);
  3328. });
  3329. timeouts = {};
  3330. if (preFetchTimeouts) {
  3331. forEach(preFetchTimeouts, function(id) {
  3332. if (id !== 'nextTick') {
  3333. clearTimeout(id);
  3334. }
  3335. });
  3336. preFetchTimeouts = {};
  3337. }
  3338. });
  3339. };
  3340. });
  3341. var require_lru_queue = __commonJS(function(exports, module) {
  3342. 'use strict';
  3343. var toPosInt = require_to_pos_integer();
  3344. var create = Object.create;
  3345. var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  3346. module.exports = function(limit) {
  3347. var size = 0, base = 1, queue4 = create(null), map = create(null), index = 0, del;
  3348. limit = toPosInt(limit);
  3349. return {
  3350. hit: function hit(id) {
  3351. var oldIndex = map[id], nuIndex = ++index;
  3352. queue4[nuIndex] = id;
  3353. map[id] = nuIndex;
  3354. if (!oldIndex) {
  3355. ++size;
  3356. if (size <= limit) {
  3357. return;
  3358. }
  3359. id = queue4[base];
  3360. del(id);
  3361. return id;
  3362. }
  3363. delete queue4[oldIndex];
  3364. if (base !== oldIndex) {
  3365. return;
  3366. }
  3367. while (!hasOwnProperty2.call(queue4, ++base)) {
  3368. continue;
  3369. }
  3370. },
  3371. delete: del = function del(id) {
  3372. var oldIndex = map[id];
  3373. if (!oldIndex) {
  3374. return;
  3375. }
  3376. delete queue4[oldIndex];
  3377. delete map[id];
  3378. --size;
  3379. if (base !== oldIndex) {
  3380. return;
  3381. }
  3382. if (!size) {
  3383. index = 0;
  3384. base = 1;
  3385. return;
  3386. }
  3387. while (!hasOwnProperty2.call(queue4, ++base)) {
  3388. continue;
  3389. }
  3390. },
  3391. clear: function clear() {
  3392. size = 0;
  3393. base = 1;
  3394. queue4 = create(null);
  3395. map = create(null);
  3396. index = 0;
  3397. }
  3398. };
  3399. };
  3400. });
  3401. var require_max = __commonJS(function() {
  3402. 'use strict';
  3403. var toPosInteger = require_to_pos_integer();
  3404. var lruQueue = require_lru_queue();
  3405. var extensions = require_registered_extensions();
  3406. extensions.max = function(max, conf, options) {
  3407. var postfix, queue4, hit;
  3408. max = toPosInteger(max);
  3409. if (!max) {
  3410. return;
  3411. }
  3412. queue4 = lruQueue(max);
  3413. postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
  3414. conf.on('set' + postfix, hit = function hit(id) {
  3415. id = queue4.hit(id);
  3416. if (id === void 0) {
  3417. return;
  3418. }
  3419. conf['delete'](id);
  3420. });
  3421. conf.on('get' + postfix, hit);
  3422. conf.on('delete' + postfix, queue4['delete']);
  3423. conf.on('clear' + postfix, queue4.clear);
  3424. };
  3425. });
  3426. var require_ref_counter = __commonJS(function() {
  3427. 'use strict';
  3428. var d = require_d();
  3429. var extensions = require_registered_extensions();
  3430. var create = Object.create;
  3431. var defineProperties = Object.defineProperties;
  3432. extensions.refCounter = function(ignore, conf, options) {
  3433. var cache21, postfix;
  3434. cache21 = create(null);
  3435. postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
  3436. conf.on('set' + postfix, function(id, length) {
  3437. cache21[id] = length || 1;
  3438. });
  3439. conf.on('get' + postfix, function(id) {
  3440. ++cache21[id];
  3441. });
  3442. conf.on('delete' + postfix, function(id) {
  3443. delete cache21[id];
  3444. });
  3445. conf.on('clear' + postfix, function() {
  3446. cache21 = {};
  3447. });
  3448. defineProperties(conf.memoized, {
  3449. deleteRef: d(function() {
  3450. var id = conf.get(arguments);
  3451. if (id === null) {
  3452. return null;
  3453. }
  3454. if (!cache21[id]) {
  3455. return null;
  3456. }
  3457. if (!--cache21[id]) {
  3458. conf['delete'](id);
  3459. return true;
  3460. }
  3461. return false;
  3462. }),
  3463. getRefCount: d(function() {
  3464. var id = conf.get(arguments);
  3465. if (id === null) {
  3466. return 0;
  3467. }
  3468. if (!cache21[id]) {
  3469. return 0;
  3470. }
  3471. return cache21[id];
  3472. })
  3473. });
  3474. };
  3475. });
  3476. var require_memoizee = __commonJS(function(exports, module) {
  3477. 'use strict';
  3478. var normalizeOpts = require_normalize_options();
  3479. var resolveLength = require_resolve_length();
  3480. var plain = require_plain();
  3481. module.exports = function(fn) {
  3482. var options = normalizeOpts(arguments[1]), length;
  3483. if (!options.normalizer) {
  3484. length = options.length = resolveLength(options.length, fn.length, options.async);
  3485. if (length !== 0) {
  3486. if (options.primitive) {
  3487. if (length === false) {
  3488. options.normalizer = require_primitive();
  3489. } else if (length > 1) {
  3490. options.normalizer = require_get_primitive_fixed()(length);
  3491. }
  3492. } else if (length === false) {
  3493. options.normalizer = require_get()();
  3494. } else if (length === 1) {
  3495. options.normalizer = require_get_1()();
  3496. } else {
  3497. options.normalizer = require_get_fixed()(length);
  3498. }
  3499. }
  3500. }
  3501. if (options.async) {
  3502. require_async();
  3503. }
  3504. if (options.promise) {
  3505. require_promise();
  3506. }
  3507. if (options.dispose) {
  3508. require_dispose();
  3509. }
  3510. if (options.maxAge) {
  3511. require_max_age();
  3512. }
  3513. if (options.max) {
  3514. require_max();
  3515. }
  3516. if (options.refCounter) {
  3517. require_ref_counter();
  3518. }
  3519. return plain(fn, options);
  3520. };
  3521. });
  3522. var require_emoji_regex = __commonJS(function(exports, module) {
  3523. 'use strict';
  3524. module.exports = function() {
  3525. return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
  3526. };
  3527. });
  3528. var require_doT = __commonJS(function(exports, module) {
  3529. (function() {
  3530. 'use strict';
  3531. var doT3 = {
  3532. name: 'doT',
  3533. version: '1.1.1',
  3534. templateSettings: {
  3535. evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,
  3536. interpolate: /\{\{=([\s\S]+?)\}\}/g,
  3537. encode: /\{\{!([\s\S]+?)\}\}/g,
  3538. use: /\{\{#([\s\S]+?)\}\}/g,
  3539. useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
  3540. define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,
  3541. defineParams: /^\s*([\w$]+):([\s\S]+)/,
  3542. conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,
  3543. iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,
  3544. varname: 'it',
  3545. strip: true,
  3546. append: true,
  3547. selfcontained: false,
  3548. doNotSkipEncoded: false
  3549. },
  3550. template: void 0,
  3551. compile: void 0,
  3552. log: true
  3553. };
  3554. (function() {
  3555. if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) === 'object') {
  3556. return;
  3557. }
  3558. try {
  3559. Object.defineProperty(Object.prototype, '__magic__', {
  3560. get: function get() {
  3561. return this;
  3562. },
  3563. configurable: true
  3564. });
  3565. __magic__.globalThis = __magic__;
  3566. delete Object.prototype.__magic__;
  3567. } catch (e) {
  3568. window.globalThis = function() {
  3569. if (typeof self !== 'undefined') {
  3570. return self;
  3571. }
  3572. if (typeof window !== 'undefined') {
  3573. return window;
  3574. }
  3575. if (typeof global !== 'undefined') {
  3576. return global;
  3577. }
  3578. if (typeof this !== 'undefined') {
  3579. return this;
  3580. }
  3581. throw new Error('Unable to locate global `this`');
  3582. }();
  3583. }
  3584. })();
  3585. doT3.encodeHTMLSource = function(doNotSkipEncoded) {
  3586. var encodeHTMLRules = {
  3587. '&': '&#38;',
  3588. '<': '&#60;',
  3589. '>': '&#62;',
  3590. '"': '&#34;',
  3591. '\'': '&#39;',
  3592. '/': '&#47;'
  3593. }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
  3594. return function(code) {
  3595. return code ? code.toString().replace(matchHTML, function(m) {
  3596. return encodeHTMLRules[m] || m;
  3597. }) : '';
  3598. };
  3599. };
  3600. if (typeof module !== 'undefined' && module.exports) {
  3601. module.exports = doT3;
  3602. } else if (typeof define === 'function' && define.amd) {
  3603. define(function() {
  3604. return doT3;
  3605. });
  3606. } else {
  3607. globalThis.doT = doT3;
  3608. }
  3609. var startend = {
  3610. append: {
  3611. start: '\'+(',
  3612. end: ')+\'',
  3613. startencode: '\'+encodeHTML('
  3614. },
  3615. split: {
  3616. start: '\';out+=(',
  3617. end: ');out+=\'',
  3618. startencode: '\';out+=encodeHTML('
  3619. }
  3620. }, skip = /$^/;
  3621. function resolveDefs(c, block, def) {
  3622. return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) {
  3623. if (code.indexOf('def.') === 0) {
  3624. code = code.substring(4);
  3625. }
  3626. if (!(code in def)) {
  3627. if (assign === ':') {
  3628. if (c.defineParams) {
  3629. value.replace(c.defineParams, function(m2, param, v) {
  3630. def[code] = {
  3631. arg: param,
  3632. text: v
  3633. };
  3634. });
  3635. }
  3636. if (!(code in def)) {
  3637. def[code] = value;
  3638. }
  3639. } else {
  3640. new Function('def', 'def[\'' + code + '\']=' + value)(def);
  3641. }
  3642. }
  3643. return '';
  3644. }).replace(c.use || skip, function(m, code) {
  3645. if (c.useParams) {
  3646. code = code.replace(c.useParams, function(m2, s, d, param) {
  3647. if (def[d] && def[d].arg && param) {
  3648. var rw = (d + ':' + param).replace(/'|\\/g, '_');
  3649. def.__exp = def.__exp || {};
  3650. def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2');
  3651. return s + 'def.__exp[\'' + rw + '\']';
  3652. }
  3653. });
  3654. }
  3655. var v = new Function('def', 'return ' + code)(def);
  3656. return v ? resolveDefs(c, v, def) : v;
  3657. });
  3658. }
  3659. function unescape(code) {
  3660. return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' ');
  3661. }
  3662. doT3.template = function(tmpl, c, def) {
  3663. c = c || doT3.templateSettings;
  3664. var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl;
  3665. str = ('var out=\'' + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function(m, code) {
  3666. return cse.start + unescape(code) + cse.end;
  3667. }).replace(c.encode || skip, function(m, code) {
  3668. needhtmlencode = true;
  3669. return cse.startencode + unescape(code) + cse.end;
  3670. }).replace(c.conditional || skip, function(m, elsecase, code) {
  3671. return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\'';
  3672. }).replace(c.iterate || skip, function(m, iterate, vname, iname) {
  3673. if (!iterate) {
  3674. return '\';} } out+=\'';
  3675. }
  3676. sid += 1;
  3677. indv = iname || 'i' + sid;
  3678. iterate = unescape(iterate);
  3679. return '\';var arr' + sid + '=' + iterate + ';if(arr' + sid + '){var ' + vname + ',' + indv + '=-1,l' + sid + '=arr' + sid + '.length-1;while(' + indv + '<l' + sid + '){' + vname + '=arr' + sid + '[' + indv + '+=1];out+=\'';
  3680. }).replace(c.evaluate || skip, function(m, code) {
  3681. return '\';' + unescape(code) + 'out+=\'';
  3682. }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '');
  3683. if (needhtmlencode) {
  3684. if (!c.selfcontained && globalThis && !globalThis._encodeHTML) {
  3685. globalThis._encodeHTML = doT3.encodeHTMLSource(c.doNotSkipEncoded);
  3686. }
  3687. str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT3.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str;
  3688. }
  3689. try {
  3690. return new Function(c.varname, str);
  3691. } catch (e) {
  3692. if (typeof console !== 'undefined') {
  3693. console.log('Could not create a template function: ' + str);
  3694. }
  3695. throw e;
  3696. }
  3697. };
  3698. doT3.compile = function(tmpl, def) {
  3699. return doT3.template(tmpl, null, def);
  3700. };
  3701. })();
  3702. });
  3703. var require_es6_promise = __commonJS(function(exports, module) {
  3704. (function(global2, factory) {
  3705. _typeof(exports) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global2.ES6Promise = factory();
  3706. })(exports, function() {
  3707. 'use strict';
  3708. function objectOrFunction(x) {
  3709. var type = _typeof(x);
  3710. return x !== null && (type === 'object' || type === 'function');
  3711. }
  3712. function isFunction(x) {
  3713. return typeof x === 'function';
  3714. }
  3715. var _isArray = void 0;
  3716. if (Array.isArray) {
  3717. _isArray = Array.isArray;
  3718. } else {
  3719. _isArray = function _isArray(x) {
  3720. return Object.prototype.toString.call(x) === '[object Array]';
  3721. };
  3722. }
  3723. var isArray = _isArray;
  3724. var len = 0;
  3725. var vertxNext = void 0;
  3726. var customSchedulerFn = void 0;
  3727. var asap = function asap2(callback, arg) {
  3728. queue4[len] = callback;
  3729. queue4[len + 1] = arg;
  3730. len += 2;
  3731. if (len === 2) {
  3732. if (customSchedulerFn) {
  3733. customSchedulerFn(flush);
  3734. } else {
  3735. scheduleFlush();
  3736. }
  3737. }
  3738. };
  3739. function setScheduler(scheduleFn) {
  3740. customSchedulerFn = scheduleFn;
  3741. }
  3742. function setAsap(asapFn) {
  3743. asap = asapFn;
  3744. }
  3745. var browserWindow = typeof window !== 'undefined' ? window : void 0;
  3746. var browserGlobal = browserWindow || {};
  3747. var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
  3748. var isNode2 = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
  3749. var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
  3750. function useNextTick() {
  3751. return function() {
  3752. return process.nextTick(flush);
  3753. };
  3754. }
  3755. function useVertxTimer() {
  3756. if (typeof vertxNext !== 'undefined') {
  3757. return function() {
  3758. vertxNext(flush);
  3759. };
  3760. }
  3761. return useSetTimeout();
  3762. }
  3763. function useMutationObserver() {
  3764. var iterations = 0;
  3765. var observer = new BrowserMutationObserver(flush);
  3766. var node = document.createTextNode('');
  3767. observer.observe(node, {
  3768. characterData: true
  3769. });
  3770. return function() {
  3771. node.data = iterations = ++iterations % 2;
  3772. };
  3773. }
  3774. function useMessageChannel() {
  3775. var channel = new MessageChannel();
  3776. channel.port1.onmessage = flush;
  3777. return function() {
  3778. return channel.port2.postMessage(0);
  3779. };
  3780. }
  3781. function useSetTimeout() {
  3782. var globalSetTimeout = setTimeout;
  3783. return function() {
  3784. return globalSetTimeout(flush, 1);
  3785. };
  3786. }
  3787. var queue4 = new Array(1e3);
  3788. function flush() {
  3789. for (var i = 0; i < len; i += 2) {
  3790. var callback = queue4[i];
  3791. var arg = queue4[i + 1];
  3792. callback(arg);
  3793. queue4[i] = void 0;
  3794. queue4[i + 1] = void 0;
  3795. }
  3796. len = 0;
  3797. }
  3798. function attemptVertx() {
  3799. try {
  3800. var vertx = Function('return this')().require('vertx');
  3801. vertxNext = vertx.runOnLoop || vertx.runOnContext;
  3802. return useVertxTimer();
  3803. } catch (e) {
  3804. return useSetTimeout();
  3805. }
  3806. }
  3807. var scheduleFlush = void 0;
  3808. if (isNode2) {
  3809. scheduleFlush = useNextTick();
  3810. } else if (BrowserMutationObserver) {
  3811. scheduleFlush = useMutationObserver();
  3812. } else if (isWorker) {
  3813. scheduleFlush = useMessageChannel();
  3814. } else if (browserWindow === void 0 && true) {
  3815. scheduleFlush = attemptVertx();
  3816. } else {
  3817. scheduleFlush = useSetTimeout();
  3818. }
  3819. function then(onFulfillment, onRejection) {
  3820. var parent = this;
  3821. var child = new this.constructor(noop3);
  3822. if (child[PROMISE_ID] === void 0) {
  3823. makePromise(child);
  3824. }
  3825. var _state = parent._state;
  3826. if (_state) {
  3827. var callback = arguments[_state - 1];
  3828. asap(function() {
  3829. return invokeCallback(_state, child, callback, parent._result);
  3830. });
  3831. } else {
  3832. subscribe2(parent, child, onFulfillment, onRejection);
  3833. }
  3834. return child;
  3835. }
  3836. function resolve$1(object) {
  3837. var Constructor = this;
  3838. if (object && _typeof(object) === 'object' && object.constructor === Constructor) {
  3839. return object;
  3840. }
  3841. var promise = new Constructor(noop3);
  3842. resolve(promise, object);
  3843. return promise;
  3844. }
  3845. var PROMISE_ID = Math.random().toString(36).substring(2);
  3846. function noop3() {}
  3847. var PENDING = void 0;
  3848. var FULFILLED = 1;
  3849. var REJECTED = 2;
  3850. function selfFulfillment() {
  3851. return new TypeError('You cannot resolve a promise with itself');
  3852. }
  3853. function cannotReturnOwn() {
  3854. return new TypeError('A promises callback cannot return that same promise.');
  3855. }
  3856. function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  3857. try {
  3858. then$$1.call(value, fulfillmentHandler, rejectionHandler);
  3859. } catch (e) {
  3860. return e;
  3861. }
  3862. }
  3863. function handleForeignThenable(promise, thenable, then$$1) {
  3864. asap(function(promise2) {
  3865. var sealed = false;
  3866. var error = tryThen(then$$1, thenable, function(value) {
  3867. if (sealed) {
  3868. return;
  3869. }
  3870. sealed = true;
  3871. if (thenable !== value) {
  3872. resolve(promise2, value);
  3873. } else {
  3874. fulfill(promise2, value);
  3875. }
  3876. }, function(reason) {
  3877. if (sealed) {
  3878. return;
  3879. }
  3880. sealed = true;
  3881. reject(promise2, reason);
  3882. }, 'Settle: ' + (promise2._label || ' unknown promise'));
  3883. if (!sealed && error) {
  3884. sealed = true;
  3885. reject(promise2, error);
  3886. }
  3887. }, promise);
  3888. }
  3889. function handleOwnThenable(promise, thenable) {
  3890. if (thenable._state === FULFILLED) {
  3891. fulfill(promise, thenable._result);
  3892. } else if (thenable._state === REJECTED) {
  3893. reject(promise, thenable._result);
  3894. } else {
  3895. subscribe2(thenable, void 0, function(value) {
  3896. return resolve(promise, value);
  3897. }, function(reason) {
  3898. return reject(promise, reason);
  3899. });
  3900. }
  3901. }
  3902. function handleMaybeThenable(promise, maybeThenable, then$$1) {
  3903. if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
  3904. handleOwnThenable(promise, maybeThenable);
  3905. } else {
  3906. if (then$$1 === void 0) {
  3907. fulfill(promise, maybeThenable);
  3908. } else if (isFunction(then$$1)) {
  3909. handleForeignThenable(promise, maybeThenable, then$$1);
  3910. } else {
  3911. fulfill(promise, maybeThenable);
  3912. }
  3913. }
  3914. }
  3915. function resolve(promise, value) {
  3916. if (promise === value) {
  3917. reject(promise, selfFulfillment());
  3918. } else if (objectOrFunction(value)) {
  3919. var then$$1 = void 0;
  3920. try {
  3921. then$$1 = value.then;
  3922. } catch (error) {
  3923. reject(promise, error);
  3924. return;
  3925. }
  3926. handleMaybeThenable(promise, value, then$$1);
  3927. } else {
  3928. fulfill(promise, value);
  3929. }
  3930. }
  3931. function publishRejection(promise) {
  3932. if (promise._onerror) {
  3933. promise._onerror(promise._result);
  3934. }
  3935. publish(promise);
  3936. }
  3937. function fulfill(promise, value) {
  3938. if (promise._state !== PENDING) {
  3939. return;
  3940. }
  3941. promise._result = value;
  3942. promise._state = FULFILLED;
  3943. if (promise._subscribers.length !== 0) {
  3944. asap(publish, promise);
  3945. }
  3946. }
  3947. function reject(promise, reason) {
  3948. if (promise._state !== PENDING) {
  3949. return;
  3950. }
  3951. promise._state = REJECTED;
  3952. promise._result = reason;
  3953. asap(publishRejection, promise);
  3954. }
  3955. function subscribe2(parent, child, onFulfillment, onRejection) {
  3956. var _subscribers = parent._subscribers;
  3957. var length = _subscribers.length;
  3958. parent._onerror = null;
  3959. _subscribers[length] = child;
  3960. _subscribers[length + FULFILLED] = onFulfillment;
  3961. _subscribers[length + REJECTED] = onRejection;
  3962. if (length === 0 && parent._state) {
  3963. asap(publish, parent);
  3964. }
  3965. }
  3966. function publish(promise) {
  3967. var subscribers = promise._subscribers;
  3968. var settled = promise._state;
  3969. if (subscribers.length === 0) {
  3970. return;
  3971. }
  3972. var child = void 0, callback = void 0, detail = promise._result;
  3973. for (var i = 0; i < subscribers.length; i += 3) {
  3974. child = subscribers[i];
  3975. callback = subscribers[i + settled];
  3976. if (child) {
  3977. invokeCallback(settled, child, callback, detail);
  3978. } else {
  3979. callback(detail);
  3980. }
  3981. }
  3982. promise._subscribers.length = 0;
  3983. }
  3984. function invokeCallback(settled, promise, callback, detail) {
  3985. var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true;
  3986. if (hasCallback) {
  3987. try {
  3988. value = callback(detail);
  3989. } catch (e) {
  3990. succeeded = false;
  3991. error = e;
  3992. }
  3993. if (promise === value) {
  3994. reject(promise, cannotReturnOwn());
  3995. return;
  3996. }
  3997. } else {
  3998. value = detail;
  3999. }
  4000. if (promise._state !== PENDING) {} else if (hasCallback && succeeded) {
  4001. resolve(promise, value);
  4002. } else if (succeeded === false) {
  4003. reject(promise, error);
  4004. } else if (settled === FULFILLED) {
  4005. fulfill(promise, value);
  4006. } else if (settled === REJECTED) {
  4007. reject(promise, value);
  4008. }
  4009. }
  4010. function initializePromise(promise, resolver) {
  4011. try {
  4012. resolver(function resolvePromise(value) {
  4013. resolve(promise, value);
  4014. }, function rejectPromise(reason) {
  4015. reject(promise, reason);
  4016. });
  4017. } catch (e) {
  4018. reject(promise, e);
  4019. }
  4020. }
  4021. var id = 0;
  4022. function nextId() {
  4023. return id++;
  4024. }
  4025. function makePromise(promise) {
  4026. promise[PROMISE_ID] = id++;
  4027. promise._state = void 0;
  4028. promise._result = void 0;
  4029. promise._subscribers = [];
  4030. }
  4031. function validationError() {
  4032. return new Error('Array Methods must be provided an Array');
  4033. }
  4034. var Enumerator = function() {
  4035. function Enumerator2(Constructor, input) {
  4036. this._instanceConstructor = Constructor;
  4037. this.promise = new Constructor(noop3);
  4038. if (!this.promise[PROMISE_ID]) {
  4039. makePromise(this.promise);
  4040. }
  4041. if (isArray(input)) {
  4042. this.length = input.length;
  4043. this._remaining = input.length;
  4044. this._result = new Array(this.length);
  4045. if (this.length === 0) {
  4046. fulfill(this.promise, this._result);
  4047. } else {
  4048. this.length = this.length || 0;
  4049. this._enumerate(input);
  4050. if (this._remaining === 0) {
  4051. fulfill(this.promise, this._result);
  4052. }
  4053. }
  4054. } else {
  4055. reject(this.promise, validationError());
  4056. }
  4057. }
  4058. Enumerator2.prototype._enumerate = function _enumerate(input) {
  4059. for (var i = 0; this._state === PENDING && i < input.length; i++) {
  4060. this._eachEntry(input[i], i);
  4061. }
  4062. };
  4063. Enumerator2.prototype._eachEntry = function _eachEntry(entry, i) {
  4064. var c = this._instanceConstructor;
  4065. var resolve$$1 = c.resolve;
  4066. if (resolve$$1 === resolve$1) {
  4067. var _then = void 0;
  4068. var error = void 0;
  4069. var didError = false;
  4070. try {
  4071. _then = entry.then;
  4072. } catch (e) {
  4073. didError = true;
  4074. error = e;
  4075. }
  4076. if (_then === then && entry._state !== PENDING) {
  4077. this._settledAt(entry._state, i, entry._result);
  4078. } else if (typeof _then !== 'function') {
  4079. this._remaining--;
  4080. this._result[i] = entry;
  4081. } else if (c === Promise$1) {
  4082. var promise = new c(noop3);
  4083. if (didError) {
  4084. reject(promise, error);
  4085. } else {
  4086. handleMaybeThenable(promise, entry, _then);
  4087. }
  4088. this._willSettleAt(promise, i);
  4089. } else {
  4090. this._willSettleAt(new c(function(resolve$$12) {
  4091. return resolve$$12(entry);
  4092. }), i);
  4093. }
  4094. } else {
  4095. this._willSettleAt(resolve$$1(entry), i);
  4096. }
  4097. };
  4098. Enumerator2.prototype._settledAt = function _settledAt(state, i, value) {
  4099. var promise = this.promise;
  4100. if (promise._state === PENDING) {
  4101. this._remaining--;
  4102. if (state === REJECTED) {
  4103. reject(promise, value);
  4104. } else {
  4105. this._result[i] = value;
  4106. }
  4107. }
  4108. if (this._remaining === 0) {
  4109. fulfill(promise, this._result);
  4110. }
  4111. };
  4112. Enumerator2.prototype._willSettleAt = function _willSettleAt(promise, i) {
  4113. var enumerator = this;
  4114. subscribe2(promise, void 0, function(value) {
  4115. return enumerator._settledAt(FULFILLED, i, value);
  4116. }, function(reason) {
  4117. return enumerator._settledAt(REJECTED, i, reason);
  4118. });
  4119. };
  4120. return Enumerator2;
  4121. }();
  4122. function all(entries) {
  4123. return new Enumerator(this, entries).promise;
  4124. }
  4125. function race(entries) {
  4126. var Constructor = this;
  4127. if (!isArray(entries)) {
  4128. return new Constructor(function(_, reject2) {
  4129. return reject2(new TypeError('You must pass an array to race.'));
  4130. });
  4131. } else {
  4132. return new Constructor(function(resolve2, reject2) {
  4133. var length = entries.length;
  4134. for (var i = 0; i < length; i++) {
  4135. Constructor.resolve(entries[i]).then(resolve2, reject2);
  4136. }
  4137. });
  4138. }
  4139. }
  4140. function reject$1(reason) {
  4141. var Constructor = this;
  4142. var promise = new Constructor(noop3);
  4143. reject(promise, reason);
  4144. return promise;
  4145. }
  4146. function needsResolver() {
  4147. throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
  4148. }
  4149. function needsNew() {
  4150. throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
  4151. }
  4152. var Promise$1 = function() {
  4153. function Promise2(resolver) {
  4154. this[PROMISE_ID] = nextId();
  4155. this._result = this._state = void 0;
  4156. this._subscribers = [];
  4157. if (noop3 !== resolver) {
  4158. typeof resolver !== 'function' && needsResolver();
  4159. this instanceof Promise2 ? initializePromise(this, resolver) : needsNew();
  4160. }
  4161. }
  4162. Promise2.prototype['catch'] = function _catch(onRejection) {
  4163. return this.then(null, onRejection);
  4164. };
  4165. Promise2.prototype['finally'] = function _finally(callback) {
  4166. var promise = this;
  4167. var constructor = promise.constructor;
  4168. if (isFunction(callback)) {
  4169. return promise.then(function(value) {
  4170. return constructor.resolve(callback()).then(function() {
  4171. return value;
  4172. });
  4173. }, function(reason) {
  4174. return constructor.resolve(callback()).then(function() {
  4175. throw reason;
  4176. });
  4177. });
  4178. }
  4179. return promise.then(callback, callback);
  4180. };
  4181. return Promise2;
  4182. }();
  4183. Promise$1.prototype.then = then;
  4184. Promise$1.all = all;
  4185. Promise$1.race = race;
  4186. Promise$1.resolve = resolve$1;
  4187. Promise$1.reject = reject$1;
  4188. Promise$1._setScheduler = setScheduler;
  4189. Promise$1._setAsap = setAsap;
  4190. Promise$1._asap = asap;
  4191. function polyfill() {
  4192. var local = void 0;
  4193. if (typeof global !== 'undefined') {
  4194. local = global;
  4195. } else if (typeof self !== 'undefined') {
  4196. local = self;
  4197. } else {
  4198. try {
  4199. local = Function('return this')();
  4200. } catch (e) {
  4201. throw new Error('polyfill failed because global object is unavailable in this environment');
  4202. }
  4203. }
  4204. var P = local.Promise;
  4205. if (P) {
  4206. var promiseToString = null;
  4207. try {
  4208. promiseToString = Object.prototype.toString.call(P.resolve());
  4209. } catch (e) {}
  4210. if (promiseToString === '[object Promise]' && !P.cast) {
  4211. return;
  4212. }
  4213. }
  4214. local.Promise = Promise$1;
  4215. }
  4216. Promise$1.polyfill = polyfill;
  4217. Promise$1.Promise = Promise$1;
  4218. return Promise$1;
  4219. });
  4220. });
  4221. var require_typedarray = __commonJS(function(exports) {
  4222. var undefined2 = void 0;
  4223. var MAX_ARRAY_LENGTH = 1e5;
  4224. var ECMAScript = function() {
  4225. var opts = Object.prototype.toString, ophop = Object.prototype.hasOwnProperty;
  4226. return {
  4227. Class: function Class(v) {
  4228. return opts.call(v).replace(/^\[object *|\]$/g, '');
  4229. },
  4230. HasProperty: function HasProperty(o, p) {
  4231. return p in o;
  4232. },
  4233. HasOwnProperty: function HasOwnProperty(o, p) {
  4234. return ophop.call(o, p);
  4235. },
  4236. IsCallable: function IsCallable(o) {
  4237. return typeof o === 'function';
  4238. },
  4239. ToInt32: function ToInt32(v) {
  4240. return v >> 0;
  4241. },
  4242. ToUint32: function ToUint32(v) {
  4243. return v >>> 0;
  4244. }
  4245. };
  4246. }();
  4247. var LN2 = Math.LN2;
  4248. var abs = Math.abs;
  4249. var floor = Math.floor;
  4250. var log9 = Math.log;
  4251. var min = Math.min;
  4252. var pow = Math.pow;
  4253. var round = Math.round;
  4254. function configureProperties(obj) {
  4255. if (getOwnPropNames && defineProp) {
  4256. var props = getOwnPropNames(obj), i;
  4257. for (i = 0; i < props.length; i += 1) {
  4258. defineProp(obj, props[i], {
  4259. value: obj[props[i]],
  4260. writable: false,
  4261. enumerable: false,
  4262. configurable: false
  4263. });
  4264. }
  4265. }
  4266. }
  4267. var defineProp;
  4268. if (Object.defineProperty && function() {
  4269. try {
  4270. Object.defineProperty({}, 'x', {});
  4271. return true;
  4272. } catch (e) {
  4273. return false;
  4274. }
  4275. }()) {
  4276. defineProp = Object.defineProperty;
  4277. } else {
  4278. defineProp = function defineProp(o, p, desc) {
  4279. if (!o === Object(o)) {
  4280. throw new TypeError('Object.defineProperty called on non-object');
  4281. }
  4282. if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) {
  4283. Object.prototype.__defineGetter__.call(o, p, desc.get);
  4284. }
  4285. if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) {
  4286. Object.prototype.__defineSetter__.call(o, p, desc.set);
  4287. }
  4288. if (ECMAScript.HasProperty(desc, 'value')) {
  4289. o[p] = desc.value;
  4290. }
  4291. return o;
  4292. };
  4293. }
  4294. var getOwnPropNames = Object.getOwnPropertyNames || function(o) {
  4295. if (o !== Object(o)) {
  4296. throw new TypeError('Object.getOwnPropertyNames called on non-object');
  4297. }
  4298. var props = [], p;
  4299. for (p in o) {
  4300. if (ECMAScript.HasOwnProperty(o, p)) {
  4301. props.push(p);
  4302. }
  4303. }
  4304. return props;
  4305. };
  4306. function makeArrayAccessors(obj) {
  4307. if (!defineProp) {
  4308. return;
  4309. }
  4310. if (obj.length > MAX_ARRAY_LENGTH) {
  4311. throw new RangeError('Array too large for polyfill');
  4312. }
  4313. function makeArrayAccessor(index) {
  4314. defineProp(obj, index, {
  4315. get: function get() {
  4316. return obj._getter(index);
  4317. },
  4318. set: function set(v) {
  4319. obj._setter(index, v);
  4320. },
  4321. enumerable: true,
  4322. configurable: false
  4323. });
  4324. }
  4325. var i;
  4326. for (i = 0; i < obj.length; i += 1) {
  4327. makeArrayAccessor(i);
  4328. }
  4329. }
  4330. function as_signed(value, bits) {
  4331. var s = 32 - bits;
  4332. return value << s >> s;
  4333. }
  4334. function as_unsigned(value, bits) {
  4335. var s = 32 - bits;
  4336. return value << s >>> s;
  4337. }
  4338. function packI8(n) {
  4339. return [ n & 255 ];
  4340. }
  4341. function unpackI8(bytes) {
  4342. return as_signed(bytes[0], 8);
  4343. }
  4344. function packU8(n) {
  4345. return [ n & 255 ];
  4346. }
  4347. function unpackU8(bytes) {
  4348. return as_unsigned(bytes[0], 8);
  4349. }
  4350. function packU8Clamped(n) {
  4351. n = round(Number(n));
  4352. return [ n < 0 ? 0 : n > 255 ? 255 : n & 255 ];
  4353. }
  4354. function packI16(n) {
  4355. return [ n >> 8 & 255, n & 255 ];
  4356. }
  4357. function unpackI16(bytes) {
  4358. return as_signed(bytes[0] << 8 | bytes[1], 16);
  4359. }
  4360. function packU16(n) {
  4361. return [ n >> 8 & 255, n & 255 ];
  4362. }
  4363. function unpackU16(bytes) {
  4364. return as_unsigned(bytes[0] << 8 | bytes[1], 16);
  4365. }
  4366. function packI32(n) {
  4367. return [ n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255 ];
  4368. }
  4369. function unpackI32(bytes) {
  4370. return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
  4371. }
  4372. function packU32(n) {
  4373. return [ n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255 ];
  4374. }
  4375. function unpackU32(bytes) {
  4376. return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
  4377. }
  4378. function packIEEE754(v, ebits, fbits) {
  4379. var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes;
  4380. function roundToEven(n) {
  4381. var w = floor(n), f2 = n - w;
  4382. if (f2 < .5) {
  4383. return w;
  4384. }
  4385. if (f2 > .5) {
  4386. return w + 1;
  4387. }
  4388. return w % 2 ? w + 1 : w;
  4389. }
  4390. if (v !== v) {
  4391. e = (1 << ebits) - 1;
  4392. f = pow(2, fbits - 1);
  4393. s = 0;
  4394. } else if (v === Infinity || v === -Infinity) {
  4395. e = (1 << ebits) - 1;
  4396. f = 0;
  4397. s = v < 0 ? 1 : 0;
  4398. } else if (v === 0) {
  4399. e = 0;
  4400. f = 0;
  4401. s = 1 / v === -Infinity ? 1 : 0;
  4402. } else {
  4403. s = v < 0;
  4404. v = abs(v);
  4405. if (v >= pow(2, 1 - bias)) {
  4406. e = min(floor(log9(v) / LN2), 1023);
  4407. f = roundToEven(v / pow(2, e) * pow(2, fbits));
  4408. if (f / pow(2, fbits) >= 2) {
  4409. e = e + 1;
  4410. f = 1;
  4411. }
  4412. if (e > bias) {
  4413. e = (1 << ebits) - 1;
  4414. f = 0;
  4415. } else {
  4416. e = e + bias;
  4417. f = f - pow(2, fbits);
  4418. }
  4419. } else {
  4420. e = 0;
  4421. f = roundToEven(v / pow(2, 1 - bias - fbits));
  4422. }
  4423. }
  4424. bits = [];
  4425. for (i = fbits; i; i -= 1) {
  4426. bits.push(f % 2 ? 1 : 0);
  4427. f = floor(f / 2);
  4428. }
  4429. for (i = ebits; i; i -= 1) {
  4430. bits.push(e % 2 ? 1 : 0);
  4431. e = floor(e / 2);
  4432. }
  4433. bits.push(s ? 1 : 0);
  4434. bits.reverse();
  4435. str = bits.join('');
  4436. bytes = [];
  4437. while (str.length) {
  4438. bytes.push(parseInt(str.substring(0, 8), 2));
  4439. str = str.substring(8);
  4440. }
  4441. return bytes;
  4442. }
  4443. function unpackIEEE754(bytes, ebits, fbits) {
  4444. var bits = [], i, j, b, str, bias, s, e, f;
  4445. for (i = bytes.length; i; i -= 1) {
  4446. b = bytes[i - 1];
  4447. for (j = 8; j; j -= 1) {
  4448. bits.push(b % 2 ? 1 : 0);
  4449. b = b >> 1;
  4450. }
  4451. }
  4452. bits.reverse();
  4453. str = bits.join('');
  4454. bias = (1 << ebits - 1) - 1;
  4455. s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
  4456. e = parseInt(str.substring(1, 1 + ebits), 2);
  4457. f = parseInt(str.substring(1 + ebits), 2);
  4458. if (e === (1 << ebits) - 1) {
  4459. return f !== 0 ? NaN : s * Infinity;
  4460. } else if (e > 0) {
  4461. return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
  4462. } else if (f !== 0) {
  4463. return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
  4464. } else {
  4465. return s < 0 ? -0 : 0;
  4466. }
  4467. }
  4468. function unpackF64(b) {
  4469. return unpackIEEE754(b, 11, 52);
  4470. }
  4471. function packF64(v) {
  4472. return packIEEE754(v, 11, 52);
  4473. }
  4474. function unpackF32(b) {
  4475. return unpackIEEE754(b, 8, 23);
  4476. }
  4477. function packF32(v) {
  4478. return packIEEE754(v, 8, 23);
  4479. }
  4480. (function() {
  4481. var ArrayBuffer = function ArrayBuffer2(length) {
  4482. length = ECMAScript.ToInt32(length);
  4483. if (length < 0) {
  4484. throw new RangeError('ArrayBuffer size is not a small enough positive integer');
  4485. }
  4486. this.byteLength = length;
  4487. this._bytes = [];
  4488. this._bytes.length = length;
  4489. var i;
  4490. for (i = 0; i < this.byteLength; i += 1) {
  4491. this._bytes[i] = 0;
  4492. }
  4493. configureProperties(this);
  4494. };
  4495. exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
  4496. var ArrayBufferView = function ArrayBufferView2() {};
  4497. function makeConstructor(bytesPerElement, pack, unpack) {
  4498. var _ctor;
  4499. _ctor = function ctor(buffer, byteOffset, length) {
  4500. var array, sequence, i, s;
  4501. if (!arguments.length || typeof arguments[0] === 'number') {
  4502. this.length = ECMAScript.ToInt32(arguments[0]);
  4503. if (length < 0) {
  4504. throw new RangeError('ArrayBufferView size is not a small enough positive integer');
  4505. }
  4506. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4507. this.buffer = new ArrayBuffer(this.byteLength);
  4508. this.byteOffset = 0;
  4509. } else if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === _ctor) {
  4510. array = arguments[0];
  4511. this.length = array.length;
  4512. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4513. this.buffer = new ArrayBuffer(this.byteLength);
  4514. this.byteOffset = 0;
  4515. for (i = 0; i < this.length; i += 1) {
  4516. this._setter(i, array._getter(i));
  4517. }
  4518. } else if (_typeof(arguments[0]) === 'object' && !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
  4519. sequence = arguments[0];
  4520. this.length = ECMAScript.ToUint32(sequence.length);
  4521. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4522. this.buffer = new ArrayBuffer(this.byteLength);
  4523. this.byteOffset = 0;
  4524. for (i = 0; i < this.length; i += 1) {
  4525. s = sequence[i];
  4526. this._setter(i, Number(s));
  4527. }
  4528. } else if (_typeof(arguments[0]) === 'object' && (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
  4529. this.buffer = buffer;
  4530. this.byteOffset = ECMAScript.ToUint32(byteOffset);
  4531. if (this.byteOffset > this.buffer.byteLength) {
  4532. throw new RangeError('byteOffset out of range');
  4533. }
  4534. if (this.byteOffset % this.BYTES_PER_ELEMENT) {
  4535. throw new RangeError('ArrayBuffer length minus the byteOffset is not a multiple of the element size.');
  4536. }
  4537. if (arguments.length < 3) {
  4538. this.byteLength = this.buffer.byteLength - this.byteOffset;
  4539. if (this.byteLength % this.BYTES_PER_ELEMENT) {
  4540. throw new RangeError('length of buffer minus byteOffset not a multiple of the element size');
  4541. }
  4542. this.length = this.byteLength / this.BYTES_PER_ELEMENT;
  4543. } else {
  4544. this.length = ECMAScript.ToUint32(length);
  4545. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4546. }
  4547. if (this.byteOffset + this.byteLength > this.buffer.byteLength) {
  4548. throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
  4549. }
  4550. } else {
  4551. throw new TypeError('Unexpected argument type(s)');
  4552. }
  4553. this.constructor = _ctor;
  4554. configureProperties(this);
  4555. makeArrayAccessors(this);
  4556. };
  4557. _ctor.prototype = new ArrayBufferView();
  4558. _ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
  4559. _ctor.prototype._pack = pack;
  4560. _ctor.prototype._unpack = unpack;
  4561. _ctor.BYTES_PER_ELEMENT = bytesPerElement;
  4562. _ctor.prototype._getter = function(index) {
  4563. if (arguments.length < 1) {
  4564. throw new SyntaxError('Not enough arguments');
  4565. }
  4566. index = ECMAScript.ToUint32(index);
  4567. if (index >= this.length) {
  4568. return undefined2;
  4569. }
  4570. var bytes = [], i, o;
  4571. for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
  4572. o += 1) {
  4573. bytes.push(this.buffer._bytes[o]);
  4574. }
  4575. return this._unpack(bytes);
  4576. };
  4577. _ctor.prototype.get = _ctor.prototype._getter;
  4578. _ctor.prototype._setter = function(index, value) {
  4579. if (arguments.length < 2) {
  4580. throw new SyntaxError('Not enough arguments');
  4581. }
  4582. index = ECMAScript.ToUint32(index);
  4583. if (index >= this.length) {
  4584. return undefined2;
  4585. }
  4586. var bytes = this._pack(value), i, o;
  4587. for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
  4588. o += 1) {
  4589. this.buffer._bytes[o] = bytes[i];
  4590. }
  4591. };
  4592. _ctor.prototype.set = function(index, value) {
  4593. if (arguments.length < 1) {
  4594. throw new SyntaxError('Not enough arguments');
  4595. }
  4596. var array, sequence, offset, len, i, s, d, byteOffset, byteLength, tmp;
  4597. if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === this.constructor) {
  4598. array = arguments[0];
  4599. offset = ECMAScript.ToUint32(arguments[1]);
  4600. if (offset + array.length > this.length) {
  4601. throw new RangeError('Offset plus length of array is out of range');
  4602. }
  4603. byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
  4604. byteLength = array.length * this.BYTES_PER_ELEMENT;
  4605. if (array.buffer === this.buffer) {
  4606. tmp = [];
  4607. for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
  4608. tmp[i] = array.buffer._bytes[s];
  4609. }
  4610. for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
  4611. this.buffer._bytes[d] = tmp[i];
  4612. }
  4613. } else {
  4614. for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1, s += 1,
  4615. d += 1) {
  4616. this.buffer._bytes[d] = array.buffer._bytes[s];
  4617. }
  4618. }
  4619. } else if (_typeof(arguments[0]) === 'object' && typeof arguments[0].length !== 'undefined') {
  4620. sequence = arguments[0];
  4621. len = ECMAScript.ToUint32(sequence.length);
  4622. offset = ECMAScript.ToUint32(arguments[1]);
  4623. if (offset + len > this.length) {
  4624. throw new RangeError('Offset plus length of array is out of range');
  4625. }
  4626. for (i = 0; i < len; i += 1) {
  4627. s = sequence[i];
  4628. this._setter(offset + i, Number(s));
  4629. }
  4630. } else {
  4631. throw new TypeError('Unexpected argument type(s)');
  4632. }
  4633. };
  4634. _ctor.prototype.subarray = function(start, end) {
  4635. function clamp2(v, min2, max) {
  4636. return v < min2 ? min2 : v > max ? max : v;
  4637. }
  4638. start = ECMAScript.ToInt32(start);
  4639. end = ECMAScript.ToInt32(end);
  4640. if (arguments.length < 1) {
  4641. start = 0;
  4642. }
  4643. if (arguments.length < 2) {
  4644. end = this.length;
  4645. }
  4646. if (start < 0) {
  4647. start = this.length + start;
  4648. }
  4649. if (end < 0) {
  4650. end = this.length + end;
  4651. }
  4652. start = clamp2(start, 0, this.length);
  4653. end = clamp2(end, 0, this.length);
  4654. var len = end - start;
  4655. if (len < 0) {
  4656. len = 0;
  4657. }
  4658. return new this.constructor(this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
  4659. };
  4660. return _ctor;
  4661. }
  4662. var Int8Array = makeConstructor(1, packI8, unpackI8);
  4663. var Uint8Array2 = makeConstructor(1, packU8, unpackU8);
  4664. var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8);
  4665. var Int16Array = makeConstructor(2, packI16, unpackI16);
  4666. var Uint16Array = makeConstructor(2, packU16, unpackU16);
  4667. var Int32Array = makeConstructor(4, packI32, unpackI32);
  4668. var Uint32Array3 = makeConstructor(4, packU32, unpackU32);
  4669. var Float32Array = makeConstructor(4, packF32, unpackF32);
  4670. var Float64Array = makeConstructor(8, packF64, unpackF64);
  4671. exports.Int8Array = exports.Int8Array || Int8Array;
  4672. exports.Uint8Array = exports.Uint8Array || Uint8Array2;
  4673. exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray2;
  4674. exports.Int16Array = exports.Int16Array || Int16Array;
  4675. exports.Uint16Array = exports.Uint16Array || Uint16Array;
  4676. exports.Int32Array = exports.Int32Array || Int32Array;
  4677. exports.Uint32Array = exports.Uint32Array || Uint32Array3;
  4678. exports.Float32Array = exports.Float32Array || Float32Array;
  4679. exports.Float64Array = exports.Float64Array || Float64Array;
  4680. })();
  4681. (function() {
  4682. function r(array, index) {
  4683. return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
  4684. }
  4685. var IS_BIG_ENDIAN = function() {
  4686. var u16array = new exports.Uint16Array([ 4660 ]), u8array = new exports.Uint8Array(u16array.buffer);
  4687. return r(u8array, 0) === 18;
  4688. }();
  4689. var DataView = function DataView2(buffer, byteOffset, byteLength) {
  4690. if (arguments.length === 0) {
  4691. buffer = new exports.ArrayBuffer(0);
  4692. } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
  4693. throw new TypeError('TypeError');
  4694. }
  4695. this.buffer = buffer || new exports.ArrayBuffer(0);
  4696. this.byteOffset = ECMAScript.ToUint32(byteOffset);
  4697. if (this.byteOffset > this.buffer.byteLength) {
  4698. throw new RangeError('byteOffset out of range');
  4699. }
  4700. if (arguments.length < 3) {
  4701. this.byteLength = this.buffer.byteLength - this.byteOffset;
  4702. } else {
  4703. this.byteLength = ECMAScript.ToUint32(byteLength);
  4704. }
  4705. if (this.byteOffset + this.byteLength > this.buffer.byteLength) {
  4706. throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
  4707. }
  4708. configureProperties(this);
  4709. };
  4710. function makeGetter(arrayType) {
  4711. return function(byteOffset, littleEndian) {
  4712. byteOffset = ECMAScript.ToUint32(byteOffset);
  4713. if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
  4714. throw new RangeError('Array index out of range');
  4715. }
  4716. byteOffset += this.byteOffset;
  4717. var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i;
  4718. for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
  4719. bytes.push(r(uint8Array, i));
  4720. }
  4721. if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
  4722. bytes.reverse();
  4723. }
  4724. return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
  4725. };
  4726. }
  4727. DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
  4728. DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
  4729. DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
  4730. DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
  4731. DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
  4732. DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
  4733. DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
  4734. DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
  4735. function makeSetter(arrayType) {
  4736. return function(byteOffset, value, littleEndian) {
  4737. byteOffset = ECMAScript.ToUint32(byteOffset);
  4738. if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
  4739. throw new RangeError('Array index out of range');
  4740. }
  4741. var typeArray = new arrayType([ value ]), byteArray = new exports.Uint8Array(typeArray.buffer), bytes = [], i, byteView;
  4742. for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
  4743. bytes.push(r(byteArray, i));
  4744. }
  4745. if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
  4746. bytes.reverse();
  4747. }
  4748. byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
  4749. byteView.set(bytes);
  4750. };
  4751. }
  4752. DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
  4753. DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
  4754. DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
  4755. DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
  4756. DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
  4757. DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
  4758. DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
  4759. DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
  4760. exports.DataView = exports.DataView || DataView;
  4761. })();
  4762. });
  4763. var require_weakmap_polyfill = __commonJS(function(exports) {
  4764. (function(self2) {
  4765. 'use strict';
  4766. if (self2.WeakMap) {
  4767. return;
  4768. }
  4769. var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  4770. var hasDefine = Object.defineProperty && function() {
  4771. try {
  4772. return Object.defineProperty({}, 'x', {
  4773. value: 1
  4774. }).x === 1;
  4775. } catch (e) {}
  4776. }();
  4777. var defineProperty = function defineProperty(object, name, value) {
  4778. if (hasDefine) {
  4779. Object.defineProperty(object, name, {
  4780. configurable: true,
  4781. writable: true,
  4782. value: value
  4783. });
  4784. } else {
  4785. object[name] = value;
  4786. }
  4787. };
  4788. self2.WeakMap = function() {
  4789. function WeakMap2() {
  4790. if (this === void 0) {
  4791. throw new TypeError('Constructor WeakMap requires \'new\'');
  4792. }
  4793. defineProperty(this, '_id', genId('_WeakMap'));
  4794. if (arguments.length > 0) {
  4795. throw new TypeError('WeakMap iterable is not supported');
  4796. }
  4797. }
  4798. defineProperty(WeakMap2.prototype, 'delete', function(key) {
  4799. checkInstance(this, 'delete');
  4800. if (!isObject(key)) {
  4801. return false;
  4802. }
  4803. var entry = key[this._id];
  4804. if (entry && entry[0] === key) {
  4805. delete key[this._id];
  4806. return true;
  4807. }
  4808. return false;
  4809. });
  4810. defineProperty(WeakMap2.prototype, 'get', function(key) {
  4811. checkInstance(this, 'get');
  4812. if (!isObject(key)) {
  4813. return void 0;
  4814. }
  4815. var entry = key[this._id];
  4816. if (entry && entry[0] === key) {
  4817. return entry[1];
  4818. }
  4819. return void 0;
  4820. });
  4821. defineProperty(WeakMap2.prototype, 'has', function(key) {
  4822. checkInstance(this, 'has');
  4823. if (!isObject(key)) {
  4824. return false;
  4825. }
  4826. var entry = key[this._id];
  4827. if (entry && entry[0] === key) {
  4828. return true;
  4829. }
  4830. return false;
  4831. });
  4832. defineProperty(WeakMap2.prototype, 'set', function(key, value) {
  4833. checkInstance(this, 'set');
  4834. if (!isObject(key)) {
  4835. throw new TypeError('Invalid value used as weak map key');
  4836. }
  4837. var entry = key[this._id];
  4838. if (entry && entry[0] === key) {
  4839. entry[1] = value;
  4840. return this;
  4841. }
  4842. defineProperty(key, this._id, [ key, value ]);
  4843. return this;
  4844. });
  4845. function checkInstance(x, methodName) {
  4846. if (!isObject(x) || !hasOwnProperty2.call(x, '_id')) {
  4847. throw new TypeError(methodName + ' method called on incompatible receiver ' + _typeof(x));
  4848. }
  4849. }
  4850. function genId(prefix) {
  4851. return prefix + '_' + rand() + '.' + rand();
  4852. }
  4853. function rand() {
  4854. return Math.random().toString().substring(2);
  4855. }
  4856. defineProperty(WeakMap2, '_polyfill', true);
  4857. return WeakMap2;
  4858. }();
  4859. function isObject(x) {
  4860. return Object(x) === x;
  4861. }
  4862. })(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : exports);
  4863. });
  4864. var definitions = [ {
  4865. name: 'NA',
  4866. value: 'inapplicable',
  4867. priority: 0,
  4868. group: 'inapplicable'
  4869. }, {
  4870. name: 'PASS',
  4871. value: 'passed',
  4872. priority: 1,
  4873. group: 'passes'
  4874. }, {
  4875. name: 'CANTTELL',
  4876. value: 'cantTell',
  4877. priority: 2,
  4878. group: 'incomplete'
  4879. }, {
  4880. name: 'FAIL',
  4881. value: 'failed',
  4882. priority: 3,
  4883. group: 'violations'
  4884. } ];
  4885. var constants = {
  4886. helpUrlBase: 'https://dequeuniversity.com/rules/',
  4887. results: [],
  4888. resultGroups: [],
  4889. resultGroupMap: {},
  4890. impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]),
  4891. preload: Object.freeze({
  4892. assets: [ 'cssom', 'media' ],
  4893. timeout: 1e4
  4894. }),
  4895. allOrigins: '<unsafe_all_origins>',
  4896. sameOrigin: '<same_origin>'
  4897. };
  4898. definitions.forEach(function(definition) {
  4899. var name = definition.name;
  4900. var value = definition.value;
  4901. var priority = definition.priority;
  4902. var group = definition.group;
  4903. constants[name] = value;
  4904. constants[name + '_PRIO'] = priority;
  4905. constants[name + '_GROUP'] = group;
  4906. constants.results[priority] = value;
  4907. constants.resultGroups[priority] = group;
  4908. constants.resultGroupMap[value] = group;
  4909. });
  4910. Object.freeze(constants.results);
  4911. Object.freeze(constants.resultGroups);
  4912. Object.freeze(constants.resultGroupMap);
  4913. Object.freeze(constants);
  4914. var constants_default = constants;
  4915. function log() {
  4916. if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) {
  4917. Function.prototype.apply.call(console.log, console, arguments);
  4918. }
  4919. }
  4920. var log_default = log;
  4921. var whitespaceRegex = /[\t\r\n\f]/g;
  4922. var AbstractVirtualNode = function() {
  4923. function AbstractVirtualNode() {
  4924. _classCallCheck(this, AbstractVirtualNode);
  4925. this.parent = void 0;
  4926. }
  4927. _createClass(AbstractVirtualNode, [ {
  4928. key: 'props',
  4929. get: function get() {
  4930. throw new Error('VirtualNode class must have a "props" object consisting of "nodeType" and "nodeName" properties');
  4931. }
  4932. }, {
  4933. key: 'attrNames',
  4934. get: function get() {
  4935. throw new Error('VirtualNode class must have an "attrNames" property');
  4936. }
  4937. }, {
  4938. key: 'attr',
  4939. value: function attr() {
  4940. throw new Error('VirtualNode class must have an "attr" function');
  4941. }
  4942. }, {
  4943. key: 'hasAttr',
  4944. value: function hasAttr() {
  4945. throw new Error('VirtualNode class must have a "hasAttr" function');
  4946. }
  4947. }, {
  4948. key: 'hasClass',
  4949. value: function hasClass(className) {
  4950. var classAttr = this.attr('class');
  4951. if (!classAttr) {
  4952. return false;
  4953. }
  4954. var selector = ' ' + className + ' ';
  4955. return (' ' + classAttr + ' ').replace(whitespaceRegex, ' ').indexOf(selector) >= 0;
  4956. }
  4957. } ]);
  4958. return AbstractVirtualNode;
  4959. }();
  4960. var abstract_virtual_node_default = AbstractVirtualNode;
  4961. var utils_exports = {};
  4962. __export(utils_exports, {
  4963. DqElement: function DqElement() {
  4964. return dq_element_default;
  4965. },
  4966. aggregate: function aggregate() {
  4967. return aggregate_default;
  4968. },
  4969. aggregateChecks: function aggregateChecks() {
  4970. return aggregate_checks_default;
  4971. },
  4972. aggregateNodeResults: function aggregateNodeResults() {
  4973. return aggregate_node_results_default;
  4974. },
  4975. aggregateResult: function aggregateResult() {
  4976. return aggregate_result_default;
  4977. },
  4978. areStylesSet: function areStylesSet() {
  4979. return are_styles_set_default;
  4980. },
  4981. assert: function assert() {
  4982. return assert_default;
  4983. },
  4984. checkHelper: function checkHelper() {
  4985. return check_helper_default;
  4986. },
  4987. clone: function clone() {
  4988. return clone_default;
  4989. },
  4990. closest: function closest() {
  4991. return closest_default;
  4992. },
  4993. collectResultsFromFrames: function collectResultsFromFrames() {
  4994. return _collectResultsFromFrames;
  4995. },
  4996. contains: function contains() {
  4997. return _contains;
  4998. },
  4999. convertSelector: function convertSelector() {
  5000. return _convertSelector;
  5001. },
  5002. cssParser: function cssParser() {
  5003. return css_parser_default;
  5004. },
  5005. deepMerge: function deepMerge() {
  5006. return deep_merge_default;
  5007. },
  5008. escapeSelector: function escapeSelector() {
  5009. return escape_selector_default;
  5010. },
  5011. extendMetaData: function extendMetaData() {
  5012. return extend_meta_data_default;
  5013. },
  5014. filterHtmlAttrs: function filterHtmlAttrs() {
  5015. return filter_html_attrs_default;
  5016. },
  5017. finalizeRuleResult: function finalizeRuleResult() {
  5018. return finalize_result_default;
  5019. },
  5020. findBy: function findBy() {
  5021. return find_by_default;
  5022. },
  5023. getAllChecks: function getAllChecks() {
  5024. return get_all_checks_default;
  5025. },
  5026. getAncestry: function getAncestry() {
  5027. return _getAncestry;
  5028. },
  5029. getBaseLang: function getBaseLang() {
  5030. return get_base_lang_default;
  5031. },
  5032. getCheckMessage: function getCheckMessage() {
  5033. return get_check_message_default;
  5034. },
  5035. getCheckOption: function getCheckOption() {
  5036. return get_check_option_default;
  5037. },
  5038. getEnvironmentData: function getEnvironmentData() {
  5039. return _getEnvironmentData;
  5040. },
  5041. getFlattenedTree: function getFlattenedTree() {
  5042. return get_flattened_tree_default;
  5043. },
  5044. getFrameContexts: function getFrameContexts() {
  5045. return _getFrameContexts;
  5046. },
  5047. getFriendlyUriEnd: function getFriendlyUriEnd() {
  5048. return get_friendly_uri_end_default;
  5049. },
  5050. getNodeAttributes: function getNodeAttributes() {
  5051. return get_node_attributes_default;
  5052. },
  5053. getNodeFromTree: function getNodeFromTree() {
  5054. return get_node_from_tree_default;
  5055. },
  5056. getPreloadConfig: function getPreloadConfig() {
  5057. return _getPreloadConfig;
  5058. },
  5059. getRootNode: function getRootNode() {
  5060. return get_root_node_default;
  5061. },
  5062. getRule: function getRule() {
  5063. return get_rule_default;
  5064. },
  5065. getScroll: function getScroll() {
  5066. return _getScroll;
  5067. },
  5068. getScrollState: function getScrollState() {
  5069. return get_scroll_state_default;
  5070. },
  5071. getSelector: function getSelector() {
  5072. return _getSelector;
  5073. },
  5074. getSelectorData: function getSelectorData() {
  5075. return _getSelectorData;
  5076. },
  5077. getShadowSelector: function getShadowSelector() {
  5078. return get_shadow_selector_default;
  5079. },
  5080. getStandards: function getStandards() {
  5081. return _getStandards;
  5082. },
  5083. getStyleSheetFactory: function getStyleSheetFactory() {
  5084. return get_stylesheet_factory_default;
  5085. },
  5086. getXpath: function getXpath() {
  5087. return get_xpath_default;
  5088. },
  5089. injectStyle: function injectStyle() {
  5090. return inject_style_default;
  5091. },
  5092. isHidden: function isHidden() {
  5093. return is_hidden_default;
  5094. },
  5095. isHtmlElement: function isHtmlElement() {
  5096. return is_html_element_default;
  5097. },
  5098. isNodeInContext: function isNodeInContext() {
  5099. return is_node_in_context_default;
  5100. },
  5101. isShadowRoot: function isShadowRoot() {
  5102. return is_shadow_root_default;
  5103. },
  5104. isValidLang: function isValidLang() {
  5105. return valid_langs_default;
  5106. },
  5107. isXHTML: function isXHTML() {
  5108. return is_xhtml_default;
  5109. },
  5110. matchAncestry: function matchAncestry() {
  5111. return match_ancestry_default;
  5112. },
  5113. matches: function matches() {
  5114. return matches_default;
  5115. },
  5116. matchesExpression: function matchesExpression() {
  5117. return _matchesExpression;
  5118. },
  5119. matchesSelector: function matchesSelector() {
  5120. return element_matches_default;
  5121. },
  5122. memoize: function memoize() {
  5123. return memoize_default;
  5124. },
  5125. mergeResults: function mergeResults() {
  5126. return merge_results_default;
  5127. },
  5128. nodeSorter: function nodeSorter() {
  5129. return node_sorter_default;
  5130. },
  5131. parseCrossOriginStylesheet: function parseCrossOriginStylesheet() {
  5132. return parse_crossorigin_stylesheet_default;
  5133. },
  5134. parseSameOriginStylesheet: function parseSameOriginStylesheet() {
  5135. return parse_sameorigin_stylesheet_default;
  5136. },
  5137. parseStylesheet: function parseStylesheet() {
  5138. return parse_stylesheet_default;
  5139. },
  5140. performanceTimer: function performanceTimer() {
  5141. return performance_timer_default;
  5142. },
  5143. pollyfillElementsFromPoint: function pollyfillElementsFromPoint() {
  5144. return _pollyfillElementsFromPoint;
  5145. },
  5146. preload: function preload() {
  5147. return preload_default;
  5148. },
  5149. preloadCssom: function preloadCssom() {
  5150. return preload_cssom_default;
  5151. },
  5152. preloadMedia: function preloadMedia() {
  5153. return preload_media_default;
  5154. },
  5155. processMessage: function processMessage() {
  5156. return process_message_default;
  5157. },
  5158. publishMetaData: function publishMetaData() {
  5159. return publish_metadata_default;
  5160. },
  5161. querySelectorAll: function querySelectorAll() {
  5162. return query_selector_all_default;
  5163. },
  5164. querySelectorAllFilter: function querySelectorAllFilter() {
  5165. return query_selector_all_filter_default;
  5166. },
  5167. queue: function queue() {
  5168. return queue_default;
  5169. },
  5170. respondable: function respondable() {
  5171. return _respondable;
  5172. },
  5173. ruleShouldRun: function ruleShouldRun() {
  5174. return rule_should_run_default;
  5175. },
  5176. select: function select() {
  5177. return select_default;
  5178. },
  5179. sendCommandToFrame: function sendCommandToFrame() {
  5180. return _sendCommandToFrame;
  5181. },
  5182. setScrollState: function setScrollState() {
  5183. return set_scroll_state_default;
  5184. },
  5185. shadowSelect: function shadowSelect() {
  5186. return _shadowSelect;
  5187. },
  5188. shouldPreload: function shouldPreload() {
  5189. return _shouldPreload;
  5190. },
  5191. toArray: function toArray() {
  5192. return to_array_default;
  5193. },
  5194. tokenList: function tokenList() {
  5195. return token_list_default;
  5196. },
  5197. uniqueArray: function uniqueArray() {
  5198. return unique_array_default;
  5199. },
  5200. uuid: function uuid() {
  5201. return uuid_default;
  5202. },
  5203. validInputTypes: function validInputTypes() {
  5204. return valid_input_type_default;
  5205. },
  5206. validLangs: function validLangs() {
  5207. return _validLangs;
  5208. }
  5209. });
  5210. var errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]);
  5211. function stringifyMessage(_ref) {
  5212. var topic = _ref.topic, channelId = _ref.channelId, message = _ref.message, messageId = _ref.messageId, keepalive = _ref.keepalive;
  5213. var data2 = {
  5214. channelId: channelId,
  5215. topic: topic,
  5216. messageId: messageId,
  5217. keepalive: !!keepalive,
  5218. source: getSource()
  5219. };
  5220. if (message instanceof Error) {
  5221. data2.error = {
  5222. name: message.name,
  5223. message: message.message,
  5224. stack: message.stack
  5225. };
  5226. } else {
  5227. data2.payload = message;
  5228. }
  5229. return JSON.stringify(data2);
  5230. }
  5231. function parseMessage(dataString) {
  5232. var data2;
  5233. try {
  5234. data2 = JSON.parse(dataString);
  5235. } catch (e) {
  5236. return;
  5237. }
  5238. if (!isRespondableMessage(data2)) {
  5239. return;
  5240. }
  5241. var _data = data2, topic = _data.topic, channelId = _data.channelId, messageId = _data.messageId, keepalive = _data.keepalive;
  5242. var message = _typeof(data2.error) === 'object' ? buildErrorObject(data2.error) : data2.payload;
  5243. return {
  5244. topic: topic,
  5245. message: message,
  5246. messageId: messageId,
  5247. channelId: channelId,
  5248. keepalive: !!keepalive
  5249. };
  5250. }
  5251. function isRespondableMessage(postedMessage) {
  5252. return postedMessage !== null && _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
  5253. }
  5254. function buildErrorObject(error) {
  5255. var msg = error.message || 'Unknown error occurred';
  5256. var errorName = errorTypes.includes(error.name) ? error.name : 'Error';
  5257. var ErrConstructor = window[errorName] || Error;
  5258. if (error.stack) {
  5259. msg += '\n' + error.stack.replace(error.message, '');
  5260. }
  5261. return new ErrConstructor(msg);
  5262. }
  5263. function getSource() {
  5264. var application = 'axeAPI';
  5265. var version = '';
  5266. if (typeof axe !== 'undefined' && axe._audit && axe._audit.application) {
  5267. application = axe._audit.application;
  5268. }
  5269. if (typeof axe !== 'undefined') {
  5270. version = axe.version;
  5271. }
  5272. return application + '.' + version;
  5273. }
  5274. function assert(bool, message) {
  5275. if (!bool) {
  5276. throw new Error(message);
  5277. }
  5278. }
  5279. var assert_default = assert;
  5280. function assertIsParentWindow(win) {
  5281. assetNotGlobalWindow(win);
  5282. assert_default(window.parent === win, 'Source of the response must be the parent window.');
  5283. }
  5284. function assertIsFrameWindow(win) {
  5285. assetNotGlobalWindow(win);
  5286. assert_default(win.parent === window, 'Respondable target must be a frame in the current window');
  5287. }
  5288. function assetNotGlobalWindow(win) {
  5289. assert_default(window !== win, 'Messages can not be sent to the same window.');
  5290. }
  5291. var channels = {};
  5292. function storeReplyHandler(channelId, replyHandler) {
  5293. var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5294. assert_default(!channels[channelId], 'A replyHandler already exists for this message channel.');
  5295. channels[channelId] = {
  5296. replyHandler: replyHandler,
  5297. sendToParent: sendToParent
  5298. };
  5299. }
  5300. function getReplyHandler(channelId) {
  5301. return channels[channelId];
  5302. }
  5303. function deleteReplyHandler(channelId) {
  5304. delete channels[channelId];
  5305. }
  5306. var uuid;
  5307. var _rng;
  5308. var _crypto = window.crypto || window.msCrypto;
  5309. if (!_rng && _crypto && _crypto.getRandomValues) {
  5310. var _rnds8 = new Uint8Array(16);
  5311. _rng = function whatwgRNG() {
  5312. _crypto.getRandomValues(_rnds8);
  5313. return _rnds8;
  5314. };
  5315. }
  5316. if (!_rng) {
  5317. var _rnds = new Array(16);
  5318. _rng = function _rng() {
  5319. for (var i = 0, r; i < 16; i++) {
  5320. if ((i & 3) === 0) {
  5321. r = Math.random() * 4294967296;
  5322. }
  5323. _rnds[i] = r >>> ((i & 3) << 3) & 255;
  5324. }
  5325. return _rnds;
  5326. };
  5327. }
  5328. var BufferClass = typeof window.Buffer == 'function' ? window.Buffer : Array;
  5329. var _byteToHex = [];
  5330. var _hexToByte = {};
  5331. for (var i = 0; i < 256; i++) {
  5332. _byteToHex[i] = (i + 256).toString(16).substr(1);
  5333. _hexToByte[_byteToHex[i]] = i;
  5334. }
  5335. function parse(s, buf, offset) {
  5336. var i = buf && offset || 0, ii = 0;
  5337. buf = buf || [];
  5338. s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
  5339. if (ii < 16) {
  5340. buf[i + ii++] = _hexToByte[oct];
  5341. }
  5342. });
  5343. while (ii < 16) {
  5344. buf[i + ii++] = 0;
  5345. }
  5346. return buf;
  5347. }
  5348. function unparse(buf, offset) {
  5349. var i = offset || 0, bth = _byteToHex;
  5350. return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];
  5351. }
  5352. var _seedBytes = _rng();
  5353. var _nodeId = [ _seedBytes[0] | 1, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] ];
  5354. var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 16383;
  5355. var _lastMSecs = 0;
  5356. var _lastNSecs = 0;
  5357. function v1(options, buf, offset) {
  5358. var i = buf && offset || 0;
  5359. var b = buf || [];
  5360. options = options || {};
  5361. var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
  5362. var msecs = options.msecs != null ? options.msecs : new Date().getTime();
  5363. var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
  5364. var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
  5365. if (dt < 0 && options.clockseq == null) {
  5366. clockseq = clockseq + 1 & 16383;
  5367. }
  5368. if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
  5369. nsecs = 0;
  5370. }
  5371. if (nsecs >= 1e4) {
  5372. throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
  5373. }
  5374. _lastMSecs = msecs;
  5375. _lastNSecs = nsecs;
  5376. _clockseq = clockseq;
  5377. msecs += 122192928e5;
  5378. var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
  5379. b[i++] = tl >>> 24 & 255;
  5380. b[i++] = tl >>> 16 & 255;
  5381. b[i++] = tl >>> 8 & 255;
  5382. b[i++] = tl & 255;
  5383. var tmh = msecs / 4294967296 * 1e4 & 268435455;
  5384. b[i++] = tmh >>> 8 & 255;
  5385. b[i++] = tmh & 255;
  5386. b[i++] = tmh >>> 24 & 15 | 16;
  5387. b[i++] = tmh >>> 16 & 255;
  5388. b[i++] = clockseq >>> 8 | 128;
  5389. b[i++] = clockseq & 255;
  5390. var node = options.node || _nodeId;
  5391. for (var n = 0; n < 6; n++) {
  5392. b[i + n] = node[n];
  5393. }
  5394. return buf ? buf : unparse(b);
  5395. }
  5396. function v4(options, buf, offset) {
  5397. var i = buf && offset || 0;
  5398. if (typeof options == 'string') {
  5399. buf = options == 'binary' ? new BufferClass(16) : null;
  5400. options = null;
  5401. }
  5402. options = options || {};
  5403. var rnds = options.random || (options.rng || _rng)();
  5404. rnds[6] = rnds[6] & 15 | 64;
  5405. rnds[8] = rnds[8] & 63 | 128;
  5406. if (buf) {
  5407. for (var ii = 0; ii < 16; ii++) {
  5408. buf[i + ii] = rnds[ii];
  5409. }
  5410. }
  5411. return buf || unparse(rnds);
  5412. }
  5413. uuid = v4;
  5414. uuid.v1 = v1;
  5415. uuid.v4 = v4;
  5416. uuid.parse = parse;
  5417. uuid.unparse = unparse;
  5418. uuid.BufferClass = BufferClass;
  5419. axe._uuid = v1();
  5420. var uuid_default = v4;
  5421. var messageIds = [];
  5422. function createMessageId() {
  5423. var uuid5 = ''.concat(v4(), ':').concat(v4());
  5424. if (messageIds.includes(uuid5)) {
  5425. return createMessageId();
  5426. }
  5427. messageIds.push(uuid5);
  5428. return uuid5;
  5429. }
  5430. function isNewMessage(uuid5) {
  5431. if (messageIds.includes(uuid5)) {
  5432. return false;
  5433. }
  5434. messageIds.push(uuid5);
  5435. return true;
  5436. }
  5437. function postMessage(win, data2, sendToParent, replyHandler) {
  5438. if (typeof replyHandler === 'function') {
  5439. storeReplyHandler(data2.channelId, replyHandler, sendToParent);
  5440. }
  5441. sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win);
  5442. if (data2.message instanceof Error && !sendToParent) {
  5443. axe.log(data2.message);
  5444. return false;
  5445. }
  5446. var dataString = stringifyMessage(_extends({
  5447. messageId: createMessageId()
  5448. }, data2));
  5449. var allowedOrigins = axe._audit.allowedOrigins;
  5450. if (!allowedOrigins || !allowedOrigins.length) {
  5451. return false;
  5452. }
  5453. allowedOrigins.forEach(function(origin) {
  5454. try {
  5455. win.postMessage(dataString, origin);
  5456. } catch (err2) {
  5457. if (err2 instanceof win.DOMException) {
  5458. throw new Error('allowedOrigins value "'.concat(origin, '" is not a valid origin'));
  5459. }
  5460. throw err2;
  5461. }
  5462. });
  5463. return true;
  5464. }
  5465. function processError(win, error, channelId) {
  5466. if (!win.parent !== window) {
  5467. return axe.log(error);
  5468. }
  5469. try {
  5470. postMessage(win, {
  5471. topic: null,
  5472. channelId: channelId,
  5473. message: error,
  5474. messageId: createMessageId(),
  5475. keepalive: true
  5476. }, true);
  5477. } catch (err2) {
  5478. return axe.log(err2);
  5479. }
  5480. }
  5481. function createResponder(win, channelId) {
  5482. var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5483. return function respond(message, keepalive, replyHandler) {
  5484. var data2 = {
  5485. channelId: channelId,
  5486. message: message,
  5487. keepalive: keepalive
  5488. };
  5489. postMessage(win, data2, sendToParent, replyHandler);
  5490. };
  5491. }
  5492. function originIsAllowed(origin) {
  5493. var allowedOrigins = axe._audit.allowedOrigins;
  5494. return allowedOrigins && allowedOrigins.includes('*') || allowedOrigins.includes(origin);
  5495. }
  5496. function messageHandler(_ref2, topicHandler) {
  5497. var origin = _ref2.origin, dataString = _ref2.data, win = _ref2.source;
  5498. try {
  5499. var data2 = parseMessage(dataString) || {};
  5500. var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
  5501. if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
  5502. return;
  5503. }
  5504. if (message instanceof Error && win.parent !== window) {
  5505. axe.log(message);
  5506. return false;
  5507. }
  5508. try {
  5509. if (data2.topic) {
  5510. var responder = createResponder(win, channelId);
  5511. assertIsParentWindow(win);
  5512. topicHandler(data2, responder);
  5513. } else {
  5514. callReplyHandler(win, data2);
  5515. }
  5516. } catch (error) {
  5517. processError(win, error, channelId);
  5518. }
  5519. } catch (error) {
  5520. axe.log(error);
  5521. return false;
  5522. }
  5523. }
  5524. function callReplyHandler(win, data2) {
  5525. var channelId = data2.channelId, message = data2.message, keepalive = data2.keepalive;
  5526. var _ref3 = getReplyHandler(channelId) || {}, replyHandler = _ref3.replyHandler, sendToParent = _ref3.sendToParent;
  5527. if (!replyHandler) {
  5528. return;
  5529. }
  5530. sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win);
  5531. var responder = createResponder(win, channelId, sendToParent);
  5532. if (!keepalive && channelId) {
  5533. deleteReplyHandler(channelId);
  5534. }
  5535. try {
  5536. replyHandler(message, keepalive, responder);
  5537. } catch (error) {
  5538. axe.log(error);
  5539. responder(error, keepalive);
  5540. }
  5541. }
  5542. var frameMessenger = {
  5543. open: function open(topicHandler) {
  5544. if (typeof window.addEventListener !== 'function') {
  5545. return;
  5546. }
  5547. var handler = function handler(messageEvent) {
  5548. messageHandler(messageEvent, topicHandler);
  5549. };
  5550. window.addEventListener('message', handler, false);
  5551. return function() {
  5552. window.removeEventListener('message', handler, false);
  5553. };
  5554. },
  5555. post: function post(win, data2, replyHandler) {
  5556. if (typeof window.addEventListener !== 'function') {
  5557. return false;
  5558. }
  5559. return postMessage(win, data2, false, replyHandler);
  5560. }
  5561. };
  5562. function setDefaultFrameMessenger(respondable5) {
  5563. respondable5.updateMessenger(frameMessenger);
  5564. }
  5565. function aggregate(map, values, initial) {
  5566. values = values.slice();
  5567. if (initial) {
  5568. values.push(initial);
  5569. }
  5570. var sorting = values.map(function(val) {
  5571. return map.indexOf(val);
  5572. }).sort();
  5573. return map[sorting.pop()];
  5574. }
  5575. var aggregate_default = aggregate;
  5576. var CANTTELL_PRIO = constants_default.CANTTELL_PRIO, FAIL_PRIO = constants_default.FAIL_PRIO;
  5577. var checkMap = [];
  5578. checkMap[constants_default.PASS_PRIO] = true;
  5579. checkMap[constants_default.CANTTELL_PRIO] = null;
  5580. checkMap[constants_default.FAIL_PRIO] = false;
  5581. var checkTypes = [ 'any', 'all', 'none' ];
  5582. function anyAllNone(obj, functor) {
  5583. return checkTypes.reduce(function(out, type) {
  5584. out[type] = (obj[type] || []).map(function(val) {
  5585. return functor(val, type);
  5586. });
  5587. return out;
  5588. }, {});
  5589. }
  5590. function aggregateChecks(nodeResOriginal) {
  5591. var nodeResult = Object.assign({}, nodeResOriginal);
  5592. anyAllNone(nodeResult, function(check4, type) {
  5593. var i = typeof check4.result === 'undefined' ? -1 : checkMap.indexOf(check4.result);
  5594. check4.priority = i !== -1 ? i : constants_default.CANTTELL_PRIO;
  5595. if (type === 'none') {
  5596. if (check4.priority === constants_default.PASS_PRIO) {
  5597. check4.priority = constants_default.FAIL_PRIO;
  5598. } else if (check4.priority === constants_default.FAIL_PRIO) {
  5599. check4.priority = constants_default.PASS_PRIO;
  5600. }
  5601. }
  5602. });
  5603. var priorities = {
  5604. all: nodeResult.all.reduce(function(a, b) {
  5605. return Math.max(a, b.priority);
  5606. }, 0),
  5607. none: nodeResult.none.reduce(function(a, b) {
  5608. return Math.max(a, b.priority);
  5609. }, 0),
  5610. any: nodeResult.any.reduce(function(a, b) {
  5611. return Math.min(a, b.priority);
  5612. }, 4) % 4
  5613. };
  5614. nodeResult.priority = Math.max(priorities.all, priorities.none, priorities.any);
  5615. var impacts = [];
  5616. checkTypes.forEach(function(type) {
  5617. nodeResult[type] = nodeResult[type].filter(function(check4) {
  5618. return check4.priority === nodeResult.priority && check4.priority === priorities[type];
  5619. });
  5620. nodeResult[type].forEach(function(check4) {
  5621. return impacts.push(check4.impact);
  5622. });
  5623. });
  5624. if ([ CANTTELL_PRIO, FAIL_PRIO ].includes(nodeResult.priority)) {
  5625. nodeResult.impact = aggregate_default(constants_default.impact, impacts);
  5626. } else {
  5627. nodeResult.impact = null;
  5628. }
  5629. anyAllNone(nodeResult, function(c) {
  5630. delete c.result;
  5631. delete c.priority;
  5632. });
  5633. nodeResult.result = constants_default.results[nodeResult.priority];
  5634. delete nodeResult.priority;
  5635. return nodeResult;
  5636. }
  5637. var aggregate_checks_default = aggregateChecks;
  5638. function finalizeRuleResult(ruleResult) {
  5639. var rule3 = axe._audit.rules.find(function(rule4) {
  5640. return rule4.id === ruleResult.id;
  5641. });
  5642. if (rule3 && rule3.impact) {
  5643. ruleResult.nodes.forEach(function(node) {
  5644. [ 'any', 'all', 'none' ].forEach(function(checkType) {
  5645. (node[checkType] || []).forEach(function(checkResult) {
  5646. checkResult.impact = rule3.impact;
  5647. });
  5648. });
  5649. });
  5650. }
  5651. Object.assign(ruleResult, aggregate_node_results_default(ruleResult.nodes));
  5652. delete ruleResult.nodes;
  5653. return ruleResult;
  5654. }
  5655. var finalize_result_default = finalizeRuleResult;
  5656. function aggregateNodeResults(nodeResults) {
  5657. var ruleResult = {};
  5658. nodeResults = nodeResults.map(function(nodeResult) {
  5659. if (nodeResult.any && nodeResult.all && nodeResult.none) {
  5660. return aggregate_checks_default(nodeResult);
  5661. } else if (Array.isArray(nodeResult.node)) {
  5662. return finalize_result_default(nodeResult);
  5663. } else {
  5664. throw new TypeError('Invalid Result type');
  5665. }
  5666. });
  5667. if (nodeResults && nodeResults.length) {
  5668. var resultList = nodeResults.map(function(node) {
  5669. return node.result;
  5670. });
  5671. ruleResult.result = aggregate_default(constants_default.results, resultList, ruleResult.result);
  5672. } else {
  5673. ruleResult.result = 'inapplicable';
  5674. }
  5675. constants_default.resultGroups.forEach(function(group) {
  5676. return ruleResult[group] = [];
  5677. });
  5678. nodeResults.forEach(function(nodeResult) {
  5679. var groupName = constants_default.resultGroupMap[nodeResult.result];
  5680. ruleResult[groupName].push(nodeResult);
  5681. });
  5682. var impactGroup = constants_default.FAIL_GROUP;
  5683. if (ruleResult[impactGroup].length === 0) {
  5684. impactGroup = constants_default.CANTTELL_GROUP;
  5685. }
  5686. if (ruleResult[impactGroup].length > 0) {
  5687. var impactList = ruleResult[impactGroup].map(function(failure) {
  5688. return failure.impact;
  5689. });
  5690. ruleResult.impact = aggregate_default(constants_default.impact, impactList) || null;
  5691. } else {
  5692. ruleResult.impact = null;
  5693. }
  5694. return ruleResult;
  5695. }
  5696. var aggregate_node_results_default = aggregateNodeResults;
  5697. function copyToGroup(resultObject, subResult, group) {
  5698. var resultCopy = Object.assign({}, subResult);
  5699. resultCopy.nodes = (resultCopy[group] || []).concat();
  5700. constants_default.resultGroups.forEach(function(group2) {
  5701. delete resultCopy[group2];
  5702. });
  5703. resultObject[group].push(resultCopy);
  5704. }
  5705. function aggregateResult(results) {
  5706. var resultObject = {};
  5707. constants_default.resultGroups.forEach(function(groupName) {
  5708. return resultObject[groupName] = [];
  5709. });
  5710. results.forEach(function(subResult) {
  5711. if (subResult.error) {
  5712. copyToGroup(resultObject, subResult, constants_default.CANTTELL_GROUP);
  5713. } else if (subResult.result === constants_default.NA) {
  5714. copyToGroup(resultObject, subResult, constants_default.NA_GROUP);
  5715. } else {
  5716. constants_default.resultGroups.forEach(function(group) {
  5717. if (Array.isArray(subResult[group]) && subResult[group].length > 0) {
  5718. copyToGroup(resultObject, subResult, group);
  5719. }
  5720. });
  5721. }
  5722. });
  5723. return resultObject;
  5724. }
  5725. var aggregate_result_default = aggregateResult;
  5726. function areStylesSet(el, styles, stopAt) {
  5727. var styl = window.getComputedStyle(el, null);
  5728. if (!styl) {
  5729. return false;
  5730. }
  5731. for (var i = 0; i < styles.length; ++i) {
  5732. var att = styles[i];
  5733. if (styl.getPropertyValue(att.property) === att.value) {
  5734. return true;
  5735. }
  5736. }
  5737. if (!el.parentNode || el.nodeName.toUpperCase() === stopAt.toUpperCase()) {
  5738. return false;
  5739. }
  5740. return areStylesSet(el.parentNode, styles, stopAt);
  5741. }
  5742. var are_styles_set_default = areStylesSet;
  5743. function toArray(thing) {
  5744. return Array.prototype.slice.call(thing);
  5745. }
  5746. var to_array_default = toArray;
  5747. function escapeSelector(value) {
  5748. var string = String(value);
  5749. var length = string.length;
  5750. var index = -1;
  5751. var codeUnit;
  5752. var result = '';
  5753. var firstCodeUnit = string.charCodeAt(0);
  5754. while (++index < length) {
  5755. codeUnit = string.charCodeAt(index);
  5756. if (codeUnit == 0) {
  5757. result += '\ufffd';
  5758. continue;
  5759. }
  5760. if (codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || index == 0 && codeUnit >= 48 && codeUnit <= 57 || index == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45) {
  5761. result += '\\' + codeUnit.toString(16) + ' ';
  5762. continue;
  5763. }
  5764. if (index == 0 && length == 1 && codeUnit == 45) {
  5765. result += '\\' + string.charAt(index);
  5766. continue;
  5767. }
  5768. if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
  5769. result += string.charAt(index);
  5770. continue;
  5771. }
  5772. result += '\\' + string.charAt(index);
  5773. }
  5774. return result;
  5775. }
  5776. var escape_selector_default = escapeSelector;
  5777. function isMostlyNumbers() {
  5778. var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  5779. return str.length !== 0 && (str.match(/[0-9]/g) || '').length >= str.length / 2;
  5780. }
  5781. function splitString(str, splitIndex) {
  5782. return [ str.substring(0, splitIndex), str.substring(splitIndex) ];
  5783. }
  5784. function trimRight(str) {
  5785. return str.replace(/\s+$/, '');
  5786. }
  5787. function uriParser(url) {
  5788. var original = url;
  5789. var protocol = '', domain = '', port = '', path = '', query = '', hash = '';
  5790. if (url.includes('#')) {
  5791. var _splitString = splitString(url, url.indexOf('#'));
  5792. var _splitString2 = _slicedToArray(_splitString, 2);
  5793. url = _splitString2[0];
  5794. hash = _splitString2[1];
  5795. }
  5796. if (url.includes('?')) {
  5797. var _splitString3 = splitString(url, url.indexOf('?'));
  5798. var _splitString4 = _slicedToArray(_splitString3, 2);
  5799. url = _splitString4[0];
  5800. query = _splitString4[1];
  5801. }
  5802. if (url.includes('://')) {
  5803. var _url$split = url.split('://');
  5804. var _url$split2 = _slicedToArray(_url$split, 2);
  5805. protocol = _url$split2[0];
  5806. url = _url$split2[1];
  5807. var _splitString5 = splitString(url, url.indexOf('/'));
  5808. var _splitString6 = _slicedToArray(_splitString5, 2);
  5809. domain = _splitString6[0];
  5810. url = _splitString6[1];
  5811. } else if (url.substr(0, 2) === '//') {
  5812. url = url.substr(2);
  5813. var _splitString7 = splitString(url, url.indexOf('/'));
  5814. var _splitString8 = _slicedToArray(_splitString7, 2);
  5815. domain = _splitString8[0];
  5816. url = _splitString8[1];
  5817. }
  5818. if (domain.substr(0, 4) === 'www.') {
  5819. domain = domain.substr(4);
  5820. }
  5821. if (domain && domain.includes(':')) {
  5822. var _splitString9 = splitString(domain, domain.indexOf(':'));
  5823. var _splitString10 = _slicedToArray(_splitString9, 2);
  5824. domain = _splitString10[0];
  5825. port = _splitString10[1];
  5826. }
  5827. path = url;
  5828. return {
  5829. original: original,
  5830. protocol: protocol,
  5831. domain: domain,
  5832. port: port,
  5833. path: path,
  5834. query: query,
  5835. hash: hash
  5836. };
  5837. }
  5838. function getFriendlyUriEnd() {
  5839. var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  5840. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5841. if (uri.length <= 1 || uri.substr(0, 5) === 'data:' || uri.substr(0, 11) === 'javascript:' || uri.includes('?')) {
  5842. return;
  5843. }
  5844. var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === void 0 ? 25 : _options$maxLength;
  5845. var _uriParser = uriParser(uri), path = _uriParser.path, domain = _uriParser.domain, hash = _uriParser.hash;
  5846. var pathEnd = path.substr(path.substr(0, path.length - 2).lastIndexOf('/') + 1);
  5847. if (hash) {
  5848. if (pathEnd && (pathEnd + hash).length <= maxLength) {
  5849. return trimRight(pathEnd + hash);
  5850. } else if (pathEnd.length < 2 && hash.length > 2 && hash.length <= maxLength) {
  5851. return trimRight(hash);
  5852. } else {
  5853. return;
  5854. }
  5855. } else if (domain && domain.length < maxLength && path.length <= 1) {
  5856. return trimRight(domain + path);
  5857. }
  5858. if (path === '/' + pathEnd && domain && currentDomain && domain !== currentDomain && (domain + path).length <= maxLength) {
  5859. return trimRight(domain + path);
  5860. }
  5861. var lastDotIndex = pathEnd.lastIndexOf('.');
  5862. if ((lastDotIndex === -1 || lastDotIndex > 1) && (lastDotIndex !== -1 || pathEnd.length > 2) && pathEnd.length <= maxLength && !pathEnd.match(/index(\.[a-zA-Z]{2-4})?/) && !isMostlyNumbers(pathEnd)) {
  5863. return trimRight(pathEnd);
  5864. }
  5865. }
  5866. var get_friendly_uri_end_default = getFriendlyUriEnd;
  5867. function getNodeAttributes(node) {
  5868. if (node.attributes instanceof window.NamedNodeMap) {
  5869. return node.attributes;
  5870. }
  5871. return node.cloneNode(false).attributes;
  5872. }
  5873. var get_node_attributes_default = getNodeAttributes;
  5874. var matchesSelector = function() {
  5875. var method;
  5876. function getMethod(node) {
  5877. var index, candidate, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length;
  5878. for (index = 0; index < length; index++) {
  5879. candidate = candidates[index];
  5880. if (node[candidate]) {
  5881. return candidate;
  5882. }
  5883. }
  5884. }
  5885. return function(node, selector) {
  5886. if (!method || !node[method]) {
  5887. method = getMethod(node);
  5888. }
  5889. if (node[method]) {
  5890. return node[method](selector);
  5891. }
  5892. return false;
  5893. };
  5894. }();
  5895. var element_matches_default = matchesSelector;
  5896. function isXHTML(doc) {
  5897. if (!doc.createElement) {
  5898. return false;
  5899. }
  5900. return doc.createElement('A').localName === 'A';
  5901. }
  5902. var is_xhtml_default = isXHTML;
  5903. function getShadowSelector(generateSelector2, elm) {
  5904. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  5905. if (!elm) {
  5906. return '';
  5907. }
  5908. var doc = elm.getRootNode && elm.getRootNode() || document;
  5909. if (doc.nodeType !== 11) {
  5910. return generateSelector2(elm, options, doc);
  5911. }
  5912. var stack = [];
  5913. while (doc.nodeType === 11) {
  5914. if (!doc.host) {
  5915. return '';
  5916. }
  5917. stack.unshift({
  5918. elm: elm,
  5919. doc: doc
  5920. });
  5921. elm = doc.host;
  5922. doc = elm.getRootNode();
  5923. }
  5924. stack.unshift({
  5925. elm: elm,
  5926. doc: doc
  5927. });
  5928. return stack.map(function(_ref4) {
  5929. var elm2 = _ref4.elm, doc2 = _ref4.doc;
  5930. return generateSelector2(elm2, options, doc2);
  5931. });
  5932. }
  5933. var get_shadow_selector_default = getShadowSelector;
  5934. var xhtml;
  5935. var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
  5936. var MAXATTRIBUTELENGTH = 31;
  5937. var attrCharsRegex = /([\\"])/g;
  5938. var newlineChars = /(\r\n|\r|\n)/g;
  5939. function escapeAttribute(str) {
  5940. return str.replace(attrCharsRegex, '\\$1').replace(newlineChars, '\\a ');
  5941. }
  5942. function getAttributeNameValue(node, at) {
  5943. var name = at.name;
  5944. var atnv;
  5945. if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
  5946. var friendly = get_friendly_uri_end_default(node.getAttribute(name));
  5947. if (friendly) {
  5948. atnv = escape_selector_default(at.name) + '$="' + escapeAttribute(friendly) + '"';
  5949. } else {
  5950. atnv = escape_selector_default(at.name) + '="' + escapeAttribute(node.getAttribute(name)) + '"';
  5951. }
  5952. } else {
  5953. atnv = escape_selector_default(name) + '="' + escapeAttribute(at.value) + '"';
  5954. }
  5955. return atnv;
  5956. }
  5957. function countSort(a, b) {
  5958. return a.count < b.count ? -1 : a.count === b.count ? 0 : 1;
  5959. }
  5960. function filterAttributes(at) {
  5961. return !ignoredAttributes.includes(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH);
  5962. }
  5963. function _getSelectorData(domTree) {
  5964. var data2 = {
  5965. classes: {},
  5966. tags: {},
  5967. attributes: {}
  5968. };
  5969. domTree = Array.isArray(domTree) ? domTree : [ domTree ];
  5970. var currentLevel = domTree.slice();
  5971. var stack = [];
  5972. var _loop2 = function _loop2() {
  5973. var current = currentLevel.pop();
  5974. var node = current.actualNode;
  5975. if (!!node.querySelectorAll) {
  5976. var tag = node.nodeName;
  5977. if (data2.tags[tag]) {
  5978. data2.tags[tag]++;
  5979. } else {
  5980. data2.tags[tag] = 1;
  5981. }
  5982. if (node.classList) {
  5983. Array.from(node.classList).forEach(function(cl) {
  5984. var ind = escape_selector_default(cl);
  5985. if (data2.classes[ind]) {
  5986. data2.classes[ind]++;
  5987. } else {
  5988. data2.classes[ind] = 1;
  5989. }
  5990. });
  5991. }
  5992. if (node.hasAttributes()) {
  5993. Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) {
  5994. var atnv = getAttributeNameValue(node, at);
  5995. if (atnv) {
  5996. if (data2.attributes[atnv]) {
  5997. data2.attributes[atnv]++;
  5998. } else {
  5999. data2.attributes[atnv] = 1;
  6000. }
  6001. }
  6002. });
  6003. }
  6004. }
  6005. if (current.children.length) {
  6006. stack.push(currentLevel);
  6007. currentLevel = current.children.slice();
  6008. }
  6009. while (!currentLevel.length && stack.length) {
  6010. currentLevel = stack.pop();
  6011. }
  6012. };
  6013. while (currentLevel.length) {
  6014. _loop2();
  6015. }
  6016. return data2;
  6017. }
  6018. function uncommonClasses(node, selectorData) {
  6019. var retVal = [];
  6020. var classData = selectorData.classes;
  6021. var tagData = selectorData.tags;
  6022. if (node.classList) {
  6023. Array.from(node.classList).forEach(function(cl) {
  6024. var ind = escape_selector_default(cl);
  6025. if (classData[ind] < tagData[node.nodeName]) {
  6026. retVal.push({
  6027. name: ind,
  6028. count: classData[ind],
  6029. species: 'class'
  6030. });
  6031. }
  6032. });
  6033. }
  6034. return retVal.sort(countSort);
  6035. }
  6036. function getNthChildString(elm, selector) {
  6037. var siblings = elm.parentNode && Array.from(elm.parentNode.children || '') || [];
  6038. var hasMatchingSiblings = siblings.find(function(sibling) {
  6039. return sibling !== elm && element_matches_default(sibling, selector);
  6040. });
  6041. if (hasMatchingSiblings) {
  6042. var nthChild = 1 + siblings.indexOf(elm);
  6043. return ':nth-child(' + nthChild + ')';
  6044. } else {
  6045. return '';
  6046. }
  6047. }
  6048. function getElmId(elm) {
  6049. if (!elm.getAttribute('id')) {
  6050. return;
  6051. }
  6052. var doc = elm.getRootNode && elm.getRootNode() || document;
  6053. var id = '#' + escape_selector_default(elm.getAttribute('id') || '');
  6054. if (!id.match(/player_uid_/) && doc.querySelectorAll(id).length === 1) {
  6055. return id;
  6056. }
  6057. }
  6058. function getBaseSelector(elm) {
  6059. if (typeof xhtml === 'undefined') {
  6060. xhtml = is_xhtml_default(document);
  6061. }
  6062. return escape_selector_default(xhtml ? elm.localName : elm.nodeName.toLowerCase());
  6063. }
  6064. function uncommonAttributes(node, selectorData) {
  6065. var retVal = [];
  6066. var attData = selectorData.attributes;
  6067. var tagData = selectorData.tags;
  6068. if (node.hasAttributes()) {
  6069. Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) {
  6070. var atnv = getAttributeNameValue(node, at);
  6071. if (atnv && attData[atnv] < tagData[node.nodeName]) {
  6072. retVal.push({
  6073. name: atnv,
  6074. count: attData[atnv],
  6075. species: 'attribute'
  6076. });
  6077. }
  6078. });
  6079. }
  6080. return retVal.sort(countSort);
  6081. }
  6082. function getThreeLeastCommonFeatures(elm, selectorData) {
  6083. var selector = '';
  6084. var features;
  6085. var clss = uncommonClasses(elm, selectorData);
  6086. var atts = uncommonAttributes(elm, selectorData);
  6087. if (clss.length && clss[0].count === 1) {
  6088. features = [ clss[0] ];
  6089. } else if (atts.length && atts[0].count === 1) {
  6090. features = [ atts[0] ];
  6091. selector = getBaseSelector(elm);
  6092. } else {
  6093. features = clss.concat(atts);
  6094. features.sort(countSort);
  6095. features = features.slice(0, 3);
  6096. if (!features.some(function(feat) {
  6097. return feat.species === 'class';
  6098. })) {
  6099. selector = getBaseSelector(elm);
  6100. } else {
  6101. features.sort(function(a, b) {
  6102. return a.species !== b.species && a.species === 'class' ? -1 : a.species === b.species ? 0 : 1;
  6103. });
  6104. }
  6105. }
  6106. return selector += features.reduce(function(val, feat) {
  6107. switch (feat.species) {
  6108. case 'class':
  6109. return val + '.' + feat.name;
  6110. case 'attribute':
  6111. return val + '[' + feat.name + ']';
  6112. }
  6113. return val;
  6114. }, '');
  6115. }
  6116. function generateSelector(elm, options, doc) {
  6117. if (!axe._selectorData) {
  6118. throw new Error('Expect axe._selectorData to be set up');
  6119. }
  6120. var _options$toRoot = options.toRoot, toRoot = _options$toRoot === void 0 ? false : _options$toRoot;
  6121. var selector;
  6122. var similar;
  6123. do {
  6124. var features = getElmId(elm);
  6125. if (!features) {
  6126. features = getThreeLeastCommonFeatures(elm, axe._selectorData);
  6127. features += getNthChildString(elm, features);
  6128. }
  6129. if (selector) {
  6130. selector = features + ' > ' + selector;
  6131. } else {
  6132. selector = features;
  6133. }
  6134. if (!similar) {
  6135. similar = Array.from(doc.querySelectorAll(selector));
  6136. } else {
  6137. similar = similar.filter(function(item) {
  6138. return element_matches_default(item, selector);
  6139. });
  6140. }
  6141. elm = elm.parentElement;
  6142. } while ((similar.length > 1 || toRoot) && elm && elm.nodeType !== 11);
  6143. if (similar.length === 1) {
  6144. return selector;
  6145. } else if (selector.indexOf(' > ') !== -1) {
  6146. return ':root' + selector.substring(selector.indexOf(' > '));
  6147. }
  6148. return ':root';
  6149. }
  6150. function _getSelector(elm, options) {
  6151. return get_shadow_selector_default(generateSelector, elm, options);
  6152. }
  6153. function generateAncestry(node) {
  6154. var nodeName2 = node.nodeName.toLowerCase();
  6155. var parent = node.parentElement;
  6156. if (!parent) {
  6157. return nodeName2;
  6158. }
  6159. var nthChild = '';
  6160. if (nodeName2 !== 'head' && nodeName2 !== 'body' && parent.children.length > 1) {
  6161. var index = Array.prototype.indexOf.call(parent.children, node) + 1;
  6162. nthChild = ':nth-child('.concat(index, ')');
  6163. }
  6164. return generateAncestry(parent) + ' > ' + nodeName2 + nthChild;
  6165. }
  6166. function _getAncestry(elm, options) {
  6167. return get_shadow_selector_default(generateAncestry, elm, options);
  6168. }
  6169. function getXPathArray(node, path) {
  6170. var sibling, count;
  6171. if (!node) {
  6172. return [];
  6173. }
  6174. if (!path && node.nodeType === 9) {
  6175. path = [ {
  6176. str: 'html'
  6177. } ];
  6178. return path;
  6179. }
  6180. path = path || [];
  6181. if (node.parentNode && node.parentNode !== node) {
  6182. path = getXPathArray(node.parentNode, path);
  6183. }
  6184. if (node.previousSibling) {
  6185. count = 1;
  6186. sibling = node.previousSibling;
  6187. do {
  6188. if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {
  6189. count++;
  6190. }
  6191. sibling = sibling.previousSibling;
  6192. } while (sibling);
  6193. if (count === 1) {
  6194. count = null;
  6195. }
  6196. } else if (node.nextSibling) {
  6197. sibling = node.nextSibling;
  6198. do {
  6199. if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {
  6200. count = 1;
  6201. sibling = null;
  6202. } else {
  6203. count = null;
  6204. sibling = sibling.previousSibling;
  6205. }
  6206. } while (sibling);
  6207. }
  6208. if (node.nodeType === 1) {
  6209. var element = {};
  6210. element.str = node.nodeName.toLowerCase();
  6211. var id = node.getAttribute && escape_selector_default(node.getAttribute('id'));
  6212. if (id && node.ownerDocument.querySelectorAll('#' + id).length === 1) {
  6213. element.id = node.getAttribute('id');
  6214. }
  6215. if (count > 1) {
  6216. element.count = count;
  6217. }
  6218. path.push(element);
  6219. }
  6220. return path;
  6221. }
  6222. function xpathToString(xpathArray) {
  6223. return xpathArray.reduce(function(str, elm) {
  6224. if (elm.id) {
  6225. return '/'.concat(elm.str, '[@id=\'').concat(elm.id, '\']');
  6226. } else {
  6227. return str + '/'.concat(elm.str) + (elm.count > 0 ? '['.concat(elm.count, ']') : '');
  6228. }
  6229. }, '');
  6230. }
  6231. function getXpath(node) {
  6232. var xpathArray = getXPathArray(node);
  6233. return xpathToString(xpathArray);
  6234. }
  6235. var get_xpath_default = getXpath;
  6236. var _cache = {};
  6237. var cache = {
  6238. set: function set(key, value) {
  6239. _cache[key] = value;
  6240. },
  6241. get: function get(key) {
  6242. return _cache[key];
  6243. },
  6244. clear: function clear() {
  6245. _cache = {};
  6246. }
  6247. };
  6248. var cache_default = cache;
  6249. function getNodeFromTree(vNode, node) {
  6250. var el = node || vNode;
  6251. return cache_default.get('nodeMap') ? cache_default.get('nodeMap').get(el) : null;
  6252. }
  6253. var get_node_from_tree_default = getNodeFromTree;
  6254. function truncate(str, maxLength) {
  6255. maxLength = maxLength || 300;
  6256. if (str.length > maxLength) {
  6257. var index = str.indexOf('>');
  6258. str = str.substring(0, index + 1);
  6259. }
  6260. return str;
  6261. }
  6262. function getSource2(element) {
  6263. if (!(element !== null && element !== void 0 && element.outerHTML)) {
  6264. return '';
  6265. }
  6266. var source = element.outerHTML;
  6267. if (!source && typeof XMLSerializer === 'function') {
  6268. source = new XMLSerializer().serializeToString(element);
  6269. }
  6270. return truncate(source || '');
  6271. }
  6272. function DqElement(elm) {
  6273. var _this$spec$selector, _this$_virtualNode;
  6274. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  6275. var spec = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  6276. this.spec = spec;
  6277. if (elm instanceof abstract_virtual_node_default) {
  6278. this._virtualNode = elm;
  6279. this._element = elm.actualNode;
  6280. } else {
  6281. this._element = elm;
  6282. this._virtualNode = get_node_from_tree_default(elm);
  6283. }
  6284. this.fromFrame = ((_this$spec$selector = this.spec.selector) === null || _this$spec$selector === void 0 ? void 0 : _this$spec$selector.length) > 1;
  6285. if (options.absolutePaths) {
  6286. this._options = {
  6287. toRoot: true
  6288. };
  6289. }
  6290. this.nodeIndexes = [];
  6291. if (Array.isArray(this.spec.nodeIndexes)) {
  6292. this.nodeIndexes = this.spec.nodeIndexes;
  6293. } else if (typeof ((_this$_virtualNode = this._virtualNode) === null || _this$_virtualNode === void 0 ? void 0 : _this$_virtualNode.nodeIndex) === 'number') {
  6294. this.nodeIndexes = [ this._virtualNode.nodeIndex ];
  6295. }
  6296. this.source = null;
  6297. if (!axe._audit.noHtml) {
  6298. var _this$spec$source;
  6299. this.source = (_this$spec$source = this.spec.source) !== null && _this$spec$source !== void 0 ? _this$spec$source : getSource2(this._element);
  6300. }
  6301. }
  6302. DqElement.prototype = {
  6303. get selector() {
  6304. return this.spec.selector || [ _getSelector(this.element, this._options) ];
  6305. },
  6306. get ancestry() {
  6307. return this.spec.ancestry || [ _getAncestry(this.element) ];
  6308. },
  6309. get xpath() {
  6310. return this.spec.xpath || [ get_xpath_default(this.element) ];
  6311. },
  6312. get element() {
  6313. return this._element;
  6314. },
  6315. toJSON: function toJSON() {
  6316. return {
  6317. selector: this.selector,
  6318. source: this.source,
  6319. xpath: this.xpath,
  6320. ancestry: this.ancestry,
  6321. nodeIndexes: this.nodeIndexes
  6322. };
  6323. }
  6324. };
  6325. DqElement.fromFrame = function fromFrame(node, options, frame) {
  6326. var spec = DqElement.mergeSpecs(node, frame);
  6327. return new DqElement(frame.element, options, spec);
  6328. };
  6329. DqElement.mergeSpecs = function mergeSpec(node, frame) {
  6330. return _extends({}, node, {
  6331. selector: [].concat(_toConsumableArray(frame.selector), _toConsumableArray(node.selector)),
  6332. ancestry: [].concat(_toConsumableArray(frame.ancestry), _toConsumableArray(node.ancestry)),
  6333. xpath: [].concat(_toConsumableArray(frame.xpath), _toConsumableArray(node.xpath)),
  6334. nodeIndexes: [].concat(_toConsumableArray(frame.nodeIndexes), _toConsumableArray(node.nodeIndexes))
  6335. });
  6336. };
  6337. var dq_element_default = DqElement;
  6338. function checkHelper(checkResult, options, resolve, reject) {
  6339. return {
  6340. isAsync: false,
  6341. async: function async() {
  6342. this.isAsync = true;
  6343. return function(result) {
  6344. if (result instanceof Error === false) {
  6345. checkResult.result = result;
  6346. resolve(checkResult);
  6347. } else {
  6348. reject(result);
  6349. }
  6350. };
  6351. },
  6352. data: function data(data2) {
  6353. checkResult.data = data2;
  6354. },
  6355. relatedNodes: function relatedNodes(nodes) {
  6356. if (!window.Node) {
  6357. return;
  6358. }
  6359. nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes);
  6360. if (!nodes.every(function(node) {
  6361. return node instanceof window.Node || node.actualNode;
  6362. })) {
  6363. return;
  6364. }
  6365. checkResult.relatedNodes = nodes.map(function(element) {
  6366. return new dq_element_default(element, options);
  6367. });
  6368. }
  6369. };
  6370. }
  6371. var check_helper_default = checkHelper;
  6372. function clone(obj) {
  6373. var _window, _window2;
  6374. var index, length, out = obj;
  6375. if ((_window = window) !== null && _window !== void 0 && _window.Node && obj instanceof window.Node || (_window2 = window) !== null && _window2 !== void 0 && _window2.HTMLCollection && obj instanceof window.HTMLCollection) {
  6376. return obj;
  6377. }
  6378. if (obj !== null && _typeof(obj) === 'object') {
  6379. if (Array.isArray(obj)) {
  6380. out = [];
  6381. for (index = 0, length = obj.length; index < length; index++) {
  6382. out[index] = clone(obj[index]);
  6383. }
  6384. } else {
  6385. out = {};
  6386. for (index in obj) {
  6387. out[index] = clone(obj[index]);
  6388. }
  6389. }
  6390. }
  6391. return out;
  6392. }
  6393. var clone_default = clone;
  6394. var css_selector_parser = __toModule(require_lib());
  6395. var parser = new css_selector_parser.CssSelectorParser();
  6396. parser.registerSelectorPseudos('not');
  6397. parser.registerSelectorPseudos('is');
  6398. parser.registerNestingOperators('>');
  6399. parser.registerAttrEqualityMods('^', '$', '*', '~');
  6400. var css_parser_default = parser;
  6401. function matchesTag(vNode, exp) {
  6402. return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag);
  6403. }
  6404. function matchesClasses(vNode, exp) {
  6405. return !exp.classes || exp.classes.every(function(cl) {
  6406. return vNode.hasClass(cl.value);
  6407. });
  6408. }
  6409. function matchesAttributes(vNode, exp) {
  6410. return !exp.attributes || exp.attributes.every(function(att) {
  6411. var nodeAtt = vNode.attr(att.key);
  6412. return nodeAtt !== null && (!att.value || att.test(nodeAtt));
  6413. });
  6414. }
  6415. function matchesId(vNode, exp) {
  6416. return !exp.id || vNode.props.id === exp.id;
  6417. }
  6418. function matchesPseudos(target, exp) {
  6419. if (!exp.pseudos || exp.pseudos.every(function(pseudo) {
  6420. if (pseudo.name === 'not') {
  6421. return !pseudo.expressions.some(function(expression) {
  6422. return _matchesExpression(target, expression);
  6423. });
  6424. } else if (pseudo.name === 'is') {
  6425. return pseudo.expressions.some(function(expression) {
  6426. return _matchesExpression(target, expression);
  6427. });
  6428. }
  6429. throw new Error('the pseudo selector ' + pseudo.name + ' has not yet been implemented');
  6430. })) {
  6431. return true;
  6432. }
  6433. return false;
  6434. }
  6435. function matchExpression(vNode, expression) {
  6436. return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression);
  6437. }
  6438. var escapeRegExp = function() {
  6439. var from = /(?=[\-\[\]{}()*+?.\\\^$|,#\s])/g;
  6440. var to = '\\';
  6441. return function(string) {
  6442. return string.replace(from, to);
  6443. };
  6444. }();
  6445. var reUnescape = /\\/g;
  6446. function convertAttributes(atts) {
  6447. if (!atts) {
  6448. return;
  6449. }
  6450. return atts.map(function(att) {
  6451. var attributeKey = att.name.replace(reUnescape, '');
  6452. var attributeValue = (att.value || '').replace(reUnescape, '');
  6453. var test, regexp;
  6454. switch (att.operator) {
  6455. case '^=':
  6456. regexp = new RegExp('^' + escapeRegExp(attributeValue));
  6457. break;
  6458. case '$=':
  6459. regexp = new RegExp(escapeRegExp(attributeValue) + '$');
  6460. break;
  6461. case '~=':
  6462. regexp = new RegExp('(^|\\s)' + escapeRegExp(attributeValue) + '(\\s|$)');
  6463. break;
  6464. case '|=':
  6465. regexp = new RegExp('^' + escapeRegExp(attributeValue) + '(-|$)');
  6466. break;
  6467. case '=':
  6468. test = function test(value) {
  6469. return attributeValue === value;
  6470. };
  6471. break;
  6472. case '*=':
  6473. test = function test(value) {
  6474. return value && value.includes(attributeValue);
  6475. };
  6476. break;
  6477. case '!=':
  6478. test = function test(value) {
  6479. return attributeValue !== value;
  6480. };
  6481. break;
  6482. default:
  6483. test = function test(value) {
  6484. return !!value;
  6485. };
  6486. }
  6487. if (attributeValue === '' && /^[*$^]=$/.test(att.operator)) {
  6488. test = function test() {
  6489. return false;
  6490. };
  6491. }
  6492. if (!test) {
  6493. test = function test(value) {
  6494. return value && regexp.test(value);
  6495. };
  6496. }
  6497. return {
  6498. key: attributeKey,
  6499. value: attributeValue,
  6500. test: test
  6501. };
  6502. });
  6503. }
  6504. function convertClasses(classes) {
  6505. if (!classes) {
  6506. return;
  6507. }
  6508. return classes.map(function(className) {
  6509. className = className.replace(reUnescape, '');
  6510. return {
  6511. value: className,
  6512. regexp: new RegExp('(^|\\s)' + escapeRegExp(className) + '(\\s|$)')
  6513. };
  6514. });
  6515. }
  6516. function convertPseudos(pseudos) {
  6517. if (!pseudos) {
  6518. return;
  6519. }
  6520. return pseudos.map(function(p) {
  6521. var expressions;
  6522. if ([ 'is', 'not' ].includes(p.name)) {
  6523. expressions = p.value;
  6524. expressions = expressions.selectors ? expressions.selectors : [ expressions ];
  6525. expressions = convertExpressions(expressions);
  6526. }
  6527. return {
  6528. name: p.name,
  6529. expressions: expressions,
  6530. value: p.value
  6531. };
  6532. });
  6533. }
  6534. function convertExpressions(expressions) {
  6535. return expressions.map(function(exp) {
  6536. var newExp = [];
  6537. var rule3 = exp.rule;
  6538. while (rule3) {
  6539. newExp.push({
  6540. tag: rule3.tagName ? rule3.tagName.toLowerCase() : '*',
  6541. combinator: rule3.nestingOperator ? rule3.nestingOperator : ' ',
  6542. id: rule3.id,
  6543. attributes: convertAttributes(rule3.attrs),
  6544. classes: convertClasses(rule3.classNames),
  6545. pseudos: convertPseudos(rule3.pseudos)
  6546. });
  6547. rule3 = rule3.rule;
  6548. }
  6549. return newExp;
  6550. });
  6551. }
  6552. function _convertSelector(selector) {
  6553. var expressions = css_parser_default.parse(selector);
  6554. expressions = expressions.selectors ? expressions.selectors : [ expressions ];
  6555. return convertExpressions(expressions);
  6556. }
  6557. function optimizedMatchesExpression(vNode, expressions, index, matchAnyParent) {
  6558. var isArray = Array.isArray(expressions);
  6559. var expression = isArray ? expressions[index] : expressions;
  6560. var matches14 = matchExpression(vNode, expression);
  6561. while (!matches14 && matchAnyParent && vNode.parent) {
  6562. vNode = vNode.parent;
  6563. matches14 = matchExpression(vNode, expression);
  6564. }
  6565. if (index > 0) {
  6566. if ([ ' ', '>' ].includes(expression.combinator) === false) {
  6567. throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator);
  6568. }
  6569. matches14 = matches14 && optimizedMatchesExpression(vNode.parent, expressions, index - 1, expression.combinator === ' ');
  6570. }
  6571. return matches14;
  6572. }
  6573. function _matchesExpression(vNode, expressions, matchAnyParent) {
  6574. return optimizedMatchesExpression(vNode, expressions, expressions.length - 1, matchAnyParent);
  6575. }
  6576. function matches(vNode, selector) {
  6577. var expressions = _convertSelector(selector);
  6578. return expressions.some(function(expression) {
  6579. return _matchesExpression(vNode, expression);
  6580. });
  6581. }
  6582. var matches_default = matches;
  6583. function closest(vNode, selector) {
  6584. while (vNode) {
  6585. if (matches_default(vNode, selector)) {
  6586. return vNode;
  6587. }
  6588. if (typeof vNode.parent === 'undefined') {
  6589. throw new TypeError('Cannot resolve parent for non-DOM nodes');
  6590. }
  6591. vNode = vNode.parent;
  6592. }
  6593. return null;
  6594. }
  6595. var closest_default = closest;
  6596. function noop() {}
  6597. function funcGuard(f) {
  6598. if (typeof f !== 'function') {
  6599. throw new TypeError('Queue methods require functions as arguments');
  6600. }
  6601. }
  6602. function queue() {
  6603. var tasks = [];
  6604. var started = 0;
  6605. var remaining = 0;
  6606. var completeQueue = noop;
  6607. var complete = false;
  6608. var err2;
  6609. var defaultFail = function defaultFail(e) {
  6610. err2 = e;
  6611. setTimeout(function() {
  6612. if (err2 !== void 0 && err2 !== null) {
  6613. log_default('Uncaught error (of queue)', err2);
  6614. }
  6615. }, 1);
  6616. };
  6617. var failed = defaultFail;
  6618. function createResolve(i) {
  6619. return function(r) {
  6620. tasks[i] = r;
  6621. remaining -= 1;
  6622. if (!remaining && completeQueue !== noop) {
  6623. complete = true;
  6624. completeQueue(tasks);
  6625. }
  6626. };
  6627. }
  6628. function abort(msg) {
  6629. completeQueue = noop;
  6630. failed(msg);
  6631. return tasks;
  6632. }
  6633. function pop() {
  6634. var length = tasks.length;
  6635. for (;started < length; started++) {
  6636. var task = tasks[started];
  6637. try {
  6638. task.call(null, createResolve(started), abort);
  6639. } catch (e) {
  6640. abort(e);
  6641. }
  6642. }
  6643. }
  6644. var q = {
  6645. defer: function defer(fn) {
  6646. if (_typeof(fn) === 'object' && fn.then && fn['catch']) {
  6647. var defer = fn;
  6648. fn = function fn(resolve, reject) {
  6649. defer.then(resolve)['catch'](reject);
  6650. };
  6651. }
  6652. funcGuard(fn);
  6653. if (err2 !== void 0) {
  6654. return;
  6655. } else if (complete) {
  6656. throw new Error('Queue already completed');
  6657. }
  6658. tasks.push(fn);
  6659. ++remaining;
  6660. pop();
  6661. return q;
  6662. },
  6663. then: function then(fn) {
  6664. funcGuard(fn);
  6665. if (completeQueue !== noop) {
  6666. throw new Error('queue `then` already set');
  6667. }
  6668. if (!err2) {
  6669. completeQueue = fn;
  6670. if (!remaining) {
  6671. complete = true;
  6672. completeQueue(tasks);
  6673. }
  6674. }
  6675. return q;
  6676. },
  6677. catch: function _catch(fn) {
  6678. funcGuard(fn);
  6679. if (failed !== defaultFail) {
  6680. throw new Error('queue `catch` already set');
  6681. }
  6682. if (!err2) {
  6683. failed = fn;
  6684. } else {
  6685. fn(err2);
  6686. err2 = null;
  6687. }
  6688. return q;
  6689. },
  6690. abort: abort
  6691. };
  6692. return q;
  6693. }
  6694. var queue_default = queue;
  6695. var closeHandler;
  6696. var postMessage2;
  6697. var topicHandlers = {};
  6698. function _respondable(win, topic, message, keepalive, replyHandler) {
  6699. var data2 = {
  6700. topic: topic,
  6701. message: message,
  6702. channelId: ''.concat(v4(), ':').concat(v4()),
  6703. keepalive: keepalive
  6704. };
  6705. return postMessage2(win, data2, replyHandler);
  6706. }
  6707. function messageListener(data2, responder) {
  6708. var topic = data2.topic, message = data2.message, keepalive = data2.keepalive;
  6709. var topicHandler = topicHandlers[topic];
  6710. if (!topicHandler) {
  6711. return;
  6712. }
  6713. try {
  6714. topicHandler(message, keepalive, responder);
  6715. } catch (error) {
  6716. axe.log(error);
  6717. responder(error, keepalive);
  6718. }
  6719. }
  6720. _respondable.updateMessenger = function updateMessenger(_ref5) {
  6721. var open = _ref5.open, post = _ref5.post;
  6722. assert_default(typeof open === 'function', 'open callback must be a function');
  6723. assert_default(typeof post === 'function', 'post callback must be a function');
  6724. if (closeHandler) {
  6725. closeHandler();
  6726. }
  6727. var close = open(messageListener);
  6728. if (close) {
  6729. assert_default(typeof close === 'function', 'open callback must return a cleanup function');
  6730. closeHandler = close;
  6731. } else {
  6732. closeHandler = null;
  6733. }
  6734. postMessage2 = post;
  6735. };
  6736. _respondable.subscribe = function subscribe(topic, topicHandler) {
  6737. assert_default(typeof topicHandler === 'function', 'Subscriber callback must be a function');
  6738. assert_default(!topicHandlers[topic], 'Topic '.concat(topic, ' is already registered to.'));
  6739. topicHandlers[topic] = topicHandler;
  6740. };
  6741. _respondable.isInFrame = function isInFrame() {
  6742. var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
  6743. return !!win.frameElement;
  6744. };
  6745. setDefaultFrameMessenger(_respondable);
  6746. function _sendCommandToFrame(node, parameters, resolve, reject) {
  6747. var _parameters$options$p, _parameters$options;
  6748. var win = node.contentWindow;
  6749. var pingWaitTime = (_parameters$options$p = (_parameters$options = parameters.options) === null || _parameters$options === void 0 ? void 0 : _parameters$options.pingWaitTime) !== null && _parameters$options$p !== void 0 ? _parameters$options$p : 500;
  6750. if (!win) {
  6751. log_default('Frame does not have a content window', node);
  6752. resolve(null);
  6753. return;
  6754. }
  6755. if (pingWaitTime === 0) {
  6756. callAxeStart(node, parameters, resolve, reject);
  6757. return;
  6758. }
  6759. var timeout = setTimeout(function() {
  6760. timeout = setTimeout(function() {
  6761. if (!parameters.debug) {
  6762. resolve(null);
  6763. } else {
  6764. reject(err('No response from frame', node));
  6765. }
  6766. }, 0);
  6767. }, pingWaitTime);
  6768. _respondable(win, 'axe.ping', null, void 0, function() {
  6769. clearTimeout(timeout);
  6770. callAxeStart(node, parameters, resolve, reject);
  6771. });
  6772. }
  6773. function callAxeStart(node, parameters, resolve, reject) {
  6774. var _parameters$options$f, _parameters$options2;
  6775. var frameWaitTime = (_parameters$options$f = (_parameters$options2 = parameters.options) === null || _parameters$options2 === void 0 ? void 0 : _parameters$options2.frameWaitTime) !== null && _parameters$options$f !== void 0 ? _parameters$options$f : 6e4;
  6776. var win = node.contentWindow;
  6777. var timeout = setTimeout(function collectResultFramesTimeout() {
  6778. reject(err('Axe in frame timed out', node));
  6779. }, frameWaitTime);
  6780. _respondable(win, 'axe.start', parameters, void 0, function(data2) {
  6781. clearTimeout(timeout);
  6782. if (data2 instanceof Error === false) {
  6783. resolve(data2);
  6784. } else {
  6785. reject(data2);
  6786. }
  6787. });
  6788. }
  6789. function err(message, node) {
  6790. var selector;
  6791. if (axe._tree) {
  6792. selector = _getSelector(node);
  6793. }
  6794. return new Error(message + ': ' + (selector || node));
  6795. }
  6796. function getAllChecks(object) {
  6797. var result = [];
  6798. return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);
  6799. }
  6800. var get_all_checks_default = getAllChecks;
  6801. function findBy(array, key, value) {
  6802. if (Array.isArray(array)) {
  6803. return array.find(function(obj) {
  6804. return _typeof(obj) === 'object' && obj[key] === value;
  6805. });
  6806. }
  6807. }
  6808. var find_by_default = findBy;
  6809. function pushFrame(resultSet, options, frameSpec) {
  6810. resultSet.forEach(function(res) {
  6811. res.node = dq_element_default.fromFrame(res.node, options, frameSpec);
  6812. var checks = get_all_checks_default(res);
  6813. checks.forEach(function(check4) {
  6814. check4.relatedNodes = check4.relatedNodes.map(function(node) {
  6815. return dq_element_default.fromFrame(node, options, frameSpec);
  6816. });
  6817. });
  6818. });
  6819. }
  6820. function spliceNodes(target, to) {
  6821. var firstFromFrame = to[0].node;
  6822. for (var _i2 = 0; _i2 < target.length; _i2++) {
  6823. var node = target[_i2].node;
  6824. var resultSort = nodeIndexSort(node.nodeIndexes, firstFromFrame.nodeIndexes);
  6825. if (resultSort > 0 || resultSort === 0 && firstFromFrame.selector.length < node.selector.length) {
  6826. target.splice.apply(target, [ _i2, 0 ].concat(_toConsumableArray(to)));
  6827. return;
  6828. }
  6829. }
  6830. target.push.apply(target, _toConsumableArray(to));
  6831. }
  6832. function normalizeResult(result) {
  6833. if (!result || !result.results) {
  6834. return null;
  6835. }
  6836. if (!Array.isArray(result.results)) {
  6837. return [ result.results ];
  6838. }
  6839. if (!result.results.length) {
  6840. return null;
  6841. }
  6842. return result.results;
  6843. }
  6844. function mergeResults(frameResults, options) {
  6845. var mergedResult = [];
  6846. frameResults.forEach(function(frameResult) {
  6847. var results = normalizeResult(frameResult);
  6848. if (!results || !results.length) {
  6849. return;
  6850. }
  6851. var frameSpec = getFrameSpec(frameResult, options);
  6852. results.forEach(function(ruleResult) {
  6853. if (ruleResult.nodes && frameSpec) {
  6854. pushFrame(ruleResult.nodes, options, frameSpec);
  6855. }
  6856. var res = find_by_default(mergedResult, 'id', ruleResult.id);
  6857. if (!res) {
  6858. mergedResult.push(ruleResult);
  6859. } else {
  6860. if (ruleResult.nodes.length) {
  6861. spliceNodes(res.nodes, ruleResult.nodes);
  6862. }
  6863. }
  6864. });
  6865. });
  6866. mergedResult.forEach(function(result) {
  6867. if (result.nodes) {
  6868. result.nodes.sort(function(nodeA, nodeB) {
  6869. return nodeIndexSort(nodeA.node.nodeIndexes, nodeB.node.nodeIndexes);
  6870. });
  6871. }
  6872. });
  6873. return mergedResult;
  6874. }
  6875. function nodeIndexSort() {
  6876. var nodeIndexesA = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  6877. var nodeIndexesB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  6878. var length = Math.max(nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA.length, nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB.length);
  6879. for (var _i3 = 0; _i3 < length; _i3++) {
  6880. var indexA = nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA[_i3];
  6881. var indexB = nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB[_i3];
  6882. if (typeof indexA !== 'number' || isNaN(indexA)) {
  6883. return _i3 === 0 ? 1 : -1;
  6884. }
  6885. if (typeof indexB !== 'number' || isNaN(indexB)) {
  6886. return _i3 === 0 ? -1 : 1;
  6887. }
  6888. if (indexA !== indexB) {
  6889. return indexA - indexB;
  6890. }
  6891. }
  6892. return 0;
  6893. }
  6894. var merge_results_default = mergeResults;
  6895. function getFrameSpec(frameResult, options) {
  6896. if (frameResult.frameElement) {
  6897. return new dq_element_default(frameResult.frameElement, options);
  6898. } else if (frameResult.frameSpec) {
  6899. return frameResult.frameSpec;
  6900. }
  6901. return null;
  6902. }
  6903. function _collectResultsFromFrames(parentContent, options, command, parameter, resolve, reject) {
  6904. var q = queue_default();
  6905. var frames = parentContent.frames;
  6906. frames.forEach(function(_ref6) {
  6907. var frameElement = _ref6.node, context5 = _objectWithoutProperties(_ref6, _excluded);
  6908. q.defer(function(res, rej) {
  6909. var params = {
  6910. options: options,
  6911. command: command,
  6912. parameter: parameter,
  6913. context: context5
  6914. };
  6915. function callback(results) {
  6916. if (!results) {
  6917. return res(null);
  6918. }
  6919. return res({
  6920. results: results,
  6921. frameElement: frameElement
  6922. });
  6923. }
  6924. _sendCommandToFrame(frameElement, params, callback, rej);
  6925. });
  6926. });
  6927. q.then(function(data2) {
  6928. resolve(merge_results_default(data2, options));
  6929. })['catch'](reject);
  6930. }
  6931. function _contains(vNode, otherVNode) {
  6932. if (vNode.shadowId || otherVNode.shadowId) {
  6933. do {
  6934. if (vNode.shadowId === otherVNode.shadowId) {
  6935. return true;
  6936. }
  6937. otherVNode = otherVNode.parent;
  6938. } while (otherVNode);
  6939. return false;
  6940. }
  6941. if (!vNode.actualNode) {
  6942. do {
  6943. if (otherVNode === vNode) {
  6944. return true;
  6945. }
  6946. otherVNode = otherVNode.parent;
  6947. } while (otherVNode);
  6948. }
  6949. if (typeof vNode.actualNode.contains !== 'function') {
  6950. var position = vNode.actualNode.compareDocumentPosition(otherVNode.actualNode);
  6951. return !!(position & 16);
  6952. }
  6953. return vNode.actualNode.contains(otherVNode.actualNode);
  6954. }
  6955. function deepMerge() {
  6956. var target = {};
  6957. for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
  6958. sources[_key] = arguments[_key];
  6959. }
  6960. sources.forEach(function(source) {
  6961. if (!source || _typeof(source) !== 'object' || Array.isArray(source)) {
  6962. return;
  6963. }
  6964. for (var _i4 = 0, _Object$keys = Object.keys(source); _i4 < _Object$keys.length; _i4++) {
  6965. var key = _Object$keys[_i4];
  6966. if (!target.hasOwnProperty(key) || _typeof(source[key]) !== 'object' || Array.isArray(target[key])) {
  6967. target[key] = source[key];
  6968. } else {
  6969. target[key] = deepMerge(target[key], source[key]);
  6970. }
  6971. }
  6972. });
  6973. return target;
  6974. }
  6975. var deep_merge_default = deepMerge;
  6976. function extendMetaData(to, from) {
  6977. Object.assign(to, from);
  6978. Object.keys(from).filter(function(prop) {
  6979. return typeof from[prop] === 'function';
  6980. }).forEach(function(prop) {
  6981. to[prop] = null;
  6982. try {
  6983. to[prop] = from[prop](to);
  6984. } catch (e) {}
  6985. });
  6986. }
  6987. var extend_meta_data_default = extendMetaData;
  6988. var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ];
  6989. function isShadowRoot(node) {
  6990. if (node.shadowRoot) {
  6991. var nodeName2 = node.nodeName.toLowerCase();
  6992. if (possibleShadowRoots.includes(nodeName2) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName2)) {
  6993. return true;
  6994. }
  6995. }
  6996. return false;
  6997. }
  6998. var is_shadow_root_default = isShadowRoot;
  6999. var dom_exports = {};
  7000. __export(dom_exports, {
  7001. findElmsInContext: function findElmsInContext() {
  7002. return find_elms_in_context_default;
  7003. },
  7004. findUp: function findUp() {
  7005. return find_up_default;
  7006. },
  7007. findUpVirtual: function findUpVirtual() {
  7008. return find_up_virtual_default;
  7009. },
  7010. getComposedParent: function getComposedParent() {
  7011. return get_composed_parent_default;
  7012. },
  7013. getElementByReference: function getElementByReference() {
  7014. return get_element_by_reference_default;
  7015. },
  7016. getElementCoordinates: function getElementCoordinates() {
  7017. return get_element_coordinates_default;
  7018. },
  7019. getElementStack: function getElementStack() {
  7020. return get_element_stack_default;
  7021. },
  7022. getRootNode: function getRootNode() {
  7023. return get_root_node_default2;
  7024. },
  7025. getScrollOffset: function getScrollOffset() {
  7026. return get_scroll_offset_default;
  7027. },
  7028. getTabbableElements: function getTabbableElements() {
  7029. return get_tabbable_elements_default;
  7030. },
  7031. getTextElementStack: function getTextElementStack() {
  7032. return get_text_element_stack_default;
  7033. },
  7034. getViewportSize: function getViewportSize() {
  7035. return get_viewport_size_default;
  7036. },
  7037. hasContent: function hasContent() {
  7038. return has_content_default;
  7039. },
  7040. hasContentVirtual: function hasContentVirtual() {
  7041. return has_content_virtual_default;
  7042. },
  7043. idrefs: function idrefs() {
  7044. return idrefs_default;
  7045. },
  7046. insertedIntoFocusOrder: function insertedIntoFocusOrder() {
  7047. return inserted_into_focus_order_default;
  7048. },
  7049. isCurrentPageLink: function isCurrentPageLink() {
  7050. return _isCurrentPageLink;
  7051. },
  7052. isFocusable: function isFocusable() {
  7053. return is_focusable_default;
  7054. },
  7055. isHTML5: function isHTML5() {
  7056. return is_html5_default;
  7057. },
  7058. isHiddenWithCSS: function isHiddenWithCSS() {
  7059. return is_hidden_with_css_default;
  7060. },
  7061. isInTextBlock: function isInTextBlock() {
  7062. return is_in_text_block_default;
  7063. },
  7064. isModalOpen: function isModalOpen() {
  7065. return is_modal_open_default;
  7066. },
  7067. isNativelyFocusable: function isNativelyFocusable() {
  7068. return is_natively_focusable_default;
  7069. },
  7070. isNode: function isNode() {
  7071. return is_node_default;
  7072. },
  7073. isOffscreen: function isOffscreen() {
  7074. return is_offscreen_default;
  7075. },
  7076. isOpaque: function isOpaque() {
  7077. return is_opaque_default;
  7078. },
  7079. isSkipLink: function isSkipLink() {
  7080. return _isSkipLink;
  7081. },
  7082. isVisible: function isVisible() {
  7083. return is_visible_default;
  7084. },
  7085. isVisualContent: function isVisualContent() {
  7086. return is_visual_content_default;
  7087. },
  7088. reduceToElementsBelowFloating: function reduceToElementsBelowFloating() {
  7089. return reduce_to_elements_below_floating_default;
  7090. },
  7091. shadowElementsFromPoint: function shadowElementsFromPoint() {
  7092. return shadow_elements_from_point_default;
  7093. },
  7094. urlPropsFromAttribute: function urlPropsFromAttribute() {
  7095. return url_props_from_attribute_default;
  7096. },
  7097. visuallyContains: function visuallyContains() {
  7098. return _visuallyContains;
  7099. },
  7100. visuallyOverlaps: function visuallyOverlaps() {
  7101. return visually_overlaps_default;
  7102. }
  7103. });
  7104. function getRootNode(node) {
  7105. var doc = node.getRootNode && node.getRootNode() || document;
  7106. if (doc === node) {
  7107. doc = document;
  7108. }
  7109. return doc;
  7110. }
  7111. var get_root_node_default = getRootNode;
  7112. var get_root_node_default2 = get_root_node_default;
  7113. function findElmsInContext(_ref7) {
  7114. var context5 = _ref7.context, value = _ref7.value, attr = _ref7.attr, _ref7$elm = _ref7.elm, elm = _ref7$elm === void 0 ? '' : _ref7$elm;
  7115. var root;
  7116. var escapedValue = escape_selector_default(value);
  7117. if (context5.nodeType === 9 || context5.nodeType === 11) {
  7118. root = context5;
  7119. } else {
  7120. root = get_root_node_default2(context5);
  7121. }
  7122. return Array.from(root.querySelectorAll(elm + '[' + attr + '=' + escapedValue + ']'));
  7123. }
  7124. var find_elms_in_context_default = findElmsInContext;
  7125. function findUpVirtual(element, target) {
  7126. var parent;
  7127. parent = element.actualNode;
  7128. if (!element.shadowId && typeof element.actualNode.closest === 'function') {
  7129. var match = element.actualNode.closest(target);
  7130. if (match) {
  7131. return match;
  7132. }
  7133. return null;
  7134. }
  7135. do {
  7136. parent = parent.assignedSlot ? parent.assignedSlot : parent.parentNode;
  7137. if (parent && parent.nodeType === 11) {
  7138. parent = parent.host;
  7139. }
  7140. } while (parent && !element_matches_default(parent, target) && parent !== document.documentElement);
  7141. if (!parent) {
  7142. return null;
  7143. }
  7144. if (!element_matches_default(parent, target)) {
  7145. return null;
  7146. }
  7147. return parent;
  7148. }
  7149. var find_up_virtual_default = findUpVirtual;
  7150. function findUp(element, target) {
  7151. return find_up_virtual_default(get_node_from_tree_default(element), target);
  7152. }
  7153. var find_up_default = findUp;
  7154. function getComposedParent(element) {
  7155. if (element.assignedSlot) {
  7156. return getComposedParent(element.assignedSlot);
  7157. } else if (element.parentNode) {
  7158. var parentNode = element.parentNode;
  7159. if (parentNode.nodeType === 1) {
  7160. return parentNode;
  7161. } else if (parentNode.host) {
  7162. return parentNode.host;
  7163. }
  7164. }
  7165. return null;
  7166. }
  7167. var get_composed_parent_default = getComposedParent;
  7168. var angularSkipLinkRegex = /^\/\#/;
  7169. var angularRouterLinkRegex = /^#[!/]/;
  7170. function _isCurrentPageLink(anchor) {
  7171. var _window$location;
  7172. var href = anchor.getAttribute('href');
  7173. if (!href || href === '#') {
  7174. return false;
  7175. }
  7176. if (angularSkipLinkRegex.test(href)) {
  7177. return true;
  7178. }
  7179. var hash = anchor.hash, protocol = anchor.protocol, hostname = anchor.hostname, port = anchor.port, pathname = anchor.pathname;
  7180. if (angularRouterLinkRegex.test(hash)) {
  7181. return false;
  7182. }
  7183. if (href.charAt(0) === '#') {
  7184. return true;
  7185. }
  7186. if (typeof ((_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location.origin) !== 'string' || window.location.origin.indexOf('://') === -1) {
  7187. return null;
  7188. }
  7189. var currentPageUrl = window.location.origin + window.location.pathname;
  7190. var url;
  7191. if (!hostname) {
  7192. url = window.location.origin;
  7193. } else {
  7194. url = ''.concat(protocol, '//').concat(hostname).concat(port ? ':'.concat(port) : '');
  7195. }
  7196. if (!pathname) {
  7197. url += window.location.pathname;
  7198. } else {
  7199. url += (pathname[0] !== '/' ? '/' : '') + pathname;
  7200. }
  7201. return url === currentPageUrl;
  7202. }
  7203. function getElementByReference(node, attr) {
  7204. var fragment = node.getAttribute(attr);
  7205. if (!fragment) {
  7206. return null;
  7207. }
  7208. if (attr === 'href' && !_isCurrentPageLink(node)) {
  7209. return null;
  7210. }
  7211. if (fragment.indexOf('#') !== -1) {
  7212. fragment = decodeURIComponent(fragment.substr(fragment.indexOf('#') + 1));
  7213. }
  7214. var candidate = document.getElementById(fragment);
  7215. if (candidate) {
  7216. return candidate;
  7217. }
  7218. candidate = document.getElementsByName(fragment);
  7219. if (candidate.length) {
  7220. return candidate[0];
  7221. }
  7222. return null;
  7223. }
  7224. var get_element_by_reference_default = getElementByReference;
  7225. function getScrollOffset(element) {
  7226. if (!element.nodeType && element.document) {
  7227. element = element.document;
  7228. }
  7229. if (element.nodeType === 9) {
  7230. var docElement = element.documentElement, body = element.body;
  7231. return {
  7232. left: docElement && docElement.scrollLeft || body && body.scrollLeft || 0,
  7233. top: docElement && docElement.scrollTop || body && body.scrollTop || 0
  7234. };
  7235. }
  7236. return {
  7237. left: element.scrollLeft,
  7238. top: element.scrollTop
  7239. };
  7240. }
  7241. var get_scroll_offset_default = getScrollOffset;
  7242. function getElementCoordinates(element) {
  7243. var scrollOffset = get_scroll_offset_default(document), xOffset = scrollOffset.left, yOffset = scrollOffset.top, coords = element.getBoundingClientRect();
  7244. return {
  7245. top: coords.top + yOffset,
  7246. right: coords.right + xOffset,
  7247. bottom: coords.bottom + yOffset,
  7248. left: coords.left + xOffset,
  7249. width: coords.right - coords.left,
  7250. height: coords.bottom - coords.top
  7251. };
  7252. }
  7253. var get_element_coordinates_default = getElementCoordinates;
  7254. function getViewportSize(win) {
  7255. var doc = win.document;
  7256. var docElement = doc.documentElement;
  7257. if (win.innerWidth) {
  7258. return {
  7259. width: win.innerWidth,
  7260. height: win.innerHeight
  7261. };
  7262. }
  7263. if (docElement) {
  7264. return {
  7265. width: docElement.clientWidth,
  7266. height: docElement.clientHeight
  7267. };
  7268. }
  7269. var body = doc.body;
  7270. return {
  7271. width: body.clientWidth,
  7272. height: body.clientHeight
  7273. };
  7274. }
  7275. var get_viewport_size_default = getViewportSize;
  7276. function noParentScrolled(element, offset) {
  7277. element = get_composed_parent_default(element);
  7278. while (element && element.nodeName.toLowerCase() !== 'html') {
  7279. if (element.scrollTop) {
  7280. offset += element.scrollTop;
  7281. if (offset >= 0) {
  7282. return false;
  7283. }
  7284. }
  7285. element = get_composed_parent_default(element);
  7286. }
  7287. return true;
  7288. }
  7289. function isOffscreen(element) {
  7290. var leftBoundary;
  7291. var docElement = document.documentElement;
  7292. var styl = window.getComputedStyle(element);
  7293. var dir = window.getComputedStyle(document.body || docElement).getPropertyValue('direction');
  7294. var coords = get_element_coordinates_default(element);
  7295. if (coords.bottom < 0 && (noParentScrolled(element, coords.bottom) || styl.position === 'absolute')) {
  7296. return true;
  7297. }
  7298. if (coords.left === 0 && coords.right === 0) {
  7299. return false;
  7300. }
  7301. if (dir === 'ltr') {
  7302. if (coords.right <= 0) {
  7303. return true;
  7304. }
  7305. } else {
  7306. leftBoundary = Math.max(docElement.scrollWidth, get_viewport_size_default(window).width);
  7307. if (coords.left >= leftBoundary) {
  7308. return true;
  7309. }
  7310. }
  7311. return false;
  7312. }
  7313. var is_offscreen_default = isOffscreen;
  7314. var clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;
  7315. var clipPathRegex = /(\w+)\((\d+)/;
  7316. function isClipped(style) {
  7317. var matchesClip = style.getPropertyValue('clip').match(clipRegex);
  7318. var matchesClipPath = style.getPropertyValue('clip-path').match(clipPathRegex);
  7319. if (matchesClip && matchesClip.length === 5) {
  7320. var position = style.getPropertyValue('position');
  7321. if ([ 'fixed', 'absolute' ].includes(position)) {
  7322. return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;
  7323. }
  7324. }
  7325. if (matchesClipPath) {
  7326. var type = matchesClipPath[1];
  7327. var value = parseInt(matchesClipPath[2], 10);
  7328. switch (type) {
  7329. case 'inset':
  7330. return value >= 50;
  7331. case 'circle':
  7332. return value === 0;
  7333. default:
  7334. }
  7335. }
  7336. return false;
  7337. }
  7338. function isAreaVisible(el, screenReader, recursed) {
  7339. var mapEl = find_up_default(el, 'map');
  7340. if (!mapEl) {
  7341. return false;
  7342. }
  7343. var mapElName = mapEl.getAttribute('name');
  7344. if (!mapElName) {
  7345. return false;
  7346. }
  7347. var mapElRootNode = get_root_node_default2(el);
  7348. if (!mapElRootNode || mapElRootNode.nodeType !== 9) {
  7349. return false;
  7350. }
  7351. var refs = query_selector_all_default(axe._tree, 'img[usemap="#'.concat(escape_selector_default(mapElName), '"]'));
  7352. if (!refs || !refs.length) {
  7353. return false;
  7354. }
  7355. return refs.some(function(_ref8) {
  7356. var actualNode = _ref8.actualNode;
  7357. return isVisible(actualNode, screenReader, recursed);
  7358. });
  7359. }
  7360. function isVisible(el, screenReader, recursed) {
  7361. var _window$Node;
  7362. if (!el) {
  7363. throw new TypeError('Cannot determine if element is visible for non-DOM nodes');
  7364. }
  7365. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  7366. el = vNode ? vNode.actualNode : el;
  7367. var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
  7368. var _ref9 = (_window$Node = window.Node) !== null && _window$Node !== void 0 ? _window$Node : {}, DOCUMENT_NODE = _ref9.DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE = _ref9.DOCUMENT_FRAGMENT_NODE;
  7369. var nodeType = vNode ? vNode.props.nodeType : el.nodeType;
  7370. var nodeName2 = vNode ? vNode.props.nodeName : el.nodeName.toLowerCase();
  7371. if (vNode && typeof vNode[cacheName] !== 'undefined') {
  7372. return vNode[cacheName];
  7373. }
  7374. if (nodeType === DOCUMENT_NODE) {
  7375. return true;
  7376. }
  7377. if ([ 'style', 'script', 'noscript', 'template' ].includes(nodeName2)) {
  7378. return false;
  7379. }
  7380. if (el && nodeType === DOCUMENT_FRAGMENT_NODE) {
  7381. el = el.host;
  7382. }
  7383. if (screenReader) {
  7384. var ariaHiddenValue = vNode ? vNode.attr('aria-hidden') : el.getAttribute('aria-hidden');
  7385. if (ariaHiddenValue === 'true') {
  7386. return false;
  7387. }
  7388. }
  7389. if (!el) {
  7390. var parent2 = vNode.parent;
  7391. var visible5 = true;
  7392. if (parent2) {
  7393. visible5 = isVisible(parent2, screenReader, true);
  7394. }
  7395. if (vNode) {
  7396. vNode[cacheName] = visible5;
  7397. }
  7398. return visible5;
  7399. }
  7400. var style = window.getComputedStyle(el, null);
  7401. if (style === null) {
  7402. return false;
  7403. }
  7404. if (nodeName2 === 'area') {
  7405. return isAreaVisible(el, screenReader, recursed);
  7406. }
  7407. if (style.getPropertyValue('display') === 'none') {
  7408. return false;
  7409. }
  7410. var elHeight = parseInt(style.getPropertyValue('height'));
  7411. var elWidth = parseInt(style.getPropertyValue('width'));
  7412. var scroll = _getScroll(el);
  7413. var scrollableWithZeroHeight = scroll && elHeight === 0;
  7414. var scrollableWithZeroWidth = scroll && elWidth === 0;
  7415. var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && (elHeight < 2 || elWidth < 2) && style.getPropertyValue('overflow') === 'hidden';
  7416. if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || scrollableWithZeroWidth || posAbsoluteOverflowHiddenAndSmall)) {
  7417. return false;
  7418. }
  7419. if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) {
  7420. return false;
  7421. }
  7422. var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
  7423. var visible4 = false;
  7424. if (parent) {
  7425. visible4 = isVisible(parent, screenReader, true);
  7426. }
  7427. if (vNode) {
  7428. vNode[cacheName] = visible4;
  7429. }
  7430. return visible4;
  7431. }
  7432. var is_visible_default = isVisible;
  7433. var gridSize = 200;
  7434. function createGrid() {
  7435. var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
  7436. var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  7437. container: null,
  7438. cells: []
  7439. };
  7440. var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  7441. if (!parentVNode) {
  7442. var vNode = get_node_from_tree_default(document.documentElement);
  7443. if (!vNode) {
  7444. vNode = new virtual_node_default(document.documentElement);
  7445. }
  7446. vNode._stackingOrder = [ 0 ];
  7447. addNodeToGrid(rootGrid, vNode);
  7448. if (_getScroll(vNode.actualNode)) {
  7449. var subGrid = {
  7450. container: vNode,
  7451. cells: []
  7452. };
  7453. vNode._subGrid = subGrid;
  7454. }
  7455. }
  7456. var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
  7457. var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
  7458. while (node) {
  7459. var _vNode = get_node_from_tree_default(node);
  7460. if (node.parentElement) {
  7461. parentVNode = get_node_from_tree_default(node.parentElement);
  7462. } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
  7463. parentVNode = get_node_from_tree_default(node.parentNode);
  7464. }
  7465. if (!_vNode) {
  7466. _vNode = new axe.VirtualNode(node, parentVNode);
  7467. }
  7468. _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
  7469. var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
  7470. var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
  7471. if (_getScroll(_vNode.actualNode)) {
  7472. var _subGrid = {
  7473. container: _vNode,
  7474. cells: []
  7475. };
  7476. _vNode._subGrid = _subGrid;
  7477. }
  7478. var rect = _vNode.boundingClientRect;
  7479. if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
  7480. addNodeToGrid(grid, _vNode);
  7481. }
  7482. if (is_shadow_root_default(node)) {
  7483. createGrid(node.shadowRoot, grid, _vNode);
  7484. }
  7485. node = treeWalker.nextNode();
  7486. }
  7487. }
  7488. function getRectStack(grid, rect) {
  7489. var _grid$cells$row$col$f, _grid$cells$row$col;
  7490. var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  7491. var x = rect.left + rect.width / 2;
  7492. var y = rect.top + rect.height / 2;
  7493. var row = y / gridSize | 0;
  7494. var col = x / gridSize | 0;
  7495. if (row > grid.cells.length || col > grid.numCols) {
  7496. throw new Error('Element midpoint exceeds the grid bounds');
  7497. }
  7498. var stack = (_grid$cells$row$col$f = (_grid$cells$row$col = grid.cells[row][col]) === null || _grid$cells$row$col === void 0 ? void 0 : _grid$cells$row$col.filter(function(gridCellNode) {
  7499. return gridCellNode.clientRects.find(function(clientRect) {
  7500. var rectX = clientRect.left;
  7501. var rectY = clientRect.top;
  7502. return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
  7503. });
  7504. })) !== null && _grid$cells$row$col$f !== void 0 ? _grid$cells$row$col$f : [];
  7505. var gridContainer = grid.container;
  7506. if (gridContainer) {
  7507. stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
  7508. }
  7509. if (!recursed) {
  7510. stack = stack.sort(visuallySort).map(function(vNode) {
  7511. return vNode.actualNode;
  7512. }).concat(document.documentElement).filter(function(node, index, array) {
  7513. return array.indexOf(node) === index;
  7514. });
  7515. }
  7516. return stack;
  7517. }
  7518. function isStackingContext(vNode, parentVNode) {
  7519. var position = vNode.getComputedStylePropertyValue('position');
  7520. var zIndex = vNode.getComputedStylePropertyValue('z-index');
  7521. if (position === 'fixed' || position === 'sticky') {
  7522. return true;
  7523. }
  7524. if (zIndex !== 'auto' && position !== 'static') {
  7525. return true;
  7526. }
  7527. if (vNode.getComputedStylePropertyValue('opacity') !== '1') {
  7528. return true;
  7529. }
  7530. var transform = vNode.getComputedStylePropertyValue('-webkit-transform') || vNode.getComputedStylePropertyValue('-ms-transform') || vNode.getComputedStylePropertyValue('transform') || 'none';
  7531. if (transform !== 'none') {
  7532. return true;
  7533. }
  7534. var mixBlendMode = vNode.getComputedStylePropertyValue('mix-blend-mode');
  7535. if (mixBlendMode && mixBlendMode !== 'normal') {
  7536. return true;
  7537. }
  7538. var filter = vNode.getComputedStylePropertyValue('filter');
  7539. if (filter && filter !== 'none') {
  7540. return true;
  7541. }
  7542. var perspective = vNode.getComputedStylePropertyValue('perspective');
  7543. if (perspective && perspective !== 'none') {
  7544. return true;
  7545. }
  7546. var clipPath = vNode.getComputedStylePropertyValue('clip-path');
  7547. if (clipPath && clipPath !== 'none') {
  7548. return true;
  7549. }
  7550. var mask = vNode.getComputedStylePropertyValue('-webkit-mask') || vNode.getComputedStylePropertyValue('mask') || 'none';
  7551. if (mask !== 'none') {
  7552. return true;
  7553. }
  7554. var maskImage = vNode.getComputedStylePropertyValue('-webkit-mask-image') || vNode.getComputedStylePropertyValue('mask-image') || 'none';
  7555. if (maskImage !== 'none') {
  7556. return true;
  7557. }
  7558. var maskBorder = vNode.getComputedStylePropertyValue('-webkit-mask-border') || vNode.getComputedStylePropertyValue('mask-border') || 'none';
  7559. if (maskBorder !== 'none') {
  7560. return true;
  7561. }
  7562. if (vNode.getComputedStylePropertyValue('isolation') === 'isolate') {
  7563. return true;
  7564. }
  7565. var willChange = vNode.getComputedStylePropertyValue('will-change');
  7566. if (willChange === 'transform' || willChange === 'opacity') {
  7567. return true;
  7568. }
  7569. if (vNode.getComputedStylePropertyValue('-webkit-overflow-scrolling') === 'touch') {
  7570. return true;
  7571. }
  7572. var contain = vNode.getComputedStylePropertyValue('contain');
  7573. if ([ 'layout', 'paint', 'strict', 'content' ].includes(contain)) {
  7574. return true;
  7575. }
  7576. if (zIndex !== 'auto' && parentVNode) {
  7577. var parentDsiplay = parentVNode.getComputedStylePropertyValue('display');
  7578. if ([ 'flex', 'inline-flex', 'inline flex', 'grid', 'inline-grid', 'inline grid' ].includes(parentDsiplay)) {
  7579. return true;
  7580. }
  7581. }
  7582. return false;
  7583. }
  7584. function isFloated(vNode) {
  7585. if (!vNode) {
  7586. return false;
  7587. }
  7588. if (vNode._isFloated !== void 0) {
  7589. return vNode._isFloated;
  7590. }
  7591. var floatStyle = vNode.getComputedStylePropertyValue('float');
  7592. if (floatStyle !== 'none') {
  7593. vNode._isFloated = true;
  7594. return true;
  7595. }
  7596. var floated = isFloated(vNode.parent);
  7597. vNode._isFloated = floated;
  7598. return floated;
  7599. }
  7600. function getPositionOrder(vNode) {
  7601. if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
  7602. return 2;
  7603. }
  7604. if (isFloated(vNode)) {
  7605. return 1;
  7606. }
  7607. return 0;
  7608. }
  7609. function visuallySort(a, b) {
  7610. var length = Math.max(a._stackingOrder.length, b._stackingOrder.length);
  7611. for (var _i5 = 0; _i5 < length; _i5++) {
  7612. if (typeof b._stackingOrder[_i5] === 'undefined') {
  7613. return -1;
  7614. } else if (typeof a._stackingOrder[_i5] === 'undefined') {
  7615. return 1;
  7616. }
  7617. if (b._stackingOrder[_i5] > a._stackingOrder[_i5]) {
  7618. return 1;
  7619. }
  7620. if (b._stackingOrder[_i5] < a._stackingOrder[_i5]) {
  7621. return -1;
  7622. }
  7623. }
  7624. var aNode = a.actualNode;
  7625. var bNode = b.actualNode;
  7626. if (aNode.getRootNode && aNode.getRootNode() !== bNode.getRootNode()) {
  7627. var boundaries = [];
  7628. while (aNode) {
  7629. boundaries.push({
  7630. root: aNode.getRootNode(),
  7631. node: aNode
  7632. });
  7633. aNode = aNode.getRootNode().host;
  7634. }
  7635. while (bNode && !boundaries.find(function(boundary) {
  7636. return boundary.root === bNode.getRootNode();
  7637. })) {
  7638. bNode = bNode.getRootNode().host;
  7639. }
  7640. aNode = boundaries.find(function(boundary) {
  7641. return boundary.root === bNode.getRootNode();
  7642. }).node;
  7643. if (aNode === bNode) {
  7644. return a.actualNode.getRootNode() !== aNode.getRootNode() ? -1 : 1;
  7645. }
  7646. }
  7647. var _window$Node2 = window.Node, DOCUMENT_POSITION_FOLLOWING = _window$Node2.DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_CONTAINS = _window$Node2.DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_CONTAINED_BY = _window$Node2.DOCUMENT_POSITION_CONTAINED_BY;
  7648. var docPosition = aNode.compareDocumentPosition(bNode);
  7649. var DOMOrder = docPosition & DOCUMENT_POSITION_FOLLOWING ? 1 : -1;
  7650. var isDescendant = docPosition & DOCUMENT_POSITION_CONTAINS || docPosition & DOCUMENT_POSITION_CONTAINED_BY;
  7651. var aPosition = getPositionOrder(a);
  7652. var bPosition = getPositionOrder(b);
  7653. if (aPosition === bPosition || isDescendant) {
  7654. return DOMOrder;
  7655. }
  7656. return bPosition - aPosition;
  7657. }
  7658. function getStackingOrder(vNode, parentVNode) {
  7659. var stackingOrder = parentVNode._stackingOrder.slice();
  7660. var zIndex = vNode.getComputedStylePropertyValue('z-index');
  7661. var positioned = vNode.getComputedStylePropertyValue('position') !== 'static';
  7662. var floated = vNode.getComputedStylePropertyValue('float') !== 'none';
  7663. if (positioned && ![ 'auto', '0' ].includes(zIndex)) {
  7664. while (stackingOrder.find(function(value) {
  7665. return value % 1 !== 0;
  7666. })) {
  7667. var index = stackingOrder.findIndex(function(value) {
  7668. return value % 1 !== 0;
  7669. });
  7670. stackingOrder.splice(index, 1);
  7671. }
  7672. stackingOrder[stackingOrder.length - 1] = parseInt(zIndex);
  7673. }
  7674. if (isStackingContext(vNode, parentVNode)) {
  7675. stackingOrder.push(0);
  7676. } else if (positioned) {
  7677. stackingOrder.push(.5);
  7678. } else if (floated) {
  7679. stackingOrder.push(.25);
  7680. }
  7681. return stackingOrder;
  7682. }
  7683. function findScrollRegionParent(vNode, parentVNode) {
  7684. var scrollRegionParent = null;
  7685. var checkedNodes = [ vNode ];
  7686. while (parentVNode) {
  7687. if (_getScroll(parentVNode.actualNode)) {
  7688. scrollRegionParent = parentVNode;
  7689. break;
  7690. }
  7691. if (parentVNode._scrollRegionParent) {
  7692. scrollRegionParent = parentVNode._scrollRegionParent;
  7693. break;
  7694. }
  7695. checkedNodes.push(parentVNode);
  7696. parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
  7697. }
  7698. checkedNodes.forEach(function(vNode2) {
  7699. return vNode2._scrollRegionParent = scrollRegionParent;
  7700. });
  7701. return scrollRegionParent;
  7702. }
  7703. function addNodeToGrid(grid, vNode) {
  7704. vNode._grid = grid;
  7705. vNode.clientRects.forEach(function(rect) {
  7706. var _grid$numCols;
  7707. var x = rect.left;
  7708. var y = rect.top;
  7709. var startRow = y / gridSize | 0;
  7710. var startCol = x / gridSize | 0;
  7711. var endRow = (y + rect.height) / gridSize | 0;
  7712. var endCol = (x + rect.width) / gridSize | 0;
  7713. grid.numCols = Math.max((_grid$numCols = grid.numCols) !== null && _grid$numCols !== void 0 ? _grid$numCols : 0, endCol);
  7714. for (var row = startRow; row <= endRow; row++) {
  7715. grid.cells[row] = grid.cells[row] || [];
  7716. for (var col = startCol; col <= endCol; col++) {
  7717. grid.cells[row][col] = grid.cells[row][col] || [];
  7718. if (!grid.cells[row][col].includes(vNode)) {
  7719. grid.cells[row][col].push(vNode);
  7720. }
  7721. }
  7722. }
  7723. });
  7724. }
  7725. function getElementStack(node) {
  7726. if (!cache_default.get('gridCreated')) {
  7727. createGrid();
  7728. cache_default.set('gridCreated', true);
  7729. }
  7730. var vNode = get_node_from_tree_default(node);
  7731. var grid = vNode._grid;
  7732. if (!grid) {
  7733. return [];
  7734. }
  7735. return getRectStack(grid, vNode.boundingClientRect);
  7736. }
  7737. var get_element_stack_default = getElementStack;
  7738. function getTabbableElements(virtualNode) {
  7739. var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
  7740. var tabbableElements = nodeAndDescendents.filter(function(vNode) {
  7741. var isFocusable2 = vNode.isFocusable;
  7742. var tabIndex = vNode.actualNode.getAttribute('tabindex');
  7743. tabIndex = tabIndex && !isNaN(parseInt(tabIndex, 10)) ? parseInt(tabIndex) : null;
  7744. return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2;
  7745. });
  7746. return tabbableElements;
  7747. }
  7748. var get_tabbable_elements_default = getTabbableElements;
  7749. function sanitize(str) {
  7750. if (!str) {
  7751. return '';
  7752. }
  7753. return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();
  7754. }
  7755. var sanitize_default = sanitize;
  7756. function getTextElementStack(node) {
  7757. if (!cache_default.get('gridCreated')) {
  7758. createGrid();
  7759. cache_default.set('gridCreated', true);
  7760. }
  7761. var vNode = get_node_from_tree_default(node);
  7762. var grid = vNode._grid;
  7763. if (!grid) {
  7764. return [];
  7765. }
  7766. var nodeRect = vNode.boundingClientRect;
  7767. var clientRects = [];
  7768. Array.from(node.childNodes).forEach(function(elm) {
  7769. if (elm.nodeType === 3 && sanitize_default(elm.textContent) !== '') {
  7770. var range = document.createRange();
  7771. range.selectNodeContents(elm);
  7772. var rects = range.getClientRects();
  7773. var outsideRectBounds = Array.from(rects).some(function(rect) {
  7774. var horizontalMidpoint = rect.left + rect.width / 2;
  7775. var verticalMidpoint = rect.top + rect.height / 2;
  7776. return horizontalMidpoint < nodeRect.left || horizontalMidpoint > nodeRect.right || verticalMidpoint < nodeRect.top || verticalMidpoint > nodeRect.bottom;
  7777. });
  7778. if (outsideRectBounds) {
  7779. return;
  7780. }
  7781. for (var _i6 = 0; _i6 < rects.length; _i6++) {
  7782. var rect = rects[_i6];
  7783. if (rect.width >= 1 && rect.height >= 1) {
  7784. clientRects.push(rect);
  7785. }
  7786. }
  7787. }
  7788. });
  7789. if (!clientRects.length) {
  7790. return [ get_element_stack_default(node) ];
  7791. }
  7792. return clientRects.map(function(rect) {
  7793. return getRectStack(grid, rect);
  7794. });
  7795. }
  7796. var get_text_element_stack_default = getTextElementStack;
  7797. var visualRoles = [ 'checkbox', 'img', 'radio', 'range', 'slider', 'spinbutton', 'textbox' ];
  7798. function isVisualContent(element) {
  7799. var role = element.getAttribute('role');
  7800. if (role) {
  7801. return visualRoles.indexOf(role) !== -1;
  7802. }
  7803. switch (element.nodeName.toUpperCase()) {
  7804. case 'IMG':
  7805. case 'IFRAME':
  7806. case 'OBJECT':
  7807. case 'VIDEO':
  7808. case 'AUDIO':
  7809. case 'CANVAS':
  7810. case 'SVG':
  7811. case 'MATH':
  7812. case 'BUTTON':
  7813. case 'SELECT':
  7814. case 'TEXTAREA':
  7815. case 'KEYGEN':
  7816. case 'PROGRESS':
  7817. case 'METER':
  7818. return true;
  7819. case 'INPUT':
  7820. return element.type !== 'hidden';
  7821. default:
  7822. return false;
  7823. }
  7824. }
  7825. var is_visual_content_default = isVisualContent;
  7826. function idrefs(node, attr) {
  7827. node = node.actualNode || node;
  7828. try {
  7829. var doc = get_root_node_default2(node);
  7830. var result = [];
  7831. var attrValue = node.getAttribute(attr);
  7832. if (attrValue) {
  7833. attrValue = token_list_default(attrValue);
  7834. for (var index = 0; index < attrValue.length; index++) {
  7835. result.push(doc.getElementById(attrValue[index]));
  7836. }
  7837. }
  7838. return result;
  7839. } catch (e) {
  7840. throw new TypeError('Cannot resolve id references for non-DOM nodes');
  7841. }
  7842. }
  7843. var idrefs_default = idrefs;
  7844. function visibleVirtual(element, screenReader, noRecursing) {
  7845. var vNode = element instanceof abstract_virtual_node_default ? element : get_node_from_tree_default(element);
  7846. var visible4 = !element.actualNode || element.actualNode && is_visible_default(element.actualNode, screenReader);
  7847. var result = vNode.children.map(function(child) {
  7848. var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue;
  7849. if (nodeType === 3) {
  7850. if (nodeValue && visible4) {
  7851. return nodeValue;
  7852. }
  7853. } else if (!noRecursing) {
  7854. return visibleVirtual(child, screenReader);
  7855. }
  7856. }).join('');
  7857. return sanitize_default(result);
  7858. }
  7859. var visible_virtual_default = visibleVirtual;
  7860. function labelVirtual(virtualNode) {
  7861. var ref, candidate;
  7862. if (virtualNode.attr('aria-labelledby')) {
  7863. ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby');
  7864. candidate = ref.map(function(thing) {
  7865. var vNode = get_node_from_tree_default(thing);
  7866. return vNode ? visible_virtual_default(vNode) : '';
  7867. }).join(' ').trim();
  7868. if (candidate) {
  7869. return candidate;
  7870. }
  7871. }
  7872. candidate = virtualNode.attr('aria-label');
  7873. if (candidate) {
  7874. candidate = sanitize_default(candidate);
  7875. if (candidate) {
  7876. return candidate;
  7877. }
  7878. }
  7879. return null;
  7880. }
  7881. var label_virtual_default = labelVirtual;
  7882. var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];
  7883. function hasChildTextNodes(elm) {
  7884. if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {
  7885. return elm.children.some(function(_ref10) {
  7886. var actualNode = _ref10.actualNode;
  7887. return actualNode.nodeType === 3 && actualNode.nodeValue.trim();
  7888. });
  7889. }
  7890. }
  7891. function hasContentVirtual(elm, noRecursion, ignoreAria) {
  7892. return hasChildTextNodes(elm) || is_visual_content_default(elm.actualNode) || !ignoreAria && !!label_virtual_default(elm) || !noRecursion && elm.children.some(function(child) {
  7893. return child.actualNode.nodeType === 1 && hasContentVirtual(child);
  7894. });
  7895. }
  7896. var has_content_virtual_default = hasContentVirtual;
  7897. function hasContent(elm, noRecursion, ignoreAria) {
  7898. elm = get_node_from_tree_default(elm);
  7899. return has_content_virtual_default(elm, noRecursion, ignoreAria);
  7900. }
  7901. var has_content_default = hasContent;
  7902. function isHiddenWithCSS(el, descendentVisibilityValue) {
  7903. var vNode = get_node_from_tree_default(el);
  7904. if (!vNode) {
  7905. return _isHiddenWithCSS(el, descendentVisibilityValue);
  7906. }
  7907. if (vNode._isHiddenWithCSS === void 0) {
  7908. vNode._isHiddenWithCSS = _isHiddenWithCSS(el, descendentVisibilityValue);
  7909. }
  7910. return vNode._isHiddenWithCSS;
  7911. }
  7912. function _isHiddenWithCSS(el, descendentVisibilityValue) {
  7913. if (el.nodeType === 9) {
  7914. return false;
  7915. }
  7916. if (el.nodeType === 11) {
  7917. el = el.host;
  7918. }
  7919. if ([ 'STYLE', 'SCRIPT' ].includes(el.nodeName.toUpperCase())) {
  7920. return false;
  7921. }
  7922. var style = window.getComputedStyle(el, null);
  7923. if (!style) {
  7924. throw new Error('Style does not exist for the given element.');
  7925. }
  7926. var displayValue = style.getPropertyValue('display');
  7927. if (displayValue === 'none') {
  7928. return true;
  7929. }
  7930. var HIDDEN_VISIBILITY_VALUES = [ 'hidden', 'collapse' ];
  7931. var visibilityValue = style.getPropertyValue('visibility');
  7932. if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && !descendentVisibilityValue) {
  7933. return true;
  7934. }
  7935. if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && descendentVisibilityValue && HIDDEN_VISIBILITY_VALUES.includes(descendentVisibilityValue)) {
  7936. return true;
  7937. }
  7938. var parent = get_composed_parent_default(el);
  7939. if (parent && !HIDDEN_VISIBILITY_VALUES.includes(visibilityValue)) {
  7940. return isHiddenWithCSS(parent, visibilityValue);
  7941. }
  7942. return false;
  7943. }
  7944. var is_hidden_with_css_default = isHiddenWithCSS;
  7945. function focusDisabled(el) {
  7946. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  7947. if (vNode.hasAttr('disabled')) {
  7948. return true;
  7949. }
  7950. var parentNode = vNode.parent;
  7951. var ancestors = [];
  7952. var fieldsetDisabled = false;
  7953. while (parentNode && parentNode.shadowId === vNode.shadowId && !fieldsetDisabled) {
  7954. ancestors.push(parentNode);
  7955. if (parentNode.props.nodeName === 'legend') {
  7956. break;
  7957. }
  7958. if (parentNode._inDisabledFieldset !== void 0) {
  7959. fieldsetDisabled = parentNode._inDisabledFieldset;
  7960. break;
  7961. }
  7962. if (parentNode.props.nodeName === 'fieldset' && parentNode.hasAttr('disabled')) {
  7963. fieldsetDisabled = true;
  7964. }
  7965. parentNode = parentNode.parent;
  7966. }
  7967. ancestors.forEach(function(ancestor) {
  7968. return ancestor._inDisabledFieldset = fieldsetDisabled;
  7969. });
  7970. if (fieldsetDisabled) {
  7971. return true;
  7972. }
  7973. if (vNode.props.nodeName !== 'area') {
  7974. if (!vNode.actualNode) {
  7975. return false;
  7976. }
  7977. return is_hidden_with_css_default(vNode.actualNode);
  7978. }
  7979. return false;
  7980. }
  7981. var focus_disabled_default = focusDisabled;
  7982. function isNativelyFocusable(el) {
  7983. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  7984. if (!vNode || focus_disabled_default(vNode)) {
  7985. return false;
  7986. }
  7987. switch (vNode.props.nodeName) {
  7988. case 'a':
  7989. case 'area':
  7990. if (vNode.hasAttr('href')) {
  7991. return true;
  7992. }
  7993. break;
  7994. case 'input':
  7995. return vNode.props.type !== 'hidden';
  7996. case 'textarea':
  7997. case 'select':
  7998. case 'summary':
  7999. case 'button':
  8000. return true;
  8001. case 'details':
  8002. return !query_selector_all_default(vNode, 'summary').length;
  8003. }
  8004. return false;
  8005. }
  8006. var is_natively_focusable_default = isNativelyFocusable;
  8007. function isFocusable(el) {
  8008. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  8009. if (vNode.props.nodeType !== 1) {
  8010. return false;
  8011. }
  8012. if (focus_disabled_default(vNode)) {
  8013. return false;
  8014. } else if (is_natively_focusable_default(vNode)) {
  8015. return true;
  8016. }
  8017. var tabindex = vNode.attr('tabindex');
  8018. if (tabindex && !isNaN(parseInt(tabindex, 10))) {
  8019. return true;
  8020. }
  8021. return false;
  8022. }
  8023. var is_focusable_default = isFocusable;
  8024. function insertedIntoFocusOrder(el) {
  8025. var tabIndex = parseInt(el.getAttribute('tabindex'), 10);
  8026. return tabIndex > -1 && is_focusable_default(el) && !is_natively_focusable_default(el);
  8027. }
  8028. var inserted_into_focus_order_default = insertedIntoFocusOrder;
  8029. function isHTML5(doc) {
  8030. var node = doc.doctype;
  8031. if (node === null) {
  8032. return false;
  8033. }
  8034. return node.name === 'html' && !node.publicId && !node.systemId;
  8035. }
  8036. var is_html5_default = isHTML5;
  8037. function walkDomNode(node, functor) {
  8038. if (functor(node.actualNode) !== false) {
  8039. node.children.forEach(function(child) {
  8040. return walkDomNode(child, functor);
  8041. });
  8042. }
  8043. }
  8044. var blockLike = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];
  8045. function isBlock(elm) {
  8046. var display = window.getComputedStyle(elm).getPropertyValue('display');
  8047. return blockLike.includes(display) || display.substr(0, 6) === 'table-';
  8048. }
  8049. function getBlockParent(node) {
  8050. var parentBlock = get_composed_parent_default(node);
  8051. while (parentBlock && !isBlock(parentBlock)) {
  8052. parentBlock = get_composed_parent_default(parentBlock);
  8053. }
  8054. return get_node_from_tree_default(parentBlock);
  8055. }
  8056. function isInTextBlock(node) {
  8057. if (isBlock(node)) {
  8058. return false;
  8059. }
  8060. var virtualParent = getBlockParent(node);
  8061. var parentText = '';
  8062. var linkText = '';
  8063. var inBrBlock = 0;
  8064. walkDomNode(virtualParent, function(currNode) {
  8065. if (inBrBlock === 2) {
  8066. return false;
  8067. }
  8068. if (currNode.nodeType === 3) {
  8069. parentText += currNode.nodeValue;
  8070. }
  8071. if (currNode.nodeType !== 1) {
  8072. return;
  8073. }
  8074. var nodeName2 = (currNode.nodeName || '').toUpperCase();
  8075. if ([ 'BR', 'HR' ].includes(nodeName2)) {
  8076. if (inBrBlock === 0) {
  8077. parentText = '';
  8078. linkText = '';
  8079. } else {
  8080. inBrBlock = 2;
  8081. }
  8082. } else if (currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style['float']) || ![ '', null, 'relative' ].includes(currNode.style.position)) {
  8083. return false;
  8084. } else if (nodeName2 === 'A' && currNode.href || (currNode.getAttribute('role') || '').toLowerCase() === 'link') {
  8085. if (currNode === node) {
  8086. inBrBlock = 1;
  8087. }
  8088. linkText += currNode.textContent;
  8089. return false;
  8090. }
  8091. });
  8092. parentText = sanitize_default(parentText);
  8093. linkText = sanitize_default(linkText);
  8094. return parentText.length > linkText.length;
  8095. }
  8096. var is_in_text_block_default = isInTextBlock;
  8097. function isModalOpen(options) {
  8098. options = options || {};
  8099. var modalPercent = options.modalPercent || .75;
  8100. if (cache_default.get('isModalOpen')) {
  8101. return cache_default.get('isModalOpen');
  8102. }
  8103. var definiteModals = query_selector_all_filter_default(axe._tree[0], 'dialog, [role=dialog], [aria-modal=true]', function(vNode) {
  8104. return is_visible_default(vNode.actualNode);
  8105. });
  8106. if (definiteModals.length) {
  8107. cache_default.set('isModalOpen', true);
  8108. return true;
  8109. }
  8110. var viewport = get_viewport_size_default(window);
  8111. var percentWidth = viewport.width * modalPercent;
  8112. var percentHeight = viewport.height * modalPercent;
  8113. var x = (viewport.width - percentWidth) / 2;
  8114. var y = (viewport.height - percentHeight) / 2;
  8115. var points = [ {
  8116. x: x,
  8117. y: y
  8118. }, {
  8119. x: viewport.width - x,
  8120. y: y
  8121. }, {
  8122. x: viewport.width / 2,
  8123. y: viewport.height / 2
  8124. }, {
  8125. x: x,
  8126. y: viewport.height - y
  8127. }, {
  8128. x: viewport.width - x,
  8129. y: viewport.height - y
  8130. } ];
  8131. var stacks = points.map(function(point) {
  8132. return Array.from(document.elementsFromPoint(point.x, point.y));
  8133. });
  8134. var _loop3 = function _loop3(_i7) {
  8135. var modalElement = stacks[_i7].find(function(elm) {
  8136. var style = window.getComputedStyle(elm);
  8137. return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');
  8138. });
  8139. if (modalElement && stacks.every(function(stack) {
  8140. return stack.includes(modalElement);
  8141. })) {
  8142. cache_default.set('isModalOpen', true);
  8143. return {
  8144. v: true
  8145. };
  8146. }
  8147. };
  8148. for (var _i7 = 0; _i7 < stacks.length; _i7++) {
  8149. var _ret = _loop3(_i7);
  8150. if (_typeof(_ret) === 'object') {
  8151. return _ret.v;
  8152. }
  8153. }
  8154. cache_default.set('isModalOpen', void 0);
  8155. return void 0;
  8156. }
  8157. var is_modal_open_default = isModalOpen;
  8158. function isNode(element) {
  8159. return element instanceof window.Node;
  8160. }
  8161. var is_node_default = isNode;
  8162. var data = {};
  8163. var incompleteData = {
  8164. set: function set(key, reason) {
  8165. if (typeof key !== 'string') {
  8166. throw new Error('Incomplete data: key must be a string');
  8167. }
  8168. if (reason) {
  8169. data[key] = reason;
  8170. }
  8171. return data[key];
  8172. },
  8173. get: function get(key) {
  8174. return data[key];
  8175. },
  8176. clear: function clear() {
  8177. data = {};
  8178. }
  8179. };
  8180. var incomplete_data_default = incompleteData;
  8181. function elementHasImage(elm, style) {
  8182. var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ];
  8183. var nodeName2 = elm.nodeName.toUpperCase();
  8184. if (graphicNodes.includes(nodeName2)) {
  8185. incomplete_data_default.set('bgColor', 'imgNode');
  8186. return true;
  8187. }
  8188. style = style || window.getComputedStyle(elm);
  8189. var bgImageStyle = style.getPropertyValue('background-image');
  8190. var hasBgImage = bgImageStyle !== 'none';
  8191. if (hasBgImage) {
  8192. var hasGradient = /gradient/.test(bgImageStyle);
  8193. incomplete_data_default.set('bgColor', hasGradient ? 'bgGradient' : 'bgImage');
  8194. }
  8195. return hasBgImage;
  8196. }
  8197. var element_has_image_default = elementHasImage;
  8198. var ariaAttrs = {
  8199. 'aria-activedescendant': {
  8200. type: 'idref',
  8201. allowEmpty: true
  8202. },
  8203. 'aria-atomic': {
  8204. type: 'boolean',
  8205. global: true
  8206. },
  8207. 'aria-autocomplete': {
  8208. type: 'nmtoken',
  8209. values: [ 'inline', 'list', 'both', 'none' ]
  8210. },
  8211. 'aria-busy': {
  8212. type: 'boolean',
  8213. global: true
  8214. },
  8215. 'aria-checked': {
  8216. type: 'nmtoken',
  8217. values: [ 'false', 'mixed', 'true', 'undefined' ]
  8218. },
  8219. 'aria-colcount': {
  8220. type: 'int',
  8221. minValue: -1
  8222. },
  8223. 'aria-colindex': {
  8224. type: 'int',
  8225. minValue: 1
  8226. },
  8227. 'aria-colspan': {
  8228. type: 'int',
  8229. minValue: 1
  8230. },
  8231. 'aria-controls': {
  8232. type: 'idrefs',
  8233. allowEmpty: true,
  8234. global: true
  8235. },
  8236. 'aria-current': {
  8237. type: 'nmtoken',
  8238. allowEmpty: true,
  8239. values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],
  8240. global: true
  8241. },
  8242. 'aria-describedby': {
  8243. type: 'idrefs',
  8244. allowEmpty: true,
  8245. global: true
  8246. },
  8247. 'aria-details': {
  8248. type: 'idref',
  8249. allowEmpty: true,
  8250. global: true
  8251. },
  8252. 'aria-disabled': {
  8253. type: 'boolean',
  8254. global: true
  8255. },
  8256. 'aria-dropeffect': {
  8257. type: 'nmtokens',
  8258. values: [ 'copy', 'execute', 'link', 'move', 'none', 'popup' ],
  8259. global: true
  8260. },
  8261. 'aria-errormessage': {
  8262. type: 'idref',
  8263. allowEmpty: true,
  8264. global: true
  8265. },
  8266. 'aria-expanded': {
  8267. type: 'nmtoken',
  8268. values: [ 'true', 'false', 'undefined' ]
  8269. },
  8270. 'aria-flowto': {
  8271. type: 'idrefs',
  8272. allowEmpty: true,
  8273. global: true
  8274. },
  8275. 'aria-grabbed': {
  8276. type: 'nmtoken',
  8277. values: [ 'true', 'false', 'undefined' ],
  8278. global: true
  8279. },
  8280. 'aria-haspopup': {
  8281. type: 'nmtoken',
  8282. allowEmpty: true,
  8283. values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],
  8284. global: true
  8285. },
  8286. 'aria-hidden': {
  8287. type: 'nmtoken',
  8288. values: [ 'true', 'false', 'undefined' ],
  8289. global: true
  8290. },
  8291. 'aria-invalid': {
  8292. type: 'nmtoken',
  8293. allowEmpty: true,
  8294. values: [ 'grammar', 'false', 'spelling', 'true' ],
  8295. global: true
  8296. },
  8297. 'aria-keyshortcuts': {
  8298. type: 'string',
  8299. allowEmpty: true,
  8300. global: true
  8301. },
  8302. 'aria-label': {
  8303. type: 'string',
  8304. allowEmpty: true,
  8305. global: true
  8306. },
  8307. 'aria-labelledby': {
  8308. type: 'idrefs',
  8309. allowEmpty: true,
  8310. global: true
  8311. },
  8312. 'aria-level': {
  8313. type: 'int',
  8314. minValue: 1
  8315. },
  8316. 'aria-live': {
  8317. type: 'nmtoken',
  8318. values: [ 'assertive', 'off', 'polite' ],
  8319. global: true
  8320. },
  8321. 'aria-modal': {
  8322. type: 'boolean'
  8323. },
  8324. 'aria-multiline': {
  8325. type: 'boolean'
  8326. },
  8327. 'aria-multiselectable': {
  8328. type: 'boolean'
  8329. },
  8330. 'aria-orientation': {
  8331. type: 'nmtoken',
  8332. values: [ 'horizontal', 'undefined', 'vertical' ]
  8333. },
  8334. 'aria-owns': {
  8335. type: 'idrefs',
  8336. allowEmpty: true,
  8337. global: true
  8338. },
  8339. 'aria-placeholder': {
  8340. type: 'string',
  8341. allowEmpty: true
  8342. },
  8343. 'aria-posinset': {
  8344. type: 'int',
  8345. minValue: 1
  8346. },
  8347. 'aria-pressed': {
  8348. type: 'nmtoken',
  8349. values: [ 'false', 'mixed', 'true', 'undefined' ]
  8350. },
  8351. 'aria-readonly': {
  8352. type: 'boolean'
  8353. },
  8354. 'aria-relevant': {
  8355. type: 'nmtokens',
  8356. values: [ 'additions', 'all', 'removals', 'text' ],
  8357. global: true
  8358. },
  8359. 'aria-required': {
  8360. type: 'boolean'
  8361. },
  8362. 'aria-roledescription': {
  8363. type: 'string',
  8364. allowEmpty: true,
  8365. global: true
  8366. },
  8367. 'aria-rowcount': {
  8368. type: 'int',
  8369. minValue: -1
  8370. },
  8371. 'aria-rowindex': {
  8372. type: 'int',
  8373. minValue: 1
  8374. },
  8375. 'aria-rowspan': {
  8376. type: 'int',
  8377. minValue: 0
  8378. },
  8379. 'aria-selected': {
  8380. type: 'nmtoken',
  8381. values: [ 'false', 'true', 'undefined' ]
  8382. },
  8383. 'aria-setsize': {
  8384. type: 'int',
  8385. minValue: -1
  8386. },
  8387. 'aria-sort': {
  8388. type: 'nmtoken',
  8389. values: [ 'ascending', 'descending', 'none', 'other' ]
  8390. },
  8391. 'aria-valuemax': {
  8392. type: 'decimal'
  8393. },
  8394. 'aria-valuemin': {
  8395. type: 'decimal'
  8396. },
  8397. 'aria-valuenow': {
  8398. type: 'decimal'
  8399. },
  8400. 'aria-valuetext': {
  8401. type: 'string'
  8402. }
  8403. };
  8404. var aria_attrs_default = ariaAttrs;
  8405. var ariaRoles = {
  8406. alert: {
  8407. type: 'widget',
  8408. allowedAttrs: [ 'aria-expanded' ],
  8409. superclassRole: [ 'section' ]
  8410. },
  8411. alertdialog: {
  8412. type: 'widget',
  8413. allowedAttrs: [ 'aria-expanded', 'aria-modal' ],
  8414. superclassRole: [ 'alert', 'dialog' ],
  8415. accessibleNameRequired: true
  8416. },
  8417. application: {
  8418. type: 'landmark',
  8419. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ],
  8420. superclassRole: [ 'structure' ],
  8421. accessibleNameRequired: true
  8422. },
  8423. article: {
  8424. type: 'structure',
  8425. allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
  8426. superclassRole: [ 'document' ]
  8427. },
  8428. banner: {
  8429. type: 'landmark',
  8430. allowedAttrs: [ 'aria-expanded' ],
  8431. superclassRole: [ 'landmark' ]
  8432. },
  8433. blockquote: {
  8434. type: 'structure',
  8435. superclassRole: [ 'section' ]
  8436. },
  8437. button: {
  8438. type: 'widget',
  8439. allowedAttrs: [ 'aria-expanded', 'aria-pressed' ],
  8440. superclassRole: [ 'command' ],
  8441. accessibleNameRequired: true,
  8442. nameFromContent: true,
  8443. childrenPresentational: true
  8444. },
  8445. caption: {
  8446. type: 'structure',
  8447. requiredContext: [ 'figure', 'table', 'grid', 'treegrid' ],
  8448. superclassRole: [ 'section' ],
  8449. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8450. },
  8451. cell: {
  8452. type: 'structure',
  8453. requiredContext: [ 'row' ],
  8454. allowedAttrs: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-expanded' ],
  8455. superclassRole: [ 'section' ],
  8456. nameFromContent: true
  8457. },
  8458. checkbox: {
  8459. type: 'widget',
  8460. allowedAttrs: [ 'aria-checked', 'aria-readonly', 'aria-required' ],
  8461. superclassRole: [ 'input' ],
  8462. accessibleNameRequired: true,
  8463. nameFromContent: true,
  8464. childrenPresentational: true
  8465. },
  8466. code: {
  8467. type: 'structure',
  8468. superclassRole: [ 'section' ],
  8469. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8470. },
  8471. columnheader: {
  8472. type: 'structure',
  8473. requiredContext: [ 'row' ],
  8474. allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],
  8475. superclassRole: [ 'cell', 'gridcell', 'sectionhead' ],
  8476. accessibleNameRequired: false,
  8477. nameFromContent: true
  8478. },
  8479. combobox: {
  8480. type: 'composite',
  8481. requiredAttrs: [ 'aria-expanded', 'aria-controls' ],
  8482. allowedAttrs: [ 'aria-owns', 'aria-autocomplete', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-orientation' ],
  8483. superclassRole: [ 'select' ],
  8484. accessibleNameRequired: true
  8485. },
  8486. command: {
  8487. type: 'abstract',
  8488. superclassRole: [ 'widget' ]
  8489. },
  8490. complementary: {
  8491. type: 'landmark',
  8492. allowedAttrs: [ 'aria-expanded' ],
  8493. superclassRole: [ 'landmark' ]
  8494. },
  8495. composite: {
  8496. type: 'abstract',
  8497. superclassRole: [ 'widget' ]
  8498. },
  8499. contentinfo: {
  8500. type: 'landmark',
  8501. allowedAttrs: [ 'aria-expanded' ],
  8502. superclassRole: [ 'landmark' ]
  8503. },
  8504. comment: {
  8505. type: 'structure',
  8506. allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize' ],
  8507. superclassRole: [ 'article' ]
  8508. },
  8509. definition: {
  8510. type: 'structure',
  8511. allowedAttrs: [ 'aria-expanded' ],
  8512. superclassRole: [ 'section' ]
  8513. },
  8514. deletion: {
  8515. type: 'structure',
  8516. superclassRole: [ 'section' ],
  8517. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8518. },
  8519. dialog: {
  8520. type: 'widget',
  8521. allowedAttrs: [ 'aria-expanded', 'aria-modal' ],
  8522. superclassRole: [ 'window' ],
  8523. accessibleNameRequired: true
  8524. },
  8525. directory: {
  8526. type: 'structure',
  8527. allowedAttrs: [ 'aria-expanded' ],
  8528. superclassRole: [ 'list' ],
  8529. nameFromContent: true
  8530. },
  8531. document: {
  8532. type: 'structure',
  8533. allowedAttrs: [ 'aria-expanded' ],
  8534. superclassRole: [ 'structure' ]
  8535. },
  8536. emphasis: {
  8537. type: 'structure',
  8538. superclassRole: [ 'section' ],
  8539. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8540. },
  8541. feed: {
  8542. type: 'structure',
  8543. requiredOwned: [ 'article' ],
  8544. allowedAttrs: [ 'aria-expanded' ],
  8545. superclassRole: [ 'list' ]
  8546. },
  8547. figure: {
  8548. type: 'structure',
  8549. allowedAttrs: [ 'aria-expanded' ],
  8550. superclassRole: [ 'section' ],
  8551. nameFromContent: true
  8552. },
  8553. form: {
  8554. type: 'landmark',
  8555. allowedAttrs: [ 'aria-expanded' ],
  8556. superclassRole: [ 'landmark' ]
  8557. },
  8558. grid: {
  8559. type: 'composite',
  8560. requiredOwned: [ 'rowgroup', 'row' ],
  8561. allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-rowcount' ],
  8562. superclassRole: [ 'composite', 'table' ],
  8563. accessibleNameRequired: false
  8564. },
  8565. gridcell: {
  8566. type: 'widget',
  8567. requiredContext: [ 'row' ],
  8568. allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-selected', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan' ],
  8569. superclassRole: [ 'cell', 'widget' ],
  8570. nameFromContent: true
  8571. },
  8572. group: {
  8573. type: 'structure',
  8574. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ],
  8575. superclassRole: [ 'section' ]
  8576. },
  8577. heading: {
  8578. type: 'structure',
  8579. requiredAttrs: [ 'aria-level' ],
  8580. allowedAttrs: [ 'aria-expanded' ],
  8581. superclassRole: [ 'sectionhead' ],
  8582. accessibleNameRequired: false,
  8583. nameFromContent: true
  8584. },
  8585. img: {
  8586. type: 'structure',
  8587. allowedAttrs: [ 'aria-expanded' ],
  8588. superclassRole: [ 'section' ],
  8589. accessibleNameRequired: true,
  8590. childrenPresentational: true
  8591. },
  8592. input: {
  8593. type: 'abstract',
  8594. superclassRole: [ 'widget' ]
  8595. },
  8596. insertion: {
  8597. type: 'structure',
  8598. superclassRole: [ 'section' ],
  8599. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8600. },
  8601. landmark: {
  8602. type: 'abstract',
  8603. superclassRole: [ 'section' ]
  8604. },
  8605. link: {
  8606. type: 'widget',
  8607. allowedAttrs: [ 'aria-expanded' ],
  8608. superclassRole: [ 'command' ],
  8609. accessibleNameRequired: true,
  8610. nameFromContent: true
  8611. },
  8612. list: {
  8613. type: 'structure',
  8614. requiredOwned: [ 'group', 'listitem' ],
  8615. allowedAttrs: [ 'aria-expanded' ],
  8616. superclassRole: [ 'section' ]
  8617. },
  8618. listbox: {
  8619. type: 'composite',
  8620. requiredOwned: [ 'group', 'option' ],
  8621. allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8622. superclassRole: [ 'select' ],
  8623. accessibleNameRequired: true
  8624. },
  8625. listitem: {
  8626. type: 'structure',
  8627. requiredContext: [ 'list', 'group' ],
  8628. allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
  8629. superclassRole: [ 'section' ],
  8630. nameFromContent: true
  8631. },
  8632. log: {
  8633. type: 'widget',
  8634. allowedAttrs: [ 'aria-expanded' ],
  8635. superclassRole: [ 'section' ]
  8636. },
  8637. main: {
  8638. type: 'landmark',
  8639. allowedAttrs: [ 'aria-expanded' ],
  8640. superclassRole: [ 'landmark' ]
  8641. },
  8642. marquee: {
  8643. type: 'widget',
  8644. allowedAttrs: [ 'aria-expanded' ],
  8645. superclassRole: [ 'section' ]
  8646. },
  8647. math: {
  8648. type: 'structure',
  8649. allowedAttrs: [ 'aria-expanded' ],
  8650. superclassRole: [ 'section' ],
  8651. childrenPresentational: true
  8652. },
  8653. menu: {
  8654. type: 'composite',
  8655. requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],
  8656. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8657. superclassRole: [ 'select' ]
  8658. },
  8659. menubar: {
  8660. type: 'composite',
  8661. requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],
  8662. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8663. superclassRole: [ 'menu' ]
  8664. },
  8665. menuitem: {
  8666. type: 'widget',
  8667. requiredContext: [ 'menu', 'menubar', 'group' ],
  8668. allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
  8669. superclassRole: [ 'command' ],
  8670. accessibleNameRequired: true,
  8671. nameFromContent: true
  8672. },
  8673. menuitemcheckbox: {
  8674. type: 'widget',
  8675. requiredContext: [ 'menu', 'menubar', 'group' ],
  8676. allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],
  8677. superclassRole: [ 'checkbox', 'menuitem' ],
  8678. accessibleNameRequired: true,
  8679. nameFromContent: true,
  8680. childrenPresentational: true
  8681. },
  8682. menuitemradio: {
  8683. type: 'widget',
  8684. requiredContext: [ 'menu', 'menubar', 'group' ],
  8685. allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],
  8686. superclassRole: [ 'menuitemcheckbox', 'radio' ],
  8687. accessibleNameRequired: true,
  8688. nameFromContent: true,
  8689. childrenPresentational: true
  8690. },
  8691. meter: {
  8692. type: 'structure',
  8693. allowedAttrs: [ 'aria-valuetext' ],
  8694. requiredAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow' ],
  8695. superclassRole: [ 'range' ],
  8696. accessibleNameRequired: true,
  8697. childrenPresentational: true
  8698. },
  8699. mark: {
  8700. type: 'structure',
  8701. superclassRole: [ 'section' ],
  8702. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8703. },
  8704. navigation: {
  8705. type: 'landmark',
  8706. allowedAttrs: [ 'aria-expanded' ],
  8707. superclassRole: [ 'landmark' ]
  8708. },
  8709. none: {
  8710. type: 'structure',
  8711. superclassRole: [ 'structure' ],
  8712. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8713. },
  8714. note: {
  8715. type: 'structure',
  8716. allowedAttrs: [ 'aria-expanded' ],
  8717. superclassRole: [ 'section' ]
  8718. },
  8719. option: {
  8720. type: 'widget',
  8721. requiredContext: [ 'group', 'listbox' ],
  8722. allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],
  8723. superclassRole: [ 'input' ],
  8724. accessibleNameRequired: true,
  8725. nameFromContent: true,
  8726. childrenPresentational: true
  8727. },
  8728. paragraph: {
  8729. type: 'structure',
  8730. superclassRole: [ 'section' ],
  8731. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8732. },
  8733. presentation: {
  8734. type: 'structure',
  8735. superclassRole: [ 'structure' ],
  8736. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8737. },
  8738. progressbar: {
  8739. type: 'widget',
  8740. allowedAttrs: [ 'aria-expanded', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext' ],
  8741. superclassRole: [ 'range' ],
  8742. accessibleNameRequired: true,
  8743. childrenPresentational: true
  8744. },
  8745. radio: {
  8746. type: 'widget',
  8747. allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-required' ],
  8748. superclassRole: [ 'input' ],
  8749. accessibleNameRequired: true,
  8750. nameFromContent: true,
  8751. childrenPresentational: true
  8752. },
  8753. radiogroup: {
  8754. type: 'composite',
  8755. requiredOwned: [ 'radio' ],
  8756. allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8757. superclassRole: [ 'select' ],
  8758. accessibleNameRequired: false
  8759. },
  8760. range: {
  8761. type: 'abstract',
  8762. superclassRole: [ 'widget' ]
  8763. },
  8764. region: {
  8765. type: 'landmark',
  8766. allowedAttrs: [ 'aria-expanded' ],
  8767. superclassRole: [ 'landmark' ],
  8768. accessibleNameRequired: false
  8769. },
  8770. roletype: {
  8771. type: 'abstract',
  8772. superclassRole: []
  8773. },
  8774. row: {
  8775. type: 'structure',
  8776. requiredContext: [ 'grid', 'rowgroup', 'table', 'treegrid' ],
  8777. requiredOwned: [ 'cell', 'columnheader', 'gridcell', 'rowheader' ],
  8778. allowedAttrs: [ 'aria-colindex', 'aria-level', 'aria-rowindex', 'aria-selected', 'aria-activedescendant', 'aria-expanded', 'aria-posinset', 'aria-setsize' ],
  8779. superclassRole: [ 'group', 'widget' ],
  8780. nameFromContent: true
  8781. },
  8782. rowgroup: {
  8783. type: 'structure',
  8784. requiredContext: [ 'grid', 'table', 'treegrid' ],
  8785. requiredOwned: [ 'row' ],
  8786. superclassRole: [ 'structure' ],
  8787. nameFromContent: true
  8788. },
  8789. rowheader: {
  8790. type: 'structure',
  8791. requiredContext: [ 'row' ],
  8792. allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],
  8793. superclassRole: [ 'cell', 'gridcell', 'sectionhead' ],
  8794. accessibleNameRequired: false,
  8795. nameFromContent: true
  8796. },
  8797. scrollbar: {
  8798. type: 'widget',
  8799. requiredAttrs: [ 'aria-valuenow' ],
  8800. allowedAttrs: [ 'aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext' ],
  8801. superclassRole: [ 'range' ],
  8802. childrenPresentational: true
  8803. },
  8804. search: {
  8805. type: 'landmark',
  8806. allowedAttrs: [ 'aria-expanded' ],
  8807. superclassRole: [ 'landmark' ]
  8808. },
  8809. searchbox: {
  8810. type: 'widget',
  8811. allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ],
  8812. superclassRole: [ 'textbox' ],
  8813. accessibleNameRequired: true
  8814. },
  8815. section: {
  8816. type: 'abstract',
  8817. superclassRole: [ 'structure' ],
  8818. nameFromContent: true
  8819. },
  8820. sectionhead: {
  8821. type: 'abstract',
  8822. superclassRole: [ 'structure' ],
  8823. nameFromContent: true
  8824. },
  8825. select: {
  8826. type: 'abstract',
  8827. superclassRole: [ 'composite', 'group' ]
  8828. },
  8829. separator: {
  8830. type: 'structure',
  8831. allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-orientation', 'aria-valuetext' ],
  8832. superclassRole: [ 'structure', 'widget' ],
  8833. childrenPresentational: true
  8834. },
  8835. slider: {
  8836. type: 'widget',
  8837. requiredAttrs: [ 'aria-valuenow' ],
  8838. allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-valuetext' ],
  8839. superclassRole: [ 'input', 'range' ],
  8840. accessibleNameRequired: true,
  8841. childrenPresentational: true
  8842. },
  8843. spinbutton: {
  8844. type: 'widget',
  8845. requiredAttrs: [ 'aria-valuenow' ],
  8846. allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-valuetext' ],
  8847. superclassRole: [ 'composite', 'input', 'range' ],
  8848. accessibleNameRequired: true
  8849. },
  8850. status: {
  8851. type: 'widget',
  8852. allowedAttrs: [ 'aria-expanded' ],
  8853. superclassRole: [ 'section' ]
  8854. },
  8855. strong: {
  8856. type: 'structure',
  8857. superclassRole: [ 'section' ],
  8858. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8859. },
  8860. structure: {
  8861. type: 'abstract',
  8862. superclassRole: [ 'roletype' ]
  8863. },
  8864. subscript: {
  8865. type: 'structure',
  8866. superclassRole: [ 'section' ],
  8867. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8868. },
  8869. superscript: {
  8870. type: 'structure',
  8871. superclassRole: [ 'section' ],
  8872. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8873. },
  8874. switch: {
  8875. type: 'widget',
  8876. requiredAttrs: [ 'aria-checked' ],
  8877. allowedAttrs: [ 'aria-readonly' ],
  8878. superclassRole: [ 'checkbox' ],
  8879. accessibleNameRequired: true,
  8880. nameFromContent: true,
  8881. childrenPresentational: true
  8882. },
  8883. suggestion: {
  8884. type: 'structure',
  8885. requiredOwned: [ 'insertion', 'deletion' ],
  8886. superclassRole: [ 'section' ],
  8887. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8888. },
  8889. tab: {
  8890. type: 'widget',
  8891. requiredContext: [ 'tablist' ],
  8892. allowedAttrs: [ 'aria-posinset', 'aria-selected', 'aria-setsize', 'aria-expanded' ],
  8893. superclassRole: [ 'sectionhead', 'widget' ],
  8894. nameFromContent: true,
  8895. childrenPresentational: true
  8896. },
  8897. table: {
  8898. type: 'structure',
  8899. requiredOwned: [ 'rowgroup', 'row' ],
  8900. allowedAttrs: [ 'aria-colcount', 'aria-rowcount', 'aria-expanded' ],
  8901. superclassRole: [ 'section' ],
  8902. accessibleNameRequired: false,
  8903. nameFromContent: true
  8904. },
  8905. tablist: {
  8906. type: 'composite',
  8907. requiredOwned: [ 'tab' ],
  8908. allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ],
  8909. superclassRole: [ 'composite' ]
  8910. },
  8911. tabpanel: {
  8912. type: 'widget',
  8913. allowedAttrs: [ 'aria-expanded' ],
  8914. superclassRole: [ 'section' ],
  8915. accessibleNameRequired: false
  8916. },
  8917. term: {
  8918. type: 'structure',
  8919. allowedAttrs: [ 'aria-expanded' ],
  8920. superclassRole: [ 'section' ],
  8921. nameFromContent: true
  8922. },
  8923. text: {
  8924. type: 'structure',
  8925. superclassRole: [ 'section' ],
  8926. nameFromContent: true
  8927. },
  8928. textbox: {
  8929. type: 'widget',
  8930. allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ],
  8931. superclassRole: [ 'input' ],
  8932. accessibleNameRequired: true
  8933. },
  8934. time: {
  8935. type: 'structure',
  8936. superclassRole: [ 'section' ]
  8937. },
  8938. timer: {
  8939. type: 'widget',
  8940. allowedAttrs: [ 'aria-expanded' ],
  8941. superclassRole: [ 'status' ]
  8942. },
  8943. toolbar: {
  8944. type: 'structure',
  8945. allowedAttrs: [ 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ],
  8946. superclassRole: [ 'group' ],
  8947. accessibleNameRequired: true
  8948. },
  8949. tooltip: {
  8950. type: 'structure',
  8951. allowedAttrs: [ 'aria-expanded' ],
  8952. superclassRole: [ 'section' ],
  8953. nameFromContent: true
  8954. },
  8955. tree: {
  8956. type: 'composite',
  8957. requiredOwned: [ 'group', 'treeitem' ],
  8958. allowedAttrs: [ 'aria-multiselectable', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8959. superclassRole: [ 'select' ],
  8960. accessibleNameRequired: false
  8961. },
  8962. treegrid: {
  8963. type: 'composite',
  8964. requiredOwned: [ 'rowgroup', 'row' ],
  8965. allowedAttrs: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-rowcount' ],
  8966. superclassRole: [ 'grid', 'tree' ],
  8967. accessibleNameRequired: false
  8968. },
  8969. treeitem: {
  8970. type: 'widget',
  8971. requiredContext: [ 'group', 'tree' ],
  8972. allowedAttrs: [ 'aria-checked', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-selected', 'aria-setsize' ],
  8973. superclassRole: [ 'listitem', 'option' ],
  8974. accessibleNameRequired: true,
  8975. nameFromContent: true
  8976. },
  8977. widget: {
  8978. type: 'abstract',
  8979. superclassRole: [ 'roletype' ]
  8980. },
  8981. window: {
  8982. type: 'abstract',
  8983. superclassRole: [ 'roletype' ]
  8984. }
  8985. };
  8986. var aria_roles_default = ariaRoles;
  8987. var dpubRoles = {
  8988. 'doc-abstract': {
  8989. type: 'section',
  8990. allowedAttrs: [ 'aria-expanded' ],
  8991. superclassRole: [ 'section' ]
  8992. },
  8993. 'doc-acknowledgments': {
  8994. type: 'landmark',
  8995. allowedAttrs: [ 'aria-expanded' ],
  8996. superclassRole: [ 'landmark' ]
  8997. },
  8998. 'doc-afterword': {
  8999. type: 'landmark',
  9000. allowedAttrs: [ 'aria-expanded' ],
  9001. superclassRole: [ 'landmark' ]
  9002. },
  9003. 'doc-appendix': {
  9004. type: 'landmark',
  9005. allowedAttrs: [ 'aria-expanded' ],
  9006. superclassRole: [ 'landmark' ]
  9007. },
  9008. 'doc-backlink': {
  9009. type: 'link',
  9010. allowedAttrs: [ 'aria-expanded' ],
  9011. nameFromContent: true,
  9012. superclassRole: [ 'link' ]
  9013. },
  9014. 'doc-biblioentry': {
  9015. type: 'listitem',
  9016. allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
  9017. superclassRole: [ 'listitem' ],
  9018. deprecated: true
  9019. },
  9020. 'doc-bibliography': {
  9021. type: 'landmark',
  9022. allowedAttrs: [ 'aria-expanded' ],
  9023. superclassRole: [ 'landmark' ]
  9024. },
  9025. 'doc-biblioref': {
  9026. type: 'link',
  9027. allowedAttrs: [ 'aria-expanded' ],
  9028. nameFromContent: true,
  9029. superclassRole: [ 'link' ]
  9030. },
  9031. 'doc-chapter': {
  9032. type: 'landmark',
  9033. allowedAttrs: [ 'aria-expanded' ],
  9034. superclassRole: [ 'landmark' ]
  9035. },
  9036. 'doc-colophon': {
  9037. type: 'section',
  9038. allowedAttrs: [ 'aria-expanded' ],
  9039. superclassRole: [ 'section' ]
  9040. },
  9041. 'doc-conclusion': {
  9042. type: 'landmark',
  9043. allowedAttrs: [ 'aria-expanded' ],
  9044. superclassRole: [ 'landmark' ]
  9045. },
  9046. 'doc-cover': {
  9047. type: 'img',
  9048. allowedAttrs: [ 'aria-expanded' ],
  9049. superclassRole: [ 'img' ]
  9050. },
  9051. 'doc-credit': {
  9052. type: 'section',
  9053. allowedAttrs: [ 'aria-expanded' ],
  9054. superclassRole: [ 'section' ]
  9055. },
  9056. 'doc-credits': {
  9057. type: 'landmark',
  9058. allowedAttrs: [ 'aria-expanded' ],
  9059. superclassRole: [ 'landmark' ]
  9060. },
  9061. 'doc-dedication': {
  9062. type: 'section',
  9063. allowedAttrs: [ 'aria-expanded' ],
  9064. superclassRole: [ 'section' ]
  9065. },
  9066. 'doc-endnote': {
  9067. type: 'listitem',
  9068. allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
  9069. superclassRole: [ 'listitem' ],
  9070. deprecated: true
  9071. },
  9072. 'doc-endnotes': {
  9073. type: 'landmark',
  9074. allowedAttrs: [ 'aria-expanded' ],
  9075. superclassRole: [ 'landmark' ]
  9076. },
  9077. 'doc-epigraph': {
  9078. type: 'section',
  9079. allowedAttrs: [ 'aria-expanded' ],
  9080. superclassRole: [ 'section' ]
  9081. },
  9082. 'doc-epilogue': {
  9083. type: 'landmark',
  9084. allowedAttrs: [ 'aria-expanded' ],
  9085. superclassRole: [ 'landmark' ]
  9086. },
  9087. 'doc-errata': {
  9088. type: 'landmark',
  9089. allowedAttrs: [ 'aria-expanded' ],
  9090. superclassRole: [ 'landmark' ]
  9091. },
  9092. 'doc-example': {
  9093. type: 'section',
  9094. allowedAttrs: [ 'aria-expanded' ],
  9095. superclassRole: [ 'section' ]
  9096. },
  9097. 'doc-footnote': {
  9098. type: 'section',
  9099. allowedAttrs: [ 'aria-expanded' ],
  9100. superclassRole: [ 'section' ]
  9101. },
  9102. 'doc-foreword': {
  9103. type: 'landmark',
  9104. allowedAttrs: [ 'aria-expanded' ],
  9105. superclassRole: [ 'landmark' ]
  9106. },
  9107. 'doc-glossary': {
  9108. type: 'landmark',
  9109. allowedAttrs: [ 'aria-expanded' ],
  9110. superclassRole: [ 'landmark' ]
  9111. },
  9112. 'doc-glossref': {
  9113. type: 'link',
  9114. allowedAttrs: [ 'aria-expanded' ],
  9115. nameFromContent: true,
  9116. superclassRole: [ 'link' ]
  9117. },
  9118. 'doc-index': {
  9119. type: 'navigation',
  9120. allowedAttrs: [ 'aria-expanded' ],
  9121. superclassRole: [ 'navigation' ]
  9122. },
  9123. 'doc-introduction': {
  9124. type: 'landmark',
  9125. allowedAttrs: [ 'aria-expanded' ],
  9126. superclassRole: [ 'landmark' ]
  9127. },
  9128. 'doc-noteref': {
  9129. type: 'link',
  9130. allowedAttrs: [ 'aria-expanded' ],
  9131. nameFromContent: true,
  9132. superclassRole: [ 'link' ]
  9133. },
  9134. 'doc-notice': {
  9135. type: 'note',
  9136. allowedAttrs: [ 'aria-expanded' ],
  9137. superclassRole: [ 'note' ]
  9138. },
  9139. 'doc-pagebreak': {
  9140. type: 'separator',
  9141. allowedAttrs: [ 'aria-expanded', 'aria-orientation' ],
  9142. superclassRole: [ 'separator' ],
  9143. childrenPresentational: true
  9144. },
  9145. 'doc-pagelist': {
  9146. type: 'navigation',
  9147. allowedAttrs: [ 'aria-expanded' ],
  9148. superclassRole: [ 'navigation' ]
  9149. },
  9150. 'doc-part': {
  9151. type: 'landmark',
  9152. allowedAttrs: [ 'aria-expanded' ],
  9153. superclassRole: [ 'landmark' ]
  9154. },
  9155. 'doc-preface': {
  9156. type: 'landmark',
  9157. allowedAttrs: [ 'aria-expanded' ],
  9158. superclassRole: [ 'landmark' ]
  9159. },
  9160. 'doc-prologue': {
  9161. type: 'landmark',
  9162. allowedAttrs: [ 'aria-expanded' ],
  9163. superclassRole: [ 'landmark' ]
  9164. },
  9165. 'doc-pullquote': {
  9166. type: 'none',
  9167. superclassRole: [ 'none' ]
  9168. },
  9169. 'doc-qna': {
  9170. type: 'section',
  9171. allowedAttrs: [ 'aria-expanded' ],
  9172. superclassRole: [ 'section' ]
  9173. },
  9174. 'doc-subtitle': {
  9175. type: 'sectionhead',
  9176. allowedAttrs: [ 'aria-expanded' ],
  9177. superclassRole: [ 'sectionhead' ]
  9178. },
  9179. 'doc-tip': {
  9180. type: 'note',
  9181. allowedAttrs: [ 'aria-expanded' ],
  9182. superclassRole: [ 'note' ]
  9183. },
  9184. 'doc-toc': {
  9185. type: 'navigation',
  9186. allowedAttrs: [ 'aria-expanded' ],
  9187. superclassRole: [ 'navigation' ]
  9188. }
  9189. };
  9190. var dpub_roles_default = dpubRoles;
  9191. var graphicsRoles = {
  9192. 'graphics-document': {
  9193. type: 'structure',
  9194. superclassRole: [ 'document' ],
  9195. accessibleNameRequired: true
  9196. },
  9197. 'graphics-object': {
  9198. type: 'structure',
  9199. superclassRole: [ 'group' ],
  9200. nameFromContent: true
  9201. },
  9202. 'graphics-symbol': {
  9203. type: 'structure',
  9204. superclassRole: [ 'img' ],
  9205. accessibleNameRequired: true,
  9206. childrenPresentational: true
  9207. }
  9208. };
  9209. var graphics_roles_default = graphicsRoles;
  9210. var htmlElms = {
  9211. a: {
  9212. variant: {
  9213. href: {
  9214. matches: '[href]',
  9215. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9216. allowedRoles: [ 'button', 'checkbox', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab', 'treeitem', 'doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref' ],
  9217. namingMethods: [ 'subtreeText' ]
  9218. },
  9219. default: {
  9220. contentTypes: [ 'phrasing', 'flow' ],
  9221. allowedRoles: true
  9222. }
  9223. }
  9224. },
  9225. abbr: {
  9226. contentTypes: [ 'phrasing', 'flow' ],
  9227. allowedRoles: true
  9228. },
  9229. address: {
  9230. contentTypes: [ 'flow' ],
  9231. allowedRoles: true
  9232. },
  9233. area: {
  9234. variant: {
  9235. href: {
  9236. matches: '[href]',
  9237. allowedRoles: false
  9238. },
  9239. default: {
  9240. allowedRoles: [ 'button', 'link' ]
  9241. }
  9242. },
  9243. contentTypes: [ 'phrasing', 'flow' ],
  9244. namingMethods: [ 'altText' ]
  9245. },
  9246. article: {
  9247. contentTypes: [ 'sectioning', 'flow' ],
  9248. allowedRoles: [ 'feed', 'presentation', 'none', 'document', 'application', 'main', 'region' ],
  9249. shadowRoot: true
  9250. },
  9251. aside: {
  9252. contentTypes: [ 'sectioning', 'flow' ],
  9253. allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-pullquote', 'doc-tip' ]
  9254. },
  9255. audio: {
  9256. variant: {
  9257. controls: {
  9258. matches: '[controls]',
  9259. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9260. },
  9261. default: {
  9262. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9263. }
  9264. },
  9265. allowedRoles: [ 'application' ],
  9266. chromiumRole: 'Audio'
  9267. },
  9268. b: {
  9269. contentTypes: [ 'phrasing', 'flow' ],
  9270. allowedRoles: true
  9271. },
  9272. base: {
  9273. allowedRoles: false,
  9274. noAriaAttrs: true
  9275. },
  9276. bdi: {
  9277. contentTypes: [ 'phrasing', 'flow' ],
  9278. allowedRoles: true
  9279. },
  9280. bdo: {
  9281. contentTypes: [ 'phrasing', 'flow' ],
  9282. allowedRoles: true
  9283. },
  9284. blockquote: {
  9285. contentTypes: [ 'flow' ],
  9286. allowedRoles: true,
  9287. shadowRoot: true
  9288. },
  9289. body: {
  9290. allowedRoles: false,
  9291. shadowRoot: true
  9292. },
  9293. br: {
  9294. contentTypes: [ 'phrasing', 'flow' ],
  9295. allowedRoles: [ 'presentation', 'none' ],
  9296. namingMethods: [ 'titleText', 'singleSpace' ]
  9297. },
  9298. button: {
  9299. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9300. allowedRoles: [ 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ],
  9301. namingMethods: [ 'subtreeText' ]
  9302. },
  9303. canvas: {
  9304. allowedRoles: true,
  9305. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9306. chromiumRole: 'Canvas'
  9307. },
  9308. caption: {
  9309. allowedRoles: false
  9310. },
  9311. cite: {
  9312. contentTypes: [ 'phrasing', 'flow' ],
  9313. allowedRoles: true
  9314. },
  9315. code: {
  9316. contentTypes: [ 'phrasing', 'flow' ],
  9317. allowedRoles: true
  9318. },
  9319. col: {
  9320. allowedRoles: false,
  9321. noAriaAttrs: true
  9322. },
  9323. colgroup: {
  9324. allowedRoles: false,
  9325. noAriaAttrs: true
  9326. },
  9327. data: {
  9328. contentTypes: [ 'phrasing', 'flow' ],
  9329. allowedRoles: true
  9330. },
  9331. datalist: {
  9332. contentTypes: [ 'phrasing', 'flow' ],
  9333. allowedRoles: false,
  9334. implicitAttrs: {
  9335. 'aria-multiselectable': 'false'
  9336. }
  9337. },
  9338. dd: {
  9339. allowedRoles: false
  9340. },
  9341. del: {
  9342. contentTypes: [ 'phrasing', 'flow' ],
  9343. allowedRoles: true
  9344. },
  9345. dfn: {
  9346. contentTypes: [ 'phrasing', 'flow' ],
  9347. allowedRoles: true
  9348. },
  9349. details: {
  9350. contentTypes: [ 'interactive', 'flow' ],
  9351. allowedRoles: false
  9352. },
  9353. dialog: {
  9354. contentTypes: [ 'flow' ],
  9355. allowedRoles: [ 'alertdialog' ]
  9356. },
  9357. div: {
  9358. contentTypes: [ 'flow' ],
  9359. allowedRoles: true,
  9360. shadowRoot: true
  9361. },
  9362. dl: {
  9363. contentTypes: [ 'flow' ],
  9364. allowedRoles: [ 'group', 'list', 'presentation', 'none' ],
  9365. chromiumRole: 'DescriptionList'
  9366. },
  9367. dt: {
  9368. allowedRoles: [ 'listitem' ]
  9369. },
  9370. em: {
  9371. contentTypes: [ 'phrasing', 'flow' ],
  9372. allowedRoles: true
  9373. },
  9374. embed: {
  9375. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],
  9376. allowedRoles: [ 'application', 'document', 'img', 'presentation', 'none' ],
  9377. chromiumRole: 'EmbeddedObject'
  9378. },
  9379. fieldset: {
  9380. contentTypes: [ 'flow' ],
  9381. allowedRoles: [ 'none', 'presentation', 'radiogroup' ],
  9382. namingMethods: [ 'fieldsetLegendText' ]
  9383. },
  9384. figcaption: {
  9385. allowedRoles: [ 'group', 'none', 'presentation' ]
  9386. },
  9387. figure: {
  9388. contentTypes: [ 'flow' ],
  9389. allowedRoles: true,
  9390. namingMethods: [ 'figureText', 'titleText' ]
  9391. },
  9392. footer: {
  9393. contentTypes: [ 'flow' ],
  9394. allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],
  9395. shadowRoot: true
  9396. },
  9397. form: {
  9398. contentTypes: [ 'flow' ],
  9399. allowedRoles: [ 'search', 'none', 'presentation' ]
  9400. },
  9401. h1: {
  9402. contentTypes: [ 'heading', 'flow' ],
  9403. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9404. shadowRoot: true,
  9405. implicitAttrs: {
  9406. 'aria-level': '1'
  9407. }
  9408. },
  9409. h2: {
  9410. contentTypes: [ 'heading', 'flow' ],
  9411. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9412. shadowRoot: true,
  9413. implicitAttrs: {
  9414. 'aria-level': '2'
  9415. }
  9416. },
  9417. h3: {
  9418. contentTypes: [ 'heading', 'flow' ],
  9419. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9420. shadowRoot: true,
  9421. implicitAttrs: {
  9422. 'aria-level': '3'
  9423. }
  9424. },
  9425. h4: {
  9426. contentTypes: [ 'heading', 'flow' ],
  9427. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9428. shadowRoot: true,
  9429. implicitAttrs: {
  9430. 'aria-level': '4'
  9431. }
  9432. },
  9433. h5: {
  9434. contentTypes: [ 'heading', 'flow' ],
  9435. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9436. shadowRoot: true,
  9437. implicitAttrs: {
  9438. 'aria-level': '5'
  9439. }
  9440. },
  9441. h6: {
  9442. contentTypes: [ 'heading', 'flow' ],
  9443. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9444. shadowRoot: true,
  9445. implicitAttrs: {
  9446. 'aria-level': '6'
  9447. }
  9448. },
  9449. head: {
  9450. allowedRoles: false,
  9451. noAriaAttrs: true
  9452. },
  9453. header: {
  9454. contentTypes: [ 'flow' ],
  9455. allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],
  9456. shadowRoot: true
  9457. },
  9458. hgroup: {
  9459. contentTypes: [ 'heading', 'flow' ],
  9460. allowedRoles: true
  9461. },
  9462. hr: {
  9463. contentTypes: [ 'flow' ],
  9464. allowedRoles: [ 'none', 'presentation', 'doc-pagebreak' ],
  9465. namingMethods: [ 'titleText', 'singleSpace' ]
  9466. },
  9467. html: {
  9468. allowedRoles: false,
  9469. noAriaAttrs: true
  9470. },
  9471. i: {
  9472. contentTypes: [ 'phrasing', 'flow' ],
  9473. allowedRoles: true
  9474. },
  9475. iframe: {
  9476. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],
  9477. allowedRoles: [ 'application', 'document', 'img', 'none', 'presentation' ],
  9478. chromiumRole: 'Iframe'
  9479. },
  9480. img: {
  9481. variant: {
  9482. nonEmptyAlt: {
  9483. matches: [ {
  9484. attributes: {
  9485. alt: '/.+/'
  9486. }
  9487. }, {
  9488. hasAccessibleName: true
  9489. } ],
  9490. allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
  9491. },
  9492. usemap: {
  9493. matches: '[usemap]',
  9494. contentTypes: [ 'interactive', 'embedded', 'flow' ]
  9495. },
  9496. default: {
  9497. allowedRoles: [ 'presentation', 'none' ],
  9498. contentTypes: [ 'embedded', 'flow' ]
  9499. }
  9500. },
  9501. namingMethods: [ 'altText' ]
  9502. },
  9503. input: {
  9504. variant: {
  9505. button: {
  9506. matches: {
  9507. properties: {
  9508. type: 'button'
  9509. }
  9510. },
  9511. allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ]
  9512. },
  9513. buttonType: {
  9514. matches: {
  9515. properties: {
  9516. type: [ 'button', 'submit', 'reset' ]
  9517. }
  9518. },
  9519. namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]
  9520. },
  9521. checkboxPressed: {
  9522. matches: {
  9523. properties: {
  9524. type: 'checkbox'
  9525. },
  9526. attributes: {
  9527. 'aria-pressed': '/.*/'
  9528. }
  9529. },
  9530. allowedRoles: [ 'button', 'menuitemcheckbox', 'option', 'switch' ],
  9531. implicitAttrs: {
  9532. 'aria-checked': 'false'
  9533. }
  9534. },
  9535. checkbox: {
  9536. matches: {
  9537. properties: {
  9538. type: 'checkbox'
  9539. },
  9540. attributes: {
  9541. 'aria-pressed': null
  9542. }
  9543. },
  9544. allowedRoles: [ 'menuitemcheckbox', 'option', 'switch' ],
  9545. implicitAttrs: {
  9546. 'aria-checked': 'false'
  9547. }
  9548. },
  9549. noRoles: {
  9550. matches: {
  9551. properties: {
  9552. type: [ 'color', 'date', 'datetime-local', 'file', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
  9553. }
  9554. },
  9555. allowedRoles: false
  9556. },
  9557. hidden: {
  9558. matches: {
  9559. properties: {
  9560. type: 'hidden'
  9561. }
  9562. },
  9563. contentTypes: [ 'flow' ],
  9564. allowedRoles: false,
  9565. noAriaAttrs: true
  9566. },
  9567. image: {
  9568. matches: {
  9569. properties: {
  9570. type: 'image'
  9571. }
  9572. },
  9573. allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'radio', 'switch' ],
  9574. namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]
  9575. },
  9576. radio: {
  9577. matches: {
  9578. properties: {
  9579. type: 'radio'
  9580. }
  9581. },
  9582. allowedRoles: [ 'menuitemradio' ],
  9583. implicitAttrs: {
  9584. 'aria-checked': 'false'
  9585. }
  9586. },
  9587. textWithList: {
  9588. matches: {
  9589. properties: {
  9590. type: 'text'
  9591. },
  9592. attributes: {
  9593. list: '/.*/'
  9594. }
  9595. },
  9596. allowedRoles: false
  9597. },
  9598. default: {
  9599. contentTypes: [ 'interactive', 'flow' ],
  9600. allowedRoles: [ 'combobox', 'searchbox', 'spinbutton' ],
  9601. implicitAttrs: {
  9602. 'aria-valuenow': ''
  9603. },
  9604. namingMethods: [ 'labelText', 'placeholderText' ]
  9605. }
  9606. }
  9607. },
  9608. ins: {
  9609. contentTypes: [ 'phrasing', 'flow' ],
  9610. allowedRoles: true
  9611. },
  9612. kbd: {
  9613. contentTypes: [ 'phrasing', 'flow' ],
  9614. allowedRoles: true
  9615. },
  9616. label: {
  9617. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9618. allowedRoles: false,
  9619. chromiumRole: 'Label'
  9620. },
  9621. legend: {
  9622. allowedRoles: false
  9623. },
  9624. li: {
  9625. allowedRoles: [ 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'none', 'presentation', 'radio', 'separator', 'tab', 'treeitem', 'doc-biblioentry', 'doc-endnote' ],
  9626. implicitAttrs: {
  9627. 'aria-setsize': '1',
  9628. 'aria-posinset': '1'
  9629. }
  9630. },
  9631. link: {
  9632. contentTypes: [ 'phrasing', 'flow' ],
  9633. allowedRoles: false,
  9634. noAriaAttrs: true
  9635. },
  9636. main: {
  9637. contentTypes: [ 'flow' ],
  9638. allowedRoles: false,
  9639. shadowRoot: true
  9640. },
  9641. map: {
  9642. contentTypes: [ 'phrasing', 'flow' ],
  9643. allowedRoles: false,
  9644. noAriaAttrs: true
  9645. },
  9646. math: {
  9647. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9648. allowedRoles: false
  9649. },
  9650. mark: {
  9651. contentTypes: [ 'phrasing', 'flow' ],
  9652. allowedRoles: true
  9653. },
  9654. menu: {
  9655. contentTypes: [ 'flow' ],
  9656. allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
  9657. },
  9658. meta: {
  9659. variant: {
  9660. itemprop: {
  9661. matches: '[itemprop]',
  9662. contentTypes: [ 'phrasing', 'flow' ]
  9663. }
  9664. },
  9665. allowedRoles: false,
  9666. noAriaAttrs: true
  9667. },
  9668. meter: {
  9669. contentTypes: [ 'phrasing', 'flow' ],
  9670. allowedRoles: false,
  9671. chromiumRole: 'progressbar'
  9672. },
  9673. nav: {
  9674. contentTypes: [ 'sectioning', 'flow' ],
  9675. allowedRoles: [ 'doc-index', 'doc-pagelist', 'doc-toc', 'menu', 'menubar', 'none', 'presentation', 'tablist' ],
  9676. shadowRoot: true
  9677. },
  9678. noscript: {
  9679. contentTypes: [ 'phrasing', 'flow' ],
  9680. allowedRoles: false,
  9681. noAriaAttrs: true
  9682. },
  9683. object: {
  9684. variant: {
  9685. usemap: {
  9686. matches: '[usemap]',
  9687. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9688. },
  9689. default: {
  9690. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9691. }
  9692. },
  9693. allowedRoles: [ 'application', 'document', 'img' ],
  9694. chromiumRole: 'PluginObject'
  9695. },
  9696. ol: {
  9697. contentTypes: [ 'flow' ],
  9698. allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
  9699. },
  9700. optgroup: {
  9701. allowedRoles: false
  9702. },
  9703. option: {
  9704. allowedRoles: false,
  9705. implicitAttrs: {
  9706. 'aria-selected': 'false'
  9707. }
  9708. },
  9709. output: {
  9710. contentTypes: [ 'phrasing', 'flow' ],
  9711. allowedRoles: true,
  9712. namingMethods: [ 'subtreeText' ]
  9713. },
  9714. p: {
  9715. contentTypes: [ 'flow' ],
  9716. allowedRoles: true,
  9717. shadowRoot: true
  9718. },
  9719. param: {
  9720. allowedRoles: false,
  9721. noAriaAttrs: true
  9722. },
  9723. picture: {
  9724. contentTypes: [ 'phrasing', 'flow' ],
  9725. allowedRoles: false,
  9726. noAriaAttrs: true
  9727. },
  9728. pre: {
  9729. contentTypes: [ 'flow' ],
  9730. allowedRoles: true
  9731. },
  9732. progress: {
  9733. contentTypes: [ 'phrasing', 'flow' ],
  9734. allowedRoles: false,
  9735. implicitAttrs: {
  9736. 'aria-valuemax': '100',
  9737. 'aria-valuemin': '0',
  9738. 'aria-valuenow': '0'
  9739. }
  9740. },
  9741. q: {
  9742. contentTypes: [ 'phrasing', 'flow' ],
  9743. allowedRoles: true
  9744. },
  9745. rp: {
  9746. allowedRoles: true
  9747. },
  9748. rt: {
  9749. allowedRoles: true
  9750. },
  9751. ruby: {
  9752. contentTypes: [ 'phrasing', 'flow' ],
  9753. allowedRoles: true
  9754. },
  9755. s: {
  9756. contentTypes: [ 'phrasing', 'flow' ],
  9757. allowedRoles: true
  9758. },
  9759. samp: {
  9760. contentTypes: [ 'phrasing', 'flow' ],
  9761. allowedRoles: true
  9762. },
  9763. script: {
  9764. contentTypes: [ 'phrasing', 'flow' ],
  9765. allowedRoles: false,
  9766. noAriaAttrs: true
  9767. },
  9768. section: {
  9769. contentTypes: [ 'sectioning', 'flow' ],
  9770. allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'group', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
  9771. shadowRoot: true
  9772. },
  9773. select: {
  9774. variant: {
  9775. combobox: {
  9776. matches: {
  9777. attributes: {
  9778. multiple: null,
  9779. size: [ null, '1' ]
  9780. }
  9781. },
  9782. allowedRoles: [ 'menu' ]
  9783. },
  9784. default: {
  9785. allowedRoles: false
  9786. }
  9787. },
  9788. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9789. implicitAttrs: {
  9790. 'aria-valuenow': ''
  9791. },
  9792. namingMethods: [ 'labelText' ]
  9793. },
  9794. slot: {
  9795. contentTypes: [ 'phrasing', 'flow' ],
  9796. allowedRoles: false,
  9797. noAriaAttrs: true
  9798. },
  9799. small: {
  9800. contentTypes: [ 'phrasing', 'flow' ],
  9801. allowedRoles: true
  9802. },
  9803. source: {
  9804. allowedRoles: false,
  9805. noAriaAttrs: true
  9806. },
  9807. span: {
  9808. contentTypes: [ 'phrasing', 'flow' ],
  9809. allowedRoles: true,
  9810. shadowRoot: true
  9811. },
  9812. strong: {
  9813. contentTypes: [ 'phrasing', 'flow' ],
  9814. allowedRoles: true
  9815. },
  9816. style: {
  9817. allowedRoles: false,
  9818. noAriaAttrs: true
  9819. },
  9820. svg: {
  9821. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9822. allowedRoles: true,
  9823. chromiumRole: 'SVGRoot',
  9824. namingMethods: [ 'svgTitleText' ]
  9825. },
  9826. sub: {
  9827. contentTypes: [ 'phrasing', 'flow' ],
  9828. allowedRoles: true
  9829. },
  9830. summary: {
  9831. allowedRoles: false,
  9832. namingMethods: [ 'subtreeText' ]
  9833. },
  9834. sup: {
  9835. contentTypes: [ 'phrasing', 'flow' ],
  9836. allowedRoles: true
  9837. },
  9838. table: {
  9839. contentTypes: [ 'flow' ],
  9840. allowedRoles: true,
  9841. namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]
  9842. },
  9843. tbody: {
  9844. allowedRoles: true
  9845. },
  9846. template: {
  9847. contentTypes: [ 'phrasing', 'flow' ],
  9848. allowedRoles: false,
  9849. noAriaAttrs: true
  9850. },
  9851. textarea: {
  9852. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9853. allowedRoles: false,
  9854. implicitAttrs: {
  9855. 'aria-valuenow': '',
  9856. 'aria-multiline': 'true'
  9857. },
  9858. namingMethods: [ 'labelText', 'placeholderText' ]
  9859. },
  9860. tfoot: {
  9861. allowedRoles: true
  9862. },
  9863. thead: {
  9864. allowedRoles: true
  9865. },
  9866. time: {
  9867. contentTypes: [ 'phrasing', 'flow' ],
  9868. allowedRoles: true
  9869. },
  9870. title: {
  9871. allowedRoles: false,
  9872. noAriaAttrs: true
  9873. },
  9874. td: {
  9875. allowedRoles: true
  9876. },
  9877. th: {
  9878. allowedRoles: true
  9879. },
  9880. tr: {
  9881. allowedRoles: true
  9882. },
  9883. track: {
  9884. allowedRoles: false,
  9885. noAriaAttrs: true
  9886. },
  9887. u: {
  9888. contentTypes: [ 'phrasing', 'flow' ],
  9889. allowedRoles: true
  9890. },
  9891. ul: {
  9892. contentTypes: [ 'flow' ],
  9893. allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
  9894. },
  9895. var: {
  9896. contentTypes: [ 'phrasing', 'flow' ],
  9897. allowedRoles: true
  9898. },
  9899. video: {
  9900. variant: {
  9901. controls: {
  9902. matches: '[controls]',
  9903. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9904. },
  9905. default: {
  9906. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9907. }
  9908. },
  9909. allowedRoles: [ 'application' ],
  9910. chromiumRole: 'video'
  9911. },
  9912. wbr: {
  9913. contentTypes: [ 'phrasing', 'flow' ],
  9914. allowedRoles: [ 'presentation', 'none' ]
  9915. }
  9916. };
  9917. var html_elms_default = htmlElms;
  9918. var cssColors = {
  9919. aliceblue: [ 240, 248, 255 ],
  9920. antiquewhite: [ 250, 235, 215 ],
  9921. aqua: [ 0, 255, 255 ],
  9922. aquamarine: [ 127, 255, 212 ],
  9923. azure: [ 240, 255, 255 ],
  9924. beige: [ 245, 245, 220 ],
  9925. bisque: [ 255, 228, 196 ],
  9926. black: [ 0, 0, 0 ],
  9927. blanchedalmond: [ 255, 235, 205 ],
  9928. blue: [ 0, 0, 255 ],
  9929. blueviolet: [ 138, 43, 226 ],
  9930. brown: [ 165, 42, 42 ],
  9931. burlywood: [ 222, 184, 135 ],
  9932. cadetblue: [ 95, 158, 160 ],
  9933. chartreuse: [ 127, 255, 0 ],
  9934. chocolate: [ 210, 105, 30 ],
  9935. coral: [ 255, 127, 80 ],
  9936. cornflowerblue: [ 100, 149, 237 ],
  9937. cornsilk: [ 255, 248, 220 ],
  9938. crimson: [ 220, 20, 60 ],
  9939. cyan: [ 0, 255, 255 ],
  9940. darkblue: [ 0, 0, 139 ],
  9941. darkcyan: [ 0, 139, 139 ],
  9942. darkgoldenrod: [ 184, 134, 11 ],
  9943. darkgray: [ 169, 169, 169 ],
  9944. darkgreen: [ 0, 100, 0 ],
  9945. darkgrey: [ 169, 169, 169 ],
  9946. darkkhaki: [ 189, 183, 107 ],
  9947. darkmagenta: [ 139, 0, 139 ],
  9948. darkolivegreen: [ 85, 107, 47 ],
  9949. darkorange: [ 255, 140, 0 ],
  9950. darkorchid: [ 153, 50, 204 ],
  9951. darkred: [ 139, 0, 0 ],
  9952. darksalmon: [ 233, 150, 122 ],
  9953. darkseagreen: [ 143, 188, 143 ],
  9954. darkslateblue: [ 72, 61, 139 ],
  9955. darkslategray: [ 47, 79, 79 ],
  9956. darkslategrey: [ 47, 79, 79 ],
  9957. darkturquoise: [ 0, 206, 209 ],
  9958. darkviolet: [ 148, 0, 211 ],
  9959. deeppink: [ 255, 20, 147 ],
  9960. deepskyblue: [ 0, 191, 255 ],
  9961. dimgray: [ 105, 105, 105 ],
  9962. dimgrey: [ 105, 105, 105 ],
  9963. dodgerblue: [ 30, 144, 255 ],
  9964. firebrick: [ 178, 34, 34 ],
  9965. floralwhite: [ 255, 250, 240 ],
  9966. forestgreen: [ 34, 139, 34 ],
  9967. fuchsia: [ 255, 0, 255 ],
  9968. gainsboro: [ 220, 220, 220 ],
  9969. ghostwhite: [ 248, 248, 255 ],
  9970. gold: [ 255, 215, 0 ],
  9971. goldenrod: [ 218, 165, 32 ],
  9972. gray: [ 128, 128, 128 ],
  9973. green: [ 0, 128, 0 ],
  9974. greenyellow: [ 173, 255, 47 ],
  9975. grey: [ 128, 128, 128 ],
  9976. honeydew: [ 240, 255, 240 ],
  9977. hotpink: [ 255, 105, 180 ],
  9978. indianred: [ 205, 92, 92 ],
  9979. indigo: [ 75, 0, 130 ],
  9980. ivory: [ 255, 255, 240 ],
  9981. khaki: [ 240, 230, 140 ],
  9982. lavender: [ 230, 230, 250 ],
  9983. lavenderblush: [ 255, 240, 245 ],
  9984. lawngreen: [ 124, 252, 0 ],
  9985. lemonchiffon: [ 255, 250, 205 ],
  9986. lightblue: [ 173, 216, 230 ],
  9987. lightcoral: [ 240, 128, 128 ],
  9988. lightcyan: [ 224, 255, 255 ],
  9989. lightgoldenrodyellow: [ 250, 250, 210 ],
  9990. lightgray: [ 211, 211, 211 ],
  9991. lightgreen: [ 144, 238, 144 ],
  9992. lightgrey: [ 211, 211, 211 ],
  9993. lightpink: [ 255, 182, 193 ],
  9994. lightsalmon: [ 255, 160, 122 ],
  9995. lightseagreen: [ 32, 178, 170 ],
  9996. lightskyblue: [ 135, 206, 250 ],
  9997. lightslategray: [ 119, 136, 153 ],
  9998. lightslategrey: [ 119, 136, 153 ],
  9999. lightsteelblue: [ 176, 196, 222 ],
  10000. lightyellow: [ 255, 255, 224 ],
  10001. lime: [ 0, 255, 0 ],
  10002. limegreen: [ 50, 205, 50 ],
  10003. linen: [ 250, 240, 230 ],
  10004. magenta: [ 255, 0, 255 ],
  10005. maroon: [ 128, 0, 0 ],
  10006. mediumaquamarine: [ 102, 205, 170 ],
  10007. mediumblue: [ 0, 0, 205 ],
  10008. mediumorchid: [ 186, 85, 211 ],
  10009. mediumpurple: [ 147, 112, 219 ],
  10010. mediumseagreen: [ 60, 179, 113 ],
  10011. mediumslateblue: [ 123, 104, 238 ],
  10012. mediumspringgreen: [ 0, 250, 154 ],
  10013. mediumturquoise: [ 72, 209, 204 ],
  10014. mediumvioletred: [ 199, 21, 133 ],
  10015. midnightblue: [ 25, 25, 112 ],
  10016. mintcream: [ 245, 255, 250 ],
  10017. mistyrose: [ 255, 228, 225 ],
  10018. moccasin: [ 255, 228, 181 ],
  10019. navajowhite: [ 255, 222, 173 ],
  10020. navy: [ 0, 0, 128 ],
  10021. oldlace: [ 253, 245, 230 ],
  10022. olive: [ 128, 128, 0 ],
  10023. olivedrab: [ 107, 142, 35 ],
  10024. orange: [ 255, 165, 0 ],
  10025. orangered: [ 255, 69, 0 ],
  10026. orchid: [ 218, 112, 214 ],
  10027. palegoldenrod: [ 238, 232, 170 ],
  10028. palegreen: [ 152, 251, 152 ],
  10029. paleturquoise: [ 175, 238, 238 ],
  10030. palevioletred: [ 219, 112, 147 ],
  10031. papayawhip: [ 255, 239, 213 ],
  10032. peachpuff: [ 255, 218, 185 ],
  10033. peru: [ 205, 133, 63 ],
  10034. pink: [ 255, 192, 203 ],
  10035. plum: [ 221, 160, 221 ],
  10036. powderblue: [ 176, 224, 230 ],
  10037. purple: [ 128, 0, 128 ],
  10038. rebeccapurple: [ 102, 51, 153 ],
  10039. red: [ 255, 0, 0 ],
  10040. rosybrown: [ 188, 143, 143 ],
  10041. royalblue: [ 65, 105, 225 ],
  10042. saddlebrown: [ 139, 69, 19 ],
  10043. salmon: [ 250, 128, 114 ],
  10044. sandybrown: [ 244, 164, 96 ],
  10045. seagreen: [ 46, 139, 87 ],
  10046. seashell: [ 255, 245, 238 ],
  10047. sienna: [ 160, 82, 45 ],
  10048. silver: [ 192, 192, 192 ],
  10049. skyblue: [ 135, 206, 235 ],
  10050. slateblue: [ 106, 90, 205 ],
  10051. slategray: [ 112, 128, 144 ],
  10052. slategrey: [ 112, 128, 144 ],
  10053. snow: [ 255, 250, 250 ],
  10054. springgreen: [ 0, 255, 127 ],
  10055. steelblue: [ 70, 130, 180 ],
  10056. tan: [ 210, 180, 140 ],
  10057. teal: [ 0, 128, 128 ],
  10058. thistle: [ 216, 191, 216 ],
  10059. tomato: [ 255, 99, 71 ],
  10060. turquoise: [ 64, 224, 208 ],
  10061. violet: [ 238, 130, 238 ],
  10062. wheat: [ 245, 222, 179 ],
  10063. white: [ 255, 255, 255 ],
  10064. whitesmoke: [ 245, 245, 245 ],
  10065. yellow: [ 255, 255, 0 ],
  10066. yellowgreen: [ 154, 205, 50 ]
  10067. };
  10068. var css_colors_default = cssColors;
  10069. var originals = {
  10070. ariaAttrs: aria_attrs_default,
  10071. ariaRoles: _extends({}, aria_roles_default, dpub_roles_default, graphics_roles_default),
  10072. htmlElms: html_elms_default,
  10073. cssColors: css_colors_default
  10074. };
  10075. var standards = _extends({}, originals);
  10076. function configureStandards(config) {
  10077. Object.keys(standards).forEach(function(propName) {
  10078. if (config[propName]) {
  10079. standards[propName] = deep_merge_default(standards[propName], config[propName]);
  10080. }
  10081. });
  10082. }
  10083. function resetStandards() {
  10084. Object.keys(standards).forEach(function(propName) {
  10085. standards[propName] = originals[propName];
  10086. });
  10087. }
  10088. var standards_default = standards;
  10089. function convertColorVal(colorFunc, value, index) {
  10090. if (/%$/.test(value)) {
  10091. if (index === 3) {
  10092. return parseFloat(value) / 100;
  10093. }
  10094. return parseFloat(value) * 255 / 100;
  10095. }
  10096. if (colorFunc[index] === 'h') {
  10097. if (/turn$/.test(value)) {
  10098. return parseFloat(value) * 360;
  10099. }
  10100. if (/rad$/.test(value)) {
  10101. return parseFloat(value) * 57.3;
  10102. }
  10103. }
  10104. return parseFloat(value);
  10105. }
  10106. function hslToRgb(_ref11) {
  10107. var _ref12 = _slicedToArray(_ref11, 4), hue = _ref12[0], saturation = _ref12[1], lightness = _ref12[2], alpha = _ref12[3];
  10108. saturation /= 255;
  10109. lightness /= 255;
  10110. var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
  10111. var low = high * (1 - Math.abs(hue / 60 % 2 - 1));
  10112. var base = lightness - high / 2;
  10113. var colors;
  10114. if (hue < 60) {
  10115. colors = [ high, low, 0 ];
  10116. } else if (hue < 120) {
  10117. colors = [ low, high, 0 ];
  10118. } else if (hue < 180) {
  10119. colors = [ 0, high, low ];
  10120. } else if (hue < 240) {
  10121. colors = [ 0, low, high ];
  10122. } else if (hue < 300) {
  10123. colors = [ low, 0, high ];
  10124. } else {
  10125. colors = [ high, 0, low ];
  10126. }
  10127. return colors.map(function(color11) {
  10128. return Math.round((color11 + base) * 255);
  10129. }).concat(alpha);
  10130. }
  10131. function Color(red, green, blue, alpha) {
  10132. this.red = red;
  10133. this.green = green;
  10134. this.blue = blue;
  10135. this.alpha = alpha;
  10136. this.toHexString = function toHexString() {
  10137. var redString = Math.round(this.red).toString(16);
  10138. var greenString = Math.round(this.green).toString(16);
  10139. var blueString = Math.round(this.blue).toString(16);
  10140. return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString);
  10141. };
  10142. var hexRegex = /^#[0-9a-f]{3,8}$/i;
  10143. var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
  10144. this.parseString = function parseString(colorString) {
  10145. if (standards_default.cssColors[colorString] || colorString === 'transparent') {
  10146. var _ref13 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref14 = _slicedToArray(_ref13, 3), red2 = _ref14[0], green2 = _ref14[1], blue2 = _ref14[2];
  10147. this.red = red2;
  10148. this.green = green2;
  10149. this.blue = blue2;
  10150. this.alpha = colorString === 'transparent' ? 0 : 1;
  10151. return;
  10152. }
  10153. if (colorString.match(colorFnRegex)) {
  10154. this.parseColorFnString(colorString);
  10155. return;
  10156. }
  10157. if (colorString.match(hexRegex)) {
  10158. this.parseHexString(colorString);
  10159. return;
  10160. }
  10161. throw new Error('Unable to parse color "'.concat(colorString, '"'));
  10162. };
  10163. this.parseRgbString = function parseRgbString(colorString) {
  10164. if (colorString === 'transparent') {
  10165. this.red = 0;
  10166. this.green = 0;
  10167. this.blue = 0;
  10168. this.alpha = 0;
  10169. return;
  10170. }
  10171. this.parseColorFnString(colorString);
  10172. };
  10173. this.parseHexString = function parseHexString(colorString) {
  10174. if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) {
  10175. return;
  10176. }
  10177. colorString = colorString.replace('#', '');
  10178. if (colorString.length < 6) {
  10179. var _colorString = colorString, _colorString2 = _slicedToArray(_colorString, 4), r = _colorString2[0], g = _colorString2[1], b = _colorString2[2], a = _colorString2[3];
  10180. colorString = r + r + g + g + b + b;
  10181. if (a) {
  10182. colorString += a + a;
  10183. }
  10184. }
  10185. var aRgbHex = colorString.match(/.{1,2}/g);
  10186. this.red = parseInt(aRgbHex[0], 16);
  10187. this.green = parseInt(aRgbHex[1], 16);
  10188. this.blue = parseInt(aRgbHex[2], 16);
  10189. if (aRgbHex[3]) {
  10190. this.alpha = parseInt(aRgbHex[3], 16) / 255;
  10191. } else {
  10192. this.alpha = 1;
  10193. }
  10194. };
  10195. this.parseColorFnString = function parseColorFnString(colorString) {
  10196. var _ref15 = colorString.match(colorFnRegex) || [], _ref16 = _slicedToArray(_ref15, 3), colorFunc = _ref16[1], colorValStr = _ref16[2];
  10197. if (!colorFunc || !colorValStr) {
  10198. return;
  10199. }
  10200. var colorVals = colorValStr.split(/\s*[,\/\s]\s*/).map(function(str) {
  10201. return str.replace(',', '').trim();
  10202. }).filter(function(str) {
  10203. return str !== '';
  10204. });
  10205. var colorNums = colorVals.map(function(val, index) {
  10206. return convertColorVal(colorFunc, val, index);
  10207. });
  10208. if (colorFunc.substr(0, 3) === 'hsl') {
  10209. colorNums = hslToRgb(colorNums);
  10210. }
  10211. this.red = colorNums[0];
  10212. this.green = colorNums[1];
  10213. this.blue = colorNums[2];
  10214. this.alpha = typeof colorNums[3] === 'number' ? colorNums[3] : 1;
  10215. };
  10216. this.getRelativeLuminance = function getRelativeLuminance() {
  10217. var rSRGB = this.red / 255;
  10218. var gSRGB = this.green / 255;
  10219. var bSRGB = this.blue / 255;
  10220. var r = rSRGB <= .03928 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);
  10221. var g = gSRGB <= .03928 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);
  10222. var b = bSRGB <= .03928 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);
  10223. return .2126 * r + .7152 * g + .0722 * b;
  10224. };
  10225. }
  10226. var color_default = Color;
  10227. function getOwnBackgroundColor(elmStyle) {
  10228. var bgColor = new color_default();
  10229. bgColor.parseString(elmStyle.getPropertyValue('background-color'));
  10230. if (bgColor.alpha !== 0) {
  10231. var opacity = elmStyle.getPropertyValue('opacity');
  10232. bgColor.alpha = bgColor.alpha * opacity;
  10233. }
  10234. return bgColor;
  10235. }
  10236. var get_own_background_color_default = getOwnBackgroundColor;
  10237. function isOpaque(node) {
  10238. var style = window.getComputedStyle(node);
  10239. return element_has_image_default(node, style) || get_own_background_color_default(style).alpha === 1;
  10240. }
  10241. var is_opaque_default = isOpaque;
  10242. function _isSkipLink(element) {
  10243. if (!element.href) {
  10244. return false;
  10245. }
  10246. var firstPageLink;
  10247. if (typeof cache_default.get('firstPageLink') !== 'undefined') {
  10248. firstPageLink = cache_default.get('firstPageLink');
  10249. } else {
  10250. if (!window.location.origin) {
  10251. firstPageLink = query_selector_all_default(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript:"])')[0];
  10252. } else {
  10253. firstPageLink = query_selector_all_default(axe._tree, 'a[href]:not([href^="javascript:"])').find(function(link) {
  10254. return !_isCurrentPageLink(link.actualNode);
  10255. });
  10256. }
  10257. cache_default.set('firstPageLink', firstPageLink || null);
  10258. }
  10259. if (!firstPageLink) {
  10260. return true;
  10261. }
  10262. return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;
  10263. }
  10264. function reduceToElementsBelowFloating(elements, targetNode) {
  10265. var floatingPositions = [ 'fixed', 'sticky' ];
  10266. var finalElements = [];
  10267. var targetFound = false;
  10268. for (var index = 0; index < elements.length; ++index) {
  10269. var currentNode = elements[index];
  10270. if (currentNode === targetNode) {
  10271. targetFound = true;
  10272. }
  10273. var style = window.getComputedStyle(currentNode);
  10274. if (!targetFound && floatingPositions.indexOf(style.position) !== -1) {
  10275. finalElements = [];
  10276. continue;
  10277. }
  10278. finalElements.push(currentNode);
  10279. }
  10280. return finalElements;
  10281. }
  10282. var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating;
  10283. function _visuallyContains(node, parent) {
  10284. var parentScrollAncestor = getScrollAncestor(parent);
  10285. do {
  10286. var nextScrollAncestor = getScrollAncestor(node);
  10287. if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
  10288. return contains2(node, parent);
  10289. }
  10290. node = nextScrollAncestor;
  10291. } while (node);
  10292. return false;
  10293. }
  10294. function getScrollAncestor(node) {
  10295. var vNode = get_node_from_tree_default(node);
  10296. var ancestor = vNode.parent;
  10297. while (ancestor) {
  10298. if (_getScroll(ancestor.actualNode)) {
  10299. return ancestor.actualNode;
  10300. }
  10301. ancestor = ancestor.parent;
  10302. }
  10303. }
  10304. function contains2(node, parent) {
  10305. var style = window.getComputedStyle(parent);
  10306. var overflow = style.getPropertyValue('overflow');
  10307. if (style.getPropertyValue('display') === 'inline') {
  10308. return true;
  10309. }
  10310. var clientRects = Array.from(node.getClientRects());
  10311. var boundingRect = parent.getBoundingClientRect();
  10312. var rect = {
  10313. left: boundingRect.left,
  10314. top: boundingRect.top,
  10315. width: boundingRect.width,
  10316. height: boundingRect.height
  10317. };
  10318. if ([ 'scroll', 'auto' ].includes(overflow) || parent instanceof window.HTMLHtmlElement) {
  10319. rect.width = parent.scrollWidth;
  10320. rect.height = parent.scrollHeight;
  10321. }
  10322. if (clientRects.length === 1 && overflow === 'hidden' && style.getPropertyValue('white-space') === 'nowrap') {
  10323. clientRects[0] = rect;
  10324. }
  10325. return clientRects.some(function(clientRect) {
  10326. return !(Math.ceil(clientRect.left) < Math.floor(rect.left) || Math.ceil(clientRect.top) < Math.floor(rect.top) || Math.floor(clientRect.left + clientRect.width) > Math.ceil(rect.left + rect.width) || Math.floor(clientRect.top + clientRect.height) > Math.ceil(rect.top + rect.height));
  10327. });
  10328. }
  10329. function shadowElementsFromPoint(nodeX, nodeY) {
  10330. var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;
  10331. var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
  10332. if (i > 999) {
  10333. throw new Error('Infinite loop detected');
  10334. }
  10335. return Array.from(root.elementsFromPoint(nodeX, nodeY) || []).filter(function(nodes) {
  10336. return get_root_node_default2(nodes) === root;
  10337. }).reduce(function(stack, elm) {
  10338. if (is_shadow_root_default(elm)) {
  10339. var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);
  10340. stack = stack.concat(shadowStack);
  10341. if (stack.length && _visuallyContains(stack[0], elm)) {
  10342. stack.push(elm);
  10343. }
  10344. } else {
  10345. stack.push(elm);
  10346. }
  10347. return stack;
  10348. }, []);
  10349. }
  10350. var shadow_elements_from_point_default = shadowElementsFromPoint;
  10351. function urlPropsFromAttribute(node, attribute) {
  10352. if (!node.hasAttribute(attribute)) {
  10353. return void 0;
  10354. }
  10355. var nodeName2 = node.nodeName.toUpperCase();
  10356. var parser2 = node;
  10357. if (![ 'A', 'AREA' ].includes(nodeName2) || node.ownerSVGElement) {
  10358. parser2 = document.createElement('a');
  10359. parser2.href = node.getAttribute(attribute);
  10360. }
  10361. var protocol = [ 'https:', 'ftps:' ].includes(parser2.protocol) ? parser2.protocol.replace(/s:$/, ':') : parser2.protocol;
  10362. var parserPathname = /^\//.test(parser2.pathname) ? parser2.pathname : '/'.concat(parser2.pathname);
  10363. var _getPathnameOrFilenam = getPathnameOrFilename(parserPathname), pathname = _getPathnameOrFilenam.pathname, filename = _getPathnameOrFilenam.filename;
  10364. return {
  10365. protocol: protocol,
  10366. hostname: parser2.hostname,
  10367. port: getPort(parser2.port),
  10368. pathname: /\/$/.test(pathname) ? pathname : ''.concat(pathname, '/'),
  10369. search: getSearchPairs(parser2.search),
  10370. hash: getHashRoute(parser2.hash),
  10371. filename: filename
  10372. };
  10373. }
  10374. function getPort(port) {
  10375. var excludePorts = [ '443', '80' ];
  10376. return !excludePorts.includes(port) ? port : '';
  10377. }
  10378. function getPathnameOrFilename(pathname) {
  10379. var filename = pathname.split('/').pop();
  10380. if (!filename || filename.indexOf('.') === -1) {
  10381. return {
  10382. pathname: pathname,
  10383. filename: ''
  10384. };
  10385. }
  10386. return {
  10387. pathname: pathname.replace(filename, ''),
  10388. filename: /index./.test(filename) ? '' : filename
  10389. };
  10390. }
  10391. function getSearchPairs(searchStr) {
  10392. var query = {};
  10393. if (!searchStr || !searchStr.length) {
  10394. return query;
  10395. }
  10396. var pairs = searchStr.substring(1).split('&');
  10397. if (!pairs || !pairs.length) {
  10398. return query;
  10399. }
  10400. for (var index = 0; index < pairs.length; index++) {
  10401. var pair = pairs[index];
  10402. var _pair$split = pair.split('='), _pair$split2 = _slicedToArray(_pair$split, 2), key = _pair$split2[0], _pair$split2$ = _pair$split2[1], value = _pair$split2$ === void 0 ? '' : _pair$split2$;
  10403. query[decodeURIComponent(key)] = decodeURIComponent(value);
  10404. }
  10405. return query;
  10406. }
  10407. function getHashRoute(hash) {
  10408. if (!hash) {
  10409. return '';
  10410. }
  10411. var hashRegex = /#!?\/?/g;
  10412. var hasMatch = hash.match(hashRegex);
  10413. if (!hasMatch) {
  10414. return '';
  10415. }
  10416. var _hasMatch = _slicedToArray(hasMatch, 1), matchedStr = _hasMatch[0];
  10417. if (matchedStr === '#') {
  10418. return '';
  10419. }
  10420. return hash;
  10421. }
  10422. var url_props_from_attribute_default = urlPropsFromAttribute;
  10423. function visuallyOverlaps(rect, parent) {
  10424. var parentRect = parent.getBoundingClientRect();
  10425. var parentTop = parentRect.top;
  10426. var parentLeft = parentRect.left;
  10427. var parentScrollArea = {
  10428. top: parentTop - parent.scrollTop,
  10429. bottom: parentTop - parent.scrollTop + parent.scrollHeight,
  10430. left: parentLeft - parent.scrollLeft,
  10431. right: parentLeft - parent.scrollLeft + parent.scrollWidth
  10432. };
  10433. if (rect.left > parentScrollArea.right && rect.left > parentRect.right || rect.top > parentScrollArea.bottom && rect.top > parentRect.bottom || rect.right < parentScrollArea.left && rect.right < parentRect.left || rect.bottom < parentScrollArea.top && rect.bottom < parentRect.top) {
  10434. return false;
  10435. }
  10436. var style = window.getComputedStyle(parent);
  10437. if (rect.left > parentRect.right || rect.top > parentRect.bottom) {
  10438. return style.overflow === 'scroll' || style.overflow === 'auto' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;
  10439. }
  10440. return true;
  10441. }
  10442. var visually_overlaps_default = visuallyOverlaps;
  10443. var isXHTMLGlobal;
  10444. var nodeIndex = 0;
  10445. var VirtualNode = function(_abstract_virtual_nod) {
  10446. _inherits(VirtualNode, _abstract_virtual_nod);
  10447. var _super = _createSuper(VirtualNode);
  10448. function VirtualNode(node, parent, shadowId) {
  10449. var _this;
  10450. _classCallCheck(this, VirtualNode);
  10451. _this = _super.call(this);
  10452. _this.shadowId = shadowId;
  10453. _this.children = [];
  10454. _this.actualNode = node;
  10455. _this.parent = parent;
  10456. if (!parent) {
  10457. nodeIndex = 0;
  10458. }
  10459. _this.nodeIndex = nodeIndex++;
  10460. _this._isHidden = null;
  10461. _this._cache = {};
  10462. if (typeof isXHTMLGlobal === 'undefined') {
  10463. isXHTMLGlobal = is_xhtml_default(node.ownerDocument);
  10464. }
  10465. _this._isXHTML = isXHTMLGlobal;
  10466. if (node.nodeName.toLowerCase() === 'input') {
  10467. var type = node.getAttribute('type');
  10468. type = _this._isXHTML ? type : (type || '').toLowerCase();
  10469. if (!valid_input_type_default().includes(type)) {
  10470. type = 'text';
  10471. }
  10472. _this._type = type;
  10473. }
  10474. if (cache_default.get('nodeMap')) {
  10475. cache_default.get('nodeMap').set(node, _assertThisInitialized(_this));
  10476. }
  10477. return _this;
  10478. }
  10479. _createClass(VirtualNode, [ {
  10480. key: 'props',
  10481. get: function get() {
  10482. if (!this._cache.hasOwnProperty('props')) {
  10483. var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value, selected = _this$actualNode.selected;
  10484. this._cache.props = {
  10485. nodeType: nodeType,
  10486. nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
  10487. id: id,
  10488. type: this._type,
  10489. multiple: multiple,
  10490. nodeValue: nodeValue,
  10491. value: value,
  10492. selected: selected
  10493. };
  10494. }
  10495. return this._cache.props;
  10496. }
  10497. }, {
  10498. key: 'attr',
  10499. value: function attr(attrName) {
  10500. if (typeof this.actualNode.getAttribute !== 'function') {
  10501. return null;
  10502. }
  10503. return this.actualNode.getAttribute(attrName);
  10504. }
  10505. }, {
  10506. key: 'hasAttr',
  10507. value: function hasAttr(attrName) {
  10508. if (typeof this.actualNode.hasAttribute !== 'function') {
  10509. return false;
  10510. }
  10511. return this.actualNode.hasAttribute(attrName);
  10512. }
  10513. }, {
  10514. key: 'attrNames',
  10515. get: function get() {
  10516. if (!this._cache.hasOwnProperty('attrNames')) {
  10517. var attrs;
  10518. if (this.actualNode.attributes instanceof window.NamedNodeMap) {
  10519. attrs = this.actualNode.attributes;
  10520. } else {
  10521. attrs = this.actualNode.cloneNode(false).attributes;
  10522. }
  10523. this._cache.attrNames = Array.from(attrs).map(function(attr) {
  10524. return attr.name;
  10525. });
  10526. }
  10527. return this._cache.attrNames;
  10528. }
  10529. }, {
  10530. key: 'getComputedStylePropertyValue',
  10531. value: function getComputedStylePropertyValue(property) {
  10532. var key = 'computedStyle_' + property;
  10533. if (!this._cache.hasOwnProperty(key)) {
  10534. if (!this._cache.hasOwnProperty('computedStyle')) {
  10535. this._cache.computedStyle = window.getComputedStyle(this.actualNode);
  10536. }
  10537. this._cache[key] = this._cache.computedStyle.getPropertyValue(property);
  10538. }
  10539. return this._cache[key];
  10540. }
  10541. }, {
  10542. key: 'isFocusable',
  10543. get: function get() {
  10544. if (!this._cache.hasOwnProperty('isFocusable')) {
  10545. this._cache.isFocusable = is_focusable_default(this.actualNode);
  10546. }
  10547. return this._cache.isFocusable;
  10548. }
  10549. }, {
  10550. key: 'tabbableElements',
  10551. get: function get() {
  10552. if (!this._cache.hasOwnProperty('tabbableElements')) {
  10553. this._cache.tabbableElements = get_tabbable_elements_default(this);
  10554. }
  10555. return this._cache.tabbableElements;
  10556. }
  10557. }, {
  10558. key: 'clientRects',
  10559. get: function get() {
  10560. if (!this._cache.hasOwnProperty('clientRects')) {
  10561. this._cache.clientRects = Array.from(this.actualNode.getClientRects()).filter(function(rect) {
  10562. return rect.width > 0;
  10563. });
  10564. }
  10565. return this._cache.clientRects;
  10566. }
  10567. }, {
  10568. key: 'boundingClientRect',
  10569. get: function get() {
  10570. if (!this._cache.hasOwnProperty('boundingClientRect')) {
  10571. this._cache.boundingClientRect = this.actualNode.getBoundingClientRect();
  10572. }
  10573. return this._cache.boundingClientRect;
  10574. }
  10575. } ]);
  10576. return VirtualNode;
  10577. }(abstract_virtual_node_default);
  10578. var virtual_node_default = VirtualNode;
  10579. var hasShadowRoot;
  10580. function getSlotChildren(node) {
  10581. var retVal = [];
  10582. node = node.firstChild;
  10583. while (node) {
  10584. retVal.push(node);
  10585. node = node.nextSibling;
  10586. }
  10587. return retVal;
  10588. }
  10589. function flattenTree(node, shadowId, parent) {
  10590. var retVal, realArray, nodeName2;
  10591. function reduceShadowDOM(res, child, parent2) {
  10592. var replacements = flattenTree(child, shadowId, parent2);
  10593. if (replacements) {
  10594. res = res.concat(replacements);
  10595. }
  10596. return res;
  10597. }
  10598. if (node.documentElement) {
  10599. node = node.documentElement;
  10600. }
  10601. nodeName2 = node.nodeName.toLowerCase();
  10602. if (is_shadow_root_default(node)) {
  10603. hasShadowRoot = true;
  10604. retVal = new virtual_node_default(node, parent, shadowId);
  10605. shadowId = 'a' + Math.random().toString().substring(2);
  10606. realArray = Array.from(node.shadowRoot.childNodes);
  10607. retVal.children = realArray.reduce(function(res, child) {
  10608. return reduceShadowDOM(res, child, retVal);
  10609. }, []);
  10610. return [ retVal ];
  10611. } else {
  10612. if (nodeName2 === 'content' && typeof node.getDistributedNodes === 'function') {
  10613. realArray = Array.from(node.getDistributedNodes());
  10614. return realArray.reduce(function(res, child) {
  10615. return reduceShadowDOM(res, child, parent);
  10616. }, []);
  10617. } else if (nodeName2 === 'slot' && typeof node.assignedNodes === 'function') {
  10618. realArray = Array.from(node.assignedNodes());
  10619. if (!realArray.length) {
  10620. realArray = getSlotChildren(node);
  10621. }
  10622. var styl = window.getComputedStyle(node);
  10623. if (false) {
  10624. retVal = new virtual_node_default(node, parent, shadowId);
  10625. retVal.children = realArray.reduce(function(res, child) {
  10626. return reduceShadowDOM(res, child, retVal);
  10627. }, []);
  10628. return [ retVal ];
  10629. } else {
  10630. return realArray.reduce(function(res, child) {
  10631. return reduceShadowDOM(res, child, parent);
  10632. }, []);
  10633. }
  10634. } else {
  10635. if (node.nodeType === 1) {
  10636. retVal = new virtual_node_default(node, parent, shadowId);
  10637. realArray = Array.from(node.childNodes);
  10638. retVal.children = realArray.reduce(function(res, child) {
  10639. return reduceShadowDOM(res, child, retVal);
  10640. }, []);
  10641. return [ retVal ];
  10642. } else if (node.nodeType === 3) {
  10643. return [ new virtual_node_default(node, parent) ];
  10644. }
  10645. return void 0;
  10646. }
  10647. }
  10648. }
  10649. function getFlattenedTree() {
  10650. var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;
  10651. var shadowId = arguments.length > 1 ? arguments[1] : undefined;
  10652. hasShadowRoot = false;
  10653. cache_default.set('nodeMap', new WeakMap());
  10654. var tree = flattenTree(node, shadowId, null);
  10655. tree[0]._hasShadowRoot = hasShadowRoot;
  10656. return tree;
  10657. }
  10658. var get_flattened_tree_default = getFlattenedTree;
  10659. function getBaseLang(lang) {
  10660. if (!lang) {
  10661. return '';
  10662. }
  10663. return lang.trim().split('-')[0].toLowerCase();
  10664. }
  10665. var get_base_lang_default = getBaseLang;
  10666. function failureSummary(nodeData) {
  10667. var failingChecks = {};
  10668. failingChecks.none = nodeData.none.concat(nodeData.all);
  10669. failingChecks.any = nodeData.any;
  10670. return Object.keys(failingChecks).map(function(key) {
  10671. if (!failingChecks[key].length) {
  10672. return;
  10673. }
  10674. var sum = axe._audit.data.failureSummaries[key];
  10675. if (sum && typeof sum.failureMessage === 'function') {
  10676. return sum.failureMessage(failingChecks[key].map(function(check4) {
  10677. return check4.message || '';
  10678. }));
  10679. }
  10680. }).filter(function(i) {
  10681. return i !== void 0;
  10682. }).join('\n\n');
  10683. }
  10684. var failure_summary_default = failureSummary;
  10685. function incompleteFallbackMessage() {
  10686. var incompleteFallbackMessage2 = axe._audit.data.incompleteFallbackMessage;
  10687. if (typeof incompleteFallbackMessage2 === 'function') {
  10688. incompleteFallbackMessage2 = incompleteFallbackMessage2();
  10689. }
  10690. if (typeof incompleteFallbackMessage2 !== 'string') {
  10691. return '';
  10692. }
  10693. return incompleteFallbackMessage2;
  10694. }
  10695. function normalizeRelatedNodes(node, options) {
  10696. [ 'any', 'all', 'none' ].forEach(function(type) {
  10697. if (!Array.isArray(node[type])) {
  10698. return;
  10699. }
  10700. node[type].filter(function(checkRes) {
  10701. return Array.isArray(checkRes.relatedNodes);
  10702. }).forEach(function(checkRes) {
  10703. checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {
  10704. var res = {
  10705. html: relatedNode.source
  10706. };
  10707. if (options.elementRef && !relatedNode.fromFrame) {
  10708. res.element = relatedNode.element;
  10709. }
  10710. if (options.selectors !== false || relatedNode.fromFrame) {
  10711. res.target = relatedNode.selector;
  10712. }
  10713. if (options.ancestry) {
  10714. res.ancestry = relatedNode.ancestry;
  10715. }
  10716. if (options.xpath) {
  10717. res.xpath = relatedNode.xpath;
  10718. }
  10719. return res;
  10720. });
  10721. });
  10722. });
  10723. }
  10724. var resultKeys = constants_default.resultGroups;
  10725. function processAggregate(results, options) {
  10726. var resultObject = axe.utils.aggregateResult(results);
  10727. resultKeys.forEach(function(key) {
  10728. if (options.resultTypes && !options.resultTypes.includes(key)) {
  10729. (resultObject[key] || []).forEach(function(ruleResult) {
  10730. if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
  10731. ruleResult.nodes = [ ruleResult.nodes[0] ];
  10732. }
  10733. });
  10734. }
  10735. resultObject[key] = (resultObject[key] || []).map(function(ruleResult) {
  10736. ruleResult = Object.assign({}, ruleResult);
  10737. if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
  10738. ruleResult.nodes = ruleResult.nodes.map(function(subResult) {
  10739. if (_typeof(subResult.node) === 'object') {
  10740. subResult.html = subResult.node.source;
  10741. if (options.elementRef && !subResult.node.fromFrame) {
  10742. subResult.element = subResult.node.element;
  10743. }
  10744. if (options.selectors !== false || subResult.node.fromFrame) {
  10745. subResult.target = subResult.node.selector;
  10746. }
  10747. if (options.ancestry) {
  10748. subResult.ancestry = subResult.node.ancestry;
  10749. }
  10750. if (options.xpath) {
  10751. subResult.xpath = subResult.node.xpath;
  10752. }
  10753. }
  10754. delete subResult.result;
  10755. delete subResult.node;
  10756. normalizeRelatedNodes(subResult, options);
  10757. return subResult;
  10758. });
  10759. }
  10760. resultKeys.forEach(function(key2) {
  10761. return delete ruleResult[key2];
  10762. });
  10763. delete ruleResult.pageLevel;
  10764. delete ruleResult.result;
  10765. return ruleResult;
  10766. });
  10767. });
  10768. return resultObject;
  10769. }
  10770. var process_aggregate_default = processAggregate;
  10771. axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
  10772. axe._thisWillBeDeletedDoNotUse.helpers = {
  10773. failureSummary: failure_summary_default,
  10774. incompleteFallbackMessage: incompleteFallbackMessage,
  10775. processAggregate: process_aggregate_default
  10776. };
  10777. var dataRegex = /\$\{\s?data\s?\}/g;
  10778. function substitute(str, data2) {
  10779. if (typeof data2 === 'string') {
  10780. return str.replace(dataRegex, data2);
  10781. }
  10782. for (var prop in data2) {
  10783. if (data2.hasOwnProperty(prop)) {
  10784. var regex = new RegExp('\\${\\s?data\\.' + prop + '\\s?}', 'g');
  10785. var replace = typeof data2[prop] === 'undefined' ? '' : String(data2[prop]);
  10786. str = str.replace(regex, replace);
  10787. }
  10788. }
  10789. return str;
  10790. }
  10791. function processMessage(message, data2) {
  10792. if (!message) {
  10793. return;
  10794. }
  10795. if (Array.isArray(data2)) {
  10796. data2.values = data2.join(', ');
  10797. if (typeof message.singular === 'string' && typeof message.plural === 'string') {
  10798. var str2 = data2.length === 1 ? message.singular : message.plural;
  10799. return substitute(str2, data2);
  10800. }
  10801. return substitute(message, data2);
  10802. }
  10803. if (typeof message === 'string') {
  10804. return substitute(message, data2);
  10805. }
  10806. if (typeof data2 === 'string') {
  10807. var _str = message[data2];
  10808. return substitute(_str, data2);
  10809. }
  10810. var str = message['default'] || incompleteFallbackMessage();
  10811. if (data2 && data2.messageKey && message[data2.messageKey]) {
  10812. str = message[data2.messageKey];
  10813. }
  10814. return processMessage(str, data2);
  10815. }
  10816. var process_message_default = processMessage;
  10817. function getCheckMessage(checkId, type, data2) {
  10818. var check4 = axe._audit.data.checks[checkId];
  10819. if (!check4) {
  10820. throw new Error('Cannot get message for unknown check: '.concat(checkId, '.'));
  10821. }
  10822. if (!check4.messages[type]) {
  10823. throw new Error('Check "'.concat(checkId, '"" does not have a "').concat(type, '" message.'));
  10824. }
  10825. return process_message_default(check4.messages[type], data2);
  10826. }
  10827. var get_check_message_default = getCheckMessage;
  10828. function getCheckOption(check4, ruleID, options) {
  10829. var ruleCheckOption = ((options.rules && options.rules[ruleID] || {}).checks || {})[check4.id];
  10830. var checkOption = (options.checks || {})[check4.id];
  10831. var enabled = check4.enabled;
  10832. var opts = check4.options;
  10833. if (checkOption) {
  10834. if (checkOption.hasOwnProperty('enabled')) {
  10835. enabled = checkOption.enabled;
  10836. }
  10837. if (checkOption.hasOwnProperty('options')) {
  10838. opts = checkOption.options;
  10839. }
  10840. }
  10841. if (ruleCheckOption) {
  10842. if (ruleCheckOption.hasOwnProperty('enabled')) {
  10843. enabled = ruleCheckOption.enabled;
  10844. }
  10845. if (ruleCheckOption.hasOwnProperty('options')) {
  10846. opts = ruleCheckOption.options;
  10847. }
  10848. }
  10849. return {
  10850. enabled: enabled,
  10851. options: opts,
  10852. absolutePaths: options.absolutePaths
  10853. };
  10854. }
  10855. var get_check_option_default = getCheckOption;
  10856. function _getEnvironmentData() {
  10857. var _win$location;
  10858. var metadata = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  10859. var win = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;
  10860. if (metadata && _typeof(metadata) === 'object') {
  10861. return metadata;
  10862. } else if (_typeof(win) !== 'object') {
  10863. return {};
  10864. }
  10865. return {
  10866. testEngine: {
  10867. name: 'axe-core',
  10868. version: axe.version
  10869. },
  10870. testRunner: {
  10871. name: axe._audit.brand
  10872. },
  10873. testEnvironment: getTestEnvironment(win),
  10874. timestamp: new Date().toISOString(),
  10875. url: (_win$location = win.location) === null || _win$location === void 0 ? void 0 : _win$location.href
  10876. };
  10877. }
  10878. function getTestEnvironment(win) {
  10879. if (!win.navigator || _typeof(win.navigator) !== 'object') {
  10880. return {};
  10881. }
  10882. var navigator = win.navigator, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
  10883. var _ref17 = getOrientation(win) || {}, angle = _ref17.angle, type = _ref17.type;
  10884. return {
  10885. userAgent: navigator.userAgent,
  10886. windowWidth: innerWidth,
  10887. windowHeight: innerHeight,
  10888. orientationAngle: angle,
  10889. orientationType: type
  10890. };
  10891. }
  10892. function getOrientation(_ref18) {
  10893. var screen = _ref18.screen;
  10894. return screen.orientation || screen.msOrientation || screen.mozOrientation;
  10895. }
  10896. function createFrameContext(frame, _ref19) {
  10897. var focusable = _ref19.focusable, page = _ref19.page;
  10898. return {
  10899. node: frame,
  10900. include: [],
  10901. exclude: [],
  10902. initiator: false,
  10903. focusable: focusable && frameFocusable(frame),
  10904. size: getBoundingSize(frame),
  10905. page: page
  10906. };
  10907. }
  10908. function frameFocusable(frame) {
  10909. var tabIndex = frame.getAttribute('tabindex');
  10910. if (!tabIndex) {
  10911. return true;
  10912. }
  10913. var _int = parseInt(tabIndex, 10);
  10914. return isNaN(_int) || _int >= 0;
  10915. }
  10916. function getBoundingSize(domNode) {
  10917. var width = parseInt(domNode.getAttribute('width'), 10);
  10918. var height = parseInt(domNode.getAttribute('height'), 10);
  10919. if (isNaN(width) || isNaN(height)) {
  10920. var rect = domNode.getBoundingClientRect();
  10921. width = isNaN(width) ? rect.width : width;
  10922. height = isNaN(height) ? rect.height : height;
  10923. }
  10924. return {
  10925. width: width,
  10926. height: height
  10927. };
  10928. }
  10929. function pushUniqueFrame(context5, frame) {
  10930. if (is_hidden_default(frame) || find_by_default(context5.frames, 'node', frame)) {
  10931. return;
  10932. }
  10933. context5.frames.push(createFrameContext(frame, context5));
  10934. }
  10935. function isPageContext(_ref20) {
  10936. var include = _ref20.include;
  10937. return include.length === 1 && include[0].actualNode === document.documentElement;
  10938. }
  10939. function pushUniqueFrameSelector(context5, type, selectorArray) {
  10940. context5.frames = context5.frames || [];
  10941. var frameSelector = selectorArray.shift();
  10942. var frames = document.querySelectorAll(frameSelector);
  10943. Array.from(frames).forEach(function(frame) {
  10944. context5.frames.forEach(function(contextFrame) {
  10945. if (contextFrame.node === frame) {
  10946. contextFrame[type].push(selectorArray);
  10947. }
  10948. });
  10949. if (!context5.frames.find(function(result) {
  10950. return result.node === frame;
  10951. })) {
  10952. var result = createFrameContext(frame, context5);
  10953. if (selectorArray) {
  10954. result[type].push(selectorArray);
  10955. }
  10956. context5.frames.push(result);
  10957. }
  10958. });
  10959. }
  10960. function normalizeContext(context5) {
  10961. if (context5 && _typeof(context5) === 'object' || context5 instanceof window.NodeList) {
  10962. if (context5 instanceof window.Node) {
  10963. return {
  10964. include: [ context5 ],
  10965. exclude: []
  10966. };
  10967. }
  10968. if (context5.hasOwnProperty('include') || context5.hasOwnProperty('exclude')) {
  10969. return {
  10970. include: context5.include && +context5.include.length ? context5.include : [ document ],
  10971. exclude: context5.exclude || []
  10972. };
  10973. }
  10974. if (context5.length === +context5.length) {
  10975. return {
  10976. include: context5,
  10977. exclude: []
  10978. };
  10979. }
  10980. }
  10981. if (typeof context5 === 'string') {
  10982. return {
  10983. include: [ context5 ],
  10984. exclude: []
  10985. };
  10986. }
  10987. return {
  10988. include: [ document ],
  10989. exclude: []
  10990. };
  10991. }
  10992. function parseSelectorArray(context5, type) {
  10993. var item, result = [], nodeList;
  10994. for (var i = 0, l = context5[type].length; i < l; i++) {
  10995. item = context5[type][i];
  10996. if (typeof item === 'string') {
  10997. nodeList = Array.from(document.querySelectorAll(item));
  10998. result = result.concat(nodeList.map(function(node) {
  10999. return get_node_from_tree_default(node);
  11000. }));
  11001. break;
  11002. } else if (item && item.length && !(item instanceof window.Node)) {
  11003. if (item.length > 1) {
  11004. pushUniqueFrameSelector(context5, type, item);
  11005. } else {
  11006. nodeList = Array.from(document.querySelectorAll(item[0]));
  11007. result = result.concat(nodeList.map(function(node) {
  11008. return get_node_from_tree_default(node);
  11009. }));
  11010. }
  11011. } else if (item instanceof window.Node) {
  11012. if (item.documentElement instanceof window.Node) {
  11013. result.push(context5.flatTree[0]);
  11014. } else {
  11015. result.push(get_node_from_tree_default(item));
  11016. }
  11017. }
  11018. }
  11019. return result.filter(function(r) {
  11020. return r;
  11021. });
  11022. }
  11023. function validateContext(context5) {
  11024. if (context5.include.length === 0) {
  11025. if (context5.frames.length === 0) {
  11026. var env = _respondable.isInFrame() ? 'frame' : 'page';
  11027. return new Error('No elements found for include in ' + env + ' Context');
  11028. }
  11029. context5.frames.forEach(function(frame, i) {
  11030. if (frame.include.length === 0) {
  11031. return new Error('No elements found for include in Context of frame ' + i);
  11032. }
  11033. });
  11034. }
  11035. }
  11036. function getRootNode2(_ref21) {
  11037. var include = _ref21.include, exclude = _ref21.exclude;
  11038. var selectors = Array.from(include).concat(Array.from(exclude));
  11039. for (var i = 0; i < selectors.length; ++i) {
  11040. var item = selectors[i];
  11041. if (item instanceof window.Element) {
  11042. return item.ownerDocument.documentElement;
  11043. }
  11044. if (item instanceof window.Document) {
  11045. return item.documentElement;
  11046. }
  11047. }
  11048. return document.documentElement;
  11049. }
  11050. function Context(spec, flatTree) {
  11051. var _spec, _spec2, _spec3, _spec4, _this2 = this;
  11052. spec = clone_default(spec);
  11053. this.frames = [];
  11054. this.page = typeof ((_spec = spec) === null || _spec === void 0 ? void 0 : _spec.page) === 'boolean' ? spec.page : void 0;
  11055. this.initiator = typeof ((_spec2 = spec) === null || _spec2 === void 0 ? void 0 : _spec2.initiator) === 'boolean' ? spec.initiator : true;
  11056. this.focusable = typeof ((_spec3 = spec) === null || _spec3 === void 0 ? void 0 : _spec3.focusable) === 'boolean' ? spec.focusable : true;
  11057. this.size = _typeof((_spec4 = spec) === null || _spec4 === void 0 ? void 0 : _spec4.size) === 'object' ? spec.size : {};
  11058. spec = normalizeContext(spec);
  11059. this.flatTree = flatTree !== null && flatTree !== void 0 ? flatTree : get_flattened_tree_default(getRootNode2(spec));
  11060. this.exclude = spec.exclude;
  11061. this.include = spec.include;
  11062. this.include = parseSelectorArray(this, 'include');
  11063. this.exclude = parseSelectorArray(this, 'exclude');
  11064. select_default('frame, iframe', this).forEach(function(frame) {
  11065. if (is_node_in_context_default(frame, _this2)) {
  11066. pushUniqueFrame(_this2, frame.actualNode);
  11067. }
  11068. });
  11069. if (typeof this.page === 'undefined') {
  11070. this.page = isPageContext(this);
  11071. this.frames.forEach(function(frame) {
  11072. frame.page = _this2.page;
  11073. });
  11074. }
  11075. var err2 = validateContext(this);
  11076. if (err2 instanceof Error) {
  11077. throw err2;
  11078. }
  11079. if (!Array.isArray(this.include)) {
  11080. this.include = Array.from(this.include);
  11081. }
  11082. this.include.sort(node_sorter_default);
  11083. }
  11084. function _getFrameContexts(context5) {
  11085. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11086. if (options.iframes === false) {
  11087. return [];
  11088. }
  11089. var _Context = new Context(context5), frames = _Context.frames;
  11090. return frames.map(function(_ref22) {
  11091. var node = _ref22.node, frameContext = _objectWithoutProperties(_ref22, _excluded2);
  11092. frameContext.initiator = false;
  11093. var frameSelector = _getAncestry(node);
  11094. return {
  11095. frameSelector: frameSelector,
  11096. frameContext: frameContext
  11097. };
  11098. });
  11099. }
  11100. function getRule(ruleId) {
  11101. var rule3 = axe._audit.rules.find(function(rule4) {
  11102. return rule4.id === ruleId;
  11103. });
  11104. if (!rule3) {
  11105. throw new Error('Cannot find rule by id: '.concat(ruleId));
  11106. }
  11107. return rule3;
  11108. }
  11109. var get_rule_default = getRule;
  11110. function _getScroll(elm) {
  11111. var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  11112. var overflowX = elm.scrollWidth > elm.clientWidth + buffer;
  11113. var overflowY = elm.scrollHeight > elm.clientHeight + buffer;
  11114. if (!(overflowX || overflowY)) {
  11115. return;
  11116. }
  11117. var style = window.getComputedStyle(elm);
  11118. var scrollableX = isScrollable(style, 'overflow-x');
  11119. var scrollableY = isScrollable(style, 'overflow-y');
  11120. if (overflowX && scrollableX || overflowY && scrollableY) {
  11121. return {
  11122. elm: elm,
  11123. top: elm.scrollTop,
  11124. left: elm.scrollLeft
  11125. };
  11126. }
  11127. }
  11128. function isScrollable(style, prop) {
  11129. var overflowProp = style.getPropertyValue(prop);
  11130. return [ 'scroll', 'auto' ].includes(overflowProp);
  11131. }
  11132. function getElmScrollRecursive(root) {
  11133. return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) {
  11134. var scroll = _getScroll(elm);
  11135. if (scroll) {
  11136. scrolls.push(scroll);
  11137. }
  11138. return scrolls.concat(getElmScrollRecursive(elm));
  11139. }, []);
  11140. }
  11141. function getScrollState() {
  11142. var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
  11143. var root = win.document.documentElement;
  11144. var windowScroll = [ win.pageXOffset !== void 0 ? {
  11145. elm: win,
  11146. top: win.pageYOffset,
  11147. left: win.pageXOffset
  11148. } : {
  11149. elm: root,
  11150. top: root.scrollTop,
  11151. left: root.scrollLeft
  11152. } ];
  11153. return windowScroll.concat(getElmScrollRecursive(document.body));
  11154. }
  11155. var get_scroll_state_default = getScrollState;
  11156. function _getStandards() {
  11157. return clone_default(standards_default);
  11158. }
  11159. function getStyleSheetFactory(dynamicDoc) {
  11160. if (!dynamicDoc) {
  11161. throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument');
  11162. }
  11163. return function(options) {
  11164. var data2 = options.data, _options$isCrossOrigi = options.isCrossOrigin, isCrossOrigin = _options$isCrossOrigi === void 0 ? false : _options$isCrossOrigi, shadowId = options.shadowId, root = options.root, priority = options.priority, _options$isLink = options.isLink, isLink = _options$isLink === void 0 ? false : _options$isLink;
  11165. var style = dynamicDoc.createElement('style');
  11166. if (isLink) {
  11167. var text32 = dynamicDoc.createTextNode('@import "'.concat(data2.href, '"'));
  11168. style.appendChild(text32);
  11169. } else {
  11170. style.appendChild(dynamicDoc.createTextNode(data2));
  11171. }
  11172. dynamicDoc.head.appendChild(style);
  11173. return {
  11174. sheet: style.sheet,
  11175. isCrossOrigin: isCrossOrigin,
  11176. shadowId: shadowId,
  11177. root: root,
  11178. priority: priority
  11179. };
  11180. };
  11181. }
  11182. var get_stylesheet_factory_default = getStyleSheetFactory;
  11183. var styleSheet;
  11184. function injectStyle(style) {
  11185. if (styleSheet && styleSheet.parentNode) {
  11186. if (styleSheet.styleSheet === void 0) {
  11187. styleSheet.appendChild(document.createTextNode(style));
  11188. } else {
  11189. styleSheet.styleSheet.cssText += style;
  11190. }
  11191. return styleSheet;
  11192. }
  11193. if (!style) {
  11194. return;
  11195. }
  11196. var head = document.head || document.getElementsByTagName('head')[0];
  11197. styleSheet = document.createElement('style');
  11198. styleSheet.type = 'text/css';
  11199. if (styleSheet.styleSheet === void 0) {
  11200. styleSheet.appendChild(document.createTextNode(style));
  11201. } else {
  11202. styleSheet.styleSheet.cssText = style;
  11203. }
  11204. head.appendChild(styleSheet);
  11205. return styleSheet;
  11206. }
  11207. var inject_style_default = injectStyle;
  11208. function isHidden(el, recursed) {
  11209. var node = get_node_from_tree_default(el);
  11210. if (el.nodeType === 9) {
  11211. return false;
  11212. }
  11213. if (el.nodeType === 11) {
  11214. el = el.host;
  11215. }
  11216. if (node && node._isHidden !== null) {
  11217. return node._isHidden;
  11218. }
  11219. var style = window.getComputedStyle(el, null);
  11220. if (!style || !el.parentNode || style.getPropertyValue('display') === 'none' || !recursed && style.getPropertyValue('visibility') === 'hidden' || el.getAttribute('aria-hidden') === 'true') {
  11221. return true;
  11222. }
  11223. var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
  11224. var hidden = isHidden(parent, true);
  11225. if (node) {
  11226. node._isHidden = hidden;
  11227. }
  11228. return hidden;
  11229. }
  11230. var is_hidden_default = isHidden;
  11231. function isHtmlElement(node) {
  11232. var _node$props$nodeName, _node$props;
  11233. var nodeName2 = (_node$props$nodeName = (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.nodeName) !== null && _node$props$nodeName !== void 0 ? _node$props$nodeName : node.nodeName.toLowerCase();
  11234. if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
  11235. return false;
  11236. }
  11237. return !!standards_default.htmlElms[nodeName2];
  11238. }
  11239. var is_html_element_default = isHtmlElement;
  11240. function getDeepest(collection) {
  11241. return collection.sort(function(a, b) {
  11242. if (_contains(a, b)) {
  11243. return 1;
  11244. }
  11245. return -1;
  11246. })[0];
  11247. }
  11248. function isNodeInContext(node, context5) {
  11249. var include = context5.include && getDeepest(context5.include.filter(function(candidate) {
  11250. return _contains(candidate, node);
  11251. }));
  11252. var exclude = context5.exclude && getDeepest(context5.exclude.filter(function(candidate) {
  11253. return _contains(candidate, node);
  11254. }));
  11255. if (!exclude && include || exclude && _contains(exclude, include)) {
  11256. return true;
  11257. }
  11258. return false;
  11259. }
  11260. var is_node_in_context_default = isNodeInContext;
  11261. function matchAncestry(ancestryA, ancestryB) {
  11262. if (ancestryA.length !== ancestryB.length) {
  11263. return false;
  11264. }
  11265. return ancestryA.every(function(selectorA, index) {
  11266. var selectorB = ancestryB[index];
  11267. if (!Array.isArray(selectorA)) {
  11268. return selectorA === selectorB;
  11269. }
  11270. if (selectorA.length !== selectorB.length) {
  11271. return false;
  11272. }
  11273. return selectorA.every(function(str, index2) {
  11274. return selectorB[index2] === str;
  11275. });
  11276. });
  11277. }
  11278. var match_ancestry_default = matchAncestry;
  11279. var memoizee = __toModule(require_memoizee());
  11280. axe._memoizedFns = [];
  11281. function memoizeImplementation(fn) {
  11282. var memoized = memoizee['default'](fn);
  11283. axe._memoizedFns.push(memoized);
  11284. return memoized;
  11285. }
  11286. var memoize_default = memoizeImplementation;
  11287. function nodeSorter(nodeA, nodeB) {
  11288. nodeA = nodeA.actualNode || nodeA;
  11289. nodeB = nodeB.actualNode || nodeB;
  11290. if (nodeA === nodeB) {
  11291. return 0;
  11292. }
  11293. if (nodeA.compareDocumentPosition(nodeB) & 4) {
  11294. return -1;
  11295. } else {
  11296. return 1;
  11297. }
  11298. }
  11299. var node_sorter_default = nodeSorter;
  11300. function parseSameOriginStylesheet(sheet, options, priority, importedUrls) {
  11301. var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  11302. var rules = Array.from(sheet.cssRules);
  11303. if (!rules) {
  11304. return Promise.resolve();
  11305. }
  11306. var cssImportRules = rules.filter(function(r) {
  11307. return r.type === 3;
  11308. });
  11309. if (!cssImportRules.length) {
  11310. return Promise.resolve({
  11311. isCrossOrigin: isCrossOrigin,
  11312. priority: priority,
  11313. root: options.rootNode,
  11314. shadowId: options.shadowId,
  11315. sheet: sheet
  11316. });
  11317. }
  11318. var cssImportUrlsNotAlreadyImported = cssImportRules.filter(function(rule3) {
  11319. return rule3.href;
  11320. }).map(function(rule3) {
  11321. return rule3.href;
  11322. }).filter(function(url) {
  11323. return !importedUrls.includes(url);
  11324. });
  11325. var promises = cssImportUrlsNotAlreadyImported.map(function(importUrl, cssRuleIndex) {
  11326. var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]);
  11327. var isCrossOriginRequest = /^https?:\/\/|^\/\//i.test(importUrl);
  11328. return parse_crossorigin_stylesheet_default(importUrl, options, newPriority, importedUrls, isCrossOriginRequest);
  11329. });
  11330. var nonImportCSSRules = rules.filter(function(r) {
  11331. return r.type !== 3;
  11332. });
  11333. if (!nonImportCSSRules.length) {
  11334. return Promise.all(promises);
  11335. }
  11336. promises.push(Promise.resolve(options.convertDataToStylesheet({
  11337. data: nonImportCSSRules.map(function(rule3) {
  11338. return rule3.cssText;
  11339. }).join(),
  11340. isCrossOrigin: isCrossOrigin,
  11341. priority: priority,
  11342. root: options.rootNode,
  11343. shadowId: options.shadowId
  11344. })));
  11345. return Promise.all(promises);
  11346. }
  11347. var parse_sameorigin_stylesheet_default = parseSameOriginStylesheet;
  11348. function parseStylesheet(sheet, options, priority, importedUrls) {
  11349. var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  11350. var isSameOrigin = isSameOriginStylesheet(sheet);
  11351. if (isSameOrigin) {
  11352. return parse_sameorigin_stylesheet_default(sheet, options, priority, importedUrls, isCrossOrigin);
  11353. }
  11354. return parse_crossorigin_stylesheet_default(sheet.href, options, priority, importedUrls, true);
  11355. }
  11356. function isSameOriginStylesheet(sheet) {
  11357. try {
  11358. var rules = sheet.cssRules;
  11359. if (!rules && sheet.href) {
  11360. return false;
  11361. }
  11362. return true;
  11363. } catch (e) {
  11364. return false;
  11365. }
  11366. }
  11367. var parse_stylesheet_default = parseStylesheet;
  11368. function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) {
  11369. importedUrls.push(url);
  11370. return new Promise(function(resolve, reject) {
  11371. var request = new XMLHttpRequest();
  11372. request.open('GET', url);
  11373. request.timeout = constants_default.preload.timeout;
  11374. request.addEventListener('error', reject);
  11375. request.addEventListener('timeout', reject);
  11376. request.addEventListener('loadend', function(event) {
  11377. if (event.loaded && request.responseText) {
  11378. return resolve(request.responseText);
  11379. }
  11380. reject(request.responseText);
  11381. });
  11382. request.send();
  11383. }).then(function(data2) {
  11384. var result = options.convertDataToStylesheet({
  11385. data: data2,
  11386. isCrossOrigin: isCrossOrigin,
  11387. priority: priority,
  11388. root: options.rootNode,
  11389. shadowId: options.shadowId
  11390. });
  11391. return parse_stylesheet_default(result.sheet, options, priority, importedUrls, result.isCrossOrigin);
  11392. });
  11393. }
  11394. var parse_crossorigin_stylesheet_default = parseCrossOriginStylesheet;
  11395. var performanceTimer = function() {
  11396. function now() {
  11397. if (window.performance && window.performance) {
  11398. return window.performance.now();
  11399. }
  11400. }
  11401. var originalTime = null;
  11402. var lastRecordedTime = now();
  11403. return {
  11404. start: function start() {
  11405. this.mark('mark_axe_start');
  11406. },
  11407. end: function end() {
  11408. this.mark('mark_axe_end');
  11409. this.measure('axe', 'mark_axe_start', 'mark_axe_end');
  11410. this.logMeasures('axe');
  11411. },
  11412. auditStart: function auditStart() {
  11413. this.mark('mark_audit_start');
  11414. },
  11415. auditEnd: function auditEnd() {
  11416. this.mark('mark_audit_end');
  11417. this.measure('audit_start_to_end', 'mark_audit_start', 'mark_audit_end');
  11418. this.logMeasures();
  11419. },
  11420. mark: function mark(markName) {
  11421. if (window.performance && window.performance.mark !== void 0) {
  11422. window.performance.mark(markName);
  11423. }
  11424. },
  11425. measure: function measure(measureName, startMark, endMark) {
  11426. if (window.performance && window.performance.measure !== void 0) {
  11427. window.performance.measure(measureName, startMark, endMark);
  11428. }
  11429. },
  11430. logMeasures: function logMeasures(measureName) {
  11431. function logMeasure(req2) {
  11432. log_default('Measure ' + req2.name + ' took ' + req2.duration + 'ms');
  11433. }
  11434. if (window.performance && window.performance.getEntriesByType !== void 0) {
  11435. var axeStart = window.performance.getEntriesByName('mark_axe_start')[0];
  11436. var measures = window.performance.getEntriesByType('measure').filter(function(measure) {
  11437. return measure.startTime >= axeStart.startTime;
  11438. });
  11439. for (var i = 0; i < measures.length; ++i) {
  11440. var req = measures[i];
  11441. if (req.name === measureName) {
  11442. logMeasure(req);
  11443. return;
  11444. }
  11445. logMeasure(req);
  11446. }
  11447. }
  11448. },
  11449. timeElapsed: function timeElapsed() {
  11450. return now() - lastRecordedTime;
  11451. },
  11452. reset: function reset() {
  11453. if (!originalTime) {
  11454. originalTime = now();
  11455. }
  11456. lastRecordedTime = now();
  11457. }
  11458. };
  11459. }();
  11460. var performance_timer_default = performanceTimer;
  11461. if (typeof Object.assign !== 'function') {
  11462. (function() {
  11463. Object.assign = function(target) {
  11464. if (target === void 0 || target === null) {
  11465. throw new TypeError('Cannot convert undefined or null to object');
  11466. }
  11467. var output = Object(target);
  11468. for (var index = 1; index < arguments.length; index++) {
  11469. var source = arguments[index];
  11470. if (source !== void 0 && source !== null) {
  11471. for (var nextKey in source) {
  11472. if (source.hasOwnProperty(nextKey)) {
  11473. output[nextKey] = source[nextKey];
  11474. }
  11475. }
  11476. }
  11477. }
  11478. return output;
  11479. };
  11480. })();
  11481. }
  11482. if (!Array.prototype.find) {
  11483. Object.defineProperty(Array.prototype, 'find', {
  11484. value: function value(predicate) {
  11485. if (this === null) {
  11486. throw new TypeError('Array.prototype.find called on null or undefined');
  11487. }
  11488. if (typeof predicate !== 'function') {
  11489. throw new TypeError('predicate must be a function');
  11490. }
  11491. var list = Object(this);
  11492. var length = list.length >>> 0;
  11493. var thisArg = arguments[1];
  11494. var value;
  11495. for (var i = 0; i < length; i++) {
  11496. value = list[i];
  11497. if (predicate.call(thisArg, value, i, list)) {
  11498. return value;
  11499. }
  11500. }
  11501. return void 0;
  11502. }
  11503. });
  11504. }
  11505. if (!Array.prototype.findIndex) {
  11506. Object.defineProperty(Array.prototype, 'findIndex', {
  11507. value: function value(predicate, thisArg) {
  11508. if (this === null) {
  11509. throw new TypeError('Array.prototype.find called on null or undefined');
  11510. }
  11511. if (typeof predicate !== 'function') {
  11512. throw new TypeError('predicate must be a function');
  11513. }
  11514. var list = Object(this);
  11515. var length = list.length >>> 0;
  11516. var value;
  11517. for (var i = 0; i < length; i++) {
  11518. value = list[i];
  11519. if (predicate.call(thisArg, value, i, list)) {
  11520. return i;
  11521. }
  11522. }
  11523. return -1;
  11524. }
  11525. });
  11526. }
  11527. function _pollyfillElementsFromPoint() {
  11528. if (document.elementsFromPoint) {
  11529. return document.elementsFromPoint;
  11530. }
  11531. if (document.msElementsFromPoint) {
  11532. return document.msElementsFromPoint;
  11533. }
  11534. var usePointer = function() {
  11535. var element = document.createElement('x');
  11536. element.style.cssText = 'pointer-events:auto';
  11537. return element.style.pointerEvents === 'auto';
  11538. }();
  11539. var cssProp = usePointer ? 'pointer-events' : 'visibility';
  11540. var cssDisableVal = usePointer ? 'none' : 'hidden';
  11541. var style = document.createElement('style');
  11542. style.innerHTML = usePointer ? '* { pointer-events: all }' : '* { visibility: visible }';
  11543. return function(x, y) {
  11544. var current, i, d;
  11545. var elements = [];
  11546. var previousPointerEvents = [];
  11547. document.head.appendChild(style);
  11548. while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1) {
  11549. elements.push(current);
  11550. previousPointerEvents.push({
  11551. value: current.style.getPropertyValue(cssProp),
  11552. priority: current.style.getPropertyPriority(cssProp)
  11553. });
  11554. current.style.setProperty(cssProp, cssDisableVal, 'important');
  11555. }
  11556. if (elements.indexOf(document.documentElement) < elements.length - 1) {
  11557. elements.splice(elements.indexOf(document.documentElement), 1);
  11558. elements.push(document.documentElement);
  11559. }
  11560. for (i = previousPointerEvents.length; !!(d = previousPointerEvents[--i]); ) {
  11561. elements[i].style.setProperty(cssProp, d.value ? d.value : '', d.priority);
  11562. }
  11563. document.head.removeChild(style);
  11564. return elements;
  11565. };
  11566. }
  11567. if (typeof window.addEventListener === 'function') {
  11568. document.elementsFromPoint = _pollyfillElementsFromPoint();
  11569. }
  11570. if (!Array.prototype.includes) {
  11571. Object.defineProperty(Array.prototype, 'includes', {
  11572. value: function value(searchElement) {
  11573. var O = Object(this);
  11574. var len = parseInt(O.length, 10) || 0;
  11575. if (len === 0) {
  11576. return false;
  11577. }
  11578. var n = parseInt(arguments[1], 10) || 0;
  11579. var k;
  11580. if (n >= 0) {
  11581. k = n;
  11582. } else {
  11583. k = len + n;
  11584. if (k < 0) {
  11585. k = 0;
  11586. }
  11587. }
  11588. var currentElement;
  11589. while (k < len) {
  11590. currentElement = O[k];
  11591. if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {
  11592. return true;
  11593. }
  11594. k++;
  11595. }
  11596. return false;
  11597. }
  11598. });
  11599. }
  11600. if (!Array.prototype.some) {
  11601. Object.defineProperty(Array.prototype, 'some', {
  11602. value: function value(fun) {
  11603. if (this == null) {
  11604. throw new TypeError('Array.prototype.some called on null or undefined');
  11605. }
  11606. if (typeof fun !== 'function') {
  11607. throw new TypeError();
  11608. }
  11609. var t = Object(this);
  11610. var len = t.length >>> 0;
  11611. var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
  11612. for (var i = 0; i < len; i++) {
  11613. if (i in t && fun.call(thisArg, t[i], i, t)) {
  11614. return true;
  11615. }
  11616. }
  11617. return false;
  11618. }
  11619. });
  11620. }
  11621. if (!Array.from) {
  11622. Object.defineProperty(Array, 'from', {
  11623. value: function() {
  11624. var toStr = Object.prototype.toString;
  11625. var isCallable = function isCallable(fn) {
  11626. return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
  11627. };
  11628. var toInteger = function toInteger(value) {
  11629. var number = Number(value);
  11630. if (isNaN(number)) {
  11631. return 0;
  11632. }
  11633. if (number === 0 || !isFinite(number)) {
  11634. return number;
  11635. }
  11636. return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
  11637. };
  11638. var maxSafeInteger = Math.pow(2, 53) - 1;
  11639. var toLength = function toLength(value) {
  11640. var len = toInteger(value);
  11641. return Math.min(Math.max(len, 0), maxSafeInteger);
  11642. };
  11643. return function from(arrayLike) {
  11644. var C = this;
  11645. var items = Object(arrayLike);
  11646. if (arrayLike == null) {
  11647. throw new TypeError('Array.from requires an array-like object - not null or undefined');
  11648. }
  11649. var mapFn = arguments.length > 1 ? arguments[1] : void 0;
  11650. var T;
  11651. if (typeof mapFn !== 'undefined') {
  11652. if (!isCallable(mapFn)) {
  11653. throw new TypeError('Array.from: when provided, the second argument must be a function');
  11654. }
  11655. if (arguments.length > 2) {
  11656. T = arguments[2];
  11657. }
  11658. }
  11659. var len = toLength(items.length);
  11660. var A = isCallable(C) ? Object(new C(len)) : new Array(len);
  11661. var k = 0;
  11662. var kValue;
  11663. while (k < len) {
  11664. kValue = items[k];
  11665. if (mapFn) {
  11666. A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
  11667. } else {
  11668. A[k] = kValue;
  11669. }
  11670. k += 1;
  11671. }
  11672. A.length = len;
  11673. return A;
  11674. };
  11675. }()
  11676. });
  11677. }
  11678. if (!String.prototype.includes) {
  11679. String.prototype.includes = function(search, start) {
  11680. if (typeof start !== 'number') {
  11681. start = 0;
  11682. }
  11683. if (start + search.length > this.length) {
  11684. return false;
  11685. } else {
  11686. return this.indexOf(search, start) !== -1;
  11687. }
  11688. };
  11689. }
  11690. if (!Array.prototype.flat) {
  11691. Object.defineProperty(Array.prototype, 'flat', {
  11692. configurable: true,
  11693. value: function flat() {
  11694. var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]);
  11695. return depth ? Array.prototype.reduce.call(this, function(acc, cur) {
  11696. if (Array.isArray(cur)) {
  11697. acc.push.apply(acc, flat.call(cur, depth - 1));
  11698. } else {
  11699. acc.push(cur);
  11700. }
  11701. return acc;
  11702. }, []) : Array.prototype.slice.call(this);
  11703. },
  11704. writable: true
  11705. });
  11706. }
  11707. function uniqueArray(arr1, arr2) {
  11708. return arr1.concat(arr2).filter(function(elem, pos, arr) {
  11709. return arr.indexOf(elem) === pos;
  11710. });
  11711. }
  11712. var unique_array_default = uniqueArray;
  11713. function createLocalVariables(vNodes, anyLevel, thisLevel, parentShadowId, recycledLocalVariable) {
  11714. var retVal = recycledLocalVariable || {};
  11715. retVal.vNodes = vNodes;
  11716. retVal.vNodesIndex = 0;
  11717. retVal.anyLevel = anyLevel;
  11718. retVal.thisLevel = thisLevel;
  11719. retVal.parentShadowId = parentShadowId;
  11720. return retVal;
  11721. }
  11722. var recycledLocalVariables = [];
  11723. function matchExpressions(domTree, expressions, filter) {
  11724. var stack = [];
  11725. var vNodes = Array.isArray(domTree) ? domTree : [ domTree ];
  11726. var currentLevel = createLocalVariables(vNodes, expressions, null, domTree[0].shadowId, recycledLocalVariables.pop());
  11727. var result = [];
  11728. while (currentLevel.vNodesIndex < currentLevel.vNodes.length) {
  11729. var _currentLevel$anyLeve, _currentLevel$thisLev;
  11730. var vNode = currentLevel.vNodes[currentLevel.vNodesIndex++];
  11731. var childOnly = null;
  11732. var childAny = null;
  11733. var combinedLength = (((_currentLevel$anyLeve = currentLevel.anyLevel) === null || _currentLevel$anyLeve === void 0 ? void 0 : _currentLevel$anyLeve.length) || 0) + (((_currentLevel$thisLev = currentLevel.thisLevel) === null || _currentLevel$thisLev === void 0 ? void 0 : _currentLevel$thisLev.length) || 0);
  11734. var added = false;
  11735. for (var _i8 = 0; _i8 < combinedLength; _i8++) {
  11736. var _currentLevel$anyLeve2, _currentLevel$anyLeve3, _currentLevel$anyLeve4;
  11737. var exp = _i8 < (((_currentLevel$anyLeve2 = currentLevel.anyLevel) === null || _currentLevel$anyLeve2 === void 0 ? void 0 : _currentLevel$anyLeve2.length) || 0) ? currentLevel.anyLevel[_i8] : currentLevel.thisLevel[_i8 - (((_currentLevel$anyLeve3 = currentLevel.anyLevel) === null || _currentLevel$anyLeve3 === void 0 ? void 0 : _currentLevel$anyLeve3.length) || 0)];
  11738. if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) {
  11739. if (exp.length === 1) {
  11740. if (!added && (!filter || filter(vNode))) {
  11741. result.push(vNode);
  11742. added = true;
  11743. }
  11744. } else {
  11745. var rest = exp.slice(1);
  11746. if ([ ' ', '>' ].includes(rest[0].combinator) === false) {
  11747. throw new Error('axe.utils.querySelectorAll does not support the combinator: ' + exp[1].combinator);
  11748. }
  11749. if (rest[0].combinator === '>') {
  11750. (childOnly = childOnly || []).push(rest);
  11751. } else {
  11752. (childAny = childAny || []).push(rest);
  11753. }
  11754. }
  11755. }
  11756. if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && (_currentLevel$anyLeve4 = currentLevel.anyLevel) !== null && _currentLevel$anyLeve4 !== void 0 && _currentLevel$anyLeve4.includes(exp)) {
  11757. (childAny = childAny || []).push(exp);
  11758. }
  11759. }
  11760. if (vNode.children && vNode.children.length) {
  11761. stack.push(currentLevel);
  11762. currentLevel = createLocalVariables(vNode.children, childAny, childOnly, vNode.shadowId, recycledLocalVariables.pop());
  11763. }
  11764. while (currentLevel.vNodesIndex === currentLevel.vNodes.length && stack.length) {
  11765. recycledLocalVariables.push(currentLevel);
  11766. currentLevel = stack.pop();
  11767. }
  11768. }
  11769. return result;
  11770. }
  11771. function querySelectorAllFilter(domTree, selector, filter) {
  11772. domTree = Array.isArray(domTree) ? domTree : [ domTree ];
  11773. var expressions = _convertSelector(selector);
  11774. return matchExpressions(domTree, expressions, filter);
  11775. }
  11776. var query_selector_all_filter_default = querySelectorAllFilter;
  11777. function preloadCssom(_ref23) {
  11778. var _ref23$treeRoot = _ref23.treeRoot, treeRoot = _ref23$treeRoot === void 0 ? axe._tree[0] : _ref23$treeRoot;
  11779. var rootNodes = getAllRootNodesInTree(treeRoot);
  11780. if (!rootNodes.length) {
  11781. return Promise.resolve();
  11782. }
  11783. var dynamicDoc = document.implementation.createHTMLDocument('Dynamic document for loading cssom');
  11784. var convertDataToStylesheet = get_stylesheet_factory_default(dynamicDoc);
  11785. return getCssomForAllRootNodes(rootNodes, convertDataToStylesheet).then(function(assets) {
  11786. return flattenAssets(assets);
  11787. });
  11788. }
  11789. var preload_cssom_default = preloadCssom;
  11790. function getAllRootNodesInTree(tree) {
  11791. var ids = [];
  11792. var rootNodes = query_selector_all_filter_default(tree, '*', function(node) {
  11793. if (ids.includes(node.shadowId)) {
  11794. return false;
  11795. }
  11796. ids.push(node.shadowId);
  11797. return true;
  11798. }).map(function(node) {
  11799. return {
  11800. shadowId: node.shadowId,
  11801. rootNode: get_root_node_default(node.actualNode)
  11802. };
  11803. });
  11804. return unique_array_default(rootNodes, []);
  11805. }
  11806. function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
  11807. var promises = [];
  11808. rootNodes.forEach(function(_ref24, index) {
  11809. var rootNode = _ref24.rootNode, shadowId = _ref24.shadowId;
  11810. var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
  11811. if (!sheets) {
  11812. return Promise.all(promises);
  11813. }
  11814. var rootIndex = index + 1;
  11815. var parseOptions = {
  11816. rootNode: rootNode,
  11817. shadowId: shadowId,
  11818. convertDataToStylesheet: convertDataToStylesheet,
  11819. rootIndex: rootIndex
  11820. };
  11821. var importedUrls = [];
  11822. var p = Promise.all(sheets.map(function(sheet, sheetIndex) {
  11823. var priority = [ rootIndex, sheetIndex ];
  11824. return parse_stylesheet_default(sheet, parseOptions, priority, importedUrls);
  11825. }));
  11826. promises.push(p);
  11827. });
  11828. return Promise.all(promises);
  11829. }
  11830. function flattenAssets(assets) {
  11831. return assets.reduce(function(acc, val) {
  11832. return Array.isArray(val) ? acc.concat(flattenAssets(val)) : acc.concat(val);
  11833. }, []);
  11834. }
  11835. function getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet) {
  11836. var sheets;
  11837. if (rootNode.nodeType === 11 && shadowId) {
  11838. sheets = getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet);
  11839. } else {
  11840. sheets = getStylesheetsFromDocument(rootNode);
  11841. }
  11842. return filterStylesheetsWithSameHref(sheets);
  11843. }
  11844. function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) {
  11845. return Array.from(rootNode.children).filter(filerStyleAndLinkAttributesInDocumentFragment).reduce(function(out, node) {
  11846. var nodeName2 = node.nodeName.toUpperCase();
  11847. var data2 = nodeName2 === 'STYLE' ? node.textContent : node;
  11848. var isLink = nodeName2 === 'LINK';
  11849. var stylesheet = convertDataToStylesheet({
  11850. data: data2,
  11851. isLink: isLink,
  11852. root: rootNode
  11853. });
  11854. out.push(stylesheet.sheet);
  11855. return out;
  11856. }, []);
  11857. }
  11858. function getStylesheetsFromDocument(rootNode) {
  11859. return Array.from(rootNode.styleSheets).filter(function(sheet) {
  11860. return filterMediaIsPrint(sheet.media.mediaText);
  11861. });
  11862. }
  11863. function filerStyleAndLinkAttributesInDocumentFragment(node) {
  11864. var nodeName2 = node.nodeName.toUpperCase();
  11865. var linkHref = node.getAttribute('href');
  11866. var linkRel = node.getAttribute('rel');
  11867. var isLink = nodeName2 === 'LINK' && linkHref && linkRel && node.rel.toUpperCase().includes('STYLESHEET');
  11868. var isStyle = nodeName2 === 'STYLE';
  11869. return isStyle || isLink && filterMediaIsPrint(node.media);
  11870. }
  11871. function filterMediaIsPrint(media) {
  11872. if (!media) {
  11873. return true;
  11874. }
  11875. return !media.toUpperCase().includes('PRINT');
  11876. }
  11877. function filterStylesheetsWithSameHref(sheets) {
  11878. var hrefs = [];
  11879. return sheets.filter(function(sheet) {
  11880. if (!sheet.href) {
  11881. return true;
  11882. }
  11883. if (hrefs.includes(sheet.href)) {
  11884. return false;
  11885. }
  11886. hrefs.push(sheet.href);
  11887. return true;
  11888. });
  11889. }
  11890. function preloadMedia(_ref25) {
  11891. var _ref25$treeRoot = _ref25.treeRoot, treeRoot = _ref25$treeRoot === void 0 ? axe._tree[0] : _ref25$treeRoot;
  11892. var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref26) {
  11893. var actualNode = _ref26.actualNode;
  11894. if (actualNode.hasAttribute('src')) {
  11895. return !!actualNode.getAttribute('src');
  11896. }
  11897. var sourceWithSrc = Array.from(actualNode.getElementsByTagName('source')).filter(function(source) {
  11898. return !!source.getAttribute('src');
  11899. });
  11900. if (sourceWithSrc.length <= 0) {
  11901. return false;
  11902. }
  11903. return true;
  11904. });
  11905. return Promise.all(mediaVirtualNodes.map(function(_ref27) {
  11906. var actualNode = _ref27.actualNode;
  11907. return isMediaElementReady(actualNode);
  11908. }));
  11909. }
  11910. var preload_media_default = preloadMedia;
  11911. function isMediaElementReady(elm) {
  11912. return new Promise(function(resolve) {
  11913. if (elm.readyState > 0) {
  11914. resolve(elm);
  11915. }
  11916. function onMediaReady() {
  11917. elm.removeEventListener('loadedmetadata', onMediaReady);
  11918. resolve(elm);
  11919. }
  11920. elm.addEventListener('loadedmetadata', onMediaReady);
  11921. });
  11922. }
  11923. function isValidPreloadObject(preload3) {
  11924. return _typeof(preload3) === 'object' && Array.isArray(preload3.assets);
  11925. }
  11926. function _shouldPreload(options) {
  11927. if (!options || options.preload === void 0 || options.preload === null) {
  11928. return true;
  11929. }
  11930. if (typeof options.preload === 'boolean') {
  11931. return options.preload;
  11932. }
  11933. return isValidPreloadObject(options.preload);
  11934. }
  11935. function _getPreloadConfig(options) {
  11936. var _constants_default$pr = constants_default.preload, assets = _constants_default$pr.assets, timeout = _constants_default$pr.timeout;
  11937. var config = {
  11938. assets: assets,
  11939. timeout: timeout
  11940. };
  11941. if (!options.preload) {
  11942. return config;
  11943. }
  11944. if (typeof options.preload === 'boolean') {
  11945. return config;
  11946. }
  11947. var areRequestedAssetsValid = options.preload.assets.every(function(a) {
  11948. return assets.includes(a.toLowerCase());
  11949. });
  11950. if (!areRequestedAssetsValid) {
  11951. throw new Error('Requested assets, not supported. Supported assets are: '.concat(assets.join(', '), '.'));
  11952. }
  11953. config.assets = unique_array_default(options.preload.assets.map(function(a) {
  11954. return a.toLowerCase();
  11955. }), []);
  11956. if (options.preload.timeout && typeof options.preload.timeout === 'number' && !isNaN(options.preload.timeout)) {
  11957. config.timeout = options.preload.timeout;
  11958. }
  11959. return config;
  11960. }
  11961. function preload(options) {
  11962. var preloadFunctionsMap = {
  11963. cssom: preload_cssom_default,
  11964. media: preload_media_default
  11965. };
  11966. if (!_shouldPreload(options)) {
  11967. return Promise.resolve();
  11968. }
  11969. return new Promise(function(resolve, reject) {
  11970. var _getPreloadConfig2 = _getPreloadConfig(options), assets = _getPreloadConfig2.assets, timeout = _getPreloadConfig2.timeout;
  11971. var preloadTimeout = setTimeout(function() {
  11972. return reject(new Error('Preload assets timed out.'));
  11973. }, timeout);
  11974. Promise.all(assets.map(function(asset) {
  11975. return preloadFunctionsMap[asset](options).then(function(results) {
  11976. return _defineProperty({}, asset, results);
  11977. });
  11978. })).then(function(results) {
  11979. var preloadAssets = results.reduce(function(out, result) {
  11980. return _extends({}, out, result);
  11981. }, {});
  11982. clearTimeout(preloadTimeout);
  11983. resolve(preloadAssets);
  11984. })['catch'](function(err2) {
  11985. clearTimeout(preloadTimeout);
  11986. reject(err2);
  11987. });
  11988. });
  11989. }
  11990. var preload_default = preload;
  11991. function getIncompleteReason(checkData, messages) {
  11992. function getDefaultMsg(messages2) {
  11993. if (messages2.incomplete && messages2.incomplete['default']) {
  11994. return messages2.incomplete['default'];
  11995. } else {
  11996. return incompleteFallbackMessage();
  11997. }
  11998. }
  11999. if (checkData && checkData.missingData) {
  12000. try {
  12001. var msg = messages.incomplete[checkData.missingData[0].reason];
  12002. if (!msg) {
  12003. throw new Error();
  12004. }
  12005. return msg;
  12006. } catch (e) {
  12007. if (typeof checkData.missingData === 'string') {
  12008. return messages.incomplete[checkData.missingData];
  12009. } else {
  12010. return getDefaultMsg(messages);
  12011. }
  12012. }
  12013. } else if (checkData && checkData.messageKey) {
  12014. return messages.incomplete[checkData.messageKey];
  12015. } else {
  12016. return getDefaultMsg(messages);
  12017. }
  12018. }
  12019. function extender(checksData, shouldBeTrue, rule3) {
  12020. return function(check4) {
  12021. var sourceData = checksData[check4.id] || {};
  12022. var messages = sourceData.messages || {};
  12023. var data2 = Object.assign({}, sourceData);
  12024. delete data2.messages;
  12025. if (!rule3.reviewOnFail && check4.result === void 0) {
  12026. if (_typeof(messages.incomplete) === 'object' && !Array.isArray(check4.data)) {
  12027. data2.message = getIncompleteReason(check4.data, messages);
  12028. }
  12029. if (!data2.message) {
  12030. data2.message = messages.incomplete;
  12031. }
  12032. } else {
  12033. data2.message = check4.result === shouldBeTrue ? messages.pass : messages.fail;
  12034. }
  12035. if (typeof data2.message !== 'function') {
  12036. data2.message = process_message_default(data2.message, check4.data);
  12037. }
  12038. extend_meta_data_default(check4, data2);
  12039. };
  12040. }
  12041. function publishMetaData(ruleResult) {
  12042. var checksData = axe._audit.data.checks || {};
  12043. var rulesData = axe._audit.data.rules || {};
  12044. var rule3 = find_by_default(axe._audit.rules, 'id', ruleResult.id) || {};
  12045. ruleResult.tags = clone_default(rule3.tags || []);
  12046. var shouldBeTrue = extender(checksData, true, rule3);
  12047. var shouldBeFalse = extender(checksData, false, rule3);
  12048. ruleResult.nodes.forEach(function(detail) {
  12049. detail.any.forEach(shouldBeTrue);
  12050. detail.all.forEach(shouldBeTrue);
  12051. detail.none.forEach(shouldBeFalse);
  12052. });
  12053. extend_meta_data_default(ruleResult, clone_default(rulesData[ruleResult.id] || {}));
  12054. }
  12055. var publish_metadata_default = publishMetaData;
  12056. function querySelectorAll(domTree, selector) {
  12057. return query_selector_all_filter_default(domTree, selector);
  12058. }
  12059. var query_selector_all_default = querySelectorAll;
  12060. function matchTags(rule3, runOnly) {
  12061. var include, exclude, matching;
  12062. var defaultExclude = axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : [];
  12063. if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) {
  12064. include = runOnly.include || [];
  12065. include = Array.isArray(include) ? include : [ include ];
  12066. exclude = runOnly.exclude || [];
  12067. exclude = Array.isArray(exclude) ? exclude : [ exclude ];
  12068. exclude = exclude.concat(defaultExclude.filter(function(tag) {
  12069. return include.indexOf(tag) === -1;
  12070. }));
  12071. } else {
  12072. include = Array.isArray(runOnly) ? runOnly : [ runOnly ];
  12073. exclude = defaultExclude.filter(function(tag) {
  12074. return include.indexOf(tag) === -1;
  12075. });
  12076. }
  12077. matching = include.some(function(tag) {
  12078. return rule3.tags.indexOf(tag) !== -1;
  12079. });
  12080. if (matching || include.length === 0 && rule3.enabled !== false) {
  12081. return exclude.every(function(tag) {
  12082. return rule3.tags.indexOf(tag) === -1;
  12083. });
  12084. } else {
  12085. return false;
  12086. }
  12087. }
  12088. function ruleShouldRun(rule3, context5, options) {
  12089. var runOnly = options.runOnly || {};
  12090. var ruleOptions = (options.rules || {})[rule3.id];
  12091. if (rule3.pageLevel && !context5.page) {
  12092. return false;
  12093. } else if (runOnly.type === 'rule') {
  12094. return runOnly.values.indexOf(rule3.id) !== -1;
  12095. } else if (ruleOptions && typeof ruleOptions.enabled === 'boolean') {
  12096. return ruleOptions.enabled;
  12097. } else if (runOnly.type === 'tag' && runOnly.values) {
  12098. return matchTags(rule3, runOnly.values);
  12099. } else {
  12100. return matchTags(rule3, []);
  12101. }
  12102. }
  12103. var rule_should_run_default = ruleShouldRun;
  12104. function attributeMatches(node, attrName, filterAttrs) {
  12105. if (typeof filterAttrs[attrName] === 'undefined') {
  12106. return false;
  12107. }
  12108. if (filterAttrs[attrName] === true) {
  12109. return true;
  12110. }
  12111. return element_matches_default(node, filterAttrs[attrName]);
  12112. }
  12113. function filterHtmlAttrs(element, filterAttrs) {
  12114. if (!filterAttrs) {
  12115. return element;
  12116. }
  12117. var node = element.cloneNode(false);
  12118. var outerHTML = node.outerHTML;
  12119. var attributes4 = get_node_attributes_default(node);
  12120. if (cache_default.get(outerHTML)) {
  12121. node = cache_default.get(outerHTML);
  12122. } else if (attributes4) {
  12123. node = document.createElement(node.nodeName);
  12124. Array.from(attributes4).forEach(function(attr) {
  12125. if (!attributeMatches(element, attr.name, filterAttrs)) {
  12126. node.setAttribute(attr.name, attr.value);
  12127. }
  12128. });
  12129. cache_default.set(outerHTML, node);
  12130. }
  12131. Array.from(element.childNodes).forEach(function(child) {
  12132. node.appendChild(filterHtmlAttrs(child, filterAttrs));
  12133. });
  12134. return node;
  12135. }
  12136. var filter_html_attrs_default = filterHtmlAttrs;
  12137. function pushNode(result, nodes) {
  12138. var temp;
  12139. if (result.length === 0) {
  12140. return nodes;
  12141. }
  12142. if (result.length < nodes.length) {
  12143. temp = result;
  12144. result = nodes;
  12145. nodes = temp;
  12146. }
  12147. for (var _i9 = 0, l = nodes.length; _i9 < l; _i9++) {
  12148. if (!result.includes(nodes[_i9])) {
  12149. result.push(nodes[_i9]);
  12150. }
  12151. }
  12152. return result;
  12153. }
  12154. function getOuterIncludes(includes) {
  12155. return includes.reduce(function(res, el) {
  12156. if (!res.length || !_contains(res[res.length - 1], el)) {
  12157. res.push(el);
  12158. }
  12159. return res;
  12160. }, []);
  12161. }
  12162. function select(selector, context5) {
  12163. var result = [];
  12164. var candidate;
  12165. if (axe._selectCache) {
  12166. for (var j = 0, l = axe._selectCache.length; j < l; j++) {
  12167. var item = axe._selectCache[j];
  12168. if (item.selector === selector) {
  12169. return item.result;
  12170. }
  12171. }
  12172. }
  12173. var outerIncludes = getOuterIncludes(context5.include);
  12174. var isInContext = getContextFilter(context5);
  12175. for (var _i10 = 0; _i10 < outerIncludes.length; _i10++) {
  12176. candidate = outerIncludes[_i10];
  12177. var nodes = query_selector_all_filter_default(candidate, selector, isInContext);
  12178. result = pushNode(result, nodes);
  12179. }
  12180. if (axe._selectCache) {
  12181. axe._selectCache.push({
  12182. selector: selector,
  12183. result: result
  12184. });
  12185. }
  12186. return result;
  12187. }
  12188. var select_default = select;
  12189. function getContextFilter(context5) {
  12190. if (!context5.exclude || context5.exclude.length === 0) {
  12191. return null;
  12192. }
  12193. return function(node) {
  12194. return is_node_in_context_default(node, context5);
  12195. };
  12196. }
  12197. function setScroll(elm, top, left) {
  12198. if (elm === window) {
  12199. return elm.scroll(left, top);
  12200. } else {
  12201. elm.scrollTop = top;
  12202. elm.scrollLeft = left;
  12203. }
  12204. }
  12205. function setScrollState(scrollState) {
  12206. scrollState.forEach(function(_ref29) {
  12207. var elm = _ref29.elm, top = _ref29.top, left = _ref29.left;
  12208. return setScroll(elm, top, left);
  12209. });
  12210. }
  12211. var set_scroll_state_default = setScrollState;
  12212. function _shadowSelect(selectors) {
  12213. var selectorArr = Array.isArray(selectors) ? _toConsumableArray(selectors) : [ selectors ];
  12214. return selectRecursive(selectorArr, document);
  12215. }
  12216. function selectRecursive(selectors, doc) {
  12217. var selectorStr = selectors.shift();
  12218. var elm = selectorStr ? doc.querySelector(selectorStr) : null;
  12219. if (selectors.length === 0) {
  12220. return elm;
  12221. }
  12222. if (!(elm !== null && elm !== void 0 && elm.shadowRoot)) {
  12223. return null;
  12224. }
  12225. return selectRecursive(selectors, elm.shadowRoot);
  12226. }
  12227. function tokenList(str) {
  12228. return (str || '').trim().replace(/\s{2,}/g, ' ').split(' ');
  12229. }
  12230. var token_list_default = tokenList;
  12231. function validInputTypes() {
  12232. return [ 'hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button' ];
  12233. }
  12234. var valid_input_type_default = validInputTypes;
  12235. var langs = [ , [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , , , , , 1, 1, 1, 1, , , 1, 1, 1, , 1, , 1, , 1, 1 ], [ 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, 1, 1, , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, , , , , , 1, , 1, , , , , 1, , 1, , , , 1, 1, , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, , , 1, , , , , 1, 1, 1, , 1, , 1, , 1, , , , , , 1 ], [ 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, , 1, , 1, , , , , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , 1, , 1, , , , 1, 1, 1, , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, 1, 1, , , , , 1, , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, , 1, 1, 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , , 1, 1, , , , , , 1, 1 ], [ 1, 1, 1, , , , , 1, , , , 1, 1, , 1, , , , , , 1, , , , , 1 ], [ , 1, , , 1, , , 1, , , , , , 1 ], [ , 1, , 1, , , , 1, , , , 1 ], [ 1, , 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, , , 1, , 1, 1, , 1, , 1, , , , , 1, , 1 ], [ , 1, , , , 1, , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , , 1, , , 1 ], [ , 1, 1, , , , , , 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, , , , , 1, 1, , 1, , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, , , , 1, 1, 1, , 1, 1, , , 1, 1, , 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, , 1, 1, 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , 1, 1 ], [ , , , , 1, , , , , , , , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, , 1, 1, 1, , 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, 1, , , , , 1 ], [ 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , , , , , 1, , , , , , , 1 ], [ , 1, 1, , 1, 1, , 1, , , , , , , , , , , , , 1 ], , [ 1, 1, 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , 1, , , 1, , , 1, 1, , , , , 1 ] ], [ , [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , , , 1, , , , , , , , , , , , , , , 1 ], [ , 1, , , 1, 1, , 1, , 1, 1, , , , 1, 1, , , 1, 1, , , , 1 ], [ 1, , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, , , , 1 ], , [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , , 1, 1, 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, , , 1, , 1, , , 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, , , 1, , , 1, , 1 ], [ , 1, , , , , , , , , , 1, 1, , , , , , 1, 1, , , , , 1 ], [ , , , , , , , 1, , , , 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , 1, 1, 1, , , 1, 1, , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , , , , , , 1 ], , [ , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , 1 ], [ , , 1, , , 1, , , 1, 1, , , 1, , 1, 1, , 1 ], [ , 1, 1, , 1, , , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1 ], [ , 1, , , , , , , , , , 1, 1, , , , , , 1, 1, , 1, , 1, , 1, 1 ], , [ , 1, 1, , 1, , , 1, , 1, , , , 1, 1, 1, , , , , , 1, , , , 1 ], [ 1, 1, , , 1, 1, , 1, , , , , 1, , 1 ] ], [ , [ , 1 ], [ , , , 1, , , , 1, , , , 1, , , , 1, , , 1, , , 1 ], [ , , , , , , , , , , , , , , , , , , 1, 1, , , , , , 1 ], , [ 1, , , , , 1 ], [ , 1, , , , 1, , , , 1 ], [ , 1, , , , , , , , , , , 1, , , 1, , , , , , , , , 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , 1, , , , 1, , 1 ], [ , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, , 1, 1, , 1, , , , , , , 1 ], [ 1, , , , , 1, , , 1, 1, , 1, , 1, , 1, 1, , , , , 1, , , 1 ], [ , 1, 1, , , 1, , 1, , 1, , 1, , 1, 1, 1, 1, , , 1, , 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1 ], [ 1, , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , 1 ], , [ , 1, , , , , , 1, 1, 1, , 1, , , , 1, , , 1, 1, 1, , , 1 ], [ 1, , , , , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, , 1, , 1, , , 1, 1 ], [ 1, , 1, 1, , , , , 1, , , , , , 1, 1, , , 1, 1, 1, 1, , , 1, , 1 ], [ 1, , , , , , , , , , , , , , , , , 1 ], [ , , , , , 1, , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , , 1 ], [ , 1, , , , 1 ] ], [ , [ 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, 1, 1 ], [ , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], , [ , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , , , , , , , 1, , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], , [ 1, 1, , , , 1, 1, , , , , , 1, , , , 1, , 1, , 1, 1, , 1 ], [ 1 ], [ , , , , , , , , , , , 1, , , , , , , , , , , 1 ], [ , 1, , , , , , , 1, 1, , , 1, , 1, , , , 1, , , , , , , 1 ], [ , , , , , , , , , , , , , , , , 1, , , , , 1 ], [ , , 1, , , , , 1, , 1 ], [ 1, , , , 1, , , , , 1, , , , 1, 1, , , , 1, 1, , , , , 1 ], [ , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , 1, 1, , , , , , , 1, , 1, , 1, 1, 1, 1, 1, 1 ], [ , , , , , 1, , , , , , , 1, , , , , , , 1 ], , [ , , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , , 1, 1, , 1, 1, 1, , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , 1 ], , [ 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, , , , , , 1, , 1, , , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, , , 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , 1, , , , , , , , , 1, , , , 1 ], [ , 1, 1, , 1, 1, , 1, , , , 1, 1, , 1, 1, , , 1, , 1, 1, , 1 ], [ , 1, , 1, , 1, , , 1, , , 1, 1, , 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , , , , , , , , , 1, , 1, , 1, 1, , , , 1, , , 1 ], [ , 1, , , 1, 1, , , , , , , , , 1, 1, 1, , , , , 1 ], [ 1, , , 1, 1, , , , 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, , , , 1, 1, 1, , , 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1 ], [ , 1, , , , , , , , 1, , , , , 1, , , , 1, , , 1 ], [ , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , 1, , 1, , , , , 1, 1, 1, 1, 1, , , 1, , , , 1 ], [ , 1, , , , , , , , 1, , , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, , 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, , , , 1, , 1, 1, , 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , 1, 1, 1, 1, , 1, , , 1, 1, 1, 1, , , 1, , , , , , , 1 ], [ , 1, , , , , , , , 1, , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1 ], [ , 1, 1, , , , , , , , , , , , 1, 1, , , , , , 1 ], [ , 1, , , , , , , 1 ], [ , , , , , , , , , , , , , , 1, , , , , 1, , , , , , 1 ], [ 1, 1, , , 1, , , 1, 1, 1, , , , 1 ], , [ , , , , , , , , , , , , , 1, , , , , , , , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , 1, , , , , , , 1 ], [ 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, , 1, , , 1, 1 ], [ , , , , , , , , , 1 ], [ , 1, , , , 1, , , , , , 1, , , 1, , , , , 1 ], [ , 1, 1, , 1, 1, , , , , , , , , , , , , , , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, 1, 1, 1, , , , 1, 1, , , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1 ], [ , , , , , , , , , , , , , , , 1, , , , 1 ], , [ 1, 1, , 1, , 1, , , , , , 1, , 1, , 1, 1, , 1, , 1, 1, , 1, 1, , 1 ], [ , , 1, , , , , , 1, , , , 1, , 1, , , , , 1 ], [ 1, , , , , , , , , 1, , , , , , 1, , , , 1, , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, , 1, , , , , , 1, , , 1, , , , , , , , 1 ], [ , 1, , 1, , , , , , , , , , , , 1 ], , [ 1, 1, , , , , , , , , , , , , , , , , , , , , , 1, 1 ], [ 1 ] ], [ , [ 1, , , , , , , , , 1, , , , , 1, , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1, 1, , , , 1, , , 1, , , , 1 ], [ , 1, , , , , , , 1, , , , 1, , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , , , 1, , , , , , , , , 1, 1, 1, 1 ], [ 1 ], [ , 1, 1, , , 1, 1, , , , , 1, , 1, , , , , , , , 1, , , , 1 ], [ 1, , 1, , , 1, , 1, , , , , 1, 1, 1, 1, , , , 1, , , , 1 ], [ , , 1, , , , , , , 1, , , , , , , 1, , , , , , , 1 ], [ 1, , , , , , , , , , , , , , 1, , , , 1 ], [ , , , 1, , 1, , , , , 1, , , , 1, 1, , , , 1 ], [ 1, , , , , 1, , , , 1, , 1, 1, , , 1, 1, , 1, 1, 1, , 1, 1, 1, , 1 ], [ , 1, 1, , , , , 1, , 1, , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , , 1, , 1, 1, , , 1, 1, , , , , , 1 ], [ 1, , 1, 1, , 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , , , 1 ], [ 1, , , , , , , , , , , , , , , , , , 1, , , 1, , 1 ], [ , , , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , , 1, , 1 ], [ , 1, , , , 1, , , 1, 1, , 1, , , 1, 1, , , 1, , , 1, , , 1, 1 ], [ 1, 1, , 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, , 1, 1 ], [ 1, , 1, 1, 1, 1, , , , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, , , , , , , , , , , , , 1 ], [ , , 1, , , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , , , , , , , , , 1, , 1, , 1, , , , 1 ], [ , , , 1, , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , , 1, , , , , , , , , 1 ], [ , , , , , , , , 1, 1, , , , , , , , , 1, , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , , , , , 1, , , , 1, 1, 1, , , 1, 1, , , 1, , 1, 1, , 1 ], [ , , , , , , , , , , , , , , , , , , , 1, 1 ], [ , 1, , , , , , 1, , , , , , , , , , , , , 1 ], [ , , 1, , , 1, , 1, 1, 1, , 1, 1, , 1, , , , 1, , 1, 1 ], , [ , , 1, , , 1, , , , , , 1, , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , 1, , 1, , , 1, 1, 1, , , 1 ], [ , , , , , 1, , , , , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , 1, , 1, 1, , 1, , , 1 ], [ , , , , , 1, , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, 1, , , , , 1, , , 1, , 1, , , , 1, 1, , , , 1, 1 ], [ , 1, , , 1, , , 1, , 1, 1, , 1, , , , , , , 1 ], [ , , 1, , 1, , , 1, , , , , , , , , , , 1, 1, , , , 1 ], [ , 1, , , , , , , , , , , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , , , , , , , , , , , , , , , 1, , 1, 1 ], [ , , , , , , , , , , , , 1 ], , [ , 1, 1, 1, 1, , , , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1 ], [ 1, , , , 1, , , , , , , , , , 1 ], [ 1, , , , , , , , , 1 ], , [ , 1, , , , 1, , , , , , , , , , , , , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, , 1, , , , 1, 1, , , 1, 1, , 1 ], [ , 1, 1, , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ 1, 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, , 1, 1, , , , , 1 ], [ , 1, , , , , , , 1, 1, , , 1, 1, 1, , 1, , , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , , 1, , , , 1, , , , , , , 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1, , 1, , 1, , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1, 1, , , , , , , , , 1 ], , [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1, , , , 1 ], [ , 1, , , 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , , 1 ], [ 1, , , 1, , , , 1, 1, 1, , , , , 1, 1, , , , 1, , 1 ], [ 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, , , , , , , , 1, , 1, , , , , , , , 1, , 1 ], [ , 1, , , , 1, , 1, 1, , , , 1, 1, , 1, , , , 1, 1, 1, , 1 ], , [ , 1, , , , , , 1, , , , , , , 1 ], [ , , , , , , , , 1, , , , 1, , 1, , , , , , , , , , , , 1 ] ], [ , [ , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, , , , , , , , 1, , , , , , 1, , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, , , , , 1, 1, 1, , , 1, , 1, 1, , , , 1, , 1, , , 1, 1 ], [ , , , , , , , 1, , , , 1, 1, 1, 1, 1, , 1, , , , , , , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , 1, 1, , 1, , 1, 1, 1, , 1, , 1, 1, , 1, 1, , 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , , , , , , 1, , , , , 1, , 1 ], [ , 1, 1, 1, , 1, , 1, , 1, , , , 1, , 1, , , 1, , , , , , 1, 1 ], [ , 1, , , 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , , , 1, , 1, , 1, , , , , , 1, , 1, , , , 1, 1 ] ], [ , [ , 1, , 1, , , , , , , , , , , , , , , 1, , , , 1 ], [ , , , , , , , , , 1, , 1, 1, 1, , 1, , , 1, , 1, 1 ], [ 1, 1, , , , , , , 1, , , , , , , 1, , , , , , 1 ], [ , 1, , , , , , , , , , 1, , , , , , , , , 1, 1 ], , [ , , , , , , , , , , , , , , , 1, , , , 1, , 1 ], [ , , 1, 1, , 1, , 1, , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , 1, 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ 1, , 1, 1, , , , 1, , , , , , , , , 1, , , 1, , , 1, 1 ], [ , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, 1, , , , , , 1, , 1, , 1, , , 1, , 1, 1 ], [ 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, , , 1, , 1, , 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , 1, 1 ], [ , , , , 1, , , 1, , , , , , , 1, , , , 1, 1 ], [ , 1, , , , , , , , , , 1, , 1, , 1, , , , , 1, , , , , 1 ], , [ 1, 1, , 1, , 1, , 1, 1, , , , , , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, , , , , , 1, , , , , , 1, 1, , , , 1, 1, , , 1 ], [ , 1, 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, , , 1, , , , 1, , , , 1, 1 ], [ , , , , 1 ], [ , , , , , , , , , 1, , , 1 ], , [ , , 1, , 1, , , , , , , , , 1, , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , , , 1 ], [ , 1, , 1, , , , , , 1, , , , , 1, 1, , , , , 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , , 1, , 1, 1, 1 ], [ , 1, , , , 1, , , , , , , 1 ], [ , 1, , , 1, , , 1, , 1, , 1, 1, , 1, , , , , 1, , 1, , , , 1, 1 ], [ , 1, , , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, , , , 1, 1, , , , , , 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , 1, , , , , , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1 ], [ 1, 1, , , , , , , 1, 1, , , , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], , [ , 1, 1, , , , , 1, , 1, , , , 1, 1, 1, , , 1, , , , , 1 ], [ , , , , , , , , , , , , , 1 ], [ , , , , , 1, , , , , , , , 1, 1, , , , , 1, , 1, , , 1, 1 ], [ , , , , , , , , , , , , , , 1 ] ], [ , [ , 1 ], , , , , , , , , , , , , , , , , , , , [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, , , , 1, , 1, 1 ], [ , 1, , 1, , 1, , , 1, , , , , 1, , , , , , 1, 1 ], [ , 1, , 1, , , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, , , , , , , , , , , , , , , 1 ] ], [ , [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , , , , , , , 1, 1, , , , 1 ], [ , , , , , , 1 ], [ , , 1 ], [ , 1, 1, , , 1, , 1, , 1, 1, , 1, 1, 1, , , , 1, 1, 1, , , , , 1 ], , [ , 1, , , , 1, , , , , , 1, , , 1, , , , 1, 1, , 1 ], [ , , , , , , , 1, , , , , , , , , 1 ], [ , 1, , , , 1, 1, , , , , , 1, 1, 1, , , , 1, , 1, 1 ], [ , , , , , , , 1, , 1, , , , , , , , , , 1 ], [ , 1, 1, , , , , , 1, 1, , , , 1, , , , , , , 1, , , 1 ], , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , , 1, , , 1, , , , , 1, , 1, , 1, , 1, , , , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , , , , 1, 1, , 1, 1, , 1, , , 1, , 1 ], [ , , , , , , , , , , , , , , 1, , , , , , 1 ], , [ , , , , , , , , , 1, , , , , , 1, , , , , 1 ], [ , , 1, , , , , , , 1, , , 1, 1 ], [ , , , 1, , , , , 1, , , , , 1, , , , , , 1, , , , 1 ], [ 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, , , 1, 1, , , , 1, 1 ], , [ 1, 1, , , , , , , , , , 1, , 1, , 1, , , 1 ], [ , , , , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , 1, , , , , 1, , 1 ], [ , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , , 1, , , 1, , , , , , , , 1, , , , , , 1, , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, , , , , , , 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, , , , , , 1, , 1, , , , , 1, 1, , , , , 1 ], [ 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, , 1 ], [ , 1, 1, 1, 1, , , , , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , , , , 1, , 1, , 1, , , 1, , , 1, 1, , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , 1, , , , , 1, 1, , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , 1, , 1, 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1 ], [ 1, 1, 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , , , , , , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , , , , , 1, 1, 1, 1, 1, , , , 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1 ], [ , 1, 1, 1, , 1, , 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1 ], [ 1, 1, , , , 1, , , 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, , 1 ], [ , 1, , , , , , , 1, , 1, , 1, 1, 1, 1, , , , , , , , , 1 ] ], [ , [ , , , , , , , , , , , , , 1, 1, , , , 1 ], [ , 1, , , , , , , , 1, , , 1, , , , , , 1, , , 1, , , , 1 ], , [ , 1, , , , 1, , 1, , 1, 1, , 1, 1, , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , 1 ], [ 1, 1, 1, , , 1, , , , , , , , , 1, 1, , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1, , , 1 ], [ , , , , , , , , , 1 ], [ 1, 1, , , , , , 1, 1, 1, , 1, 1, , , , 1, 1, , 1, , 1, 1, 1, , 1 ], [ , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , 1, , 1 ], [ , 1, 1, 1, 1, , , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , 1, 1, , 1, , 1, , , 1, , , 1, , 1 ], [ , , , , , , , , , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , , , , , 1 ], , [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , 1, 1, , 1, , , , , 1, , , 1, , 1 ], [ , 1, , , , 1, , , 1, , , , , , , , 1, , 1, , , 1 ], [ , , , , , , , , , , , , , 1, 1, , , , 1, , , 1 ], [ , , , , , 1, , , 1, , , , 1 ], [ , 1 ], , [ , 1 ], [ 1, , , , , , , , , , , , , , 1, , , , , 1 ] ], [ , [ , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , , 1 ], [ , , 1, , , , , , , , , 1 ], , , [ 1, , , 1, 1, , , , , , , , 1, 1, , 1, 1, , 1 ], , [ , , , , , , , , , , , , , , , , , , 1, , 1 ], , [ 1, , , 1, 1, , 1, 1, , , , , 1, , 1, , , , , 1, 1, , 1 ], , [ , 1, , , , , , , , 1, 1, 1, 1, 1, , 1, 1, , , , 1, 1 ], [ , , , , , , , , , , , , , , , , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , 1, , 1, , , 1 ], [ 1, , , , , , , , , , , , , , , , , , 1, , 1 ], , , [ , 1, , , , , , , , , , , , , , 1, , , , 1, 1 ], [ , , , , , , , , , 1, , , 1, , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , 1, 1, , , , , , 1 ], , [ , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , 1, 1, , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, , , , , , , , 1 ], [ , , , , 1, , , 1, , , 1, 1, , , , , , , , , , 1, , , , 1 ], [ , 1, , 1, 1, , , 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , , , , , , , 1 ], [ , 1, 1, , , , , 1, , 1, , , , , , 1, , , , , , 1, , 1, , 1 ], [ , 1, , , , , , 1, , , , 1, , , , , , , , , , 1 ], [ , , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, , , , , , , , 1 ], [ , 1, 1, , 1, , , , , , , , 1, , , , , , 1, , , 1, , 1, , 1 ], [ , 1, , 1, , 1, , 1, 1, 1, , 1, 1, 1, , 1, , , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, , , , 1, 1, 1, , , , 1, 1, , , 1, 1 ], [ , , 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, , , , , 1, , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, , , 1, 1, , , , 1, , 1 ], [ , , , 1 ], , [ , 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , 1, , 1, , 1, , , , , , , 1, 1, , 1, 1 ], [ , , , , , , 1, , 1, 1, , 1, , 1, , , , , , , , , , 1 ], [ , 1, 1, , 1, , , , 1, , , , 1, 1, 1, , , , 1, , 1, 1, 1, , 1, 1 ], , [ , 1, 1, , , , , , , , , , , , , 1, , , 1, , , , , 1 ], [ , 1, , , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , , , , , , 1, , , , 1, , , , , 1, , , , , , , 1 ] ], [ , [ , 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, , 1, , 1, 1, , , 1, 1, 1, 1, , 1, , , , , 1, 1, 1 ], [ , , 1, 1, , 1, , 1, 1, , , , 1, 1, 1, 1, , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, , 1, , , , , , , , 1, , 1, , 1, , , , , , , , , , 1 ], [ , , 1, , 1, , , 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1 ], [ , 1 ], [ , 1, 1, , 1, , 1, 1, , 1, , , 1, 1, 1, , , , 1, , , 1, , 1 ], [ 1, 1, , 1, 1, 1, , , , , , , , , , , , , 1, , 1, 1, 1 ], [ , 1, 1, , , , , , , 1, , , 1, , 1, , 1, , 1, 1, , , 1, , , 1 ], [ , , 1, , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , 1, 1, 1, , 1, , 1, 1, 1, , , 1, 1, 1, 1, , , , 1, 1 ], [ , , , 1, 1, , , 1, , 1, , 1, , 1, 1, 1, 1, , 1, , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , 1, 1, , 1, , 1, , , , 1, 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, , 1, , , 1, , , 1, , 1, 1, 1, 1, 1, , 1, , 1, 1 ], [ , , , , , 1, , , , 1, , , , , 1, 1, , , , 1 ], [ , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, , , 1, , 1, , , 1 ], [ , , 1, , , , , , , , , 1, , 1, , , , , 1, , 1 ], [ , 1, 1, , , , , , , , 1, 1, 1, , , , , , , , 1, , , , , 1 ], [ , , , , , , , , 1, , , , , 1, , , 1 ] ], [ , [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, , , , , , , , , 1, 1 ], [ , , , , , , , , 1, , , , 1, , 1, , 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1 ], [ , 1, , 1, , 1, , , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1 ], , [ , 1, , , , , , , , 1, , , 1, 1, , , 1, , 1, 1, , 1, , 1 ], [ , 1, , , 1, , , , , , , , 1, , , , , , , 1 ], [ 1, 1, , , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], , [ , 1, , , , , , 1, , 1, , 1, 1, 1, 1, 1, , , 1, , 1, 1, , , , 1 ], [ , 1, 1, , , 1, , 1, , 1, , , 1, 1, 1, 1, , , 1, , , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1 ], [ , 1, , , 1, 1, , 1, 1, , , 1, 1, , 1, 1, , 1, , 1, , 1 ], [ 1, , 1, , , , , 1, , 1, , 1, 1, 1, 1, , , , , 1, 1, , , , 1, 1 ], [ , 1, 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , , , , 1 ], , [ , 1, 1, , , 1, , , , 1, , 1, 1, 1, 1, 1, , , , 1, , , , 1, , 1 ], [ , , , 1, 1, , , 1, , , , , 1, , 1, 1, 1, , 1, 1, , , , , , 1 ], [ , 1, , , , , , , , , , , 1, , , , 1, , , , , , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , , , 1, , , , , 1, , 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, , , , , , 1, , , , , 1, 1, , , , , , , , 1, , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1, , , 1, , , , , 1 ], [ , , , , , , , 1, , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, , , , , , , 1, , , , , , , , 1, , , 1 ], [ , 1, , , , , , , 1 ], [ , , , , , , , , , , 1 ], [ , 1, , , , , , 1, 1, , , , , , 1 ], , [ , 1, 1, , , , , , 1, , , , , 1, 1, , , , 1 ], [ 1, , 1, , 1, , , , , 1, , , , , 1, , , , , , , , , 1, 1 ], [ , 1, 1, , , , , , , , , 1, 1, 1, 1, , , , 1, , , , , 1, , , 1 ], , [ , 1, 1, , 1, , , 1, 1, , , 1, , , 1, 1, 1, , 1, , 1, 1, 1, , , , 1 ], [ , , , , , 1, , , , , 1, , , 1, 1, , , 1, , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1 ], [ , , , 1, , , , , 1, , , , , 1, , 1, , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , 1 ], [ , 1, , , , , , 1, , , , , , , 1, 1, 1, , , 1 ], [ , 1, , , , , , , , , , 1, 1, 1, , , , , 1, , , 1 ], [ , , , , , 1, , 1, , , , , 1, 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1 ], [ 1, 1, , , , , , , 1, , , , , 1, 1, , , , , , , , , , , 1 ], , [ , 1 ], [ , , , , , , , , , , , , , , , , , , , , , , , , 1 ], [ , , 1, , , , , 1, , , 1, , , , 1, , 1 ], [ , 1, , , , , , , , , 1 ] ] ];
  12236. function isValidLang(lang) {
  12237. var array = langs;
  12238. while (lang.length < 3) {
  12239. lang += '`';
  12240. }
  12241. for (var _i11 = 0; _i11 <= lang.length - 1; _i11++) {
  12242. var index = lang.charCodeAt(_i11) - 96;
  12243. array = array[index];
  12244. if (!array) {
  12245. return false;
  12246. }
  12247. }
  12248. return true;
  12249. }
  12250. function _validLangs(langArray) {
  12251. langArray = Array.isArray(langArray) ? langArray : langs;
  12252. var codes = [];
  12253. langArray.forEach(function(lang, index) {
  12254. var _char2 = String.fromCharCode(index + 96).replace('`', '');
  12255. if (Array.isArray(lang)) {
  12256. codes = codes.concat(_validLangs(lang).map(function(newLang) {
  12257. return _char2 + newLang;
  12258. }));
  12259. } else {
  12260. codes.push(_char2);
  12261. }
  12262. });
  12263. return codes;
  12264. }
  12265. var valid_langs_default = isValidLang;
  12266. axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
  12267. axe._thisWillBeDeletedDoNotUse.utils = {
  12268. setDefaultFrameMessenger: setDefaultFrameMessenger
  12269. };
  12270. var SerialVirtualNode = function(_abstract_virtual_nod2) {
  12271. _inherits(SerialVirtualNode, _abstract_virtual_nod2);
  12272. var _super2 = _createSuper(SerialVirtualNode);
  12273. function SerialVirtualNode(serialNode) {
  12274. var _this3;
  12275. _classCallCheck(this, SerialVirtualNode);
  12276. _this3 = _super2.call(this);
  12277. _this3._props = normaliseProps(serialNode);
  12278. _this3._attrs = normaliseAttrs(serialNode);
  12279. return _this3;
  12280. }
  12281. _createClass(SerialVirtualNode, [ {
  12282. key: 'props',
  12283. get: function get() {
  12284. return this._props;
  12285. }
  12286. }, {
  12287. key: 'attr',
  12288. value: function attr(attrName) {
  12289. var _this$_attrs$attrName;
  12290. return (_this$_attrs$attrName = this._attrs[attrName]) !== null && _this$_attrs$attrName !== void 0 ? _this$_attrs$attrName : null;
  12291. }
  12292. }, {
  12293. key: 'hasAttr',
  12294. value: function hasAttr(attrName) {
  12295. return this._attrs[attrName] !== void 0;
  12296. }
  12297. }, {
  12298. key: 'attrNames',
  12299. get: function get() {
  12300. return Object.keys(this._attrs);
  12301. }
  12302. } ]);
  12303. return SerialVirtualNode;
  12304. }(abstract_virtual_node_default);
  12305. var nodeNamesToTypes = {
  12306. '#cdata-section': 2,
  12307. '#text': 3,
  12308. '#comment': 8,
  12309. '#document': 9,
  12310. '#document-fragment': 11
  12311. };
  12312. var nodeTypeToName = {};
  12313. var nodeNames = Object.keys(nodeNamesToTypes);
  12314. nodeNames.forEach(function(nodeName2) {
  12315. nodeTypeToName[nodeNamesToTypes[nodeName2]] = nodeName2;
  12316. });
  12317. function normaliseProps(serialNode) {
  12318. var _serialNode$nodeName, _ref30, _serialNode$nodeType;
  12319. var nodeName2 = (_serialNode$nodeName = serialNode.nodeName) !== null && _serialNode$nodeName !== void 0 ? _serialNode$nodeName : nodeTypeToName[serialNode.nodeType];
  12320. var nodeType = (_ref30 = (_serialNode$nodeType = serialNode.nodeType) !== null && _serialNode$nodeType !== void 0 ? _serialNode$nodeType : nodeNamesToTypes[serialNode.nodeName]) !== null && _ref30 !== void 0 ? _ref30 : 1;
  12321. assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
  12322. assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
  12323. nodeName2 = nodeName2.toLowerCase();
  12324. var type = null;
  12325. if (nodeName2 === 'input') {
  12326. type = (serialNode.type || serialNode.attributes && serialNode.attributes.type || '').toLowerCase();
  12327. if (!valid_input_type_default().includes(type)) {
  12328. type = 'text';
  12329. }
  12330. }
  12331. var props = _extends({}, serialNode, {
  12332. nodeType: nodeType,
  12333. nodeName: nodeName2
  12334. });
  12335. if (type) {
  12336. props.type = type;
  12337. }
  12338. delete props.attributes;
  12339. return Object.freeze(props);
  12340. }
  12341. function normaliseAttrs(_ref31) {
  12342. var _ref31$attributes = _ref31.attributes, attributes4 = _ref31$attributes === void 0 ? {} : _ref31$attributes;
  12343. var attrMap = {
  12344. htmlFor: 'for',
  12345. className: 'class'
  12346. };
  12347. return Object.keys(attributes4).reduce(function(attrs, attrName) {
  12348. var value = attributes4[attrName];
  12349. assert_default(_typeof(value) !== 'object' || value === null, 'expects attributes not to be an object, \''.concat(attrName, '\' was'));
  12350. if (value !== void 0) {
  12351. var mappedName = attrMap[attrName] || attrName;
  12352. attrs[mappedName] = value !== null ? String(value) : null;
  12353. }
  12354. return attrs;
  12355. }, {});
  12356. }
  12357. var serial_virtual_node_default = SerialVirtualNode;
  12358. var aria_exports = {};
  12359. __export(aria_exports, {
  12360. allowedAttr: function allowedAttr() {
  12361. return allowed_attr_default;
  12362. },
  12363. arialabelText: function arialabelText() {
  12364. return arialabel_text_default;
  12365. },
  12366. arialabelledbyText: function arialabelledbyText() {
  12367. return arialabelledby_text_default;
  12368. },
  12369. getAccessibleRefs: function getAccessibleRefs() {
  12370. return get_accessible_refs_default;
  12371. },
  12372. getElementUnallowedRoles: function getElementUnallowedRoles() {
  12373. return get_element_unallowed_roles_default;
  12374. },
  12375. getExplicitRole: function getExplicitRole() {
  12376. return get_explicit_role_default;
  12377. },
  12378. getImplicitRole: function getImplicitRole() {
  12379. return implicit_role_default;
  12380. },
  12381. getOwnedVirtual: function getOwnedVirtual() {
  12382. return get_owned_virtual_default;
  12383. },
  12384. getRole: function getRole() {
  12385. return get_role_default;
  12386. },
  12387. getRoleType: function getRoleType() {
  12388. return get_role_type_default;
  12389. },
  12390. getRolesByType: function getRolesByType() {
  12391. return get_roles_by_type_default;
  12392. },
  12393. getRolesWithNameFromContents: function getRolesWithNameFromContents() {
  12394. return get_roles_with_name_from_contents_default;
  12395. },
  12396. implicitNodes: function implicitNodes() {
  12397. return implicit_nodes_default;
  12398. },
  12399. implicitRole: function implicitRole() {
  12400. return implicit_role_default;
  12401. },
  12402. isAccessibleRef: function isAccessibleRef() {
  12403. return is_accessible_ref_default;
  12404. },
  12405. isAriaRoleAllowedOnElement: function isAriaRoleAllowedOnElement() {
  12406. return is_aria_role_allowed_on_element_default;
  12407. },
  12408. isUnsupportedRole: function isUnsupportedRole() {
  12409. return is_unsupported_role_default;
  12410. },
  12411. isValidRole: function isValidRole() {
  12412. return is_valid_role_default;
  12413. },
  12414. label: function label() {
  12415. return label_default2;
  12416. },
  12417. labelVirtual: function labelVirtual() {
  12418. return label_virtual_default;
  12419. },
  12420. lookupTable: function lookupTable() {
  12421. return lookup_table_default;
  12422. },
  12423. namedFromContents: function namedFromContents() {
  12424. return named_from_contents_default;
  12425. },
  12426. requiredAttr: function requiredAttr() {
  12427. return required_attr_default;
  12428. },
  12429. requiredContext: function requiredContext() {
  12430. return required_context_default;
  12431. },
  12432. requiredOwned: function requiredOwned() {
  12433. return required_owned_default;
  12434. },
  12435. validateAttr: function validateAttr() {
  12436. return validate_attr_default;
  12437. },
  12438. validateAttrValue: function validateAttrValue() {
  12439. return validate_attr_value_default;
  12440. }
  12441. });
  12442. function getGlobalAriaAttrs() {
  12443. if (cache_default.get('globalAriaAttrs')) {
  12444. return cache_default.get('globalAriaAttrs');
  12445. }
  12446. var globalAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attrName) {
  12447. return standards_default.ariaAttrs[attrName].global;
  12448. });
  12449. cache_default.set('globalAriaAttrs', globalAttrs);
  12450. return globalAttrs;
  12451. }
  12452. var get_global_aria_attrs_default = getGlobalAriaAttrs;
  12453. function allowedAttr(role) {
  12454. var roleDef = standards_default.ariaRoles[role];
  12455. var attrs = _toConsumableArray(get_global_aria_attrs_default());
  12456. if (!roleDef) {
  12457. return attrs;
  12458. }
  12459. if (roleDef.allowedAttrs) {
  12460. attrs.push.apply(attrs, _toConsumableArray(roleDef.allowedAttrs));
  12461. }
  12462. if (roleDef.requiredAttrs) {
  12463. attrs.push.apply(attrs, _toConsumableArray(roleDef.requiredAttrs));
  12464. }
  12465. return attrs;
  12466. }
  12467. var allowed_attr_default = allowedAttr;
  12468. function arialabelText(vNode) {
  12469. if (!(vNode instanceof abstract_virtual_node_default)) {
  12470. if (vNode.nodeType !== 1) {
  12471. return '';
  12472. }
  12473. vNode = get_node_from_tree_default(vNode);
  12474. }
  12475. return vNode.attr('aria-label') || '';
  12476. }
  12477. var arialabel_text_default = arialabelText;
  12478. function isUnsupportedRole(role) {
  12479. var roleDefinition = standards_default.ariaRoles[role];
  12480. return roleDefinition ? !!roleDefinition.unsupported : false;
  12481. }
  12482. var is_unsupported_role_default = isUnsupportedRole;
  12483. function isValidRole(role) {
  12484. var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref32.allowAbstract, _ref32$flagUnsupporte = _ref32.flagUnsupported, flagUnsupported = _ref32$flagUnsupporte === void 0 ? false : _ref32$flagUnsupporte;
  12485. var roleDefinition = standards_default.ariaRoles[role];
  12486. var isRoleUnsupported = is_unsupported_role_default(role);
  12487. if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
  12488. return false;
  12489. }
  12490. return allowAbstract ? true : roleDefinition.type !== 'abstract';
  12491. }
  12492. var is_valid_role_default = isValidRole;
  12493. function getExplicitRole(vNode) {
  12494. var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref33.fallback, abstracts = _ref33.abstracts, dpub = _ref33.dpub;
  12495. vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
  12496. if (vNode.props.nodeType !== 1) {
  12497. return null;
  12498. }
  12499. var roleAttr = (vNode.attr('role') || '').trim().toLowerCase();
  12500. var roleList = fallback ? token_list_default(roleAttr) : [ roleAttr ];
  12501. var firstValidRole = roleList.find(function(role) {
  12502. if (!dpub && role.substr(0, 4) === 'doc-') {
  12503. return false;
  12504. }
  12505. return is_valid_role_default(role, {
  12506. allowAbstract: abstracts
  12507. });
  12508. });
  12509. return firstValidRole || null;
  12510. }
  12511. var get_explicit_role_default = getExplicitRole;
  12512. function getElementsByContentType(type) {
  12513. return Object.keys(standards_default.htmlElms).filter(function(nodeName2) {
  12514. var elm = standards_default.htmlElms[nodeName2];
  12515. if (elm.contentTypes) {
  12516. return elm.contentTypes.includes(type);
  12517. }
  12518. if (!elm.variant) {
  12519. return false;
  12520. }
  12521. if (elm.variant['default'] && elm.variant['default'].contentTypes) {
  12522. return elm.variant['default'].contentTypes.includes(type);
  12523. }
  12524. return false;
  12525. });
  12526. }
  12527. var get_elements_by_content_type_default = getElementsByContentType;
  12528. function toGrid(node) {
  12529. var table5 = [];
  12530. var rows = node.rows;
  12531. for (var i = 0, rowLength = rows.length; i < rowLength; i++) {
  12532. var cells = rows[i].cells;
  12533. table5[i] = table5[i] || [];
  12534. var columnIndex = 0;
  12535. for (var j = 0, cellLength = cells.length; j < cellLength; j++) {
  12536. for (var colSpan = 0; colSpan < cells[j].colSpan; colSpan++) {
  12537. var rowspanAttr = cells[j].getAttribute('rowspan');
  12538. var rowspanValue = parseInt(rowspanAttr) === 0 || cells[j].rowspan === 0 ? rows.length : cells[j].rowSpan;
  12539. for (var rowSpan = 0; rowSpan < rowspanValue; rowSpan++) {
  12540. table5[i + rowSpan] = table5[i + rowSpan] || [];
  12541. while (table5[i + rowSpan][columnIndex]) {
  12542. columnIndex++;
  12543. }
  12544. table5[i + rowSpan][columnIndex] = cells[j];
  12545. }
  12546. columnIndex++;
  12547. }
  12548. }
  12549. }
  12550. return table5;
  12551. }
  12552. var to_grid_default = memoize_default(toGrid);
  12553. function getCellPosition(cell, tableGrid) {
  12554. var rowIndex, index;
  12555. if (!tableGrid) {
  12556. tableGrid = to_grid_default(find_up_default(cell, 'table'));
  12557. }
  12558. for (rowIndex = 0; rowIndex < tableGrid.length; rowIndex++) {
  12559. if (tableGrid[rowIndex]) {
  12560. index = tableGrid[rowIndex].indexOf(cell);
  12561. if (index !== -1) {
  12562. return {
  12563. x: index,
  12564. y: rowIndex
  12565. };
  12566. }
  12567. }
  12568. }
  12569. }
  12570. var get_cell_position_default = memoize_default(getCellPosition);
  12571. function getScope(cell) {
  12572. var scope = cell.getAttribute('scope');
  12573. var role = cell.getAttribute('role');
  12574. if (cell instanceof window.Element === false || [ 'TD', 'TH' ].indexOf(cell.nodeName.toUpperCase()) === -1) {
  12575. throw new TypeError('Expected TD or TH element');
  12576. }
  12577. if (role === 'columnheader') {
  12578. return 'col';
  12579. } else if (role === 'rowheader') {
  12580. return 'row';
  12581. } else if (scope === 'col' || scope === 'row') {
  12582. return scope;
  12583. } else if (cell.nodeName.toUpperCase() !== 'TH') {
  12584. return false;
  12585. }
  12586. var tableGrid = to_grid_default(find_up_default(cell, 'table'));
  12587. var pos = get_cell_position_default(cell, tableGrid);
  12588. var headerRow = tableGrid[pos.y].reduce(function(headerRow2, cell2) {
  12589. return headerRow2 && cell2.nodeName.toUpperCase() === 'TH';
  12590. }, true);
  12591. if (headerRow) {
  12592. return 'col';
  12593. }
  12594. var headerCol = tableGrid.map(function(col) {
  12595. return col[pos.x];
  12596. }).reduce(function(headerCol2, cell2) {
  12597. return headerCol2 && cell2 && cell2.nodeName.toUpperCase() === 'TH';
  12598. }, true);
  12599. if (headerCol) {
  12600. return 'row';
  12601. }
  12602. return 'auto';
  12603. }
  12604. var get_scope_default = getScope;
  12605. function isColumnHeader(element) {
  12606. return [ 'col', 'auto' ].indexOf(get_scope_default(element)) !== -1;
  12607. }
  12608. var is_column_header_default = isColumnHeader;
  12609. function isRowHeader(cell) {
  12610. return [ 'row', 'auto' ].includes(get_scope_default(cell));
  12611. }
  12612. var is_row_header_default = isRowHeader;
  12613. var sectioningElementSelector = get_elements_by_content_type_default('sectioning').map(function(nodeName2) {
  12614. return ''.concat(nodeName2, ':not([role])');
  12615. }).join(', ') + ' , main:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]';
  12616. function hasAccessibleName(vNode) {
  12617. var ariaLabelledby = sanitize_default(arialabelledby_text_default(vNode));
  12618. var ariaLabel = sanitize_default(arialabel_text_default(vNode));
  12619. return !!(ariaLabelledby || ariaLabel);
  12620. }
  12621. var implicitHtmlRoles = {
  12622. a: function a(vNode) {
  12623. return vNode.hasAttr('href') ? 'link' : null;
  12624. },
  12625. area: function area(vNode) {
  12626. return vNode.hasAttr('href') ? 'link' : null;
  12627. },
  12628. article: 'article',
  12629. aside: 'complementary',
  12630. body: 'document',
  12631. button: 'button',
  12632. datalist: 'listbox',
  12633. dd: 'definition',
  12634. dfn: 'term',
  12635. details: 'group',
  12636. dialog: 'dialog',
  12637. dt: 'term',
  12638. fieldset: 'group',
  12639. figure: 'figure',
  12640. footer: function footer(vNode) {
  12641. var sectioningElement = closest_default(vNode, sectioningElementSelector);
  12642. return !sectioningElement ? 'contentinfo' : null;
  12643. },
  12644. form: function form(vNode) {
  12645. return hasAccessibleName(vNode) ? 'form' : null;
  12646. },
  12647. h1: 'heading',
  12648. h2: 'heading',
  12649. h3: 'heading',
  12650. h4: 'heading',
  12651. h5: 'heading',
  12652. h6: 'heading',
  12653. header: function header(vNode) {
  12654. var sectioningElement = closest_default(vNode, sectioningElementSelector);
  12655. return !sectioningElement ? 'banner' : null;
  12656. },
  12657. hr: 'separator',
  12658. img: function img(vNode) {
  12659. var emptyAlt = vNode.hasAttr('alt') && !vNode.attr('alt');
  12660. var hasGlobalAria = get_global_aria_attrs_default().find(function(attr) {
  12661. return vNode.hasAttr(attr);
  12662. });
  12663. return emptyAlt && !hasGlobalAria && !is_focusable_default(vNode) ? 'presentation' : 'img';
  12664. },
  12665. input: function input(vNode) {
  12666. var suggestionsSourceElement;
  12667. if (vNode.hasAttr('list')) {
  12668. var listElement = idrefs_default(vNode.actualNode, 'list').filter(function(node) {
  12669. return !!node;
  12670. })[0];
  12671. suggestionsSourceElement = listElement && listElement.nodeName.toLowerCase() === 'datalist';
  12672. }
  12673. switch (vNode.props.type) {
  12674. case 'checkbox':
  12675. return 'checkbox';
  12676. case 'number':
  12677. return 'spinbutton';
  12678. case 'radio':
  12679. return 'radio';
  12680. case 'range':
  12681. return 'slider';
  12682. case 'search':
  12683. return !suggestionsSourceElement ? 'searchbox' : 'combobox';
  12684. case 'button':
  12685. case 'image':
  12686. case 'reset':
  12687. case 'submit':
  12688. return 'button';
  12689. case 'text':
  12690. case 'tel':
  12691. case 'url':
  12692. case 'email':
  12693. case '':
  12694. return !suggestionsSourceElement ? 'textbox' : 'combobox';
  12695. default:
  12696. return 'textbox';
  12697. }
  12698. },
  12699. li: 'listitem',
  12700. main: 'main',
  12701. math: 'math',
  12702. menu: 'list',
  12703. nav: 'navigation',
  12704. ol: 'list',
  12705. optgroup: 'group',
  12706. option: 'option',
  12707. output: 'status',
  12708. progress: 'progressbar',
  12709. section: function section(vNode) {
  12710. return hasAccessibleName(vNode) ? 'region' : null;
  12711. },
  12712. select: function select(vNode) {
  12713. return vNode.hasAttr('multiple') || parseInt(vNode.attr('size')) > 1 ? 'listbox' : 'combobox';
  12714. },
  12715. summary: 'button',
  12716. table: 'table',
  12717. tbody: 'rowgroup',
  12718. td: function td(vNode) {
  12719. var table5 = closest_default(vNode, 'table');
  12720. var role = get_explicit_role_default(table5);
  12721. return [ 'grid', 'treegrid' ].includes(role) ? 'gridcell' : 'cell';
  12722. },
  12723. textarea: 'textbox',
  12724. tfoot: 'rowgroup',
  12725. th: function th(vNode) {
  12726. if (is_column_header_default(vNode.actualNode)) {
  12727. return 'columnheader';
  12728. }
  12729. if (is_row_header_default(vNode.actualNode)) {
  12730. return 'rowheader';
  12731. }
  12732. },
  12733. thead: 'rowgroup',
  12734. tr: 'row',
  12735. ul: 'list'
  12736. };
  12737. var implicit_html_roles_default = implicitHtmlRoles;
  12738. function fromPrimative(someString, matcher) {
  12739. var matcherType = _typeof(matcher);
  12740. if (Array.isArray(matcher) && typeof someString !== 'undefined') {
  12741. return matcher.includes(someString);
  12742. }
  12743. if (matcherType === 'function') {
  12744. return !!matcher(someString);
  12745. }
  12746. if (someString !== null && someString !== void 0) {
  12747. if (matcher instanceof RegExp) {
  12748. return matcher.test(someString);
  12749. }
  12750. if (/^\/.*\/$/.test(matcher)) {
  12751. var pattern = matcher.substring(1, matcher.length - 1);
  12752. return new RegExp(pattern).test(someString);
  12753. }
  12754. }
  12755. return matcher === someString;
  12756. }
  12757. var from_primative_default = fromPrimative;
  12758. function hasAccessibleName2(vNode, matcher) {
  12759. return from_primative_default(!!accessible_text_virtual_default(vNode), matcher);
  12760. }
  12761. var has_accessible_name_default = hasAccessibleName2;
  12762. function fromFunction(getValue, matcher) {
  12763. var matcherType = _typeof(matcher);
  12764. if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
  12765. throw new Error('Expect matcher to be an object');
  12766. }
  12767. return Object.keys(matcher).every(function(propName) {
  12768. return from_primative_default(getValue(propName), matcher[propName]);
  12769. });
  12770. }
  12771. var from_function_default = fromFunction;
  12772. function attributes(vNode, matcher) {
  12773. if (!(vNode instanceof abstract_virtual_node_default)) {
  12774. vNode = get_node_from_tree_default(vNode);
  12775. }
  12776. return from_function_default(function(attrName) {
  12777. return vNode.attr(attrName);
  12778. }, matcher);
  12779. }
  12780. var attributes_default = attributes;
  12781. function condition(arg, condition4) {
  12782. return !!condition4(arg);
  12783. }
  12784. var condition_default = condition;
  12785. function explicitRole(vNode, matcher) {
  12786. return from_primative_default(get_explicit_role_default(vNode), matcher);
  12787. }
  12788. var explicit_role_default = explicitRole;
  12789. function implicitRole(vNode, matcher) {
  12790. return from_primative_default(implicit_role_default(vNode), matcher);
  12791. }
  12792. var implicit_role_default2 = implicitRole;
  12793. function nodeName(vNode, matcher) {
  12794. if (!(vNode instanceof abstract_virtual_node_default)) {
  12795. vNode = get_node_from_tree_default(vNode);
  12796. }
  12797. return from_primative_default(vNode.props.nodeName, matcher);
  12798. }
  12799. var node_name_default = nodeName;
  12800. function properties(vNode, matcher) {
  12801. if (!(vNode instanceof abstract_virtual_node_default)) {
  12802. vNode = get_node_from_tree_default(vNode);
  12803. }
  12804. return from_function_default(function(propName) {
  12805. return vNode.props[propName];
  12806. }, matcher);
  12807. }
  12808. var properties_default = properties;
  12809. function semanticRole(vNode, matcher) {
  12810. return from_primative_default(get_role_default(vNode), matcher);
  12811. }
  12812. var semantic_role_default = semanticRole;
  12813. var matchers = {
  12814. hasAccessibleName: has_accessible_name_default,
  12815. attributes: attributes_default,
  12816. condition: condition_default,
  12817. explicitRole: explicit_role_default,
  12818. implicitRole: implicit_role_default2,
  12819. nodeName: node_name_default,
  12820. properties: properties_default,
  12821. semanticRole: semantic_role_default
  12822. };
  12823. function fromDefinition(vNode, definition) {
  12824. if (!(vNode instanceof abstract_virtual_node_default)) {
  12825. vNode = get_node_from_tree_default(vNode);
  12826. }
  12827. if (Array.isArray(definition)) {
  12828. return definition.some(function(definitionItem) {
  12829. return fromDefinition(vNode, definitionItem);
  12830. });
  12831. }
  12832. if (typeof definition === 'string') {
  12833. return matches_default(vNode, definition);
  12834. }
  12835. return Object.keys(definition).every(function(matcherName) {
  12836. if (!matchers[matcherName]) {
  12837. throw new Error('Unknown matcher type "'.concat(matcherName, '"'));
  12838. }
  12839. var matchMethod = matchers[matcherName];
  12840. var matcher = definition[matcherName];
  12841. return matchMethod(vNode, matcher);
  12842. });
  12843. }
  12844. var from_definition_default = fromDefinition;
  12845. function matches5(vNode, definition) {
  12846. return from_definition_default(vNode, definition);
  12847. }
  12848. var matches_default2 = matches5;
  12849. matches_default2.hasAccessibleName = has_accessible_name_default;
  12850. matches_default2.attributes = attributes_default;
  12851. matches_default2.condition = condition_default;
  12852. matches_default2.explicitRole = explicit_role_default;
  12853. matches_default2.fromDefinition = from_definition_default;
  12854. matches_default2.fromFunction = from_function_default;
  12855. matches_default2.fromPrimative = from_primative_default;
  12856. matches_default2.implicitRole = implicit_role_default2;
  12857. matches_default2.nodeName = node_name_default;
  12858. matches_default2.properties = properties_default;
  12859. matches_default2.semanticRole = semantic_role_default;
  12860. var matches_default3 = matches_default2;
  12861. function getElementSpec(vNode) {
  12862. var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$noMatchAccessi = _ref34.noMatchAccessibleName, noMatchAccessibleName = _ref34$noMatchAccessi === void 0 ? false : _ref34$noMatchAccessi;
  12863. var standard = standards_default.htmlElms[vNode.props.nodeName];
  12864. if (!standard) {
  12865. return {};
  12866. }
  12867. if (!standard.variant) {
  12868. return standard;
  12869. }
  12870. var variant = standard.variant, spec = _objectWithoutProperties(standard, _excluded3);
  12871. for (var variantName in variant) {
  12872. if (!variant.hasOwnProperty(variantName) || variantName === 'default') {
  12873. continue;
  12874. }
  12875. var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded4);
  12876. var matchProperties = Array.isArray(matches14) ? matches14 : [ matches14 ];
  12877. for (var _i12 = 0; _i12 < matchProperties.length && noMatchAccessibleName; _i12++) {
  12878. if (matchProperties[_i12].hasOwnProperty('hasAccessibleName')) {
  12879. return standard;
  12880. }
  12881. }
  12882. if (matches_default3(vNode, matches14)) {
  12883. for (var propName in props) {
  12884. if (props.hasOwnProperty(propName)) {
  12885. spec[propName] = props[propName];
  12886. }
  12887. }
  12888. }
  12889. }
  12890. for (var _propName in variant['default']) {
  12891. if (variant['default'].hasOwnProperty(_propName) && typeof spec[_propName] === 'undefined') {
  12892. spec[_propName] = variant['default'][_propName];
  12893. }
  12894. }
  12895. return spec;
  12896. }
  12897. var get_element_spec_default = getElementSpec;
  12898. function implicitRole2(node) {
  12899. var _ref35 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref35.chromium;
  12900. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12901. node = vNode.actualNode;
  12902. if (!vNode) {
  12903. throw new ReferenceError('Cannot get implicit role of a node outside the current scope.');
  12904. }
  12905. var nodeName2 = vNode.props.nodeName;
  12906. var role = implicit_html_roles_default[nodeName2];
  12907. if (!role && chromium) {
  12908. var _get_element_spec_def = get_element_spec_default(vNode), chromiumRole = _get_element_spec_def.chromiumRole;
  12909. return chromiumRole || null;
  12910. }
  12911. if (typeof role === 'function') {
  12912. return role(vNode);
  12913. }
  12914. return role || null;
  12915. }
  12916. var implicit_role_default = implicitRole2;
  12917. var inheritsPresentationChain = {
  12918. td: [ 'tr' ],
  12919. th: [ 'tr' ],
  12920. tr: [ 'thead', 'tbody', 'tfoot', 'table' ],
  12921. thead: [ 'table' ],
  12922. tbody: [ 'table' ],
  12923. tfoot: [ 'table' ],
  12924. li: [ 'ol', 'ul' ],
  12925. dt: [ 'dl', 'div' ],
  12926. dd: [ 'dl', 'div' ],
  12927. div: [ 'dl' ]
  12928. };
  12929. function getInheritedRole(vNode, explicitRoleOptions) {
  12930. var parentNodeNames = inheritsPresentationChain[vNode.props.nodeName];
  12931. if (!parentNodeNames) {
  12932. return null;
  12933. }
  12934. if (!vNode.parent) {
  12935. throw new ReferenceError('Cannot determine role presentational inheritance of a required parent outside the current scope.');
  12936. }
  12937. if (!parentNodeNames.includes(vNode.parent.props.nodeName)) {
  12938. return null;
  12939. }
  12940. var parentRole = get_explicit_role_default(vNode.parent, explicitRoleOptions);
  12941. if ([ 'none', 'presentation' ].includes(parentRole) && !hasConflictResolution(vNode.parent)) {
  12942. return parentRole;
  12943. }
  12944. if (parentRole) {
  12945. return null;
  12946. }
  12947. return getInheritedRole(vNode.parent, explicitRoleOptions);
  12948. }
  12949. function resolveImplicitRole(vNode, _ref36) {
  12950. var chromium = _ref36.chromium, explicitRoleOptions = _objectWithoutProperties(_ref36, _excluded5);
  12951. var implicitRole3 = implicit_role_default(vNode, {
  12952. chromium: chromium
  12953. });
  12954. if (!implicitRole3) {
  12955. return null;
  12956. }
  12957. var presentationalRole = getInheritedRole(vNode, explicitRoleOptions);
  12958. if (presentationalRole) {
  12959. return presentationalRole;
  12960. }
  12961. return implicitRole3;
  12962. }
  12963. function hasConflictResolution(vNode) {
  12964. var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
  12965. return vNode.hasAttr(attr);
  12966. });
  12967. return hasGlobalAria || is_focusable_default(vNode);
  12968. }
  12969. function resolveRole(node) {
  12970. var _ref37 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12971. var noImplicit = _ref37.noImplicit, roleOptions = _objectWithoutProperties(_ref37, _excluded6);
  12972. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12973. if (vNode.props.nodeType !== 1) {
  12974. return null;
  12975. }
  12976. var explicitRole2 = get_explicit_role_default(vNode, roleOptions);
  12977. if (!explicitRole2) {
  12978. return noImplicit ? null : resolveImplicitRole(vNode, roleOptions);
  12979. }
  12980. if (![ 'presentation', 'none' ].includes(explicitRole2)) {
  12981. return explicitRole2;
  12982. }
  12983. if (hasConflictResolution(vNode)) {
  12984. return noImplicit ? null : resolveImplicitRole(vNode, roleOptions);
  12985. }
  12986. return explicitRole2;
  12987. }
  12988. function getRole(node) {
  12989. var _ref38 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12990. var noPresentational = _ref38.noPresentational, options = _objectWithoutProperties(_ref38, _excluded7);
  12991. var role = resolveRole(node, options);
  12992. if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
  12993. return null;
  12994. }
  12995. return role;
  12996. }
  12997. var get_role_default = getRole;
  12998. var alwaysTitleElements = [ 'iframe' ];
  12999. function titleText(node) {
  13000. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13001. if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {
  13002. return '';
  13003. }
  13004. if (!matches_default2(vNode, alwaysTitleElements) && [ 'none', 'presentation' ].includes(get_role_default(vNode))) {
  13005. return '';
  13006. }
  13007. return vNode.attr('title');
  13008. }
  13009. var title_text_default = titleText;
  13010. function namedFromContents(vNode) {
  13011. var _ref39 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref39.strict;
  13012. vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
  13013. if (vNode.props.nodeType !== 1) {
  13014. return false;
  13015. }
  13016. var role = get_role_default(vNode);
  13017. var roleDef = standards_default.ariaRoles[role];
  13018. if (roleDef && roleDef.nameFromContent) {
  13019. return true;
  13020. }
  13021. if (strict) {
  13022. return false;
  13023. }
  13024. return !roleDef || [ 'presentation', 'none' ].includes(role);
  13025. }
  13026. var named_from_contents_default = namedFromContents;
  13027. function getOwnedVirtual(virtualNode) {
  13028. var actualNode = virtualNode.actualNode, children = virtualNode.children;
  13029. if (!children) {
  13030. throw new Error('getOwnedVirtual requires a virtual node');
  13031. }
  13032. if (virtualNode.hasAttr('aria-owns')) {
  13033. var owns = idrefs_default(actualNode, 'aria-owns').filter(function(element) {
  13034. return !!element;
  13035. }).map(function(element) {
  13036. return axe.utils.getNodeFromTree(element);
  13037. });
  13038. return [].concat(_toConsumableArray(children), _toConsumableArray(owns));
  13039. }
  13040. return _toConsumableArray(children);
  13041. }
  13042. var get_owned_virtual_default = getOwnedVirtual;
  13043. function subtreeText(virtualNode) {
  13044. var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13045. var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
  13046. context5.startNode = context5.startNode || virtualNode;
  13047. var _context = context5, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
  13048. var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
  13049. noMatchAccessibleName: true
  13050. }), contentTypes = _get_element_spec_def2.contentTypes;
  13051. if (alreadyProcessed2(virtualNode, context5) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
  13052. return '';
  13053. }
  13054. if (!named_from_contents_default(virtualNode, {
  13055. strict: strict
  13056. }) && !context5.subtreeDescendant) {
  13057. return '';
  13058. }
  13059. if (!strict) {
  13060. var subtreeDescendant = !inControlContext && !inLabelledByContext;
  13061. context5 = _extends({
  13062. subtreeDescendant: subtreeDescendant
  13063. }, context5);
  13064. }
  13065. return get_owned_virtual_default(virtualNode).reduce(function(contentText, child) {
  13066. return appendAccessibleText(contentText, child, context5);
  13067. }, '');
  13068. }
  13069. var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]);
  13070. function appendAccessibleText(contentText, virtualNode, context5) {
  13071. var nodeName2 = virtualNode.props.nodeName;
  13072. var contentTextAdd = accessible_text_virtual_default(virtualNode, context5);
  13073. if (!contentTextAdd) {
  13074. return contentText;
  13075. }
  13076. if (!phrasingElements.includes(nodeName2)) {
  13077. if (contentTextAdd[0] !== ' ') {
  13078. contentTextAdd += ' ';
  13079. }
  13080. if (contentText && contentText[contentText.length - 1] !== ' ') {
  13081. contentTextAdd = ' ' + contentTextAdd;
  13082. }
  13083. }
  13084. return contentText + contentTextAdd;
  13085. }
  13086. var subtree_text_default = subtreeText;
  13087. function labelText(virtualNode) {
  13088. var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13089. var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
  13090. if (context5.inControlContext || context5.inLabelledByContext || alreadyProcessed2(virtualNode, context5)) {
  13091. return '';
  13092. }
  13093. if (!context5.startNode) {
  13094. context5.startNode = virtualNode;
  13095. }
  13096. var labelContext = _extends({
  13097. inControlContext: true
  13098. }, context5);
  13099. var explicitLabels = getExplicitLabels(virtualNode);
  13100. var implicitLabel = closest_default(virtualNode, 'label');
  13101. var labels;
  13102. if (implicitLabel) {
  13103. labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]);
  13104. labels.sort(node_sorter_default);
  13105. } else {
  13106. labels = explicitLabels;
  13107. }
  13108. return labels.map(function(label5) {
  13109. return accessible_text_default(label5, labelContext);
  13110. }).filter(function(text32) {
  13111. return text32 !== '';
  13112. }).join(' ');
  13113. }
  13114. function getExplicitLabels(virtualNode) {
  13115. if (!virtualNode.attr('id')) {
  13116. return [];
  13117. }
  13118. if (!virtualNode.actualNode) {
  13119. throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
  13120. }
  13121. return find_elms_in_context_default({
  13122. elm: 'label',
  13123. attr: 'for',
  13124. value: virtualNode.attr('id'),
  13125. context: virtualNode.actualNode
  13126. });
  13127. }
  13128. var label_text_default = labelText;
  13129. var defaultButtonValues = {
  13130. submit: 'Submit',
  13131. image: 'Submit',
  13132. reset: 'Reset',
  13133. button: ''
  13134. };
  13135. var nativeTextMethods = {
  13136. valueText: function valueText(_ref40) {
  13137. var actualNode = _ref40.actualNode;
  13138. return actualNode.value || '';
  13139. },
  13140. buttonDefaultText: function buttonDefaultText(_ref41) {
  13141. var actualNode = _ref41.actualNode;
  13142. return defaultButtonValues[actualNode.type] || '';
  13143. },
  13144. tableCaptionText: descendantText.bind(null, 'caption'),
  13145. figureText: descendantText.bind(null, 'figcaption'),
  13146. svgTitleText: descendantText.bind(null, 'title'),
  13147. fieldsetLegendText: descendantText.bind(null, 'legend'),
  13148. altText: attrText.bind(null, 'alt'),
  13149. tableSummaryText: attrText.bind(null, 'summary'),
  13150. titleText: title_text_default,
  13151. subtreeText: subtree_text_default,
  13152. labelText: label_text_default,
  13153. singleSpace: function singleSpace() {
  13154. return ' ';
  13155. },
  13156. placeholderText: attrText.bind(null, 'placeholder')
  13157. };
  13158. function attrText(attr, vNode) {
  13159. return vNode.attr(attr) || '';
  13160. }
  13161. function descendantText(nodeName2, _ref42, context5) {
  13162. var actualNode = _ref42.actualNode;
  13163. nodeName2 = nodeName2.toLowerCase();
  13164. var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
  13165. var candidate = actualNode.querySelector(nodeNames2);
  13166. if (!candidate || candidate.nodeName.toLowerCase() !== nodeName2) {
  13167. return '';
  13168. }
  13169. return accessible_text_default(candidate, context5);
  13170. }
  13171. var native_text_methods_default = nativeTextMethods;
  13172. function nativeTextAlternative(virtualNode) {
  13173. var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13174. var actualNode = virtualNode.actualNode;
  13175. if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) {
  13176. return '';
  13177. }
  13178. var textMethods = findTextMethods(virtualNode);
  13179. var accName = textMethods.reduce(function(accName2, step) {
  13180. return accName2 || step(virtualNode, context5);
  13181. }, '');
  13182. if (context5.debug) {
  13183. axe.log(accName || '{empty-value}', actualNode, context5);
  13184. }
  13185. return accName;
  13186. }
  13187. function findTextMethods(virtualNode) {
  13188. var elmSpec = get_element_spec_default(virtualNode, {
  13189. noMatchAccessibleName: true
  13190. });
  13191. var methods = elmSpec.namingMethods || [];
  13192. return methods.map(function(methodName) {
  13193. return native_text_methods_default[methodName];
  13194. });
  13195. }
  13196. var native_text_alternative_default = nativeTextAlternative;
  13197. var unsupported = {
  13198. accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]
  13199. };
  13200. var unsupported_default = unsupported;
  13201. var nonTextInputTypes = [ 'button', 'checkbox', 'color', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit' ];
  13202. function isNativeTextbox(node) {
  13203. node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13204. var nodeName2 = node.props.nodeName;
  13205. return nodeName2 === 'textarea' || nodeName2 === 'input' && !nonTextInputTypes.includes((node.attr('type') || '').toLowerCase());
  13206. }
  13207. var is_native_textbox_default = isNativeTextbox;
  13208. function isNativeSelect(node) {
  13209. node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13210. var nodeName2 = node.props.nodeName;
  13211. return nodeName2 === 'select';
  13212. }
  13213. var is_native_select_default = isNativeSelect;
  13214. function isAriaTextbox(node) {
  13215. var role = get_explicit_role_default(node);
  13216. return role === 'textbox';
  13217. }
  13218. var is_aria_textbox_default = isAriaTextbox;
  13219. function isAriaListbox(node) {
  13220. var role = get_explicit_role_default(node);
  13221. return role === 'listbox';
  13222. }
  13223. var is_aria_listbox_default = isAriaListbox;
  13224. function isAriaCombobox(node) {
  13225. var role = get_explicit_role_default(node);
  13226. return role === 'combobox';
  13227. }
  13228. var is_aria_combobox_default = isAriaCombobox;
  13229. var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ];
  13230. function isAriaRange(node) {
  13231. var role = get_explicit_role_default(node);
  13232. return rangeRoles.includes(role);
  13233. }
  13234. var is_aria_range_default = isAriaRange;
  13235. var controlValueRoles = [ 'textbox', 'progressbar', 'scrollbar', 'slider', 'spinbutton', 'combobox', 'listbox' ];
  13236. var _formControlValueMethods = {
  13237. nativeTextboxValue: nativeTextboxValue,
  13238. nativeSelectValue: nativeSelectValue,
  13239. ariaTextboxValue: ariaTextboxValue,
  13240. ariaListboxValue: ariaListboxValue,
  13241. ariaComboboxValue: ariaComboboxValue,
  13242. ariaRangeValue: ariaRangeValue
  13243. };
  13244. function formControlValue(virtualNode) {
  13245. var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13246. var actualNode = virtualNode.actualNode;
  13247. var unsupportedRoles = unsupported_default.accessibleNameFromFieldValue || [];
  13248. var role = get_role_default(virtualNode);
  13249. if (context5.startNode === virtualNode || !controlValueRoles.includes(role) || unsupportedRoles.includes(role)) {
  13250. return '';
  13251. }
  13252. var valueMethods = Object.keys(_formControlValueMethods).map(function(name) {
  13253. return _formControlValueMethods[name];
  13254. });
  13255. var valueString = valueMethods.reduce(function(accName, step) {
  13256. return accName || step(virtualNode, context5);
  13257. }, '');
  13258. if (context5.debug) {
  13259. log_default(valueString || '{empty-value}', actualNode, context5);
  13260. }
  13261. return valueString;
  13262. }
  13263. function nativeTextboxValue(node) {
  13264. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13265. if (is_native_textbox_default(vNode)) {
  13266. return vNode.props.value || '';
  13267. }
  13268. return '';
  13269. }
  13270. function nativeSelectValue(node) {
  13271. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13272. if (!is_native_select_default(vNode)) {
  13273. return '';
  13274. }
  13275. var options = query_selector_all_default(vNode, 'option');
  13276. var selectedOptions = options.filter(function(option) {
  13277. return option.props.selected;
  13278. });
  13279. if (!selectedOptions.length) {
  13280. selectedOptions.push(options[0]);
  13281. }
  13282. return selectedOptions.map(function(option) {
  13283. return visible_virtual_default(option);
  13284. }).join(' ') || '';
  13285. }
  13286. function ariaTextboxValue(node) {
  13287. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13288. var actualNode = vNode.actualNode;
  13289. if (!is_aria_textbox_default(vNode)) {
  13290. return '';
  13291. }
  13292. if (!actualNode || actualNode && !is_hidden_with_css_default(actualNode)) {
  13293. return visible_virtual_default(vNode, true);
  13294. } else {
  13295. return actualNode.textContent;
  13296. }
  13297. }
  13298. function ariaListboxValue(node, context5) {
  13299. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13300. if (!is_aria_listbox_default(vNode)) {
  13301. return '';
  13302. }
  13303. var selected = get_owned_virtual_default(vNode).filter(function(owned) {
  13304. return get_role_default(owned) === 'option' && owned.attr('aria-selected') === 'true';
  13305. });
  13306. if (selected.length === 0) {
  13307. return '';
  13308. }
  13309. return accessible_text_virtual_default(selected[0], context5);
  13310. }
  13311. function ariaComboboxValue(node, context5) {
  13312. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13313. if (!is_aria_combobox_default(vNode)) {
  13314. return '';
  13315. }
  13316. var listbox = get_owned_virtual_default(vNode).filter(function(elm) {
  13317. return get_role_default(elm) === 'listbox';
  13318. })[0];
  13319. return listbox ? ariaListboxValue(listbox, context5) : '';
  13320. }
  13321. function ariaRangeValue(node) {
  13322. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13323. if (!is_aria_range_default(vNode) || !vNode.hasAttr('aria-valuenow')) {
  13324. return '';
  13325. }
  13326. var valueNow = +vNode.attr('aria-valuenow');
  13327. return !isNaN(valueNow) ? String(valueNow) : '0';
  13328. }
  13329. var form_control_value_default = formControlValue;
  13330. function getUnicodeNonBmpRegExp() {
  13331. return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
  13332. }
  13333. function getPunctuationRegExp() {
  13334. return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
  13335. }
  13336. function getSupplementaryPrivateUseRegExp() {
  13337. return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
  13338. }
  13339. var emoji_regex = __toModule(require_emoji_regex());
  13340. function hasUnicode(str, options) {
  13341. var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
  13342. if (emoji) {
  13343. return emoji_regex['default']().test(str);
  13344. }
  13345. if (nonBmp) {
  13346. return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
  13347. }
  13348. if (punctuations) {
  13349. return getPunctuationRegExp().test(str);
  13350. }
  13351. return false;
  13352. }
  13353. var has_unicode_default = hasUnicode;
  13354. function isIconLigature(textVNode) {
  13355. var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
  13356. var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
  13357. var nodeValue = textVNode.actualNode.nodeValue.trim();
  13358. if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
  13359. emoji: true,
  13360. nonBmp: true
  13361. })) {
  13362. return false;
  13363. }
  13364. if (!cache_default.get('canvasContext')) {
  13365. cache_default.set('canvasContext', document.createElement('canvas').getContext('2d'));
  13366. }
  13367. var canvasContext = cache_default.get('canvasContext');
  13368. var canvas = canvasContext.canvas;
  13369. if (!cache_default.get('fonts')) {
  13370. cache_default.set('fonts', {});
  13371. }
  13372. var fonts = cache_default.get('fonts');
  13373. var style = window.getComputedStyle(textVNode.parent.actualNode);
  13374. var fontFamily = style.getPropertyValue('font-family');
  13375. if (!fonts[fontFamily]) {
  13376. fonts[fontFamily] = {
  13377. occurances: 0,
  13378. numLigatures: 0
  13379. };
  13380. }
  13381. var font = fonts[fontFamily];
  13382. if (font.occurances >= occuranceThreshold) {
  13383. if (font.numLigatures / font.occurances === 1) {
  13384. return true;
  13385. } else if (font.numLigatures === 0) {
  13386. return false;
  13387. }
  13388. }
  13389. font.occurances++;
  13390. var fontSize = 30;
  13391. var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
  13392. canvasContext.font = fontStyle;
  13393. var firstChar = nodeValue.charAt(0);
  13394. var width = canvasContext.measureText(firstChar).width;
  13395. if (width < 30) {
  13396. var diff = 30 / width;
  13397. width *= diff;
  13398. fontSize *= diff;
  13399. fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
  13400. }
  13401. canvas.width = width;
  13402. canvas.height = fontSize;
  13403. canvasContext.font = fontStyle;
  13404. canvasContext.textAlign = 'left';
  13405. canvasContext.textBaseline = 'top';
  13406. canvasContext.fillText(firstChar, 0, 0);
  13407. var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
  13408. if (!compareData.some(function(pixel) {
  13409. return pixel;
  13410. })) {
  13411. font.numLigatures++;
  13412. return true;
  13413. }
  13414. canvasContext.clearRect(0, 0, width, fontSize);
  13415. canvasContext.fillText(nodeValue, 0, 0);
  13416. var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
  13417. var differences = compareData.reduce(function(diff, pixel, i) {
  13418. if (pixel === 0 && compareWith[i] === 0) {
  13419. return diff;
  13420. }
  13421. if (pixel !== 0 && compareWith[i] !== 0) {
  13422. return diff;
  13423. }
  13424. return ++diff;
  13425. }, 0);
  13426. var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) {
  13427. return width2 + canvasContext.measureText(_char3).width;
  13428. }, 0);
  13429. var actualWidth = canvasContext.measureText(nodeValue).width;
  13430. var pixelDifference = differences / compareData.length;
  13431. var sizeDifference = 1 - actualWidth / expectedWidth;
  13432. if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
  13433. font.numLigatures++;
  13434. return true;
  13435. }
  13436. return false;
  13437. }
  13438. var is_icon_ligature_default = isIconLigature;
  13439. function accessibleTextVirtual(virtualNode) {
  13440. var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13441. var actualNode = virtualNode.actualNode;
  13442. context5 = prepareContext(virtualNode, context5);
  13443. if (shouldIgnoreHidden(virtualNode, context5)) {
  13444. return '';
  13445. }
  13446. if (shouldIgnoreIconLigature(virtualNode, context5)) {
  13447. return '';
  13448. }
  13449. var computationSteps = [ arialabelledby_text_default, arialabel_text_default, native_text_alternative_default, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
  13450. var accName = computationSteps.reduce(function(accName2, step) {
  13451. if (context5.startNode === virtualNode) {
  13452. accName2 = sanitize_default(accName2);
  13453. }
  13454. if (accName2 !== '') {
  13455. return accName2;
  13456. }
  13457. return step(virtualNode, context5);
  13458. }, '');
  13459. if (context5.debug) {
  13460. axe.log(accName || '{empty-value}', actualNode, context5);
  13461. }
  13462. return accName;
  13463. }
  13464. function textNodeValue(virtualNode) {
  13465. if (virtualNode.props.nodeType !== 3) {
  13466. return '';
  13467. }
  13468. return virtualNode.props.nodeValue;
  13469. }
  13470. function shouldIgnoreHidden(_ref43, context5) {
  13471. var actualNode = _ref43.actualNode;
  13472. if (!actualNode) {
  13473. return false;
  13474. }
  13475. if (actualNode.nodeType !== 1 || context5.includeHidden) {
  13476. return false;
  13477. }
  13478. return !is_visible_default(actualNode, true);
  13479. }
  13480. function shouldIgnoreIconLigature(virtualNode, context5) {
  13481. var ignoreIconLigature = context5.ignoreIconLigature, pixelThreshold = context5.pixelThreshold, occuranceThreshold = context5.occuranceThreshold;
  13482. if (virtualNode.props.nodeType !== 3 || !ignoreIconLigature) {
  13483. return false;
  13484. }
  13485. return is_icon_ligature_default(virtualNode, pixelThreshold, occuranceThreshold);
  13486. }
  13487. function prepareContext(virtualNode, context5) {
  13488. var actualNode = virtualNode.actualNode;
  13489. if (!context5.startNode) {
  13490. context5 = _extends({
  13491. startNode: virtualNode
  13492. }, context5);
  13493. }
  13494. if (!actualNode) {
  13495. return context5;
  13496. }
  13497. if (actualNode.nodeType === 1 && context5.inLabelledByContext && context5.includeHidden === void 0) {
  13498. context5 = _extends({
  13499. includeHidden: !is_visible_default(actualNode, true)
  13500. }, context5);
  13501. }
  13502. return context5;
  13503. }
  13504. accessibleTextVirtual.alreadyProcessed = function alreadyProcessed(virtualnode, context5) {
  13505. context5.processed = context5.processed || [];
  13506. if (context5.processed.includes(virtualnode)) {
  13507. return true;
  13508. }
  13509. context5.processed.push(virtualnode);
  13510. return false;
  13511. };
  13512. var accessible_text_virtual_default = accessibleTextVirtual;
  13513. function accessibleText(element, context5) {
  13514. var virtualNode = get_node_from_tree_default(element);
  13515. return accessible_text_virtual_default(virtualNode, context5);
  13516. }
  13517. var accessible_text_default = accessibleText;
  13518. function arialabelledbyText(vNode) {
  13519. var context5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13520. if (!(vNode instanceof abstract_virtual_node_default)) {
  13521. if (vNode.nodeType !== 1) {
  13522. return '';
  13523. }
  13524. vNode = get_node_from_tree_default(vNode);
  13525. }
  13526. if (vNode.props.nodeType !== 1 || context5.inLabelledByContext || context5.inControlContext || !vNode.attr('aria-labelledby')) {
  13527. return '';
  13528. }
  13529. var refs = idrefs_default(vNode, 'aria-labelledby').filter(function(elm) {
  13530. return elm;
  13531. });
  13532. return refs.reduce(function(accessibleName, elm) {
  13533. var accessibleNameAdd = accessible_text_default(elm, _extends({
  13534. inLabelledByContext: true,
  13535. startNode: context5.startNode || vNode
  13536. }, context5));
  13537. if (!accessibleName) {
  13538. return accessibleNameAdd;
  13539. } else {
  13540. return ''.concat(accessibleName, ' ').concat(accessibleNameAdd);
  13541. }
  13542. }, '');
  13543. }
  13544. var arialabelledby_text_default = arialabelledbyText;
  13545. var text_exports = {};
  13546. __export(text_exports, {
  13547. accessibleText: function accessibleText() {
  13548. return accessible_text_default;
  13549. },
  13550. accessibleTextVirtual: function accessibleTextVirtual() {
  13551. return accessible_text_virtual_default;
  13552. },
  13553. autocomplete: function autocomplete() {
  13554. return _autocomplete;
  13555. },
  13556. formControlValue: function formControlValue() {
  13557. return form_control_value_default;
  13558. },
  13559. formControlValueMethods: function formControlValueMethods() {
  13560. return _formControlValueMethods;
  13561. },
  13562. hasUnicode: function hasUnicode() {
  13563. return has_unicode_default;
  13564. },
  13565. isHumanInterpretable: function isHumanInterpretable() {
  13566. return is_human_interpretable_default;
  13567. },
  13568. isIconLigature: function isIconLigature() {
  13569. return is_icon_ligature_default;
  13570. },
  13571. isValidAutocomplete: function isValidAutocomplete() {
  13572. return is_valid_autocomplete_default;
  13573. },
  13574. label: function label() {
  13575. return label_default;
  13576. },
  13577. labelText: function labelText() {
  13578. return label_text_default;
  13579. },
  13580. labelVirtual: function labelVirtual() {
  13581. return label_virtual_default2;
  13582. },
  13583. nativeElementType: function nativeElementType() {
  13584. return native_element_type_default;
  13585. },
  13586. nativeTextAlternative: function nativeTextAlternative() {
  13587. return native_text_alternative_default;
  13588. },
  13589. nativeTextMethods: function nativeTextMethods() {
  13590. return native_text_methods_default;
  13591. },
  13592. removeUnicode: function removeUnicode() {
  13593. return remove_unicode_default;
  13594. },
  13595. sanitize: function sanitize() {
  13596. return sanitize_default;
  13597. },
  13598. subtreeText: function subtreeText() {
  13599. return subtree_text_default;
  13600. },
  13601. titleText: function titleText() {
  13602. return title_text_default;
  13603. },
  13604. unsupported: function unsupported() {
  13605. return unsupported_default;
  13606. },
  13607. visible: function visible() {
  13608. return visible_default;
  13609. },
  13610. visibleTextNodes: function visibleTextNodes() {
  13611. return visible_text_nodes_default;
  13612. },
  13613. visibleVirtual: function visibleVirtual() {
  13614. return visible_virtual_default;
  13615. }
  13616. });
  13617. var emoji_regex2 = __toModule(require_emoji_regex());
  13618. function removeUnicode(str, options) {
  13619. var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
  13620. if (emoji) {
  13621. str = str.replace(emoji_regex2['default'](), '');
  13622. }
  13623. if (nonBmp) {
  13624. str = str.replace(getUnicodeNonBmpRegExp(), '');
  13625. str = str.replace(getSupplementaryPrivateUseRegExp(), '');
  13626. }
  13627. if (punctuations) {
  13628. str = str.replace(getPunctuationRegExp(), '');
  13629. }
  13630. return str;
  13631. }
  13632. var remove_unicode_default = removeUnicode;
  13633. function isHumanInterpretable(str) {
  13634. if (!str.length) {
  13635. return 0;
  13636. }
  13637. var alphaNumericIconMap = [ 'x', 'i' ];
  13638. if (alphaNumericIconMap.includes(str)) {
  13639. return 0;
  13640. }
  13641. var noUnicodeStr = remove_unicode_default(str, {
  13642. emoji: true,
  13643. nonBmp: true,
  13644. punctuations: true
  13645. });
  13646. if (!sanitize_default(noUnicodeStr)) {
  13647. return 0;
  13648. }
  13649. return 1;
  13650. }
  13651. var is_human_interpretable_default = isHumanInterpretable;
  13652. var _autocomplete = {
  13653. stateTerms: [ 'on', 'off' ],
  13654. standaloneTerms: [ 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'username', 'new-password', 'current-password', 'organization-title', 'organization', 'street-address', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'url', 'photo', 'one-time-code' ],
  13655. qualifiers: [ 'home', 'work', 'mobile', 'fax', 'pager' ],
  13656. qualifiedTerms: [ 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-local-prefix', 'tel-local-suffix', 'tel-extension', 'email', 'impp' ],
  13657. locations: [ 'billing', 'shipping' ]
  13658. };
  13659. function isValidAutocomplete(autocompleteValue) {
  13660. var _ref44 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref44$looseTyped = _ref44.looseTyped, looseTyped = _ref44$looseTyped === void 0 ? false : _ref44$looseTyped, _ref44$stateTerms = _ref44.stateTerms, stateTerms = _ref44$stateTerms === void 0 ? [] : _ref44$stateTerms, _ref44$locations = _ref44.locations, locations = _ref44$locations === void 0 ? [] : _ref44$locations, _ref44$qualifiers = _ref44.qualifiers, qualifiers = _ref44$qualifiers === void 0 ? [] : _ref44$qualifiers, _ref44$standaloneTerm = _ref44.standaloneTerms, standaloneTerms = _ref44$standaloneTerm === void 0 ? [] : _ref44$standaloneTerm, _ref44$qualifiedTerms = _ref44.qualifiedTerms, qualifiedTerms = _ref44$qualifiedTerms === void 0 ? [] : _ref44$qualifiedTerms;
  13661. autocompleteValue = autocompleteValue.toLowerCase().trim();
  13662. stateTerms = stateTerms.concat(_autocomplete.stateTerms);
  13663. if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
  13664. return true;
  13665. }
  13666. qualifiers = qualifiers.concat(_autocomplete.qualifiers);
  13667. locations = locations.concat(_autocomplete.locations);
  13668. standaloneTerms = standaloneTerms.concat(_autocomplete.standaloneTerms);
  13669. qualifiedTerms = qualifiedTerms.concat(_autocomplete.qualifiedTerms);
  13670. var autocompleteTerms = autocompleteValue.split(/\s+/g);
  13671. if (!looseTyped) {
  13672. if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') {
  13673. autocompleteTerms.shift();
  13674. }
  13675. if (locations.includes(autocompleteTerms[0])) {
  13676. autocompleteTerms.shift();
  13677. }
  13678. if (qualifiers.includes(autocompleteTerms[0])) {
  13679. autocompleteTerms.shift();
  13680. standaloneTerms = [];
  13681. }
  13682. if (autocompleteTerms.length !== 1) {
  13683. return false;
  13684. }
  13685. }
  13686. var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
  13687. return standaloneTerms.includes(purposeTerm) || qualifiedTerms.includes(purposeTerm);
  13688. }
  13689. var is_valid_autocomplete_default = isValidAutocomplete;
  13690. function visible(element, screenReader, noRecursing) {
  13691. element = get_node_from_tree_default(element);
  13692. return visible_virtual_default(element, screenReader, noRecursing);
  13693. }
  13694. var visible_default = visible;
  13695. function labelVirtual2(virtualNode) {
  13696. var ref, candidate, doc;
  13697. candidate = label_virtual_default(virtualNode);
  13698. if (candidate) {
  13699. return candidate;
  13700. }
  13701. if (virtualNode.attr('id')) {
  13702. if (!virtualNode.actualNode) {
  13703. throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
  13704. }
  13705. var id = escape_selector_default(virtualNode.attr('id'));
  13706. doc = get_root_node_default2(virtualNode.actualNode);
  13707. ref = doc.querySelector('label[for="' + id + '"]');
  13708. candidate = ref && visible_default(ref, true);
  13709. if (candidate) {
  13710. return candidate;
  13711. }
  13712. }
  13713. ref = closest_default(virtualNode, 'label');
  13714. candidate = ref && visible_virtual_default(ref, true);
  13715. if (candidate) {
  13716. return candidate;
  13717. }
  13718. return null;
  13719. }
  13720. var label_virtual_default2 = labelVirtual2;
  13721. function label(node) {
  13722. node = get_node_from_tree_default(node);
  13723. return label_virtual_default2(node);
  13724. }
  13725. var label_default = label;
  13726. var nativeElementType = [ {
  13727. matches: [ {
  13728. nodeName: 'textarea'
  13729. }, {
  13730. nodeName: 'input',
  13731. properties: {
  13732. type: [ 'text', 'password', 'search', 'tel', 'email', 'url' ]
  13733. }
  13734. } ],
  13735. namingMethods: 'labelText'
  13736. }, {
  13737. matches: {
  13738. nodeName: 'input',
  13739. properties: {
  13740. type: [ 'button', 'submit', 'reset' ]
  13741. }
  13742. },
  13743. namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]
  13744. }, {
  13745. matches: {
  13746. nodeName: 'input',
  13747. properties: {
  13748. type: 'image'
  13749. }
  13750. },
  13751. namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]
  13752. }, {
  13753. matches: 'button',
  13754. namingMethods: 'subtreeText'
  13755. }, {
  13756. matches: 'fieldset',
  13757. namingMethods: 'fieldsetLegendText'
  13758. }, {
  13759. matches: 'OUTPUT',
  13760. namingMethods: 'subtreeText'
  13761. }, {
  13762. matches: [ {
  13763. nodeName: 'select'
  13764. }, {
  13765. nodeName: 'input',
  13766. properties: {
  13767. type: /^(?!text|password|search|tel|email|url|button|submit|reset)/
  13768. }
  13769. } ],
  13770. namingMethods: 'labelText'
  13771. }, {
  13772. matches: 'summary',
  13773. namingMethods: 'subtreeText'
  13774. }, {
  13775. matches: 'figure',
  13776. namingMethods: [ 'figureText', 'titleText' ]
  13777. }, {
  13778. matches: 'img',
  13779. namingMethods: 'altText'
  13780. }, {
  13781. matches: 'table',
  13782. namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]
  13783. }, {
  13784. matches: [ 'hr', 'br' ],
  13785. namingMethods: [ 'titleText', 'singleSpace' ]
  13786. } ];
  13787. var native_element_type_default = nativeElementType;
  13788. function visibleTextNodes(vNode) {
  13789. var parentVisible = is_visible_default(vNode.actualNode);
  13790. var nodes = [];
  13791. vNode.children.forEach(function(child) {
  13792. if (child.actualNode.nodeType === 3) {
  13793. if (parentVisible) {
  13794. nodes.push(child);
  13795. }
  13796. } else {
  13797. nodes = nodes.concat(visibleTextNodes(child));
  13798. }
  13799. });
  13800. return nodes;
  13801. }
  13802. var visible_text_nodes_default = visibleTextNodes;
  13803. var idRefsRegex = /^idrefs?$/;
  13804. function cacheIdRefs(node, idRefs, refAttrs) {
  13805. if (node.hasAttribute) {
  13806. if (node.nodeName.toUpperCase() === 'LABEL' && node.hasAttribute('for')) {
  13807. var id = node.getAttribute('for');
  13808. idRefs[id] = idRefs[id] || [];
  13809. idRefs[id].push(node);
  13810. }
  13811. for (var _i13 = 0; _i13 < refAttrs.length; ++_i13) {
  13812. var attr = refAttrs[_i13];
  13813. var attrValue = sanitize_default(node.getAttribute(attr) || '');
  13814. if (!attrValue) {
  13815. continue;
  13816. }
  13817. var tokens = token_list_default(attrValue);
  13818. for (var k = 0; k < tokens.length; ++k) {
  13819. idRefs[tokens[k]] = idRefs[tokens[k]] || [];
  13820. idRefs[tokens[k]].push(node);
  13821. }
  13822. }
  13823. }
  13824. for (var _i14 = 0; _i14 < node.childNodes.length; _i14++) {
  13825. if (node.childNodes[_i14].nodeType === 1) {
  13826. cacheIdRefs(node.childNodes[_i14], idRefs, refAttrs);
  13827. }
  13828. }
  13829. }
  13830. function getAccessibleRefs(node) {
  13831. node = node.actualNode || node;
  13832. var root = get_root_node_default2(node);
  13833. root = root.documentElement || root;
  13834. var idRefsByRoot = cache_default.get('idRefsByRoot');
  13835. if (!idRefsByRoot) {
  13836. idRefsByRoot = new WeakMap();
  13837. cache_default.set('idRefsByRoot', idRefsByRoot);
  13838. }
  13839. var idRefs = idRefsByRoot.get(root);
  13840. if (!idRefs) {
  13841. idRefs = {};
  13842. idRefsByRoot.set(root, idRefs);
  13843. var refAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attr) {
  13844. var type = standards_default.ariaAttrs[attr].type;
  13845. return idRefsRegex.test(type);
  13846. });
  13847. cacheIdRefs(root, idRefs, refAttrs);
  13848. }
  13849. return idRefs[node.id] || [];
  13850. }
  13851. var get_accessible_refs_default = getAccessibleRefs;
  13852. function getRoleType(role) {
  13853. var roleDef = standards_default.ariaRoles[role];
  13854. if (!roleDef) {
  13855. return null;
  13856. }
  13857. return roleDef.type;
  13858. }
  13859. var get_role_type_default = getRoleType;
  13860. function isAriaRoleAllowedOnElement(node, role) {
  13861. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13862. var implicitRole3 = implicit_role_default(vNode);
  13863. var spec = get_element_spec_default(vNode);
  13864. if (Array.isArray(spec.allowedRoles)) {
  13865. return spec.allowedRoles.includes(role);
  13866. }
  13867. if (role === implicitRole3) {
  13868. return false;
  13869. }
  13870. return !!spec.allowedRoles;
  13871. }
  13872. var is_aria_role_allowed_on_element_default = isAriaRoleAllowedOnElement;
  13873. var dpubRoles2 = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ];
  13874. var landmarkRoles = {
  13875. header: 'banner',
  13876. footer: 'contentinfo'
  13877. };
  13878. function getRoleSegments(vNode) {
  13879. var roles = [];
  13880. if (!vNode) {
  13881. return roles;
  13882. }
  13883. if (vNode.hasAttr('role')) {
  13884. var nodeRoles = token_list_default(vNode.attr('role').toLowerCase());
  13885. roles = roles.concat(nodeRoles);
  13886. }
  13887. return roles.filter(function(role) {
  13888. return is_valid_role_default(role);
  13889. });
  13890. }
  13891. function getElementUnallowedRoles(node) {
  13892. var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  13893. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13894. if (!is_html_element_default(vNode)) {
  13895. return [];
  13896. }
  13897. var nodeName2 = vNode.props.nodeName;
  13898. var implicitRole3 = implicit_role_default(vNode) || landmarkRoles[nodeName2];
  13899. var roleSegments = getRoleSegments(vNode);
  13900. return roleSegments.filter(function(role) {
  13901. return !roleIsAllowed(role, vNode, allowImplicit, implicitRole3);
  13902. });
  13903. }
  13904. function roleIsAllowed(role, vNode, allowImplicit, implicitRole3) {
  13905. if (allowImplicit && role === implicitRole3) {
  13906. return true;
  13907. }
  13908. if (dpubRoles2.includes(role) && get_role_type_default(role) !== implicitRole3) {
  13909. return false;
  13910. }
  13911. return is_aria_role_allowed_on_element_default(vNode, role);
  13912. }
  13913. var get_element_unallowed_roles_default = getElementUnallowedRoles;
  13914. function getAriaRolesByType(type) {
  13915. return Object.keys(standards_default.ariaRoles).filter(function(roleName) {
  13916. return standards_default.ariaRoles[roleName].type === type;
  13917. });
  13918. }
  13919. var get_aria_roles_by_type_default = getAriaRolesByType;
  13920. function getRolesByType(roleType) {
  13921. return get_aria_roles_by_type_default(roleType);
  13922. }
  13923. var get_roles_by_type_default = getRolesByType;
  13924. function getAriaRolesSupportingNameFromContent() {
  13925. if (cache_default.get('ariaRolesNameFromContent')) {
  13926. return cache_default.get('ariaRolesNameFromContent');
  13927. }
  13928. var contentRoles = Object.keys(standards_default.ariaRoles).filter(function(roleName) {
  13929. return standards_default.ariaRoles[roleName].nameFromContent;
  13930. });
  13931. cache_default.set('ariaRolesNameFromContent', contentRoles);
  13932. return contentRoles;
  13933. }
  13934. var get_aria_roles_supporting_name_from_content_default = getAriaRolesSupportingNameFromContent;
  13935. function getRolesWithNameFromContents() {
  13936. return get_aria_roles_supporting_name_from_content_default();
  13937. }
  13938. var get_roles_with_name_from_contents_default = getRolesWithNameFromContents;
  13939. var isNull = function isNull(value) {
  13940. return value === null;
  13941. };
  13942. var isNotNull = function isNotNull(value) {
  13943. return value !== null;
  13944. };
  13945. var lookupTable = {};
  13946. lookupTable.attributes = {
  13947. 'aria-activedescendant': {
  13948. type: 'idref',
  13949. allowEmpty: true,
  13950. unsupported: false
  13951. },
  13952. 'aria-atomic': {
  13953. type: 'boolean',
  13954. values: [ 'true', 'false' ],
  13955. unsupported: false
  13956. },
  13957. 'aria-autocomplete': {
  13958. type: 'nmtoken',
  13959. values: [ 'inline', 'list', 'both', 'none' ],
  13960. unsupported: false
  13961. },
  13962. 'aria-busy': {
  13963. type: 'boolean',
  13964. values: [ 'true', 'false' ],
  13965. unsupported: false
  13966. },
  13967. 'aria-checked': {
  13968. type: 'nmtoken',
  13969. values: [ 'true', 'false', 'mixed', 'undefined' ],
  13970. unsupported: false
  13971. },
  13972. 'aria-colcount': {
  13973. type: 'int',
  13974. unsupported: false
  13975. },
  13976. 'aria-colindex': {
  13977. type: 'int',
  13978. unsupported: false
  13979. },
  13980. 'aria-colspan': {
  13981. type: 'int',
  13982. unsupported: false
  13983. },
  13984. 'aria-controls': {
  13985. type: 'idrefs',
  13986. allowEmpty: true,
  13987. unsupported: false
  13988. },
  13989. 'aria-current': {
  13990. type: 'nmtoken',
  13991. allowEmpty: true,
  13992. values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],
  13993. unsupported: false
  13994. },
  13995. 'aria-describedby': {
  13996. type: 'idrefs',
  13997. allowEmpty: true,
  13998. unsupported: false
  13999. },
  14000. 'aria-describedat': {
  14001. unsupported: true,
  14002. unstandardized: true
  14003. },
  14004. 'aria-details': {
  14005. type: 'idref',
  14006. allowEmpty: true,
  14007. unsupported: false
  14008. },
  14009. 'aria-disabled': {
  14010. type: 'boolean',
  14011. values: [ 'true', 'false' ],
  14012. unsupported: false
  14013. },
  14014. 'aria-dropeffect': {
  14015. type: 'nmtokens',
  14016. values: [ 'copy', 'move', 'reference', 'execute', 'popup', 'none' ],
  14017. unsupported: false
  14018. },
  14019. 'aria-errormessage': {
  14020. type: 'idref',
  14021. allowEmpty: true,
  14022. unsupported: false
  14023. },
  14024. 'aria-expanded': {
  14025. type: 'nmtoken',
  14026. values: [ 'true', 'false', 'undefined' ],
  14027. unsupported: false
  14028. },
  14029. 'aria-flowto': {
  14030. type: 'idrefs',
  14031. allowEmpty: true,
  14032. unsupported: false
  14033. },
  14034. 'aria-grabbed': {
  14035. type: 'nmtoken',
  14036. values: [ 'true', 'false', 'undefined' ],
  14037. unsupported: false
  14038. },
  14039. 'aria-haspopup': {
  14040. type: 'nmtoken',
  14041. allowEmpty: true,
  14042. values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],
  14043. unsupported: false
  14044. },
  14045. 'aria-hidden': {
  14046. type: 'boolean',
  14047. values: [ 'true', 'false' ],
  14048. unsupported: false
  14049. },
  14050. 'aria-invalid': {
  14051. type: 'nmtoken',
  14052. allowEmpty: true,
  14053. values: [ 'true', 'false', 'spelling', 'grammar' ],
  14054. unsupported: false
  14055. },
  14056. 'aria-keyshortcuts': {
  14057. type: 'string',
  14058. allowEmpty: true,
  14059. unsupported: false
  14060. },
  14061. 'aria-label': {
  14062. type: 'string',
  14063. allowEmpty: true,
  14064. unsupported: false
  14065. },
  14066. 'aria-labelledby': {
  14067. type: 'idrefs',
  14068. allowEmpty: true,
  14069. unsupported: false
  14070. },
  14071. 'aria-level': {
  14072. type: 'int',
  14073. unsupported: false
  14074. },
  14075. 'aria-live': {
  14076. type: 'nmtoken',
  14077. values: [ 'off', 'polite', 'assertive' ],
  14078. unsupported: false
  14079. },
  14080. 'aria-modal': {
  14081. type: 'boolean',
  14082. values: [ 'true', 'false' ],
  14083. unsupported: false
  14084. },
  14085. 'aria-multiline': {
  14086. type: 'boolean',
  14087. values: [ 'true', 'false' ],
  14088. unsupported: false
  14089. },
  14090. 'aria-multiselectable': {
  14091. type: 'boolean',
  14092. values: [ 'true', 'false' ],
  14093. unsupported: false
  14094. },
  14095. 'aria-orientation': {
  14096. type: 'nmtoken',
  14097. values: [ 'horizontal', 'vertical' ],
  14098. unsupported: false
  14099. },
  14100. 'aria-owns': {
  14101. type: 'idrefs',
  14102. allowEmpty: true,
  14103. unsupported: false
  14104. },
  14105. 'aria-placeholder': {
  14106. type: 'string',
  14107. allowEmpty: true,
  14108. unsupported: false
  14109. },
  14110. 'aria-posinset': {
  14111. type: 'int',
  14112. unsupported: false
  14113. },
  14114. 'aria-pressed': {
  14115. type: 'nmtoken',
  14116. values: [ 'true', 'false', 'mixed', 'undefined' ],
  14117. unsupported: false
  14118. },
  14119. 'aria-readonly': {
  14120. type: 'boolean',
  14121. values: [ 'true', 'false' ],
  14122. unsupported: false
  14123. },
  14124. 'aria-relevant': {
  14125. type: 'nmtokens',
  14126. values: [ 'additions', 'removals', 'text', 'all' ],
  14127. unsupported: false
  14128. },
  14129. 'aria-required': {
  14130. type: 'boolean',
  14131. values: [ 'true', 'false' ],
  14132. unsupported: false
  14133. },
  14134. 'aria-roledescription': {
  14135. type: 'string',
  14136. allowEmpty: true,
  14137. unsupported: false
  14138. },
  14139. 'aria-rowcount': {
  14140. type: 'int',
  14141. unsupported: false
  14142. },
  14143. 'aria-rowindex': {
  14144. type: 'int',
  14145. unsupported: false
  14146. },
  14147. 'aria-rowspan': {
  14148. type: 'int',
  14149. unsupported: false
  14150. },
  14151. 'aria-selected': {
  14152. type: 'nmtoken',
  14153. values: [ 'true', 'false', 'undefined' ],
  14154. unsupported: false
  14155. },
  14156. 'aria-setsize': {
  14157. type: 'int',
  14158. unsupported: false
  14159. },
  14160. 'aria-sort': {
  14161. type: 'nmtoken',
  14162. values: [ 'ascending', 'descending', 'other', 'none' ],
  14163. unsupported: false
  14164. },
  14165. 'aria-valuemax': {
  14166. type: 'decimal',
  14167. unsupported: false
  14168. },
  14169. 'aria-valuemin': {
  14170. type: 'decimal',
  14171. unsupported: false
  14172. },
  14173. 'aria-valuenow': {
  14174. type: 'decimal',
  14175. unsupported: false
  14176. },
  14177. 'aria-valuetext': {
  14178. type: 'string',
  14179. unsupported: false
  14180. }
  14181. };
  14182. lookupTable.globalAttributes = [ 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant', 'aria-roledescription' ];
  14183. lookupTable.role = {
  14184. alert: {
  14185. type: 'widget',
  14186. attributes: {
  14187. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14188. },
  14189. owned: null,
  14190. nameFrom: [ 'author' ],
  14191. context: null,
  14192. unsupported: false,
  14193. allowedElements: [ 'section' ]
  14194. },
  14195. alertdialog: {
  14196. type: 'widget',
  14197. attributes: {
  14198. allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]
  14199. },
  14200. owned: null,
  14201. nameFrom: [ 'author' ],
  14202. context: null,
  14203. unsupported: false,
  14204. allowedElements: [ 'dialog', 'section' ]
  14205. },
  14206. application: {
  14207. type: 'landmark',
  14208. attributes: {
  14209. allowed: [ 'aria-expanded', 'aria-errormessage', 'aria-activedescendant' ]
  14210. },
  14211. owned: null,
  14212. nameFrom: [ 'author' ],
  14213. context: null,
  14214. unsupported: false,
  14215. allowedElements: [ 'article', 'audio', 'embed', 'iframe', 'object', 'section', 'svg', 'video' ]
  14216. },
  14217. article: {
  14218. type: 'structure',
  14219. attributes: {
  14220. allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  14221. },
  14222. owned: null,
  14223. nameFrom: [ 'author' ],
  14224. context: null,
  14225. implicit: [ 'article' ],
  14226. unsupported: false
  14227. },
  14228. banner: {
  14229. type: 'landmark',
  14230. attributes: {
  14231. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14232. },
  14233. owned: null,
  14234. nameFrom: [ 'author' ],
  14235. context: null,
  14236. implicit: [ 'header' ],
  14237. unsupported: false,
  14238. allowedElements: [ 'section' ]
  14239. },
  14240. button: {
  14241. type: 'widget',
  14242. attributes: {
  14243. allowed: [ 'aria-expanded', 'aria-pressed', 'aria-errormessage' ]
  14244. },
  14245. owned: null,
  14246. nameFrom: [ 'author', 'contents' ],
  14247. context: null,
  14248. implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ],
  14249. unsupported: false,
  14250. allowedElements: [ {
  14251. nodeName: 'a',
  14252. attributes: {
  14253. href: isNotNull
  14254. }
  14255. } ]
  14256. },
  14257. cell: {
  14258. type: 'structure',
  14259. attributes: {
  14260. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-errormessage' ]
  14261. },
  14262. owned: null,
  14263. nameFrom: [ 'author', 'contents' ],
  14264. context: [ 'row' ],
  14265. implicit: [ 'td', 'th' ],
  14266. unsupported: false
  14267. },
  14268. checkbox: {
  14269. type: 'widget',
  14270. attributes: {
  14271. allowed: [ 'aria-checked', 'aria-required', 'aria-readonly', 'aria-errormessage' ]
  14272. },
  14273. owned: null,
  14274. nameFrom: [ 'author', 'contents' ],
  14275. context: null,
  14276. implicit: [ 'input[type="checkbox"]' ],
  14277. unsupported: false,
  14278. allowedElements: [ 'button' ]
  14279. },
  14280. columnheader: {
  14281. type: 'structure',
  14282. attributes: {
  14283. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]
  14284. },
  14285. owned: null,
  14286. nameFrom: [ 'author', 'contents' ],
  14287. context: [ 'row' ],
  14288. implicit: [ 'th' ],
  14289. unsupported: false
  14290. },
  14291. combobox: {
  14292. type: 'composite',
  14293. attributes: {
  14294. allowed: [ 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation', 'aria-errormessage' ],
  14295. required: [ 'aria-expanded' ]
  14296. },
  14297. owned: {
  14298. all: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ]
  14299. },
  14300. nameFrom: [ 'author' ],
  14301. context: null,
  14302. unsupported: false,
  14303. allowedElements: [ {
  14304. nodeName: 'input',
  14305. properties: {
  14306. type: [ 'text', 'search', 'tel', 'url', 'email' ]
  14307. }
  14308. } ]
  14309. },
  14310. command: {
  14311. nameFrom: [ 'author' ],
  14312. type: 'abstract',
  14313. unsupported: false
  14314. },
  14315. complementary: {
  14316. type: 'landmark',
  14317. attributes: {
  14318. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14319. },
  14320. owned: null,
  14321. nameFrom: [ 'author' ],
  14322. context: null,
  14323. implicit: [ 'aside' ],
  14324. unsupported: false,
  14325. allowedElements: [ 'section' ]
  14326. },
  14327. composite: {
  14328. nameFrom: [ 'author' ],
  14329. type: 'abstract',
  14330. unsupported: false
  14331. },
  14332. contentinfo: {
  14333. type: 'landmark',
  14334. attributes: {
  14335. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14336. },
  14337. owned: null,
  14338. nameFrom: [ 'author' ],
  14339. context: null,
  14340. implicit: [ 'footer' ],
  14341. unsupported: false,
  14342. allowedElements: [ 'section' ]
  14343. },
  14344. definition: {
  14345. type: 'structure',
  14346. attributes: {
  14347. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14348. },
  14349. owned: null,
  14350. nameFrom: [ 'author' ],
  14351. context: null,
  14352. implicit: [ 'dd', 'dfn' ],
  14353. unsupported: false
  14354. },
  14355. dialog: {
  14356. type: 'widget',
  14357. attributes: {
  14358. allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]
  14359. },
  14360. owned: null,
  14361. nameFrom: [ 'author' ],
  14362. context: null,
  14363. implicit: [ 'dialog' ],
  14364. unsupported: false,
  14365. allowedElements: [ 'section' ]
  14366. },
  14367. directory: {
  14368. type: 'structure',
  14369. attributes: {
  14370. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14371. },
  14372. owned: null,
  14373. nameFrom: [ 'author', 'contents' ],
  14374. context: null,
  14375. unsupported: false,
  14376. allowedElements: [ 'ol', 'ul' ]
  14377. },
  14378. document: {
  14379. type: 'structure',
  14380. attributes: {
  14381. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14382. },
  14383. owned: null,
  14384. nameFrom: [ 'author' ],
  14385. context: null,
  14386. implicit: [ 'body' ],
  14387. unsupported: false,
  14388. allowedElements: [ 'article', 'embed', 'iframe', 'object', 'section', 'svg' ]
  14389. },
  14390. 'doc-abstract': {
  14391. type: 'section',
  14392. attributes: {
  14393. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14394. },
  14395. owned: null,
  14396. nameFrom: [ 'author' ],
  14397. context: null,
  14398. unsupported: false,
  14399. allowedElements: [ 'section' ]
  14400. },
  14401. 'doc-acknowledgments': {
  14402. type: 'landmark',
  14403. attributes: {
  14404. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14405. },
  14406. owned: null,
  14407. nameFrom: [ 'author' ],
  14408. context: null,
  14409. unsupported: false,
  14410. allowedElements: [ 'section' ]
  14411. },
  14412. 'doc-afterword': {
  14413. type: 'landmark',
  14414. attributes: {
  14415. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14416. },
  14417. owned: null,
  14418. nameFrom: [ 'author' ],
  14419. context: null,
  14420. unsupported: false,
  14421. allowedElements: [ 'section' ]
  14422. },
  14423. 'doc-appendix': {
  14424. type: 'landmark',
  14425. attributes: {
  14426. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14427. },
  14428. owned: null,
  14429. nameFrom: [ 'author' ],
  14430. context: null,
  14431. unsupported: false,
  14432. allowedElements: [ 'section' ]
  14433. },
  14434. 'doc-backlink': {
  14435. type: 'link',
  14436. attributes: {
  14437. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14438. },
  14439. owned: null,
  14440. nameFrom: [ 'author', 'contents' ],
  14441. context: null,
  14442. unsupported: false,
  14443. allowedElements: [ {
  14444. nodeName: 'a',
  14445. attributes: {
  14446. href: isNotNull
  14447. }
  14448. } ]
  14449. },
  14450. 'doc-biblioentry': {
  14451. type: 'listitem',
  14452. attributes: {
  14453. allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  14454. },
  14455. owned: null,
  14456. nameFrom: [ 'author' ],
  14457. context: [ 'doc-bibliography' ],
  14458. unsupported: false,
  14459. allowedElements: [ 'li' ]
  14460. },
  14461. 'doc-bibliography': {
  14462. type: 'landmark',
  14463. attributes: {
  14464. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14465. },
  14466. owned: {
  14467. one: [ 'doc-biblioentry' ]
  14468. },
  14469. nameFrom: [ 'author' ],
  14470. context: null,
  14471. unsupported: false,
  14472. allowedElements: [ 'section' ]
  14473. },
  14474. 'doc-biblioref': {
  14475. type: 'link',
  14476. attributes: {
  14477. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14478. },
  14479. owned: null,
  14480. nameFrom: [ 'author', 'contents' ],
  14481. context: null,
  14482. unsupported: false,
  14483. allowedElements: [ {
  14484. nodeName: 'a',
  14485. attributes: {
  14486. href: isNotNull
  14487. }
  14488. } ]
  14489. },
  14490. 'doc-chapter': {
  14491. type: 'landmark',
  14492. attributes: {
  14493. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14494. },
  14495. owned: null,
  14496. namefrom: [ 'author' ],
  14497. context: null,
  14498. unsupported: false,
  14499. allowedElements: [ 'section' ]
  14500. },
  14501. 'doc-colophon': {
  14502. type: 'section',
  14503. attributes: {
  14504. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14505. },
  14506. owned: null,
  14507. namefrom: [ 'author' ],
  14508. context: null,
  14509. unsupported: false,
  14510. allowedElements: [ 'section' ]
  14511. },
  14512. 'doc-conclusion': {
  14513. type: 'landmark',
  14514. attributes: {
  14515. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14516. },
  14517. owned: null,
  14518. namefrom: [ 'author' ],
  14519. context: null,
  14520. unsupported: false,
  14521. allowedElements: [ 'section' ]
  14522. },
  14523. 'doc-cover': {
  14524. type: 'img',
  14525. attributes: {
  14526. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14527. },
  14528. owned: null,
  14529. namefrom: [ 'author' ],
  14530. context: null,
  14531. unsupported: false
  14532. },
  14533. 'doc-credit': {
  14534. type: 'section',
  14535. attributes: {
  14536. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14537. },
  14538. owned: null,
  14539. namefrom: [ 'author' ],
  14540. context: null,
  14541. unsupported: false,
  14542. allowedElements: [ 'section' ]
  14543. },
  14544. 'doc-credits': {
  14545. type: 'landmark',
  14546. attributes: {
  14547. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14548. },
  14549. owned: null,
  14550. namefrom: [ 'author' ],
  14551. context: null,
  14552. unsupported: false,
  14553. allowedElements: [ 'section' ]
  14554. },
  14555. 'doc-dedication': {
  14556. type: 'section',
  14557. attributes: {
  14558. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14559. },
  14560. owned: null,
  14561. namefrom: [ 'author' ],
  14562. context: null,
  14563. unsupported: false,
  14564. allowedElements: [ 'section' ]
  14565. },
  14566. 'doc-endnote': {
  14567. type: 'listitem',
  14568. attributes: {
  14569. allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  14570. },
  14571. owned: null,
  14572. namefrom: [ 'author' ],
  14573. context: [ 'doc-endnotes' ],
  14574. unsupported: false,
  14575. allowedElements: [ 'li' ]
  14576. },
  14577. 'doc-endnotes': {
  14578. type: 'landmark',
  14579. attributes: {
  14580. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14581. },
  14582. owned: {
  14583. one: [ 'doc-endnote' ]
  14584. },
  14585. namefrom: [ 'author' ],
  14586. context: null,
  14587. unsupported: false,
  14588. allowedElements: [ 'section' ]
  14589. },
  14590. 'doc-epigraph': {
  14591. type: 'section',
  14592. attributes: {
  14593. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14594. },
  14595. owned: null,
  14596. namefrom: [ 'author' ],
  14597. context: null,
  14598. unsupported: false
  14599. },
  14600. 'doc-epilogue': {
  14601. type: 'landmark',
  14602. attributes: {
  14603. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14604. },
  14605. owned: null,
  14606. namefrom: [ 'author' ],
  14607. context: null,
  14608. unsupported: false,
  14609. allowedElements: [ 'section' ]
  14610. },
  14611. 'doc-errata': {
  14612. type: 'landmark',
  14613. attributes: {
  14614. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14615. },
  14616. owned: null,
  14617. namefrom: [ 'author' ],
  14618. context: null,
  14619. unsupported: false,
  14620. allowedElements: [ 'section' ]
  14621. },
  14622. 'doc-example': {
  14623. type: 'section',
  14624. attributes: {
  14625. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14626. },
  14627. owned: null,
  14628. namefrom: [ 'author' ],
  14629. context: null,
  14630. unsupported: false,
  14631. allowedElements: [ 'aside', 'section' ]
  14632. },
  14633. 'doc-footnote': {
  14634. type: 'section',
  14635. attributes: {
  14636. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14637. },
  14638. owned: null,
  14639. namefrom: [ 'author' ],
  14640. context: null,
  14641. unsupported: false,
  14642. allowedElements: [ 'aside', 'footer', 'header' ]
  14643. },
  14644. 'doc-foreword': {
  14645. type: 'landmark',
  14646. attributes: {
  14647. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14648. },
  14649. owned: null,
  14650. namefrom: [ 'author' ],
  14651. context: null,
  14652. unsupported: false,
  14653. allowedElements: [ 'section' ]
  14654. },
  14655. 'doc-glossary': {
  14656. type: 'landmark',
  14657. attributes: {
  14658. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14659. },
  14660. owned: [ 'term', 'definition' ],
  14661. namefrom: [ 'author' ],
  14662. context: null,
  14663. unsupported: false,
  14664. allowedElements: [ 'dl' ]
  14665. },
  14666. 'doc-glossref': {
  14667. type: 'link',
  14668. attributes: {
  14669. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14670. },
  14671. owned: null,
  14672. namefrom: [ 'author', 'contents' ],
  14673. context: null,
  14674. unsupported: false,
  14675. allowedElements: [ {
  14676. nodeName: 'a',
  14677. attributes: {
  14678. href: isNotNull
  14679. }
  14680. } ]
  14681. },
  14682. 'doc-index': {
  14683. type: 'navigation',
  14684. attributes: {
  14685. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14686. },
  14687. owned: null,
  14688. namefrom: [ 'author' ],
  14689. context: null,
  14690. unsupported: false,
  14691. allowedElements: [ 'nav', 'section' ]
  14692. },
  14693. 'doc-introduction': {
  14694. type: 'landmark',
  14695. attributes: {
  14696. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14697. },
  14698. owned: null,
  14699. namefrom: [ 'author' ],
  14700. context: null,
  14701. unsupported: false,
  14702. allowedElements: [ 'section' ]
  14703. },
  14704. 'doc-noteref': {
  14705. type: 'link',
  14706. attributes: {
  14707. allowed: [ 'aria-expanded' ]
  14708. },
  14709. owned: null,
  14710. namefrom: [ 'author', 'contents' ],
  14711. context: null,
  14712. unsupported: false,
  14713. allowedElements: [ {
  14714. nodeName: 'a',
  14715. attributes: {
  14716. href: isNotNull
  14717. }
  14718. } ]
  14719. },
  14720. 'doc-notice': {
  14721. type: 'note',
  14722. attributes: {
  14723. allowed: [ 'aria-expanded' ]
  14724. },
  14725. owned: null,
  14726. namefrom: [ 'author' ],
  14727. context: null,
  14728. unsupported: false,
  14729. allowedElements: [ 'section' ]
  14730. },
  14731. 'doc-pagebreak': {
  14732. type: 'separator',
  14733. attributes: {
  14734. allowed: [ 'aria-expanded' ]
  14735. },
  14736. owned: null,
  14737. namefrom: [ 'author' ],
  14738. context: null,
  14739. unsupported: false,
  14740. allowedElements: [ 'hr' ]
  14741. },
  14742. 'doc-pagelist': {
  14743. type: 'navigation',
  14744. attributes: {
  14745. allowed: [ 'aria-expanded' ]
  14746. },
  14747. owned: null,
  14748. namefrom: [ 'author' ],
  14749. context: null,
  14750. unsupported: false,
  14751. allowedElements: [ 'nav', 'section' ]
  14752. },
  14753. 'doc-part': {
  14754. type: 'landmark',
  14755. attributes: {
  14756. allowed: [ 'aria-expanded' ]
  14757. },
  14758. owned: null,
  14759. namefrom: [ 'author' ],
  14760. context: null,
  14761. unsupported: false,
  14762. allowedElements: [ 'section' ]
  14763. },
  14764. 'doc-preface': {
  14765. type: 'landmark',
  14766. attributes: {
  14767. allowed: [ 'aria-expanded' ]
  14768. },
  14769. owned: null,
  14770. namefrom: [ 'author' ],
  14771. context: null,
  14772. unsupported: false,
  14773. allowedElements: [ 'section' ]
  14774. },
  14775. 'doc-prologue': {
  14776. type: 'landmark',
  14777. attributes: {
  14778. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14779. },
  14780. owned: null,
  14781. namefrom: [ 'author' ],
  14782. context: null,
  14783. unsupported: false,
  14784. allowedElements: [ 'section' ]
  14785. },
  14786. 'doc-pullquote': {
  14787. type: 'none',
  14788. attributes: {
  14789. allowed: [ 'aria-expanded' ]
  14790. },
  14791. owned: null,
  14792. namefrom: [ 'author' ],
  14793. context: null,
  14794. unsupported: false,
  14795. allowedElements: [ 'aside', 'section' ]
  14796. },
  14797. 'doc-qna': {
  14798. type: 'section',
  14799. attributes: {
  14800. allowed: [ 'aria-expanded' ]
  14801. },
  14802. owned: null,
  14803. namefrom: [ 'author' ],
  14804. context: null,
  14805. unsupported: false,
  14806. allowedElements: [ 'section' ]
  14807. },
  14808. 'doc-subtitle': {
  14809. type: 'sectionhead',
  14810. attributes: {
  14811. allowed: [ 'aria-expanded' ]
  14812. },
  14813. owned: null,
  14814. namefrom: [ 'author' ],
  14815. context: null,
  14816. unsupported: false,
  14817. allowedElements: {
  14818. nodeName: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ]
  14819. }
  14820. },
  14821. 'doc-tip': {
  14822. type: 'note',
  14823. attributes: {
  14824. allowed: [ 'aria-expanded' ]
  14825. },
  14826. owned: null,
  14827. namefrom: [ 'author' ],
  14828. context: null,
  14829. unsupported: false,
  14830. allowedElements: [ 'aside' ]
  14831. },
  14832. 'doc-toc': {
  14833. type: 'navigation',
  14834. attributes: {
  14835. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14836. },
  14837. owned: null,
  14838. namefrom: [ 'author' ],
  14839. context: null,
  14840. unsupported: false,
  14841. allowedElements: [ 'nav', 'section' ]
  14842. },
  14843. feed: {
  14844. type: 'structure',
  14845. attributes: {
  14846. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14847. },
  14848. owned: {
  14849. one: [ 'article' ]
  14850. },
  14851. nameFrom: [ 'author' ],
  14852. context: null,
  14853. unsupported: false,
  14854. allowedElements: [ 'article', 'aside', 'section' ]
  14855. },
  14856. figure: {
  14857. type: 'structure',
  14858. attributes: {
  14859. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14860. },
  14861. owned: null,
  14862. nameFrom: [ 'author', 'contents' ],
  14863. context: null,
  14864. implicit: [ 'figure' ],
  14865. unsupported: false
  14866. },
  14867. form: {
  14868. type: 'landmark',
  14869. attributes: {
  14870. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14871. },
  14872. owned: null,
  14873. nameFrom: [ 'author' ],
  14874. context: null,
  14875. implicit: [ 'form' ],
  14876. unsupported: false
  14877. },
  14878. grid: {
  14879. type: 'composite',
  14880. attributes: {
  14881. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount', 'aria-errormessage' ]
  14882. },
  14883. owned: {
  14884. one: [ 'rowgroup', 'row' ]
  14885. },
  14886. nameFrom: [ 'author' ],
  14887. context: null,
  14888. implicit: [ 'table' ],
  14889. unsupported: false
  14890. },
  14891. gridcell: {
  14892. type: 'widget',
  14893. attributes: {
  14894. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required', 'aria-errormessage' ]
  14895. },
  14896. owned: null,
  14897. nameFrom: [ 'author', 'contents' ],
  14898. context: [ 'row' ],
  14899. implicit: [ 'td', 'th' ],
  14900. unsupported: false
  14901. },
  14902. group: {
  14903. type: 'structure',
  14904. attributes: {
  14905. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]
  14906. },
  14907. owned: null,
  14908. nameFrom: [ 'author' ],
  14909. context: null,
  14910. implicit: [ 'details', 'optgroup' ],
  14911. unsupported: false,
  14912. allowedElements: [ 'dl', 'figcaption', 'fieldset', 'figure', 'footer', 'header', 'ol', 'ul' ]
  14913. },
  14914. heading: {
  14915. type: 'structure',
  14916. attributes: {
  14917. required: [ 'aria-level' ],
  14918. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14919. },
  14920. owned: null,
  14921. nameFrom: [ 'author', 'contents' ],
  14922. context: null,
  14923. implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],
  14924. unsupported: false
  14925. },
  14926. img: {
  14927. type: 'structure',
  14928. attributes: {
  14929. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14930. },
  14931. owned: null,
  14932. nameFrom: [ 'author' ],
  14933. context: null,
  14934. implicit: [ 'img' ],
  14935. unsupported: false,
  14936. allowedElements: [ 'embed', 'iframe', 'object', 'svg' ]
  14937. },
  14938. input: {
  14939. nameFrom: [ 'author' ],
  14940. type: 'abstract',
  14941. unsupported: false
  14942. },
  14943. landmark: {
  14944. nameFrom: [ 'author' ],
  14945. type: 'abstract',
  14946. unsupported: false
  14947. },
  14948. link: {
  14949. type: 'widget',
  14950. attributes: {
  14951. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14952. },
  14953. owned: null,
  14954. nameFrom: [ 'author', 'contents' ],
  14955. context: null,
  14956. implicit: [ 'a[href]', 'area[href]' ],
  14957. unsupported: false,
  14958. allowedElements: [ 'button', {
  14959. nodeName: 'input',
  14960. properties: {
  14961. type: [ 'image', 'button' ]
  14962. }
  14963. } ]
  14964. },
  14965. list: {
  14966. type: 'structure',
  14967. attributes: {
  14968. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14969. },
  14970. owned: {
  14971. all: [ 'listitem' ]
  14972. },
  14973. nameFrom: [ 'author' ],
  14974. context: null,
  14975. implicit: [ 'ol', 'ul', 'dl' ],
  14976. unsupported: false
  14977. },
  14978. listbox: {
  14979. type: 'composite',
  14980. attributes: {
  14981. allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  14982. },
  14983. owned: {
  14984. all: [ 'option' ]
  14985. },
  14986. nameFrom: [ 'author' ],
  14987. context: null,
  14988. implicit: [ 'select' ],
  14989. unsupported: false,
  14990. allowedElements: [ 'ol', 'ul' ]
  14991. },
  14992. listitem: {
  14993. type: 'structure',
  14994. attributes: {
  14995. allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]
  14996. },
  14997. owned: null,
  14998. nameFrom: [ 'author', 'contents' ],
  14999. context: [ 'list' ],
  15000. implicit: [ 'li', 'dt' ],
  15001. unsupported: false
  15002. },
  15003. log: {
  15004. type: 'widget',
  15005. attributes: {
  15006. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15007. },
  15008. owned: null,
  15009. nameFrom: [ 'author' ],
  15010. context: null,
  15011. unsupported: false,
  15012. allowedElements: [ 'section' ]
  15013. },
  15014. main: {
  15015. type: 'landmark',
  15016. attributes: {
  15017. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15018. },
  15019. owned: null,
  15020. nameFrom: [ 'author' ],
  15021. context: null,
  15022. implicit: [ 'main' ],
  15023. unsupported: false,
  15024. allowedElements: [ 'article', 'section' ]
  15025. },
  15026. marquee: {
  15027. type: 'widget',
  15028. attributes: {
  15029. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15030. },
  15031. owned: null,
  15032. nameFrom: [ 'author' ],
  15033. context: null,
  15034. unsupported: false,
  15035. allowedElements: [ 'section' ]
  15036. },
  15037. math: {
  15038. type: 'structure',
  15039. attributes: {
  15040. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15041. },
  15042. owned: null,
  15043. nameFrom: [ 'author' ],
  15044. context: null,
  15045. implicit: [ 'math' ],
  15046. unsupported: false
  15047. },
  15048. menu: {
  15049. type: 'composite',
  15050. attributes: {
  15051. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  15052. },
  15053. owned: {
  15054. one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
  15055. },
  15056. nameFrom: [ 'author' ],
  15057. context: null,
  15058. implicit: [ 'menu[type="context"]' ],
  15059. unsupported: false,
  15060. allowedElements: [ 'ol', 'ul' ]
  15061. },
  15062. menubar: {
  15063. type: 'composite',
  15064. attributes: {
  15065. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  15066. },
  15067. owned: {
  15068. one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
  15069. },
  15070. nameFrom: [ 'author' ],
  15071. context: null,
  15072. unsupported: false,
  15073. allowedElements: [ 'ol', 'ul' ]
  15074. },
  15075. menuitem: {
  15076. type: 'widget',
  15077. attributes: {
  15078. allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]
  15079. },
  15080. owned: null,
  15081. nameFrom: [ 'author', 'contents' ],
  15082. context: [ 'menu', 'menubar' ],
  15083. implicit: [ 'menuitem[type="command"]' ],
  15084. unsupported: false,
  15085. allowedElements: [ 'button', 'li', {
  15086. nodeName: 'iput',
  15087. properties: {
  15088. type: [ 'image', 'button' ]
  15089. }
  15090. }, {
  15091. nodeName: 'a',
  15092. attributes: {
  15093. href: isNotNull
  15094. }
  15095. } ]
  15096. },
  15097. menuitemcheckbox: {
  15098. type: 'widget',
  15099. attributes: {
  15100. allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  15101. },
  15102. owned: null,
  15103. nameFrom: [ 'author', 'contents' ],
  15104. context: [ 'menu', 'menubar' ],
  15105. implicit: [ 'menuitem[type="checkbox"]' ],
  15106. unsupported: false,
  15107. allowedElements: [ {
  15108. nodeName: [ 'button', 'li' ]
  15109. }, {
  15110. nodeName: 'input',
  15111. properties: {
  15112. type: [ 'checkbox', 'image', 'button' ]
  15113. }
  15114. }, {
  15115. nodeName: 'a',
  15116. attributes: {
  15117. href: isNotNull
  15118. }
  15119. } ]
  15120. },
  15121. menuitemradio: {
  15122. type: 'widget',
  15123. attributes: {
  15124. allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  15125. },
  15126. owned: null,
  15127. nameFrom: [ 'author', 'contents' ],
  15128. context: [ 'menu', 'menubar' ],
  15129. implicit: [ 'menuitem[type="radio"]' ],
  15130. unsupported: false,
  15131. allowedElements: [ {
  15132. nodeName: [ 'button', 'li' ]
  15133. }, {
  15134. nodeName: 'input',
  15135. properties: {
  15136. type: [ 'image', 'button', 'radio' ]
  15137. }
  15138. }, {
  15139. nodeName: 'a',
  15140. attributes: {
  15141. href: isNotNull
  15142. }
  15143. } ]
  15144. },
  15145. navigation: {
  15146. type: 'landmark',
  15147. attributes: {
  15148. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15149. },
  15150. owned: null,
  15151. nameFrom: [ 'author' ],
  15152. context: null,
  15153. implicit: [ 'nav' ],
  15154. unsupported: false,
  15155. allowedElements: [ 'section' ]
  15156. },
  15157. none: {
  15158. type: 'structure',
  15159. attributes: null,
  15160. owned: null,
  15161. nameFrom: [ 'author' ],
  15162. context: null,
  15163. unsupported: false,
  15164. allowedElements: [ {
  15165. nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]
  15166. }, {
  15167. nodeName: 'img',
  15168. attributes: {
  15169. alt: isNotNull
  15170. }
  15171. } ]
  15172. },
  15173. note: {
  15174. type: 'structure',
  15175. attributes: {
  15176. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15177. },
  15178. owned: null,
  15179. nameFrom: [ 'author' ],
  15180. context: null,
  15181. unsupported: false,
  15182. allowedElements: [ 'aside' ]
  15183. },
  15184. option: {
  15185. type: 'widget',
  15186. attributes: {
  15187. allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked', 'aria-errormessage' ]
  15188. },
  15189. owned: null,
  15190. nameFrom: [ 'author', 'contents' ],
  15191. context: [ 'listbox' ],
  15192. implicit: [ 'option' ],
  15193. unsupported: false,
  15194. allowedElements: [ {
  15195. nodeName: [ 'button', 'li' ]
  15196. }, {
  15197. nodeName: 'input',
  15198. properties: {
  15199. type: [ 'checkbox', 'button' ]
  15200. }
  15201. }, {
  15202. nodeName: 'a',
  15203. attributes: {
  15204. href: isNotNull
  15205. }
  15206. } ]
  15207. },
  15208. presentation: {
  15209. type: 'structure',
  15210. attributes: null,
  15211. owned: null,
  15212. nameFrom: [ 'author' ],
  15213. context: null,
  15214. unsupported: false,
  15215. allowedElements: [ {
  15216. nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]
  15217. }, {
  15218. nodeName: 'img',
  15219. attributes: {
  15220. alt: isNotNull
  15221. }
  15222. } ]
  15223. },
  15224. progressbar: {
  15225. type: 'widget',
  15226. attributes: {
  15227. allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-expanded', 'aria-errormessage' ]
  15228. },
  15229. owned: null,
  15230. nameFrom: [ 'author' ],
  15231. context: null,
  15232. implicit: [ 'progress' ],
  15233. unsupported: false
  15234. },
  15235. radio: {
  15236. type: 'widget',
  15237. attributes: {
  15238. allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage', 'aria-checked' ]
  15239. },
  15240. owned: null,
  15241. nameFrom: [ 'author', 'contents' ],
  15242. context: null,
  15243. implicit: [ 'input[type="radio"]' ],
  15244. unsupported: false,
  15245. allowedElements: [ {
  15246. nodeName: [ 'button', 'li' ]
  15247. }, {
  15248. nodeName: 'input',
  15249. properties: {
  15250. type: [ 'image', 'button' ]
  15251. }
  15252. } ]
  15253. },
  15254. radiogroup: {
  15255. type: 'composite',
  15256. attributes: {
  15257. allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded', 'aria-readonly', 'aria-errormessage', 'aria-orientation' ]
  15258. },
  15259. owned: {
  15260. all: [ 'radio' ]
  15261. },
  15262. nameFrom: [ 'author' ],
  15263. context: null,
  15264. unsupported: false,
  15265. allowedElements: {
  15266. nodeName: [ 'ol', 'ul', 'fieldset' ]
  15267. }
  15268. },
  15269. range: {
  15270. nameFrom: [ 'author' ],
  15271. type: 'abstract',
  15272. unsupported: false
  15273. },
  15274. region: {
  15275. type: 'landmark',
  15276. attributes: {
  15277. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15278. },
  15279. owned: null,
  15280. nameFrom: [ 'author' ],
  15281. context: null,
  15282. implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ],
  15283. unsupported: false,
  15284. allowedElements: {
  15285. nodeName: [ 'article', 'aside' ]
  15286. }
  15287. },
  15288. roletype: {
  15289. type: 'abstract',
  15290. unsupported: false
  15291. },
  15292. row: {
  15293. type: 'structure',
  15294. attributes: {
  15295. allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex', 'aria-errormessage' ]
  15296. },
  15297. owned: {
  15298. one: [ 'cell', 'columnheader', 'rowheader', 'gridcell' ]
  15299. },
  15300. nameFrom: [ 'author', 'contents' ],
  15301. context: [ 'rowgroup', 'grid', 'treegrid', 'table' ],
  15302. implicit: [ 'tr' ],
  15303. unsupported: false
  15304. },
  15305. rowgroup: {
  15306. type: 'structure',
  15307. attributes: {
  15308. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]
  15309. },
  15310. owned: {
  15311. all: [ 'row' ]
  15312. },
  15313. nameFrom: [ 'author', 'contents' ],
  15314. context: [ 'grid', 'table', 'treegrid' ],
  15315. implicit: [ 'tbody', 'thead', 'tfoot' ],
  15316. unsupported: false
  15317. },
  15318. rowheader: {
  15319. type: 'structure',
  15320. attributes: {
  15321. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]
  15322. },
  15323. owned: null,
  15324. nameFrom: [ 'author', 'contents' ],
  15325. context: [ 'row' ],
  15326. implicit: [ 'th' ],
  15327. unsupported: false
  15328. },
  15329. scrollbar: {
  15330. type: 'widget',
  15331. attributes: {
  15332. required: [ 'aria-controls', 'aria-valuenow' ],
  15333. allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ]
  15334. },
  15335. owned: null,
  15336. nameFrom: [ 'author' ],
  15337. context: null,
  15338. unsupported: false
  15339. },
  15340. search: {
  15341. type: 'landmark',
  15342. attributes: {
  15343. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15344. },
  15345. owned: null,
  15346. nameFrom: [ 'author' ],
  15347. context: null,
  15348. unsupported: false,
  15349. allowedElements: {
  15350. nodeName: [ 'aside', 'form', 'section' ]
  15351. }
  15352. },
  15353. searchbox: {
  15354. type: 'widget',
  15355. attributes: {
  15356. allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]
  15357. },
  15358. owned: null,
  15359. nameFrom: [ 'author' ],
  15360. context: null,
  15361. implicit: [ 'input[type="search"]' ],
  15362. unsupported: false,
  15363. allowedElements: {
  15364. nodeName: 'input',
  15365. properties: {
  15366. type: 'text'
  15367. }
  15368. }
  15369. },
  15370. section: {
  15371. nameFrom: [ 'author', 'contents' ],
  15372. type: 'abstract',
  15373. unsupported: false
  15374. },
  15375. sectionhead: {
  15376. nameFrom: [ 'author', 'contents' ],
  15377. type: 'abstract',
  15378. unsupported: false
  15379. },
  15380. select: {
  15381. nameFrom: [ 'author' ],
  15382. type: 'abstract',
  15383. unsupported: false
  15384. },
  15385. separator: {
  15386. type: 'structure',
  15387. attributes: {
  15388. allowed: [ 'aria-expanded', 'aria-orientation', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext', 'aria-errormessage' ]
  15389. },
  15390. owned: null,
  15391. nameFrom: [ 'author' ],
  15392. context: null,
  15393. implicit: [ 'hr' ],
  15394. unsupported: false,
  15395. allowedElements: [ 'li' ]
  15396. },
  15397. slider: {
  15398. type: 'widget',
  15399. attributes: {
  15400. allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
  15401. required: [ 'aria-valuenow' ]
  15402. },
  15403. owned: null,
  15404. nameFrom: [ 'author' ],
  15405. context: null,
  15406. implicit: [ 'input[type="range"]' ],
  15407. unsupported: false
  15408. },
  15409. spinbutton: {
  15410. type: 'widget',
  15411. attributes: {
  15412. allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
  15413. required: [ 'aria-valuenow' ]
  15414. },
  15415. owned: null,
  15416. nameFrom: [ 'author' ],
  15417. context: null,
  15418. implicit: [ 'input[type="number"]' ],
  15419. unsupported: false,
  15420. allowedElements: {
  15421. nodeName: 'input',
  15422. properties: {
  15423. type: [ 'text', 'tel' ]
  15424. }
  15425. }
  15426. },
  15427. status: {
  15428. type: 'widget',
  15429. attributes: {
  15430. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15431. },
  15432. owned: null,
  15433. nameFrom: [ 'author' ],
  15434. context: null,
  15435. implicit: [ 'output' ],
  15436. unsupported: false,
  15437. allowedElements: [ 'section' ]
  15438. },
  15439. structure: {
  15440. type: 'abstract',
  15441. unsupported: false
  15442. },
  15443. switch: {
  15444. type: 'widget',
  15445. attributes: {
  15446. allowed: [ 'aria-errormessage' ],
  15447. required: [ 'aria-checked' ]
  15448. },
  15449. owned: null,
  15450. nameFrom: [ 'author', 'contents' ],
  15451. context: null,
  15452. unsupported: false,
  15453. allowedElements: [ 'button', {
  15454. nodeName: 'input',
  15455. properties: {
  15456. type: [ 'checkbox', 'image', 'button' ]
  15457. }
  15458. }, {
  15459. nodeName: 'a',
  15460. attributes: {
  15461. href: isNotNull
  15462. }
  15463. } ]
  15464. },
  15465. tab: {
  15466. type: 'widget',
  15467. attributes: {
  15468. allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset', 'aria-errormessage' ]
  15469. },
  15470. owned: null,
  15471. nameFrom: [ 'author', 'contents' ],
  15472. context: [ 'tablist' ],
  15473. unsupported: false,
  15474. allowedElements: [ {
  15475. nodeName: [ 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li' ]
  15476. }, {
  15477. nodeName: 'input',
  15478. properties: {
  15479. type: 'button'
  15480. }
  15481. }, {
  15482. nodeName: 'a',
  15483. attributes: {
  15484. href: isNotNull
  15485. }
  15486. } ]
  15487. },
  15488. table: {
  15489. type: 'structure',
  15490. attributes: {
  15491. allowed: [ 'aria-colcount', 'aria-rowcount', 'aria-errormessage' ]
  15492. },
  15493. owned: {
  15494. one: [ 'rowgroup', 'row' ]
  15495. },
  15496. nameFrom: [ 'author', 'contents' ],
  15497. context: null,
  15498. implicit: [ 'table' ],
  15499. unsupported: false
  15500. },
  15501. tablist: {
  15502. type: 'composite',
  15503. attributes: {
  15504. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-errormessage' ]
  15505. },
  15506. owned: {
  15507. all: [ 'tab' ]
  15508. },
  15509. nameFrom: [ 'author' ],
  15510. context: null,
  15511. unsupported: false,
  15512. allowedElements: [ 'ol', 'ul' ]
  15513. },
  15514. tabpanel: {
  15515. type: 'widget',
  15516. attributes: {
  15517. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15518. },
  15519. owned: null,
  15520. nameFrom: [ 'author' ],
  15521. context: null,
  15522. unsupported: false,
  15523. allowedElements: [ 'section' ]
  15524. },
  15525. term: {
  15526. type: 'structure',
  15527. attributes: {
  15528. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15529. },
  15530. owned: null,
  15531. nameFrom: [ 'author', 'contents' ],
  15532. context: null,
  15533. implicit: [ 'dt' ],
  15534. unsupported: false
  15535. },
  15536. textbox: {
  15537. type: 'widget',
  15538. attributes: {
  15539. allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]
  15540. },
  15541. owned: null,
  15542. nameFrom: [ 'author' ],
  15543. context: null,
  15544. implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ],
  15545. unsupported: false
  15546. },
  15547. timer: {
  15548. type: 'widget',
  15549. attributes: {
  15550. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15551. },
  15552. owned: null,
  15553. nameFrom: [ 'author' ],
  15554. context: null,
  15555. unsupported: false
  15556. },
  15557. toolbar: {
  15558. type: 'structure',
  15559. attributes: {
  15560. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  15561. },
  15562. owned: null,
  15563. nameFrom: [ 'author' ],
  15564. context: null,
  15565. implicit: [ 'menu[type="toolbar"]' ],
  15566. unsupported: false,
  15567. allowedElements: [ 'ol', 'ul' ]
  15568. },
  15569. tooltip: {
  15570. type: 'structure',
  15571. attributes: {
  15572. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15573. },
  15574. owned: null,
  15575. nameFrom: [ 'author', 'contents' ],
  15576. context: null,
  15577. unsupported: false
  15578. },
  15579. tree: {
  15580. type: 'composite',
  15581. attributes: {
  15582. allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  15583. },
  15584. owned: {
  15585. all: [ 'treeitem' ]
  15586. },
  15587. nameFrom: [ 'author' ],
  15588. context: null,
  15589. unsupported: false,
  15590. allowedElements: [ 'ol', 'ul' ]
  15591. },
  15592. treegrid: {
  15593. type: 'composite',
  15594. attributes: {
  15595. allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation', 'aria-errormessage' ]
  15596. },
  15597. owned: {
  15598. one: [ 'rowgroup', 'row' ]
  15599. },
  15600. nameFrom: [ 'author' ],
  15601. context: null,
  15602. unsupported: false
  15603. },
  15604. treeitem: {
  15605. type: 'widget',
  15606. attributes: {
  15607. allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  15608. },
  15609. owned: null,
  15610. nameFrom: [ 'author', 'contents' ],
  15611. context: [ 'group', 'tree' ],
  15612. unsupported: false,
  15613. allowedElements: [ 'li', {
  15614. nodeName: 'a',
  15615. attributes: {
  15616. href: isNotNull
  15617. }
  15618. } ]
  15619. },
  15620. widget: {
  15621. type: 'abstract',
  15622. unsupported: false
  15623. },
  15624. window: {
  15625. nameFrom: [ 'author' ],
  15626. type: 'abstract',
  15627. unsupported: false
  15628. }
  15629. };
  15630. lookupTable.implicitHtmlRole = implicit_html_roles_default;
  15631. lookupTable.elementsAllowedNoRole = [ {
  15632. nodeName: [ 'base', 'body', 'caption', 'col', 'colgroup', 'datalist', 'dd', 'details', 'dt', 'head', 'html', 'keygen', 'label', 'legend', 'main', 'map', 'math', 'meta', 'meter', 'noscript', 'optgroup', 'param', 'picture', 'progress', 'script', 'source', 'style', 'template', 'textarea', 'title', 'track' ]
  15633. }, {
  15634. nodeName: 'area',
  15635. attributes: {
  15636. href: isNotNull
  15637. }
  15638. }, {
  15639. nodeName: 'input',
  15640. properties: {
  15641. type: [ 'color', 'data', 'datatime', 'file', 'hidden', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
  15642. }
  15643. }, {
  15644. nodeName: 'link',
  15645. attributes: {
  15646. href: isNotNull
  15647. }
  15648. }, {
  15649. nodeName: 'menu',
  15650. attributes: {
  15651. type: 'context'
  15652. }
  15653. }, {
  15654. nodeName: 'menuitem',
  15655. attributes: {
  15656. type: [ 'command', 'checkbox', 'radio' ]
  15657. }
  15658. }, {
  15659. nodeName: 'select',
  15660. condition: function condition(vNode) {
  15661. if (!(vNode instanceof axe.AbstractVirtualNode)) {
  15662. vNode = axe.utils.getNodeFromTree(vNode);
  15663. }
  15664. return Number(vNode.attr('size')) > 1;
  15665. },
  15666. properties: {
  15667. multiple: true
  15668. }
  15669. }, {
  15670. nodeName: [ 'clippath', 'cursor', 'defs', 'desc', 'feblend', 'fecolormatrix', 'fecomponenttransfer', 'fecomposite', 'feconvolvematrix', 'fediffuselighting', 'fedisplacementmap', 'fedistantlight', 'fedropshadow', 'feflood', 'fefunca', 'fefuncb', 'fefuncg', 'fefuncr', 'fegaussianblur', 'feimage', 'femerge', 'femergenode', 'femorphology', 'feoffset', 'fepointlight', 'fespecularlighting', 'fespotlight', 'fetile', 'feturbulence', 'filter', 'hatch', 'hatchpath', 'lineargradient', 'marker', 'mask', 'meshgradient', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'pattern', 'radialgradient', 'solidcolor', 'stop', 'switch', 'view' ]
  15671. } ];
  15672. lookupTable.elementsAllowedAnyRole = [ {
  15673. nodeName: 'a',
  15674. attributes: {
  15675. href: isNull
  15676. }
  15677. }, {
  15678. nodeName: 'img',
  15679. attributes: {
  15680. alt: isNull
  15681. }
  15682. }, {
  15683. nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
  15684. } ];
  15685. lookupTable.evaluateRoleForElement = {
  15686. A: function A(_ref45) {
  15687. var node = _ref45.node, out = _ref45.out;
  15688. if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
  15689. return true;
  15690. }
  15691. if (node.href.length) {
  15692. return out;
  15693. }
  15694. return true;
  15695. },
  15696. AREA: function AREA(_ref46) {
  15697. var node = _ref46.node;
  15698. return !node.href;
  15699. },
  15700. BUTTON: function BUTTON(_ref47) {
  15701. var node = _ref47.node, role = _ref47.role, out = _ref47.out;
  15702. if (node.getAttribute('type') === 'menu') {
  15703. return role === 'menuitem';
  15704. }
  15705. return out;
  15706. },
  15707. IMG: function IMG(_ref48) {
  15708. var node = _ref48.node, role = _ref48.role, out = _ref48.out;
  15709. switch (node.alt) {
  15710. case null:
  15711. return out;
  15712. case '':
  15713. return role === 'presentation' || role === 'none';
  15714. default:
  15715. return role !== 'presentation' && role !== 'none';
  15716. }
  15717. },
  15718. INPUT: function INPUT(_ref49) {
  15719. var node = _ref49.node, role = _ref49.role, out = _ref49.out;
  15720. switch (node.type) {
  15721. case 'button':
  15722. case 'image':
  15723. return out;
  15724. case 'checkbox':
  15725. if (role === 'button' && node.hasAttribute('aria-pressed')) {
  15726. return true;
  15727. }
  15728. return out;
  15729. case 'radio':
  15730. return role === 'menuitemradio';
  15731. case 'text':
  15732. return role === 'combobox' || role === 'searchbox' || role === 'spinbutton';
  15733. case 'tel':
  15734. return role === 'combobox' || role === 'spinbutton';
  15735. case 'url':
  15736. case 'search':
  15737. case 'email':
  15738. return role === 'combobox';
  15739. default:
  15740. return false;
  15741. }
  15742. },
  15743. LI: function LI(_ref50) {
  15744. var node = _ref50.node, out = _ref50.out;
  15745. var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
  15746. if (hasImplicitListitemRole) {
  15747. return out;
  15748. }
  15749. return true;
  15750. },
  15751. MENU: function MENU(_ref51) {
  15752. var node = _ref51.node;
  15753. if (node.getAttribute('type') === 'context') {
  15754. return false;
  15755. }
  15756. return true;
  15757. },
  15758. OPTION: function OPTION(_ref52) {
  15759. var node = _ref52.node;
  15760. var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
  15761. return !withinOptionList;
  15762. },
  15763. SELECT: function SELECT(_ref53) {
  15764. var node = _ref53.node, role = _ref53.role;
  15765. return !node.multiple && node.size <= 1 && role === 'menu';
  15766. },
  15767. SVG: function SVG(_ref54) {
  15768. var node = _ref54.node, out = _ref54.out;
  15769. if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
  15770. return true;
  15771. }
  15772. return out;
  15773. }
  15774. };
  15775. lookupTable.rolesOfType = {
  15776. widget: [ 'button', 'checkbox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'searchbox', 'slider', 'spinbutton', 'status', 'switch', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'tree', 'treeitem' ]
  15777. };
  15778. var lookup_table_default = lookupTable;
  15779. function implicitNodes(role) {
  15780. var implicit = null;
  15781. var roles = lookup_table_default.role[role];
  15782. if (roles && roles.implicit) {
  15783. implicit = clone_default(roles.implicit);
  15784. }
  15785. return implicit;
  15786. }
  15787. var implicit_nodes_default = implicitNodes;
  15788. function isAccessibleRef(node) {
  15789. return !!get_accessible_refs_default(node).length;
  15790. }
  15791. var is_accessible_ref_default = isAccessibleRef;
  15792. function label3(node) {
  15793. node = get_node_from_tree_default(node);
  15794. return label_virtual_default(node);
  15795. }
  15796. var label_default2 = label3;
  15797. function requiredAttr(role) {
  15798. var roleDef = standards_default.ariaRoles[role];
  15799. if (!roleDef || !Array.isArray(roleDef.requiredAttrs)) {
  15800. return [];
  15801. }
  15802. return _toConsumableArray(roleDef.requiredAttrs);
  15803. }
  15804. var required_attr_default = requiredAttr;
  15805. function requiredContext(role) {
  15806. var roleDef = standards_default.ariaRoles[role];
  15807. if (!roleDef || !Array.isArray(roleDef.requiredContext)) {
  15808. return null;
  15809. }
  15810. return _toConsumableArray(roleDef.requiredContext);
  15811. }
  15812. var required_context_default = requiredContext;
  15813. function requiredOwned(role) {
  15814. var roleDef = standards_default.ariaRoles[role];
  15815. if (!roleDef || !Array.isArray(roleDef.requiredOwned)) {
  15816. return null;
  15817. }
  15818. return _toConsumableArray(roleDef.requiredOwned);
  15819. }
  15820. var required_owned_default = requiredOwned;
  15821. function validateAttrValue(vNode, attr) {
  15822. vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
  15823. var matches14;
  15824. var list;
  15825. var value = vNode.attr(attr);
  15826. var attrInfo = standards_default.ariaAttrs[attr];
  15827. if (!attrInfo) {
  15828. return true;
  15829. }
  15830. if (attrInfo.allowEmpty && (!value || value.trim() === '')) {
  15831. return true;
  15832. }
  15833. switch (attrInfo.type) {
  15834. case 'boolean':
  15835. return [ 'true', 'false' ].includes(value.toLowerCase());
  15836. case 'nmtoken':
  15837. return typeof value === 'string' && attrInfo.values.includes(value.toLowerCase());
  15838. case 'nmtokens':
  15839. list = token_list_default(value);
  15840. return list.reduce(function(result, token) {
  15841. return result && attrInfo.values.includes(token);
  15842. }, list.length !== 0);
  15843. case 'idref':
  15844. try {
  15845. var doc = get_root_node_default2(vNode.actualNode);
  15846. return !!(value && doc.getElementById(value));
  15847. } catch (e) {
  15848. throw new TypeError('Cannot resolve id references for partial DOM');
  15849. }
  15850. case 'idrefs':
  15851. return idrefs_default(vNode, attr).some(function(node) {
  15852. return !!node;
  15853. });
  15854. case 'string':
  15855. return value.trim() !== '';
  15856. case 'decimal':
  15857. matches14 = value.match(/^[-+]?([0-9]*)\.?([0-9]*)$/);
  15858. return !!(matches14 && (matches14[1] || matches14[2]));
  15859. case 'int':
  15860. var minValue = typeof attrInfo.minValue !== 'undefined' ? attrInfo.minValue : -Infinity;
  15861. return /^[-+]?[0-9]+$/.test(value) && parseInt(value) >= minValue;
  15862. }
  15863. }
  15864. var validate_attr_value_default = validateAttrValue;
  15865. function validateAttr(att) {
  15866. var attrDefinition = standards_default.ariaAttrs[att];
  15867. return !!attrDefinition;
  15868. }
  15869. var validate_attr_default = validateAttr;
  15870. function abstractroleEvaluate(node, options, virtualNode) {
  15871. var abstractRoles = token_list_default(virtualNode.attr('role')).filter(function(role) {
  15872. return get_role_type_default(role) === 'abstract';
  15873. });
  15874. if (abstractRoles.length > 0) {
  15875. this.data(abstractRoles);
  15876. return true;
  15877. }
  15878. return false;
  15879. }
  15880. var abstractrole_evaluate_default = abstractroleEvaluate;
  15881. function ariaAllowedAttrEvaluate(node, options, virtualNode) {
  15882. var invalid = [];
  15883. var role = get_role_default(virtualNode);
  15884. var attrs = virtualNode.attrNames;
  15885. var allowed = allowed_attr_default(role);
  15886. if (Array.isArray(options[role])) {
  15887. allowed = unique_array_default(options[role].concat(allowed));
  15888. }
  15889. var tableMap = cache_default.get('aria-allowed-attr-table');
  15890. if (!tableMap) {
  15891. tableMap = new WeakMap();
  15892. cache_default.set('aria-allowed-attr-table', tableMap);
  15893. }
  15894. function validateRowAttrs() {
  15895. if (virtualNode.parent && role === 'row') {
  15896. var table5 = closest_default(virtualNode, 'table, [role="treegrid"], [role="table"], [role="grid"]');
  15897. var tableRole = tableMap.get(table5);
  15898. if (table5 && !tableRole) {
  15899. tableRole = get_role_default(table5);
  15900. tableMap.set(table5, tableRole);
  15901. }
  15902. if ([ 'table', 'grid' ].includes(tableRole) && role === 'row') {
  15903. return true;
  15904. }
  15905. }
  15906. }
  15907. var ariaAttr = Array.isArray(options.validTreeRowAttrs) ? options.validTreeRowAttrs : [];
  15908. var preChecks = {};
  15909. ariaAttr.forEach(function(attr) {
  15910. preChecks[attr] = validateRowAttrs;
  15911. });
  15912. if (allowed) {
  15913. for (var _i15 = 0; _i15 < attrs.length; _i15++) {
  15914. var _preChecks$attrName;
  15915. var attrName = attrs[_i15];
  15916. if (validate_attr_default(attrName) && (_preChecks$attrName = preChecks[attrName]) !== null && _preChecks$attrName !== void 0 && _preChecks$attrName.call(preChecks)) {
  15917. invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
  15918. } else if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
  15919. invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
  15920. }
  15921. }
  15922. }
  15923. if (invalid.length) {
  15924. this.data(invalid);
  15925. if (!is_html_element_default(virtualNode) && !role && !is_focusable_default(virtualNode)) {
  15926. return void 0;
  15927. }
  15928. return false;
  15929. }
  15930. return true;
  15931. }
  15932. var aria_allowed_attr_evaluate_default = ariaAllowedAttrEvaluate;
  15933. function ariaAllowedRoleEvaluate(node) {
  15934. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15935. var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
  15936. var _options$allowImplici = options.allowImplicit, allowImplicit = _options$allowImplici === void 0 ? true : _options$allowImplici, _options$ignoredTags = options.ignoredTags, ignoredTags = _options$ignoredTags === void 0 ? [] : _options$ignoredTags;
  15937. var nodeName2 = virtualNode.props.nodeName;
  15938. if (ignoredTags.map(function(tag) {
  15939. return tag.toLowerCase();
  15940. }).includes(nodeName2)) {
  15941. return true;
  15942. }
  15943. var unallowedRoles = get_element_unallowed_roles_default(virtualNode, allowImplicit);
  15944. if (unallowedRoles.length) {
  15945. this.data(unallowedRoles);
  15946. if (!is_visible_default(virtualNode, true)) {
  15947. return void 0;
  15948. }
  15949. return false;
  15950. }
  15951. return true;
  15952. }
  15953. var aria_allowed_role_evaluate_default = ariaAllowedRoleEvaluate;
  15954. function ariaErrormessageEvaluate(node, options, virtualNode) {
  15955. options = Array.isArray(options) ? options : [];
  15956. var attr = virtualNode.attr('aria-errormessage');
  15957. var hasAttr = virtualNode.hasAttr('aria-errormessage');
  15958. var invaid = virtualNode.attr('aria-invalid');
  15959. var hasInvallid = virtualNode.hasAttr('aria-invalid');
  15960. if (!hasInvallid || invaid === 'false') {
  15961. return true;
  15962. }
  15963. function validateAttrValue2(attr2) {
  15964. if (attr2.trim() === '') {
  15965. return standards_default.ariaAttrs['aria-errormessage'].allowEmpty;
  15966. }
  15967. var idref;
  15968. try {
  15969. idref = attr2 && idrefs_default(virtualNode, 'aria-errormessage')[0];
  15970. } catch (e) {
  15971. this.data({
  15972. messageKey: 'idrefs',
  15973. values: token_list_default(attr2)
  15974. });
  15975. return void 0;
  15976. }
  15977. if (idref) {
  15978. if (!is_visible_default(idref, true)) {
  15979. this.data({
  15980. messageKey: 'hidden',
  15981. values: token_list_default(attr2)
  15982. });
  15983. return false;
  15984. }
  15985. return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(virtualNode.attr('aria-describedby')).indexOf(attr2) > -1;
  15986. }
  15987. return;
  15988. }
  15989. if (options.indexOf(attr) === -1 && hasAttr) {
  15990. this.data(token_list_default(attr));
  15991. return validateAttrValue2.call(this, attr);
  15992. }
  15993. return true;
  15994. }
  15995. var aria_errormessage_evaluate_default = ariaErrormessageEvaluate;
  15996. function ariaHiddenBodyEvaluate(node, options, virtualNode) {
  15997. return virtualNode.attr('aria-hidden') !== 'true';
  15998. }
  15999. var aria_hidden_body_evaluate_default = ariaHiddenBodyEvaluate;
  16000. function ariaLevelEvaluate(node, options, virtualNode) {
  16001. var ariaHeadingLevel = virtualNode.attr('aria-level');
  16002. var ariaLevel = parseInt(ariaHeadingLevel, 10);
  16003. if (ariaLevel > 6) {
  16004. return void 0;
  16005. }
  16006. return true;
  16007. }
  16008. var aria_level_evaluate_default = ariaLevelEvaluate;
  16009. function ariaProhibitedAttrEvaluate(node) {
  16010. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16011. var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
  16012. var elementsAllowedAriaLabel = (options === null || options === void 0 ? void 0 : options.elementsAllowedAriaLabel) || [];
  16013. var nodeName2 = virtualNode.props.nodeName;
  16014. var role = get_role_default(virtualNode, {
  16015. chromium: true
  16016. });
  16017. var prohibitedList = listProhibitedAttrs(role, nodeName2, elementsAllowedAriaLabel);
  16018. var prohibited = prohibitedList.filter(function(attrName) {
  16019. if (!virtualNode.attrNames.includes(attrName)) {
  16020. return false;
  16021. }
  16022. return sanitize_default(virtualNode.attr(attrName)) !== '';
  16023. });
  16024. if (prohibited.length === 0) {
  16025. return false;
  16026. }
  16027. var messageKey = virtualNode.hasAttr('role') ? 'hasRole' : 'noRole';
  16028. messageKey += prohibited.length > 1 ? 'Plural' : 'Singular';
  16029. this.data({
  16030. role: role,
  16031. nodeName: nodeName2,
  16032. messageKey: messageKey,
  16033. prohibited: prohibited
  16034. });
  16035. var textContent = subtree_text_default(virtualNode, {
  16036. subtreeDescendant: true
  16037. });
  16038. if (sanitize_default(textContent) !== '') {
  16039. return void 0;
  16040. }
  16041. return true;
  16042. }
  16043. function listProhibitedAttrs(role, nodeName2, elementsAllowedAriaLabel) {
  16044. var roleSpec = standards_default.ariaRoles[role];
  16045. if (roleSpec) {
  16046. return roleSpec.prohibitedAttrs || [];
  16047. }
  16048. if (!!role || elementsAllowedAriaLabel.includes(nodeName2)) {
  16049. return [];
  16050. }
  16051. return [ 'aria-label', 'aria-labelledby' ];
  16052. }
  16053. var standards_exports = {};
  16054. __export(standards_exports, {
  16055. getAriaRolesByType: function getAriaRolesByType() {
  16056. return get_aria_roles_by_type_default;
  16057. },
  16058. getAriaRolesSupportingNameFromContent: function getAriaRolesSupportingNameFromContent() {
  16059. return get_aria_roles_supporting_name_from_content_default;
  16060. },
  16061. getElementSpec: function getElementSpec() {
  16062. return get_element_spec_default;
  16063. },
  16064. getElementsByContentType: function getElementsByContentType() {
  16065. return get_elements_by_content_type_default;
  16066. },
  16067. getGlobalAriaAttrs: function getGlobalAriaAttrs() {
  16068. return get_global_aria_attrs_default;
  16069. },
  16070. implicitHtmlRoles: function implicitHtmlRoles() {
  16071. return implicit_html_roles_default;
  16072. }
  16073. });
  16074. function ariaRequiredAttrEvaluate(node) {
  16075. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16076. var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
  16077. var missing = [];
  16078. var attrs = virtualNode.attrNames;
  16079. var role = get_explicit_role_default(virtualNode);
  16080. if (attrs.length) {
  16081. var required = required_attr_default(role);
  16082. var elmSpec = get_element_spec_default(virtualNode);
  16083. if (Array.isArray(options[role])) {
  16084. required = unique_array_default(options[role], required);
  16085. }
  16086. if (role && required) {
  16087. for (var _i16 = 0, l = required.length; _i16 < l; _i16++) {
  16088. var attr = required[_i16];
  16089. if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
  16090. missing.push(attr);
  16091. }
  16092. }
  16093. }
  16094. }
  16095. var comboboxMissingControls = role === 'combobox' && missing.includes('aria-controls');
  16096. if (comboboxMissingControls && (virtualNode.hasAttr('aria-owns') || virtualNode.attr('aria-expanded') !== 'true')) {
  16097. missing.splice(missing.indexOf('aria-controls', 1));
  16098. }
  16099. if (missing.length) {
  16100. this.data(missing);
  16101. return false;
  16102. }
  16103. return true;
  16104. }
  16105. var aria_required_attr_evaluate_default = ariaRequiredAttrEvaluate;
  16106. function getOwnedRoles(virtualNode, required) {
  16107. var ownedRoles = [];
  16108. var ownedElements = get_owned_virtual_default(virtualNode);
  16109. var _loop4 = function _loop4(_i17) {
  16110. var ownedElement = ownedElements[_i17];
  16111. var role = get_role_default(ownedElement, {
  16112. noPresentational: true
  16113. });
  16114. if (!role || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
  16115. return requiredRole === role;
  16116. })) {
  16117. ownedElements.push.apply(ownedElements, _toConsumableArray(ownedElement.children));
  16118. } else if (role) {
  16119. ownedRoles.push(role);
  16120. }
  16121. };
  16122. for (var _i17 = 0; _i17 < ownedElements.length; _i17++) {
  16123. _loop4(_i17);
  16124. }
  16125. return ownedRoles;
  16126. }
  16127. function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
  16128. for (var _i18 = 0; _i18 < ownedRoles.length; _i18++) {
  16129. var ownedRole = ownedRoles[_i18];
  16130. if (required.includes(ownedRole)) {
  16131. required = required.filter(function(requiredRole) {
  16132. return requiredRole !== ownedRole;
  16133. });
  16134. return null;
  16135. }
  16136. }
  16137. if (required.length) {
  16138. return required;
  16139. }
  16140. return null;
  16141. }
  16142. function ariaRequiredChildrenEvaluate(node, options, virtualNode) {
  16143. var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];
  16144. var role = get_explicit_role_default(virtualNode, {
  16145. dpub: true
  16146. });
  16147. var required = required_owned_default(role);
  16148. if (required === null) {
  16149. return true;
  16150. }
  16151. var ownedRoles = getOwnedRoles(virtualNode, required);
  16152. var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles);
  16153. if (!missing) {
  16154. return true;
  16155. }
  16156. this.data(missing);
  16157. if (reviewEmpty.includes(role) && !has_content_virtual_default(virtualNode, false, true) && !ownedRoles.length && (!virtualNode.hasAttr('aria-owns') || !idrefs_default(node, 'aria-owns').length)) {
  16158. return void 0;
  16159. }
  16160. return false;
  16161. }
  16162. var aria_required_children_evaluate_default = ariaRequiredChildrenEvaluate;
  16163. function getMissingContext(virtualNode, ownGroupRoles, reqContext, includeElement) {
  16164. var explicitRole2 = get_explicit_role_default(virtualNode);
  16165. if (!reqContext) {
  16166. reqContext = required_context_default(explicitRole2);
  16167. }
  16168. if (!reqContext) {
  16169. return null;
  16170. }
  16171. var vNode = includeElement ? virtualNode : virtualNode.parent;
  16172. while (vNode) {
  16173. var parentRole = get_role_default(vNode);
  16174. if (reqContext.includes('group') && parentRole === 'group') {
  16175. if (ownGroupRoles.includes(explicitRole2)) {
  16176. reqContext.push(explicitRole2);
  16177. }
  16178. reqContext = reqContext.filter(function(r) {
  16179. return r !== 'group';
  16180. });
  16181. vNode = vNode.parent;
  16182. continue;
  16183. }
  16184. if (reqContext.includes(parentRole)) {
  16185. return null;
  16186. } else if (parentRole && ![ 'presentation', 'none' ].includes(parentRole)) {
  16187. return reqContext;
  16188. }
  16189. vNode = vNode.parent;
  16190. }
  16191. return reqContext;
  16192. }
  16193. function getAriaOwners(element) {
  16194. var owners = [], o = null;
  16195. while (element) {
  16196. if (element.getAttribute('id')) {
  16197. var id = escape_selector_default(element.getAttribute('id'));
  16198. var doc = get_root_node_default2(element);
  16199. o = doc.querySelector('[aria-owns~='.concat(id, ']'));
  16200. if (o) {
  16201. owners.push(o);
  16202. }
  16203. }
  16204. element = element.parentElement;
  16205. }
  16206. return owners.length ? owners : null;
  16207. }
  16208. function ariaRequiredParentEvaluate(node, options, virtualNode) {
  16209. var ownGroupRoles = options && Array.isArray(options.ownGroupRoles) ? options.ownGroupRoles : [];
  16210. var missingParents = getMissingContext(virtualNode, ownGroupRoles);
  16211. if (!missingParents) {
  16212. return true;
  16213. }
  16214. var owners = getAriaOwners(node);
  16215. if (owners) {
  16216. for (var _i19 = 0, l = owners.length; _i19 < l; _i19++) {
  16217. missingParents = getMissingContext(get_node_from_tree_default(owners[_i19]), ownGroupRoles, missingParents, true);
  16218. if (!missingParents) {
  16219. return true;
  16220. }
  16221. }
  16222. }
  16223. this.data(missingParents);
  16224. return false;
  16225. }
  16226. var aria_required_parent_evaluate_default = ariaRequiredParentEvaluate;
  16227. function ariaRoledescriptionEvaluate(node) {
  16228. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16229. var role = get_role_default(node);
  16230. var supportedRoles = options.supportedRoles || [];
  16231. if (supportedRoles.includes(role)) {
  16232. return true;
  16233. }
  16234. if (role && role !== 'presentation' && role !== 'none') {
  16235. return void 0;
  16236. }
  16237. return false;
  16238. }
  16239. var aria_roledescription_evaluate_default = ariaRoledescriptionEvaluate;
  16240. function ariaUnsupportedAttrEvaluate(node, options, virtualNode) {
  16241. var unsupportedAttrs = virtualNode.attrNames.filter(function(name) {
  16242. var attribute = standards_default.ariaAttrs[name];
  16243. if (!validate_attr_default(name)) {
  16244. return false;
  16245. }
  16246. var unsupported4 = attribute.unsupported;
  16247. if (_typeof(unsupported4) !== 'object') {
  16248. return !!unsupported4;
  16249. }
  16250. return !matches_default3(node, unsupported4.exceptions);
  16251. });
  16252. if (unsupportedAttrs.length) {
  16253. this.data(unsupportedAttrs);
  16254. return true;
  16255. }
  16256. return false;
  16257. }
  16258. var aria_unsupported_attr_evaluate_default = ariaUnsupportedAttrEvaluate;
  16259. function ariaValidAttrEvaluate(node, options, virtualNode) {
  16260. options = Array.isArray(options.value) ? options.value : [];
  16261. var invalid = [];
  16262. var aria49 = /^aria-/;
  16263. virtualNode.attrNames.forEach(function(attr) {
  16264. if (options.indexOf(attr) === -1 && aria49.test(attr) && !validate_attr_default(attr)) {
  16265. invalid.push(attr);
  16266. }
  16267. });
  16268. if (invalid.length) {
  16269. this.data(invalid);
  16270. return false;
  16271. }
  16272. return true;
  16273. }
  16274. var aria_valid_attr_evaluate_default = ariaValidAttrEvaluate;
  16275. function ariaValidAttrValueEvaluate(node, options, virtualNode) {
  16276. options = Array.isArray(options.value) ? options.value : [];
  16277. var needsReview = '';
  16278. var messageKey = '';
  16279. var invalid = [];
  16280. var aria49 = /^aria-/;
  16281. var skipAttrs = [ 'aria-errormessage' ];
  16282. var preChecks = {
  16283. 'aria-controls': function ariaControls() {
  16284. return virtualNode.attr('aria-expanded') !== 'false' && virtualNode.attr('aria-selected') !== 'false';
  16285. },
  16286. 'aria-current': function ariaCurrent(validValue) {
  16287. if (!validValue) {
  16288. needsReview = 'aria-current="'.concat(virtualNode.attr('aria-current'), '"');
  16289. messageKey = 'ariaCurrent';
  16290. }
  16291. return;
  16292. },
  16293. 'aria-owns': function ariaOwns() {
  16294. return virtualNode.attr('aria-expanded') !== 'false';
  16295. },
  16296. 'aria-describedby': function ariaDescribedby(validValue) {
  16297. if (!validValue) {
  16298. needsReview = 'aria-describedby="'.concat(virtualNode.attr('aria-describedby'), '"');
  16299. messageKey = axe._tree && axe._tree[0]._hasShadowRoot ? 'noIdShadow' : 'noId';
  16300. }
  16301. return;
  16302. },
  16303. 'aria-labelledby': function ariaLabelledby(validValue) {
  16304. if (!validValue) {
  16305. needsReview = 'aria-labelledby="'.concat(virtualNode.attr('aria-labelledby'), '"');
  16306. messageKey = axe._tree && axe._tree[0]._hasShadowRoot ? 'noIdShadow' : 'noId';
  16307. }
  16308. }
  16309. };
  16310. virtualNode.attrNames.forEach(function(attrName) {
  16311. if (skipAttrs.includes(attrName) || options.includes(attrName) || !aria49.test(attrName)) {
  16312. return;
  16313. }
  16314. var validValue;
  16315. var attrValue = virtualNode.attr(attrName);
  16316. try {
  16317. validValue = validate_attr_value_default(virtualNode, attrName);
  16318. } catch (e) {
  16319. needsReview = ''.concat(attrName, '="').concat(attrValue, '"');
  16320. messageKey = 'idrefs';
  16321. }
  16322. if ((preChecks[attrName] ? preChecks[attrName](validValue) : true) && !validValue) {
  16323. invalid.push(''.concat(attrName, '="').concat(attrValue, '"'));
  16324. }
  16325. });
  16326. if (needsReview) {
  16327. this.data({
  16328. messageKey: messageKey,
  16329. needsReview: needsReview
  16330. });
  16331. return void 0;
  16332. }
  16333. if (invalid.length) {
  16334. this.data(invalid);
  16335. return false;
  16336. }
  16337. return true;
  16338. }
  16339. var aria_valid_attr_value_evaluate_default = ariaValidAttrValueEvaluate;
  16340. function deprecatedroleEvaluate(node, options, virtualNode) {
  16341. var role = get_role_default(virtualNode, {
  16342. dpub: true,
  16343. fallback: true
  16344. });
  16345. var roleDefinition = standards_default.ariaRoles[role];
  16346. if (!(roleDefinition !== null && roleDefinition !== void 0 && roleDefinition.deprecated)) {
  16347. return false;
  16348. }
  16349. this.data(role);
  16350. return true;
  16351. }
  16352. function nonePresentationOnElementWithNoImplicitRole(virtualNode, explicitRoles) {
  16353. var hasImplicitRole = implicit_role_default(virtualNode);
  16354. return !hasImplicitRole && explicitRoles.length === 2 && explicitRoles.includes('none') && explicitRoles.includes('presentation');
  16355. }
  16356. function fallbackroleEvaluate(node, options, virtualNode) {
  16357. var explicitRoles = token_list_default(virtualNode.attr('role'));
  16358. if (explicitRoles.length <= 1) {
  16359. return false;
  16360. }
  16361. return nonePresentationOnElementWithNoImplicitRole(virtualNode, explicitRoles) ? void 0 : true;
  16362. }
  16363. var fallbackrole_evaluate_default = fallbackroleEvaluate;
  16364. function hasGlobalAriaAttributeEvaluate(node, options, virtualNode) {
  16365. var globalAttrs = get_global_aria_attrs_default().filter(function(attr) {
  16366. return virtualNode.hasAttr(attr);
  16367. });
  16368. this.data(globalAttrs);
  16369. return globalAttrs.length > 0;
  16370. }
  16371. var has_global_aria_attribute_evaluate_default = hasGlobalAriaAttributeEvaluate;
  16372. function hasWidgetRoleEvaluate(node) {
  16373. var role = node.getAttribute('role');
  16374. if (role === null) {
  16375. return false;
  16376. }
  16377. var roleType = get_role_type_default(role);
  16378. return roleType === 'widget' || roleType === 'composite';
  16379. }
  16380. var has_widget_role_evaluate_default = hasWidgetRoleEvaluate;
  16381. function invalidroleEvaluate(node, options, virtualNode) {
  16382. var allRoles = token_list_default(virtualNode.attr('role'));
  16383. var allInvalid = allRoles.every(function(role) {
  16384. return !is_valid_role_default(role, {
  16385. allowAbstract: true
  16386. });
  16387. });
  16388. if (allInvalid) {
  16389. this.data(allRoles);
  16390. return true;
  16391. }
  16392. return false;
  16393. }
  16394. var invalidrole_evaluate_default = invalidroleEvaluate;
  16395. function isElementFocusableEvaluate(node, options, virtualNode) {
  16396. return is_focusable_default(virtualNode);
  16397. }
  16398. var is_element_focusable_evaluate_default = isElementFocusableEvaluate;
  16399. function noImplicitExplicitLabelEvaluate(node, options, virtualNode) {
  16400. var role = get_role_default(virtualNode, {
  16401. noImplicit: true
  16402. });
  16403. this.data(role);
  16404. var label5;
  16405. var accText;
  16406. try {
  16407. label5 = sanitize_default(label_text_default(virtualNode)).toLowerCase();
  16408. accText = sanitize_default(accessible_text_virtual_default(virtualNode)).toLowerCase();
  16409. } catch (e) {
  16410. return void 0;
  16411. }
  16412. if (!accText && !label5) {
  16413. return false;
  16414. }
  16415. if (!accText && label5) {
  16416. return void 0;
  16417. }
  16418. if (!accText.includes(label5)) {
  16419. return void 0;
  16420. }
  16421. return false;
  16422. }
  16423. var no_implicit_explicit_label_evaluate_default = noImplicitExplicitLabelEvaluate;
  16424. function unsupportedroleEvaluate(node, options, virtualNode) {
  16425. return is_unsupported_role_default(get_role_default(virtualNode));
  16426. }
  16427. var unsupportedrole_evaluate_default = unsupportedroleEvaluate;
  16428. var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = {
  16429. ARTICLE: true,
  16430. ASIDE: true,
  16431. NAV: true,
  16432. SECTION: true
  16433. };
  16434. var VALID_ROLES_FOR_SCROLLABLE_REGIONS = {
  16435. application: true,
  16436. banner: false,
  16437. complementary: true,
  16438. contentinfo: true,
  16439. form: true,
  16440. main: true,
  16441. navigation: true,
  16442. region: true,
  16443. search: false
  16444. };
  16445. function validScrollableTagName(node) {
  16446. var nodeName2 = node.nodeName.toUpperCase();
  16447. return VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS[nodeName2] || false;
  16448. }
  16449. function validScrollableRole(node, options) {
  16450. var role = get_explicit_role_default(node);
  16451. if (!role) {
  16452. return false;
  16453. }
  16454. return VALID_ROLES_FOR_SCROLLABLE_REGIONS[role] || options.roles.includes(role) || false;
  16455. }
  16456. function validScrollableSemanticsEvaluate(node, options) {
  16457. return validScrollableRole(node, options) || validScrollableTagName(node);
  16458. }
  16459. var valid_scrollable_semantics_evaluate_default = validScrollableSemanticsEvaluate;
  16460. var color_exports = {};
  16461. __export(color_exports, {
  16462. Color: function Color() {
  16463. return color_default;
  16464. },
  16465. centerPointOfRect: function centerPointOfRect() {
  16466. return center_point_of_rect_default;
  16467. },
  16468. elementHasImage: function elementHasImage() {
  16469. return element_has_image_default;
  16470. },
  16471. elementIsDistinct: function elementIsDistinct() {
  16472. return element_is_distinct_default;
  16473. },
  16474. filteredRectStack: function filteredRectStack() {
  16475. return filtered_rect_stack_default;
  16476. },
  16477. flattenColors: function flattenColors() {
  16478. return flatten_colors_default;
  16479. },
  16480. flattenShadowColors: function flattenShadowColors() {
  16481. return flatten_shadow_colors_default;
  16482. },
  16483. getBackgroundColor: function getBackgroundColor() {
  16484. return _getBackgroundColor;
  16485. },
  16486. getBackgroundStack: function getBackgroundStack() {
  16487. return get_background_stack_default;
  16488. },
  16489. getContrast: function getContrast() {
  16490. return get_contrast_default;
  16491. },
  16492. getForegroundColor: function getForegroundColor() {
  16493. return get_foreground_color_default;
  16494. },
  16495. getOwnBackgroundColor: function getOwnBackgroundColor() {
  16496. return get_own_background_color_default;
  16497. },
  16498. getRectStack: function getRectStack() {
  16499. return get_rect_stack_default;
  16500. },
  16501. getTextShadowColors: function getTextShadowColors() {
  16502. return get_text_shadow_colors_default;
  16503. },
  16504. hasValidContrastRatio: function hasValidContrastRatio() {
  16505. return has_valid_contrast_ratio_default;
  16506. },
  16507. incompleteData: function incompleteData() {
  16508. return incomplete_data_default;
  16509. }
  16510. });
  16511. function centerPointOfRect(rect) {
  16512. if (rect.left > window.innerWidth) {
  16513. return void 0;
  16514. }
  16515. if (rect.top > window.innerHeight) {
  16516. return void 0;
  16517. }
  16518. var x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1);
  16519. var y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1);
  16520. return {
  16521. x: x,
  16522. y: y
  16523. };
  16524. }
  16525. var center_point_of_rect_default = centerPointOfRect;
  16526. function _getFonts(style) {
  16527. return style.getPropertyValue('font-family').split(/[,;]/g).map(function(font) {
  16528. return font.trim().toLowerCase();
  16529. });
  16530. }
  16531. function elementIsDistinct(node, ancestorNode) {
  16532. var nodeStyle = window.getComputedStyle(node);
  16533. if (nodeStyle.getPropertyValue('background-image') !== 'none') {
  16534. return true;
  16535. }
  16536. var hasBorder = [ 'border-bottom', 'border-top', 'outline' ].reduce(function(result, edge) {
  16537. var borderClr = new color_default();
  16538. borderClr.parseString(nodeStyle.getPropertyValue(edge + '-color'));
  16539. return result || nodeStyle.getPropertyValue(edge + '-style') !== 'none' && parseFloat(nodeStyle.getPropertyValue(edge + '-width')) > 0 && borderClr.alpha !== 0;
  16540. }, false);
  16541. if (hasBorder) {
  16542. return true;
  16543. }
  16544. var parentStyle = window.getComputedStyle(ancestorNode);
  16545. if (_getFonts(nodeStyle)[0] !== _getFonts(parentStyle)[0]) {
  16546. return true;
  16547. }
  16548. var hasStyle = [ 'text-decoration-line', 'text-decoration-style', 'font-weight', 'font-style', 'font-size' ].reduce(function(result, cssProp) {
  16549. return result || nodeStyle.getPropertyValue(cssProp) !== parentStyle.getPropertyValue(cssProp);
  16550. }, false);
  16551. var tDec = nodeStyle.getPropertyValue('text-decoration');
  16552. if (tDec.split(' ').length < 3) {
  16553. hasStyle = hasStyle || tDec !== parentStyle.getPropertyValue('text-decoration');
  16554. }
  16555. return hasStyle;
  16556. }
  16557. var element_is_distinct_default = elementIsDistinct;
  16558. function getRectStack2(elm) {
  16559. var boundingStack = get_element_stack_default(elm);
  16560. var filteredArr = get_text_element_stack_default(elm);
  16561. if (!filteredArr || filteredArr.length <= 1) {
  16562. return [ boundingStack ];
  16563. }
  16564. if (filteredArr.some(function(stack) {
  16565. return stack === void 0;
  16566. })) {
  16567. return null;
  16568. }
  16569. filteredArr.splice(0, 0, boundingStack);
  16570. return filteredArr;
  16571. }
  16572. var get_rect_stack_default = getRectStack2;
  16573. function filteredRectStack(elm) {
  16574. var rectStack = get_rect_stack_default(elm);
  16575. if (rectStack && rectStack.length === 1) {
  16576. return rectStack[0];
  16577. }
  16578. if (rectStack && rectStack.length > 1) {
  16579. var boundingStack = rectStack.shift();
  16580. var isSame;
  16581. rectStack.forEach(function(rectList, index) {
  16582. if (index === 0) {
  16583. return;
  16584. }
  16585. var rectA = rectStack[index - 1], rectB = rectStack[index];
  16586. isSame = rectA.every(function(element, elementIndex) {
  16587. return element === rectB[elementIndex];
  16588. }) || boundingStack.includes(elm);
  16589. });
  16590. if (!isSame) {
  16591. incomplete_data_default.set('bgColor', 'elmPartiallyObscuring');
  16592. return null;
  16593. }
  16594. return rectStack[0];
  16595. }
  16596. incomplete_data_default.set('bgColor', 'outsideViewport');
  16597. return null;
  16598. }
  16599. var filtered_rect_stack_default = filteredRectStack;
  16600. function clamp(value, min, max) {
  16601. return Math.min(Math.max(min, value), max);
  16602. }
  16603. var blendFunctions = {
  16604. normal: function normal(Cb, Cs) {
  16605. return Cs;
  16606. },
  16607. multiply: function multiply(Cb, Cs) {
  16608. return Cs * Cb;
  16609. },
  16610. screen: function screen(Cb, Cs) {
  16611. return Cb + Cs - Cb * Cs;
  16612. },
  16613. overlay: function overlay(Cb, Cs) {
  16614. return this['hard-light'](Cs, Cb);
  16615. },
  16616. darken: function darken(Cb, Cs) {
  16617. return Math.min(Cb, Cs);
  16618. },
  16619. lighten: function lighten(Cb, Cs) {
  16620. return Math.max(Cb, Cs);
  16621. },
  16622. 'color-dodge': function colorDodge(Cb, Cs) {
  16623. return Cb === 0 ? 0 : Cs === 1 ? 1 : Math.min(1, Cb / (1 - Cs));
  16624. },
  16625. 'color-burn': function colorBurn(Cb, Cs) {
  16626. return Cb === 1 ? 1 : Cs === 0 ? 0 : 1 - Math.min(1, (1 - Cb) / Cs);
  16627. },
  16628. 'hard-light': function hardLight(Cb, Cs) {
  16629. return Cs <= .5 ? this.multiply(Cb, 2 * Cs) : this.screen(Cb, 2 * Cs - 1);
  16630. },
  16631. 'soft-light': function softLight(Cb, Cs) {
  16632. if (Cs <= .5) {
  16633. return Cb - (1 - 2 * Cs) * Cb * (1 - Cb);
  16634. } else {
  16635. var D = Cb <= .25 ? ((16 * Cb - 12) * Cb + 4) * Cb : Math.sqrt(Cb);
  16636. return Cb + (2 * Cs - 1) * (D - Cb);
  16637. }
  16638. },
  16639. difference: function difference(Cb, Cs) {
  16640. return Math.abs(Cb - Cs);
  16641. },
  16642. exclusion: function exclusion(Cb, Cs) {
  16643. return Cb + Cs - 2 * Cb * Cs;
  16644. }
  16645. };
  16646. function simpleAlphaCompositing(Cs, \u03b1s, Cb, \u03b1b, blendMode) {
  16647. return \u03b1s * (1 - \u03b1b) * Cs + \u03b1s * \u03b1b * blendFunctions[blendMode](Cb / 255, Cs / 255) * 255 + (1 - \u03b1s) * \u03b1b * Cb;
  16648. }
  16649. function flattenColors(fgColor, bgColor) {
  16650. var blendMode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'normal';
  16651. var r = simpleAlphaCompositing(fgColor.red, fgColor.alpha, bgColor.red, bgColor.alpha, blendMode);
  16652. var g = simpleAlphaCompositing(fgColor.green, fgColor.alpha, bgColor.green, bgColor.alpha, blendMode);
  16653. var b = simpleAlphaCompositing(fgColor.blue, fgColor.alpha, bgColor.blue, bgColor.alpha, blendMode);
  16654. var \u03b1o = clamp(fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha), 0, 1);
  16655. var Cr = Math.round(r / \u03b1o);
  16656. var Cg = Math.round(g / \u03b1o);
  16657. var Cb = Math.round(b / \u03b1o);
  16658. return new color_default(Cr, Cg, Cb, \u03b1o);
  16659. }
  16660. var flatten_colors_default = flattenColors;
  16661. function flattenColors2(fgColor, bgColor) {
  16662. var alpha = fgColor.alpha;
  16663. var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;
  16664. var g = (1 - alpha) * bgColor.green + alpha * fgColor.green;
  16665. var b = (1 - alpha) * bgColor.blue + alpha * fgColor.blue;
  16666. var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);
  16667. return new color_default(r, g, b, a);
  16668. }
  16669. var flatten_shadow_colors_default = flattenColors2;
  16670. function isInlineDescendant(node, descendant) {
  16671. var CONTAINED_BY = Node.DOCUMENT_POSITION_CONTAINED_BY;
  16672. if (!(node.compareDocumentPosition(descendant) & CONTAINED_BY)) {
  16673. return false;
  16674. }
  16675. var style = window.getComputedStyle(descendant);
  16676. var display = style.getPropertyValue('display');
  16677. if (!display.includes('inline')) {
  16678. return false;
  16679. }
  16680. var position = style.getPropertyValue('position');
  16681. return position === 'static';
  16682. }
  16683. function calculateObscuringElement(elmIndex, elmStack, originalElm) {
  16684. for (var _i20 = elmIndex - 1; _i20 >= 0; _i20--) {
  16685. if (!isInlineDescendant(originalElm, elmStack[_i20])) {
  16686. return true;
  16687. }
  16688. elmStack.splice(_i20, 1);
  16689. }
  16690. return false;
  16691. }
  16692. function sortPageBackground(elmStack) {
  16693. var bodyIndex = elmStack.indexOf(document.body);
  16694. var bgNodes = elmStack;
  16695. var htmlBgColor = get_own_background_color_default(window.getComputedStyle(document.documentElement));
  16696. if (bodyIndex > 1 && htmlBgColor.alpha === 0 && !element_has_image_default(document.documentElement)) {
  16697. if (bodyIndex > 1) {
  16698. bgNodes.splice(bodyIndex, 1);
  16699. bgNodes.push(document.body);
  16700. }
  16701. var htmlIndex = bgNodes.indexOf(document.documentElement);
  16702. if (htmlIndex > 0) {
  16703. bgNodes.splice(htmlIndex, 1);
  16704. bgNodes.push(document.documentElement);
  16705. }
  16706. }
  16707. return bgNodes;
  16708. }
  16709. function getBackgroundStack(elm) {
  16710. var elmStack = filtered_rect_stack_default(elm);
  16711. if (elmStack === null) {
  16712. return null;
  16713. }
  16714. elmStack = reduce_to_elements_below_floating_default(elmStack, elm);
  16715. elmStack = sortPageBackground(elmStack);
  16716. var elmIndex = elmStack.indexOf(elm);
  16717. if (calculateObscuringElement(elmIndex, elmStack, elm)) {
  16718. incomplete_data_default.set('bgColor', 'bgOverlap');
  16719. return null;
  16720. }
  16721. return elmIndex !== -1 ? elmStack : null;
  16722. }
  16723. var get_background_stack_default = getBackgroundStack;
  16724. function getTextShadowColors(node) {
  16725. var _ref55 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref55.minRatio, maxRatio = _ref55.maxRatio;
  16726. var style = window.getComputedStyle(node);
  16727. var textShadow = style.getPropertyValue('text-shadow');
  16728. if (textShadow === 'none') {
  16729. return [];
  16730. }
  16731. var fontSizeStr = style.getPropertyValue('font-size');
  16732. var fontSize = parseInt(fontSizeStr);
  16733. assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
  16734. var shadowColors = [];
  16735. var shadows = parseTextShadows(textShadow);
  16736. shadows.forEach(function(_ref56) {
  16737. var colorStr = _ref56.colorStr, pixels = _ref56.pixels;
  16738. colorStr = colorStr || style.getPropertyValue('color');
  16739. var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
  16740. if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
  16741. var color11 = textShadowColor({
  16742. colorStr: colorStr,
  16743. offsetY: offsetY,
  16744. offsetX: offsetX,
  16745. blurRadius: blurRadius,
  16746. fontSize: fontSize
  16747. });
  16748. shadowColors.push(color11);
  16749. }
  16750. });
  16751. return shadowColors;
  16752. }
  16753. function parseTextShadows(textShadow) {
  16754. var current = {
  16755. pixels: []
  16756. };
  16757. var str = textShadow.trim();
  16758. var shadows = [ current ];
  16759. if (!str) {
  16760. return [];
  16761. }
  16762. while (str) {
  16763. var colorMatch = str.match(/^rgba?\([0-9,.\s]+\)/i) || str.match(/^[a-z]+/i) || str.match(/^#[0-9a-f]+/i);
  16764. var pixelMatch = str.match(/^([0-9.-]+)px/i) || str.match(/^(0)/);
  16765. if (colorMatch) {
  16766. assert_default(!current.colorStr, 'Multiple colors identified in text-shadow: '.concat(textShadow));
  16767. str = str.replace(colorMatch[0], '').trim();
  16768. current.colorStr = colorMatch[0];
  16769. } else if (pixelMatch) {
  16770. assert_default(current.pixels.length < 3, 'Too many pixel units in text-shadow: '.concat(textShadow));
  16771. str = str.replace(pixelMatch[0], '').trim();
  16772. var pixelUnit = parseFloat((pixelMatch[1][0] === '.' ? '0' : '') + pixelMatch[1]);
  16773. current.pixels.push(pixelUnit);
  16774. } else if (str[0] === ',') {
  16775. assert_default(current.pixels.length >= 2, 'Missing pixel value in text-shadow: '.concat(textShadow));
  16776. current = {
  16777. pixels: []
  16778. };
  16779. shadows.push(current);
  16780. str = str.substr(1).trim();
  16781. } else {
  16782. throw new Error('Unable to process text-shadows: '.concat(textShadow));
  16783. }
  16784. }
  16785. return shadows;
  16786. }
  16787. function textShadowColor(_ref57) {
  16788. var colorStr = _ref57.colorStr, offsetX = _ref57.offsetX, offsetY = _ref57.offsetY, blurRadius = _ref57.blurRadius, fontSize = _ref57.fontSize;
  16789. if (offsetX > blurRadius || offsetY > blurRadius) {
  16790. return new color_default(0, 0, 0, 0);
  16791. }
  16792. var shadowColor = new color_default();
  16793. shadowColor.parseString(colorStr);
  16794. shadowColor.alpha *= blurRadiusToAlpha(blurRadius, fontSize);
  16795. return shadowColor;
  16796. }
  16797. function blurRadiusToAlpha(blurRadius, fontSize) {
  16798. if (blurRadius === 0) {
  16799. return 1;
  16800. }
  16801. var relativeBlur = blurRadius / fontSize;
  16802. return .185 / (relativeBlur + .4);
  16803. }
  16804. var get_text_shadow_colors_default = getTextShadowColors;
  16805. function _getBackgroundColor(elm) {
  16806. var _bgColors;
  16807. var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  16808. var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
  16809. var bgColors = get_text_shadow_colors_default(elm, {
  16810. minRatio: shadowOutlineEmMax
  16811. });
  16812. if (bgColors.length) {
  16813. bgColors = [ {
  16814. color: bgColors.reduce(flatten_shadow_colors_default)
  16815. } ];
  16816. }
  16817. var elmStack = get_background_stack_default(elm);
  16818. (elmStack || []).some(function(bgElm) {
  16819. var bgElmStyle = window.getComputedStyle(bgElm);
  16820. var bgColor = get_own_background_color_default(bgElmStyle);
  16821. if (elmPartiallyObscured(elm, bgElm, bgColor) || element_has_image_default(bgElm, bgElmStyle)) {
  16822. bgColors = null;
  16823. bgElms.push(bgElm);
  16824. return true;
  16825. }
  16826. if (bgColor.alpha !== 0) {
  16827. bgElms.push(bgElm);
  16828. var blendMode = bgElmStyle.getPropertyValue('mix-blend-mode');
  16829. bgColors.unshift({
  16830. color: bgColor,
  16831. blendMode: normalizeBlendMode(blendMode)
  16832. });
  16833. return bgColor.alpha === 1;
  16834. } else {
  16835. return false;
  16836. }
  16837. });
  16838. if (bgColors === null || elmStack === null) {
  16839. return null;
  16840. }
  16841. var pageBgs = getPageBackgroundColors(elm, elmStack.includes(document.body));
  16842. (_bgColors = bgColors).unshift.apply(_bgColors, _toConsumableArray(pageBgs));
  16843. if (bgColors.length === 0) {
  16844. return new color_default(255, 255, 255, 1);
  16845. }
  16846. var blendedColor = bgColors.reduce(function(bgColor, fgColor) {
  16847. return flatten_colors_default(fgColor.color, bgColor.color instanceof color_default ? bgColor.color : bgColor, fgColor.blendMode);
  16848. });
  16849. return flatten_colors_default(blendedColor.color instanceof color_default ? blendedColor.color : blendedColor, new color_default(255, 255, 255, 1));
  16850. }
  16851. function elmPartiallyObscured(elm, bgElm, bgColor) {
  16852. var obscured = elm !== bgElm && !_visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
  16853. if (obscured) {
  16854. incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
  16855. }
  16856. return obscured;
  16857. }
  16858. function normalizeBlendMode(blendmode) {
  16859. return !!blendmode ? blendmode : void 0;
  16860. }
  16861. function getPageBackgroundColors(elm, stackContainsBody) {
  16862. var pageColors = [];
  16863. if (!stackContainsBody) {
  16864. var html = document.documentElement;
  16865. var body = document.body;
  16866. var htmlStyle = window.getComputedStyle(html);
  16867. var bodyStyle = window.getComputedStyle(body);
  16868. var htmlBgColor = get_own_background_color_default(htmlStyle);
  16869. var bodyBgColor = get_own_background_color_default(bodyStyle);
  16870. var bodyBgColorApplies = bodyBgColor.alpha !== 0 && _visuallyContains(elm, body);
  16871. if (bodyBgColor.alpha !== 0 && htmlBgColor.alpha === 0 || bodyBgColorApplies && bodyBgColor.alpha !== 1) {
  16872. pageColors.unshift({
  16873. color: bodyBgColor,
  16874. blendMode: normalizeBlendMode(bodyStyle.getPropertyValue('mix-blend-mode'))
  16875. });
  16876. }
  16877. if (htmlBgColor.alpha !== 0 && (!bodyBgColorApplies || bodyBgColorApplies && bodyBgColor.alpha !== 1)) {
  16878. pageColors.unshift({
  16879. color: htmlBgColor,
  16880. blendMode: normalizeBlendMode(htmlStyle.getPropertyValue('mix-blend-mode'))
  16881. });
  16882. }
  16883. }
  16884. return pageColors;
  16885. }
  16886. function getContrast(bgColor, fgColor) {
  16887. if (!fgColor || !bgColor) {
  16888. return null;
  16889. }
  16890. if (fgColor.alpha < 1) {
  16891. fgColor = flatten_colors_default(fgColor, bgColor);
  16892. }
  16893. var bL = bgColor.getRelativeLuminance();
  16894. var fL = fgColor.getRelativeLuminance();
  16895. return (Math.max(fL, bL) + .05) / (Math.min(fL, bL) + .05);
  16896. }
  16897. var get_contrast_default = getContrast;
  16898. function getOpacity(node) {
  16899. if (!node) {
  16900. return 1;
  16901. }
  16902. var vNode = get_node_from_tree_default(node);
  16903. if (vNode && vNode._opacity !== void 0 && vNode._opacity !== null) {
  16904. return vNode._opacity;
  16905. }
  16906. var nodeStyle = window.getComputedStyle(node);
  16907. var opacity = nodeStyle.getPropertyValue('opacity');
  16908. var finalOpacity = opacity * getOpacity(node.parentElement);
  16909. if (vNode) {
  16910. vNode._opacity = finalOpacity;
  16911. }
  16912. return finalOpacity;
  16913. }
  16914. function getForegroundColor(node, _, bgColor) {
  16915. var nodeStyle = window.getComputedStyle(node);
  16916. var fgColor = new color_default();
  16917. fgColor.parseString(nodeStyle.getPropertyValue('color'));
  16918. var opacity = getOpacity(node);
  16919. fgColor.alpha = fgColor.alpha * opacity;
  16920. if (fgColor.alpha === 1) {
  16921. return fgColor;
  16922. }
  16923. if (!bgColor) {
  16924. bgColor = _getBackgroundColor(node, []);
  16925. }
  16926. if (bgColor === null) {
  16927. var reason = incomplete_data_default.get('bgColor');
  16928. incomplete_data_default.set('fgColor', reason);
  16929. return null;
  16930. }
  16931. if (fgColor.alpha < 1) {
  16932. var textShadowColors = get_text_shadow_colors_default(node, {
  16933. minRatio: 0
  16934. });
  16935. return [ fgColor ].concat(_toConsumableArray(textShadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
  16936. }
  16937. return flatten_colors_default(fgColor, bgColor);
  16938. }
  16939. var get_foreground_color_default = getForegroundColor;
  16940. function hasValidContrastRatio(bg, fg, fontSize, isBold) {
  16941. var contrast = get_contrast_default(bg, fg);
  16942. var isSmallFont = isBold && Math.ceil(fontSize * 72) / 96 < 14 || !isBold && Math.ceil(fontSize * 72) / 96 < 18;
  16943. var expectedContrastRatio = isSmallFont ? 4.5 : 3;
  16944. return {
  16945. isValid: contrast > expectedContrastRatio,
  16946. contrastRatio: contrast,
  16947. expectedContrastRatio: expectedContrastRatio
  16948. };
  16949. }
  16950. var has_valid_contrast_ratio_default = hasValidContrastRatio;
  16951. function colorContrastEvaluate(node, options, virtualNode) {
  16952. var ignoreUnicode = options.ignoreUnicode, ignoreLength = options.ignoreLength, ignorePseudo = options.ignorePseudo, boldValue = options.boldValue, boldTextPt = options.boldTextPt, largeTextPt = options.largeTextPt, contrastRatio = options.contrastRatio, shadowOutlineEmMax = options.shadowOutlineEmMax, pseudoSizeThreshold = options.pseudoSizeThreshold;
  16953. if (!is_visible_default(node, false)) {
  16954. this.data({
  16955. messageKey: 'hidden'
  16956. });
  16957. return true;
  16958. }
  16959. var visibleText = visible_virtual_default(virtualNode, false, true);
  16960. if (ignoreUnicode && textIsEmojis(visibleText)) {
  16961. this.data({
  16962. messageKey: 'nonBmp'
  16963. });
  16964. return void 0;
  16965. }
  16966. var nodeStyle = window.getComputedStyle(node);
  16967. var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size'));
  16968. var fontWeight = nodeStyle.getPropertyValue('font-weight');
  16969. var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
  16970. var ptSize = Math.ceil(fontSize * 72) / 96;
  16971. var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
  16972. var _ref58 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref58.expected, minThreshold = _ref58.minThreshold, maxThreshold = _ref58.maxThreshold;
  16973. var pseudoElm = findPseudoElement(virtualNode, {
  16974. ignorePseudo: ignorePseudo,
  16975. pseudoSizeThreshold: pseudoSizeThreshold
  16976. });
  16977. if (pseudoElm) {
  16978. this.data({
  16979. fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),
  16980. fontWeight: bold ? 'bold' : 'normal',
  16981. messageKey: 'pseudoContent',
  16982. expectedContrastRatio: expected + ':1'
  16983. });
  16984. this.relatedNodes(pseudoElm.actualNode);
  16985. return void 0;
  16986. }
  16987. var bgNodes = [];
  16988. var bgColor = _getBackgroundColor(node, bgNodes, shadowOutlineEmMax);
  16989. var fgColor = get_foreground_color_default(node, false, bgColor);
  16990. var shadowColors = get_text_shadow_colors_default(node, {
  16991. minRatio: .001,
  16992. maxRatio: shadowOutlineEmMax
  16993. });
  16994. var contrast = null;
  16995. var contrastContributor = null;
  16996. var shadowColor = null;
  16997. if (shadowColors.length === 0) {
  16998. contrast = get_contrast_default(bgColor, fgColor);
  16999. } else if (fgColor && bgColor) {
  17000. shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_shadow_colors_default);
  17001. var fgBgContrast = get_contrast_default(bgColor, fgColor);
  17002. var bgShContrast = get_contrast_default(bgColor, shadowColor);
  17003. var fgShContrast = get_contrast_default(shadowColor, fgColor);
  17004. contrast = Math.max(fgBgContrast, bgShContrast, fgShContrast);
  17005. if (contrast !== fgBgContrast) {
  17006. contrastContributor = bgShContrast > fgShContrast ? 'shadowOnBgColor' : 'fgOnShadowColor';
  17007. }
  17008. }
  17009. var isValid = contrast > expected;
  17010. if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
  17011. this.data({
  17012. contrastRatio: contrast
  17013. });
  17014. return true;
  17015. }
  17016. var truncatedResult = Math.floor(contrast * 100) / 100;
  17017. var missing;
  17018. if (bgColor === null) {
  17019. missing = incomplete_data_default.get('bgColor');
  17020. } else if (!isValid) {
  17021. missing = contrastContributor;
  17022. }
  17023. var equalRatio = truncatedResult === 1;
  17024. var shortTextContent = visibleText.length === 1;
  17025. if (equalRatio) {
  17026. missing = incomplete_data_default.set('bgColor', 'equalRatio');
  17027. } else if (!isValid && shortTextContent && !ignoreLength) {
  17028. missing = 'shortTextContent';
  17029. }
  17030. this.data({
  17031. fgColor: fgColor ? fgColor.toHexString() : void 0,
  17032. bgColor: bgColor ? bgColor.toHexString() : void 0,
  17033. contrastRatio: truncatedResult,
  17034. fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),
  17035. fontWeight: bold ? 'bold' : 'normal',
  17036. messageKey: missing,
  17037. expectedContrastRatio: expected + ':1',
  17038. shadowColor: shadowColor ? shadowColor.toHexString() : void 0
  17039. });
  17040. if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !ignoreLength && !isValid) {
  17041. missing = null;
  17042. incomplete_data_default.clear();
  17043. this.relatedNodes(bgNodes);
  17044. return void 0;
  17045. }
  17046. if (!isValid) {
  17047. this.relatedNodes(bgNodes);
  17048. }
  17049. return isValid;
  17050. }
  17051. function findPseudoElement(vNode, _ref59) {
  17052. var _ref59$pseudoSizeThre = _ref59.pseudoSizeThreshold, pseudoSizeThreshold = _ref59$pseudoSizeThre === void 0 ? .25 : _ref59$pseudoSizeThre, _ref59$ignorePseudo = _ref59.ignorePseudo, ignorePseudo = _ref59$ignorePseudo === void 0 ? false : _ref59$ignorePseudo;
  17053. if (ignorePseudo) {
  17054. return;
  17055. }
  17056. var rect = vNode.boundingClientRect;
  17057. var minimumSize = rect.width * rect.height * pseudoSizeThreshold;
  17058. do {
  17059. var beforeSize = getPseudoElementArea(vNode.actualNode, ':before');
  17060. var afterSize = getPseudoElementArea(vNode.actualNode, ':after');
  17061. if (beforeSize + afterSize > minimumSize) {
  17062. return vNode;
  17063. }
  17064. } while (vNode = vNode.parent);
  17065. }
  17066. var getPseudoElementArea = memoize_default(function getPseudoElementArea2(node, pseudo) {
  17067. var style = window.getComputedStyle(node, pseudo);
  17068. var matchPseudoStyle = function matchPseudoStyle(prop, value) {
  17069. return style.getPropertyValue(prop) === value;
  17070. };
  17071. if (matchPseudoStyle('content', 'none') || matchPseudoStyle('display', 'none') || matchPseudoStyle('visibility', 'hidden') || matchPseudoStyle('position', 'absolute') === false) {
  17072. return 0;
  17073. }
  17074. if (get_own_background_color_default(style).alpha === 0 && matchPseudoStyle('background-image', 'none')) {
  17075. return 0;
  17076. }
  17077. var pseudoWidth = parseUnit(style.getPropertyValue('width'));
  17078. var pseudoHeight = parseUnit(style.getPropertyValue('height'));
  17079. if (pseudoWidth.unit !== 'px' || pseudoHeight.unit !== 'px') {
  17080. return pseudoWidth.value === 0 || pseudoHeight.value === 0 ? 0 : Infinity;
  17081. }
  17082. return pseudoWidth.value * pseudoHeight.value;
  17083. });
  17084. function textIsEmojis(visibleText) {
  17085. var options = {
  17086. nonBmp: true
  17087. };
  17088. var hasUnicodeChars = has_unicode_default(visibleText, options);
  17089. var hasNonUnicodeChars = sanitize_default(remove_unicode_default(visibleText, options)) === '';
  17090. return hasUnicodeChars && hasNonUnicodeChars;
  17091. }
  17092. function parseUnit(str) {
  17093. var unitRegex = /^([0-9.]+)([a-z]+)$/i;
  17094. var _ref60 = str.match(unitRegex) || [], _ref61 = _slicedToArray(_ref60, 3), _ref61$ = _ref61[1], value = _ref61$ === void 0 ? '' : _ref61$, _ref61$2 = _ref61[2], unit = _ref61$2 === void 0 ? '' : _ref61$2;
  17095. return {
  17096. value: parseFloat(value),
  17097. unit: unit.toLowerCase()
  17098. };
  17099. }
  17100. function getContrast2(color1, color22) {
  17101. var c1lum = color1.getRelativeLuminance();
  17102. var c2lum = color22.getRelativeLuminance();
  17103. return (Math.max(c1lum, c2lum) + .05) / (Math.min(c1lum, c2lum) + .05);
  17104. }
  17105. var blockLike2 = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];
  17106. function isBlock2(elm) {
  17107. var display = window.getComputedStyle(elm).getPropertyValue('display');
  17108. return blockLike2.indexOf(display) !== -1 || display.substr(0, 6) === 'table-';
  17109. }
  17110. function linkInTextBlockEvaluate(node) {
  17111. if (isBlock2(node)) {
  17112. return false;
  17113. }
  17114. var parentBlock = get_composed_parent_default(node);
  17115. while (parentBlock.nodeType === 1 && !isBlock2(parentBlock)) {
  17116. parentBlock = get_composed_parent_default(parentBlock);
  17117. }
  17118. this.relatedNodes([ parentBlock ]);
  17119. if (element_is_distinct_default(node, parentBlock)) {
  17120. return true;
  17121. } else {
  17122. var nodeColor, parentColor;
  17123. nodeColor = get_foreground_color_default(node);
  17124. parentColor = get_foreground_color_default(parentBlock);
  17125. if (!nodeColor || !parentColor) {
  17126. return void 0;
  17127. }
  17128. var contrast = getContrast2(nodeColor, parentColor);
  17129. if (contrast === 1) {
  17130. return true;
  17131. } else if (contrast >= 3) {
  17132. incomplete_data_default.set('fgColor', 'bgContrast');
  17133. this.data({
  17134. messageKey: incomplete_data_default.get('fgColor')
  17135. });
  17136. incomplete_data_default.clear();
  17137. return void 0;
  17138. }
  17139. nodeColor = _getBackgroundColor(node);
  17140. parentColor = _getBackgroundColor(parentBlock);
  17141. if (!nodeColor || !parentColor || getContrast2(nodeColor, parentColor) >= 3) {
  17142. var reason;
  17143. if (!nodeColor || !parentColor) {
  17144. reason = incomplete_data_default.get('bgColor');
  17145. } else {
  17146. reason = 'bgContrast';
  17147. }
  17148. incomplete_data_default.set('fgColor', reason);
  17149. this.data({
  17150. messageKey: incomplete_data_default.get('fgColor')
  17151. });
  17152. incomplete_data_default.clear();
  17153. return void 0;
  17154. }
  17155. }
  17156. return false;
  17157. }
  17158. var link_in_text_block_evaluate_default = linkInTextBlockEvaluate;
  17159. function autocompleteAppropriateEvaluate(node, options, virtualNode) {
  17160. if (virtualNode.props.nodeName !== 'input') {
  17161. return true;
  17162. }
  17163. var number = [ 'text', 'search', 'number', 'tel' ];
  17164. var url = [ 'text', 'search', 'url' ];
  17165. var allowedTypesMap = {
  17166. bday: [ 'text', 'search', 'date' ],
  17167. email: [ 'text', 'search', 'email' ],
  17168. username: [ 'text', 'search', 'email' ],
  17169. 'street-address': [ 'text' ],
  17170. tel: [ 'text', 'search', 'tel' ],
  17171. 'tel-country-code': [ 'text', 'search', 'tel' ],
  17172. 'tel-national': [ 'text', 'search', 'tel' ],
  17173. 'tel-area-code': [ 'text', 'search', 'tel' ],
  17174. 'tel-local': [ 'text', 'search', 'tel' ],
  17175. 'tel-local-prefix': [ 'text', 'search', 'tel' ],
  17176. 'tel-local-suffix': [ 'text', 'search', 'tel' ],
  17177. 'tel-extension': [ 'text', 'search', 'tel' ],
  17178. 'cc-number': number,
  17179. 'cc-exp': [ 'text', 'search', 'month', 'tel' ],
  17180. 'cc-exp-month': number,
  17181. 'cc-exp-year': number,
  17182. 'cc-csc': number,
  17183. 'transaction-amount': number,
  17184. 'bday-day': number,
  17185. 'bday-month': number,
  17186. 'bday-year': number,
  17187. 'new-password': [ 'text', 'search', 'password' ],
  17188. 'current-password': [ 'text', 'search', 'password' ],
  17189. url: url,
  17190. photo: url,
  17191. impp: url
  17192. };
  17193. if (_typeof(options) === 'object') {
  17194. Object.keys(options).forEach(function(key) {
  17195. if (!allowedTypesMap[key]) {
  17196. allowedTypesMap[key] = [];
  17197. }
  17198. allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]);
  17199. });
  17200. }
  17201. var autocompleteAttr = virtualNode.attr('autocomplete');
  17202. var autocompleteTerms = autocompleteAttr.split(/\s+/g).map(function(term) {
  17203. return term.toLowerCase();
  17204. });
  17205. var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
  17206. if (_autocomplete.stateTerms.includes(purposeTerm)) {
  17207. return true;
  17208. }
  17209. var allowedTypes = allowedTypesMap[purposeTerm];
  17210. var type = virtualNode.hasAttr('type') ? sanitize_default(virtualNode.attr('type')).toLowerCase() : 'text';
  17211. type = valid_input_type_default().includes(type) ? type : 'text';
  17212. if (typeof allowedTypes === 'undefined') {
  17213. return type === 'text';
  17214. }
  17215. return allowedTypes.includes(type);
  17216. }
  17217. var autocomplete_appropriate_evaluate_default = autocompleteAppropriateEvaluate;
  17218. function autocompleteValidEvaluate(node, options, virtualNode) {
  17219. var autocomplete2 = virtualNode.attr('autocomplete') || '';
  17220. return is_valid_autocomplete_default(autocomplete2, options);
  17221. }
  17222. var autocomplete_valid_evaluate_default = autocompleteValidEvaluate;
  17223. function attrNonSpaceContentEvaluate(node) {
  17224. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17225. var vNode = arguments.length > 2 ? arguments[2] : undefined;
  17226. if (!options.attribute || typeof options.attribute !== 'string') {
  17227. throw new TypeError('attr-non-space-content requires options.attribute to be a string');
  17228. }
  17229. if (!vNode.hasAttr(options.attribute)) {
  17230. this.data({
  17231. messageKey: 'noAttr'
  17232. });
  17233. return false;
  17234. }
  17235. var attribute = vNode.attr(options.attribute);
  17236. var attributeIsEmpty = !sanitize_default(attribute);
  17237. if (attributeIsEmpty) {
  17238. this.data({
  17239. messageKey: 'emptyAttr'
  17240. });
  17241. return false;
  17242. }
  17243. return true;
  17244. }
  17245. var attr_non_space_content_evaluate_default = attrNonSpaceContentEvaluate;
  17246. function pageHasElmAfter(results) {
  17247. var elmUsedAnywhere = results.some(function(frameResult) {
  17248. return frameResult.result === true;
  17249. });
  17250. if (elmUsedAnywhere) {
  17251. results.forEach(function(result) {
  17252. result.result = true;
  17253. });
  17254. }
  17255. return results;
  17256. }
  17257. var has_descendant_after_default = pageHasElmAfter;
  17258. function hasDescendant(node, options, virtualNode) {
  17259. if (!options || !options.selector || typeof options.selector !== 'string') {
  17260. throw new TypeError('has-descendant requires options.selector to be a string');
  17261. }
  17262. var matchingElms = query_selector_all_filter_default(virtualNode, options.selector, function(vNode) {
  17263. return is_visible_default(vNode.actualNode, true);
  17264. });
  17265. this.relatedNodes(matchingElms.map(function(vNode) {
  17266. return vNode.actualNode;
  17267. }));
  17268. return matchingElms.length > 0;
  17269. }
  17270. var has_descendant_evaluate_default = hasDescendant;
  17271. function hasTextContentEvaluate(node, options, virtualNode) {
  17272. try {
  17273. return sanitize_default(subtree_text_default(virtualNode)) !== '';
  17274. } catch (e) {
  17275. return void 0;
  17276. }
  17277. }
  17278. var has_text_content_evaluate_default = hasTextContentEvaluate;
  17279. function matchesDefinitionEvaluate(_, options, virtualNode) {
  17280. return matches_default3(virtualNode, options.matcher);
  17281. }
  17282. var matches_definition_evaluate_default = matchesDefinitionEvaluate;
  17283. function pageNoDuplicateAfter(results) {
  17284. return results.filter(function(checkResult) {
  17285. return checkResult.data !== 'ignored';
  17286. });
  17287. }
  17288. var page_no_duplicate_after_default = pageNoDuplicateAfter;
  17289. function pageNoDuplicateEvaluate(node, options, virtualNode) {
  17290. if (!options || !options.selector || typeof options.selector !== 'string') {
  17291. throw new TypeError('page-no-duplicate requires options.selector to be a string');
  17292. }
  17293. var key = 'page-no-duplicate;' + options.selector;
  17294. if (cache_default.get(key)) {
  17295. this.data('ignored');
  17296. return;
  17297. }
  17298. cache_default.set(key, true);
  17299. var elms = query_selector_all_filter_default(axe._tree[0], options.selector, function(elm) {
  17300. return is_visible_default(elm.actualNode, true);
  17301. });
  17302. if (typeof options.nativeScopeFilter === 'string') {
  17303. elms = elms.filter(function(elm) {
  17304. return elm.actualNode.hasAttribute('role') || !find_up_virtual_default(elm, options.nativeScopeFilter);
  17305. });
  17306. }
  17307. this.relatedNodes(elms.filter(function(elm) {
  17308. return elm !== virtualNode;
  17309. }).map(function(elm) {
  17310. return elm.actualNode;
  17311. }));
  17312. return elms.length <= 1;
  17313. }
  17314. var page_no_duplicate_evaluate_default = pageNoDuplicateEvaluate;
  17315. function accesskeysAfter(results) {
  17316. var seen = {};
  17317. return results.filter(function(r) {
  17318. if (!r.data) {
  17319. return false;
  17320. }
  17321. var key = r.data.toUpperCase();
  17322. if (!seen[key]) {
  17323. seen[key] = r;
  17324. r.relatedNodes = [];
  17325. return true;
  17326. }
  17327. seen[key].relatedNodes.push(r.relatedNodes[0]);
  17328. return false;
  17329. }).map(function(r) {
  17330. r.result = !!r.relatedNodes.length;
  17331. return r;
  17332. });
  17333. }
  17334. var accesskeys_after_default = accesskeysAfter;
  17335. function accesskeysEvaluate(node) {
  17336. if (is_visible_default(node, false)) {
  17337. this.data(node.getAttribute('accesskey'));
  17338. this.relatedNodes([ node ]);
  17339. }
  17340. return true;
  17341. }
  17342. var accesskeys_evaluate_default = accesskeysEvaluate;
  17343. function focusableContentEvaluate(node, options, virtualNode) {
  17344. var tabbableElements = virtualNode.tabbableElements;
  17345. if (!tabbableElements) {
  17346. return false;
  17347. }
  17348. var tabbableContentElements = tabbableElements.filter(function(el) {
  17349. return el !== virtualNode;
  17350. });
  17351. return tabbableContentElements.length > 0;
  17352. }
  17353. var focusable_content_evaluate_default = focusableContentEvaluate;
  17354. function focusableDisabledEvaluate(node, options, virtualNode) {
  17355. var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];
  17356. var tabbableElements = virtualNode.tabbableElements;
  17357. if (!tabbableElements || !tabbableElements.length) {
  17358. return true;
  17359. }
  17360. var relatedNodes = tabbableElements.reduce(function(out, _ref62) {
  17361. var el = _ref62.actualNode;
  17362. var nodeName2 = el.nodeName.toUpperCase();
  17363. if (elementsThatCanBeDisabled.includes(nodeName2)) {
  17364. out.push(el);
  17365. }
  17366. return out;
  17367. }, []);
  17368. this.relatedNodes(relatedNodes);
  17369. if (relatedNodes.length === 0 || is_modal_open_default()) {
  17370. return true;
  17371. }
  17372. return relatedNodes.every(function(related) {
  17373. return related.onfocus;
  17374. }) ? void 0 : false;
  17375. }
  17376. var focusable_disabled_evaluate_default = focusableDisabledEvaluate;
  17377. function focusableElementEvaluate(node, options, virtualNode) {
  17378. if (virtualNode.hasAttr('contenteditable') && isContenteditable(virtualNode)) {
  17379. return true;
  17380. }
  17381. var isFocusable2 = virtualNode.isFocusable;
  17382. var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
  17383. tabIndex = !isNaN(tabIndex) ? tabIndex : null;
  17384. return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2;
  17385. function isContenteditable(vNode) {
  17386. var contenteditable = vNode.attr('contenteditable');
  17387. if (contenteditable === 'true' || contenteditable === '') {
  17388. return true;
  17389. }
  17390. if (contenteditable === 'false') {
  17391. return false;
  17392. }
  17393. var ancestor = closest_default(virtualNode.parent, '[contenteditable]');
  17394. if (!ancestor) {
  17395. return false;
  17396. }
  17397. return isContenteditable(ancestor);
  17398. }
  17399. }
  17400. var focusable_element_evaluate_default = focusableElementEvaluate;
  17401. function focusableModalOpenEvaluate(node, options, virtualNode) {
  17402. var tabbableElements = virtualNode.tabbableElements.map(function(_ref63) {
  17403. var actualNode = _ref63.actualNode;
  17404. return actualNode;
  17405. });
  17406. if (!tabbableElements || !tabbableElements.length) {
  17407. return true;
  17408. }
  17409. if (is_modal_open_default()) {
  17410. this.relatedNodes(tabbableElements);
  17411. return void 0;
  17412. }
  17413. return true;
  17414. }
  17415. var focusable_modal_open_evaluate_default = focusableModalOpenEvaluate;
  17416. function focusableNoNameEvaluate(node, options, virtualNode) {
  17417. var tabIndex = virtualNode.attr('tabindex');
  17418. var inFocusOrder = is_focusable_default(virtualNode) && tabIndex > -1;
  17419. if (!inFocusOrder) {
  17420. return false;
  17421. }
  17422. try {
  17423. return !accessible_text_virtual_default(virtualNode);
  17424. } catch (e) {
  17425. return void 0;
  17426. }
  17427. }
  17428. var focusable_no_name_evaluate_default = focusableNoNameEvaluate;
  17429. function focusableNotTabbableEvaluate(node, options, virtualNode) {
  17430. var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];
  17431. var tabbableElements = virtualNode.tabbableElements;
  17432. if (!tabbableElements || !tabbableElements.length) {
  17433. return true;
  17434. }
  17435. var relatedNodes = tabbableElements.reduce(function(out, _ref64) {
  17436. var el = _ref64.actualNode;
  17437. var nodeName2 = el.nodeName.toUpperCase();
  17438. if (!elementsThatCanBeDisabled.includes(nodeName2)) {
  17439. out.push(el);
  17440. }
  17441. return out;
  17442. }, []);
  17443. this.relatedNodes(relatedNodes);
  17444. if (relatedNodes.length === 0 || is_modal_open_default()) {
  17445. return true;
  17446. }
  17447. return relatedNodes.every(function(related) {
  17448. return related.onfocus;
  17449. }) ? void 0 : false;
  17450. }
  17451. var focusable_not_tabbable_evaluate_default = focusableNotTabbableEvaluate;
  17452. function focusableDescendants(vNode) {
  17453. if (is_focusable_default(vNode)) {
  17454. return true;
  17455. }
  17456. if (!vNode.children) {
  17457. if (vNode.props.nodeType === 1) {
  17458. throw new Error('Cannot determine children');
  17459. }
  17460. return false;
  17461. }
  17462. return vNode.children.some(function(child) {
  17463. return focusableDescendants(child);
  17464. });
  17465. }
  17466. function frameFocusableContentEvaluate(node, options, virtualNode) {
  17467. if (!virtualNode.children) {
  17468. return void 0;
  17469. }
  17470. try {
  17471. return !virtualNode.children.some(function(child) {
  17472. return focusableDescendants(child);
  17473. });
  17474. } catch (e) {
  17475. return void 0;
  17476. }
  17477. }
  17478. var frame_focusable_content_evaluate_default = frameFocusableContentEvaluate;
  17479. function landmarkIsTopLevelEvaluate(node) {
  17480. var landmarks = get_aria_roles_by_type_default('landmark');
  17481. var parent = get_composed_parent_default(node);
  17482. var nodeRole = get_role_default(node);
  17483. this.data({
  17484. role: nodeRole
  17485. });
  17486. while (parent) {
  17487. var role = parent.getAttribute('role');
  17488. if (!role && parent.nodeName.toUpperCase() !== 'FORM') {
  17489. role = implicit_role_default(parent);
  17490. }
  17491. if (role && landmarks.includes(role) && !(role === 'main' && nodeRole === 'complementary')) {
  17492. return false;
  17493. }
  17494. parent = get_composed_parent_default(parent);
  17495. }
  17496. return true;
  17497. }
  17498. var landmark_is_top_level_evaluate_default = landmarkIsTopLevelEvaluate;
  17499. function noFocusableContentEvaluate(node, options, virtualNode) {
  17500. if (!virtualNode.children) {
  17501. return void 0;
  17502. }
  17503. try {
  17504. var focusableDescendants2 = getFocusableDescendants(virtualNode);
  17505. if (!focusableDescendants2.length) {
  17506. return true;
  17507. }
  17508. var notHiddenElements = focusableDescendants2.filter(usesUnreliableHidingStrategy);
  17509. if (notHiddenElements.length > 0) {
  17510. this.data({
  17511. messageKey: 'notHidden'
  17512. });
  17513. this.relatedNodes(notHiddenElements);
  17514. } else {
  17515. this.relatedNodes(focusableDescendants2);
  17516. }
  17517. return false;
  17518. } catch (e) {
  17519. return void 0;
  17520. }
  17521. }
  17522. function getFocusableDescendants(vNode) {
  17523. if (!vNode.children) {
  17524. if (vNode.props.nodeType === 1) {
  17525. throw new Error('Cannot determine children');
  17526. }
  17527. return [];
  17528. }
  17529. var retVal = [];
  17530. vNode.children.forEach(function(child) {
  17531. var role = get_role_default(child);
  17532. if (get_role_type_default(role) === 'widget' && is_focusable_default(child)) {
  17533. retVal.push(child);
  17534. } else {
  17535. retVal.push.apply(retVal, _toConsumableArray(getFocusableDescendants(child)));
  17536. }
  17537. });
  17538. return retVal;
  17539. }
  17540. function usesUnreliableHidingStrategy(vNode) {
  17541. var tabIndex = parseInt(vNode.attr('tabindex'), 10);
  17542. return !isNaN(tabIndex) && tabIndex < 0;
  17543. }
  17544. function tabindexEvaluate(node, options, virtualNode) {
  17545. var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
  17546. return isNaN(tabIndex) ? true : tabIndex <= 0;
  17547. }
  17548. var tabindex_evaluate_default = tabindexEvaluate;
  17549. function altSpaceValueEvaluate(node, options, virtualNode) {
  17550. var alt = virtualNode.attr('alt');
  17551. var isOnlySpace = /^\s+$/;
  17552. return typeof alt === 'string' && isOnlySpace.test(alt);
  17553. }
  17554. var alt_space_value_evaluate_default = altSpaceValueEvaluate;
  17555. function duplicateImgLabelEvaluate(node, options, virtualNode) {
  17556. if ([ 'none', 'presentation' ].includes(get_role_default(virtualNode))) {
  17557. return false;
  17558. }
  17559. var parentVNode = closest_default(virtualNode, options.parentSelector);
  17560. if (!parentVNode) {
  17561. return false;
  17562. }
  17563. var visibleText = visible_virtual_default(parentVNode, true).toLowerCase();
  17564. if (visibleText === '') {
  17565. return false;
  17566. }
  17567. return visibleText === accessible_text_virtual_default(virtualNode).toLowerCase();
  17568. }
  17569. var duplicate_img_label_evaluate_default = duplicateImgLabelEvaluate;
  17570. function explicitEvaluate(node, options, virtualNode) {
  17571. if (virtualNode.attr('id')) {
  17572. if (!virtualNode.actualNode) {
  17573. return void 0;
  17574. }
  17575. var root = get_root_node_default2(virtualNode.actualNode);
  17576. var id = escape_selector_default(virtualNode.attr('id'));
  17577. var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
  17578. if (labels.length) {
  17579. try {
  17580. return labels.some(function(label5) {
  17581. if (!is_visible_default(label5)) {
  17582. return true;
  17583. } else {
  17584. return !!accessible_text_default(label5);
  17585. }
  17586. });
  17587. } catch (e) {
  17588. return void 0;
  17589. }
  17590. }
  17591. }
  17592. return false;
  17593. }
  17594. var explicit_evaluate_default = explicitEvaluate;
  17595. function helpSameAsLabelEvaluate(node, options, virtualNode) {
  17596. var labelText2 = label_virtual_default2(virtualNode), check4 = node.getAttribute('title');
  17597. if (!labelText2) {
  17598. return false;
  17599. }
  17600. if (!check4) {
  17601. check4 = '';
  17602. if (node.getAttribute('aria-describedby')) {
  17603. var ref = idrefs_default(node, 'aria-describedby');
  17604. check4 = ref.map(function(thing) {
  17605. return thing ? accessible_text_default(thing) : '';
  17606. }).join('');
  17607. }
  17608. }
  17609. return sanitize_default(check4) === sanitize_default(labelText2);
  17610. }
  17611. var help_same_as_label_evaluate_default = helpSameAsLabelEvaluate;
  17612. function hiddenExplicitLabelEvaluate(node, options, virtualNode) {
  17613. if (virtualNode.hasAttr('id')) {
  17614. if (!virtualNode.actualNode) {
  17615. return void 0;
  17616. }
  17617. var root = get_root_node_default2(node);
  17618. var id = escape_selector_default(node.getAttribute('id'));
  17619. var label5 = root.querySelector('label[for="'.concat(id, '"]'));
  17620. if (label5 && !is_visible_default(label5, true)) {
  17621. var name;
  17622. try {
  17623. name = accessible_text_virtual_default(virtualNode).trim();
  17624. } catch (e) {
  17625. return void 0;
  17626. }
  17627. var isNameEmpty = name === '';
  17628. return isNameEmpty;
  17629. }
  17630. }
  17631. return false;
  17632. }
  17633. var hidden_explicit_label_evaluate_default = hiddenExplicitLabelEvaluate;
  17634. function implicitEvaluate(node, options, virtualNode) {
  17635. try {
  17636. var label5 = closest_default(virtualNode, 'label');
  17637. if (label5) {
  17638. return !!accessible_text_virtual_default(label5, {
  17639. inControlContext: true
  17640. });
  17641. }
  17642. return false;
  17643. } catch (e) {
  17644. return void 0;
  17645. }
  17646. }
  17647. var implicit_evaluate_default = implicitEvaluate;
  17648. function isStringContained(compare, compareWith) {
  17649. var curatedCompareWith = curateString(compareWith);
  17650. var curatedCompare = curateString(compare);
  17651. if (!curatedCompareWith || !curatedCompare) {
  17652. return false;
  17653. }
  17654. return curatedCompareWith.includes(curatedCompare);
  17655. }
  17656. function curateString(str) {
  17657. var noUnicodeStr = remove_unicode_default(str, {
  17658. emoji: true,
  17659. nonBmp: true,
  17660. punctuations: true
  17661. });
  17662. return sanitize_default(noUnicodeStr);
  17663. }
  17664. function labelContentNameMismatchEvaluate(node, options, virtualNode) {
  17665. var _ref65 = options || {}, pixelThreshold = _ref65.pixelThreshold, occuranceThreshold = _ref65.occuranceThreshold;
  17666. var accText = accessible_text_default(node).toLowerCase();
  17667. if (is_human_interpretable_default(accText) < 1) {
  17668. return void 0;
  17669. }
  17670. var visibleText = sanitize_default(subtree_text_default(virtualNode, {
  17671. subtreeDescendant: true,
  17672. ignoreIconLigature: true,
  17673. pixelThreshold: pixelThreshold,
  17674. occuranceThreshold: occuranceThreshold
  17675. })).toLowerCase();
  17676. if (!visibleText) {
  17677. return true;
  17678. }
  17679. if (is_human_interpretable_default(visibleText) < 1) {
  17680. if (isStringContained(visibleText, accText)) {
  17681. return true;
  17682. }
  17683. return void 0;
  17684. }
  17685. return isStringContained(visibleText, accText);
  17686. }
  17687. var label_content_name_mismatch_evaluate_default = labelContentNameMismatchEvaluate;
  17688. function multipleLabelEvaluate(node) {
  17689. var id = escape_selector_default(node.getAttribute('id'));
  17690. var parent = node.parentNode;
  17691. var root = get_root_node_default2(node);
  17692. root = root.documentElement || root;
  17693. var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
  17694. if (labels.length) {
  17695. labels = labels.filter(function(label5) {
  17696. return is_visible_default(label5);
  17697. });
  17698. }
  17699. while (parent) {
  17700. if (parent.nodeName.toUpperCase() === 'LABEL' && labels.indexOf(parent) === -1) {
  17701. labels.push(parent);
  17702. }
  17703. parent = parent.parentNode;
  17704. }
  17705. this.relatedNodes(labels);
  17706. if (labels.length > 1) {
  17707. var ATVisibleLabels = labels.filter(function(label5) {
  17708. return is_visible_default(label5, true);
  17709. });
  17710. if (ATVisibleLabels.length > 1) {
  17711. return void 0;
  17712. }
  17713. var labelledby = idrefs_default(node, 'aria-labelledby');
  17714. return !labelledby.includes(ATVisibleLabels[0]) ? void 0 : false;
  17715. }
  17716. return false;
  17717. }
  17718. var multiple_label_evaluate_default = multipleLabelEvaluate;
  17719. function titleOnlyEvaluate(node, options, virtualNode) {
  17720. var labelText2 = label_virtual_default2(virtualNode);
  17721. var title = title_text_default(virtualNode);
  17722. var ariaDescribedBy = virtualNode.attr('aria-describedby');
  17723. return !labelText2 && !!(title || ariaDescribedBy);
  17724. }
  17725. var title_only_evaluate_default = titleOnlyEvaluate;
  17726. function landmarkIsUniqueAfter(results) {
  17727. var uniqueLandmarks = [];
  17728. return results.filter(function(currentResult) {
  17729. var findMatch = function findMatch(someResult) {
  17730. return currentResult.data.role === someResult.data.role && currentResult.data.accessibleText === someResult.data.accessibleText;
  17731. };
  17732. var matchedResult = uniqueLandmarks.find(findMatch);
  17733. if (matchedResult) {
  17734. matchedResult.result = false;
  17735. matchedResult.relatedNodes.push(currentResult.relatedNodes[0]);
  17736. return false;
  17737. }
  17738. uniqueLandmarks.push(currentResult);
  17739. currentResult.relatedNodes = [];
  17740. return true;
  17741. });
  17742. }
  17743. var landmark_is_unique_after_default = landmarkIsUniqueAfter;
  17744. function landmarkIsUniqueEvaluate(node, options, virtualNode) {
  17745. var role = get_role_default(node);
  17746. var accessibleText2 = accessible_text_virtual_default(virtualNode);
  17747. accessibleText2 = accessibleText2 ? accessibleText2.toLowerCase() : null;
  17748. this.data({
  17749. role: role,
  17750. accessibleText: accessibleText2
  17751. });
  17752. this.relatedNodes([ node ]);
  17753. return true;
  17754. }
  17755. var landmark_is_unique_evaluate_default = landmarkIsUniqueEvaluate;
  17756. function hasValue(value) {
  17757. return (value || '').trim() !== '';
  17758. }
  17759. function hasLangEvaluate(node, options, virtualNode) {
  17760. var xhtml2 = typeof document !== 'undefined' ? is_xhtml_default(document) : false;
  17761. if (options.attributes.includes('xml:lang') && options.attributes.includes('lang') && hasValue(virtualNode.attr('xml:lang')) && !hasValue(virtualNode.attr('lang')) && !xhtml2) {
  17762. this.data({
  17763. messageKey: 'noXHTML'
  17764. });
  17765. return false;
  17766. }
  17767. var hasLang = options.attributes.some(function(name) {
  17768. return hasValue(virtualNode.attr(name));
  17769. });
  17770. if (!hasLang) {
  17771. this.data({
  17772. messageKey: 'noLang'
  17773. });
  17774. return false;
  17775. }
  17776. return true;
  17777. }
  17778. var has_lang_evaluate_default = hasLangEvaluate;
  17779. function validLangEvaluate(node, options, virtualNode) {
  17780. var invalid = [];
  17781. options.attributes.forEach(function(langAttr) {
  17782. var langVal = virtualNode.attr(langAttr);
  17783. if (typeof langVal !== 'string') {
  17784. return;
  17785. }
  17786. var baselangVal = get_base_lang_default(langVal);
  17787. var invalidLang = options.value ? !options.value.map(get_base_lang_default).includes(baselangVal) : !valid_langs_default(baselangVal);
  17788. if (baselangVal !== '' && invalidLang || langVal !== '' && !sanitize_default(langVal)) {
  17789. invalid.push(langAttr + '="' + virtualNode.attr(langAttr) + '"');
  17790. }
  17791. });
  17792. if (invalid.length) {
  17793. this.data(invalid);
  17794. return true;
  17795. }
  17796. return false;
  17797. }
  17798. var valid_lang_evaluate_default = validLangEvaluate;
  17799. function xmlLangMismatchEvaluate(node, options, vNode) {
  17800. var primaryLangValue = get_base_lang_default(vNode.attr('lang'));
  17801. var primaryXmlLangValue = get_base_lang_default(vNode.attr('xml:lang'));
  17802. return primaryLangValue === primaryXmlLangValue;
  17803. }
  17804. var xml_lang_mismatch_evaluate_default = xmlLangMismatchEvaluate;
  17805. function dlitemEvaluate(node) {
  17806. var parent = get_composed_parent_default(node);
  17807. var parentTagName = parent.nodeName.toUpperCase();
  17808. var parentRole = get_explicit_role_default(parent);
  17809. if (parentTagName === 'DIV' && [ 'presentation', 'none', null ].includes(parentRole)) {
  17810. parent = get_composed_parent_default(parent);
  17811. parentTagName = parent.nodeName.toUpperCase();
  17812. parentRole = get_explicit_role_default(parent);
  17813. }
  17814. if (parentTagName !== 'DL') {
  17815. return false;
  17816. }
  17817. if (!parentRole || [ 'presentation', 'none', 'list' ].includes(parentRole)) {
  17818. return true;
  17819. }
  17820. return false;
  17821. }
  17822. var dlitem_evaluate_default = dlitemEvaluate;
  17823. function listitemEvaluate(node, options, virtualNode) {
  17824. var parent = virtualNode.parent;
  17825. if (!parent) {
  17826. return void 0;
  17827. }
  17828. var parentNodeName = parent.props.nodeName;
  17829. var parentRole = get_explicit_role_default(parent);
  17830. if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {
  17831. return true;
  17832. }
  17833. if (parentRole && is_valid_role_default(parentRole)) {
  17834. this.data({
  17835. messageKey: 'roleNotValid'
  17836. });
  17837. return false;
  17838. }
  17839. return [ 'ul', 'ol', 'menu' ].includes(parentNodeName);
  17840. }
  17841. function onlyDlitemsEvaluate(node, options, virtualNode) {
  17842. var ALLOWED_ROLES = [ 'definition', 'term', 'list' ];
  17843. var base = {
  17844. badNodes: [],
  17845. hasNonEmptyTextNode: false
  17846. };
  17847. var content = virtualNode.children.reduce(function(content2, child) {
  17848. var actualNode = child.actualNode;
  17849. if (actualNode.nodeName.toUpperCase() === 'DIV' && get_role_default(actualNode) === null) {
  17850. return content2.concat(child.children);
  17851. }
  17852. return content2.concat(child);
  17853. }, []);
  17854. var result = content.reduce(function(out, childNode) {
  17855. var actualNode = childNode.actualNode;
  17856. var tagName = actualNode.nodeName.toUpperCase();
  17857. if (actualNode.nodeType === 1 && is_visible_default(actualNode, true, false)) {
  17858. var explicitRole2 = get_explicit_role_default(actualNode);
  17859. if (tagName !== 'DT' && tagName !== 'DD' || explicitRole2) {
  17860. if (!ALLOWED_ROLES.includes(explicitRole2)) {
  17861. out.badNodes.push(actualNode);
  17862. }
  17863. }
  17864. } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {
  17865. out.hasNonEmptyTextNode = true;
  17866. }
  17867. return out;
  17868. }, base);
  17869. if (result.badNodes.length) {
  17870. this.relatedNodes(result.badNodes);
  17871. }
  17872. return !!result.badNodes.length || result.hasNonEmptyTextNode;
  17873. }
  17874. var only_dlitems_evaluate_default = onlyDlitemsEvaluate;
  17875. function onlyListitemsEvaluate(node, options, virtualNode) {
  17876. var hasNonEmptyTextNode = false;
  17877. var atLeastOneListitem = false;
  17878. var isEmpty = true;
  17879. var badNodes = [];
  17880. var badRoleNodes = [];
  17881. var badRoles = [];
  17882. virtualNode.children.forEach(function(vNode) {
  17883. var actualNode = vNode.actualNode;
  17884. if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {
  17885. hasNonEmptyTextNode = true;
  17886. return;
  17887. }
  17888. if (actualNode.nodeType !== 1 || !is_visible_default(actualNode, true, false)) {
  17889. return;
  17890. }
  17891. isEmpty = false;
  17892. var isLi = actualNode.nodeName.toUpperCase() === 'LI';
  17893. var role = get_role_default(vNode);
  17894. var isListItemRole = role === 'listitem';
  17895. if (!isLi && !isListItemRole) {
  17896. badNodes.push(actualNode);
  17897. }
  17898. if (isLi && !isListItemRole) {
  17899. badRoleNodes.push(actualNode);
  17900. if (!badRoles.includes(role)) {
  17901. badRoles.push(role);
  17902. }
  17903. }
  17904. if (isListItemRole) {
  17905. atLeastOneListitem = true;
  17906. }
  17907. });
  17908. if (hasNonEmptyTextNode || badNodes.length) {
  17909. this.relatedNodes(badNodes);
  17910. return true;
  17911. }
  17912. if (isEmpty || atLeastOneListitem) {
  17913. return false;
  17914. }
  17915. this.relatedNodes(badRoleNodes);
  17916. this.data({
  17917. messageKey: 'roleNotValid',
  17918. roles: badRoles.join(', ')
  17919. });
  17920. return true;
  17921. }
  17922. var only_listitems_evaluate_default = onlyListitemsEvaluate;
  17923. function structuredDlitemsEvaluate(node, options, virtualNode) {
  17924. var children = virtualNode.children;
  17925. if (!children || !children.length) {
  17926. return false;
  17927. }
  17928. var hasDt = false, hasDd = false, nodeName2;
  17929. for (var i = 0; i < children.length; i++) {
  17930. nodeName2 = children[i].props.nodeName.toUpperCase();
  17931. if (nodeName2 === 'DT') {
  17932. hasDt = true;
  17933. }
  17934. if (hasDt && nodeName2 === 'DD') {
  17935. return false;
  17936. }
  17937. if (nodeName2 === 'DD') {
  17938. hasDd = true;
  17939. }
  17940. }
  17941. return hasDt || hasDd;
  17942. }
  17943. var structured_dlitems_evaluate_default = structuredDlitemsEvaluate;
  17944. function captionEvaluate(node, options, virtualNode) {
  17945. var tracks = query_selector_all_default(virtualNode, 'track');
  17946. var hasCaptions = tracks.some(function(vNode) {
  17947. return (vNode.attr('kind') || '').toLowerCase() === 'captions';
  17948. });
  17949. return hasCaptions ? false : void 0;
  17950. }
  17951. var caption_evaluate_default = captionEvaluate;
  17952. var joinStr = ' > ';
  17953. function frameTestedAfter(results) {
  17954. var iframes = {};
  17955. return results.filter(function(result) {
  17956. var frameResult = result.node.ancestry[result.node.ancestry.length - 1] !== 'html';
  17957. if (frameResult) {
  17958. var ancestry2 = result.node.ancestry.flat(Infinity).join(joinStr);
  17959. iframes[ancestry2] = result;
  17960. return true;
  17961. }
  17962. var ancestry = result.node.ancestry.slice(0, result.node.ancestry.length - 1).flat(Infinity).join(joinStr);
  17963. if (iframes[ancestry]) {
  17964. iframes[ancestry].result = true;
  17965. }
  17966. return false;
  17967. });
  17968. }
  17969. var frame_tested_after_default = frameTestedAfter;
  17970. function frameTestedEvaluate(node, options) {
  17971. return options.isViolation ? false : void 0;
  17972. }
  17973. var frame_tested_evaluate_default = frameTestedEvaluate;
  17974. function noAutoplayAudioEvaluate(node, options) {
  17975. if (!node.duration) {
  17976. console.warn('axe.utils.preloadMedia did not load metadata');
  17977. return void 0;
  17978. }
  17979. var _options$allowedDurat = options.allowedDuration, allowedDuration = _options$allowedDurat === void 0 ? 3 : _options$allowedDurat;
  17980. var playableDuration = getPlayableDuration(node);
  17981. if (playableDuration <= allowedDuration && !node.hasAttribute('loop')) {
  17982. return true;
  17983. }
  17984. if (!node.hasAttribute('controls')) {
  17985. return false;
  17986. }
  17987. return true;
  17988. function getPlayableDuration(elm) {
  17989. if (!elm.currentSrc) {
  17990. return 0;
  17991. }
  17992. var playbackRange = getPlaybackRange(elm.currentSrc);
  17993. if (!playbackRange) {
  17994. return Math.abs(elm.duration - (elm.currentTime || 0));
  17995. }
  17996. if (playbackRange.length === 1) {
  17997. return Math.abs(elm.duration - playbackRange[0]);
  17998. }
  17999. return Math.abs(playbackRange[1] - playbackRange[0]);
  18000. }
  18001. function getPlaybackRange(src) {
  18002. var match = src.match(/#t=(.*)/);
  18003. if (!match) {
  18004. return;
  18005. }
  18006. var _match = _slicedToArray(match, 2), value = _match[1];
  18007. var ranges = value.split(',');
  18008. return ranges.map(function(range) {
  18009. if (/:/.test(range)) {
  18010. return convertHourMinSecToSeconds(range);
  18011. }
  18012. return parseFloat(range);
  18013. });
  18014. }
  18015. function convertHourMinSecToSeconds(hhMmSs) {
  18016. var parts = hhMmSs.split(':');
  18017. var secs = 0;
  18018. var mins = 1;
  18019. while (parts.length > 0) {
  18020. secs += mins * parseInt(parts.pop(), 10);
  18021. mins *= 60;
  18022. }
  18023. return parseFloat(secs);
  18024. }
  18025. }
  18026. var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
  18027. function cssOrientationLockEvaluate(node, options, virtualNode, context5) {
  18028. var _ref66 = context5 || {}, _ref66$cssom = _ref66.cssom, cssom = _ref66$cssom === void 0 ? void 0 : _ref66$cssom;
  18029. var _ref67 = options || {}, _ref67$degreeThreshol = _ref67.degreeThreshold, degreeThreshold = _ref67$degreeThreshol === void 0 ? 0 : _ref67$degreeThreshol;
  18030. if (!cssom || !cssom.length) {
  18031. return void 0;
  18032. }
  18033. var isLocked = false;
  18034. var relatedElements = [];
  18035. var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
  18036. var _loop5 = function _loop5() {
  18037. var key = _Object$keys2[_i21];
  18038. var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
  18039. var orientationRules = rules.filter(isMediaRuleWithOrientation);
  18040. if (!orientationRules.length) {
  18041. return 'continue';
  18042. }
  18043. orientationRules.forEach(function(_ref68) {
  18044. var cssRules = _ref68.cssRules;
  18045. Array.from(cssRules).forEach(function(cssRule) {
  18046. var locked = getIsOrientationLocked(cssRule);
  18047. if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
  18048. var elms = Array.from(root.querySelectorAll(cssRule.selectorText)) || [];
  18049. relatedElements = relatedElements.concat(elms);
  18050. }
  18051. isLocked = isLocked || locked;
  18052. });
  18053. });
  18054. };
  18055. for (var _i21 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i21 < _Object$keys2.length; _i21++) {
  18056. var _ret2 = _loop5();
  18057. if (_ret2 === 'continue') {
  18058. continue;
  18059. }
  18060. }
  18061. if (!isLocked) {
  18062. return true;
  18063. }
  18064. if (relatedElements.length) {
  18065. this.relatedNodes(relatedElements);
  18066. }
  18067. return false;
  18068. function groupCssomByDocument(cssObjectModel) {
  18069. return cssObjectModel.reduce(function(out, _ref69) {
  18070. var sheet = _ref69.sheet, root = _ref69.root, shadowId = _ref69.shadowId;
  18071. var key = shadowId ? shadowId : 'topDocument';
  18072. if (!out[key]) {
  18073. out[key] = {
  18074. root: root,
  18075. rules: []
  18076. };
  18077. }
  18078. if (!sheet || !sheet.cssRules) {
  18079. return out;
  18080. }
  18081. var rules = Array.from(sheet.cssRules);
  18082. out[key].rules = out[key].rules.concat(rules);
  18083. return out;
  18084. }, {});
  18085. }
  18086. function isMediaRuleWithOrientation(_ref70) {
  18087. var type = _ref70.type, cssText = _ref70.cssText;
  18088. if (type !== 4) {
  18089. return false;
  18090. }
  18091. return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
  18092. }
  18093. function getIsOrientationLocked(_ref71) {
  18094. var selectorText = _ref71.selectorText, style = _ref71.style;
  18095. if (!selectorText || style.length <= 0) {
  18096. return false;
  18097. }
  18098. var transformStyle = style.transform || style.webkitTransform || style.msTransform || false;
  18099. if (!transformStyle) {
  18100. return false;
  18101. }
  18102. var matches14 = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/);
  18103. if (!matches14) {
  18104. return false;
  18105. }
  18106. var _matches = _slicedToArray(matches14, 3), transformFn = _matches[1], transformFnValue = _matches[2];
  18107. var degrees = getRotationInDegrees(transformFn, transformFnValue);
  18108. if (!degrees) {
  18109. return false;
  18110. }
  18111. degrees = Math.abs(degrees);
  18112. if (Math.abs(degrees - 180) % 180 <= degreeThreshold) {
  18113. return false;
  18114. }
  18115. return Math.abs(degrees - 90) % 90 <= degreeThreshold;
  18116. }
  18117. function getRotationInDegrees(transformFunction, transformFnValue) {
  18118. switch (transformFunction) {
  18119. case 'rotate':
  18120. case 'rotateZ':
  18121. return getAngleInDegrees(transformFnValue);
  18122. case 'rotate3d':
  18123. var _transformFnValue$spl = transformFnValue.split(',').map(function(value) {
  18124. return value.trim();
  18125. }), _transformFnValue$spl2 = _slicedToArray(_transformFnValue$spl, 4), z = _transformFnValue$spl2[2], angleWithUnit = _transformFnValue$spl2[3];
  18126. if (parseInt(z) === 0) {
  18127. return;
  18128. }
  18129. return getAngleInDegrees(angleWithUnit);
  18130. case 'matrix':
  18131. case 'matrix3d':
  18132. return getAngleInDegreesFromMatrixTransform(transformFnValue);
  18133. default:
  18134. return;
  18135. }
  18136. }
  18137. function getAngleInDegrees(angleWithUnit) {
  18138. var _ref72 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref73 = _slicedToArray(_ref72, 1), unit = _ref73[0];
  18139. if (!unit) {
  18140. return;
  18141. }
  18142. var angle = parseFloat(angleWithUnit.replace(unit, ''));
  18143. switch (unit) {
  18144. case 'rad':
  18145. return convertRadToDeg(angle);
  18146. case 'grad':
  18147. return convertGradToDeg(angle);
  18148. case 'turn':
  18149. return convertTurnToDeg(angle);
  18150. case 'deg':
  18151. default:
  18152. return parseInt(angle);
  18153. }
  18154. }
  18155. function getAngleInDegreesFromMatrixTransform(transformFnValue) {
  18156. var values = transformFnValue.split(',');
  18157. if (values.length <= 6) {
  18158. var _values = _slicedToArray(values, 2), a = _values[0], b2 = _values[1];
  18159. var radians = Math.atan2(parseFloat(b2), parseFloat(a));
  18160. return convertRadToDeg(radians);
  18161. }
  18162. var sinB = parseFloat(values[8]);
  18163. var b = Math.asin(sinB);
  18164. var cosB = Math.cos(b);
  18165. var rotateZRadians = Math.acos(parseFloat(values[0]) / cosB);
  18166. return convertRadToDeg(rotateZRadians);
  18167. }
  18168. function convertRadToDeg(radians) {
  18169. return Math.round(radians * (180 / Math.PI));
  18170. }
  18171. function convertGradToDeg(grad) {
  18172. grad = grad % 400;
  18173. if (grad < 0) {
  18174. grad += 400;
  18175. }
  18176. return Math.round(grad / 400 * 360);
  18177. }
  18178. function convertTurnToDeg(turn) {
  18179. return Math.round(360 / (1 / turn));
  18180. }
  18181. }
  18182. var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
  18183. function metaViewportScaleEvaluate(node, options, virtualNode) {
  18184. var _ref74 = options || {}, _ref74$scaleMinimum = _ref74.scaleMinimum, scaleMinimum = _ref74$scaleMinimum === void 0 ? 2 : _ref74$scaleMinimum, _ref74$lowerBound = _ref74.lowerBound, lowerBound = _ref74$lowerBound === void 0 ? false : _ref74$lowerBound;
  18185. var content = virtualNode.attr('content') || '';
  18186. if (!content) {
  18187. return true;
  18188. }
  18189. var result = content.split(/[;,]/).reduce(function(out, item) {
  18190. var contentValue = item.trim();
  18191. if (!contentValue) {
  18192. return out;
  18193. }
  18194. var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1];
  18195. if (!key || !value) {
  18196. return out;
  18197. }
  18198. var curatedKey = key.toLowerCase().trim();
  18199. var curatedValue = value.toLowerCase().trim();
  18200. if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
  18201. curatedValue = 1;
  18202. }
  18203. if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) {
  18204. return out;
  18205. }
  18206. out[curatedKey] = curatedValue;
  18207. return out;
  18208. }, {});
  18209. if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) {
  18210. return true;
  18211. }
  18212. if (!lowerBound && result['user-scalable'] === 'no') {
  18213. this.data('user-scalable=no');
  18214. return false;
  18215. }
  18216. var userScalableAsFloat = parseFloat(result['user-scalable']);
  18217. if (!lowerBound && result['user-scalable'] && (userScalableAsFloat || userScalableAsFloat === 0) && userScalableAsFloat > -1 && userScalableAsFloat < 1) {
  18218. this.data('user-scalable');
  18219. return false;
  18220. }
  18221. if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) {
  18222. this.data('maximum-scale');
  18223. return false;
  18224. }
  18225. return true;
  18226. }
  18227. var meta_viewport_scale_evaluate_default = metaViewportScaleEvaluate;
  18228. function headingOrderAfter(results) {
  18229. var headingOrder = getHeadingOrder(results);
  18230. results.forEach(function(result) {
  18231. result.result = getHeadingOrderOutcome(result, headingOrder);
  18232. });
  18233. return results;
  18234. }
  18235. function getHeadingOrderOutcome(result, headingOrder) {
  18236. var _headingOrder$index$l, _headingOrder$index, _headingOrder$level, _headingOrder;
  18237. var index = findHeadingOrderIndex(headingOrder, result.node.ancestry);
  18238. var currLevel = (_headingOrder$index$l = (_headingOrder$index = headingOrder[index]) === null || _headingOrder$index === void 0 ? void 0 : _headingOrder$index.level) !== null && _headingOrder$index$l !== void 0 ? _headingOrder$index$l : -1;
  18239. var prevLevel = (_headingOrder$level = (_headingOrder = headingOrder[index - 1]) === null || _headingOrder === void 0 ? void 0 : _headingOrder.level) !== null && _headingOrder$level !== void 0 ? _headingOrder$level : -1;
  18240. if (index === 0) {
  18241. return true;
  18242. }
  18243. if (currLevel === -1) {
  18244. return void 0;
  18245. }
  18246. return currLevel - prevLevel <= 1;
  18247. }
  18248. function getHeadingOrder(results) {
  18249. results = _toConsumableArray(results);
  18250. results.sort(function(_ref75, _ref76) {
  18251. var nodeA = _ref75.node;
  18252. var nodeB = _ref76.node;
  18253. return nodeA.ancestry.length - nodeB.ancestry.length;
  18254. });
  18255. var headingOrder = results.reduce(mergeHeadingOrder, []);
  18256. return headingOrder.filter(function(_ref77) {
  18257. var level = _ref77.level;
  18258. return level !== -1;
  18259. });
  18260. }
  18261. function mergeHeadingOrder(mergedHeadingOrder, result) {
  18262. var _result$data;
  18263. var frameHeadingOrder = (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.headingOrder;
  18264. var frameAncestry = shortenArray(result.node.ancestry, 1);
  18265. if (!frameHeadingOrder) {
  18266. return mergedHeadingOrder;
  18267. }
  18268. var normalizedHeadingOrder = frameHeadingOrder.map(function(heading) {
  18269. return addFrameToHeadingAncestry(heading, frameAncestry);
  18270. });
  18271. var index = getFrameIndex(mergedHeadingOrder, frameAncestry);
  18272. if (index === -1) {
  18273. mergedHeadingOrder.push.apply(mergedHeadingOrder, _toConsumableArray(normalizedHeadingOrder));
  18274. } else {
  18275. mergedHeadingOrder.splice.apply(mergedHeadingOrder, [ index, 0 ].concat(_toConsumableArray(normalizedHeadingOrder)));
  18276. }
  18277. return mergedHeadingOrder;
  18278. }
  18279. function getFrameIndex(headingOrder, frameAncestry) {
  18280. while (frameAncestry.length) {
  18281. var index = findHeadingOrderIndex(headingOrder, frameAncestry);
  18282. if (index !== -1) {
  18283. return index;
  18284. }
  18285. frameAncestry = shortenArray(frameAncestry, 1);
  18286. }
  18287. return -1;
  18288. }
  18289. function findHeadingOrderIndex(headingOrder, ancestry) {
  18290. return headingOrder.findIndex(function(heading) {
  18291. return match_ancestry_default(heading.ancestry, ancestry);
  18292. });
  18293. }
  18294. function addFrameToHeadingAncestry(heading, frameAncestry) {
  18295. var ancestry = frameAncestry.concat(heading.ancestry);
  18296. return _extends({}, heading, {
  18297. ancestry: ancestry
  18298. });
  18299. }
  18300. function shortenArray(arr, spliceLength) {
  18301. return arr.slice(0, arr.length - spliceLength);
  18302. }
  18303. function getLevel(vNode) {
  18304. var role = get_role_default(vNode);
  18305. var headingRole = role && role.includes('heading');
  18306. var ariaHeadingLevel = vNode.attr('aria-level');
  18307. var ariaLevel = parseInt(ariaHeadingLevel, 10);
  18308. var _ref78 = vNode.props.nodeName.match(/h(\d)/) || [], _ref79 = _slicedToArray(_ref78, 2), headingLevel = _ref79[1];
  18309. if (!headingRole) {
  18310. return -1;
  18311. }
  18312. if (headingLevel && !ariaHeadingLevel) {
  18313. return parseInt(headingLevel, 10);
  18314. }
  18315. if (isNaN(ariaLevel) || ariaLevel < 1) {
  18316. if (headingLevel) {
  18317. return parseInt(headingLevel, 10);
  18318. }
  18319. return 2;
  18320. }
  18321. if (ariaLevel) {
  18322. return ariaLevel;
  18323. }
  18324. return -1;
  18325. }
  18326. function headingOrderEvaluate() {
  18327. var headingOrder = cache_default.get('headingOrder');
  18328. if (headingOrder) {
  18329. return true;
  18330. }
  18331. var selector = 'h1, h2, h3, h4, h5, h6, [role=heading], iframe, frame';
  18332. var vNodes = query_selector_all_filter_default(axe._tree[0], selector, function(vNode) {
  18333. return is_visible_default(vNode.actualNode, true);
  18334. });
  18335. headingOrder = vNodes.map(function(vNode) {
  18336. return {
  18337. ancestry: [ _getAncestry(vNode.actualNode) ],
  18338. level: getLevel(vNode)
  18339. };
  18340. });
  18341. this.data({
  18342. headingOrder: headingOrder
  18343. });
  18344. cache_default.set('headingOrder', vNodes);
  18345. return true;
  18346. }
  18347. var heading_order_evaluate_default = headingOrderEvaluate;
  18348. function isIdenticalObject(a, b) {
  18349. if (!a || !b) {
  18350. return false;
  18351. }
  18352. var aProps = Object.getOwnPropertyNames(a);
  18353. var bProps = Object.getOwnPropertyNames(b);
  18354. if (aProps.length !== bProps.length) {
  18355. return false;
  18356. }
  18357. var result = aProps.every(function(propName) {
  18358. var aValue = a[propName];
  18359. var bValue = b[propName];
  18360. if (_typeof(aValue) !== _typeof(bValue)) {
  18361. return false;
  18362. }
  18363. if (typeof aValue === 'object' || typeof bValue === 'object') {
  18364. return isIdenticalObject(aValue, bValue);
  18365. }
  18366. return aValue === bValue;
  18367. });
  18368. return result;
  18369. }
  18370. function identicalLinksSamePurposeAfter(results) {
  18371. if (results.length < 2) {
  18372. return results;
  18373. }
  18374. var incompleteResults = results.filter(function(_ref80) {
  18375. var result = _ref80.result;
  18376. return result !== void 0;
  18377. });
  18378. var uniqueResults = [];
  18379. var nameMap = {};
  18380. var _loop6 = function _loop6(index) {
  18381. var _currentResult$relate;
  18382. var currentResult = incompleteResults[index];
  18383. var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps;
  18384. if (nameMap[name]) {
  18385. return 'continue';
  18386. }
  18387. var sameNameResults = incompleteResults.filter(function(_ref81, resultNum) {
  18388. var data2 = _ref81.data;
  18389. return data2.name === name && resultNum !== index;
  18390. });
  18391. var isSameUrl = sameNameResults.every(function(_ref82) {
  18392. var data2 = _ref82.data;
  18393. return isIdenticalObject(data2.urlProps, urlProps);
  18394. });
  18395. if (sameNameResults.length && !isSameUrl) {
  18396. currentResult.result = void 0;
  18397. }
  18398. currentResult.relatedNodes = [];
  18399. (_currentResult$relate = currentResult.relatedNodes).push.apply(_currentResult$relate, _toConsumableArray(sameNameResults.map(function(node) {
  18400. return node.relatedNodes[0];
  18401. })));
  18402. nameMap[name] = sameNameResults;
  18403. uniqueResults.push(currentResult);
  18404. };
  18405. for (var index = 0; index < incompleteResults.length; index++) {
  18406. var _ret3 = _loop6(index);
  18407. if (_ret3 === 'continue') {
  18408. continue;
  18409. }
  18410. }
  18411. return uniqueResults;
  18412. }
  18413. var identical_links_same_purpose_after_default = identicalLinksSamePurposeAfter;
  18414. var commons_exports = {};
  18415. __export(commons_exports, {
  18416. aria: function aria() {
  18417. return aria_exports;
  18418. },
  18419. color: function color() {
  18420. return color_exports;
  18421. },
  18422. dom: function dom() {
  18423. return dom_exports;
  18424. },
  18425. forms: function forms() {
  18426. return forms_exports;
  18427. },
  18428. matches: function matches() {
  18429. return matches_default3;
  18430. },
  18431. standards: function standards() {
  18432. return standards_exports;
  18433. },
  18434. table: function table() {
  18435. return table_exports;
  18436. },
  18437. text: function text() {
  18438. return text_exports;
  18439. },
  18440. utils: function utils() {
  18441. return utils_exports;
  18442. }
  18443. });
  18444. var forms_exports = {};
  18445. __export(forms_exports, {
  18446. isAriaCombobox: function isAriaCombobox() {
  18447. return is_aria_combobox_default;
  18448. },
  18449. isAriaListbox: function isAriaListbox() {
  18450. return is_aria_listbox_default;
  18451. },
  18452. isAriaRange: function isAriaRange() {
  18453. return is_aria_range_default;
  18454. },
  18455. isAriaTextbox: function isAriaTextbox() {
  18456. return is_aria_textbox_default;
  18457. },
  18458. isDisabled: function isDisabled() {
  18459. return is_disabled_default;
  18460. },
  18461. isNativeSelect: function isNativeSelect() {
  18462. return is_native_select_default;
  18463. },
  18464. isNativeTextbox: function isNativeTextbox() {
  18465. return is_native_textbox_default;
  18466. }
  18467. });
  18468. var disabledNodeNames = [ 'fieldset', 'button', 'select', 'input', 'textarea' ];
  18469. function isDisabled(virtualNode) {
  18470. var disabledState = virtualNode._isDisabled;
  18471. if (typeof disabledState === 'boolean') {
  18472. return disabledState;
  18473. }
  18474. var nodeName2 = virtualNode.props.nodeName;
  18475. var ariaDisabled = virtualNode.attr('aria-disabled');
  18476. if (disabledNodeNames.includes(nodeName2) && virtualNode.hasAttr('disabled')) {
  18477. disabledState = true;
  18478. } else if (ariaDisabled) {
  18479. disabledState = ariaDisabled.toLowerCase() === 'true';
  18480. } else if (virtualNode.parent) {
  18481. disabledState = isDisabled(virtualNode.parent);
  18482. } else {
  18483. disabledState = false;
  18484. }
  18485. virtualNode._isDisabled = disabledState;
  18486. return disabledState;
  18487. }
  18488. var is_disabled_default = isDisabled;
  18489. var table_exports = {};
  18490. __export(table_exports, {
  18491. getAllCells: function getAllCells() {
  18492. return get_all_cells_default;
  18493. },
  18494. getCellPosition: function getCellPosition() {
  18495. return get_cell_position_default;
  18496. },
  18497. getHeaders: function getHeaders() {
  18498. return get_headers_default;
  18499. },
  18500. getScope: function getScope() {
  18501. return get_scope_default;
  18502. },
  18503. isColumnHeader: function isColumnHeader() {
  18504. return is_column_header_default;
  18505. },
  18506. isDataCell: function isDataCell() {
  18507. return is_data_cell_default;
  18508. },
  18509. isDataTable: function isDataTable() {
  18510. return is_data_table_default;
  18511. },
  18512. isHeader: function isHeader() {
  18513. return is_header_default;
  18514. },
  18515. isRowHeader: function isRowHeader() {
  18516. return is_row_header_default;
  18517. },
  18518. toArray: function toArray() {
  18519. return to_grid_default;
  18520. },
  18521. toGrid: function toGrid() {
  18522. return to_grid_default;
  18523. },
  18524. traverse: function traverse() {
  18525. return traverse_default;
  18526. }
  18527. });
  18528. function getAllCells(tableElm) {
  18529. var rowIndex, cellIndex, rowLength, cellLength;
  18530. var cells = [];
  18531. for (rowIndex = 0, rowLength = tableElm.rows.length; rowIndex < rowLength; rowIndex++) {
  18532. for (cellIndex = 0, cellLength = tableElm.rows[rowIndex].cells.length; cellIndex < cellLength; cellIndex++) {
  18533. cells.push(tableElm.rows[rowIndex].cells[cellIndex]);
  18534. }
  18535. }
  18536. return cells;
  18537. }
  18538. var get_all_cells_default = getAllCells;
  18539. function traverseForHeaders(headerType, position, tableGrid) {
  18540. var property = headerType === 'row' ? '_rowHeaders' : '_colHeaders';
  18541. var predicate = headerType === 'row' ? is_row_header_default : is_column_header_default;
  18542. var startCell = tableGrid[position.y][position.x];
  18543. var colspan = startCell.colSpan - 1;
  18544. var rowspanAttr = startCell.getAttribute('rowspan');
  18545. var rowspanValue = parseInt(rowspanAttr) === 0 || startCell.rowspan === 0 ? tableGrid.length : startCell.rowSpan;
  18546. var rowspan = rowspanValue - 1;
  18547. var rowStart = position.y + rowspan;
  18548. var colStart = position.x + colspan;
  18549. var rowEnd = headerType === 'row' ? position.y : 0;
  18550. var colEnd = headerType === 'row' ? 0 : position.x;
  18551. var headers;
  18552. var cells = [];
  18553. for (var row = rowStart; row >= rowEnd && !headers; row--) {
  18554. for (var col = colStart; col >= colEnd; col--) {
  18555. var cell = tableGrid[row] ? tableGrid[row][col] : void 0;
  18556. if (!cell) {
  18557. continue;
  18558. }
  18559. var vNode = axe.utils.getNodeFromTree(cell);
  18560. if (vNode[property]) {
  18561. headers = vNode[property];
  18562. break;
  18563. }
  18564. cells.push(cell);
  18565. }
  18566. }
  18567. headers = (headers || []).concat(cells.filter(predicate));
  18568. cells.forEach(function(tableCell) {
  18569. var vNode = axe.utils.getNodeFromTree(tableCell);
  18570. vNode[property] = headers;
  18571. });
  18572. return headers;
  18573. }
  18574. function getHeaders(cell, tableGrid) {
  18575. if (cell.getAttribute('headers')) {
  18576. var headers = idrefs_default(cell, 'headers');
  18577. if (headers.filter(function(header) {
  18578. return header;
  18579. }).length) {
  18580. return headers;
  18581. }
  18582. }
  18583. if (!tableGrid) {
  18584. tableGrid = to_grid_default(find_up_default(cell, 'table'));
  18585. }
  18586. var position = get_cell_position_default(cell, tableGrid);
  18587. var rowHeaders = traverseForHeaders('row', position, tableGrid);
  18588. var colHeaders = traverseForHeaders('col', position, tableGrid);
  18589. return [].concat(rowHeaders, colHeaders).reverse();
  18590. }
  18591. var get_headers_default = getHeaders;
  18592. function isDataCell(cell) {
  18593. if (!cell.children.length && !cell.textContent.trim()) {
  18594. return false;
  18595. }
  18596. var role = cell.getAttribute('role');
  18597. if (is_valid_role_default(role)) {
  18598. return [ 'cell', 'gridcell' ].includes(role);
  18599. } else {
  18600. return cell.nodeName.toUpperCase() === 'TD';
  18601. }
  18602. }
  18603. var is_data_cell_default = isDataCell;
  18604. function isDataTable(node) {
  18605. var role = (node.getAttribute('role') || '').toLowerCase();
  18606. if ((role === 'presentation' || role === 'none') && !is_focusable_default(node)) {
  18607. return false;
  18608. }
  18609. if (node.getAttribute('contenteditable') === 'true' || find_up_default(node, '[contenteditable="true"]')) {
  18610. return true;
  18611. }
  18612. if (role === 'grid' || role === 'treegrid' || role === 'table') {
  18613. return true;
  18614. }
  18615. if (get_role_type_default(role) === 'landmark') {
  18616. return true;
  18617. }
  18618. if (node.getAttribute('datatable') === '0') {
  18619. return false;
  18620. }
  18621. if (node.getAttribute('summary')) {
  18622. return true;
  18623. }
  18624. if (node.tHead || node.tFoot || node.caption) {
  18625. return true;
  18626. }
  18627. for (var childIndex = 0, childLength = node.children.length; childIndex < childLength; childIndex++) {
  18628. if (node.children[childIndex].nodeName.toUpperCase() === 'COLGROUP') {
  18629. return true;
  18630. }
  18631. }
  18632. var cells = 0;
  18633. var rowLength = node.rows.length;
  18634. var row, cell;
  18635. var hasBorder = false;
  18636. for (var rowIndex = 0; rowIndex < rowLength; rowIndex++) {
  18637. row = node.rows[rowIndex];
  18638. for (var cellIndex = 0, cellLength = row.cells.length; cellIndex < cellLength; cellIndex++) {
  18639. cell = row.cells[cellIndex];
  18640. if (cell.nodeName.toUpperCase() === 'TH') {
  18641. return true;
  18642. }
  18643. if (!hasBorder && (cell.offsetWidth !== cell.clientWidth || cell.offsetHeight !== cell.clientHeight)) {
  18644. hasBorder = true;
  18645. }
  18646. if (cell.getAttribute('scope') || cell.getAttribute('headers') || cell.getAttribute('abbr')) {
  18647. return true;
  18648. }
  18649. if ([ 'columnheader', 'rowheader' ].includes((cell.getAttribute('role') || '').toLowerCase())) {
  18650. return true;
  18651. }
  18652. if (cell.children.length === 1 && cell.children[0].nodeName.toUpperCase() === 'ABBR') {
  18653. return true;
  18654. }
  18655. cells++;
  18656. }
  18657. }
  18658. if (node.getElementsByTagName('table').length) {
  18659. return false;
  18660. }
  18661. if (rowLength < 2) {
  18662. return false;
  18663. }
  18664. var sampleRow = node.rows[Math.ceil(rowLength / 2)];
  18665. if (sampleRow.cells.length === 1 && sampleRow.cells[0].colSpan === 1) {
  18666. return false;
  18667. }
  18668. if (sampleRow.cells.length >= 5) {
  18669. return true;
  18670. }
  18671. if (hasBorder) {
  18672. return true;
  18673. }
  18674. var bgColor, bgImage;
  18675. for (rowIndex = 0; rowIndex < rowLength; rowIndex++) {
  18676. row = node.rows[rowIndex];
  18677. if (bgColor && bgColor !== window.getComputedStyle(row).getPropertyValue('background-color')) {
  18678. return true;
  18679. } else {
  18680. bgColor = window.getComputedStyle(row).getPropertyValue('background-color');
  18681. }
  18682. if (bgImage && bgImage !== window.getComputedStyle(row).getPropertyValue('background-image')) {
  18683. return true;
  18684. } else {
  18685. bgImage = window.getComputedStyle(row).getPropertyValue('background-image');
  18686. }
  18687. }
  18688. if (rowLength >= 20) {
  18689. return true;
  18690. }
  18691. if (get_element_coordinates_default(node).width > get_viewport_size_default(window).width * .95) {
  18692. return false;
  18693. }
  18694. if (cells < 10) {
  18695. return false;
  18696. }
  18697. if (node.querySelector('object, embed, iframe, applet')) {
  18698. return false;
  18699. }
  18700. return true;
  18701. }
  18702. var is_data_table_default = isDataTable;
  18703. function isHeader(cell) {
  18704. if (is_column_header_default(cell) || is_row_header_default(cell)) {
  18705. return true;
  18706. }
  18707. if (cell.getAttribute('id')) {
  18708. var id = escape_selector_default(cell.getAttribute('id'));
  18709. return !!document.querySelector('[headers~="'.concat(id, '"]'));
  18710. }
  18711. return false;
  18712. }
  18713. var is_header_default = isHeader;
  18714. function traverseTable(dir, position, tableGrid, callback) {
  18715. var result;
  18716. var cell = tableGrid[position.y] ? tableGrid[position.y][position.x] : void 0;
  18717. if (!cell) {
  18718. return [];
  18719. }
  18720. if (typeof callback === 'function') {
  18721. result = callback(cell, position, tableGrid);
  18722. if (result === true) {
  18723. return [ cell ];
  18724. }
  18725. }
  18726. result = traverseTable(dir, {
  18727. x: position.x + dir.x,
  18728. y: position.y + dir.y
  18729. }, tableGrid, callback);
  18730. result.unshift(cell);
  18731. return result;
  18732. }
  18733. function traverse(dir, startPos, tableGrid, callback) {
  18734. if (Array.isArray(startPos)) {
  18735. callback = tableGrid;
  18736. tableGrid = startPos;
  18737. startPos = {
  18738. x: 0,
  18739. y: 0
  18740. };
  18741. }
  18742. if (typeof dir === 'string') {
  18743. switch (dir) {
  18744. case 'left':
  18745. dir = {
  18746. x: -1,
  18747. y: 0
  18748. };
  18749. break;
  18750. case 'up':
  18751. dir = {
  18752. x: 0,
  18753. y: -1
  18754. };
  18755. break;
  18756. case 'right':
  18757. dir = {
  18758. x: 1,
  18759. y: 0
  18760. };
  18761. break;
  18762. case 'down':
  18763. dir = {
  18764. x: 0,
  18765. y: 1
  18766. };
  18767. break;
  18768. }
  18769. }
  18770. return traverseTable(dir, {
  18771. x: startPos.x + dir.x,
  18772. y: startPos.y + dir.y
  18773. }, tableGrid, callback);
  18774. }
  18775. var traverse_default = traverse;
  18776. var commons = {
  18777. aria: aria_exports,
  18778. color: color_exports,
  18779. dom: dom_exports,
  18780. forms: forms_exports,
  18781. matches: matches_default3,
  18782. standards: standards_exports,
  18783. table: table_exports,
  18784. text: text_exports,
  18785. utils: utils_exports
  18786. };
  18787. function identicalLinksSamePurposeEvaluate(node, options, virtualNode) {
  18788. var accText = text_exports.accessibleTextVirtual(virtualNode);
  18789. var name = text_exports.sanitize(text_exports.removeUnicode(accText, {
  18790. emoji: true,
  18791. nonBmp: true,
  18792. punctuations: true
  18793. })).toLowerCase();
  18794. if (!name) {
  18795. return void 0;
  18796. }
  18797. var afterData = {
  18798. name: name,
  18799. urlProps: dom_exports.urlPropsFromAttribute(node, 'href')
  18800. };
  18801. this.data(afterData);
  18802. this.relatedNodes([ node ]);
  18803. return true;
  18804. }
  18805. var identical_links_same_purpose_evaluate_default = identicalLinksSamePurposeEvaluate;
  18806. function internalLinkPresentEvaluate(node, options, virtualNode) {
  18807. var links = query_selector_all_default(virtualNode, 'a[href]');
  18808. return links.some(function(vLink) {
  18809. return /^#[^/!]/.test(vLink.attr('href'));
  18810. });
  18811. }
  18812. var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
  18813. function metaRefreshEvaluate(node, options, virtualNode) {
  18814. var content = virtualNode.attr('content') || '', parsedParams = content.split(/[;,]/);
  18815. return content === '' || parsedParams[0] === '0';
  18816. }
  18817. var meta_refresh_evaluate_default = metaRefreshEvaluate;
  18818. function normalizeFontWeight(weight) {
  18819. switch (weight) {
  18820. case 'lighter':
  18821. return 100;
  18822. case 'normal':
  18823. return 400;
  18824. case 'bold':
  18825. return 700;
  18826. case 'bolder':
  18827. return 900;
  18828. }
  18829. weight = parseInt(weight);
  18830. return !isNaN(weight) ? weight : 400;
  18831. }
  18832. function getTextContainer(elm) {
  18833. var nextNode = elm;
  18834. var outerText = elm.textContent.trim();
  18835. var innerText = outerText;
  18836. while (innerText === outerText && nextNode !== void 0) {
  18837. var _i22 = -1;
  18838. elm = nextNode;
  18839. if (elm.children.length === 0) {
  18840. return elm;
  18841. }
  18842. do {
  18843. _i22++;
  18844. innerText = elm.children[_i22].textContent.trim();
  18845. } while (innerText === '' && _i22 + 1 < elm.children.length);
  18846. nextNode = elm.children[_i22];
  18847. }
  18848. return elm;
  18849. }
  18850. function getStyleValues(node) {
  18851. var style = window.getComputedStyle(getTextContainer(node));
  18852. return {
  18853. fontWeight: normalizeFontWeight(style.getPropertyValue('font-weight')),
  18854. fontSize: parseInt(style.getPropertyValue('font-size')),
  18855. isItalic: style.getPropertyValue('font-style') === 'italic'
  18856. };
  18857. }
  18858. function isHeaderStyle(styleA, styleB, margins) {
  18859. return margins.reduce(function(out, margin) {
  18860. return out || (!margin.size || styleA.fontSize / margin.size > styleB.fontSize) && (!margin.weight || styleA.fontWeight - margin.weight > styleB.fontWeight) && (!margin.italic || styleA.isItalic && !styleB.isItalic);
  18861. }, false);
  18862. }
  18863. function pAsHeadingEvaluate(node, options, virtualNode) {
  18864. var siblings = Array.from(node.parentNode.children);
  18865. var currentIndex = siblings.indexOf(node);
  18866. options = options || {};
  18867. var margins = options.margins || [];
  18868. var nextSibling = siblings.slice(currentIndex + 1).find(function(elm) {
  18869. return elm.nodeName.toUpperCase() === 'P';
  18870. });
  18871. var prevSibling = siblings.slice(0, currentIndex).reverse().find(function(elm) {
  18872. return elm.nodeName.toUpperCase() === 'P';
  18873. });
  18874. var currStyle = getStyleValues(node);
  18875. var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;
  18876. var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;
  18877. var optionsPassLength = options.passLength;
  18878. var optionsFailLength = options.failLength;
  18879. var headingLength = node.textContent.trim().length;
  18880. var paragraphLength = nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.textContent.trim().length;
  18881. if (headingLength > paragraphLength * optionsPassLength) {
  18882. return true;
  18883. }
  18884. if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {
  18885. return true;
  18886. }
  18887. var blockquote = find_up_virtual_default(virtualNode, 'blockquote');
  18888. if (blockquote && blockquote.nodeName.toUpperCase() === 'BLOCKQUOTE') {
  18889. return void 0;
  18890. }
  18891. if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {
  18892. return void 0;
  18893. }
  18894. if (headingLength > paragraphLength * optionsFailLength) {
  18895. return void 0;
  18896. }
  18897. return false;
  18898. }
  18899. var p_as_heading_evaluate_default = pAsHeadingEvaluate;
  18900. function regionAfter(results) {
  18901. var iframeResults = results.filter(function(r) {
  18902. return r.data.isIframe;
  18903. });
  18904. results.forEach(function(r) {
  18905. if (r.result || r.node.ancestry.length === 1) {
  18906. return;
  18907. }
  18908. var frameAncestry = r.node.ancestry.slice(0, -1);
  18909. var _iterator2 = _createForOfIteratorHelper(iframeResults), _step2;
  18910. try {
  18911. for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
  18912. var iframeResult = _step2.value;
  18913. if (match_ancestry_default(frameAncestry, iframeResult.node.ancestry)) {
  18914. r.result = iframeResult.result;
  18915. break;
  18916. }
  18917. }
  18918. } catch (err) {
  18919. _iterator2.e(err);
  18920. } finally {
  18921. _iterator2.f();
  18922. }
  18923. });
  18924. iframeResults.forEach(function(r) {
  18925. if (!r.result) {
  18926. r.result = true;
  18927. }
  18928. });
  18929. return results;
  18930. }
  18931. var region_after_default = regionAfter;
  18932. var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
  18933. var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ];
  18934. function isRegion(virtualNode, options) {
  18935. var node = virtualNode.actualNode;
  18936. var role = get_role_default(virtualNode);
  18937. var ariaLive = (node.getAttribute('aria-live') || '').toLowerCase().trim();
  18938. if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) {
  18939. return true;
  18940. }
  18941. if (landmarkRoles2.includes(role)) {
  18942. return true;
  18943. }
  18944. if (options.regionMatcher && matches_default3(virtualNode, options.regionMatcher)) {
  18945. return true;
  18946. }
  18947. return false;
  18948. }
  18949. function findRegionlessElms(virtualNode, options) {
  18950. var node = virtualNode.actualNode;
  18951. if (get_role_default(virtualNode) === 'button' || isRegion(virtualNode, options) || [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName) || _isSkipLink(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !is_visible_default(node, true)) {
  18952. var vNode = virtualNode;
  18953. while (vNode) {
  18954. vNode._hasRegionDescendant = true;
  18955. vNode = vNode.parent;
  18956. }
  18957. if ([ 'iframe', 'frame' ].includes(virtualNode.props.nodeName)) {
  18958. return [ virtualNode ];
  18959. }
  18960. return [];
  18961. } else if (node !== document.body && has_content_default(node, true)) {
  18962. return [ virtualNode ];
  18963. } else {
  18964. return virtualNode.children.filter(function(_ref83) {
  18965. var actualNode = _ref83.actualNode;
  18966. return actualNode.nodeType === 1;
  18967. }).map(function(vNode) {
  18968. return findRegionlessElms(vNode, options);
  18969. }).reduce(function(a, b) {
  18970. return a.concat(b);
  18971. }, []);
  18972. }
  18973. }
  18974. function regionEvaluate(node, options, virtualNode) {
  18975. var regionlessNodes = cache_default.get('regionlessNodes');
  18976. this.data({
  18977. isIframe: [ 'iframe', 'frame' ].includes(virtualNode.props.nodeName)
  18978. });
  18979. if (regionlessNodes) {
  18980. return !regionlessNodes.includes(virtualNode);
  18981. }
  18982. var tree = axe._tree;
  18983. regionlessNodes = findRegionlessElms(tree[0], options).map(function(vNode) {
  18984. while (vNode.parent && !vNode.parent._hasRegionDescendant && vNode.parent.actualNode !== document.body) {
  18985. vNode = vNode.parent;
  18986. }
  18987. return vNode;
  18988. }).filter(function(vNode, index, array) {
  18989. return array.indexOf(vNode) === index;
  18990. });
  18991. cache_default.set('regionlessNodes', regionlessNodes);
  18992. return !regionlessNodes.includes(virtualNode);
  18993. }
  18994. var region_evaluate_default = regionEvaluate;
  18995. function skipLinkEvaluate(node) {
  18996. var target = get_element_by_reference_default(node, 'href');
  18997. if (target) {
  18998. return is_visible_default(target, true) || void 0;
  18999. }
  19000. return false;
  19001. }
  19002. var skip_link_evaluate_default = skipLinkEvaluate;
  19003. function uniqueFrameTitleAfter(results) {
  19004. var titles = {};
  19005. results.forEach(function(r) {
  19006. titles[r.data] = titles[r.data] !== void 0 ? ++titles[r.data] : 0;
  19007. });
  19008. results.forEach(function(r) {
  19009. r.result = !!titles[r.data];
  19010. });
  19011. return results;
  19012. }
  19013. var unique_frame_title_after_default = uniqueFrameTitleAfter;
  19014. function uniqueFrameTitleEvaluate(node, options, vNode) {
  19015. var title = sanitize_default(vNode.attr('title')).toLowerCase();
  19016. this.data(title);
  19017. return true;
  19018. }
  19019. var unique_frame_title_evaluate_default = uniqueFrameTitleEvaluate;
  19020. function duplicateIdAfter(results) {
  19021. var uniqueIds = [];
  19022. return results.filter(function(r) {
  19023. if (uniqueIds.indexOf(r.data) === -1) {
  19024. uniqueIds.push(r.data);
  19025. return true;
  19026. }
  19027. return false;
  19028. });
  19029. }
  19030. var duplicate_id_after_default = duplicateIdAfter;
  19031. function duplicateIdEvaluate(node) {
  19032. var id = node.getAttribute('id').trim();
  19033. if (!id) {
  19034. return true;
  19035. }
  19036. var root = get_root_node_default2(node);
  19037. var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(escape_selector_default(id), '"]'))).filter(function(foundNode) {
  19038. return foundNode !== node;
  19039. });
  19040. if (matchingNodes.length) {
  19041. this.relatedNodes(matchingNodes);
  19042. }
  19043. this.data(id);
  19044. return matchingNodes.length === 0;
  19045. }
  19046. var duplicate_id_evaluate_default = duplicateIdEvaluate;
  19047. function ariaLabelEvaluate(node, options, virtualNode) {
  19048. return !!sanitize_default(arialabel_text_default(virtualNode));
  19049. }
  19050. var aria_label_evaluate_default = ariaLabelEvaluate;
  19051. function ariaLabelledbyEvaluate(node, options, virtualNode) {
  19052. try {
  19053. return !!sanitize_default(arialabelledby_text_default(virtualNode));
  19054. } catch (e) {
  19055. return void 0;
  19056. }
  19057. }
  19058. var aria_labelledby_evaluate_default = ariaLabelledbyEvaluate;
  19059. function avoidInlineSpacingEvaluate(node, options) {
  19060. var overriddenProperties = options.cssProperties.filter(function(property) {
  19061. if (node.style.getPropertyPriority(property) === 'important') {
  19062. return property;
  19063. }
  19064. });
  19065. if (overriddenProperties.length > 0) {
  19066. this.data(overriddenProperties);
  19067. return false;
  19068. }
  19069. return true;
  19070. }
  19071. var avoid_inline_spacing_evaluate_default = avoidInlineSpacingEvaluate;
  19072. function docHasTitleEvaluate() {
  19073. var title = document.title;
  19074. return !!sanitize_default(title);
  19075. }
  19076. var doc_has_title_evaluate_default = docHasTitleEvaluate;
  19077. function existsEvaluate() {
  19078. return void 0;
  19079. }
  19080. var exists_evaluate_default = existsEvaluate;
  19081. function hasAltEvaluate(node, options, virtualNode) {
  19082. var nodeName2 = virtualNode.props.nodeName;
  19083. if (![ 'img', 'input', 'area' ].includes(nodeName2)) {
  19084. return false;
  19085. }
  19086. return virtualNode.hasAttr('alt');
  19087. }
  19088. var has_alt_evaluate_default = hasAltEvaluate;
  19089. function isOnScreenEvaluate(node) {
  19090. return is_visible_default(node, false) && !is_offscreen_default(node);
  19091. }
  19092. var is_on_screen_evaluate_default = isOnScreenEvaluate;
  19093. function nonEmptyIfPresentEvaluate(node, options, virtualNode) {
  19094. var nodeName2 = virtualNode.props.nodeName;
  19095. var type = (virtualNode.attr('type') || '').toLowerCase();
  19096. var label5 = virtualNode.attr('value');
  19097. if (label5) {
  19098. this.data({
  19099. messageKey: 'has-label'
  19100. });
  19101. }
  19102. if (nodeName2 === 'input' && [ 'submit', 'reset' ].includes(type)) {
  19103. return label5 === null;
  19104. }
  19105. return false;
  19106. }
  19107. var non_empty_if_present_evaluate_default = nonEmptyIfPresentEvaluate;
  19108. function presentationalRoleEvaluate(node, options, virtualNode) {
  19109. var role = get_role_default(virtualNode);
  19110. var explicitRole2 = get_explicit_role_default(virtualNode);
  19111. if ([ 'presentation', 'none' ].includes(role)) {
  19112. this.data({
  19113. role: role
  19114. });
  19115. return true;
  19116. }
  19117. if (![ 'presentation', 'none' ].includes(explicitRole2)) {
  19118. return false;
  19119. }
  19120. var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
  19121. return virtualNode.hasAttr(attr);
  19122. });
  19123. var focusable = is_focusable_default(virtualNode);
  19124. var messageKey;
  19125. if (hasGlobalAria && !focusable) {
  19126. messageKey = 'globalAria';
  19127. } else if (!hasGlobalAria && focusable) {
  19128. messageKey = 'focusable';
  19129. } else {
  19130. messageKey = 'both';
  19131. }
  19132. this.data({
  19133. messageKey: messageKey,
  19134. role: role
  19135. });
  19136. return false;
  19137. }
  19138. var presentational_role_evaluate_default = presentationalRoleEvaluate;
  19139. function svgNonEmptyTitleEvaluate(node, options, virtualNode) {
  19140. if (!virtualNode.children) {
  19141. return void 0;
  19142. }
  19143. var titleNode = virtualNode.children.find(function(_ref84) {
  19144. var props = _ref84.props;
  19145. return props.nodeName === 'title';
  19146. });
  19147. if (!titleNode) {
  19148. this.data({
  19149. messageKey: 'noTitle'
  19150. });
  19151. return false;
  19152. }
  19153. try {
  19154. if (visible_virtual_default(titleNode) === '') {
  19155. this.data({
  19156. messageKey: 'emptyTitle'
  19157. });
  19158. return false;
  19159. }
  19160. } catch (e) {
  19161. return void 0;
  19162. }
  19163. return true;
  19164. }
  19165. var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
  19166. function captionFakedEvaluate(node) {
  19167. var table5 = to_grid_default(node);
  19168. var firstRow = table5[0];
  19169. if (table5.length <= 1 || firstRow.length <= 1 || node.rows.length <= 1) {
  19170. return true;
  19171. }
  19172. return firstRow.reduce(function(out, curr, i) {
  19173. return out || curr !== firstRow[i + 1] && firstRow[i + 1] !== void 0;
  19174. }, false);
  19175. }
  19176. var caption_faked_evaluate_default = captionFakedEvaluate;
  19177. function html5ScopeEvaluate(node) {
  19178. if (!is_html5_default(document)) {
  19179. return true;
  19180. }
  19181. return node.nodeName.toUpperCase() === 'TH';
  19182. }
  19183. var html5_scope_evaluate_default = html5ScopeEvaluate;
  19184. function sameCaptionSummaryEvaluate(node) {
  19185. return !!(node.summary && node.caption) && node.summary.toLowerCase() === accessible_text_default(node.caption).toLowerCase();
  19186. }
  19187. var same_caption_summary_evaluate_default = sameCaptionSummaryEvaluate;
  19188. function scopeValueEvaluate(node, options) {
  19189. var value = node.getAttribute('scope').toLowerCase();
  19190. return options.values.indexOf(value) !== -1;
  19191. }
  19192. var scope_value_evaluate_default = scopeValueEvaluate;
  19193. function tdHasHeaderEvaluate(node) {
  19194. var badCells = [];
  19195. var cells = get_all_cells_default(node);
  19196. var tableGrid = to_grid_default(node);
  19197. cells.forEach(function(cell) {
  19198. if (has_content_default(cell) && is_data_cell_default(cell) && !label_default2(cell)) {
  19199. var hasHeaders = get_headers_default(cell, tableGrid).some(function(header) {
  19200. return header !== null && !!has_content_default(header);
  19201. });
  19202. if (!hasHeaders) {
  19203. badCells.push(cell);
  19204. }
  19205. }
  19206. });
  19207. if (badCells.length) {
  19208. this.relatedNodes(badCells);
  19209. return false;
  19210. }
  19211. return true;
  19212. }
  19213. var td_has_header_evaluate_default = tdHasHeaderEvaluate;
  19214. function tdHeadersAttrEvaluate(node) {
  19215. var cells = [];
  19216. var reviewCells = [];
  19217. var badCells = [];
  19218. for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
  19219. var row = node.rows[rowIndex];
  19220. for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
  19221. cells.push(row.cells[cellIndex]);
  19222. }
  19223. }
  19224. var ids = cells.reduce(function(ids2, cell) {
  19225. if (cell.getAttribute('id')) {
  19226. ids2.push(cell.getAttribute('id'));
  19227. }
  19228. return ids2;
  19229. }, []);
  19230. cells.forEach(function(cell) {
  19231. var isSelf = false;
  19232. var notOfTable = false;
  19233. if (!cell.hasAttribute('headers')) {
  19234. return;
  19235. }
  19236. var headersAttr = cell.getAttribute('headers').trim();
  19237. if (!headersAttr) {
  19238. return reviewCells.push(cell);
  19239. }
  19240. var headers = token_list_default(headersAttr);
  19241. if (headers.length !== 0) {
  19242. if (cell.getAttribute('id')) {
  19243. isSelf = headers.indexOf(cell.getAttribute('id').trim()) !== -1;
  19244. }
  19245. notOfTable = headers.some(function(header) {
  19246. return !ids.includes(header);
  19247. });
  19248. if (isSelf || notOfTable) {
  19249. badCells.push(cell);
  19250. }
  19251. }
  19252. });
  19253. if (badCells.length > 0) {
  19254. this.relatedNodes(badCells);
  19255. return false;
  19256. }
  19257. if (reviewCells.length) {
  19258. this.relatedNodes(reviewCells);
  19259. return void 0;
  19260. }
  19261. return true;
  19262. }
  19263. var td_headers_attr_evaluate_default = tdHeadersAttrEvaluate;
  19264. function thHasDataCellsEvaluate(node) {
  19265. var cells = get_all_cells_default(node);
  19266. var checkResult = this;
  19267. var reffedHeaders = [];
  19268. cells.forEach(function(cell) {
  19269. var headers2 = cell.getAttribute('headers');
  19270. if (headers2) {
  19271. reffedHeaders = reffedHeaders.concat(headers2.split(/\s+/));
  19272. }
  19273. var ariaLabel = cell.getAttribute('aria-labelledby');
  19274. if (ariaLabel) {
  19275. reffedHeaders = reffedHeaders.concat(ariaLabel.split(/\s+/));
  19276. }
  19277. });
  19278. var headers = cells.filter(function(cell) {
  19279. if (sanitize_default(cell.textContent) === '') {
  19280. return false;
  19281. }
  19282. return cell.nodeName.toUpperCase() === 'TH' || [ 'rowheader', 'columnheader' ].indexOf(cell.getAttribute('role')) !== -1;
  19283. });
  19284. var tableGrid = to_grid_default(node);
  19285. var out = true;
  19286. headers.forEach(function(header) {
  19287. if (header.getAttribute('id') && reffedHeaders.includes(header.getAttribute('id'))) {
  19288. return;
  19289. }
  19290. var pos = get_cell_position_default(header, tableGrid);
  19291. var hasCell = false;
  19292. if (is_column_header_default(header)) {
  19293. hasCell = traverse_default('down', pos, tableGrid).find(function(cell) {
  19294. return !is_column_header_default(cell) && get_headers_default(cell, tableGrid).includes(header);
  19295. });
  19296. }
  19297. if (!hasCell && is_row_header_default(header)) {
  19298. hasCell = traverse_default('right', pos, tableGrid).find(function(cell) {
  19299. return !is_row_header_default(cell) && get_headers_default(cell, tableGrid).includes(header);
  19300. });
  19301. }
  19302. if (!hasCell) {
  19303. checkResult.relatedNodes(header);
  19304. }
  19305. out = out && hasCell;
  19306. });
  19307. return out ? true : void 0;
  19308. }
  19309. var th_has_data_cells_evaluate_default = thHasDataCellsEvaluate;
  19310. function hiddenContentEvaluate(node, options, virtualNode) {
  19311. var allowlist = [ 'SCRIPT', 'HEAD', 'TITLE', 'NOSCRIPT', 'STYLE', 'TEMPLATE' ];
  19312. if (!allowlist.includes(node.nodeName.toUpperCase()) && has_content_virtual_default(virtualNode)) {
  19313. var styles = window.getComputedStyle(node);
  19314. if (styles.getPropertyValue('display') === 'none') {
  19315. return void 0;
  19316. } else if (styles.getPropertyValue('visibility') === 'hidden') {
  19317. var parent = get_composed_parent_default(node);
  19318. var parentStyle = parent && window.getComputedStyle(parent);
  19319. if (!parentStyle || parentStyle.getPropertyValue('visibility') !== 'hidden') {
  19320. return void 0;
  19321. }
  19322. }
  19323. }
  19324. return true;
  19325. }
  19326. var hidden_content_evaluate_default = hiddenContentEvaluate;
  19327. function ariaAllowedAttrMatches(node, virtualNode) {
  19328. var aria49 = /^aria-/;
  19329. var attrs = virtualNode.attrNames;
  19330. if (attrs.length) {
  19331. for (var _i23 = 0, l = attrs.length; _i23 < l; _i23++) {
  19332. if (aria49.test(attrs[_i23])) {
  19333. return true;
  19334. }
  19335. }
  19336. }
  19337. return false;
  19338. }
  19339. var aria_allowed_attr_matches_default = ariaAllowedAttrMatches;
  19340. function ariaAllowedRoleMatches(node, virtualNode) {
  19341. return get_explicit_role_default(virtualNode, {
  19342. dpub: true,
  19343. fallback: true
  19344. }) !== null;
  19345. }
  19346. var aria_allowed_role_matches_default = ariaAllowedRoleMatches;
  19347. function ariaHasAttrMatches(node, virtualNode) {
  19348. var aria49 = /^aria-/;
  19349. return virtualNode.attrNames.some(function(attr) {
  19350. return aria49.test(attr);
  19351. });
  19352. }
  19353. var aria_has_attr_matches_default = ariaHasAttrMatches;
  19354. function shouldMatchElement(el) {
  19355. if (!el) {
  19356. return true;
  19357. }
  19358. if (el.getAttribute('aria-hidden') === 'true') {
  19359. return false;
  19360. }
  19361. return shouldMatchElement(get_composed_parent_default(el));
  19362. }
  19363. function ariaHiddenFocusMatches(node) {
  19364. return shouldMatchElement(get_composed_parent_default(node));
  19365. }
  19366. var aria_hidden_focus_matches_default = ariaHiddenFocusMatches;
  19367. function ariaRequiredChildrenMatches(node, virtualNode) {
  19368. var role = get_explicit_role_default(virtualNode, {
  19369. dpub: true
  19370. });
  19371. return !!required_owned_default(role);
  19372. }
  19373. var aria_required_children_matches_default = ariaRequiredChildrenMatches;
  19374. function ariaRequiredParentMatches(node, virtualNode) {
  19375. var role = get_explicit_role_default(virtualNode);
  19376. return !!required_context_default(role);
  19377. }
  19378. var aria_required_parent_matches_default = ariaRequiredParentMatches;
  19379. function autocompleteMatches(node, virtualNode) {
  19380. var autocomplete2 = virtualNode.attr('autocomplete');
  19381. if (!autocomplete2 || sanitize_default(autocomplete2) === '') {
  19382. return false;
  19383. }
  19384. var nodeName2 = virtualNode.props.nodeName;
  19385. if ([ 'textarea', 'input', 'select' ].includes(nodeName2) === false) {
  19386. return false;
  19387. }
  19388. var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ];
  19389. if (nodeName2 === 'input' && excludedInputTypes.includes(virtualNode.props.type)) {
  19390. return false;
  19391. }
  19392. var ariaDisabled = virtualNode.attr('aria-disabled') || 'false';
  19393. if (virtualNode.hasAttr('disabled') || ariaDisabled.toLowerCase() === 'true') {
  19394. return false;
  19395. }
  19396. var role = virtualNode.attr('role');
  19397. var tabIndex = virtualNode.attr('tabindex');
  19398. if (tabIndex === '-1' && role) {
  19399. var roleDef = standards_default.ariaRoles[role];
  19400. if (roleDef === void 0 || roleDef.type !== 'widget') {
  19401. return false;
  19402. }
  19403. }
  19404. if (tabIndex === '-1' && virtualNode.actualNode && !is_visible_default(virtualNode.actualNode, false) && !is_visible_default(virtualNode.actualNode, true)) {
  19405. return false;
  19406. }
  19407. return true;
  19408. }
  19409. var autocomplete_matches_default = autocompleteMatches;
  19410. function isInitiatorMatches(node, virtualNode, context5) {
  19411. return context5.initiator;
  19412. }
  19413. var is_initiator_matches_default = isInitiatorMatches;
  19414. function bypassMatches(node, virtualNode, context5) {
  19415. if (is_initiator_matches_default(node, virtualNode, context5)) {
  19416. return !!node.querySelector('a[href]');
  19417. }
  19418. return true;
  19419. }
  19420. var bypass_matches_default = bypassMatches;
  19421. function colorContrastMatches(node, virtualNode) {
  19422. var _virtualNode$props = virtualNode.props, nodeName2 = _virtualNode$props.nodeName, inputType = _virtualNode$props.type;
  19423. if (nodeName2 === 'option') {
  19424. return false;
  19425. }
  19426. if (nodeName2 === 'select' && !node.options.length) {
  19427. return false;
  19428. }
  19429. var nonTextInput = [ 'hidden', 'range', 'color', 'checkbox', 'radio', 'image' ];
  19430. if (nodeName2 === 'input' && nonTextInput.includes(inputType)) {
  19431. return false;
  19432. }
  19433. if (is_disabled_default(virtualNode)) {
  19434. return false;
  19435. }
  19436. var formElements = [ 'input', 'select', 'textarea' ];
  19437. if (formElements.includes(nodeName2)) {
  19438. var style = window.getComputedStyle(node);
  19439. var textIndent = parseInt(style.getPropertyValue('text-indent'), 10);
  19440. if (textIndent) {
  19441. var rect = node.getBoundingClientRect();
  19442. rect = {
  19443. top: rect.top,
  19444. bottom: rect.bottom,
  19445. left: rect.left + textIndent,
  19446. right: rect.right + textIndent
  19447. };
  19448. if (!visually_overlaps_default(rect, node)) {
  19449. return false;
  19450. }
  19451. }
  19452. return true;
  19453. }
  19454. var nodeParentLabel = find_up_virtual_default(virtualNode, 'label');
  19455. if (nodeName2 === 'label' || nodeParentLabel) {
  19456. var labelNode = nodeParentLabel || node;
  19457. var labelVirtual3 = nodeParentLabel ? get_node_from_tree_default(nodeParentLabel) : virtualNode;
  19458. if (labelNode.htmlFor) {
  19459. var doc = get_root_node_default2(labelNode);
  19460. var explicitControl = doc.getElementById(labelNode.htmlFor);
  19461. var explicitControlVirtual = explicitControl && get_node_from_tree_default(explicitControl);
  19462. if (explicitControlVirtual && is_disabled_default(explicitControlVirtual)) {
  19463. return false;
  19464. }
  19465. }
  19466. var query = 'input:not([type="hidden"],[type="image"],[type="button"],[type="submit"],[type="reset"]), select, textarea';
  19467. var implicitControl = query_selector_all_default(labelVirtual3, query)[0];
  19468. if (implicitControl && is_disabled_default(implicitControl)) {
  19469. return false;
  19470. }
  19471. }
  19472. var ariaLabelledbyControls = [];
  19473. var ancestorNode = virtualNode;
  19474. while (ancestorNode) {
  19475. if (ancestorNode.props.id) {
  19476. var virtualControls = get_accessible_refs_default(ancestorNode).filter(function(control) {
  19477. return token_list_default(control.getAttribute('aria-labelledby') || '').includes(ancestorNode.props.id);
  19478. }).map(function(control) {
  19479. return get_node_from_tree_default(control);
  19480. });
  19481. ariaLabelledbyControls.push.apply(ariaLabelledbyControls, _toConsumableArray(virtualControls));
  19482. }
  19483. ancestorNode = ancestorNode.parent;
  19484. }
  19485. if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
  19486. return false;
  19487. }
  19488. var visibleText = visible_virtual_default(virtualNode, false, true);
  19489. var removeUnicodeOptions = {
  19490. emoji: true,
  19491. nonBmp: false,
  19492. punctuations: true
  19493. };
  19494. if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) {
  19495. return false;
  19496. }
  19497. var range = document.createRange();
  19498. var childNodes = virtualNode.children;
  19499. for (var index = 0; index < childNodes.length; index++) {
  19500. var child = childNodes[index];
  19501. if (child.actualNode.nodeType === 3 && sanitize_default(child.actualNode.nodeValue) !== '') {
  19502. range.selectNodeContents(child.actualNode);
  19503. }
  19504. }
  19505. var rects = range.getClientRects();
  19506. for (var _index = 0; _index < rects.length; _index++) {
  19507. if (visually_overlaps_default(rects[_index], node)) {
  19508. return true;
  19509. }
  19510. }
  19511. return false;
  19512. }
  19513. var color_contrast_matches_default = colorContrastMatches;
  19514. function dataTableLargeMatches(node) {
  19515. if (is_data_table_default(node)) {
  19516. var tableArray = to_grid_default(node);
  19517. return tableArray.length >= 3 && tableArray[0].length >= 3 && tableArray[1].length >= 3 && tableArray[2].length >= 3;
  19518. }
  19519. return false;
  19520. }
  19521. var data_table_large_matches_default = dataTableLargeMatches;
  19522. function dataTableMatches(node) {
  19523. return is_data_table_default(node);
  19524. }
  19525. var data_table_matches_default = dataTableMatches;
  19526. function duplicateIdActiveMatches(node) {
  19527. var id = node.getAttribute('id').trim();
  19528. var idSelector = '*[id="'.concat(escape_selector_default(id), '"]');
  19529. var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector));
  19530. return !is_accessible_ref_default(node) && idMatchingElms.some(is_focusable_default);
  19531. }
  19532. var duplicate_id_active_matches_default = duplicateIdActiveMatches;
  19533. function duplicateIdAriaMatches(node) {
  19534. return is_accessible_ref_default(node);
  19535. }
  19536. var duplicate_id_aria_matches_default = duplicateIdAriaMatches;
  19537. function duplicateIdMiscMatches(node) {
  19538. var id = node.getAttribute('id').trim();
  19539. var idSelector = '*[id="'.concat(escape_selector_default(id), '"]');
  19540. var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector));
  19541. return !is_accessible_ref_default(node) && idMatchingElms.every(function(elm) {
  19542. return !is_focusable_default(elm);
  19543. });
  19544. }
  19545. var duplicate_id_misc_matches_default = duplicateIdMiscMatches;
  19546. function frameFocusableContentMatches(node, virtualNode, context5) {
  19547. var _context5$size, _context5$size2;
  19548. return !context5.initiator && !context5.focusable && ((_context5$size = context5.size) === null || _context5$size === void 0 ? void 0 : _context5$size.width) * ((_context5$size2 = context5.size) === null || _context5$size2 === void 0 ? void 0 : _context5$size2.height) > 1;
  19549. }
  19550. var frame_focusable_content_matches_default = frameFocusableContentMatches;
  19551. function frameTitleHasTextMatches(node) {
  19552. var title = node.getAttribute('title');
  19553. return !!sanitize_default(title);
  19554. }
  19555. var frame_title_has_text_matches_default = frameTitleHasTextMatches;
  19556. function hasImplicitChromiumRoleMatches(node, virtualNode) {
  19557. return implicit_role_default(virtualNode, {
  19558. chromium: true
  19559. }) !== null;
  19560. }
  19561. var has_implicit_chromium_role_matches_default = hasImplicitChromiumRoleMatches;
  19562. function headingMatches(node) {
  19563. var explicitRoles;
  19564. if (node.hasAttribute('role')) {
  19565. explicitRoles = node.getAttribute('role').split(/\s+/i).filter(axe.commons.aria.isValidRole);
  19566. }
  19567. if (explicitRoles && explicitRoles.length > 0) {
  19568. return explicitRoles.includes('heading');
  19569. } else {
  19570. return axe.commons.aria.implicitRole(node) === 'heading';
  19571. }
  19572. }
  19573. var heading_matches_default = headingMatches;
  19574. function svgNamespaceMatches(node, virtualNode) {
  19575. try {
  19576. var nodeName2 = virtualNode.props.nodeName;
  19577. if (nodeName2 === 'svg') {
  19578. return true;
  19579. }
  19580. return !!closest_default(virtualNode, 'svg');
  19581. } catch (e) {
  19582. return false;
  19583. }
  19584. }
  19585. var svg_namespace_matches_default = svgNamespaceMatches;
  19586. function htmlNamespaceMatches(node, virtualNode) {
  19587. return !svg_namespace_matches_default(node, virtualNode);
  19588. }
  19589. var html_namespace_matches_default = htmlNamespaceMatches;
  19590. function identicalLinksSamePurposeMatches(node, virtualNode) {
  19591. var hasAccName = !!accessible_text_virtual_default(virtualNode);
  19592. if (!hasAccName) {
  19593. return false;
  19594. }
  19595. var role = get_role_default(node);
  19596. if (role && role !== 'link') {
  19597. return false;
  19598. }
  19599. return true;
  19600. }
  19601. var identical_links_same_purpose_matches_default = identicalLinksSamePurposeMatches;
  19602. function insertedIntoFocusOrderMatches(node) {
  19603. return inserted_into_focus_order_default(node);
  19604. }
  19605. var inserted_into_focus_order_matches_default = insertedIntoFocusOrderMatches;
  19606. function labelContentNameMismatchMatches(node, virtualNode) {
  19607. var role = get_role_default(node);
  19608. if (!role) {
  19609. return false;
  19610. }
  19611. var widgetRoles = get_aria_roles_by_type_default('widget');
  19612. var isWidgetType = widgetRoles.includes(role);
  19613. if (!isWidgetType) {
  19614. return false;
  19615. }
  19616. var rolesWithNameFromContents = get_aria_roles_supporting_name_from_content_default();
  19617. if (!rolesWithNameFromContents.includes(role)) {
  19618. return false;
  19619. }
  19620. if (!sanitize_default(arialabel_text_default(virtualNode)) && !sanitize_default(arialabelledby_text_default(node))) {
  19621. return false;
  19622. }
  19623. if (!sanitize_default(visible_virtual_default(virtualNode))) {
  19624. return false;
  19625. }
  19626. return true;
  19627. }
  19628. var label_content_name_mismatch_matches_default = labelContentNameMismatchMatches;
  19629. function labelMatches(node, virtualNode) {
  19630. if (virtualNode.props.nodeName !== 'input' || virtualNode.hasAttr('type') === false) {
  19631. return true;
  19632. }
  19633. var type = virtualNode.attr('type').toLowerCase();
  19634. return [ 'hidden', 'image', 'button', 'submit', 'reset' ].includes(type) === false;
  19635. }
  19636. var label_matches_default = labelMatches;
  19637. function landmarkHasBodyContextMatches(node, virtualNode) {
  19638. var nativeScopeFilter = 'article, aside, main, nav, section';
  19639. return node.hasAttribute('role') || !find_up_virtual_default(virtualNode, nativeScopeFilter);
  19640. }
  19641. var landmark_has_body_context_matches_default = landmarkHasBodyContextMatches;
  19642. function landmarkUniqueMatches(node, virtualNode) {
  19643. var excludedParentsForHeaderFooterLandmarks = [ 'article', 'aside', 'main', 'nav', 'section' ].join(',');
  19644. function isHeaderFooterLandmark(headerFooterElement) {
  19645. return !find_up_virtual_default(headerFooterElement, excludedParentsForHeaderFooterLandmarks);
  19646. }
  19647. function isLandmarkVirtual(virtualNode2) {
  19648. var actualNode = virtualNode2.actualNode;
  19649. var landmarkRoles3 = get_aria_roles_by_type_default('landmark');
  19650. var role = get_role_default(actualNode);
  19651. if (!role) {
  19652. return false;
  19653. }
  19654. var nodeName2 = actualNode.nodeName.toUpperCase();
  19655. if (nodeName2 === 'HEADER' || nodeName2 === 'FOOTER') {
  19656. return isHeaderFooterLandmark(virtualNode2);
  19657. }
  19658. if (nodeName2 === 'SECTION' || nodeName2 === 'FORM') {
  19659. var accessibleText2 = accessible_text_virtual_default(virtualNode2);
  19660. return !!accessibleText2;
  19661. }
  19662. return landmarkRoles3.indexOf(role) >= 0 || role === 'region';
  19663. }
  19664. return isLandmarkVirtual(virtualNode) && is_visible_default(node, true);
  19665. }
  19666. var landmark_unique_matches_default = landmarkUniqueMatches;
  19667. function dataTableMatches2(node) {
  19668. return !is_data_table_default(node) && !is_focusable_default(node);
  19669. }
  19670. var layout_table_matches_default = dataTableMatches2;
  19671. function linkInTextBlockMatches(node) {
  19672. var text32 = sanitize_default(node.textContent);
  19673. var role = node.getAttribute('role');
  19674. if (role && role !== 'link') {
  19675. return false;
  19676. }
  19677. if (!text32) {
  19678. return false;
  19679. }
  19680. if (!is_visible_default(node, false)) {
  19681. return false;
  19682. }
  19683. return is_in_text_block_default(node);
  19684. }
  19685. var link_in_text_block_matches_default = linkInTextBlockMatches;
  19686. function nestedInteractiveMatches(node, virtualNode) {
  19687. var role = get_role_default(virtualNode);
  19688. if (!role) {
  19689. return false;
  19690. }
  19691. return !!standards_default.ariaRoles[role].childrenPresentational;
  19692. }
  19693. var nested_interactive_matches_default = nestedInteractiveMatches;
  19694. function noAutoplayAudioMatches(node) {
  19695. if (!node.currentSrc) {
  19696. return false;
  19697. }
  19698. if (node.hasAttribute('paused') || node.hasAttribute('muted')) {
  19699. return false;
  19700. }
  19701. return true;
  19702. }
  19703. var no_autoplay_audio_matches_default = noAutoplayAudioMatches;
  19704. function noEmptyRoleMatches(node, virtualNode) {
  19705. if (!virtualNode.hasAttr('role')) {
  19706. return false;
  19707. }
  19708. if (!virtualNode.attr('role').trim()) {
  19709. return false;
  19710. }
  19711. return true;
  19712. }
  19713. var no_empty_role_matches_default = noEmptyRoleMatches;
  19714. function noExplicitNameRequired(node, virtualNode) {
  19715. var role = get_explicit_role_default(virtualNode);
  19716. if (!role || [ 'none', 'presentation' ].includes(role)) {
  19717. return true;
  19718. }
  19719. var _ref85 = aria_roles_default[role] || {}, accessibleNameRequired = _ref85.accessibleNameRequired;
  19720. if (accessibleNameRequired || is_focusable_default(virtualNode)) {
  19721. return true;
  19722. }
  19723. return false;
  19724. }
  19725. var no_explicit_name_required_matches_default = noExplicitNameRequired;
  19726. function noNamingMethodMatches(node, virtualNode) {
  19727. var _get_element_spec_def3 = get_element_spec_default(virtualNode), namingMethods = _get_element_spec_def3.namingMethods;
  19728. if (namingMethods && namingMethods.length !== 0) {
  19729. return false;
  19730. }
  19731. if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) {
  19732. return false;
  19733. }
  19734. return true;
  19735. }
  19736. var no_naming_method_matches_default = noNamingMethodMatches;
  19737. function noRoleMatches(node) {
  19738. return !node.getAttribute('role');
  19739. }
  19740. var no_role_matches_default = noRoleMatches;
  19741. function notHtmlMatches(node, virtualNode) {
  19742. return virtualNode.props.nodeName !== 'html';
  19743. }
  19744. var not_html_matches_default = notHtmlMatches;
  19745. function pAsHeadingMatches(node) {
  19746. var children = Array.from(node.parentNode.childNodes);
  19747. var nodeText = node.textContent.trim();
  19748. var isSentence = /[.!?:;](?![.!?:;])/g;
  19749. if (nodeText.length === 0 || (nodeText.match(isSentence) || []).length >= 2) {
  19750. return false;
  19751. }
  19752. var siblingsAfter = children.slice(children.indexOf(node) + 1).filter(function(elm) {
  19753. return elm.nodeName.toUpperCase() === 'P' && elm.textContent.trim() !== '';
  19754. });
  19755. return siblingsAfter.length !== 0;
  19756. }
  19757. var p_as_heading_matches_default = pAsHeadingMatches;
  19758. function presentationRoleConflictMatches(node, virtualNode) {
  19759. return implicit_role_default(virtualNode, {
  19760. chromiumRoles: true
  19761. }) !== null;
  19762. }
  19763. var presentation_role_conflict_matches_default = presentationRoleConflictMatches;
  19764. function scrollableRegionFocusableMatches(node, virtualNode) {
  19765. if (!!_getScroll(node, 13) === false) {
  19766. return false;
  19767. }
  19768. var role = get_explicit_role_default(virtualNode);
  19769. if (aria_attrs_default['aria-haspopup'].values.includes(role)) {
  19770. if (closest_default(virtualNode, '[role~="combobox"]')) {
  19771. return false;
  19772. }
  19773. var id = virtualNode.attr('id');
  19774. if (id) {
  19775. var doc = get_root_node_default(node);
  19776. var owned = Array.from(doc.querySelectorAll('[aria-owns~="'.concat(id, '"], [aria-controls~="').concat(id, '"]')));
  19777. var comboboxOwned = owned.some(function(el) {
  19778. var roles = token_list_default(el.getAttribute('role'));
  19779. return roles.includes('combobox');
  19780. });
  19781. if (comboboxOwned) {
  19782. return false;
  19783. }
  19784. }
  19785. }
  19786. var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
  19787. var hasVisibleChildren = nodeAndDescendents.some(function(elm) {
  19788. return has_content_virtual_default(elm, true, true);
  19789. });
  19790. if (!hasVisibleChildren) {
  19791. return false;
  19792. }
  19793. return true;
  19794. }
  19795. var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches;
  19796. function skipLinkMatches(node) {
  19797. return _isSkipLink(node) && is_offscreen_default(node);
  19798. }
  19799. var skip_link_matches_default = skipLinkMatches;
  19800. function windowIsTopMatches(node) {
  19801. return node.ownerDocument.defaultView.self === node.ownerDocument.defaultView.top;
  19802. }
  19803. var window_is_top_matches_default = windowIsTopMatches;
  19804. function xmlLangMismatchMatches(node) {
  19805. var primaryLangValue = get_base_lang_default(node.getAttribute('lang'));
  19806. var primaryXmlLangValue = get_base_lang_default(node.getAttribute('xml:lang'));
  19807. return valid_langs_default(primaryLangValue) && valid_langs_default(primaryXmlLangValue);
  19808. }
  19809. var xml_lang_mismatch_matches_default = xmlLangMismatchMatches;
  19810. var metadataFunctionMap = {
  19811. 'abstractrole-evaluate': abstractrole_evaluate_default,
  19812. 'accesskeys-after': accesskeys_after_default,
  19813. 'accesskeys-evaluate': accesskeys_evaluate_default,
  19814. 'alt-space-value-evaluate': alt_space_value_evaluate_default,
  19815. 'aria-allowed-attr-evaluate': aria_allowed_attr_evaluate_default,
  19816. 'aria-allowed-attr-matches': aria_allowed_attr_matches_default,
  19817. 'aria-allowed-role-evaluate': aria_allowed_role_evaluate_default,
  19818. 'aria-allowed-role-matches': aria_allowed_role_matches_default,
  19819. 'aria-errormessage-evaluate': aria_errormessage_evaluate_default,
  19820. 'aria-has-attr-matches': aria_has_attr_matches_default,
  19821. 'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default,
  19822. 'aria-hidden-focus-matches': aria_hidden_focus_matches_default,
  19823. 'aria-label-evaluate': aria_label_evaluate_default,
  19824. 'aria-labelledby-evaluate': aria_labelledby_evaluate_default,
  19825. 'aria-level-evaluate': aria_level_evaluate_default,
  19826. 'aria-prohibited-attr-evaluate': ariaProhibitedAttrEvaluate,
  19827. 'aria-required-attr-evaluate': aria_required_attr_evaluate_default,
  19828. 'aria-required-children-evaluate': aria_required_children_evaluate_default,
  19829. 'aria-required-children-matches': aria_required_children_matches_default,
  19830. 'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
  19831. 'aria-required-parent-matches': aria_required_parent_matches_default,
  19832. 'aria-roledescription-evaluate': aria_roledescription_evaluate_default,
  19833. 'aria-unsupported-attr-evaluate': aria_unsupported_attr_evaluate_default,
  19834. 'aria-valid-attr-evaluate': aria_valid_attr_evaluate_default,
  19835. 'aria-valid-attr-value-evaluate': aria_valid_attr_value_evaluate_default,
  19836. 'attr-non-space-content-evaluate': attr_non_space_content_evaluate_default,
  19837. 'autocomplete-appropriate-evaluate': autocomplete_appropriate_evaluate_default,
  19838. 'autocomplete-matches': autocomplete_matches_default,
  19839. 'autocomplete-valid-evaluate': autocomplete_valid_evaluate_default,
  19840. 'avoid-inline-spacing-evaluate': avoid_inline_spacing_evaluate_default,
  19841. 'bypass-matches': bypass_matches_default,
  19842. 'caption-evaluate': caption_evaluate_default,
  19843. 'caption-faked-evaluate': caption_faked_evaluate_default,
  19844. 'color-contrast-evaluate': colorContrastEvaluate,
  19845. 'color-contrast-matches': color_contrast_matches_default,
  19846. 'css-orientation-lock-evaluate': css_orientation_lock_evaluate_default,
  19847. 'data-table-large-matches': data_table_large_matches_default,
  19848. 'data-table-matches': data_table_matches_default,
  19849. 'deprecatedrole-evaluate': deprecatedroleEvaluate,
  19850. 'dlitem-evaluate': dlitem_evaluate_default,
  19851. 'doc-has-title-evaluate': doc_has_title_evaluate_default,
  19852. 'duplicate-id-active-matches': duplicate_id_active_matches_default,
  19853. 'duplicate-id-after': duplicate_id_after_default,
  19854. 'duplicate-id-aria-matches': duplicate_id_aria_matches_default,
  19855. 'duplicate-id-evaluate': duplicate_id_evaluate_default,
  19856. 'duplicate-id-misc-matches': duplicate_id_misc_matches_default,
  19857. 'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
  19858. 'exists-evaluate': exists_evaluate_default,
  19859. 'explicit-evaluate': explicit_evaluate_default,
  19860. 'fallbackrole-evaluate': fallbackrole_evaluate_default,
  19861. 'focusable-content-evaluate': focusable_content_evaluate_default,
  19862. 'focusable-disabled-evaluate': focusable_disabled_evaluate_default,
  19863. 'focusable-element-evaluate': focusable_element_evaluate_default,
  19864. 'focusable-modal-open-evaluate': focusable_modal_open_evaluate_default,
  19865. 'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
  19866. 'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
  19867. 'frame-focusable-content-evaluate': frame_focusable_content_evaluate_default,
  19868. 'frame-focusable-content-matches': frame_focusable_content_matches_default,
  19869. 'frame-tested-after': frame_tested_after_default,
  19870. 'frame-tested-evaluate': frame_tested_evaluate_default,
  19871. 'frame-title-has-text-matches': frame_title_has_text_matches_default,
  19872. 'has-alt-evaluate': has_alt_evaluate_default,
  19873. 'has-descendant-after': has_descendant_after_default,
  19874. 'has-descendant-evaluate': has_descendant_evaluate_default,
  19875. 'has-global-aria-attribute-evaluate': has_global_aria_attribute_evaluate_default,
  19876. 'has-implicit-chromium-role-matches': has_implicit_chromium_role_matches_default,
  19877. 'has-lang-evaluate': has_lang_evaluate_default,
  19878. 'has-text-content-evaluate': has_text_content_evaluate_default,
  19879. 'has-widget-role-evaluate': has_widget_role_evaluate_default,
  19880. 'heading-matches': heading_matches_default,
  19881. 'heading-order-after': headingOrderAfter,
  19882. 'heading-order-evaluate': heading_order_evaluate_default,
  19883. 'help-same-as-label-evaluate': help_same_as_label_evaluate_default,
  19884. 'hidden-content-evaluate': hidden_content_evaluate_default,
  19885. 'hidden-explicit-label-evaluate': hidden_explicit_label_evaluate_default,
  19886. 'html-namespace-matches': html_namespace_matches_default,
  19887. 'html5-scope-evaluate': html5_scope_evaluate_default,
  19888. 'identical-links-same-purpose-after': identical_links_same_purpose_after_default,
  19889. 'identical-links-same-purpose-evaluate': identical_links_same_purpose_evaluate_default,
  19890. 'identical-links-same-purpose-matches': identical_links_same_purpose_matches_default,
  19891. 'implicit-evaluate': implicit_evaluate_default,
  19892. 'inserted-into-focus-order-matches': inserted_into_focus_order_matches_default,
  19893. 'internal-link-present-evaluate': internal_link_present_evaluate_default,
  19894. 'invalidrole-evaluate': invalidrole_evaluate_default,
  19895. 'is-element-focusable-evaluate': is_element_focusable_evaluate_default,
  19896. 'is-initiator-matches': is_initiator_matches_default,
  19897. 'is-on-screen-evaluate': is_on_screen_evaluate_default,
  19898. 'label-content-name-mismatch-evaluate': label_content_name_mismatch_evaluate_default,
  19899. 'label-content-name-mismatch-matches': label_content_name_mismatch_matches_default,
  19900. 'label-matches': label_matches_default,
  19901. 'landmark-has-body-context-matches': landmark_has_body_context_matches_default,
  19902. 'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
  19903. 'landmark-is-unique-after': landmark_is_unique_after_default,
  19904. 'landmark-is-unique-evaluate': landmark_is_unique_evaluate_default,
  19905. 'landmark-unique-matches': landmark_unique_matches_default,
  19906. 'layout-table-matches': layout_table_matches_default,
  19907. 'link-in-text-block-evaluate': link_in_text_block_evaluate_default,
  19908. 'link-in-text-block-matches': link_in_text_block_matches_default,
  19909. 'listitem-evaluate': listitemEvaluate,
  19910. 'matches-definition-evaluate': matches_definition_evaluate_default,
  19911. 'meta-refresh-evaluate': meta_refresh_evaluate_default,
  19912. 'meta-viewport-scale-evaluate': meta_viewport_scale_evaluate_default,
  19913. 'multiple-label-evaluate': multiple_label_evaluate_default,
  19914. 'nested-interactive-matches': nested_interactive_matches_default,
  19915. 'no-autoplay-audio-evaluate': no_autoplay_audio_evaluate_default,
  19916. 'no-autoplay-audio-matches': no_autoplay_audio_matches_default,
  19917. 'no-empty-role-matches': no_empty_role_matches_default,
  19918. 'no-explicit-name-required-matches': no_explicit_name_required_matches_default,
  19919. 'no-focusable-content-evaluate': noFocusableContentEvaluate,
  19920. 'no-implicit-explicit-label-evaluate': no_implicit_explicit_label_evaluate_default,
  19921. 'no-naming-method-matches': no_naming_method_matches_default,
  19922. 'no-role-matches': no_role_matches_default,
  19923. 'non-empty-if-present-evaluate': non_empty_if_present_evaluate_default,
  19924. 'not-html-matches': not_html_matches_default,
  19925. 'only-dlitems-evaluate': only_dlitems_evaluate_default,
  19926. 'only-listitems-evaluate': only_listitems_evaluate_default,
  19927. 'p-as-heading-evaluate': p_as_heading_evaluate_default,
  19928. 'p-as-heading-matches': p_as_heading_matches_default,
  19929. 'page-no-duplicate-after': page_no_duplicate_after_default,
  19930. 'page-no-duplicate-evaluate': page_no_duplicate_evaluate_default,
  19931. 'presentation-role-conflict-matches': presentation_role_conflict_matches_default,
  19932. 'presentational-role-evaluate': presentational_role_evaluate_default,
  19933. 'region-after': region_after_default,
  19934. 'region-evaluate': region_evaluate_default,
  19935. 'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
  19936. 'scope-value-evaluate': scope_value_evaluate_default,
  19937. 'scrollable-region-focusable-matches': scrollable_region_focusable_matches_default,
  19938. 'skip-link-evaluate': skip_link_evaluate_default,
  19939. 'skip-link-matches': skip_link_matches_default,
  19940. 'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
  19941. 'svg-namespace-matches': svg_namespace_matches_default,
  19942. 'svg-non-empty-title-evaluate': svg_non_empty_title_evaluate_default,
  19943. 'tabindex-evaluate': tabindex_evaluate_default,
  19944. 'td-has-header-evaluate': td_has_header_evaluate_default,
  19945. 'td-headers-attr-evaluate': td_headers_attr_evaluate_default,
  19946. 'th-has-data-cells-evaluate': th_has_data_cells_evaluate_default,
  19947. 'title-only-evaluate': title_only_evaluate_default,
  19948. 'unique-frame-title-after': unique_frame_title_after_default,
  19949. 'unique-frame-title-evaluate': unique_frame_title_evaluate_default,
  19950. 'unsupportedrole-evaluate': unsupportedrole_evaluate_default,
  19951. 'valid-lang-evaluate': valid_lang_evaluate_default,
  19952. 'valid-scrollable-semantics-evaluate': valid_scrollable_semantics_evaluate_default,
  19953. 'window-is-top-matches': window_is_top_matches_default,
  19954. 'xml-lang-mismatch-evaluate': xml_lang_mismatch_evaluate_default,
  19955. 'xml-lang-mismatch-matches': xml_lang_mismatch_matches_default
  19956. };
  19957. var metadata_function_map_default = metadataFunctionMap;
  19958. function CheckResult(check4) {
  19959. this.id = check4.id;
  19960. this.data = null;
  19961. this.relatedNodes = [];
  19962. this.result = null;
  19963. }
  19964. var check_result_default = CheckResult;
  19965. function createExecutionContext(spec) {
  19966. if (typeof spec === 'string') {
  19967. if (metadata_function_map_default[spec]) {
  19968. return metadata_function_map_default[spec];
  19969. }
  19970. if (/^\s*function[\s\w]*\(/.test(spec)) {
  19971. return new Function('return ' + spec + ';')();
  19972. }
  19973. throw new ReferenceError('Function ID does not exist in the metadata-function-map: '.concat(spec));
  19974. }
  19975. return spec;
  19976. }
  19977. function normalizeOptions() {
  19978. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19979. if (Array.isArray(options) || _typeof(options) !== 'object') {
  19980. options = {
  19981. value: options
  19982. };
  19983. }
  19984. return options;
  19985. }
  19986. function Check(spec) {
  19987. if (spec) {
  19988. this.id = spec.id;
  19989. this.configure(spec);
  19990. }
  19991. }
  19992. Check.prototype.enabled = true;
  19993. Check.prototype.run = function run(node, options, context5, resolve, reject) {
  19994. options = options || {};
  19995. var enabled = options.hasOwnProperty('enabled') ? options.enabled : this.enabled;
  19996. var checkOptions = this.getOptions(options.options);
  19997. if (enabled) {
  19998. var checkResult = new check_result_default(this);
  19999. var helper = check_helper_default(checkResult, options, resolve, reject);
  20000. var result;
  20001. try {
  20002. result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context5);
  20003. } catch (e) {
  20004. if (node && node.actualNode) {
  20005. e.errorNode = new dq_element_default(node).toJSON();
  20006. }
  20007. reject(e);
  20008. return;
  20009. }
  20010. if (!helper.isAsync) {
  20011. checkResult.result = result;
  20012. resolve(checkResult);
  20013. }
  20014. } else {
  20015. resolve(null);
  20016. }
  20017. };
  20018. Check.prototype.runSync = function runSync(node, options, context5) {
  20019. options = options || {};
  20020. var _options = options, _options$enabled = _options.enabled, enabled = _options$enabled === void 0 ? this.enabled : _options$enabled;
  20021. if (!enabled) {
  20022. return null;
  20023. }
  20024. var checkOptions = this.getOptions(options.options);
  20025. var checkResult = new check_result_default(this);
  20026. var helper = check_helper_default(checkResult, options);
  20027. helper.async = function async() {
  20028. throw new Error('Cannot run async check while in a synchronous run');
  20029. };
  20030. var result;
  20031. try {
  20032. result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context5);
  20033. } catch (e) {
  20034. if (node && node.actualNode) {
  20035. e.errorNode = new dq_element_default(node).toJSON();
  20036. }
  20037. throw e;
  20038. }
  20039. checkResult.result = result;
  20040. return checkResult;
  20041. };
  20042. Check.prototype.configure = function configure(spec) {
  20043. var _this4 = this;
  20044. if (!spec.evaluate || metadata_function_map_default[spec.evaluate]) {
  20045. this._internalCheck = true;
  20046. }
  20047. if (spec.hasOwnProperty('enabled')) {
  20048. this.enabled = spec.enabled;
  20049. }
  20050. if (spec.hasOwnProperty('options')) {
  20051. if (this._internalCheck) {
  20052. this.options = normalizeOptions(spec.options);
  20053. } else {
  20054. this.options = spec.options;
  20055. }
  20056. }
  20057. [ 'evaluate', 'after' ].filter(function(prop) {
  20058. return spec.hasOwnProperty(prop);
  20059. }).forEach(function(prop) {
  20060. return _this4[prop] = createExecutionContext(spec[prop]);
  20061. });
  20062. };
  20063. Check.prototype.getOptions = function getOptions(options) {
  20064. if (this._internalCheck) {
  20065. return deep_merge_default(this.options, normalizeOptions(options || {}));
  20066. } else {
  20067. return options || this.options;
  20068. }
  20069. };
  20070. var check_default = Check;
  20071. function RuleResult(rule3) {
  20072. this.id = rule3.id;
  20073. this.result = constants_default.NA;
  20074. this.pageLevel = rule3.pageLevel;
  20075. this.impact = null;
  20076. this.nodes = [];
  20077. }
  20078. var rule_result_default = RuleResult;
  20079. function Rule(spec, parentAudit) {
  20080. this._audit = parentAudit;
  20081. this.id = spec.id;
  20082. this.selector = spec.selector || '*';
  20083. if (spec.impact) {
  20084. assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));
  20085. this.impact = spec.impact;
  20086. }
  20087. this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;
  20088. this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;
  20089. this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;
  20090. this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;
  20091. this.any = spec.any || [];
  20092. this.all = spec.all || [];
  20093. this.none = spec.none || [];
  20094. this.tags = spec.tags || [];
  20095. this.preload = spec.preload ? true : false;
  20096. if (spec.matches) {
  20097. this.matches = createExecutionContext(spec.matches);
  20098. }
  20099. }
  20100. Rule.prototype.matches = function matches13() {
  20101. return true;
  20102. };
  20103. Rule.prototype.gather = function gather(context5) {
  20104. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20105. var markStart = 'mark_gather_start_' + this.id;
  20106. var markEnd = 'mark_gather_end_' + this.id;
  20107. var markHiddenStart = 'mark_isHidden_start_' + this.id;
  20108. var markHiddenEnd = 'mark_isHidden_end_' + this.id;
  20109. if (options.performanceTimer) {
  20110. performance_timer_default.mark(markStart);
  20111. }
  20112. var elements = select_default(this.selector, context5);
  20113. if (this.excludeHidden) {
  20114. if (options.performanceTimer) {
  20115. performance_timer_default.mark(markHiddenStart);
  20116. }
  20117. elements = elements.filter(function(element) {
  20118. return !is_hidden_default(element.actualNode);
  20119. });
  20120. if (options.performanceTimer) {
  20121. performance_timer_default.mark(markHiddenEnd);
  20122. performance_timer_default.measure('rule_' + this.id + '#gather_axe.utils.isHidden', markHiddenStart, markHiddenEnd);
  20123. }
  20124. }
  20125. if (options.performanceTimer) {
  20126. performance_timer_default.mark(markEnd);
  20127. performance_timer_default.measure('rule_' + this.id + '#gather', markStart, markEnd);
  20128. }
  20129. return elements;
  20130. };
  20131. Rule.prototype.runChecks = function runChecks(type, node, options, context5, resolve, reject) {
  20132. var self2 = this;
  20133. var checkQueue = queue_default();
  20134. this[type].forEach(function(c) {
  20135. var check4 = self2._audit.checks[c.id || c];
  20136. var option = get_check_option_default(check4, self2.id, options);
  20137. checkQueue.defer(function(res, rej) {
  20138. check4.run(node, option, context5, res, rej);
  20139. });
  20140. });
  20141. checkQueue.then(function(results) {
  20142. results = results.filter(function(check4) {
  20143. return check4;
  20144. });
  20145. resolve({
  20146. type: type,
  20147. results: results
  20148. });
  20149. })['catch'](reject);
  20150. };
  20151. Rule.prototype.runChecksSync = function runChecksSync(type, node, options, context5) {
  20152. var self2 = this;
  20153. var results = [];
  20154. this[type].forEach(function(c) {
  20155. var check4 = self2._audit.checks[c.id || c];
  20156. var option = get_check_option_default(check4, self2.id, options);
  20157. results.push(check4.runSync(node, option, context5));
  20158. });
  20159. results = results.filter(function(check4) {
  20160. return check4;
  20161. });
  20162. return {
  20163. type: type,
  20164. results: results
  20165. };
  20166. };
  20167. Rule.prototype.run = function run2(context5) {
  20168. var _this5 = this;
  20169. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20170. var resolve = arguments.length > 2 ? arguments[2] : undefined;
  20171. var reject = arguments.length > 3 ? arguments[3] : undefined;
  20172. if (options.performanceTimer) {
  20173. this._trackPerformance();
  20174. }
  20175. var q = queue_default();
  20176. var ruleResult = new rule_result_default(this);
  20177. var nodes;
  20178. try {
  20179. nodes = this.gatherAndMatchNodes(context5, options);
  20180. } catch (error) {
  20181. reject(new SupportError({
  20182. cause: error,
  20183. ruleId: this.id
  20184. }));
  20185. return;
  20186. }
  20187. if (options.performanceTimer) {
  20188. this._logGatherPerformance(nodes);
  20189. }
  20190. nodes.forEach(function(node) {
  20191. q.defer(function(resolveNode, rejectNode) {
  20192. var checkQueue = queue_default();
  20193. [ 'any', 'all', 'none' ].forEach(function(type) {
  20194. checkQueue.defer(function(res, rej) {
  20195. _this5.runChecks(type, node, options, context5, res, rej);
  20196. });
  20197. });
  20198. checkQueue.then(function(results) {
  20199. var result = getResult(results);
  20200. if (result) {
  20201. result.node = new dq_element_default(node, options);
  20202. ruleResult.nodes.push(result);
  20203. if (_this5.reviewOnFail) {
  20204. [ 'any', 'all' ].forEach(function(type) {
  20205. result[type].forEach(function(checkResult) {
  20206. if (checkResult.result === false) {
  20207. checkResult.result = void 0;
  20208. }
  20209. });
  20210. });
  20211. result.none.forEach(function(checkResult) {
  20212. if (checkResult.result === true) {
  20213. checkResult.result = void 0;
  20214. }
  20215. });
  20216. }
  20217. }
  20218. resolveNode();
  20219. })['catch'](function(err2) {
  20220. return rejectNode(err2);
  20221. });
  20222. });
  20223. });
  20224. q.defer(function(resolve2) {
  20225. return setTimeout(resolve2, 0);
  20226. });
  20227. if (options.performanceTimer) {
  20228. this._logRulePerformance();
  20229. }
  20230. q.then(function() {
  20231. return resolve(ruleResult);
  20232. })['catch'](function(error) {
  20233. return reject(error);
  20234. });
  20235. };
  20236. Rule.prototype.runSync = function runSync2(context5) {
  20237. var _this6 = this;
  20238. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20239. if (options.performanceTimer) {
  20240. this._trackPerformance();
  20241. }
  20242. var ruleResult = new rule_result_default(this);
  20243. var nodes;
  20244. try {
  20245. nodes = this.gatherAndMatchNodes(context5, options);
  20246. } catch (error) {
  20247. throw new SupportError({
  20248. cause: error,
  20249. ruleId: this.id
  20250. });
  20251. }
  20252. if (options.performanceTimer) {
  20253. this._logGatherPerformance(nodes);
  20254. }
  20255. nodes.forEach(function(node) {
  20256. var results = [];
  20257. [ 'any', 'all', 'none' ].forEach(function(type) {
  20258. results.push(_this6.runChecksSync(type, node, options, context5));
  20259. });
  20260. var result = getResult(results);
  20261. if (result) {
  20262. result.node = node.actualNode ? new dq_element_default(node, options) : null;
  20263. ruleResult.nodes.push(result);
  20264. if (_this6.reviewOnFail) {
  20265. [ 'any', 'all' ].forEach(function(type) {
  20266. result[type].forEach(function(checkResult) {
  20267. if (checkResult.result === false) {
  20268. checkResult.result = void 0;
  20269. }
  20270. });
  20271. });
  20272. result.none.forEach(function(checkResult) {
  20273. if (checkResult.result === true) {
  20274. checkResult.result = void 0;
  20275. }
  20276. });
  20277. }
  20278. }
  20279. });
  20280. if (options.performanceTimer) {
  20281. this._logRulePerformance();
  20282. }
  20283. return ruleResult;
  20284. };
  20285. Rule.prototype._trackPerformance = function _trackPerformance() {
  20286. this._markStart = 'mark_rule_start_' + this.id;
  20287. this._markEnd = 'mark_rule_end_' + this.id;
  20288. this._markChecksStart = 'mark_runchecks_start_' + this.id;
  20289. this._markChecksEnd = 'mark_runchecks_end_' + this.id;
  20290. };
  20291. Rule.prototype._logGatherPerformance = function _logGatherPerformance(nodes) {
  20292. log_default('gather (', nodes.length, '):', performance_timer_default.timeElapsed() + 'ms');
  20293. performance_timer_default.mark(this._markChecksStart);
  20294. };
  20295. Rule.prototype._logRulePerformance = function _logRulePerformance() {
  20296. performance_timer_default.mark(this._markChecksEnd);
  20297. performance_timer_default.mark(this._markEnd);
  20298. performance_timer_default.measure('runchecks_' + this.id, this._markChecksStart, this._markChecksEnd);
  20299. performance_timer_default.measure('rule_' + this.id, this._markStart, this._markEnd);
  20300. };
  20301. function getResult(results) {
  20302. if (results.length) {
  20303. var hasResults = false;
  20304. var result = {};
  20305. results.forEach(function(r) {
  20306. var res = r.results.filter(function(result2) {
  20307. return result2;
  20308. });
  20309. result[r.type] = res;
  20310. if (res.length) {
  20311. hasResults = true;
  20312. }
  20313. });
  20314. if (hasResults) {
  20315. return result;
  20316. }
  20317. return null;
  20318. }
  20319. }
  20320. Rule.prototype.gatherAndMatchNodes = function gatherAndMatchNodes(context5, options) {
  20321. var _this7 = this;
  20322. var markMatchesStart = 'mark_matches_start_' + this.id;
  20323. var markMatchesEnd = 'mark_matches_end_' + this.id;
  20324. var nodes = this.gather(context5, options);
  20325. if (options.performanceTimer) {
  20326. performance_timer_default.mark(markMatchesStart);
  20327. }
  20328. nodes = nodes.filter(function(node) {
  20329. return _this7.matches(node.actualNode, node, context5);
  20330. });
  20331. if (options.performanceTimer) {
  20332. performance_timer_default.mark(markMatchesEnd);
  20333. performance_timer_default.measure('rule_' + this.id + '#matches', markMatchesStart, markMatchesEnd);
  20334. }
  20335. return nodes;
  20336. };
  20337. function findAfterChecks(rule3) {
  20338. return get_all_checks_default(rule3).map(function(c) {
  20339. var check4 = rule3._audit.checks[c.id || c];
  20340. return check4 && typeof check4.after === 'function' ? check4 : null;
  20341. }).filter(Boolean);
  20342. }
  20343. function findCheckResults(nodes, checkID) {
  20344. var checkResults = [];
  20345. nodes.forEach(function(nodeResult) {
  20346. var checks = get_all_checks_default(nodeResult);
  20347. checks.forEach(function(checkResult) {
  20348. if (checkResult.id === checkID) {
  20349. checkResult.node = nodeResult.node;
  20350. checkResults.push(checkResult);
  20351. }
  20352. });
  20353. });
  20354. return checkResults;
  20355. }
  20356. function filterChecks(checks) {
  20357. return checks.filter(function(check4) {
  20358. return check4.filtered !== true;
  20359. });
  20360. }
  20361. function sanitizeNodes(result) {
  20362. var checkTypes2 = [ 'any', 'all', 'none' ];
  20363. var nodes = result.nodes.filter(function(detail) {
  20364. var length = 0;
  20365. checkTypes2.forEach(function(type) {
  20366. detail[type] = filterChecks(detail[type]);
  20367. length += detail[type].length;
  20368. });
  20369. return length > 0;
  20370. });
  20371. if (result.pageLevel && nodes.length) {
  20372. nodes = [ nodes.reduce(function(a, b) {
  20373. if (a) {
  20374. checkTypes2.forEach(function(type) {
  20375. a[type].push.apply(a[type], b[type]);
  20376. });
  20377. return a;
  20378. }
  20379. }) ];
  20380. }
  20381. return nodes;
  20382. }
  20383. Rule.prototype.after = function after(result, options) {
  20384. var afterChecks = findAfterChecks(this);
  20385. var ruleID = this.id;
  20386. afterChecks.forEach(function(check4) {
  20387. var beforeResults = findCheckResults(result.nodes, check4.id);
  20388. var option = get_check_option_default(check4, ruleID, options);
  20389. var afterResults = check4.after(beforeResults, option);
  20390. beforeResults.forEach(function(item) {
  20391. delete item.node;
  20392. if (afterResults.indexOf(item) === -1) {
  20393. item.filtered = true;
  20394. }
  20395. });
  20396. });
  20397. result.nodes = sanitizeNodes(result);
  20398. return result;
  20399. };
  20400. Rule.prototype.configure = function configure2(spec) {
  20401. if (spec.hasOwnProperty('selector')) {
  20402. this.selector = spec.selector;
  20403. }
  20404. if (spec.hasOwnProperty('excludeHidden')) {
  20405. this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;
  20406. }
  20407. if (spec.hasOwnProperty('enabled')) {
  20408. this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;
  20409. }
  20410. if (spec.hasOwnProperty('pageLevel')) {
  20411. this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;
  20412. }
  20413. if (spec.hasOwnProperty('reviewOnFail')) {
  20414. this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;
  20415. }
  20416. if (spec.hasOwnProperty('any')) {
  20417. this.any = spec.any;
  20418. }
  20419. if (spec.hasOwnProperty('all')) {
  20420. this.all = spec.all;
  20421. }
  20422. if (spec.hasOwnProperty('none')) {
  20423. this.none = spec.none;
  20424. }
  20425. if (spec.hasOwnProperty('tags')) {
  20426. this.tags = spec.tags;
  20427. }
  20428. if (spec.hasOwnProperty('matches')) {
  20429. this.matches = createExecutionContext(spec.matches);
  20430. }
  20431. if (spec.impact) {
  20432. assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));
  20433. this.impact = spec.impact;
  20434. }
  20435. };
  20436. var rule_default = Rule;
  20437. var dot = __toModule(require_doT());
  20438. var dotRegex = /\{\{.+?\}\}/g;
  20439. function getDefaultOrigin() {
  20440. if (window.origin) {
  20441. return window.origin;
  20442. }
  20443. if (window.location && window.location.origin) {
  20444. return window.location.origin;
  20445. }
  20446. }
  20447. function getDefaultConfiguration(audit3) {
  20448. var config;
  20449. if (audit3) {
  20450. config = clone_default(audit3);
  20451. config.commons = audit3.commons;
  20452. } else {
  20453. config = {};
  20454. }
  20455. config.reporter = config.reporter || null;
  20456. config.noHtml = config.noHtml || false;
  20457. if (!config.allowedOrigins) {
  20458. var defaultOrigin = getDefaultOrigin();
  20459. config.allowedOrigins = defaultOrigin ? [ defaultOrigin ] : [];
  20460. }
  20461. config.rules = config.rules || [];
  20462. config.checks = config.checks || [];
  20463. config.data = _extends({
  20464. checks: {},
  20465. rules: {}
  20466. }, config.data);
  20467. return config;
  20468. }
  20469. function unpackToObject(collection, audit3, method) {
  20470. var i, l;
  20471. for (i = 0, l = collection.length; i < l; i++) {
  20472. audit3[method](collection[i]);
  20473. }
  20474. }
  20475. var mergeCheckLocale = function mergeCheckLocale(a, b) {
  20476. var pass = b.pass, fail = b.fail;
  20477. if (typeof pass === 'string' && dotRegex.test(pass)) {
  20478. pass = dot['default'].compile(pass);
  20479. }
  20480. if (typeof fail === 'string' && dotRegex.test(fail)) {
  20481. fail = dot['default'].compile(fail);
  20482. }
  20483. return _extends({}, a, {
  20484. messages: {
  20485. pass: pass || a.messages.pass,
  20486. fail: fail || a.messages.fail,
  20487. incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, b.incomplete) : b.incomplete
  20488. }
  20489. });
  20490. };
  20491. var mergeRuleLocale = function mergeRuleLocale(a, b) {
  20492. var help = b.help, description = b.description;
  20493. if (typeof help === 'string' && dotRegex.test(help)) {
  20494. help = dot['default'].compile(help);
  20495. }
  20496. if (typeof description === 'string' && dotRegex.test(description)) {
  20497. description = dot['default'].compile(description);
  20498. }
  20499. return _extends({}, a, {
  20500. help: help || a.help,
  20501. description: description || a.description
  20502. });
  20503. };
  20504. var mergeFailureMessage = function mergeFailureMessage(a, b) {
  20505. var failureMessage = b.failureMessage;
  20506. if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) {
  20507. failureMessage = dot['default'].compile(failureMessage);
  20508. }
  20509. return _extends({}, a, {
  20510. failureMessage: failureMessage || a.failureMessage
  20511. });
  20512. };
  20513. var mergeFallbackMessage = function mergeFallbackMessage(a, b) {
  20514. if (typeof b === 'string' && dotRegex.test(b)) {
  20515. b = dot['default'].compile(b);
  20516. }
  20517. return b || a;
  20518. };
  20519. var Audit = function() {
  20520. function Audit(audit3) {
  20521. _classCallCheck(this, Audit);
  20522. this.lang = 'en';
  20523. this.defaultConfig = audit3;
  20524. this.standards = standards_default;
  20525. this._init();
  20526. this._defaultLocale = null;
  20527. }
  20528. _createClass(Audit, [ {
  20529. key: '_setDefaultLocale',
  20530. value: function _setDefaultLocale() {
  20531. if (this._defaultLocale) {
  20532. return;
  20533. }
  20534. var locale = {
  20535. checks: {},
  20536. rules: {},
  20537. failureSummaries: {},
  20538. incompleteFallbackMessage: '',
  20539. lang: this.lang
  20540. };
  20541. var checkIDs = Object.keys(this.data.checks);
  20542. for (var _i24 = 0; _i24 < checkIDs.length; _i24++) {
  20543. var id = checkIDs[_i24];
  20544. var check4 = this.data.checks[id];
  20545. var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
  20546. locale.checks[id] = {
  20547. pass: pass,
  20548. fail: fail,
  20549. incomplete: incomplete
  20550. };
  20551. }
  20552. var ruleIDs = Object.keys(this.data.rules);
  20553. for (var _i25 = 0; _i25 < ruleIDs.length; _i25++) {
  20554. var _id = ruleIDs[_i25];
  20555. var rule3 = this.data.rules[_id];
  20556. var description = rule3.description, help = rule3.help;
  20557. locale.rules[_id] = {
  20558. description: description,
  20559. help: help
  20560. };
  20561. }
  20562. var failureSummaries = Object.keys(this.data.failureSummaries);
  20563. for (var _i26 = 0; _i26 < failureSummaries.length; _i26++) {
  20564. var type = failureSummaries[_i26];
  20565. var failureSummary2 = this.data.failureSummaries[type];
  20566. var failureMessage = failureSummary2.failureMessage;
  20567. locale.failureSummaries[type] = {
  20568. failureMessage: failureMessage
  20569. };
  20570. }
  20571. locale.incompleteFallbackMessage = this.data.incompleteFallbackMessage;
  20572. this._defaultLocale = locale;
  20573. }
  20574. }, {
  20575. key: '_resetLocale',
  20576. value: function _resetLocale() {
  20577. var defaultLocale = this._defaultLocale;
  20578. if (!defaultLocale) {
  20579. return;
  20580. }
  20581. this.applyLocale(defaultLocale);
  20582. }
  20583. }, {
  20584. key: '_applyCheckLocale',
  20585. value: function _applyCheckLocale(checks) {
  20586. var keys = Object.keys(checks);
  20587. for (var _i27 = 0; _i27 < keys.length; _i27++) {
  20588. var id = keys[_i27];
  20589. if (!this.data.checks[id]) {
  20590. throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
  20591. }
  20592. this.data.checks[id] = mergeCheckLocale(this.data.checks[id], checks[id]);
  20593. }
  20594. }
  20595. }, {
  20596. key: '_applyRuleLocale',
  20597. value: function _applyRuleLocale(rules) {
  20598. var keys = Object.keys(rules);
  20599. for (var _i28 = 0; _i28 < keys.length; _i28++) {
  20600. var id = keys[_i28];
  20601. if (!this.data.rules[id]) {
  20602. throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
  20603. }
  20604. this.data.rules[id] = mergeRuleLocale(this.data.rules[id], rules[id]);
  20605. }
  20606. }
  20607. }, {
  20608. key: '_applyFailureSummaries',
  20609. value: function _applyFailureSummaries(messages) {
  20610. var keys = Object.keys(messages);
  20611. for (var _i29 = 0; _i29 < keys.length; _i29++) {
  20612. var key = keys[_i29];
  20613. if (!this.data.failureSummaries[key]) {
  20614. throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
  20615. }
  20616. this.data.failureSummaries[key] = mergeFailureMessage(this.data.failureSummaries[key], messages[key]);
  20617. }
  20618. }
  20619. }, {
  20620. key: 'applyLocale',
  20621. value: function applyLocale(locale) {
  20622. this._setDefaultLocale();
  20623. if (locale.checks) {
  20624. this._applyCheckLocale(locale.checks);
  20625. }
  20626. if (locale.rules) {
  20627. this._applyRuleLocale(locale.rules);
  20628. }
  20629. if (locale.failureSummaries) {
  20630. this._applyFailureSummaries(locale.failureSummaries, 'failureSummaries');
  20631. }
  20632. if (locale.incompleteFallbackMessage) {
  20633. this.data.incompleteFallbackMessage = mergeFallbackMessage(this.data.incompleteFallbackMessage, locale.incompleteFallbackMessage);
  20634. }
  20635. if (locale.lang) {
  20636. this.lang = locale.lang;
  20637. }
  20638. }
  20639. }, {
  20640. key: 'setAllowedOrigins',
  20641. value: function setAllowedOrigins(allowedOrigins) {
  20642. var defaultOrigin = getDefaultOrigin();
  20643. this.allowedOrigins = [];
  20644. var _iterator3 = _createForOfIteratorHelper(allowedOrigins), _step3;
  20645. try {
  20646. for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) {
  20647. var origin = _step3.value;
  20648. if (origin === constants_default.allOrigins) {
  20649. this.allowedOrigins = [ '*' ];
  20650. return;
  20651. } else if (origin !== constants_default.sameOrigin) {
  20652. this.allowedOrigins.push(origin);
  20653. } else if (defaultOrigin) {
  20654. this.allowedOrigins.push(defaultOrigin);
  20655. }
  20656. }
  20657. } catch (err) {
  20658. _iterator3.e(err);
  20659. } finally {
  20660. _iterator3.f();
  20661. }
  20662. }
  20663. }, {
  20664. key: '_init',
  20665. value: function _init() {
  20666. var audit3 = getDefaultConfiguration(this.defaultConfig);
  20667. this.lang = audit3.lang || 'en';
  20668. this.reporter = audit3.reporter;
  20669. this.commands = {};
  20670. this.rules = [];
  20671. this.checks = {};
  20672. this.brand = 'axe';
  20673. this.application = 'axeAPI';
  20674. this.tagExclude = [ 'experimental' ];
  20675. this.noHtml = audit3.noHtml;
  20676. this.allowedOrigins = audit3.allowedOrigins;
  20677. unpackToObject(audit3.rules, this, 'addRule');
  20678. unpackToObject(audit3.checks, this, 'addCheck');
  20679. this.data = {};
  20680. this.data.checks = audit3.data && audit3.data.checks || {};
  20681. this.data.rules = audit3.data && audit3.data.rules || {};
  20682. this.data.failureSummaries = audit3.data && audit3.data.failureSummaries || {};
  20683. this.data.incompleteFallbackMessage = audit3.data && audit3.data.incompleteFallbackMessage || '';
  20684. this._constructHelpUrls();
  20685. }
  20686. }, {
  20687. key: 'registerCommand',
  20688. value: function registerCommand(command) {
  20689. this.commands[command.id] = command.callback;
  20690. }
  20691. }, {
  20692. key: 'addRule',
  20693. value: function addRule(spec) {
  20694. if (spec.metadata) {
  20695. this.data.rules[spec.id] = spec.metadata;
  20696. }
  20697. var rule3 = this.getRule(spec.id);
  20698. if (rule3) {
  20699. rule3.configure(spec);
  20700. } else {
  20701. this.rules.push(new rule_default(spec, this));
  20702. }
  20703. }
  20704. }, {
  20705. key: 'addCheck',
  20706. value: function addCheck(spec) {
  20707. var metadata = spec.metadata;
  20708. if (_typeof(metadata) === 'object') {
  20709. this.data.checks[spec.id] = metadata;
  20710. if (_typeof(metadata.messages) === 'object') {
  20711. Object.keys(metadata.messages).filter(function(prop) {
  20712. return metadata.messages.hasOwnProperty(prop) && typeof metadata.messages[prop] === 'string';
  20713. }).forEach(function(prop) {
  20714. if (metadata.messages[prop].indexOf('function') === 0) {
  20715. metadata.messages[prop] = new Function('return ' + metadata.messages[prop] + ';')();
  20716. }
  20717. });
  20718. }
  20719. }
  20720. if (this.checks[spec.id]) {
  20721. this.checks[spec.id].configure(spec);
  20722. } else {
  20723. this.checks[spec.id] = new check_default(spec);
  20724. }
  20725. }
  20726. }, {
  20727. key: 'run',
  20728. value: function run(context5, options, resolve, reject) {
  20729. this.normalizeOptions(options);
  20730. axe._selectCache = [];
  20731. var allRulesToRun = getRulesToRun(this.rules, context5, options);
  20732. var runNowRules = allRulesToRun.now;
  20733. var runLaterRules = allRulesToRun.later;
  20734. var nowRulesQueue = queue_default();
  20735. runNowRules.forEach(function(rule3) {
  20736. nowRulesQueue.defer(getDefferedRule(rule3, context5, options));
  20737. });
  20738. var preloaderQueue = queue_default();
  20739. if (runLaterRules.length) {
  20740. preloaderQueue.defer(function(resolve2) {
  20741. preload_default(options).then(function(assets) {
  20742. return resolve2(assets);
  20743. })['catch'](function(err2) {
  20744. console.warn('Couldn\'t load preload assets: ', err2);
  20745. resolve2(void 0);
  20746. });
  20747. });
  20748. }
  20749. var queueForNowRulesAndPreloader = queue_default();
  20750. queueForNowRulesAndPreloader.defer(nowRulesQueue);
  20751. queueForNowRulesAndPreloader.defer(preloaderQueue);
  20752. queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) {
  20753. var assetsFromQueue = nowRulesAndPreloaderResults.pop();
  20754. if (assetsFromQueue && assetsFromQueue.length) {
  20755. var assets = assetsFromQueue[0];
  20756. if (assets) {
  20757. context5 = _extends({}, context5, assets);
  20758. }
  20759. }
  20760. var nowRulesResults = nowRulesAndPreloaderResults[0];
  20761. if (!runLaterRules.length) {
  20762. axe._selectCache = void 0;
  20763. resolve(nowRulesResults.filter(function(result) {
  20764. return !!result;
  20765. }));
  20766. return;
  20767. }
  20768. var laterRulesQueue = queue_default();
  20769. runLaterRules.forEach(function(rule3) {
  20770. var deferredRule = getDefferedRule(rule3, context5, options);
  20771. laterRulesQueue.defer(deferredRule);
  20772. });
  20773. laterRulesQueue.then(function(laterRuleResults) {
  20774. axe._selectCache = void 0;
  20775. resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {
  20776. return !!result;
  20777. }));
  20778. })['catch'](reject);
  20779. })['catch'](reject);
  20780. }
  20781. }, {
  20782. key: 'after',
  20783. value: function after(results, options) {
  20784. var rules = this.rules;
  20785. return results.map(function(ruleResult) {
  20786. var rule3 = find_by_default(rules, 'id', ruleResult.id);
  20787. if (!rule3) {
  20788. throw new Error('Result for unknown rule. You may be running mismatch axe-core versions');
  20789. }
  20790. return rule3.after(ruleResult, options);
  20791. });
  20792. }
  20793. }, {
  20794. key: 'getRule',
  20795. value: function getRule(ruleId) {
  20796. return this.rules.find(function(rule3) {
  20797. return rule3.id === ruleId;
  20798. });
  20799. }
  20800. }, {
  20801. key: 'normalizeOptions',
  20802. value: function normalizeOptions(options) {
  20803. var audit3 = this;
  20804. var tags = [];
  20805. var ruleIds = [];
  20806. audit3.rules.forEach(function(rule3) {
  20807. ruleIds.push(rule3.id);
  20808. rule3.tags.forEach(function(tag) {
  20809. if (!tags.includes(tag)) {
  20810. tags.push(tag);
  20811. }
  20812. });
  20813. });
  20814. if ([ 'object', 'string' ].includes(_typeof(options.runOnly))) {
  20815. if (typeof options.runOnly === 'string') {
  20816. options.runOnly = [ options.runOnly ];
  20817. }
  20818. if (Array.isArray(options.runOnly)) {
  20819. var hasTag = options.runOnly.find(function(value) {
  20820. return tags.includes(value);
  20821. });
  20822. var hasRule = options.runOnly.find(function(value) {
  20823. return ruleIds.includes(value);
  20824. });
  20825. if (hasTag && hasRule) {
  20826. throw new Error('runOnly cannot be both rules and tags');
  20827. }
  20828. if (hasRule) {
  20829. options.runOnly = {
  20830. type: 'rule',
  20831. values: options.runOnly
  20832. };
  20833. } else {
  20834. options.runOnly = {
  20835. type: 'tag',
  20836. values: options.runOnly
  20837. };
  20838. }
  20839. }
  20840. var only = options.runOnly;
  20841. if (only.value && !only.values) {
  20842. only.values = only.value;
  20843. delete only.value;
  20844. }
  20845. if (!Array.isArray(only.values) || only.values.length === 0) {
  20846. throw new Error('runOnly.values must be a non-empty array');
  20847. }
  20848. if ([ 'rule', 'rules' ].includes(only.type)) {
  20849. only.type = 'rule';
  20850. only.values.forEach(function(ruleId) {
  20851. if (!ruleIds.includes(ruleId)) {
  20852. throw new Error('unknown rule `' + ruleId + '` in options.runOnly');
  20853. }
  20854. });
  20855. } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
  20856. only.type = 'tag';
  20857. var unmatchedTags = only.values.filter(function(tag) {
  20858. return !tags.includes(tag) && !/wcag2[1-3]a{1,3}/.test(tag);
  20859. });
  20860. if (unmatchedTags.length !== 0) {
  20861. axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
  20862. }
  20863. } else {
  20864. throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
  20865. }
  20866. }
  20867. if (_typeof(options.rules) === 'object') {
  20868. Object.keys(options.rules).forEach(function(ruleId) {
  20869. if (!ruleIds.includes(ruleId)) {
  20870. throw new Error('unknown rule `' + ruleId + '` in options.rules');
  20871. }
  20872. });
  20873. }
  20874. return options;
  20875. }
  20876. }, {
  20877. key: 'setBranding',
  20878. value: function setBranding(branding) {
  20879. var previous = {
  20880. brand: this.brand,
  20881. application: this.application
  20882. };
  20883. if (typeof branding === 'string') {
  20884. this.application = branding;
  20885. }
  20886. if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {
  20887. this.brand = branding.brand;
  20888. }
  20889. if (branding && branding.hasOwnProperty('application') && branding.application && typeof branding.application === 'string') {
  20890. this.application = branding.application;
  20891. }
  20892. this._constructHelpUrls(previous);
  20893. }
  20894. }, {
  20895. key: '_constructHelpUrls',
  20896. value: function _constructHelpUrls() {
  20897. var _this8 = this;
  20898. var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  20899. var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0];
  20900. this.rules.forEach(function(rule3) {
  20901. if (!_this8.data.rules[rule3.id]) {
  20902. _this8.data.rules[rule3.id] = {};
  20903. }
  20904. var metaData = _this8.data.rules[rule3.id];
  20905. if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule3.id, version)) {
  20906. metaData.helpUrl = getHelpUrl(_this8, rule3.id, version);
  20907. }
  20908. });
  20909. }
  20910. }, {
  20911. key: 'resetRulesAndChecks',
  20912. value: function resetRulesAndChecks() {
  20913. this._init();
  20914. this._resetLocale();
  20915. }
  20916. } ]);
  20917. return Audit;
  20918. }();
  20919. function getRulesToRun(rules, context5, options) {
  20920. var base = {
  20921. now: [],
  20922. later: []
  20923. };
  20924. var splitRules = rules.reduce(function(out, rule3) {
  20925. if (!rule_should_run_default(rule3, context5, options)) {
  20926. return out;
  20927. }
  20928. if (rule3.preload) {
  20929. out.later.push(rule3);
  20930. return out;
  20931. }
  20932. out.now.push(rule3);
  20933. return out;
  20934. }, base);
  20935. return splitRules;
  20936. }
  20937. function getDefferedRule(rule3, context5, options) {
  20938. if (options.performanceTimer) {
  20939. performance_timer_default.mark('mark_rule_start_' + rule3.id);
  20940. }
  20941. return function(resolve, reject) {
  20942. rule3.run(context5, options, function(ruleResult) {
  20943. resolve(ruleResult);
  20944. }, function(err2) {
  20945. if (!options.debug) {
  20946. var errResult = Object.assign(new rule_result_default(rule3), {
  20947. result: constants_default.CANTTELL,
  20948. description: 'An error occured while running this rule',
  20949. message: err2.message,
  20950. stack: err2.stack,
  20951. error: err2,
  20952. errorNode: err2.errorNode
  20953. });
  20954. resolve(errResult);
  20955. } else {
  20956. reject(err2);
  20957. }
  20958. });
  20959. };
  20960. }
  20961. function getHelpUrl(_ref86, ruleId, version) {
  20962. var brand = _ref86.brand, application = _ref86.application, lang = _ref86.lang;
  20963. return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
  20964. }
  20965. var audit_default = Audit;
  20966. var imports_exports = {};
  20967. __export(imports_exports, {
  20968. CssSelectorParser: function CssSelectorParser() {
  20969. return css_selector_parser2.CssSelectorParser;
  20970. },
  20971. doT: function doT() {
  20972. return dot2['default'];
  20973. },
  20974. emojiRegexText: function emojiRegexText() {
  20975. return emoji_regex3['default'];
  20976. },
  20977. memoize: function memoize() {
  20978. return memoizee2['default'];
  20979. }
  20980. });
  20981. var css_selector_parser2 = __toModule(require_lib());
  20982. var dot2 = __toModule(require_doT());
  20983. var emoji_regex3 = __toModule(require_emoji_regex());
  20984. var memoizee2 = __toModule(require_memoizee());
  20985. var es6_promise = __toModule(require_es6_promise());
  20986. var typedarray = __toModule(require_typedarray());
  20987. var weakmap_polyfill = __toModule(require_weakmap_polyfill());
  20988. dot2['default'].templateSettings.strip = false;
  20989. if (!('Promise' in window)) {
  20990. es6_promise['default'].polyfill();
  20991. }
  20992. if (!('Uint32Array' in window)) {
  20993. window.Uint32Array = typedarray.Uint32Array;
  20994. }
  20995. if (window.Uint32Array) {
  20996. if (!('some' in window.Uint32Array.prototype)) {
  20997. Object.defineProperty(window.Uint32Array.prototype, 'some', {
  20998. value: Array.prototype.some
  20999. });
  21000. }
  21001. if (!('reduce' in window.Uint32Array.prototype)) {
  21002. Object.defineProperty(window.Uint32Array.prototype, 'reduce', {
  21003. value: Array.prototype.reduce
  21004. });
  21005. }
  21006. }
  21007. function cleanup(resolve, reject) {
  21008. resolve = resolve || function res() {};
  21009. reject = reject || axe.log;
  21010. if (!axe._audit) {
  21011. throw new Error('No audit configured');
  21012. }
  21013. var q = axe.utils.queue();
  21014. var cleanupErrors = [];
  21015. Object.keys(axe.plugins).forEach(function(key) {
  21016. q.defer(function(res) {
  21017. var rej = function rej2(err2) {
  21018. cleanupErrors.push(err2);
  21019. res();
  21020. };
  21021. try {
  21022. axe.plugins[key].cleanup(res, rej);
  21023. } catch (err2) {
  21024. rej(err2);
  21025. }
  21026. });
  21027. });
  21028. var flattenedTree = axe.utils.getFlattenedTree(document.body);
  21029. axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) {
  21030. q.defer(function(res, rej) {
  21031. return axe.utils.sendCommandToFrame(node.actualNode, {
  21032. command: 'cleanup-plugin'
  21033. }, res, rej);
  21034. });
  21035. });
  21036. q.then(function(results) {
  21037. if (cleanupErrors.length === 0) {
  21038. resolve(results);
  21039. } else {
  21040. reject(cleanupErrors);
  21041. }
  21042. })['catch'](reject);
  21043. }
  21044. var cleanup_default = cleanup;
  21045. var reporters = {};
  21046. var defaultReporter;
  21047. function hasReporter(reporterName) {
  21048. return reporters.hasOwnProperty(reporterName);
  21049. }
  21050. function getReporter(reporter5) {
  21051. if (typeof reporter5 === 'string' && reporters[reporter5]) {
  21052. return reporters[reporter5];
  21053. }
  21054. if (typeof reporter5 === 'function') {
  21055. return reporter5;
  21056. }
  21057. return defaultReporter;
  21058. }
  21059. function addReporter(name, cb, isDefault) {
  21060. reporters[name] = cb;
  21061. if (isDefault) {
  21062. defaultReporter = cb;
  21063. }
  21064. }
  21065. function configure3(spec) {
  21066. var audit3;
  21067. audit3 = axe._audit;
  21068. if (!audit3) {
  21069. throw new Error('No audit configured');
  21070. }
  21071. if (spec.axeVersion || spec.ver) {
  21072. var specVersion = spec.axeVersion || spec.ver;
  21073. if (!/^\d+\.\d+\.\d+(-canary)?/.test(specVersion)) {
  21074. throw new Error('Invalid configured version '.concat(specVersion));
  21075. }
  21076. var _specVersion$split = specVersion.split('-'), _specVersion$split2 = _slicedToArray(_specVersion$split, 2), version = _specVersion$split2[0], canary = _specVersion$split2[1];
  21077. var _version$split$map = version.split('.').map(Number), _version$split$map2 = _slicedToArray(_version$split$map, 3), major = _version$split$map2[0], minor = _version$split$map2[1], patch = _version$split$map2[2];
  21078. var _axe$version$split = axe.version.split('-'), _axe$version$split2 = _slicedToArray(_axe$version$split, 2), axeVersion = _axe$version$split2[0], axeCanary = _axe$version$split2[1];
  21079. var _axeVersion$split$map = axeVersion.split('.').map(Number), _axeVersion$split$map2 = _slicedToArray(_axeVersion$split$map, 3), axeMajor = _axeVersion$split$map2[0], axeMinor = _axeVersion$split$map2[1], axePatch = _axeVersion$split$map2[2];
  21080. if (major !== axeMajor || axeMinor < minor || axeMinor === minor && axePatch < patch || major === axeMajor && minor === axeMinor && patch === axePatch && canary && canary !== axeCanary) {
  21081. throw new Error('Configured version '.concat(specVersion, ' is not compatible with current axe version ').concat(axe.version));
  21082. }
  21083. }
  21084. if (spec.reporter && (typeof spec.reporter === 'function' || hasReporter(spec.reporter))) {
  21085. audit3.reporter = spec.reporter;
  21086. }
  21087. if (spec.checks) {
  21088. if (!Array.isArray(spec.checks)) {
  21089. throw new TypeError('Checks property must be an array');
  21090. }
  21091. spec.checks.forEach(function(check4) {
  21092. if (!check4.id) {
  21093. throw new TypeError('Configured check '.concat(JSON.stringify(check4), ' is invalid. Checks must be an object with at least an id property'));
  21094. }
  21095. audit3.addCheck(check4);
  21096. });
  21097. }
  21098. var modifiedRules = [];
  21099. if (spec.rules) {
  21100. if (!Array.isArray(spec.rules)) {
  21101. throw new TypeError('Rules property must be an array');
  21102. }
  21103. spec.rules.forEach(function(rule3) {
  21104. if (!rule3.id) {
  21105. throw new TypeError('Configured rule '.concat(JSON.stringify(rule3), ' is invalid. Rules must be an object with at least an id property'));
  21106. }
  21107. modifiedRules.push(rule3.id);
  21108. audit3.addRule(rule3);
  21109. });
  21110. }
  21111. if (spec.disableOtherRules) {
  21112. audit3.rules.forEach(function(rule3) {
  21113. if (modifiedRules.includes(rule3.id) === false) {
  21114. rule3.enabled = false;
  21115. }
  21116. });
  21117. }
  21118. if (typeof spec.branding !== 'undefined') {
  21119. audit3.setBranding(spec.branding);
  21120. } else {
  21121. audit3._constructHelpUrls();
  21122. }
  21123. if (spec.tagExclude) {
  21124. audit3.tagExclude = spec.tagExclude;
  21125. }
  21126. if (spec.locale) {
  21127. audit3.applyLocale(spec.locale);
  21128. }
  21129. if (spec.standards) {
  21130. configureStandards(spec.standards);
  21131. }
  21132. if (spec.noHtml) {
  21133. audit3.noHtml = true;
  21134. }
  21135. if (spec.allowedOrigins) {
  21136. if (!Array.isArray(spec.allowedOrigins)) {
  21137. throw new TypeError('Allowed origins property must be an array');
  21138. }
  21139. if (spec.allowedOrigins.includes('*')) {
  21140. throw new Error('"*" is not allowed. Use "'.concat(constants_default.allOrigins, '" instead'));
  21141. }
  21142. audit3.setAllowedOrigins(spec.allowedOrigins);
  21143. }
  21144. }
  21145. var configure_default = configure3;
  21146. function frameMessenger2(frameHandler) {
  21147. _respondable.updateMessenger(frameHandler);
  21148. }
  21149. function getRules(tags) {
  21150. tags = tags || [];
  21151. var matchingRules = !tags.length ? axe._audit.rules : axe._audit.rules.filter(function(item) {
  21152. return !!tags.filter(function(tag) {
  21153. return item.tags.indexOf(tag) !== -1;
  21154. }).length;
  21155. });
  21156. var ruleData = axe._audit.data.rules || {};
  21157. return matchingRules.map(function(matchingRule) {
  21158. var rd = ruleData[matchingRule.id] || {};
  21159. return {
  21160. ruleId: matchingRule.id,
  21161. description: rd.description,
  21162. help: rd.help,
  21163. helpUrl: rd.helpUrl,
  21164. tags: matchingRule.tags
  21165. };
  21166. });
  21167. }
  21168. var get_rules_default = getRules;
  21169. function setupGlobals(context5) {
  21170. var hasWindow = window && 'Node' in window && 'NodeList' in window;
  21171. var hasDoc = !!document;
  21172. if (hasWindow && hasDoc) {
  21173. return;
  21174. }
  21175. if (!context5 || !context5.ownerDocument) {
  21176. throw new Error('Required "window" or "document" globals not defined and cannot be deduced from the context. Either set the globals before running or pass in a valid Element.');
  21177. }
  21178. if (!hasDoc) {
  21179. cache_default.set('globalDocumentSet', true);
  21180. document = context5.ownerDocument;
  21181. }
  21182. if (!hasWindow) {
  21183. cache_default.set('globalWindowSet', true);
  21184. window = document.defaultView;
  21185. }
  21186. }
  21187. function resetGlobals() {
  21188. if (cache_default.get('globalDocumentSet')) {
  21189. cache_default.set('globalDocumentSet', false);
  21190. document = null;
  21191. }
  21192. if (cache_default.get('globalWindowSet')) {
  21193. cache_default.set('globalWindowSet', false);
  21194. window = null;
  21195. }
  21196. }
  21197. function teardown() {
  21198. resetGlobals();
  21199. axe._memoizedFns.forEach(function(fn) {
  21200. return fn.clear();
  21201. });
  21202. cache_default.clear();
  21203. axe._tree = void 0;
  21204. axe._selectorData = void 0;
  21205. axe._selectCache = void 0;
  21206. }
  21207. var teardown_default = teardown;
  21208. function runRules(context5, options, resolve, reject) {
  21209. try {
  21210. context5 = new Context(context5);
  21211. axe._tree = context5.flatTree;
  21212. axe._selectorData = _getSelectorData(context5.flatTree);
  21213. } catch (e) {
  21214. teardown_default();
  21215. return reject(e);
  21216. }
  21217. var q = queue_default();
  21218. var audit3 = axe._audit;
  21219. if (options.performanceTimer) {
  21220. performance_timer_default.auditStart();
  21221. }
  21222. if (context5.frames.length && options.iframes !== false) {
  21223. q.defer(function(res, rej) {
  21224. _collectResultsFromFrames(context5, options, 'rules', null, res, rej);
  21225. });
  21226. }
  21227. q.defer(function(res, rej) {
  21228. audit3.run(context5, options, res, rej);
  21229. });
  21230. q.then(function(data2) {
  21231. try {
  21232. if (options.performanceTimer) {
  21233. performance_timer_default.auditEnd();
  21234. }
  21235. var results = merge_results_default(data2.map(function(results2) {
  21236. return {
  21237. results: results2
  21238. };
  21239. }));
  21240. if (context5.initiator) {
  21241. results = audit3.after(results, options);
  21242. results.forEach(publish_metadata_default);
  21243. results = results.map(finalize_result_default);
  21244. }
  21245. try {
  21246. resolve(results, teardown_default);
  21247. } catch (e) {
  21248. teardown_default();
  21249. log_default(e);
  21250. }
  21251. } catch (e) {
  21252. teardown_default();
  21253. reject(e);
  21254. }
  21255. })['catch'](function(e) {
  21256. teardown_default();
  21257. reject(e);
  21258. });
  21259. }
  21260. var run_rules_default = runRules;
  21261. function runCommand(data2, keepalive, callback) {
  21262. var resolve = callback;
  21263. var reject = function reject2(err2) {
  21264. if (err2 instanceof Error === false) {
  21265. err2 = new Error(err2);
  21266. }
  21267. callback(err2);
  21268. };
  21269. var context5 = data2 && data2.context || {};
  21270. if (context5.hasOwnProperty('include') && !context5.include.length) {
  21271. context5.include = [ document ];
  21272. }
  21273. var options = data2 && data2.options || {};
  21274. switch (data2.command) {
  21275. case 'rules':
  21276. return run_rules_default(context5, options, function(results, cleanup5) {
  21277. resolve(results);
  21278. cleanup5();
  21279. }, reject);
  21280. case 'cleanup-plugin':
  21281. return cleanup_default(resolve, reject);
  21282. default:
  21283. if (axe._audit && axe._audit.commands && axe._audit.commands[data2.command]) {
  21284. return axe._audit.commands[data2.command](data2, callback);
  21285. }
  21286. }
  21287. }
  21288. if (window.top !== window) {
  21289. _respondable.subscribe('axe.start', runCommand);
  21290. _respondable.subscribe('axe.ping', function(data2, keepalive, respond) {
  21291. respond({
  21292. axe: true
  21293. });
  21294. });
  21295. }
  21296. function load(audit3) {
  21297. axe._audit = new audit_default(audit3);
  21298. }
  21299. var load_default = load;
  21300. function Plugin(spec) {
  21301. this._run = spec.run;
  21302. this._collect = spec.collect;
  21303. this._registry = {};
  21304. spec.commands.forEach(function(command) {
  21305. axe._audit.registerCommand(command);
  21306. });
  21307. }
  21308. Plugin.prototype.run = function run3() {
  21309. return this._run.apply(this, arguments);
  21310. };
  21311. Plugin.prototype.collect = function collect() {
  21312. return this._collect.apply(this, arguments);
  21313. };
  21314. Plugin.prototype.cleanup = function cleanup3(done) {
  21315. var q = axe.utils.queue();
  21316. var that = this;
  21317. Object.keys(this._registry).forEach(function(key) {
  21318. q.defer(function(_done) {
  21319. that._registry[key].cleanup(_done);
  21320. });
  21321. });
  21322. q.then(done);
  21323. };
  21324. Plugin.prototype.add = function add(impl) {
  21325. this._registry[impl.id] = impl;
  21326. };
  21327. function registerPlugin(plugin) {
  21328. axe.plugins[plugin.id] = new Plugin(plugin);
  21329. }
  21330. var plugins_default = registerPlugin;
  21331. function reset() {
  21332. var audit3 = axe._audit;
  21333. if (!audit3) {
  21334. throw new Error('No audit configured');
  21335. }
  21336. audit3.resetRulesAndChecks();
  21337. resetStandards();
  21338. }
  21339. var reset_default = reset;
  21340. function runVirtualRule(ruleId, vNode) {
  21341. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21342. options.reporter = options.reporter || axe._audit.reporter || 'v1';
  21343. axe._selectorData = {};
  21344. if (!(vNode instanceof abstract_virtual_node_default)) {
  21345. vNode = new serial_virtual_node_default(vNode);
  21346. }
  21347. var rule3 = get_rule_default(ruleId);
  21348. if (!rule3) {
  21349. throw new Error('unknown rule `' + ruleId + '`');
  21350. }
  21351. rule3 = Object.create(rule3, {
  21352. excludeHidden: {
  21353. value: false
  21354. }
  21355. });
  21356. var context5 = {
  21357. initiator: true,
  21358. include: [ vNode ]
  21359. };
  21360. var rawResults = rule3.runSync(context5, options);
  21361. publish_metadata_default(rawResults);
  21362. finalize_result_default(rawResults);
  21363. var results = aggregate_result_default([ rawResults ]);
  21364. results.violations.forEach(function(result) {
  21365. return result.nodes.forEach(function(nodeResult) {
  21366. nodeResult.failureSummary = failure_summary_default(nodeResult);
  21367. });
  21368. });
  21369. return _extends({}, _getEnvironmentData(), results, {
  21370. toolOptions: options
  21371. });
  21372. }
  21373. var run_virtual_rule_default = runVirtualRule;
  21374. function normalizeRunParams(_ref87) {
  21375. var _ref89, _options$reporter, _axe$_audit;
  21376. var _ref88 = _slicedToArray(_ref87, 3), context5 = _ref88[0], options = _ref88[1], callback = _ref88[2];
  21377. var typeErr = new TypeError('axe.run arguments are invalid');
  21378. if (!isContext(context5)) {
  21379. if (callback !== void 0) {
  21380. throw typeErr;
  21381. }
  21382. callback = options;
  21383. options = context5;
  21384. context5 = document;
  21385. }
  21386. if (_typeof(options) !== 'object') {
  21387. if (callback !== void 0) {
  21388. throw typeErr;
  21389. }
  21390. callback = options;
  21391. options = {};
  21392. }
  21393. if (typeof callback !== 'function' && callback !== void 0) {
  21394. throw typeErr;
  21395. }
  21396. options = clone_default(options);
  21397. options.reporter = (_ref89 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref89 !== void 0 ? _ref89 : 'v1';
  21398. return {
  21399. context: context5,
  21400. options: options,
  21401. callback: callback
  21402. };
  21403. }
  21404. function isContext(potential) {
  21405. switch (true) {
  21406. case typeof potential === 'string':
  21407. case Array.isArray(potential):
  21408. case window.Node && potential instanceof window.Node:
  21409. case window.NodeList && potential instanceof window.NodeList:
  21410. return true;
  21411. case _typeof(potential) !== 'object':
  21412. return false;
  21413. case potential.include !== void 0:
  21414. case potential.exclude !== void 0:
  21415. case typeof potential.length === 'number':
  21416. return true;
  21417. default:
  21418. return false;
  21419. }
  21420. }
  21421. var noop2 = function noop2() {};
  21422. function run4() {
  21423. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  21424. args[_key2] = arguments[_key2];
  21425. }
  21426. setupGlobals(args[0]);
  21427. var _normalizeRunParams = normalizeRunParams(args), context5 = _normalizeRunParams.context, options = _normalizeRunParams.options, _normalizeRunParams$c = _normalizeRunParams.callback, callback = _normalizeRunParams$c === void 0 ? noop2 : _normalizeRunParams$c;
  21428. var _getPromiseHandlers = getPromiseHandlers(callback), thenable = _getPromiseHandlers.thenable, resolve = _getPromiseHandlers.resolve, reject = _getPromiseHandlers.reject;
  21429. try {
  21430. assert_default(axe._audit, 'No audit configured');
  21431. assert_default(!axe._running, 'Axe is already running. Use `await axe.run()` to wait for the previous run to finish before starting a new run.');
  21432. } catch (e) {
  21433. return handleError(e, callback);
  21434. }
  21435. axe._running = true;
  21436. if (options.performanceTimer) {
  21437. axe.utils.performanceTimer.start();
  21438. }
  21439. function handleRunRules(rawResults, cleanup5) {
  21440. var respond = function respond(results) {
  21441. axe._running = false;
  21442. cleanup5();
  21443. try {
  21444. callback(null, results);
  21445. } catch (e) {
  21446. axe.log(e);
  21447. }
  21448. resolve(results);
  21449. };
  21450. if (options.performanceTimer) {
  21451. axe.utils.performanceTimer.end();
  21452. }
  21453. try {
  21454. createReport(rawResults, options, respond);
  21455. } catch (err2) {
  21456. axe._running = false;
  21457. cleanup5();
  21458. callback(err2);
  21459. reject(err2);
  21460. }
  21461. }
  21462. function errorRunRules(err2) {
  21463. if (options.performanceTimer) {
  21464. axe.utils.performanceTimer.end();
  21465. }
  21466. axe._running = false;
  21467. resetGlobals();
  21468. callback(err2);
  21469. reject(err2);
  21470. }
  21471. axe._runRules(context5, options, handleRunRules, errorRunRules);
  21472. return thenable;
  21473. }
  21474. function getPromiseHandlers(callback) {
  21475. var thenable, reject, resolve;
  21476. if (typeof Promise === 'function' && callback === noop2) {
  21477. thenable = new Promise(function(_resolve, _reject) {
  21478. reject = _reject;
  21479. resolve = _resolve;
  21480. });
  21481. } else {
  21482. resolve = reject = noop2;
  21483. }
  21484. return {
  21485. thenable: thenable,
  21486. reject: reject,
  21487. resolve: resolve
  21488. };
  21489. }
  21490. function createReport(rawResults, options, respond) {
  21491. var reporter5 = getReporter(options.reporter);
  21492. var results = reporter5(rawResults, options, respond);
  21493. if (results !== void 0) {
  21494. respond(results);
  21495. }
  21496. }
  21497. function handleError(err2, callback) {
  21498. resetGlobals();
  21499. if (typeof callback === 'function' && callback !== noop2) {
  21500. callback(err2.message);
  21501. return;
  21502. }
  21503. throw err2;
  21504. }
  21505. function runPartial() {
  21506. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  21507. args[_key3] = arguments[_key3];
  21508. }
  21509. var _normalizeRunParams2 = normalizeRunParams(args), options = _normalizeRunParams2.options, context5 = _normalizeRunParams2.context;
  21510. assert_default(axe._audit, 'Axe is not configured. Audit is missing.');
  21511. assert_default(!axe._running, 'Axe is already running. Use `await axe.run()` to wait for the previous run to finish before starting a new run.');
  21512. var contextObj = new Context(context5, axe._tree);
  21513. axe._tree = contextObj.flatTree;
  21514. axe._selectorData = _getSelectorData(contextObj.flatTree);
  21515. axe._running = true;
  21516. return new Promise(function(res, rej) {
  21517. axe._audit.run(contextObj, options, res, rej);
  21518. }).then(function(results) {
  21519. results = results.map(function(_ref90) {
  21520. var nodes = _ref90.nodes, result = _objectWithoutProperties(_ref90, _excluded8);
  21521. return _extends({
  21522. nodes: nodes.map(serializeNode)
  21523. }, result);
  21524. });
  21525. var frames = contextObj.frames.map(function(_ref91) {
  21526. var node = _ref91.node;
  21527. return new dq_element_default(node, options).toJSON();
  21528. });
  21529. var environmentData;
  21530. if (contextObj.initiator) {
  21531. environmentData = _getEnvironmentData();
  21532. }
  21533. axe._running = false;
  21534. teardown_default();
  21535. return {
  21536. results: results,
  21537. frames: frames,
  21538. environmentData: environmentData
  21539. };
  21540. })['catch'](function(err2) {
  21541. axe._running = false;
  21542. teardown_default();
  21543. return Promise.reject(err2);
  21544. });
  21545. }
  21546. function serializeNode(_ref92) {
  21547. var node = _ref92.node, nodeResult = _objectWithoutProperties(_ref92, _excluded9);
  21548. nodeResult.node = node.toJSON();
  21549. for (var _i30 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i30 < _arr2.length; _i30++) {
  21550. var type = _arr2[_i30];
  21551. nodeResult[type] = nodeResult[type].map(function(_ref93) {
  21552. var relatedNodes = _ref93.relatedNodes, checkResult = _objectWithoutProperties(_ref93, _excluded10);
  21553. return _extends({}, checkResult, {
  21554. relatedNodes: relatedNodes.map(function(node2) {
  21555. return node2.toJSON();
  21556. })
  21557. });
  21558. });
  21559. }
  21560. return nodeResult;
  21561. }
  21562. function finishRun(partialResults) {
  21563. var _ref95, _options$reporter2, _axe$_audit2;
  21564. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21565. options = clone_default(options);
  21566. var _ref94 = partialResults.find(function(r) {
  21567. return r.environmentData;
  21568. }) || {}, environmentData = _ref94.environmentData;
  21569. axe._audit.normalizeOptions(options);
  21570. options.reporter = (_ref95 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref95 !== void 0 ? _ref95 : 'v1';
  21571. setFrameSpec(partialResults);
  21572. var results = merge_results_default(partialResults);
  21573. results = axe._audit.after(results, options);
  21574. results.forEach(publish_metadata_default);
  21575. results = results.map(finalize_result_default);
  21576. return createReport2(results, _extends({
  21577. environmentData: environmentData
  21578. }, options));
  21579. }
  21580. function setFrameSpec(partialResults) {
  21581. var frameStack = [];
  21582. var _iterator4 = _createForOfIteratorHelper(partialResults), _step4;
  21583. try {
  21584. for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
  21585. var partialResult = _step4.value;
  21586. var frameSpec = frameStack.shift();
  21587. if (!partialResult) {
  21588. continue;
  21589. }
  21590. partialResult.frameSpec = frameSpec !== null && frameSpec !== void 0 ? frameSpec : null;
  21591. var frameSpecs = getMergedFrameSpecs(partialResult);
  21592. frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
  21593. }
  21594. } catch (err) {
  21595. _iterator4.e(err);
  21596. } finally {
  21597. _iterator4.f();
  21598. }
  21599. }
  21600. function getMergedFrameSpecs(_ref96) {
  21601. var childFrameSpecs = _ref96.frames, parentFrameSpec = _ref96.frameSpec;
  21602. if (!parentFrameSpec) {
  21603. return childFrameSpecs;
  21604. }
  21605. return childFrameSpecs.map(function(childFrameSpec) {
  21606. return dq_element_default.mergeSpecs(childFrameSpec, parentFrameSpec);
  21607. });
  21608. }
  21609. function createReport2(results, options) {
  21610. return new Promise(function(resolve) {
  21611. var reporter5 = getReporter(options.reporter);
  21612. reporter5(results, options, resolve);
  21613. });
  21614. }
  21615. function setup(node) {
  21616. if (axe._tree) {
  21617. throw new Error('Axe is already setup. Call `axe.teardown()` before calling `axe.setup` again.');
  21618. }
  21619. axe._tree = get_flattened_tree_default(node);
  21620. axe._selectorData = _getSelectorData(axe._tree);
  21621. return axe._tree[0];
  21622. }
  21623. var setup_default = setup;
  21624. var naReporter = function naReporter(results, options, callback) {
  21625. console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.');
  21626. if (typeof options === 'function') {
  21627. callback = options;
  21628. options = {};
  21629. }
  21630. var _options2 = options, environmentData = _options2.environmentData, toolOptions = _objectWithoutProperties(_options2, _excluded11);
  21631. callback(_extends({}, _getEnvironmentData(environmentData), {
  21632. toolOptions: toolOptions
  21633. }, process_aggregate_default(results, options)));
  21634. };
  21635. var na_default = naReporter;
  21636. var noPassesReporter = function noPassesReporter(results, options, callback) {
  21637. if (typeof options === 'function') {
  21638. callback = options;
  21639. options = {};
  21640. }
  21641. var _options3 = options, environmentData = _options3.environmentData, toolOptions = _objectWithoutProperties(_options3, _excluded12);
  21642. options.resultTypes = [ 'violations' ];
  21643. var _process_aggregate_de = process_aggregate_default(results, options), violations = _process_aggregate_de.violations;
  21644. callback(_extends({}, _getEnvironmentData(environmentData), {
  21645. toolOptions: toolOptions,
  21646. violations: violations
  21647. }));
  21648. };
  21649. var no_passes_default = noPassesReporter;
  21650. var rawReporter = function rawReporter(results, options, callback) {
  21651. if (typeof options === 'function') {
  21652. callback = options;
  21653. options = {};
  21654. }
  21655. if (!results || !Array.isArray(results)) {
  21656. return callback(results);
  21657. }
  21658. var transformedResults = results.map(function(result) {
  21659. var transformedResult = _extends({}, result);
  21660. var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
  21661. for (var _i31 = 0, _types = types; _i31 < _types.length; _i31++) {
  21662. var type = _types[_i31];
  21663. if (transformedResult[type] && Array.isArray(transformedResult[type])) {
  21664. transformedResult[type] = transformedResult[type].map(function(_ref97) {
  21665. var _node;
  21666. var node = _ref97.node, typeResult = _objectWithoutProperties(_ref97, _excluded13);
  21667. node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
  21668. return _extends({
  21669. node: node
  21670. }, typeResult);
  21671. });
  21672. }
  21673. }
  21674. return transformedResult;
  21675. });
  21676. callback(transformedResults);
  21677. };
  21678. var raw_default = rawReporter;
  21679. var rawEnvReporter = function rawEnvReporter(results, options, callback) {
  21680. if (typeof options === 'function') {
  21681. callback = options;
  21682. options = {};
  21683. }
  21684. var _options4 = options, environmentData = _options4.environmentData, toolOptions = _objectWithoutProperties(_options4, _excluded14);
  21685. raw_default(results, toolOptions, function(raw3) {
  21686. var env = _getEnvironmentData(environmentData);
  21687. callback({
  21688. raw: raw3,
  21689. env: env
  21690. });
  21691. });
  21692. };
  21693. var raw_env_default = rawEnvReporter;
  21694. var v1Reporter = function v1Reporter(results, options, callback) {
  21695. if (typeof options === 'function') {
  21696. callback = options;
  21697. options = {};
  21698. }
  21699. var _options5 = options, environmentData = _options5.environmentData, toolOptions = _objectWithoutProperties(_options5, _excluded15);
  21700. var out = process_aggregate_default(results, options);
  21701. var addFailureSummaries = function addFailureSummaries(result) {
  21702. result.nodes.forEach(function(nodeResult) {
  21703. nodeResult.failureSummary = failure_summary_default(nodeResult);
  21704. });
  21705. };
  21706. out.incomplete.forEach(addFailureSummaries);
  21707. out.violations.forEach(addFailureSummaries);
  21708. callback(_extends({}, _getEnvironmentData(environmentData), {
  21709. toolOptions: toolOptions
  21710. }, out));
  21711. };
  21712. var v1_default = v1Reporter;
  21713. var v2Reporter = function v2Reporter(results, options, callback) {
  21714. if (typeof options === 'function') {
  21715. callback = options;
  21716. options = {};
  21717. }
  21718. var _options6 = options, environmentData = _options6.environmentData, toolOptions = _objectWithoutProperties(_options6, _excluded16);
  21719. var out = process_aggregate_default(results, options);
  21720. callback(_extends({}, _getEnvironmentData(environmentData), {
  21721. toolOptions: toolOptions
  21722. }, out));
  21723. };
  21724. var v2_default = v2Reporter;
  21725. axe.constants = constants_default;
  21726. axe.log = log_default;
  21727. axe.AbstractVirtualNode = abstract_virtual_node_default;
  21728. axe.SerialVirtualNode = serial_virtual_node_default;
  21729. axe.VirtualNode = virtual_node_default;
  21730. axe._cache = cache_default;
  21731. axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
  21732. axe._thisWillBeDeletedDoNotUse.base = {
  21733. Audit: audit_default,
  21734. CheckResult: check_result_default,
  21735. Check: check_default,
  21736. Context: Context,
  21737. RuleResult: rule_result_default,
  21738. Rule: rule_default,
  21739. metadataFunctionMap: metadata_function_map_default
  21740. };
  21741. axe._thisWillBeDeletedDoNotUse['public'] = {
  21742. reporters: reporters
  21743. };
  21744. axe.imports = imports_exports;
  21745. axe.cleanup = cleanup_default;
  21746. axe.configure = configure_default;
  21747. axe.frameMessenger = frameMessenger2;
  21748. axe.getRules = get_rules_default;
  21749. axe._load = load_default;
  21750. axe.plugins = {};
  21751. axe.registerPlugin = plugins_default;
  21752. axe.hasReporter = hasReporter;
  21753. axe.getReporter = getReporter;
  21754. axe.addReporter = addReporter;
  21755. axe.reset = reset_default;
  21756. axe._runRules = run_rules_default;
  21757. axe.runVirtualRule = run_virtual_rule_default;
  21758. axe.run = run4;
  21759. axe.setup = setup_default;
  21760. axe.teardown = teardown_default;
  21761. axe.runPartial = runPartial;
  21762. axe.finishRun = finishRun;
  21763. axe.commons = commons_exports;
  21764. axe.utils = utils_exports;
  21765. axe.addReporter('na', na_default);
  21766. axe.addReporter('no-passes', no_passes_default);
  21767. axe.addReporter('rawEnv', raw_env_default);
  21768. axe.addReporter('raw', raw_default);
  21769. axe.addReporter('v1', v1_default);
  21770. axe.addReporter('v2', v2_default, true);
  21771. })();
  21772. 'use strict';
  21773. axe._load({
  21774. lang: 'en',
  21775. data: {
  21776. rules: {
  21777. accesskeys: {
  21778. description: 'Ensures every accesskey attribute value is unique',
  21779. help: 'accesskey attribute value should be unique'
  21780. },
  21781. 'area-alt': {
  21782. description: 'Ensures <area> elements of image maps have alternate text',
  21783. help: 'Active <area> elements must have alternate text'
  21784. },
  21785. 'aria-allowed-attr': {
  21786. description: 'Ensures ARIA attributes are allowed for an element\'s role',
  21787. help: 'Elements must only use allowed ARIA attributes'
  21788. },
  21789. 'aria-allowed-role': {
  21790. description: 'Ensures role attribute has an appropriate value for the element',
  21791. help: 'ARIA role should be appropriate for the element'
  21792. },
  21793. 'aria-command-name': {
  21794. description: 'Ensures every ARIA button, link and menuitem has an accessible name',
  21795. help: 'ARIA commands must have an accessible name'
  21796. },
  21797. 'aria-dialog-name': {
  21798. description: 'Ensures every ARIA dialog and alertdialog node has an accessible name',
  21799. help: 'ARIA dialog and alertdialog nodes should have an accessible name'
  21800. },
  21801. 'aria-hidden-body': {
  21802. description: 'Ensures aria-hidden=\'true\' is not present on the document body.',
  21803. help: 'aria-hidden=\'true\' must not be present on the document body'
  21804. },
  21805. 'aria-hidden-focus': {
  21806. description: 'Ensures aria-hidden elements are not focusable nor contain focusable elements',
  21807. help: 'ARIA hidden element must not be focusable or contain focusable elements'
  21808. },
  21809. 'aria-input-field-name': {
  21810. description: 'Ensures every ARIA input field has an accessible name',
  21811. help: 'ARIA input fields must have an accessible name'
  21812. },
  21813. 'aria-meter-name': {
  21814. description: 'Ensures every ARIA meter node has an accessible name',
  21815. help: 'ARIA meter nodes must have an accessible name'
  21816. },
  21817. 'aria-progressbar-name': {
  21818. description: 'Ensures every ARIA progressbar node has an accessible name',
  21819. help: 'ARIA progressbar nodes must have an accessible name'
  21820. },
  21821. 'aria-required-attr': {
  21822. description: 'Ensures elements with ARIA roles have all required ARIA attributes',
  21823. help: 'Required ARIA attributes must be provided'
  21824. },
  21825. 'aria-required-children': {
  21826. description: 'Ensures elements with an ARIA role that require child roles contain them',
  21827. help: 'Certain ARIA roles must contain particular children'
  21828. },
  21829. 'aria-required-parent': {
  21830. description: 'Ensures elements with an ARIA role that require parent roles are contained by them',
  21831. help: 'Certain ARIA roles must be contained by particular parents'
  21832. },
  21833. 'aria-roledescription': {
  21834. description: 'Ensure aria-roledescription is only used on elements with an implicit or explicit role',
  21835. help: 'aria-roledescription must be on elements with a semantic role'
  21836. },
  21837. 'aria-roles': {
  21838. description: 'Ensures all elements with a role attribute use a valid value',
  21839. help: 'ARIA roles used must conform to valid values'
  21840. },
  21841. 'aria-text': {
  21842. description: 'Ensures "role=text" is used on elements with no focusable descendants',
  21843. help: '"role=text" should have no focusable descendants'
  21844. },
  21845. 'aria-toggle-field-name': {
  21846. description: 'Ensures every ARIA toggle field has an accessible name',
  21847. help: 'ARIA toggle fields must have an accessible name'
  21848. },
  21849. 'aria-tooltip-name': {
  21850. description: 'Ensures every ARIA tooltip node has an accessible name',
  21851. help: 'ARIA tooltip nodes must have an accessible name'
  21852. },
  21853. 'aria-treeitem-name': {
  21854. description: 'Ensures every ARIA treeitem node has an accessible name',
  21855. help: 'ARIA treeitem nodes should have an accessible name'
  21856. },
  21857. 'aria-valid-attr-value': {
  21858. description: 'Ensures all ARIA attributes have valid values',
  21859. help: 'ARIA attributes must conform to valid values'
  21860. },
  21861. 'aria-valid-attr': {
  21862. description: 'Ensures attributes that begin with aria- are valid ARIA attributes',
  21863. help: 'ARIA attributes must conform to valid names'
  21864. },
  21865. 'audio-caption': {
  21866. description: 'Ensures <audio> elements have captions',
  21867. help: '<audio> elements must have a captions track'
  21868. },
  21869. 'autocomplete-valid': {
  21870. description: 'Ensure the autocomplete attribute is correct and suitable for the form field',
  21871. help: 'autocomplete attribute must be used correctly'
  21872. },
  21873. 'avoid-inline-spacing': {
  21874. description: 'Ensure that text spacing set through style attributes can be adjusted with custom stylesheets',
  21875. help: 'Inline text spacing must be adjustable with custom stylesheets'
  21876. },
  21877. blink: {
  21878. description: 'Ensures <blink> elements are not used',
  21879. help: '<blink> elements are deprecated and must not be used'
  21880. },
  21881. 'button-name': {
  21882. description: 'Ensures buttons have discernible text',
  21883. help: 'Buttons must have discernible text'
  21884. },
  21885. bypass: {
  21886. description: 'Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content',
  21887. help: 'Page must have means to bypass repeated blocks'
  21888. },
  21889. 'color-contrast-enhanced': {
  21890. description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AAA contrast ratio thresholds',
  21891. help: 'Elements must have sufficient color contrast'
  21892. },
  21893. 'color-contrast': {
  21894. description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
  21895. help: 'Elements must have sufficient color contrast'
  21896. },
  21897. 'css-orientation-lock': {
  21898. description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations',
  21899. help: 'CSS Media queries must not lock display orientation'
  21900. },
  21901. 'definition-list': {
  21902. description: 'Ensures <dl> elements are structured correctly',
  21903. help: '<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements'
  21904. },
  21905. dlitem: {
  21906. description: 'Ensures <dt> and <dd> elements are contained by a <dl>',
  21907. help: '<dt> and <dd> elements must be contained by a <dl>'
  21908. },
  21909. 'document-title': {
  21910. description: 'Ensures each HTML document contains a non-empty <title> element',
  21911. help: 'Documents must have <title> element to aid in navigation'
  21912. },
  21913. 'duplicate-id-active': {
  21914. description: 'Ensures every id attribute value of active elements is unique',
  21915. help: 'IDs of active elements must be unique'
  21916. },
  21917. 'duplicate-id-aria': {
  21918. description: 'Ensures every id attribute value used in ARIA and in labels is unique',
  21919. help: 'IDs used in ARIA and labels must be unique'
  21920. },
  21921. 'duplicate-id': {
  21922. description: 'Ensures every id attribute value is unique',
  21923. help: 'id attribute value must be unique'
  21924. },
  21925. 'empty-heading': {
  21926. description: 'Ensures headings have discernible text',
  21927. help: 'Headings should not be empty'
  21928. },
  21929. 'empty-table-header': {
  21930. description: 'Ensures table headers have discernible text',
  21931. help: 'Table header text must not be empty'
  21932. },
  21933. 'focus-order-semantics': {
  21934. description: 'Ensures elements in the focus order have a role appropriate for interactive content',
  21935. help: 'Elements in the focus order should have an appropriate role'
  21936. },
  21937. 'form-field-multiple-labels': {
  21938. description: 'Ensures form field does not have multiple label elements',
  21939. help: 'Form field must not have multiple label elements'
  21940. },
  21941. 'frame-focusable-content': {
  21942. description: 'Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1',
  21943. help: 'Frames with focusable content must not have tabindex=-1'
  21944. },
  21945. 'frame-tested': {
  21946. description: 'Ensures <iframe> and <frame> elements contain the axe-core script',
  21947. help: 'Frames should be tested with axe-core'
  21948. },
  21949. 'frame-title-unique': {
  21950. description: 'Ensures <iframe> and <frame> elements contain a unique title attribute',
  21951. help: 'Frames should have a unique title attribute'
  21952. },
  21953. 'frame-title': {
  21954. description: 'Ensures <iframe> and <frame> elements have an accessible name',
  21955. help: 'Frames must have an accessible name'
  21956. },
  21957. 'heading-order': {
  21958. description: 'Ensures the order of headings is semantically correct',
  21959. help: 'Heading levels should only increase by one'
  21960. },
  21961. 'hidden-content': {
  21962. description: 'Informs users about hidden content.',
  21963. help: 'Hidden content on the page should be analyzed'
  21964. },
  21965. 'html-has-lang': {
  21966. description: 'Ensures every HTML document has a lang attribute',
  21967. help: '<html> element must have a lang attribute'
  21968. },
  21969. 'html-lang-valid': {
  21970. description: 'Ensures the lang attribute of the <html> element has a valid value',
  21971. help: '<html> element must have a valid value for the lang attribute'
  21972. },
  21973. 'html-xml-lang-mismatch': {
  21974. description: 'Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page',
  21975. help: 'HTML elements with lang and xml:lang must have the same base language'
  21976. },
  21977. 'identical-links-same-purpose': {
  21978. description: 'Ensure that links with the same accessible name serve a similar purpose',
  21979. help: 'Links with the same name must have a similar purpose'
  21980. },
  21981. 'image-alt': {
  21982. description: 'Ensures <img> elements have alternate text or a role of none or presentation',
  21983. help: 'Images must have alternate text'
  21984. },
  21985. 'image-redundant-alt': {
  21986. description: 'Ensure image alternative is not repeated as text',
  21987. help: 'Alternative text of images should not be repeated as text'
  21988. },
  21989. 'input-button-name': {
  21990. description: 'Ensures input buttons have discernible text',
  21991. help: 'Input buttons must have discernible text'
  21992. },
  21993. 'input-image-alt': {
  21994. description: 'Ensures <input type="image"> elements have alternate text',
  21995. help: 'Image buttons must have alternate text'
  21996. },
  21997. 'label-content-name-mismatch': {
  21998. description: 'Ensures that elements labelled through their content must have their visible text as part of their accessible name',
  21999. help: 'Elements must have their visible text as part of their accessible name'
  22000. },
  22001. 'label-title-only': {
  22002. description: 'Ensures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes',
  22003. help: 'Form elements should have a visible label'
  22004. },
  22005. label: {
  22006. description: 'Ensures every form element has a label',
  22007. help: 'Form elements must have labels'
  22008. },
  22009. 'landmark-banner-is-top-level': {
  22010. description: 'Ensures the banner landmark is at top level',
  22011. help: 'Banner landmark should not be contained in another landmark'
  22012. },
  22013. 'landmark-complementary-is-top-level': {
  22014. description: 'Ensures the complementary landmark or aside is at top level',
  22015. help: 'Aside should not be contained in another landmark'
  22016. },
  22017. 'landmark-contentinfo-is-top-level': {
  22018. description: 'Ensures the contentinfo landmark is at top level',
  22019. help: 'Contentinfo landmark should not be contained in another landmark'
  22020. },
  22021. 'landmark-main-is-top-level': {
  22022. description: 'Ensures the main landmark is at top level',
  22023. help: 'Main landmark should not be contained in another landmark'
  22024. },
  22025. 'landmark-no-duplicate-banner': {
  22026. description: 'Ensures the document has at most one banner landmark',
  22027. help: 'Document should not have more than one banner landmark'
  22028. },
  22029. 'landmark-no-duplicate-contentinfo': {
  22030. description: 'Ensures the document has at most one contentinfo landmark',
  22031. help: 'Document should not have more than one contentinfo landmark'
  22032. },
  22033. 'landmark-no-duplicate-main': {
  22034. description: 'Ensures the document has at most one main landmark',
  22035. help: 'Document should not have more than one main landmark'
  22036. },
  22037. 'landmark-one-main': {
  22038. description: 'Ensures the document has a main landmark',
  22039. help: 'Document should have one main landmark'
  22040. },
  22041. 'landmark-unique': {
  22042. help: 'Ensures landmarks are unique',
  22043. description: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination'
  22044. },
  22045. 'link-in-text-block': {
  22046. description: 'Ensure links are distinguished from surrounding text in a way that does not rely on color',
  22047. help: 'Links must be distinguishable without relying on color'
  22048. },
  22049. 'link-name': {
  22050. description: 'Ensures links have discernible text',
  22051. help: 'Links must have discernible text'
  22052. },
  22053. list: {
  22054. description: 'Ensures that lists are structured correctly',
  22055. help: '<ul> and <ol> must only directly contain <li>, <script> or <template> elements'
  22056. },
  22057. listitem: {
  22058. description: 'Ensures <li> elements are used semantically',
  22059. help: '<li> elements must be contained in a <ul> or <ol>'
  22060. },
  22061. marquee: {
  22062. description: 'Ensures <marquee> elements are not used',
  22063. help: '<marquee> elements are deprecated and must not be used'
  22064. },
  22065. 'meta-refresh': {
  22066. description: 'Ensures <meta http-equiv="refresh"> is not used',
  22067. help: 'Timed refresh must not exist'
  22068. },
  22069. 'meta-viewport-large': {
  22070. description: 'Ensures <meta name="viewport"> can scale a significant amount',
  22071. help: 'Users should be able to zoom and scale the text up to 500%'
  22072. },
  22073. 'meta-viewport': {
  22074. description: 'Ensures <meta name="viewport"> does not disable text scaling and zooming',
  22075. help: 'Zooming and scaling should not be disabled'
  22076. },
  22077. 'nested-interactive': {
  22078. description: 'Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies',
  22079. help: 'Interactive controls must not be nested'
  22080. },
  22081. 'no-autoplay-audio': {
  22082. description: 'Ensures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio',
  22083. help: '<video> or <audio> elements must not play automatically'
  22084. },
  22085. 'object-alt': {
  22086. description: 'Ensures <object> elements have alternate text',
  22087. help: '<object> elements must have alternate text'
  22088. },
  22089. 'p-as-heading': {
  22090. description: 'Ensure bold, italic text and font-size is not used to style <p> elements as a heading',
  22091. help: 'Styled <p> elements must not be used as headings'
  22092. },
  22093. 'page-has-heading-one': {
  22094. description: 'Ensure that the page, or at least one of its frames contains a level-one heading',
  22095. help: 'Page should contain a level-one heading'
  22096. },
  22097. 'presentation-role-conflict': {
  22098. description: 'Flags elements whose role is none or presentation and which cause the role conflict resolution to trigger.',
  22099. help: 'Elements of role none or presentation should be flagged'
  22100. },
  22101. region: {
  22102. description: 'Ensures all page content is contained by landmarks',
  22103. help: 'All page content should be contained by landmarks'
  22104. },
  22105. 'role-img-alt': {
  22106. description: 'Ensures [role=\'img\'] elements have alternate text',
  22107. help: '[role=\'img\'] elements must have an alternative text'
  22108. },
  22109. 'scope-attr-valid': {
  22110. description: 'Ensures the scope attribute is used correctly on tables',
  22111. help: 'scope attribute should be used correctly'
  22112. },
  22113. 'scrollable-region-focusable': {
  22114. description: 'Ensure elements that have scrollable content are accessible by keyboard',
  22115. help: 'Scrollable region must have keyboard access'
  22116. },
  22117. 'select-name': {
  22118. description: 'Ensures select element has an accessible name',
  22119. help: 'Select element must have an accessible name'
  22120. },
  22121. 'server-side-image-map': {
  22122. description: 'Ensures that server-side image maps are not used',
  22123. help: 'Server-side image maps must not be used'
  22124. },
  22125. 'skip-link': {
  22126. description: 'Ensure all skip links have a focusable target',
  22127. help: 'The skip-link target should exist and be focusable'
  22128. },
  22129. 'svg-img-alt': {
  22130. description: 'Ensures <svg> elements with an img, graphics-document or graphics-symbol role have an accessible text',
  22131. help: '<svg> elements with an img role must have an alternative text'
  22132. },
  22133. tabindex: {
  22134. description: 'Ensures tabindex attribute values are not greater than 0',
  22135. help: 'Elements should not have tabindex greater than zero'
  22136. },
  22137. 'table-duplicate-name': {
  22138. description: 'Ensure the <caption> element does not contain the same text as the summary attribute',
  22139. help: 'tables should not have the same summary and caption'
  22140. },
  22141. 'table-fake-caption': {
  22142. description: 'Ensure that tables with a caption use the <caption> element.',
  22143. help: 'Data or header cells must not be used to give caption to a data table.'
  22144. },
  22145. 'td-has-header': {
  22146. description: 'Ensure that each non-empty data cell in a <table> larger than 3 by 3 has one or more table headers',
  22147. help: 'Non-empty <td> elements in larger <table> must have an associated table header'
  22148. },
  22149. 'td-headers-attr': {
  22150. description: 'Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table',
  22151. help: 'Table cells that use the headers attribute must only refer to cells in the same table'
  22152. },
  22153. 'th-has-data-cells': {
  22154. description: 'Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe',
  22155. help: 'Table headers in a data table must refer to data cells'
  22156. },
  22157. 'valid-lang': {
  22158. description: 'Ensures lang attributes have valid values',
  22159. help: 'lang attribute must have a valid value'
  22160. },
  22161. 'video-caption': {
  22162. description: 'Ensures <video> elements have captions',
  22163. help: '<video> elements must have captions'
  22164. }
  22165. },
  22166. checks: {
  22167. abstractrole: {
  22168. impact: 'serious',
  22169. messages: {
  22170. pass: 'Abstract roles are not used',
  22171. fail: {
  22172. singular: 'Abstract role cannot be directly used: ${data.values}',
  22173. plural: 'Abstract roles cannot be directly used: ${data.values}'
  22174. }
  22175. }
  22176. },
  22177. 'aria-allowed-attr': {
  22178. impact: 'critical',
  22179. messages: {
  22180. pass: 'ARIA attributes are used correctly for the defined role',
  22181. fail: {
  22182. singular: 'ARIA attribute is not allowed: ${data.values}',
  22183. plural: 'ARIA attributes are not allowed: ${data.values}'
  22184. },
  22185. incomplete: 'Check that there is no problem if the ARIA attribute is ignored on this element: ${data.values}'
  22186. }
  22187. },
  22188. 'aria-allowed-role': {
  22189. impact: 'minor',
  22190. messages: {
  22191. pass: 'ARIA role is allowed for given element',
  22192. fail: {
  22193. singular: 'ARIA role ${data.values} is not allowed for given element',
  22194. plural: 'ARIA roles ${data.values} are not allowed for given element'
  22195. },
  22196. incomplete: {
  22197. singular: 'ARIA role ${data.values} must be removed when the element is made visible, as it is not allowed for the element',
  22198. plural: 'ARIA roles ${data.values} must be removed when the element is made visible, as they are not allowed for the element'
  22199. }
  22200. }
  22201. },
  22202. 'aria-errormessage': {
  22203. impact: 'critical',
  22204. messages: {
  22205. pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique',
  22206. fail: {
  22207. singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
  22208. plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
  22209. hidden: 'aria-errormessage value `${data.values}` cannot reference a hidden element'
  22210. },
  22211. incomplete: {
  22212. singular: 'ensure aria-errormessage value `${data.values}` references an existing element',
  22213. plural: 'ensure aria-errormessage values `${data.values}` reference existing elements',
  22214. idrefs: 'unable to determine if aria-errormessage element exists on the page: ${data.values}'
  22215. }
  22216. }
  22217. },
  22218. 'aria-hidden-body': {
  22219. impact: 'critical',
  22220. messages: {
  22221. pass: 'No aria-hidden attribute is present on document body',
  22222. fail: 'aria-hidden=true should not be present on the document body'
  22223. }
  22224. },
  22225. 'aria-level': {
  22226. impact: 'serious',
  22227. messages: {
  22228. pass: 'aria-level values are valid',
  22229. incomplete: 'aria-level values greater than 6 are not supported in all screenreader and browser combinations'
  22230. }
  22231. },
  22232. 'aria-prohibited-attr': {
  22233. impact: 'serious',
  22234. messages: {
  22235. pass: 'ARIA attribute is allowed',
  22236. fail: {
  22237. hasRolePlural: '${data.prohibited} attributes cannot be used with role "${data.role}".',
  22238. hasRoleSingular: '${data.prohibited} attribute cannot be used with role "${data.role}".',
  22239. noRolePlural: '${data.prohibited} attributes cannot be used on a ${data.nodeName} with no valid role attribute.',
  22240. noRoleSingular: '${data.prohibited} attribute cannot be used on a ${data.nodeName} with no valid role attribute.'
  22241. },
  22242. incomplete: {
  22243. hasRoleSingular: '${data.prohibited} attribute is not well supported with role "${data.role}".',
  22244. hasRolePlural: '${data.prohibited} attributes are not well supported with role "${data.role}".',
  22245. noRoleSingular: '${data.prohibited} attribute is not well supported on a ${data.nodeName} with no valid role attribute.',
  22246. noRolePlural: '${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute.'
  22247. }
  22248. }
  22249. },
  22250. 'aria-required-attr': {
  22251. impact: 'critical',
  22252. messages: {
  22253. pass: 'All required ARIA attributes are present',
  22254. fail: {
  22255. singular: 'Required ARIA attribute not present: ${data.values}',
  22256. plural: 'Required ARIA attributes not present: ${data.values}'
  22257. }
  22258. }
  22259. },
  22260. 'aria-required-children': {
  22261. impact: 'critical',
  22262. messages: {
  22263. pass: 'Required ARIA children are present',
  22264. fail: {
  22265. singular: 'Required ARIA child role not present: ${data.values}',
  22266. plural: 'Required ARIA children role not present: ${data.values}'
  22267. },
  22268. incomplete: {
  22269. singular: 'Expecting ARIA child role to be added: ${data.values}',
  22270. plural: 'Expecting ARIA children role to be added: ${data.values}'
  22271. }
  22272. }
  22273. },
  22274. 'aria-required-parent': {
  22275. impact: 'critical',
  22276. messages: {
  22277. pass: 'Required ARIA parent role present',
  22278. fail: {
  22279. singular: 'Required ARIA parent role not present: ${data.values}',
  22280. plural: 'Required ARIA parents role not present: ${data.values}'
  22281. }
  22282. }
  22283. },
  22284. 'aria-roledescription': {
  22285. impact: 'serious',
  22286. messages: {
  22287. pass: 'aria-roledescription used on a supported semantic role',
  22288. incomplete: 'Check that the aria-roledescription is announced by supported screen readers',
  22289. fail: 'Give the element a role that supports aria-roledescription'
  22290. }
  22291. },
  22292. 'aria-unsupported-attr': {
  22293. impact: 'critical',
  22294. messages: {
  22295. pass: 'ARIA attribute is supported',
  22296. fail: 'ARIA attribute is not widely supported in screen readers and assistive technologies: ${data.values}'
  22297. }
  22298. },
  22299. 'aria-valid-attr-value': {
  22300. impact: 'critical',
  22301. messages: {
  22302. pass: 'ARIA attribute values are valid',
  22303. fail: {
  22304. singular: 'Invalid ARIA attribute value: ${data.values}',
  22305. plural: 'Invalid ARIA attribute values: ${data.values}'
  22306. },
  22307. incomplete: {
  22308. noId: 'ARIA attribute element ID does not exist on the page: ${data.needsReview}',
  22309. noIdShadow: 'ARIA attribute element ID does not exist on the page or is a descendant of a different shadow DOM tree: ${data.needsReview}',
  22310. ariaCurrent: 'ARIA attribute value is invalid and will be treated as "aria-current=true": ${data.needsReview}',
  22311. idrefs: 'Unable to determine if ARIA attribute element ID exists on the page: ${data.needsReview}'
  22312. }
  22313. }
  22314. },
  22315. 'aria-valid-attr': {
  22316. impact: 'critical',
  22317. messages: {
  22318. pass: 'ARIA attribute name is valid',
  22319. fail: {
  22320. singular: 'Invalid ARIA attribute name: ${data.values}',
  22321. plural: 'Invalid ARIA attribute names: ${data.values}'
  22322. }
  22323. }
  22324. },
  22325. deprecatedrole: {
  22326. impact: 'minor',
  22327. messages: {
  22328. pass: 'ARIA role is not deprecated',
  22329. fail: 'The role used is deprecated: ${data}'
  22330. }
  22331. },
  22332. fallbackrole: {
  22333. impact: 'serious',
  22334. messages: {
  22335. pass: 'Only one role value used',
  22336. fail: 'Use only one role value, since fallback roles are not supported in older browsers',
  22337. incomplete: 'Use only role \'presentation\' or \'none\' since they are synonymous.'
  22338. }
  22339. },
  22340. 'has-global-aria-attribute': {
  22341. impact: 'minor',
  22342. messages: {
  22343. pass: {
  22344. singular: 'Element has global ARIA attribute: ${data.values}',
  22345. plural: 'Element has global ARIA attributes: ${data.values}'
  22346. },
  22347. fail: 'Element does not have global ARIA attribute'
  22348. }
  22349. },
  22350. 'has-widget-role': {
  22351. impact: 'minor',
  22352. messages: {
  22353. pass: 'Element has a widget role.',
  22354. fail: 'Element does not have a widget role.'
  22355. }
  22356. },
  22357. invalidrole: {
  22358. impact: 'critical',
  22359. messages: {
  22360. pass: 'ARIA role is valid',
  22361. fail: {
  22362. singular: 'Role must be one of the valid ARIA roles: ${data.values}',
  22363. plural: 'Roles must be one of the valid ARIA roles: ${data.values}'
  22364. }
  22365. }
  22366. },
  22367. 'is-element-focusable': {
  22368. impact: 'minor',
  22369. messages: {
  22370. pass: 'Element is focusable.',
  22371. fail: 'Element is not focusable.'
  22372. }
  22373. },
  22374. 'no-implicit-explicit-label': {
  22375. impact: 'moderate',
  22376. messages: {
  22377. pass: 'There is no mismatch between a <label> and accessible name',
  22378. incomplete: 'Check that the <label> does not need be part of the ARIA ${data} field\'s name'
  22379. }
  22380. },
  22381. unsupportedrole: {
  22382. impact: 'critical',
  22383. messages: {
  22384. pass: 'ARIA role is supported',
  22385. fail: 'The role used is not widely supported in screen readers and assistive technologies: ${data.values}'
  22386. }
  22387. },
  22388. 'valid-scrollable-semantics': {
  22389. impact: 'minor',
  22390. messages: {
  22391. pass: 'Element has valid semantics for an element in the focus order.',
  22392. fail: 'Element has invalid semantics for an element in the focus order.'
  22393. }
  22394. },
  22395. 'color-contrast-enhanced': {
  22396. impact: 'serious',
  22397. messages: {
  22398. pass: 'Element has sufficient color contrast of ${data.contrastRatio}',
  22399. fail: {
  22400. default: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
  22401. fgOnShadowColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the foreground and shadow color (foreground color: ${data.fgColor}, text-shadow color: ${data.shadowColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
  22402. shadowOnBgColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the shadow color and background color (text-shadow color: ${data.shadowColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}'
  22403. },
  22404. incomplete: {
  22405. default: 'Unable to determine contrast ratio',
  22406. bgImage: 'Element\'s background color could not be determined due to a background image',
  22407. bgGradient: 'Element\'s background color could not be determined due to a background gradient',
  22408. imgNode: 'Element\'s background color could not be determined because element contains an image node',
  22409. bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
  22410. fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
  22411. elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
  22412. elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
  22413. outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',
  22414. equalRatio: 'Element has a 1:1 contrast ratio with the background',
  22415. shortTextContent: 'Element content is too short to determine if it is actual text content',
  22416. nonBmp: 'Element content contains only non-text characters',
  22417. pseudoContent: 'Element\'s background color could not be determined due to a pseudo element'
  22418. }
  22419. }
  22420. },
  22421. 'color-contrast': {
  22422. impact: 'serious',
  22423. messages: {
  22424. pass: {
  22425. default: 'Element has sufficient color contrast of ${data.contrastRatio}',
  22426. hidden: 'Element is hidden'
  22427. },
  22428. fail: {
  22429. default: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
  22430. fgOnShadowColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the foreground and shadow color (foreground color: ${data.fgColor}, text-shadow color: ${data.shadowColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
  22431. shadowOnBgColor: 'Element has insufficient color contrast of ${data.contrastRatio} between the shadow color and background color (text-shadow color: ${data.shadowColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}'
  22432. },
  22433. incomplete: {
  22434. default: 'Unable to determine contrast ratio',
  22435. bgImage: 'Element\'s background color could not be determined due to a background image',
  22436. bgGradient: 'Element\'s background color could not be determined due to a background gradient',
  22437. imgNode: 'Element\'s background color could not be determined because element contains an image node',
  22438. bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
  22439. fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
  22440. elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
  22441. elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
  22442. outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',
  22443. equalRatio: 'Element has a 1:1 contrast ratio with the background',
  22444. shortTextContent: 'Element content is too short to determine if it is actual text content',
  22445. nonBmp: 'Element content contains only non-text characters',
  22446. pseudoContent: 'Element\'s background color could not be determined due to a pseudo element'
  22447. }
  22448. }
  22449. },
  22450. 'link-in-text-block': {
  22451. impact: 'serious',
  22452. messages: {
  22453. pass: 'Links can be distinguished from surrounding text in some way other than by color',
  22454. fail: 'Links need to be distinguished from surrounding text in some way other than by color',
  22455. incomplete: {
  22456. default: 'Unable to determine contrast ratio',
  22457. bgContrast: 'Element\'s contrast ratio could not be determined. Check for a distinct hover/focus style',
  22458. bgImage: 'Element\'s contrast ratio could not be determined due to a background image',
  22459. bgGradient: 'Element\'s contrast ratio could not be determined due to a background gradient',
  22460. imgNode: 'Element\'s contrast ratio could not be determined because element contains an image node',
  22461. bgOverlap: 'Element\'s contrast ratio could not be determined because of element overlap'
  22462. }
  22463. }
  22464. },
  22465. 'autocomplete-appropriate': {
  22466. impact: 'serious',
  22467. messages: {
  22468. pass: 'the autocomplete value is on an appropriate element',
  22469. fail: 'the autocomplete value is inappropriate for this type of input'
  22470. }
  22471. },
  22472. 'autocomplete-valid': {
  22473. impact: 'serious',
  22474. messages: {
  22475. pass: 'the autocomplete attribute is correctly formatted',
  22476. fail: 'the autocomplete attribute is incorrectly formatted'
  22477. }
  22478. },
  22479. accesskeys: {
  22480. impact: 'serious',
  22481. messages: {
  22482. pass: 'Accesskey attribute value is unique',
  22483. fail: 'Document has multiple elements with the same accesskey'
  22484. }
  22485. },
  22486. 'focusable-content': {
  22487. impact: 'moderate',
  22488. messages: {
  22489. pass: 'Element contains focusable elements',
  22490. fail: 'Element should have focusable content'
  22491. }
  22492. },
  22493. 'focusable-disabled': {
  22494. impact: 'serious',
  22495. messages: {
  22496. pass: 'No focusable elements contained within element',
  22497. incomplete: 'Check if the focusable elements immediately move the focus indicator',
  22498. fail: 'Focusable content should be disabled or be removed from the DOM'
  22499. }
  22500. },
  22501. 'focusable-element': {
  22502. impact: 'moderate',
  22503. messages: {
  22504. pass: 'Element is focusable',
  22505. fail: 'Element should be focusable'
  22506. }
  22507. },
  22508. 'focusable-modal-open': {
  22509. impact: 'serious',
  22510. messages: {
  22511. pass: 'No focusable elements while a modal is open',
  22512. incomplete: 'Check that focusable elements are not tabbable in the current state'
  22513. }
  22514. },
  22515. 'focusable-no-name': {
  22516. impact: 'serious',
  22517. messages: {
  22518. pass: 'Element is not in tab order or has accessible text',
  22519. fail: 'Element is in tab order and does not have accessible text',
  22520. incomplete: 'Unable to determine if element has an accessible name'
  22521. }
  22522. },
  22523. 'focusable-not-tabbable': {
  22524. impact: 'serious',
  22525. messages: {
  22526. pass: 'No focusable elements contained within element',
  22527. incomplete: 'Check if the focusable elements immediately move the focus indicator',
  22528. fail: 'Focusable content should have tabindex=\'-1\' or be removed from the DOM'
  22529. }
  22530. },
  22531. 'frame-focusable-content': {
  22532. impact: 'serious',
  22533. messages: {
  22534. pass: 'Element does not have focusable descendants',
  22535. fail: 'Element has focusable descendants',
  22536. incomplete: 'Could not determine if element has descendants'
  22537. }
  22538. },
  22539. 'landmark-is-top-level': {
  22540. impact: 'moderate',
  22541. messages: {
  22542. pass: 'The ${data.role} landmark is at the top level.',
  22543. fail: 'The ${data.role} landmark is contained in another landmark.'
  22544. }
  22545. },
  22546. 'no-focusable-content': {
  22547. impact: 'serious',
  22548. messages: {
  22549. pass: 'Element does not have focusable descendants',
  22550. fail: {
  22551. default: 'Element has focusable descendants',
  22552. notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with \'aria-hidden=true\')'
  22553. },
  22554. incomplete: 'Could not determine if element has descendants'
  22555. }
  22556. },
  22557. 'page-has-heading-one': {
  22558. impact: 'moderate',
  22559. messages: {
  22560. pass: 'Page has at least one level-one heading',
  22561. fail: 'Page must have a level-one heading'
  22562. }
  22563. },
  22564. 'page-has-main': {
  22565. impact: 'moderate',
  22566. messages: {
  22567. pass: 'Document has at least one main landmark',
  22568. fail: 'Document does not have a main landmark'
  22569. }
  22570. },
  22571. 'page-no-duplicate-banner': {
  22572. impact: 'moderate',
  22573. messages: {
  22574. pass: 'Document does not have more than one banner landmark',
  22575. fail: 'Document has more than one banner landmark'
  22576. }
  22577. },
  22578. 'page-no-duplicate-contentinfo': {
  22579. impact: 'moderate',
  22580. messages: {
  22581. pass: 'Document does not have more than one contentinfo landmark',
  22582. fail: 'Document has more than one contentinfo landmark'
  22583. }
  22584. },
  22585. 'page-no-duplicate-main': {
  22586. impact: 'moderate',
  22587. messages: {
  22588. pass: 'Document does not have more than one main landmark',
  22589. fail: 'Document has more than one main landmark'
  22590. }
  22591. },
  22592. tabindex: {
  22593. impact: 'serious',
  22594. messages: {
  22595. pass: 'Element does not have a tabindex greater than 0',
  22596. fail: 'Element has a tabindex greater than 0'
  22597. }
  22598. },
  22599. 'alt-space-value': {
  22600. impact: 'critical',
  22601. messages: {
  22602. pass: 'Element has a valid alt attribute value',
  22603. fail: 'Element has an alt attribute containing only a space character, which is not ignored by all screen readers'
  22604. }
  22605. },
  22606. 'duplicate-img-label': {
  22607. impact: 'minor',
  22608. messages: {
  22609. pass: 'Element does not duplicate existing text in <img> alt text',
  22610. fail: 'Element contains <img> element with alt text that duplicates existing text'
  22611. }
  22612. },
  22613. 'explicit-label': {
  22614. impact: 'critical',
  22615. messages: {
  22616. pass: 'Form element has an explicit <label>',
  22617. fail: 'Form element does not have an explicit <label>',
  22618. incomplete: 'Unable to determine if form element has an explicit <label>'
  22619. }
  22620. },
  22621. 'help-same-as-label': {
  22622. impact: 'minor',
  22623. messages: {
  22624. pass: 'Help text (title or aria-describedby) does not duplicate label text',
  22625. fail: 'Help text (title or aria-describedby) text is the same as the label text'
  22626. }
  22627. },
  22628. 'hidden-explicit-label': {
  22629. impact: 'critical',
  22630. messages: {
  22631. pass: 'Form element has a visible explicit <label>',
  22632. fail: 'Form element has explicit <label> that is hidden',
  22633. incomplete: 'Unable to determine if form element has explicit <label> that is hidden'
  22634. }
  22635. },
  22636. 'implicit-label': {
  22637. impact: 'critical',
  22638. messages: {
  22639. pass: 'Form element has an implicit (wrapped) <label>',
  22640. fail: 'Form element does not have an implicit (wrapped) <label>',
  22641. incomplete: 'Unable to determine if form element has an implicit (wrapped} <label>'
  22642. }
  22643. },
  22644. 'label-content-name-mismatch': {
  22645. impact: 'serious',
  22646. messages: {
  22647. pass: 'Element contains visible text as part of it\'s accessible name',
  22648. fail: 'Text inside the element is not included in the accessible name'
  22649. }
  22650. },
  22651. 'multiple-label': {
  22652. impact: 'moderate',
  22653. messages: {
  22654. pass: 'Form field does not have multiple label elements',
  22655. incomplete: 'Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.'
  22656. }
  22657. },
  22658. 'title-only': {
  22659. impact: 'serious',
  22660. messages: {
  22661. pass: 'Form element does not solely use title attribute for its label',
  22662. fail: 'Only title used to generate label for form element'
  22663. }
  22664. },
  22665. 'landmark-is-unique': {
  22666. impact: 'moderate',
  22667. messages: {
  22668. pass: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination',
  22669. fail: 'The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable'
  22670. }
  22671. },
  22672. 'has-lang': {
  22673. impact: 'serious',
  22674. messages: {
  22675. pass: 'The <html> element has a lang attribute',
  22676. fail: {
  22677. noXHTML: 'The xml:lang attribute is not valid on HTML pages, use the lang attribute.',
  22678. noLang: 'The <html> element does not have a lang attribute'
  22679. }
  22680. }
  22681. },
  22682. 'valid-lang': {
  22683. impact: 'serious',
  22684. messages: {
  22685. pass: 'Value of lang attribute is included in the list of valid languages',
  22686. fail: 'Value of lang attribute not included in the list of valid languages'
  22687. }
  22688. },
  22689. 'xml-lang-mismatch': {
  22690. impact: 'moderate',
  22691. messages: {
  22692. pass: 'Lang and xml:lang attributes have the same base language',
  22693. fail: 'Lang and xml:lang attributes do not have the same base language'
  22694. }
  22695. },
  22696. dlitem: {
  22697. impact: 'serious',
  22698. messages: {
  22699. pass: 'Description list item has a <dl> parent element',
  22700. fail: 'Description list item does not have a <dl> parent element'
  22701. }
  22702. },
  22703. listitem: {
  22704. impact: 'serious',
  22705. messages: {
  22706. pass: 'List item has a <ul>, <ol> or role="list" parent element',
  22707. fail: {
  22708. default: 'List item does not have a <ul>, <ol> parent element',
  22709. roleNotValid: 'List item does not have a <ul>, <ol> parent element without a role, or a role="list"'
  22710. }
  22711. }
  22712. },
  22713. 'only-dlitems': {
  22714. impact: 'serious',
  22715. messages: {
  22716. pass: 'List element only has direct children that are allowed inside <dt> or <dd> elements',
  22717. fail: 'List element has direct children that are not allowed inside <dt> or <dd> elements'
  22718. }
  22719. },
  22720. 'only-listitems': {
  22721. impact: 'serious',
  22722. messages: {
  22723. pass: 'List element only has direct children that are allowed inside <li> elements',
  22724. fail: {
  22725. default: 'List element has direct children that are not allowed inside <li> elements',
  22726. roleNotValid: 'List element has direct children with a role that is not allowed: ${data.roles}'
  22727. }
  22728. }
  22729. },
  22730. 'structured-dlitems': {
  22731. impact: 'serious',
  22732. messages: {
  22733. pass: 'When not empty, element has both <dt> and <dd> elements',
  22734. fail: 'When not empty, element does not have at least one <dt> element followed by at least one <dd> element'
  22735. }
  22736. },
  22737. caption: {
  22738. impact: 'critical',
  22739. messages: {
  22740. pass: 'The multimedia element has a captions track',
  22741. incomplete: 'Check that captions is available for the element'
  22742. }
  22743. },
  22744. 'frame-tested': {
  22745. impact: 'critical',
  22746. messages: {
  22747. pass: 'The iframe was tested with axe-core',
  22748. fail: 'The iframe could not be tested with axe-core',
  22749. incomplete: 'The iframe still has to be tested with axe-core'
  22750. }
  22751. },
  22752. 'no-autoplay-audio': {
  22753. impact: 'moderate',
  22754. messages: {
  22755. pass: '<video> or <audio> does not output audio for more than allowed duration or has controls mechanism',
  22756. fail: '<video> or <audio> outputs audio for more than allowed duration and does not have a controls mechanism',
  22757. incomplete: 'Check that the <video> or <audio> does not output audio for more than allowed duration or provides a controls mechanism'
  22758. }
  22759. },
  22760. 'css-orientation-lock': {
  22761. impact: 'serious',
  22762. messages: {
  22763. pass: 'Display is operable, and orientation lock does not exist',
  22764. fail: 'CSS Orientation lock is applied, and makes display inoperable',
  22765. incomplete: 'CSS Orientation lock cannot be determined'
  22766. }
  22767. },
  22768. 'meta-viewport-large': {
  22769. impact: 'minor',
  22770. messages: {
  22771. pass: '<meta> tag does not prevent significant zooming on mobile devices',
  22772. fail: '<meta> tag limits zooming on mobile devices'
  22773. }
  22774. },
  22775. 'meta-viewport': {
  22776. impact: 'critical',
  22777. messages: {
  22778. pass: '<meta> tag does not disable zooming on mobile devices',
  22779. fail: '${data} on <meta> tag disables zooming on mobile devices'
  22780. }
  22781. },
  22782. 'header-present': {
  22783. impact: 'serious',
  22784. messages: {
  22785. pass: 'Page has a heading',
  22786. fail: 'Page does not have a heading'
  22787. }
  22788. },
  22789. 'heading-order': {
  22790. impact: 'moderate',
  22791. messages: {
  22792. pass: 'Heading order valid',
  22793. fail: 'Heading order invalid',
  22794. incomplete: 'Unable to determine previous heading'
  22795. }
  22796. },
  22797. 'identical-links-same-purpose': {
  22798. impact: 'minor',
  22799. messages: {
  22800. pass: 'There are no other links with the same name, that go to a different URL',
  22801. incomplete: 'Check that links have the same purpose, or are intentionally ambiguous.'
  22802. }
  22803. },
  22804. 'internal-link-present': {
  22805. impact: 'serious',
  22806. messages: {
  22807. pass: 'Valid skip link found',
  22808. fail: 'No valid skip link found'
  22809. }
  22810. },
  22811. landmark: {
  22812. impact: 'serious',
  22813. messages: {
  22814. pass: 'Page has a landmark region',
  22815. fail: 'Page does not have a landmark region'
  22816. }
  22817. },
  22818. 'meta-refresh': {
  22819. impact: 'critical',
  22820. messages: {
  22821. pass: '<meta> tag does not immediately refresh the page',
  22822. fail: '<meta> tag forces timed refresh of page'
  22823. }
  22824. },
  22825. 'p-as-heading': {
  22826. impact: 'serious',
  22827. messages: {
  22828. pass: '<p> elements are not styled as headings',
  22829. fail: 'Heading elements should be used instead of styled <p> elements',
  22830. incomplete: 'Unable to determine if <p> elements are styled as headings'
  22831. }
  22832. },
  22833. region: {
  22834. impact: 'moderate',
  22835. messages: {
  22836. pass: 'All page content is contained by landmarks',
  22837. fail: 'Some page content is not contained by landmarks'
  22838. }
  22839. },
  22840. 'skip-link': {
  22841. impact: 'moderate',
  22842. messages: {
  22843. pass: 'Skip link target exists',
  22844. incomplete: 'Skip link target should become visible on activation',
  22845. fail: 'No skip link target'
  22846. }
  22847. },
  22848. 'unique-frame-title': {
  22849. impact: 'serious',
  22850. messages: {
  22851. pass: 'Element\'s title attribute is unique',
  22852. fail: 'Element\'s title attribute is not unique'
  22853. }
  22854. },
  22855. 'duplicate-id-active': {
  22856. impact: 'serious',
  22857. messages: {
  22858. pass: 'Document has no active elements that share the same id attribute',
  22859. fail: 'Document has active elements with the same id attribute: ${data}'
  22860. }
  22861. },
  22862. 'duplicate-id-aria': {
  22863. impact: 'critical',
  22864. messages: {
  22865. pass: 'Document has no elements referenced with ARIA or labels that share the same id attribute',
  22866. fail: 'Document has multiple elements referenced with ARIA with the same id attribute: ${data}'
  22867. }
  22868. },
  22869. 'duplicate-id': {
  22870. impact: 'minor',
  22871. messages: {
  22872. pass: 'Document has no static elements that share the same id attribute',
  22873. fail: 'Document has multiple static elements with the same id attribute: ${data}'
  22874. }
  22875. },
  22876. 'aria-label': {
  22877. impact: 'serious',
  22878. messages: {
  22879. pass: 'aria-label attribute exists and is not empty',
  22880. fail: 'aria-label attribute does not exist or is empty'
  22881. }
  22882. },
  22883. 'aria-labelledby': {
  22884. impact: 'serious',
  22885. messages: {
  22886. pass: 'aria-labelledby attribute exists and references elements that are visible to screen readers',
  22887. fail: 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty',
  22888. incomplete: 'ensure aria-labelledby references an existing element'
  22889. }
  22890. },
  22891. 'avoid-inline-spacing': {
  22892. impact: 'serious',
  22893. messages: {
  22894. pass: 'No inline styles with \'!important\' that affect text spacing has been specified',
  22895. fail: {
  22896. singular: 'Remove \'!important\' from inline style ${data.values}, as overriding this is not supported by most browsers',
  22897. plural: 'Remove \'!important\' from inline styles ${data.values}, as overriding this is not supported by most browsers'
  22898. }
  22899. }
  22900. },
  22901. 'button-has-visible-text': {
  22902. impact: 'critical',
  22903. messages: {
  22904. pass: 'Element has inner text that is visible to screen readers',
  22905. fail: 'Element does not have inner text that is visible to screen readers',
  22906. incomplete: 'Unable to determine if element has children'
  22907. }
  22908. },
  22909. 'doc-has-title': {
  22910. impact: 'serious',
  22911. messages: {
  22912. pass: 'Document has a non-empty <title> element',
  22913. fail: 'Document does not have a non-empty <title> element'
  22914. }
  22915. },
  22916. exists: {
  22917. impact: 'minor',
  22918. messages: {
  22919. pass: 'Element does not exist',
  22920. incomplete: 'Element exists'
  22921. }
  22922. },
  22923. 'has-alt': {
  22924. impact: 'critical',
  22925. messages: {
  22926. pass: 'Element has an alt attribute',
  22927. fail: 'Element does not have an alt attribute'
  22928. }
  22929. },
  22930. 'has-visible-text': {
  22931. impact: 'minor',
  22932. messages: {
  22933. pass: 'Element has text that is visible to screen readers',
  22934. fail: 'Element does not have text that is visible to screen readers',
  22935. incomplete: 'Unable to determine if element has children'
  22936. }
  22937. },
  22938. 'is-on-screen': {
  22939. impact: 'serious',
  22940. messages: {
  22941. pass: 'Element is not visible',
  22942. fail: 'Element is visible'
  22943. }
  22944. },
  22945. 'non-empty-alt': {
  22946. impact: 'critical',
  22947. messages: {
  22948. pass: 'Element has a non-empty alt attribute',
  22949. fail: {
  22950. noAttr: 'Element has no alt attribute',
  22951. emptyAttr: 'Element has an empty alt attribute'
  22952. }
  22953. }
  22954. },
  22955. 'non-empty-if-present': {
  22956. impact: 'critical',
  22957. messages: {
  22958. pass: {
  22959. default: 'Element does not have a value attribute',
  22960. 'has-label': 'Element has a non-empty value attribute'
  22961. },
  22962. fail: 'Element has a value attribute and the value attribute is empty'
  22963. }
  22964. },
  22965. 'non-empty-placeholder': {
  22966. impact: 'serious',
  22967. messages: {
  22968. pass: 'Element has a placeholder attribute',
  22969. fail: {
  22970. noAttr: 'Element has no placeholder attribute',
  22971. emptyAttr: 'Element has an empty placeholder attribute'
  22972. }
  22973. }
  22974. },
  22975. 'non-empty-title': {
  22976. impact: 'serious',
  22977. messages: {
  22978. pass: 'Element has a title attribute',
  22979. fail: {
  22980. noAttr: 'Element has no title attribute',
  22981. emptyAttr: 'Element has an empty title attribute'
  22982. }
  22983. }
  22984. },
  22985. 'non-empty-value': {
  22986. impact: 'critical',
  22987. messages: {
  22988. pass: 'Element has a non-empty value attribute',
  22989. fail: {
  22990. noAttr: 'Element has no value attribute',
  22991. emptyAttr: 'Element has an empty value attribute'
  22992. }
  22993. }
  22994. },
  22995. 'presentational-role': {
  22996. impact: 'minor',
  22997. messages: {
  22998. pass: 'Element\'s default semantics were overriden with role="${data.role}"',
  22999. fail: {
  23000. default: 'Element\'s default semantics were not overridden with role="none" or role="presentation"',
  23001. globalAria: 'Element\'s role is not presentational because it has a global ARIA attribute',
  23002. focusable: 'Element\'s role is not presentational because it is focusable',
  23003. both: 'Element\'s role is not presentational because it has a global ARIA attribute and is focusable'
  23004. }
  23005. }
  23006. },
  23007. 'role-none': {
  23008. impact: 'minor',
  23009. messages: {
  23010. pass: 'Element\'s default semantics were overriden with role="none"',
  23011. fail: 'Element\'s default semantics were not overridden with role="none"'
  23012. }
  23013. },
  23014. 'role-presentation': {
  23015. impact: 'minor',
  23016. messages: {
  23017. pass: 'Element\'s default semantics were overriden with role="presentation"',
  23018. fail: 'Element\'s default semantics were not overridden with role="presentation"'
  23019. }
  23020. },
  23021. 'svg-non-empty-title': {
  23022. impact: 'serious',
  23023. messages: {
  23024. pass: 'Element has a child that is a title',
  23025. fail: {
  23026. noTitle: 'Element has no child that is a title',
  23027. emptyTitle: 'Element child title is empty'
  23028. },
  23029. incomplete: 'Unable to determine element has a child that is a title'
  23030. }
  23031. },
  23032. 'caption-faked': {
  23033. impact: 'serious',
  23034. messages: {
  23035. pass: 'The first row of a table is not used as a caption',
  23036. fail: 'The first child of the table should be a caption instead of a table cell'
  23037. }
  23038. },
  23039. 'html5-scope': {
  23040. impact: 'moderate',
  23041. messages: {
  23042. pass: 'Scope attribute is only used on table header elements (<th>)',
  23043. fail: 'In HTML 5, scope attributes may only be used on table header elements (<th>)'
  23044. }
  23045. },
  23046. 'same-caption-summary': {
  23047. impact: 'minor',
  23048. messages: {
  23049. pass: 'Content of summary attribute and <caption> are not duplicated',
  23050. fail: 'Content of summary attribute and <caption> element are identical'
  23051. }
  23052. },
  23053. 'scope-value': {
  23054. impact: 'critical',
  23055. messages: {
  23056. pass: 'Scope attribute is used correctly',
  23057. fail: 'The value of the scope attribute may only be \'row\' or \'col\''
  23058. }
  23059. },
  23060. 'td-has-header': {
  23061. impact: 'critical',
  23062. messages: {
  23063. pass: 'All non-empty data cells have table headers',
  23064. fail: 'Some non-empty data cells do not have table headers'
  23065. }
  23066. },
  23067. 'td-headers-attr': {
  23068. impact: 'serious',
  23069. messages: {
  23070. pass: 'The headers attribute is exclusively used to refer to other cells in the table',
  23071. incomplete: 'The headers attribute is empty',
  23072. fail: 'The headers attribute is not exclusively used to refer to other cells in the table'
  23073. }
  23074. },
  23075. 'th-has-data-cells': {
  23076. impact: 'serious',
  23077. messages: {
  23078. pass: 'All table header cells refer to data cells',
  23079. fail: 'Not all table header cells refer to data cells',
  23080. incomplete: 'Table data cells are missing or empty'
  23081. }
  23082. },
  23083. 'hidden-content': {
  23084. impact: 'minor',
  23085. messages: {
  23086. pass: 'All content on the page has been analyzed.',
  23087. fail: 'There were problems analyzing the content on this page.',
  23088. incomplete: 'There is hidden content on the page that was not analyzed. You will need to trigger the display of this content in order to analyze it.'
  23089. }
  23090. }
  23091. },
  23092. failureSummaries: {
  23093. any: {
  23094. failureMessage: function anonymous(it) {
  23095. var out = 'Fix any of the following:';
  23096. var arr1 = it;
  23097. if (arr1) {
  23098. var value, i1 = -1, l1 = arr1.length - 1;
  23099. while (i1 < l1) {
  23100. value = arr1[i1 += 1];
  23101. out += '\n ' + value.split('\n').join('\n ');
  23102. }
  23103. }
  23104. return out;
  23105. }
  23106. },
  23107. none: {
  23108. failureMessage: function anonymous(it) {
  23109. var out = 'Fix all of the following:';
  23110. var arr1 = it;
  23111. if (arr1) {
  23112. var value, i1 = -1, l1 = arr1.length - 1;
  23113. while (i1 < l1) {
  23114. value = arr1[i1 += 1];
  23115. out += '\n ' + value.split('\n').join('\n ');
  23116. }
  23117. }
  23118. return out;
  23119. }
  23120. }
  23121. },
  23122. incompleteFallbackMessage: 'axe couldn\'t tell the reason. Time to break out the element inspector!'
  23123. },
  23124. rules: [ {
  23125. id: 'accesskeys',
  23126. selector: '[accesskey]',
  23127. excludeHidden: false,
  23128. tags: [ 'cat.keyboard', 'best-practice' ],
  23129. all: [],
  23130. any: [],
  23131. none: [ 'accesskeys' ]
  23132. }, {
  23133. id: 'area-alt',
  23134. selector: 'map area[href]',
  23135. excludeHidden: false,
  23136. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'wcag244', 'wcag412', 'section508', 'section508.22.a', 'ACT' ],
  23137. actIds: [ 'c487ae' ],
  23138. all: [],
  23139. any: [ {
  23140. options: {
  23141. attribute: 'alt'
  23142. },
  23143. id: 'non-empty-alt'
  23144. }, 'aria-label', 'aria-labelledby', {
  23145. options: {
  23146. attribute: 'title'
  23147. },
  23148. id: 'non-empty-title'
  23149. } ],
  23150. none: []
  23151. }, {
  23152. id: 'aria-allowed-attr',
  23153. matches: 'aria-allowed-attr-matches',
  23154. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23155. actIds: [ '5c01ea' ],
  23156. all: [],
  23157. any: [ {
  23158. options: {
  23159. validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
  23160. },
  23161. id: 'aria-allowed-attr'
  23162. } ],
  23163. none: [ 'aria-unsupported-attr', {
  23164. options: {
  23165. elementsAllowedAriaLabel: [ 'applet', 'input' ]
  23166. },
  23167. id: 'aria-prohibited-attr'
  23168. } ]
  23169. }, {
  23170. id: 'aria-allowed-role',
  23171. excludeHidden: false,
  23172. selector: '[role]',
  23173. matches: 'aria-allowed-role-matches',
  23174. tags: [ 'cat.aria', 'best-practice' ],
  23175. all: [],
  23176. any: [ {
  23177. options: {
  23178. allowImplicit: true,
  23179. ignoredTags: []
  23180. },
  23181. id: 'aria-allowed-role'
  23182. } ],
  23183. none: []
  23184. }, {
  23185. id: 'aria-command-name',
  23186. selector: '[role="link"], [role="button"], [role="menuitem"]',
  23187. matches: 'no-naming-method-matches',
  23188. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23189. actIds: [ '97a4e1' ],
  23190. all: [],
  23191. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  23192. options: {
  23193. attribute: 'title'
  23194. },
  23195. id: 'non-empty-title'
  23196. } ],
  23197. none: []
  23198. }, {
  23199. id: 'aria-dialog-name',
  23200. selector: '[role="dialog"], [role="alertdialog"]',
  23201. matches: 'no-naming-method-matches',
  23202. tags: [ 'cat.aria', 'best-practice' ],
  23203. all: [],
  23204. any: [ 'aria-label', 'aria-labelledby', {
  23205. options: {
  23206. attribute: 'title'
  23207. },
  23208. id: 'non-empty-title'
  23209. } ],
  23210. none: []
  23211. }, {
  23212. id: 'aria-hidden-body',
  23213. selector: 'body',
  23214. excludeHidden: false,
  23215. matches: 'is-initiator-matches',
  23216. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23217. all: [],
  23218. any: [ 'aria-hidden-body' ],
  23219. none: []
  23220. }, {
  23221. id: 'aria-hidden-focus',
  23222. selector: '[aria-hidden="true"]',
  23223. matches: 'aria-hidden-focus-matches',
  23224. excludeHidden: false,
  23225. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag131' ],
  23226. actIds: [ '6cfa84' ],
  23227. all: [ 'focusable-modal-open', 'focusable-disabled', 'focusable-not-tabbable' ],
  23228. any: [],
  23229. none: []
  23230. }, {
  23231. id: 'aria-input-field-name',
  23232. selector: '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',
  23233. matches: 'no-naming-method-matches',
  23234. tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ],
  23235. actIds: [ 'e086e5' ],
  23236. all: [],
  23237. any: [ 'aria-label', 'aria-labelledby', {
  23238. options: {
  23239. attribute: 'title'
  23240. },
  23241. id: 'non-empty-title'
  23242. } ],
  23243. none: [ 'no-implicit-explicit-label' ]
  23244. }, {
  23245. id: 'aria-meter-name',
  23246. selector: '[role="meter"]',
  23247. matches: 'no-naming-method-matches',
  23248. tags: [ 'cat.aria', 'wcag2a', 'wcag111' ],
  23249. all: [],
  23250. any: [ 'aria-label', 'aria-labelledby', {
  23251. options: {
  23252. attribute: 'title'
  23253. },
  23254. id: 'non-empty-title'
  23255. } ],
  23256. none: []
  23257. }, {
  23258. id: 'aria-progressbar-name',
  23259. selector: '[role="progressbar"]',
  23260. matches: 'no-naming-method-matches',
  23261. tags: [ 'cat.aria', 'wcag2a', 'wcag111' ],
  23262. all: [],
  23263. any: [ 'aria-label', 'aria-labelledby', {
  23264. options: {
  23265. attribute: 'title'
  23266. },
  23267. id: 'non-empty-title'
  23268. } ],
  23269. none: []
  23270. }, {
  23271. id: 'aria-required-attr',
  23272. selector: '[role]',
  23273. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23274. all: [],
  23275. any: [ 'aria-required-attr' ],
  23276. none: []
  23277. }, {
  23278. id: 'aria-required-children',
  23279. selector: '[role]',
  23280. matches: 'aria-required-children-matches',
  23281. tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
  23282. actIds: [ 'ff89c9' ],
  23283. all: [],
  23284. any: [ {
  23285. options: {
  23286. reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
  23287. },
  23288. id: 'aria-required-children'
  23289. } ],
  23290. none: []
  23291. }, {
  23292. id: 'aria-required-parent',
  23293. selector: '[role]',
  23294. matches: 'aria-required-parent-matches',
  23295. tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
  23296. actIds: [ 'bc4a75', 'ff89c9' ],
  23297. all: [],
  23298. any: [ {
  23299. options: {
  23300. ownGroupRoles: [ 'listitem', 'treeitem' ]
  23301. },
  23302. id: 'aria-required-parent'
  23303. } ],
  23304. none: []
  23305. }, {
  23306. id: 'aria-roledescription',
  23307. selector: '[aria-roledescription]',
  23308. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23309. all: [],
  23310. any: [ {
  23311. options: {
  23312. supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
  23313. },
  23314. id: 'aria-roledescription'
  23315. } ],
  23316. none: []
  23317. }, {
  23318. id: 'aria-roles',
  23319. selector: '[role]',
  23320. matches: 'no-empty-role-matches',
  23321. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23322. all: [],
  23323. any: [],
  23324. none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole', 'deprecatedrole' ]
  23325. }, {
  23326. id: 'aria-text',
  23327. selector: '[role=text]',
  23328. tags: [ 'cat.aria', 'best-practice' ],
  23329. all: [],
  23330. any: [ 'no-focusable-content' ],
  23331. none: []
  23332. }, {
  23333. id: 'aria-toggle-field-name',
  23334. selector: '[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"], [role="option"]',
  23335. matches: 'no-naming-method-matches',
  23336. tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ],
  23337. all: [],
  23338. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  23339. options: {
  23340. attribute: 'title'
  23341. },
  23342. id: 'non-empty-title'
  23343. } ],
  23344. none: [ 'no-implicit-explicit-label' ]
  23345. }, {
  23346. id: 'aria-tooltip-name',
  23347. selector: '[role="tooltip"]',
  23348. matches: 'no-naming-method-matches',
  23349. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23350. all: [],
  23351. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  23352. options: {
  23353. attribute: 'title'
  23354. },
  23355. id: 'non-empty-title'
  23356. } ],
  23357. none: []
  23358. }, {
  23359. id: 'aria-treeitem-name',
  23360. selector: '[role="treeitem"]',
  23361. matches: 'no-naming-method-matches',
  23362. tags: [ 'cat.aria', 'best-practice' ],
  23363. all: [],
  23364. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  23365. options: {
  23366. attribute: 'title'
  23367. },
  23368. id: 'non-empty-title'
  23369. } ],
  23370. none: []
  23371. }, {
  23372. id: 'aria-valid-attr-value',
  23373. matches: 'aria-has-attr-matches',
  23374. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23375. actIds: [ '5c01ea', 'c487ae' ],
  23376. all: [ {
  23377. options: [],
  23378. id: 'aria-valid-attr-value'
  23379. }, 'aria-errormessage', 'aria-level' ],
  23380. any: [],
  23381. none: []
  23382. }, {
  23383. id: 'aria-valid-attr',
  23384. matches: 'aria-has-attr-matches',
  23385. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  23386. all: [],
  23387. any: [ {
  23388. options: [],
  23389. id: 'aria-valid-attr'
  23390. } ],
  23391. none: []
  23392. }, {
  23393. id: 'audio-caption',
  23394. selector: 'audio',
  23395. enabled: false,
  23396. excludeHidden: false,
  23397. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a' ],
  23398. actIds: [ 'c3232f', 'e7aa44' ],
  23399. all: [],
  23400. any: [],
  23401. none: [ 'caption' ]
  23402. }, {
  23403. id: 'autocomplete-valid',
  23404. matches: 'autocomplete-matches',
  23405. tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
  23406. actIds: [ '73f2c2' ],
  23407. all: [ {
  23408. options: {
  23409. stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
  23410. },
  23411. id: 'autocomplete-valid'
  23412. } ],
  23413. any: [],
  23414. none: []
  23415. }, {
  23416. id: 'avoid-inline-spacing',
  23417. selector: '[style]',
  23418. tags: [ 'cat.structure', 'wcag21aa', 'wcag1412' ],
  23419. all: [ {
  23420. options: {
  23421. cssProperties: [ 'line-height', 'letter-spacing', 'word-spacing' ]
  23422. },
  23423. id: 'avoid-inline-spacing'
  23424. } ],
  23425. any: [],
  23426. none: []
  23427. }, {
  23428. id: 'blink',
  23429. selector: 'blink',
  23430. excludeHidden: false,
  23431. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag222', 'section508', 'section508.22.j' ],
  23432. all: [],
  23433. any: [],
  23434. none: [ 'is-on-screen' ]
  23435. }, {
  23436. id: 'button-name',
  23437. selector: 'button',
  23438. matches: 'no-explicit-name-required-matches',
  23439. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'ACT' ],
  23440. actIds: [ '97a4e1', 'm6b1q3' ],
  23441. all: [],
  23442. any: [ 'button-has-visible-text', 'aria-label', 'aria-labelledby', {
  23443. options: {
  23444. attribute: 'title'
  23445. },
  23446. id: 'non-empty-title'
  23447. }, 'presentational-role' ],
  23448. none: []
  23449. }, {
  23450. id: 'bypass',
  23451. selector: 'html',
  23452. pageLevel: true,
  23453. matches: 'bypass-matches',
  23454. reviewOnFail: true,
  23455. tags: [ 'cat.keyboard', 'wcag2a', 'wcag241', 'section508', 'section508.22.o' ],
  23456. all: [],
  23457. any: [ 'internal-link-present', {
  23458. options: {
  23459. selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]'
  23460. },
  23461. id: 'header-present'
  23462. }, {
  23463. options: {
  23464. selector: 'main, [role=main]'
  23465. },
  23466. id: 'landmark'
  23467. } ],
  23468. none: []
  23469. }, {
  23470. id: 'color-contrast-enhanced',
  23471. matches: 'color-contrast-matches',
  23472. excludeHidden: false,
  23473. enabled: false,
  23474. tags: [ 'cat.color', 'wcag2aaa', 'wcag146' ],
  23475. all: [],
  23476. any: [ {
  23477. options: {
  23478. ignoreUnicode: true,
  23479. ignoreLength: false,
  23480. ignorePseudo: false,
  23481. boldValue: 700,
  23482. boldTextPt: 14,
  23483. largeTextPt: 18,
  23484. contrastRatio: {
  23485. normal: {
  23486. expected: 7
  23487. },
  23488. large: {
  23489. expected: 4.5
  23490. }
  23491. },
  23492. pseudoSizeThreshold: .25,
  23493. shadowOutlineEmMax: .1
  23494. },
  23495. id: 'color-contrast-enhanced'
  23496. } ],
  23497. none: []
  23498. }, {
  23499. id: 'color-contrast',
  23500. matches: 'color-contrast-matches',
  23501. excludeHidden: false,
  23502. tags: [ 'cat.color', 'wcag2aa', 'wcag143' ],
  23503. all: [],
  23504. any: [ {
  23505. options: {
  23506. ignoreUnicode: true,
  23507. ignoreLength: false,
  23508. ignorePseudo: false,
  23509. boldValue: 700,
  23510. boldTextPt: 14,
  23511. largeTextPt: 18,
  23512. contrastRatio: {
  23513. normal: {
  23514. expected: 4.5
  23515. },
  23516. large: {
  23517. expected: 3
  23518. }
  23519. },
  23520. pseudoSizeThreshold: .25,
  23521. shadowOutlineEmMax: .2
  23522. },
  23523. id: 'color-contrast'
  23524. } ],
  23525. none: []
  23526. }, {
  23527. id: 'css-orientation-lock',
  23528. selector: 'html',
  23529. tags: [ 'cat.structure', 'wcag134', 'wcag21aa', 'experimental' ],
  23530. actIds: [ 'b33eff' ],
  23531. all: [ {
  23532. options: {
  23533. degreeThreshold: 2
  23534. },
  23535. id: 'css-orientation-lock'
  23536. } ],
  23537. any: [],
  23538. none: [],
  23539. preload: true
  23540. }, {
  23541. id: 'definition-list',
  23542. selector: 'dl',
  23543. matches: 'no-role-matches',
  23544. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  23545. all: [],
  23546. any: [],
  23547. none: [ 'structured-dlitems', 'only-dlitems' ]
  23548. }, {
  23549. id: 'dlitem',
  23550. selector: 'dd, dt',
  23551. matches: 'no-role-matches',
  23552. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  23553. all: [],
  23554. any: [ 'dlitem' ],
  23555. none: []
  23556. }, {
  23557. id: 'document-title',
  23558. selector: 'html',
  23559. matches: 'is-initiator-matches',
  23560. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag242', 'ACT' ],
  23561. actIds: [ '2779a5' ],
  23562. all: [],
  23563. any: [ 'doc-has-title' ],
  23564. none: []
  23565. }, {
  23566. id: 'duplicate-id-active',
  23567. selector: '[id]',
  23568. matches: 'duplicate-id-active-matches',
  23569. excludeHidden: false,
  23570. tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
  23571. all: [],
  23572. any: [ 'duplicate-id-active' ],
  23573. none: []
  23574. }, {
  23575. id: 'duplicate-id-aria',
  23576. selector: '[id]',
  23577. matches: 'duplicate-id-aria-matches',
  23578. excludeHidden: false,
  23579. tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
  23580. actIds: [ '3ea0c8' ],
  23581. all: [],
  23582. any: [ 'duplicate-id-aria' ],
  23583. none: []
  23584. }, {
  23585. id: 'duplicate-id',
  23586. selector: '[id]',
  23587. matches: 'duplicate-id-misc-matches',
  23588. excludeHidden: false,
  23589. tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
  23590. all: [],
  23591. any: [ 'duplicate-id' ],
  23592. none: []
  23593. }, {
  23594. id: 'empty-heading',
  23595. selector: 'h1, h2, h3, h4, h5, h6, [role="heading"]',
  23596. matches: 'heading-matches',
  23597. tags: [ 'cat.name-role-value', 'best-practice' ],
  23598. impact: 'minor',
  23599. all: [],
  23600. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  23601. options: {
  23602. attribute: 'title'
  23603. },
  23604. id: 'non-empty-title'
  23605. } ],
  23606. none: []
  23607. }, {
  23608. id: 'empty-table-header',
  23609. selector: 'th, [role="rowheader"], [role="columnheader"]',
  23610. tags: [ 'wcag131', 'cat.aria' ],
  23611. reviewOnFail: true,
  23612. all: [],
  23613. any: [ 'has-visible-text' ],
  23614. none: []
  23615. }, {
  23616. id: 'focus-order-semantics',
  23617. selector: 'div, h1, h2, h3, h4, h5, h6, [role=heading], p, span',
  23618. matches: 'inserted-into-focus-order-matches',
  23619. tags: [ 'cat.keyboard', 'best-practice', 'experimental' ],
  23620. all: [],
  23621. any: [ {
  23622. options: [],
  23623. id: 'has-widget-role'
  23624. }, {
  23625. options: {
  23626. roles: [ 'tooltip' ]
  23627. },
  23628. id: 'valid-scrollable-semantics'
  23629. } ],
  23630. none: []
  23631. }, {
  23632. id: 'form-field-multiple-labels',
  23633. selector: 'input, select, textarea',
  23634. matches: 'label-matches',
  23635. tags: [ 'cat.forms', 'wcag2a', 'wcag332' ],
  23636. all: [],
  23637. any: [],
  23638. none: [ 'multiple-label' ]
  23639. }, {
  23640. id: 'frame-focusable-content',
  23641. selector: 'html',
  23642. matches: 'frame-focusable-content-matches',
  23643. tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
  23644. all: [],
  23645. any: [ 'frame-focusable-content' ],
  23646. none: []
  23647. }, {
  23648. id: 'frame-tested',
  23649. selector: 'html, frame, iframe',
  23650. tags: [ 'cat.structure', 'review-item', 'best-practice' ],
  23651. all: [ {
  23652. options: {
  23653. isViolation: false
  23654. },
  23655. id: 'frame-tested'
  23656. } ],
  23657. any: [],
  23658. none: []
  23659. }, {
  23660. id: 'frame-title-unique',
  23661. selector: 'frame[title], iframe[title]',
  23662. matches: 'frame-title-has-text-matches',
  23663. tags: [ 'cat.text-alternatives', 'best-practice' ],
  23664. all: [],
  23665. any: [],
  23666. none: [ 'unique-frame-title' ]
  23667. }, {
  23668. id: 'frame-title',
  23669. selector: 'frame, iframe',
  23670. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag241', 'wcag412', 'section508', 'section508.22.i' ],
  23671. all: [],
  23672. any: [ {
  23673. options: {
  23674. attribute: 'title'
  23675. },
  23676. id: 'non-empty-title'
  23677. }, 'aria-label', 'aria-labelledby', 'presentational-role' ],
  23678. none: []
  23679. }, {
  23680. id: 'heading-order',
  23681. selector: 'h1, h2, h3, h4, h5, h6, [role=heading]',
  23682. matches: 'heading-matches',
  23683. tags: [ 'cat.semantics', 'best-practice' ],
  23684. all: [],
  23685. any: [ 'heading-order' ],
  23686. none: []
  23687. }, {
  23688. id: 'hidden-content',
  23689. selector: '*',
  23690. excludeHidden: false,
  23691. tags: [ 'cat.structure', 'experimental', 'review-item', 'best-practice' ],
  23692. all: [],
  23693. any: [ 'hidden-content' ],
  23694. none: []
  23695. }, {
  23696. id: 'html-has-lang',
  23697. selector: 'html',
  23698. matches: 'is-initiator-matches',
  23699. tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
  23700. actIds: [ 'b5c3f8' ],
  23701. all: [],
  23702. any: [ {
  23703. options: {
  23704. attributes: [ 'lang', 'xml:lang' ]
  23705. },
  23706. id: 'has-lang'
  23707. } ],
  23708. none: []
  23709. }, {
  23710. id: 'html-lang-valid',
  23711. selector: 'html[lang], html[xml\\:lang]',
  23712. tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
  23713. actIds: [ 'bf051a' ],
  23714. all: [],
  23715. any: [],
  23716. none: [ {
  23717. options: {
  23718. attributes: [ 'lang', 'xml:lang' ]
  23719. },
  23720. id: 'valid-lang'
  23721. } ]
  23722. }, {
  23723. id: 'html-xml-lang-mismatch',
  23724. selector: 'html[lang][xml\\:lang]',
  23725. matches: 'xml-lang-mismatch-matches',
  23726. tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
  23727. actIds: [ '5b7ae0' ],
  23728. all: [ 'xml-lang-mismatch' ],
  23729. any: [],
  23730. none: []
  23731. }, {
  23732. id: 'identical-links-same-purpose',
  23733. selector: 'a[href], area[href], [role="link"]',
  23734. excludeHidden: false,
  23735. matches: 'identical-links-same-purpose-matches',
  23736. tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249' ],
  23737. actIds: [ 'b20e66', 'fd3a94' ],
  23738. all: [ 'identical-links-same-purpose' ],
  23739. any: [],
  23740. none: []
  23741. }, {
  23742. id: 'image-alt',
  23743. selector: 'img',
  23744. matches: 'no-explicit-name-required-matches',
  23745. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  23746. actIds: [ '23a2a8' ],
  23747. all: [],
  23748. any: [ 'has-alt', 'aria-label', 'aria-labelledby', {
  23749. options: {
  23750. attribute: 'title'
  23751. },
  23752. id: 'non-empty-title'
  23753. }, 'presentational-role' ],
  23754. none: [ 'alt-space-value' ]
  23755. }, {
  23756. id: 'image-redundant-alt',
  23757. selector: 'img',
  23758. tags: [ 'cat.text-alternatives', 'best-practice' ],
  23759. all: [],
  23760. any: [],
  23761. none: [ {
  23762. options: {
  23763. parentSelector: 'button, [role=button], a[href], p, li, td, th'
  23764. },
  23765. id: 'duplicate-img-label'
  23766. } ]
  23767. }, {
  23768. id: 'input-button-name',
  23769. selector: 'input[type="button"], input[type="submit"], input[type="reset"]',
  23770. matches: 'no-explicit-name-required-matches',
  23771. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a' ],
  23772. all: [],
  23773. any: [ 'non-empty-if-present', {
  23774. options: {
  23775. attribute: 'value'
  23776. },
  23777. id: 'non-empty-value'
  23778. }, 'aria-label', 'aria-labelledby', {
  23779. options: {
  23780. attribute: 'title'
  23781. },
  23782. id: 'non-empty-title'
  23783. }, 'presentational-role' ],
  23784. none: []
  23785. }, {
  23786. id: 'input-image-alt',
  23787. selector: 'input[type="image"]',
  23788. matches: 'no-explicit-name-required-matches',
  23789. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  23790. actIds: [ '59796f' ],
  23791. all: [],
  23792. any: [ {
  23793. options: {
  23794. attribute: 'alt'
  23795. },
  23796. id: 'non-empty-alt'
  23797. }, 'aria-label', 'aria-labelledby', {
  23798. options: {
  23799. attribute: 'title'
  23800. },
  23801. id: 'non-empty-title'
  23802. } ],
  23803. none: []
  23804. }, {
  23805. id: 'label-content-name-mismatch',
  23806. matches: 'label-content-name-mismatch-matches',
  23807. tags: [ 'cat.semantics', 'wcag21a', 'wcag253', 'experimental' ],
  23808. actIds: [ '2ee8b8' ],
  23809. all: [],
  23810. any: [ {
  23811. options: {
  23812. pixelThreshold: .1,
  23813. occuranceThreshold: 3
  23814. },
  23815. id: 'label-content-name-mismatch'
  23816. } ],
  23817. none: []
  23818. }, {
  23819. id: 'label-title-only',
  23820. selector: 'input, select, textarea',
  23821. matches: 'label-matches',
  23822. tags: [ 'cat.forms', 'best-practice' ],
  23823. all: [],
  23824. any: [],
  23825. none: [ 'title-only' ]
  23826. }, {
  23827. id: 'label',
  23828. selector: 'input, textarea',
  23829. matches: 'label-matches',
  23830. tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ],
  23831. actIds: [ 'e086e5', '307n5z' ],
  23832. all: [],
  23833. any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
  23834. options: {
  23835. attribute: 'title'
  23836. },
  23837. id: 'non-empty-title'
  23838. }, {
  23839. options: {
  23840. attribute: 'placeholder'
  23841. },
  23842. id: 'non-empty-placeholder'
  23843. }, 'presentational-role' ],
  23844. none: [ 'help-same-as-label', 'hidden-explicit-label' ]
  23845. }, {
  23846. id: 'landmark-banner-is-top-level',
  23847. selector: 'header:not([role]), [role=banner]',
  23848. matches: 'landmark-has-body-context-matches',
  23849. tags: [ 'cat.semantics', 'best-practice' ],
  23850. all: [],
  23851. any: [ 'landmark-is-top-level' ],
  23852. none: []
  23853. }, {
  23854. id: 'landmark-complementary-is-top-level',
  23855. selector: 'aside:not([role]), [role=complementary]',
  23856. tags: [ 'cat.semantics', 'best-practice' ],
  23857. all: [],
  23858. any: [ 'landmark-is-top-level' ],
  23859. none: []
  23860. }, {
  23861. id: 'landmark-contentinfo-is-top-level',
  23862. selector: 'footer:not([role]), [role=contentinfo]',
  23863. matches: 'landmark-has-body-context-matches',
  23864. tags: [ 'cat.semantics', 'best-practice' ],
  23865. all: [],
  23866. any: [ 'landmark-is-top-level' ],
  23867. none: []
  23868. }, {
  23869. id: 'landmark-main-is-top-level',
  23870. selector: 'main:not([role]), [role=main]',
  23871. tags: [ 'cat.semantics', 'best-practice' ],
  23872. all: [],
  23873. any: [ 'landmark-is-top-level' ],
  23874. none: []
  23875. }, {
  23876. id: 'landmark-no-duplicate-banner',
  23877. selector: 'header:not([role]), [role=banner]',
  23878. tags: [ 'cat.semantics', 'best-practice' ],
  23879. all: [],
  23880. any: [ {
  23881. options: {
  23882. selector: 'header:not([role]), [role=banner]',
  23883. nativeScopeFilter: 'article, aside, main, nav, section'
  23884. },
  23885. id: 'page-no-duplicate-banner'
  23886. } ],
  23887. none: []
  23888. }, {
  23889. id: 'landmark-no-duplicate-contentinfo',
  23890. selector: 'footer:not([role]), [role=contentinfo]',
  23891. tags: [ 'cat.semantics', 'best-practice' ],
  23892. all: [],
  23893. any: [ {
  23894. options: {
  23895. selector: 'footer:not([role]), [role=contentinfo]',
  23896. nativeScopeFilter: 'article, aside, main, nav, section'
  23897. },
  23898. id: 'page-no-duplicate-contentinfo'
  23899. } ],
  23900. none: []
  23901. }, {
  23902. id: 'landmark-no-duplicate-main',
  23903. selector: 'main:not([role]), [role=main]',
  23904. tags: [ 'cat.semantics', 'best-practice' ],
  23905. all: [],
  23906. any: [ {
  23907. options: {
  23908. selector: 'main:not([role]), [role=\'main\']'
  23909. },
  23910. id: 'page-no-duplicate-main'
  23911. } ],
  23912. none: []
  23913. }, {
  23914. id: 'landmark-one-main',
  23915. selector: 'html',
  23916. tags: [ 'cat.semantics', 'best-practice' ],
  23917. all: [ {
  23918. options: {
  23919. selector: 'main:not([role]), [role=\'main\']'
  23920. },
  23921. id: 'page-has-main'
  23922. } ],
  23923. any: [],
  23924. none: []
  23925. }, {
  23926. id: 'landmark-unique',
  23927. selector: '[role=banner], [role=complementary], [role=contentinfo], [role=main], [role=navigation], [role=region], [role=search], [role=form], form, footer, header, aside, main, nav, section',
  23928. tags: [ 'cat.semantics', 'best-practice' ],
  23929. matches: 'landmark-unique-matches',
  23930. all: [],
  23931. any: [ 'landmark-is-unique' ],
  23932. none: []
  23933. }, {
  23934. id: 'link-in-text-block',
  23935. selector: 'a[href], [role=link]',
  23936. matches: 'link-in-text-block-matches',
  23937. excludeHidden: false,
  23938. tags: [ 'cat.color', 'experimental', 'wcag2a', 'wcag141' ],
  23939. all: [ 'link-in-text-block' ],
  23940. any: [],
  23941. none: []
  23942. }, {
  23943. id: 'link-name',
  23944. selector: 'a[href]',
  23945. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag244', 'section508', 'section508.22.a', 'ACT' ],
  23946. actIds: [ 'c487ae' ],
  23947. all: [],
  23948. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  23949. options: {
  23950. attribute: 'title'
  23951. },
  23952. id: 'non-empty-title'
  23953. } ],
  23954. none: [ 'focusable-no-name' ]
  23955. }, {
  23956. id: 'list',
  23957. selector: 'ul, ol',
  23958. matches: 'no-role-matches',
  23959. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  23960. all: [],
  23961. any: [],
  23962. none: [ 'only-listitems' ]
  23963. }, {
  23964. id: 'listitem',
  23965. selector: 'li',
  23966. matches: 'no-role-matches',
  23967. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  23968. all: [],
  23969. any: [ 'listitem' ],
  23970. none: []
  23971. }, {
  23972. id: 'marquee',
  23973. selector: 'marquee',
  23974. excludeHidden: false,
  23975. tags: [ 'cat.parsing', 'wcag2a', 'wcag222' ],
  23976. all: [],
  23977. any: [],
  23978. none: [ 'is-on-screen' ]
  23979. }, {
  23980. id: 'meta-refresh',
  23981. selector: 'meta[http-equiv="refresh"]',
  23982. excludeHidden: false,
  23983. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag221', 'wcag224', 'wcag325' ],
  23984. all: [],
  23985. any: [ 'meta-refresh' ],
  23986. none: []
  23987. }, {
  23988. id: 'meta-viewport-large',
  23989. selector: 'meta[name="viewport"]',
  23990. matches: 'is-initiator-matches',
  23991. excludeHidden: false,
  23992. tags: [ 'cat.sensory-and-visual-cues', 'best-practice' ],
  23993. all: [],
  23994. any: [ {
  23995. options: {
  23996. scaleMinimum: 5,
  23997. lowerBound: 2
  23998. },
  23999. id: 'meta-viewport-large'
  24000. } ],
  24001. none: []
  24002. }, {
  24003. id: 'meta-viewport',
  24004. selector: 'meta[name="viewport"]',
  24005. matches: 'is-initiator-matches',
  24006. excludeHidden: false,
  24007. tags: [ 'cat.sensory-and-visual-cues', 'best-practice', 'ACT' ],
  24008. actIds: [ 'b4f0c3' ],
  24009. all: [],
  24010. any: [ {
  24011. options: {
  24012. scaleMinimum: 2
  24013. },
  24014. id: 'meta-viewport'
  24015. } ],
  24016. none: []
  24017. }, {
  24018. id: 'nested-interactive',
  24019. matches: 'nested-interactive-matches',
  24020. tags: [ 'cat.keyboard', 'wcag2a', 'wcag412' ],
  24021. actIds: [ '307n5z' ],
  24022. all: [],
  24023. any: [ 'no-focusable-content' ],
  24024. none: []
  24025. }, {
  24026. id: 'no-autoplay-audio',
  24027. excludeHidden: false,
  24028. selector: 'audio[autoplay], video[autoplay]',
  24029. matches: 'no-autoplay-audio-matches',
  24030. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag142', 'experimental' ],
  24031. actIds: [ '80f0bf' ],
  24032. preload: true,
  24033. all: [ {
  24034. options: {
  24035. allowedDuration: 3
  24036. },
  24037. id: 'no-autoplay-audio'
  24038. } ],
  24039. any: [],
  24040. none: []
  24041. }, {
  24042. id: 'object-alt',
  24043. selector: 'object',
  24044. matches: 'no-explicit-name-required-matches',
  24045. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],
  24046. actIds: [ '8fc3b6' ],
  24047. all: [],
  24048. any: [ 'aria-label', 'aria-labelledby', {
  24049. options: {
  24050. attribute: 'title'
  24051. },
  24052. id: 'non-empty-title'
  24053. }, 'presentational-role' ],
  24054. none: []
  24055. }, {
  24056. id: 'p-as-heading',
  24057. selector: 'p',
  24058. matches: 'p-as-heading-matches',
  24059. tags: [ 'cat.semantics', 'wcag2a', 'wcag131', 'experimental' ],
  24060. all: [ {
  24061. options: {
  24062. margins: [ {
  24063. weight: 150,
  24064. italic: true
  24065. }, {
  24066. weight: 150,
  24067. size: 1.15
  24068. }, {
  24069. italic: true,
  24070. size: 1.15
  24071. }, {
  24072. size: 1.4
  24073. } ],
  24074. passLength: 1,
  24075. failLength: .5
  24076. },
  24077. id: 'p-as-heading'
  24078. } ],
  24079. any: [],
  24080. none: []
  24081. }, {
  24082. id: 'page-has-heading-one',
  24083. selector: 'html',
  24084. tags: [ 'cat.semantics', 'best-practice' ],
  24085. all: [ {
  24086. options: {
  24087. selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]'
  24088. },
  24089. id: 'page-has-heading-one'
  24090. } ],
  24091. any: [],
  24092. none: []
  24093. }, {
  24094. id: 'presentation-role-conflict',
  24095. matches: 'has-implicit-chromium-role-matches',
  24096. selector: '[role="none"], [role="presentation"]',
  24097. tags: [ 'cat.aria', 'best-practice' ],
  24098. all: [],
  24099. any: [],
  24100. none: [ 'is-element-focusable', 'has-global-aria-attribute' ]
  24101. }, {
  24102. id: 'region',
  24103. selector: 'body *',
  24104. tags: [ 'cat.keyboard', 'best-practice' ],
  24105. all: [],
  24106. any: [ {
  24107. options: {
  24108. regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg'
  24109. },
  24110. id: 'region'
  24111. } ],
  24112. none: []
  24113. }, {
  24114. id: 'role-img-alt',
  24115. selector: '[role=\'img\']:not(img, area, input, object)',
  24116. matches: 'html-namespace-matches',
  24117. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  24118. actIds: [ '23a2a8' ],
  24119. all: [],
  24120. any: [ 'aria-label', 'aria-labelledby', {
  24121. options: {
  24122. attribute: 'title'
  24123. },
  24124. id: 'non-empty-title'
  24125. } ],
  24126. none: []
  24127. }, {
  24128. id: 'scope-attr-valid',
  24129. selector: 'td[scope], th[scope]',
  24130. tags: [ 'cat.tables', 'best-practice' ],
  24131. all: [ 'html5-scope', {
  24132. options: {
  24133. values: [ 'row', 'col', 'rowgroup', 'colgroup' ]
  24134. },
  24135. id: 'scope-value'
  24136. } ],
  24137. any: [],
  24138. none: []
  24139. }, {
  24140. id: 'scrollable-region-focusable',
  24141. matches: 'scrollable-region-focusable-matches',
  24142. tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
  24143. actIds: [ '0ssw9k' ],
  24144. all: [],
  24145. any: [ 'focusable-content', 'focusable-element' ],
  24146. none: []
  24147. }, {
  24148. id: 'select-name',
  24149. selector: 'select',
  24150. tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ],
  24151. actIds: [ 'e086e5' ],
  24152. all: [],
  24153. any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
  24154. options: {
  24155. attribute: 'title'
  24156. },
  24157. id: 'non-empty-title'
  24158. }, 'presentational-role' ],
  24159. none: [ 'help-same-as-label', 'hidden-explicit-label' ]
  24160. }, {
  24161. id: 'server-side-image-map',
  24162. selector: 'img[ismap]',
  24163. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f' ],
  24164. all: [],
  24165. any: [],
  24166. none: [ 'exists' ]
  24167. }, {
  24168. id: 'skip-link',
  24169. selector: 'a[href^="#"], a[href^="/#"]',
  24170. matches: 'skip-link-matches',
  24171. tags: [ 'cat.keyboard', 'best-practice' ],
  24172. all: [],
  24173. any: [ 'skip-link' ],
  24174. none: []
  24175. }, {
  24176. id: 'svg-img-alt',
  24177. selector: '[role="img"], [role="graphics-symbol"], svg[role="graphics-document"]',
  24178. matches: 'svg-namespace-matches',
  24179. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  24180. actIds: [ '7d6734' ],
  24181. all: [],
  24182. any: [ 'svg-non-empty-title', 'aria-label', 'aria-labelledby', {
  24183. options: {
  24184. attribute: 'title'
  24185. },
  24186. id: 'non-empty-title'
  24187. } ],
  24188. none: []
  24189. }, {
  24190. id: 'tabindex',
  24191. selector: '[tabindex]',
  24192. tags: [ 'cat.keyboard', 'best-practice' ],
  24193. all: [],
  24194. any: [ 'tabindex' ],
  24195. none: []
  24196. }, {
  24197. id: 'table-duplicate-name',
  24198. selector: 'table',
  24199. tags: [ 'cat.tables', 'best-practice' ],
  24200. all: [],
  24201. any: [],
  24202. none: [ 'same-caption-summary' ]
  24203. }, {
  24204. id: 'table-fake-caption',
  24205. selector: 'table',
  24206. matches: 'data-table-matches',
  24207. tags: [ 'cat.tables', 'experimental', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  24208. all: [ 'caption-faked' ],
  24209. any: [],
  24210. none: []
  24211. }, {
  24212. id: 'td-has-header',
  24213. selector: 'table',
  24214. matches: 'data-table-large-matches',
  24215. tags: [ 'cat.tables', 'experimental', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  24216. all: [ 'td-has-header' ],
  24217. any: [],
  24218. none: []
  24219. }, {
  24220. id: 'td-headers-attr',
  24221. selector: 'table',
  24222. tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  24223. actIds: [ 'a25f45' ],
  24224. all: [ 'td-headers-attr' ],
  24225. any: [],
  24226. none: []
  24227. }, {
  24228. id: 'th-has-data-cells',
  24229. selector: 'table',
  24230. matches: 'data-table-matches',
  24231. tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  24232. actIds: [ 'd0f69e' ],
  24233. all: [ 'th-has-data-cells' ],
  24234. any: [],
  24235. none: []
  24236. }, {
  24237. id: 'valid-lang',
  24238. selector: '[lang], [xml\\:lang]',
  24239. matches: 'not-html-matches',
  24240. tags: [ 'cat.language', 'wcag2aa', 'wcag312' ],
  24241. all: [],
  24242. any: [],
  24243. none: [ {
  24244. options: {
  24245. attributes: [ 'lang', 'xml:lang' ]
  24246. },
  24247. id: 'valid-lang'
  24248. } ]
  24249. }, {
  24250. id: 'video-caption',
  24251. selector: 'video',
  24252. excludeHidden: false,
  24253. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag122', 'section508', 'section508.22.a' ],
  24254. actIds: [ 'eac66b' ],
  24255. all: [],
  24256. any: [],
  24257. none: [ 'caption' ]
  24258. } ],
  24259. checks: [ {
  24260. id: 'abstractrole',
  24261. evaluate: 'abstractrole-evaluate'
  24262. }, {
  24263. id: 'aria-allowed-attr',
  24264. evaluate: 'aria-allowed-attr-evaluate',
  24265. options: {
  24266. validTreeRowAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-level' ]
  24267. }
  24268. }, {
  24269. id: 'aria-allowed-role',
  24270. evaluate: 'aria-allowed-role-evaluate',
  24271. options: {
  24272. allowImplicit: true,
  24273. ignoredTags: []
  24274. }
  24275. }, {
  24276. id: 'aria-errormessage',
  24277. evaluate: 'aria-errormessage-evaluate'
  24278. }, {
  24279. id: 'aria-hidden-body',
  24280. evaluate: 'aria-hidden-body-evaluate'
  24281. }, {
  24282. id: 'aria-level',
  24283. evaluate: 'aria-level-evaluate'
  24284. }, {
  24285. id: 'aria-prohibited-attr',
  24286. evaluate: 'aria-prohibited-attr-evaluate',
  24287. options: {
  24288. elementsAllowedAriaLabel: [ 'applet', 'input' ]
  24289. }
  24290. }, {
  24291. id: 'aria-required-attr',
  24292. evaluate: 'aria-required-attr-evaluate'
  24293. }, {
  24294. id: 'aria-required-children',
  24295. evaluate: 'aria-required-children-evaluate',
  24296. options: {
  24297. reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
  24298. }
  24299. }, {
  24300. id: 'aria-required-parent',
  24301. evaluate: 'aria-required-parent-evaluate',
  24302. options: {
  24303. ownGroupRoles: [ 'listitem', 'treeitem' ]
  24304. }
  24305. }, {
  24306. id: 'aria-roledescription',
  24307. evaluate: 'aria-roledescription-evaluate',
  24308. options: {
  24309. supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
  24310. }
  24311. }, {
  24312. id: 'aria-unsupported-attr',
  24313. evaluate: 'aria-unsupported-attr-evaluate'
  24314. }, {
  24315. id: 'aria-valid-attr-value',
  24316. evaluate: 'aria-valid-attr-value-evaluate',
  24317. options: []
  24318. }, {
  24319. id: 'aria-valid-attr',
  24320. evaluate: 'aria-valid-attr-evaluate',
  24321. options: []
  24322. }, {
  24323. id: 'deprecatedrole',
  24324. evaluate: 'deprecatedrole-evaluate'
  24325. }, {
  24326. id: 'fallbackrole',
  24327. evaluate: 'fallbackrole-evaluate'
  24328. }, {
  24329. id: 'has-global-aria-attribute',
  24330. evaluate: 'has-global-aria-attribute-evaluate'
  24331. }, {
  24332. id: 'has-widget-role',
  24333. evaluate: 'has-widget-role-evaluate',
  24334. options: []
  24335. }, {
  24336. id: 'invalidrole',
  24337. evaluate: 'invalidrole-evaluate'
  24338. }, {
  24339. id: 'is-element-focusable',
  24340. evaluate: 'is-element-focusable-evaluate'
  24341. }, {
  24342. id: 'no-implicit-explicit-label',
  24343. evaluate: 'no-implicit-explicit-label-evaluate'
  24344. }, {
  24345. id: 'unsupportedrole',
  24346. evaluate: 'unsupportedrole-evaluate'
  24347. }, {
  24348. id: 'valid-scrollable-semantics',
  24349. evaluate: 'valid-scrollable-semantics-evaluate',
  24350. options: {
  24351. roles: [ 'tooltip' ]
  24352. }
  24353. }, {
  24354. id: 'color-contrast-enhanced',
  24355. evaluate: 'color-contrast-evaluate',
  24356. options: {
  24357. ignoreUnicode: true,
  24358. ignoreLength: false,
  24359. ignorePseudo: false,
  24360. boldValue: 700,
  24361. boldTextPt: 14,
  24362. largeTextPt: 18,
  24363. contrastRatio: {
  24364. normal: {
  24365. expected: 7
  24366. },
  24367. large: {
  24368. expected: 4.5
  24369. }
  24370. },
  24371. pseudoSizeThreshold: .25,
  24372. shadowOutlineEmMax: .1
  24373. }
  24374. }, {
  24375. id: 'color-contrast',
  24376. evaluate: 'color-contrast-evaluate',
  24377. options: {
  24378. ignoreUnicode: true,
  24379. ignoreLength: false,
  24380. ignorePseudo: false,
  24381. boldValue: 700,
  24382. boldTextPt: 14,
  24383. largeTextPt: 18,
  24384. contrastRatio: {
  24385. normal: {
  24386. expected: 4.5
  24387. },
  24388. large: {
  24389. expected: 3
  24390. }
  24391. },
  24392. pseudoSizeThreshold: .25,
  24393. shadowOutlineEmMax: .2
  24394. }
  24395. }, {
  24396. id: 'link-in-text-block',
  24397. evaluate: 'link-in-text-block-evaluate'
  24398. }, {
  24399. id: 'autocomplete-appropriate',
  24400. evaluate: 'autocomplete-appropriate-evaluate',
  24401. deprecated: true
  24402. }, {
  24403. id: 'autocomplete-valid',
  24404. evaluate: 'autocomplete-valid-evaluate',
  24405. options: {
  24406. stateTerms: [ 'none', 'false', 'true', 'disabled', 'enabled', 'undefined', 'null' ]
  24407. }
  24408. }, {
  24409. id: 'accesskeys',
  24410. evaluate: 'accesskeys-evaluate',
  24411. after: 'accesskeys-after'
  24412. }, {
  24413. id: 'focusable-content',
  24414. evaluate: 'focusable-content-evaluate'
  24415. }, {
  24416. id: 'focusable-disabled',
  24417. evaluate: 'focusable-disabled-evaluate'
  24418. }, {
  24419. id: 'focusable-element',
  24420. evaluate: 'focusable-element-evaluate'
  24421. }, {
  24422. id: 'focusable-modal-open',
  24423. evaluate: 'focusable-modal-open-evaluate'
  24424. }, {
  24425. id: 'focusable-no-name',
  24426. evaluate: 'focusable-no-name-evaluate'
  24427. }, {
  24428. id: 'focusable-not-tabbable',
  24429. evaluate: 'focusable-not-tabbable-evaluate'
  24430. }, {
  24431. id: 'frame-focusable-content',
  24432. evaluate: 'frame-focusable-content-evaluate'
  24433. }, {
  24434. id: 'landmark-is-top-level',
  24435. evaluate: 'landmark-is-top-level-evaluate'
  24436. }, {
  24437. id: 'no-focusable-content',
  24438. evaluate: 'no-focusable-content-evaluate'
  24439. }, {
  24440. id: 'page-has-heading-one',
  24441. evaluate: 'has-descendant-evaluate',
  24442. after: 'has-descendant-after',
  24443. options: {
  24444. selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]'
  24445. }
  24446. }, {
  24447. id: 'page-has-main',
  24448. evaluate: 'has-descendant-evaluate',
  24449. after: 'has-descendant-after',
  24450. options: {
  24451. selector: 'main:not([role]), [role=\'main\']'
  24452. }
  24453. }, {
  24454. id: 'page-no-duplicate-banner',
  24455. evaluate: 'page-no-duplicate-evaluate',
  24456. after: 'page-no-duplicate-after',
  24457. options: {
  24458. selector: 'header:not([role]), [role=banner]',
  24459. nativeScopeFilter: 'article, aside, main, nav, section'
  24460. }
  24461. }, {
  24462. id: 'page-no-duplicate-contentinfo',
  24463. evaluate: 'page-no-duplicate-evaluate',
  24464. after: 'page-no-duplicate-after',
  24465. options: {
  24466. selector: 'footer:not([role]), [role=contentinfo]',
  24467. nativeScopeFilter: 'article, aside, main, nav, section'
  24468. }
  24469. }, {
  24470. id: 'page-no-duplicate-main',
  24471. evaluate: 'page-no-duplicate-evaluate',
  24472. after: 'page-no-duplicate-after',
  24473. options: {
  24474. selector: 'main:not([role]), [role=\'main\']'
  24475. }
  24476. }, {
  24477. id: 'tabindex',
  24478. evaluate: 'tabindex-evaluate'
  24479. }, {
  24480. id: 'alt-space-value',
  24481. evaluate: 'alt-space-value-evaluate'
  24482. }, {
  24483. id: 'duplicate-img-label',
  24484. evaluate: 'duplicate-img-label-evaluate',
  24485. options: {
  24486. parentSelector: 'button, [role=button], a[href], p, li, td, th'
  24487. }
  24488. }, {
  24489. id: 'explicit-label',
  24490. evaluate: 'explicit-evaluate'
  24491. }, {
  24492. id: 'help-same-as-label',
  24493. evaluate: 'help-same-as-label-evaluate',
  24494. enabled: false
  24495. }, {
  24496. id: 'hidden-explicit-label',
  24497. evaluate: 'hidden-explicit-label-evaluate'
  24498. }, {
  24499. id: 'implicit-label',
  24500. evaluate: 'implicit-evaluate'
  24501. }, {
  24502. id: 'label-content-name-mismatch',
  24503. evaluate: 'label-content-name-mismatch-evaluate',
  24504. options: {
  24505. pixelThreshold: .1,
  24506. occuranceThreshold: 3
  24507. }
  24508. }, {
  24509. id: 'multiple-label',
  24510. evaluate: 'multiple-label-evaluate'
  24511. }, {
  24512. id: 'title-only',
  24513. evaluate: 'title-only-evaluate'
  24514. }, {
  24515. id: 'landmark-is-unique',
  24516. evaluate: 'landmark-is-unique-evaluate',
  24517. after: 'landmark-is-unique-after'
  24518. }, {
  24519. id: 'has-lang',
  24520. evaluate: 'has-lang-evaluate',
  24521. options: {
  24522. attributes: [ 'lang', 'xml:lang' ]
  24523. }
  24524. }, {
  24525. id: 'valid-lang',
  24526. evaluate: 'valid-lang-evaluate',
  24527. options: {
  24528. attributes: [ 'lang', 'xml:lang' ]
  24529. }
  24530. }, {
  24531. id: 'xml-lang-mismatch',
  24532. evaluate: 'xml-lang-mismatch-evaluate'
  24533. }, {
  24534. id: 'dlitem',
  24535. evaluate: 'dlitem-evaluate'
  24536. }, {
  24537. id: 'listitem',
  24538. evaluate: 'listitem-evaluate'
  24539. }, {
  24540. id: 'only-dlitems',
  24541. evaluate: 'only-dlitems-evaluate'
  24542. }, {
  24543. id: 'only-listitems',
  24544. evaluate: 'only-listitems-evaluate'
  24545. }, {
  24546. id: 'structured-dlitems',
  24547. evaluate: 'structured-dlitems-evaluate'
  24548. }, {
  24549. id: 'caption',
  24550. evaluate: 'caption-evaluate'
  24551. }, {
  24552. id: 'frame-tested',
  24553. evaluate: 'frame-tested-evaluate',
  24554. after: 'frame-tested-after',
  24555. options: {
  24556. isViolation: false
  24557. }
  24558. }, {
  24559. id: 'no-autoplay-audio',
  24560. evaluate: 'no-autoplay-audio-evaluate',
  24561. options: {
  24562. allowedDuration: 3
  24563. }
  24564. }, {
  24565. id: 'css-orientation-lock',
  24566. evaluate: 'css-orientation-lock-evaluate',
  24567. options: {
  24568. degreeThreshold: 2
  24569. }
  24570. }, {
  24571. id: 'meta-viewport-large',
  24572. evaluate: 'meta-viewport-scale-evaluate',
  24573. options: {
  24574. scaleMinimum: 5,
  24575. lowerBound: 2
  24576. }
  24577. }, {
  24578. id: 'meta-viewport',
  24579. evaluate: 'meta-viewport-scale-evaluate',
  24580. options: {
  24581. scaleMinimum: 2
  24582. }
  24583. }, {
  24584. id: 'header-present',
  24585. evaluate: 'has-descendant-evaluate',
  24586. after: 'has-descendant-after',
  24587. options: {
  24588. selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]'
  24589. }
  24590. }, {
  24591. id: 'heading-order',
  24592. evaluate: 'heading-order-evaluate',
  24593. after: 'heading-order-after'
  24594. }, {
  24595. id: 'identical-links-same-purpose',
  24596. evaluate: 'identical-links-same-purpose-evaluate',
  24597. after: 'identical-links-same-purpose-after'
  24598. }, {
  24599. id: 'internal-link-present',
  24600. evaluate: 'internal-link-present-evaluate'
  24601. }, {
  24602. id: 'landmark',
  24603. evaluate: 'has-descendant-evaluate',
  24604. options: {
  24605. selector: 'main, [role=main]'
  24606. }
  24607. }, {
  24608. id: 'meta-refresh',
  24609. evaluate: 'meta-refresh-evaluate'
  24610. }, {
  24611. id: 'p-as-heading',
  24612. evaluate: 'p-as-heading-evaluate',
  24613. options: {
  24614. margins: [ {
  24615. weight: 150,
  24616. italic: true
  24617. }, {
  24618. weight: 150,
  24619. size: 1.15
  24620. }, {
  24621. italic: true,
  24622. size: 1.15
  24623. }, {
  24624. size: 1.4
  24625. } ],
  24626. passLength: 1,
  24627. failLength: .5
  24628. }
  24629. }, {
  24630. id: 'region',
  24631. evaluate: 'region-evaluate',
  24632. after: 'region-after',
  24633. options: {
  24634. regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg'
  24635. }
  24636. }, {
  24637. id: 'skip-link',
  24638. evaluate: 'skip-link-evaluate'
  24639. }, {
  24640. id: 'unique-frame-title',
  24641. evaluate: 'unique-frame-title-evaluate',
  24642. after: 'unique-frame-title-after'
  24643. }, {
  24644. id: 'duplicate-id-active',
  24645. evaluate: 'duplicate-id-evaluate',
  24646. after: 'duplicate-id-after'
  24647. }, {
  24648. id: 'duplicate-id-aria',
  24649. evaluate: 'duplicate-id-evaluate',
  24650. after: 'duplicate-id-after'
  24651. }, {
  24652. id: 'duplicate-id',
  24653. evaluate: 'duplicate-id-evaluate',
  24654. after: 'duplicate-id-after'
  24655. }, {
  24656. id: 'aria-label',
  24657. evaluate: 'aria-label-evaluate'
  24658. }, {
  24659. id: 'aria-labelledby',
  24660. evaluate: 'aria-labelledby-evaluate'
  24661. }, {
  24662. id: 'avoid-inline-spacing',
  24663. evaluate: 'avoid-inline-spacing-evaluate',
  24664. options: {
  24665. cssProperties: [ 'line-height', 'letter-spacing', 'word-spacing' ]
  24666. }
  24667. }, {
  24668. id: 'button-has-visible-text',
  24669. evaluate: 'has-text-content-evaluate'
  24670. }, {
  24671. id: 'doc-has-title',
  24672. evaluate: 'doc-has-title-evaluate'
  24673. }, {
  24674. id: 'exists',
  24675. evaluate: 'exists-evaluate'
  24676. }, {
  24677. id: 'has-alt',
  24678. evaluate: 'has-alt-evaluate'
  24679. }, {
  24680. id: 'has-visible-text',
  24681. evaluate: 'has-text-content-evaluate'
  24682. }, {
  24683. id: 'is-on-screen',
  24684. evaluate: 'is-on-screen-evaluate'
  24685. }, {
  24686. id: 'non-empty-alt',
  24687. evaluate: 'attr-non-space-content-evaluate',
  24688. options: {
  24689. attribute: 'alt'
  24690. }
  24691. }, {
  24692. id: 'non-empty-if-present',
  24693. evaluate: 'non-empty-if-present-evaluate'
  24694. }, {
  24695. id: 'non-empty-placeholder',
  24696. evaluate: 'attr-non-space-content-evaluate',
  24697. options: {
  24698. attribute: 'placeholder'
  24699. }
  24700. }, {
  24701. id: 'non-empty-title',
  24702. evaluate: 'attr-non-space-content-evaluate',
  24703. options: {
  24704. attribute: 'title'
  24705. }
  24706. }, {
  24707. id: 'non-empty-value',
  24708. evaluate: 'attr-non-space-content-evaluate',
  24709. options: {
  24710. attribute: 'value'
  24711. }
  24712. }, {
  24713. id: 'presentational-role',
  24714. evaluate: 'presentational-role-evaluate'
  24715. }, {
  24716. id: 'role-none',
  24717. evaluate: 'matches-definition-evaluate',
  24718. deprecated: true,
  24719. options: {
  24720. matcher: {
  24721. attributes: {
  24722. role: 'none'
  24723. }
  24724. }
  24725. }
  24726. }, {
  24727. id: 'role-presentation',
  24728. evaluate: 'matches-definition-evaluate',
  24729. deprecated: true,
  24730. options: {
  24731. matcher: {
  24732. attributes: {
  24733. role: 'presentation'
  24734. }
  24735. }
  24736. }
  24737. }, {
  24738. id: 'svg-non-empty-title',
  24739. evaluate: 'svg-non-empty-title-evaluate'
  24740. }, {
  24741. id: 'caption-faked',
  24742. evaluate: 'caption-faked-evaluate'
  24743. }, {
  24744. id: 'html5-scope',
  24745. evaluate: 'html5-scope-evaluate'
  24746. }, {
  24747. id: 'same-caption-summary',
  24748. evaluate: 'same-caption-summary-evaluate'
  24749. }, {
  24750. id: 'scope-value',
  24751. evaluate: 'scope-value-evaluate',
  24752. options: {
  24753. values: [ 'row', 'col', 'rowgroup', 'colgroup' ]
  24754. }
  24755. }, {
  24756. id: 'td-has-header',
  24757. evaluate: 'td-has-header-evaluate'
  24758. }, {
  24759. id: 'td-headers-attr',
  24760. evaluate: 'td-headers-attr-evaluate'
  24761. }, {
  24762. id: 'th-has-data-cells',
  24763. evaluate: 'th-has-data-cells-evaluate'
  24764. }, {
  24765. id: 'hidden-content',
  24766. evaluate: 'hidden-content-evaluate'
  24767. } ]
  24768. });
  24769. })(typeof window === 'object' ? window : this);