| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994 |
- /*! Copyright (c) 2023 WhatsApp Inc. All Rights Reserved. */
- (() => {
- var e = {
- 4462: (e, t, n) => {
- !function (e) {
- "use strict";
- var t = function (e) {
- var t, n = new Float64Array(16);
- if (e) for (t = 0; t < e.length; t++) n[t] = e[t];
- return n
- }, r = function () {
- throw new Error("no PRNG")
- }, o = new Uint8Array(16), i = new Uint8Array(32);
- i[0] = 9;
- var s = t(), a = t([1]), c = t([56129, 1]),
- l = t([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]),
- u = t([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]),
- d = t([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]),
- _ = t([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]),
- f = t([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
- function h(e, t, n, r) {
- e[t] = n >> 24 & 255, e[t + 1] = n >> 16 & 255, e[t + 2] = n >> 8 & 255, e[t + 3] = 255 & n, e[t + 4] = r >> 24 & 255, e[t + 5] = r >> 16 & 255, e[t + 6] = r >> 8 & 255, e[t + 7] = 255 & r
- }
- function p(e, t, n, r, o) {
- var i, s = 0;
- for (i = 0; i < o; i++) s |= e[t + i] ^ n[r + i];
- return (1 & s - 1 >>> 8) - 1
- }
- function b(e, t, n, r) {
- return p(e, t, n, r, 16)
- }
- function m(e, t, n, r) {
- return p(e, t, n, r, 32)
- }
- function g(e, t, n, r) {
- !function (e, t, n, r) {
- for (var o, i = 255 & r[0] | (255 & r[1]) << 8 | (255 & r[2]) << 16 | (255 & r[3]) << 24, s = 255 & n[0] | (255 & n[1]) << 8 | (255 & n[2]) << 16 | (255 & n[3]) << 24, a = 255 & n[4] | (255 & n[5]) << 8 | (255 & n[6]) << 16 | (255 & n[7]) << 24, c = 255 & n[8] | (255 & n[9]) << 8 | (255 & n[10]) << 16 | (255 & n[11]) << 24, l = 255 & n[12] | (255 & n[13]) << 8 | (255 & n[14]) << 16 | (255 & n[15]) << 24, u = 255 & r[4] | (255 & r[5]) << 8 | (255 & r[6]) << 16 | (255 & r[7]) << 24, d = 255 & t[0] | (255 & t[1]) << 8 | (255 & t[2]) << 16 | (255 & t[3]) << 24, _ = 255 & t[4] | (255 & t[5]) << 8 | (255 & t[6]) << 16 | (255 & t[7]) << 24, f = 255 & t[8] | (255 & t[9]) << 8 | (255 & t[10]) << 16 | (255 & t[11]) << 24, h = 255 & t[12] | (255 & t[13]) << 8 | (255 & t[14]) << 16 | (255 & t[15]) << 24, p = 255 & r[8] | (255 & r[9]) << 8 | (255 & r[10]) << 16 | (255 & r[11]) << 24, b = 255 & n[16] | (255 & n[17]) << 8 | (255 & n[18]) << 16 | (255 & n[19]) << 24, m = 255 & n[20] | (255 & n[21]) << 8 | (255 & n[22]) << 16 | (255 & n[23]) << 24, g = 255 & n[24] | (255 & n[25]) << 8 | (255 & n[26]) << 16 | (255 & n[27]) << 24, v = 255 & n[28] | (255 & n[29]) << 8 | (255 & n[30]) << 16 | (255 & n[31]) << 24, y = 255 & r[12] | (255 & r[13]) << 8 | (255 & r[14]) << 16 | (255 & r[15]) << 24, w = i, S = s, E = a, j = c, k = l, A = u, T = d, x = _, P = f, I = h, O = p, U = b, R = m, C = g, D = v, M = y, $ = 0; $ < 20; $ += 2) w ^= (o = (R ^= (o = (P ^= (o = (k ^= (o = w + R | 0) << 7 | o >>> 25) + w | 0) << 9 | o >>> 23) + k | 0) << 13 | o >>> 19) + P | 0) << 18 | o >>> 14, A ^= (o = (S ^= (o = (C ^= (o = (I ^= (o = A + S | 0) << 7 | o >>> 25) + A | 0) << 9 | o >>> 23) + I | 0) << 13 | o >>> 19) + C | 0) << 18 | o >>> 14, O ^= (o = (T ^= (o = (E ^= (o = (D ^= (o = O + T | 0) << 7 | o >>> 25) + O | 0) << 9 | o >>> 23) + D | 0) << 13 | o >>> 19) + E | 0) << 18 | o >>> 14, M ^= (o = (U ^= (o = (x ^= (o = (j ^= (o = M + U | 0) << 7 | o >>> 25) + M | 0) << 9 | o >>> 23) + j | 0) << 13 | o >>> 19) + x | 0) << 18 | o >>> 14, w ^= (o = (j ^= (o = (E ^= (o = (S ^= (o = w + j | 0) << 7 | o >>> 25) + w | 0) << 9 | o >>> 23) + S | 0) << 13 | o >>> 19) + E | 0) << 18 | o >>> 14, A ^= (o = (k ^= (o = (x ^= (o = (T ^= (o = A + k | 0) << 7 | o >>> 25) + A | 0) << 9 | o >>> 23) + T | 0) << 13 | o >>> 19) + x | 0) << 18 | o >>> 14, O ^= (o = (I ^= (o = (P ^= (o = (U ^= (o = O + I | 0) << 7 | o >>> 25) + O | 0) << 9 | o >>> 23) + U | 0) << 13 | o >>> 19) + P | 0) << 18 | o >>> 14, M ^= (o = (D ^= (o = (C ^= (o = (R ^= (o = M + D | 0) << 7 | o >>> 25) + M | 0) << 9 | o >>> 23) + R | 0) << 13 | o >>> 19) + C | 0) << 18 | o >>> 14;
- w = w + i | 0, S = S + s | 0, E = E + a | 0, j = j + c | 0, k = k + l | 0, A = A + u | 0, T = T + d | 0, x = x + _ | 0, P = P + f | 0, I = I + h | 0, O = O + p | 0, U = U + b | 0, R = R + m | 0, C = C + g | 0, D = D + v | 0, M = M + y | 0, e[0] = w >>> 0 & 255, e[1] = w >>> 8 & 255, e[2] = w >>> 16 & 255, e[3] = w >>> 24 & 255, e[4] = S >>> 0 & 255, e[5] = S >>> 8 & 255, e[6] = S >>> 16 & 255, e[7] = S >>> 24 & 255, e[8] = E >>> 0 & 255, e[9] = E >>> 8 & 255, e[10] = E >>> 16 & 255, e[11] = E >>> 24 & 255, e[12] = j >>> 0 & 255, e[13] = j >>> 8 & 255, e[14] = j >>> 16 & 255, e[15] = j >>> 24 & 255, e[16] = k >>> 0 & 255, e[17] = k >>> 8 & 255, e[18] = k >>> 16 & 255, e[19] = k >>> 24 & 255, e[20] = A >>> 0 & 255, e[21] = A >>> 8 & 255, e[22] = A >>> 16 & 255, e[23] = A >>> 24 & 255, e[24] = T >>> 0 & 255, e[25] = T >>> 8 & 255, e[26] = T >>> 16 & 255, e[27] = T >>> 24 & 255, e[28] = x >>> 0 & 255, e[29] = x >>> 8 & 255, e[30] = x >>> 16 & 255, e[31] = x >>> 24 & 255, e[32] = P >>> 0 & 255, e[33] = P >>> 8 & 255, e[34] = P >>> 16 & 255, e[35] = P >>> 24 & 255, e[36] = I >>> 0 & 255, e[37] = I >>> 8 & 255, e[38] = I >>> 16 & 255, e[39] = I >>> 24 & 255, e[40] = O >>> 0 & 255, e[41] = O >>> 8 & 255, e[42] = O >>> 16 & 255, e[43] = O >>> 24 & 255, e[44] = U >>> 0 & 255, e[45] = U >>> 8 & 255, e[46] = U >>> 16 & 255, e[47] = U >>> 24 & 255, e[48] = R >>> 0 & 255, e[49] = R >>> 8 & 255, e[50] = R >>> 16 & 255, e[51] = R >>> 24 & 255, e[52] = C >>> 0 & 255, e[53] = C >>> 8 & 255, e[54] = C >>> 16 & 255, e[55] = C >>> 24 & 255, e[56] = D >>> 0 & 255, e[57] = D >>> 8 & 255, e[58] = D >>> 16 & 255, e[59] = D >>> 24 & 255, e[60] = M >>> 0 & 255, e[61] = M >>> 8 & 255, e[62] = M >>> 16 & 255, e[63] = M >>> 24 & 255
- }(e, t, n, r)
- }
- function v(e, t, n, r) {
- !function (e, t, n, r) {
- for (var o, i = 255 & r[0] | (255 & r[1]) << 8 | (255 & r[2]) << 16 | (255 & r[3]) << 24, s = 255 & n[0] | (255 & n[1]) << 8 | (255 & n[2]) << 16 | (255 & n[3]) << 24, a = 255 & n[4] | (255 & n[5]) << 8 | (255 & n[6]) << 16 | (255 & n[7]) << 24, c = 255 & n[8] | (255 & n[9]) << 8 | (255 & n[10]) << 16 | (255 & n[11]) << 24, l = 255 & n[12] | (255 & n[13]) << 8 | (255 & n[14]) << 16 | (255 & n[15]) << 24, u = 255 & r[4] | (255 & r[5]) << 8 | (255 & r[6]) << 16 | (255 & r[7]) << 24, d = 255 & t[0] | (255 & t[1]) << 8 | (255 & t[2]) << 16 | (255 & t[3]) << 24, _ = 255 & t[4] | (255 & t[5]) << 8 | (255 & t[6]) << 16 | (255 & t[7]) << 24, f = 255 & t[8] | (255 & t[9]) << 8 | (255 & t[10]) << 16 | (255 & t[11]) << 24, h = 255 & t[12] | (255 & t[13]) << 8 | (255 & t[14]) << 16 | (255 & t[15]) << 24, p = 255 & r[8] | (255 & r[9]) << 8 | (255 & r[10]) << 16 | (255 & r[11]) << 24, b = 255 & n[16] | (255 & n[17]) << 8 | (255 & n[18]) << 16 | (255 & n[19]) << 24, m = 255 & n[20] | (255 & n[21]) << 8 | (255 & n[22]) << 16 | (255 & n[23]) << 24, g = 255 & n[24] | (255 & n[25]) << 8 | (255 & n[26]) << 16 | (255 & n[27]) << 24, v = 255 & n[28] | (255 & n[29]) << 8 | (255 & n[30]) << 16 | (255 & n[31]) << 24, y = 255 & r[12] | (255 & r[13]) << 8 | (255 & r[14]) << 16 | (255 & r[15]) << 24, w = 0; w < 20; w += 2) i ^= (o = (m ^= (o = (f ^= (o = (l ^= (o = i + m | 0) << 7 | o >>> 25) + i | 0) << 9 | o >>> 23) + l | 0) << 13 | o >>> 19) + f | 0) << 18 | o >>> 14, u ^= (o = (s ^= (o = (g ^= (o = (h ^= (o = u + s | 0) << 7 | o >>> 25) + u | 0) << 9 | o >>> 23) + h | 0) << 13 | o >>> 19) + g | 0) << 18 | o >>> 14, p ^= (o = (d ^= (o = (a ^= (o = (v ^= (o = p + d | 0) << 7 | o >>> 25) + p | 0) << 9 | o >>> 23) + v | 0) << 13 | o >>> 19) + a | 0) << 18 | o >>> 14, y ^= (o = (b ^= (o = (_ ^= (o = (c ^= (o = y + b | 0) << 7 | o >>> 25) + y | 0) << 9 | o >>> 23) + c | 0) << 13 | o >>> 19) + _ | 0) << 18 | o >>> 14, i ^= (o = (c ^= (o = (a ^= (o = (s ^= (o = i + c | 0) << 7 | o >>> 25) + i | 0) << 9 | o >>> 23) + s | 0) << 13 | o >>> 19) + a | 0) << 18 | o >>> 14, u ^= (o = (l ^= (o = (_ ^= (o = (d ^= (o = u + l | 0) << 7 | o >>> 25) + u | 0) << 9 | o >>> 23) + d | 0) << 13 | o >>> 19) + _ | 0) << 18 | o >>> 14, p ^= (o = (h ^= (o = (f ^= (o = (b ^= (o = p + h | 0) << 7 | o >>> 25) + p | 0) << 9 | o >>> 23) + b | 0) << 13 | o >>> 19) + f | 0) << 18 | o >>> 14, y ^= (o = (v ^= (o = (g ^= (o = (m ^= (o = y + v | 0) << 7 | o >>> 25) + y | 0) << 9 | o >>> 23) + m | 0) << 13 | o >>> 19) + g | 0) << 18 | o >>> 14;
- e[0] = i >>> 0 & 255, e[1] = i >>> 8 & 255, e[2] = i >>> 16 & 255, e[3] = i >>> 24 & 255, e[4] = u >>> 0 & 255, e[5] = u >>> 8 & 255, e[6] = u >>> 16 & 255, e[7] = u >>> 24 & 255, e[8] = p >>> 0 & 255, e[9] = p >>> 8 & 255, e[10] = p >>> 16 & 255, e[11] = p >>> 24 & 255, e[12] = y >>> 0 & 255, e[13] = y >>> 8 & 255, e[14] = y >>> 16 & 255, e[15] = y >>> 24 & 255, e[16] = d >>> 0 & 255, e[17] = d >>> 8 & 255, e[18] = d >>> 16 & 255, e[19] = d >>> 24 & 255, e[20] = _ >>> 0 & 255, e[21] = _ >>> 8 & 255, e[22] = _ >>> 16 & 255, e[23] = _ >>> 24 & 255, e[24] = f >>> 0 & 255, e[25] = f >>> 8 & 255, e[26] = f >>> 16 & 255, e[27] = f >>> 24 & 255, e[28] = h >>> 0 & 255, e[29] = h >>> 8 & 255, e[30] = h >>> 16 & 255, e[31] = h >>> 24 & 255
- }(e, t, n, r)
- }
- var y = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
- function w(e, t, n, r, o, i, s) {
- var a, c, l = new Uint8Array(16), u = new Uint8Array(64);
- for (c = 0; c < 16; c++) l[c] = 0;
- for (c = 0; c < 8; c++) l[c] = i[c];
- for (; o >= 64;) {
- for (g(u, l, s, y), c = 0; c < 64; c++) e[t + c] = n[r + c] ^ u[c];
- for (a = 1, c = 8; c < 16; c++) a = a + (255 & l[c]) | 0, l[c] = 255 & a, a >>>= 8;
- o -= 64, t += 64, r += 64
- }
- if (o > 0) for (g(u, l, s, y), c = 0; c < o; c++) e[t + c] = n[r + c] ^ u[c];
- return 0
- }
- function S(e, t, n, r, o) {
- var i, s, a = new Uint8Array(16), c = new Uint8Array(64);
- for (s = 0; s < 16; s++) a[s] = 0;
- for (s = 0; s < 8; s++) a[s] = r[s];
- for (; n >= 64;) {
- for (g(c, a, o, y), s = 0; s < 64; s++) e[t + s] = c[s];
- for (i = 1, s = 8; s < 16; s++) i = i + (255 & a[s]) | 0, a[s] = 255 & i, i >>>= 8;
- n -= 64, t += 64
- }
- if (n > 0) for (g(c, a, o, y), s = 0; s < n; s++) e[t + s] = c[s];
- return 0
- }
- function E(e, t, n, r, o) {
- var i = new Uint8Array(32);
- v(i, r, o, y);
- for (var s = new Uint8Array(8), a = 0; a < 8; a++) s[a] = r[a + 16];
- return S(e, t, n, s, i)
- }
- function j(e, t, n, r, o, i, s) {
- var a = new Uint8Array(32);
- v(a, i, s, y);
- for (var c = new Uint8Array(8), l = 0; l < 8; l++) c[l] = i[l + 16];
- return w(e, t, n, r, o, c, a)
- }
- var k = function (e) {
- var t, n, r, o, i, s, a, c;
- this.buffer = new Uint8Array(16), this.r = new Uint16Array(10), this.h = new Uint16Array(10), this.pad = new Uint16Array(8), this.leftover = 0, this.fin = 0, t = 255 & e[0] | (255 & e[1]) << 8, this.r[0] = 8191 & t, n = 255 & e[2] | (255 & e[3]) << 8, this.r[1] = 8191 & (t >>> 13 | n << 3), r = 255 & e[4] | (255 & e[5]) << 8, this.r[2] = 7939 & (n >>> 10 | r << 6), o = 255 & e[6] | (255 & e[7]) << 8, this.r[3] = 8191 & (r >>> 7 | o << 9), i = 255 & e[8] | (255 & e[9]) << 8, this.r[4] = 255 & (o >>> 4 | i << 12), this.r[5] = i >>> 1 & 8190, s = 255 & e[10] | (255 & e[11]) << 8, this.r[6] = 8191 & (i >>> 14 | s << 2), a = 255 & e[12] | (255 & e[13]) << 8, this.r[7] = 8065 & (s >>> 11 | a << 5), c = 255 & e[14] | (255 & e[15]) << 8, this.r[8] = 8191 & (a >>> 8 | c << 8), this.r[9] = c >>> 5 & 127, this.pad[0] = 255 & e[16] | (255 & e[17]) << 8, this.pad[1] = 255 & e[18] | (255 & e[19]) << 8, this.pad[2] = 255 & e[20] | (255 & e[21]) << 8, this.pad[3] = 255 & e[22] | (255 & e[23]) << 8, this.pad[4] = 255 & e[24] | (255 & e[25]) << 8, this.pad[5] = 255 & e[26] | (255 & e[27]) << 8, this.pad[6] = 255 & e[28] | (255 & e[29]) << 8, this.pad[7] = 255 & e[30] | (255 & e[31]) << 8
- };
- function A(e, t, n, r, o, i) {
- var s = new k(i);
- return s.update(n, r, o), s.finish(e, t), 0
- }
- function T(e, t, n, r, o, i) {
- var s = new Uint8Array(16);
- return A(s, 0, n, r, o, i), b(e, t, s, 0)
- }
- function x(e, t, n, r, o) {
- var i;
- if (n < 32) return -1;
- for (j(e, 0, t, 0, n, r, o), A(e, 16, e, 32, n - 32, e), i = 0; i < 16; i++) e[i] = 0;
- return 0
- }
- function P(e, t, n, r, o) {
- var i, s = new Uint8Array(32);
- if (n < 32) return -1;
- if (E(s, 0, 32, r, o), 0 !== T(t, 16, t, 32, n - 32, s)) return -1;
- for (j(e, 0, t, 0, n, r, o), i = 0; i < 32; i++) e[i] = 0;
- return 0
- }
- function I(e, t) {
- var n;
- for (n = 0; n < 16; n++) e[n] = 0 | t[n]
- }
- function O(e) {
- var t, n, r = 1;
- for (t = 0; t < 16; t++) n = e[t] + r + 65535, r = Math.floor(n / 65536), e[t] = n - 65536 * r;
- e[0] += r - 1 + 37 * (r - 1)
- }
- function U(e, t, n) {
- for (var r, o = ~(n - 1), i = 0; i < 16; i++) r = o & (e[i] ^ t[i]), e[i] ^= r, t[i] ^= r
- }
- function R(e, n) {
- var r, o, i, s = t(), a = t();
- for (r = 0; r < 16; r++) a[r] = n[r];
- for (O(a), O(a), O(a), o = 0; o < 2; o++) {
- for (s[0] = a[0] - 65517, r = 1; r < 15; r++) s[r] = a[r] - 65535 - (s[r - 1] >> 16 & 1), s[r - 1] &= 65535;
- s[15] = a[15] - 32767 - (s[14] >> 16 & 1), i = s[15] >> 16 & 1, s[14] &= 65535, U(a, s, 1 - i)
- }
- for (r = 0; r < 16; r++) e[2 * r] = 255 & a[r], e[2 * r + 1] = a[r] >> 8
- }
- function C(e, t) {
- var n = new Uint8Array(32), r = new Uint8Array(32);
- return R(n, e), R(r, t), m(n, 0, r, 0)
- }
- function D(e) {
- var t = new Uint8Array(32);
- return R(t, e), 1 & t[0]
- }
- function M(e, t) {
- var n;
- for (n = 0; n < 16; n++) e[n] = t[2 * n] + (t[2 * n + 1] << 8);
- e[15] &= 32767
- }
- function $(e, t, n) {
- for (var r = 0; r < 16; r++) e[r] = t[r] + n[r]
- }
- function L(e, t, n) {
- for (var r = 0; r < 16; r++) e[r] = t[r] - n[r]
- }
- function N(e, t, n) {
- var r, o, i = 0, s = 0, a = 0, c = 0, l = 0, u = 0, d = 0, _ = 0, f = 0, h = 0, p = 0, b = 0, m = 0,
- g = 0, v = 0, y = 0, w = 0, S = 0, E = 0, j = 0, k = 0, A = 0, T = 0, x = 0, P = 0, I = 0,
- O = 0, U = 0, R = 0, C = 0, D = 0, M = n[0], $ = n[1], L = n[2], N = n[3], J = n[4], B = n[5],
- F = n[6], K = n[7], q = n[8], z = n[9], W = n[10], G = n[11], Y = n[12], H = n[13], V = n[14],
- X = n[15];
- i += (r = t[0]) * M, s += r * $, a += r * L, c += r * N, l += r * J, u += r * B, d += r * F, _ += r * K, f += r * q, h += r * z, p += r * W, b += r * G, m += r * Y, g += r * H, v += r * V, y += r * X, s += (r = t[1]) * M, a += r * $, c += r * L, l += r * N, u += r * J, d += r * B, _ += r * F, f += r * K, h += r * q, p += r * z, b += r * W, m += r * G, g += r * Y, v += r * H, y += r * V, w += r * X, a += (r = t[2]) * M, c += r * $, l += r * L, u += r * N, d += r * J, _ += r * B, f += r * F, h += r * K, p += r * q, b += r * z, m += r * W, g += r * G, v += r * Y, y += r * H, w += r * V, S += r * X, c += (r = t[3]) * M, l += r * $, u += r * L, d += r * N, _ += r * J, f += r * B, h += r * F, p += r * K, b += r * q, m += r * z, g += r * W, v += r * G, y += r * Y, w += r * H, S += r * V, E += r * X, l += (r = t[4]) * M, u += r * $, d += r * L, _ += r * N, f += r * J, h += r * B, p += r * F, b += r * K, m += r * q, g += r * z, v += r * W, y += r * G, w += r * Y, S += r * H, E += r * V, j += r * X, u += (r = t[5]) * M, d += r * $, _ += r * L, f += r * N, h += r * J, p += r * B, b += r * F, m += r * K, g += r * q, v += r * z, y += r * W, w += r * G, S += r * Y, E += r * H, j += r * V, k += r * X, d += (r = t[6]) * M, _ += r * $, f += r * L, h += r * N, p += r * J,b += r * B,m += r * F,g += r * K,v += r * q,y += r * z,w += r * W,S += r * G,E += r * Y,j += r * H,k += r * V,A += r * X,_ += (r = t[7]) * M,f += r * $,h += r * L,p += r * N,b += r * J,m += r * B,g += r * F,v += r * K,y += r * q,w += r * z,S += r * W,E += r * G,j += r * Y,k += r * H,A += r * V,T += r * X,f += (r = t[8]) * M,h += r * $,p += r * L,b += r * N,m += r * J,g += r * B,v += r * F,y += r * K,w += r * q,S += r * z,E += r * W,j += r * G,k += r * Y,A += r * H,T += r * V,x += r * X,h += (r = t[9]) * M,p += r * $,b += r * L,m += r * N,g += r * J,v += r * B,y += r * F,w += r * K,S += r * q,E += r * z,j += r * W,k += r * G,A += r * Y,T += r * H,x += r * V,P += r * X,p += (r = t[10]) * M,b += r * $,m += r * L,g += r * N,v += r * J,y += r * B,w += r * F,S += r * K,E += r * q,j += r * z,k += r * W,A += r * G,T += r * Y,x += r * H,P += r * V,I += r * X,b += (r = t[11]) * M,m += r * $,g += r * L,v += r * N,y += r * J,w += r * B,S += r * F,E += r * K,j += r * q,k += r * z,A += r * W,T += r * G,x += r * Y,P += r * H,I += r * V,O += r * X,m += (r = t[12]) * M,g += r * $,v += r * L,y += r * N,w += r * J,S += r * B,E += r * F,j += r * K,k += r * q,A += r * z,T += r * W,x += r * G,P += r * Y,I += r * H,O += r * V,U += r * X,g += (r = t[13]) * M,v += r * $,y += r * L,w += r * N,S += r * J,E += r * B,j += r * F,k += r * K,A += r * q,T += r * z,x += r * W,P += r * G,I += r * Y,O += r * H,U += r * V,R += r * X,v += (r = t[14]) * M,y += r * $,w += r * L,S += r * N,E += r * J,j += r * B,k += r * F,A += r * K,T += r * q,x += r * z,P += r * W,I += r * G,O += r * Y,U += r * H,R += r * V,C += r * X,y += (r = t[15]) * M,s += 38 * (S += r * L),a += 38 * (E += r * N),c += 38 * (j += r * J),l += 38 * (k += r * B),u += 38 * (A += r * F),d += 38 * (T += r * K),_ += 38 * (x += r * q),f += 38 * (P += r * z),h += 38 * (I += r * W),p += 38 * (O += r * G),b += 38 * (U += r * Y),m += 38 * (R += r * H),g += 38 * (C += r * V),v += 38 * (D += r * X),i = (r = (i += 38 * (w += r * $)) + (o = 1) + 65535) - 65536 * (o = Math.floor(r / 65536)),s = (r = s + o + 65535) - 65536 * (o = Math.floor(r / 65536)),a = (r = a + o + 65535) - 65536 * (o = Math.floor(r / 65536)),c = (r = c + o + 65535) - 65536 * (o = Math.floor(r / 65536)),l = (r = l + o + 65535) - 65536 * (o = Math.floor(r / 65536)),u = (r = u + o + 65535) - 65536 * (o = Math.floor(r / 65536)),d = (r = d + o + 65535) - 65536 * (o = Math.floor(r / 65536)),_ = (r = _ + o + 65535) - 65536 * (o = Math.floor(r / 65536)),f = (r = f + o + 65535) - 65536 * (o = Math.floor(r / 65536)),h = (r = h + o + 65535) - 65536 * (o = Math.floor(r / 65536)),p = (r = p + o + 65535) - 65536 * (o = Math.floor(r / 65536)),b = (r = b + o + 65535) - 65536 * (o = Math.floor(r / 65536)),m = (r = m + o + 65535) - 65536 * (o = Math.floor(r / 65536)),g = (r = g + o + 65535) - 65536 * (o = Math.floor(r / 65536)),v = (r = v + o + 65535) - 65536 * (o = Math.floor(r / 65536)),y = (r = y + o + 65535) - 65536 * (o = Math.floor(r / 65536)),i = (r = (i += o - 1 + 37 * (o - 1)) + (o = 1) + 65535) - 65536 * (o = Math.floor(r / 65536)),s = (r = s + o + 65535) - 65536 * (o = Math.floor(r / 65536)),a = (r = a + o + 65535) - 65536 * (o = Math.floor(r / 65536)),c = (r = c + o + 65535) - 65536 * (o = Math.floor(r / 65536)),l = (r = l + o + 65535) - 65536 * (o = Math.floor(r / 65536)),u = (r = u + o + 65535) - 65536 * (o = Math.floor(r / 65536)),d = (r = d + o + 65535) - 65536 * (o = Math.floor(r / 65536)),_ = (r = _ + o + 65535) - 65536 * (o = Math.floor(r / 65536)),f = (r = f + o + 65535) - 65536 * (o = Math.floor(r / 65536)),h = (r = h + o + 65535) - 65536 * (o = Math.floor(r / 65536)),p = (r = p + o + 65535) - 65536 * (o = Math.floor(r / 65536)),b = (r = b + o + 65535) - 65536 * (o = Math.floor(r / 65536)),m = (r = m + o + 65535) - 65536 * (o = Math.floor(r / 65536)),g = (r = g + o + 65535) - 65536 * (o = Math.floor(r / 65536)),v = (r = v + o + 65535) - 65536 * (o = Math.floor(r / 65536)),y = (r = y + o + 65535) - 65536 * (o = Math.floor(r / 65536)),i += o - 1 + 37 * (o - 1),e[0] = i,e[1] = s,e[2] = a,e[3] = c,e[4] = l,e[5] = u,e[6] = d,e[7] = _,e[8] = f,e[9] = h,e[10] = p,e[11] = b,e[12] = m,e[13] = g,e[14] = v,e[15] = y
- }
- function J(e, t) {
- N(e, t, t)
- }
- function B(e, n) {
- var r, o = t();
- for (r = 0; r < 16; r++) o[r] = n[r];
- for (r = 253; r >= 0; r--) J(o, o), 2 !== r && 4 !== r && N(o, o, n);
- for (r = 0; r < 16; r++) e[r] = o[r]
- }
- function F(e, n) {
- var r, o = t();
- for (r = 0; r < 16; r++) o[r] = n[r];
- for (r = 250; r >= 0; r--) J(o, o), 1 !== r && N(o, o, n);
- for (r = 0; r < 16; r++) e[r] = o[r]
- }
- function K(e, n, r) {
- var o, i, s = new Uint8Array(32), a = new Float64Array(80), l = t(), u = t(), d = t(), _ = t(),
- f = t(), h = t();
- for (i = 0; i < 31; i++) s[i] = n[i];
- for (s[31] = 127 & n[31] | 64, s[0] &= 248, M(a, r), i = 0; i < 16; i++) u[i] = a[i], _[i] = l[i] = d[i] = 0;
- for (l[0] = _[0] = 1, i = 254; i >= 0; --i) U(l, u, o = s[i >>> 3] >>> (7 & i) & 1), U(d, _, o), $(f, l, d), L(l, l, d), $(d, u, _), L(u, u, _), J(_, f), J(h, l), N(l, d, l), N(d, u, f), $(f, l, d), L(l, l, d), J(u, l), L(d, _, h), N(l, d, c), $(l, l, _), N(d, d, l), N(l, _, h), N(_, u, a), J(u, f), U(l, u, o), U(d, _, o);
- for (i = 0; i < 16; i++) a[i + 16] = l[i], a[i + 32] = d[i], a[i + 48] = u[i], a[i + 64] = _[i];
- var p = a.subarray(32), b = a.subarray(16);
- return B(p, p), N(b, b, p), R(e, b), 0
- }
- function q(e, t) {
- return K(e, t, i)
- }
- function z(e, t) {
- return r(t, 32), q(e, t)
- }
- function W(e, t, n) {
- var r = new Uint8Array(32);
- return K(r, n, t), v(e, o, r, y)
- }
- k.prototype.blocks = function (e, t, n) {
- for (var r, o, i, s, a, c, l, u, d, _, f, h, p, b, m, g, v, y, w, S = this.fin ? 0 : 2048, E = this.h[0], j = this.h[1], k = this.h[2], A = this.h[3], T = this.h[4], x = this.h[5], P = this.h[6], I = this.h[7], O = this.h[8], U = this.h[9], R = this.r[0], C = this.r[1], D = this.r[2], M = this.r[3], $ = this.r[4], L = this.r[5], N = this.r[6], J = this.r[7], B = this.r[8], F = this.r[9]; n >= 16;) _ = d = 0, _ += (E += 8191 & (r = 255 & e[t + 0] | (255 & e[t + 1]) << 8)) * R, _ += (j += 8191 & (r >>> 13 | (o = 255 & e[t + 2] | (255 & e[t + 3]) << 8) << 3)) * (5 * F), _ += (k += 8191 & (o >>> 10 | (i = 255 & e[t + 4] | (255 & e[t + 5]) << 8) << 6)) * (5 * B), _ += (A += 8191 & (i >>> 7 | (s = 255 & e[t + 6] | (255 & e[t + 7]) << 8) << 9)) * (5 * J), d = (_ += (T += 8191 & (s >>> 4 | (a = 255 & e[t + 8] | (255 & e[t + 9]) << 8) << 12)) * (5 * N)) >>> 13, _ &= 8191, _ += (x += a >>> 1 & 8191) * (5 * L), _ += (P += 8191 & (a >>> 14 | (c = 255 & e[t + 10] | (255 & e[t + 11]) << 8) << 2)) * (5 * $), _ += (I += 8191 & (c >>> 11 | (l = 255 & e[t + 12] | (255 & e[t + 13]) << 8) << 5)) * (5 * M), _ += (O += 8191 & (l >>> 8 | (u = 255 & e[t + 14] | (255 & e[t + 15]) << 8) << 8)) * (5 * D), f = d += (_ += (U += u >>> 5 | S) * (5 * C)) >>> 13, f += E * C, f += j * R, f += k * (5 * F), f += A * (5 * B), d = (f += T * (5 * J)) >>> 13, f &= 8191, f += x * (5 * N), f += P * (5 * L), f += I * (5 * $), f += O * (5 * M), d += (f += U * (5 * D)) >>> 13, f &= 8191, h = d, h += E * D, h += j * C, h += k * R, h += A * (5 * F), d = (h += T * (5 * B)) >>> 13, h &= 8191, h += x * (5 * J), h += P * (5 * N), h += I * (5 * L), h += O * (5 * $), p = d += (h += U * (5 * M)) >>> 13, p += E * M, p += j * D, p += k * C, p += A * R, d = (p += T * (5 * F)) >>> 13, p &= 8191, p += x * (5 * B), p += P * (5 * J), p += I * (5 * N), p += O * (5 * L), b = d += (p += U * (5 * $)) >>> 13, b += E * $, b += j * M, b += k * D, b += A * C, d = (b += T * R) >>> 13, b &= 8191, b += x * (5 * F), b += P * (5 * B), b += I * (5 * J), b += O * (5 * N), m = d += (b += U * (5 * L)) >>> 13, m += E * L, m += j * $, m += k * M, m += A * D, d = (m += T * C) >>> 13, m &= 8191, m += x * R, m += P * (5 * F), m += I * (5 * B), m += O * (5 * J), g = d += (m += U * (5 * N)) >>> 13, g += E * N, g += j * L, g += k * $, g += A * M, d = (g += T * D) >>> 13, g &= 8191, g += x * C, g += P * R, g += I * (5 * F), g += O * (5 * B), v = d += (g += U * (5 * J)) >>> 13, v += E * J, v += j * N, v += k * L, v += A * $, d = (v += T * M) >>> 13, v &= 8191, v += x * D, v += P * C, v += I * R, v += O * (5 * F), y = d += (v += U * (5 * B)) >>> 13, y += E * B, y += j * J, y += k * N, y += A * L, d = (y += T * $) >>> 13, y &= 8191, y += x * M, y += P * D, y += I * C, y += O * R,w = d += (y += U * (5 * F)) >>> 13,w += E * F,w += j * B,w += k * J,w += A * N,d = (w += T * L) >>> 13,w &= 8191,w += x * $,w += P * M,w += I * D,w += O * C,E = _ = 8191 & (d = (d = ((d += (w += U * R) >>> 13) << 2) + d | 0) + (_ &= 8191) | 0),j = f += d >>>= 13,k = h &= 8191,A = p &= 8191,T = b &= 8191,x = m &= 8191,P = g &= 8191,I = v &= 8191,O = y &= 8191,U = w &= 8191,t += 16,n -= 16;
- this.h[0] = E, this.h[1] = j, this.h[2] = k, this.h[3] = A, this.h[4] = T, this.h[5] = x, this.h[6] = P, this.h[7] = I, this.h[8] = O, this.h[9] = U
- }, k.prototype.finish = function (e, t) {
- var n, r, o, i, s = new Uint16Array(10);
- if (this.leftover) {
- for (i = this.leftover, this.buffer[i++] = 1; i < 16; i++) this.buffer[i] = 0;
- this.fin = 1, this.blocks(this.buffer, 0, 16)
- }
- for (n = this.h[1] >>> 13, this.h[1] &= 8191, i = 2; i < 10; i++) this.h[i] += n, n = this.h[i] >>> 13, this.h[i] &= 8191;
- for (this.h[0] += 5 * n, n = this.h[0] >>> 13, this.h[0] &= 8191, this.h[1] += n, n = this.h[1] >>> 13, this.h[1] &= 8191, this.h[2] += n, s[0] = this.h[0] + 5, n = s[0] >>> 13, s[0] &= 8191, i = 1; i < 10; i++) s[i] = this.h[i] + n, n = s[i] >>> 13, s[i] &= 8191;
- for (s[9] -= 8192, r = (1 ^ n) - 1, i = 0; i < 10; i++) s[i] &= r;
- for (r = ~r, i = 0; i < 10; i++) this.h[i] = this.h[i] & r | s[i];
- for (this.h[0] = 65535 & (this.h[0] | this.h[1] << 13), this.h[1] = 65535 & (this.h[1] >>> 3 | this.h[2] << 10), this.h[2] = 65535 & (this.h[2] >>> 6 | this.h[3] << 7), this.h[3] = 65535 & (this.h[3] >>> 9 | this.h[4] << 4), this.h[4] = 65535 & (this.h[4] >>> 12 | this.h[5] << 1 | this.h[6] << 14), this.h[5] = 65535 & (this.h[6] >>> 2 | this.h[7] << 11), this.h[6] = 65535 & (this.h[7] >>> 5 | this.h[8] << 8), this.h[7] = 65535 & (this.h[8] >>> 8 | this.h[9] << 5), o = this.h[0] + this.pad[0], this.h[0] = 65535 & o, i = 1; i < 8; i++) o = (this.h[i] + this.pad[i] | 0) + (o >>> 16) | 0, this.h[i] = 65535 & o;
- e[t + 0] = this.h[0] >>> 0 & 255, e[t + 1] = this.h[0] >>> 8 & 255, e[t + 2] = this.h[1] >>> 0 & 255, e[t + 3] = this.h[1] >>> 8 & 255, e[t + 4] = this.h[2] >>> 0 & 255, e[t + 5] = this.h[2] >>> 8 & 255, e[t + 6] = this.h[3] >>> 0 & 255, e[t + 7] = this.h[3] >>> 8 & 255, e[t + 8] = this.h[4] >>> 0 & 255, e[t + 9] = this.h[4] >>> 8 & 255, e[t + 10] = this.h[5] >>> 0 & 255, e[t + 11] = this.h[5] >>> 8 & 255, e[t + 12] = this.h[6] >>> 0 & 255, e[t + 13] = this.h[6] >>> 8 & 255, e[t + 14] = this.h[7] >>> 0 & 255, e[t + 15] = this.h[7] >>> 8 & 255
- }, k.prototype.update = function (e, t, n) {
- var r, o;
- if (this.leftover) {
- for ((o = 16 - this.leftover) > n && (o = n), r = 0; r < o; r++) this.buffer[this.leftover + r] = e[t + r];
- if (n -= o, t += o, this.leftover += o, this.leftover < 16) return;
- this.blocks(this.buffer, 0, 16), this.leftover = 0
- }
- if (n >= 16 && (o = n - n % 16, this.blocks(e, t, o), t += o, n -= o), n) {
- for (r = 0; r < n; r++) this.buffer[this.leftover + r] = e[t + r];
- this.leftover += n
- }
- };
- var G = x, Y = P;
- var H = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591];
- function V(e, t, n, r) {
- for (var o, i, s, a, c, l, u, d, _, f, h, p, b, m, g, v, y, w, S, E, j, k, A, T, x, P, I = new Int32Array(16), O = new Int32Array(16), U = e[0], R = e[1], C = e[2], D = e[3], M = e[4], $ = e[5], L = e[6], N = e[7], J = t[0], B = t[1], F = t[2], K = t[3], q = t[4], z = t[5], W = t[6], G = t[7], Y = 0; r >= 128;) {
- for (S = 0; S < 16; S++) E = 8 * S + Y, I[S] = n[E + 0] << 24 | n[E + 1] << 16 | n[E + 2] << 8 | n[E + 3], O[S] = n[E + 4] << 24 | n[E + 5] << 16 | n[E + 6] << 8 | n[E + 7];
- for (S = 0; S < 80; S++) if (o = U, i = R, s = C, a = D, c = M, l = $, u = L, N, _ = J, f = B, h = F, p = K, b = q, m = z, g = W, G, A = 65535 & (k = G), T = k >>> 16, x = 65535 & (j = N), P = j >>> 16, A += 65535 & (k = (q >>> 14 | M << 18) ^ (q >>> 18 | M << 14) ^ (M >>> 9 | q << 23)), T += k >>> 16, x += 65535 & (j = (M >>> 14 | q << 18) ^ (M >>> 18 | q << 14) ^ (q >>> 9 | M << 23)), P += j >>> 16, A += 65535 & (k = q & z ^ ~q & W), T += k >>> 16, x += 65535 & (j = M & $ ^ ~M & L), P += j >>> 16, A += 65535 & (k = H[2 * S + 1]), T += k >>> 16, x += 65535 & (j = H[2 * S]), P += j >>> 16, j = I[S % 16], T += (k = O[S % 16]) >>> 16, x += 65535 & j, P += j >>> 16, x += (T += (A += 65535 & k) >>> 16) >>> 16, A = 65535 & (k = w = 65535 & A | T << 16), T = k >>> 16, x = 65535 & (j = y = 65535 & x | (P += x >>> 16) << 16), P = j >>> 16, A += 65535 & (k = (J >>> 28 | U << 4) ^ (U >>> 2 | J << 30) ^ (U >>> 7 | J << 25)), T += k >>> 16, x += 65535 & (j = (U >>> 28 | J << 4) ^ (J >>> 2 | U << 30) ^ (J >>> 7 | U << 25)), P += j >>> 16, T += (k = J & B ^ J & F ^ B & F) >>> 16, x += 65535 & (j = U & R ^ U & C ^ R & C), P += j >>> 16, d = 65535 & (x += (T += (A += 65535 & k) >>> 16) >>> 16) | (P += x >>> 16) << 16, v = 65535 & A | T << 16, A = 65535 & (k = p), T = k >>> 16, x = 65535 & (j = a), P = j >>> 16, T += (k = w) >>> 16, x += 65535 & (j = y), P += j >>> 16, R = o, C = i, D = s, M = a = 65535 & (x += (T += (A += 65535 & k) >>> 16) >>> 16) | (P += x >>> 16) << 16, $ = c, L = l, N = u, U = d, B = _, F = f, K = h, q = p = 65535 & A | T << 16, z = b, W = m, G = g, J = v, S % 16 == 15) for (E = 0; E < 16; E++) j = I[E], A = 65535 & (k = O[E]), T = k >>> 16, x = 65535 & j, P = j >>> 16, j = I[(E + 9) % 16], A += 65535 & (k = O[(E + 9) % 16]), T += k >>> 16, x += 65535 & j, P += j >>> 16, y = I[(E + 1) % 16], A += 65535 & (k = ((w = O[(E + 1) % 16]) >>> 1 | y << 31) ^ (w >>> 8 | y << 24) ^ (w >>> 7 | y << 25)), T += k >>> 16, x += 65535 & (j = (y >>> 1 | w << 31) ^ (y >>> 8 | w << 24) ^ y >>> 7), P += j >>> 16, y = I[(E + 14) % 16], T += (k = ((w = O[(E + 14) % 16]) >>> 19 | y << 13) ^ (y >>> 29 | w << 3) ^ (w >>> 6 | y << 26)) >>> 16, x += 65535 & (j = (y >>> 19 | w << 13) ^ (w >>> 29 | y << 3) ^ y >>> 6), P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, I[E] = 65535 & x | P << 16, O[E] = 65535 & A | T << 16;
- A = 65535 & (k = J), T = k >>> 16, x = 65535 & (j = U), P = j >>> 16, j = e[0], T += (k = t[0]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[0] = U = 65535 & x | P << 16, t[0] = J = 65535 & A | T << 16, A = 65535 & (k = B), T = k >>> 16, x = 65535 & (j = R), P = j >>> 16, j = e[1], T += (k = t[1]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[1] = R = 65535 & x | P << 16, t[1] = B = 65535 & A | T << 16, A = 65535 & (k = F), T = k >>> 16, x = 65535 & (j = C), P = j >>> 16, j = e[2], T += (k = t[2]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[2] = C = 65535 & x | P << 16, t[2] = F = 65535 & A | T << 16, A = 65535 & (k = K), T = k >>> 16, x = 65535 & (j = D), P = j >>> 16, j = e[3], T += (k = t[3]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[3] = D = 65535 & x | P << 16, t[3] = K = 65535 & A | T << 16, A = 65535 & (k = q), T = k >>> 16, x = 65535 & (j = M), P = j >>> 16, j = e[4], T += (k = t[4]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[4] = M = 65535 & x | P << 16, t[4] = q = 65535 & A | T << 16, A = 65535 & (k = z), T = k >>> 16, x = 65535 & (j = $), P = j >>> 16, j = e[5], T += (k = t[5]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[5] = $ = 65535 & x | P << 16, t[5] = z = 65535 & A | T << 16, A = 65535 & (k = W), T = k >>> 16, x = 65535 & (j = L), P = j >>> 16, j = e[6], T += (k = t[6]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[6] = L = 65535 & x | P << 16, t[6] = W = 65535 & A | T << 16, A = 65535 & (k = G), T = k >>> 16, x = 65535 & (j = N), P = j >>> 16, j = e[7], T += (k = t[7]) >>> 16, x += 65535 & j, P += j >>> 16, P += (x += (T += (A += 65535 & k) >>> 16) >>> 16) >>> 16, e[7] = N = 65535 & x | P << 16, t[7] = G = 65535 & A | T << 16, Y += 128, r -= 128
- }
- return r
- }
- function X(e, t, n) {
- var r, o = new Int32Array(8), i = new Int32Array(8), s = new Uint8Array(256), a = n;
- for (o[0] = 1779033703, o[1] = 3144134277, o[2] = 1013904242, o[3] = 2773480762, o[4] = 1359893119, o[5] = 2600822924, o[6] = 528734635, o[7] = 1541459225, i[0] = 4089235720, i[1] = 2227873595, i[2] = 4271175723, i[3] = 1595750129, i[4] = 2917565137, i[5] = 725511199, i[6] = 4215389547, i[7] = 327033209, V(o, i, t, n), n %= 128, r = 0; r < n; r++) s[r] = t[a - n + r];
- for (s[n] = 128, s[(n = 256 - 128 * (n < 112 ? 1 : 0)) - 9] = 0, h(s, n - 8, a / 536870912 | 0, a << 3), V(o, i, s, n), r = 0; r < 8; r++) h(e, 8 * r, o[r], i[r]);
- return 0
- }
- function Z(e, n) {
- var r = t(), o = t(), i = t(), s = t(), a = t(), c = t(), l = t(), d = t(), _ = t();
- L(r, e[1], e[0]), L(_, n[1], n[0]), N(r, r, _), $(o, e[0], e[1]), $(_, n[0], n[1]), N(o, o, _), N(i, e[3], n[3]), N(i, i, u), N(s, e[2], n[2]), $(s, s, s), L(a, o, r), L(c, s, i), $(l, s, i), $(d, o, r), N(e[0], a, c), N(e[1], d, l), N(e[2], l, c), N(e[3], a, d)
- }
- function Q(e, t, n) {
- var r;
- for (r = 0; r < 4; r++) U(e[r], t[r], n)
- }
- function ee(e, n) {
- var r = t(), o = t(), i = t();
- B(i, n[2]), N(r, n[0], i), N(o, n[1], i), R(e, o), e[31] ^= D(r) << 7
- }
- function te(e, t, n) {
- var r, o;
- for (I(e[0], s), I(e[1], a), I(e[2], a), I(e[3], s), o = 255; o >= 0; --o) Q(e, t, r = n[o / 8 | 0] >> (7 & o) & 1), Z(t, e), Z(e, e), Q(e, t, r)
- }
- function ne(e, n) {
- var r = [t(), t(), t(), t()];
- I(r[0], d), I(r[1], _), I(r[2], a), N(r[3], d, _), te(e, r, n)
- }
- function re(e, n, o) {
- var i, s = new Uint8Array(64), a = [t(), t(), t(), t()];
- for (o || r(n, 32), X(s, n, 32), s[0] &= 248, s[31] &= 127, s[31] |= 64, ne(a, s), ee(e, a), i = 0; i < 32; i++) n[i + 32] = e[i];
- return 0
- }
- var oe = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]);
- function ie(e, t) {
- var n, r, o, i;
- for (r = 63; r >= 32; --r) {
- for (n = 0, o = r - 32, i = r - 12; o < i; ++o) t[o] += n - 16 * t[r] * oe[o - (r - 32)], n = Math.floor((t[o] + 128) / 256), t[o] -= 256 * n;
- t[o] += n, t[r] = 0
- }
- for (n = 0, o = 0; o < 32; o++) t[o] += n - (t[31] >> 4) * oe[o], n = t[o] >> 8, t[o] &= 255;
- for (o = 0; o < 32; o++) t[o] -= n * oe[o];
- for (r = 0; r < 32; r++) t[r + 1] += t[r] >> 8, e[r] = 255 & t[r]
- }
- function se(e) {
- var t, n = new Float64Array(64);
- for (t = 0; t < 64; t++) n[t] = e[t];
- for (t = 0; t < 64; t++) e[t] = 0;
- ie(e, n)
- }
- function ae(e, n, r, o) {
- var i, s, a = new Uint8Array(64), c = new Uint8Array(64), l = new Uint8Array(64),
- u = new Float64Array(64), d = [t(), t(), t(), t()];
- X(a, o, 32), a[0] &= 248, a[31] &= 127, a[31] |= 64;
- var _ = r + 64;
- for (i = 0; i < r; i++) e[64 + i] = n[i];
- for (i = 0; i < 32; i++) e[32 + i] = a[32 + i];
- for (X(l, e.subarray(32), r + 32), se(l), ne(d, l), ee(e, d), i = 32; i < 64; i++) e[i] = o[i];
- for (X(c, e, r + 64), se(c), i = 0; i < 64; i++) u[i] = 0;
- for (i = 0; i < 32; i++) u[i] = l[i];
- for (i = 0; i < 32; i++) for (s = 0; s < 32; s++) u[i + s] += c[i] * a[s];
- return ie(e.subarray(32), u), _
- }
- function ce(e, n, r, o) {
- var i, c = new Uint8Array(32), u = new Uint8Array(64), d = [t(), t(), t(), t()],
- _ = [t(), t(), t(), t()];
- if (r < 64) return -1;
- if (function (e, n) {
- var r = t(), o = t(), i = t(), c = t(), u = t(), d = t(), _ = t();
- return I(e[2], a), M(e[1], n), J(i, e[1]), N(c, i, l), L(i, i, e[2]), $(c, e[2], c), J(u, c), J(d, u), N(_, d, u), N(r, _, i), N(r, r, c), F(r, r), N(r, r, i), N(r, r, c), N(r, r, c), N(e[0], r, c), J(o, e[0]), N(o, o, c), C(o, i) && N(e[0], e[0], f), J(o, e[0]), N(o, o, c), C(o, i) ? -1 : (D(e[0]) === n[31] >> 7 && L(e[0], s, e[0]), N(e[3], e[0], e[1]), 0)
- }(_, o)) return -1;
- for (i = 0; i < r; i++) e[i] = n[i];
- for (i = 0; i < 32; i++) e[i + 32] = o[i];
- if (X(u, e, r), se(u), te(d, _, u), ne(_, n.subarray(32)), Z(d, _), ee(c, d), r -= 64, m(n, 0, c, 0)) {
- for (i = 0; i < r; i++) e[i] = 0;
- return -1
- }
- for (i = 0; i < r; i++) e[i] = n[i + 64];
- return r
- }
- var le = 16, ue = 64, de = 32, _e = 64;
- function fe(e, t) {
- if (32 !== e.length) throw new Error("bad key size");
- if (24 !== t.length) throw new Error("bad nonce size")
- }
- function he() {
- for (var e = 0; e < arguments.length; e++) if (!(arguments[e] instanceof Uint8Array)) throw new TypeError("unexpected type, use Uint8Array")
- }
- function pe(e) {
- for (var t = 0; t < e.length; t++) e[t] = 0
- }
- e.lowlevel = {
- crypto_core_hsalsa20: v,
- crypto_stream_xor: j,
- crypto_stream: E,
- crypto_stream_salsa20_xor: w,
- crypto_stream_salsa20: S,
- crypto_onetimeauth: A,
- crypto_onetimeauth_verify: T,
- crypto_verify_16: b,
- crypto_verify_32: m,
- crypto_secretbox: x,
- crypto_secretbox_open: P,
- crypto_scalarmult: K,
- crypto_scalarmult_base: q,
- crypto_box_beforenm: W,
- crypto_box_afternm: G,
- crypto_box: function (e, t, n, r, o, i) {
- var s = new Uint8Array(32);
- return W(s, o, i), G(e, t, n, r, s)
- },
- crypto_box_open: function (e, t, n, r, o, i) {
- var s = new Uint8Array(32);
- return W(s, o, i), Y(e, t, n, r, s)
- },
- crypto_box_keypair: z,
- crypto_hash: X,
- crypto_sign: ae,
- crypto_sign_keypair: re,
- crypto_sign_open: ce,
- crypto_secretbox_KEYBYTES: 32,
- crypto_secretbox_NONCEBYTES: 24,
- crypto_secretbox_ZEROBYTES: 32,
- crypto_secretbox_BOXZEROBYTES: le,
- crypto_scalarmult_BYTES: 32,
- crypto_scalarmult_SCALARBYTES: 32,
- crypto_box_PUBLICKEYBYTES: 32,
- crypto_box_SECRETKEYBYTES: 32,
- crypto_box_BEFORENMBYTES: 32,
- crypto_box_NONCEBYTES: 24,
- crypto_box_ZEROBYTES: 32,
- crypto_box_BOXZEROBYTES: 16,
- crypto_sign_BYTES: ue,
- crypto_sign_PUBLICKEYBYTES: de,
- crypto_sign_SECRETKEYBYTES: _e,
- crypto_sign_SEEDBYTES: 32,
- crypto_hash_BYTES: 64,
- gf: t,
- D: l,
- L: oe,
- pack25519: R,
- unpack25519: M,
- M: N,
- A: $,
- S: J,
- Z: L,
- pow2523: F,
- add: Z,
- set25519: I,
- modL: ie,
- scalarmult: te,
- scalarbase: ne
- }, e.randomBytes = function (e) {
- var t = new Uint8Array(e);
- return r(t, e), t
- }, e.secretbox = function (e, t, n) {
- he(e, t, n), fe(n, t);
- for (var r = new Uint8Array(32 + e.length), o = new Uint8Array(r.length), i = 0; i < e.length; i++) r[i + 32] = e[i];
- return x(o, r, r.length, t, n), o.subarray(le)
- }, e.secretbox.open = function (e, t, n) {
- he(e, t, n), fe(n, t);
- for (var r = new Uint8Array(le + e.length), o = new Uint8Array(r.length), i = 0; i < e.length; i++) r[i + le] = e[i];
- return r.length < 32 || 0 !== P(o, r, r.length, t, n) ? null : o.subarray(32)
- }, e.secretbox.keyLength = 32, e.secretbox.nonceLength = 24, e.secretbox.overheadLength = le, e.scalarMult = function (e, t) {
- if (he(e, t), 32 !== e.length) throw new Error("bad n size");
- if (32 !== t.length) throw new Error("bad p size");
- var n = new Uint8Array(32);
- return K(n, e, t), n
- }, e.scalarMult.base = function (e) {
- if (he(e), 32 !== e.length) throw new Error("bad n size");
- var t = new Uint8Array(32);
- return q(t, e), t
- }, e.scalarMult.scalarLength = 32, e.scalarMult.groupElementLength = 32, e.box = function (t, n, r, o) {
- var i = e.box.before(r, o);
- return e.secretbox(t, n, i)
- }, e.box.before = function (e, t) {
- he(e, t), function (e, t) {
- if (32 !== e.length) throw new Error("bad public key size");
- if (32 !== t.length) throw new Error("bad secret key size")
- }(e, t);
- var n = new Uint8Array(32);
- return W(n, e, t), n
- }, e.box.after = e.secretbox, e.box.open = function (t, n, r, o) {
- var i = e.box.before(r, o);
- return e.secretbox.open(t, n, i)
- }, e.box.open.after = e.secretbox.open, e.box.keyPair = function () {
- var e = new Uint8Array(32), t = new Uint8Array(32);
- return z(e, t), {publicKey: e, secretKey: t}
- }, e.box.keyPair.fromSecretKey = function (e) {
- if (he(e), 32 !== e.length) throw new Error("bad secret key size");
- var t = new Uint8Array(32);
- return q(t, e), {publicKey: t, secretKey: new Uint8Array(e)}
- }, e.box.publicKeyLength = 32, e.box.secretKeyLength = 32, e.box.sharedKeyLength = 32, e.box.nonceLength = 24, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function (e, t) {
- if (he(e, t), t.length !== _e) throw new Error("bad secret key size");
- var n = new Uint8Array(ue + e.length);
- return ae(n, e, e.length, t), n
- }, e.sign.open = function (e, t) {
- if (he(e, t), t.length !== de) throw new Error("bad public key size");
- var n = new Uint8Array(e.length), r = ce(n, e, e.length, t);
- if (r < 0) return null;
- for (var o = new Uint8Array(r), i = 0; i < o.length; i++) o[i] = n[i];
- return o
- }, e.sign.detached = function (t, n) {
- for (var r = e.sign(t, n), o = new Uint8Array(ue), i = 0; i < o.length; i++) o[i] = r[i];
- return o
- }, e.sign.detached.verify = function (e, t, n) {
- if (he(e, t, n), t.length !== ue) throw new Error("bad signature size");
- if (n.length !== de) throw new Error("bad public key size");
- var r, o = new Uint8Array(ue + e.length), i = new Uint8Array(ue + e.length);
- for (r = 0; r < ue; r++) o[r] = t[r];
- for (r = 0; r < e.length; r++) o[r + ue] = e[r];
- return ce(i, o, o.length, n) >= 0
- }, e.sign.keyPair = function () {
- var e = new Uint8Array(de), t = new Uint8Array(_e);
- return re(e, t), {publicKey: e, secretKey: t}
- }, e.sign.keyPair.fromSecretKey = function (e) {
- if (he(e), e.length !== _e) throw new Error("bad secret key size");
- for (var t = new Uint8Array(de), n = 0; n < t.length; n++) t[n] = e[32 + n];
- return {publicKey: t, secretKey: new Uint8Array(e)}
- }, e.sign.keyPair.fromSeed = function (e) {
- if (he(e), 32 !== e.length) throw new Error("bad seed size");
- for (var t = new Uint8Array(de), n = new Uint8Array(_e), r = 0; r < 32; r++) n[r] = e[r];
- return re(t, n, !0), {publicKey: t, secretKey: n}
- }, e.sign.publicKeyLength = de, e.sign.secretKeyLength = _e, e.sign.seedLength = 32, e.sign.signatureLength = ue, e.hash = function (e) {
- he(e);
- var t = new Uint8Array(64);
- return X(t, e, e.length), t
- }, e.hash.hashLength = 64, e.verify = function (e, t) {
- return he(e, t), 0 !== e.length && 0 !== t.length && (e.length === t.length && 0 === p(e, 0, t, 0, e.length))
- }, e.setPRNG = function (e) {
- r = e
- }, function () {
- var t = "undefined" != typeof self ? self.crypto || self.msCrypto : null;
- if (t && t.getRandomValues) {
- e.setPRNG((function (e, n) {
- var r, o = new Uint8Array(n);
- for (r = 0; r < n; r += 65536) t.getRandomValues(o.subarray(r, r + Math.min(n - r, 65536)));
- for (r = 0; r < n; r++) e[r] = o[r];
- pe(o)
- }))
- } else (t = n(2329)) && t.randomBytes && e.setPRNG((function (e, n) {
- var r, o = t.randomBytes(n);
- for (r = 0; r < n; r++) e[r] = o[r];
- pe(o)
- }))
- }()
- }(e.exports ? e.exports : self.nacl = self.nacl || {})
- }, 1504: e => {
- function t(e, t, n, r, o, i, s) {
- try {
- var a = e[i](s), c = a.value
- } catch (e) {
- return void n(e)
- }
- a.done ? t(c) : Promise.resolve(c).then(r, o)
- }
- e.exports = function (e) {
- return function () {
- var n = this, r = arguments;
- return new Promise((function (o, i) {
- var s = e.apply(n, r);
- function a(e) {
- t(s, o, i, a, c, "next", e)
- }
- function c(e) {
- t(s, o, i, a, c, "throw", e)
- }
- a(void 0)
- }))
- }
- }
- }, 5526: e => {
- e.exports = function (e, t, n) {
- return t in e ? Object.defineProperty(e, t, {
- value: n,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : e[t] = n, e
- }
- }, 7914: e => {
- e.exports = function (e) {
- return e && e.__esModule ? e : {default: e}
- }
- }, 3982: (e, t, n) => {
- var r = n(5526);
- function o(e, t) {
- var n = Object.keys(e);
- if (Object.getOwnPropertySymbols) {
- var r = Object.getOwnPropertySymbols(e);
- t && (r = r.filter((function (t) {
- return Object.getOwnPropertyDescriptor(e, t).enumerable
- }))), n.push.apply(n, r)
- }
- return n
- }
- e.exports = function (e) {
- for (var t = 1; t < arguments.length; t++) {
- var n = null != arguments[t] ? arguments[t] : {};
- t % 2 ? o(Object(n), !0).forEach((function (t) {
- r(e, t, n[t])
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach((function (t) {
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
- }))
- }
- return e
- }
- }, 4302: e => {
- "use strict";
- var t = Object.prototype.hasOwnProperty, n = "function" == typeof WeakMap ? new WeakMap : new Map;
- function r(e) {
- var t = n.get(e);
- if (void 0 !== t) return t;
- var r = new Map;
- return Object.getOwnPropertyNames(e).forEach((function (t) {
- r.set(e[t], t)
- })), n.set(e, r), r
- }
- var o = Object.freeze(Object.defineProperties(Object.create(null), {
- isValid: {
- value: function (e) {
- return r(this).has(e)
- }
- }, cast: {
- value: function (e) {
- return this.isValid(e) ? e : void 0
- }
- }, members: {
- value: function () {
- return r(this).keys()
- }
- }, getName: {
- value: function (e) {
- return r(this).get(e)
- }
- }
- }));
- function i(e) {
- var n = Object.create(o);
- for (var r in e) t.call(e, r) && Object.defineProperty(n, r, {value: e[r]});
- return Object.freeze(n)
- }
- var s = Object.freeze(Object.defineProperties(Object.create(null), {
- isValid: {
- value: function (e) {
- return "string" == typeof e && t.call(this, e)
- }
- }, cast: {value: o.cast}, members: {
- value: function () {
- return Object.getOwnPropertyNames(this)
- }
- }, getName: {
- value: function (e) {
- return e
- }
- }
- }));
- i.Mirrored = function (e) {
- for (var t = Object.create(s), n = 0, r = e.length; n < r; ++n) Object.defineProperty(t, e[n], {value: e[n]});
- return Object.freeze(t)
- }, Object.freeze(i.Mirrored), e.exports = Object.freeze(i)
- }, 8926: e => {
- function t(e, t, n, r, o, i, s) {
- try {
- var a = e[i](s), c = a.value
- } catch (e) {
- return void n(e)
- }
- a.done ? t(c) : Promise.resolve(c).then(r, o)
- }
- e.exports = function (e) {
- return function () {
- var n = this, r = arguments;
- return new Promise((function (o, i) {
- var s = e.apply(n, r);
- function a(e) {
- t(s, o, i, a, c, "next", e)
- }
- function c(e) {
- t(s, o, i, a, c, "throw", e)
- }
- a(void 0)
- }))
- }
- }, e.exports.default = e.exports, e.exports.__esModule = !0
- }, 5318: e => {
- e.exports = function (e) {
- return e && e.__esModule ? e : {default: e}
- }, e.exports.default = e.exports, e.exports.__esModule = !0
- }, 6128: (e, t, n) => {
- "use strict";
- n.r(t), n.d(t, {default: () => Nt});
- var r = Object.keys, o = Array.isArray,
- i = "undefined" != typeof self ? self : "undefined" != typeof window ? window : n.g;
- function s(e, t) {
- return "object" != typeof t || r(t).forEach((function (n) {
- e[n] = t[n]
- })), e
- }
- var a = Object.getPrototypeOf, c = {}.hasOwnProperty;
- function l(e, t) {
- return c.call(e, t)
- }
- function u(e, t) {
- "function" == typeof t && (t = t(a(e))), r(t).forEach((function (n) {
- _(e, n, t[n])
- }))
- }
- var d = Object.defineProperty;
- function _(e, t, n, r) {
- d(e, t, s(n && l(n, "get") && "function" == typeof n.get ? {
- get: n.get,
- set: n.set,
- configurable: !0
- } : {value: n, configurable: !0, writable: !0}, r))
- }
- function f(e) {
- return {
- from: function (t) {
- return e.prototype = Object.create(t.prototype), _(e.prototype, "constructor", e), {extend: u.bind(null, e.prototype)}
- }
- }
- }
- var h = Object.getOwnPropertyDescriptor;
- function p(e, t) {
- var n;
- return h(e, t) || (n = a(e)) && p(n, t)
- }
- var b = [].slice;
- function m(e, t, n) {
- return b.call(e, t, n)
- }
- function g(e, t) {
- return t(e)
- }
- function v(e) {
- if (!e) throw new Error("Assertion Failed")
- }
- function y(e) {
- i.setImmediate ? setImmediate(e) : setTimeout(e, 0)
- }
- function w(e, t) {
- return e.reduce((function (e, n, r) {
- var o = t(n, r);
- return o && (e[o[0]] = o[1]), e
- }), {})
- }
- function S(e, t) {
- return function () {
- try {
- e.apply(this, arguments)
- } catch (e) {
- t(e)
- }
- }
- }
- function E(e, t, n) {
- try {
- e.apply(null, n)
- } catch (e) {
- t && t(e)
- }
- }
- function j(e, t) {
- if (l(e, t)) return e[t];
- if (!t) return e;
- if ("string" != typeof t) {
- for (var n = [], r = 0, o = t.length; r < o; ++r) {
- var i = j(e, t[r]);
- n.push(i)
- }
- return n
- }
- var s = t.indexOf(".");
- if (-1 !== s) {
- var a = e[t.substr(0, s)];
- return void 0 === a ? void 0 : j(a, t.substr(s + 1))
- }
- }
- function k(e, t, n) {
- if (e && void 0 !== t && (!("isFrozen" in Object) || !Object.isFrozen(e))) if ("string" != typeof t && "length" in t) {
- v("string" != typeof n && "length" in n);
- for (var r = 0, o = t.length; r < o; ++r) k(e, t[r], n[r])
- } else {
- var i = t.indexOf(".");
- if (-1 !== i) {
- var s = t.substr(0, i), a = t.substr(i + 1);
- if ("" === a) void 0 === n ? delete e[s] : e[s] = n; else {
- var c = e[s];
- c || (c = e[s] = {}), k(c, a, n)
- }
- } else void 0 === n ? delete e[t] : e[t] = n
- }
- }
- function A(e) {
- var t = {};
- for (var n in e) l(e, n) && (t[n] = e[n]);
- return t
- }
- var T = [].concat;
- function x(e) {
- return T.apply([], e)
- }
- var P = "Boolean,String,Date,RegExp,Blob,File,FileList,ArrayBuffer,DataView,Uint8ClampedArray,ImageData,Map,Set".split(",").concat(x([8, 16, 32, 64].map((function (e) {
- return ["Int", "Uint", "Float"].map((function (t) {
- return t + e + "Array"
- }))
- })))).filter((function (e) {
- return i[e]
- })).map((function (e) {
- return i[e]
- }));
- function I(e) {
- if (!e || "object" != typeof e) return e;
- var t;
- if (o(e)) {
- t = [];
- for (var n = 0, r = e.length; n < r; ++n) t.push(I(e[n]))
- } else if (P.indexOf(e.constructor) >= 0) t = e; else for (var i in t = e.constructor ? Object.create(e.constructor.prototype) : {}, e) l(e, i) && (t[i] = I(e[i]));
- return t
- }
- function O(e, t, n, o) {
- return n = n || {}, o = o || "", r(e).forEach((function (r) {
- if (l(t, r)) {
- var i = e[r], s = t[r];
- "object" == typeof i && "object" == typeof s && i && s && "" + i.constructor == "" + s.constructor ? O(i, s, n, o + r + ".") : i !== s && (n[o + r] = t[r])
- } else n[o + r] = void 0
- })), r(t).forEach((function (r) {
- l(e, r) || (n[o + r] = t[r])
- })), n
- }
- var U = "undefined" != typeof Symbol && Symbol.iterator, R = U ? function (e) {
- var t;
- return null != e && (t = e[U]) && t.apply(e)
- } : function () {
- return null
- }, C = {};
- function D(e) {
- var t, n, r, i;
- if (1 === arguments.length) {
- if (o(e)) return e.slice();
- if (this === C && "string" == typeof e) return [e];
- if (i = R(e)) {
- for (n = []; !(r = i.next()).done;) n.push(r.value);
- return n
- }
- if (null == e) return [e];
- if ("number" == typeof (t = e.length)) {
- for (n = new Array(t); t--;) n[t] = e[t];
- return n
- }
- return [e]
- }
- for (t = arguments.length, n = new Array(t); t--;) n[t] = arguments[t];
- return n
- }
- var M = "undefined" != typeof location && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
- function $(e, t) {
- M = e, L = t
- }
- var L = function () {
- return !0
- }, N = !new Error("").stack;
- function J() {
- if (N) try {
- throw J.arguments, new Error
- } catch (e) {
- return e
- }
- return new Error
- }
- function B(e, t) {
- var n = e.stack;
- return n ? (t = t || 0, 0 === n.indexOf(e.name) && (t += (e.name + e.message).split("\n").length), n.split("\n").slice(t).filter(L).map((function (e) {
- return "\n" + e
- })).join("")) : ""
- }
- var F = ["Unknown", "Constraint", "Data", "TransactionInactive", "ReadOnly", "Version", "NotFound", "InvalidState", "InvalidAccess", "Abort", "Timeout", "QuotaExceeded", "Syntax", "DataClone"],
- K = ["Modify", "Bulk", "OpenFailed", "VersionChange", "Schema", "Upgrade", "InvalidTable", "MissingAPI", "NoSuchDatabase", "InvalidArgument", "SubTransaction", "Unsupported", "Internal", "DatabaseClosed", "PrematureCommit", "ForeignAwait"].concat(F),
- q = {
- VersionChanged: "Database version changed by other database connection",
- DatabaseClosed: "Database has been closed",
- Abort: "Transaction aborted",
- TransactionInactive: "Transaction has already completed or failed"
- };
- function z(e, t) {
- this._e = J(), this.name = e, this.message = t
- }
- function W(e, t, n, r) {
- this._e = J(), this.failures = t, this.failedKeys = r, this.successCount = n
- }
- function G(e, t) {
- this._e = J(), this.name = "BulkError", this.failures = t, this.message = function (e, t) {
- return e + ". Errors: " + t.map((function (e) {
- return e.toString()
- })).filter((function (e, t, n) {
- return n.indexOf(e) === t
- })).join("\n")
- }(e, t)
- }
- f(z).from(Error).extend({
- stack: {
- get: function () {
- return this._stack || (this._stack = this.name + ": " + this.message + B(this._e, 2))
- }
- }, toString: function () {
- return this.name + ": " + this.message
- }
- }), f(W).from(z), f(G).from(z);
- var Y = K.reduce((function (e, t) {
- return e[t] = t + "Error", e
- }), {}), H = z, V = K.reduce((function (e, t) {
- var n = t + "Error";
- function r(e, r) {
- this._e = J(), this.name = n, e ? "string" == typeof e ? (this.message = e, this.inner = r || null) : "object" == typeof e && (this.message = e.name + " " + e.message, this.inner = e) : (this.message = q[t] || n, this.inner = null)
- }
- return f(r).from(H), e[t] = r, e
- }), {});
- V.Syntax = SyntaxError, V.Type = TypeError, V.Range = RangeError;
- var X = F.reduce((function (e, t) {
- return e[t + "Error"] = V[t], e
- }), {});
- var Z = K.reduce((function (e, t) {
- return -1 === ["Syntax", "Type", "Range"].indexOf(t) && (e[t + "Error"] = V[t]), e
- }), {});
- function Q() {
- }
- function ee(e) {
- return e
- }
- function te(e, t) {
- return null == e || e === ee ? t : function (n) {
- return t(e(n))
- }
- }
- function ne(e, t) {
- return function () {
- e.apply(this, arguments), t.apply(this, arguments)
- }
- }
- function re(e, t) {
- return e === Q ? t : function () {
- var n = e.apply(this, arguments);
- void 0 !== n && (arguments[0] = n);
- var r = this.onsuccess, o = this.onerror;
- this.onsuccess = null, this.onerror = null;
- var i = t.apply(this, arguments);
- return r && (this.onsuccess = this.onsuccess ? ne(r, this.onsuccess) : r), o && (this.onerror = this.onerror ? ne(o, this.onerror) : o), void 0 !== i ? i : n
- }
- }
- function oe(e, t) {
- return e === Q ? t : function () {
- e.apply(this, arguments);
- var n = this.onsuccess, r = this.onerror;
- this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? ne(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? ne(r, this.onerror) : r)
- }
- }
- function ie(e, t) {
- return e === Q ? t : function (n) {
- var r = e.apply(this, arguments);
- s(n, r);
- var o = this.onsuccess, i = this.onerror;
- this.onsuccess = null, this.onerror = null;
- var a = t.apply(this, arguments);
- return o && (this.onsuccess = this.onsuccess ? ne(o, this.onsuccess) : o), i && (this.onerror = this.onerror ? ne(i, this.onerror) : i), void 0 === r ? void 0 === a ? void 0 : a : s(r, a)
- }
- }
- function se(e, t) {
- return e === Q ? t : function () {
- return !1 !== t.apply(this, arguments) && e.apply(this, arguments)
- }
- }
- function ae(e, t) {
- return e === Q ? t : function () {
- var n = e.apply(this, arguments);
- if (n && "function" == typeof n.then) {
- for (var r = this, o = arguments.length, i = new Array(o); o--;) i[o] = arguments[o];
- return n.then((function () {
- return t.apply(r, i)
- }))
- }
- return t.apply(this, arguments)
- }
- }
- Z.ModifyError = W, Z.DexieError = z, Z.BulkError = G;
- var ce = {}, le = function () {
- try {
- return [Oe.resolve(), Oe.prototype, Oe.resolve(), Function.constructor]
- } catch (t) {
- var e = i.Promise;
- return e ? [e.resolve(), e.prototype, e.resolve()] : []
- }
- }(), ue = le[0], de = le[1], _e = le[2], fe = de && de.then, he = ue && ue.constructor, pe = le[3],
- be = !!_e, me = !1, ge = _e ? function () {
- _e.then(Be)
- } : i.setImmediate ? setImmediate.bind(null, Be) : i.MutationObserver ? function () {
- var e = document.createElement("div");
- new MutationObserver((function () {
- Be(), e = null
- })).observe(e, {attributes: !0}), e.setAttribute("i", "1")
- } : function () {
- setTimeout(Be, 0)
- }, ve = function (e, t) {
- xe.push([e, t]), we && (ge(), we = !1)
- }, ye = !0, we = !0, Se = [], Ee = [], je = null, ke = ee, Ae = {
- id: "global",
- global: !0,
- ref: 0,
- unhandleds: [],
- onunhandled: dt,
- txRelaxedDurabilityEnabled: !1,
- pgp: !1,
- env: {},
- finalize: function () {
- this.unhandleds.forEach((function (e) {
- try {
- dt(e[0], e[1])
- } catch (e) {
- }
- }))
- }
- }, Te = Ae, xe = [], Pe = 0, Ie = [];
- function Oe(e) {
- if ("object" != typeof this) throw new TypeError("Promises must be constructed via new");
- this._listeners = [], this.onuncatched = Q, this._lib = !1;
- var t = this._PSD = Te;
- if (M && (this._stackHolder = J(), this._prev = null, this._numPrev = 0), "function" != typeof e) {
- if (e !== ce) throw new TypeError("Not a function");
- return this._state = arguments[1], this._value = arguments[2], void (!1 === this._state && De(this, this._value))
- }
- this._state = null, this._value = null, ++t.ref, Ce(this, e)
- }
- var Ue = {
- get: function () {
- var e = Te, t = Xe;
- function n(n, r) {
- var o = this, i = !e.global && (e !== Te || t !== Xe);
- i && tt();
- var s = new Oe((function (t, s) {
- $e(o, new Re(ct(n, e, i), ct(r, e, i), t, s, e))
- }));
- return M && Je(s, this), s
- }
- return n.prototype = ce, n
- }, set: function (e) {
- _(this, "then", e && e.prototype === ce ? Ue : {
- get: function () {
- return e
- }, set: Ue.set
- })
- }
- };
- function Re(e, t, n, r, o) {
- this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.resolve = n, this.reject = r, this.psd = o
- }
- function Ce(e, t) {
- try {
- t((function (t) {
- if (null === e._state) {
- if (t === e) throw new TypeError("A promise cannot be resolved with itself.");
- var n = e._lib && Fe();
- t && "function" == typeof t.then ? Ce(e, (function (e, n) {
- t instanceof Oe ? t._then(e, n) : t.then(e, n)
- })) : (e._state = !0, e._value = t, Me(e)), n && Ke()
- }
- }), De.bind(null, e))
- } catch (t) {
- De(e, t)
- }
- }
- function De(e, t) {
- if (Ee.push(t), null === e._state) {
- var n = e._lib && Fe();
- t = ke(t), e._state = !1, e._value = t, M && null !== t && "object" == typeof t && !t._promise && E((function () {
- var n = p(t, "stack");
- t._promise = e, _(t, "stack", {
- get: function () {
- return me ? n && (n.get ? n.get.apply(t) : n.value) : e.stack
- }
- })
- })), function (e) {
- Se.some((function (t) {
- return t._value === e._value
- })) || Se.push(e)
- }(e), Me(e), n && Ke()
- }
- }
- function Me(e) {
- var t = e._listeners;
- e._listeners = [];
- for (var n = 0, r = t.length; n < r; ++n) $e(e, t[n]);
- var o = e._PSD;
- --o.ref || o.finalize(), 0 === Pe && (++Pe, ve((function () {
- 0 == --Pe && qe()
- }), []))
- }
- function $e(e, t) {
- if (null !== e._state) {
- var n = e._state ? t.onFulfilled : t.onRejected;
- if (null === n) return (e._state ? t.resolve : t.reject)(e._value);
- ++t.psd.ref, ++Pe, ve(Le, [n, e, t])
- } else e._listeners.push(t)
- }
- function Le(e, t, n) {
- try {
- je = t;
- var r, o = t._value;
- t._state ? r = e(o) : (Ee.length && (Ee = []), r = e(o), -1 === Ee.indexOf(o) && function (e) {
- var t = Se.length;
- for (; t;) if (Se[--t]._value === e._value) return void Se.splice(t, 1)
- }(t)), n.resolve(r)
- } catch (e) {
- n.reject(e)
- } finally {
- je = null, 0 == --Pe && qe(), --n.psd.ref || n.psd.finalize()
- }
- }
- function Ne(e, t, n) {
- if (t.length === n) return t;
- var r = "";
- if (!1 === e._state) {
- var o, i, s = e._value;
- null != s ? (o = s.name || "Error", i = s.message || s, r = B(s, 0)) : (o = s, i = ""), t.push(o + (i ? ": " + i : "") + r)
- }
- return M && ((r = B(e._stackHolder, 2)) && -1 === t.indexOf(r) && t.push(r), e._prev && Ne(e._prev, t, n)), t
- }
- function Je(e, t) {
- var n = t ? t._numPrev + 1 : 0;
- n < 100 && (e._prev = t, e._numPrev = n)
- }
- function Be() {
- Fe() && Ke()
- }
- function Fe() {
- var e = ye;
- return ye = !1, we = !1, e
- }
- function Ke() {
- var e, t, n;
- do {
- for (; xe.length > 0;) for (e = xe, xe = [], n = e.length, t = 0; t < n; ++t) {
- var r = e[t];
- r[0].apply(null, r[1])
- }
- } while (xe.length > 0);
- ye = !0, we = !0
- }
- function qe() {
- var e = Se;
- Se = [], e.forEach((function (e) {
- e._PSD.onunhandled.call(null, e._value, e)
- }));
- for (var t = Ie.slice(0), n = t.length; n;) t[--n]()
- }
- function ze(e) {
- return new Oe(ce, !1, e)
- }
- function We(e, t) {
- var n = Te;
- return function () {
- var r = Fe(), o = Te;
- try {
- return it(n, !0), e.apply(this, arguments)
- } catch (e) {
- t && t(e)
- } finally {
- it(o, !1), r && Ke()
- }
- }
- }
- u(Oe.prototype, {
- then: Ue, _then: function (e, t) {
- $e(this, new Re(null, null, e, t, Te))
- }, catch: function (e) {
- if (1 === arguments.length) return this.then(null, e);
- var t = arguments[0], n = arguments[1];
- return "function" == typeof t ? this.then(null, (function (e) {
- return e instanceof t ? n(e) : ze(e)
- })) : this.then(null, (function (e) {
- return e && e.name === t ? n(e) : ze(e)
- }))
- }, finally: function (e) {
- return this.then((function (t) {
- return e(), t
- }), (function (t) {
- return e(), ze(t)
- }))
- }, stack: {
- get: function () {
- if (this._stack) return this._stack;
- try {
- me = !0;
- var e = Ne(this, [], 20).join("\nFrom previous: ");
- return null !== this._state && (this._stack = e), e
- } finally {
- me = !1
- }
- }
- }, timeout: function (e, t) {
- var n = this;
- return e < 1 / 0 ? new Oe((function (r, o) {
- var i = setTimeout((function () {
- return o(new V.Timeout(t))
- }), e);
- n.then(r, o).finally(clearTimeout.bind(null, i))
- })) : this
- }
- }), "undefined" != typeof Symbol && Symbol.toStringTag && _(Oe.prototype, Symbol.toStringTag, "Promise"), Ae.env = st(), u(Oe, {
- all: function () {
- var e = D.apply(null, arguments).map(nt);
- return new Oe((function (t, n) {
- 0 === e.length && t([]);
- var r = e.length;
- e.forEach((function (o, i) {
- return Oe.resolve(o).then((function (n) {
- e[i] = n, --r || t(e)
- }), n)
- }))
- }))
- }, resolve: function (e) {
- if (e instanceof Oe) return e;
- if (e && "function" == typeof e.then) return new Oe((function (t, n) {
- e.then(t, n)
- }));
- var t = new Oe(ce, !0, e);
- return Je(t, je), t
- }, reject: ze, race: function () {
- var e = D.apply(null, arguments).map(nt);
- return new Oe((function (t, n) {
- e.map((function (e) {
- return Oe.resolve(e).then(t, n)
- }))
- }))
- }, PSD: {
- get: function () {
- return Te
- }, set: function (e) {
- return Te = e
- }
- }, newPSD: Qe, usePSD: at, scheduler: {
- get: function () {
- return ve
- }, set: function (e) {
- ve = e
- }
- }, rejectionMapper: {
- get: function () {
- return ke
- }, set: function (e) {
- ke = e
- }
- }, follow: function (e, t) {
- return new Oe((function (n, r) {
- return Qe((function (t, n) {
- var r = Te;
- r.unhandleds = [], r.onunhandled = n, r.finalize = ne((function () {
- var e = this;
- !function (e) {
- function t() {
- e(), Ie.splice(Ie.indexOf(t), 1)
- }
- Ie.push(t), ++Pe, ve((function () {
- 0 == --Pe && qe()
- }), [])
- }((function () {
- 0 === e.unhandleds.length ? t() : n(e.unhandleds[0])
- }))
- }), r.finalize), e()
- }), t, n, r)
- }))
- }
- });
- var Ge = {awaits: 0, echoes: 0, id: 0}, Ye = 0, He = [], Ve = 0, Xe = 0, Ze = 0;
- function Qe(e, t, n, r) {
- var o = Te, i = Object.create(o);
- i.parent = o, i.ref = 0, i.global = !1, i.id = ++Ze;
- var a = Ae.env;
- i.env = be ? {
- Promise: Oe,
- PromiseProp: {value: Oe, configurable: !0, writable: !0},
- all: Oe.all,
- race: Oe.race,
- resolve: Oe.resolve,
- reject: Oe.reject,
- nthen: lt(a.nthen, i),
- gthen: lt(a.gthen, i)
- } : {}, t && s(i, t), ++o.ref, i.finalize = function () {
- --this.parent.ref || this.parent.finalize()
- };
- var c = at(i, e, n, r);
- return 0 === i.ref && i.finalize(), c
- }
- function et() {
- return Ge.id || (Ge.id = ++Ye), ++Ge.awaits, Ge.echoes += 7, Ge.id
- }
- function tt(e) {
- !Ge.awaits || e && e !== Ge.id || (0 == --Ge.awaits && (Ge.id = 0), Ge.echoes = 7 * Ge.awaits)
- }
- function nt(e) {
- return Ge.echoes && e && e.constructor === he ? (et(), e.then((function (e) {
- return tt(), e
- }), (function (e) {
- return tt(), _t(e)
- }))) : e
- }
- function rt(e) {
- ++Xe, Ge.echoes && 0 != --Ge.echoes || (Ge.echoes = Ge.id = 0), He.push(Te), it(e, !0)
- }
- function ot() {
- var e = He[He.length - 1];
- He.pop(), it(e, !1)
- }
- function it(e, t) {
- var n, r = Te;
- if ((t ? !Ge.echoes || Ve++ && e === Te : !Ve || --Ve && e === Te) || (n = t ? rt.bind(null, e) : ot, fe.call(ue, n)), e !== Te && (Te = e, r === Ae && (Ae.env = st()), be)) {
- var o = Ae.env.Promise, s = e.env;
- de.then = s.nthen, o.prototype.then = s.gthen, (r.global || e.global) && (Object.defineProperty(i, "Promise", s.PromiseProp), o.all = s.all, o.race = s.race, o.resolve = s.resolve, o.reject = s.reject)
- }
- }
- function st() {
- var e = i.Promise;
- return be ? {
- Promise: e,
- PromiseProp: Object.getOwnPropertyDescriptor(i, "Promise"),
- all: e.all,
- race: e.race,
- resolve: e.resolve,
- reject: e.reject,
- nthen: de.then,
- gthen: e.prototype.then
- } : {}
- }
- function at(e, t, n, r, o) {
- var i = Te;
- try {
- return it(e, !0), t(n, r, o)
- } finally {
- it(i, !1)
- }
- }
- function ct(e, t, n) {
- return "function" != typeof e ? e : function () {
- var r = Te;
- n && et(), it(t, !0);
- try {
- return e.apply(this, arguments)
- } finally {
- it(r, !1)
- }
- }
- }
- function lt(e, t) {
- return function (n, r) {
- return e.call(this, ct(n, t, !1), ct(r, t, !1))
- }
- }
- var ut = "unhandledrejection";
- function dt(e, t) {
- var n;
- try {
- n = t.onuncatched(e)
- } catch (e) {
- }
- if (!1 !== n) try {
- var r, o = {promise: t, reason: e};
- if (i.document && document.createEvent ? ((r = document.createEvent("Event")).initEvent(ut, !0, !0), s(r, o)) : i.CustomEvent && s(r = new CustomEvent(ut, {detail: o}), o), r && i.dispatchEvent && (dispatchEvent(r), !i.PromiseRejectionEvent && i.onunhandledrejection)) try {
- i.onunhandledrejection(r)
- } catch (e) {
- }
- r.defaultPrevented || console.warn("Unhandled rejection: " + (e.stack || e))
- } catch (e) {
- }
- }
- var _t = Oe.reject;
- function ft(e) {
- var t = {}, n = function (n, r) {
- if (r) {
- for (var o = arguments.length, i = new Array(o - 1); --o;) i[o - 1] = arguments[o];
- return t[n].subscribe.apply(null, i), e
- }
- if ("string" == typeof n) return t[n]
- };
- n.addEventType = a;
- for (var i = 1, s = arguments.length; i < s; ++i) a(arguments[i]);
- return n;
- function a(e, r, o) {
- if ("object" == typeof e) return c(e);
- r || (r = se), o || (o = Q);
- var i = {
- subscribers: [], fire: o, subscribe: function (e) {
- -1 === i.subscribers.indexOf(e) && (i.subscribers.push(e), i.fire = r(i.fire, e))
- }, unsubscribe: function (e) {
- i.subscribers = i.subscribers.filter((function (t) {
- return t !== e
- })), i.fire = i.subscribers.reduce(r, o)
- }
- };
- return t[e] = n[e] = i, i
- }
- function c(e) {
- r(e).forEach((function (t) {
- var n = e[t];
- if (o(n)) a(t, e[t][0], e[t][1]); else {
- if ("asap" !== n) throw new V.InvalidArgument("Invalid event config");
- var r = a(t, ee, (function () {
- for (var e = arguments.length, t = new Array(e); e--;) t[e] = arguments[e];
- r.subscribers.forEach((function (e) {
- y((function () {
- e.apply(null, t)
- }))
- }))
- }))
- }
- }))
- }
- }
- var ht, pt = "{version}", bt = String.fromCharCode(65535), mt = function () {
- try {
- return IDBKeyRange.only([[]]), [[]]
- } catch (e) {
- return bt
- }
- }(), gt = -1 / 0,
- vt = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",
- yt = "String expected.", wt = [],
- St = "undefined" != typeof navigator && /(MSIE|Trident|Edge)/.test(navigator.userAgent), Et = St,
- jt = St, kt = function (e) {
- return !/(dexie\.js|dexie\.min\.js)/.test(e)
- };
- function At(e, t) {
- var n, a, c, d, f, h = At.dependencies,
- p = s({addons: At.addons, autoOpen: !0, indexedDB: h.indexedDB, IDBKeyRange: h.IDBKeyRange}, t),
- b = p.addons, y = p.autoOpen, T = p.indexedDB, P = p.IDBKeyRange, U = this._dbSchema = {}, R = [],
- $ = [], L = {}, N = null, F = null, K = !1, q = null, z = !1, Y = "readonly", H = "readwrite",
- X = this, Z = new Oe((function (e) {
- n = e
- })), ne = new Oe((function (e, t) {
- a = t
- })), se = !0, ce = !!Lt(T);
- function le(e) {
- this._cfg = {
- version: e,
- storesSource: null,
- dbschema: {},
- tables: {},
- contentUpgrade: null
- }, this.stores({})
- }
- function ue(e, t, n) {
- var o = X._createTransaction(H, $, U);
- o.create(t), o._completion.catch(n);
- var i = o._reject.bind(o);
- Qe((function () {
- Te.trans = o, 0 === e ? (r(U).forEach((function (e) {
- de(t, e, U[e].primKey, U[e].indexes)
- })), Oe.follow((function () {
- return X.on.populate.fire(o)
- })).catch(i)) : function (e, t, n) {
- var o = [], i = R.filter((function (t) {
- return t._cfg.version === e
- }))[0];
- if (!i) throw new V.Upgrade("Dexie specification of currently installed DB version is missing");
- U = X._dbSchema = i._cfg.dbschema;
- var s = !1;
- function a() {
- return o.length ? Oe.resolve(o.shift()(t.idbtrans)).then(a) : Oe.resolve()
- }
- return R.filter((function (t) {
- return t._cfg.version > e
- })).forEach((function (e) {
- o.push((function () {
- var r = U, o = e._cfg.dbschema;
- Me(r, n), Me(o, n), U = X._dbSchema = o;
- var i = function (e, t) {
- var n = {del: [], add: [], change: []};
- for (var r in e) t[r] || n.del.push(r);
- for (r in t) {
- var o = e[r], i = t[r];
- if (o) {
- var s = {name: r, def: i, recreate: !1, del: [], add: [], change: []};
- if (o.primKey.src !== i.primKey.src) s.recreate = !0, n.change.push(s); else {
- var a = o.idxByName, c = i.idxByName;
- for (var l in a) c[l] || s.del.push(l);
- for (l in c) {
- var u = a[l], d = c[l];
- u ? u.src !== d.src && s.change.push(d) : s.add.push(d)
- }
- (s.del.length > 0 || s.add.length > 0 || s.change.length > 0) && n.change.push(s)
- }
- } else n.add.push([r, i])
- }
- return n
- }(r, o);
- if (i.add.forEach((function (e) {
- de(n, e[0], e[1].primKey, e[1].indexes)
- })), i.change.forEach((function (e) {
- if (e.recreate) throw new V.Upgrade("Not yet support for changing primary key");
- var t = n.objectStore(e.name);
- e.add.forEach((function (e) {
- _e(t, e)
- })), e.change.forEach((function (e) {
- t.deleteIndex(e.name), _e(t, e)
- })), e.del.forEach((function (e) {
- t.deleteIndex(e)
- }))
- })), e._cfg.contentUpgrade) return s = !0, Oe.follow((function () {
- e._cfg.contentUpgrade(t)
- }))
- })), o.push((function (t) {
- s && Et || function (e, t) {
- for (var n = 0; n < t.db.objectStoreNames.length; ++n) {
- var r = t.db.objectStoreNames[n];
- null == e[r] && t.db.deleteObjectStore(r)
- }
- }(e._cfg.dbschema, t)
- }))
- })), a().then((function () {
- !function (e, t) {
- r(e).forEach((function (n) {
- t.db.objectStoreNames.contains(n) || de(t, n, e[n].primKey, e[n].indexes)
- }))
- }(U, n)
- }))
- }(e, o, t).catch(i)
- }))
- }
- function de(e, t, n, r) {
- var o = e.db.createObjectStore(t, n.keyPath ? {
- keyPath: n.keyPath,
- autoIncrement: n.auto
- } : {autoIncrement: n.auto});
- return r.forEach((function (e) {
- _e(o, e)
- })), o
- }
- function _e(e, t) {
- e.createIndex(t.name, t.keyPath, {unique: t.unique, multiEntry: t.multi})
- }
- function fe(e, t, n) {
- if (z || Te.letThrough) {
- var r = X._createTransaction(e, t, U);
- try {
- r.create()
- } catch (e) {
- return _t(e)
- }
- return r._promise(e, (function (e, t) {
- return Qe((function () {
- return Te.trans = r, n(e, t, r)
- }))
- })).then((function (e) {
- return r._completion.then((function () {
- return e
- }))
- }))
- }
- if (!K) {
- if (!y) return _t(new V.DatabaseClosed);
- X.open().catch(Q)
- }
- return Z.then((function () {
- return fe(e, t, n)
- }))
- }
- function be(e, t, n) {
- var r = arguments.length;
- if (r < 2) throw new V.InvalidArgument("Too few arguments");
- for (var o = new Array(r - 1); --r;) o[r - 1] = arguments[r];
- n = o.pop();
- var i = x(o);
- return [e, i, n]
- }
- function me(e, t, n) {
- this.name = e, this.schema = t, this._tx = n, this.hook = L[e] ? L[e].hook : ft(null, {
- creating: [re, Q],
- reading: [te, ee],
- updating: [ie, Q],
- deleting: [oe, Q]
- })
- }
- function ge(e, t, n) {
- return (n ? Ut : It)((function (n) {
- e.push(n), t && t()
- }))
- }
- function ve(e, t, n, r, o) {
- return new Oe((function (i, s) {
- var a = n.length, c = a - 1;
- if (0 === a) return i();
- if (r) {
- var l, u = Ut(s), d = Pt(null);
- E((function () {
- for (var r = 0; r < a; ++r) {
- l = {onsuccess: null, onerror: null};
- var s = n[r];
- o.call(l, s[0], s[1], t);
- var _ = e.delete(s[0]);
- _._hookCtx = l, _.onerror = u, _.onsuccess = r === c ? Pt(i) : d
- }
- }), (function (e) {
- throw l.onerror && l.onerror(e), e
- }))
- } else for (var _ = 0; _ < a; ++_) {
- var f = e.delete(n[_]);
- f.onerror = It(s), _ === c && (f.onsuccess = We((function () {
- return i()
- })))
- }
- }))
- }
- function ye(e, t, n, r) {
- var o = this;
- this.db = X, this.mode = e, this.storeNames = t, this.idbtrans = null, this.on = ft(this, "complete", "error", "abort"), this.parent = r || null, this.active = !0, this._reculock = 0, this._blockedFuncs = [], this._resolve = null, this._reject = null, this._waitingFor = null, this._waitingQueue = null, this._spinCount = 0, this._completion = new Oe((function (e, t) {
- o._resolve = e, o._reject = t
- })), this._completion.then((function () {
- o.active = !1, o.on.complete.fire()
- }), (function (e) {
- var t = o.active;
- return o.active = !1, o.on.error.fire(e), o.parent ? o.parent._reject(e) : t && o.idbtrans && o.idbtrans.abort(), _t(e)
- }))
- }
- function we(e, t, n) {
- this._ctx = {table: e, index: ":id" === t ? null : t, or: n}
- }
- function Se(e, t) {
- var n = null, r = null;
- if (t) try {
- n = t()
- } catch (e) {
- r = e
- }
- var o = e._ctx, i = o.table;
- this._ctx = {
- table: i,
- index: o.index,
- isPrimKey: !o.index || i.schema.primKey.keyPath && o.index === i.schema.primKey.name,
- range: n,
- keysOnly: !1,
- dir: "next",
- unique: "",
- algorithm: null,
- filter: null,
- replayFilter: null,
- justLimit: !0,
- isMatch: null,
- offset: 0,
- limit: 1 / 0,
- error: r,
- or: o.or,
- valueMapper: i.hook.reading.fire
- }
- }
- function Ee(e, t) {
- return !(e.filter || e.algorithm || e.or) && (t ? e.justLimit : !e.replayFilter)
- }
- function je(e, t) {
- return e._cfg.version - t._cfg.version
- }
- function ke(e, t, n) {
- t.forEach((function (t) {
- var r = n[t];
- e.forEach((function (e) {
- t in e || (e === ye.prototype || e instanceof ye ? _(e, t, {
- get: function () {
- return this.table(t)
- }
- }) : e[t] = new me(t, r))
- }))
- }))
- }
- function Ae(e, t, n, r, o, i) {
- var s = We(i ? function (e, t, r) {
- return n(i(e), t, r)
- } : n, o);
- e.onerror || (e.onerror = It(o)), e.onsuccess = S(t ? function () {
- var n = e.result;
- if (n) {
- var i = function () {
- n.continue()
- };
- t(n, (function (e) {
- i = e
- }), r, o) && s(n.value, n, (function (e) {
- i = e
- })), i()
- } else r()
- } : function () {
- var t = e.result;
- if (t) {
- var n = function () {
- t.continue()
- };
- s(t.value, t, (function (e) {
- n = e
- })), n()
- } else r()
- }, o)
- }
- function xe(e, t) {
- return T.cmp(e, t)
- }
- function Pe(e, t) {
- return xe(e, t) > 0 ? e : t
- }
- function Ie(e, t) {
- return T.cmp(e, t)
- }
- function Ue(e, t) {
- return T.cmp(t, e)
- }
- function Re(e, t) {
- return e < t ? -1 : e === t ? 0 : 1
- }
- function Ce(e, t) {
- return e > t ? -1 : e === t ? 0 : 1
- }
- function De(e, t) {
- return e ? t ? function () {
- return e.apply(this, arguments) && t.apply(this, arguments)
- } : e : t
- }
- function Me(e, t) {
- for (var n = t.db.objectStoreNames, r = 0; r < n.length; ++r) {
- var o = n[r], s = t.objectStore(o);
- c = "getAll" in s;
- for (var a = 0; a < s.indexNames.length; ++a) {
- var l = s.indexNames[a], u = s.index(l).keyPath,
- d = "string" == typeof u ? u : "[" + m(u).join("+") + "]";
- if (e[o]) {
- var _ = e[o].idxByName[d];
- _ && (_.name = l)
- }
- }
- }
- /Safari/.test(navigator.userAgent) && !/(Chrome\/|Edge\/)/.test(navigator.userAgent) && i.WorkerGlobalScope && i instanceof i.WorkerGlobalScope && [].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1] < 604 && (c = !1)
- }
- function $e(e) {
- X.on("blocked").fire(e), wt.filter((function (e) {
- return e.name === X.name && e !== X && !e._vcFired
- })).map((function (t) {
- return t.on("versionchange").fire(e)
- }))
- }
- this.version = function (e) {
- if (N || K) throw new V.Schema("Cannot add version when database is open");
- this.verno = Math.max(this.verno, e);
- var t = R.filter((function (t) {
- return t._cfg.version === e
- }))[0];
- return t || (t = new le(e), R.push(t), R.sort(je), se = !1, t)
- }, s(le.prototype, {
- stores: function (e) {
- this._cfg.storesSource = this._cfg.storesSource ? s(this._cfg.storesSource, e) : e;
- var t = {};
- R.forEach((function (e) {
- s(t, e._cfg.storesSource)
- }));
- var n = this._cfg.dbschema = {};
- return this._parseStoresSpec(t, n), U = X._dbSchema = n, [L, X, ye.prototype].forEach((function (e) {
- for (var t in e) e[t] instanceof me && delete e[t]
- })), ke([L, X, ye.prototype, this._cfg.tables], r(n), n), $ = r(n), this
- }, upgrade: function (e) {
- return this._cfg.contentUpgrade = e, this
- }, _parseStoresSpec: function (e, t) {
- r(e).forEach((function (n) {
- if (null !== e[n]) {
- var r = {}, i = function (e) {
- var t = [];
- return e.split(",").forEach((function (e) {
- var n = (e = e.trim()).replace(/([&*]|\+\+)/g, ""),
- r = /^\[/.test(n) ? n.match(/^\[(.*)\]$/)[1].split("+") : n;
- t.push(new Dt(n, r || null, /\&/.test(e), /\*/.test(e), /\+\+/.test(e), o(r), /\./.test(e)))
- })), t
- }(e[n]), s = i.shift();
- if (s.multi) throw new V.Schema("Primary key cannot be multi-valued");
- s.keyPath && k(r, s.keyPath, s.auto ? 0 : s.keyPath), i.forEach((function (e) {
- if (e.auto) throw new V.Schema("Only primary key can be marked as autoIncrement (++)");
- if (!e.keyPath) throw new V.Schema("Index must have a name and cannot be an empty string");
- k(r, e.keyPath, e.compound ? e.keyPath.map((function () {
- return ""
- })) : "")
- })), t[n] = new Mt(n, s, i, r)
- }
- }))
- }
- }), this._allTables = L, this._createTransaction = function (e, t, n, r) {
- return new ye(e, t, n, r)
- }, this._whenReady = function (e) {
- return z || Te.letThrough ? e() : new Oe((function (e, t) {
- if (!K) {
- if (!y) return void t(new V.DatabaseClosed);
- X.open().catch(Q)
- }
- Z.then(e, t)
- })).then(e)
- }, this.verno = 0, this.open = function () {
- if (K || N) return Z.then((function () {
- return F ? _t(F) : X
- }));
- M && (ne._stackHolder = J()), K = !0, F = null, z = !1;
- var t = n, o = null;
- return Oe.race([ne, new Oe((function (t, n) {
- if (!T) throw new V.MissingAPI("indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.");
- var i = se ? T.open(e) : T.open(e, Math.round(10 * X.verno));
- if (!i) throw new V.MissingAPI("IndexedDB API not available");
- i.onerror = It(n), i.onblocked = We($e), i.onupgradeneeded = We((function (t) {
- if (o = i.transaction, se && !X._allowEmptyDB) {
- i.onerror = Rt, o.abort(), i.result.close();
- var r = T.deleteDatabase(e);
- r.onsuccess = r.onerror = We((function () {
- n(new V.NoSuchDatabase("Database " + e + " doesnt exist"))
- }))
- } else {
- o.onerror = It(n), ue((t.oldVersion > Math.pow(2, 62) ? 0 : t.oldVersion) / 10, o, n)
- }
- }), n), i.onsuccess = We((function () {
- if (o = null, N = i.result, wt.push(X), se) !function () {
- if (X.verno = N.version / 10, X._dbSchema = U = {}, 0 === ($ = m(N.objectStoreNames, 0)).length) return;
- const e = Te.txRelaxedDurabilityEnabled ? {durability: "relaxed"} : {durability: "default"};
- var t = N.transaction($t($), "readonly", e);
- $.forEach((function (e) {
- for (var n = t.objectStore(e), r = n.keyPath, o = r && "string" == typeof r && -1 !== r.indexOf("."), i = new Dt(r, r || "", !1, !1, !!n.autoIncrement, r && "string" != typeof r, o), s = [], a = 0; a < n.indexNames.length; ++a) {
- var c = n.index(n.indexNames[a]);
- o = (r = c.keyPath) && "string" == typeof r && -1 !== r.indexOf(".");
- var l = new Dt(c.name, r, !!c.unique, !!c.multiEntry, !1, r && "string" != typeof r, o);
- s.push(l)
- }
- U[e] = new Mt(e, i, s, {})
- })), ke([L], r(U), U)
- }(); else if (N.objectStoreNames.length > 0) try {
- const e = Te.txRelaxedDurabilityEnabled ? {durability: "relaxed"} : {durability: "default"};
- Me(U, N.transaction($t(N.objectStoreNames), Y, e))
- } catch (e) {
- }
- N.onversionchange = We((function (e) {
- X._vcFired = !0, X.on("versionchange").fire(e)
- })), ce || "__dbnames" === e || ht.dbnames.put({name: e}).catch(Q), t()
- }), n)
- }))]).then((function () {
- return q = [], Oe.resolve(At.vip(X.on.ready.fire)).then((function e() {
- if (q.length > 0) {
- var t = q.reduce(ae, Q);
- return q = [], Oe.resolve(At.vip(t)).then(e)
- }
- }))
- })).finally((function () {
- q = null
- })).then((function () {
- return K = !1, X
- })).catch((function (e) {
- try {
- o && o.abort()
- } catch (e) {
- }
- return K = !1, X.close(), _t(F = e)
- })).finally((function () {
- z = !0, t()
- }))
- }, this.close = function () {
- var e = wt.indexOf(X);
- if (e >= 0 && wt.splice(e, 1), N) {
- try {
- N.close()
- } catch (e) {
- }
- N = null
- }
- y = !1, F = new V.DatabaseClosed, K && a(F), Z = new Oe((function (e) {
- n = e
- })), ne = new Oe((function (e, t) {
- a = t
- }))
- }, this.delete = function () {
- var t = arguments.length > 0;
- return new Oe((function (n, r) {
- if (t) throw new V.InvalidArgument("Arguments not allowed in db.delete()");
- function o() {
- X.close();
- var t = T.deleteDatabase(e);
- t.onsuccess = We((function () {
- ce || ht.dbnames.delete(e).catch(Q), n()
- })), t.onerror = It(r), t.onblocked = $e
- }
- K ? Z.then(o) : o()
- }))
- }, this.backendDB = function () {
- return N
- }, this.isOpen = function () {
- return null !== N
- }, this.hasBeenClosed = function () {
- return F && F instanceof V.DatabaseClosed
- }, this.hasFailed = function () {
- return null !== F
- }, this.dynamicallyOpened = function () {
- return se
- }, this.name = e, u(this, {
- tables: {
- get: function () {
- return r(L).map((function (e) {
- return L[e]
- }))
- }
- }
- }), this.on = ft(this, "populate", "blocked", "versionchange", {ready: [ae, Q]}), this.on.ready.subscribe = g(this.on.ready.subscribe, (function (e) {
- return function (t, n) {
- At.vip((function () {
- z ? (F || Oe.resolve().then(t), n && e(t)) : q ? (q.push(t), n && e(t)) : (e(t), n || e((function e() {
- X.on.ready.unsubscribe(t), X.on.ready.unsubscribe(e)
- })))
- }))
- }
- })), this.transaction = function () {
- var e = be.apply(this, arguments);
- return this._transaction.apply(this, e)
- }, this._transaction = function (e, t, n) {
- var r = Te.trans;
- r && r.db === X && -1 === e.indexOf("!") || (r = null);
- var o = -1 !== e.indexOf("?");
- e = e.replace("!", "").replace("?", "");
- try {
- var i = t.map((function (e) {
- var t = e instanceof me ? e.name : e;
- if ("string" != typeof t) throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
- return t
- }));
- if ("r" == e || e == Y) e = Y; else {
- if ("rw" != e && e != H) throw new V.InvalidArgument("Invalid transaction mode: " + e);
- e = H
- }
- if (r) {
- if (r.mode === Y && e === H) {
- if (!o) throw new V.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");
- r = null
- }
- r && i.forEach((function (e) {
- if (r && -1 === r.storeNames.indexOf(e)) {
- if (!o) throw new V.SubTransaction("Table " + e + " not included in parent transaction.");
- r = null
- }
- })), o && r && !r.active && (r = null)
- }
- } catch (e) {
- return r ? r._promise(null, (function (t, n) {
- n(e)
- })) : _t(e)
- }
- return r ? r._promise(e, s, "lock") : Te.trans ? at(Te.transless, (function () {
- return X._whenReady(s)
- })) : X._whenReady(s);
- function s() {
- return Oe.resolve().then((function () {
- var t, o = Te.transless || Te, s = X._createTransaction(e, i, U, r),
- a = {trans: s, transless: o};
- r ? s.idbtrans = r.idbtrans : s.create(), n.constructor === pe && et();
- var c = Oe.follow((function () {
- if (t = n.call(s, s)) if (t.constructor === he) {
- var e = tt.bind(null, null);
- t.then(e, e)
- } else "function" == typeof t.next && "function" == typeof t.throw && (t = Ct(t))
- }), a);
- return (t && "function" == typeof t.then ? Oe.resolve(t).then((function (e) {
- return s.active ? e : _t(new V.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))
- })) : c.then((function () {
- return t
- }))).then((function (e) {
- return r && s._resolve(), s._completion.then((function () {
- return e
- }))
- })).catch((function (e) {
- return s._reject(e), _t(e)
- }))
- }))
- }
- }, this.table = function (e) {
- if (!l(L, e)) throw new V.InvalidTable("Table " + e + " does not exist");
- return L[e]
- }, u(me.prototype, {
- _trans: function (e, t, n) {
- var r = this._tx || Te.trans;
- return r && r.db === X ? r === Te.trans ? r._promise(e, t, n) : Qe((function () {
- return r._promise(e, t, n)
- }), {trans: r, transless: Te.transless || Te}) : fe(e, [this.name], t)
- }, _idbstore: function (e, t, n) {
- var r = this.name;
- return this._trans(e, (function (e, n, o) {
- if (-1 === o.storeNames.indexOf(r)) throw new V.NotFound("Table" + r + " not part of transaction");
- return t(e, n, o.idbtrans.objectStore(r), o)
- }), n)
- }, get: function (e, t) {
- if (e && e.constructor === Object) return this.where(e).first(t);
- var n = this;
- return this._idbstore(Y, (function (t, r, o) {
- var i = o.get(e);
- i.onerror = It(r), i.onsuccess = We((function () {
- t(n.hook.reading.fire(i.result))
- }), r)
- })).then(t)
- }, where: function (e) {
- if ("string" == typeof e) return new we(this, e);
- if (o(e)) return new we(this, "[" + e.join("+") + "]");
- var t = r(e);
- if (1 === t.length) return this.where(t[0]).equals(e[t[0]]);
- var n = this.schema.indexes.concat(this.schema.primKey).filter((function (e) {
- return e.compound && t.every((function (t) {
- return e.keyPath.indexOf(t) >= 0
- })) && e.keyPath.every((function (e) {
- return t.indexOf(e) >= 0
- }))
- }))[0];
- if (n && mt !== bt) return this.where(n.name).equals(n.keyPath.map((function (t) {
- return e[t]
- })));
- n || console.warn("The query " + JSON.stringify(e) + " on " + this.name + " would benefit of a compound index [" + t.join("+") + "]");
- var i = this.schema.idxByName, s = t.reduce((function (t, n) {
- return [t[0] || i[n], t[0] || !i[n] ? De(t[1], (function (t) {
- return "" + j(t, n) == "" + e[n]
- })) : t[1]]
- }), [null, null]), a = s[0];
- return a ? this.where(a.name).equals(e[a.keyPath]).filter(s[1]) : n ? this.filter(s[1]) : this.where(t).equals("")
- }, count: function (e) {
- return this.toCollection().count(e)
- }, offset: function (e) {
- return this.toCollection().offset(e)
- }, limit: function (e) {
- return this.toCollection().limit(e)
- }, reverse: function () {
- return this.toCollection().reverse()
- }, filter: function (e) {
- return this.toCollection().and(e)
- }, each: function (e) {
- return this.toCollection().each(e)
- }, toArray: function (e) {
- return this.toCollection().toArray(e)
- }, orderBy: function (e) {
- return new Se(new we(this, o(e) ? "[" + e.join("+") + "]" : e))
- }, toCollection: function () {
- return new Se(new we(this))
- }, mapToClass: function (e, t) {
- this.schema.mappedClass = e;
- var n = Object.create(e.prototype);
- t && xt(n, t), this.schema.instanceTemplate = n;
- var r = function (t) {
- if (!t) return t;
- var n = Object.create(e.prototype);
- for (var r in t) if (l(t, r)) try {
- n[r] = t[r]
- } catch (e) {
- }
- return n
- };
- return this.schema.readHook && this.hook.reading.unsubscribe(this.schema.readHook), this.schema.readHook = r, this.hook("reading", r), e
- }, defineClass: function (e) {
- return this.mapToClass(At.defineClass(e), e)
- }, bulkDelete: function (e) {
- return this.hook.deleting.fire === Q ? this._idbstore(H, (function (t, n, r, o) {
- t(ve(r, o, e, !1, Q))
- })) : this.where(":id").anyOf(e).delete().then((function () {
- }))
- }, bulkPut: function (e, t) {
- var n = this;
- return this._idbstore(H, (function (r, o, i) {
- if (!i.keyPath && !n.schema.primKey.auto && !t) throw new V.InvalidArgument("bulkPut() with non-inbound keys requires keys array in second argument");
- if (i.keyPath && t) throw new V.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
- if (t && t.length !== e.length) throw new V.InvalidArgument("Arguments objects and keys must have the same length");
- if (0 === e.length) return r();
- var s, a, c = function (e) {
- 0 === l.length ? r(e) : o(new G(n.name + ".bulkPut(): " + l.length + " of " + u + " operations failed", l))
- }, l = [], u = e.length, d = n;
- if (n.hook.creating.fire === Q && n.hook.updating.fire === Q) {
- a = ge(l);
- for (var _ = 0, f = e.length; _ < f; ++_) (s = t ? i.put(e[_], t[_]) : i.put(e[_])).onerror = a;
- s.onerror = ge(l, c), s.onsuccess = Ot(c)
- } else {
- var h = t || i.keyPath && e.map((function (e) {
- return j(e, i.keyPath)
- })), p = h && w(h, (function (t, n) {
- return null != t && [t, e[n]]
- }));
- (h ? d.where(":id").anyOf(h.filter((function (e) {
- return null != e
- }))).modify((function () {
- this.value = p[this.primKey], p[this.primKey] = null
- })).catch(W, (function (e) {
- l = e.failures
- })).then((function () {
- for (var n = [], r = t && [], o = h.length - 1; o >= 0; --o) {
- var i = h[o];
- (null == i || p[i]) && (n.push(e[o]), t && r.push(i), null != i && (p[i] = null))
- }
- return n.reverse(), t && r.reverse(), d.bulkAdd(n, r)
- })).then((function (e) {
- var t = h[h.length - 1];
- return null != t ? t : e
- })) : d.bulkAdd(e)).then(c).catch(G, (function (e) {
- l = l.concat(e.failures), c()
- })).catch(o)
- }
- }), "locked")
- }, bulkAdd: function (e, t) {
- var n = this, r = this.hook.creating.fire;
- return this._idbstore(H, (function (o, i, s, a) {
- if (!s.keyPath && !n.schema.primKey.auto && !t) throw new V.InvalidArgument("bulkAdd() with non-inbound keys requires keys array in second argument");
- if (s.keyPath && t) throw new V.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
- if (t && t.length !== e.length) throw new V.InvalidArgument("Arguments objects and keys must have the same length");
- if (0 === e.length) return o();
- function c(e) {
- 0 === _.length ? o(e) : i(new G(n.name + ".bulkAdd(): " + _.length + " of " + f + " operations failed", _))
- }
- var l, u, d, _ = [], f = e.length;
- if (r !== Q) {
- var h, p = s.keyPath;
- u = ge(_, null, !0), d = Pt(null), E((function () {
- for (var n = 0, o = e.length; n < o; ++n) {
- h = {onerror: null, onsuccess: null};
- var i = t && t[n], c = e[n], _ = t ? i : p ? j(c, p) : void 0,
- f = r.call(h, _, c, a);
- null == _ && null != f && (p ? k(c = I(c), p, f) : i = f), (l = null != i ? s.add(c, i) : s.add(c))._hookCtx = h, n < o - 1 && (l.onerror = u, h.onsuccess && (l.onsuccess = d))
- }
- }), (function (e) {
- throw h.onerror && h.onerror(e), e
- })), l.onerror = ge(_, c, !0), l.onsuccess = Pt(c)
- } else {
- u = ge(_);
- for (var b = 0, m = e.length; b < m; ++b) (l = t ? s.add(e[b], t[b]) : s.add(e[b])).onerror = u;
- l.onerror = ge(_, c), l.onsuccess = Ot(c)
- }
- }))
- }, add: function (e, t) {
- var n = this.hook.creating.fire;
- return this._idbstore(H, (function (r, o, i, s) {
- var a = {onsuccess: null, onerror: null};
- if (n !== Q) {
- var c = null != t ? t : i.keyPath ? j(e, i.keyPath) : void 0, l = n.call(a, c, e, s);
- null == c && null != l && (i.keyPath ? k(e, i.keyPath, l) : t = l)
- }
- try {
- var u = null != t ? i.add(e, t) : i.add(e);
- u._hookCtx = a, u.onerror = Ut(o), u.onsuccess = Pt((function (t) {
- var n = i.keyPath;
- n && k(e, n, t), r(t)
- }))
- } catch (e) {
- throw a.onerror && a.onerror(e), e
- }
- }))
- }, put: function (e, t) {
- var n = this, r = this.hook.creating.fire, o = this.hook.updating.fire;
- if (r !== Q || o !== Q) {
- var i = this.schema.primKey.keyPath, s = void 0 !== t ? t : i && j(e, i);
- return null == s ? this.add(e) : (e = I(e), this._trans(H, (function () {
- return n.where(":id").equals(s).modify((function () {
- this.value = e
- })).then((function (r) {
- return 0 === r ? n.add(e, t) : s
- }))
- }), "locked"))
- }
- return this._idbstore(H, (function (n, r, o) {
- var i = void 0 !== t ? o.put(e, t) : o.put(e);
- i.onerror = It(r), i.onsuccess = We((function (t) {
- var r = o.keyPath;
- r && k(e, r, t.target.result), n(i.result)
- }))
- }))
- }, delete: function (e) {
- return this.hook.deleting.subscribers.length ? this.where(":id").equals(e).delete() : this._idbstore(H, (function (t, n, r) {
- var o = r.delete(e);
- o.onerror = It(n), o.onsuccess = We((function () {
- t(o.result)
- }))
- }))
- }, clear: function () {
- return this.hook.deleting.subscribers.length ? this.toCollection().delete() : this._idbstore(H, (function (e, t, n) {
- var r = n.clear();
- r.onerror = It(t), r.onsuccess = We((function () {
- e(r.result)
- }))
- }))
- }, update: function (e, t) {
- if ("object" != typeof t || o(t)) throw new V.InvalidArgument("Modifications must be an object.");
- if ("object" != typeof e || o(e)) return this.where(":id").equals(e).modify(t);
- r(t).forEach((function (n) {
- k(e, n, t[n])
- }));
- var n = j(e, this.schema.primKey.keyPath);
- return void 0 === n ? _t(new V.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(n).modify(t)
- }
- }), u(ye.prototype, {
- _lock: function () {
- return v(!Te.global), ++this._reculock, 1 !== this._reculock || Te.global || (Te.lockOwnerFor = this), this
- }, _unlock: function () {
- if (v(!Te.global), 0 == --this._reculock) for (Te.global || (Te.lockOwnerFor = null); this._blockedFuncs.length > 0 && !this._locked();) {
- var e = this._blockedFuncs.shift();
- try {
- at(e[1], e[0])
- } catch (e) {
- }
- }
- return this
- }, _locked: function () {
- return this._reculock && Te.lockOwnerFor !== this
- }, create: function (e) {
- var t = this;
- if (!this.mode) return this;
- if (v(!this.idbtrans), !e && !N) switch (F && F.name) {
- case"DatabaseClosedError":
- throw new V.DatabaseClosed(F);
- case"MissingAPIError":
- throw new V.MissingAPI(F.message, F);
- default:
- throw new V.OpenFailed(F)
- }
- if (!this.active) throw new V.TransactionInactive;
- v(null === this._completion._state);
- const n = Te.txRelaxedDurabilityEnabled ? {durability: "relaxed"} : {durability: "default"};
- return (e = this.idbtrans = e || N.transaction($t(this.storeNames), this.mode, n)).onerror = We((function (n) {
- Rt(n), t._reject(e.error)
- })), e.onabort = We((function (n) {
- Rt(n), t.active && t._reject(new V.Abort(e.error)), t.active = !1, t.on("abort").fire(n)
- })), e.oncomplete = We((function () {
- t.active = !1, t._resolve()
- })), this
- }, _promise: function (e, t, n) {
- var r = this;
- if (e === H && this.mode !== H) return _t(new V.ReadOnly("Transaction is readonly"));
- if (!this.active) return _t(new V.TransactionInactive);
- if (this._locked()) return new Oe((function (o, i) {
- r._blockedFuncs.push([function () {
- r._promise(e, t, n).then(o, i)
- }, Te])
- }));
- if (n) return Qe((function () {
- var e = new Oe((function (e, n) {
- r._lock();
- var o = t(e, n, r);
- o && o.then && o.then(e, n)
- }));
- return e.finally((function () {
- return r._unlock()
- })), e._lib = !0, e
- }));
- var o = new Oe((function (e, n) {
- var o = t(e, n, r);
- o && o.then && o.then(e, n)
- }));
- return o._lib = !0, o
- }, _root: function () {
- return this.parent ? this.parent._root() : this
- }, waitFor: function (e) {
- var t = this._root();
- if (e = Oe.resolve(e), t._waitingFor) t._waitingFor = t._waitingFor.then((function () {
- return e
- })); else {
- t._waitingFor = e, t._waitingQueue = [];
- var n = t.idbtrans.objectStore(t.storeNames[0]);
- !function e() {
- for (++t._spinCount; t._waitingQueue.length;) t._waitingQueue.shift()();
- t._waitingFor && (n.get(-1 / 0).onsuccess = e)
- }()
- }
- var r = t._waitingFor;
- return new Oe((function (n, o) {
- e.then((function (e) {
- return t._waitingQueue.push(We(n.bind(null, e)))
- }), (function (e) {
- return t._waitingQueue.push(We(o.bind(null, e)))
- })).finally((function () {
- t._waitingFor === r && (t._waitingFor = null)
- }))
- }))
- }, abort: function () {
- this.active && this._reject(new V.Abort), this.active = !1
- }, tables: {
- get: (d = "Transaction.tables", f = function () {
- return L
- }, function () {
- return console.warn(d + " is deprecated. See https://github.com/dfahlander/Dexie.js/wiki/Deprecations. " + B(J(), 1)), f.apply(this, arguments)
- })
- }, table: function (e) {
- return new me(e, X.table(e).schema, this)
- }
- }), u(we.prototype, (function () {
- function e(e, t, n) {
- var r = e instanceof we ? new Se(e) : e;
- return r._ctx.error = n ? new n(t) : new TypeError(t), r
- }
- function t(e) {
- return new Se(e, (function () {
- return P.only("")
- })).limit(0)
- }
- function n(e, t, n, r, o, i) {
- for (var s = Math.min(e.length, r.length), a = -1, c = 0; c < s; ++c) {
- var l = t[c];
- if (l !== r[c]) return o(e[c], n[c]) < 0 ? e.substr(0, c) + n[c] + n.substr(c + 1) : o(e[c], r[c]) < 0 ? e.substr(0, c) + r[c] + n.substr(c + 1) : a >= 0 ? e.substr(0, a) + t[a] + n.substr(a + 1) : null;
- o(e[c], l) < 0 && (a = c)
- }
- return s < r.length && "next" === i ? e + n.substr(e.length) : s < e.length && "prev" === i ? e.substr(0, n.length) : a < 0 ? null : e.substr(0, a) + r[a] + n.substr(a + 1)
- }
- function r(t, r, o, i) {
- var s, a, c, l, u, d, _, f = o.length;
- if (!o.every((function (e) {
- return "string" == typeof e
- }))) return e(t, yt);
- function h(e) {
- s = function (e) {
- return "next" === e ? function (e) {
- return e.toUpperCase()
- } : function (e) {
- return e.toLowerCase()
- }
- }(e), a = function (e) {
- return "next" === e ? function (e) {
- return e.toLowerCase()
- } : function (e) {
- return e.toUpperCase()
- }
- }(e), c = "next" === e ? Re : Ce;
- var t = o.map((function (e) {
- return {lower: a(e), upper: s(e)}
- })).sort((function (e, t) {
- return c(e.lower, t.lower)
- }));
- l = t.map((function (e) {
- return e.upper
- })), u = t.map((function (e) {
- return e.lower
- })), d = e, _ = "next" === e ? "" : i
- }
- h("next");
- var p = new Se(t, (function () {
- return P.bound(l[0], u[f - 1] + i)
- }));
- p._ondirectionchange = function (e) {
- h(e)
- };
- var b = 0;
- return p._addAlgorithm((function (e, t, o) {
- var i = e.key;
- if ("string" != typeof i) return !1;
- var s = a(i);
- if (r(s, u, b)) return !0;
- for (var h = null, p = b; p < f; ++p) {
- var m = n(i, s, l[p], u[p], c, d);
- null === m && null === h ? b = p + 1 : (null === h || c(h, m) > 0) && (h = m)
- }
- return t(null !== h ? function () {
- e.continue(h + _)
- } : o), !1
- })), p
- }
- return {
- between: function (n, r, o, i) {
- o = !1 !== o, i = !0 === i;
- try {
- return xe(n, r) > 0 || 0 === xe(n, r) && (o || i) && (!o || !i) ? t(this) : new Se(this, (function () {
- return P.bound(n, r, !o, !i)
- }))
- } catch (t) {
- return e(this, vt)
- }
- }, equals: function (e) {
- return new Se(this, (function () {
- return P.only(e)
- }))
- }, above: function (e) {
- return new Se(this, (function () {
- return P.lowerBound(e, !0)
- }))
- }, aboveOrEqual: function (e) {
- return new Se(this, (function () {
- return P.lowerBound(e)
- }))
- }, below: function (e) {
- return new Se(this, (function () {
- return P.upperBound(e, !0)
- }))
- }, belowOrEqual: function (e) {
- return new Se(this, (function () {
- return P.upperBound(e)
- }))
- }, startsWith: function (t) {
- return "string" != typeof t ? e(this, yt) : this.between(t, t + bt, !0, !0)
- }, startsWithIgnoreCase: function (e) {
- return "" === e ? this.startsWith(e) : r(this, (function (e, t) {
- return 0 === e.indexOf(t[0])
- }), [e], bt)
- }, equalsIgnoreCase: function (e) {
- return r(this, (function (e, t) {
- return e === t[0]
- }), [e], "")
- }, anyOfIgnoreCase: function () {
- var e = D.apply(C, arguments);
- return 0 === e.length ? t(this) : r(this, (function (e, t) {
- return -1 !== t.indexOf(e)
- }), e, "")
- }, startsWithAnyOfIgnoreCase: function () {
- var e = D.apply(C, arguments);
- return 0 === e.length ? t(this) : r(this, (function (e, t) {
- return t.some((function (t) {
- return 0 === e.indexOf(t)
- }))
- }), e, bt)
- }, anyOf: function () {
- var n = D.apply(C, arguments), r = Ie;
- try {
- n.sort(r)
- } catch (t) {
- return e(this, vt)
- }
- if (0 === n.length) return t(this);
- var o = new Se(this, (function () {
- return P.bound(n[0], n[n.length - 1])
- }));
- o._ondirectionchange = function (e) {
- r = "next" === e ? Ie : Ue, n.sort(r)
- };
- var i = 0;
- return o._addAlgorithm((function (e, t, o) {
- for (var s = e.key; r(s, n[i]) > 0;) if (++i === n.length) return t(o), !1;
- return 0 === r(s, n[i]) || (t((function () {
- e.continue(n[i])
- })), !1)
- })), o
- }, notEqual: function (e) {
- return this.inAnyRange([[gt, e], [e, mt]], {includeLowers: !1, includeUppers: !1})
- }, noneOf: function () {
- var t = D.apply(C, arguments);
- if (0 === t.length) return new Se(this);
- try {
- t.sort(Ie)
- } catch (t) {
- return e(this, vt)
- }
- var n = t.reduce((function (e, t) {
- return e ? e.concat([[e[e.length - 1][1], t]]) : [[gt, t]]
- }), null);
- return n.push([t[t.length - 1], mt]), this.inAnyRange(n, {
- includeLowers: !1,
- includeUppers: !1
- })
- }, inAnyRange: function (n, r) {
- if (0 === n.length) return t(this);
- if (!n.every((function (e) {
- return void 0 !== e[0] && void 0 !== e[1] && Ie(e[0], e[1]) <= 0
- }))) return e(this, "First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower", V.InvalidArgument);
- var o = !r || !1 !== r.includeLowers, i = r && !0 === r.includeUppers;
- var s, a = Ie;
- function c(e, t) {
- return a(e[0], t[0])
- }
- try {
- (s = n.reduce((function (e, t) {
- for (var n = 0, r = e.length; n < r; ++n) {
- var o = e[n];
- if (xe(t[0], o[1]) < 0 && xe(t[1], o[0]) > 0) {
- o[0] = xe(i = o[0], s = t[0]) < 0 ? i : s, o[1] = Pe(o[1], t[1]);
- break
- }
- }
- var i, s;
- return n === r && e.push(t), e
- }), [])).sort(c)
- } catch (t) {
- return e(this, vt)
- }
- var l = 0, u = i ? function (e) {
- return Ie(e, s[l][1]) > 0
- } : function (e) {
- return Ie(e, s[l][1]) >= 0
- }, d = o ? function (e) {
- return Ue(e, s[l][0]) > 0
- } : function (e) {
- return Ue(e, s[l][0]) >= 0
- };
- var _ = u, f = new Se(this, (function () {
- return P.bound(s[0][0], s[s.length - 1][1], !o, !i)
- }));
- return f._ondirectionchange = function (e) {
- "next" === e ? (_ = u, a = Ie) : (_ = d, a = Ue), s.sort(c)
- }, f._addAlgorithm((function (e, t, n) {
- for (var r = e.key; _(r);) if (++l === s.length) return t(n), !1;
- return !!function (e) {
- return !u(e) && !d(e)
- }(r) || (0 === xe(r, s[l][1]) || 0 === xe(r, s[l][0]) || t((function () {
- a === Ie ? e.continue(s[l][0]) : e.continue(s[l][1])
- })), !1)
- })), f
- }, startsWithAnyOf: function () {
- var n = D.apply(C, arguments);
- return n.every((function (e) {
- return "string" == typeof e
- })) ? 0 === n.length ? t(this) : this.inAnyRange(n.map((function (e) {
- return [e, e + bt]
- }))) : e(this, "startsWithAnyOf() only works with strings")
- }
- }
- })), u(Se.prototype, (function () {
- function e(e, t) {
- e.filter = De(e.filter, t)
- }
- function t(e, t, n) {
- var r = e.replayFilter;
- e.replayFilter = r ? function () {
- return De(r(), t())
- } : t, e.justLimit = n && !r
- }
- function n(e, t) {
- if (e.isPrimKey) return t;
- var n = e.table.schema.idxByName[e.index];
- if (!n) throw new V.Schema("KeyPath " + e.index + " on object store " + t.name + " is not indexed");
- return t.index(n.name)
- }
- function o(e, t) {
- var r = n(e, t);
- return e.keysOnly && "openKeyCursor" in r ? r.openKeyCursor(e.range || null, e.dir + e.unique) : r.openCursor(e.range || null, e.dir + e.unique)
- }
- function i(e, t, n, r, i) {
- var s = e.replayFilter ? De(e.filter, e.replayFilter()) : e.filter;
- e.or ? function () {
- var a = {}, c = 0;
- function u() {
- 2 == ++c && n()
- }
- function d(e, n, o) {
- if (!s || s(n, o, u, r)) {
- var i = n.primaryKey, c = "" + i;
- "[object ArrayBuffer]" === c && (c = "" + new Uint8Array(i)), l(a, c) || (a[c] = !0, t(e, n, o))
- }
- }
- e.or._iterate(d, u, r, i), Ae(o(e, i), e.algorithm, d, u, r, !e.keysOnly && e.valueMapper)
- }() : Ae(o(e, i), De(e.algorithm, s), t, n, r, !e.keysOnly && e.valueMapper)
- }
- return {
- _read: function (e, t) {
- var n = this._ctx;
- return n.error ? n.table._trans(null, _t.bind(null, n.error)) : n.table._idbstore(Y, e).then(t)
- }, _write: function (e) {
- var t = this._ctx;
- return t.error ? t.table._trans(null, _t.bind(null, t.error)) : t.table._idbstore(H, e, "locked")
- }, _addAlgorithm: function (e) {
- var t = this._ctx;
- t.algorithm = De(t.algorithm, e)
- }, _iterate: function (e, t, n, r) {
- return i(this._ctx, e, t, n, r)
- }, clone: function (e) {
- var t = Object.create(this.constructor.prototype), n = Object.create(this._ctx);
- return e && s(n, e), t._ctx = n, t
- }, raw: function () {
- return this._ctx.valueMapper = null, this
- }, each: function (e) {
- var t = this._ctx;
- return this._read((function (n, r, o) {
- i(t, e, n, r, o)
- }))
- }, count: function (e) {
- var t = this._ctx;
- if (Ee(t, !0)) return this._read((function (e, r, o) {
- var i = n(t, o), s = t.range ? i.count(t.range) : i.count();
- s.onerror = It(r), s.onsuccess = function (n) {
- e(Math.min(n.target.result, t.limit))
- }
- }), e);
- var r = 0;
- return this._read((function (e, n, o) {
- i(t, (function () {
- return ++r, !1
- }), (function () {
- e(r)
- }), n, o)
- }), e)
- }, sortBy: function (e, t) {
- var n = e.split(".").reverse(), r = n[0], o = n.length - 1;
- function i(e, t) {
- return t ? i(e[n[t]], t - 1) : e[r]
- }
- var s = "next" === this._ctx.dir ? 1 : -1;
- function a(e, t) {
- var n = i(e, o), r = i(t, o);
- return n < r ? -s : n > r ? s : 0
- }
- return this.toArray((function (e) {
- return e.sort(a)
- })).then(t)
- }, toArray: function (e) {
- var t = this._ctx;
- return this._read((function (e, r, o) {
- if (c && "next" === t.dir && Ee(t, !0) && t.limit > 0) {
- var s = t.table.hook.reading.fire, a = n(t, o),
- l = t.limit < 1 / 0 ? a.getAll(t.range, t.limit) : a.getAll(t.range);
- l.onerror = It(r), l.onsuccess = Ot(s === ee ? e : function (t) {
- try {
- e(t.map(s))
- } catch (e) {
- r(e)
- }
- })
- } else {
- var u = [];
- i(t, (function (e) {
- u.push(e)
- }), (function () {
- e(u)
- }), r, o)
- }
- }), e)
- }, offset: function (e) {
- var n = this._ctx;
- return e <= 0 || (n.offset += e, Ee(n) ? t(n, (function () {
- var t = e;
- return function (e, n) {
- return 0 === t || (1 === t ? (--t, !1) : (n((function () {
- e.advance(t), t = 0
- })), !1))
- }
- })) : t(n, (function () {
- var t = e;
- return function () {
- return --t < 0
- }
- }))), this
- }, limit: function (e) {
- return this._ctx.limit = Math.min(this._ctx.limit, e), t(this._ctx, (function () {
- var t = e;
- return function (e, n, r) {
- return --t <= 0 && n(r), t >= 0
- }
- }), !0), this
- }, until: function (t, n) {
- return e(this._ctx, (function (e, r, o) {
- return !t(e.value) || (r(o), n)
- })), this
- }, first: function (e) {
- return this.limit(1).toArray((function (e) {
- return e[0]
- })).then(e)
- }, last: function (e) {
- return this.reverse().first(e)
- }, filter: function (t) {
- return e(this._ctx, (function (e) {
- return t(e.value)
- })), function (e, t) {
- e.isMatch = De(e.isMatch, t)
- }(this._ctx, t), this
- }, and: function (e) {
- return this.filter(e)
- }, or: function (e) {
- return new we(this._ctx.table, e, this)
- }, reverse: function () {
- return this._ctx.dir = "prev" === this._ctx.dir ? "next" : "prev", this._ondirectionchange && this._ondirectionchange(this._ctx.dir), this
- }, desc: function () {
- return this.reverse()
- }, eachKey: function (e) {
- var t = this._ctx;
- return t.keysOnly = !t.isMatch, this.each((function (t, n) {
- e(n.key, n)
- }))
- }, eachUniqueKey: function (e) {
- return this._ctx.unique = "unique", this.eachKey(e)
- }, eachPrimaryKey: function (e) {
- var t = this._ctx;
- return t.keysOnly = !t.isMatch, this.each((function (t, n) {
- e(n.primaryKey, n)
- }))
- }, keys: function (e) {
- var t = this._ctx;
- t.keysOnly = !t.isMatch;
- var n = [];
- return this.each((function (e, t) {
- n.push(t.key)
- })).then((function () {
- return n
- })).then(e)
- }, primaryKeys: function (e) {
- var t = this._ctx;
- if (c && "next" === t.dir && Ee(t, !0) && t.limit > 0) return this._read((function (e, r, o) {
- var i = n(t, o),
- s = t.limit < 1 / 0 ? i.getAllKeys(t.range, t.limit) : i.getAllKeys(t.range);
- s.onerror = It(r), s.onsuccess = Ot(e)
- })).then(e);
- t.keysOnly = !t.isMatch;
- var r = [];
- return this.each((function (e, t) {
- r.push(t.primaryKey)
- })).then((function () {
- return r
- })).then(e)
- }, uniqueKeys: function (e) {
- return this._ctx.unique = "unique", this.keys(e)
- }, firstKey: function (e) {
- return this.limit(1).keys((function (e) {
- return e[0]
- })).then(e)
- }, lastKey: function (e) {
- return this.reverse().firstKey(e)
- }, distinct: function () {
- var t = this._ctx, n = t.index && t.table.schema.idxByName[t.index];
- if (!n || !n.multi) return this;
- var r = {};
- return e(this._ctx, (function (e) {
- var t = e.primaryKey.toString(), n = l(r, t);
- return r[t] = !0, !n
- })), this
- }, modify: function (e) {
- var t = this, n = this._ctx.table.hook, o = n.updating.fire, i = n.deleting.fire;
- return this._write((function (n, a, c, u) {
- var d;
- if ("function" == typeof e) d = o === Q && i === Q ? e : function (t) {
- var n = I(t);
- if (!1 === e.call(this, t, this)) return !1;
- if (l(this, "value")) {
- var s = O(n, this.value), a = o.call(this, s, this.primKey, n, u);
- a && (t = this.value, r(a).forEach((function (e) {
- k(t, e, a[e])
- })))
- } else i.call(this, this.primKey, t, u)
- }; else if (o === Q) {
- var _ = r(e), f = _.length;
- d = function (t) {
- for (var n = !1, r = 0; r < f; ++r) {
- var o = _[r], i = e[o];
- j(t, o) !== i && (k(t, o, i), n = !0)
- }
- return n
- }
- } else {
- var h = e;
- e = A(h), d = function (t) {
- var n = !1, i = o.call(this, e, this.primKey, I(t), u);
- return i && s(e, i), r(e).forEach((function (r) {
- var o = e[r];
- j(t, r) !== o && (k(t, r, o), n = !0)
- })), i && (e = A(h)), n
- }
- }
- var p = 0, b = 0, m = !1, g = [], v = [], y = null;
- function w(e) {
- return e && (g.push(e), v.push(y)), a(new W("Error modifying one or more objects", g, b, v))
- }
- function S() {
- m && b + g.length === p && (g.length > 0 ? w() : n(b))
- }
- t.clone().raw()._iterate((function (e, t) {
- y = t.primaryKey;
- var n = {primKey: t.primaryKey, value: e, onsuccess: null, onerror: null};
- function r(e) {
- return g.push(e), v.push(n.primKey), S(), !0
- }
- if (!1 !== d.call(n, e, n)) {
- var o = !l(n, "value");
- ++p, E((function () {
- var e = o ? t.delete() : t.update(n.value);
- e._hookCtx = n, e.onerror = Ut(r), e.onsuccess = Pt((function () {
- ++b, S()
- }))
- }), r)
- } else n.onsuccess && n.onsuccess(n.value)
- }), (function () {
- m = !0, S()
- }), w, c)
- }))
- }, delete: function () {
- var e = this, t = this._ctx, n = t.range, r = t.table.hook.deleting.fire, o = r !== Q;
- if (!o && Ee(t) && (t.isPrimKey && !jt || !n)) return this._write((function (e, t, r) {
- var o = It(t), i = n ? r.count(n) : r.count();
- i.onerror = o, i.onsuccess = function () {
- var s = i.result;
- E((function () {
- var t = n ? r.delete(n) : r.clear();
- t.onerror = o, t.onsuccess = function () {
- return e(s)
- }
- }), (function (e) {
- return t(e)
- }))
- }
- }));
- var i = o ? 2e3 : 1e4;
- return this._write((function (n, s, a, c) {
- var l = 0, u = e.clone({keysOnly: !t.isMatch && !o}).distinct().limit(i).raw(), d = [],
- _ = function () {
- return u.each(o ? function (e, t) {
- d.push([t.primaryKey, t.value])
- } : function (e, t) {
- d.push(t.primaryKey)
- }).then((function () {
- return o ? d.sort((function (e, t) {
- return Ie(e[0], t[0])
- })) : d.sort(Ie), ve(a, c, d, o, r)
- })).then((function () {
- var e = d.length;
- return l += e, d = [], e < i ? l : _()
- }))
- };
- n(_())
- }))
- }
- }
- })), s(this, {
- Collection: Se,
- Table: me,
- Transaction: ye,
- Version: le,
- WhereClause: we
- }), X.on("versionchange", (function (e) {
- e.newVersion > 0 ? console.warn("Another connection wants to upgrade database '" + X.name + "'. Closing db now to resume the upgrade.") : console.warn("Another connection wants to delete database '" + X.name + "'. Closing db now to resume the delete request."), X.close()
- })), X.on("blocked", (function (e) {
- !e.newVersion || e.newVersion < e.oldVersion ? console.warn("Dexie.delete('" + X.name + "') was blocked") : console.warn("Upgrade '" + X.name + "' blocked by other connection holding version " + e.oldVersion / 10)
- })), b.forEach((function (e) {
- e(X)
- }))
- }
- function Tt(e) {
- if ("function" == typeof e) return new e;
- if (o(e)) return [Tt(e[0])];
- if (e && "object" == typeof e) {
- var t = {};
- return xt(t, e), t
- }
- return e
- }
- function xt(e, t) {
- return r(t).forEach((function (n) {
- var r = Tt(t[n]);
- e[n] = r
- })), e
- }
- function Pt(e) {
- return We((function (t) {
- var n = t.target, r = n._hookCtx, o = r.value || n.result, i = r && r.onsuccess;
- i && i(o), e && e(o)
- }), e)
- }
- function It(e) {
- return We((function (t) {
- return Rt(t), e(t.target.error), !1
- }))
- }
- function Ot(e) {
- return We((function (t) {
- e(t.target.result)
- }))
- }
- function Ut(e) {
- return We((function (t) {
- var n = t.target, r = n.error, o = n._hookCtx, i = o && o.onerror;
- return i && i(r), Rt(t), e(r), !1
- }))
- }
- function Rt(e) {
- e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault()
- }
- function Ct(e) {
- var t = function (t) {
- return e.next(t)
- }, n = i(t), r = i((function (t) {
- return e.throw(t)
- }));
- function i(e) {
- return function (t) {
- var i = e(t), s = i.value;
- return i.done ? s : s && "function" == typeof s.then ? s.then(n, r) : o(s) ? Oe.all(s).then(n, r) : n(s)
- }
- }
- return i(t)()
- }
- function Dt(e, t, n, r, o, i, s) {
- this.name = e, this.keyPath = t, this.unique = n, this.multi = r, this.auto = o, this.compound = i, this.dotted = s;
- var a = "string" == typeof t ? t : t && "[" + [].join.call(t, "+") + "]";
- this.src = (n ? "&" : "") + (r ? "*" : "") + (o ? "++" : "") + a
- }
- function Mt(e, t, n, r) {
- this.name = e, this.primKey = t || new Dt, this.indexes = n || [new Dt], this.instanceTemplate = r, this.mappedClass = null, this.idxByName = w(n, (function (e) {
- return [e.name, e]
- }))
- }
- function $t(e) {
- return 1 === e.length ? e[0] : e
- }
- function Lt(e) {
- var t = e && (e.getDatabaseNames || e.webkitGetDatabaseNames);
- return t && t.bind(e)
- }
- $(M, kt), u(At, Z), u(At, {
- delete: function (e) {
- var t = new At(e), n = t.delete();
- return n.onblocked = function (e) {
- return t.on("blocked", e), this
- }, n
- },
- exists: function (e) {
- return new At(e).open().then((function (e) {
- return e.close(), !0
- })).catch(At.NoSuchDatabaseError, (function () {
- return !1
- }))
- },
- getDatabaseNames: function (e) {
- var t = Lt(At.dependencies.indexedDB);
- return t ? new Oe((function (e, n) {
- var r = t();
- r.onsuccess = function (t) {
- e(m(t.target.result, 0))
- }, r.onerror = It(n)
- })).then(e) : ht.dbnames.toCollection().primaryKeys(e)
- },
- defineClass: function () {
- return function (e) {
- e && s(this, e)
- }
- },
- applyStructure: xt,
- ignoreTransaction: function (e) {
- return Te.trans ? at(Te.transless, e) : e()
- },
- vip: function (e) {
- return Qe((function () {
- return Te.letThrough = !0, e()
- }))
- },
- async: function (e) {
- return function () {
- try {
- var t = Ct(e.apply(this, arguments));
- return t && "function" == typeof t.then ? t : Oe.resolve(t)
- } catch (e) {
- return _t(e)
- }
- }
- },
- spawn: function (e, t, n) {
- try {
- var r = Ct(e.apply(n, t || []));
- return r && "function" == typeof r.then ? r : Oe.resolve(r)
- } catch (e) {
- return _t(e)
- }
- },
- currentTransaction: {
- get: function () {
- return Te.trans || null
- }
- },
- waitFor: function (e, t) {
- var n = Oe.resolve("function" == typeof e ? At.ignoreTransaction(e) : e).timeout(t || 6e4);
- return Te.trans ? Te.trans.waitFor(n) : n
- },
- Promise: Oe,
- debug: {
- get: function () {
- return M
- }, set: function (e) {
- $(e, "dexie" === e ? function () {
- return !0
- } : kt)
- }
- },
- derive: f,
- extend: s,
- props: u,
- override: g,
- Events: ft,
- getByKeyPath: j,
- setByKeyPath: k,
- delByKeyPath: function (e, t) {
- "string" == typeof t ? k(e, t, void 0) : "length" in t && [].map.call(t, (function (t) {
- k(e, t, void 0)
- }))
- },
- shallowClone: A,
- deepClone: I,
- getObjectDiff: O,
- asap: y,
- maxKey: mt,
- minKey: gt,
- addons: [],
- connections: wt,
- MultiModifyError: V.Modify,
- errnames: Y,
- IndexSpec: Dt,
- TableSchema: Mt,
- dependencies: function () {
- try {
- return {
- indexedDB: i.indexedDB || i.mozIndexedDB || i.webkitIndexedDB || i.msIndexedDB,
- IDBKeyRange: i.IDBKeyRange || i.webkitIDBKeyRange
- }
- } catch (e) {
- return {indexedDB: null, IDBKeyRange: null}
- }
- }(),
- semVer: pt,
- version: pt.split(".").map((function (e) {
- return parseInt(e)
- })).reduce((function (e, t, n) {
- return e + t / Math.pow(10, 2 * n)
- })),
- default: At,
- Dexie: At
- }), Oe.rejectionMapper = function (e, t) {
- if (!e || e instanceof z || e instanceof TypeError || e instanceof SyntaxError || !e.name || !X[e.name]) return e;
- var n = new X[e.name](t || e.message, e);
- return "stack" in e && _(n, "stack", {
- get: function () {
- return this.inner.stack
- }
- }), n
- }, (ht = new At("__dbnames")).version(1).stores({dbnames: "name"}), function () {
- var e = "Dexie.DatabaseNames";
- try {
- void 0 !== typeof localStorage && void 0 !== i.document && (JSON.parse(localStorage.getItem(e) || "[]").forEach((function (e) {
- return ht.dbnames.put({name: e}).catch(Q)
- })), localStorage.removeItem(e))
- } catch (e) {
- }
- }();
- const Nt = At
- }, 8552: (e, t, n) => {
- var r = n(852)(n(5639), "DataView");
- e.exports = r
- }, 7071: (e, t, n) => {
- var r = n(852)(n(5639), "Map");
- e.exports = r
- }, 3818: (e, t, n) => {
- var r = n(852)(n(5639), "Promise");
- e.exports = r
- }, 3720: (e, t, n) => {
- var r = n(852)(n(5639), "Set");
- e.exports = r
- }, 2705: (e, t, n) => {
- var r = n(5639).Symbol;
- e.exports = r
- }, 577: (e, t, n) => {
- var r = n(852)(n(5639), "WeakMap");
- e.exports = r
- }, 9932: e => {
- e.exports = function (e, t) {
- for (var n = -1, r = null == e ? 0 : e.length, o = Array(r); ++n < r;) o[n] = t(e[n], n, e);
- return o
- }
- }, 4239: (e, t, n) => {
- var r = n(2705), o = n(9607), i = n(2333), s = r ? r.toStringTag : void 0;
- e.exports = function (e) {
- return null == e ? void 0 === e ? "[object Undefined]" : "[object Null]" : s && s in Object(e) ? o(e) : i(e)
- }
- }, 9454: (e, t, n) => {
- var r = n(4239), o = n(7005);
- e.exports = function (e) {
- return o(e) && "[object Arguments]" == r(e)
- }
- }, 8458: (e, t, n) => {
- var r = n(3560), o = n(5346), i = n(3218), s = n(1257), a = /^\[object .+?Constructor\]$/,
- c = Function.prototype, l = Object.prototype, u = c.toString, d = l.hasOwnProperty,
- _ = RegExp("^" + u.call(d).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
- e.exports = function (e) {
- return !(!i(e) || o(e)) && (r(e) ? _ : a).test(s(e))
- }
- }, 8749: (e, t, n) => {
- var r = n(4239), o = n(1780), i = n(7005), s = {};
- s["[object Float32Array]"] = s["[object Float64Array]"] = s["[object Int8Array]"] = s["[object Int16Array]"] = s["[object Int32Array]"] = s["[object Uint8Array]"] = s["[object Uint8ClampedArray]"] = s["[object Uint16Array]"] = s["[object Uint32Array]"] = !0, s["[object Arguments]"] = s["[object Array]"] = s["[object ArrayBuffer]"] = s["[object Boolean]"] = s["[object DataView]"] = s["[object Date]"] = s["[object Error]"] = s["[object Function]"] = s["[object Map]"] = s["[object Number]"] = s["[object Object]"] = s["[object RegExp]"] = s["[object Set]"] = s["[object String]"] = s["[object WeakMap]"] = !1, e.exports = function (e) {
- return i(e) && o(e.length) && !!s[r(e)]
- }
- }, 280: (e, t, n) => {
- var r = n(5726), o = n(6916), i = Object.prototype.hasOwnProperty;
- e.exports = function (e) {
- if (!r(e)) return o(e);
- var t = [];
- for (var n in Object(e)) i.call(e, n) && "constructor" != n && t.push(n);
- return t
- }
- }, 531: (e, t, n) => {
- var r = n(2705), o = n(9932), i = n(1469), s = n(3448), a = r ? r.prototype : void 0,
- c = a ? a.toString : void 0;
- e.exports = function e(t) {
- if ("string" == typeof t) return t;
- if (i(t)) return o(t, e) + "";
- if (s(t)) return c ? c.call(t) : "";
- var n = t + "";
- return "0" == n && 1 / t == -Infinity ? "-0" : n
- }
- }, 7561: (e, t, n) => {
- var r = n(7990), o = /^\s+/;
- e.exports = function (e) {
- return e ? e.slice(0, r(e) + 1).replace(o, "") : e
- }
- }, 7518: e => {
- e.exports = function (e) {
- return function (t) {
- return e(t)
- }
- }
- }, 4429: (e, t, n) => {
- var r = n(5639)["__core-js_shared__"];
- e.exports = r
- }, 1957: (e, t, n) => {
- var r = "object" == typeof n.g && n.g && n.g.Object === Object && n.g;
- e.exports = r
- }, 852: (e, t, n) => {
- var r = n(8458), o = n(7801);
- e.exports = function (e, t) {
- var n = o(e, t);
- return r(n) ? n : void 0
- }
- }, 9607: (e, t, n) => {
- var r = n(2705), o = Object.prototype, i = o.hasOwnProperty, s = o.toString, a = r ? r.toStringTag : void 0;
- e.exports = function (e) {
- var t = i.call(e, a), n = e[a];
- try {
- e[a] = void 0;
- var r = !0
- } catch (e) {
- }
- var o = s.call(e);
- return r && (t ? e[a] = n : delete e[a]), o
- }
- }, 4160: (e, t, n) => {
- var r = n(8552), o = n(7071), i = n(3818), s = n(3720), a = n(577), c = n(4239), l = n(1257),
- u = "[object Map]", d = "[object Promise]", _ = "[object Set]", f = "[object WeakMap]",
- h = "[object DataView]", p = l(r), b = l(o), m = l(i), g = l(s), v = l(a), y = c;
- (r && y(new r(new ArrayBuffer(1))) != h || o && y(new o) != u || i && y(i.resolve()) != d || s && y(new s) != _ || a && y(new a) != f) && (y = function (e) {
- var t = c(e), n = "[object Object]" == t ? e.constructor : void 0, r = n ? l(n) : "";
- if (r) switch (r) {
- case p:
- return h;
- case b:
- return u;
- case m:
- return d;
- case g:
- return _;
- case v:
- return f
- }
- return t
- }), e.exports = y
- }, 7801: e => {
- e.exports = function (e, t) {
- return null == e ? void 0 : e[t]
- }
- }, 5346: (e, t, n) => {
- var r, o = n(4429),
- i = (r = /[^.]+$/.exec(o && o.keys && o.keys.IE_PROTO || "")) ? "Symbol(src)_1." + r : "";
- e.exports = function (e) {
- return !!i && i in e
- }
- }, 5726: e => {
- var t = Object.prototype;
- e.exports = function (e) {
- var n = e && e.constructor;
- return e === ("function" == typeof n && n.prototype || t)
- }
- }, 6916: (e, t, n) => {
- var r = n(5569)(Object.keys, Object);
- e.exports = r
- }, 1167: (e, t, n) => {
- e = n.nmd(e);
- var r = n(1957), o = t && !t.nodeType && t, i = o && e && !e.nodeType && e,
- s = i && i.exports === o && r.process, a = function () {
- try {
- var e = i && i.require && i.require("util").types;
- return e || s && s.binding && s.binding("util")
- } catch (e) {
- }
- }();
- e.exports = a
- }, 2333: e => {
- var t = Object.prototype.toString;
- e.exports = function (e) {
- return t.call(e)
- }
- }, 5569: e => {
- e.exports = function (e, t) {
- return function (n) {
- return e(t(n))
- }
- }
- }, 5639: (e, t, n) => {
- var r = n(1957), o = "object" == typeof self && self && self.Object === Object && self,
- i = r || o || Function("return this")();
- e.exports = i
- }, 1257: e => {
- var t = Function.prototype.toString;
- e.exports = function (e) {
- if (null != e) {
- try {
- return t.call(e)
- } catch (e) {
- }
- try {
- return e + ""
- } catch (e) {
- }
- }
- return ""
- }
- }, 7990: e => {
- var t = /\s/;
- e.exports = function (e) {
- for (var n = e.length; n-- && t.test(e.charAt(n));) ;
- return n
- }
- }, 9567: (e, t, n) => {
- var r = n(554);
- e.exports = function (e, t) {
- var n;
- if ("function" != typeof t) throw new TypeError("Expected a function");
- return e = r(e), function () {
- return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = void 0), n
- }
- }
- }, 5694: (e, t, n) => {
- var r = n(9454), o = n(7005), i = Object.prototype, s = i.hasOwnProperty, a = i.propertyIsEnumerable,
- c = r(function () {
- return arguments
- }()) ? r : function (e) {
- return o(e) && s.call(e, "callee") && !a.call(e, "callee")
- };
- e.exports = c
- }, 1469: e => {
- var t = Array.isArray;
- e.exports = t
- }, 8612: (e, t, n) => {
- var r = n(3560), o = n(1780);
- e.exports = function (e) {
- return null != e && o(e.length) && !r(e)
- }
- }, 4144: (e, t, n) => {
- e = n.nmd(e);
- var r = n(5639), o = n(5062), i = t && !t.nodeType && t, s = i && e && !e.nodeType && e,
- a = s && s.exports === i ? r.Buffer : void 0, c = (a ? a.isBuffer : void 0) || o;
- e.exports = c
- }, 1609: (e, t, n) => {
- var r = n(280), o = n(4160), i = n(5694), s = n(1469), a = n(8612), c = n(4144), l = n(5726), u = n(6719),
- d = Object.prototype.hasOwnProperty;
- e.exports = function (e) {
- if (null == e) return !0;
- if (a(e) && (s(e) || "string" == typeof e || "function" == typeof e.splice || c(e) || u(e) || i(e))) return !e.length;
- var t = o(e);
- if ("[object Map]" == t || "[object Set]" == t) return !e.size;
- if (l(e)) return !r(e).length;
- for (var n in e) if (d.call(e, n)) return !1;
- return !0
- }
- }, 3560: (e, t, n) => {
- var r = n(4239), o = n(3218);
- e.exports = function (e) {
- if (!o(e)) return !1;
- var t = r(e);
- return "[object Function]" == t || "[object GeneratorFunction]" == t || "[object AsyncFunction]" == t || "[object Proxy]" == t
- }
- }, 1780: e => {
- e.exports = function (e) {
- return "number" == typeof e && e > -1 && e % 1 == 0 && e <= 9007199254740991
- }
- }, 3218: e => {
- e.exports = function (e) {
- var t = typeof e;
- return null != e && ("object" == t || "function" == t)
- }
- }, 7005: e => {
- e.exports = function (e) {
- return null != e && "object" == typeof e
- }
- }, 3448: (e, t, n) => {
- var r = n(4239), o = n(7005);
- e.exports = function (e) {
- return "symbol" == typeof e || o(e) && "[object Symbol]" == r(e)
- }
- }, 6719: (e, t, n) => {
- var r = n(8749), o = n(7518), i = n(1167), s = i && i.isTypedArray, a = s ? o(s) : r;
- e.exports = a
- }, 1463: (e, t, n) => {
- var r = n(9567);
- e.exports = function (e) {
- return r(2, e)
- }
- }, 5062: e => {
- e.exports = function () {
- return !1
- }
- }, 8601: (e, t, n) => {
- var r = n(4841), o = 1 / 0;
- e.exports = function (e) {
- return e ? (e = r(e)) === o || e === -1 / 0 ? 17976931348623157e292 * (e < 0 ? -1 : 1) : e == e ? e : 0 : 0 === e ? e : 0
- }
- }, 554: (e, t, n) => {
- var r = n(8601);
- e.exports = function (e) {
- var t = r(e), n = t % 1;
- return t == t ? n ? t - n : t : 0
- }
- }, 4841: (e, t, n) => {
- var r = n(7561), o = n(3218), i = n(3448), s = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, c = /^0o[0-7]+$/i,
- l = parseInt;
- e.exports = function (e) {
- if ("number" == typeof e) return e;
- if (i(e)) return NaN;
- if (o(e)) {
- var t = "function" == typeof e.valueOf ? e.valueOf() : e;
- e = o(t) ? t + "" : t
- }
- if ("string" != typeof e) return 0 === e ? e : +e;
- e = r(e);
- var n = a.test(e);
- return n || c.test(e) ? l(e.slice(2), n ? 2 : 8) : s.test(e) ? NaN : +e
- }
- }, 9833: (e, t, n) => {
- var r = n(531);
- e.exports = function (e) {
- return null == e ? "" : r(e)
- }
- }, 835: (e, t, n) => {
- var r = n(9833), o = 0;
- e.exports = function (e) {
- var t = ++o;
- return r(e) + t
- }
- }, 2238: function (e, t, n) {
- var r;
- !function (o, i) {
- "use strict";
- var s = "function", a = "undefined", c = "object", l = "string", u = "model", d = "name", _ = "type",
- f = "vendor", h = "version", p = "architecture", b = "console", m = "mobile", g = "tablet",
- v = "smarttv", y = "wearable", w = "embedded", S = "Amazon", E = "Apple", j = "ASUS",
- k = "BlackBerry", A = "Firefox", T = "Google", x = "Huawei", P = "LG", I = "Microsoft",
- O = "Motorola", U = "Opera", R = "Samsung", C = "Sony", D = "Xiaomi", M = "Zebra", $ = "Facebook",
- L = function (e) {
- for (var t = {}, n = 0; n < e.length; n++) t[e[n].toUpperCase()] = e[n];
- return t
- }, N = function (e, t) {
- return typeof e === l && -1 !== J(t).indexOf(J(e))
- }, J = function (e) {
- return e.toLowerCase()
- }, B = function (e, t) {
- if (typeof e === l) return e = e.replace(/^\s\s*/, "").replace(/\s\s*$/, ""), typeof t === a ? e : e.substring(0, 255)
- }, F = function (e, t) {
- for (var n, r, o, a, l, u, d = 0; d < t.length && !l;) {
- var _ = t[d], f = t[d + 1];
- for (n = r = 0; n < _.length && !l;) if (l = _[n++].exec(e)) for (o = 0; o < f.length; o++) u = l[++r], typeof (a = f[o]) === c && a.length > 0 ? 2 === a.length ? typeof a[1] == s ? this[a[0]] = a[1].call(this, u) : this[a[0]] = a[1] : 3 === a.length ? typeof a[1] !== s || a[1].exec && a[1].test ? this[a[0]] = u ? u.replace(a[1], a[2]) : i : this[a[0]] = u ? a[1].call(this, u, a[2]) : i : 4 === a.length && (this[a[0]] = u ? a[3].call(this, u.replace(a[1], a[2])) : i) : this[a] = u || i;
- d += 2
- }
- }, K = function (e, t) {
- for (var n in t) if (typeof t[n] === c && t[n].length > 0) {
- for (var r = 0; r < t[n].length; r++) if (N(t[n][r], e)) return "?" === n ? i : n
- } else if (N(t[n], e)) return "?" === n ? i : n;
- return e
- }, q = {
- ME: "4.90",
- "NT 3.11": "NT3.51",
- "NT 4.0": "NT4.0",
- 2e3: "NT 5.0",
- XP: ["NT 5.1", "NT 5.2"],
- Vista: "NT 6.0",
- 7: "NT 6.1",
- 8: "NT 6.2",
- 8.1: "NT 6.3",
- 10: ["NT 6.4", "NT 10.0"],
- RT: "ARM"
- }, z = {
- browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [h, [d, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [h, [d, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [d, h], [/opios[\/ ]+([\w\.]+)/i], [h, [d, "Opera Mini"]], [/\bopr\/([\w\.]+)/i], [h, [d, U]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, /(ba?idubrowser)[\/ ]?([\w\.]+)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i, /(weibo)__([\d\.]+)/i], [d, h], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [h, [d, "UCBrowser"]], [/\bqbcore\/([\w\.]+)/i], [h, [d, "WeChat(Win) Desktop"]], [/micromessenger\/([\w\.]+)/i], [h, [d, "WeChat"]], [/konqueror\/([\w\.]+)/i], [h, [d, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [h, [d, "IE"]], [/yabrowser\/([\w\.]+)/i], [h, [d, "Yandex"]], [/(avast|avg)\/([\w\.]+)/i], [[d, /(.+)/, "$1 Secure Browser"], h], [/\bfocus\/([\w\.]+)/i], [h, [d, "Firefox Focus"]], [/\bopt\/([\w\.]+)/i], [h, [d, "Opera Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [h, [d, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [h, [d, "Dolphin"]], [/coast\/([\w\.]+)/i], [h, [d, "Opera Coast"]], [/miuibrowser\/([\w\.]+)/i], [h, [d, "MIUI Browser"]], [/fxios\/([-\w\.]+)/i], [h, [d, A]], [/\bqihu|(qi?ho?o?|360)browser/i], [[d, "360 Browser"]], [/(oculus|samsung|sailfish)browser\/([\w\.]+)/i], [[d, /(.+)/, "$1 Browser"], h], [/(comodo_dragon)\/([\w\.]+)/i], [[d, /_/g, " "], h], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i], [d, h], [/(metasr)[\/ ]?([\w\.]+)/i, /(lbbrowser)/i], [d], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[d, $], h], [/safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(chromium|instagram)[\/ ]([-\w\.]+)/i], [d, h], [/\bgsa\/([\w\.]+) .*safari\//i], [h, [d, "GSA"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [h, [d, "Chrome Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[d, "Chrome WebView"], h], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [h, [d, "Android Browser"]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [d, h], [/version\/([\w\.]+) .*mobile\/\w+ (safari)/i], [h, [d, "Mobile Safari"]], [/version\/([\w\.]+) .*(mobile ?safari|safari)/i], [h, d], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [d, [h, K, {
- "1.0": "/8",
- 1.2: "/1",
- 1.3: "/3",
- "2.0": "/412",
- "2.0.2": "/416",
- "2.0.3": "/417",
- "2.0.4": "/419",
- "?": "/"
- }]], [/(webkit|khtml)\/([\w\.]+)/i], [d, h], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[d, "Netscape"], h], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [h, [d, "Firefox Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i], [d, h]],
- cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[p, "amd64"]], [/(ia32(?=;))/i], [[p, J]], [/((?:i[346]|x)86)[;\)]/i], [[p, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[p, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[p, "armhf"]], [/windows (ce|mobile); ppc;/i], [[p, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[p, /ower/, "", J]], [/(sun4\w)[;\)]/i], [[p, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[p, J]]],
- device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [u, [f, R], [_, g]], [/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [u, [f, R], [_, m]], [/\((ip(?:hone|od)[\w ]*);/i], [u, [f, E], [_, m]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [u, [f, E], [_, g]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [u, [f, x], [_, g]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i], [u, [f, x], [_, m]], [/\b(poco[\w ]+)(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[u, /_/g, " "], [f, D], [_, m]], [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[u, /_/g, " "], [f, D], [_, g]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [u, [f, "OPPO"], [_, m]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [u, [f, "Vivo"], [_, m]], [/\b(rmx[12]\d{3})(?: bui|;|\))/i], [u, [f, "Realme"], [_, m]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [u, [f, O], [_, m]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [u, [f, O], [_, g]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [u, [f, P], [_, g]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [u, [f, P], [_, m]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [u, [f, "Lenovo"], [_, g]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[u, /_/g, " "], [f, "Nokia"], [_, m]], [/(pixel c)\b/i], [u, [f, T], [_, g]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [u, [f, T], [_, m]], [/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [u, [f, C], [_, m]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[u, "Xperia Tablet"], [f, C], [_, g]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [u, [f, "OnePlus"], [_, m]], [/(alexa)webm/i, /(kf[a-z]{2}wi)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [u, [f, S], [_, g]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[u, /(.+)/g, "Fire Phone $1"], [f, S], [_, m]], [/(playbook);[-\w\),; ]+(rim)/i], [u, f, [_, g]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [u, [f, k], [_, m]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [u, [f, j], [_, g]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [u, [f, j], [_, m]], [/(nexus 9)/i], [u, [f, "HTC"], [_, g]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i], [f, [u, /_/g, " "], [_, m]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [u, [f, "Acer"], [_, g]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [u, [f, "Meizu"], [_, m]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [u, [f, "Sharp"], [_, m]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [f, u, [_, m]], [/(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [f, u, [_, g]], [/(surface duo)/i], [u, [f, I], [_, g]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [u, [f, "Fairphone"], [_, m]], [/(u304aa)/i], [u, [f, "AT&T"], [_, m]], [/\bsie-(\w*)/i], [u, [f, "Siemens"], [_, m]], [/\b(rct\w+) b/i], [u, [f, "RCA"], [_, g]], [/\b(venue[\d ]{2,7}) b/i], [u, [f, "Dell"], [_, g]], [/\b(q(?:mv|ta)\w+) b/i], [u, [f, "Verizon"], [_, g]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [u, [f, "Barnes & Noble"], [_, g]], [/\b(tm\d{3}\w+) b/i], [u, [f, "NuVision"], [_, g]], [/\b(k88) b/i], [u, [f, "ZTE"], [_, g]], [/\b(nx\d{3}j) b/i], [u, [f, "ZTE"], [_, m]], [/\b(gen\d{3}) b.+49h/i], [u, [f, "Swiss"], [_, m]], [/\b(zur\d{3}) b/i], [u, [f, "Swiss"], [_, g]], [/\b((zeki)?tb.*\b) b/i], [u, [f, "Zeki"], [_, g]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[f, "Dragon Touch"], u, [_, g]], [/\b(ns-?\w{0,9}) b/i], [u, [f, "Insignia"], [_, g]], [/\b((nxa|next)-?\w{0,9}) b/i], [u, [f, "NextBook"], [_, g]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[f, "Voice"], u, [_, m]], [/\b(lvtel\-)?(v1[12]) b/i], [[f, "LvTel"], u, [_, m]], [/\b(ph-1) /i], [u, [f, "Essential"], [_, m]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [u, [f, "Envizen"], [_, g]], [/\b(trio[-\w\. ]+) b/i], [u, [f, "MachSpeed"], [_, g]], [/\btu_(1491) b/i], [u, [f, "Rotor"], [_, g]], [/(shield[\w ]+) b/i], [u, [f, "Nvidia"], [_, g]], [/(sprint) (\w+)/i], [f, u, [_, m]], [/(kin\.[onetw]{3})/i], [[u, /\./g, " "], [f, I], [_, m]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [u, [f, M], [_, g]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [u, [f, M], [_, m]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [f, u, [_, b]], [/droid.+; (shield) bui/i], [u, [f, "Nvidia"], [_, b]], [/(playstation [345portablevi]+)/i], [u, [f, C], [_, b]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [u, [f, I], [_, b]], [/smart-tv.+(samsung)/i], [f, [_, v]], [/hbbtv.+maple;(\d+)/i], [[u, /^/, "SmartTV"], [f, R], [_, v]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[f, P], [_, v]], [/(apple) ?tv/i], [f, [u, "Apple TV"], [_, v]], [/crkey/i], [[u, "Chromecast"], [f, T], [_, v]], [/droid.+aft(\w)( bui|\))/i], [u, [f, S], [_, v]], [/\(dtv[\);].+(aquos)/i], [u, [f, "Sharp"], [_, v]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i], [[f, B], [u, B], [_, v]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[_, v]], [/((pebble))app/i], [f, u, [_, y]], [/droid.+; (glass) \d/i], [u, [f, T], [_, y]], [/droid.+; (wt63?0{2,3})\)/i], [u, [f, M], [_, y]], [/(quest( 2)?)/i], [u, [f, $], [_, y]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [f, [_, w]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i], [u, [_, m]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [u, [_, g]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[_, g]], [/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i], [[_, m]], [/(android[-\w\. ]{0,9});.+buil/i], [u, [f, "Generic"]]],
- engine: [[/windows.+ edge\/([\w\.]+)/i], [h, [d, "EdgeHTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [h, [d, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i], [d, h], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [h, d]],
- os: [[/microsoft (windows) (vista|xp)/i], [d, h], [/(windows) nt 6\.2; (arm)/i, /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i], [d, [h, K, q]], [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[d, "Windows"], [h, K, q]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /cfnetwork\/.+darwin/i], [[h, /_/g, "."], [d, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[d, "Mac OS"], [h, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86)/i], [h, d], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [d, h], [/\(bb(10);/i], [h, [d, k]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [h, [d, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [h, [d, "Firefox OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [h, [d, "webOS"]], [/crkey\/([\d\.]+)/i], [h, [d, "Chromecast"]], [/(cros) [\w]+ ([\w\.]+\w)/i], [[d, "Chromium OS"], h], [/(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [d, h], [/(sunos) ?([\w\.\d]*)/i], [[d, "Solaris"], h], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, /(unix) ?([\w\.]*)/i], [d, h]]
- }, W = function (e, t) {
- if (typeof e === c && (t = e, e = i), !(this instanceof W)) return new W(e, t).getResult();
- var n = e || (typeof o !== a && o.navigator && o.navigator.userAgent ? o.navigator.userAgent : ""),
- r = t ? function (e, t) {
- var n = {};
- for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
- return n
- }(z, t) : z;
- return this.getBrowser = function () {
- var e, t = {};
- return t.name = i, t.version = i, F.call(t, n, r.browser), t.major = typeof (e = t.version) === l ? e.replace(/[^\d\.]/g, "").split(".")[0] : i, t
- }, this.getCPU = function () {
- var e = {};
- return e.architecture = i, F.call(e, n, r.cpu), e
- }, this.getDevice = function () {
- var e = {};
- return e.vendor = i, e.model = i, e.type = i, F.call(e, n, r.device), e
- }, this.getEngine = function () {
- var e = {};
- return e.name = i, e.version = i, F.call(e, n, r.engine), e
- }, this.getOS = function () {
- var e = {};
- return e.name = i, e.version = i, F.call(e, n, r.os), e
- }, this.getResult = function () {
- return {
- ua: this.getUA(),
- browser: this.getBrowser(),
- engine: this.getEngine(),
- os: this.getOS(),
- device: this.getDevice(),
- cpu: this.getCPU()
- }
- }, this.getUA = function () {
- return n
- }, this.setUA = function (e) {
- return n = typeof e === l && e.length > 255 ? B(e, 255) : e, this
- }, this.setUA(n), this
- };
- W.VERSION = "0.7.31", W.BROWSER = L([d, h, "major"]), W.CPU = L([p]), W.DEVICE = L([u, f, _, b, m, v, g, y, w]), W.ENGINE = W.OS = L([d, h]), typeof t !== a ? (e.exports && (t = e.exports = W), t.UAParser = W) : n.amdO ? (r = function () {
- return W
- }.call(t, n, t, e)) === i || (e.exports = r) : typeof o !== a && (o.UAParser = W);
- var G = typeof o !== a && (o.jQuery || o.Zepto);
- if (G && !G.ua) {
- var Y = new W;
- G.ua = Y.getResult(), G.ua.get = function () {
- return Y.getUA()
- }, G.ua.set = function (e) {
- Y.setUA(e);
- var t = Y.getResult();
- for (var n in t) G.ua[n] = t[n]
- }
- }
- }("object" == typeof window ? window : this)
- }, 4493: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.SINGLE_BYTE_TOKEN = t.DICT_VERSION = t.DICTIONARY_3_TOKEN = t.DICTIONARY_2_TOKEN = t.DICTIONARY_1_TOKEN = t.DICTIONARY_0_TOKEN = t.DICTIONARIES = void 0;
- t.DICT_VERSION = 3;
- t.SINGLE_BYTE_TOKEN = ["xmlstreamstart", "xmlstreamend", "s.whatsapp.net", "type", "participant", "from", "receipt", "id", "notification", "disappearing_mode", "status", "jid", "broadcast", "user", "devices", "device_hash", "to", "offline", "message", "result", "class", "xmlns", "duration", "notify", "iq", "t", "ack", "g.us", "enc", "urn:xmpp:whatsapp:push", "presence", "config_value", "picture", "verified_name", "config_code", "key-index-list", "contact", "mediatype", "routing_info", "edge_routing", "get", "read", "urn:xmpp:ping", "fallback_hostname", "0", "chatstate", "business_hours_config", "unavailable", "download_buckets", "skmsg", "verified_level", "composing", "handshake", "device-list", "media", "text", "fallback_ip4", "media_conn", "device", "creation", "location", "config", "item", "fallback_ip6", "count", "w:profile:picture", "image", "business", "2", "hostname", "call-creator", "display_name", "relaylatency", "platform", "abprops", "success", "msg", "offline_preview", "prop", "key-index", "v", "day_of_week", "pkmsg", "version", "1", "ping", "w:p", "download", "video", "set", "specific_hours", "props", "primary", "unknown", "hash", "commerce_experience", "last", "subscribe", "max_buckets", "call", "profile", "member_since_text", "close_time", "call-id", "sticker", "mode", "participants", "value", "query", "profile_options", "open_time", "code", "list", "host", "ts", "contacts", "upload", "lid", "preview", "update", "usync", "w:stats", "delivery", "auth_ttl", "context", "fail", "cart_enabled", "appdata", "category", "atn", "direct_connection", "decrypt-fail", "relay_id", "mmg-fallback.whatsapp.net", "target", "available", "name", "last_id", "mmg.whatsapp.net", "categories", "401", "is_new", "index", "tctoken", "ip4", "token_id", "latency", "recipient", "edit", "ip6", "add", "thumbnail-document", "26", "paused", "true", "identity", "stream:error", "key", "sidelist", "background", "audio", "3", "thumbnail-image", "biz-cover-photo", "cat", "gcm", "thumbnail-video", "error", "auth", "deny", "serial", "in", "registration", "thumbnail-link", "remove", "00", "gif", "thumbnail-gif", "tag", "capability", "multicast", "item-not-found", "description", "business_hours", "config_expo_key", "md-app-state", "expiration", "fallback", "ttl", "300", "md-msg-hist", "device_orientation", "out", "w:m", "open_24h", "side_list", "token", "inactive", "01", "document", "te2", "played", "encrypt", "msgr", "hide", "direct_path", "12", "state", "not-authorized", "url", "terminate", "signature", "status-revoke-delay", "02", "te", "linked_accounts", "trusted_contact", "timezone", "ptt", "kyc-id", "privacy_token", "readreceipts", "appointment_only", "address", "expected_ts", "privacy", "7", "android", "interactive", "device-identity", "enabled", "attribute_padding", "1080", "03", "screen_height"];
- const n = ["read-self", "active", "fbns", "protocol", "reaction", "screen_width", "heartbeat", "deviceid", "2:47DEQpj8", "uploadfieldstat", "voip_settings", "retry", "priority", "longitude", "conflict", "false", "ig_professional", "replaced", "preaccept", "cover_photo", "uncompressed", "encopt", "ppic", "04", "passive", "status-revoke-drop", "keygen", "540", "offer", "rate", "opus", "latitude", "w:gp2", "ver", "4", "business_profile", "medium", "sender", "prev_v_id", "email", "website", "invited", "sign_credential", "05", "transport", "skey", "reason", "peer_abtest_bucket", "America/Sao_Paulo", "appid", "refresh", "100", "06", "404", "101", "104", "107", "102", "109", "103", "member_add_mode", "105", "transaction-id", "110", "106", "outgoing", "108", "111", "tokens", "followers", "ig_handle", "self_pid", "tue", "dec", "thu", "joinable", "peer_pid", "mon", "features", "wed", "peer_device_presence", "pn", "delete", "07", "fri", "audio_duration", "admin", "connected", "delta", "rcat", "disable", "collection", "08", "480", "sat", "phash", "all", "invite", "accept", "critical_unblock_low", "group_update", "signed_credential", "blinded_credential", "eph_setting", "net", "09", "background_location", "refresh_id", "Asia/Kolkata", "privacy_mode_ts", "account_sync", "voip_payload_type", "service_areas", "acs_public_key", "v_id", "0a", "fallback_class", "relay", "actual_actors", "metadata", "w:biz", "5", "connected-limit", "notice", "0b", "host_storage", "fb_page", "subject", "privatestats", "invis", "groupadd", "010", "note.m4r", "uuid", "0c", "8000", "sun", "372", "1020", "stage", "1200", "720", "canonical", "fb", "011", "video_duration", "0d", "1140", "superadmin", "012", "Opening.m4r", "keystore_attestation", "dleq_proof", "013", "timestamp", "ab_key", "w:sync:app:state", "0e", "vertical", "600", "p_v_id", "6", "likes", "014", "500", "1260", "creator", "0f", "rte", "destination", "group", "group_info", "syncd_anti_tampering_fatal_exception_enabled", "015", "dl_bw", "Asia/Jakarta", "vp8/h.264", "online", "1320", "fb:multiway", "10", "timeout", "016", "nse_retry", "urn:xmpp:whatsapp:dirty", "017", "a_v_id", "web_shops_chat_header_button_enabled", "nse_call", "inactive-upgrade", "none", "web", "groups", "2250", "mms_hot_content_timespan_in_seconds", "contact_blacklist", "nse_read", "suspended_group_deletion_notification", "binary_version", "018", "https://www.whatsapp.com/otp/copy/", "reg_push", "shops_hide_catalog_attachment_entrypoint", "server_sync", ".", "ephemeral_messages_allowed_values", "019", "mms_vcache_aggregation_enabled", "iphone", "America/Argentina/Buenos_Aires", "01a", "mms_vcard_autodownload_size_kb", "nse_ver", "shops_header_dropdown_menu_item", "dhash", "catalog_status", "communities_mvp_new_iqs_serverprop", "blocklist", "default", "11", "ephemeral_messages_enabled", "01b", "original_dimensions", "8", "mms4_media_retry_notification_encryption_enabled", "mms4_server_error_receipt_encryption_enabled", "original_image_url", "sync", "multiway", "420", "companion_enc_static", "shops_profile_drawer_entrypoint", "01c", "vcard_as_document_size_kb", "status_video_max_duration", "request_image_url", "01d", "regular_high", "s_t", "abt", "share_ext_min_preliminary_image_quality", "01e", "32", "syncd_key_rotation_enabled", "data_namespace", "md_downgrade_read_receipts2", "patch", "polltype", "ephemeral_messages_setting", "userrate", "15", "partial_pjpeg_bw_threshold", "played-self", "catalog_exists", "01f", "mute_v2"];
- t.DICTIONARY_0_TOKEN = n;
- const r = ["reject", "dirty", "announcement", "020", "13", "9", "status_video_max_bitrate", "fb:thrift_iq", "offline_batch", "022", "full", "ctwa_first_business_reply_logging", "h.264", "smax_id", "group_description_length", "https://www.whatsapp.com/otp/code", "status_image_max_edge", "smb_upsell_business_profile_enabled", "021", "web_upgrade_to_md_modal", "14", "023", "s_o", "smaller_video_thumbs_status_enabled", "media_max_autodownload", "960", "blocking_status", "peer_msg", "joinable_group_call_client_version", "group_call_video_maximization_enabled", "return_snapshot", "high", "America/Mexico_City", "entry_point_block_logging_enabled", "pop", "024", "1050", "16", "1380", "one_tap_calling_in_group_chat_size", "regular_low", "inline_joinable_education_enabled", "hq_image_max_edge", "locked", "America/Bogota", "smb_biztools_deeplink_enabled", "status_image_quality", "1088", "025", "payments_upi_intent_transaction_limit", "voip", "w:g2", "027", "md_pin_chat_enabled", "026", "multi_scan_pjpeg_download_enabled", "shops_product_grid", "transaction_id", "ctwa_context_enabled", "20", "fna", "hq_image_quality", "alt_jpeg_doc_detection_quality", "group_call_max_participants", "pkey", "America/Belem", "image_max_kbytes", "web_cart_v1_1_order_message_changes_enabled", "ctwa_context_enterprise_enabled", "urn:xmpp:whatsapp:account", "840", "Asia/Kuala_Lumpur", "max_participants", "video_remux_after_repair_enabled", "stella_addressbook_restriction_type", "660", "900", "780", "context_menu_ios13_enabled", "mute-state", "ref", "payments_request_messages", "029", "frskmsg", "vcard_max_size_kb", "sample_buffer_gif_player_enabled", "match_last_seen", "510", "4983", "video_max_bitrate", "028", "w:comms:chat", "17", "frequently_forwarded_max", "groups_privacy_blacklist", "Asia/Karachi", "02a", "web_download_document_thumb_mms_enabled", "02b", "hist_sync", "biz_block_reasons_version", "1024", "18", "web_is_direct_connection_for_plm_transparent", "view_once_write", "file_max_size", "paid_convo_id", "online_privacy_setting", "video_max_edge", "view_once_read", "enhanced_storage_management", "multi_scan_pjpeg_encoding_enabled", "ctwa_context_forward_enabled", "video_transcode_downgrade_enable", "template_doc_mime_types", "hq_image_bw_threshold", "30", "body", "u_aud_limit_sil_restarts_ctrl", "other", "participating", "w:biz:directory", "1110", "vp8", "4018", "meta", "doc_detection_image_max_edge", "image_quality", "1170", "02c", "smb_upsell_chat_banner_enabled", "key_expiry_time_second", "pid", "stella_interop_enabled", "19", "linked_device_max_count", "md_device_sync_enabled", "02d", "02e", "360", "enhanced_block_enabled", "ephemeral_icon_in_forwarding", "paid_convo_status", "gif_provider", "project_name", "server-error", "canonical_url_validation_enabled", "wallpapers_v2", "syncd_clear_chat_delete_chat_enabled", "medianotify", "02f", "shops_required_tos_version", "vote", "reset_skey_on_id_change", "030", "image_max_edge", "multicast_limit_global", "ul_bw", "21", "25", "5000", "poll", "570", "22", "031", "1280", "WhatsApp", "032", "bloks_shops_enabled", "50", "upload_host_switching_enabled", "web_ctwa_context_compose_enabled", "ptt_forwarded_features_enabled", "unblocked", "partial_pjpeg_enabled", "fbid:devices", "height", "ephemeral_group_query_ts", "group_join_permissions", "order", "033", "alt_jpeg_status_quality", "migrate", "popular-bank", "win_uwp_deprecation_killswitch_enabled", "web_download_status_thumb_mms_enabled", "blocking", "url_text", "035", "web_forwarding_limit_to_groups", "1600", "val", "1000", "syncd_msg_date_enabled", "bank-ref-id", "max_subject", "payments_web_enabled", "web_upload_document_thumb_mms_enabled", "size", "request", "ephemeral", "24", "receipt_agg", "ptt_remember_play_position", "sampling_weight", "enc_rekey", "mute_always", "037", "034", "23", "036", "action", "click_to_chat_qr_enabled", "width", "disabled", "038", "md_blocklist_v2", "played_self_enabled", "web_buttons_message_enabled", "flow_id", "clear", "450", "fbid:thread", "bloks_session_state", "America/Lima", "attachment_picker_refresh", "download_host_switching_enabled", "1792", "u_aud_limit_sil_restarts_test2", "custom_urls", "device_fanout", "optimistic_upload", "2000", "key_cipher_suite", "web_smb_upsell_in_biz_profile_enabled", "e", "039", "siri_post_status_shortcut", "pair-device", "lg", "lc", "stream_attribution_url", "model", "mspjpeg_phash_gen", "catalog_send_all", "new_multi_vcards_ui", "share_biz_vcard_enabled", "-", "clean", "200", "md_blocklist_v2_server", "03b", "03a", "web_md_migration_experience", "ptt_conversation_waveform", "u_aud_limit_sil_restarts_test1"];
- t.DICTIONARY_1_TOKEN = r;
- const o = ["64", "ptt_playback_speed_enabled", "web_product_list_message_enabled", "paid_convo_ts", "27", "manufacturer", "psp-routing", "grp_uii_cleanup", "ptt_draft_enabled", "03c", "business_initiated", "web_catalog_products_onoff", "web_upload_link_thumb_mms_enabled", "03e", "mediaretry", "35", "hfm_string_changes", "28", "America/Fortaleza", "max_keys", "md_mhfs_days", "streaming_upload_chunk_size", "5541", "040", "03d", "2675", "03f", "...", "512", "mute", "48", "041", "alt_jpeg_quality", "60", "042", "md_smb_quick_reply", "5183", "c", "1343", "40", "1230", "043", "044", "mms_cat_v1_forward_hot_override_enabled", "user_notice", "ptt_waveform_send", "047", "Asia/Calcutta", "250", "md_privacy_v2", "31", "29", "128", "md_messaging_enabled", "046", "crypto", "690", "045", "enc_iv", "75", "failure", "ptt_oot_playback", "AIzaSyDR5yfaG7OG8sMTUj8kfQEb8T9pN8BM6Lk", "w", "048", "2201", "web_large_files_ui", "Asia/Makassar", "812", "status_collapse_muted", "1334", "257", "2HP4dm", "049", "patches", "1290", "43cY6T", "America/Caracas", "web_sticker_maker", "campaign", "ptt_pausable_enabled", "33", "42", "attestation", "biz", "04b", "query_linked", "s", "125", "04a", "810", "availability", "1411", "responsiveness_v2_m1", "catalog_not_created", "34", "America/Santiago", "1465", "enc_p", "04d", "status_info", "04f", "key_version", "..", "04c", "04e", "md_group_notification", "1598", "1215", "web_cart_enabled", "37", "630", "1920", "2394", "-1", "vcard", "38", "elapsed", "36", "828", "peer", "pricing_category", "1245", "invalid", "stella_ios_enabled", "2687", "45", "1528", "39", "u_is_redial_audio_1104_ctrl", "1025", "1455", "58", "2524", "2603", "054", "bsp_system_message_enabled", "web_pip_redesign", "051", "verify_apps", "1974", "1272", "1322", "1755", "052", "70", "050", "1063", "1135", "1361", "80", "1096", "1828", "1851", "1251", "1921", "key_config_id", "1254", "1566", "1252", "2525", "critical_block", "1669", "max_available", "w:auth:backup:token", "product", "2530", "870", "1022", "participant_uuid", "web_cart_on_off", "1255", "1432", "1867", "41", "1415", "1440", "240", "1204", "1608", "1690", "1846", "1483", "1687", "1749", "69", "url_number", "053", "1325", "1040", "365", "59", "Asia/Riyadh", "1177", "test_recommended", "057", "1612", "43", "1061", "1518", "1635", "055", "1034", "1375", "750", "1430", "event_code", "1682", "503", "55", "865", "78", "1309", "1365", "44", "America/Guayaquil", "535", "LIMITED", "1377", "1613", "1420", "1599", "1822", "05a", "1681", "password", "1111", "1214", "1376", "1478", "47", "1082", "4282", "Europe/Istanbul", "1307", "46", "058", "1124", "256", "rate-overlimit", "retail", "u_a_socket_err_fix_succ_test", "1292", "1370", "1388", "520", "861", "psa", "regular", "1181", "1766", "05b", "1183", "1213", "1304", "1537"];
- t.DICTIONARY_2_TOKEN = o;
- const i = ["1724", "profile_picture", "1071", "1314", "1605", "407", "990", "1710", "746", "pricing_model", "056", "059", "061", "1119", "6027", "65", "877", "1607", "05d", "917", "seen", "1516", "49", "470", "973", "1037", "1350", "1394", "1480", "1796", "keys", "794", "1536", "1594", "2378", "1333", "1524", "1825", "116", "309", "52", "808", "827", "909", "495", "1660", "361", "957", "google", "1357", "1565", "1967", "996", "1775", "586", "736", "1052", "1670", "bank", "177", "1416", "2194", "2222", "1454", "1839", "1275", "53", "997", "1629", "6028", "smba", "1378", "1410", "05c", "1849", "727", "create", "1559", "536", "1106", "1310", "1944", "670", "1297", "1316", "1762", "en", "1148", "1295", "1551", "1853", "1890", "1208", "1784", "7200", "05f", "178", "1283", "1332", "381", "643", "1056", "1238", "2024", "2387", "179", "981", "1547", "1705", "05e", "290", "903", "1069", "1285", "2436", "062", "251", "560", "582", "719", "56", "1700", "2321", "325", "448", "613", "777", "791", "51", "488", "902", "Asia/Almaty", "is_hidden", "1398", "1527", "1893", "1999", "2367", "2642", "237", "busy", "065", "067", "233", "590", "993", "1511", "54", "723", "860", "363", "487", "522", "605", "995", "1321", "1691", "1865", "2447", "2462", "NON_TRANSACTIONAL", "433", "871", "432", "1004", "1207", "2032", "2050", "2379", "2446", "279", "636", "703", "904", "248", "370", "691", "700", "1068", "1655", "2334", "060", "063", "364", "533", "534", "567", "1191", "1210", "1473", "1827", "069", "701", "2531", "514", "prev_dhash", "064", "496", "790", "1046", "1139", "1505", "1521", "1108", "207", "544", "637", "final", "1173", "1293", "1694", "1939", "1951", "1993", "2353", "2515", "504", "601", "857", "modify", "spam_request", "p_121_aa_1101_test4", "866", "1427", "1502", "1638", "1744", "2153", "068", "382", "725", "1704", "1864", "1990", "2003", "Asia/Dubai", "508", "531", "1387", "1474", "1632", "2307", "2386", "819", "2014", "066", "387", "1468", "1706", "2186", "2261", "471", "728", "1147", "1372", "1961"];
- t.DICTIONARY_3_TOKEN = i;
- const s = [n, r, o, i];
- t.DICTIONARIES = s
- }, 1330: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.decimalStringToLongInt = function (e) {
- if (!/^-?\d+$/.test(e)) throw __LOG__(2)`"${e}" is not a valid decimal string`, new Error("decimalStringToLongInt is given an invalid decimal string");
- const t = "-" === e[0], n = e.replace(/^-?0*/, ""), o = n.length;
- if (o < 16 || 16 === o && n <= "9007199254740991") return t ? -Number(n) : Number(n);
- if (o > 20 || 20 === o && n > "18446744073709551615" || t && (o > 19 || 19 === o && n > "9223372036854775807")) throw __LOG__(2)`"${e}" is over 64 bits`, new Error("decimalStringToHexLong is given value over 64 bits");
- let i = 0, s = 0;
- for (let e = 0; e < o; e++) i = 10 * i + Number(n[e]), s = 10 * s + Math.floor(i / 4294967296), i %= 4294967296;
- return (0, r.createHexLongFrom32Bits)(s, i, t)
- }, t.isBiggerLongInt = function (e, t) {
- if ("number" == typeof e && "number" == typeof t) return e > t;
- const n = "number" == typeof e ? (0, r.hexLongFromNumber)(e) : e,
- o = "number" == typeof t ? (0, r.hexLongFromNumber)(t) : t;
- return (0, r.isBiggerHexLong)(n, o)
- }, t.longIntToDecimalString = function (e) {
- if ("number" == typeof e) return e.toString(10);
- const t = (0, r.hexLongToHex)(e), n = [0];
- let o = 0;
- for (let e = 0; e < t.length; e++) {
- o = (0, r.hexAt)(t, e);
- for (let e = 0; e < n.length; e++) n[e] = 16 * n[e] + o, o = n[e] / 10 | 0, n[e] %= 10;
- for (; o > 0;) n.push(o % 10), o = o / 10 | 0
- }
- const i = n.reverse().join("");
- return (0, r.hexLongIsNegative)(e) ? "-" + i : i
- }, t.maybeNumberOrThrowIfTooLarge = void 0, t.numberOrThrowIfTooLarge = o;
- var r = n(5982);
- function o(e) {
- if ("number" != typeof e) throw __LOG__(2)`${e} is not a safe integer`, new Error("numberOrThrowIfTooLarge is given a non-safe integer");
- return e
- }
- t.maybeNumberOrThrowIfTooLarge = e => null == e ? e : o(e)
- }, 6595: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Spec = void 0, t.compileSpec = function (e) {
- if (e.internalCompiledSpec) return e.internalCompiledSpec;
- const t = e.internalSpec;
- if (!t) throw new Error(`Message Class ${String(e)} does not have internalSpec`);
- const n = e.internalDefaults || {}, s = Object.keys(t).filter((e => e !== r.KEYS.ONEOF)),
- a = new Array(s.length), c = [], l = [], u = new Array(s.length), d = t[r.KEYS.ONEOF] || {};
- s.sort(((e, n) => {
- const r = i(t, e), o = i(t, n);
- return r[0] - o[0]
- }));
- for (let e = 0; e < s.length; e++) {
- const o = s[e], d = i(t, o);
- u[e] = n[o];
- const _ = d[1], f = d[0];
- if (c.push(f), l.push(_), (_ & r.TYPE_MASK) === r.TYPES.MESSAGE) a[e] = d[2]; else if ((_ & r.TYPE_MASK) === r.TYPES.ENUM) {
- const t = d[2];
- if ("function" == typeof t.cast) a[e] = t; else {
- let n, r = !0, o = 0;
- for (const e in t) r && e !== o++ && (r = !1);
- if (r) {
- n = [];
- for (let e = 0; e < o; e++) n.push(!0)
- } else {
- n = {};
- for (const e in t) n[t[e]] = !0
- }
- a[e] = n
- }
- } else a[e] = null
- }
- const _ = {};
- for (const e in d) d[e].forEach((t => {
- _[t] || (_[t] = []), _[t].push(e)
- }));
- const f = t[r.KEYS.RESERVED] && t[r.KEYS.RESERVED][r.KEYS.RESERVED_TAGS],
- h = t[r.KEYS.RESERVED] && t[r.KEYS.RESERVED][r.KEYS.RESERVED_FIELDS],
- p = new o(s, c, l, u, a, d, _, f, h);
- return e.internalCompiledSpec = p, p
- };
- var r = n(6154);
- class o {
- constructor(e, t, n, r, o, i, s, a, c) {
- this.names = e, this.fields = t, this.types = n, this.defaults = r, this.meta = o, this.oneofToFields = i, this.fieldToOneof = s, this.reservedTags = a ? a.reduce(((e, t) => (e[t] = !0, e)), {}) : {}, this.reservedFields = c ? c.reduce(((e, t) => (e[t] = !0, e)), {}) : {}
- }
- }
- function i(e, t) {
- const n = e[t];
- if (null == n) throw new Error(`fieldData of ${t} is missing`);
- return n
- }
- t.Spec = o
- }, 6154: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.TYPE_MASK = t.TYPES = t.KEYS = t.FLAGS = t.ENC = void 0;
- t.FLAGS = {REPEATED: 64, PACKED: 128, REQUIRED: 256};
- t.TYPE_MASK = 31;
- t.TYPES = {
- INT32: 1,
- INT64: 2,
- UINT32: 3,
- UINT64: 4,
- SINT32: 5,
- SINT64: 6,
- BOOL: 7,
- ENUM: 8,
- FIXED64: 9,
- SFIXED64: 10,
- DOUBLE: 11,
- STRING: 12,
- BYTES: 13,
- MESSAGE: 14,
- FIXED32: 15,
- SFIXED32: 16,
- FLOAT: 17
- };
- t.ENC = {VARINT: 0, BIT64: 1, BINARY: 2, BIT32: 5};
- t.KEYS = {ONEOF: "__oneofs__", RESERVED: "__reserved__", RESERVED_TAGS: "tags", RESERVED_FIELDS: "fields"}
- }, 5036: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.typeToEncType = function (e) {
- if (e & i.PACKED) return c.BINARY;
- const t = e & a;
- return t <= s.ENUM ? c.VARINT : t <= s.DOUBLE ? c.BIT64 : t <= s.MESSAGE ? c.BINARY : c.BIT32
- };
- var r = function (e, t) {
- if (!t && e && e.__esModule) return e;
- if (null === e || "object" != typeof e && "function" != typeof e) return {default: e};
- var n = o(t);
- if (n && n.has(e)) return n.get(e);
- var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
- for (var s in e) if ("default" !== s && Object.prototype.hasOwnProperty.call(e, s)) {
- var a = i ? Object.getOwnPropertyDescriptor(e, s) : null;
- a && (a.get || a.set) ? Object.defineProperty(r, s, a) : r[s] = e[s]
- }
- r.default = e, n && n.set(e, r);
- return r
- }(n(6154));
- function o(e) {
- if ("function" != typeof WeakMap) return null;
- var t = new WeakMap, n = new WeakMap;
- return (o = function (e) {
- return e ? n : t
- })(e)
- }
- const {FLAGS: i, TYPES: s, TYPE_MASK: a, ENC: c} = r
- }, 2525: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.checkRequirements = c, t.checkValid = function (e, t) {
- c(e, t);
- const n = p(t, e);
- if (n) throw n.path.reverse(), new TypeError(`Invalid value at ${n.path.join(".")}: ${n.error}`)
- };
- var o = r(n(9028)), i = n(6595), s = n(6154);
- const a = Number.MAX_SAFE_INTEGER;
- function c(e, t) {
- const n = l(e, t);
- if (n) throw n.reverse(), new TypeError(`Message missing required value ${n.join(".")}`)
- }
- function l(e, t) {
- const {names: n, types: r, meta: a} = (0, i.compileSpec)(e);
- let c;
- for (let e = 0; e < r.length && !c; e++) {
- const i = r[e], u = n[e], d = (0, o.default)(t, u) ? t[u] : void 0;
- if (i & s.FLAGS.REQUIRED && null == d) c = [u]; else if ((i & s.TYPE_MASK) === s.TYPES.MESSAGE && i & s.FLAGS.REPEATED && null != d) {
- const t = a[e];
- let n;
- for (n = 0; n < d.length && !c; n++) c = l(t, d[n]);
- c && c.push(`${u}[${n}]`)
- } else (i & s.TYPE_MASK) === s.TYPES.MESSAGE && null != d && (c = l(a[e], d), c && c.push(u))
- }
- return c
- }
- function u(e, t, n) {
- return "string" == typeof e ? !/^-?0x[0-9a-f]{16}$/i.test(e) && (__LOG__(2)`"${f(e)}" is not a valid long`, {
- path: [],
- error: "value must be a hex string of the form '0x123...' or '-0x123...' where the tail is always 16 characters long"
- }) : d(e, t, n)
- }
- function d(e, t, n) {
- return "number" != typeof e || e != e || Math.floor(e) !== e ? (__LOG__(2)`"${f(e)}" is not a valid int`, {
- path: [],
- error: "value must be an int"
- }) : (e < t || e >= n) && (__LOG__(2)`"${f(e)}" is out of range`, {
- path: [],
- error: "value is out of range"
- })
- }
- function _(e, t, n) {
- return e ? void 0 : (__LOG__(2)`"${f(n)}" is not ${t}`, {path: [], error: "value is invalid"})
- }
- function f(e) {
- return "string" == typeof e ? `"${e}"` : Array.isArray(e) ? `[${e.join(", ")}]` : `${e}`
- }
- const h = [void 0, e => d(e, -2147483648, 2147483648), e => u(e, -a, a + 1), e => d(e, 0, 4294967296), e => u(e, 0, a + 1), e => d(e, -2147483648, 2147483648), e => u(e, -a, a + 1), e => _("boolean" == typeof e, "boolean", e), (e, t) => _("number" == typeof e && (t[e] || void 0 !== t.cast(e)), "in enum", e), e => u(e, 0, a + 1), e => u(e, -a, a + 1), e => _("number" == typeof e, "number", e), e => _("string" == typeof e, "string", e), e => _(e instanceof ArrayBuffer || e instanceof Uint8Array, "ArrayBuffer or Uint8Array", e), p, e => d(e, 0, 4294967296), e => d(e, -2147483648, 2147483648), e => _("number" == typeof e, "number", e)];
- function p(e, t) {
- const {
- names: n,
- fields: r,
- types: o,
- meta: a,
- oneofToFields: c,
- fieldToOneof: l,
- reservedTags: u,
- reservedFields: d
- } = (0, i.compileSpec)(t);
- let _;
- for (let t = 0; t < n.length && !_; t++) {
- const i = n[t], p = o[t], b = e[i], m = p & s.TYPE_MASK, g = h[m];
- if (void 0 === g) throw new Error(`Can not find the validator for type ${m}`);
- if (p & (s.FLAGS.PACKED | s.FLAGS.REPEATED) && null != b) if (Array.isArray(b)) {
- const e = a[t];
- for (let t = 0; t < b.length && !_; t++) _ = g(b[t], e), _ && _.path.push(`${i}[${t}]`)
- } else __LOG__(2)`"${f(b)}" is not an array`, _ = {
- path: [i],
- error: "repeated field must be array"
- }; else if (null != b) {
- _ = g(b, a[t]), _ && _.path.push(i);
- const n = l[i];
- n && n.forEach((t => {
- c[t].filter((e => e !== i)).forEach((n => {
- void 0 !== e[n] && (_ = {path: [t], error: `oneof has fields '${i}' and '${n}' set`})
- }))
- })), u[r[t]] && (_ = {path: [i], error: `tag ${r[t]} is reserved`}), d[i] && (_ = {
- path: [i],
- error: "field name is reserved"
- })
- }
- }
- return _
- }
- }, 3955: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.decodeProtobuf = function (e, t) {
- const n = new i.Binary(t), r = g(e, n, void 0, !1);
- return (0, d.checkRequirements)(e, r), r
- }, t.decodeProtobufWithUnknowns = function (e, t) {
- const n = new i.Binary(t), r = g(e, n, void 0, !0);
- return (0, d.checkRequirements)(e, r), r
- }, t.getUnknownFields = function (e) {
- return (0, s.default)(e, "$$unsafeUnknownFields") ? e.$$unsafeUnknownFields : null
- };
- var o = r(n(3982)), i = n(9323), s = r(n(9028)), a = n(5982), c = n(6595), l = n(6154), u = n(5036),
- d = n(2525);
- function _(e, t, n) {
- if (e !== (0, u.typeToEncType)(t)) throw new Error(`FormatError: ${n} encoded with wire type ${e}`)
- }
- function f(e, t, n) {
- switch (t) {
- case l.TYPES.INT32:
- return h(n, -2147483648, 2147483648, e, i.parseInt64OrThrow);
- case l.TYPES.INT64:
- return n.readVarInt(p);
- case l.TYPES.UINT32:
- return h(n, 0, 4294967296, e, i.parseUint64OrThrow);
- case l.TYPES.UINT64:
- return n.readVarInt(b);
- case l.TYPES.SINT32: {
- const t = h(n, 0, 4294967296, e, i.parseInt64OrThrow);
- return 1 & t ? ~(t >>> 1) : t >>> 1
- }
- case l.TYPES.SINT64:
- return n.readVarInt(m);
- case l.TYPES.BOOL:
- return !!h(n, 0, 2, e, i.parseUint64OrThrow);
- case l.TYPES.ENUM:
- return n.readVarInt(i.parseInt64OrThrow);
- case l.TYPES.FIXED64:
- return n.readLong(b, !0);
- case l.TYPES.SFIXED64:
- return n.readLong(p, !0);
- case l.TYPES.DOUBLE:
- return n.readFloat64(!0);
- case l.TYPES.STRING:
- return n.readString(n.readVarInt(i.parseUint64OrThrow));
- case l.TYPES.BYTES:
- return n.readBuffer(n.readVarInt(i.parseUint64OrThrow));
- case l.TYPES.FIXED32:
- return n.readUint32(!0);
- case l.TYPES.SFIXED32:
- return n.readInt32(!0);
- case l.TYPES.FLOAT:
- return n.readFloat32(!0)
- }
- }
- function h(e, t, n, r, o) {
- const i = e.readVarInt(o);
- if (i < t || i >= n) throw new Error(`FormatError: ${r} encoded with out-of-range value ${i}`);
- return i
- }
- function p(e, t) {
- if ((0, i.longFitsInDouble)(!0, e, t)) {
- return 4294967296 * e + v(t)
- }
- {
- const n = e < 0;
- let r;
- r = n ? 0 === t ? -e : ~e : e;
- const o = n ? -t : t;
- return (0, a.createHexLongFrom32Bits)(r, o, n)
- }
- }
- function b(e, t) {
- if ((0, i.longFitsInDouble)(!1, e, t)) {
- return 4294967296 * v(e) + v(t)
- }
- return (0, a.createHexLongFrom32Bits)(e, t)
- }
- function m(e, t) {
- let n = e >>> 1, r = e << 31 | t >>> 1;
- return 1 & t && (n = ~n, r = ~r), p(n, r)
- }
- function g(e, t, n, r) {
- var s;
- const {
- names: a,
- fields: u,
- types: d,
- meta: p,
- oneofToFields: b,
- fieldToOneof: m,
- reservedTags: v,
- reservedFields: y
- } = (0, c.compileSpec)(e), {internalDefaults: w} = e, S = n || (0, o.default)({}, w) || {};
- S.$$unknownFieldCount = null !== (s = null == n ? void 0 : n.$$unknownFieldCount) && void 0 !== s ? s : 0;
- for (let e = 0; e < a.length; e++) d[e] & l.FLAGS.REPEATED && (S[a[e]] = []);
- let E = 0;
- const j = u.length > 0;
- let k = u[0];
- for (; t.size();) {
- const e = h(t, 0, 4294967296, "field and enc type", i.parseInt64OrThrow), n = 7 & e, o = e >>> 3;
- if (j && o !== k) {
- const e = E;
- do {
- ++E === u.length && (E = 0), k = u[E]
- } while (o !== k && E !== e)
- }
- if (j && o === k) {
- const e = a[E], s = d[E];
- _(n, s, e);
- const c = s & l.TYPE_MASK, u = p[E];
- if (s & l.FLAGS.PACKED) {
- const n = t.readVarInt(i.parseUint64OrThrow), r = t.readBinary(n);
- for (; r.size();) {
- var A;
- const t = f(e, c, r);
- (c !== l.TYPES.ENUM || u[t] || void 0 !== (null === (A = u.cast) || void 0 === A ? void 0 : A.call(u, t))) && S[e].push(t)
- }
- } else if (c === l.TYPES.MESSAGE) {
- const n = t.readVarInt(i.parseUint64OrThrow), o = t.readBinary(n);
- if (s & l.FLAGS.REPEATED) S[e].push(g(u, o, void 0, r)); else {
- const t = S[e];
- S[e] = g(u, o, t, r)
- }
- } else {
- var T;
- const n = f(e, c, t);
- (c !== l.TYPES.ENUM || u[n] || void 0 !== (null === (T = u.cast) || void 0 === T ? void 0 : T.call(u, n))) && (s & l.FLAGS.REPEATED ? S[e].push(n) : S[e] = n)
- }
- const h = m[e];
- h && void 0 !== S[e] && h.forEach((t => {
- b[t].filter((t => t !== e)).forEach((e => {
- delete S[e]
- }))
- })), (v[o] || y[e]) && delete S[e]
- } else if (S.$$unknownFieldCount++, r) {
- let e;
- switch (S.$$unsafeUnknownFields || (S.$$unsafeUnknownFields = {}), n) {
- case l.ENC.VARINT:
- e = t.readVarInt(i.parseInt64OrThrow);
- break;
- case l.ENC.BIT64:
- e = t.readBinary(8);
- break;
- case l.ENC.BINARY:
- e = t.readBinary(t.readVarInt(i.parseUint64OrThrow));
- break;
- case l.ENC.BIT32:
- e = t.readBinary(4)
- }
- S.$$unsafeUnknownFields[o] = e
- } else n === l.ENC.VARINT ? t.readVarInt(i.parseInt64OrThrow) : n === l.ENC.BIT64 ? t.advance(8) : n === l.ENC.BINARY ? t.advance(t.readVarInt(i.parseUint64OrThrow)) : n === l.ENC.BIT32 && t.advance(4)
- }
- return S
- }
- function v(e) {
- return e >= 0 ? e : 4294967296 + e
- }
- }, 4753: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.encodeErrorInfo = function () {
- return void 0 !== l ? `Last encoded value for ${l}` : "No information known"
- }, t.encodeProtobuf = function (e, t) {
- let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : new r.Binary;
- return (0, c.checkValid)(e, t), p(n, t, e), l = void 0, n
- };
- var r = n(9323), o = n(5982), i = n(6595), s = n(6154), a = n(5036), c = n(2525);
- let l;
- function u(e, t) {
- e.writeVarInt(t)
- }
- function d(e, t) {
- if ("number" == typeof t && t < 4503599627370496 && t >= -4503599627370496) e.writeVarInt(t >= 0 ? 2 * t : 2 * -t - 1); else {
- const n = new r.Binary;
- let i;
- "number" == typeof t ? (i = t < 0, n.writeVarInt(i ? -t : t)) : (i = (0, o.hexLongIsNegative)(t), n.writeVarIntFromHexLong(i ? (0, o.negateHexLong)(t) : t));
- const s = n.peek((() => n.readByteArray())), a = s.byteLength;
- if (i) {
- let e, t = 0;
- do {
- e = s[t], s[t] = 128 & e | (127 & e) - 1 & 127, t++
- } while (255 === s[t - 1])
- }
- let c = i ? 1 : 0;
- for (let e = 0; e < a; e++) {
- const t = s[e], n = 128 & t | (63 & t) << 1 | c;
- c = (64 & t) >> 6, s[e] = n
- }
- 1 === c && (s[a - 1] |= 128, n.writeInt8(1)), e.writeBinary(n)
- }
- }
- function _(e, t) {
- "number" == typeof t ? e.writeVarInt(t) : e.writeVarIntFromHexLong(t)
- }
- const f = [void 0, u, _, u, _, d, d, (e, t) => {
- e.writeVarInt(t ? 1 : 0)
- }, u, (e, t) => {
- "number" == typeof t ? e.writeUint64(t, !0) : e.writeHexLong(t, !0)
- }, (e, t) => {
- "number" == typeof t ? e.writeInt64(t, !0) : e.writeHexLong(t, !0)
- }, (e, t) => {
- e.writeFloat64(t, !0)
- }, function (e, t) {
- e.writeVarInt((0, r.numUtf8Bytes)(t)), e.writeString(t)
- }, function (e, t) {
- e.writeVarInt(t.byteLength), e.writeBuffer(t)
- }, function (e, t, n) {
- e.writeWithVarIntLength(((e, t) => p(e, t, n)), t)
- }, (e, t) => {
- e.writeUint32(t, !0)
- }, (e, t) => {
- e.writeInt32(t, !0)
- }, (e, t) => {
- e.writeFloat32(t, !0)
- }], h = f.map((e => {
- if (null != e) return (e, n) => {
- e.writeWithVarIntLength(t, n)
- };
- function t(t, n) {
- for (let r = 0; r < n.length; r++) e(t, n[r])
- }
- }));
- function p(e, t, n) {
- const {names: r, fields: o, types: c, meta: u} = (0, i.compileSpec)(n), {internalDefaults: d} = n;
- for (let n = 0; n < r.length; n++) {
- const i = r[n];
- let _ = t[i];
- if (null == _ && d && (_ = d[i]), null != _) {
- l = i;
- const t = o[n], r = c[n], d = r & s.TYPE_MASK, p = u[n], b = 8 * t | (0, a.typeToEncType)(r);
- if (r & s.FLAGS.PACKED) {
- if (_.length > 0) {
- e.writeVarInt(b);
- (0, h[d])(e, _, p)
- }
- } else if (r & s.FLAGS.REPEATED) for (let t = 0; t < _.length; t++) {
- e.writeVarInt(b);
- (0, f[d])(e, _[t], p)
- } else {
- e.writeVarInt(b);
- (0, f[d])(e, _, p)
- }
- }
- }
- }
- }, 480: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.initTagsLogger = function () {
- (0, r.initializeWaLogger)({debug: o, info: o, logRestricted: o, warn: o, error: o, devConsole: o})
- };
- var r = n(1784);
- function o() {
- }
- }, 1084: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.parseClientResponseServerResponse = function (e, t) {
- const n = (0, a.assertTag)(e, "iq");
- if (!n.success) return n;
- const c = (0, i.attrJidEnum)(e, "from", o.DOMAINJID_USERJID);
- if (!c.success) return c;
- const l = (0, a.literal)(a.attrString, e, "type", "result");
- if (!l.success) return l;
- const u = (0, s.attrStringFromReference)(t, ["id"]);
- if (!u.success) return u;
- const d = (0, a.literal)(a.attrString, e, "id", u.value);
- if (!d.success) return d;
- const _ = (0, a.attrInt)(e, "t");
- if (!_.success) return _;
- return (0, r.makeResult)({from: c.value, type: l.value, t: _.value})
- };
- var r = n(2207), o = n(3716), i = n(5273), s = n(2375), a = n(3263)
- }, 3716: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.DOMAINJID_USERJID = void 0;
- var r = n(4037);
- const o = {validators: [r.validateDomainJid, r.validateUserJid], typeName: "DomainJid|UserJid"};
- t.DOMAINJID_USERJID = o
- }, 8525: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.makeClientRequest = function () {
- return (0, o.mergeClientWellFormedToMixin)((0, r.smax)("iq", {
- id: (0, i.generateId)(),
- type: "get",
- xmlns: "w:p"
- }))
- };
- var r = n(1399), o = n(4068), i = n(780)
- }, 4068: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.mergeClientWellFormedToMixin = function (e) {
- const t = (0, r.smax)("iq", {to: i.S_WHATSAPP_NET});
- return (0, o.mergeStanzas)(e, t)
- };
- var r = n(1399), o = n(5640), i = n(780)
- }, 5273: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.attrBroadcastJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateBroadcastJid, "BroadcastJid")
- }, t.attrCallJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateCallJid, "CallJid")
- }, t.attrDeviceJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateDeviceJid, "DeviceJid")
- }, t.attrDomainJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateDomainJid, "DomainJid")
- }, t.attrGroupJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateGroupJid, "GroupJid")
- }, t.attrJidEnum = function (e, t, n) {
- const r = (0, i.attrString)(e, t);
- if (!r.success) return r;
- const {validators: s, typeName: a} = n;
- for (let e = 0; e < s.length; e++) {
- const t = s[e](r.value);
- if (null != t) return (0, o.makeResult)(t)
- }
- return (0, i.errorMessage)(e, `to have "${t}"={${a}}, but instead has "${r.value}"`)
- }, t.attrNewsletterJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateNewsletterJid, "NewsletterJid")
- }, t.attrStatusJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateStatusJid, "StatusJid")
- }, t.attrUserJid = function (e, t) {
- return (0, i.attrValidate)(e, t, r.validateUserJid, "UserJid")
- }, t.literalJid = function (e, t, n, r) {
- const o = e(t, n);
- if (!o.success) return o;
- if (o.value === r) return o;
- return (0, i.errorMessage)(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
- }, t.optionalLiteralJid = function (e, t, n, r) {
- const o = (0, i.optional)(e, t, n);
- if (!o.success) return o;
- if (null == o.value || o.value === r) return o;
- return (0, i.errorMessage)(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
- };
- var r = n(4037), o = n(2207), i = n(3263)
- }, 2375: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.attrFromReference = a, t.attrStringFromReference = c, t.contentStringFromReference = function (e, t) {
- const n = l(e, t);
- if (!n.success) return d(n);
- const r = (0, s.contentString)(n.value);
- if (!r.success) return d(r);
- return r
- }, t.optionalAttrFromReference = function (e, t, n, r, o) {
- return u(t, n) ? a(e, t, n, r, o) : s.voidSuccess
- }, t.optionalAttrStringFromReference = function (e, t) {
- return u(e, t) ? c(e, t) : s.voidSuccess
- };
- var o = r(n(9028)), i = n(2207), s = n(3263);
- function a(e, t, n, r, o) {
- const i = l(t, n);
- if (!i.success) return d(i);
- const s = e(i.value, n[n.length - 1], r, o);
- return s.success ? s : d(s)
- }
- function c(e, t) {
- return a(s.attrString, e, t)
- }
- function l(e, t) {
- const n = t.length;
- let r = e;
- for (let e = 0; e < n - 1; e++) {
- const n = t[e], o = (0, s.flattenedChildWithTag)(r, n);
- if (!o.success) return o;
- r = o.value
- }
- return (0, i.makeResult)(r)
- }
- function u(e, t) {
- const n = l(e, t);
- return n.success && (0, o.default)(n.value.attrs, t[t.length - 1])
- }
- function d(e) {
- return (0, i.makeError)(`in the reference, ${e.error}`)
- }
- }, 3263: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.assertAttr = function (e, t, n) {
- const r = f(e, t);
- if (!r.success) return r;
- if (r.value !== n) return k(e, `to have "${t}"="${n}", but instead has "${r.value}"`);
- return _
- }, t.assertTag = function (e, t) {
- if (e.tag !== t) return k(e, `to be <${t}>`);
- return _
- }, t.attrInt = b, t.attrIntRange = function (e, t, n, r) {
- const o = b(e, t);
- if (!o.success) return o;
- const i = o.value;
- if (void 0 !== n && i < n) return k(e, `to have "${t}"={at least ${n}} but has value ${i}`);
- if (void 0 !== r && i > r) return k(e, `to have "${t}"={at most ${r}} but has value ${i}`);
- return (0, l.makeResult)(i)
- }, t.attrStanzaId = function (e, t) {
- return h(e, t, u.toStanzaId, "stanzaID")
- }, t.attrString = f, t.attrStringEnum = function (e, t, n) {
- const r = f(e, t);
- if (!r.success) return r;
- const o = n[r.value];
- if (null != o) return (0, l.makeResult)(o);
- const i = Object.values(n).join("|");
- return k(e, `to have "${t}"={${i}}, but instead has "${r.value}"`)
- }, t.attrValidate = h, t.childWithTag = function (e, t, n) {
- const r = v(e, t, n);
- if (!r.success) return r;
- const o = r.value;
- if (null == o) return k(e, `to have 1 child <${t}>, but found 0`);
- return (0, l.makeResult)(o)
- }, t.contentBytes = j, t.contentBytesRange = function (e, t, n) {
- const r = j(e);
- if (!r.success) return r;
- const o = r.value.length;
- if (void 0 !== t && o < t) return k(e, `to have binary content at least ${t} bytes but has ${o} bytes`);
- if (void 0 !== n && o > n) return k(e, `to have binary content at most ${n} bytes but has ${o} bytes`);
- return (0, l.makeResult)(r.value)
- }, t.contentInt = function (e) {
- return p(e, T, "integer")
- }, t.contentLiteralBytes = function (e, t) {
- const n = j(e);
- if (!n.success) return n;
- if ((0, s.uint8ArraysEqual)(n.value, t)) return (0, l.makeResult)(t);
- return k(e, `to have content ":binary:${(0, o.encodeB64)(t)}", but instead has ":binary:${(0, o.encodeB64)(n.value)}"`)
- }, t.contentString = E, t.contentStringEnum = function (e, t) {
- const n = E(e);
- if (!n.success) return n;
- const r = t[n.value];
- if (null != r) return (0, l.makeResult)(r);
- const o = Object.values(t).join("|");
- return k(e, `to have content "${o}", but instead has "${n.value}"`)
- }, t.contentValidate = p, t.countChildrenWithTag = function (e, t, n, r, o) {
- const i = x(e, t, n, r);
- if (!i.success) return i;
- const s = i.value.length;
- for (let e = 0; e < s; e++) {
- const t = o(i.value[e]);
- if (!t.success) return t
- }
- return (0, l.makeResult)(s)
- }, t.countHomogeneousChildrenWithTag = function (e, t, n) {
- const r = w(e, t, n);
- if (!r.success) return r;
- return (0, l.makeResult)(r.value.length)
- }, t.emptyObject = void 0, t.errorMessage = k, t.errorMixinDisjunction = function (e, t, n) {
- const r = t.map(((e, t) => `${e}: ${n[t].error}`));
- return k(e, [`to match any of following mixins: ${t.join(", ")}, but all mixins failed.`, ...r].join(" "))
- }, t.flattenedChildWithTag = function (e, t) {
- const n = g(e, t);
- if (!n.success) return n;
- if (null == n.value) return k(e, `to have 1 child <${t}>, but found 0`);
- return (0, l.makeResult)(n.value)
- }, t.identity = function (e) {
- return e
- }, t.literal = function (e, t, n, r) {
- const o = e(t, n);
- if (!o.success) return o;
- if (o.value === r) return (0, l.makeResult)(r);
- return k(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
- }, t.literalContent = function (e, t, n) {
- const r = e(t);
- if (!r.success) return r;
- if (r.value === n) return (0, l.makeResult)(n);
- return k(t, `to have content "${n}", but instead has "${r.value}"`)
- }, t.mapChildrenWithTag = y, t.mapHomogeneousChildrenWithTag = w, t.maybeChildren = m, t.optional = S, t.optionalChild = g, t.optionalChildWithTag = v, t.optionalLiteral = function (e, t, n, r) {
- if (null == r) return _;
- const o = S(e, t, n);
- if (!o.success) return o;
- if (o.value === r) return (0, l.makeResult)(r);
- if (null == o.value) return _;
- return k(t, `to have "${n}"={${r}}, but instead has "${o.value}"`)
- }, t.voidSuccess = void 0;
- var o = n(2089), i = n(9323), s = n(9093), a = n(2924), c = r(n(9028)), l = n(2207), u = n(3417),
- d = n(3486);
- const _ = (0, l.makeResult)();
- function f(e, t) {
- return A(e, t) ? function (e, t) {
- if (t instanceof d.WapJid) return (0, l.makeResult)(t.toString());
- if ("string" == typeof t) return (0, l.makeResult)(t);
- return k(e, `decodeAsString: attribute is ${typeof t} not a string: ${String(t)}`)
- }(e, e.attrs[t]) : k(e, `to have attribute "${t}"`)
- }
- function h(e, t, n, r) {
- const o = f(e, t);
- if (!o.success) return o;
- const i = n(o.value);
- return null != i ? (0, l.makeResult)(i) : k(e, `to have "${t}"={${r}}, but instead has "${o.value}"`)
- }
- function p(e, t, n) {
- const r = E(e);
- if (!r.success) return r;
- const o = t(r.value);
- return null != o ? (0, l.makeResult)(o) : k(e, `to have ${n} content, but instead has "${r.value}"`)
- }
- function b(e, t) {
- return h(e, t, T, "integer")
- }
- function m(e) {
- const t = e.content;
- return t instanceof Uint8Array ? k(e, "to have children") : (0, l.makeResult)(t)
- }
- function g(e, t) {
- const n = m(e);
- if (!n.success) return n;
- const r = n.value;
- if (null == r) return _;
- let o = null;
- for (let n = 0; n < r.length; n++) {
- const i = r[n];
- if (i.tag === t) {
- if (null != o) return k(e, `to have 1 child <${t}>, but found more than 1`);
- o = i
- }
- }
- return (0, l.makeResult)(o)
- }
- function v(e, t, n) {
- const r = g(e, t);
- return r.success ? null == r.value ? _ : n(r.value) : r
- }
- function y(e, t, n, r, o) {
- const i = x(e, t, n, r);
- if (!i.success) return i;
- const s = [];
- for (let e = 0; e < i.value.length; e++) {
- const t = o(i.value[e]);
- if (!t.success) return t;
- s.push(t.value)
- }
- return (0, l.makeResult)(s)
- }
- function w(e, t, n) {
- const r = y(e, t, 0, 1 / 0, n);
- if (!r.success) return r;
- for (let t = 0; t < r.value.length; t++) if (!(0, a.deepEqual)(r.value[0], r.value[t])) return k(e, "to have homogeneous children, but found two children that are not equal");
- return r
- }
- function S(e, t, n, r, o) {
- return A(t, n) ? e(t, n, r, o) : _
- }
- function E(e) {
- const t = j(e);
- if (!t.success) return t;
- try {
- const e = new i.Binary(t.value), n = e.readString(e.size());
- return (0, l.makeResult)(n)
- } catch (t) {
- return k(e, `to have string content, but run into decoding error: ${t.message}`)
- }
- }
- function j(e) {
- const {content: t} = e;
- return null == t ? k(e, "to have content") : Array.isArray(t) ? k(e, "to have content, but has children instead") : (0, l.makeResult)(t)
- }
- function k(e, t) {
- return (0, l.makeError)(`expected <${e.tag}>: ${t}`)
- }
- function A(e, t) {
- return (0, c.default)(e.attrs, t)
- }
- function T(e) {
- const t = parseInt(e, 10);
- return Number.isNaN(t) ? null : t
- }
- function x(e, t, n, r) {
- const o = m(e);
- if (!o.success) return o;
- const i = o.value;
- if (null == i) return 0 !== n ? k(e, `to have at least ${n} <${t}> children, but found 0`) : (0, l.makeResult)([]);
- const s = [];
- for (let e = 0; e < i.length; e++) {
- const n = i[e];
- n.tag === t && s.push(n)
- }
- const a = s.length;
- return a < n ? k(e, `to have at least ${n} <${t}> children, but found ${a}`) : a > r ? k(e, `to have at most ${r} <${t}> children, but found ${a}`) : (0, l.makeResult)(s)
- }
- t.voidSuccess = _;
- t.emptyObject = {}
- }, 1399: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.smax = void 0;
- const r = n(780).wap;
- t.smax = r
- }, 5640: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.mergeStanzas = s, t.optionalMerge = function (e, t, n, r) {
- if (null != n) return e(t, n, r);
- return t
- };
- var r = n(4080), o = n(3486);
- const i = "smax$any";
- function s(e, t) {
- return function (e, t) {
- const n = e.tag, r = t.tag;
- if (r === i) return;
- if (n !== r) throw new Error(`tag mismatch: ${n} != ${r}`)
- }(e, t), function (e, t) {
- const n = e.attrs, r = t.attrs;
- Object.keys(r).forEach((e => {
- const t = r[e], i = n[e];
- if (null != t && null != i) {
- if (function (e, t) {
- if ("string" == typeof e && "string" == typeof t) return e === t;
- if (e instanceof o.WapJid && t instanceof o.WapJid) return e.toString() === t.toString();
- return !1
- }(t, i)) return;
- throw new Error(`conflict for key: ${e}`)
- }
- n[e] = t
- }))
- }(e, t), t.content instanceof Uint8Array ? function (e, t) {
- const n = e.content;
- if (n instanceof Uint8Array) {
- if (!(0, r.uint8ArraysEqualUNSAFE)(n, t)) throw new Error("elementValue mismatch: bytes dose not equal");
- return
- }
- if (null != n) throw new Error("elementValue mismatch: destination has children");
- e.content = t
- }(e, t.content) : null != t.content && function (e, t) {
- const n = e.content;
- if (n instanceof Uint8Array) throw new Error("children mismatch: destination has element value");
- if (null == n || 0 === n.length) return void (e.content = t);
- if (!function (e, t) {
- const n = a(t), r = a(e), o = Object.keys(n);
- for (let e = 0; e < o.length; e++) {
- const t = o[e], i = n[t], s = r[t];
- if (null != i && null != s && i !== s) return !1
- }
- return !0
- }(n, t)) throw new Error("children mismatch: child counts are not compatible");
- const r = [], o = Array.from(n);
- t.forEach((e => {
- const t = o.findIndex((t => t.tag === e.tag));
- if (-1 === t) r.push(e); else {
- const n = s(o.splice(t, 1)[0], e);
- r.push(n)
- }
- })), o.forEach((e => r.push(e))), e.content = r
- }(e, t.content), e
- }
- function a(e) {
- return e.reduce(((e, t) => {
- const n = t.tag, r = e[n];
- return e[n] = null == r ? 1 : r + 1, e
- }), {})
- }
- }, 9909: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = g;
- const n = "undefined" != typeof Promise ? Promise : null,
- r = "function" == typeof setImmediate ? setImmediate : null;
- let o = 0;
- const i = [], s = [], a = [], c = {sentinel: "CONTINUE_AS_IF_NO_HANDLER"},
- l = {sentinel: "RETRY_ASYNCHRONOUSLY"}, u = {sentinel: "TO_STRING"}, d = {sentinel: "DID_ERROR"};
- let _ = null;
- const f = [], h = 64, p = 128, b = 512, m = "undefined" == typeof self ? void 0 : self;
- function g(e, t) {
- this._flags = 0, this._value = void 0, this._onFulfilled = void 0, this._onRejected = void 0, this._context = void 0, this._resolveLevel = 0, this._control = void 0, this.x = void 0, this._thenableParent = null, this._parent = void 0, this._child = void 0, this._children = void 0, this.control = void 0, t && (this._context = t.this), "function" == typeof e && (this._onFulfilled = e, this._flags |= 4, this._flags |= 256, F(e, this._context, (e => O(this, 0, !0, !1, e)), (e => O(this, 0, !1, !1, e))))
- }
- let v, y;
- function w(e) {
- if (void 0 === e) return v;
- if (P(e)) return e;
- {
- const t = new g;
- return O(t, 0, !0, !1, e), z(t, b), t
- }
- }
- function S(e) {
- const t = new g;
- return t._value = e, z(t, 514), f.push(t), t
- }
- function E(e) {
- let t = "";
- if (e._flags & p) {
- t = (e._onFulfilled || e._onRejected).call(e._context, u)
- } else if (e._control) t = `.addRawControl(${e._control.name}, ${e._control.foo})`; else if (16 & e._flags) t = `.endWithControls(${Object.keys(e.control)})`; else if (e._flags & b) t = 1 & e._flags ? `Promise.resolve(${void 0 === e._value ? "" : e._value})` : `Promise.reject(${void 0 === e._value ? "" : e._value})`; else if (256 & e._flags) switch (3 & e._flags) {
- case 2:
- case 0:
- case 1:
- t = `new Promise(${e._onFulfilled})`
- } else e._onFulfilled && e._onRejected ? t = `.then(${e._onFulfilled}, ${e._onRejected})` : e._onFulfilled ? t = `.then(${e._onFulfilled})` : e._onRejected && (t = `.catch(${e._onRejected})`);
- return t
- }
- function j(e) {
- this.message = e, this.stack = new Error(e || this.name).stack
- }
- function k() {
- 0 === o && (s.length || f.length) && (o = 1, y || (y = function () {
- let e, t, o = 0;
- return "undefined" == typeof MutationObserver || m && m.navigator && m.navigator.standalone ? n ? function () {
- n.resolve().then(N)
- } : "function" == typeof r ? function () {
- r(N)
- } : function () {
- setTimeout(N, 0)
- } : (e = document.createTextNode(""), t = new MutationObserver(N), t.observe(e, {characterData: !0}), function () {
- e.data = o = 1 - o
- })
- }()), y())
- }
- function A(e, t) {
- z(e, 8), t._parent = e, e._children ? e._children.push(t) : e._child ? (e._children = [e._child, t], e._child = void 0) : e._child = t
- }
- function T(e) {
- if (e && ("object" == typeof e || "function" == typeof e)) {
- let t;
- try {
- t = e.then
- } catch (e) {
- return _ = e, d
- }
- if ("function" == typeof t) return t
- }
- }
- function x(e) {
- if (!e || P(e)) return e;
- const t = T(e);
- if (t === d) return S(_);
- if (t) {
- const n = new g((function (n, r) {
- t.call(e, n, r)
- }));
- return n._thenableParent = e, n
- }
- return e
- }
- function P(e) {
- return e instanceof g
- }
- function I(e, t, n) {
- const r = P(e = x(e));
- let o, i, s, a, u = !1;
- if (r) {
- if (!(3 & e._flags)) return z(e.then(t, n), 32);
- z(e, 8), u = !!(e._flags & h), s = e._context, o = 1 & e._flags ? t : n, i = e._value
- } else o = t, i = e;
- if (!o) return w(e).then();
- if (i = q(o, s, i, !0), i === d) a = S(_); else {
- if (i === l) return w(e).then(t, n);
- if (i === c) return r ? e.then() : w(e);
- a = w(i)
- }
- return u && (a = a.cancellable()), void 0 !== s && (a = a.then(), a._context = s), a
- }
- function O(e, t, n, r, o) {
- if (t !== e._resolveLevel) return;
- const i = ++e._resolveLevel;
- if (z(e, 4), e._thenableParent = null, n) if (o === e) e._parent = void 0, M(e, !1, r, new TypeError("promise resolved to itself")); else if (P(o)) {
- const t = 3 & o._flags;
- 0 === t ? A(o, e) : (e._parent = o, z(e, 1024), z(o, 8), M(e, 1 === t, r, o._value))
- } else {
- const t = T(o);
- t === d ? (e._parent = void 0, M(e, !1, r, _)) : t ? (e._parent = void 0, e._thenableParent = o, F(t, o, (t => O(e, i, !0, !1, t)), (t => O(e, i, !1, !1, t)))) : M(e, !0, r, o)
- } else M(e, !1, r, o)
- }
- function U(e, t, n, r, o) {
- t === e._resolveLevel && (R(e), O(e, t, n, r, o))
- }
- function R(e) {
- if (e._parent) {
- const t = e._parent;
- if (e._parent = void 0, t._child === e) t._child = void 0; else if (t._children) {
- const n = t._children;
- for (let t = 0; t < n.length; t++) if (n[t] === e) {
- n.splice(t, 1);
- break
- }
- 0 === n.length && (t._children = void 0)
- }
- }
- }
- function C(e) {
- if (null == e) throw new Error(`Invalid .catch guard ${e}`);
- if ("function" == typeof e) return e;
- if ("object" == typeof e) throw new Error("Object guards in .catch are currently unsupported");
- return function (t) {
- return t === e
- }
- }
- function D(e, t) {
- return function (n, r) {
- return n === u ? `.catch(..., ${t})` : e && !function (e, t) {
- for (let n = 0; n < e.length; n++) {
- const r = e[n];
- if (r === Error || r.prototype instanceof Error) {
- if (t instanceof r) return !0
- } else if (r(t)) return !0
- }
- return !1
- }(e, n) ? c : r ? l : t.call(this, n)
- }
- }
- function M(e, t, n, r) {
- if (z(e, 4 | (t ? 1 : 2)), e._value = r, e._child) $(e._child, t, n, r), e._child = void 0; else if (e._children) {
- const o = e._children;
- e._children = void 0;
- for (let e = 0; e < o.length; e++) $(o[e], t, n, r)
- } else t || 8 & e._flags || f.push(e)
- }
- function $(e, t, n, r) {
- e._resolveLevel++;
- const o = K(e, t);
- if (o && 32 & e._flags) {
- z(e, 4);
- const i = q(o, e._context, r, !0);
- if (i !== l) return void (i === d ? (e._parent = void 0, M(e, !1, n, _)) : i === c ? M(e, t, n, r) : (e._parent = void 0, O(e, e._resolveLevel, !0, n, i)));
- e._flags &= -5
- }
- o ? ((n ? a : s).push(e), k()) : M(e, t, n, r)
- }
- function L(e, t) {
- for (; 0 !== e.length;) t.push(e.pop())
- }
- function N() {
- for (; 0 !== i.length || 0 !== s.length;) {
- 0 === i.length && L(s, i);
- const e = i.pop(), t = e._parent;
- let n = !!(t && 1 & t._flags), r = t && t._value;
- const o = K(e, n);
- if (z(e, 4), o) {
- let t;
- do {
- t = q(o, e._context, r, !1)
- } while (t === l);
- t === d ? (r = _, n = !1, e._parent = void 0) : t !== c && (r = t, n = !0, e._parent = void 0)
- }
- 3 & e._flags || (O(e, e._resolveLevel, n, !0, r), L(a, i))
- }
- for (o--; 0 !== f.length;) {
- const e = f.pop();
- 8 & e._flags || B(e, e._value)
- }
- }
- g.resolve = w, g.reject = S, g.prototype.then = function (e, t) {
- "function" != typeof e && (e = void 0), "function" != typeof t && (t = void 0);
- const n = new g;
- n._onFulfilled = e, n._onRejected = t, n._context = this._context, this._flags & h && z(n, h);
- const r = 3 & this._flags;
- return 0 === r ? A(this, n) : (z(this, 8), (1 === r ? e : t) ? (n._parent = this, s.push(n), k()) : (n._parent = this, z(n, r), n._value = this._value, 2 === r && f.push(n))), n
- }, g.prototype.catch = function (e) {
- const t = arguments.length - 1;
- if (0 === t) return this.then(void 0, e);
- const n = new Array(t);
- for (let e = 0; e < t; e++) n[e] = C(arguments[e]);
- const r = D(n, arguments[t]), o = I(this, void 0, r);
- return o._onRejected && z(o, p), o
- }, g.all = function (e) {
- return new g((function (t, n) {
- let r = e.length;
- if (0 === r) return void t([]);
- const o = new Array(e.length);
- function i(e) {
- if (0 == --r) {
- const n = [];
- for (let t = 0; t < o.length; t++) {
- const r = o[t];
- n.push(r && 3 & r._flags ? r._value : e)
- }
- t(n)
- }
- return e
- }
- for (let t = 0; t < e.length; t++) o[t] = I(e[t], i, n)
- }))
- }, g.allSettled = function (e) {
- return new g((function (t) {
- const n = Array.from(e);
- let r = n.length;
- if (0 === r) return void t([]);
- const o = new Array(n.length);
- function i(e) {
- return function (n) {
- const i = e ? {status: "rejected", reason: n} : {status: "fulfilled", value: n};
- if (0 == --r) {
- const e = [];
- for (let t = 0; t < o.length; t++) {
- const n = o[t];
- e.push(n && 3 & n._flags ? n._value : i)
- }
- t(e)
- }
- return i
- }
- }
- const s = i(!1), a = i(!0);
- for (let e = 0; e < n.length; e++) o[e] = I(n[e], s, a)
- }))
- }, g.race = function (e) {
- const t = x(e);
- if (P(t)) {
- const e = t.then((e => g.race(e)));
- return e._context = void 0, e._flags &= -65, e
- }
- return new g((function (e, n) {
- for (let r = 0; r < t.length; r++) {
- const o = x(t[r]);
- if (!P(o) || 3 & o._flags) for (e(o), r++; r < t.length; r++) {
- const e = t[r];
- P(e) && z(e, 8)
- } else o.then(e, n)
- }
- }))
- }, g.prototype.toString = function () {
- const e = [];
- let t;
- for (let n = this, r = !1; n; n = n._parent) {
- t = n, !r && 3 & n._flags && (r = !0, n._flags & b || (1 & n._flags ? e.push(`[resolved value: ${n._value}]`) : e.push(`[rejected reason: ${n._value}]`)));
- let o = E(n);
- 1024 & n._flags && (o = `~${o}`), e.push(o)
- }
- return e.reverse(), 768 & t._flags || (e[0] = `[Promise]${e[0]}`), e.join("\n")
- }, g.prototype.finally = function (e) {
- function t(t) {
- return t === u ? `.finally(${e})` : (e.call(this), c)
- }
- return z(this.then(t, t), p)
- }, j.prototype = Object.create(Error.prototype, {name: {value: "AbortError"}}), g.CancellationError = j, g.prototype.cancellable = function () {
- return z(this.then(), h)
- }, g.prototype.cancel = function (e) {
- let t;
- for (let e = this; e && !(3 & e._flags); e = e._parent) e._flags & h && (t = e);
- if (t) if (void 0 === e && (e = new j), K(t, !1)) {
- const n = new g;
- R(t), A(n, t), U(n, 0, !1, !1, e)
- } else U(t, t._resolveLevel, !1, !1, e)
- };
- const J = null == (null == m ? void 0 : m.dispatchEvent) ? null : class extends Event {
- constructor(e, t) {
- super(e, {cancelable: !0}), Object.defineProperties(this, {
- promise: {
- value: t.promise,
- enumerable: !0
- }, reason: {value: t.reason, enumerable: !0}
- })
- }
- };
- function B(e, t) {
- if (null != (null == m ? void 0 : m.dispatchEvent)) {
- const n = new J("unhandledrejection", {promise: e, reason: t});
- if (m.dispatchEvent(n), !m.PromiseRejectionEvent && m.onunhandledrejection) try {
- m.onunhandledrejection(n)
- } catch (e) {
- }
- } else "undefined" != typeof process && null != process.emit ? process.emit("unhandledRejection", t, e) : console.error(`StackPromise did not catch ${t}`, e, t)
- }
- function F(e, t, n, r) {
- try {
- e.call(t, n, r)
- } catch (e) {
- r(e)
- }
- }
- function K(e, t) {
- if (!(4 & e._flags)) return t ? e._onFulfilled : e._onRejected
- }
- function q(e, t, n, r) {
- try {
- return r ? e.call(t, n, !0) : e.call(t, n)
- } catch (e) {
- return _ = e, d
- }
- }
- function z(e, t) {
- return e._flags |= t, e
- }
- v = new g, O(v, 0, !0, !1, void 0)
- }, 3274: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Offline = t.Disconnected = t.BufferTooLargeError = void 0;
- var r = n(6911);
- const o = (0, r.customError)("BufferTooLarge", !1);
- t.BufferTooLargeError = o;
- const i = (0, r.customError)("Disconnected", !1);
- t.Disconnected = i;
- const s = (0, r.customError)("Offline", !1, i);
- t.Offline = s
- }, 4857: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.AckParser = void 0, t.ackMatchesTemplate = function (e, t) {
- return e.id === t.id && (void 0 === t.class || e.class === t.class) && (void 0 === t.type || e.type === t.type) && (void 0 === t.from || i(e.from, t.from)) && (void 0 === t.participant || e.participant === t.participant) && (void 0 === t.ts || e.ts === t.ts)
- }, t.fromJidsAreEqual = i;
- var r = n(4037);
- const o = new (n(8748).WapParser)("ack", (e => (e.assertTag("ack"), {
- id: e.attrString("id"),
- ts: e.maybeAttrString("t"),
- class: e.attrString("class"),
- type: e.maybeAttrString("type"),
- from: e.attrJidWithType(),
- participant: e.hasAttr("participant") ? e.attrDeviceJid("participant") : null
- })));
- function i(e, t) {
- if ((0, r.extractFromJid)(e) === t) return !0;
- if (null != e.userJid) return (0, r.defaultDeviceJidForUser)(e.userJid) === t;
- if (null != e.deviceJid) {
- const {deviceJid: n} = e;
- return 0 === (0, r.extractDeviceId)(n) && (0, r.extractUserJid)(n) === t
- }
- return !1
- }
- t.AckParser = o
- }, 9026: (e, t, n) => {
- "use strict";
- var r = n(346).default, o = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.DEFAULT_SOCKET_ID = void 0, t.cancelDeadSocketTimer = function () {
- S && S.deadSocketTimer.cancel()
- }, t.castSmaxStanza = I, t.closeSocket = function () {
- const e = U("closeSocket").socket;
- e && (__LOG__(2)`closeSocket called`, e.close())
- }, t.closeSocketAndPreventRetry = function () {
- const e = U("closeSocketAndPreventRetry");
- e.socketLoop.endWithValue(), e.socket && (__LOG__(2)`closeSocketAndPreventRetry called`, e.socket.close())
- }, t.deprecatedCastStanza = function (e) {
- I(e)
- }, t.deprecatedSendIq = function (e, t) {
- return O(e, !1).then((e => (0, _.parseIqResponse)(e, t)))
- }, t.deprecatedSendIqErrorParser = function (e, t, n) {
- return O(e, !1).then((e => (0, _.parseIqResponse)(e, t, n)))
- }, t.deprecatedSendIqIfConnectedWithin = function (e, t, n) {
- return O(e, !1, n).then((e => (0, _.parseIqResponse)(e, t)))
- }, t.deprecatedSendIqWithoutRetry = function (e, t) {
- return O(e, !0).then((e => (0, _.parseIqResponse)(e, t)))
- }, t.deprecatedSendStanzaAndReturnAck = P, t.deprecatedSendStanzaAndWaitForAck = function (e, t) {
- return P(e, t).then((() => {
- }))
- }, t.forceAbortSocketConnection = function () {
- var e;
- const t = U("socketAbortController");
- null === (e = t.socketAbortController) || void 0 === e || e.abort()
- }, t.forceResetSocketLoop = function () {
- U("forceResetSocketLoop").socketLoop.reset()
- }, t.getComms = function () {
- return S
- }, t.isActiveSocket = function (e) {
- return U("castStanza").socketId === e
- }, t.isSocketConnected = T, t.maybeResetSocketLoop = function () {
- T() || U("maybeResetSocketLoop").socketLoop.reset()
- }, t.onStreamErrorReceived = function () {
- U("onStreamErrorReceived").socketLoop.cancelReset()
- }, t.openSocketLoop = A, t.resetStateForTests = function () {
- S = null, E = new h.Resolvable, j = 1
- }, t.sendPing = function () {
- return U("sendPing").sendPing()
- }, t.sendSmaxStanza = function (e, t) {
- var n, r, o;
- const i = null !== (n = null == t ? void 0 : t.withoutRetry) && void 0 !== n && n,
- s = null !== (r = null == t ? void 0 : t.timeoutSeconds) && void 0 !== r ? r : 0,
- a = null !== (o = null == t ? void 0 : t.signal) && void 0 !== o ? o : null;
- return O(e, i, s, a, "smax")
- }, t.singletonOrThrowIfUninitialized = U, t.socketLoopIteration = x, t.startComms = function (e, t, n) {
- if (S) return;
- S = new k(e, t, n), setTimeout(A, 0)
- }, t.startHandlingRequests = function () {
- return U("startHandlingRequests").startHandlingRequests()
- }, t.stopComms = function () {
- const e = U("stopComms");
- e.socketLoop.endWithValue(), e.socket && e.socket.close();
- S = null
- }, t.waitForConnection = function () {
- U("waitForConnection").sendPing(), E || (E = new h.Resolvable);
- return E.promise
- };
- var i = o(n(3982)), s = o(n(1504)), a = n(4857), c = n(3558), l = o(n(2065)), u = n(3274), d = n(5584),
- _ = n(2827), f = n(2521), h = n(1630), p = n(2207), b = n(8494), m = n(1084), g = n(8525), v = n(3263),
- y = n(9987), w = n(780);
- let S = null, E = null, j = 1;
- t.DEFAULT_SOCKET_ID = 0;
- class k {
- constructor(e, t, n) {
- var r, o;
- this.nextSocketId = 1, this.pendingIqs = new Map, this.ackHandlers = [], this.pendingSmaxStanzas = new Map, this._recvBlocker = new h.Resolvable, this.socketAbortController = null, this.activePing = null, this._pending = new Set, this.socketId = 0, this.socket = null, this.softCloseSocket = null, this.handleStanza = (e, t, n) => {
- const r = (0, v.attrString)(e, "id");
- if (r.success && "receipt" !== e.tag) {
- const t = r.value, n = this.pendingSmaxStanzas.get(t);
- if (n) return this.pendingSmaxStanzas.delete(t), n.resolve(e), this.maybeScheduleHealthCheck(), "NO_ACK"
- }
- const o = R(e);
- if (null != o) {
- const t = this.pendingIqs.get(o);
- t ? (this.pendingIqs.delete(o), t.resolve(e), this.maybeScheduleHealthCheck()) : (__LOG__(3)`handleIq no handler for iq with id ${o}`, __LOG__(4, void 0, new Error)`handleIq no handler for iq`)
- } else {
- if ("ack" !== e.tag) return "failure" === e.tag && this.config.shouldBlockReceivingUntilSuccess ? this._handleStanza(e, t, n) : this._recvBlocker.promise.then((() => this._handleStanza(e, t, n)));
- this.handleAck(e)
- }
- return "NO_ACK"
- }, this.healthCheckTimer = new b.ShiftTimer((() => {
- this.socketId && this.sendPing()
- })), this.deadSocketTimer = new b.ShiftTimer((e => {
- __LOG__(2)`Comms: Socket ${e} expired`, e === this.socketId && this.softCloseSocket && this.softCloseSocket()
- })), this.sendPing = (0, s.default)((function* () {
- const e = U("sendPing");
- if (!e.socketId) return __LOG__(2)`sendPing when socket dead`, Promise.resolve();
- if (e.activePing && e.activePing.socketId === e.socketId) return __LOG__(2)`sendPing ping still pending`, Promise.resolve();
- e.activePing && e.activePing.handler.resolve();
- const t = (0, g.makeClientRequest)(), n = t.attrs.id;
- if ("string" != typeof n) return __LOG__(4, void 0, new Error)`No stanzaId in ping request stanza`, Promise.resolve();
- const r = new h.Resolvable;
- e.activePing = {socketId: e.socketId, stanzaId: n, handler: r}, e.callStanza(t);
- const o = yield r.promise;
- if (o) {
- const n = (0, m.parseClientResponseServerResponse)(o, t);
- if (n.success) {
- var i, s;
- const t = (0, y.castToUnixTime)(n.value.t), r = Math.round(Date.now() / 1e3 - t);
- null === (i = (s = e.config.handlers).onClockSkewUpdate) || void 0 === i || i.call(s, r)
- }
- }
- })), this._handleStanza = e, this.onConnectionChange = (0, d.notifyConnectionChangeFactory)(null !== (r = t.handlers.onConnectionChange) && void 0 !== r ? r : () => {
- }, null !== (o = t.handlers.onOptimisticConnectionChange) && void 0 !== o ? o : () => {
- }), this.gzipInflate = n, this.config = t, this.socketLoop = new f.PromiseRetryLoop({
- name: "MainSocketLoop",
- code: x,
- timer: {
- jitter: .1,
- max: t.maxSocketLoopWaitTime,
- algo: {type: "fibonacci", first: 1e4, second: 1e4},
- relativeDelay: !0
- },
- resetDelay: 3e4
- })
- }
- filterPending(e) {
- const t = [];
- function n(n) {
- e(n) && t.push(n)
- }
- return this.pendingIqs.forEach(n), this.ackHandlers.forEach(n), this.pendingSmaxStanzas.forEach(n), t
- }
- sendPendingStanza(e) {
- var t;
- null === (t = e.cleanup) || void 0 === t || t.call(e), e.cleanup = void 0, this.callStanza(e.stanza)
- }
- maybeSendPendingStanza(e) {
- this.socket ? this.sendPendingStanza(e) : __LOG__(2)`Comms has no open socket, will resend stanza when socket opens`
- }
- callStanzaAsync(e) {
- var t = this;
- return (0, s.default)((function* () {
- return yield t.callStanza(e)
- }))()
- }
- callStanza(e) {
- const t = this.castStanza(e);
- return this.deadSocketTimer.onOrBefore(this.config.deadSocketTime, this.socketId), this.healthCheckTimer.cancel(), t
- }
- castStanzaAsync(e) {
- var t = this;
- return (0, s.default)((function* () {
- return yield t.castStanza(e)
- }))()
- }
- castStanza(e) {
- try {
- var t, n;
- const r = null === (t = (n = this.config.handlers).onBeforeCastStanzaForE2E) || void 0 === t ? void 0 : t.call(n, e);
- if (null != r) return __LOG__(4, void 0, new Error)`Dropping stanza since onBeforeCastStanza matched. (This is not expected in a non-E2E build!)`, Array.isArray(r) ? Promise.all(r.map((e => Promise.resolve(this.handleStanza(e, this.socketId, 0))))) : (this.handleStanza(r, this.socketId, 0), Promise.resolve())
- } catch (e) {
- }
- const r = this.socketOrThrow("castStanza");
- try {
- return r.sendFrame((0, w.encodeStanza)(e)).then((() => {
- var t, n;
- null === (t = (n = this.config.handlers).onCastStanza) || void 0 === t || t.call(n, e)
- })).catch((e => {
- if (__LOG__(4, void 0, new Error)`castStanza async error ${e}`, e instanceof u.BufferTooLargeError) return Promise.reject(e)
- }))
- } catch (e) {
- __LOG__(4, void 0, new Error)`castStanza error ${e}`
- }
- return Promise.resolve()
- }
- socketOrThrow(e) {
- const t = this.socket;
- if (t) return t;
- throw(0, l.default)(`Comms.${e} called while no socket`)
- }
- startHandlingRequests() {
- return __LOG__(2)`Comms.startHandlingRequests`, this._recvBlocker.resolve(), this._recvBlocker.promise.then((() => {
- }))
- }
- parseAndHandleStanza(e, t) {
- e === this.socketId && (this.deadSocketTimer.cancel(), E && (E.resolve(), E = null));
- const n = (0, w.decodeStanza)(t, this.gzipInflate).catch((e => {
- throw __LOG__(4, void 0, new Error)`Failure parsing stanza!`, e
- })).then((n => {
- var r, o;
- null === (r = (o = this.config.handlers).onHandleStanza) || void 0 === r || r.call(o, n, e, t.byteLength);
- const i = this.activePing;
- return i && i.socketId === e && i.stanzaId === R(n) ? (this.activePing = null, i.handler.resolve(n), this.maybeScheduleHealthCheck(), "NO_ACK") : this.handleStanza(n, e, t.byteLength)
- })).then((t => {
- if (e === this.socketId) {
- if ("CLOSE_SOCKET" === t) {
- __LOG__(2)`Comms: job response is CLOSE_SOCKET`;
- const e = this.socket;
- e && e.close()
- } else "NO_ACK" === t || this.castStanza(t);
- return "NO_ACK"
- }
- }));
- this._pending.add(n), n.finally((() => {
- this._pending.delete(n)
- }))
- }
- handleAck(e) {
- const t = this.ackHandlers;
- let n = -1, r = null;
- for (; !r && ++n < t.length;) r = t[n].parseAndTest(e);
- if (r) {
- var o, i;
- const s = t[n];
- (0, c.removeIndexWithoutPreservingOrder)(t, n), null === (o = (i = this.config.handlers).onHandleAck) || void 0 === o || o.call(i, e), s.resolve(r), this.maybeScheduleHealthCheck()
- } else __LOG__(3)`handleAck: unrecognized ${e}`
- }
- removeHandler(e) {
- if ("iq" === e.type || "smax" === e.type) {
- const t = e.stanza.attrs.id;
- if (!t || "string" != typeof t) return;
- if ("iq" === e.type && !this.pendingIqs.delete(t) || "smax" === e.type && !this.pendingSmaxStanzas.delete(t)) return
- } else {
- e.type;
- const t = this.ackHandlers.indexOf(e);
- if (-1 === t) return;
- (0, c.removeIndexWithoutPreservingOrder)(this.ackHandlers, t)
- }
- e.resolve(Promise.reject(new u.Disconnected))
- }
- maybeScheduleHealthCheck() {
- if (this.healthCheckTimer.isScheduled()) return;
- if (this.activePing || this.ackHandlers.length || this.pendingIqs.size || this.pendingSmaxStanzas.size) return;
- const e = this.config.healthCheckInterval, t = Math.ceil(1e3 * e * (1 + Math.random()));
- this.healthCheckTimer.onOrBefore(t)
- }
- }
- function A() {
- U("openSocketLoop").socketLoop.start()
- }
- function T() {
- var e;
- return !!(null === (e = S) || void 0 === e ? void 0 : e.socket)
- }
- function x() {
- var e, t, n;
- const o = U("socketLoopIteration");
- o.socketAbortController = new r;
- const i = o.nextSocketId++;
- return __LOG__(2)`Comms: Socket ${i} opening`, null === (e = (t = o.config.handlers).onSocketLoopIteration) || void 0 === e || e.call(t), o.config.openChatSocket((() => {
- o.onConnectionChange("in_handshake")
- }), null === (n = o.socketAbortController) || void 0 === n ? void 0 : n.signal).then((0, p.onResult)((e => {
- var t, n, r, s;
- null === (t = (n = o.config.handlers).onSocketOpen) || void 0 === t || t.call(n);
- const a = new h.Resolvable;
- return __LOG__(2)`Comms: Socket ${i} opened`, o.socketId = i, o.socket = e, o.softCloseSocket = () => {
- o.softCloseSocket = null, o.socket && o.config.shouldCloseStaleSocket && (o.socket.close(), o.socket = null), a.resolve()
- }, o.socketLoop.resetTimeoutAfter(1e4), o.deadSocketTimer.cancel(), o.maybeScheduleHealthCheck(), e.setOnFrame((e => o.parseAndHandleStanza(i, e))), e.setOnClose((() => {
- var e, t;
- __LOG__(2)`Comms: Socket ${i} closed`, o.activePing && i === o.activePing.socketId && (o.activePing.handler.resolve(), o.activePing = null), o.filterPending((e => e.attachedToSocketId === i)).forEach((e => {
- o.removeHandler(e)
- })), i === o.socketId && (o.socketId = 0, o.socket = null, o.onConnectionChange("disconnected"), null === (e = (t = o.config.handlers).onDisconnect) || void 0 === e || e.call(t), a.resolve())
- })), o.onConnectionChange("connected"), null === (r = (s = o.config.handlers).onConnect) || void 0 === r || r.call(s), o.filterPending((e => !e.attachedToSocketId)).sort(((e, t) => e.orderedId - t.orderedId)).forEach((e => {
- switch (e.type) {
- case"smax":
- case"iq":
- o.sendPendingStanza(e);
- break;
- case"ack":
- o.callStanza(e.stanza);
- break;
- default:
- e.type
- }
- })), a.promise
- }))).then((0, p.catchError)((e => {
- switch (e) {
- case"max-hunters":
- __LOG__(3)`socketLoopIteration socket closed while in noise handshake using treasureHunt strategy`;
- break;
- case"disconnected":
- __LOG__(3)`socketLoopIteration socket disconnected while in noise handshake`
- }
- }))).catch((e => {
- e instanceof u.Disconnected ? __LOG__(2)`socketLoopIteration socket closed while in noise handshake` : __LOG__(4, void 0, new Error)`socketLoopIteration failed ${e}`
- }))
- }
- function P(e, t) {
- return new Promise((n => {
- const r = U("deprecatedSendStanzaAndWaitForAck"), o = {
- type: "ack", parseAndTest: e => {
- const n = a.AckParser.parse(e);
- return !n.error && (0, a.ackMatchesTemplate)(n.success, t) ? e : null
- }, resolve: n, stanza: e, attachedToSocketId: 0, orderedId: j++
- };
- r.ackHandlers.push(o), r.socket ? r.callStanza(e).catch((e => {
- const t = r.ackHandlers.indexOf(o);
- -1 !== t && ((0, c.removeIndexWithoutPreservingOrder)(r.ackHandlers, t), o.resolve(Promise.reject(e)))
- })) : __LOG__(2)`Comms has no open socket, will send stanza when socket opens`
- }))
- }
- function I(e) {
- const t = U("castStanza");
- t.socket ? t.castStanza(e) : __LOG__(2)`Comms has no open socket`
- }
- function O(e, t) {
- let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
- r = arguments.length > 3 ? arguments[3] : void 0,
- o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : "iq";
- return new Promise((s => {
- const a = U("sendIq"), c = e.attrs.id;
- if (!c || "string" != typeof c) throw(0, l.default)(`Comms:sendIq given iq without id: ${String(e)}`);
- const d = a.socketId;
- if (t && !d) return void s(Promise.reject(new u.Offline));
- const _ = () => {
- const e = "iq" === o ? a.pendingIqs.get(c) : a.pendingSmaxStanzas.get(c);
- e ? a.removeHandler(e) : s(Promise.reject((0, l.default)(`Comms:_sendIq unexisting stanza to be cancelled: ${c}`)))
- };
- let f = null;
- if (n > 0) {
- const e = setTimeout(_, 1e3 * n);
- f = () => {
- clearTimeout(e)
- }
- }
- if (null != r) {
- if (r.aborted) return void s(Promise.reject(new u.Disconnected));
- r.addEventListener("abort", _), f = () => {
- r.removeEventListener("abort", _)
- }
- }
- const h = {resolve: s, stanza: e, attachedToSocketId: t ? d : 0, orderedId: j++, cleanup: f};
- if ("iq" === o) {
- var p, b;
- const t = (0, i.default)({type: o}, h);
- a.pendingIqs.set(c, t), null === (p = (b = a.config.handlers).onSendIq) || void 0 === p || p.call(b, e), a.maybeSendPendingStanza(t)
- } else {
- const e = (0, i.default)({type: o}, h);
- a.pendingSmaxStanzas.set(c, e), a.maybeSendPendingStanza(e)
- }
- }))
- }
- function U(e) {
- if (S) return S;
- throw(0, l.default)(`Comms::${e} called before startComms`)
- }
- function R(e) {
- if ("iq" === e.tag) {
- const t = e.attrs.type;
- if ("result" === t || "error" === t) return (0, w.decodeAsString)(e.attrs.id) || null
- }
- return null
- }
- }, 5584: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.notifyConnectionChangeFactory = function (e, t) {
- let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 15e3;
- const r = {timeoutID: null, connectionStatus: "disconnected", optimismLevel: "optimist"}, o = () => {
- const {optimismLevel: e, connectionStatus: o} = r;
- "optimist" === e ? r.timeoutID = setTimeout((() => {
- r.optimismLevel = "realist", t(o)
- }), n) : t(o)
- };
- return n => {
- r.connectionStatus = n, "disconnected" === n || "in_handshake" === n ? o() : (null != r.timeoutID && (clearTimeout(r.timeoutID), r.timeoutID = null), t(n)), e(n)
- }
- }
- }, 6581: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.XmppParsingFailure = t.ParsableWapNode = void 0;
- var o = n(9323), i = r(n(2065)), s = n(4037), a = n(1330), c = n(8481), l = n(717), u = n(9987), d = n(780),
- _ = n(3486);
- class f extends Error {
- constructor(e, t) {
- super(`XmppParsingFailure: ${e}: ${t}`), this.name = "XmppParsingFailure", this.parser = e, this.reason = t
- }
- toString() {
- return `XmppParsingFailure: ${this.parser}: ${this.reason}`
- }
- }
- t.XmppParsingFailure = f;
- class h extends c.ParsableXmlNode {
- constructor(e, t) {
- super(e, t)
- }
- assertFromServer() {
- const e = this.attrString("from");
- e !== s.WA_SERVER_JID_SUFFIX && this.throw(`to have "from"="s.whatsapp.net", but instead has "${e}"`)
- }
- attrUserJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return null == n.userJid ? this.throw(`to have "${e}"={UserJid}, but instead has "${t}"`) : n.userJid
- }
- attrPhoneUserJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return "phoneUser" === n.jidType ? n.userJid : this.throw(`to have "${e}"={PhoneUserJid}, but instead has "${t}"`)
- }
- attrLidUserJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return "lidUser" === n.jidType ? n.userJid : this.throw(`to have "${e}"={LidUserJid}, but instead has "${t}"`)
- }
- maybeAttrUserJid(e) {
- return this.hasAttr(e) ? this.attrUserJid(e) : null
- }
- maybeAttrPhoneUserJid(e) {
- return this.hasAttr(e) ? this.attrPhoneUserJid(e) : null
- }
- maybeAttrLidUserJid(e) {
- return this.hasAttr(e) ? this.attrLidUserJid(e) : null
- }
- attrGroupJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return null == n.groupJid ? this.throw(`to have "${e}"={GroupJid}, but instead has "${t}"`) : n.groupJid
- }
- maybeAttrGroupJid(e) {
- return this.hasAttr(e) ? this.attrGroupJid(e) : null
- }
- attrChatJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return null != n.userJid ? n.userJid : null != n.groupJid ? n.groupJid : this.throw(`to have "${e}"={ChatJid}, but instead has "${t}"`)
- }
- attrPhoneChatJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return "phoneUser" === n.jidType ? n.userJid : "group" === n.jidType ? n.groupJid : this.throw(`to have "${e}"={ChatJid}, but instead has "${t}"`)
- }
- attrDeviceJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return null != n.deviceJid ? n.deviceJid : null != n.userJid ? (0, s.defaultDeviceJidForUser)(n.userJid) : this.throw(`to have "${e}"={DeviceJid}, but instead has "${t}"`)
- }
- attrPhoneDeviceJid(e) {
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return "phoneDevice" === n.jidType ? n.deviceJid : "phoneUser" === n.jidType ? (0, s.defaultPhoneDeviceJidForUser)(n.userJid) : this.throw(`to have "${e}"={DeviceJid}, but instead has "${t}"`)
- }
- attrDeviceId(e) {
- const t = this.attrInt(e);
- return (0, s.interpretAsDeviceId)(t)
- }
- attrFromJidChat() {
- const e = this.attrJidWithType();
- switch (e.jidType) {
- case"msgrUser": {
- const t = e.userJid, n = (0, s.defaultDeviceJidForUser)(t);
- return {type: "device", chat: t, deviceJid: n, author: n}
- }
- case"interopUser": {
- const t = e.userJid, n = (0, s.defaultDeviceJidForUser)(t);
- return {type: "device", chat: t, deviceJid: n, author: n}
- }
- case"phoneUser": {
- const t = e.userJid, n = (0, s.defaultDeviceJidForUser)(t);
- return {type: "device", chat: t, deviceJid: n, author: n}
- }
- case"lidUser": {
- const t = e.userJid, n = (0, s.defaultLidDeviceJidForLidUserJid)(t);
- return {type: "device", chat: t, deviceJid: n, author: n}
- }
- case"phoneDevice": {
- const t = e.deviceJid;
- return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
- }
- case"msgrDevice": {
- const t = e.deviceJid;
- return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
- }
- case"interopDevice": {
- const t = e.deviceJid;
- return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
- }
- case"lidDevice": {
- const t = e.deviceJid;
- return {type: "device", chat: (0, s.extractUserJid)(t), deviceJid: t, author: t}
- }
- case"group": {
- const t = this.hasAttr("participant") ? this.attrDeviceJid("participant") : null;
- return null == t ? this.throw("expected to have participant JID for group") : {
- type: "group",
- chat: e.groupJid,
- groupJid: e.groupJid,
- author: t
- }
- }
- case"broadcast": {
- const t = this.hasAttr("participant") ? this.attrDeviceJid("participant") : null;
- return null == t ? this.throw("expected to have participant JID for group") : {
- type: "broadcast",
- broadcastJid: e.broadcastJid,
- chat: (0, s.extractUserJid)(t),
- author: t
- }
- }
- case"call":
- throw __LOG__(4, void 0, new Error)`ParsableWapNode: attrFromJid() is called with ${e.callJid}`, (0, i.default)("ParsableWapNode: attrFromJid() does not support CallJid");
- default:
- return e.jidType, this.throw(`attrFromJidChat should not be used with jid of type ${e.jidType}`)
- }
- }
- attrFromJidPhoneChat() {
- const e = this.attrJidWithType();
- switch (e.jidType) {
- case"phoneUser": {
- const t = e.userJid, n = (0, s.defaultPhoneDeviceJidForUser)(t);
- return {type: "device", chat: t, deviceJid: n, author: n}
- }
- case"phoneDevice": {
- const t = e.deviceJid;
- return {type: "device", chat: (0, s.extractPhoneUserJid)(t), deviceJid: t, author: t}
- }
- case"group": {
- const t = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
- return null == t ? this.throw("expected to have participant JID for group") : {
- type: "group",
- chat: e.groupJid,
- groupJid: e.groupJid,
- author: t
- }
- }
- case"broadcast": {
- const t = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
- return null == t ? this.throw("expected to have participant JID for group") : {
- type: "broadcast",
- broadcastJid: e.broadcastJid,
- chat: (0, s.extractPhoneUserJid)(t),
- author: t
- }
- }
- case"call":
- throw __LOG__(4, void 0, new Error)`ParsableWapNode: attrFromJid() is called with ${e.callJid}`, (0, i.default)("ParsableWapNode: attrFromJid() does not support CallJid");
- default:
- return e.jidType, this.throw(`attrFromJidChat should not be used with jid of type ${e.jidType}`)
- }
- }
- attrFromPhoneJid() {
- if ("status" === this.attrJidWithType().jidType) {
- const e = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
- return null == e ? this.throw("to have participant for status msg") : {
- type: "status",
- author: e
- }
- }
- return this.attrFromJidPhoneChat()
- }
- attrFromJid() {
- const e = this.attrJidWithType();
- if ("status" === e.jidType) {
- const e = this.hasAttr("participant") ? this.attrPhoneDeviceJid("participant") : null;
- return null == e ? this.throw("to have participant for status msg") : {
- type: "status",
- author: e
- }
- }
- return "newsletter" === e.jidType ? {
- type: "newsletter",
- newsletterJid: e.newsletterJid
- } : this.attrFromJidChat()
- }
- attrJidWithType() {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "from";
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return "unknown" === n.jidType ? this.throw(`to have "${e}"={Jid}, but instead has "${t}"`) : n
- }
- attrWapJid() {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "from";
- const t = this.attrString(e), n = (0, s.interpretAndValidateJid)(t);
- return "unknown" === n.jidType ? _.WapJid.create(null, t) : (0, d.JID)((0, s.extractFromJid)(n))
- }
- attrLongInt(e) {
- const t = this.attrString(e);
- return (0, a.decimalStringToLongInt)(t)
- }
- attrTime(e) {
- return (0, u.castToUnixTime)(this.attrInt(e))
- }
- attrFutureTime(e) {
- const t = this.attrInt(e);
- return (0, u.futureUnixTime)(t)
- }
- contentString() {
- if (this.hasChildren()) return this.throw("to have string content, but has children instead");
- if (this.hasContent()) {
- const e = new o.Binary(this.contentBytes());
- return e.readString(e.size())
- }
- return this.throw("to have content")
- }
- decodeAsString(e) {
- return (0, d.decodeAsString)(e)
- }
- contentSerializedPubKey() {
- return this.hasContent() ? (0, l.serializeIdentity)(this.contentBytes()) : this.throw("to have content")
- }
- createParseError(e) {
- return new f(this.name(), `expected <${this.tag()}> ${e}`)
- }
- throw(e) {
- throw this.createParseError(e)
- }
- }
- t.ParsableWapNode = h
- }, 2827: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.parseIqResponse = function (e, t, n) {
- const i = e.content;
- if (i && Array.isArray(i) && i[0]) {
- const t = i[0];
- if ("error" === t.tag) {
- const i = t.attrs || {};
- let s;
- n && (s = "function" == typeof n ? n(e) : n.parseOrThrow(t));
- const a = s;
- return {
- success: !1,
- errorCode: parseInt(i.code, 10),
- errorText: (0, r.decodeAsString)(i.text) || "",
- errorType: (0, r.decodeAsString)(i.type) || "",
- errorBackoff: parseInt(i.backoff, 10),
- toString: o,
- customError: a
- }
- }
- }
- return "function" == typeof t ? {success: !0, result: t(e)} : {success: !0, result: t.parseOrThrow(e)}
- };
- var r = n(780);
- function o() {
- return `IqError ${this.errorCode}: ${this.errorText}`
- }
- }, 780: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.BIG_ENDIAN_CONTENT = function (e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 4, n = e;
- const r = new Uint8Array(t);
- for (let e = t - 1; e >= 0; e--) r[e] = 255 & n, n >>>= 8;
- return r
- }, t.BROADCAST_JID = function (e) {
- return V(e)
- }, t.CALL_JID = function (e) {
- return V(e)
- }, t.CUSTOM_STRING = function (e) {
- return e
- }, t.DEVICE_JID = function (e) {
- return V(e)
- }, t.DOMAIN_JID = X, t.DROP_ATTR = void 0, t.GROUP_JID = function (e) {
- return V(e)
- }, t.G_US = void 0, t.INT = function (e) {
- return e.toString()
- }, t.JID = V, t.LONG_INT = function (e) {
- return (0, c.longIntToDecimalString)(e)
- }, t.MAYBE_CUSTOM_STRING = function (e) {
- if (null == e) return j;
- return e
- }, t.NEWSLETTER = void 0, t.NEWSLETTER_JID = function (e) {
- return V(e)
- }, t.PARTICIPANT_JID = function (e) {
- return "status" === e.type || "group" === e.type || "broadcast" === e.type ? V(e.author) : j
- }, t.STANZA_ID = function (e) {
- return e
- }, t.S_WHATSAPP_NET = t.STATUS_BROADCAST = void 0, t.TO_JID = function (e) {
- return V(H(e))
- }, t.TO_WAP_JID = function (e) {
- return "phoneDevice" === e.jidType || "msgrDevice" === e.jidType || "lidDevice" === e.jidType ? V(e.deviceJid) : "phoneUser" === e.jidType || "msgrUser" === e.jidType || "lidUser" === e.jidType ? V(e.userJid) : "group" === e.jidType ? V(e.groupJid) : "status" === e.jidType ? V(e.statusJid) : "call" === e.jidType ? V(e.callJid) : "interopDevice" === e.jidType ? V(e.deviceJid) : "interopUser" === e.jidType ? V(e.userJid) : "newsletter" === e.jidType ? V(e.newsletterJid) : (e.jidType, V(e.broadcastJid))
- }, t.USER_JID = function (e) {
- return V(e)
- }, t.WapNode = void 0, t.decodeAsString = function (e) {
- if (e instanceof u.WapJid) return e.toString();
- return e
- }, t.decodeStanza = function (e, t) {
- const n = new i.Binary(e);
- if (2 & n.readUint8()) return __LOG__(2)`Decoding compressed stanza`, t(n.readByteArray()).then((e => z(new i.Binary(e))));
- return Promise.resolve(z(n))
- }, t.decodeStanzaDebug = function (e) {
- const t = new i.Binary(e);
- if (2 & t.readUint8()) throw(0, s.default)("Cannot pass compressed stanza to decodeStanzaDebug");
- return z(t)
- }, t.enableXMLFormat = function () {
- I = !0
- }, t.encodeStanza = function (e) {
- const t = e instanceof O ? e : C(e), n = new i.Binary;
- D(t, n);
- const r = n.readByteArray(), o = new Uint8Array(1 + r.length);
- return o[0] = 0, o.set(r, 1), o
- }, t.extractParticipantJid = function (e) {
- switch (e.type) {
- case"group":
- case"status":
- case"broadcast":
- return e.author;
- default:
- return e.type, null
- }
- }, t.extractToJid = H, t.generateId = function () {
- if (!S) {
- const e = new Uint16Array(2);
- self.crypto.getRandomValues(e), S = `${String(e[0])}.${String(e[1])}-`
- }
- return `${S}${E++}`
- }, t.makeStanza = C, t.makeWapNode = U, t.wap = void 0;
- var o = r(n(7537)), i = n(9323), s = r(n(2065)), a = n(4037), c = n(1330), l = n(4493), u = n(3486),
- d = r(n(8132)), _ = n(3260);
- const f = a.MSGR_USER_DOMAIN.replace("@", ""), h = a.WA_USER_DOMAIN.replace("@", ""),
- p = a.LID_DOMAIN.replace("@", ""), b = a.INTEROP_DOMAIN.replace("@", ""), m = [236, 237, 238, 239],
- g = 248, v = 249, y = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", ".", "�", "�", "�", "�"],
- w = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
- let S = "", E = 1;
- const j = {sentinel: "DROP_ATTR"};
- t.DROP_ATTR = j;
- const k = u.WapJid.create(null, "g.us");
- t.G_US = k;
- const A = u.WapJid.create(null, a.WA_SERVER_JID_SUFFIX);
- t.S_WHATSAPP_NET = A;
- const T = u.WapJid.create("status", "broadcast");
- t.STATUS_BROADCAST = T;
- const x = u.WapJid.create(null, "newsletter");
- t.NEWSLETTER = x;
- const P = {};
- let I = !1;
- class O {
- constructor(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : P,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
- this.tag = e, this.attrs = t, this.content = n
- }
- toString() {
- let e = "<" + this.tag;
- e += (0, _.attrsToString)(this.attrs);
- const t = this.content;
- return Array.isArray(t) ? e += `>${t.map(String).join("")}</${this.tag}>` : e += t ? `>${(0, _.uint8ArrayToDebugString)(t)}</${this.tag}>` : " />", I && (e = (0, d.default)(e)), e
- }
- }
- function U(e, t, n) {
- let r = null;
- if (t && null != t.children) throw(0, s.default)('Children should not be passed via props (see eslint check "react/no-children-props")');
- if (Array.isArray(n)) r = n.filter(Boolean); else if ("string" == typeof n) r = i.Binary.build(n).readByteArray(); else if (n instanceof ArrayBuffer) r = new Uint8Array(n); else if (n instanceof Uint8Array) r = n; else {
- const e = [];
- for (let t = 2; t < arguments.length; t++) {
- const n = arguments[t];
- n && e.push(n)
- }
- r = e
- }
- Array.isArray(r) && 0 === r.length && (r = null);
- const o = {};
- if (t) {
- const n = t;
- Object.keys(n).forEach((t => {
- if (["__self", "__source"].includes(t)) return;
- const r = n[t];
- if (null == r) throw(0, s.default)(`Attr ${t} in <${e}> is null`);
- r !== j && (o[t] = r)
- }))
- }
- return new O(e, o, r)
- }
- t.WapNode = O;
- const R = U;
- function C(e) {
- let t = e.content;
- return Array.isArray(t) ? t = t.map(C) : "string" == typeof t && (t = i.Binary.build(t).readByteArray()), new O(e.tag, e.attrs || P, t)
- }
- function D(e, t) {
- if (null == e) t.writeUint8(0); else if (e instanceof O) M(e, t); else if (e instanceof u.WapJid) !function (e, t) {
- const n = e.getInnerJid();
- if (n.type === u.WAP_JID_SUBTYPE.JID_U) {
- const {user: e, device: r, domainType: o} = n;
- t.writeUint8(247), t.writeUint8(o), t.writeUint8(r), D(e, t)
- } else if (n.type === u.WAP_JID_SUBTYPE.JID_FB) {
- const {user: e, device: r} = n;
- t.writeUint8(246), D(e, t), t.writeUint16(r), D(h, t)
- } else if (n.type === u.WAP_JID_SUBTYPE.JID_INTEROP) {
- const {user: e, device: r, integrator: o} = n;
- t.writeUint8(245), D(e, t), t.writeUint16(r), t.writeUint16(o), D(h, t)
- } else {
- const {user: e, server: r} = n;
- t.writeUint8(250), null != e ? D(e, t) : t.writeUint8(0), D(r, t)
- }
- }(e, t); else if ("string" == typeof e) J(e, t); else {
- if (!(e instanceof Uint8Array)) throw(0, s.default)("Invalid payload type " + typeof e);
- !function (e, t) {
- F(e.length, t), t.writeByteArray(e)
- }(e, t)
- }
- }
- function M(e, t) {
- if (void 0 === e.tag) return t.writeUint8(g), void t.writeUint8(0);
- let n = 1;
- e.attrs && (n += 2 * Object.keys(e.attrs).length), e.content && n++, n < 256 ? (t.writeUint8(g), t.writeUint8(n)) : n < 65536 && (t.writeUint8(v), t.writeUint16(n)), D(e.tag, t), e.attrs && Object.keys(e.attrs).forEach((n => {
- J(n, t), D(e.attrs[n], t)
- }));
- const r = e.content;
- if (Array.isArray(r)) {
- r.length < 256 ? (t.writeUint8(g), t.writeUint8(r.length)) : r.length < 65536 && (t.writeUint8(v), t.writeUint16(r.length));
- for (let e = 0; e < r.length; e++) M(r[e], t)
- } else r && D(r, t)
- }
- let $, L;
- function N(e) {
- const t = new Map;
- for (let n = 0; n < e.length; n++) t.set(e[n], n);
- return t
- }
- function J(e, t) {
- if ("" === e) return t.writeUint8(252), void t.writeUint8(0);
- null == $ && ($ = N(l.SINGLE_BYTE_TOKEN));
- const n = $.get(e);
- if (null != n) return void t.writeUint8(n + 1);
- if (null == L) {
- L = [];
- for (let e = 0; e < l.DICTIONARIES.length; ++e) L.push(N(l.DICTIONARIES[e]))
- }
- for (let n = 0; n < L.length; ++n) {
- const r = L[n].get(e);
- if (null != r) return t.writeUint8(m[n]), void t.writeUint8(r)
- }
- const r = (0, i.numUtf8Bytes)(e);
- if (r < 128) {
- if (!/[^0-9.-]+?/.exec(e)) return void B(e, 255, t);
- if (!/[^0-9A-F]+?/.exec(e)) return void B(e, 251, t)
- }
- F(r, t), t.writeString(e)
- }
- function B(e, t, n) {
- const r = e.length % 2 == 1;
- n.writeUint8(t);
- let o = Math.ceil(e.length / 2);
- r && (o |= 128), n.writeUint8(o);
- let i = 0;
- for (let r = 0; r < e.length; r++) {
- const o = e.charCodeAt(r);
- let a = null;
- if (48 <= o && o <= 57 ? a = o - 48 : 255 === t ? 45 === o ? a = 10 : 46 === o && (a = 11) : 251 === t && 65 <= o && o <= 70 && (a = o - 55), null == a) throw(0, s.default)(`Cannot nibble encode ${o}`);
- r % 2 == 0 ? (i = a << 4, r === e.length - 1 && (i |= 15, n.writeUint8(i))) : (i |= a, n.writeUint8(i))
- }
- }
- function F(e, t) {
- if (e < 256) t.writeUint8(252), t.writeUint8(e); else if (e < 1048576) t.writeUint8(253), t.writeUint8(e >>> 16 & 255), t.writeUint8(e >>> 8 & 255), t.writeUint8(255 & e); else {
- if (!(e < 4294967296)) throw(0, s.default)(`Binary with length ${e} is too big for WAP protocol`);
- t.writeUint8(254), t.writeUint32(e)
- }
- }
- function K(e, t) {
- const n = e.readUint8();
- if (0 === n) return null;
- if (n === g) return q(e, e.readUint8());
- if (n === v) return q(e, e.readUint16());
- if (252 === n) {
- const n = e.readUint8();
- return G(e, n, t)
- }
- if (253 === n) {
- const n = e.readUint8(), r = e.readUint8(), o = e.readUint8();
- return G(e, ((15 & n) << 16) + (r << 8) + o, t)
- }
- if (254 === n) {
- const n = e.readUint32();
- return G(e, n, t)
- }
- if (250 === n) return function (e) {
- const t = function (e) {
- const t = K(e, !0);
- if (null != t && "string" != typeof t) throw(0, s.default)("WAWap:decodeNullableString got invalid value, string expected");
- return t
- }(e), n = W(e);
- return u.WapJid.create(t, n)
- }(e);
- if (246 === n) return function (e) {
- const t = W(e), n = e.readUint16();
- return W(e), u.WapJid.createFbJid(t, n)
- }(e);
- if (245 === n) return function (e) {
- const t = W(e), n = e.readUint16(), r = e.readUint16();
- return W(e), u.WapJid.createInteropJid(t, n, r)
- }(e);
- if (247 === n) return function (e) {
- let t = null;
- const n = e.readUint8();
- if (0 === n) t = u.DomainType.WHATSAPP; else {
- if (1 !== n) throw(0, s.default)(`decodeJidU - Invalid domain type encoding ${n}`);
- t = u.DomainType.LID
- }
- const r = e.readUint8(), o = W(e);
- return u.WapJid.createJidU(o, t, r)
- }(e);
- if (255 === n) {
- const t = e.readUint8();
- return Y(e, y, t >>> 7, 127 & t)
- }
- if (251 === n) {
- const t = e.readUint8();
- return Y(e, w, t >>> 7, 127 & t)
- }
- if (n <= 0 || n >= 240) throw(0, s.default)("Unable to decode WAP buffer");
- if (n >= 236 && n <= 239) {
- const t = n - 236, r = l.DICTIONARIES[t];
- if (void 0 === r) throw(0, s.default)(`Missing WAP dictionary ${t}`);
- const o = e.readUint8(), i = r[o];
- if (void 0 === i) throw(0, s.default)(`Invalid value index ${o} in dict ${t}`);
- return i
- }
- const r = l.SINGLE_BYTE_TOKEN[n - 1];
- if (void 0 === r) throw(0, s.default)(`Undefined token with index ${n}`);
- return r
- }
- function q(e, t) {
- const n = [];
- for (let r = 0; r < t; r++) n.push(z(e));
- return n
- }
- function z(e) {
- const t = e.readUint8();
- let n, r;
- if (t === g) n = e.readUint8(); else {
- if (t !== v) throw(0, s.default)(`Failed to decode node since type byte ${String(t)} is invalid`);
- n = e.readUint16()
- }
- let o = null;
- if (0 === n) throw(0, s.default)("Failed to decode node, list cannot be empty");
- const i = W(e);
- for (n -= 1; n > 1;) {
- r || (r = {});
- const t = W(e), o = K(e, !0);
- r[t] = o, n -= 2
- }
- return 1 === n && (o = K(e, !1), o instanceof u.WapJid && (o = String(o))), new O(i, r, o)
- }
- function W(e) {
- const t = K(e, !0);
- if ("string" != typeof t) throw(0, s.default)("WAWap:decodeString got invalid value, string expected");
- return t
- }
- function G(e, t) {
- let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- return n ? e.readString(t) : e.readByteArray(t)
- }
- function Y(e, t, n, r) {
- const o = new Array(2 * r - n);
- for (let n = 0; n < o.length - 1; n += 2) {
- const r = e.readUint8();
- o[n] = t[r >>> 4], o[n + 1] = t[15 & r]
- }
- if (n) {
- const n = e.readUint8();
- o[o.length - 1] = t[n >>> 4]
- }
- return o.join("")
- }
- function H(e) {
- switch (e.type) {
- case"group":
- return e.groupJid;
- case"status":
- return a.STATUS_JID;
- case"device":
- return e.deviceJid;
- case"newsletter":
- return e.newsletterJid;
- default:
- return e.type, e.broadcastJid
- }
- }
- function V(e) {
- const t = (0, a.validateDomainJid)(e);
- if (null != t) return X(t);
- const n = e.split("@");
- let r = n[0];
- const o = n[1];
- let i = null, s = null;
- if (o !== h && o !== f && o !== b && o !== p || -1 !== r.indexOf(":") && ([r, i] = r.split(":"), s = parseInt(i, 10)), o === b) {
- const [e, t] = r.split("-");
- return u.WapJid.createInteropJid(t, s, parseInt(e, 10))
- }
- if (o === f) return u.WapJid.createFbJid(r, s);
- const c = o === p ? u.DomainType.LID : u.DomainType.WHATSAPP;
- return null != s && 0 !== s ? u.WapJid.createJidU(r, c, s) : u.WapJid.create(r, o)
- }
- function X(e) {
- return "s.whatsapp.net" === e ? A : "g.us" === e ? k : "newsletter" === e ? x : (0, o.default)(e)
- }
- t.wap = R
- }, 3486: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.WapJid = t.WAP_JID_SUBTYPE = t.DomainType = void 0;
- var r = n(4037);
- const o = {JID: 0, JID_U: 1, JID_AD: 1, JID_FB: 3, JID_INTEROP: 4};
- t.WAP_JID_SUBTYPE = o;
- const i = n(4302)({WHATSAPP: 0, LID: 1});
- t.DomainType = i;
- class s {
- constructor(e) {
- this._jid = e
- }
- static createAD(e, t, n) {
- return new s({
- type: o.JID_AD,
- user: e,
- device: null == n ? 0 : n,
- agent: null == t ? 0 : t,
- domainType: i.WHATSAPP
- })
- }
- static createJidU(e, t, n) {
- return new s({
- type: o.JID_U,
- user: e,
- device: null == n ? 0 : n,
- domainType: null == t ? i.WHATSAPP : t
- })
- }
- static createFbJid(e, t) {
- return new s({type: o.JID_FB, user: e, device: null == t ? 0 : t})
- }
- static createInteropJid(e, t, n) {
- return new s({type: o.JID_INTEROP, user: e, device: null == t ? 0 : t, integrator: n})
- }
- static create(e, t) {
- return new s({type: o.JID, user: e, server: t})
- }
- toString() {
- if (this._jid.type === o.JID_AD || this._jid.type === o.JID_U) {
- const {user: e, device: t, domainType: n} = this._jid,
- o = n === i.WHATSAPP ? r.WA_USER_JID_SUFFIX : r.LID_SUFFIX;
- return 0 === t ? `${e}@${o}` : `${e}:${t}@${o}`
- }
- if (this._jid.type === o.JID_FB) {
- const {user: e, device: t} = this._jid;
- return `${e}:${t}@${r.MSGR_USER_JID_SUFFIX}`
- }
- if (this._jid.type === o.JID_INTEROP) {
- const {user: e, device: t, integrator: n} = this._jid;
- return `${n}-${e}:${t}@${r.INTEROP_USER_JID_SUFFIX}`
- }
- {
- this._jid.type;
- const {user: e, server: t} = this._jid;
- return null != e ? `${e}@${t}` : t
- }
- }
- getInnerJid() {
- return this._jid
- }
- }
- t.WapJid = s
- }, 8748: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.WapParser = void 0;
- var o = r(n(2065)), i = n(6581);
- t.WapParser = class {
- constructor(e, t) {
- this._name = e, this._parser = t
- }
- parse(e) {
- const t = new i.ParsableWapNode(this._name, e);
- try {
- return {success: this._parser(t)}
- } catch (e) {
- if (e instanceof i.XmppParsingFailure) return {error: e};
- throw e
- }
- }
- parseOrThrow(e) {
- const t = this.parse(e);
- if (t.error) throw(0, o.default)(String(t.error));
- return t.success
- }
- }
- }, 3417: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.toStanzaId = function (e) {
- return e
- }
- }, 8397: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.expand = c, t.extractAndExpand = function (e, t, n) {
- return (0, i.extractSha256)(null, e).then((e => c(new Uint8Array(e), t, n)))
- }, t.extractWithSaltAndExpand = function (e, t, n, r) {
- return (0, i.extractSha256)(t, e).then((e => c(new Uint8Array(e), n, r)))
- };
- var o = n(9323), i = n(3155), s = r(n(2065));
- const a = 255 * i.SHA256_BYTE_LENGTH;
- function c(e, t, n) {
- if (n < 0 || n > a) return Promise.reject((0, s.default)(`HKDF::expand given bad length ${n}`));
- let r;
- const c = Math.ceil(n / i.SHA256_BYTE_LENGTH), l = o.Binary.build(t).readByteArray(), u = new o.Binary;
- let d = (0, i.encodeKeySha256)(e).then((e => (r = e, new Uint8Array(0))));
- for (let e = 1; e <= c; e++) d = d.then((t => (0, i.sign)(r, o.Binary.build(t, l, e).readByteArray()))).then((e => {
- const t = new Uint8Array(e);
- return u.writeByteArray(t), t
- }));
- return d.then((() => u.readBuffer(n)))
- }
- }, 3155: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.SHA256_BYTE_LENGTH = t.DEFAULT_SALT = void 0, t.encodeKeySha256 = function (e) {
- return c(i, e)
- }, t.extractSha256 = function (e, t) {
- return c(i, null != e ? e : o).then((e => l(e, t)))
- }, t.hmacSha1 = function (e, t, n) {
- return c(a, e).then((e => l(e, t, n)))
- }, t.hmacSha256 = function (e, t, n) {
- return c(i, e).then((e => l(e, t, n)))
- }, t.hmacSha512 = function (e, t, n) {
- return c(s, e).then((e => l(e, t, n)))
- }, t.sign = l;
- var r = n(29);
- t.SHA256_BYTE_LENGTH = 32;
- const o = new Uint8Array(32);
- t.DEFAULT_SALT = o;
- const i = {name: "HMAC", hash: "SHA-256"}, s = {name: "HMAC", hash: "SHA-512"},
- a = {name: "HMAC", hash: "SHA-1"};
- function c(e, t) {
- const n = (0, r.castTypedArrays)(Uint8Array, t);
- return self.crypto.subtle.importKey("raw", n, e, !1, ["sign"]).then((t => ({key: t, algo: e})))
- }
- function l(e, t, n) {
- let {key: r, algo: o} = e;
- return self.crypto.subtle.sign(o, r, t).then((e => null != n && 0 !== n ? e.slice(0, n) : e))
- }
- }, 3596: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), Object.defineProperty(t, "hash", {
- enumerable: !0,
- get: function () {
- return r.hash
- }
- }), t.lowlevel = t.keypairFromSecretKey = t.keyPair = void 0, Object.defineProperty(t, "scalarMult", {
- enumerable: !0,
- get: function () {
- return r.scalarMult
- }
- }), t.signDetachedVerify = void 0, Object.defineProperty(t, "verify", {
- enumerable: !0, get: function () {
- return r.verify
- }
- });
- var r = n(4462);
- const o = {
- scalarbase: r.lowlevel.scalarbase,
- crypto_hash: r.lowlevel.crypto_hash,
- modL: r.lowlevel.modL,
- pack25519: r.lowlevel.pack25519,
- S: r.lowlevel.S,
- M: r.lowlevel.M,
- A: r.lowlevel.A,
- Z: r.lowlevel.Z,
- D: r.lowlevel.D,
- unpack25519: r.lowlevel.unpack25519,
- pow2523: r.lowlevel.pow2523,
- crypto_verify_32: r.lowlevel.crypto_verify_32,
- set25519: r.lowlevel.set25519,
- add: r.lowlevel.add,
- scalarmult: r.lowlevel.scalarmult
- };
- t.lowlevel = o;
- const i = r.box.keyPair.fromSecretKey;
- t.keypairFromSecretKey = i;
- const s = r.box.keyPair;
- t.keyPair = s;
- const a = r.sign.detached.verify;
- t.signDetachedVerify = a
- }, 9093: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.arrayBuffersEqual = function (e, t) {
- return s(new Uint8Array(e), new Uint8Array(t))
- }, t.randomNumberLessThan = function (e) {
- if (e !== (0 | e)) throw(0, i.default)("bound must be int32");
- if (e <= 0) throw(0, i.default)("bound must not be positive");
- const t = new Int32Array(1), n = e * Math.floor((-1 >>> 1) / e);
- let r = -1;
- for (; -1 === r;) {
- self.crypto.getRandomValues(t);
- const o = t[0] >>> 1;
- o < n && (r = o % e)
- }
- return r
- }, t.rawKeysEqual = function (e, t) {
- return 0 === e.length && 0 === t.length || (0, o.verify)(e, t)
- }, t.serializedPubKeysEqual = function (e, t) {
- return 0 === e.length && 0 === t.length || (0, o.verify)(e, t)
- }, t.uint8ArraysEqual = s;
- var o = n(3596), i = r(n(2065));
- function s(e, t) {
- return 0 === e.length && 0 === t.length || (0, o.verify)(e, t)
- }
- }, 479: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.SignedPreKeyRecordStructureSpec = t.SessionStructureSpec = t.SessionStructure$PendingPreKeySpec = t.SessionStructure$PendingKeyExchangeSpec = t.SessionStructure$ChainSpec = t.SessionStructure$Chain$MessageKeySpec = t.SessionStructure$Chain$ChainKeySpec = t.SenderKeyStateStructureSpec = t.SenderKeyStateStructure$SenderSigningKeySpec = t.SenderKeyStateStructure$SenderMessageKeySpec = t.SenderKeyStateStructure$SenderChainKeySpec = t.SenderKeyRecordStructureSpec = t.RecordStructureSpec = t.PreKeyRecordStructureSpec = t.IdentityKeyPairStructureSpec = void 0;
- var o = r(n(3982)), i = n(6154);
- const s = (0, o.default)({}, null);
- t.SessionStructureSpec = s;
- const a = (0, o.default)({}, null);
- t.SessionStructure$PendingPreKeySpec = a;
- const c = (0, o.default)({}, null);
- t.SessionStructure$PendingKeyExchangeSpec = c;
- const l = (0, o.default)({}, null);
- t.SessionStructure$ChainSpec = l;
- const u = (0, o.default)({}, null);
- t.SessionStructure$Chain$MessageKeySpec = u;
- const d = (0, o.default)({}, null);
- t.SessionStructure$Chain$ChainKeySpec = d;
- const _ = (0, o.default)({}, null);
- t.RecordStructureSpec = _;
- const f = (0, o.default)({}, null);
- t.PreKeyRecordStructureSpec = f;
- const h = (0, o.default)({}, null);
- t.SignedPreKeyRecordStructureSpec = h;
- const p = (0, o.default)({}, null);
- t.IdentityKeyPairStructureSpec = p;
- const b = (0, o.default)({}, null);
- t.SenderKeyStateStructureSpec = b;
- const m = (0, o.default)({}, null);
- t.SenderKeyStateStructure$SenderSigningKeySpec = m;
- const g = (0, o.default)({}, null);
- t.SenderKeyStateStructure$SenderMessageKeySpec = g;
- const v = (0, o.default)({}, null);
- t.SenderKeyStateStructure$SenderChainKeySpec = v;
- const y = (0, o.default)({}, null);
- t.SenderKeyRecordStructureSpec = y, s.internalSpec = {
- sessionVersion: [1, i.TYPES.UINT32],
- localIdentityPublic: [2, i.TYPES.BYTES],
- remoteIdentityPublic: [3, i.TYPES.BYTES],
- rootKey: [4, i.TYPES.BYTES],
- previousCounter: [5, i.TYPES.UINT32],
- senderChain: [6, i.TYPES.MESSAGE, l],
- receiverChains: [7, i.FLAGS.REPEATED | i.TYPES.MESSAGE, l],
- pendingKeyExchange: [8, i.TYPES.MESSAGE, c],
- pendingPreKey: [9, i.TYPES.MESSAGE, a],
- remoteRegistrationId: [10, i.TYPES.UINT32],
- localRegistrationId: [11, i.TYPES.UINT32],
- needsRefresh: [12, i.TYPES.BOOL],
- aliceBaseKey: [13, i.TYPES.BYTES]
- }, a.internalSpec = {
- preKeyId: [1, i.TYPES.UINT32],
- signedPreKeyId: [3, i.TYPES.INT32],
- baseKey: [2, i.TYPES.BYTES]
- }, c.internalSpec = {
- sequence: [1, i.TYPES.UINT32],
- localBaseKey: [2, i.TYPES.BYTES],
- localBaseKeyPrivate: [3, i.TYPES.BYTES],
- localRatchetKey: [4, i.TYPES.BYTES],
- localRatchetKeyPrivate: [5, i.TYPES.BYTES],
- localIdentityKey: [7, i.TYPES.BYTES],
- localIdentityKeyPrivate: [8, i.TYPES.BYTES]
- }, l.internalSpec = {
- senderRatchetKey: [1, i.TYPES.BYTES],
- senderRatchetKeyPrivate: [2, i.TYPES.BYTES],
- chainKey: [3, i.TYPES.MESSAGE, d],
- messageKeys: [4, i.FLAGS.REPEATED | i.TYPES.MESSAGE, u]
- }, u.internalSpec = {
- index: [1, i.TYPES.UINT32],
- cipherKey: [2, i.TYPES.BYTES],
- macKey: [3, i.TYPES.BYTES],
- iv: [4, i.TYPES.BYTES]
- }, d.internalSpec = {
- index: [1, i.TYPES.UINT32],
- key: [2, i.TYPES.BYTES]
- }, _.internalSpec = {
- currentSession: [1, i.TYPES.MESSAGE, s],
- previousSessions: [2, i.FLAGS.REPEATED | i.TYPES.MESSAGE, s]
- }, f.internalSpec = {
- id: [1, i.TYPES.UINT32],
- publicKey: [2, i.TYPES.BYTES],
- privateKey: [3, i.TYPES.BYTES]
- }, h.internalSpec = {
- id: [1, i.TYPES.UINT32],
- publicKey: [2, i.TYPES.BYTES],
- privateKey: [3, i.TYPES.BYTES],
- signature: [4, i.TYPES.BYTES],
- timestamp: [5, i.TYPES.FIXED64]
- }, p.internalSpec = {
- publicKey: [1, i.TYPES.BYTES],
- privateKey: [2, i.TYPES.BYTES]
- }, b.internalSpec = {
- senderKeyId: [1, i.TYPES.UINT32],
- senderChainKey: [2, i.TYPES.MESSAGE, v],
- senderSigningKey: [3, i.TYPES.MESSAGE, m],
- senderMessageKeys: [4, i.FLAGS.REPEATED | i.TYPES.MESSAGE, g]
- }, m.internalSpec = {
- public: [1, i.TYPES.BYTES],
- private: [2, i.TYPES.BYTES]
- }, g.internalSpec = {
- iteration: [1, i.TYPES.UINT32],
- seed: [2, i.TYPES.BYTES]
- }, v.internalSpec = {
- iteration: [1, i.TYPES.UINT32],
- seed: [2, i.TYPES.BYTES]
- }, y.internalSpec = {senderKeyStates: [1, i.FLAGS.REPEATED | i.TYPES.MESSAGE, b]}
- }, 2560: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.AbortError = t.ABORT_ERROR = void 0, t.catchAbort = function (e) {
- return t => {
- if (t.name === i) return e(t);
- throw t
- }
- };
- var r = n(6911);
- class o extends ((0, r.customError)("AbortError")) {
- }
- t.AbortError = o;
- const i = "AbortError";
- t.ABORT_ERROR = i
- }, 9959: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.createPromiseTimer = function (e) {
- const t = i(e);
- return function (e) {
- return new Promise((n => {
- const r = t();
- r > 0 ? setTimeout(n, r, e) : n(e)
- }))
- }
- }, t.createTimer = i, t.getDelay = function (e, t) {
- if (0 === e) return 0;
- const n = a(t.algo);
- for (let t = 1; t < e; t++) n();
- return s(t, n())
- };
- var o = r(n(2065));
- function i(e) {
- const {relativeDelay: t = !1} = e;
- let n = null;
- const r = a(e.algo);
- return function () {
- const o = n;
- if (null == o) return n = t ? Date.now() : 0, 0;
- let i = s(e, r());
- if (t) {
- const e = Date.now(), t = e - o;
- t > 0 && (i = Math.max(0, i - t)), n = e
- }
- return i
- }
- }
- function s(e, t) {
- let {max: n, min: r, jitter: o = .1} = e, i = t;
- return null != n && i > n && (i = n), null != r && i < r && (i = r), 0 !== o && (i = Math.ceil(i * (1 + o * Math.random()))), i
- }
- function a(e) {
- switch (e.type) {
- case"fibonacci":
- return function (e) {
- let t = e.second - e.first, n = e.first - t;
- return function () {
- const e = t + n;
- return n = t, t = e, e
- }
- }(e);
- case"exponential":
- return function (e) {
- const {base: t = 2} = e;
- let n = e.first;
- return function () {
- const e = n;
- return n *= t, e
- }
- }(e);
- case"constant":
- return function (e) {
- const t = e.delay;
- return function () {
- return t
- }
- }(e);
- case"adjust":
- return function (e) {
- const {toMs: t, backoff: n} = e, r = a(n);
- return function () {
- return t(r())
- }
- }(e);
- default:
- throw(0, o.default)(`makeTimeFunc unrecognized backoff ${e.type}`)
- }
- }
- }, 5068: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.delayMs = function (e, t) {
- return new Promise(((n, o) => {
- if (null == t ? void 0 : t.aborted) throw new r.AbortError;
- const i = setTimeout((function () {
- null == t || t.removeEventListener("abort", s), n()
- }), e);
- function s() {
- null == t || t.removeEventListener("abort", s), clearTimeout(i), o(new r.AbortError)
- }
- null == t || t.addEventListener("abort", s)
- }))
- }, t.withTimeout = function (e, t, n) {
- return new Promise(((r, o) => {
- const i = setTimeout((() => {
- try {
- r(n())
- } catch (e) {
- o(e)
- }
- }), t);
- e.then((e => {
- clearTimeout(i), r(e)
- }), (e => {
- clearTimeout(i), o(e)
- }))
- }))
- };
- var r = n(2560)
- }, 2521: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.PromiseRetryLoop = void 0;
- var o = r(n(2065)), i = n(9959), s = n(5068), a = n(1630);
- t.PromiseRetryLoop = class {
- constructor(e) {
- this._resolvable = new a.Resolvable, this._promise = null, this._resetTime = null, this._currentLoopIdentificator = 0, this.endWithValue = e => {
- this._currentLoopIdentificator++, this._resolvable.resolve(e)
- }, this._options = e
- }
- resetTimeoutAfter(e) {
- this._resetTime = Date.now() + e
- }
- cancelReset() {
- this._resetTime = null
- }
- reset() {
- this._resolvable.resolveWasCalled() || (__LOG__(2)`PromiseRetryLoop: resetting ${this._options.name}`, this._currentLoopIdentificator++, this._runLoop())
- }
- start() {
- this._resolvable.resolveWasCalled() || (__LOG__(2)`PromiseRetryLoop: starting ${this._options.name}`, 0 !== this._currentLoopIdentificator && __LOG__(4, void 0, new Error)`PromiseRetryLoop was called several times. You may have race conditions`, this._currentLoopIdentificator++, this._runLoop())
- }
- _runLoop() {
- const e = this._options, t = this._currentLoopIdentificator;
- let n = (0, i.createTimer)(this._options.timer);
- n();
- const r = () => {
- if (this._resolvable.resolveWasCalled()) return;
- if (t !== this._currentLoopIdentificator) return;
- const o = Date.now();
- return this._promise = (0, e.code)(this.endWithValue).then((() => {
- if (this._resolvable.resolveWasCalled()) return;
- const {resetDelay: t} = e;
- (void 0 !== t && Date.now() >= o + t || null != this._resetTime && this._resetTime <= Date.now()) && (__LOG__(2)`PromiseRetryLoop: resetting ${e.name}`, n = (0, i.createTimer)(this._options.timer)), this._resetTime = null;
- const a = n();
- return __LOG__(2)`PromiseRetryLoop: retrying ${e.name} in ${a}ms`, (0, s.delayMs)(a).then(r)
- })), this._promise
- };
- this._promise = Promise.resolve().then(r)
- }
- promise() {
- return this._resolvable.resolveWasCalled() ? this._resolvable.promise : this._promise ? Promise.race([this._resolvable.promise, this._promise.then((() => this._resolvable.promise))]) : Promise.reject((0, o.default)(`PromiseRetryLoop ${this._options.name} had promise() called before start()`))
- }
- }
- }, 1630: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.Resolvable = void 0;
- t.Resolvable = class {
- constructor() {
- this._resolve = () => {
- }, this._isResolved = !1, this.promise = new Promise((e => {
- this._resolve = e
- }))
- }
- resolve(e) {
- this._isResolved = !0, this._resolve(e)
- }
- reject(e) {
- this.resolve(Promise.reject(e))
- }
- resolveWasCalled() {
- return this._isResolved
- }
- }
- }, 9069: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.loadStackPromisePolyfill = function () {
- function e(e) {
- this.message = e, this.stack = (0, o.default)(e || this.name).stack
- }
- Promise.prototype.cancellable = function () {
- return console.info("StackPromise.cancellable noop"), this
- }, Promise.prototype.cancel = function () {
- return console.info("StackPromise.cancel noop"), this
- }, e.prototype = Object.create(Error.prototype, {name: {value: "AbortError"}}), Promise.CancellationError = e
- };
- var o = r(n(2065))
- }, 2683: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.bytesToDebugString = i, t.debugStr = o, t.rebuildTemplate = function (e, t) {
- const n = [e[0]];
- return t.forEach(((t, r) => {
- n.push(o(t), e[r + 1])
- })), n.join("")
- };
- var r = n(5982);
- function o(e) {
- if ("string" == typeof e) return `'${e}'`;
- if (null == e || "object" != typeof e) return String(e);
- if (Array.isArray(e)) return `[${e.join(",")}]`;
- if (e instanceof Uint8Array) {
- if (e.length < 64) return `<<${i(e)}>>`;
- {
- const t = e.subarray(0, 32);
- return `<<${i(t)}, ${e.length - t.length} more bytes>>`
- }
- }
- return e.toString === Object.prototype.toString ? JSON.stringify(e, ((e, t) => e ? String(t) : t)) : String(e)
- }
- function i(e) {
- let t = !0, n = e.length;
- for (; t && n;) {
- const r = e[--n];
- t = 32 <= r && r < 127
- }
- return t ? JSON.stringify(String.fromCharCode.apply(String, e)) : (0, r.toHex)(e)
- }
- }, 1784: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.TAGS = _, t.getWaLoggerAdditionalOptions = f, t.initializeWaLogger = function (e) {
- var t;
- u = e, null === (t = a) || void 0 === t || t(), a = null
- }, t.whenReady = function () {
- return l.apply(this, arguments)
- };
- var o = r(n(1504)), i = n(2683), s = r(n(9619));
- let a;
- const c = new Promise((e => {
- a = e
- }));
- function l() {
- return (l = (0, o.default)((function* () {
- yield c
- }))).apply(this, arguments)
- }
- let u = null;
- function d() {
- return (0, s.default)(u, "WALogger called before initialization")
- }
- function _(e) {
- return {
- TAGS: t => _([...e, ...t]), DEV: function (t) {
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
- const s = (0, i.rebuildTemplate)(t, r);
- return d().debug(s, e), f("DEV", s)
- }, DEV_XMPP: function (t) {
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
- const s = (0, i.rebuildTemplate)(t, r);
- return d().logRestricted(s, e), f("DEV_XMPP", s)
- }, LOG: function (t) {
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
- const s = (0, i.rebuildTemplate)(t, r);
- return d().info(s, e), f("LOG", s)
- }, WARN: function (t) {
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
- const s = (0, i.rebuildTemplate)(t, r);
- return d().warn(s, e), f("WARN", s)
- }, ERROR: function (t) {
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
- const s = (0, i.rebuildTemplate)(t, r);
- let a;
- for (const e of r) if (e instanceof Error) {
- a = e;
- break
- }
- return null != a ? d().error(s, e, a) : d().error(s, e), f("ERROR", s)
- }, CATCHING: function (t) {
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++) r[o - 1] = arguments[o];
- const s = (0, i.rebuildTemplate)(t, r);
- return d().error(s, e), f("CATCHING", s)
- }
- }
- }
- function f(e, t) {
- return {
- verbose: () => f(e, t),
- color: () => f(e, t),
- devConsole: function () {
- for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++) r[o] = arguments[o];
- return d().devConsole(e, t, [], ...r), f(e, t)
- },
- sendLogs: n => "ERROR" !== e && "CATCHING" !== e ? _([]).ERROR`[${n}] ${t}` : f(e, t),
- tags: function () {
- return f(e, t)
- }
- }
- }
- }, 717: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.KEY_TYPE = void 0, t.castToPreKeyId = p, t.castToSerializedPubKey = b, t.castToSignedPreKeyId = function (e) {
- return (0, a.ensureIntInRange)(e, 0, l)
- }, t.deserializePreKey = function (e) {
- try {
- const {id: t, publicKey: n, privateKey: r} = (0, c.decodeProtobuf)(s.PreKeyRecordStructureSpec, e);
- return null == t || null == n || null == r ? null : {
- id: p(t),
- keyPair: _((0, a.toBytes)(r, 32), b(new Uint8Array(n)))
- }
- } catch (e) {
- return null
- }
- }, t.ecdh = function (e, t) {
- return (0, o.scalarMult)(e, t.subarray(1)).buffer
- }, t.makeKeyPair = d, t.makeKeyPairFrom = function (e) {
- const {publicKey: t, secretKey: n} = (0, o.keypairFromSecretKey)(e);
- return u((0, a.ensureSize)(t, 32), (0, a.ensureSize)(n, 32))
- }, t.makeKeyPairFromArrayBuffers = function (e, t) {
- return {publicKey: (0, a.toBytes)(e, 32), privateKey: (0, a.toBytes)(t, 32)}
- }, t.makeKeyPairFromSerialized = _, t.makePreKeys = function (e, t) {
- let n = (e - 1) % l;
- n <= 0 && (n += l);
- const r = [];
- for (let e = 0; e < t; e++) {
- const e = n === l ? 1 : n + 1, t = d(), o = (0, a.encodeSignalProto)(s.PreKeyRecordStructureSpec, {
- id: e,
- publicKey: h(t),
- privateKey: t.privateKey
- });
- r.push({plainObject: {id: e, keyPair: t}, record: o}), n = e
- }
- return r
- }, t.makeRawSenderKey = function () {
- const e = (0, a.makeBytes)(32);
- return self.crypto.getRandomValues(e), e
- }, t.makeSerializedKeyPair = function () {
- const e = d();
- return f(e.privateKey, h(e))
- }, t.makeSerializedKeyPairFrom = f, t.serializeIdentity = function (e) {
- const t = (0, a.makeBytes)(33);
- return t[0] = 5, t.set((0, a.ensureSize)(e, 32), 1), t
- }, t.serializePubKey = h, t.toSerializedKeyPair = function (e) {
- return f(e.privateKey, h(e))
- };
- var o = n(3596), i = r(n(2065)), s = n(479), a = n(1879), c = n(3955);
- t.KEY_TYPE = 5;
- const l = 16777215;
- function u(e, t) {
- return {publicKey: e, privateKey: t}
- }
- function d() {
- const {publicKey: e, secretKey: t} = (0, o.keyPair)();
- return t[0] &= 248, t[31] = 64 | 63 & t[31], u((0, a.ensureSize)(e, 32), (0, a.ensureSize)(t, 32))
- }
- function _(e, t) {
- return u((0, a.sliceBytes)(t, 1, 32), e)
- }
- function f(e, t) {
- return {serializedPubKey: t, privateKey: e}
- }
- function h(e) {
- const t = (0, a.makeBytes)(33);
- return t[0] = 5, t.set(e.publicKey, 1), t
- }
- function p(e) {
- return (0, a.ensureIntInRange)(e, 1, l)
- }
- function b(e) {
- if (0 === e.length || 5 !== e[0]) throw(0, i.default)("Unrecognized public key type");
- return (0, a.ensureSize)(e, 33)
- }
- }, 1879: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.HMAC_SHA256 = t.AES_CBC = void 0, t.areSessionHashesEqual = function (e, t) {
- return (0, i.arrayBuffersEqual)(e, t)
- }, t.castRegistrationId = function (e) {
- return _(e)
- }, t.castSenderKeyId = function (e) {
- return _(e)
- }, t.castToByteEncoded = function (e) {
- return e
- }, t.castToSessionHash = function (e) {
- return e
- }, t.decodeSignalProto = function (e, t, n) {
- return n((0, a.decodeProtobuf)(e, t))
- }, t.encodeSignalProto = function (e, t) {
- return (0, c.encodeProtobuf)(e, t).readByteArray()
- }, t.ensureIntInRange = _, t.ensureSize = d, t.hkdf = function (e, t, n, r) {
- return (0, o.extractWithSaltAndExpand)(e, t, n, r).then((e => new Uint8Array(e)))
- }, t.makeBytes = function (e) {
- return new Uint8Array(e)
- }, t.makeCryptoKey = function (e, t) {
- let n, r;
- "hmac-sha256" === t ? (n = u, r = ["sign"]) : (n = l, r = ["encrypt", "decrypt"]);
- return self.crypto.subtle.importKey("raw", e, n, !1, r)
- }, t.makeRegistrationId = function (e) {
- const t = "extendedRange" === e ? 2147483646 : 16380;
- return (0, i.randomNumberLessThan)(t) + 1
- }, t.makeSenderKeyId = function () {
- return (0, i.randomNumberLessThan)(-1 >>> 1) + 1
- }, t.readBytes = function (e, t) {
- return e.readByteArray(t)
- }, t.sliceBytes = function (e, t, n) {
- if (e.length - t < n) throw(0, s.default)(`Can not split off ${n} bytes from index ${t} of ${e.length} bytes`);
- return e.slice(t, t + n)
- }, t.toBuffer = function (e) {
- const t = e.buffer, n = e.byteOffset, r = e.length;
- return 0 === n && r === t.byteLength ? t : t.slice(n, n + r)
- }, t.toBytes = function (e, t) {
- return d(new Uint8Array(e), t)
- };
- var o = n(8397), i = n(9093), s = r(n(2065)), a = n(3955), c = n(4753);
- const l = {name: "AES-CBC"};
- t.AES_CBC = l;
- const u = {name: "HMAC", hash: "SHA-256"};
- function d(e, t) {
- if (e.length !== t) throw(0, s.default)(`Signal expected ${t} bytes, given ${e.length}`);
- return e
- }
- function _(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 4294967296;
- if ("number" == typeof e && t <= e && e < n && Math.floor(e) === e) return e;
- throw(0, s.default)(`Expected integer in range [${t}, ${n}), given ${String(e)}`)
- }
- t.HMAC_SHA256 = u
- }, 4080: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.arrayBufferMod = function (e, t) {
- const n = new Uint8Array(e);
- if (t > 8388607) throw(0, o.default)("Divisor is too big");
- let r = 0;
- for (let e = 0; e < n.length; ++e) r = ((r << 8) + n[e]) % t;
- return r
- }, t.arrayBufferToString = function (e) {
- return String.fromCharCode.apply(null, new Uint8Array(e))
- }, t.arrayBuffersEqualUNSAFE = function (e, t) {
- const n = new Uint8Array(e), r = new Uint8Array(t);
- return i(n, r)
- }, t.concatBuffers = function (e) {
- const t = e.map((e => new Uint8Array(e))), n = t.reduce(((e, t) => e + t.byteLength), 0),
- r = new Uint8Array(n);
- return t.reduce(((e, t) => (r.set(t, e), e + t.byteLength)), 0), r.buffer.slice(r.byteOffset, r.byteOffset + r.byteLength)
- }, t.largeStringToArrayBuffer = function (e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 5e5;
- return new Promise((n => {
- const r = e.length, o = new ArrayBuffer(r), i = new Uint8Array(o);
- let s = 0;
- setTimeout((function a() {
- const c = Math.min(s + t, r);
- for (; s < c;) i[s] = e.charCodeAt(s), s++;
- if (s === r) return void n(o);
- setTimeout(a, 16)
- }), 0)
- }))
- }, t.stringToArrayBuffer = function (e) {
- const t = new ArrayBuffer(e.length), n = new Uint8Array(t);
- let r, o;
- for (r = 0, o = e.length; r < o; r++) n[r] = e.charCodeAt(r);
- return n.buffer
- }, t.uint8ArraysEqualUNSAFE = i;
- var o = r(n(2065));
- function i(e, t) {
- if (e.byteLength !== t.byteLength) return !1;
- for (let n = 0; n !== e.byteLength; n++) if (e[n] !== t[n]) return !1;
- return !0
- }
- }, 3558: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.removeIndexWithoutPreservingOrder = function (e, t) {
- const n = e.pop();
- t < e.length && (e[t] = n)
- }
- }, 7537: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
- throw(0, o.default)(`Impossible value, the default statement should never be reached for value: ${e}`)
- };
- var o = r(n(2065))
- }, 2089: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.BASE64_DATA_URL_SCHEME = void 0, t.decodeB64 = function (e) {
- const t = l(e, 43, 47, 61);
- if (t) return t.buffer;
- throw(0, o.default)("Base64.decode given invalid string")
- }, t.decodeB64ToJsArray = function (e) {
- const t = e instanceof ArrayBuffer ? new Uint8Array(e) : l(e, 43, 47, 61);
- return t && Array.from(t)
- }, t.decodeB64UrlSafe = function (e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- const n = l(e, 45, 95, t ? 61 : -1);
- if (n) return n.buffer;
- throw(0, o.default)("Base64.decode given invalid string")
- }, t.encodeB64 = s, t.encodeB64UrlSafe = function (e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- return a(e, 45, 95, t)
- }, t.isBase64 = void 0, t.randomBase64 = function (e) {
- const t = new Uint8Array(e);
- return self.crypto.getRandomValues(t), s(t)
- }, t.sizeWhenB64Decoded = function (e) {
- return Math.floor(3 * e.length / 4)
- };
- var o = r(n(2065));
- const i = 3e3;
- t.BASE64_DATA_URL_SCHEME = "data:image/jpeg;base64,";
- function s(e) {
- return a(e, 43, 47, !0)
- }
- function a(e, t, n, r) {
- const o = Array.isArray(e) || e instanceof ArrayBuffer ? new Uint8Array(e) : e;
- if (o.length <= i) return c(o, t, n, r);
- {
- const e = [];
- for (let s = 0; s < o.length; s += i) e.push(c(o.subarray(s, s + i), t, n, r));
- return e.join("")
- }
- }
- function c(e, t, n, r) {
- const o = Math.ceil(4 * e.length / 3), i = 4 * Math.ceil(e.length / 3), s = new Array(i);
- for (let t = 0, n = 0; t < i; t += 4, n += 3) {
- const r = e[n] << 16 | e[n + 1] << 8 | e[n + 2];
- s[t] = r >> 18, s[t + 1] = r >> 12 & 63, s[t + 2] = r >> 6 & 63, s[t + 3] = 63 & r
- }
- for (let e = 0; e < o; e++) {
- const r = s[e];
- s[e] = r < 26 ? 65 + r : r < 52 ? 71 + r : r < 62 ? r - 4 : 62 === r ? t : n
- }
- for (let e = o; e < i; e++) s[e] = 61;
- const a = String.fromCharCode.apply(String, s);
- return r ? a : a.substring(0, o)
- }
- function l(e, t, n, r) {
- let o = e.length;
- const i = new Int32Array(o + o % 4);
- for (let s = 0; s < o; s++) {
- const a = e.charCodeAt(s);
- if (65 <= a && a <= 90) i[s] = a - 65; else if (97 <= a && a <= 122) i[s] = a - 71; else if (48 <= a && a <= 57) i[s] = a + 4; else if (a === t) i[s] = 62; else {
- if (a !== n) {
- if (a === r) {
- o = s;
- break
- }
- return null != self.ERROR && __LOG__(4, void 0, new Error)`Found unexpected character code while decoding B64 at index ${s}, length ${o}: ${a}`, null
- }
- i[s] = 63
- }
- }
- const s = i.length / 4;
- for (let e = 0, t = 0; e < s; e++, t += 4) i[e] = i[t] << 18 | i[t + 1] << 12 | i[t + 2] << 6 | i[t + 3];
- const a = Math.floor(3 * o / 4), c = new Uint8Array(a);
- let l = 0, u = 0;
- for (; u + 3 <= a; l++, u += 3) {
- const e = i[l];
- c[u] = e >> 16, c[u + 1] = e >> 8 & 255, c[u + 2] = 255 & e
- }
- switch (a - u) {
- case 2:
- c[u] = i[l] >> 16, c[u + 1] = i[l] >> 8 & 255;
- break;
- case 1:
- c[u] = i[l] >> 16
- }
- return c
- }
- t.isBase64 = e => "string" == typeof e && /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)
- }, 9323: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.Binary = void 0, t.longFitsInDouble = f, t.numUtf8Bytes = _, t.parseInt64OrThrow = z, t.parseUint64OrThrow = W;
- var o = r(n(2065)), i = n(5982);
- const s = 65533, a = new Uint8Array(10), c = new Uint8Array(0);
- class l {
- constructor() {
- var e = this;
- let t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : c,
- n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- this._buffer = new Uint8Array(0), this._readEndIndex = 0, this._writeIndex = 0, this.write = function () {
- for (let t = 0; t < arguments.length; t++) {
- const n = t < 0 || arguments.length <= t ? void 0 : arguments[t];
- "string" == typeof n ? e.writeString(n) : "number" == typeof n ? e.writeUint8(n) : n instanceof l ? e.writeBinary(n) : n instanceof ArrayBuffer ? e.writeBuffer(n) : n instanceof Uint8Array && e.writeByteArray(n)
- }
- }, t instanceof ArrayBuffer ? (this._buffer = new Uint8Array(t), this._readEndIndex = this._writeIndex = t.byteLength) : t instanceof Uint8Array && (this._buffer = t, this._readEndIndex = this._writeIndex = t.length), this._bytesTrashed = 0, this._earliestIndex = this._readIndex = 0, this._view = null, this._littleEndian = n, this._hiddenReads = 0, this._hiddenWrites = 0
- }
- size() {
- return this._readEndIndex - this._readIndex
- }
- peek(e, t) {
- this._hiddenReads++;
- const n = this._readIndex, r = this._bytesTrashed;
- try {
- return e(this, t)
- } finally {
- this._hiddenReads--, this._readIndex = n - (this._bytesTrashed - r)
- }
- }
- advance(e) {
- this._shiftReadOrThrow(e)
- }
- readWithViewParser(e, t, n, r) {
- return t(this._getView(), this._shiftReadOrThrow(e), e, n, r)
- }
- readWithBytesParser(e, t, n, r) {
- return t(this._buffer, this._shiftReadOrThrow(e), e, n, r)
- }
- readUint8() {
- return h(this, 1, b, !1)
- }
- readInt8() {
- return h(this, 1, b, !0)
- }
- readUint16() {
- return h(this, 2, m, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readInt32() {
- return h(this, 4, g, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readUint32() {
- return h(this, 4, v, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readInt64() {
- return h(this, 8, y, z, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readUint64() {
- return h(this, 8, y, W, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readLong(e) {
- return h(this, 8, y, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
- }
- readFloat32() {
- return h(this, 4, w, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readFloat64() {
- return h(this, 8, S, arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._littleEndian)
- }
- readVarInt(e) {
- const t = p(this, 0, E, this.size());
- return p(this, t, j, e)
- }
- readBuffer() {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.size();
- return 0 === e ? new ArrayBuffer(0) : p(this, e, k)
- }
- readByteArray() {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.size();
- return 0 === e ? new Uint8Array(0) : p(this, e, A)
- }
- readBinary() {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.size(),
- t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- if (0 === e) return new l(void 0, t);
- const n = p(this, e, A);
- return new l(n, t)
- }
- indexOf(e) {
- if (0 === e.length) return 0;
- const t = this._buffer, n = this._readEndIndex, r = this._readIndex;
- let o = 0, i = r;
- for (let s = r; s < n; s++) if (t[s] === e[o]) {
- if (0 === o && (i = s), o++, o === e.byteLength) return s - r - e.byteLength + 1
- } else o > 0 && (o = 0, s = i);
- return -1
- }
- readString(e) {
- return p(this, e, T)
- }
- ensureCapacity(e) {
- this._maybeReallocate(this._readIndex + e)
- }
- ensureAdditionalCapacity(e) {
- this._maybeReallocate(this._writeIndex + e)
- }
- writeToView(e, t, n, r) {
- const o = this._shiftWriteMaybeReallocate(e);
- return t(this._getView(), o, e, n, r)
- }
- writeToBytes(e, t, n, r) {
- const o = this._shiftWriteMaybeReallocate(e);
- return t(this._buffer, o, e, n, r)
- }
- writeUint8(e) {
- K(e, 0, 256, "uint8"), P(this, 1, I, e, !1)
- }
- writeInt8(e) {
- K(e, -128, 128, "signed int8"), P(this, 1, I, e, !0)
- }
- writeUint16(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- K(e, 0, 65536, "uint16"), x(this, 2, O, e, t)
- }
- writeInt16(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- K(e, -32768, 32768, "signed int16"), x(this, 2, U, e, t)
- }
- writeUint32(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- K(e, 0, 4294967296, "uint32"), x(this, 4, R, e, t)
- }
- writeInt32(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- K(e, -2147483648, 2147483648, "signed int32"), x(this, 4, C, e, t)
- }
- writeUint64(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- K(e, 0, 0x10000000000000000, "uint64"), x(this, 8, D, e, t)
- }
- writeInt64(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian;
- K(e, -0x8000000000000000, 0x8000000000000000, "signed int64"), x(this, 8, D, e, t)
- }
- writeFloat32(e) {
- x(this, 4, M, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
- }
- writeFloat64(e) {
- x(this, 8, $, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
- }
- writeVarInt(e) {
- K(e, -0x8000000000000000, 0x8000000000000000, "varint (signed int64)");
- const t = e < 0, n = t ? -e : e;
- let r = Math.floor(n / 4294967296), o = n - 4294967296 * r;
- t && (r = ~r, 0 === o ? r++ : o = -o);
- P(this, F(r, o), L, r, o)
- }
- writeVarIntFromHexLong(e) {
- const t = (0, i.hexLongIsNegative)(e), n = t ? (0, i.negateHexLong)(e) : e,
- r = (0, i.hexLongToHex)(n);
- let o = 0, s = 0;
- for (let e = 0; e < i.NUM_HEX_IN_LONG; e++) o = o << 4 | s >>> 28, s = s << 4 | (0, i.hexAt)(r, e);
- t && (o = ~o, 0 === s ? o++ : s = -s);
- P(this, F(o, s), L, o, s)
- }
- writeBinary(e) {
- const t = e.peek((e => e.readByteArray()));
- if (t.length) {
- const e = this._shiftWriteMaybeReallocate(t.length);
- this._buffer.set(t, e)
- }
- }
- writeBuffer(e) {
- this.writeByteArray(new Uint8Array(e))
- }
- writeByteArray(e) {
- const t = this._shiftWriteMaybeReallocate(e.length);
- this._buffer.set(e, t)
- }
- writeBufferView(e) {
- this.writeByteArray(new Uint8Array(e.buffer, e.byteOffset, e.byteLength))
- }
- writeString(e) {
- P(this, _(e), N, e)
- }
- writeHexLong(e) {
- x(this, 8, J, e, arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._littleEndian)
- }
- writeBytes() {
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- for (let e = 0; e < t.length; e++) K(t[e], 0, 256, "byte");
- P(this, t.length, B, t)
- }
- writeAtomically(e, t) {
- this._hiddenWrites++;
- let n = this._writeIndex, r = this._bytesTrashed;
- try {
- const o = e(this, t);
- return n = this._writeIndex, r = this._bytesTrashed, o
- } finally {
- this._hiddenWrites--, this._writeIndex = n - (this._bytesTrashed - r)
- }
- }
- writeWithVarIntLength(e, t) {
- const n = this._writeIndex, r = this.writeAtomically(e, t), o = this._writeIndex;
- this.writeVarInt(o - n);
- const i = this._writeIndex - o, s = this._buffer;
- for (let e = 0; e < i; e++) a[e] = s[o + e];
- for (let e = o - 1; e >= n; e--) s[e + i] = s[e];
- for (let e = 0; e < i; e++) s[n + e] = a[e];
- return r
- }
- static build() {
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- let r = 0;
- for (let e = 0; e < t.length; e++) {
- const n = t[e];
- "string" == typeof n ? r += _(n) : "number" == typeof n ? r++ : n instanceof l ? r += n.size() : n instanceof ArrayBuffer ? r += n.byteLength : n instanceof Uint8Array && (r += n.length)
- }
- const o = new l;
- return o.ensureCapacity(r), o.write.apply(o, arguments), o
- }
- _getView() {
- return this._view || (this._view = new DataView(this._buffer.buffer, this._buffer.byteOffset))
- }
- _shiftReadOrThrow(e) {
- if (e < 0) throw(0, o.default)("ReadError: given negative number of bytes to read");
- const t = this._readIndex, n = t + e;
- if (n > this._readEndIndex) throw(0, o.default)(t === this._readEndIndex ? "ReadError: tried to read from depleted binary" : "ReadError: tried to read beyond end of binary");
- return this._readIndex = n, this._hiddenReads || (this._earliestIndex = n), t
- }
- _maybeReallocate(e) {
- const t = this._buffer;
- if (e <= t.length) return e;
- {
- const n = this._earliestIndex, r = e - n, o = Math.max(r, 2 * (t.length - n), 64),
- i = new Uint8Array(o);
- return n ? (i.set(t.subarray(n)), this._bytesTrashed += n, this._readIndex -= n, this._readEndIndex -= n, this._writeIndex -= n, this._earliestIndex = 0) : i.set(t), this._buffer = i, this._view = null, r
- }
- }
- _shiftWriteMaybeReallocate(e) {
- const t = this._maybeReallocate(this._writeIndex + e), n = this._writeIndex;
- return this._writeIndex = t, this._hiddenWrites || (this._readEndIndex = t), n
- }
- }
- t.Binary = l;
- let u = "", d = 0;
- function _(e) {
- if (e === u) return d;
- const t = e.length;
- let n = 0;
- for (let r = 0; r < t; r++) {
- const o = e.charCodeAt(r);
- if (o < 128) n++; else if (o < 2048) n += 2; else if (o < 55296 || 57344 <= o && o <= 65535) n += 3; else if (55296 <= o && o < 56320 && r + 1 !== t) {
- const t = e.charCodeAt(r + 1);
- 56320 <= t && t < 57344 ? (r++, n += 4) : n += 3
- } else n += 3
- }
- return u = e, d = n
- }
- function f(e, t, n) {
- const r = t >> 21;
- if (e) {
- const e = Boolean(2097151 & t || n);
- return 0 === r || -1 === r && e
- }
- return 0 === r
- }
- function h(e, t, n, r, o) {
- return e.readWithViewParser(t, n, r, o)
- }
- function p(e, t, n, r, o) {
- return e.readWithBytesParser(t, n, r, o)
- }
- function b(e, t, n, r) {
- return r ? e.getInt8(t) : e.getUint8(t)
- }
- function m(e, t, n, r) {
- return e.getUint16(t, r)
- }
- function g(e, t, n, r) {
- return e.getInt32(t, r)
- }
- function v(e, t, n, r) {
- return e.getUint32(t, r)
- }
- function y(e, t, n, r, o) {
- return r(e.getInt32(o ? t + 4 : t, o), e.getInt32(o ? t : t + 4, o))
- }
- function w(e, t, n, r) {
- return e.getFloat32(t, r)
- }
- function S(e, t, n, r) {
- return e.getFloat64(t, r)
- }
- function E(e, t, n, r) {
- const i = Math.min(r, 10);
- let s = 0, a = 128;
- for (; s < i && 128 & a;) a = e[t + s++];
- if (10 === s && a > 1) throw(0, o.default)("ParseError: varint exceeds 64 bits");
- return 128 & a ? s + 1 : s
- }
- function j(e, t, n, r) {
- let o = 0, i = 0, s = n;
- 10 === n && (s--, i = 1 & e[t + s]);
- for (let n = s - 1; n >= 0; n--) o = o << 7 | i >>> 25, i = i << 7 | 127 & e[t + n];
- return r(o, i)
- }
- function k(e, t, n) {
- const r = t + e.byteOffset, o = e.buffer;
- return 0 === r && n === o.byteLength ? o : o.slice(r, r + n)
- }
- function A(e, t, n) {
- return e.subarray(t, t + n)
- }
- function T(e, t, n) {
- const r = t + n;
- let o = [], i = null;
- for (let n = t; n < r; n++) {
- o.length > 5e3 && (i || (i = []), i.push(String.fromCharCode.apply(String, o)), o = []);
- const t = 0 | e[n];
- if (0 == (128 & t)) o.push(t); else if (192 == (224 & t)) {
- const i = G(e, n + 1, r);
- if (i) {
- n++;
- const e = (31 & t) << 6 | 63 & i;
- e >= 128 ? o.push(e) : o.push(s)
- } else o.push(s)
- } else if (224 == (240 & t)) {
- const i = G(e, n + 1, r), a = G(e, n + 2, r);
- if (i && a) {
- n += 2;
- const e = (15 & t) << 12 | (63 & i) << 6 | 63 & a;
- e >= 2048 && !(55296 <= e && e < 57344) ? o.push(e) : o.push(s)
- } else i ? (n++, o.push(s)) : o.push(s)
- } else if (240 == (248 & t)) {
- const i = G(e, n + 1, r), a = G(e, n + 2, r), c = G(e, n + 3, r);
- if (i && a && c) {
- n += 3;
- const e = (7 & t) << 18 | (63 & i) << 12 | (63 & a) << 6 | 63 & c;
- if (e >= 65536 && e <= 1114111) {
- const t = e - 65536;
- o.push(55296 | t >> 10, 56320 | 1023 & t)
- } else o.push(s)
- } else i && a ? (n += 2, o.push(s)) : i ? (n++, o.push(s)) : o.push(s)
- } else o.push(s)
- }
- const a = String.fromCharCode.apply(String, o);
- return i ? (i.push(a), i.join("")) : a
- }
- function x(e, t, n, r, o) {
- return e.writeToView(t, n, r, o)
- }
- function P(e, t, n, r, o) {
- return e.writeToBytes(t, n, r, o)
- }
- function I(e, t, n, r) {
- e[t] = r
- }
- function O(e, t, n, r, o) {
- e.setUint16(t, r, o)
- }
- function U(e, t, n, r, o) {
- e.setInt16(t, r, o)
- }
- function R(e, t, n, r, o) {
- e.setUint32(t, r, o)
- }
- function C(e, t, n, r, o) {
- e.setInt32(t, r, o)
- }
- function D(e, t, n, r, o) {
- const i = r < 0, s = i ? -r : r;
- let a = Math.floor(s / 4294967296), c = s - 4294967296 * a;
- i && (a = ~a, 0 === c ? a++ : c = -c), e.setUint32(o ? t + 4 : t, a, o), e.setUint32(o ? t : t + 4, c, o)
- }
- function M(e, t, n, r, o) {
- e.setFloat32(t, r, o)
- }
- function $(e, t, n, r, o) {
- e.setFloat64(t, r, o)
- }
- function L(e, t, n, r, o) {
- let i = r, s = o;
- const a = t + n - 1;
- for (let n = t; n < a; n++) e[n] = 128 | 127 & s, s = i << 25 | s >>> 7, i >>>= 7;
- e[a] = s
- }
- function N(e, t, n, r) {
- let o = t;
- const i = r.length;
- for (let t = 0; t < i; t++) {
- const n = r.charCodeAt(t);
- if (n < 128) e[o++] = n; else if (n < 2048) e[o++] = 192 | n >> 6, e[o++] = 128 | 63 & n; else if (n < 55296 || 57344 <= n) e[o++] = 224 | n >> 12, e[o++] = 128 | n >> 6 & 63, e[o++] = 128 | 63 & n; else if (55296 <= n && n < 56320 && t + 1 !== i) {
- const i = r.charCodeAt(t + 1);
- if (56320 <= i && i < 57344) {
- t++;
- const r = 65536 + ((1023 & n) << 10 | 1023 & i);
- e[o++] = 240 | r >> 18, e[o++] = 128 | r >> 12 & 63, e[o++] = 128 | r >> 6 & 63, e[o++] = 128 | 63 & r
- } else e[o++] = 239, e[o++] = 191, e[o++] = 189
- } else e[o++] = 239, e[o++] = 191, e[o++] = 189
- }
- }
- function J(e, t, n, r, o) {
- const s = (0, i.hexLongIsNegative)(r), a = (0, i.hexLongToHex)(r);
- let c = 0, l = 0;
- for (let e = 0; e < 16; e++) c = c << 4 | l >>> 28, l = l << 4 | (0, i.hexAt)(a, e);
- s && (c = ~c, 0 === l ? c++ : l = -l), e.setUint32(o ? t + 4 : t, c, o), e.setUint32(o ? t : t + 4, l, o)
- }
- function B(e, t, n, r) {
- for (let o = 0; o < n; o++) e[t + o] = r[o]
- }
- function F(e, t) {
- let n, r;
- for (e ? (n = 5, r = e >>> 3) : (n = 1, r = t >>> 7); r;) n++, r >>>= 7;
- return n
- }
- function K(e, t, n, r) {
- if ("number" != typeof e || e != e || Math.floor(e) !== e || e < t || e >= n) throw(0, o.default)("string" == typeof e ? `TyperError WriteError: string "${e}" is not a valid ${r}` : `TypeError WriteError: ${String(e)} is not a valid ${r}`)
- }
- function q(e, t, n) {
- let r;
- r = t >= 0 || e ? t : 4294967296 + t;
- const i = 4294967296 * r + (n >= 0 ? n : 4294967296 + n);
- if (!f(e, t, n)) throw(0, o.default)(`ReadError: integer exceeded 53 bits (${i})`);
- return i
- }
- function z(e, t) {
- return q(!0, e, t)
- }
- function W(e, t) {
- return q(!1, e, t)
- }
- function G(e, t, n) {
- if (t >= n) return 0;
- const r = 0 | e[t];
- return 128 == (192 & r) ? r : 0
- }
- }, 6911: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.WrappedError = t.UnimplementedMethod = t.TimeoutError = t.HttpError = t.AggregateError = void 0, t.customError = r, t.hasSupressedQuotaExceededError = function () {
- return c
- }, t.obtainErrorSummary = function (e) {
- return JSON.stringify(e, Object.getOwnPropertyNames(e))
- }, t.supressQuotaExceededError = function (e) {
- if (null == e || "QuotaExceededError" !== e.name) throw e;
- c = !0
- };
- const n = Object.create(Error.prototype, {constructor: {value: void 0, writable: !0, configurable: !0}});
- function r(e) {
- let t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
- r = arguments.length > 2 ? arguments[2] : void 0;
- function o(n) {
- const r = Error.call(this, n);
- this.message = n, r.name = e, this.name = e, t && (this.stack = r.stack)
- }
- return o.prototype = Object.create(r ? r.prototype : n), o.prototype.constructor = o, o
- }
- class o extends (r("AggregateError", !0)) {
- constructor(e, t) {
- super(null != t && t.length > 0 ? t : function (e) {
- return 0 === e.length ? "No errors" : 1 === e.length ? e[0].message : e.map((e => "- " + e.message)).join("\n")
- }(e)), this.errors = e
- }
- }
- t.AggregateError = o;
- class i extends (r("TimeoutError", !1)) {
- }
- t.TimeoutError = i;
- class s extends (r("HttpError", !1)) {
- constructor(e, t) {
- super(e), this.code = t
- }
- }
- t.HttpError = s;
- class a extends (r("UnimplementedMethod")) {
- }
- t.UnimplementedMethod = a;
- let c = !1;
- class l extends Error {
- constructor(e, t) {
- super(e), this.inner = t
- }
- }
- t.WrappedError = l
- }, 2924: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.deepEqual = function e(t, n) {
- if (t === n) return !0;
- if (!t || !n || "object" != typeof t && "object" != typeof n) return !1;
- const r = Array.isArray(t), o = Array.isArray(n);
- if (r !== o) return !1;
- let i = !0;
- if (r) {
- const r = t.length;
- if (r !== n.length) return !1;
- for (let o = 0; i && o < r; o++) i = e(t[o], n[o]);
- return i
- }
- const s = Object.keys(t);
- for (let r = 0; i && r < s.length; r++) {
- const o = s[r];
- i = n.propertyIsEnumerable(o) && e(t[o], n[o])
- }
- return i && Object.keys(n).length === s.length
- }
- }, 2065: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
- const t = new Error(e);
- if (void 0 === t.stack) try {
- throw t
- } catch (e) {
- }
- return t
- }
- }, 9028: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- }, 5982: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.NUM_HEX_IN_LONG = t.HEX_LOWER = void 0, t.bytesToBuffer = function (e) {
- const t = e.buffer;
- return 0 === e.byteOffset && e.length === t.byteLength ? t : t.slice(e.byteOffset, e.byteOffset + e.length)
- }, t.bytesToDebugString = function (e) {
- let t = !0, n = e.length;
- for (; t && n;) {
- const r = e[--n];
- t = 32 <= r && r < 127
- }
- return t ? JSON.stringify(String.fromCharCode.apply(String, e)) : a(e)
- }, t.createHexLong = u, t.createHexLongFrom32Bits = function (e, t) {
- let n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
- const r = p(e), o = p(t);
- return `${n ? "-" : ""}0x${r}${o}`
- }, t.hexAt = c, t.hexLongFromNumber = function (e) {
- const t = e < 0;
- return u(t ? (-e).toString(16) : e.toString(16), t)
- }, t.hexLongIsNegative = f, t.hexLongToHex = _, t.hexOrThrow = l, t.isBiggerHexLong = function (e, t) {
- const n = f(e), r = f(t);
- if (n !== r) return !n;
- const o = _(e) > _(t);
- return n ? !o : o
- }, t.negateHexLong = function (e) {
- return f(e) ? e.slice(1) : "-" + e
- }, t.parseHex = function (e) {
- const t = l(e);
- if (t.length % 2 != 0) throw(0, o.default)(`parseHex given hex "${t}" which is not a multiple of 8-bits.`);
- const n = new Uint8Array(t.length >> 1);
- for (let e = 0, r = 0; e < t.length; e += 2, r++) n[r] = c(t, e) << 4 | c(t, e + 1);
- return n.buffer
- }, t.randomHex = function (e) {
- const t = new Uint8Array(e);
- return self.crypto.getRandomValues(t), a(t)
- }, t.toHex = a, t.toLowerCaseHex = function (e) {
- const t = [];
- for (let n = 0; n < e.length; n++) {
- const r = e[n];
- t.push(s[r >> 4], s[15 & r])
- }
- return String.fromCharCode.apply(String, t)
- };
- var o = r(n(2065));
- t.NUM_HEX_IN_LONG = 16;
- const i = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70],
- s = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102];
- function a(e) {
- const t = [];
- for (let n = 0; n < e.length; n++) {
- const r = e[n];
- t.push(i[r >> 4], i[15 & r])
- }
- return String.fromCharCode.apply(String, t)
- }
- function c(e, t) {
- const n = e.charCodeAt(t);
- return n <= 57 ? n - 48 : n <= 70 ? 10 + n - 65 : 10 + n - 97
- }
- function l(e) {
- if (/[^0-9a-fA-F]/.test(e)) throw(0, o.default)(`"${e}" is not a valid hex`);
- return e
- }
- function u(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
- const n = l(e);
- return h(n, 16), `${t ? "-" : ""}0x${d(n, 16)}`
- }
- function d(e, t) {
- const n = t - e.length;
- let r = e;
- for (let e = 0; e < n; e++) r = "0" + r;
- return r
- }
- function _(e) {
- return e.substring(e.indexOf("0x") + 2)
- }
- function f(e) {
- return "-" === e[0]
- }
- function h(e, t) {
- if (e.length > t) throw(0, o.default)(`"${e}" is longer than ${4 * t} bits.`)
- }
- function p(e) {
- if (e > 4294967295 || e < -4294967296) throw(0, o.default)("uint32ToLowerCaseHex given number over 32 bits");
- return d((e >= 0 ? e : 4294967296 + e).toString(16), 8)
- }
- t.HEX_LOWER = s
- }, 4037: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.WA_USER_JID_SUFFIX = t.WA_USER_DOMAIN = t.WA_SERVER_JID_SUFFIX = t.WA_NEWSLETTER_JID_DOMAIN = t.SURVEY_USER_JID = t.STATUS_JID = t.PSA_JID = t.MSGR_USER_JID_SUFFIX = t.MSGR_USER_DOMAIN = t.LID_SUFFIX = t.LID_DOMAIN = t.INTEROP_USER_JID_SUFFIX = t.INTEROP_DOMAIN = t.DEFAULT_DEVICE_ID = t.AUTHOR_SYSTEM = t.AUTHOR_ME = void 0, t.asChatJid = function (e) {
- return e === c ? null : e
- }, t.asMulticastJid = function (e) {
- return null == M(e) ? e : null
- }, t.asPhoneChatJid = function (e) {
- return e === c ? null : e
- }, t.asStatusJid = function (e) {
- return e === c ? c : null
- }, t.authorAsPhoneUserJid = function (e) {
- if (e === s || e === a) return null;
- if (!e.endsWith(g)) return null;
- return e
- }, t.authorAsUserJid = function (e) {
- if (e === s || e === a) return null;
- return e
- }, t.authorToUserId = function (e, t) {
- return e === s || e === a ? t : U(e)
- }, t.createJidUtils = function (e) {
- let {platform: t} = e;
- const n = "msgr" === t ? d : g;
- return {
- toUserJid: function (e) {
- return `${e}${n}`
- }, getUserDomain: function () {
- return n
- }, getGroupCallDomain: function () {
- return "@call"
- }
- }
- }, t.defaultDeviceJidForUser = X, t.defaultLidDeviceJidForLidUserJid = function (e) {
- return O(e, 0)
- }, t.defaultMsgrDeviceJidForUser = function (e) {
- return `${I(e)}:0@msgr`
- }, t.defaultPhoneDeviceJidForUser = function (e) {
- return `${I(e)}:0@s.whatsapp.net`
- }, t.extractDeviceIDParts = R, t.extractDeviceId = C, t.extractFromJid = J, t.extractJidFromJidWithType = function (e) {
- return "phoneDevice" === e.jidType || "interopDevice" === e.jidType || "lidDevice" === e.jidType || "msgrDevice" === e.jidType ? e.deviceJid : "lidUser" === e.jidType || "interopUser" === e.jidType || "msgrUser" === e.jidType || "phoneUser" === e.jidType ? e.userJid : "group" === e.jidType ? e.groupJid : "status" === e.jidType ? e.statusJid : "call" === e.jidType ? e.callJid : "newsletter" === e.jidType ? e.newsletterJid : (e.jidType, e.broadcastJid)
- }, t.extractPhoneUserJid = function (e) {
- return L(e)
- }, t.extractUserId = U, t.extractUserJid = L, t.fullFormDeviceJidString = function (e) {
- const {user: t, agent: n = "0", device: r = "0", server: o} = N(e);
- return `${t}.${n}:${r}@${o}`
- }, t.getGroupDomain = function () {
- return l
- }, t.getMsgrUserDomain = function () {
- return d
- }, t.getServerDomain = function () {
- return "@s.whatsapp.net"
- }, t.getWhatsappUserDomain = function () {
- return g
- }, t.groupIdFromJid = function (e) {
- if (e.endsWith(l)) return e.slice(0, -l.length);
- throw(0, i.default)(`groupId called with non-group jid "${e}"`)
- }, t.interpretAndValidateJid = B, t.interpretAsDeviceId = function (e) {
- return e
- }, t.interpretAsGroupJid = G, t.interpretAsNumber = function (e) {
- return e
- }, t.interpretAsPhoneUserJid = function (e) {
- return e.endsWith(g) ? e : null
- }, t.interpretAsUserJid = M, t.isAuthorMe = function (e) {
- return "@me" === e
- }, t.isAuthorSystem = function (e) {
- return "@system" === e
- }, t.isLidUser = function (e) {
- return e.endsWith(E)
- }, t.isPrimaryDevice = function (e) {
- return 0 === C(e)
- }, t.lidFromLidUserJid = $, t.lidOrPhoneFromUserJid = function (e) {
- if (e.endsWith(g)) return D(e);
- if (e.endsWith(E)) return $(e);
- throw(0, i.default)(`lidOrPhoneFromUserJid called with non phone or lid jid "${e}"`)
- }, t.maybeSanitizeLogLineText = function (e) {
- if (!e.includes("@")) return e;
- return e.replace(x, W)
- }, t.parseJidParts = N, t.phoneNumberFromJid = D, t.sanitizeJidForLogging = W, t.stripAgentIdFromPhoneDeviceJid = function (e) {
- const {user: t, device: n = "0", server: r} = N(e);
- return `${t}:${n}@${r}`
- }, t.switchOnChatJidType = Y, t.switchOnJidType = function (e, t) {
- if (e === c) return t.status();
- return Y(e, {
- interopUser: t.interopUser,
- phoneUser: t.phoneUser,
- msgrUser: t.msgrUser,
- lidUser: t.lidUser,
- group: t.group
- })
- }, t.switchOnMsgrChatJidType = function (e, t) {
- if (e.endsWith(d)) return t.user(e);
- if (null != G(e)) return t.group(e);
- throw(0, i.default)(`Can not switch on chat jid ${e}`)
- }, t.switchOnMulticastJidType = function (e, t) {
- if (e === c) return t.multicast(c);
- return H(e, {user: t.user, group: t.multicast})
- }, t.switchOnPhoneChatJidType = H, t.switchOnPhoneJidType = function (e, t) {
- if (e === c) return t.status();
- return H(e, {user: t.user, group: t.group})
- }, t.switchOnUserChatJidType = function (e, t) {
- return Y(e, {
- lidUser: e => t.user(e),
- interopUser: e => t.user(e),
- msgrUser: e => t.user(e),
- phoneUser: e => t.user(e),
- group: e => t.group(e)
- })
- }, t.toBroadcastJid = function (e) {
- return `${e}@broadcast`
- }, t.toDeviceJid = function (e, t) {
- return `${I(e)}:${t}${V(e)}`
- }, t.toGroupJid = function (e) {
- if (e.endsWith(l)) return e;
- return `${e}@g.us`
- }, t.toLidDeviceJid = O, t.toLidUserJid = function (e) {
- return `${e}@lid`
- }, t.toMsgrDeviceJid = function (e, t) {
- return `${I(e)}:${t}@msgr`
- }, t.toMsgrUserJid = P, t.toNewsletterJid = function (e) {
- if (e.endsWith(v)) return e;
- return `${e}@newsletter`
- }, t.toPhoneDeviceJid = function (e, t) {
- return `${I(e)}:${t}@s.whatsapp.net`
- }, t.toPhoneUserJid = function (e) {
- return `${e}@s.whatsapp.net`
- }, t.unsafeCoerceToChatJid = function (e) {
- return e
- }, t.unsafeCoerceToDeviceId = ce, t.unsafeCoerceToDeviceJid = Z, t.unsafeCoerceToGroupJid = ae, t.unsafeCoerceToInteropDeviceJid = te, t.unsafeCoerceToInteropUserJid = ie, t.unsafeCoerceToLidDeviceJid = ne, t.unsafeCoerceToMsgrDeviceJid = ee, t.unsafeCoerceToMsgrUserJid = se, t.unsafeCoerceToNewsletterJid = function (e) {
- return e
- }, t.unsafeCoerceToPhoneDeviceJid = Q, t.unsafeCoerceToPhoneUserJid = oe, t.unsafeCoerceToUserJid = re, t.userIdFromJid = I, t.validateBroadcastJid = q, t.validateCallJid = function (e) {
- return T.test(e) ? e : null
- }, t.validateChatJid = function (e) {
- return K(e) || z(e)
- }, t.validateDeviceJid = function (e) {
- if (w.test(e) || p.test(e) || f.test(e) || k.test(e)) return e;
- if (S.test(e)) return X(e);
- return null
- }, t.validateDomainJid = function (e) {
- return "s.whatsapp.net" === e || "g.us" === e ? e : null
- }, t.validateGroupJid = z, t.validateMulticastJid = function (e) {
- return F(e) || z(e) || q(e) ? e : null
- }, t.validateNewsletterJid = function (e) {
- return y.test(e) ? e : null
- }, t.validateStatusJid = F, t.validateUserJid = K;
- var o = r(n(7537)), i = r(n(2065));
- t.DEFAULT_DEVICE_ID = 0;
- const s = "@me";
- t.AUTHOR_ME = s;
- const a = "@system";
- t.AUTHOR_SYSTEM = a;
- const c = "status@broadcast";
- t.STATUS_JID = c;
- t.PSA_JID = "0@s.whatsapp.net";
- const l = "@g.us", u = /^([1-9][0-9]{0,19}|(?!10)[1-9][0-9]{4,19}-[1-9][0-9]{9})@g.us$/, d = "@msgr";
- t.MSGR_USER_DOMAIN = d;
- t.MSGR_USER_JID_SUFFIX = "msgr";
- const _ = "@interop";
- t.INTEROP_DOMAIN = _;
- t.INTEROP_USER_JID_SUFFIX = "interop";
- const f = /^([1-9][0-9]{0,2}-[1-9][0-9]{0,14}(:[0])?)@interop$/,
- h = /^([1-9][0-9]{0,2}-[1-9][0-9]{0,14}(:[0])?)@interop$/,
- p = /^([1-9][0-9]{0,19}(:[1-9][0-9]{0,2})?)@msgr$/, b = /^([1-9][0-9]{0,19})@msgr$/,
- m = /^([1-9][0-9]{0,19})(:0)?@msgr$/;
- t.WA_SERVER_JID_SUFFIX = "s.whatsapp.net";
- const g = "@s.whatsapp.net";
- t.WA_USER_DOMAIN = g;
- t.WA_USER_JID_SUFFIX = "s.whatsapp.net";
- const v = "@newsletter";
- t.WA_NEWSLETTER_JID_DOMAIN = v;
- const y = /^([1-9][0-9]{0,19})@newsletter$/,
- w = /^(0|((?!10)[1-9][0-9]{4,19}(\.[0-9]{1,2})?(:[0-9]{1,2})))@s.whatsapp.net$/,
- S = /^(0|((?!10)[1-9][0-9]{4,19})(\.[0-9]{1,2})?)@s.whatsapp.net$/, E = "@lid";
- t.LID_DOMAIN = E;
- t.LID_SUFFIX = "lid";
- const j = /^([1-9][0-9]{0,14})@lid$/, k = /^([1-9][0-9]{0,14}(:[0-9]{1,2})?)@lid$/,
- A = /^(status|location|[1-9][0-9]{0,19})@broadcast$/, T = /^([0-9a-fA-F]{18,32})@call$/;
- t.SURVEY_USER_JID = "16505361212@s.whatsapp.net";
- const x = /([0-9a-zA-Z-:]+)@(g\.us|call|s\.whatsapp\.net|broadcast|msgr|lid)/g;
- function P(e) {
- return `${e}@msgr`
- }
- function I(e) {
- if (e.endsWith(g)) return e.slice(0, -g.length);
- if (e.endsWith(d)) return e.slice(0, -d.length);
- if (e.endsWith(_)) return e.slice(0, -_.length);
- if (e.endsWith(E)) return e.slice(0, -E.length);
- throw(0, i.default)(`userIdFromJid called with non-user jid "${e}"`)
- }
- function O(e, t) {
- return `${$(e)}:${t}@lid`
- }
- function U(e) {
- return e.split("@")[0]
- }
- function R(e) {
- const t = e.split("@")[0].split(":"), n = t[0], r = t[1];
- return {userId: n, deviceID: parseInt(r, 10)}
- }
- function C(e) {
- return R(e).deviceID
- }
- function D(e) {
- if (!e.endsWith(g)) throw(0, i.default)(`phoneNumberFromJid called with non-user jid "${e}"`);
- return e.slice(0, -g.length)
- }
- function M(e) {
- return e.endsWith(g) || e.endsWith(_) || e.endsWith(d) || e.endsWith(E) ? e : null
- }
- function $(e) {
- if (!e.endsWith(E)) throw(0, i.default)(`lidFromLidUserJid called with non-LidUserJid "${e}"`);
- return e.slice(0, -E.length)
- }
- function L(e) {
- const t = e.split("@");
- let n = t[0];
- const r = t[1];
- return n = n.split(":")[0], n = n.split(".")[0], `${n}@${r}`
- }
- function N(e) {
- const [t, n] = e.split("@"), [r, o] = t.split(":"), [i, s] = r.split(".");
- return {user: i, device: o, agent: s, server: n}
- }
- function J(e) {
- switch (e.jidType) {
- case"interopUser":
- case"lidUser":
- case"msgrUser":
- case"phoneUser":
- return e.userJid;
- case"group":
- return e.groupJid;
- case"status":
- return e.statusJid;
- case"interopDevice":
- case"lidDevice":
- case"msgrDevice":
- case"phoneDevice":
- return e.deviceJid;
- case"broadcast":
- return e.broadcastJid;
- case"call":
- return e.callJid;
- case"newsletter":
- return e.newsletterJid;
- default:
- return (0, o.default)(e.jidType)
- }
- }
- function B(e) {
- if (e === c) return {jidType: "status", statusJid: c};
- if (S.test(e)) return {jidType: "phoneUser", userJid: e};
- if (h.test(e)) return {jidType: "interopUser", userJid: e};
- if (b.test(e)) return {jidType: "msgrUser", userJid: e};
- if (m.test(e)) {
- return {jidType: "msgrUser", userJid: P(e.substr(0, e.indexOf(":")))}
- }
- return w.test(e) ? {jidType: "phoneDevice", deviceJid: e} : f.test(e) ? {
- jidType: "interopDevice",
- deviceJid: e
- } : p.test(e) ? {jidType: "msgrDevice", deviceJid: e} : u.test(e) ? {
- jidType: "group",
- groupJid: e.endsWith(l) ? e : `${e}@g.us`
- } : A.test(e) ? {jidType: "broadcast", broadcastJid: e} : T.test(e) ? {
- jidType: "call",
- callJid: e
- } : j.test(e) ? {jidType: "lidUser", userJid: e} : k.test(e) ? {
- jidType: "lidDevice",
- deviceJid: e
- } : y.test(e) ? {jidType: "newsletter", newsletterJid: e} : {jidType: "unknown"}
- }
- function F(e) {
- return "status@broadcast" === e ? e : null
- }
- function K(e) {
- if (S.test(e) || h.test(e) || b.test(e) || j.test(e)) return e;
- if (m.test(e)) {
- return P(e.substr(0, e.indexOf(":")))
- }
- return null
- }
- function q(e) {
- return A.test(e) ? e : null
- }
- function z(e) {
- return u.test(e) ? e : null
- }
- function W(e) {
- const t = B(e);
- return "unknown" === t.jidType ? e : "status" === t.jidType ? t.statusJid : (t.jidType, J(t).replace(/^([^@]*)([^@][^@][^@][^@])@(.*)$/, "...$2@$3"))
- }
- function G(e) {
- return e.endsWith(l) ? e : null
- }
- function Y(e, t) {
- if (e.endsWith(g)) return t.phoneUser(e);
- if (e.endsWith(d)) return t.msgrUser(e);
- if (e.endsWith(_)) return t.interopUser(e);
- if (e.endsWith(E)) return t.lidUser(e);
- if (null != G(e)) return t.group(e);
- throw(0, i.default)(`Can not switch on chat jid ${e}`)
- }
- function H(e, t) {
- if (e.endsWith(g)) return t.user(e);
- if (null != G(e)) return t.group(e);
- throw(0, i.default)(`Can not switch on chat jid ${e}`)
- }
- function V(e) {
- if (e.endsWith(g)) return g;
- if (e.endsWith(d)) return d;
- if (e.endsWith(E)) return E;
- throw(0, i.default)(`userDomainFromJid called with non-user jid "${e}"`)
- }
- function X(e) {
- return `${I(e)}:0${V(e)}`
- }
- function Z(e) {
- return e
- }
- function Q(e) {
- return e
- }
- function ee(e) {
- return e
- }
- function te(e) {
- return e
- }
- function ne(e) {
- return e
- }
- function re(e) {
- return e
- }
- function oe(e) {
- return e
- }
- function ie(e) {
- return e
- }
- function se(e) {
- return e
- }
- function ae(e) {
- return e
- }
- function ce(e) {
- return e
- }
- }, 9619: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "?";
- if (null == e) throw(0, o.default)(`Unexpected null or undefined: ${t}`);
- return e
- };
- var o = r(n(2065))
- }, 2207: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.asyncChain = function (e, t) {
- if (e.success) return t(e.value);
- return Promise.resolve(e)
- }, t.asyncMapError = u, t.asyncMapResult = c, t.catchError = function (e) {
- return function () {
- var t = (0, o.default)((function* (t) {
- yield u(t, e)
- }));
- return function () {
- return t.apply(this, arguments)
- }
- }()
- }, t.chain = function (e, t) {
- if (e.success) return t(e.value);
- return e
- }, t.makeError = i, t.makeResult = s, t.mapAsyncResult = function () {
- return a.apply(this, arguments)
- }, t.mapError = function (e, t) {
- if (e.success) return s(e.value);
- return i(t(e.error), e.payload)
- }, t.mapResult = function (e, t) {
- if (!e.success) return e;
- return s(t(e.value))
- }, t.onResult = function (e) {
- return t => c(t, e)
- };
- var o = r(n(1504));
- function i(e, t) {
- return null != t ? {success: !1, error: e, payload: t} : {success: !1, error: e}
- }
- function s(e) {
- return {success: !0, value: e}
- }
- function a() {
- return (a = (0, o.default)((function* (e, t) {
- const n = yield e;
- return n.success ? s(t(n.value)) : n
- }))).apply(this, arguments)
- }
- function c() {
- return l.apply(this, arguments)
- }
- function l() {
- return (l = (0, o.default)((function* (e, t) {
- if (!e.success) return e;
- return s(yield t(e.value))
- }))).apply(this, arguments)
- }
- function u() {
- return d.apply(this, arguments)
- }
- function d() {
- return (d = (0, o.default)((function* (e, t) {
- if (e.success) return s(e.value);
- return i(yield t(e.error), e.payload)
- }))).apply(this, arguments)
- }
- }, 8494: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.ShiftTimer = void 0;
- var o = r(n(2065));
- function i(e) {
- if (!(e >= 0)) throw(0, o.default)("ShiftTimer must be given delay >= 0")
- }
- t.ShiftTimer = class {
- constructor(e) {
- this._timer = 0, this._rafId = 0, this.ts = 0, this._timerTs = 0, this._upperBound = 0, this._lowerBound = 0, this._arg = void 0, this._run = () => {
- const e = this._arg, t = this._foo;
- this._rafId = 0, this._timer = 0, this.ts = 0, this._timerTs = 0, this._upperBound = 0, this._lowerBound = 0, this._arg = void 0, t(e)
- }, this.onOrBefore = (e, t) => {
- i(e);
- const n = Date.now() + e, r = this._upperBound;
- if (0 !== r && r < n) return;
- const o = this._lowerBound;
- 0 !== o && n < o || (this._upperBound = n, this._rafId || this._timer && !(n < this.ts) || this._setDelay(n, e, t))
- }, this.forceRunNow = e => {
- this._timer && clearTimeout(this._timer), this._rafId && cancelAnimationFrame(this._rafId), this._arg = e, this._run()
- }, this.cancel = () => {
- this._timer && clearTimeout(this._timer), this._rafId && cancelAnimationFrame(this._rafId), this._timer = 0, this._rafId = 0, this.ts = 0, this._timerTs = 0, this._upperBound = 0, this._lowerBound = 0, this._arg = void 0
- }, this._foo = e
- }
- onOrBeforeRepaint(e) {
- if (this._rafId) return;
- const t = Date.now(), n = this._lowerBound;
- if (0 !== n && t < n) return;
- const r = this._upperBound;
- (0 === r || t < r) && (this._upperBound = t), this._timer && (clearTimeout(this._timer), this._timer = 0), (!this.ts || this.ts > t) && (this.ts = t), this._arg = e, this._rafId = requestAnimationFrame(this._run)
- }
- onOrAfter(e, t) {
- i(e);
- const n = Date.now() + e, r = this._lowerBound;
- if (0 !== r && n < r) return;
- const o = this._upperBound;
- 0 !== o && o < n || (this._lowerBound = n, (!this._timer || this.ts < n) && this._setDelay(n, e, t))
- }
- debounce(e, t) {
- i(e), this._debounce(Date.now(), e, t)
- }
- debounceAndCap(e, t, n) {
- i(e), i(t);
- const r = Date.now(), o = r + t, s = this._lowerBound, a = this._upperBound;
- (0 === s || s <= o) && (0 === a || o < a) && (this._upperBound = o), this._debounce(r, e, n)
- }
- forceRunNowIfScheduled() {
- this._timer ? (clearTimeout(this._timer), this._run()) : this._rafId && (cancelAnimationFrame(this._rafId), this._run())
- }
- isScheduled() {
- return 0 !== this._timer || 0 !== this._rafId
- }
- _debounce(e, t, n) {
- const r = e + t, o = this._lowerBound;
- if (0 !== o && r < o) return;
- const i = this.ts, s = this._upperBound;
- 0 !== s && s < r ? i < s && this._setDelay(s, s - e, n) : i < r && this._setDelay(r, t, n)
- }
- _setDelay(e, t, n) {
- if (this._rafId && (cancelAnimationFrame(this._rafId), this._rafId = 0), this._arg = n, this.ts = e, this._timer) {
- const t = e - this._timerTs;
- if (-16 < t && t < 16) return;
- clearTimeout(this._timer)
- }
- this._timer = setTimeout(this._run, t), this._timerTs = e
- }
- }
- }, 9987: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.YEAR_SECONDS = t.WEEK_SECONDS = t.WEEK_MILLISECONDS = t.MonotonicTimer = t.MINUTE_SECONDS = t.MINUTE_MILLISECONDS = t.MAX_INT = t.HOUR_SECONDS = t.HOUR_MILLISECONDS = t.FIVE_MINUTES = t.DEFAULT_UNIXTIME = t.DAY_SECONDS = t.DAY_MILLISECONDS = void 0, t.cappedMillisecondsUntil = b, t.castLongIntToUnixTime = function (e) {
- return "number" != typeof e ? (0, r.hexLongIsNegative)(e) ? u : l : f(e)
- }, t.castMilliSecondsToUnixTime = h, t.castMillisTimeToUnixTime = function (e) {
- if (null == e) return e;
- return e > l ? h(e) : f(e)
- }, t.castToMillisTime = p, t.castToUnixTime = f, t.castUnixTimeToMillisTime = function (e) {
- return 1e3 * e
- }, t.convertHexToDate = function (e) {
- const t = Number.parseInt(e, 16);
- if (Number.isFinite(t)) return new Date(1e3 * f(t));
- return null
- }, t.delayUntil = function (e) {
- const t = b(e);
- return new Promise((e => {
- setTimeout(e, t)
- }))
- }, t.fromMillisTime = function (e) {
- return e
- }, t.futureUnixTime = function (e, t) {
- const n = null != t ? t : m();
- return f(Math.ceil(n + Math.max(e, 0)))
- }, t.getClockSkew = function () {
- return _
- }, t.happenedWithin = function (e, t) {
- return w(m(), e, t)
- }, t.happenedWithinAt = w, t.isInFuture = function (e) {
- return g(e) > 0
- }, t.isOverflowTime = function (e) {
- return e < u || e > l
- }, t.isWithinNext24h = function (e) {
- return e - m() <= i
- }, t.midnight = function () {
- return f((new Date).setHours(0, 0, 0, 0) / 1e3 - _)
- }, t.midnightOn = function (e) {
- return f(S(e).setHours(0, 0, 0, 0) / 1e3 - _)
- }, t.millisTime = function () {
- return E() - 1e3 * _
- }, t.monotonicTime = v, t.monotonicTimeSince = y, t.oldest = function (e, t) {
- return e < t ? e : t
- }, t.pastUnixTime = function (e, t) {
- const n = null != t ? t : m();
- return f(Math.ceil(n - Math.max(e, 0)))
- }, t.performanceAbsoluteNow = E, t.sameDay = function (e, t) {
- if (Math.abs(e - t) > i) return !1;
- const n = d.time === e ? d.day : S(e + _).getDay(), r = d.time === t ? d.day : S(t + _).getDay();
- return d.time = t, d.day = r, n === r
- }, t.secondsUntil = g, t.setClockSkew = function (e) {
- _ = e
- }, t.timeSince_USE_ONLY_IF_APPROVED = function (e) {
- return Math.max(m() - e, 0)
- }, t.timeoutFor = function (e, t) {
- const n = m(), r = Math.max(e + t - n, 0);
- return Math.min(1e3 * r, ~(1 << 31))
- }, t.toDate = S, t.toHttpHeaderDate = function (e) {
- return S(e).toUTCString()
- }, t.unixTime = m, t.unixTimeMs = function () {
- return Date.now() - 1e3 * _
- }, t.unixTimeWithoutClockSkewCorrection = function () {
- return f(Date.now() / 1e3)
- }, t.unskewedDate_USE_ONLY_IF_APPROVED = function () {
- return new Date
- };
- var r = n(5982);
- t.MINUTE_SECONDS = 60;
- t.FIVE_MINUTES = 300;
- const o = 3600;
- t.HOUR_SECONDS = o;
- const i = 86400;
- t.DAY_SECONDS = i;
- t.WEEK_SECONDS = 604800;
- t.YEAR_SECONDS = 31536e3;
- t.MINUTE_MILLISECONDS = 6e4;
- const s = 36e5;
- t.HOUR_MILLISECONDS = s;
- const a = 864e5;
- t.DAY_MILLISECONDS = a;
- t.WEEK_MILLISECONDS = 6048e5;
- const c = 1 << 31;
- t.DEFAULT_UNIXTIME = c;
- const l = 2147483647;
- t.MAX_INT = l;
- const u = -2147483647, d = {time: 0, day: -4};
- let _ = 0;
- function f(e) {
- return Math.max(u, Math.min(0 | e, l))
- }
- function h(e) {
- return f(e / 1e3)
- }
- function p(e) {
- return e
- }
- function b(e) {
- const t = Math.max(e - m(), 0);
- return Math.min(1e3 * t, ~(1 << 31))
- }
- function m() {
- return f(Date.now() / 1e3 - _)
- }
- function g(e) {
- return Math.max(e - m(), 0)
- }
- function v() {
- return performance.now()
- }
- function y(e) {
- return Math.floor(performance.now() - e)
- }
- function w(e, t, n) {
- return Math.abs(e - t) <= n
- }
- function S(e) {
- return new Date(1e3 * e)
- }
- function E() {
- return Date.now()
- }
- t.MonotonicTimer = class {
- constructor() {
- const e = v();
- this._initTime = e, this._startTime = e
- }
- reset() {
- this._startTime = v()
- }
- elapsed() {
- return y(this._startTime)
- }
- cumulative() {
- return y(this._initTime)
- }
- }
- }, 7791: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t) {
- const n = [], r = e.length, o = t.length, i = Math.max(r, o);
- for (let s = 0; s < i; s++) s < r && n.push(e[s]), s < o && n.push(t[s]);
- return n
- }
- }, 6432: (e, t) => {
- "use strict";
- function n(e, t) {
- const r = function () {
- for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
- const s = t ? t.apply(this, o) : o[0];
- if (null == s) return e.apply(this, o);
- const a = r.cache;
- if (a.has(s)) return a.get(s);
- const c = e.apply(this, o);
- return r.cache = a.set(s, c) || a, c
- };
- return r.cache = new (n.Cache || Map), r
- }
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = n, n.Cache = Map
- }, 29: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.castTypedArrays = function (e, t) {
- if (t instanceof e) return t;
- if ("string" == typeof t) return new e((0, r.decodeB64)(t));
- return new e(t)
- };
- var r = n(2089)
- }, 8358: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.concatTypedArrays = function (e, t) {
- let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0;
- const r = t.reduce(((e, t) => e + t.length), n), o = new e(r);
- let i = 0;
- return t.forEach((e => {
- o.set(e, i), i += e.length
- })), o
- }
- }, 8481: (e, t, n) => {
- "use strict";
- var r = n(7914);
- Object.defineProperty(t, "__esModule", {value: !0}), t.ParsableXmlNode = void 0, t.convertBytesToUint = a;
- var o = r(n(2065)), i = r(n(9028)), s = n(7448);
- function a(e, t) {
- let n = 0;
- for (let r = 0; r < t; r++) n = 256 * n + e[r];
- return n
- }
- t.ParsableXmlNode = class {
- constructor(e, t) {
- this._name = e, this._node = t, this._children = Array.isArray(t.content) ? t.content.map((t => new this.constructor(e, t))) : null
- }
- name() {
- return this._name
- }
- node() {
- return this._node
- }
- hasAttr(e) {
- return (0, i.default)(this._node.attrs, e)
- }
- assertTag(e) {
- this._node.tag !== e && this.throw(`to be <${e}>`)
- }
- tag() {
- return this._node.tag
- }
- maybeChild(e) {
- const t = this._children;
- if (!t) return null;
- for (let n = 0; n < t.length; n++) if (t[n].tag() === e) return t[n];
- return null
- }
- hasChild(e) {
- return !!this.maybeChild(e)
- }
- child(e) {
- const t = this.maybeChild(e);
- return t || this.throw(`to have child <${e}>`)
- }
- assertAttr(e, t) {
- const n = this.attrString(e);
- n !== t && this.throw(`to have "${e}"="${t}", but instead has "${n}"`)
- }
- attrString(e) {
- return (0, i.default)(this._node.attrs, e) ? this.decodeAsString(this._node.attrs[e]) : this.throw(`to have attribute "${e}"`)
- }
- forEachAttributeKey(e) {
- const t = this._node.attrs;
- Object.keys(t).forEach((t => e(t)))
- }
- maybeAttrString(e) {
- return this.hasAttr(e) ? this.decodeAsString(this._node.attrs[e]) : null
- }
- maybeAttrInt(e, t, n) {
- return this.hasAttr(e) ? this.attrInt(e, t, n) : null
- }
- attrEnumValues(e, t, n) {
- const r = new Set(t), o = this.attrString(e);
- if (!r.has(o)) {
- if (null != n) return n;
- const t = Array.from(r).join("|");
- return this.throw(`to have "${e}"={${t}} but has value "${o}"`)
- }
- return o
- }
- attrEnum(e, t) {
- const n = this.attrString(e);
- if (!(0, i.default)(t, n)) {
- const r = Object.keys(t).join("|");
- return this.throw(`to have "${e}"={${r}} but has value "${n}"`)
- }
- return t[n]
- }
- attrEnumOrNullIfUnknown(e, t) {
- const n = this.attrString(e);
- return (0, i.default)(t, n) ? t[n] : null
- }
- attrEnumOrDefault(e, t, n) {
- return this.hasAttr(e) ? this.attrEnum(e, t) : n
- }
- attrInt(e, t, n) {
- const r = this.attrString(e);
- return this._parseInt(r, e, t, n)
- }
- _parseInt(e, t, n, r) {
- const o = parseInt(e, 10);
- return Number.isNaN(o) ? this.throw(`to have "${t}"={integer} but has value "${e}"`) : void 0 !== n && o < n ? this.throw(`to have "${t}"={at least ${n}} but has value ${o}`) : void 0 !== r && o >= r ? this.throw(`to have "${t}"={below ${r}} but has value ${o}`) : o
- }
- forEachChild(e) {
- const t = this._children;
- if (t) t.forEach((t => e(t))); else if (null != this._node.content) return this.throw("to have children")
- }
- forEachChildWithTag(e, t) {
- this.forEachChild((n => {
- n.tag() === e && t(n)
- }))
- }
- mapChildren(e) {
- const t = this._children;
- return t || null == this._node.content ? t ? t.map((t => e(t))) : [] : this.throw("to have children")
- }
- mapChildrenWithTag(e, t) {
- const n = this._children;
- return n || null == this._node.content ? n ? n.filter((t => t.tag() === e)).map((e => t(e))) : [] : this.throw("to have children")
- }
- mapFirstChild(e) {
- const t = this._children;
- return t && 0 !== t.length ? e(t[0]) : this.throw("to have children")
- }
- hasContent() {
- return !this._children && !!this._node.content
- }
- hasChildren() {
- return null != this._children
- }
- getChildren() {
- return this._children
- }
- mapAttrKeys(e) {
- const t = this.getAttrKeys();
- return t && t.length ? t.map(e) : []
- }
- getAttrKeys() {
- return Object.keys(this._node.attrs)
- }
- hasAttrs() {
- return (this._node.attrs ? Object.keys(this._node.attrs) : []).length > 0
- }
- getNode() {
- return this._node
- }
- unsafeSetChildren(e) {
- this._children = e
- }
- unsafeSetNodeContent(e) {
- this._node.content = e
- }
- contentUint(e) {
- return a(this.contentBytes(e), e)
- }
- contentBytes() {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : -1;
- if (this._children) return this.throw("to have binary content, but has children instead");
- if (null != this._node.content) {
- const t = this._node.content;
- return -1 !== e && t.length !== e ? this.throw(`to be ${e} bytes, but got ${t.length} instead`) : t
- }
- return this.throw("to have content")
- }
- contentString() {
- return this._children ? this.throw("to have string content, but has children instead") : null != this._node.content ? this._node.content : this.throw("to have content")
- }
- contentInt(e, t) {
- const n = this.contentString();
- return this._parseInt(n, "content", e, t)
- }
- contentEnum(e) {
- const t = this.contentString();
- if (!(0, i.default)(e, t)) {
- const n = Object.keys(e).join("|");
- return this.throw(`to have content {${n}} but has value "${t}"`)
- }
- return e[t]
- }
- decodeAsString(e) {
- if ("string" != typeof e) throw(0, o.default)(`decodeAsString: attribute is ${typeof e} not a string: ${e}`);
- return e
- }
- throw(e) {
- throw new s.XmlParsingFailure(this._name, `expected <${this._node.tag}> ${e}`)
- }
- toString() {
- return this._node.toString()
- }
- }
- }, 8132: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
- const t = e.replace(/>\s{0,}</g, "><").replace(/</g, "~::~<").replace(/\s*xmlns:/g, "~::~xmlns:").replace(/\s*xmlns=/g, "~::~xmlns=").split("~::~"),
- n = t.length;
- let r = !1, o = 0, i = "", s = 0;
- const a = ["\n"];
- for (s = 0; s < 100; s++) a.push(a[s] + " ");
- const c = function (e, t) {
- const n = /^<[\w:\-.,]+/.exec(e[t - 1]), r = /^<\/[\w:\-.,]+/.exec(e[t]);
- return null != n && null != r && n[0] === r[0]
- };
- for (s = 0; s < n; s++) t[s].search(/<!/) > -1 ? (i += a[o] + t[s], r = !0, (t[s].search(/-->/) > -1 || t[s].search(/\]>/) > -1 || t[s].search(/!DOCTYPE/) > -1) && (r = !1)) : t[s].search(/-->/) > -1 || t[s].search(/\]>/) > -1 ? (i += t[s], r = !1) : c(t, s) ? (i += t[s], r || o--) : t[s].search(/<\w/) > -1 && -1 === t[s].search(/<\//) && -1 === t[s].search(/\/>/) ? i = i += r ? t[s] : a[o++] + t[s] : t[s].search(/<\w/) > -1 && t[s].search(/<\//) > -1 ? i = i += r ? t[s] : a[o] + t[s] : t[s].search(/<\//) > -1 ? i = i += r ? t[s] : a[0 === o ? o : --o] + t[s] : t[s].search(/\/>/) > -1 ? i = i += r ? t[s] : a[o] + t[s] : t[s].search(/<\?/) > -1 || t[s].search(/xmlns:/) > -1 || t[s].search(/xmlns=/) > -1 ? i += a[o] + t[s] : i += t[s];
- return "\n" === i[0] ? i.slice(1) : i
- }
- }, 3260: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.XmlNode = void 0, t.attrsToString = i, t.uint8ArrayToDebugString = s;
- var r = n(5982);
- const o = {};
- function i(e) {
- const t = Object.keys(e);
- let n = "";
- for (let r = 0; r < t.length; r++) {
- const o = t[r];
- n += ` ${o}="${e[o].toString()}"`
- }
- return n
- }
- function s(e) {
- let t = "";
- return t = 0 === e.length ? "\x3c!-- empty binary --\x3e" : e.length < 50 ? (0, r.bytesToDebugString)(e) : `\x3c!-- ${e.length} bytes --\x3e`, t
- }
- t.XmlNode = class {
- constructor(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o,
- n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
- this.tag = e, this.attrs = t, this.content = n
- }
- toString() {
- let e = "<" + this.tag;
- e += i(this.attrs);
- const t = this.content;
- return Array.isArray(t) ? e += `>${t.map(String).join("")}</${this.tag}>` : t instanceof Uint8Array ? e += `>${s(t)}</${this.tag}>` : e += null != t ? `>${String(t)}</${this.tag}>` : " />", e
- }
- }
- }, 7448: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.XmlParsingFailure = void 0;
- t.XmlParsingFailure = class {
- constructor(e, t) {
- this.parser = e, this.reason = t
- }
- toString() {
- return `XmlParsingFailure: ${this.parser}: ${this.reason}`
- }
- }
- }, 2271: (e, t, n) => {
- "use strict";
- var r = n(5318), o = n(2765), i = r(n(733)), s = r(n(6128));
- if (s.default.Promise.PSD.onunhandled = () => {
- }, s.default.Promise.PSD.txRelaxedDurabilityEnabled = !0, (0, o.isFeatureEnabled)("native_promise_runtime")) {
- const {loadStackPromisePolyfill: e} = n(9069);
- e()
- } else self.Promise = (0, i.default)(n(9909))
- }, 3741: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.getABPropConfigValue = function (e) {
- var t;
- const n = r.ABPropConfigs[e], [i, s, a, c] = n, l = a;
- if (null == o) return l;
- return null !== (t = o(e)) && void 0 !== t ? t : l
- }, t.setGetABPropConfigValueImpl = function (e) {
- o = e
- };
- var r = n(9282);
- let o = null
- }, 9282: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.ABPropConfigs = void 0;
- t.ABPropConfigs = {
- order_details_total_order_minimum_value: [1719, "float", 1, 1],
- order_details_total_maximum_value: [1684, "float", 5e3, 5e3],
- order_details_total_minimum_value: [1683, "int", 0, 0],
- order_messages_ephemeral_exception_enabled: [3240, "bool", !1, !0],
- in_app_support_v2_enabled: [233, "bool", !1, !1],
- in_app_support_v2_locale_langs: [379, "string", "", ""],
- in_app_support_v2_numbers: [390, "string", "", ""],
- in_app_support_v2_number_prefixes: [1031, "string", "15517868", "15517868"],
- in_app_support_v2_jump_to_group: [819, "bool", !1, !1],
- in_app_support_v2_jump_to_group_wait_time_in_ms: [974, "int", 5e3, 5e3],
- quick_mute_enabled: [2765, "bool", !1, !1],
- groups_dogfooding_ui: [308, "bool", !1, !1],
- md_icdc_enabled: [309, "bool", !1, !1],
- md_icdc_hash_length: [310, "int", 10, 10],
- played_self_enabled: [361, "bool", !1, !1],
- ephemeral_24h_duration: [407, "bool", !1, !0],
- disappearing_mode: [536, "bool", !1, !1],
- payments_expressive_backgrounds_enabled: [605, "bool", !1, !0],
- ephemeral_allow_group_members: [432, "bool", !1, !0],
- business_profile_refresh_m1_enabled: [470, "bool", !1, !0],
- num_days_key_index_list_expiration: [730, "int", 35, 35],
- num_days_before_device_expiry_check: [731, "int", 7, 7],
- media_reupload_limit_mb: [1098, "int", 100, 100],
- portrait_thumb_enabled_chat: [1961, "bool", !1, !0],
- portrait_thumb_enabled_status: [1962, "bool", !1, !0],
- default_video_limit_mb: [3185, "int", 16, 64],
- default_video_limit_mb_newsletter: [4155, "int", 16, 16],
- default_gif_limit_mb: [3656, "int", 16, 64],
- default_audio_limit_mb: [3657, "int", 16, 64],
- default_media_limit_mb: [3660, "int", 16, 64],
- hd_video_label_enabled: [3934, "bool", !1, !0],
- per_send_hd_video_setting_enabled: [3935, "bool", !1, !0],
- per_send_hd_video_setting_for_groups_enabled: [4138, "bool", !1, !0],
- hd_video_min_streaming_bandwidth: [3936, "int", 150, 150],
- hd_video_show_data_warning_dialog: [4152, "bool", !1, !0],
- hd_video_data_warning_max_mb: [4153, "int", 64, 64],
- hd_video_definition_min_edge: [4171, "int", 720, 720],
- hd_video_definition_max_edge: [4172, "int", 864, 864],
- hd_video_definition_min_edge_with_max_edge: [4175, "int", 480, 480],
- message_level_reporting: [535, "bool", !1, !0],
- native_shop_preview_enabled: [636, "bool", !1, !0],
- sync_archive_v2_setting: [736, "bool", !1, !1],
- ptt_conversation_waveform: [637, "bool", !1, !0],
- ptt_waveform_send: [746, "bool", !1, !0],
- adv_v2_m4_m5: [753, "bool", !1, !1],
- adv_v2_m6: [903, "bool", !1, !1],
- ptt_draft_enabled: [777, "bool", !1, !0],
- ptt_pausable_enabled: [871, "bool", !1, !0],
- tos_3_client_gating_biz_initiated_enabled: [953, "bool", !1, !1],
- tos_3_client_gating_enabled: [791, "bool", !1, !1],
- tos_3_client_force_fetch_enabled: [792, "bool", !1, !1],
- tos_client_state_fetch_enabled: [877, "bool", !1, !1],
- tos_client_state_force_fetch_enabled: [878, "bool", !1, !1],
- tos_client_state_fetch_iteration: [908, "int", 0, 0],
- country_client_gating_enabled: [1105, "bool", !1, !1],
- system_msg_numbers_fb_branded: [1035, "string", "16505434800,16503130062,16507885324,16508620604,16504228206,447710173736,16315551023,16505361212,16508129150,16315555102,16315558723,16505212669,16507885280,19032707825,0", "16505434800,16503130062,16507885324,16508620604,16504228206,447710173736,16315551023,16505361212,16508129150,16315555102,16315558723,16505212669,16507885280,19032707825,0"],
- system_msg_numbers_fb_inc: [1036, "string", "", ""],
- log_clock_skew: [1190, "bool", !1, !1],
- trusted_contacts: [794, "bool", !1, !1],
- trusted_contacts_sender: [995, "bool", !1, !1],
- trusted_contacts_ti: [922, "bool", !1, !1],
- tctoken_duration: [865, "int", 604800, 604800],
- tctoken_num_buckets: [909, "int", 4, 4],
- tctoken_duration_sender: [996, "int", 604800, 604800],
- tctoken_num_buckets_sender: [997, "int", 4, 4],
- reactions_receive: [827, "bool", !1, !0],
- reactions_send: [828, "bool", !1, !0],
- reactions_announcement_only: [1150, "bool", !1, !1],
- reaction_cleanup_days: [987, "int", 31, 31],
- reactions_chat_preview: [1605, "bool", !1, !0],
- reactions_animations: [1361, "bool", !1, !0],
- reactions_animations_simple: [1485, "bool", !1, !0],
- md_migration_experience: [861, "int", 2, 2],
- web_abprop_direct_connection_md: [869, "bool", !1, !0],
- media_upload_prekeys_fetch_enabled: [907, "bool", !1, !0],
- reactions_panel_prekeys_fetch_enabled: [1828, "bool", !1, !0],
- status_quick_reply_enabled: [1455, "bool", !1, !0],
- status_quick_reply_receiver_changes_enabled: [1974, "bool", !1, !0],
- ptt_remember_play_position: [952, "bool", !1, !0],
- banned_shops_ux_enabled: [957, "bool", !1, !0],
- group_suspend_v0_enabled: [973, "bool", !1, !0],
- expiring_groups_enabled: [3181, "bool", !1, !1],
- community_breakout_groups_enabled: [3864, "bool", !1, !0],
- parent_group_directory_enabled: [3795, "bool", !1, !0],
- parent_group_view_enabled: [982, "bool", !1, !0],
- parent_group_create_enabled: [1173, "bool", !1, !0],
- parent_group_query_ts: [1228, "int", 0, 0],
- parent_group_link_limit: [1238, "int", 50, 10],
- allow_subgroup_admin_to_unlink: [3054, "bool", !1, !0],
- community_creation_no_add_groups_screen: [3246, "bool", !1, !0],
- community_announcement_group_size_limit: [2774, "int", 5e3, 5e3],
- community_announcement_improvement_m1: [3121, "bool", !1, !0],
- community_announcement_improvement_m2: [3239, "bool", !1, !0],
- community_announcement_improvement_m3: [3380, "bool", !1, !0],
- community_creation_nux_always: [4053, "bool", !1, !1],
- community_creation_nux_count: [4071, "int", 1, 1],
- community_subgroup_icon_variant: [3078, "int", 0, 2],
- community_subgroup_identity_v2: [4160, "bool", !1, !0],
- parent_group_link_limit_community_creation: [1990, "int", 10, 10],
- parent_group_admins_limit: [1655, "int", 20, 20],
- parent_group_view_enabled_for_smb_on_web: [2205, "bool", !1, !0],
- parent_group_create_enabled_for_smb_on_web: [2206, "bool", !1, !0],
- parent_group_create_privacy: [2356, "bool", !1, !0],
- parent_group_min_participants_for_group_entry_point: [2382, "int", 20, 20],
- parent_group_tap_to_request_enabled: [2436, "bool", !1, !0],
- parent_group_tap_to_add_enabled: [2446, "bool", !1, !0],
- parent_group_no_disclaimer: [2447, "bool", !1, !0],
- parent_group_subgroup_filter: [3147, "bool", !1, !1],
- community_groups_navigation: [3023, "bool", !1, !0],
- community_chat_list_tabs: [3748, "bool", !1, !1],
- parent_group_no_subgroup_requirement: [3167, "bool", !1, !0],
- community_admin_promotion_one_time_prompt: [1864, "bool", !1, !1],
- document_preview_caption_changes_enabled: [2307, "bool", !1, !0],
- forwarded_ptt_ui_enabled: [1040, "bool", !1, !0],
- shops_storefront_url_format: [1054, "string", "https://www.facebook.com/%s/shop/", "https://www.facebook.com/%s/shop/"],
- message_count_logging_md_enabled: [1135, "bool", !1, !1],
- url_send_receive_logging_enabled: [2430, "bool", !1, !0],
- inline_video_playback_additional_logging_enabled: [2431, "bool", !1, !0],
- dev_prop_string: [1064, "string", "", ""],
- dev_prop_boolean: [1065, "bool", !1, !1],
- dev_prop_int: [1066, "int", 0, 0],
- dev_prop_float: [1067, "float", 0, 0],
- disable_status_to_non_sub: [3077, "bool", !1, !1],
- order_details_from_cart_enabled: [1107, "bool", !1, !0],
- order_details_custom_item_enabled: [1176, "bool", !1, !0],
- order_details_from_catalog_enabled: [1212, "bool", !1, !0],
- md_app_state_critical_data_processing_logging: [1187, "bool", !1, !0],
- md_app_state_report_md_sync_mutation_stats: [1221, "bool", !1, !0],
- order_management_enabled: [1188, "bool", !1, !1],
- growth_lock_v0_enabled: [1204, "bool", !1, !0],
- smart_filters_enabled_consumer: [1287, "bool", !1, !0],
- inbox_management_filters_m2: [3554, "bool", !1, !1],
- md_offline_v2_m2_enabled: [1517, "int", 10, 10],
- profile_photo_rings_for_status_enabled: [1533, "bool", !1, !0],
- dc_edit_postcode_by_default_enabled: [1534, "bool", !1, !1],
- media_picker_select_limit: [2614, "int", 30, 30],
- media_picker_select_limit_new: [2693, "int", 30, 30],
- chatlist_filters_v1: [1608, "bool", !1, !1],
- community_suspend_v0_enabled: [1653, "bool", !1, !0],
- is_meta_employee_or_internal_tester: [1777, "bool", !1, !1],
- disable_auto_download: [1838, "bool", !1, !1],
- community_tab_m2: [2154, "bool", !1, !0],
- gif_autoplay_enabled: [2281, "bool", !1, !1],
- gif_min_play_loops: [3682, "int", 1, 1],
- gif_max_play_loops: [3683, "int", 3, 3],
- gif_max_play_duration: [3684, "int", 5, 5],
- web_send_only_active_receipts: [1868, "bool", !1, !0],
- num_days_hosted_device_signed_identity_signature_expiration: [2461, "int", 90, 90],
- cag_member_key_rotation_optimization: [2521, "bool", !1, !1],
- elevated_push_names_v2_enabled: [2540, "bool", !1, !1],
- elevated_push_names_v2_m1_follow_up_enabled: [2763, "bool", !1, !1],
- elevated_push_names_v2_m2_enabled: [2904, "bool", !1, !1],
- smb_capi_coexistence_enabled: [2588, "bool", !1, !0],
- smb_client_side_linkshim_enabled: [2633, "bool", !0, !0],
- web_non_blocking_offline_resume_max_message_count: [2508, "int", 1e3, 1e3],
- web_unified_flow: [1809, "int", 0, 0],
- smb_client_side_linkshim_signed_regexp: [2634, "string", "https:\\/\\/n\\.wl\\.co\\/[^/]*\\/[^/]*\\/(.*)$", "https:\\/\\/n\\.wl\\.co\\/[^/]*\\/[^/]*\\/(.*)$"],
- placeholder_message_key_hash_logging: [2639, "bool", !1, !0],
- use_appdata_stanza_on_receiver: [2795, "bool", !1, !1],
- use_appdata_stanza_on_sender: [2796, "bool", !1, !1],
- web_lazy_pull: [2814, "bool", !1, !1],
- msgd_drop_device_notifications: [3806, "bool", !1, !1],
- media_large_file_awareness_popup_enabled: [3061, "bool", !1, !0],
- media_large_file_awareness_popup_file_size_in_MB: [3115, "int", 2048, 2048],
- send_cag_member_revokes_as_GDM: [3069, "bool", !0, !0],
- parent_group_remove_orphaned_members: [3079, "bool", !1, !0],
- community_rich_system_message_enabled: [3292, "bool", !1, !1],
- group_mentions_in_cag: [3097, "bool", !1, !0],
- group_mentions_in_subgroups: [4087, "bool", !1, !0],
- parent_group_home_header_actions_enabled: [3267, "bool", !1, !1],
- non_blocking_resume_from_open_tab_enabled: [3191, "bool", !1, !1],
- non_blocking_resume_from_open_tab_signal_enabled: [3622, "bool", !1, !1],
- smb_catalog_messages_download_thumbnail_on_receiver_enabled: [3247, "bool", !1, !1],
- send_extended_nack_enabled: [3280, "bool", !1, !1],
- send_message_drop_nack_enabled: [3741, "bool", !1, !1],
- send_message_drop_old_couter_nack_enabled: [4213, "bool", !1, !1],
- parent_group_enhanced_description_enabled: [3154, "bool", !1, !0],
- parent_group_info_updates_enabled: [3616, "bool", !1, !1],
- noyb_opt_out_flag: [3488, "bool", !1, !1],
- service_improvement_opt_out_flag: [3664, "bool", !1, !1],
- wa_ctwa_web_entrypoint_home_header_enabled: [3058, "bool", !1, !1],
- wa_ctwa_web_entrypoint_home_header_dropdown_enabled: [3095, "bool", !1, !1],
- wa_ctwa_web_entrypoint_home_banner_enabled: [3096, "bool", !1, !1],
- wa_ctwa_web_entrypoint_home_icon_tooltip_enabled: [3242, "bool", !1, !1],
- wa_ctwa_web_entrypoint_pageless_enabled: [3293, "bool", !1, !1],
- wa_ctwa_web_entrypoint_manage_ads_home_header_dropdown_enabled: [3376, "bool", !1, !1],
- wa_ctwa_web_fetch_linked_accounts_enabled: [3294, "bool", !1, !1],
- report_to_admin_kill_switch: [3695, "bool", !1, !0],
- report_to_admin_enabled: [3696, "bool", !1, !0],
- parent_group_allow_member_added_groups_m1: [3829, "bool", !1, !0],
- parent_group_allow_member_added_groups_m2: [4184, "bool", !1, !0],
- abort_building_e2e_proto_on_error: [3224, "bool", !1, !0],
- abort_decrypting_e2e_on_error: [4055, "bool", !1, !0],
- community_shorter_group_creation_enabled: [3966, "bool", !1, !1],
- community_navigation: [4003, "bool", !1, !1],
- bonsai_enabled: [4010, "bool", !1, !1],
- enable_pnh_for_business: [4151, "bool", !1, !1],
- bonsai_receiver_enabled: [4165, "bool", !1, !1],
- web_mediaretry_notification_nack_enabled: [4206, "bool", !1, !1],
- wa_ctwa_web_thread_ad_attribution_enabled: [2898, "bool", !1, !1],
- wa_ctwa_ads_action_banner_enabled: [1495, "bool", !1, !0],
- wa_ctwa_ads_action_banner_enabled_web: [4021, "bool", !1, !0],
- wa_ctwa_action_banner_logging_enabled_web: [4022, "bool", !1, !0],
- ctwa_data_max_length: [1841, "int", 768, 768],
- wa_ctwa_action_banner_logging_enabled: [1866, "bool", !1, !0],
- wa_ctwa_web_dc_logging_enabled: [2487, "bool", !1, !1],
- ctwa_smb_data_sharing_consent: [2934, "bool", !1, !0],
- ctwa_smb_data_sharing_opt_in_cool_off_period: [3331, "int", 259200, 259200],
- ctwa_consumer_data_sharing_consent: [2935, "bool", !1, !0],
- mark_as_action: [2936, "bool", !1, !0],
- pairless_logging_attribution_window: [3017, "int", 7, 7],
- wa_biz_tool_logging_improvement: [3169, "bool", !1, !0],
- ctwa_additional_label_event_logging_enabled: [3793, "bool", !1, !0],
- ig_reels_music_attribution: [1912, "bool", !1, !0],
- video_stream_buffering_ui_enabled: [2167, "bool", !1, !0],
- original_quality_image_min_edge: [3068, "int", 2560, 2560],
- original_quality_data_warning_max_mb: [3306, "int", 16, 16],
- original_quality_show_data_warning_dialog: [3307, "bool", !1, !0],
- original_quality_minimum_elements_to_show_data_warning_dialog: [3613, "int", 20, 20],
- web_youtube_rcat_consumption_enabled: [2957, "bool", !1, !0],
- web_youtube_rcat_chat_generation_enabled: [3044, "bool", !1, !0],
- autodownload_update_in_group_chat: [3273, "bool", !1, !0],
- enable_receiving_hd_photo_quality: [3116, "bool", !1, !0],
- enable_days_since_receive_logging: [3322, "bool", !1, !0],
- additional_pre_logging_enabled: [3490, "bool", !1, !0],
- client_message_id_media_download_log_enabled: [3820, "bool", !1, !0],
- media_sender_client_logging_enabled: [3491, "bool", !1, !0],
- hqp_log_enabled: [3349, "bool", !1, !0],
- web_fix_media_conn_block_rule_parsing: [3455, "bool", !1, !1],
- youtube_inline_playback_killswitch: [3522, "bool", !1, !1],
- media_engagement_logging_enabled: [3787, "bool", !1, !1],
- show_bottom_sheet_gallery: [3844, "bool", !1, !0],
- status_inline_link_preview_enabled: [1522, "bool", !1, !0],
- text_status_url_logging_enabled: [1851, "bool", !1, !0],
- status_reaction_emojis: [1852, "string", "[128525, 128514, 128558, 128546, 128591, 128079, 127881, 128175]", "[128525, 128514, 128558, 128546, 128591, 128079, 127881, 128175]"],
- status_reply_received_logging_enabled: [1859, "bool", !1, !0],
- status_caption_link_detection_enabled: [2032, "bool", !1, !0],
- status_view_error_type_logging_enabled: [2086, "bool", !0, !0],
- status_from_me_unseen_enabled: [2039, "bool", !1, !0],
- smb_collections_enabled: [451, "bool", !1, !0],
- consumer_collections_enabled: [582, "bool", !1, !0],
- smb_collections_appeal_flow_enabled: [724, "bool", !1, !1],
- smb_multi_device_awareness: [1074, "bool", !1, !0],
- smb_quick_replies_v2_enabled: [875, "bool", !1, !1],
- smb_ecommerce_compliance_india_m4: [1003, "bool", !1, !0],
- smb_ecommerce_compliance_india_m4_5: [1192, "bool", !1, !0],
- smart_filters_enabled: [1015, "bool", !1, !0],
- btm_threads_logging_enabled: [1022, "bool", !1, !0],
- native_commerce_threads_logging_enabled: [1034, "bool", !1, !0],
- threads_logging_observe_list_enabled: [1168, "bool", !1, !0],
- smb_hide_unsupported_currency_price: [1203, "bool", !1, !0],
- hyperlinked_phone_numbers_enabled: [1215, "bool", !1, !1],
- smb_catkit_query_version: [1229, "int", 1, 1],
- smb_phase_out_not_a_business: [1263, "bool", !1, !0],
- smb_phase_out_not_a_business_V2: [1771, "bool", !1, !0],
- smb_threads_logging_enabled: [1251, "bool", !1, !0],
- smb_click_to_chat_logging_enabled: [1252, "bool", !1, !0],
- smb_broadcast_logging_enabled: [1253, "bool", !1, !0],
- smb_status_logging_enabled: [1254, "bool", !1, !0],
- smb_biz_profile_logging_enabled: [1255, "bool", !1, !0],
- smb_registration_flow_logging_enabled: [1256, "bool", !1, !0],
- btm_qpl_enabled: [1272, "bool", !1, !0],
- smb_temp_cover_photo_privacy_messaging: [1913, "bool", !1, !0],
- show_shops_sunset_banner: [1949, "bool", !1, !0],
- vname_logging_and_debugging: [3961, "bool", !0, !0],
- verified_business_numbers: [3969, "string", "{}", '{"paytm":[917531875318, 919004990049]}'],
- verified_business_numbers_for_business_name_update: [4006, "string", "", "917531875318,919004990049"],
- qpl_enabled: [212, "bool", !1, !0],
- qpl_upload_delay: [215, "int", 1440, 1],
- qpl_sampling_as_string: [466, "string", 'json:{"sampling":[]}', 'json:{"sampling":[]}'],
- qpl_initial_upload_delay: [1223, "int", 5, 1],
- is_meta_employee: [1570, "bool", !1, !1],
- should_deregister_on_syncd_fatal: [383, "bool", !0, !0],
- group_catch_up: [559, "bool", !1, !1],
- web_abprop_ctwa_context_compose_enabled: [591, "bool", !1, !1],
- web_abprop_group_description_length: [592, "int", 0, 0],
- web_abprop_ephemeral_messages_allowed_values: [593, "string", "604800", "604800"],
- web_abprop_collections_display: [584, "bool", !1, !1],
- multi_select_from_chat_list: [2312, "bool", !1, !0],
- web_abprop_collections_management: [585, "bool", !1, !1],
- web_abprop_drop_full_history_sync: [600, "bool", !1, !1],
- web_abprop_business_profile_incomplete_nux_banner: [710, "bool", !1, !1],
- web_abprop_product_catalog_nux_banner: [711, "bool", !1, !1],
- web_abprop_click_nux_banner_migration: [712, "bool", !1, !1],
- web_abprop_ecommerce_compliance_india: [717, "bool", !1, !1],
- web_abprop_edit_ecommerce_compliance_india: [826, "bool", !1, !1],
- drop_last_name: [726, "bool", !1, !1],
- web_abprop_catalog_icon_on_top_bar: [734, "bool", !1, !1],
- web_abprop_collections_nux_banner: [741, "bool", !1, !1],
- nfm_rendering_enabled: [760, "bool", !1, !1],
- web_abprop_nux_cart_interstitial: [761, "bool", !1, !1],
- web_abprop_business_profile_refresh_status_enabled: [763, "bool", !1, !1],
- web_abprop_business_profile_refresh_linked_account_enabled: [764, "bool", !1, !1],
- web_abprop_business_profile_refresh_edit_cover_photo_enabled: [765, "bool", !1, !1],
- web_abprop_business_profile_refresh_cover_photo_view_enabled: [766, "bool", !1, !1],
- elevated_important_msg: [809, "bool", !1, !1],
- web_privacy_settings: [837, "bool", !1, !1],
- web_privacy_settings_v2: [1226, "bool", !1, !1],
- web_status_psa: [873, "bool", !1, !1],
- web_status_psa_history_sync: [1095, "bool", !1, !1],
- web_2fa: [1195, "bool", !1, !1],
- web_abprop_stateful_enumeration_enabled: [887, "bool", !0, !0],
- web_abprop_block_catalog_creation_ecommerce_compliance_india: [894, "bool", !1, !1],
- web_sticker_store: [930, "bool", !0, !0],
- web_proactive_prekeys_fetch_group_size_limit: [937, "int", 0, 0],
- web_favorite_stickers: [962, "bool", !1, !1],
- web_orchestrator_enabled_version: [984, "string", "bucket", "bucket"],
- web_wam_v5_enabled: [1033, "bool", !1, !1],
- web_ps_v3_enabled: [1114, "bool", !1, !1],
- web_shop_storefront_message: [1053, "bool", !1, !1],
- web_identity_store_cache: [1078, "bool", !1, !1],
- web_abprop_large_files_encryption_optimization: [1086, "bool", !1, !1],
- web_send_invisible_msg_to_new_groups: [1099, "bool", !1, !1],
- web_send_invisible_msg_min_group_size: [1100, "int", 128, 128],
- web_send_invisible_msg_max_group_size: [1945, "int", 1024, 1024],
- web_init_chat_batch_size: [1171, "int", 100, 100],
- web_init_chat_max_unread_message_count: [1172, "int", 0, 0],
- web_abprop_skip_file_copy_on_attach: [1174, "bool", !1, !1],
- reaction_history_sync: [1179, "bool", !1, !1],
- web_abprop_screen_sharing_enabled: [1189, "bool", !1, !1],
- web_graphql_for_catalog_m1: [1205, "bool", !1, !1],
- web_adaptive_offline_resume_enabled: [1224, "bool", !1, !1],
- web_wa_signal_enabled: [1225, "bool", !1, !1],
- web_gdpr_request_account_info_enabled: [1232, "bool", !1, !1],
- web_new_compose_box_input: [1243, "bool", !0, !0],
- web_abprop_document_resume_upload: [1247, "bool", !1, !1],
- more_reactions_option_desktop_beta_rollout: [1759, "bool", !0, !0],
- reactions_keyboard_hides_three_flags_desktop_beta_rollout: [1796, "bool", !1, !1],
- web_rotate_sender_key_if_sent: [1329, "bool", !1, !1],
- web_lru_cache_optimization: [1339, "bool", !1, !1],
- web_lru_cache_purge_logic_refactor: [1383, "bool", !1, !1],
- companion_min_versions: [1367, "string", "json:[]", "json:[]"],
- comparion_force_upgrade: [1368, "bool", !1, !1],
- web_abprop_business_profile_refresh_linked_accounts_killswitch: [1351, "bool", !1, !1],
- web_default_pull_mode_enabled: [1355, "bool", !1, !1],
- web_abprop_chatd_login_cookie_enabled: [1371, "bool", !1, !1],
- web_prekeys_fetch_first_batch_size: [1373, "float", 0, 0],
- md_app_state_gate_D34336913: [1379, "bool", !1, !1],
- web_address_capture_message_enabled: [1385, "bool", !1, !1],
- syncd_periodic_sync_days: [1400, "int", 0, 0],
- web_enable_hyperlinked_phone_numbers_ps_logging: [1401, "bool", !1, !1],
- web_get_maybe_me_user_optimization_enabled: [1451, "bool", !1, !1],
- web_should_fatal_on_missing_patch: [1461, "bool", !0, !0],
- web_reactions_send_desktop_beta_rollout: [1479, "bool", !0, !0],
- web_abprop_remove_uploaded_files: [1481, "bool", !1, !1],
- web_abprop_remove_downloaded_files: [1496, "bool", !1, !1],
- web_killswitch_s310872_mitigation: [2879, "bool", !1, !1],
- web_new_rich_text_input: [1507, "bool", !0, !0],
- web_syncd_max_mutations_to_process_during_resume: [1513, "int", 1e3, 1e3],
- reactions_skin_tone_aggregation: [1593, "bool", !1, !1],
- message_quick_reply: [1623, "bool", !1, !1],
- web_quantity_controls_enabled: [1659, "bool", !1, !1],
- web_unified_message_processing_enabled: [1633, "bool", !1, !1],
- web_push_notifications: [1643, "bool", !1, !0],
- web_push_notifications_super_users: [3868, "bool", !1, !1],
- web_notification_settings_v2: [1676, "bool", !1, !0],
- web_abprop_device_agnostic_voip: [1675, "bool", !1, !1],
- web_abprop_screen_lock_enabled: [1680, "bool", !1, !1],
- web_command_palette: [1726, "bool", !0, !0],
- web_group_profile_editor: [1745, "bool", !0, !0],
- web_quick_reply_authoring: [1751, "bool", !1, !1],
- web_accidental_delete_for_me: [1752, "bool", !0, !0],
- web_abprop_core_wam_runtime: [1753, "bool", !1, !1],
- web_profile_picture_db_cache_disabled: [1757, "bool", !1, !1],
- web_offline_resume_qpl_enabled: [1773, "bool", !1, !1],
- web_offline_resume_m3_enabled: [1802, "bool", !1, !1],
- web_syncd_fatal_fields_from_L1104589PRV2: [1808, "bool", !1, !1],
- web_media_editor_blur_tool: [1816, "bool", !0, !0],
- web_abprop_mute_notifications_on_app_focus: [1824, "bool", !1, !0],
- web_auto_mute_256_groups_confirmation: [2533, "bool", !1, !1],
- web_multi_skin_toned_emoji_picker: [1850, "bool", !1, !1],
- web_message_send_cache_warming_up: [1894, "bool", !1, !0],
- web_message_send_precalculate_icdc: [2801, "bool", !1, !0],
- web_ptt_streamer_upload: [1902, "bool", !1, !0],
- web_prekey_fetch_cache_warming_up: [1910, "bool", !1, !0],
- web_history_sync_ui: [1911, "bool", !1, !1],
- web_abprop_emoji_experimental_api: [1932, "bool", !1, !1],
- web_new_media_caption_input: [1959, "bool", !0, !0],
- web_chatlist_toggle: [1964, "bool", !1, !0],
- web_electron_deprecation_windows_sideload_stage1_awareness: [1985, "bool", !1, !1],
- web_electron_deprecation_windows_sideload_stage2_compatible_expiry_kickoff: [1986, "bool", !1, !1],
- web_electron_deprecation_windows_sideload_stage2_compatible_expiry_delay: [1987, "int", 0, 0],
- web_electron_deprecation_windows_sideload_stage2_incompatible_expiry_kickoff: [1988, "bool", !1, !1],
- web_electron_deprecation_windows_sideload_stage2_incompatible_expiry_delay: [1989, "int", 0, 0],
- web_message_list_a11y_redesign: [2016, "bool", !0, !0],
- web_enable_profile_pic_thumb_db_caching: [2018, "bool", !1, !1],
- web_enable_biz_catalog_view_ps_logging: [2056, "bool", !0, !0],
- web_abprop_media_links_docs_search: [2063, "bool", !1, !1],
- web_poll_creation_desktop_beta_rollout: [2179, "bool", !1, !1],
- web_poll_receiving_desktop_beta_rollout: [2181, "bool", !1, !1],
- web_file_streaming_upload: [2210, "bool", !1, !1],
- web_new_group_member_search: [2220, "bool", !1, !1],
- web_max_contacts_to_show_common_groups: [2264, "int", 10, 10],
- web_max_found_common_groups_displayed: [2268, "int", 15, 15],
- web_fp_reparsing_for_non_add_ons: [2231, "bool", !1, !1],
- web_message_custom_aria_label: [2280, "bool", !1, !1],
- web_message_list_a11y_redesign_beta_only: [2294, "bool", !0, !0],
- web_poll_spam_report: [2303, "bool", !1, !1],
- web_electron_active_reload: [2322, "bool", !0, !0],
- desktop_upsell_win_butterbar: [2348, "bool", !1, !1],
- desktop_upsell_win_ctas: [2349, "bool", !1, !1],
- desktop_upsell_win_dropdown_btn: [2725, "bool", !1, !1],
- documents_with_captions_send_desktop_beta_rollout: [2486, "bool", !1, !1],
- profile_photo_rings_for_status_on_web_enabled: [2512, "bool", !1, !0],
- voice_status_receipt_on_web_enabled: [2513, "bool", !1, !0],
- web_crypto_library_enabled: [2534, "bool", !1, !1],
- group_chat_profile_pictures_enabled_web_beta_rollout: [2543, "bool", !0, !0],
- web_message_plugin_backend_registration_enabled: [2545, "bool", !1, !1],
- query_verified_name_when_msg_differs: [2549, "bool", !0, !0],
- web_media_auto_download_enabled: [2555, "bool", !1, !0],
- web_media_auto_download_desktop_beta_enabled: [2556, "bool", !1, !0],
- link_preview_wait_time: [2566, "int", 7, 7],
- web_screen_lock_max_retries: [2622, "int", 10, 10],
- forward_media_with_caption_desktop_beta_rollout: [2664, "bool", !0, !0],
- web_new_status_reply_input: [2708, "bool", !0, !0],
- web_display_name_for_enterprise_biz_vlevel_low_killswitch: [2715, "bool", !1, !1],
- web_display_name_for_biz_vlevel_low_killswitch: [2716, "bool", !0, !0],
- web_message_plugin_frontend_registration_enabled: [2793, "bool", !1, !1],
- external_beta_can_join: [3081, "bool", !1, !0],
- web_native_fetch_media_download: [3031, "bool", !1, !1],
- web_image_max_edge: [3042, "int", 1600, 1600],
- web_image_max_hd_edge: [3204, "int", 2560, 2560],
- enable_logging_multi_select_from_chat_list: [3118, "bool", !1, !0],
- web_store_quota_manager_enabled: [3133, "bool", !1, !1],
- web_browser_quota_threshold: [3134, "int", 100, 100],
- web_browser_min_storage_quota: [3135, "int", 5, 5],
- web_original_photo_quality_upload_enabled: [3136, "bool", !1, !1],
- web_deprecate_mms4_hash_based_download: [3152, "bool", !1, !0],
- web_md5_message_key: [3164, "bool", !1, !0],
- web_sha256_message_key: [3729, "bool", !1, !0],
- web_e2e_backfill_expire_time: [3234, "int", 5, 60],
- web_message_table_index_rowid_optimization: [3279, "bool", !1, !1],
- wds_radius_and_casing: [3350, "bool", !1, !0],
- web_attach_menu_redesign: [4032, "bool", !1, !0],
- web_expression_panels: [3420, "bool", !1, !1],
- can_support_web_column_packing: [3600, "bool", !1, !1],
- web_column_data_serialization_enabled: [3970, "bool", !1, !1],
- column_serialization_perf_impact_test: [3973, "bool", !1, !1],
- web_message_edit_receive_desktop_beta_rollout: [3723, "bool", !1, !1],
- web_message_edit_send_desktop_beta_rollout: [3724, "bool", !1, !1],
- web_message_edit_processing_reply_messages: [3883, "bool", !0, !0],
- web_message_processing_cache_size: [3728, "int", 400, 400],
- web_encryption_failed_message_resend: [3779, "bool", !1, !1],
- append_message_when_forwarding_media_desktop_beta: [3818, "bool", !1, !1],
- history_sync_on_demand_timeout_ms: [3882, "int", 1e4, 1e4],
- web_client_pull_timeout_ms: [3890, "int", 1e4, 1e4],
- web_socket_reconnect_enabled: [3892, "bool", !1, !1],
- web_outgoing_message_validation_list: [4019, "string", "[]", "[]"],
- web_device_sync_manager_enabled: [4024, "bool", !1, !1],
- web_draft_message_enabled: [4125, "bool", !1, !1],
- history_sync_loop_interval_ms: [4149, "int", 2e4, 2e4],
- stop_abprops_traffic_in_serverprops_response: [315, "bool", !1, !1],
- chat_upsell_for_1on1_invites: [3689, "bool", !1, !1],
- ugc_participant_limit: [4118, "int", 5, 5],
- group_chat_profile_pictures_enabled: [1825, "bool", !1, !1],
- group_chat_profile_pictures_v2_enabled: [3261, "bool", !1, !1],
- unified_user_profile_navigation_enabled: [3523, "bool", !1, !1],
- view_all_replies_enabled: [4215, "bool", !1, !1],
- ugr_enabled: [3010, "bool", !1, !0],
- ugc_enabled: [3011, "bool", !1, !0],
- reword_subject_to_group_name_enabled: [3088, "bool", !1, !0],
- commerce_metadata_supported_business: [1693, "string", "18785550326,918591749310,917977079770,12245555037,5515997781156,5511989238421,555191894444,905333860133,908502213040,5511916282555,555139214004,555198849745,551147664020,622150851766,551121038525", "18785550326,447766028329,918591749310,917977079770,12245555037,5515997781156,5511989238421,555191894444,905333860133,908502213040,5511916282555,555139214004,555198849745,551147664020,622150851766"],
- in_app_survey_phone_numbers: [1607, "string", "16508638904", "16508638904"],
- order_details_payment_instructions_enabled: [1595, "bool", !1, !0],
- enable_biz_activity_report_request: [455, "bool", !1, !1],
- plm_products_max_batch_fetch_size: [464, "int", 18, 18],
- enable_granular_reject_reasons: [550, "bool", !1, !1],
- elevating_profile_names_enabled: [604, "bool", !1, !1],
- enable_group_profile_editor: [689, "bool", !1, !1],
- csat_message_rating: [690, "bool", !1, !0],
- facebook_link_preview_use_thumbnail: [810, "bool", !1, !0],
- tam_attachment_cache_compaction_enabled: [838, "bool", !1, !1],
- business_threads_logging_enabled: [853, "bool", !1, !1],
- private_stats_biz_view_logging_enabled: [904, "bool", !1, !1],
- group_join_request_m0_anyone_can_join: [2367, "bool", !1, !1],
- group_join_request_m1: [1727, "bool", !1, !1],
- group_join_request_m2: [1728, "bool", !1, !1],
- group_join_request_m2_setting: [1887, "bool", !1, !1],
- group_join_request_m2_logging: [2913, "bool", !1, !1],
- group_join_request_m2_max_pending_participants_limit: [2418, "float", 2, 2],
- group_join_request_m3: [2369, "bool", !1, !1],
- group_join_request_m3_sort_by_time: [3451, "bool", !1, !1],
- group_join_request_m3_invited_tab: [3571, "bool", !1, !1],
- group_join_request_m3_groups_in_common: [3895, "bool", !1, !1],
- group_join_request_m3_banner: [3452, "bool", !1, !1],
- group_join_request_optional_message_soak: [3382, "bool", !1, !1],
- group_join_request_can_view_optional_message: [3383, "bool", !1, !1],
- group_join_request_can_send_optional_message: [3384, "bool", !1, !1],
- group_join_request_m2_pushname: [2376, "bool", !1, !0],
- group_join_request_m2_banner_on_conversation: [2449, "bool", !1, !1],
- group_invite_new_bottom_sheet_enabled: [2749, "bool", !0, !0],
- note_to_self: [1967, "bool", !1, !0],
- note_to_self_entry_point: [2630, "bool", !1, !0],
- no_delete_message_time_limit: [1011, "bool", !1, !1],
- sender_revoke_window_sender: [1333, "bool", !1, !0],
- sender_revoke_window_receiver: [1334, "bool", !1, !0],
- sender_revoke_ui: [1335, "bool", !1, !0],
- admin_revoke_receiver: [1177, "bool", !1, !0],
- admin_revoke_sender: [1292, "bool", !1, !0],
- admin_revoke_history_sync_consumer: [1245, "bool", !1, !0],
- revokes_logging_unsampled: [1865, "bool", !0, !0],
- pinned_messages_m0: [3138, "bool", !1, !1],
- pinned_messages_m1_receiver: [3139, "bool", !1, !1],
- pinned_messages_m1_sender: [3140, "bool", !1, !1],
- pinned_messages_m1_sender_debug_expiry_duration_secs: [3813, "int", 86400, 86400],
- pinned_messages_m2_pin_max: [3732, "int", 1, 1],
- pinned_messages_m2: [3141, "bool", !1, !1],
- admin_hfm_toggle: [1021, "bool", !1, !1],
- csat_message_trigger: [1082, "bool", !1, !0],
- graphql_privacy_imp_m1: [1096, "bool", !1, !1],
- lthash_check_hours: [1104, "int", 0, 0],
- interactive_message_native_flow_killswitch: [1133, "bool", !1, !1],
- sender_key_expired_logging_enabled: [1185, "bool", !1, !1],
- group_size_bypassing_sampling: [1861, "int", 1e5, 1e5],
- group_size_limit: [1304, "int", 257, 257],
- v_id_deprecation_enabled: [2334, "bool", !1, !0],
- proactive_distribute_sender_keys_enabled: [2757, "bool", !1, !0],
- minimum_percentage_to_proactive_distribute_sender_keys: [2860, "int", 200, 50],
- address_message_native_flow_killswitch: [1538, "bool", !1, !1],
- commerce_sanctioned: [1319, "bool", !1, !1],
- commerce_bloks_apps_mapping: [1320, "string", '{"address_message":{"app_id":"com.bloks.www.whatsapp.commerce.address_message","expiration_secs":300,"version":"1.5","supported_businesses":["+918591749310","+917977079770","+12165552716","+918591749310","+917977079770","+919324433533","+917669800185","+919355081749","+917217010106","+912248913727","+912068135414","+918368818019","+917827971992","+917827971988","+911244632002","+919999006542","+917982465931","+911244632030","+918920528558","+911244632026","+918920530301","+15550083895","+12995550004","+6589523673","+6597685939","+6580536071","+6531631404","+6590834813","+6588867112","+16615555837","+12765985268","+18055908026"]},"galaxy_message":{"flow_message_version":{"1":{"min_android_app_supported_version":"2.22.21","min_ios_app_supported_version":"2.22.16"}},"app_id":"com.bloks.www.whatsapp.commerce.galaxy_message","expiration_secs":86400,"version":"1.0","flows":{"5315848498536354":{"supported_businesses":["18785550326","19505550093","18055555085","12115551400","12165554570"]},"384213690506206":{"supported_businesses":["13072224829","908502213040"]},"785254429343710":{"supported_businesses":["13072224829","908502213040"]},"552092896712166":{"supported_businesses":["13072224829","908502213040"]},"659207712435246":{"supported_businesses":["13072224829","908502213040"]},"1218944301990105":{"supported_businesses":["13072224829","908502213040"]},"842529276647219":{"supported_businesses":["908502419528","905333860133"]},"2135286959994016":{"supported_businesses":["908502419528","905333860133"]},"465280328842503":{"supported_businesses":["908502419528","905333860133"]},"554437403152809":{"supported_businesses":["908502419528","905333860133"]},"1503880053408592":{"supported_businesses":["908502419528","905333860133"]},"1177261906521760":{"supported_businesses":["908502419528","905333860133"]},"5199590820090002":{"supported_businesses":["5511989238421"]},"615215783523200":{"supported_businesses":["5511989238421"]},"1160930701174631":{"supported_businesses":["5511989238421","555191894444"]},"2934205950056123":{"supported_businesses":["5511916282555"]},"5324889264212944":{"supported_businesses":["5511916282555"]},"3301029236883120":{"supported_businesses":["555139214004","555198849745"]},"774830743793476":{"supported_businesses":["555139214004","555198849745"]},"1493489641166601":{"supported_businesses":["555139214004","555198849745"]},"1115920052387436":{"supported_businesses":["555139214004","555198849745"]},"611775360605929":{"supported_businesses":["551147664020","551121038525"]},"1283565282457467":{"supported_businesses":["551147664020","551121038525"]},"673695173931335":{"supported_businesses":["551147664020","551121038525"]},"508459817855605":{"supported_businesses":["442034673249","447418310027"]},"639247544356777":{"supported_businesses":["442034673249","447418310027","622150851766"]},"2679509568858534":{"supported_businesses":["442034673249","447418310027","622150851766"]}}}}', '{"address_message":{"app_id":"com.bloks.www.whatsapp.commerce.address_message","expiration_secs":300,"version":"1.5","supported_businesses":["+918591749310","+917977079770","+12165552716","+918591749310","+917977079770","+919324433533","+917669800185","+919355081749","+917217010106","+912248913727","+912068135414","+918368818019","+917827971992","+917827971988","+911244632002","+919999006542","+917982465931","+911244632030","+918920528558","+911244632026","+918920530301","+15550083895","+12995550004","+6589523673","+6597685939","+6580536071","+6531631404","+6590834813","+6588867112","+16615555837","+12765985268","+18055908026"]},"galaxy_message":{"flow_message_version":{"1":{"min_android_app_supported_version":"2.22.21","min_ios_app_supported_version":"2.22.16"}},"app_id":"com.bloks.www.whatsapp.commerce.galaxy_message","expiration_secs":86400,"version":"1.0","flows":{"5315848498536354":{"supported_businesses":["18785550326","19505550093","18055555085","12115551400","12165554570"]},"384213690506206":{"supported_businesses":["13072224829","908502213040"]},"785254429343710":{"supported_businesses":["13072224829","908502213040"]},"552092896712166":{"supported_businesses":["13072224829","908502213040"]},"659207712435246":{"supported_businesses":["13072224829","908502213040"]},"1218944301990105":{"supported_businesses":["13072224829","908502213040"]},"842529276647219":{"supported_businesses":["908502419528","905333860133"]},"2135286959994016":{"supported_businesses":["908502419528","905333860133"]},"465280328842503":{"supported_businesses":["908502419528","905333860133"]},"554437403152809":{"supported_businesses":["908502419528","905333860133"]},"1503880053408592":{"supported_businesses":["908502419528","905333860133"]},"1177261906521760":{"supported_businesses":["908502419528","905333860133"]},"5199590820090002":{"supported_businesses":["5511989238421"]},"615215783523200":{"supported_businesses":["5511989238421"]},"1160930701174631":{"supported_businesses":["5511989238421","555191894444"]},"2934205950056123":{"supported_businesses":["5511916282555"]},"5324889264212944":{"supported_businesses":["5511916282555"]},"3301029236883120":{"supported_businesses":["555139214004","555198849745"]},"774830743793476":{"supported_businesses":["555139214004","555198849745"]},"1493489641166601":{"supported_businesses":["555139214004","555198849745"]},"1115920052387436":{"supported_businesses":["555139214004","555198849745"]},"611775360605929":{"supported_businesses":["551147664020","551121038525"]},"1283565282457467":{"supported_businesses":["551147664020","551121038525"]},"673695173931335":{"supported_businesses":["551147664020","551121038525"]},"508459817855605":{"supported_businesses":["442034673249","447418310027"]},"639247544356777":{"supported_businesses":["442034673249","447418310027","622150851766"]},"2679509568858534":{"supported_businesses":["442034673249","447418310027","622150851766"]}}}}'],
- graphql_privacy_imp_m2: [1327, "bool", !1, !1],
- nux_sync: [1343, "bool", !1, !0],
- in_app_survey_enabled: [1377, "bool", !1, !0],
- poll_creation_enabled: [1394, "bool", !1, !1],
- poll_receiving_enabled: [1395, "bool", !1, !1],
- poll_receiving_cag_enabled: [2737, "bool", !1, !1],
- poll_name_length: [1406, "int", 255, 255],
- poll_option_length: [1407, "int", 100, 100],
- poll_option_count: [1408, "int", 12, 12],
- poll_offline_accuracy: [1409, "int", 30, 30],
- poll_cleanup_days: [1410, "int", 31, 31],
- poll_vote_processing_enabled: [1541, "bool", !1, !1],
- poll_result_details_view_enabled: [1948, "bool", !0, !0],
- poll_creation_one_on_one_chats_enabled: [2194, "bool", !1, !1],
- poll_creation_cag_enabled: [2738, "bool", !1, !1],
- poll_a11y_enabled: [2390, "bool", !1, !0],
- enable_status_reporting: [2728, "bool", !1, !0],
- group_suspend_v1_enabled: [1415, "bool", !1, !0],
- group_suspend_appeal_include_entity_id_enabled: [2057, "bool", !1, !0],
- block_from_chat_list: [2290, "bool", !1, !0],
- community_reporting_ui_upsell_exit: [2818, "bool", !0, !0],
- smb_product_price_label: [1417, "string", "control", "control"],
- interactive_response_message_killswitch: [1435, "bool", !1, !1],
- interactive_response_message_native_flow_killswitch: [1436, "bool", !1, !1],
- biz_api_voip_enabled: [1464, "bool", !1, !0],
- quantity_controls_enabled: [1480, "bool", !1, !0],
- catalog_categories_enabled: [1514, "bool", !1, !0],
- disappearing_messages_chat_picker: [1518, "bool", !1, !1],
- more_reactions_option: [1322, "bool", !1, !1],
- reactions_keyboard_hides_three_flags: [1792, "bool", !1, !1],
- send_reaction_from_details_pane: [2170, "bool", !1, !1],
- silent_group_exit: [1527, "bool", !1, !0],
- silent_group_exit_past_participants: [1528, "bool", !1, !0],
- silent_group_exit_dialog: [1597, "bool", !1, !0],
- silent_group_exit_sync: [1598, "bool", !1, !0],
- silent_group_exit_db: [1613, "bool", !1, !0],
- order_details_quick_pay: [1600, "string", '{"allowed_product_type":"none"}', '{"allowed_product_type":"none"}'],
- incentive_program_logging_enabled: [1599, "bool", !1, !0],
- md_syncd_24_hour_time_format_sync_enabled: [1612, "bool", !1, !1],
- md_link_device_with_phone_number_enabled: [2734, "bool", !1, !1],
- md_link_device_with_phone_number_force_enabled: [3693, "bool", !1, !1],
- send_cart_cta_long_button_enabled: [1660, "bool", !0, !0],
- send_cart_cta_long_button_alternative_text_type: [2153, "int", 0, 0],
- product_search_m1_enabled: [1678, "bool", !1, !0],
- smb_catalog_collections_reordering_enabled: [1688, "bool", !0, !0],
- smb_catalog_collection_items_reordering_enabled: [1794, "bool", !0, !0],
- is_message_secret_enabled: [1707, "bool", !1, !0],
- documents_with_captions_receive: [1749, "bool", !1, !0],
- documents_with_captions_send: [1750, "bool", !1, !0],
- external_payments_supported_business: [1763, "string", "+917000770007", "+918369150604,+917000770007"],
- active_cart_discovery_enabled: [1766, "bool", !1, !0],
- order_details_payment_options: [1767, "string", '{"payment_options":[{"type":"JioPay","url_regex_list":["^https://www.jio.com/.*$","^https://t.jio/.*$","^http://tiny.jio.com/.*$"],"title":{"name":"jiopay_title","default_text":"Pay on Jio.com"},"subtitle":{"name":"jiopay_subtitle","default_text":"Go to Jio.com website"},"button":{"name":"jiopay_button","default_text":"Proceed to Jio.com"}}]}', '{"payment_options":[{"type":"JioPay","url_regex_list":["^https://www.jio.com/.*$","^https://t.jio/.*$","^http://tiny.jio.com/.*$"],"title":{"name":"jiopay_title","default_text":"Pay on Jio.com"},"subtitle":{"name":"jiopay_subtitle","default_text":"Go to Jio.com website"},"button":{"name":"jiopay_button","default_text":"Proceed to Jio.com"}}]}'],
- order_details_payment_protection_link: [3014, "string", "https://faq.whatsapp.com/725152392426717", "https://faq.whatsapp.com/725152392426717"],
- recent_sticker_rollout_phase: [1829, "int", 0, 0],
- enable_client_chat_psa: [1844, "bool", !1, !0],
- enable_chat_psa_auto_play_videos: [3182, "bool", !1, !0],
- enable_chat_psa_forwards: [4033, "bool", !1, !0],
- direct_connection_business_numbers: [1846, "string", "16005554444,918591749310,917977079770", "16005554444,918591749310,917977079770"],
- forward_media_with_captions: [1853, "bool", !1, !1],
- append_message_when_forwarding_media: [3177, "bool", !1, !1],
- append_message_when_forwarding_media_without_caption: [3875, "bool", !1, !1],
- view_all_replies: [4036, "bool", !1, !1],
- share_phone_number_on_cart_send_to_direct_connection_biz_enabled: [1867, "bool", !0, !0],
- voice_status_receipt_enabled: [1875, "bool", !0, !0],
- admin_include_message_secret_in_cag: [1921, "bool", !0, !0],
- md_syncd_primary_version_sync_enabled: [1993, "bool", !1, !1],
- product_catalog_qpl_logging_enabled: [2003, "bool", !1, !0],
- syncd_do_not_fatal_on_snapshot_mac_mismatch_in_patches: [2007, "bool", !1, !1],
- graphql_locale_remapping: [2014, "string", "{}", "{}"],
- product_catalog_qpl_direct_connection_status_logging_enabled: [2024, "bool", !1, !0],
- favorite_sticker_rmr_sync_enabled: [2155, "bool", !1, !1],
- web_link_preview_sync_enabled: [2156, "bool", !1, !0],
- message_edit_receive: [2189, "bool", !1, !0],
- message_edit_send: [2190, "bool", !1, !0],
- caption_edit_receive: [3686, "bool", !1, !1],
- caption_edit_send: [3687, "bool", !1, !1],
- message_edit_window_duration_seconds: [2983, "int", 1200, 1200],
- message_edit_client_entry_point_limit_seconds: [3272, "int", 900, 900],
- prekey_fetch_iq_for_missing_devices_enabled: [2193, "bool", !1, !1],
- extensions_message_support_version: [2306, "string", '{"1":{"min_android_app_supported_version": "2.22.21","min_ios_app_supported_version": "2.22.16"},"2":{"min_android_app_supported_version": "2.22.23.11","min_ios_app_supported_version": "2.23.4"}}', '{"1":{"min_android_app_supported_version": "2.22.21","min_ios_app_supported_version": "2.22.16"},"2":{"min_android_app_supported_version": "2.22.23","min_ios_app_supported_version": "2.23.2"}}'],
- block_from_notification: [2374, "bool", !1, !0],
- four_reactions_in_bubble_enabled: [2378, "bool", !1, !0],
- block_entry_point_logging_enabled: [2522, "bool", !1, !0],
- non_message_data_request_logging_enabled: [2573, "bool", !1, !0],
- polls_fast_follow_enabled: [2661, "bool", !0, !0],
- poll_chatlist_preview_enabled: [2720, "bool", !1, !0],
- polls_search_support_enabled: [2662, "bool", !1, !0],
- attachment_tray_logging_enabled: [2914, "bool", !1, !0],
- polls_reply_support_enabled: [2663, "bool", !1, !0],
- polls_single_option_control_enabled: [3050, "bool", !1, !0],
- polls_single_option_sender_control_enabled: [3433, "bool", !1, !0],
- polls_single_option_reciever_control_enabled: [3434, "bool", !0, !0],
- polls_single_option_receiver_control_enabled: [3437, "bool", !0, !0],
- polls_notification_enabled: [3158, "bool", !1, !1],
- ptt_transcription_enabled: [2890, "bool", !1, !0],
- attach_menu_redesign_enabled: [3223, "bool", !1, !1],
- ts_navigation_community_enabled: [3858, "bool", !1, !1],
- ts_bit_array_enabled: [3859, "bool", !1, !1],
- ts_session_duration_ms: [3860, "int", 6e5, 6e5],
- fullscreen_animation_for_keyword: [2776, "bool", !1, !1],
- syncd_additional_mutations_count: [2777, "int", 1, 1],
- mpm_nfm_enabled: [2811, "bool", !0, !0],
- interactive_template_enabled: [2813, "bool", !0, !0],
- inapp_banner_client_enabled: [2871, "bool", !1, !0],
- quick_promotion_banner_client_enabled: [3712, "bool", !1, !1],
- extensions_template_killswitch: [2885, "bool", !1, !1],
- biz_extensions_metadata_cache_ttl_minutes: [2891, "int", 10080, 10080],
- biz_extensions_metadata_ban_ttl_minutes: [2892, "int", 525600, 525600],
- utm_tracking_enabled: [2895, "bool", !1, !1],
- utm_tracking_expiration_hours: [2896, "int", 24, 24],
- mpm_nfm_forwarding_enabled: [2909, "bool", !1, !1],
- url_hsm_redesign_enabled: [2990, "bool", !1, !0],
- button_url_hsm_redesign_enabled: [2994, "bool", !1, !0],
- is_internal_tester: [2945, "bool", !1, !0],
- report_string_comprehension: [3032, "bool", !1, !0],
- alt_device_linking_enabled: [3128, "bool", !1, !1],
- mute_dialog_description: [3155, "bool", !1, !0],
- mute_always_show_notification_action: [3156, "bool", !1, !0],
- extensions_graphql_cta_disable: [3192, "string", "2498088", "2498088"],
- recent_emojis_sync: [3198, "bool", !1, !1],
- syncd_report_key_stats: [3301, "bool", !1, !0],
- history_sync_on_demand: [3337, "bool", !1, !1],
- history_sync_on_demand_time_boundary_days: [3642, "int", 365, 365],
- history_sync_on_demand_message_count: [3811, "int", 50, 50],
- history_sync_on_demand_with_android_beta: [4135, "bool", !1, !1],
- extensions_beta_logging_enabled: [3348, "bool", !1, !0],
- ptv_sending_enabled: [3354, "bool", !1, !0],
- ptv_receiving_enabled: [3355, "bool", !1, !0],
- ptv_max_duration_seconds: [3356, "int", 60, 60],
- ptv_autoplay_enabled: [3482, "bool", !0, !0],
- ptv_autoplay_loop_limit: [3483, "int", 0, 0],
- template_button_improvements_on: [3444, "bool", !1, !0],
- qp_campaign_client_enabled: [3536, "bool", !1, !1],
- qp_push_notifications_enabled: [4200, "bool", !1, !1],
- animated_emojis_enabled: [3575, "bool", !1, !1],
- placeholder_message_resend: [3579, "bool", !1, !1],
- is_coupon_button_enabled: [3630, "bool", !1, !0],
- coupon_copy_button_url: [3631, "string", "https://www.whatsapp.com/coupon?code=", "https://www.whatsapp.com/coupon?code="],
- placeholder_message_resend_maximum_days_limit: [3639, "int", 14, 14],
- placeholder_chat_open_group_fetch: [3644, "bool", !1, !0],
- placeholder_chat_open_group_fetch_size_limit: [3749, "int", 33, 65],
- high_quality_link_preview_enabled: [3665, "bool", !1, !0],
- orders_expansion_receiver_countries_allowed: [3690, "string", "", ""],
- retry_receipt_error_code_enabled: [3750, "bool", !1, !0],
- orders_expansion_paying_enabled: [3771, "bool", !1, !0],
- cag_message_edit_receive: [4089, "bool", !1, !1],
- cag_message_edit_send: [4090, "bool", !1, !1],
- broadcast_message_edit_receive: [4091, "bool", !1, !1],
- broadcast_message_edit_send: [4092, "bool", !1, !1],
- expanded_text_formatting_enabled: [4093, "bool", !1, !1],
- support_ticket_data_collection_improvements: [4150, "bool", !1, !1],
- link_preview_shimmer_enabled: [4205, "bool", !1, !1],
- member_name_tag_enabled: [4233, "bool", !1, !0],
- support_ticket_stop_uploading_device_logs: [4242, "bool", !1, !1],
- client_group_participants_limit: [618, "int", 257, 257],
- payment_stickers_render_enabled: [812, "bool", !1, !1],
- payments_merchant_global_orders_value_props_banner_enabled: [3744, "bool", !1, !0],
- payments_br_installment_buyer_learn_more_link: [4144, "string", "https://faq.whatsapp.com/1134168457974360", "https://faq.whatsapp.com/1134168457974360"],
- ipayments_br_installment_seller_learn_more_link: [4145, "string", "https://faq.whatsapp.com/253337763937767", "https://faq.whatsapp.com/253337763937767"],
- privacy_allow_contacts_except: [808, "bool", !1, !1],
- primary_feature_sync: [1063, "bool", !1, !0],
- privacy_narrative_v1: [1071, "bool", !1, !1],
- add_dm_to_chat_overflow_menu: [1309, "bool", !1, !1],
- keep_in_chat_receiver: [1352, "bool", !1, !1],
- keep_in_chat_sender: [1353, "bool", !1, !1],
- keep_in_chat_ui_content: [2005, "bool", !1, !1],
- kic_orphan_cleanup_days: [1673, "int", 31, 31],
- supports_keep_in_chat_in_cag: [2844, "bool", !0, !0],
- kic_msg_send_expiry_sec: [4042, "int", 300, 300],
- ddm_reversed_options: [1397, "bool", !1, !1],
- qm_lean_msg: [1645, "bool", !1, !1],
- pnh_historical_mapping_retention_seconds: [1429, "int", 7776e3, 7776e3],
- trusted_contacts_reciprocity: [1437, "bool", !1, !1],
- trusted_contacts_chat_state_optimization: [1566, "string", "old", "old"],
- trusted_contacts_op: [1687, "bool", !1, !0],
- dm_updated_system_message: [1670, "bool", !1, !0],
- keep_in_chat_undo_duration_limit: [1698, "int", 2592e3, 2592e3],
- view_once_sp_receiver: [1710, "bool", !1, !1],
- view_once_sp_sender: [1711, "bool", !1, !1],
- pnh_ctwa: [1823, "bool", !1, !0],
- pnh_indicator: [2245, "bool", !1, !0],
- usync_lid: [1892, "bool", !1, !1],
- pnh_pn_for_lid_chat_sync: [3062, "bool", !1, !0],
- pnh_identity_verification_v3: [2751, "bool", !1, !1],
- share_own_pn_sync: [3070, "bool", !1, !0],
- pnh_companion_history_sync_lid_chat: [3481, "bool", !1, !0],
- pnh_cag_upgrade: [2304, "int", 0, 0],
- cag_reactions_receive: [2035, "bool", !1, !1],
- cag_reactions_send: [2036, "bool", !1, !1],
- pnh_cag_show_masked_members: [2346, "bool", !1, !1],
- calling_privacy_caller_offer: [1970, "bool", !0, !0],
- calling_privacy_caller_send_token: [1971, "bool", !0, !0],
- calling_privacy_callee: [1972, "bool", !1, !0],
- group_add_ack_server: [3624, "bool", !0, !0],
- pnh_cag_future_proof_banner: [2433, "bool", !1, !1],
- pnh_split_threads_detection: [2479, "bool", !1, !1],
- pnh_ctwa_mat_crashlog: [3691, "bool", !0, !0],
- pnh_group_lid: [2507, "int", 0, 0],
- out_of_sync_disappearing_messages_logging: [2561, "bool", !1, !0],
- dm_chat_picker_v2: [2597, "bool", !1, !0],
- dm_additional_durations: [3305, "bool", !1, !1],
- ephemeral_sync_response: [2714, "bool", !1, !1],
- dmcp_manage_storage_LAUNCH: [2919, "bool", !1, !0],
- settings_search: [2800, "bool", !1, !1],
- enable_soox_message_receiving: [2802, "bool", !1, !1],
- enable_soox_message_sending: [2832, "bool", !1, !1],
- pnh_split_thread_case1_detection: [2939, "bool", !1, !0],
- pnh_cag_block_lid_in_limbo: [2962, "bool", !0, !0],
- prekey_fetch_iq_pnh_lid_enabled: [3103, "bool", !1, !1],
- persisted_profile_name: [3366, "bool", !1, !1],
- pnh_identity_verification_v3_pn_generation: [3458, "bool", !1, !1],
- pnh_1on1_lid_expected: [3469, "bool", !1, !0],
- allow_lid_contacts_storage: [3519, "bool", !1, !1],
- allow_lid_contacts_new_1on1_chat: [3751, "bool", !1, !1],
- allow_lid_contacts_add_to_group: [3752, "bool", !1, !1],
- allow_lid_contacts_calling: [3762, "bool", !1, !1],
- allow_lid_contacts_privacy_settings: [3763, "bool", !1, !1],
- allow_share_lid_contacts_vcard: [3789, "bool", !1, !1],
- allow_parse_lid_contacts_vcard: [3790, "bool", !1, !1],
- rabbit_enabled: [3603, "bool", !1, !1],
- pnh_prevent_undefined_lid_chat_origin: [3872, "bool", !1, !1],
- first_message_experience: [3962, "bool", !1, !1],
- privacy_tips_groups_build: [3995, "bool", !1, !1],
- privacy_tips_callers_build: [3996, "bool", !1, !1],
- privacy_tips_status_build: [3997, "bool", !1, !1],
- privacy_tips_profile_build: [3998, "bool", !1, !1],
- unified_e2ee_copy_build: [3999, "bool", !1, !1],
- unified_e2ee_ui_build: [4e3, "bool", !1, !1],
- dm_reliability_refactor: [4131, "bool", !1, !1],
- pnh_1on1_report_lid_message_send: [4178, "bool", !1, !1],
- privacy_tip_expiration_min: [4214, "int", 10080, 10080],
- sticker_md_favorite_stickers_enabled: [864, "bool", !1, !1],
- smb_orange_enabled: [1469, "bool", !1, !1],
- smb_melon_display_enabled: [1483, "bool", !1, !1],
- smb_melon_management_enabled: [1484, "bool", !1, !1],
- call_only_primary_device_limit_exceeded: [1525, "bool", !1, !1],
- smb_premium_md_limit_perf_tracker_enabled: [1591, "bool", !1, !0],
- smb_billing_enabled: [1583, "bool", !1, !1],
- smb_billing_premium_access_config: [1619, "string", "", ""],
- smb_billing_logging_enabled: [1672, "bool", !1, !0],
- smb_melon_logging_enabled: [1669, "bool", !1, !0],
- smb_dcp_enabled: [1701, "bool", !1, !1],
- smb_custom_url_display_v2_enabled: [1849, "bool", !1, !0],
- smb_multi_device_agents_enabled: [1438, "bool", !1, !0],
- smb_multi_device_message_attribution_enabled: [1981, "bool", !1, !0],
- smb_multi_device_agents_logging_enabled: [1671, "bool", !1, !0],
- smb_multi_device_agents_logging_V2_enabled: [1897, "bool", !1, !0],
- smb_md_agent_chat_assignment_enabled: [1798, "bool", !1, !0],
- smb_md_agent_chat_assignment_system_messages_enabled: [2157, "bool", !1, !0],
- smb_md_agent_chat_assignment_system_messages_logging_v2_enabled: [2709, "bool", !1, !0],
- smb_md_agent_chat_assignment_system_messages_chats_reorder_enabled: [2778, "bool", !1, !0],
- smb_md_agent_chat_assignment_chats_reorder_on_chat_assignment_enabled: [2787, "bool", !1, !0],
- smb_md_agent_chat_assignment_chats_reorder_on_chat_unassignment_enabled: [2788, "bool", !1, !0],
- smb_md_agent_chat_assignment_nux_impressions: [2207, "int", 0, 3],
- smb_md_agent_chat_assignment_chat_list_new_label_enabled: [2976, "bool", !1, !0],
- coex_biz_states_sys_msg_enabled: [2320, "bool", !1, !0],
- smb_biz_profile_custom_url: [2582, "bool", !1, !1],
- smb_biz_profile_custom_url_notifications: [2583, "bool", !1, !1],
- smb_md_agent_chat_assignment_notifications_enabled: [2908, "bool", !1, !0],
- smb_marketing_messages_enabled: [3046, "bool", !1, !0],
- smb_marketing_messages_product_ids: [3113, "string", "", ""],
- smb_rambutan_enabled: [3124, "bool", !1, !0],
- smb_rambutan_product_ids: [3125, "string", "", ""],
- smb_premium_messages_spam_report_enabled: [4005, "bool", !1, !0],
- mex_phase3_enabled: [2249, "bool", !1, !1],
- mex_phase3_status_flags: [2250, "int", 0, 0],
- mex_newsletter_killswitch: [3604, "bool", !1, !1],
- mex_newsletter_flags: [3605, "int", 0, 0],
- groove_enabled_web: [2980, "bool", !1, !1],
- newsletter_enabled: [3385, "bool", !1, !1],
- newsletter_enabled_web: [3020, "bool", !1, !1],
- newsletter_reporting_enabled: [3148, "bool", !1, !0],
- newsletter_suspend_enabled: [3149, "bool", !1, !0],
- channels_restricted_updates_enabled: [4219, "bool", !1, !0],
- allow_nl_linkpreview: [3209, "bool", !0, !0],
- newsletter_creation_enabled: [3607, "bool", !1, !1],
- newsletter_media_autodownload_mode: [3778, "int", 3, 3],
- nl_df_gid: [3617, "string", "", ""],
- nl_crt_df_gid: [3618, "string", "", "120363080354356818"],
- newsletter_tos_notice_id: [3810, "string", "20601216", "20601216"],
- newsletter_creation_tos_id: [3834, "string", "20601217", "20601217"],
- newsletter_creation_nux_id: [3835, "string", "20601218", "20601218"],
- channels_enabled: [3877, "int", 0, 0],
- channels_creation_enabled: [3878, "int", 0, 0],
- channels_directory_enabled: [3879, "int", 0, 0],
- show_channels_not_available_dialog: [3880, "bool", !1, !0],
- newsletter_supported_message_types: [3900, "string", '{"supported": [1, 2, 3, 9]}', '{"supported": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]}'],
- channel_supported_message_types: [3919, "string", "1, 2, 3, 9, 10", "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"],
- otp_ttl_inject_receipt_enabled: [3710, "bool", !1, !0],
- unified_otp_copy_code_url: [3827, "string", "https://www.whatsapp.com/otp/copy/", "https://www.whatsapp.com/otp/copy/"],
- unified_otp_retriever_url: [3828, "string", "https://www.whatsapp.com/otp/code", "https://www.whatsapp.com/otp/code"],
- lid_groups_ougtoing_explict_address_mode: [3514, "bool", !1, !0],
- lid_groups_outgoing_explict_address_mode: [3615, "bool", !1, !0],
- lid_groups_new_group_creation: [3645, "bool", !1, !1],
- lid_groups_handle_server_addressing_mode: [3688, "bool", !1, !1],
- lid_groups_create_lid_individual_chats: [3876, "bool", !1, !1],
- lid_groups_outgoing_explicit_address_mode: [3803, "bool", !1, !0],
- lid_groups_aggregate_participant_change_system_message: [3804, "bool", !1, !1],
- lid_groups_message_send_validation: [4162, "bool", !1, !0],
- group_suspend_v2_enabled: [3180, "bool", !1, !0],
- enable_status_report_and_block: [3988, "bool", !1, !0],
- df_config: [3471, "string", "", ""],
- df_enabled: [3472, "bool", !1, !1]
- }
- }, 7674: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.MMS_URL_MEDIA_TYPE_SEARCH_PARAM = t.IS_MMS_URL_SEARCH_PARAM = void 0;
- t.IS_MMS_URL_SEARCH_PARAM = "__wa-mms";
- t.MMS_URL_MEDIA_TYPE_SEARCH_PARAM = "mms-type"
- }, 2765: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.debugDisableFeatureFlag = function (e) {
- n[e] = !1
- }, t.debugEnableFeatureFlag = function (e) {
- n[e] = !0
- }, t.isFeatureEnabled = function (e) {
- return n[e]
- }, t.overwriteDebugFeatures = function () {
- };
- const n = {
- a11y_block: !1,
- lid_debug: !1,
- format_bulleted_msg: !1,
- media_existence_check: !1,
- web_voip_voice_call: !1,
- web_voip_video_call: !1,
- youtube_video_preview_without_blur: !1,
- message_add_ons: !1,
- reactions_filter_problematic_flags: !0,
- native_promise_runtime: !0,
- skip_compliance_phone_check: !1,
- debug_commands: !1
- }
- }, 7761: (e, t, n) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.canEnableOfflineNotifications = function () {
- const {getABPropConfigValue: e} = n(3741);
- return !1
- }, t.canSupportOfflineNotifications = o;
- var r = n(8745);
- r.UA.isSafari && Number(r.UA.browserVersion.split(".")[0]);
- function o() {
- return !1
- }
- }, 8615: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.decryptPartialMedia = t.decrypt = t.cleanupCiphertextAndIv = t.HMAC_SIZE = t.BLOCK_SIZE = void 0;
- var o = r(n(8926)), i = n(8358);
- t.BLOCK_SIZE = 16;
- t.HMAC_SIZE = 10;
- const s = function () {
- var e = (0, o.default)((function* (e) {
- const {ciphertext: t, iv: n, mediaKeys: r} = e, {encKey: o} = r;
- try {
- const e = yield self.crypto.subtle.importKey("raw", new Uint8Array(o), "AES-CBC", !1, ["decrypt"]).catch((e => {
- throw __LOG__(2)`decryptPartialMedia:decrypt importKey error: ${String(e)}`, e
- }));
- return self.crypto.subtle.decrypt({name: "AES-CBC", iv: n}, e, t)
- } catch (e) {
- throw __LOG__(2)`decryptPartialMedia:decrypt decrypt error: ${String(e)}`, e
- }
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }();
- t.decrypt = s;
- const a = function () {
- var e = (0, o.default)((function* (e) {
- const {ciphertext: t, mediaKeys: n} = e, {encKey: r} = n,
- o = {name: "AES-CBC", iv: (t instanceof Uint8Array ? t : new Uint8Array(t)).slice(-16)};
- try {
- const e = yield self.crypto.subtle.importKey("raw", new Uint8Array(r), "AES-CBC", !1, ["encrypt"]).catch((e => {
- __LOG__(2)`decryptPartialMedia:getEncryptedPadding importKey error: ${String(e)}`
- })), t = new Uint8Array([]);
- return self.crypto.subtle.encrypt(o, e, t)
- } catch (e) {
- return void __LOG__(2)`decryptPartialMedia:getEncryptedPadding encrypt error: ${String(e)}`
- }
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }(), c = e => {
- const {serverRangeStart: t, ciphertext: n, mediaKeys: r} = e;
- let o = n instanceof Uint8Array ? n : new Uint8Array(n);
- const s = o.byteLength % 16 == 0;
- let c;
- return 0 === t ? c = new Uint8Array(r.iv) : (c = o.slice(0, 16), o = o.slice(16)), s || (o = o.slice(0, o.byteLength - 10)), s ? a({
- ciphertext: o,
- mediaKeys: r
- }).then((e => (o = (0, i.concatTypedArrays)(Uint8Array, [o, new Uint8Array(e)]), {
- ciphertext: o,
- iv: c
- }))) : Promise.resolve({ciphertext: o, iv: c})
- };
- t.cleanupCiphertextAndIv = c;
- const l = function () {
- var e = (0, o.default)((function* (e) {
- let {mediaKeys: t, ciphertext: n} = e;
- const {ciphertext: r, iv: o} = yield c({serverRangeStart: 0, ciphertext: n, mediaKeys: t});
- return s({ciphertext: r, iv: o, mediaKeys: t})
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }();
- t.decryptPartialMedia = l
- }, 346: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(2755)), i = r(n(9482));
- let s;
- if ("undefined" != typeof self) s = self; else {
- if (void 0 === n.g) throw(0, i.default)("Couldn't get global object");
- s = n.g
- }
- var a = "AbortController" in s ? s.AbortController : class {
- constructor() {
- this.signal = new o.default
- }
- abort() {
- const e = new Event("abort");
- this.signal.dispatchEvent(e)
- }
- };
- t.default = a
- }, 2755: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8019)), i = class extends o.default {
- constructor() {
- super(), this.aborted = !1
- }
- dispatchEvent(e) {
- return "abort" === e.type && (this.aborted = !0, "function" == typeof this.onabort && this.onabort.call(this, e)), super.dispatchEvent(e)
- }
- toString() {
- return "[object AbortSignal]"
- }
- };
- t.default = i
- }, 8019: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(7880));
- t.default = class {
- constructor() {
- this._emitter = new o.default
- }
- addEventListener(e, t) {
- this._emitter.on(e, t, this)
- }
- removeEventListener(e, t) {
- this._emitter.off(e, t, this)
- }
- dispatchEvent(e) {
- return this._emitter.trigger(e.type), !0
- }
- }
- }, 7880: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(835)), i = r(n(1609)), s = r(n(1463)), a = r(n(9482));
- const c = /\s+/;
- t.default = class {
- on(e, t, n) {
- if (!t) return this;
- if ("function" != typeof t) throw(0, a.default)("Callback parameter passed is not a function");
- return this._multiEvent(this.on, ...arguments) || this._getOrCreateEvents(e).push({
- callback: t,
- context: n,
- ctx: n || this
- }), this
- }
- once(e, t, n) {
- if (!t) return this;
- if (this._multiEvent(this.once, ...arguments)) return this;
- const r = this, o = (0, s.default)((function () {
- r.off(e, o), t.apply(this, arguments)
- }));
- return o._callback = t, this.on(e, o, n)
- }
- off(e, t, n) {
- const r = this._events;
- if (!r) return this;
- if (this._multiEvent(this.off, ...arguments)) return this;
- if (!e && !t && !n) return this._events = void 0, this;
- const o = e ? [e] : Object.keys(r);
- for (let e = 0; e < o.length; e++) {
- const i = o[e], s = r[i];
- if (s) {
- if (r[i] = [], t || n) for (let e = 0; e < s.length; e++) {
- const o = s[e];
- (t && t !== o.callback && t !== o.callback._callback || n && o.context !== n) && r[i].push(o)
- }
- r[i].length || delete r[i]
- }
- }
- return this
- }
- trigger(e) {
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
- if (!this._events) return this;
- if (this._multiEvent(this.trigger, ...arguments)) return this;
- const o = this._getEvents(e), i = this._getEvents("all");
- return o && this._triggerEvents(o, n), i && this._triggerEvents(i, arguments), this
- }
- stopListening(e, t, n) {
- const r = this._listeningTo;
- if (!r) return this;
- const o = null == e ? void 0 : e._listenId, s = o ? {[o]: e} : r;
- for (const e in s) {
- const o = s[e];
- o.off(t, n, this), (!t && !n || (0, i.default)(o._events)) && delete r[e]
- }
- return (0, i.default)(this._listeningTo) && delete this._listeningTo, this
- }
- listenTo(e, t, n) {
- return n ? (this._addListeningTo(e), e.on(t, n, this), this) : this
- }
- listenToOnce(e, t, n) {
- return this._addListeningTo(e), e.once(t, n, this), this
- }
- listenToAndRun(e, t, n) {
- return this.listenTo.apply(this, arguments), n.apply(this), this
- }
- isListening(e) {
- const t = this._events;
- return !!t && ("string" == typeof e ? !!t[e] : (0, i.default)(t))
- }
- _addListeningTo(e) {
- (this._listeningTo || (this._listeningTo = {}))[e._listenId || (e._listenId = (0, o.default)("l"))] = e
- }
- _getOrCreateEvents(e) {
- const t = this._events || (this._events = {});
- return t[e] || (t[e] = [])
- }
- _getEvents(e) {
- if (!e) return;
- const t = this._events;
- return t ? t[e] : void 0
- }
- _multiEvent(e, t) {
- if (c.test(t)) {
- const i = t.split(c);
- for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++) r[o - 2] = arguments[o];
- for (let t = 0; t < i.length; t++) e.call(this, i[t], ...r);
- return !0
- }
- return !1
- }
- _triggerEvents(e, t) {
- let n, r = -1;
- const o = e.length, i = t[0], s = t[1], a = t[2];
- switch (t.length) {
- case 0:
- for (; ++r < o;) (n = e[r]).callback.call(n.ctx);
- return;
- case 1:
- for (; ++r < o;) (n = e[r]).callback.call(n.ctx, i);
- return;
- case 2:
- for (; ++r < o;) (n = e[r]).callback.call(n.ctx, i, s);
- return;
- case 3:
- for (; ++r < o;) (n = e[r]).callback.call(n.ctx, i, s, a);
- return;
- default:
- for (; ++r < o;) (n = e[r]).callback.apply(n.ctx, t)
- }
- }
- bind() {
- return this.on(...arguments)
- }
- unbind() {
- return this.off(...arguments)
- }
- removeListener() {
- return this.off(...arguments)
- }
- removeAllListeners() {
- return this.off()
- }
- emit() {
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) t[n - 1] = arguments[n];
- return this.trigger(arguments)
- }
- }
- }, 8745: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.UA = t.OS_TYPE = t.BROWSER_TYPE = void 0, t.gteVersion = s, t.parseUA = c;
- var o = r(n(2238));
- t.BROWSER_TYPE = {
- CHROME: "chrome",
- CHROMIUM: "chromium",
- FIREFOX: "firefox",
- SAFARI: "safari",
- IE: "ie",
- OPERA: "opera",
- EDGE: "edge"
- };
- function i(e, t) {
- let n, r;
- const o = /(\.0)+[^\.]*$/, i = (e + "").replace(o, "").split("."),
- s = (t + "").replace(o, "").split("."), a = Math.min(i.length, s.length);
- for (n = 0; n < a; n++) if (r = parseInt(i[n], 10) - parseInt(s[n], 10), 0 !== r) return r;
- return i.length - s.length
- }
- function s(e, t) {
- return i(e, t) >= 0
- }
- function a(e, t) {
- return i(e, t) < 0
- }
- function c(e) {
- const t = new o.default;
- t.setUA(e || "");
- const n = (t.getBrowser().name || "").toUpperCase(), r = t.getBrowser().version || "0.0.0",
- i = (t.getEngine().name || "").toUpperCase(), c = (t.getOS().name || "").toUpperCase(),
- l = t.getOS().version || "0.0.0", u = "SAFARI" === n, d = "CHROME" === n, _ = "GECKO" === i,
- f = "BLINK" === i;
- let h = !1;
- switch (c) {
- case"MAC OS":
- d ? h = s(l, "10.10") && s(r, "41.0.0") : s(l, "10.7") && (h = !0);
- break;
- case"WINDOWS":
- s(l, "8.1") && (_ || d && s(r, "41.0.0")) && (h = !0)
- }
- const p = u || d && a(r, "76");
- return {
- isWebkit: !i || "WEBKIT" === i,
- isGecko: _,
- isTrident: "TRIDENT" === i || "EDGEHTML" === i,
- isSafari: u,
- isElectron: !1,
- isBlink: f,
- isBuggyVideoLoad: d && s(r, "76") || f && !d,
- hasEmoji: h,
- troublesWithLotsOfVideos: d,
- supportsEmojiEllipsification: !p,
- isBrokenGetUserMedia: d && a(r, "50"),
- isLocalStorageBroken: u && s(r, "14.1") && a(r, "14.1.2"),
- os: c.toLowerCase(),
- osVersion: l,
- browser: n.toLowerCase(),
- browserVersion: r,
- parser: t,
- isChrome: d
- }
- }
- t.OS_TYPE = {WINDOWS: "windows", MAC: "mac os", CHROMEOS: "chromium os"};
- const l = c("undefined" != typeof self ? self.navigator.userAgent : null);
- t.UA = l
- }, 1054: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e, t, n) {
- let r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : String,
- i = (0, o.default)(e, t.map(r)).join("");
- const s = n ? 4e3 : Number.POSITIVE_INFINITY;
- i.length > s && (i = i.slice(0, s).replace(/\s+$/, " [truncated]"));
- return i
- };
- var o = r(n(7791))
- }, 3948: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(9482));
- class s {
- constructor(e) {
- this._handleMessage = e => {
- if (!e.data || !e.data.action) return;
- const t = e.data;
- if (!e.ports || 0 === e.ports.length) return;
- const n = e.ports;
- if (!s.isSW() && window.navigator.serviceWorker && e.source !== window.navigator.serviceWorker.controller) return;
- let r;
- r = "function" == typeof e.waitUntil ? t => e.waitUntil(t) : () => {
- }, r(Promise.resolve(this.requestHandler(t)).then((e => {
- n[0].postMessage(e)
- })).catch((e => {
- n[0].postMessage({error: e && e.toString()})
- })))
- }, this.requestHandler = e
- }
- init() {
- const e = s.isSW() ? self : window.navigator.serviceWorker;
- try {
- if (!e) return;
- e.addEventListener("message", this._handleMessage)
- } catch (e) {
- }
- }
- static isSW() {
- return "undefined" == typeof window
- }
- static getRequestor(e) {
- return s.isSW() ? "string" == typeof e ? self.clients.get(e) : Promise.resolve(e) : window.navigator.serviceWorker ? window.navigator.serviceWorker.ready.then((() => window.navigator.serviceWorker ? window.navigator.serviceWorker.controller : null)) : Promise.resolve(null)
- }
- static broadcast(e, t) {
- return (0, o.default)((function* () {
- if (!s.isSW()) throw(0, i.default)("Broadcast called from non-serviceworker.");
- const n = yield self.clients.matchAll();
- return 0 === n.length ? Promise.reject((0, i.default)("No clients available.")) : Promise.all(n.map((n => s.request(n, e, t))))
- }))()
- }
- static request(e, t, n) {
- const r = new MessageChannel;
- return new Promise(((o, a) => (r.port1.onmessage = e => {
- var t;
- (null === (t = e.data) || void 0 === t ? void 0 : t.error) ? a(e.data.error) : o(e.data)
- }, s.getRequestor(e).then((e => {
- if (!e) return a((0, i.default)("No ServiceWorker controlling this client."));
- e.postMessage({action: t, message: n, version: "2.2322.15"}, [r.port2])
- })))))
- }
- }
- t.default = s
- }, 9194: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var n = {
- REQUEST_STREAMING_INFO: "GET_STREAMING_INFO",
- REQUEST_RMR: "REQUEST_RMR",
- SEND_STREAMING_CHUNK: "SEND_STREAMING_CHUNK",
- EXP_BACKOFF: "EXP_BACKOFF",
- LOG: "LOG",
- UPLOAD_LOGS: "UPLOAD_LOGS",
- SET_L10N: "SET_L10N",
- STREAMING_SUPPORTED: "STREAMING_SUPPORTED",
- REMOVE_PP: "REMOVE_PP",
- LOGOUT: "LOGOUT",
- CLEAN_ASSETS: "CLEAN_ASSETS",
- ACTIVE_TAB: "ACTIVE_TAB",
- STOP_COMMS: "STOP_COMMS"
- };
- t.default = n
- }, 1373: (e, t) => {
- "use strict";
- let n;
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- try {
- n = self.indexedDB
- } catch (e) {
- }
- var r = n;
- t.default = r
- }, 1157: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(3948)), i = r(n(9194)), s = r(n(6857));
- class a extends s.default {
- constructor() {
- super(...arguments), this.matchAction = e => e === i.default.ACTIVE_TAB, this.onAction = () => o.default.broadcast(i.default.ACTIVE_TAB)
- }
- }
- t.default = a
- }, 3933: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(9194)), s = r(n(6857));
- class a extends s.default {
- constructor() {
- var e;
- super(...arguments), e = this, this.matchFetch = e => {
- const {request: t} = e, n = s.default.parseUrl(t.url);
- return t.method === s.default.RequestType.GET && !!n && n.base === self.registration.scope && !!n.relativePath.match("^img/")
- }, this.onFetch = function () {
- var t = (0, o.default)((function* (t) {
- const {request: n} = t, r = yield e.cache.matchOrFetch(n);
- return r.ok ? r : e.cache.fetchAndPut(n)
- }));
- return function () {
- return t.apply(this, arguments)
- }
- }(), this.matchAction = e => i.default.CLEAN_ASSETS === e, this.onAction = function () {
- var t = (0, o.default)((function* (t, n) {
- const r = new Set(n), o = yield e.cache.keys();
- if (!o) return;
- const i = [];
- return o.forEach((e => {
- const t = e.url.lastIndexOf("/") + 1, n = e.url.slice(t);
- r.has(n) || i.push(e)
- })), Promise.all(i.map((t => e.cache.delete(t))))
- }));
- return function () {
- return t.apply(this, arguments)
- }
- }()
- }
- }
- t.default = a
- }, 2612: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(3948)), i = r(n(9482));
- t.default = e => {
- self.addEventListener("install", (function (t) {
- __LOG__(2)`Installing...`;
- const n = e.filter((e => e.matchInstall(t))).map((e => Promise.resolve(e.onInstall(t))));
- t.waitUntil(Promise.all(n).then((() => self.skipWaiting())).catch((e => {
- __LOG__(3)`onInstall error: ${String(e)}`
- })))
- })), self.addEventListener("activate", (function (t) {
- __LOG__(2)`Activating...`;
- const n = e.filter((e => e.matchActivate(t))).map((e => e.onActivate(t)));
- t.waitUntil(self.clients.claim().then((() => Promise.all(n))).catch((e => {
- __LOG__(3)`onActivate error: ${e}.`
- })))
- })), self.addEventListener("fetch", (function (t) {
- const n = e.find((e => e.matchFetch(t)));
- if (n) return t.respondWith(n.onFetch(t))
- })), self.addEventListener("push", (function (t) {
- const n = e.find((e => e.matchPush(t)));
- if (n) return n.onPush(t)
- })), self.addEventListener("notificationclick", (function (t) {
- const n = e.find((e => e.matchNotificationClick(t)));
- if (n) return n.onNotificationClick(t)
- }));
- new o.default((t => {
- let {action: n, message: r} = t;
- const o = e.find((e => e.matchAction(n)));
- return o ? o.onAction(n, r) : Promise.reject((0, i.default)(`Invalid Action: ${n}`))
- })).init()
- }
- }, 8043: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(9194)), s = r(n(3735)), a = r(n(6857)), c = r(n(5420));
- class l extends a.default {
- constructor(e, t) {
- var n;
- super(e, t), n = this, this.matchInstall = () => !0, this.onInstall = function () {
- var e = (0, o.default)((function* () {
- const e = yield n.store.get("l10n");
- return n.cacheObject.hashedResources.push(...n.cachedL10nHashes(n.cacheObject, e)), n.cache.update(n.cacheObject.hashedResources, n.cacheObject.unhashedResources)
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }(), this.matchActivate = () => !0, this.onActivate = () => this.cache.cleanup(), this.matchFetch = e => {
- const {request: t} = e, n = a.default.parseUrl(t.url);
- return t.method === a.default.RequestType.GET && !this.isCacheStale() && !!n && n.base === self.registration.scope && this.cacheList.has(n.relativePath)
- }, this.onFetch = e => {
- const {request: t} = e, n = a.default.parseUrl(t.url);
- return n ? this.cache.matchOrFetch(t, `${n.base}${n.relativePath}`) : self.fetch(t)
- }, this.matchAction = e => e === i.default.SET_L10N, this.onAction = function () {
- var e = (0, o.default)((function* (e, t) {
- const r = yield n.store.get("l10n");
- if (r && t.locale === r.locale) return;
- const [o] = n.cachedL10nHashes(n.cacheObject, t);
- if (!o) return n.store.delete("l10n");
- const i = `${self.registration.scope}${c.default.getIndexPath(t)}`;
- return Promise.all([n.cache.fetchAndPut(i, self.registration.scope), n.store.put("l10n", {
- locale: t.locale,
- isRTL: t.isRTL
- })])
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }(), this.cacheObject = s.default, this.cacheList = new Set([...this.cacheObject.hashedResources, ...this.cacheObject.unhashedResources, ...Object.keys(this.cacheObject.l10n.locales).map((e => this.cacheObject.l10n.locales[e]))])
- }
- cachedL10nHashes(e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
- const {locale: n} = t, r = e.l10n.locales[n];
- return r ? [r] : []
- }
- isCacheStale() {
- return (new Date).getTime() - this.cacheObject.releaseDate >= 2592e6
- }
- }
- t.default = l
- }, 7719: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(2083)), s = r(n(5420));
- const a = i.default.prefs, c = self.caches.keys(), l = /wa\d+\.\d+\.\d+(\.[id])?(\.canary)?$/,
- u = ["wa-pp", "wa-assets", "wa-stickers", "wa_web_user_prefs_cache_store"];
- function d(e) {
- this.cacheName = e, this.openCachePromise = self.caches.open(this.cacheName)
- }
- function _() {
- return (_ = (0, o.default)((function* (e) {
- try {
- const t = (yield c).find((t => t !== e && l.test(t)));
- if (t) return new d(t)
- } catch (e) {
- __LOG__(3)`Could not find previous cache, current cache:${this.cacheName}, error: ${e}`
- }
- }))).apply(this, arguments)
- }
- d.prototype = {
- update(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- try {
- const r = yield function () {
- return _.apply(this, arguments)
- }(n.cacheName);
- if (!r) return;
- return __LOG__(2)`Updating cache: ${n.cacheName}`, a.get("l10n").then((o => Promise.all(n.prefetchHashedResources(e, r).concat(n.prefetchUnhashedResources(t, o)))))
- } catch (e) {
- __LOG__(3)`Error occured while updating cache:${n.cacheName}, error: ${e}`
- }
- }))()
- }, prefetchHashedResources(e, t) {
- var n = this;
- return e.map(function () {
- var e = (0, o.default)((function* (e) {
- const r = self.registration.scope + e, o = yield t.match(r).catch((e => {
- __LOG__(3)`Unable to match prev. cache, cache name: ${t.cacheName}, request: ${r}, error: ${e}`
- }));
- return o ? n.put(r, o) : n.fetchAndPut(r)
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }())
- }, prefetchUnhashedResources(e, t) {
- return e.map((e => "" === e ? this.fetchAndPut(self.registration.scope + s.default.getIndexPath(t), self.registration.scope, {cache: "reload"}) : this.fetchAndPut(self.registration.scope + e)))
- }, cleanup() {
- var e = this;
- return (0, o.default)((function* () {
- const t = yield c;
- return Promise.all(t.map((t => {
- if (t !== e.cacheName && !u.includes(t)) return self.caches.delete(t).catch((n => {
- __LOG__(3)`Unable to delete cache: ${t}, current cache: ${e.cacheName}, error: ${n}`
- }))
- })))
- }))()
- }, matchOrFetch(e, t, n) {
- var r = this;
- return (0, o.default)((function* () {
- const o = t || h(e);
- return (yield r.match(o)) || r.fetchAndPut(e, o, n)
- }))()
- }, fetchAndPut(e, t, n) {
- var r = this;
- return (0, o.default)((function* () {
- const o = s.default.manuallyCloneRequest(e, void 0, {redirect: "manual", mode: "cors"});
- try {
- const i = yield self.fetch(o, n);
- if (i.ok) {
- const n = t || h(e);
- r.put(n, i.clone())
- } else "opaqueredirect" !== i.type && __LOG__(3)`Received invalid response, url: ${i.url}, status: ${i.status}, type: ${i.type}`;
- return i
- } catch (t) {
- throw __LOG__(3)`Unable to fetch request: ${h(e)}, error: ${t}`, t
- }
- }))()
- }, reset() {
- return this.openCachePromise = self.caches.delete(this.cacheName).then((() => self.caches.open(this.cacheName)))
- }, match(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- try {
- return (yield n.openCachePromise).match(e, t)
- } catch (t) {
- __LOG__(3)`Unable to match request: ${h(e)}, in cache: ${n.cacheName}, error: ${t}`
- }
- }))()
- }, put(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- try {
- return (yield n.openCachePromise).put(e, t)
- } catch (r) {
- __LOG__(3)`Unable to put in cache: ${n.cacheName}, request: ${h(e)}, response status: ${t.status}, error: ${r}`
- }
- }))()
- }, delete(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- try {
- return (yield n.openCachePromise).delete(e, t)
- } catch (t) {
- __LOG__(3)`Unable to delete request: ${h(e)}, in cache: ${n.cacheName}, error: ${t}`
- }
- }))()
- }, keys(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- try {
- return (yield n.openCachePromise).keys(e, t)
- } catch (t) {
- __LOG__(3)`Unable to match request: ${h(e)}, in cache: ${n.cacheName}, error: ${t}`
- }
- }))()
- }
- };
- var f = d;
- function h(e) {
- return e instanceof Request ? e.url : e
- }
- t.default = f
- }, 3735: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- t.default = {
- version: "2.2322.15",
- hashedResources: ["1761.5e7d20fb4bfddba0ae17.js", "2266.87ab44d761a0ff36c0ea.js", "4106.ff0d3f431c5b61342a25.js", "432.bfe726e73e73d6d5c2ec.js", "4548.792c5da266e5ea08d5f3.js", "4944.cae5d06abb1b7e4ee034.js", "5346.72056a1c38e64d3393ae.js", "6086.14cf80e6ae6763d7a026.js", "6235.962c3cd8f396422e07c2.js", "648.b63736481bc87d180992.js", "app.df22dc4b1b984dc87f36.js", "early_error_handling.02cb80dc4f51c7e6bb93.js", "lazy_loaded_business_direct_utils.a674e7d659e3a15c37a1.js", "lazy_loaded_ca_root_certificates.ab2711e7139ff1b2317d.js", "lazy_loaded_high_priority_components.592036ed08f4319f192f.js", "lazy_loaded_high_priority_components~lazy_loaded_low_priority_components.778d314de8598f8e476e.js", "lazy_loaded_low_priority_components.b59c7aa8144a42461ce9.js", "lazy_loaded_low_priority_components~.3327352a74fdf794715e.js", "lazy_loaded_remove_direct_connection_keys.74bdf19d14b495555def.js", "libsignal-protocol-ee5b8ba.min.js", "main.2c63fbde3a91246a0977.js", "main~.7f1c85285a1a1c6251ed.js", "pdf.worker.96d1bc1f3d0105cd5a81bae7a9dad228.js", "runtime.d9a06bd6a7a484d6e04e.js", "vendor1~app.a91035d81a749b3d5627.js", "vendors~lazy_loaded_business_direct_utils.e24e12d5047d3b57fef7.js", "vendors~lazy_loaded_high_priority_components~lazy_loaded_low_priority_components.e4bc397bdb594c85b9eb.js", "vendors~lazy_loaded_low_priority_components.c8c8d4909f6ad2a4f8fd.js", "vendors~lazy_loaded_relay.924f984ed0bd537f91a5.js", "vendors~main.7e165df5f2eb091c4a6f.js", "vendors~main~.77fd43f3d675e162dcdf.js", "vendors~pdf.9f876162b6247e9c8463.js", "app-397dc77d692df7ff99b6.css", "browsers_2767db756145c71a601d.css", "lazy_loaded_high_priority_components.fcf61e27fd02a625f008.css", "lazy_loaded_low_priority_components.16ba3a1e6485b50fd77c.css", "main.bc3c58bb1ad0ec61786a.css", "main~.2d430bc83a97ffb2016d.css", "stylex-534e186735a7216f8166323ac4f40ec0.css"],
- unhashedResources: ["apple-touch-icon.png", "assets-manifest-2.2322.15.json", "binary-transparency-manifest-2.2322.15.json", "bryndan_write_20e48b2ec8c64b2a1ceb5b28d9bcc9d0.ttf", "crossdomain.xml", "favicon-48x48.ico", "favicon-64x64.ico", "favicon.ico", "manifest-apple.json", "manifest.json", "notification_2a485d84012c106acef03b527bb54635.mp3", "noto_emoji_regular_74a68c7003890e207589ea43dc7572ca.ttf", "robots.txt", "sequential-ptt-end_62ed28be622237546fd39f9468a76a49.mp3", "sequential-ptt-middle_7fa161964e93db72b8d00ae22189d75f.mp3", "whatsapp_pwa_apple_icon_128.png", "whatsapp_pwa_apple_icon_16.png", "whatsapp_pwa_apple_icon_192.png", "whatsapp_pwa_apple_icon_32.png", "whatsapp_pwa_apple_icon_512.png", "whatsapp_pwa_apple_icon_512.svg", "whatsapp_pwa_apple_icon_60.png", "whatsapp_pwa_apple_icon_64.png", "whatsapp_pwa_apple_icon_90.png", "whatsapp_pwa_icon_128.png", "whatsapp_pwa_icon_16.png", "whatsapp_pwa_icon_192.png", "whatsapp_pwa_icon_32.png", "whatsapp_pwa_icon_512.png", "whatsapp_pwa_icon_512.svg", "whatsapp_pwa_icon_60.png", "whatsapp_pwa_icon_64.png", "whatsapp_pwa_icon_90.png", "whatsapp-webclient-login_c09223f0813e7c3adc16476cba2a5d0d.mp4", "whatsapp-webclient-login-hq_0e0caf2391158ebc09fe32edd1022d03.mp4"],
- l10n: {
- locales: {
- "[request].18382cbd2fea006fbd6b.js": "locales/[request].18382cbd2fea006fbd6b.js",
- "af-json.25988698145e9540014c.js": "locales/af-json.25988698145e9540014c.js",
- "af.e1de444c0a8647ad8592.js": "locales/af.e1de444c0a8647ad8592.js",
- "ar-json.711fd42dae4c6fd2f162.js": "locales/ar-json.711fd42dae4c6fd2f162.js",
- "ar-XB.ae1c517c218fe0d934ae.js": "locales/ar-XB.ae1c517c218fe0d934ae.js",
- "ar.7afa30563df2d09f5974.js": "locales/ar.7afa30563df2d09f5974.js",
- "az-json.ac2e57fcbbbbb4413bdf.js": "locales/az-json.ac2e57fcbbbbb4413bdf.js",
- "az.9a308bfcc7e6fe1ce314.js": "locales/az.9a308bfcc7e6fe1ce314.js",
- "bg-json.8c9b9e32ce35abebbcb5.js": "locales/bg-json.8c9b9e32ce35abebbcb5.js",
- "bg.3e588c955726847898dd.js": "locales/bg.3e588c955726847898dd.js",
- "bn-json.aba923e60c7e394e9c69.js": "locales/bn-json.aba923e60c7e394e9c69.js",
- "bn.4e9622e7010ddb1bafc4.js": "locales/bn.4e9622e7010ddb1bafc4.js",
- "ca-json.e1ddd3ad02984ad281a5.js": "locales/ca-json.e1ddd3ad02984ad281a5.js",
- "ca.b1f8ef84dc7a754f1049.js": "locales/ca.b1f8ef84dc7a754f1049.js",
- "cs-json.8f706df20382364fffe1.js": "locales/cs-json.8f706df20382364fffe1.js",
- "cs.b1b5aa06efce7bc00723.js": "locales/cs.b1b5aa06efce7bc00723.js",
- "da-json.68367cd9b489d673a413.js": "locales/da-json.68367cd9b489d673a413.js",
- "da.c761b011b4ef15073c15.js": "locales/da.c761b011b4ef15073c15.js",
- "de-json.635a09ebc28de2716054.js": "locales/de-json.635a09ebc28de2716054.js",
- "de.2daea7fb1d232749e7e0.js": "locales/de.2daea7fb1d232749e7e0.js",
- "el-json.2e2f8bac9a5cd25050cb.js": "locales/el-json.2e2f8bac9a5cd25050cb.js",
- "el.dbed1a635b1e3b124c2a.js": "locales/el.dbed1a635b1e3b124c2a.js",
- "en-json.d665be4bfc342067f9bd.js": "locales/en-json.d665be4bfc342067f9bd.js",
- "en.66eea8a5a56d881e9fb5.js": "locales/en.66eea8a5a56d881e9fb5.js",
- "es-json.216d36ef3b32ec9b6aea.js": "locales/es-json.216d36ef3b32ec9b6aea.js",
- "es.302744be52e19dfe77f5.js": "locales/es.302744be52e19dfe77f5.js",
- "et-json.bb6dcec63eadddda1d57.js": "locales/et-json.bb6dcec63eadddda1d57.js",
- "et.950d6d5e9b3e182d2d0d.js": "locales/et.950d6d5e9b3e182d2d0d.js",
- "fa-json.add0b10bdc06d66bc040.js": "locales/fa-json.add0b10bdc06d66bc040.js",
- "fa.2765a5d3f2fe35345cef.js": "locales/fa.2765a5d3f2fe35345cef.js",
- "fi-json.09e47b9960d46c913a04.js": "locales/fi-json.09e47b9960d46c913a04.js",
- "fi.2d4537f89a43de3872dd.js": "locales/fi.2d4537f89a43de3872dd.js",
- "fil-json.854682a02cf129cd18d5.js": "locales/fil-json.854682a02cf129cd18d5.js",
- "fil.93869691df3d69f56dcc.js": "locales/fil.93869691df3d69f56dcc.js",
- "fr-json.6a722501db21be51bddf.js": "locales/fr-json.6a722501db21be51bddf.js",
- "fr.9ad54fd005bd261a2c22.js": "locales/fr.9ad54fd005bd261a2c22.js",
- "gu-json.05725aa16edac5dc0179.js": "locales/gu-json.05725aa16edac5dc0179.js",
- "gu.fe9673a8abc4ff2f702e.js": "locales/gu.fe9673a8abc4ff2f702e.js",
- "he-json.4de4932347c09714371b.js": "locales/he-json.4de4932347c09714371b.js",
- "he.151c876b8b4c4b66aead.js": "locales/he.151c876b8b4c4b66aead.js",
- "hi-json.04623748ba320e493047.js": "locales/hi-json.04623748ba320e493047.js",
- "hi.0980221bc8f2cab5f61f.js": "locales/hi.0980221bc8f2cab5f61f.js",
- "hr-json.26f4a1ab2c647aeb620e.js": "locales/hr-json.26f4a1ab2c647aeb620e.js",
- "hr.14d9b425ee73b21cb3de.js": "locales/hr.14d9b425ee73b21cb3de.js",
- "hu-json.86402b15e7707a6554b7.js": "locales/hu-json.86402b15e7707a6554b7.js",
- "hu.6367b05eafa33daf0134.js": "locales/hu.6367b05eafa33daf0134.js",
- "id-json.d04a2590e276f1550977.js": "locales/id-json.d04a2590e276f1550977.js",
- "id.3d2aef3be4e2a55eb6c7.js": "locales/id.3d2aef3be4e2a55eb6c7.js",
- "it-json.0e525895f812306e10da.js": "locales/it-json.0e525895f812306e10da.js",
- "it.e11bb1de927b0e193fa7.js": "locales/it.e11bb1de927b0e193fa7.js",
- "ja-json.94a6aa6c1afdfd487041.js": "locales/ja-json.94a6aa6c1afdfd487041.js",
- "ja.d3c8bd01ecc2eab4202a.js": "locales/ja.d3c8bd01ecc2eab4202a.js",
- "kk-json.9c79f3aca84e14358caf.js": "locales/kk-json.9c79f3aca84e14358caf.js",
- "kk.cbd71e0f7a8ba7380ecb.js": "locales/kk.cbd71e0f7a8ba7380ecb.js",
- "kn-json.5419b0bfa599a0891b0b.js": "locales/kn-json.5419b0bfa599a0891b0b.js",
- "kn.0741eab1d4d5eb93fe9a.js": "locales/kn.0741eab1d4d5eb93fe9a.js",
- "ko-json.2a2b0f6065b666b83aac.js": "locales/ko-json.2a2b0f6065b666b83aac.js",
- "ko.c14e0b9005817a0a654c.js": "locales/ko.c14e0b9005817a0a654c.js",
- "lt-json.3e80fa820282c51969f1.js": "locales/lt-json.3e80fa820282c51969f1.js",
- "lt.50f43c6087dfe217236b.js": "locales/lt.50f43c6087dfe217236b.js",
- "lv-json.e733e7592b554576f470.js": "locales/lv-json.e733e7592b554576f470.js",
- "lv.81ab4991a01fdfcd005a.js": "locales/lv.81ab4991a01fdfcd005a.js",
- "mk-json.e3dae2dd84c1c28fd400.js": "locales/mk-json.e3dae2dd84c1c28fd400.js",
- "mk.916f9db6cc9b04ac10a7.js": "locales/mk.916f9db6cc9b04ac10a7.js",
- "ml-json.d3a42aa6a9d2f0d7612c.js": "locales/ml-json.d3a42aa6a9d2f0d7612c.js",
- "ml.6361b66b64879a1a9abc.js": "locales/ml.6361b66b64879a1a9abc.js",
- "mr-json.363fcf59a04eac2783df.js": "locales/mr-json.363fcf59a04eac2783df.js",
- "mr.afc21025144bf7b3c5a3.js": "locales/mr.afc21025144bf7b3c5a3.js",
- "ms-json.57c6062648341831d629.js": "locales/ms-json.57c6062648341831d629.js",
- "ms~main.8fe418f01c90dec0403d.js": "locales/ms~main.8fe418f01c90dec0403d.js",
- "nb-json.574df781e00246579b3e.js": "locales/nb-json.574df781e00246579b3e.js",
- "nb.adbac682b461bab25dac.js": "locales/nb.adbac682b461bab25dac.js",
- "nl-json.64f211438e8c51d31857.js": "locales/nl-json.64f211438e8c51d31857.js",
- "nl.764dcdf8666677f8e83b.js": "locales/nl.764dcdf8666677f8e83b.js",
- "pa-json.04cad7f495f36700584a.js": "locales/pa-json.04cad7f495f36700584a.js",
- "pa.2fbb890b70c4c9f4fa46.js": "locales/pa.2fbb890b70c4c9f4fa46.js",
- "pl-json.772b13461c108f2adbb2.js": "locales/pl-json.772b13461c108f2adbb2.js",
- "pl.3139cdd9c5e11ebac4ce.js": "locales/pl.3139cdd9c5e11ebac4ce.js",
- "pt-BR.6fd32aea57c2f18e6061.js": "locales/pt-BR.6fd32aea57c2f18e6061.js",
- "pt-json.b0dc4a8741ba589e17a1.js": "locales/pt-json.b0dc4a8741ba589e17a1.js",
- "pt.ee7c31962cafb128f961.js": "locales/pt.ee7c31962cafb128f961.js",
- "ro-json.e5d70c52e212ae8440ef.js": "locales/ro-json.e5d70c52e212ae8440ef.js",
- "ro.010cc786b21040eb40a6.js": "locales/ro.010cc786b21040eb40a6.js",
- "ru-json.1f60f8858a0e4b180728.js": "locales/ru-json.1f60f8858a0e4b180728.js",
- "ru.33d803441956998b78da.js": "locales/ru.33d803441956998b78da.js",
- "sk-json.cf010b39a88cca8b24fa.js": "locales/sk-json.cf010b39a88cca8b24fa.js",
- "sk.25bf3a64d629c5e0942e.js": "locales/sk.25bf3a64d629c5e0942e.js",
- "sl-json.6676bc63c7892e7500fb.js": "locales/sl-json.6676bc63c7892e7500fb.js",
- "sl.3a3fd8d08d655df423d8.js": "locales/sl.3a3fd8d08d655df423d8.js",
- "sq-json.b298824d8b51e7071b91.js": "locales/sq-json.b298824d8b51e7071b91.js",
- "sq.8e866488febe21cb2c52.js": "locales/sq.8e866488febe21cb2c52.js",
- "sr-json.eaf850bf121aaf81858f.js": "locales/sr-json.eaf850bf121aaf81858f.js",
- "sr.8e09bc4552e6964cd6a8.js": "locales/sr.8e09bc4552e6964cd6a8.js",
- "sv-json.f3de250c2f26fcf74d1c.js": "locales/sv-json.f3de250c2f26fcf74d1c.js",
- "sv.93bebec1dfd60d563493.js": "locales/sv.93bebec1dfd60d563493.js",
- "sw-json.c01f5483f6489d0feebf.js": "locales/sw-json.c01f5483f6489d0feebf.js",
- "sw.3d2289dbed66a9872e90.js": "locales/sw.3d2289dbed66a9872e90.js",
- "ta-json.87dcf918cd8457a3da64.js": "locales/ta-json.87dcf918cd8457a3da64.js",
- "ta.3304fec957fb8ab4f049.js": "locales/ta.3304fec957fb8ab4f049.js",
- "te-json.fe15e3214a762dc46db8.js": "locales/te-json.fe15e3214a762dc46db8.js",
- "te.00e9a96e0a17e7976e7c.js": "locales/te.00e9a96e0a17e7976e7c.js",
- "th-json.389a71b73cf6942381c6.js": "locales/th-json.389a71b73cf6942381c6.js",
- "th.fe38b005ed7f33460216.js": "locales/th.fe38b005ed7f33460216.js",
- "tr-json.9225266375a6144c40fd.js": "locales/tr-json.9225266375a6144c40fd.js",
- "tr.9fae1603c3d710715181.js": "locales/tr.9fae1603c3d710715181.js",
- "uk-json.896a06e70d5fa7821921.js": "locales/uk-json.896a06e70d5fa7821921.js",
- "uk.8b5df7a0f2e97bac4ed8.js": "locales/uk.8b5df7a0f2e97bac4ed8.js",
- "ur-json.c5c7df488a39b264c1c9.js": "locales/ur-json.c5c7df488a39b264c1c9.js",
- "ur.034f805c78a33ebfa4ed.js": "locales/ur.034f805c78a33ebfa4ed.js",
- "uz-json.cf8ffb2271e0350c737d.js": "locales/uz-json.cf8ffb2271e0350c737d.js",
- "uz.292ac2b45525fe3f21c6.js": "locales/uz.292ac2b45525fe3f21c6.js",
- "vi-json.b3221fce07cc46c1e361.js": "locales/vi-json.b3221fce07cc46c1e361.js",
- "vi.e01bcfa8e063f146da2b.js": "locales/vi.e01bcfa8e063f146da2b.js",
- "zh-CN-json.38d2a410caee876abb49.js": "locales/zh-CN-json.38d2a410caee876abb49.js",
- "zh-CN.222571c4d490e9761bcd.js": "locales/zh-CN.222571c4d490e9761bcd.js",
- "zh-HK-json.7082091be98973ef367c.js": "locales/zh-HK-json.7082091be98973ef367c.js",
- "zh-HK.996fa3b123e393dc5456.js": "locales/zh-HK.996fa3b123e393dc5456.js",
- "zh-TW-json.d423ed1bfe02fcc65122.js": "locales/zh-TW-json.d423ed1bfe02fcc65122.js",
- "zh-TW.a2f4f99ff1e93baf234e.js": "locales/zh-TW.a2f4f99ff1e93baf234e.js"
- }, styles: {}
- },
- releaseDate: 1684798765185
- }
- }, 6857: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(9482));
- const i = new RegExp(`(${self.registration.scope}|https://web.whatsapp.com/|https://dyn.web.whatsapp.com/)([^?]*)(?:\\?(.*))?`);
- class s {
- static parseUrl(e) {
- const t = e.match(i);
- if (!t) return;
- let n;
- if (t[3]) {
- const r = {}, i = new Set;
- t[3].split("&").forEach((t => {
- const [n, s] = t.split("="), a = n.toLowerCase();
- if (i.has(a)) throw __LOG__(4, void 0, new Error)`Unexpected duplicated query param: ${n}=${s} in the url: ${e}`, (0, o.default)("Detected url with duplicated query param");
- i.add(a), r[n] = s
- })), n = r
- }
- return {base: t[1], relativePath: t[2], queryParams: n}
- }
- static convertToUrl(e, t) {
- const n = Object.keys(t).map((e => [e, t[e]].map(encodeURIComponent).join("="))).join("&");
- return n.length ? e.endsWith("/") ? `${e}?${n}` : `${e}/?${n}` : e
- }
- constructor(e, t) {
- this.matchFetch = () => !1, this.matchAction = () => !1, this.matchInstall = () => !1, this.matchActivate = () => !1, this.matchPush = () => !1, this.matchNotificationClick = () => !1, this.cache = e, this.store = t
- }
- }
- t.default = s, s.RequestType = {GET: "GET"}
- }, 5791: (e, t, n) => {
- "use strict";
- self.__LOG__ = n(4453).cM, self.SEND_LOGS = n(4453).ws
- }, 4453: (e, t, n) => {
- "use strict";
- var r = n(5318);
- t.cM = void 0, t.ws = E;
- var o = r(n(8926)), i = n(480), s = r(n(6432)), a = r(n(1054)), c = r(n(3948)), l = r(n(9194)),
- u = r(n(9482));
- const d = "log", _ = "info", f = "warn", h = "error", p = "errorVerbose", b = 1e3;
- let m, g = [], v = Promise.resolve();
- function y(e) {
- return new Promise((t => {
- self.setTimeout(t, e)
- }))
- }
- (0, i.initTagsLogger)();
- const w = function (e, t) {
- let n, r;
- return function o() {
- if (!n) {
- const i = Array.prototype.slice.call(arguments);
- return n = new Promise((function (e) {
- self.setTimeout((function () {
- n = null, r && (e(o.apply(null, i)), r = !1), e()
- }), t)
- })), Promise.resolve(e.apply(null, i))
- }
- return r = !0, n
- }
- }((function () {
- return S.apply(this, arguments)
- }), 500);
- function S() {
- return (S = (0, o.default)((function* () {
- if (0 !== g.length) try {
- yield c.default.broadcast(l.default.LOG, {buffer: g}), g = []
- } catch (e) {
- }
- }))).apply(this, arguments)
- }
- function E() {
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- return t.length && g.push({level: p, message: t}), m = m || j(), m
- }
- function j() {
- return k.apply(this, arguments)
- }
- function k() {
- return (k = (0, o.default)((function* () {
- let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0;
- try {
- let t;
- try {
- yield v, t = yield c.default.broadcast(l.default.UPLOAD_LOGS, {buffer: g})
- } catch (n) {
- if (!(e < 3)) throw(0, u.default)("Max generation reached. Failed to upload.");
- yield y(b), t = yield j(e + 1)
- }
- return m = void 0, t
- } catch (e) {
- __LOG__(3)`Unable to send upload request, error: ${e}`, m = void 0
- }
- }))).apply(this, arguments)
- }
- const A = (0, s.default)((function (e) {
- let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
- n = arguments.length > 2 ? arguments[2] : void 0, r = arguments.length > 3 ? arguments[3] : void 0,
- o = arguments.length > 4 ? arguments[4] : void 0;
- return function (i) {
- for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), l = 1; l < s; l++) c[l - 1] = arguments[l];
- const u = (0, a.default)(i, c, !t);
- let d;
- return n && (d = {name: n.name, stack: n.stack}), T(x(e, t), [u], d, r, o), u
- }
- }), ((e, t, n, r, o) => n || o ? null : String(e) + String(Boolean(t)) + String(Boolean(r))));
- function T(e, t, n, r, o) {
- 0 !== t.length && (g.push({
- level: e,
- message: t,
- error: n,
- attachedToSendLogs: r,
- extraTags: o
- }), v = w())
- }
- function x(e, t) {
- switch (e) {
- case 1:
- return _;
- case 2:
- return d;
- case 3:
- return f;
- case 4:
- return t ? p : h
- }
- throw(0, u.default)(`Invalid numeric level ${e}${t ? ", verbose" : ""}`)
- }
- t.cM = A, self.addEventListener("error", (e => {
- E(`Global Scope error: ${String(e.error)}, stack: ${e.error ? e.error.stack : ""}`)
- }))
- }, 3986: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(6857));
- class i extends o.default {
- constructor() {
- super(...arguments), this.matchNotificationClick = () => !0, this.onNotificationClick = e => {
- }
- }
- }
- t.default = i
- }, 2083: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(733)), i = function (e, t) {
- if (!t && e && e.__esModule) return e;
- if (null === e || "object" != typeof e && "function" != typeof e) return {default: e};
- var n = s(t);
- if (n && n.has(e)) return n.get(e);
- var r = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
- for (var i in e) if ("default" !== i && Object.prototype.hasOwnProperty.call(e, i)) {
- var a = o ? Object.getOwnPropertyDescriptor(e, i) : null;
- a && (a.get || a.set) ? Object.defineProperty(r, i, a) : r[i] = e[i]
- }
- r.default = e, n && n.set(e, r);
- return r
- }(n(3563));
- function s(e) {
- if ("function" != typeof WeakMap) return null;
- var t = new WeakMap, n = new WeakMap;
- return (s = function (e) {
- return e ? n : t
- })(e)
- }
- var a = (0, o.default)(i);
- t.default = a
- }, 3563: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(9619)), s = r(n(1373));
- const a = {prefs: {}, pp: {}, stickers: {}};
- let c;
- class l {
- constructor(e) {
- this.storeName = e, this.storeCache = {}
- }
- _callAction(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- const r = (yield c || (c = new Promise(((e, t) => {
- const n = (0, i.default)(s.default, "indexedDB").open("sw", 2);
- n.onupgradeneeded = e => {
- const t = e.target.result;
- e.target.transaction.onerror = e => {
- __LOG__(3)`Unable to upgrade database, error: ${e.target.error}`
- };
- for (const e in a) t.objectStoreNames.contains(e) && t.deleteObjectStore(e), t.createObjectStore(e, a[e])
- }, n.onsuccess = t => {
- e(t.target.result)
- }, n.onerror = e => {
- t(e.target.error)
- }
- })).catch((e => {
- throw __LOG__(3)`Unable to open sw database, error: ${e}`, c = void 0, e
- })))).transaction([n.storeName], "readwrite").objectStore(n.storeName), o = r[e].apply(r, t);
- return new Promise(((e, t) => {
- o.onsuccess = t => {
- e(t.target.result)
- }, o.onerror = e => {
- t(e.target.error)
- }
- }))
- }))()
- }
- get(e) {
- return void 0 !== this.storeCache[e] ? this.storeCache[e] : this.storeCache[e] = this._callAction("get", [e]).catch((t => {
- __LOG__(3)`Unable to fetch from db, object store: ${this.storeName}, key: ${e}, error: ${t}`, this.storeCache[e] = void 0
- }))
- }
- put(e, t) {
- return this.storeCache[e] = Promise.resolve(t), this._callAction("put", [t, e]).catch((n => {
- __LOG__(3)`Unable to put to db, object store: ${this.storeName}, key: ${e}, value: ${t}, error: ${n}`
- }))
- }
- delete(e) {
- return this.storeCache[e] = Promise.resolve(void 0), this._callAction("delete", [e]).catch((t => {
- __LOG__(3)`Unable to delete in db, object store: ${this.storeName}, key: ${e}, error: ${t}`
- }))
- }
- clear() {
- return this.storeCache = {}, this._callAction("clear").catch((e => {
- __LOG__(3)`Unable to clear object store: ${this.storeName}, error: ${e}`
- }))
- }
- }
- const u = {ObjectStore: l};
- for (const e in a) u[e] = new l(e);
- var d = u;
- t.default = d
- }, 6278: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(9194)), s = r(n(6857)), a = r(n(5420));
- class c extends s.default {
- constructor() {
- var e;
- super(...arguments), e = this, this.matchFetch = e => {
- const {request: t} = e, n = s.default.parseUrl(t.url);
- return t.method === s.default.RequestType.GET && !!n && ("https://web.whatsapp.com/" === n.base || "https://dyn.web.whatsapp.com/" === n.base) && "pp" === n.relativePath
- }, this.onFetch = function () {
- var t = (0, o.default)((function* (t) {
- const {request: n} = t, r = s.default.parseUrl(n.url);
- if (!r || !r.queryParams) return self.fetch(n);
- const {e: o, t: i, u: c, i: l, n: u} = r.queryParams,
- d = `${r.base}${r.relativePath}?t=${i}&u=${c}&i=${l}&n=${u}`,
- _ = o ? self.decodeURIComponent(o) : n;
- a.default.assertIsAllowedHost(o ? self.decodeURIComponent(o) : n.url);
- const f = yield e.cache.matchOrFetch(_, d);
- return f.ok && e.store.get(c).then((t => {
- if (t !== l) return Promise.all([e.removePPFromCache(c, l), e.store.put(c, l)])
- })), a.default.assertIsAllowedHost(f.url), f
- }));
- return function () {
- return t.apply(this, arguments)
- }
- }(), this.matchAction = e => i.default.REMOVE_PP === e || i.default.LOGOUT === e, this.onAction = (e, t) => {
- switch (e) {
- case i.default.REMOVE_PP: {
- const e = self.encodeURIComponent(t);
- return this.store.get(e).then((t => {
- if (t) return Promise.all([this.removePPFromCache(e, t), this.store.delete(e)])
- })).then((() => {
- }))
- }
- default:
- return Promise.all([this.cache.reset(), this.store.clear()]).then((() => {
- }))
- }
- }
- }
- removePPFromCache(e, t) {
- return Promise.all([this.cache.delete(`https://web.whatsapp.com/pp?t=s&u=${e}&i=${t}`), this.cache.delete(`https://web.whatsapp.com/pp?t=l&u=${e}&i=${t}`), this.cache.delete(`https://dyn.web.whatsapp.com/pp?t=s&u=${e}&i=${t}`), this.cache.delete(`https://dyn.web.whatsapp.com/pp?t=l&u=${e}&i=${t}`)])
- }
- }
- t.default = c
- }, 2100: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = n(9026), s = (n(7761), r(n(9194))), a = r(n(6857));
- class c extends a.default {
- constructor() {
- super(...arguments), this.matchInstall = () => !0, this.onInstall = () => {
- }, this.matchActivate = () => !0, this.onActivate = () => {
- }, this.matchPush = () => !0, this.onPush = e => {
- const t = function () {
- var e = (0, o.default)((function* () {
- return Promise.resolve()
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }();
- e.waitUntil(t())
- }, this.matchAction = e => e === s.default.STOP_COMMS, this.onAction = function () {
- var e = (0, o.default)((function* () {
- (0, i.getComms)() && (yield(0, i.stopComms)(), __LOG__(2)`[push-notification] Successfully stopped Comms in service worker`)
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }()
- }
- }
- t.default = c
- }, 2543: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = n(7674), i = r(n(6857));
- class s extends i.default {
- constructor() {
- super(...arguments), this.matchFetch = e => {
- const {request: t} = e, n = new URL(t.url), r = new URLSearchParams(n.search);
- return t.method === i.default.RequestType.GET && r.has(o.IS_MMS_URL_SEARCH_PARAM) && (0 === n.pathname.indexOf("/mms/sticker/") || "sticker" === r.get(o.MMS_URL_MEDIA_TYPE_SEARCH_PARAM))
- }, this.onFetch = e => this.cache.matchOrFetch(e.request)
- }
- }
- t.default = s
- }, 5420: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(9482));
- function i(e) {
- const t = new URL(e), n = t.host;
- if ("https:" !== t.protocol || !/\.whatsapp\.(net|com)(:\d+)?$/.test(n)) throw __LOG__(4, void 0, new Error, !0)`Unexpected url`, SEND_LOGS("SW: Potential XSS attack"), (0, o.default)("URL is not of allowed host or protocol")
- }
- var s = {
- manuallyCloneRequest: function (e, t, n) {
- let r = n;
- if ("string" == typeof e) {
- r = r || {}, r.credentials = "same-origin";
- const n = null != t ? t : e;
- return i(n), new Request(n, r)
- }
- const o = null != t ? t : e.url;
- return i(o), new Request(o || e.url, {
- method: void 0 === r.method ? e.method : r.method,
- headers: void 0 === r.headers ? e.headers : r.headers,
- mode: void 0 === r.mode ? e.mode : r.mode,
- credentials: "same-origin",
- cache: void 0 === r.cache ? e.cache : r.cache,
- redirect: void 0 === r.redirect ? e.redirect : r.redirect,
- integrity: void 0 === r.integrity ? e.integrity : r.integrity
- })
- }, getIndexPath: function (e) {
- return (null == e ? void 0 : e.locale) ? `%F0%9F%8C%90/${e.locale}` : ""
- }, assertIsAllowedHost: i
- };
- t.default = s
- }, 4414: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.VideoStreamer = void 0, t.parseClientRange = f;
- var o = r(n(8926)), i = n(9093), s = n(8358), a = n(8615), c = r(n(3948)), l = r(n(9194)), u = r(n(5420)),
- d = r(n(9482));
- const _ = 65536;
- function f(e) {
- const {clientRangeStartString: t, clientRangeEndString: n} = function (e) {
- const t = e.headers.get("Range");
- if (t) {
- const [e, n] = t.replace("bytes=", "").split("-");
- return {clientRangeStartString: e, clientRangeEndString: n}
- }
- const n = new URL(e.url);
- return {
- clientRangeStartString: n.searchParams.get("bytesstart"),
- clientRangeEndString: n.searchParams.get("bytesend")
- }
- }(e), r = parseInt(t, 10), o = parseInt(n, 10);
- return {clientRangeStart: isNaN(r) ? 0 : r, clientRangeEnd: isNaN(o) ? null : o}
- }
- t.VideoStreamer = class {
- constructor(e, t, n) {
- this.generation = 0;
- const {sidecar: r} = t, o = [];
- for (let e = 0; e < r.byteLength; e += a.HMAC_SIZE) o.push(r.slice(e, e + a.HMAC_SIZE));
- this.cryptoKeys = {
- iv: t.iv,
- sidecar: o,
- encKey: t.encKey,
- macKey: t.macKey
- }, this.streamData = n, this.clientId = e
- }
- fetchAndDecrypt(e) {
- var t = this;
- return (0, o.default)((function* () {
- const {clientUrl: n, msgKey: r} = t.streamData, {
- clientRangeStart: o,
- clientRangeEnd: i
- } = f(e), {serverRangeStart: s, serverRangeEnd: u} = t.computeServerRange(o, i),
- d = t.createServerRequest(e, s, u, n), _ = yield self.fetch(d);
- if (404 === _.status) return t.handleRMR(e, r);
- if (_.status >= 400) return __LOG__(2)`sw:videoStreaming:processRequest server returns ${_.status} error`, t.generation++, c.default.request(t.clientId, l.default.EXP_BACKOFF, {generation: t.generation}).then((() => t.fetchAndDecrypt(e)));
- t.generation = 0;
- const h = yield _.arrayBuffer(), p = h.byteLength;
- if (!h || p < a.BLOCK_SIZE) return __LOG__(2)`sw:videoStreaming:processRequest ciphertext is too short - ${p} bytes`, new Response(`Ciphertext is too short - ${p} bytes`, {status: 500});
- yield t.validateSidecar(s, h);
- const {ciphertext: b, iv: m} = yield(0, a.cleanupCiphertextAndIv)({
- serverRangeStart: s,
- ciphertext: h,
- mediaKeys: t.cryptoKeys
- }), g = yield(0, a.decrypt)({ciphertext: b, iv: m, mediaKeys: t.cryptoKeys}),
- v = t.cleanupPlaintext(g, {clientRangeStart: o, clientRangeEnd: i}, {
- serverRangeStart: s,
- serverRangeEnd: u
- }), y = t.createClientResponse(_, v, o);
- return t.sendBackArrayBuffer(o, v), y
- }))()
- }
- handleRMR(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- const r = yield c.default.request(n.clientId, l.default.REQUEST_RMR, {key: t});
- return n.cryptoKeys.encKey = r.encKey, n.cryptoKeys.iv = r.iv, n.streamData.clientUrl = r.clientUrl, n.streamData.size = r.size, n.fetchAndDecrypt(e)
- }))()
- }
- cleanupPlaintext(e, t, n) {
- let {clientRangeStart: r, clientRangeEnd: o} = t, {serverRangeStart: i, serverRangeEnd: s} = n;
- const c = 0 === i ? 0 : r - (i + a.BLOCK_SIZE), l = null != o ? s - o : 0;
- return e.slice(c, e.byteLength - l)
- }
- validateSidecar(e, t) {
- var n = this;
- return (0, o.default)((function* () {
- let r = t;
- const {macKey: o, iv: i, sidecar: c} = n.cryptoKeys;
- let l, u;
- 0 === e ? (l = 0, u = i) : (l = (e + a.BLOCK_SIZE) / _, u = r.slice(0, a.BLOCK_SIZE), r = r.slice(a.BLOCK_SIZE));
- const d = r.byteLength / _, f = yield self.crypto.subtle.importKey("raw", new Uint8Array(o), {
- name: "HMAC",
- hash: {name: "SHA-256"}
- }, !1, ["sign"]), h = [];
- for (let e = 0; e < d; e++) {
- const t = c[l + e], o = e * _, i = r.slice(o, o + _), d = u;
- u = i.slice(_ - a.BLOCK_SIZE, _ - a.BLOCK_SIZE + a.BLOCK_SIZE);
- const p = (0, s.concatTypedArrays)(Uint8Array, [new Uint8Array(d), new Uint8Array(i)]);
- h.push(n.validateChunk(p, f, t))
- }
- return Promise.all(h)
- }))()
- }
- validateChunk(e, t, n) {
- return (0, o.default)((function* () {
- const r = (yield self.crypto.subtle.sign({name: "HMAC"}, t, e)).slice(0, a.HMAC_SIZE);
- if (!(0, i.arrayBuffersEqual)(r, n)) return Promise.reject((0, d.default)("Invalid Chunk: Does not match sidecar."))
- }))()
- }
- createClientResponse(e, t, n) {
- const {size: r} = this.streamData, {
- contentRangeStart: o,
- contentRangeEnd: i
- } = this.getContentRange(n, t), s = new Headers(e.headers);
- s.set("Content-Range", `bytes ${o}-${i}/${r}`), s.set("Content-Length", `${t.byteLength}`);
- return new Response(t, {
- status: 200 === e.status ? 206 : e.status,
- statusText: e.statusText,
- headers: s
- })
- }
- getContentRange(e, t) {
- return {contentRangeStart: e, contentRangeEnd: e + t.byteLength - 1}
- }
- sendBackArrayBuffer(e, t) {
- const {contentRangeStart: n, contentRangeEnd: r} = this.getContentRange(e, t);
- c.default.request(this.clientId, l.default.SEND_STREAMING_CHUNK, {
- msgKey: this.streamData.msgKey,
- data: {start: n, end: r, buffer: t}
- })
- }
- createServerRequest(e, t, n, r) {
- const o = new URL(r);
- o.searchParams.set("bytestart", t.toString()), o.searchParams.set("byteend", n.toString());
- return u.default.manuallyCloneRequest(e, o.toString(), {
- credentials: "omit",
- headers: new Headers({}),
- mode: "cors",
- referrer: e.referrer
- })
- }
- computeServerRange(e, t) {
- let n = e, r = t;
- return n = e ? this.roundDown(e, _) : 0, r = null != t && 0 !== t ? this.roundUp(t, _) - 1 : n + 1572864 - 1, n > 0 && (n -= a.BLOCK_SIZE), {
- serverRangeStart: n,
- serverRangeEnd: r
- }
- }
- roundUp(e, t) {
- return Math.ceil(e / t) * t
- }
- roundDown(e, t) {
- return Math.floor(e / t) * t
- }
- }
- }, 9906: (e, t, n) => {
- "use strict";
- var r = n(5318);
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = void 0;
- var o = r(n(8926)), i = r(n(3948)), s = r(n(9194)), a = r(n(6857)), c = n(4414), l = r(n(9482));
- class u extends a.default {
- constructor() {
- super(...arguments), this.matchFetch = e => {
- const {request: t} = e, n = a.default.parseUrl(t.url);
- return !!(t.method === a.default.RequestType.GET && n && n.queryParams && n.queryParams.key && t.url.match("/stream/video"))
- }, this.onFetch = function () {
- var e = (0, o.default)((function* (e) {
- const {request: t, client: n, clientId: r} = e, o = a.default.parseUrl(t.url),
- u = r || (null == n ? void 0 : n.id);
- if (!u) return Promise.reject((0, l.default)("No client id found."));
- const {
- cryptoKeys: d,
- streamData: _
- } = yield i.default.request(u, s.default.REQUEST_STREAMING_INFO, {key: o.queryParams.key});
- return new c.VideoStreamer(u, d, _).fetchAndDecrypt(t)
- }));
- return function () {
- return e.apply(this, arguments)
- }
- }(), this.matchAction = e => e === s.default.STREAMING_SUPPORTED, this.onAction = () => !(!self.crypto || !self.crypto.subtle && !self.crypto.webkitSubtle)
- }
- }
- t.default = u
- }, 733: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function (e) {
- return e.default
- }
- }, 9482: (e, t) => {
- "use strict";
- Object.defineProperty(t, "__esModule", {value: !0}), t.default = function e(t) {
- const n = new Error(t);
- if (void 0 === n.stack) try {
- throw e
- } catch (e) {
- }
- return n
- }
- }, 2329: () => {
- }
- }, t = {};
- function n(r) {
- var o = t[r];
- if (void 0 !== o) return o.exports;
- var i = t[r] = {id: r, loaded: !1, exports: {}};
- return e[r].call(i.exports, i, i.exports, n), i.loaded = !0, i.exports
- }
- n.amdO = {}, n.d = (e, t) => {
- for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {enumerable: !0, get: t[r]})
- }, n.g = function () {
- if ("object" == typeof globalThis) return globalThis;
- try {
- return this || new Function("return this")()
- } catch (e) {
- if ("object" == typeof window) return window
- }
- }(), n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n.r = e => {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
- }, n.nmd = e => (e.paths = [], e.children || (e.children = []), e), (() => {
- "use strict";
- var e = n(5318);
- n(2271), n(5791);
- var t = e(n(1157)), r = e(n(3933)), o = e(n(2612)), i = e(n(8043)), s = e(n(7719)), a = e(n(3986)),
- c = e(n(2083)), l = e(n(6278)), u = e(n(2100)), d = e(n(2543)), _ = e(n(9906));
- const f = new s.default("wa-stickers"),
- h = [new l.default(new s.default("wa-pp"), c.default.pp), new _.default, new i.default(new s.default("wa2.2322.15"), c.default.prefs), new r.default(new s.default("wa-assets")), new d.default(f, c.default.stickers), new t.default, new u.default, new a.default];
- __LOG__(2)`sw version: ${"2.2322.15"}`, (0, o.default)(h)
- })()
- })();
|