1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823 |
- !(function (t, e) {
- if ('object' == typeof exports && 'object' == typeof module)
- module.exports = e();
- else if ('function' == typeof define && define.amd) define([], e);
- else {
- var n = e();
- for (var i in n) ('object' == typeof exports ? exports : t)[i] = n[i];
- }
- })(this, function () {
- return (function (t) {
- function e(i) {
- if (n[i]) return n[i].exports;
- var r = (n[i] = {exports: {}, id: i, loaded: !1});
- return t[i].call(r.exports, r, r.exports, e), (r.loaded = !0), r.exports;
- }
- var n = {};
- return (e.m = t), (e.c = n), (e.p = ''), e(0);
- })([
- function (t, e, n) {
- 'use strict';
- function i(t) {
- return t && t.__esModule ? t : {default: t};
- }
- function r(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0}),
- (e.JSPlugin = void 0);
- var o = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- a = n(5),
- s = n(15),
- u = n(16),
- l = n(10),
- f = n(9),
- c = n(1),
- h = i(c),
- d = (function () {
- function t() {
- document.addEventListener(
- 'visibilitychange',
- function () {
- if (document.hidden)
- for (var t = 0; t < 16; t++)
- p[I][t] &&
- p[I][t].bLoad &&
- p[I][t].oPlayCtrl.PlayM4_IsVisible(!1);
- else
- for (var e = 0; e < 16; e++)
- p[I][e] &&
- p[I][e].bLoad &&
- p[I][e].oPlayCtrl.PlayM4_IsVisible(!0);
- },
- !1
- );
- }
- function e(t, e) {
- t && e && ((p[M].iWidth = t), (p[M].iHeight = e));
- var n = p[M].iWidth % p[M].iCurrentSplit,
- i = p[M].iHeight % p[M].iCurrentSplit,
- r =
- (p[M].iWidth - n - 2 * p[M].iCurrentSplit) / p[M].iCurrentSplit,
- o =
- (p[M].iHeight - i - 2 * p[M].iCurrentSplit) /
- p[M].iCurrentSplit,
- a = (p[M].iWidth - n) / p[M].iCurrentSplit,
- s = (p[M].iHeight - i) / p[M].iCurrentSplit,
- u = p[M].iCurrentSplit;
- D = (0, h.default)('#' + p[M].szId);
- for (
- var l =
- '<div class="parent-wnd" style="overflow:hidden;width:100%; height:100%; position: relative;">',
- f = 0;
- f < p[z];
- f++
- ) {
- (t = r + (f % u === u - 1 ? n : 0)),
- (e = o + (f + u >= Math.pow(u, 2) ? i : 0));
- var c = a + (f % u === u - 1 ? n : 0),
- d = s + (f + u >= Math.pow(u, 2) ? i : 0);
- l +=
- '<div style="float:left; background-color: ' +
- p[M].oStyle.background +
- '; position: relative; width: ' +
- c +
- 'px; height: ' +
- d +
- 'px;"><canvas id="canvas' +
- f +
- '" class="play-window" style="border:1px solid ' +
- p[M].oStyle.border +
- ';" wid="' +
- f +
- '" width="' +
- t +
- '" height="' +
- e +
- '"></canvas><canvas id="canvas_draw' +
- f +
- '" class="draw-window" style="position:absolute; top:0; left:0;" wid="' +
- f +
- '" width=' +
- c +
- ' height=' +
- d +
- '></canvas></div>';
- }
- (l += '</div>'),
- D.html(l),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(0)
- .find('.play-window')
- .eq(0)
- .css('border', '1px solid ' + p[M].oStyle.borderSelect);
- }
- function n() {
- p.EventCallback = (function () {
- return {
- loadEventHandler: function () {
- window.loadEventHandler && window.loadEventHandler();
- },
- zoomEventResponse: function () {
- },
- windowEventSelect: function (t) {
- p[H] !== t &&
- ((p[H] = t),
- (p[I][t].bEZoom || p[I][t].b3DZoom) &&
- ((0, h.default)('.draw-window').unbind(),
- p[A].setDrawStatus(!1),
- (p[A] = null),
- (p[A] = new f.ESCanvas('canvas_draw' + t)),
- p[A].setShapeType('Rect'),
- p[A].setDrawStyle('#ff0000', '', 0),
- p[I][t].bEZoom
- ? p[A].setDrawStatus(!0, function (e) {
- e.startPos &&
- e.endPos &&
- (e.startPos[0] > e.endPos[0]
- ? p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
- null,
- !1
- )
- : p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
- {
- left: e.startPos[0],
- top: e.startPos[1],
- right: e.endPos[0],
- bottom: e.endPos[1],
- },
- !0
- ));
- })
- : p[I][t].b3DZoom &&
- p[A].setDrawStatus(!0, function (t) {
- p[j](t);
- })),
- window.GetSelectWndInfo && window.GetSelectWndInfo(t));
- },
- pluginErrorHandler: function (t, e, n) {
- window.PluginEventHandler &&
- window.PluginEventHandler(t, e, n);
- },
- windowEventOver: function (t) {
- window.windowEventOver && window.windowEventOver(t);
- },
- windowEventOut: function (t) {
- window.windowEventOut && window.windowEventOut(t);
- },
- windowEventUp: function (t) {
- window.windowEventUp && window.windowEventUp(t);
- },
- windowFullCcreenChange: function (t) {
- window.windowFullCcreenChange &&
- window.windowFullCcreenChange(t);
- },
- firstFrameDisplay: function (t) {
- window.firstFrameDisplay && window.firstFrameDisplay(t);
- },
- performanceLack: function () {
- window.performanceLack && window.performanceLack();
- },
- };
- })();
- }
- function i() {
- n(),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .each(function (t) {
- var e = this;
- (0, h.default)(e)
- .unbind()
- .bind('mousedown', function () {
- D.find('.parent-wnd')
- .eq(0)
- .find('.play-window')
- .css('border', '1px solid ' + p[M].oStyle.border),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(t)
- .find('.play-window')
- .eq(0)
- .css(
- 'border',
- '1px solid ' + p[M].oStyle.borderSelect
- ),
- p.EventCallback.windowEventSelect(
- parseInt(
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(t)
- .find('.play-window')
- .eq(0)
- .attr('wid'),
- 10
- )
- );
- }),
- (0, h.default)(e).bind('mouseover', function (e) {
- p.EventCallback.windowEventOver(t), e.stopPropagation();
- }),
- (0, h.default)(e).bind('mouseout', function (e) {
- p.EventCallback.windowEventOut(t), e.stopPropagation();
- }),
- (0, h.default)(e).bind('mouseup', function () {
- p.EventCallback.windowEventUp(t);
- }),
- (0, h.default)(e).bind('dblclick', function (t) {
- if (p[I][p[H]].bPlay) {
- var n =
- document.fullscreen ||
- document.webkitIsFullScreen ||
- document.mozFullScreen ||
- !1,
- i = (0, h.default)(e).get(0);
- if (n) {
- if (
- D.find('.parent-wnd')
- .eq(0)
- .width() === (0, h.default)(window).width()
- )
- return;
- document.exitFullscreen
- ? document.exitFullscreen()
- : document.webkitCancelFullScreen
- ? document.webkitCancelFullScreen()
- : document.mozCancelFullScreen &&
- document.mozCancelFullScreen();
- } else
- i.requestFullScreen
- ? i.requestFullScreen()
- : i.webkitRequestFullScreen
- ? i.webkitRequestFullScreen()
- : i.mozRequestFullScreen &&
- i.mozRequestFullScreen(),
- (p[B] = (0, h.default)(e));
- t.stopPropagation();
- }
- });
- }),
- 'undefined' != typeof document.fullScreen
- ? document.addEventListener('fullscreenchange', function () {
- var t = document.fullscreen || !1;
- p.EventCallback.windowFullCcreenChange(t);
- })
- : 'undefined' != typeof document.webkitIsFullScreen
- ? document.addEventListener(
- 'webkitfullscreenchange',
- function () {
- var t = document.webkitIsFullScreen || !1;
- p.EventCallback.windowFullCcreenChange(t);
- }
- )
- : 'undefined' != typeof document.mozFullScreen &&
- document.addEventListener(
- 'mozfullscreenchange',
- function () {
- var t = document.mozFullScreen || !1;
- p.EventCallback.windowFullCcreenChange(t);
- }
- );
- }
- function c() {
- for (
- var t = D.find('.parent-wnd')
- .eq(0)
- .children().length,
- e = p[M].iWidth % p[M].iCurrentSplit,
- n = p[M].iHeight % p[M].iCurrentSplit,
- i =
- (p[M].iWidth - e - 2 * p[M].iCurrentSplit) /
- p[M].iCurrentSplit,
- r =
- (p[M].iHeight - n - 2 * p[M].iCurrentSplit) /
- p[M].iCurrentSplit,
- o = (p[M].iWidth - e) / p[M].iCurrentSplit,
- a = (p[M].iHeight - n) / p[M].iCurrentSplit,
- s = p[M].iCurrentSplit,
- u = 0;
- u < t;
- u++
- ) {
- var l = i + (u % s === s - 1 ? e : 0),
- f = r + (u + s >= Math.pow(s, 2) ? n : 0),
- c = o + (u % s === s - 1 ? e : 0),
- h = a + (u + s >= Math.pow(s, 2) ? n : 0);
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(u)
- .width(c),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(u)
- .height(h),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(u)
- .find('.draw-window')
- .attr('width', c),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(u)
- .find('.draw-window')
- .attr('height', h),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(u)
- .find('.play-window')
- .attr('width', l),
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(u)
- .find('.play-window')
- .attr('height', f);
- }
- D.find('.parent-wnd')
- .eq(p[H])
- .find('.play-window')
- .css('border', '1px solid ' + p[M].oStyle.border),
- D.find('.parent-wnd')
- .eq(p[H])
- .children()
- .eq(0)
- .find('.play-window')
- .eq(0)
- .css('border', '1px solid ' + p[M].oStyle.borderSelect);
- }
- function d(t, e, n, i, r, o, a) {
- if ((0, h.default)('#' + p[I][n].windowID).length) {
- var s = !1;
- i && r && (s = !0),
- (p[I][n].bLoad = !0),
- T.openStream(
- t,
- e,
- function (t) {
- if (t.bHead && !p[I][n].bPlay)
- (p[I][n].bPlay = !0),
- (p[I][n].aHead = new Uint8Array(t.buf)),
- p[I][n].oPlayCtrl.PlayM4_OpenStream(t.buf, S, 2097152),
- '' !== p[I][n].szSecretKey &&
- (p[I][n].oPlayCtrl.PlayM4_SetSecretKey(
- 1,
- p[I][n].szSecretKey,
- 128
- ),
- (p[I][n].szSecretKey = '')),
- 4 === p[I][n].aHead[8]
- ? p[I][n].oPlayCtrl.PlayM4_SetStreamOpenMode(0)
- : p[I][n].oPlayCtrl.PlayM4_SetStreamOpenMode(1),
- p[I][n].oPlayCtrl.PlayM4_SetInputBufSize(b),
- p[I][n].oPlayCtrl.PlayM4_Play(p[I][n].windowID);
- else {
- var e = new Uint8Array(t.buf),
- i = p[I][n].oPlayCtrl.PlayM4_GetInputBufSize(),
- r = p[I][n].oPlayCtrl.PlayM4_GetYUVBufSize();
- 2 !== r ||
- p[I][n].bFirstFrame ||
- ((p[I][n].bFirstFrame = !0),
- p.EventCallback.firstFrameDisplay(n));
- var o = p[I][n].oPlayCtrl.PlayM4_GetDecodeFrameType();
- i > 0.5 * b && i < 0.8 * b && 1 === p[I][n].iRate
- ? o !== g &&
- (p[I][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g),
- p.EventCallback.performanceLack())
- : i >= 0.8 * b && (e = new Uint8Array([1, 2, 3, 4])),
- r > 10 && r < 15
- ? o !== g &&
- (p[I][n].oPlayCtrl.PlayM4_SetDecodeFrameType(g),
- p.EventCallback.performanceLack())
- : r > 15 && (e = new Uint8Array([1, 2, 3, 4])),
- r < 10 &&
- i < 0.5 * b &&
- o !== v &&
- p[I][n].oPlayCtrl.PlayM4_SetDecodeFrameType(v),
- t.statusString
- ? p.EventCallback.pluginErrorHandler(n, w, t)
- : t.type && 'exception' === t.type
- ? p.EventCallback.pluginErrorHandler(n, _, t)
- : p[I][n].oPlayCtrl.PlayM4_InputData(e, e.length),
- (e = null);
- }
- p[I][n].szStorageUUID &&
- k.inputData(p[I][n].szStorageUUID, t.buf),
- (t = null);
- },
- function () {
- p[I][n].bPlay &&
- (p.EventCallback.pluginErrorHandler(n, P),
- (p[I][n].bPlay = !1),
- (p[I][n].bFrameForward = !1),
- (p[I][n].iRate = 1),
- p[I][n].oPlayCtrl &&
- (p[I][n].oPlayCtrl.PlayM4_Stop(),
- p[I][n].oPlayCtrl.PlayM4_CloseStream()));
- }
- ).then(
- function (t) {
- (p[I][n].szStreamUUID = t),
- T.startPlay(t, i, r).then(
- function () {
- s
- ? ((p[I][n].szPlayType = 'playback'),
- (p[I][n].iRate = 1),
- p[I][n].oPlayCtrl.PlayM4_PlayRate(p[I][n].iRate))
- : (p[I][n].szPlayType = 'realplay'),
- o();
- },
- function (t) {
- a(t);
- }
- );
- },
- function (t) {
- a(t);
- }
- );
- }
- }
- if ('undefined' != typeof Symbol) {
- var p = null,
- y = -1,
- m = 0,
- v = 0,
- g = 1,
- S = 40,
- b = 4194304,
- w = 1001,
- _ = 1002,
- P = 1003,
- C = 2001,
- x = 2002,
- T = new s.StreamClient(),
- k = null,
- D = null,
- M = Symbol('OPTIONS'),
- R = Symbol('CURRENTPLAYRATE'),
- E = Symbol('CURRENTSOUNDWND'),
- z = Symbol('MAXWNDNUM'),
- I = Symbol('MAXWNDNUM'),
- A = Symbol('DRAWCANVAS'),
- F = Symbol('SHAPEID'),
- O = Symbol('WINDOWFULL'),
- B = Symbol('SINGLEWINDOW'),
- L = Symbol('FILETMP'),
- N = Symbol('STATUSTMP'),
- q = Symbol('UPGRADESTATUSURL'),
- H = Symbol('CURWNDINDEX'),
- j = Symbol('CALLBACKFUNCTION'),
- W = (function () {
- function n(o) {
- r(this, n), (p = this);
- var a = {
- szId: 'playWnd',
- iType: 1,
- iWidth: 400,
- iHeight: 300,
- iMaxSplit: 4,
- iCurrentSplit: 2,
- szBasePath: './',
- };
- var wsParams = {wsParams: ''};
- this[M] = Object.assign(a, wsParams, o);
- var s = {
- border: '#343434',
- borderSelect: '#FFCC00',
- background: '#4C4B4B',
- };
- (s = Object.assign(s, o.oStyle)),
- (this[M].oStyle = s),
- this[M].iCurrentSplit > this[M].iMaxSplit &&
- (this[M].iCurrentSplit = this[M].iMaxSplit),
- (this[R] = 1),
- (this[E] = -1),
- (this[z] = this[M].iMaxSplit * this[M].iMaxSplit),
- (this[F] = ''),
- (this[O] = !1),
- (this[B] = null),
- (this[L] = null),
- (this[N] = ''),
- (this[q] = ''),
- (this[H] = -1),
- (this[j] = null),
- (k = new l.StorageManager(
- this[M].szBasePath + '/transform'
- )),
- (D = (0, h.default)('#' + p[M].szId)),
- (this[I] = []);
- for (var u = 0; u < this[z]; u++)
- (this[I][u] = {}),
- (this[I][u].bSelect = !1),
- (this[I][u].bPlay = !1),
- (this[I][u].bRecord = !1),
- (this[I][u].oPlayCtrl = null),
- (this[I][u].szPlayType = ''),
- (this[I][u].szStorageUUID = ''),
- (this[I][u].szStreamUUID = ''),
- (this[I][u].aHead = []),
- (this[I][u].bLoad = !1),
- (this[I][u].windowID = 'canvas' + u),
- (this[I][u].drawID = 'canvas_draw' + u),
- (this[I][u].iRate = 1),
- (this[I][u].bEZoom = !1),
- (this[I][u].b3DZoom = !1),
- (this[I][u].szSecretKey = ''),
- (this[I][u].bFrameForward = !1),
- (this[I][u].iDecodeType = v),
- (this[I][u].bFirstFrame = !1);
- t(),
- e(),
- (this[A] = new f.ESCanvas('canvas_draw0')),
- 0 === this[M].iType &&
- (0, h.default)('#' + p[M].szId).hide(),
- i(),
- p.EventCallback.windowEventSelect(0);
- }
- return (
- o(n, [
- {
- key: 'JS_ArrangeWindow',
- value: function (t) {
- if (
- (t < p[M].iMaxSplit
- ? (p[M].iCurrentSplit = t)
- : (p[M].iCurrentSplit = p[M].iMaxSplit),
- a.oTool.isFirefox())
- )
- for (
- var e = 0;
- e < p[M].iMaxSplit * p[M].iMaxSplit;
- e++
- )
- p[I][e].oPlayCtrl &&
- p[I][e].oPlayCtrl.PlayM4_ClearCanvas();
- c(), p.EventCallback.windowEventSelect(0);
- },
- },
- {
- key: 'JS_SetSecretKey',
- value: function (t, e) {
- return t < 0
- ? -1
- : '' === e || 'undefined' == typeof e
- ? -1
- : ((this[I][t].szSecretKey = e), 0);
- },
- },
- {
- key: 'JS_Play',
- value: function (t, e, n, i, r) {
- var o = new Promise(function (o, a) {
- return n < 0 || n > p[z] - 1
- ? void a()
- : p[I][n].bFrameForward
- ? void a()
- : (p[I][n].bPlay && p.JS_Stop(n),
- (p[I][n].bFirstFrame = !1),
- (p[I][n].iDecodeType = v),
- void (p[I][n].oPlayCtrl
- ? d(t, e, n, i, r, o, a)
- : (p[I][n].oPlayCtrl = new u.JSPlayCtrl(
- p[M].szBasePath + '/playctrl/',
- function (s) {
- 'loaded' !== s.cmd || p[I][n].bLoad
- ? 'OnebyOne' === s.cmd
- ? s.status
- ? T.resume(p[I][n].szStreamUUID)
- : T.pause(p[I][n].szStreamUUID)
- : 'GetFrameData' === s.cmd &&
- p.EventCallback.pluginErrorHandler(
- n,
- C
- )
- : d(t, e, n, i, r, o, a);
- },
- n
- ))));
- });
- return o;
- },
- },
- {
- key: 'JS_Seek',
- value: function (t, e, n) {
- var i = new Promise(function (i, r) {
- return t < 0 || t > p[z] - 1
- ? void r()
- : p[I][t].bPlay
- ? void T.seek(p[I][t].szStreamUUID, e, n).then(
- function () {
- i();
- },
- function (t) {
- r(t);
- }
- )
- : void r();
- });
- return i;
- },
- },
- {
- key: 'JS_GetSdkVersion',
- value: function () {
- return p[I][0].oPlayCtrl.PlayM4_GetSdkVersion();
- },
- },
- {
- key: 'JS_DestroyWorker',
- value: function () {
- p[I].forEach(function (t) {
- t.bPlay && t.oPlayCtrl.PlayM4_CloseStream(),
- t.oPlayCtrl &&
- (t.oPlayCtrl.PlayM4_Destroy(),
- (t.oPlayCtrl = null),
- (t.bLoad = !1));
- });
- },
- },
- {
- key: 'JS_Stop',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return t < 0 || t > p[z] - 1
- ? void n()
- : (p[I][t].szStorageUUID && p.JS_StopSave(t),
- p[I][t].bEZoom && p.JS_DisableZoom(t),
- p[E] === t && (p[E] = -1),
- void T.stop(p[I][t].szStreamUUID).then(
- function () {
- (p[I][t].bPlay = !1),
- (p[I][t].bFrameForward = !1),
- (p[I][t].iRate = 1),
- p[I][t].oPlayCtrl &&
- (p[I][t].oPlayCtrl.PlayM4_Stop(),
- p[I][t].oPlayCtrl.PlayM4_CloseStream()),
- setTimeout(function () {
- e();
- }, 500);
- },
- function () {
- setTimeout(function () {
- n();
- }, 500);
- }
- ));
- });
- return e;
- },
- },
- {
- key: 'JS_Pause',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return t < 0 || t > p[z] - 1
- ? void n()
- : p[I][t].bPlay
- ? p[I][t].bFrameForward
- ? void n()
- : void T.pause(p[I][t].szStreamUUID).then(
- function () {
- p[I][t].oPlayCtrl.PlayM4_Pause(!0), e();
- },
- function (t) {
- n(t);
- }
- )
- : void n();
- });
- return e;
- },
- },
- {
- key: 'JS_Resume',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return t < 0 || t > p[z] - 1
- ? void n()
- : p[I][t].bPlay
- ? void T.resume(p[I][t].szStreamUUID).then(
- function () {
- 1 !== p[R] &&
- ((p[I][t].iRate = p[R]),
- T.setPlayRate(
- p[I][t].szStreamUUID,
- p[I][t].iRate
- ),
- p[I][t].oPlayCtrl.PlayM4_PlayRate(
- p[I][t].iRate
- ),
- p[R] > 1
- ? p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- g
- )
- : p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- v
- )),
- p[I][t].bFrameForward
- ? (p[I][t].oPlayCtrl.PlayM4_Play(
- p[I][t].windowID
- ),
- (p[I][t].bFrameForward = !1))
- : p[I][t].oPlayCtrl.PlayM4_Pause(!1),
- e();
- },
- function (t) {
- n(t);
- }
- )
- : void n();
- });
- return e;
- },
- },
- {
- key: 'JS_Slow',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return t < 0 || t > p[z] - 1
- ? void n()
- : p[I][t].bPlay
- ? 'playback' !== p[I][t].szPlayType
- ? void n()
- : p[I][t].iRate === -8
- ? void n()
- : p[I][t].bFrameForward
- ? void n()
- : (p[I][t].iRate < 0 &&
- p[I][t].iRate > -8 &&
- (p[I][t].iRate *= 2),
- 1 === p[I][t].iRate &&
- (p[I][t].iRate *= -2),
- p[I][t].iRate > 1 && (p[I][t].iRate /= 2),
- void T.setPlayRate(
- p[I][t].szStreamUUID,
- p[I][t].iRate
- ).then(
- function () {
- p[I][t].iRate < 2
- ? p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- v
- )
- : (p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- g
- ),
- p[I][
- t
- ].oPlayCtrl.PlayM4_SetIFrameDecInterval(
- 0
- )),
- p[I][t].oPlayCtrl.PlayM4_PlayRate(
- p[I][t].iRate
- ),
- e();
- },
- function (t) {
- n(t);
- }
- ))
- : void n();
- });
- return e;
- },
- },
- {
- key: 'JS_Fast',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return t < 0 || t > p[z] - 1
- ? void n()
- : p[I][t].bPlay
- ? 'playback' !== p[I][t].szPlayType
- ? void n()
- : p[I][t].bFrameForward
- ? void n()
- : 8 === p[I][t].iRate
- ? void n()
- : (p[I][t].iRate === -2
- ? (p[I][t].iRate = 1)
- : p[I][t].iRate < -2
- ? (p[I][t].iRate /= 2)
- : p[I][t].iRate > 0 &&
- p[I][t].iRate < 8 &&
- (p[I][t].iRate *= 2),
- void T.setPlayRate(
- p[I][t].szStreamUUID,
- p[I][t].iRate
- ).then(
- function () {
- p[I][t].iRate < 2
- ? p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- v
- )
- : (p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- g
- ),
- 8 === p[I][t].iRate
- ? p[I][
- t
- ].oPlayCtrl.PlayM4_SetIFrameDecInterval(
- 2
- )
- : p[I][
- t
- ].oPlayCtrl.PlayM4_SetIFrameDecInterval(
- 0
- )),
- p[I][t].oPlayCtrl.PlayM4_PlayRate(
- p[I][t].iRate
- ),
- e();
- },
- function (t) {
- n(t);
- }
- ))
- : void n();
- });
- return e;
- },
- },
- {
- key: 'JS_Transmission',
- value: function (t, e) {
- var n = new Promise(function (n, i) {
- return t < 0 || t > p[z] - 1
- ? void i()
- : p[I][t].szStreamUUID
- ? void T.transmission(
- p[I][t].szStreamUUID,
- e
- ).then(
- function (t) {
- n(t);
- },
- function (t) {
- i(t);
- }
- )
- : void i();
- });
- return n;
- },
- },
- {
- key: 'JS_FrameForward',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return t < 0 || t > p[z] - 1
- ? void n()
- : p[I][t].bPlay
- ? (1 !== p[I][t].iRate
- ? ((p[I][t].iRate = 1),
- (p[R] = p[I][t].iRate),
- T.setPlayRate(
- p[I][t].szStreamUUID,
- p[I][t].iRate
- ).then(
- function () {
- p[I][t].oPlayCtrl.PlayM4_PlayRate(
- p[I][t].iRate
- ),
- p[I][
- t
- ].oPlayCtrl.PlayM4_SetDecodeFrameType(
- v
- ),
- p[I][t].oPlayCtrl.PlayM4_OneByOne(),
- (p[I][t].bFrameForward = !0);
- },
- function (t) {
- n(t);
- }
- ))
- : (p[I][t].oPlayCtrl.PlayM4_PlayRate(
- p[I][t].iRate
- ),
- p[I][t].oPlayCtrl.PlayM4_SetDecodeFrameType(
- v
- ),
- p[I][t].oPlayCtrl.PlayM4_OneByOne(),
- (p[I][t].bFrameForward = !0)),
- void e())
- : void n();
- });
- return e;
- },
- },
- {
- key: 'JS_GetOSDTime',
- value: function (t) {
- var e = new Promise(function (e, n) {
- if (t < 0 || t > p[z] - 1) return void n(y);
- if (!p[I][t].bPlay) return void n(y);
- var i = p[I][t].oPlayCtrl.PlayM4_GetOSDTime(function (
- t
- ) {
- var n = Date.parse(t.replace(/-/g, ' ')) / 1e3;
- e(n);
- });
- return 0 !== i ? void n(y) : void 0;
- });
- return e;
- },
- },
- {
- key: 'JS_OpenSound',
- value: function (t) {
- return t < 0 || t > p[z] - 1
- ? y
- : p[I][t].bPlay
- ? p[E] === t
- ? y
- : (p[E] !== -1 &&
- p[I][p[E]].oPlayCtrl.PlayM4_StopSound(),
- 0 !== p[I][t].oPlayCtrl.PlayM4_PlaySound(t)
- ? y
- : ((p[E] = t), m))
- : y;
- },
- },
- {
- key: 'JS_GetVolume',
- value: function (t, e) {
- p[I][t].oPlayCtrl.PlayM4_GetVolume(function (t) {
- e(t);
- });
- },
- },
- {
- key: 'JS_SetVolume',
- value: function (t, e) {
- return 0 !== p[I][t].oPlayCtrl.PlayM4_SetVolume(e)
- ? y
- : m;
- },
- },
- {
- key: 'JS_CloseSound',
- value: function () {
- var t = p[E];
- return t < 0 || t > p[z] - 1
- ? y
- : p[I][t].bPlay
- ? 0 !== p[I][t].oPlayCtrl.PlayM4_StopSound()
- ? y
- : ((p[E] = -1), m)
- : y;
- },
- },
- {
- key: 'JS_EnableZoom',
- value: function (t) {
- return t < 0 || t > p[z] - 1
- ? y
- : p[I][t].bPlay
- ? ((0, h.default)('.draw-window').unbind(),
- (this[A] = new f.ESCanvas('canvas_draw' + t)),
- this[A].setShapeType('Rect'),
- this[A].setDrawStyle('#ff0000', '', 0),
- this[A].setDrawStatus(!0, function (e) {
- e.startPos &&
- e.endPos &&
- (e.startPos[0] > e.endPos[0]
- ? p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
- null,
- !1
- )
- : p[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
- {
- left: e.startPos[0],
- top: e.startPos[1],
- right: e.endPos[0],
- bottom: e.endPos[1],
- },
- !0
- ));
- }),
- (p[I][t].bEZoom = !0),
- m)
- : y;
- },
- },
- {
- key: 'JS_DisableZoom',
- value: function (t) {
- return t < 0 || t > p[z] - 1
- ? y
- : p[I][t].bPlay
- ? (this[A].setDrawStatus(!1),
- 0 !==
- this[I][t].oPlayCtrl.PlayM4_SetDisplayRegion(
- null,
- !1
- )
- ? y
- : ((this[I][t].bEZoom = !1), m))
- : y;
- },
- },
- {
- key: 'JS_Enable3DZoom',
- value: function (t, e) {
- return t < 0 || t > p[z] - 1
- ? y
- : p[I][t].bPlay
- ? ((0, h.default)('.draw-window').unbind(),
- (this[j] = e),
- (this[A] = new f.ESCanvas('canvas_draw' + t)),
- this[A].setShapeType('Rect'),
- this[A].setDrawStyle('#ff0000', '', 0),
- this[A].setDrawStatus(!0, function (t) {
- e(t);
- }),
- (p[I][t].b3DZoom = !0),
- m)
- : y;
- },
- },
- {
- key: 'JS_Disable3DZoom',
- value: function (t) {
- return t < 0 || t > p[z] - 1
- ? y
- : p[I][t].bPlay
- ? (this[A].setDrawStatus(!1),
- (this[I][t].b3DZoom = !1),
- m)
- : y;
- },
- },
- {
- key: 'JS_CapturePicture',
- value: function (t, e, n) {
- var i = new Promise(function (i, r) {
- return t < 0 || t > p[z] - 1
- ? void r()
- : p[I][t].bPlay
- ? (n || (n = 'JPEG'),
- void ('BMP' === n
- ? p[I][t].oPlayCtrl.PlayM4_GetBMP(function (
- t
- ) {
- 6 === t
- ? r(x)
- : (a.oTool.downloadFile(t, e + '.BMP'),
- i());
- })
- : 'JPEG' === n &&
- p[I][t].oPlayCtrl.PlayM4_GetJPEG(function (
- t
- ) {
- 6 === t
- ? r(x)
- : (a.oTool.downloadFile(t, e + '.jpeg'),
- i());
- })))
- : void r();
- });
- return i;
- },
- },
- {
- key: 'JS_StopRealPlayAll',
- value: function () {
- T.stopAll(),
- p[I].forEach(function (t, e) {
- t.bPlay &&
- (t.szStorageUUID && p.JS_StopSave(e),
- t.bEZoom && p.JS_DisableZoom(e),
- t.oPlayCtrl.PlayM4_Stop(),
- t.oPlayCtrl.PlayM4_CloseStream()),
- (t.bPlay = !1);
- }),
- (p[E] = -1);
- },
- },
- {
- key: 'JS_StartSave',
- value: function (t, e) {
- var n = new Promise(function (n, i) {
- if (t < 0 || t > p[z] - 1) return void i();
- if (!p[I][t].bPlay) return void i();
- e.indexOf('.mp4') < 0 && (e += '.mp4');
- var r = p[I][t].aHead,
- o = 0;
- 'playback' === p[I][t].szPlayType && (o = 1),
- k
- .startRecord(e, r, 2, o, {
- cbEventHandler: function (e) {
- p.EventCallback.pluginErrorHandler(t, e);
- },
- })
- .then(
- function (e) {
- (p[I][t].szStorageUUID = e), n();
- },
- function () {
- i();
- }
- );
- });
- return n;
- },
- },
- {
- key: 'JS_StopSave',
- value: function (t) {
- var e = new Promise(function (e, n) {
- return p[I][t].szStorageUUID
- ? void k.stopRecord(p[I][t].szStorageUUID).then(
- function () {
- (p[I][t].szStorageUUID = ''), e();
- },
- function (t) {
- n(t);
- }
- )
- : void n();
- });
- return e;
- },
- },
- {
- key: 'JS_GetLocalConfig',
- value: function () {
- return '';
- },
- },
- {
- key: 'JS_SetLocalConfig',
- value: function () {
- return !0;
- },
- },
- {
- key: 'JS_SetGridInfo',
- value: function (t) {
- if (null === t || 'undefined' == typeof t) return -1;
- var e = '#ff0000';
- return (
- t.style &&
- t.style.drawColor &&
- (e = t.style.drawColor),
- this[A].setDrawStyle(e),
- this[A].setShapesInfoByType('Grid', [
- {
- szGridMap: t.gridMap,
- iGridColNum: t.gridColNum,
- iGridRowNum: t.gridRowNum,
- },
- ]),
- 0
- );
- },
- },
- {
- key: 'JS_GetGridInfo',
- value: function () {
- if (!this[A]) return {};
- var t = this[A].getShapesInfoByType('Grid')[0];
- return t
- ? {
- gridColNum: t.iGridColNum,
- gridRowNum: t.iGridRowNum,
- gridMap: t.szGridMap,
- }
- : {iGridRowNum: 18, iGridColNum: 22, szGridMap: ''};
- },
- },
- {
- key: 'JS_SetDrawShapeInfo',
- value: function (t, e) {
- return 'undefined' == typeof t || '' === t
- ? -1
- : (this[A].setShapeType(t),
- e.style &&
- this[A].setDrawStyle(
- e.style.szDrawColor || '',
- e.style.szFillColor || '',
- e.style.iTranslucent || 0
- ),
- e.iMaxShapeSupport &&
- e.iMaxShapeSupport > 0 &&
- this[A].setMaxShapeSupport(e.iMaxShapeSupport),
- void (
- e.iMaxPointSupport &&
- e.iMaxPointSupport > 0 &&
- this[A].setCurrentShapeInfo({
- szId: '',
- szTips: '',
- iMinClosed: 3,
- iMaxPointNum: e.iMaxPointSupport,
- iPolygonType: 1,
- szDrawColor: e.style.szDrawColor || '',
- szFillColor: e.style.szFillColor || '',
- iTranslucent: e.style.iTranslucent || 0,
- })
- ));
- },
- },
- {
- key: 'JS_SetPolygonInfo',
- value: function (t) {
- if ('undefined' == typeof t || !t.length) return -1;
- var e = [];
- if (t.length > 0)
- for (var n = 0, i = t.length; n < i; n++) {
- var r = t[n].aPoint;
- r.length > 0 && e.push(t[n]);
- }
- return e.length > 0
- ? (this[A].setShapesInfoByType('Polygon', e), 0)
- : -1;
- },
- },
- {
- key: 'JS_GetPolygonInfo',
- value: function () {
- for (
- var t = [],
- e = this[A].getShapesInfoByType('Polygon'),
- n = 0,
- i = e.length;
- n < i;
- n++
- ) {
- var r = e[n],
- o = {
- aPoint: r.aPoint,
- bClosed: r.bClosed,
- szTips: r.szTips,
- };
- t.push(o);
- }
- return t;
- },
- },
- {
- key: 'JS_SetLineInfo',
- value: function (t) {
- if ('undefined' == typeof t || !t.length) return -1;
- var e = [];
- if (t.length > 0)
- for (var n = 0, i = t.length; n < i; n++) {
- var r = t[n].aPoint;
- r.length > 0 && e.push(t[n]);
- }
- return e.length > 0
- ? (this[A].setShapesInfoByType('Line', e), 0)
- : -1;
- },
- },
- {
- key: 'JS_GetLineInfo',
- value: function () {
- for (
- var t = [],
- e = this[A].getShapesInfoByType('Line'),
- n = 0,
- i = e.length;
- n < i;
- n++
- ) {
- var r = e[n],
- o = {
- iLineType: r.iLineType,
- aPoint: r.aPoint,
- szTips: r.szTips,
- };
- t.push(o);
- }
- return t;
- },
- },
- {
- key: 'JS_SetRectInfo',
- value: function (t) {
- if ('undefined' == typeof t || !t.length) return -1;
- var e = [];
- if (t.length > 0)
- for (var n = 0, i = t.length; n < i; n++) {
- var r = t[n].aPoint;
- r.length > 0 && e.push(t[n]);
- }
- return e.length > 0
- ? (this[A].setShapesInfoByType('Rect', e), 0)
- : -1;
- },
- },
- {
- key: 'JS_GetRectInfo',
- value: function () {
- for (
- var t = [],
- e = this[A].getShapesInfoByType('Rect'),
- n = 0,
- i = e.length;
- n < i;
- n++
- ) {
- var r = e[n],
- o = {aPoint: r.aPoint, szTips: r.szTips};
- t.push(o);
- }
- return t;
- },
- },
- {
- key: 'JS_SetRegionInfo',
- value: function (t) {
- var e = this;
- this[A].clearAllShape();
- var n = a.oTool.parseXmlFromStr(t);
- if (
- (this[A].setDrawStyle('#ff0000', '#343434', 0.3),
- (0, h.default)(n).find('DetectionRegionInfo').length >
- 0)
- )
- !(function () {
- e[A].setShapeType('Rect');
- var t = parseInt(
- (0, h.default)(n)
- .find('MaxRegionNum')
- .eq(0)
- .text(),
- 10
- );
- e[A].setMaxShapeSupport(t),
- (e[A].m_szDisplayMode = (0, h.default)(n)
- .find('DisplayMode')
- .eq(0)
- .text()),
- (e[A].m_szVideoFormat = (0, h.default)(n)
- .find('videoFormat')
- .eq(0)
- .text()),
- (e[A].m_iHorizontalResolution = parseInt(
- (0, h.default)(n)
- .find('HorizontalResolution')
- .eq(0)
- .text(),
- 10
- )),
- (e[A].m_iVerticalResolution = parseInt(
- (0, h.default)(n)
- .find('VerticalResolution')
- .eq(0)
- .text(),
- 10
- ));
- var i = [];
- (0, h.default)(n)
- .find('DetectionRegion')
- .each(function () {
- for (
- var t = [],
- e = 0,
- n = (0, h.default)(this).find('positionX')
- .length;
- e < n;
- e++
- ) {
- var r =
- Math.round(
- (0, h.default)(this)
- .find('positionX')
- .eq(e)
- .text()
- ) *
- p[A].m_iCanvasWidth /
- p[A].m_iHorizontalResolution,
- o =
- (p[A].m_iVerticalResolution -
- Math.round(
- (0, h.default)(this)
- .find('positionY')
- .eq(e)
- .text()
- )) *
- p[A].m_iCanvasHeight /
- p[A].m_iVerticalResolution;
- t.push([r, o]);
- }
- t.length > 0 &&
- (0 !== t[0][0] ||
- 0 !== t[1][0] ||
- 0 !== t[2][0] ||
- 0 !== t[3][0]) &&
- i.push({
- aPoint: t,
- iEditType:
- 'transparent' === p[A].m_szDisplayMode
- ? 1
- : 0,
- });
- }),
- e[A].setShapesInfoByType('Rect', i);
- })();
- else if (
- (0, h.default)(n).find('MoveDetection').length > 0
- ) {
- this[A].setShapeType('Grid');
- var i = parseInt(
- (0, h.default)(n)
- .find('columnGranularity')
- .eq(0)
- .text(),
- 10
- ),
- r = parseInt(
- (0, h.default)(n)
- .find('rowGranularity')
- .eq(0)
- .text(),
- 10
- ),
- o = (0, h.default)(n)
- .find('gridMap')
- .eq(0)
- .text();
- this[A].setShapesInfoByType('Grid', [
- {szGridMap: o, iGridColNum: i, iGridRowNum: r},
- ]);
- }
- return 0;
- },
- },
- {
- key: 'JS_GetRegionInfo',
- value: function () {
- if (!this[A]) return '';
- var t = this[A].getShapeType(),
- e = '<?xml version="1.0" encoding="utf-8"?>';
- if ('Rect' === t) {
- (e += '<DetectionRegionInfo>'),
- (e +=
- '<videoFormat>' +
- this[A].m_szVideoFormat +
- '</videoFormat><RegionType>roi</RegionType>'),
- (e +=
- '<ROI><HorizontalResolution>' +
- this[A].m_iHorizontalResolution +
- '</HorizontalResolution><VerticalResolution>' +
- this[A].m_iVerticalResolution +
- '</VerticalResolution></ROI>'),
- (e +=
- '<DisplayMode>' +
- this[A].m_szDisplayMode +
- '</DisplayMode><MaxRegionNum>' +
- this[A].getMaxShapeSupport() +
- '</MaxRegionNum>'),
- (e += '<DetectionRegionList>');
- for (
- var n = this[A].getShapesInfoByType('Rect'),
- i = 0,
- r = n.length;
- i < r;
- i++
- ) {
- var o = n[i].aPoint;
- (e += '<DetectionRegion><RegionCoordinatesList>'),
- (e +=
- '<RegionCoordinates><positionX>' +
- Math.round(
- o[3][0] *
- this[A].m_iHorizontalResolution /
- this[A].m_iCanvasWidth
- ) +
- '</positionX><positionY>' +
- (this[A].m_iVerticalResolution -
- Math.round(
- o[3][1] *
- this[A].m_iVerticalResolution /
- this[A].m_iCanvasHeight
- )) +
- '</positionY></RegionCoordinates>'),
- (e +=
- '<RegionCoordinates><positionX>' +
- Math.round(
- o[2][0] *
- this[A].m_iHorizontalResolution /
- this[A].m_iCanvasWidth
- ) +
- '</positionX><positionY>' +
- (this[A].m_iVerticalResolution -
- Math.round(
- o[2][1] *
- this[A].m_iVerticalResolution /
- this[A].m_iCanvasHeight
- )) +
- '</positionY></RegionCoordinates>'),
- (e +=
- '<RegionCoordinates><positionX>' +
- Math.round(
- o[1][0] *
- this[A].m_iHorizontalResolution /
- this[A].m_iCanvasWidth
- ) +
- '</positionX><positionY>' +
- (this[A].m_iVerticalResolution -
- Math.round(
- o[1][1] *
- this[A].m_iVerticalResolution /
- this[A].m_iCanvasHeight
- )) +
- '</positionY></RegionCoordinates>'),
- (e +=
- '<RegionCoordinates><positionX>' +
- Math.round(
- o[0][0] *
- this[A].m_iHorizontalResolution /
- this[A].m_iCanvasWidth
- ) +
- '</positionX><positionY>' +
- (this[A].m_iVerticalResolution -
- Math.round(
- o[0][1] *
- this[A].m_iVerticalResolution /
- this[A].m_iCanvasHeight
- )) +
- '</positionY></RegionCoordinates>'),
- (e +=
- '</RegionCoordinatesList></DetectionRegion>');
- }
- (e += '</DetectionRegionList>'),
- (e += '</DetectionRegionInfo>');
- } else if ('Grid' === t) {
- var a = this[A].getShapesInfoByType('Grid')[0];
- a ||
- (a = {
- iGridRowNum: 18,
- iGridColNum: 22,
- szGridMap: '',
- }),
- (e +=
- '<MoveDetection><videoFormat>PAL</videoFormat><RegionType>grid</RegionType>'),
- (e +=
- '<Grid><rowGranularity>' +
- a.iGridRowNum +
- '</rowGranularity><columnGranularity>' +
- a.iGridColNum +
- '</columnGranularity></Grid>'),
- (e += '<DisplayMode>transparent</DisplayMode>'),
- (e +=
- '<gridMap>' +
- a.szGridMap +
- '</gridMap></MoveDetection>');
- }
- return e;
- },
- },
- {
- key: 'JS_SetDrawStatus',
- value: function (t) {
- return this[A] ? (this[A].setDrawStatus(t), 0) : -1;
- },
- },
- {
- key: 'JS_ClearRegion',
- value: function () {
- return this[A] ? (this[A].clearAllShape(), 0) : -1;
- },
- },
- {
- key: 'JS_GetTextOverlay',
- value: function () {
- if (!this[A]) return '';
- var t = '<?xml version="1.0" encoding="utf-8"?>';
- (t += '<OSD>'),
- (t +=
- '<videoResolutionWidth>' +
- this[A].m_iHorizontalResolution +
- '</videoResolutionWidth>'),
- (t +=
- '<videoResolutionHeight>' +
- this[A].m_iVerticalResolution +
- '</videoResolutionHeight>');
- for (
- var e = '',
- n = '',
- i = '',
- r = this[A].getShapesInfoByType('RectOSD'),
- o = 0,
- a = r.length;
- o < a;
- o++
- ) {
- var s = r[o],
- u = Math.round(
- s.iPositionX *
- this[A].m_iHorizontalResolution /
- this[A].m_iCanvasWidth
- ),
- l = Math.round(
- s.iPositionY *
- this[A].m_iVerticalResolution /
- this[A].m_iCanvasHeight
- );
- 'overlay-date' === s.szOSDType
- ? ((e +=
- '<DateTimeOverlay><Type>' +
- s.szDateStyle +
- '</Type>'),
- (e +=
- '<clockType>' + s.szClockType + '</clockType>'),
- (e +=
- '<displayWeek>' +
- s.szDisplayWeek +
- '</displayWeek>'),
- (e += '<enabled>' + s.szEnabled + '</enabled>'),
- (e +=
- '<positionX>' +
- u +
- '</positionX><positionY>' +
- l +
- '</positionY></DateTimeOverlay>'))
- : 'overlay-ch' === s.szOSDType
- ? ((n +=
- '<channelNameOverlay><enabled>' +
- s.szEnabled +
- '</enabled>'),
- (n +=
- '<ChannelName>' +
- s.szText +
- '</ChannelName>'),
- (n +=
- '<positionX>' +
- u +
- '</positionX><positionY>' +
- l +
- '</positionY></channelNameOverlay>'))
- : 'overlay-text' === s.szOSDType &&
- ((i +=
- '<TextOverlay><id>' +
- s.szId +
- '</id><enabled>' +
- s.szEnabled +
- '</enabled>'),
- (i +=
- '<displayText>' +
- s.szText +
- '</displayText>'),
- (i +=
- '<positionX>' +
- u +
- '</positionX><positionY>' +
- l +
- '</positionY></TextOverlay>'));
- }
- return (
- (t += e),
- (t += n),
- (t += '<TextOverlayList>'),
- (t += i),
- (t += '</TextOverlayList>'),
- (t += '</OSD>')
- );
- },
- },
- {
- key: 'JS_SetTextOverlay',
- value: function (t) {
- this[A].setMaxShapeSupport(20);
- var e = a.oTool.parseXmlFromStr(t);
- if (
- (this[A].clearShapeByType('RectOSD'),
- (0, h.default)(e).find('OSD').length > 0)
- ) {
- if (
- (this[A].setDrawStyle('#ff0000', '#343434', 0.7),
- (this[A].m_iHorizontalResolution = parseInt(
- (0, h.default)(e)
- .find('videoResolutionWidth')
- .eq(0)
- .text(),
- 10
- )),
- (this[A].m_iVerticalResolution = parseInt(
- (0, h.default)(e)
- .find('videoResolutionHeight')
- .eq(0)
- .text(),
- 10
- )),
- (0, h.default)(e).find('channelNameOverlay')
- .length > 0)
- ) {
- var n = (0, h.default)(e)
- .find('channelNameOverlay')
- .eq(0),
- i = (0, h.default)(n)
- .find('ChannelName')
- .eq(0)
- .text(),
- r = (0, h.default)(n)
- .find('enabled')
- .eq(0)
- .text(),
- o =
- Math.round(
- (0, h.default)(n)
- .find('positionX')
- .eq(0)
- .text()
- ) *
- this[A].m_iCanvasWidth /
- this[A].m_iHorizontalResolution,
- s =
- Math.round(
- (0, h.default)(n)
- .find('positionY')
- .eq(0)
- .text()
- ) *
- this[A].m_iCanvasHeight /
- this[A].m_iVerticalResolution;
- this[A].addOSDShape(i, r, o, s, {
- szOSDType: 'overlay-ch',
- });
- }
- if (
- (0, h.default)(e).find('DateTimeOverlay').length > 0
- ) {
- var u = (0, h.default)(e)
- .find('DateTimeOverlay')
- .eq(0),
- l = (0, h.default)(u)
- .find('enabled')
- .eq(0)
- .text(),
- f =
- (0, h.default)(u)
- .find('Type')
- .eq(0)
- .text() ||
- (0, h.default)(u)
- .find('type')
- .eq(0)
- .text(),
- c = (0, h.default)(u)
- .find('displayWeek')
- .eq(0)
- .text(),
- d = (0, h.default)(u)
- .find('clockType')
- .eq(0)
- .text(),
- y = '',
- m = '',
- v = [
- 'Sunday',
- 'Monday',
- 'Tuesday',
- 'Wednesday',
- 'Thursday',
- 'Friday',
- 'Saturday',
- ],
- g = new Date();
- switch (
- ('true' === c && (m = v[g.getDay()]),
- (d = '24hour' === d ? '' : 'AM/PM'),
- f)
- ) {
- case '0':
- y = 'YYYY-MM-DD ' + m + ' hh:mm:ss ' + d;
- break;
- case '1':
- y = 'MM-DD-YYYY ' + m + ' hh:mm:ss ' + d;
- break;
- case '2':
- y = 'CHR-YYYY-MM-DD ' + m + ' hh:mm:ss ' + d;
- break;
- case '3':
- y = 'CHR-MM-DD-YYYY ' + m + ' hh:mm:ss ' + d;
- break;
- case '4':
- y = 'DD-MM-YYYY ' + m + ' hh:mm:ss ' + d;
- break;
- case '5':
- y = 'CHR-DD-MM-YYYY ' + m + ' hh:mm:ss ' + d;
- }
- var S =
- Math.round(
- (0, h.default)(u)
- .find('positionX')
- .eq(0)
- .text()
- ) *
- this[A].m_iCanvasWidth /
- this[A].m_iHorizontalResolution,
- b =
- Math.round(
- (0, h.default)(u)
- .find('positionY')
- .eq(0)
- .text()
- ) *
- this[A].m_iCanvasHeight /
- this[A].m_iVerticalResolution;
- this[A].addOSDShape(y, l, S, b, {
- szOSDType: 'overlay-date',
- szDateStyle: f,
- szDisplayWeek: c,
- szClockType: d,
- });
- }
- (0, h.default)(e).find('TextOverlayList').length >
- 0 &&
- (0, h.default)(e)
- .find('TextOverlayList')
- .eq(0)
- .find('TextOverlay')
- .each(function () {
- var t = (0, h.default)(this)
- .find('displayText')
- .eq(0)
- .text(),
- e = (0, h.default)(this)
- .find('enabled')
- .eq(0)
- .text(),
- n = (0, h.default)(this)
- .find('id')
- .eq(0)
- .text(),
- i =
- Math.round(
- (0, h.default)(this)
- .find('positionX')
- .eq(0)
- .text()
- ) *
- p[A].m_iCanvasWidth /
- p[A].m_iHorizontalResolution,
- r =
- Math.round(
- (0, h.default)(this)
- .find('positionY')
- .eq(0)
- .text()
- ) *
- p[A].m_iCanvasHeight /
- p[A].m_iVerticalResolution;
- p[A].addOSDShape(t, e, i, r, {
- szOSDType: 'overlay-text',
- szId: n,
- });
- });
- }
- return 0;
- },
- },
- {
- key: 'JS_ClearSnapInfo',
- value: function (t) {
- return this[A]
- ? (0 === t
- ? this[A].clearShapeByType('Rect')
- : 1 === t
- ? this[A].clearShapeByType('Polygon')
- : 2 === t
- ? this[A].clearShapeByType('Line')
- : 3 === t
- ? (this[A].clearShapeByType('Rect'),
- this[A].clearShapeByType('Polygon'))
- : this[A].clearAllShape(),
- 0)
- : -1;
- },
- },
- {
- key: 'JS_ClearTargetPolygon',
- value: function (t) {
- var e = a.oTool.parseXmlFromStr(t),
- n = this[A].getAllShapesInfo(),
- i = n.length;
- if (i > 0)
- for (var r = 0; r < i; r++) {
- var o = (0, h.default)(e)
- .find('id')
- .eq(0)
- .text();
- if ('Polygon' === n[r].szType && n[r].szId === o) {
- this[A].deleteShape(r);
- break;
- }
- }
- },
- },
- {
- key: 'JS_SetSnapPolygonInfo',
- value: function (t) {
- this[A].setShapeType('Polygon'),
- this[A].setMaxShapeSupport(20),
- this[A].setDrawStyle('#FFFF00', '#FFFF00', 0.1);
- var e = a.oTool.parseXmlFromStr(t),
- n = this[A].getAllShapesInfo(),
- i = n.length;
- if (i > 0)
- for (var r = 0; r < i; r++) {
- var o = (0, h.default)(e)
- .find('id')
- .eq(0)
- .text();
- if ('Polygon' === n[r].szType && n[r].szId === o) {
- this[A].deleteShape(r);
- break;
- }
- }
- var s = [];
- return (
- (0, h.default)(e).find('SnapPolygonList').length >
- 0 &&
- (0, h.default)(e)
- .find('SnapPolygonList')
- .eq(0)
- .find('SnapPolygon')
- .each(function () {
- var t = (0, h.default)(e)
- .find('id')
- .eq(0)
- .text(),
- n = parseInt(
- (0, h.default)(e)
- .find('polygonType')
- .eq(0)
- .text() || '1',
- 10
- ),
- i =
- (0, h.default)(e)
- .find('Tips')
- .eq(0)
- .text() ||
- (0, h.default)(e)
- .find('tips')
- .eq(0)
- .text(),
- r = parseInt(
- (0, h.default)(e)
- .find('MinClosed')
- .eq(0)
- .text(),
- 10
- ),
- o = parseInt(
- (0, h.default)(e)
- .find('PointNumMax')
- .eq(0)
- .text(),
- 10
- ),
- a =
- parseInt(
- (0, h.default)(e)
- .find('EditType')
- .eq(0)
- .text(),
- 10
- ) || 0,
- u =
- 'true' ===
- (0, h.default)(e)
- .find('isClosed')
- .eq(0)
- .text(),
- l =
- 'rgb(' +
- (0, h.default)(e)
- .find('r')
- .eq(0)
- .text() +
- ', ' +
- (0, h.default)(e)
- .find('g')
- .eq(0)
- .text() +
- ', ' +
- (0, h.default)(e)
- .find('b')
- .eq(0)
- .text() +
- ')',
- f = l,
- c = 0.1,
- d = [];
- (0, h.default)(e)
- .find('pointList')
- .eq(0)
- .find('point')
- .each(function (t) {
- (d[t] = []),
- (d[t][0] = Math.round(
- (0, h.default)(this)
- .find('x')
- .eq(0)
- .text() * p[A].m_iCanvasWidth
- )),
- (d[t][1] = Math.round(
- (0, h.default)(this)
- .find('y')
- .eq(0)
- .text() * p[A].m_iCanvasHeight
- ));
- }),
- d.length > 0
- ? (s.push({
- szId: t,
- iPolygonType: n,
- iMinClosed: r,
- iMaxPointNum: o,
- iEditType: a,
- aPoint: d,
- bClosed: u,
- szTips: i,
- szDrawColor: l,
- szFillColor: f,
- iTranslucent: c,
- }),
- p[A].setDrawStatus(!1))
- : (p[A].setCurrentShapeInfo({
- szId: t,
- szTips: i,
- iMinClosed: r,
- iMaxPointNum: o,
- iPolygonType: n,
- szDrawColor: l,
- szFillColor: f,
- iTranslucent: c,
- }),
- p[A].setDrawStatus(!0));
- }),
- s.length > 0 &&
- this[A].setShapesInfoByType('Polygon', s),
- 0
- );
- },
- },
- {
- key: 'JS_GetSnapPolygonInfo',
- value: function () {
- for (
- var t =
- "<?xml version='1.0' encoding='utf-8'?><SnapPolygonList>",
- e = this[A].getShapesInfoByType('Polygon'),
- n = 0,
- i = e.length;
- n < i;
- n++
- ) {
- var r = e[n];
- (t += '<SnapPolygon>'),
- (t += '<id>' + r.szId + '</id>'),
- (t +=
- '<polygonType>' +
- r.iPolygonType +
- '</polygonType>'),
- (t += '<color>');
- var o = r.szDrawColor
- .substring(4, r.szDrawColor.length - 1)
- .split(',');
- (t += '<r>' + o[0] + '</r>'),
- (t += '<g>' + o[1] + '</g>'),
- (t += '<b>' + o[2] + '</b>'),
- (t += '</color>'),
- (t += '<tips>' + r.szTips + '</tips>'),
- (t += '<isClosed>' + r.bClosed + '</isClosed>');
- var a = r.aPoint;
- t += '<pointList>';
- for (var s = 0, u = a.length; s < u; s++)
- t +=
- '<point><x>' +
- (a[s][0] / this[A].m_iCanvasWidth).toFixed(6) +
- '</x><y>' +
- (a[s][1] / this[A].m_iCanvasHeight).toFixed(6) +
- '</y></point>';
- (t += '</pointList>'), (t += '</SnapPolygon>');
- }
- return (t += '</SnapPolygonList>');
- },
- },
- {
- key: 'JS_SetSnapDrawMode',
- value: function () {
- return this[A]
- ? (this[A].setDrawMutiShapeOneTime(!1), 0)
- : -1;
- },
- },
- {
- key: 'JS_SetSnapLineInfo',
- value: function (t) {
- this[A].setShapeType('Line'),
- this[A].setMaxShapeSupport(20),
- this[A].setDrawStyle('#FFFF00', '#FFFF00', 0.1);
- var e = a.oTool.parseXmlFromStr(t),
- n = this[A].getAllShapesInfo(),
- i = n.length;
- if (i > 0)
- for (var r = 0; r < i; r++) {
- var o = (0, h.default)(e)
- .find('id')
- .eq(0)
- .text();
- if ('Line' === n[r].szType && n[r].szId === o) {
- this[A].deleteShape(r);
- break;
- }
- }
- var s = [];
- return (
- (0, h.default)(e).find('SnapLineList').length > 0 &&
- (0, h.default)(e)
- .find('SnapLineList')
- .eq(0)
- .find('SnapLine')
- .each(function () {
- var t = (0, h.default)(e)
- .find('id')
- .eq(0)
- .text(),
- n = parseInt(
- (0, h.default)(e)
- .find('LineTypeEx')
- .eq(0)
- .text(),
- 10
- ),
- i =
- parseInt(
- (0, h.default)(e)
- .find('CustomType')
- .text(),
- 10
- ) ||
- parseInt(
- (0, h.default)(e)
- .find('LineType')
- .text(),
- 10
- ),
- r =
- parseInt(
- (0, h.default)(e)
- .find('ArrowType')
- .text(),
- 10
- ) || 0,
- o =
- (0, h.default)(e)
- .find('Tips')
- .eq(0)
- .text() ||
- (0, h.default)(e)
- .find('tips')
- .eq(0)
- .text(),
- a =
- 'rgb(' +
- (0, h.default)(e)
- .find('r')
- .eq(0)
- .text() +
- ', ' +
- (0, h.default)(e)
- .find('g')
- .eq(0)
- .text() +
- ', ' +
- (0, h.default)(e)
- .find('b')
- .eq(0)
- .text() +
- ')',
- u = [];
- (u[0] = []),
- (u[1] = []),
- (u[0][0] = Math.round(
- (0, h.default)(e)
- .find('StartPos')
- .eq(0)
- .find('x')
- .eq(0)
- .text() * p[A].m_iCanvasWidth
- )),
- (u[0][1] = Math.round(
- (0, h.default)(e)
- .find('StartPos')
- .eq(0)
- .find('y')
- .eq(0)
- .text() * p[A].m_iCanvasHeight
- )),
- (u[1][0] = Math.round(
- (0, h.default)(e)
- .find('EndPos')
- .eq(0)
- .find('x')
- .eq(0)
- .text() * p[A].m_iCanvasWidth
- )),
- (u[1][1] = Math.round(
- (0, h.default)(e)
- .find('EndPos')
- .eq(0)
- .find('y')
- .eq(0)
- .text() * p[A].m_iCanvasHeight
- )),
- u.length > 0 &&
- (s.push({
- szId: t,
- iLineType: n,
- aPoint: u,
- szTips: o,
- iDirection: i,
- iArrowType: r,
- szDrawColor: a,
- }),
- p[A].setDrawStatus(!1));
- }),
- s.length > 0 &&
- this[A].setShapesInfoByType('Line', s),
- 0
- );
- },
- },
- {
- key: 'JS_GetSnapLineInfo',
- value: function () {
- for (
- var t =
- "<?xml version='1.0' encoding='utf-8'?><SnapLineList>",
- e = this[A].getShapesInfoByType('Line'),
- n = 0,
- i = e.length;
- n < i;
- n++
- ) {
- (t += '<SnapLine>'),
- (t += '<id>' + e[n].szId + '</id>'),
- (t +=
- '<LineTypeEx>' +
- e[n].iLineType +
- '</LineTypeEx>'),
- (t +=
- '<CustomType>0</CustomType><MoveChange>0</MoveChange><ArrowType>' +
- e[n].iArrowType +
- '</ArrowType>'),
- (t += '<tips>' + e[n].szTips + '</tips>');
- var r = e[n].aPoint;
- (t +=
- '<StartPos><x>' +
- (r[0][0] / p[A].m_iCanvasWidth).toFixed(6) +
- '</x><y>' +
- (r[0][1] / p[A].m_iCanvasHeight).toFixed(6) +
- '</y></StartPos>'),
- (t +=
- '<EndPos><x>' +
- (r[1][0] / p[A].m_iCanvasWidth).toFixed(6) +
- '</x><y>' +
- (r[1][1] / p[A].m_iCanvasHeight).toFixed(6) +
- '</y></EndPos>'),
- (t += '<LineSelected>false</LineSelected>'),
- e[n].aCrossArrowPoint.length > 0 &&
- ((t +=
- '<PDCArrow><Sp_x>' +
- (
- e[n].aCrossArrowPoint[0][0] /
- p[A].m_iCanvasWidth
- ).toFixed(6) +
- '</Sp_x>'),
- (t +=
- '<Sp_y>' +
- (
- e[n].aCrossArrowPoint[0][1] /
- p[A].m_iCanvasWidth
- ).toFixed(6) +
- '</Sp_y>'),
- (t +=
- '<Ep_x>' +
- (
- e[n].aCrossArrowPoint[1][0] /
- p[A].m_iCanvasWidth
- ).toFixed(6) +
- '</Ep_x>'),
- (t +=
- '<Ep_y>' +
- (
- e[n].aCrossArrowPoint[1][1] /
- p[A].m_iCanvasWidth
- ).toFixed(6) +
- '</Ep_y></PDCArrow>')),
- (t += '<PDCShowMark>false</PDCShowMark>');
- var o = e[n].szDrawColor.split(',')[0].split('(')[1],
- a = e[n].szDrawColor.split(',')[1],
- s = e[n].szDrawColor.split(',')[2].split(')')[0];
- (t +=
- '<color><r>' +
- (o || '255') +
- '</r><g>' +
- (a || '255') +
- '</g><b>' +
- (s || '0') +
- '</b></color>'),
- (t += '</SnapLine>');
- }
- return (t += '</SnapLineList>');
- },
- },
- {
- key: 'JS_FullScreenDisplay',
- value: function (t) {
- if (t) {
- this[O] = t;
- var e = (0, h.default)('#' + p[M].szId).get(0);
- e.requestFullScreen
- ? e.requestFullScreen()
- : e.webkitRequestFullScreen
- ? e.webkitRequestFullScreen()
- : e.mozRequestFullScreen &&
- e.mozRequestFullScreen();
- }
- },
- },
- {
- key: 'JS_FullScreenSingle',
- value: function (t) {
- if (p[I][t].bPlay) {
- var e =
- document.fullscreen ||
- document.webkitIsFullScreen ||
- document.mozFullScreen ||
- !1,
- n = D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(t)
- .get(0);
- if (e) {
- if (
- D.find('.parent-wnd')
- .eq(0)
- .width() === (0, h.default)(window).width()
- )
- return;
- document.exitFullscreen
- ? document.exitFullscreen()
- : document.webkitCancelFullScreen
- ? document.webkitCancelFullScreen()
- : document.mozCancelFullScreen &&
- document.mozCancelFullScreen();
- } else
- n.requestFullScreen
- ? n.requestFullScreen()
- : n.webkitRequestFullScreen
- ? n.webkitRequestFullScreen()
- : n.mozRequestFullScreen &&
- n.mozRequestFullScreen(),
- (p[B] = D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(t));
- }
- },
- },
- {
- key: 'JS_StartDownload',
- value: function (t, e, n, i) {
- var r = (0, h.default)(a.oTool.parseXmlFromStr(i))
- .find('playbackURI')
- .eq(0)
- .text(),
- o = t + '?playbackURI=' + r,
- s = '.mp4';
- t.indexOf('picture/Streaming/tracks') > 0 &&
- ((o = t), (s = '.jpg'));
- var u = o.indexOf('&name=') + 6,
- l = o.indexOf('&size=');
- return (
- (n = o.substring(u, l)),
- (0, h.default)('body').append(
- '<a id="jsplugin_download_a" href="' +
- o +
- '" download=' +
- n +
- s +
- '><li id="jsplugin_download_li"></li></a>'
- ),
- (0, h.default)('#jsplugin_download_li').trigger(
- 'click'
- ),
- (0, h.default)('#jsplugin_download_a').remove(),
- 0
- );
- },
- },
- {
- key: 'JS_Resize',
- value: function (t, e) {
- if (
- (this[O]
- ? ((t = (0, h.default)(window).width()),
- (e = (0, h.default)(window).height()),
- (0, h.default)('#' + this[M].szId).css({
- width: t,
- height: e,
- }),
- (this[O] = !1))
- : (0, h.default)('#' + this[M].szId).css({
- width: t,
- height: e,
- }),
- (this[M].iWidth = t),
- (this[M].iHeight = e),
- a.oTool.isFirefox())
- )
- for (
- var n = 0;
- n < p[M].iMaxSplit * p[M].iMaxSplit;
- n++
- )
- p[I][n].oPlayCtrl &&
- p[I][n].oPlayCtrl.PlayM4_ClearCanvas();
- c(),
- p[B] &&
- ((t = (0, h.default)(window).width()),
- (e = (0, h.default)(window).height()),
- p[B].css({width: t, height: e}),
- p[B].find('canvas').attr('width', t - 2),
- p[B].find('canvas').attr('height', e - 2),
- (p[B] = null)),
- this[A].resizeCanvas(),
- this[A].canvasRedraw();
- },
- },
- {
- key: 'JS_WndCreate',
- value: function (t, n, i) {
- e(n, i),
- this[A].updateCanvas('canvas_draw0'),
- this[A].clearAllShape(),
- 0 === t
- ? (0, h.default)('#' + this[M].szId).hide()
- : (0, h.default)('#' + this[M].szId).show(),
- p.EventCallback.windowEventSelect(0);
- },
- },
- {
- key: 'JS_ExportDeviceConfig',
- value: function (t) {
- return (
- (0, h.default)('body').append(
- '<a id="jsplugin_download_a" href="' +
- t +
- '"><li id="jsplugin_download_li"></li></a>'
- ),
- (0, h.default)('#jsplugin_download_li').trigger(
- 'click'
- ),
- (0, h.default)('#jsplugin_download_a').remove(),
- 0
- );
- },
- },
- {
- key: 'JS_OpenFileBrowser',
- value: function (t, e, n, i, r) {
- p[L] = null;
- var o = window.document.createElement('input');
- (o.type = 'file'),
- 'bmp' === e.toLowerCase() && (o.accept = 'image/bmp'),
- 0 === t && o.setAttribute('webkitdirectory', ''),
- o.addEventListener('change', function () {
- 1 === t
- ? ((p[L] = o.files[0]),
- (n[i] = o.files[0].name),
- r &&
- r.$digest(function () {
- n[i] = o.files[0].name;
- }))
- : 0 === t && (p[L] = o.files);
- });
- var a = document.createEvent('MouseEvents');
- a.initEvent('click', !0, !0), o.dispatchEvent(a);
- },
- },
- {
- key: 'JS_UploadFile',
- value: function (t, e, n, i) {
- var r = 0,
- o = new XMLHttpRequest();
- return (
- (o.onreadystatechange = function () {
- 4 === o.readyState && 200 !== o.status && (r = -1);
- }),
- o.open('put', t, !1),
- o.setRequestHeader('Content-Type', i),
- o.send(p[L]),
- r
- );
- },
- },
- {
- key: 'JS_StartAsynUpload',
- value: function (t) {
- var e = new XMLHttpRequest();
- return (
- (e.onreadystatechange = function () {
- 4 === e.readyState && (p[N] = e.responseText);
- }),
- e.open('put', t, !0),
- e.send(p[L]),
- 0
- );
- },
- },
- {
- key: 'JS_StopAsynUpload',
- value: function () {
- (p[L] = null), (p[N] = '');
- },
- },
- {
- key: 'JS_GetUploadErrorInfo',
- value: function () {
- return 'string' == typeof p[N] && p[N].length > 0
- ? p[N]
- : '';
- },
- },
- {
- key: 'JS_StartUpgradeEx',
- value: function (t, e) {
- var n = new Promise(function (n, i) {
- if (!t) return i(), y;
- if (!e) return i(), y;
- p[N] = 0;
- var r = new XMLHttpRequest();
- (r.onreadystatechange = function () {
- if (4 === r.readyState)
- if (200 === r.status) (p[N] = 100), n();
- else {
- p[N] = 1;
- var t = a.oTool.parseXmlFromStr(r.responseText);
- 'lowPrivilege' ===
- (0, h.default)(t)
- .find('subStatusCode')
- .text()
- ? i(403)
- : i();
- }
- }),
- r.open('put', t, !0),
- r.send(p[L]),
- (p[q] = e),
- setTimeout(function () {
- n();
- }, 3e3);
- });
- return n;
- },
- },
- {
- key: 'JS_UpgradeStatus',
- value: function () {
- return 100 === p[N] ? 0 : p[N];
- },
- },
- {
- key: 'JS_UpgradeProgress',
- value: function () {
- var t = 0,
- e = new XMLHttpRequest();
- return (
- (e.onreadystatechange = function () {
- 4 === e.readyState &&
- 200 === e.status &&
- (t = parseInt(
- (0, h.default)(
- a.oTool.parseXmlFromStr(e.responseText)
- )
- .find('percent')
- .text(),
- 10
- ));
- }),
- e.open('get', p[q], !1),
- e.send(null),
- 100 === p[N] ? 100 : t
- );
- },
- },
- {
- key: 'JS_StopUpgrade',
- value: function () {
- return (p[L] = null), 0;
- },
- },
- {
- key: 'JS_ExportDeviceLog',
- value: function (t, e) {
- function n(t) {
- a.push(t);
- var e = t.slice('');
- if (/^[\u4e00-\u9fa5]/.test(t))
- for (var n = 0; n < 30 - 2 * e.length; n++)
- a.push(' ');
- else
- for (var i = 0; i < 30 - e.length; i++) a.push(' ');
- }
- e = 'Log.txt';
- var i = [],
- r = [];
- i = i.concat(
- (0, h.default)(t)
- .find('searchMatchItem')
- .toArray()
- );
- for (var o = 0; o < i.length; o++)
- (r[o] = []),
- (r[o][0] = (0, h.default)(i[o])
- .find('logtime')
- .text()
- .replace('T', ' ')
- .replace('Z', '')),
- (r[o][1] = (0, h.default)(i[o])
- .find('majortype')
- .text()),
- (r[o][2] = (0, h.default)(i[o])
- .find('minortype')
- .text()),
- (r[o][3] = (0, h.default)(i[o])
- .find('channelid')
- .text()),
- (r[o][4] = (0, h.default)(i[o])
- .find('userName')
- .text()),
- (r[o][5] = (0, h.default)(i[o])
- .find('remoteaddress')
- .text());
- var a = [];
- n(' '),
- n(
- (0, h.default)(t)
- .find('laLogTime')
- .text()
- ),
- n(
- (0, h.default)(t)
- .find('laLogMajorType')
- .text()
- ),
- n(
- (0, h.default)(t)
- .find('laLogMinorType')
- .text()
- ),
- n(
- (0, h.default)(t)
- .find('laLogChannel')
- .text()
- ),
- n(
- (0, h.default)(t)
- .find('laLogRemoteUser')
- .text()
- ),
- n(
- (0, h.default)(t)
- .find('laLogRemoteIP')
- .text()
- ),
- a.push('\r\n');
- for (var s = 0; s < r.length; s++) {
- var u = (s + 1).toString();
- n(u);
- for (var l = 0; l < 6; l++) n(r[s][l]);
- a.push('\r\n');
- }
- a = a.join('');
- var f = new Blob([a], {type: 'text/plain'}),
- c = (window.URL || window.webkitURL).createObjectURL(
- f
- ),
- d = window.document.createElement('a');
- (d.href = c), (d.download = e);
- var p = document.createEvent('MouseEvents');
- p.initEvent('click', !0, !0), d.dispatchEvent(p);
- },
- },
- {
- key: 'JS_GetWndContainer',
- value: function (t) {
- return t < 0 || 'undefined' == typeof t || null === t
- ? -1
- : D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(t)[0];
- },
- },
- {
- key: 'JS_GetWndStatus',
- value: function (t) {
- if (t < 0 || 'undefined' == typeof t || null === t)
- return -1;
- var e = {
- bPlay: this[I][t].bPlay,
- bSound: this[E] === t,
- bSelect: this[I][t].bSelect,
- iRate: this[I][t].iRate,
- };
- return e;
- },
- },
- {
- key: 'JS_SelectWnd',
- value: function (t) {
- D.find('.parent-wnd')
- .eq(0)
- .children()
- .eq(t)
- .mousedown();
- },
- },
- ]),
- n
- );
- })();
- return W;
- }
- })();
- e.JSPlugin = d;
- },
- function (t, e, n) {
- var i, r;
- (function (t) {
- 'use strict';
- var n =
- 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
- ? function (t) {
- return typeof t;
- }
- : function (t) {
- return t &&
- 'function' == typeof Symbol &&
- t.constructor === Symbol &&
- t !== Symbol.prototype
- ? 'symbol'
- : typeof t;
- }; /*!
- * jQuery JavaScript Library v3.2.1
- * https://jquery.com/
- *
- * Includes Sizzle.js
- * https://sizzlejs.com/
- *
- * Copyright JS Foundation and other contributors
- * Released under the MIT license
- * https://jquery.org/license
- *
- * Date: 2017-03-20T18:59Z
- */
- !(function (e, i) {
- 'object' === n(t) && 'object' === n(t.exports)
- ? (t.exports = e.document
- ? i(e, !0)
- : function (t) {
- if (!t.document)
- throw new Error(
- 'jQuery requires a window with a document'
- );
- return i(t);
- })
- : i(e);
- })('undefined' != typeof window ? window : void 0, function (o, a) {
- function s(t, e) {
- e = e || st;
- var n = e.createElement('script');
- (n.text = t), e.head.appendChild(n).parentNode.removeChild(n);
- }
- function u(t) {
- var e = !!t && 'length' in t && t.length,
- n = bt.type(t);
- return (
- 'function' !== n &&
- !bt.isWindow(t) &&
- ('array' === n ||
- 0 === e ||
- ('number' == typeof e && e > 0 && e - 1 in t))
- );
- }
- function l(t, e) {
- return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase();
- }
- function f(t, e, n) {
- return bt.isFunction(e)
- ? bt.grep(t, function (t, i) {
- return !!e.call(t, i, t) !== n;
- })
- : e.nodeType
- ? bt.grep(t, function (t) {
- return (t === e) !== n;
- })
- : 'string' != typeof e
- ? bt.grep(t, function (t) {
- return ht.call(e, t) > -1 !== n;
- })
- : Rt.test(e)
- ? bt.filter(e, t, n)
- : ((e = bt.filter(e, t)),
- bt.grep(t, function (t) {
- return ht.call(e, t) > -1 !== n && 1 === t.nodeType;
- }));
- }
- function c(t, e) {
- for (; (t = t[e]) && 1 !== t.nodeType;) ;
- return t;
- }
- function h(t) {
- var e = {};
- return (
- bt.each(t.match(Ot) || [], function (t, n) {
- e[n] = !0;
- }),
- e
- );
- }
- function d(t) {
- return t;
- }
- function p(t) {
- throw t;
- }
- function y(t, e, n, i) {
- var r;
- try {
- t && bt.isFunction((r = t.promise))
- ? r
- .call(t)
- .done(e)
- .fail(n)
- : t && bt.isFunction((r = t.then))
- ? r.call(t, e, n)
- : e.apply(void 0, [t].slice(i));
- } catch (t) {
- n.apply(void 0, [t]);
- }
- }
- function m() {
- st.removeEventListener('DOMContentLoaded', m),
- o.removeEventListener('load', m),
- bt.ready();
- }
- function v() {
- this.expando = bt.expando + v.uid++;
- }
- function g(t) {
- return (
- 'true' === t ||
- ('false' !== t &&
- ('null' === t
- ? null
- : t === +t + ''
- ? +t
- : Wt.test(t)
- ? JSON.parse(t)
- : t))
- );
- }
- function S(t, e, n) {
- var i;
- if (void 0 === n && 1 === t.nodeType)
- if (
- ((i = 'data-' + e.replace(Ut, '-$&').toLowerCase()),
- (n = t.getAttribute(i)),
- 'string' == typeof n)
- ) {
- try {
- n = g(n);
- } catch (t) {
- }
- jt.set(t, e, n);
- } else n = void 0;
- return n;
- }
- function b(t, e, n, i) {
- var r,
- o = 1,
- a = 20,
- s = i
- ? function () {
- return i.cur();
- }
- : function () {
- return bt.css(t, e, '');
- },
- u = s(),
- l = (n && n[3]) || (bt.cssNumber[e] ? '' : 'px'),
- f =
- (bt.cssNumber[e] || ('px' !== l && +u)) &&
- Vt.exec(bt.css(t, e));
- if (f && f[3] !== l) {
- (l = l || f[3]), (n = n || []), (f = +u || 1);
- do (o = o || '.5'), (f /= o), bt.style(t, e, f + l);
- while (o !== (o = s() / u) && 1 !== o && --a);
- }
- return (
- n &&
- ((f = +f || +u || 0),
- (r = n[1] ? f + (n[1] + 1) * n[2] : +n[2]),
- i && ((i.unit = l), (i.start = f), (i.end = r))),
- r
- );
- }
- function w(t) {
- var e,
- n = t.ownerDocument,
- i = t.nodeName,
- r = $t[i];
- return r
- ? r
- : ((e = n.body.appendChild(n.createElement(i))),
- (r = bt.css(e, 'display')),
- e.parentNode.removeChild(e),
- 'none' === r && (r = 'block'),
- ($t[i] = r),
- r);
- }
- function _(t, e) {
- for (var n, i, r = [], o = 0, a = t.length; o < a; o++)
- (i = t[o]),
- i.style &&
- ((n = i.style.display),
- e
- ? ('none' === n &&
- ((r[o] = Ht.get(i, 'display') || null),
- r[o] || (i.style.display = '')),
- '' === i.style.display && Xt(i) && (r[o] = w(i)))
- : 'none' !== n &&
- ((r[o] = 'none'), Ht.set(i, 'display', n)));
- for (o = 0; o < a; o++) null != r[o] && (t[o].style.display = r[o]);
- return t;
- }
- function P(t, e) {
- var n;
- return (
- (n =
- 'undefined' != typeof t.getElementsByTagName
- ? t.getElementsByTagName(e || '*')
- : 'undefined' != typeof t.querySelectorAll
- ? t.querySelectorAll(e || '*')
- : []),
- void 0 === e || (e && l(t, e)) ? bt.merge([t], n) : n
- );
- }
- function C(t, e) {
- for (var n = 0, i = t.length; n < i; n++)
- Ht.set(t[n], 'globalEval', !e || Ht.get(e[n], 'globalEval'));
- }
- function x(t, e, n, i, r) {
- for (
- var o,
- a,
- s,
- u,
- l,
- f,
- c = e.createDocumentFragment(),
- h = [],
- d = 0,
- p = t.length;
- d < p;
- d++
- )
- if (((o = t[d]), o || 0 === o))
- if ('object' === bt.type(o)) bt.merge(h, o.nodeType ? [o] : o);
- else if (ee.test(o)) {
- for (
- a = a || c.appendChild(e.createElement('div')),
- s = (Zt.exec(o) || ['', ''])[1].toLowerCase(),
- u = te[s] || te._default,
- a.innerHTML = u[1] + bt.htmlPrefilter(o) + u[2],
- f = u[0];
- f--;
- )
- a = a.lastChild;
- bt.merge(h, a.childNodes),
- (a = c.firstChild),
- (a.textContent = '');
- } else h.push(e.createTextNode(o));
- for (c.textContent = '', d = 0; (o = h[d++]);)
- if (i && bt.inArray(o, i) > -1) r && r.push(o);
- else if (
- ((l = bt.contains(o.ownerDocument, o)),
- (a = P(c.appendChild(o), 'script')),
- l && C(a),
- n)
- )
- for (f = 0; (o = a[f++]);) Qt.test(o.type || '') && n.push(o);
- return c;
- }
- function T() {
- return !0;
- }
- function k() {
- return !1;
- }
- function D() {
- try {
- return st.activeElement;
- } catch (t) {
- }
- }
- function M(t, e, i, r, o, a) {
- var s, u;
- if ('object' === ('undefined' == typeof e ? 'undefined' : n(e))) {
- 'string' != typeof i && ((r = r || i), (i = void 0));
- for (u in e) M(t, u, i, r, e[u], a);
- return t;
- }
- if (
- (null == r && null == o
- ? ((o = i), (r = i = void 0))
- : null == o &&
- ('string' == typeof i
- ? ((o = r), (r = void 0))
- : ((o = r), (r = i), (i = void 0))),
- o === !1)
- )
- o = k;
- else if (!o) return t;
- return (
- 1 === a &&
- ((s = o),
- (o = function (t) {
- return bt().off(t), s.apply(this, arguments);
- }),
- (o.guid = s.guid || (s.guid = bt.guid++))),
- t.each(function () {
- bt.event.add(this, e, o, r, i);
- })
- );
- }
- function R(t, e) {
- return l(t, 'table') &&
- l(11 !== e.nodeType ? e : e.firstChild, 'tr')
- ? bt('>tbody', t)[0] || t
- : t;
- }
- function E(t) {
- return (
- (t.type = (null !== t.getAttribute('type')) + '/' + t.type), t
- );
- }
- function z(t) {
- var e = le.exec(t.type);
- return e ? (t.type = e[1]) : t.removeAttribute('type'), t;
- }
- function I(t, e) {
- var n, i, r, o, a, s, u, l;
- if (1 === e.nodeType) {
- if (
- Ht.hasData(t) &&
- ((o = Ht.access(t)), (a = Ht.set(e, o)), (l = o.events))
- ) {
- delete a.handle, (a.events = {});
- for (r in l)
- for (n = 0, i = l[r].length; n < i; n++)
- bt.event.add(e, r, l[r][n]);
- }
- jt.hasData(t) &&
- ((s = jt.access(t)), (u = bt.extend({}, s)), jt.set(e, u));
- }
- }
- function A(t, e) {
- var n = e.nodeName.toLowerCase();
- 'input' === n && Kt.test(t.type)
- ? (e.checked = t.checked)
- : ('input' !== n && 'textarea' !== n) ||
- (e.defaultValue = t.defaultValue);
- }
- function F(t, e, n, i) {
- e = ft.apply([], e);
- var r,
- o,
- a,
- u,
- l,
- f,
- c = 0,
- h = t.length,
- d = h - 1,
- p = e[0],
- y = bt.isFunction(p);
- if (
- y ||
- (h > 1 && 'string' == typeof p && !gt.checkClone && ue.test(p))
- )
- return t.each(function (r) {
- var o = t.eq(r);
- y && (e[0] = p.call(this, r, o.html())), F(o, e, n, i);
- });
- if (
- h &&
- ((r = x(e, t[0].ownerDocument, !1, t, i)),
- (o = r.firstChild),
- 1 === r.childNodes.length && (r = o),
- o || i)
- ) {
- for (a = bt.map(P(r, 'script'), E), u = a.length; c < h; c++)
- (l = r),
- c !== d &&
- ((l = bt.clone(l, !0, !0)),
- u && bt.merge(a, P(l, 'script'))),
- n.call(t[c], l, c);
- if (u)
- for (
- f = a[a.length - 1].ownerDocument, bt.map(a, z), c = 0;
- c < u;
- c++
- )
- (l = a[c]),
- Qt.test(l.type || '') &&
- !Ht.access(l, 'globalEval') &&
- bt.contains(f, l) &&
- (l.src
- ? bt._evalUrl && bt._evalUrl(l.src)
- : s(l.textContent.replace(fe, ''), f));
- }
- return t;
- }
- function O(t, e, n) {
- for (
- var i, r = e ? bt.filter(e, t) : t, o = 0;
- null != (i = r[o]);
- o++
- )
- n || 1 !== i.nodeType || bt.cleanData(P(i)),
- i.parentNode &&
- (n && bt.contains(i.ownerDocument, i) && C(P(i, 'script')),
- i.parentNode.removeChild(i));
- return t;
- }
- function B(t, e, n) {
- var i,
- r,
- o,
- a,
- s = t.style;
- return (
- (n = n || de(t)),
- n &&
- ((a = n.getPropertyValue(e) || n[e]),
- '' !== a ||
- bt.contains(t.ownerDocument, t) ||
- (a = bt.style(t, e)),
- !gt.pixelMarginRight() &&
- he.test(a) &&
- ce.test(e) &&
- ((i = s.width),
- (r = s.minWidth),
- (o = s.maxWidth),
- (s.minWidth = s.maxWidth = s.width = a),
- (a = n.width),
- (s.width = i),
- (s.minWidth = r),
- (s.maxWidth = o))),
- void 0 !== a ? a + '' : a
- );
- }
- function L(t, e) {
- return {
- get: function () {
- return t()
- ? void delete this.get
- : (this.get = e).apply(this, arguments);
- },
- };
- }
- function N(t) {
- if (t in Se) return t;
- for (var e = t[0].toUpperCase() + t.slice(1), n = ge.length; n--;)
- if (((t = ge[n] + e), t in Se)) return t;
- }
- function q(t) {
- var e = bt.cssProps[t];
- return e || (e = bt.cssProps[t] = N(t) || t), e;
- }
- function H(t, e, n) {
- var i = Vt.exec(e);
- return i ? Math.max(0, i[2] - (n || 0)) + (i[3] || 'px') : e;
- }
- function j(t, e, n, i, r) {
- var o,
- a = 0;
- for (
- o = n === (i ? 'border' : 'content') ? 4 : 'width' === e ? 1 : 0;
- o < 4;
- o += 2
- )
- 'margin' === n && (a += bt.css(t, n + Yt[o], !0, r)),
- i
- ? ('content' === n &&
- (a -= bt.css(t, 'padding' + Yt[o], !0, r)),
- 'margin' !== n &&
- (a -= bt.css(t, 'border' + Yt[o] + 'Width', !0, r)))
- : ((a += bt.css(t, 'padding' + Yt[o], !0, r)),
- 'padding' !== n &&
- (a += bt.css(t, 'border' + Yt[o] + 'Width', !0, r)));
- return a;
- }
- function W(t, e, n) {
- var i,
- r = de(t),
- o = B(t, e, r),
- a = 'border-box' === bt.css(t, 'boxSizing', !1, r);
- return he.test(o)
- ? o
- : ((i = a && (gt.boxSizingReliable() || o === t.style[e])),
- 'auto' === o &&
- (o = t['offset' + e[0].toUpperCase() + e.slice(1)]),
- (o = parseFloat(o) || 0),
- o + j(t, e, n || (a ? 'border' : 'content'), i, r) + 'px');
- }
- function U(t, e, n, i, r) {
- return new U.prototype.init(t, e, n, i, r);
- }
- function G() {
- we &&
- (st.hidden === !1 && o.requestAnimationFrame
- ? o.requestAnimationFrame(G)
- : o.setTimeout(G, bt.fx.interval),
- bt.fx.tick());
- }
- function V() {
- return (
- o.setTimeout(function () {
- be = void 0;
- }),
- (be = bt.now())
- );
- }
- function Y(t, e) {
- var n,
- i = 0,
- r = {height: t};
- for (e = e ? 1 : 0; i < 4; i += 2 - e)
- (n = Yt[i]), (r['margin' + n] = r['padding' + n] = t);
- return e && (r.opacity = r.width = t), r;
- }
- function X(t, e, n) {
- for (
- var i,
- r = (K.tweeners[e] || []).concat(K.tweeners['*']),
- o = 0,
- a = r.length;
- o < a;
- o++
- )
- if ((i = r[o].call(n, e, t))) return i;
- }
- function J(t, e, n) {
- var i,
- r,
- o,
- a,
- s,
- u,
- l,
- f,
- c = 'width' in e || 'height' in e,
- h = this,
- d = {},
- p = t.style,
- y = t.nodeType && Xt(t),
- m = Ht.get(t, 'fxshow');
- n.queue ||
- ((a = bt._queueHooks(t, 'fx')),
- null == a.unqueued &&
- ((a.unqueued = 0),
- (s = a.empty.fire),
- (a.empty.fire = function () {
- a.unqueued || s();
- })),
- a.unqueued++,
- h.always(function () {
- h.always(function () {
- a.unqueued--, bt.queue(t, 'fx').length || a.empty.fire();
- });
- }));
- for (i in e)
- if (((r = e[i]), _e.test(r))) {
- if (
- (delete e[i],
- (o = o || 'toggle' === r),
- r === (y ? 'hide' : 'show'))
- ) {
- if ('show' !== r || !m || void 0 === m[i]) continue;
- y = !0;
- }
- d[i] = (m && m[i]) || bt.style(t, i);
- }
- if (((u = !bt.isEmptyObject(e)), u || !bt.isEmptyObject(d))) {
- c &&
- 1 === t.nodeType &&
- ((n.overflow = [p.overflow, p.overflowX, p.overflowY]),
- (l = m && m.display),
- null == l && (l = Ht.get(t, 'display')),
- (f = bt.css(t, 'display')),
- 'none' === f &&
- (l
- ? (f = l)
- : (_([t], !0),
- (l = t.style.display || l),
- (f = bt.css(t, 'display')),
- _([t]))),
- ('inline' === f || ('inline-block' === f && null != l)) &&
- 'none' === bt.css(t, 'float') &&
- (u ||
- (h.done(function () {
- p.display = l;
- }),
- null == l &&
- ((f = p.display), (l = 'none' === f ? '' : f))),
- (p.display = 'inline-block'))),
- n.overflow &&
- ((p.overflow = 'hidden'),
- h.always(function () {
- (p.overflow = n.overflow[0]),
- (p.overflowX = n.overflow[1]),
- (p.overflowY = n.overflow[2]);
- })),
- (u = !1);
- for (i in d)
- u ||
- (m
- ? 'hidden' in m && (y = m.hidden)
- : (m = Ht.access(t, 'fxshow', {display: l})),
- o && (m.hidden = !y),
- y && _([t], !0),
- h.done(function () {
- y || _([t]), Ht.remove(t, 'fxshow');
- for (i in d) bt.style(t, i, d[i]);
- })),
- (u = X(y ? m[i] : 0, i, h)),
- i in m ||
- ((m[i] = u.start), y && ((u.end = u.start), (u.start = 0)));
- }
- }
- function $(t, e) {
- var n, i, r, o, a;
- for (n in t)
- if (
- ((i = bt.camelCase(n)),
- (r = e[i]),
- (o = t[n]),
- Array.isArray(o) && ((r = o[1]), (o = t[n] = o[0])),
- n !== i && ((t[i] = o), delete t[n]),
- (a = bt.cssHooks[i]),
- a && 'expand' in a)
- ) {
- (o = a.expand(o)), delete t[i];
- for (n in o) n in t || ((t[n] = o[n]), (e[n] = r));
- } else e[i] = r;
- }
- function K(t, e, n) {
- var i,
- r,
- o = 0,
- a = K.prefilters.length,
- s = bt.Deferred().always(function () {
- delete u.elem;
- }),
- u = function () {
- if (r) return !1;
- for (
- var e = be || V(),
- n = Math.max(0, l.startTime + l.duration - e),
- i = n / l.duration || 0,
- o = 1 - i,
- a = 0,
- u = l.tweens.length;
- a < u;
- a++
- )
- l.tweens[a].run(o);
- return (
- s.notifyWith(t, [l, o, n]),
- o < 1 && u
- ? n
- : (u || s.notifyWith(t, [l, 1, 0]),
- s.resolveWith(t, [l]),
- !1)
- );
- },
- l = s.promise({
- elem: t,
- props: bt.extend({}, e),
- opts: bt.extend(
- !0,
- {specialEasing: {}, easing: bt.easing._default},
- n
- ),
- originalProperties: e,
- originalOptions: n,
- startTime: be || V(),
- duration: n.duration,
- tweens: [],
- createTween: function (e, n) {
- var i = bt.Tween(
- t,
- l.opts,
- e,
- n,
- l.opts.specialEasing[e] || l.opts.easing
- );
- return l.tweens.push(i), i;
- },
- stop: function (e) {
- var n = 0,
- i = e ? l.tweens.length : 0;
- if (r) return this;
- for (r = !0; n < i; n++) l.tweens[n].run(1);
- return (
- e
- ? (s.notifyWith(t, [l, 1, 0]), s.resolveWith(t, [l, e]))
- : s.rejectWith(t, [l, e]),
- this
- );
- },
- }),
- f = l.props;
- for ($(f, l.opts.specialEasing); o < a; o++)
- if ((i = K.prefilters[o].call(l, t, f, l.opts)))
- return (
- bt.isFunction(i.stop) &&
- (bt._queueHooks(l.elem, l.opts.queue).stop = bt.proxy(
- i.stop,
- i
- )),
- i
- );
- return (
- bt.map(f, X, l),
- bt.isFunction(l.opts.start) && l.opts.start.call(t, l),
- l
- .progress(l.opts.progress)
- .done(l.opts.done, l.opts.complete)
- .fail(l.opts.fail)
- .always(l.opts.always),
- bt.fx.timer(
- bt.extend(u, {elem: t, anim: l, queue: l.opts.queue})
- ),
- l
- );
- }
- function Z(t) {
- var e = t.match(Ot) || [];
- return e.join(' ');
- }
- function Q(t) {
- return (t.getAttribute && t.getAttribute('class')) || '';
- }
- function tt(t, e, i, r) {
- var o;
- if (Array.isArray(e))
- bt.each(e, function (e, o) {
- i || Ie.test(t)
- ? r(t, o)
- : tt(
- t +
- '[' +
- ('object' ===
- ('undefined' == typeof o ? 'undefined' : n(o)) &&
- null != o
- ? e
- : '') +
- ']',
- o,
- i,
- r
- );
- });
- else if (i || 'object' !== bt.type(e)) r(t, e);
- else for (o in e) tt(t + '[' + o + ']', e[o], i, r);
- }
- function et(t) {
- return function (e, n) {
- 'string' != typeof e && ((n = e), (e = '*'));
- var i,
- r = 0,
- o = e.toLowerCase().match(Ot) || [];
- if (bt.isFunction(n))
- for (; (i = o[r++]);)
- '+' === i[0]
- ? ((i = i.slice(1) || '*'), (t[i] = t[i] || []).unshift(n))
- : (t[i] = t[i] || []).push(n);
- };
- }
- function nt(t, e, n, i) {
- function r(s) {
- var u;
- return (
- (o[s] = !0),
- bt.each(t[s] || [], function (t, s) {
- var l = s(e, n, i);
- return 'string' != typeof l || a || o[l]
- ? a
- ? !(u = l)
- : void 0
- : (e.dataTypes.unshift(l), r(l), !1);
- }),
- u
- );
- }
- var o = {},
- a = t === Ge;
- return r(e.dataTypes[0]) || (!o['*'] && r('*'));
- }
- function it(t, e) {
- var n,
- i,
- r = bt.ajaxSettings.flatOptions || {};
- for (n in e)
- void 0 !== e[n] && ((r[n] ? t : i || (i = {}))[n] = e[n]);
- return i && bt.extend(!0, t, i), t;
- }
- function rt(t, e, n) {
- for (
- var i, r, o, a, s = t.contents, u = t.dataTypes;
- '*' === u[0];
- )
- u.shift(),
- void 0 === i &&
- (i = t.mimeType || e.getResponseHeader('Content-Type'));
- if (i)
- for (r in s)
- if (s[r] && s[r].test(i)) {
- u.unshift(r);
- break;
- }
- if (u[0] in n) o = u[0];
- else {
- for (r in n) {
- if (!u[0] || t.converters[r + ' ' + u[0]]) {
- o = r;
- break;
- }
- a || (a = r);
- }
- o = o || a;
- }
- if (o) return o !== u[0] && u.unshift(o), n[o];
- }
- function ot(t, e, n, i) {
- var r,
- o,
- a,
- s,
- u,
- l = {},
- f = t.dataTypes.slice();
- if (f[1])
- for (a in t.converters) l[a.toLowerCase()] = t.converters[a];
- for (o = f.shift(); o;)
- if (
- (t.responseFields[o] && (n[t.responseFields[o]] = e),
- !u && i && t.dataFilter && (e = t.dataFilter(e, t.dataType)),
- (u = o),
- (o = f.shift()))
- )
- if ('*' === o) o = u;
- else if ('*' !== u && u !== o) {
- if (((a = l[u + ' ' + o] || l['* ' + o]), !a))
- for (r in l)
- if (
- ((s = r.split(' ')),
- s[1] === o && (a = l[u + ' ' + s[0]] || l['* ' + s[0]]))
- ) {
- a === !0
- ? (a = l[r])
- : l[r] !== !0 && ((o = s[0]), f.unshift(s[1]));
- break;
- }
- if (a !== !0)
- if (a && t.throws) e = a(e);
- else
- try {
- e = a(e);
- } catch (t) {
- return {
- state: 'parsererror',
- error: a ? t : 'No conversion from ' + u + ' to ' + o,
- };
- }
- }
- return {state: 'success', data: e};
- }
- var at = [],
- st = o.document,
- ut = Object.getPrototypeOf,
- lt = at.slice,
- ft = at.concat,
- ct = at.push,
- ht = at.indexOf,
- dt = {},
- pt = dt.toString,
- yt = dt.hasOwnProperty,
- mt = yt.toString,
- vt = mt.call(Object),
- gt = {},
- St = '3.2.1',
- bt = function t(e, n) {
- return new t.fn.init(e, n);
- },
- wt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
- _t = /^-ms-/,
- Pt = /-([a-z])/g,
- Ct = function (t, e) {
- return e.toUpperCase();
- };
- (bt.fn = bt.prototype = {
- jquery: St,
- constructor: bt,
- length: 0,
- toArray: function () {
- return lt.call(this);
- },
- get: function (t) {
- return null == t
- ? lt.call(this)
- : t < 0
- ? this[t + this.length]
- : this[t];
- },
- pushStack: function (t) {
- var e = bt.merge(this.constructor(), t);
- return (e.prevObject = this), e;
- },
- each: function (t) {
- return bt.each(this, t);
- },
- map: function (t) {
- return this.pushStack(
- bt.map(this, function (e, n) {
- return t.call(e, n, e);
- })
- );
- },
- slice: function () {
- return this.pushStack(lt.apply(this, arguments));
- },
- first: function () {
- return this.eq(0);
- },
- last: function () {
- return this.eq(-1);
- },
- eq: function (t) {
- var e = this.length,
- n = +t + (t < 0 ? e : 0);
- return this.pushStack(n >= 0 && n < e ? [this[n]] : []);
- },
- end: function () {
- return this.prevObject || this.constructor();
- },
- push: ct,
- sort: at.sort,
- splice: at.splice,
- }),
- (bt.extend = bt.fn.extend = function () {
- var t,
- e,
- i,
- r,
- o,
- a,
- s = arguments[0] || {},
- u = 1,
- l = arguments.length,
- f = !1;
- for (
- 'boolean' == typeof s &&
- ((f = s), (s = arguments[u] || {}), u++),
- 'object' === ('undefined' == typeof s ? 'undefined' : n(s)) ||
- bt.isFunction(s) ||
- (s = {}),
- u === l && ((s = this), u--);
- u < l;
- u++
- )
- if (null != (t = arguments[u]))
- for (e in t)
- (i = s[e]),
- (r = t[e]),
- s !== r &&
- (f &&
- r &&
- (bt.isPlainObject(r) || (o = Array.isArray(r)))
- ? (o
- ? ((o = !1), (a = i && Array.isArray(i) ? i : []))
- : (a = i && bt.isPlainObject(i) ? i : {}),
- (s[e] = bt.extend(f, a, r)))
- : void 0 !== r && (s[e] = r));
- return s;
- }),
- bt.extend({
- expando: 'jQuery' + (St + Math.random()).replace(/\D/g, ''),
- isReady: !0,
- error: function (t) {
- throw new Error(t);
- },
- noop: function () {
- },
- isFunction: function (t) {
- return 'function' === bt.type(t);
- },
- isWindow: function (t) {
- return null != t && t === t.window;
- },
- isNumeric: function (t) {
- var e = bt.type(t);
- return (
- ('number' === e || 'string' === e) &&
- !isNaN(t - parseFloat(t))
- );
- },
- isPlainObject: function (t) {
- var e, n;
- return (
- !(!t || '[object Object]' !== pt.call(t)) &&
- (!(e = ut(t)) ||
- ((n = yt.call(e, 'constructor') && e.constructor),
- 'function' == typeof n && mt.call(n) === vt))
- );
- },
- isEmptyObject: function (t) {
- var e;
- for (e in t) return !1;
- return !0;
- },
- type: function (t) {
- return null == t
- ? t + ''
- : 'object' ===
- ('undefined' == typeof t ? 'undefined' : n(t)) ||
- 'function' == typeof t
- ? dt[pt.call(t)] || 'object'
- : 'undefined' == typeof t
- ? 'undefined'
- : n(t);
- },
- globalEval: function (t) {
- s(t);
- },
- camelCase: function (t) {
- return t.replace(_t, 'ms-').replace(Pt, Ct);
- },
- each: function (t, e) {
- var n,
- i = 0;
- if (u(t))
- for (
- n = t.length;
- i < n && e.call(t[i], i, t[i]) !== !1;
- i++
- ) ;
- else for (i in t) if (e.call(t[i], i, t[i]) === !1) break;
- return t;
- },
- trim: function (t) {
- return null == t ? '' : (t + '').replace(wt, '');
- },
- makeArray: function (t, e) {
- var n = e || [];
- return (
- null != t &&
- (u(Object(t))
- ? bt.merge(n, 'string' == typeof t ? [t] : t)
- : ct.call(n, t)),
- n
- );
- },
- inArray: function (t, e, n) {
- return null == e ? -1 : ht.call(e, t, n);
- },
- merge: function (t, e) {
- for (var n = +e.length, i = 0, r = t.length; i < n; i++)
- t[r++] = e[i];
- return (t.length = r), t;
- },
- grep: function (t, e, n) {
- for (var i, r = [], o = 0, a = t.length, s = !n; o < a; o++)
- (i = !e(t[o], o)), i !== s && r.push(t[o]);
- return r;
- },
- map: function (t, e, n) {
- var i,
- r,
- o = 0,
- a = [];
- if (u(t))
- for (i = t.length; o < i; o++)
- (r = e(t[o], o, n)), null != r && a.push(r);
- else for (o in t) (r = e(t[o], o, n)), null != r && a.push(r);
- return ft.apply([], a);
- },
- guid: 1,
- proxy: function t(e, n) {
- var i, r, t;
- if (
- ('string' == typeof n && ((i = e[n]), (n = e), (e = i)),
- bt.isFunction(e))
- )
- return (
- (r = lt.call(arguments, 2)),
- (t = function () {
- return e.apply(n || this, r.concat(lt.call(arguments)));
- }),
- (t.guid = e.guid = e.guid || bt.guid++),
- t
- );
- },
- now: Date.now,
- support: gt,
- }),
- 'function' == typeof Symbol &&
- (bt.fn[Symbol.iterator] = at[Symbol.iterator]),
- bt.each(
- 'Boolean Number String Function Array Date RegExp Object Error Symbol'.split(
- ' '
- ),
- function (t, e) {
- dt['[object ' + e + ']'] = e.toLowerCase();
- }
- );
- var xt /*!
- * Sizzle CSS Selector Engine v2.3.3
- * https://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2016-08-08
- */ = (function (
- t
- ) {
- function e(t, e, n, i) {
- var r,
- o,
- a,
- s,
- u,
- l,
- f,
- h = e && e.ownerDocument,
- p = e ? e.nodeType : 9;
- if (
- ((n = n || []),
- 'string' != typeof t || !t || (1 !== p && 9 !== p && 11 !== p))
- )
- return n;
- if (
- !i &&
- ((e ? e.ownerDocument || e : H) !== I && z(e), (e = e || I), F)
- ) {
- if (11 !== p && (u = vt.exec(t)))
- if ((r = u[1])) {
- if (9 === p) {
- if (!(a = e.getElementById(r))) return n;
- if (a.id === r) return n.push(a), n;
- } else if (
- h &&
- (a = h.getElementById(r)) &&
- N(e, a) &&
- a.id === r
- )
- return n.push(a), n;
- } else {
- if (u[2]) return Z.apply(n, e.getElementsByTagName(t)), n;
- if (
- (r = u[3]) &&
- _.getElementsByClassName &&
- e.getElementsByClassName
- )
- return Z.apply(n, e.getElementsByClassName(r)), n;
- }
- if (_.qsa && !V[t + ' '] && (!O || !O.test(t))) {
- if (1 !== p) (h = e), (f = t);
- else if ('object' !== e.nodeName.toLowerCase()) {
- for (
- (s = e.getAttribute('id'))
- ? (s = s.replace(wt, _t))
- : e.setAttribute('id', (s = q)),
- l = T(t),
- o = l.length;
- o--;
- )
- l[o] = '#' + s + ' ' + d(l[o]);
- (f = l.join(',')),
- (h = (gt.test(t) && c(e.parentNode)) || e);
- }
- if (f)
- try {
- return Z.apply(n, h.querySelectorAll(f)), n;
- } catch (t) {
- } finally {
- s === q && e.removeAttribute('id');
- }
- }
- }
- return D(t.replace(st, '$1'), e, n, i);
- }
- function n() {
- function t(n, i) {
- return (
- e.push(n + ' ') > P.cacheLength && delete t[e.shift()],
- (t[n + ' '] = i)
- );
- }
- var e = [];
- return t;
- }
- function i(t) {
- return (t[q] = !0), t;
- }
- function r(t) {
- var e = I.createElement('fieldset');
- try {
- return !!t(e);
- } catch (t) {
- return !1;
- } finally {
- e.parentNode && e.parentNode.removeChild(e), (e = null);
- }
- }
- function o(t, e) {
- for (var n = t.split('|'), i = n.length; i--;)
- P.attrHandle[n[i]] = e;
- }
- function a(t, e) {
- var n = e && t,
- i =
- n &&
- 1 === t.nodeType &&
- 1 === e.nodeType &&
- t.sourceIndex - e.sourceIndex;
- if (i) return i;
- if (n) for (; (n = n.nextSibling);) if (n === e) return -1;
- return t ? 1 : -1;
- }
- function s(t) {
- return function (e) {
- var n = e.nodeName.toLowerCase();
- return 'input' === n && e.type === t;
- };
- }
- function u(t) {
- return function (e) {
- var n = e.nodeName.toLowerCase();
- return ('input' === n || 'button' === n) && e.type === t;
- };
- }
- function l(t) {
- return function (e) {
- return 'form' in e
- ? e.parentNode && e.disabled === !1
- ? 'label' in e
- ? 'label' in e.parentNode
- ? e.parentNode.disabled === t
- : e.disabled === t
- : e.isDisabled === t ||
- (e.isDisabled !== !t && Ct(e) === t)
- : e.disabled === t
- : 'label' in e && e.disabled === t;
- };
- }
- function f(t) {
- return i(function (e) {
- return (
- (e = +e),
- i(function (n, i) {
- for (var r, o = t([], n.length, e), a = o.length; a--;)
- n[(r = o[a])] && (n[r] = !(i[r] = n[r]));
- })
- );
- });
- }
- function c(t) {
- return t && 'undefined' != typeof t.getElementsByTagName && t;
- }
- function h() {
- }
- function d(t) {
- for (var e = 0, n = t.length, i = ''; e < n; e++) i += t[e].value;
- return i;
- }
- function p(t, e, n) {
- var i = e.dir,
- r = e.next,
- o = r || i,
- a = n && 'parentNode' === o,
- s = W++;
- return e.first
- ? function (e, n, r) {
- for (; (e = e[i]);)
- if (1 === e.nodeType || a) return t(e, n, r);
- return !1;
- }
- : function (e, n, u) {
- var l,
- f,
- c,
- h = [j, s];
- if (u) {
- for (; (e = e[i]);)
- if ((1 === e.nodeType || a) && t(e, n, u)) return !0;
- } else
- for (; (e = e[i]);)
- if (1 === e.nodeType || a)
- if (
- ((c = e[q] || (e[q] = {})),
- (f = c[e.uniqueID] || (c[e.uniqueID] = {})),
- r && r === e.nodeName.toLowerCase())
- )
- e = e[i] || e;
- else {
- if ((l = f[o]) && l[0] === j && l[1] === s)
- return (h[2] = l[2]);
- if (((f[o] = h), (h[2] = t(e, n, u)))) return !0;
- }
- return !1;
- };
- }
- function y(t) {
- return t.length > 1
- ? function (e, n, i) {
- for (var r = t.length; r--;) if (!t[r](e, n, i)) return !1;
- return !0;
- }
- : t[0];
- }
- function m(t, n, i) {
- for (var r = 0, o = n.length; r < o; r++) e(t, n[r], i);
- return i;
- }
- function v(t, e, n, i, r) {
- for (
- var o, a = [], s = 0, u = t.length, l = null != e;
- s < u;
- s++
- )
- (o = t[s]) &&
- ((n && !n(o, i, r)) || (a.push(o), l && e.push(s)));
- return a;
- }
- function g(t, e, n, r, o, a) {
- return (
- r && !r[q] && (r = g(r)),
- o && !o[q] && (o = g(o, a)),
- i(function (i, a, s, u) {
- var l,
- f,
- c,
- h = [],
- d = [],
- p = a.length,
- y = i || m(e || '*', s.nodeType ? [s] : s, []),
- g = !t || (!i && e) ? y : v(y, h, t, s, u),
- S = n ? (o || (i ? t : p || r) ? [] : a) : g;
- if ((n && n(g, S, s, u), r))
- for (l = v(S, d), r(l, [], s, u), f = l.length; f--;)
- (c = l[f]) && (S[d[f]] = !(g[d[f]] = c));
- if (i) {
- if (o || t) {
- if (o) {
- for (l = [], f = S.length; f--;)
- (c = S[f]) && l.push((g[f] = c));
- o(null, (S = []), l, u);
- }
- for (f = S.length; f--;)
- (c = S[f]) &&
- (l = o ? tt(i, c) : h[f]) > -1 &&
- (i[l] = !(a[l] = c));
- }
- } else (S = v(S === a ? S.splice(p, S.length) : S)), o ? o(null, a, S, u) : Z.apply(a, S);
- })
- );
- }
- function S(t) {
- for (
- var e,
- n,
- i,
- r = t.length,
- o = P.relative[t[0].type],
- a = o || P.relative[' '],
- s = o ? 1 : 0,
- u = p(
- function (t) {
- return t === e;
- },
- a,
- !0
- ),
- l = p(
- function (t) {
- return tt(e, t) > -1;
- },
- a,
- !0
- ),
- f = [
- function (t, n, i) {
- var r =
- (!o && (i || n !== M)) ||
- ((e = n).nodeType ? u(t, n, i) : l(t, n, i));
- return (e = null), r;
- },
- ];
- s < r;
- s++
- )
- if ((n = P.relative[t[s].type])) f = [p(y(f), n)];
- else {
- if (
- ((n = P.filter[t[s].type].apply(null, t[s].matches)), n[q])
- ) {
- for (i = ++s; i < r && !P.relative[t[i].type]; i++) ;
- return g(
- s > 1 && y(f),
- s > 1 &&
- d(
- t
- .slice(0, s - 1)
- .concat({value: ' ' === t[s - 2].type ? '*' : ''})
- ).replace(st, '$1'),
- n,
- s < i && S(t.slice(s, i)),
- i < r && S((t = t.slice(i))),
- i < r && d(t)
- );
- }
- f.push(n);
- }
- return y(f);
- }
- function b(t, n) {
- var r = n.length > 0,
- o = t.length > 0,
- a = function (i, a, s, u, l) {
- var f,
- c,
- h,
- d = 0,
- p = '0',
- y = i && [],
- m = [],
- g = M,
- S = i || (o && P.find.TAG('*', l)),
- b = (j += null == g ? 1 : Math.random() || 0.1),
- w = S.length;
- for (
- l && (M = a === I || a || l);
- p !== w && null != (f = S[p]);
- p++
- ) {
- if (o && f) {
- for (
- c = 0, a || f.ownerDocument === I || (z(f), (s = !F));
- (h = t[c++]);
- )
- if (h(f, a || I, s)) {
- u.push(f);
- break;
- }
- l && (j = b);
- }
- r && ((f = !h && f) && d--, i && y.push(f));
- }
- if (((d += p), r && p !== d)) {
- for (c = 0; (h = n[c++]);) h(y, m, a, s);
- if (i) {
- if (d > 0)
- for (; p--;) y[p] || m[p] || (m[p] = $.call(u));
- m = v(m);
- }
- Z.apply(u, m),
- l &&
- !i &&
- m.length > 0 &&
- d + n.length > 1 &&
- e.uniqueSort(u);
- }
- return l && ((j = b), (M = g)), y;
- };
- return r ? i(a) : a;
- }
- var w,
- _,
- P,
- C,
- x,
- T,
- k,
- D,
- M,
- R,
- E,
- z,
- I,
- A,
- F,
- O,
- B,
- L,
- N,
- q = 'sizzle' + 1 * new Date(),
- H = t.document,
- j = 0,
- W = 0,
- U = n(),
- G = n(),
- V = n(),
- Y = function (t, e) {
- return t === e && (E = !0), 0;
- },
- X = {}.hasOwnProperty,
- J = [],
- $ = J.pop,
- K = J.push,
- Z = J.push,
- Q = J.slice,
- tt = function (t, e) {
- for (var n = 0, i = t.length; n < i; n++)
- if (t[n] === e) return n;
- return -1;
- },
- et =
- 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',
- nt = '[\\x20\\t\\r\\n\\f]',
- it = '(?:\\\\.|[\\w-]|[^\0-\\xa0])+',
- rt =
- '\\[' +
- nt +
- '*(' +
- it +
- ')(?:' +
- nt +
- '*([*^$|!~]?=)' +
- nt +
- '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' +
- it +
- '))|)' +
- nt +
- '*\\]',
- ot =
- ':(' +
- it +
- ')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' +
- rt +
- ')*)|.*)\\)|)',
- at = new RegExp(nt + '+', 'g'),
- st = new RegExp(
- '^' + nt + '+|((?:^|[^\\\\])(?:\\\\.)*)' + nt + '+$',
- 'g'
- ),
- ut = new RegExp('^' + nt + '*,' + nt + '*'),
- lt = new RegExp('^' + nt + '*([>+~]|' + nt + ')' + nt + '*'),
- ft = new RegExp('=' + nt + '*([^\\]\'"]*?)' + nt + '*\\]', 'g'),
- ct = new RegExp(ot),
- ht = new RegExp('^' + it + '$'),
- dt = {
- ID: new RegExp('^#(' + it + ')'),
- CLASS: new RegExp('^\\.(' + it + ')'),
- TAG: new RegExp('^(' + it + '|[*])'),
- ATTR: new RegExp('^' + rt),
- PSEUDO: new RegExp('^' + ot),
- CHILD: new RegExp(
- '^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' +
- nt +
- '*(even|odd|(([+-]|)(\\d*)n|)' +
- nt +
- '*(?:([+-]|)' +
- nt +
- '*(\\d+)|))' +
- nt +
- '*\\)|)',
- 'i'
- ),
- bool: new RegExp('^(?:' + et + ')$', 'i'),
- needsContext: new RegExp(
- '^' +
- nt +
- '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' +
- nt +
- '*((?:-\\d)?\\d*)' +
- nt +
- '*\\)|)(?=[^-]|$)',
- 'i'
- ),
- },
- pt = /^(?:input|select|textarea|button)$/i,
- yt = /^h\d$/i,
- mt = /^[^{]+\{\s*\[native \w/,
- vt = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
- gt = /[+~]/,
- St = new RegExp(
- '\\\\([\\da-f]{1,6}' + nt + '?|(' + nt + ')|.)',
- 'ig'
- ),
- bt = function (t, e, n) {
- var i = '0x' + e - 65536;
- return i !== i || n
- ? e
- : i < 0
- ? String.fromCharCode(i + 65536)
- : String.fromCharCode(
- (i >> 10) | 55296,
- (1023 & i) | 56320
- );
- },
- wt = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
- _t = function (t, e) {
- return e
- ? '\0' === t
- ? '�'
- : t.slice(0, -1) +
- '\\' +
- t.charCodeAt(t.length - 1).toString(16) +
- ' '
- : '\\' + t;
- },
- Pt = function () {
- z();
- },
- Ct = p(
- function (t) {
- return t.disabled === !0 && ('form' in t || 'label' in t);
- },
- {dir: 'parentNode', next: 'legend'}
- );
- try {
- Z.apply((J = Q.call(H.childNodes)), H.childNodes),
- J[H.childNodes.length].nodeType;
- } catch (t) {
- Z = {
- apply: J.length
- ? function (t, e) {
- K.apply(t, Q.call(e));
- }
- : function (t, e) {
- for (var n = t.length, i = 0; (t[n++] = e[i++]);) ;
- t.length = n - 1;
- },
- };
- }
- (_ = e.support = {}),
- (x = e.isXML = function (t) {
- var e = t && (t.ownerDocument || t).documentElement;
- return !!e && 'HTML' !== e.nodeName;
- }),
- (z = e.setDocument = function (t) {
- var e,
- n,
- i = t ? t.ownerDocument || t : H;
- return i !== I && 9 === i.nodeType && i.documentElement
- ? ((I = i),
- (A = I.documentElement),
- (F = !x(I)),
- H !== I &&
- (n = I.defaultView) &&
- n.top !== n &&
- (n.addEventListener
- ? n.addEventListener('unload', Pt, !1)
- : n.attachEvent && n.attachEvent('onunload', Pt)),
- (_.attributes = r(function (t) {
- return (t.className = 'i'), !t.getAttribute('className');
- })),
- (_.getElementsByTagName = r(function (t) {
- return (
- t.appendChild(I.createComment('')),
- !t.getElementsByTagName('*').length
- );
- })),
- (_.getElementsByClassName = mt.test(
- I.getElementsByClassName
- )),
- (_.getById = r(function (t) {
- return (
- (A.appendChild(t).id = q),
- !I.getElementsByName || !I.getElementsByName(q).length
- );
- })),
- _.getById
- ? ((P.filter.ID = function (t) {
- var e = t.replace(St, bt);
- return function (t) {
- return t.getAttribute('id') === e;
- };
- }),
- (P.find.ID = function (t, e) {
- if ('undefined' != typeof e.getElementById && F) {
- var n = e.getElementById(t);
- return n ? [n] : [];
- }
- }))
- : ((P.filter.ID = function (t) {
- var e = t.replace(St, bt);
- return function (t) {
- var n =
- 'undefined' != typeof t.getAttributeNode &&
- t.getAttributeNode('id');
- return n && n.value === e;
- };
- }),
- (P.find.ID = function (t, e) {
- if ('undefined' != typeof e.getElementById && F) {
- var n,
- i,
- r,
- o = e.getElementById(t);
- if (o) {
- if (
- ((n = o.getAttributeNode('id')),
- n && n.value === t)
- )
- return [o];
- for (
- r = e.getElementsByName(t), i = 0;
- (o = r[i++]);
- )
- if (
- ((n = o.getAttributeNode('id')),
- n && n.value === t)
- )
- return [o];
- }
- return [];
- }
- })),
- (P.find.TAG = _.getElementsByTagName
- ? function (t, e) {
- return 'undefined' != typeof e.getElementsByTagName
- ? e.getElementsByTagName(t)
- : _.qsa
- ? e.querySelectorAll(t)
- : void 0;
- }
- : function (t, e) {
- var n,
- i = [],
- r = 0,
- o = e.getElementsByTagName(t);
- if ('*' === t) {
- for (; (n = o[r++]);)
- 1 === n.nodeType && i.push(n);
- return i;
- }
- return o;
- }),
- (P.find.CLASS =
- _.getElementsByClassName &&
- function (t, e) {
- if ('undefined' != typeof e.getElementsByClassName && F)
- return e.getElementsByClassName(t);
- }),
- (B = []),
- (O = []),
- (_.qsa = mt.test(I.querySelectorAll)) &&
- (r(function (t) {
- (A.appendChild(t).innerHTML =
- "<a id='" +
- q +
- "'></a><select id='" +
- q +
- "-\r\\' msallowcapture=''><option selected=''></option></select>"),
- t.querySelectorAll("[msallowcapture^='']").length &&
- O.push('[*^$]=' + nt + '*(?:\'\'|"")'),
- t.querySelectorAll('[selected]').length ||
- O.push('\\[' + nt + '*(?:value|' + et + ')'),
- t.querySelectorAll('[id~=' + q + '-]').length ||
- O.push('~='),
- t.querySelectorAll(':checked').length ||
- O.push(':checked'),
- t.querySelectorAll('a#' + q + '+*').length ||
- O.push('.#.+[+~]');
- }),
- r(function (t) {
- t.innerHTML =
- "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
- var e = I.createElement('input');
- e.setAttribute('type', 'hidden'),
- t.appendChild(e).setAttribute('name', 'D'),
- t.querySelectorAll('[name=d]').length &&
- O.push('name' + nt + '*[*^$|!~]?='),
- 2 !== t.querySelectorAll(':enabled').length &&
- O.push(':enabled', ':disabled'),
- (A.appendChild(t).disabled = !0),
- 2 !== t.querySelectorAll(':disabled').length &&
- O.push(':enabled', ':disabled'),
- t.querySelectorAll('*,:x'),
- O.push(',.*:');
- })),
- (_.matchesSelector = mt.test(
- (L =
- A.matches ||
- A.webkitMatchesSelector ||
- A.mozMatchesSelector ||
- A.oMatchesSelector ||
- A.msMatchesSelector)
- )) &&
- r(function (t) {
- (_.disconnectedMatch = L.call(t, '*')),
- L.call(t, "[s!='']:x"),
- B.push('!=', ot);
- }),
- (O = O.length && new RegExp(O.join('|'))),
- (B = B.length && new RegExp(B.join('|'))),
- (e = mt.test(A.compareDocumentPosition)),
- (N =
- e || mt.test(A.contains)
- ? function (t, e) {
- var n = 9 === t.nodeType ? t.documentElement : t,
- i = e && e.parentNode;
- return (
- t === i ||
- !(
- !i ||
- 1 !== i.nodeType ||
- !(n.contains
- ? n.contains(i)
- : t.compareDocumentPosition &&
- 16 & t.compareDocumentPosition(i))
- )
- );
- }
- : function (t, e) {
- if (e)
- for (; (e = e.parentNode);)
- if (e === t) return !0;
- return !1;
- }),
- (Y = e
- ? function (t, e) {
- if (t === e) return (E = !0), 0;
- var n =
- !t.compareDocumentPosition -
- !e.compareDocumentPosition;
- return n
- ? n
- : ((n =
- (t.ownerDocument || t) ===
- (e.ownerDocument || e)
- ? t.compareDocumentPosition(e)
- : 1),
- 1 & n ||
- (!_.sortDetached &&
- e.compareDocumentPosition(t) === n)
- ? t === I || (t.ownerDocument === H && N(H, t))
- ? -1
- : e === I ||
- (e.ownerDocument === H && N(H, e))
- ? 1
- : R
- ? tt(R, t) - tt(R, e)
- : 0
- : 4 & n
- ? -1
- : 1);
- }
- : function (t, e) {
- if (t === e) return (E = !0), 0;
- var n,
- i = 0,
- r = t.parentNode,
- o = e.parentNode,
- s = [t],
- u = [e];
- if (!r || !o)
- return t === I
- ? -1
- : e === I
- ? 1
- : r
- ? -1
- : o
- ? 1
- : R
- ? tt(R, t) - tt(R, e)
- : 0;
- if (r === o) return a(t, e);
- for (n = t; (n = n.parentNode);) s.unshift(n);
- for (n = e; (n = n.parentNode);) u.unshift(n);
- for (; s[i] === u[i];) i++;
- return i
- ? a(s[i], u[i])
- : s[i] === H
- ? -1
- : u[i] === H
- ? 1
- : 0;
- }),
- I)
- : I;
- }),
- (e.matches = function (t, n) {
- return e(t, null, null, n);
- }),
- (e.matchesSelector = function (t, n) {
- if (
- ((t.ownerDocument || t) !== I && z(t),
- (n = n.replace(ft, "='$1']")),
- _.matchesSelector &&
- F &&
- !V[n + ' '] &&
- (!B || !B.test(n)) &&
- (!O || !O.test(n)))
- )
- try {
- var i = L.call(t, n);
- if (
- i ||
- _.disconnectedMatch ||
- (t.document && 11 !== t.document.nodeType)
- )
- return i;
- } catch (t) {
- }
- return e(n, I, null, [t]).length > 0;
- }),
- (e.contains = function (t, e) {
- return (t.ownerDocument || t) !== I && z(t), N(t, e);
- }),
- (e.attr = function (t, e) {
- (t.ownerDocument || t) !== I && z(t);
- var n = P.attrHandle[e.toLowerCase()],
- i =
- n && X.call(P.attrHandle, e.toLowerCase())
- ? n(t, e, !F)
- : void 0;
- return void 0 !== i
- ? i
- : _.attributes || !F
- ? t.getAttribute(e)
- : (i = t.getAttributeNode(e)) && i.specified
- ? i.value
- : null;
- }),
- (e.escape = function (t) {
- return (t + '').replace(wt, _t);
- }),
- (e.error = function (t) {
- throw new Error('Syntax error, unrecognized expression: ' + t);
- }),
- (e.uniqueSort = function (t) {
- var e,
- n = [],
- i = 0,
- r = 0;
- if (
- ((E = !_.detectDuplicates),
- (R = !_.sortStable && t.slice(0)),
- t.sort(Y),
- E)
- ) {
- for (; (e = t[r++]);) e === t[r] && (i = n.push(r));
- for (; i--;) t.splice(n[i], 1);
- }
- return (R = null), t;
- }),
- (C = e.getText = function (t) {
- var e,
- n = '',
- i = 0,
- r = t.nodeType;
- if (r) {
- if (1 === r || 9 === r || 11 === r) {
- if ('string' == typeof t.textContent) return t.textContent;
- for (t = t.firstChild; t; t = t.nextSibling) n += C(t);
- } else if (3 === r || 4 === r) return t.nodeValue;
- } else for (; (e = t[i++]);) n += C(e);
- return n;
- }),
- (P = e.selectors = {
- cacheLength: 50,
- createPseudo: i,
- match: dt,
- attrHandle: {},
- find: {},
- relative: {
- '>': {dir: 'parentNode', first: !0},
- ' ': {dir: 'parentNode'},
- '+': {dir: 'previousSibling', first: !0},
- '~': {dir: 'previousSibling'},
- },
- preFilter: {
- ATTR: function (t) {
- return (
- (t[1] = t[1].replace(St, bt)),
- (t[3] = (t[3] || t[4] || t[5] || '').replace(St, bt)),
- '~=' === t[2] && (t[3] = ' ' + t[3] + ' '),
- t.slice(0, 4)
- );
- },
- CHILD: function (t) {
- return (
- (t[1] = t[1].toLowerCase()),
- 'nth' === t[1].slice(0, 3)
- ? (t[3] || e.error(t[0]),
- (t[4] = +(t[4]
- ? t[5] + (t[6] || 1)
- : 2 * ('even' === t[3] || 'odd' === t[3]))),
- (t[5] = +(t[7] + t[8] || 'odd' === t[3])))
- : t[3] && e.error(t[0]),
- t
- );
- },
- PSEUDO: function (t) {
- var e,
- n = !t[6] && t[2];
- return dt.CHILD.test(t[0])
- ? null
- : (t[3]
- ? (t[2] = t[4] || t[5] || '')
- : n &&
- ct.test(n) &&
- (e = T(n, !0)) &&
- (e = n.indexOf(')', n.length - e) - n.length) &&
- ((t[0] = t[0].slice(0, e)), (t[2] = n.slice(0, e))),
- t.slice(0, 3));
- },
- },
- filter: {
- TAG: function (t) {
- var e = t.replace(St, bt).toLowerCase();
- return '*' === t
- ? function () {
- return !0;
- }
- : function (t) {
- return t.nodeName && t.nodeName.toLowerCase() === e;
- };
- },
- CLASS: function (t) {
- var e = U[t + ' '];
- return (
- e ||
- ((e = new RegExp(
- '(^|' + nt + ')' + t + '(' + nt + '|$)'
- )) &&
- U(t, function (t) {
- return e.test(
- ('string' == typeof t.className && t.className) ||
- ('undefined' != typeof t.getAttribute &&
- t.getAttribute('class')) ||
- ''
- );
- }))
- );
- },
- ATTR: function (t, n, i) {
- return function (r) {
- var o = e.attr(r, t);
- return null == o
- ? '!=' === n
- : !n ||
- ((o += ''),
- '=' === n
- ? o === i
- : '!=' === n
- ? o !== i
- : '^=' === n
- ? i && 0 === o.indexOf(i)
- : '*=' === n
- ? i && o.indexOf(i) > -1
- : '$=' === n
- ? i && o.slice(-i.length) === i
- : '~=' === n
- ? (
- ' ' +
- o.replace(at, ' ') +
- ' '
- ).indexOf(i) > -1
- : '|=' === n &&
- (o === i ||
- o.slice(0, i.length + 1) ===
- i + '-'));
- };
- },
- CHILD: function (t, e, n, i, r) {
- var o = 'nth' !== t.slice(0, 3),
- a = 'last' !== t.slice(-4),
- s = 'of-type' === e;
- return 1 === i && 0 === r
- ? function (t) {
- return !!t.parentNode;
- }
- : function (e, n, u) {
- var l,
- f,
- c,
- h,
- d,
- p,
- y = o !== a ? 'nextSibling' : 'previousSibling',
- m = e.parentNode,
- v = s && e.nodeName.toLowerCase(),
- g = !u && !s,
- S = !1;
- if (m) {
- if (o) {
- for (; y;) {
- for (h = e; (h = h[y]);)
- if (
- s
- ? h.nodeName.toLowerCase() === v
- : 1 === h.nodeType
- )
- return !1;
- p = y = 'only' === t && !p && 'nextSibling';
- }
- return !0;
- }
- if (
- ((p = [a ? m.firstChild : m.lastChild]), a && g)
- ) {
- for (
- h = m,
- c = h[q] || (h[q] = {}),
- f = c[h.uniqueID] || (c[h.uniqueID] = {}),
- l = f[t] || [],
- d = l[0] === j && l[1],
- S = d && l[2],
- h = d && m.childNodes[d];
- (h =
- (++d && h && h[y]) || (S = d = 0) || p.pop());
- )
- if (1 === h.nodeType && ++S && h === e) {
- f[t] = [j, d, S];
- break;
- }
- } else if (
- (g &&
- ((h = e),
- (c = h[q] || (h[q] = {})),
- (f = c[h.uniqueID] || (c[h.uniqueID] = {})),
- (l = f[t] || []),
- (d = l[0] === j && l[1]),
- (S = d)),
- S === !1)
- )
- for (
- ;
- (h =
- (++d && h && h[y]) ||
- (S = d = 0) ||
- p.pop()) &&
- ((s
- ? h.nodeName.toLowerCase() !== v
- : 1 !== h.nodeType) ||
- !++S ||
- (g &&
- ((c = h[q] || (h[q] = {})),
- (f = c[h.uniqueID] || (c[h.uniqueID] = {})),
- (f[t] = [j, S])),
- h !== e));
- ) ;
- return (
- (S -= r), S === i || (S % i === 0 && S / i >= 0)
- );
- }
- };
- },
- PSEUDO: function (t, n) {
- var r,
- o =
- P.pseudos[t] ||
- P.setFilters[t.toLowerCase()] ||
- e.error('unsupported pseudo: ' + t);
- return o[q]
- ? o(n)
- : o.length > 1
- ? ((r = [t, t, '', n]),
- P.setFilters.hasOwnProperty(t.toLowerCase())
- ? i(function (t, e) {
- for (var i, r = o(t, n), a = r.length; a--;)
- (i = tt(t, r[a])), (t[i] = !(e[i] = r[a]));
- })
- : function (t) {
- return o(t, 0, r);
- })
- : o;
- },
- },
- pseudos: {
- not: i(function (t) {
- var e = [],
- n = [],
- r = k(t.replace(st, '$1'));
- return r[q]
- ? i(function (t, e, n, i) {
- for (
- var o, a = r(t, null, i, []), s = t.length;
- s--;
- )
- (o = a[s]) && (t[s] = !(e[s] = o));
- })
- : function (t, i, o) {
- return (
- (e[0] = t),
- r(e, null, o, n),
- (e[0] = null),
- !n.pop()
- );
- };
- }),
- has: i(function (t) {
- return function (n) {
- return e(t, n).length > 0;
- };
- }),
- contains: i(function (t) {
- return (
- (t = t.replace(St, bt)),
- function (e) {
- return (
- (e.textContent || e.innerText || C(e)).indexOf(t) > -1
- );
- }
- );
- }),
- lang: i(function (t) {
- return (
- ht.test(t || '') || e.error('unsupported lang: ' + t),
- (t = t.replace(St, bt).toLowerCase()),
- function (e) {
- var n;
- do
- if (
- (n = F
- ? e.lang
- : e.getAttribute('xml:lang') ||
- e.getAttribute('lang'))
- )
- return (
- (n = n.toLowerCase()),
- n === t || 0 === n.indexOf(t + '-')
- );
- while ((e = e.parentNode) && 1 === e.nodeType);
- return !1;
- }
- );
- }),
- target: function (e) {
- var n = t.location && t.location.hash;
- return n && n.slice(1) === e.id;
- },
- root: function (t) {
- return t === A;
- },
- focus: function (t) {
- return (
- t === I.activeElement &&
- (!I.hasFocus || I.hasFocus()) &&
- !!(t.type || t.href || ~t.tabIndex)
- );
- },
- enabled: l(!1),
- disabled: l(!0),
- checked: function (t) {
- var e = t.nodeName.toLowerCase();
- return (
- ('input' === e && !!t.checked) ||
- ('option' === e && !!t.selected)
- );
- },
- selected: function (t) {
- return (
- t.parentNode && t.parentNode.selectedIndex,
- t.selected === !0
- );
- },
- empty: function (t) {
- for (t = t.firstChild; t; t = t.nextSibling)
- if (t.nodeType < 6) return !1;
- return !0;
- },
- parent: function (t) {
- return !P.pseudos.empty(t);
- },
- header: function (t) {
- return yt.test(t.nodeName);
- },
- input: function (t) {
- return pt.test(t.nodeName);
- },
- button: function (t) {
- var e = t.nodeName.toLowerCase();
- return (
- ('input' === e && 'button' === t.type) || 'button' === e
- );
- },
- text: function (t) {
- var e;
- return (
- 'input' === t.nodeName.toLowerCase() &&
- 'text' === t.type &&
- (null == (e = t.getAttribute('type')) ||
- 'text' === e.toLowerCase())
- );
- },
- first: f(function () {
- return [0];
- }),
- last: f(function (t, e) {
- return [e - 1];
- }),
- eq: f(function (t, e, n) {
- return [n < 0 ? n + e : n];
- }),
- even: f(function (t, e) {
- for (var n = 0; n < e; n += 2) t.push(n);
- return t;
- }),
- odd: f(function (t, e) {
- for (var n = 1; n < e; n += 2) t.push(n);
- return t;
- }),
- lt: f(function (t, e, n) {
- for (var i = n < 0 ? n + e : n; --i >= 0;) t.push(i);
- return t;
- }),
- gt: f(function (t, e, n) {
- for (var i = n < 0 ? n + e : n; ++i < e;) t.push(i);
- return t;
- }),
- },
- }),
- (P.pseudos.nth = P.pseudos.eq);
- for (w in {
- radio: !0,
- checkbox: !0,
- file: !0,
- password: !0,
- image: !0,
- })
- P.pseudos[w] = s(w);
- for (w in {submit: !0, reset: !0}) P.pseudos[w] = u(w);
- return (
- (h.prototype = P.filters = P.pseudos),
- (P.setFilters = new h()),
- (T = e.tokenize = function (t, n) {
- var i,
- r,
- o,
- a,
- s,
- u,
- l,
- f = G[t + ' '];
- if (f) return n ? 0 : f.slice(0);
- for (s = t, u = [], l = P.preFilter; s;) {
- (i && !(r = ut.exec(s))) ||
- (r && (s = s.slice(r[0].length) || s), u.push((o = []))),
- (i = !1),
- (r = lt.exec(s)) &&
- ((i = r.shift()),
- o.push({value: i, type: r[0].replace(st, ' ')}),
- (s = s.slice(i.length)));
- for (a in P.filter)
- !(r = dt[a].exec(s)) ||
- (l[a] && !(r = l[a](r))) ||
- ((i = r.shift()),
- o.push({value: i, type: a, matches: r}),
- (s = s.slice(i.length)));
- if (!i) break;
- }
- return n ? s.length : s ? e.error(t) : G(t, u).slice(0);
- }),
- (k = e.compile = function (t, e) {
- var n,
- i = [],
- r = [],
- o = V[t + ' '];
- if (!o) {
- for (e || (e = T(t)), n = e.length; n--;)
- (o = S(e[n])), o[q] ? i.push(o) : r.push(o);
- (o = V(t, b(r, i))), (o.selector = t);
- }
- return o;
- }),
- (D = e.select = function (t, e, n, i) {
- var r,
- o,
- a,
- s,
- u,
- l = 'function' == typeof t && t,
- f = !i && T((t = l.selector || t));
- if (((n = n || []), 1 === f.length)) {
- if (
- ((o = f[0] = f[0].slice(0)),
- o.length > 2 &&
- 'ID' === (a = o[0]).type &&
- 9 === e.nodeType &&
- F &&
- P.relative[o[1].type])
- ) {
- if (
- ((e = (P.find.ID(a.matches[0].replace(St, bt), e) ||
- [])[0]),
- !e)
- )
- return n;
- l && (e = e.parentNode),
- (t = t.slice(o.shift().value.length));
- }
- for (
- r = dt.needsContext.test(t) ? 0 : o.length;
- r-- && ((a = o[r]), !P.relative[(s = a.type)]);
- )
- if (
- (u = P.find[s]) &&
- (i = u(
- a.matches[0].replace(St, bt),
- (gt.test(o[0].type) && c(e.parentNode)) || e
- ))
- ) {
- if ((o.splice(r, 1), (t = i.length && d(o)), !t))
- return Z.apply(n, i), n;
- break;
- }
- }
- return (
- (l || k(t, f))(
- i,
- e,
- !F,
- n,
- !e || (gt.test(t) && c(e.parentNode)) || e
- ),
- n
- );
- }),
- (_.sortStable =
- q
- .split('')
- .sort(Y)
- .join('') === q),
- (_.detectDuplicates = !!E),
- z(),
- (_.sortDetached = r(function (t) {
- return (
- 1 & t.compareDocumentPosition(I.createElement('fieldset'))
- );
- })),
- r(function (t) {
- return (
- (t.innerHTML = "<a href='#'></a>"),
- '#' === t.firstChild.getAttribute('href')
- );
- }) ||
- o('type|href|height|width', function (t, e, n) {
- if (!n)
- return t.getAttribute(
- e,
- 'type' === e.toLowerCase() ? 1 : 2
- );
- }),
- (_.attributes &&
- r(function (t) {
- return (
- (t.innerHTML = '<input/>'),
- t.firstChild.setAttribute('value', ''),
- '' === t.firstChild.getAttribute('value')
- );
- })) ||
- o('value', function (t, e, n) {
- if (!n && 'input' === t.nodeName.toLowerCase())
- return t.defaultValue;
- }),
- r(function (t) {
- return null == t.getAttribute('disabled');
- }) ||
- o(et, function (t, e, n) {
- var i;
- if (!n)
- return t[e] === !0
- ? e.toLowerCase()
- : (i = t.getAttributeNode(e)) && i.specified
- ? i.value
- : null;
- }),
- e
- );
- })(o);
- (bt.find = xt),
- (bt.expr = xt.selectors),
- (bt.expr[':'] = bt.expr.pseudos),
- (bt.uniqueSort = bt.unique = xt.uniqueSort),
- (bt.text = xt.getText),
- (bt.isXMLDoc = xt.isXML),
- (bt.contains = xt.contains),
- (bt.escapeSelector = xt.escape);
- var Tt = function (t, e, n) {
- for (
- var i = [], r = void 0 !== n;
- (t = t[e]) && 9 !== t.nodeType;
- )
- if (1 === t.nodeType) {
- if (r && bt(t).is(n)) break;
- i.push(t);
- }
- return i;
- },
- kt = function (t, e) {
- for (var n = []; t; t = t.nextSibling)
- 1 === t.nodeType && t !== e && n.push(t);
- return n;
- },
- Dt = bt.expr.match.needsContext,
- Mt = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,
- Rt = /^.[^:#\[\.,]*$/;
- (bt.filter = function (t, e, n) {
- var i = e[0];
- return (
- n && (t = ':not(' + t + ')'),
- 1 === e.length && 1 === i.nodeType
- ? bt.find.matchesSelector(i, t)
- ? [i]
- : []
- : bt.find.matches(
- t,
- bt.grep(e, function (t) {
- return 1 === t.nodeType;
- })
- )
- );
- }),
- bt.fn.extend({
- find: function (t) {
- var e,
- n,
- i = this.length,
- r = this;
- if ('string' != typeof t)
- return this.pushStack(
- bt(t).filter(function () {
- for (e = 0; e < i; e++)
- if (bt.contains(r[e], this)) return !0;
- })
- );
- for (n = this.pushStack([]), e = 0; e < i; e++)
- bt.find(t, r[e], n);
- return i > 1 ? bt.uniqueSort(n) : n;
- },
- filter: function (t) {
- return this.pushStack(f(this, t || [], !1));
- },
- not: function (t) {
- return this.pushStack(f(this, t || [], !0));
- },
- is: function (t) {
- return !!f(
- this,
- 'string' == typeof t && Dt.test(t) ? bt(t) : t || [],
- !1
- ).length;
- },
- });
- var Et,
- zt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
- It = (bt.fn.init = function (t, e, n) {
- var i, r;
- if (!t) return this;
- if (((n = n || Et), 'string' == typeof t)) {
- if (
- ((i =
- '<' === t[0] && '>' === t[t.length - 1] && t.length >= 3
- ? [null, t, null]
- : zt.exec(t)),
- !i || (!i[1] && e))
- )
- return !e || e.jquery
- ? (e || n).find(t)
- : this.constructor(e).find(t);
- if (i[1]) {
- if (
- ((e = e instanceof bt ? e[0] : e),
- bt.merge(
- this,
- bt.parseHTML(
- i[1],
- e && e.nodeType ? e.ownerDocument || e : st,
- !0
- )
- ),
- Mt.test(i[1]) && bt.isPlainObject(e))
- )
- for (i in e)
- bt.isFunction(this[i])
- ? this[i](e[i])
- : this.attr(i, e[i]);
- return this;
- }
- return (
- (r = st.getElementById(i[2])),
- r && ((this[0] = r), (this.length = 1)),
- this
- );
- }
- return t.nodeType
- ? ((this[0] = t), (this.length = 1), this)
- : bt.isFunction(t)
- ? void 0 !== n.ready
- ? n.ready(t)
- : t(bt)
- : bt.makeArray(t, this);
- });
- (It.prototype = bt.fn), (Et = bt(st));
- var At = /^(?:parents|prev(?:Until|All))/,
- Ft = {children: !0, contents: !0, next: !0, prev: !0};
- bt.fn.extend({
- has: function (t) {
- var e = bt(t, this),
- n = e.length;
- return this.filter(function () {
- for (var t = 0; t < n; t++)
- if (bt.contains(this, e[t])) return !0;
- });
- },
- closest: function (t, e) {
- var n,
- i = 0,
- r = this.length,
- o = [],
- a = 'string' != typeof t && bt(t);
- if (!Dt.test(t))
- for (; i < r; i++)
- for (n = this[i]; n && n !== e; n = n.parentNode)
- if (
- n.nodeType < 11 &&
- (a
- ? a.index(n) > -1
- : 1 === n.nodeType && bt.find.matchesSelector(n, t))
- ) {
- o.push(n);
- break;
- }
- return this.pushStack(o.length > 1 ? bt.uniqueSort(o) : o);
- },
- index: function (t) {
- return t
- ? 'string' == typeof t
- ? ht.call(bt(t), this[0])
- : ht.call(this, t.jquery ? t[0] : t)
- : this[0] && this[0].parentNode
- ? this.first().prevAll().length
- : -1;
- },
- add: function (t, e) {
- return this.pushStack(
- bt.uniqueSort(bt.merge(this.get(), bt(t, e)))
- );
- },
- addBack: function (t) {
- return this.add(
- null == t ? this.prevObject : this.prevObject.filter(t)
- );
- },
- }),
- bt.each(
- {
- parent: function t(e) {
- var t = e.parentNode;
- return t && 11 !== t.nodeType ? t : null;
- },
- parents: function (t) {
- return Tt(t, 'parentNode');
- },
- parentsUntil: function (t, e, n) {
- return Tt(t, 'parentNode', n);
- },
- next: function (t) {
- return c(t, 'nextSibling');
- },
- prev: function (t) {
- return c(t, 'previousSibling');
- },
- nextAll: function (t) {
- return Tt(t, 'nextSibling');
- },
- prevAll: function (t) {
- return Tt(t, 'previousSibling');
- },
- nextUntil: function (t, e, n) {
- return Tt(t, 'nextSibling', n);
- },
- prevUntil: function (t, e, n) {
- return Tt(t, 'previousSibling', n);
- },
- siblings: function (t) {
- return kt((t.parentNode || {}).firstChild, t);
- },
- children: function (t) {
- return kt(t.firstChild);
- },
- contents: function (t) {
- return l(t, 'iframe')
- ? t.contentDocument
- : (l(t, 'template') && (t = t.content || t),
- bt.merge([], t.childNodes));
- },
- },
- function (t, e) {
- bt.fn[t] = function (n, i) {
- var r = bt.map(this, e, n);
- return (
- 'Until' !== t.slice(-5) && (i = n),
- i && 'string' == typeof i && (r = bt.filter(i, r)),
- this.length > 1 &&
- (Ft[t] || bt.uniqueSort(r), At.test(t) && r.reverse()),
- this.pushStack(r)
- );
- };
- }
- );
- var Ot = /[^\x20\t\r\n\f]+/g;
- (bt.Callbacks = function (t) {
- t = 'string' == typeof t ? h(t) : bt.extend({}, t);
- var e,
- n,
- i,
- r,
- o = [],
- a = [],
- s = -1,
- u = function () {
- for (r = r || t.once, i = e = !0; a.length; s = -1)
- for (n = a.shift(); ++s < o.length;)
- o[s].apply(n[0], n[1]) === !1 &&
- t.stopOnFalse &&
- ((s = o.length), (n = !1));
- t.memory || (n = !1), (e = !1), r && (o = n ? [] : '');
- },
- l = {
- add: function () {
- return (
- o &&
- (n && !e && ((s = o.length - 1), a.push(n)),
- (function e(n) {
- bt.each(n, function (n, i) {
- bt.isFunction(i)
- ? (t.unique && l.has(i)) || o.push(i)
- : i && i.length && 'string' !== bt.type(i) && e(i);
- });
- })(arguments),
- n && !e && u()),
- this
- );
- },
- remove: function () {
- return (
- bt.each(arguments, function (t, e) {
- for (var n; (n = bt.inArray(e, o, n)) > -1;)
- o.splice(n, 1), n <= s && s--;
- }),
- this
- );
- },
- has: function (t) {
- return t ? bt.inArray(t, o) > -1 : o.length > 0;
- },
- empty: function () {
- return o && (o = []), this;
- },
- disable: function () {
- return (r = a = []), (o = n = ''), this;
- },
- disabled: function () {
- return !o;
- },
- lock: function () {
- return (r = a = []), n || e || (o = n = ''), this;
- },
- locked: function () {
- return !!r;
- },
- fireWith: function (t, n) {
- return (
- r ||
- ((n = n || []),
- (n = [t, n.slice ? n.slice() : n]),
- a.push(n),
- e || u()),
- this
- );
- },
- fire: function () {
- return l.fireWith(this, arguments), this;
- },
- fired: function () {
- return !!i;
- },
- };
- return l;
- }),
- bt.extend({
- Deferred: function (t) {
- var e = [
- [
- 'notify',
- 'progress',
- bt.Callbacks('memory'),
- bt.Callbacks('memory'),
- 2,
- ],
- [
- 'resolve',
- 'done',
- bt.Callbacks('once memory'),
- bt.Callbacks('once memory'),
- 0,
- 'resolved',
- ],
- [
- 'reject',
- 'fail',
- bt.Callbacks('once memory'),
- bt.Callbacks('once memory'),
- 1,
- 'rejected',
- ],
- ],
- i = 'pending',
- r = {
- state: function () {
- return i;
- },
- always: function () {
- return a.done(arguments).fail(arguments), this;
- },
- catch: function (t) {
- return r.then(null, t);
- },
- pipe: function () {
- var t = arguments;
- return bt
- .Deferred(function (n) {
- bt.each(e, function (e, i) {
- var r = bt.isFunction(t[i[4]]) && t[i[4]];
- a[i[1]](function () {
- var t = r && r.apply(this, arguments);
- t && bt.isFunction(t.promise)
- ? t
- .promise()
- .progress(n.notify)
- .done(n.resolve)
- .fail(n.reject)
- : n[i[0] + 'With'](this, r ? [t] : arguments);
- });
- }),
- (t = null);
- })
- .promise();
- },
- then: function (t, i, r) {
- function a(t, e, i, r) {
- return function () {
- var u = this,
- l = arguments,
- f = function () {
- var o, f;
- if (!(t < s)) {
- if (((o = i.apply(u, l)), o === e.promise()))
- throw new TypeError(
- 'Thenable self-resolution'
- );
- (f =
- o &&
- ('object' ===
- ('undefined' == typeof o
- ? 'undefined'
- : n(o)) ||
- 'function' == typeof o) &&
- o.then),
- bt.isFunction(f)
- ? r
- ? f.call(o, a(s, e, d, r), a(s, e, p, r))
- : (s++,
- f.call(
- o,
- a(s, e, d, r),
- a(s, e, p, r),
- a(s, e, d, e.notifyWith)
- ))
- : (i !== d && ((u = void 0), (l = [o])),
- (r || e.resolveWith)(u, l));
- }
- },
- c = r
- ? f
- : function () {
- try {
- f();
- } catch (n) {
- bt.Deferred.exceptionHook &&
- bt.Deferred.exceptionHook(
- n,
- c.stackTrace
- ),
- t + 1 >= s &&
- (i !== p && ((u = void 0), (l = [n])),
- e.rejectWith(u, l));
- }
- };
- t
- ? c()
- : (bt.Deferred.getStackHook &&
- (c.stackTrace = bt.Deferred.getStackHook()),
- o.setTimeout(c));
- };
- }
- var s = 0;
- return bt
- .Deferred(function (n) {
- e[0][3].add(
- a(0, n, bt.isFunction(r) ? r : d, n.notifyWith)
- ),
- e[1][3].add(a(0, n, bt.isFunction(t) ? t : d)),
- e[2][3].add(a(0, n, bt.isFunction(i) ? i : p));
- })
- .promise();
- },
- promise: function (t) {
- return null != t ? bt.extend(t, r) : r;
- },
- },
- a = {};
- return (
- bt.each(e, function (t, n) {
- var o = n[2],
- s = n[5];
- (r[n[1]] = o.add),
- s &&
- o.add(
- function () {
- i = s;
- },
- e[3 - t][2].disable,
- e[0][2].lock
- ),
- o.add(n[3].fire),
- (a[n[0]] = function () {
- return (
- a[n[0] + 'With'](
- this === a ? void 0 : this,
- arguments
- ),
- this
- );
- }),
- (a[n[0] + 'With'] = o.fireWith);
- }),
- r.promise(a),
- t && t.call(a, a),
- a
- );
- },
- when: function (t) {
- var e = arguments.length,
- n = e,
- i = Array(n),
- r = lt.call(arguments),
- o = bt.Deferred(),
- a = function (t) {
- return function (n) {
- (i[t] = this),
- (r[t] = arguments.length > 1 ? lt.call(arguments) : n),
- --e || o.resolveWith(i, r);
- };
- };
- if (
- e <= 1 &&
- (y(t, o.done(a(n)).resolve, o.reject, !e),
- 'pending' === o.state() || bt.isFunction(r[n] && r[n].then))
- )
- return o.then();
- for (; n--;) y(r[n], a(n), o.reject);
- return o.promise();
- },
- });
- var Bt = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
- (bt.Deferred.exceptionHook = function (t, e) {
- o.console &&
- o.console.warn &&
- t &&
- Bt.test(t.name) &&
- o.console.warn(
- 'jQuery.Deferred exception: ' + t.message,
- t.stack,
- e
- );
- }),
- (bt.readyException = function (t) {
- o.setTimeout(function () {
- throw t;
- });
- });
- var Lt = bt.Deferred();
- (bt.fn.ready = function (t) {
- return (
- Lt.then(t).catch(function (t) {
- bt.readyException(t);
- }),
- this
- );
- }),
- bt.extend({
- isReady: !1,
- readyWait: 1,
- ready: function (t) {
- (t === !0 ? --bt.readyWait : bt.isReady) ||
- ((bt.isReady = !0),
- (t !== !0 && --bt.readyWait > 0) || Lt.resolveWith(st, [bt]));
- },
- }),
- (bt.ready.then = Lt.then),
- 'complete' === st.readyState ||
- ('loading' !== st.readyState && !st.documentElement.doScroll)
- ? o.setTimeout(bt.ready)
- : (st.addEventListener('DOMContentLoaded', m),
- o.addEventListener('load', m));
- var Nt = function t(e, n, i, r, o, a, s) {
- var u = 0,
- l = e.length,
- f = null == i;
- if ('object' === bt.type(i)) {
- o = !0;
- for (u in i) t(e, n, u, i[u], !0, a, s);
- } else if (
- void 0 !== r &&
- ((o = !0),
- bt.isFunction(r) || (s = !0),
- f &&
- (s
- ? (n.call(e, r), (n = null))
- : ((f = n),
- (n = function (t, e, n) {
- return f.call(bt(t), n);
- }))),
- n)
- )
- for (; u < l; u++)
- n(e[u], i, s ? r : r.call(e[u], u, n(e[u], i)));
- return o ? e : f ? n.call(e) : l ? n(e[0], i) : a;
- },
- qt = function (t) {
- return 1 === t.nodeType || 9 === t.nodeType || !+t.nodeType;
- };
- (v.uid = 1),
- (v.prototype = {
- cache: function (t) {
- var e = t[this.expando];
- return (
- e ||
- ((e = {}),
- qt(t) &&
- (t.nodeType
- ? (t[this.expando] = e)
- : Object.defineProperty(t, this.expando, {
- value: e,
- configurable: !0,
- }))),
- e
- );
- },
- set: function (t, e, n) {
- var i,
- r = this.cache(t);
- if ('string' == typeof e) r[bt.camelCase(e)] = n;
- else for (i in e) r[bt.camelCase(i)] = e[i];
- return r;
- },
- get: function (t, e) {
- return void 0 === e
- ? this.cache(t)
- : t[this.expando] && t[this.expando][bt.camelCase(e)];
- },
- access: function (t, e, n) {
- return void 0 === e ||
- (e && 'string' == typeof e && void 0 === n)
- ? this.get(t, e)
- : (this.set(t, e, n), void 0 !== n ? n : e);
- },
- remove: function (t, e) {
- var n,
- i = t[this.expando];
- if (void 0 !== i) {
- if (void 0 !== e) {
- Array.isArray(e)
- ? (e = e.map(bt.camelCase))
- : ((e = bt.camelCase(e)),
- (e = e in i ? [e] : e.match(Ot) || [])),
- (n = e.length);
- for (; n--;) delete i[e[n]];
- }
- (void 0 === e || bt.isEmptyObject(i)) &&
- (t.nodeType
- ? (t[this.expando] = void 0)
- : delete t[this.expando]);
- }
- },
- hasData: function (t) {
- var e = t[this.expando];
- return void 0 !== e && !bt.isEmptyObject(e);
- },
- });
- var Ht = new v(),
- jt = new v(),
- Wt = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- Ut = /[A-Z]/g;
- bt.extend({
- hasData: function (t) {
- return jt.hasData(t) || Ht.hasData(t);
- },
- data: function (t, e, n) {
- return jt.access(t, e, n);
- },
- removeData: function (t, e) {
- jt.remove(t, e);
- },
- _data: function (t, e, n) {
- return Ht.access(t, e, n);
- },
- _removeData: function (t, e) {
- Ht.remove(t, e);
- },
- }),
- bt.fn.extend({
- data: function t(e, i) {
- var r,
- o,
- t,
- a = this[0],
- s = a && a.attributes;
- if (void 0 === e) {
- if (
- this.length &&
- ((t = jt.get(a)),
- 1 === a.nodeType && !Ht.get(a, 'hasDataAttrs'))
- ) {
- for (r = s.length; r--;)
- s[r] &&
- ((o = s[r].name),
- 0 === o.indexOf('data-') &&
- ((o = bt.camelCase(o.slice(5))), S(a, o, t[o])));
- Ht.set(a, 'hasDataAttrs', !0);
- }
- return t;
- }
- return 'object' ===
- ('undefined' == typeof e ? 'undefined' : n(e))
- ? this.each(function () {
- jt.set(this, e);
- })
- : Nt(
- this,
- function (t) {
- var n;
- if (a && void 0 === t) {
- if (((n = jt.get(a, e)), void 0 !== n)) return n;
- if (((n = S(a, e)), void 0 !== n)) return n;
- } else
- this.each(function () {
- jt.set(this, e, t);
- });
- },
- null,
- i,
- arguments.length > 1,
- null,
- !0
- );
- },
- removeData: function (t) {
- return this.each(function () {
- jt.remove(this, t);
- });
- },
- }),
- bt.extend({
- queue: function t(e, n, i) {
- var t;
- if (e)
- return (
- (n = (n || 'fx') + 'queue'),
- (t = Ht.get(e, n)),
- i &&
- (!t || Array.isArray(i)
- ? (t = Ht.access(e, n, bt.makeArray(i)))
- : t.push(i)),
- t || []
- );
- },
- dequeue: function (t, e) {
- e = e || 'fx';
- var n = bt.queue(t, e),
- i = n.length,
- r = n.shift(),
- o = bt._queueHooks(t, e),
- a = function () {
- bt.dequeue(t, e);
- };
- 'inprogress' === r && ((r = n.shift()), i--),
- r &&
- ('fx' === e && n.unshift('inprogress'),
- delete o.stop,
- r.call(t, a, o)),
- !i && o && o.empty.fire();
- },
- _queueHooks: function (t, e) {
- var n = e + 'queueHooks';
- return (
- Ht.get(t, n) ||
- Ht.access(t, n, {
- empty: bt.Callbacks('once memory').add(function () {
- Ht.remove(t, [e + 'queue', n]);
- }),
- })
- );
- },
- }),
- bt.fn.extend({
- queue: function (t, e) {
- var n = 2;
- return (
- 'string' != typeof t && ((e = t), (t = 'fx'), n--),
- arguments.length < n
- ? bt.queue(this[0], t)
- : void 0 === e
- ? this
- : this.each(function () {
- var n = bt.queue(this, t, e);
- bt._queueHooks(this, t),
- 'fx' === t &&
- 'inprogress' !== n[0] &&
- bt.dequeue(this, t);
- })
- );
- },
- dequeue: function (t) {
- return this.each(function () {
- bt.dequeue(this, t);
- });
- },
- clearQueue: function (t) {
- return this.queue(t || 'fx', []);
- },
- promise: function (t, e) {
- var n,
- i = 1,
- r = bt.Deferred(),
- o = this,
- a = this.length,
- s = function () {
- --i || r.resolveWith(o, [o]);
- };
- for (
- 'string' != typeof t && ((e = t), (t = void 0)),
- t = t || 'fx';
- a--;
- )
- (n = Ht.get(o[a], t + 'queueHooks')),
- n && n.empty && (i++, n.empty.add(s));
- return s(), r.promise(e);
- },
- });
- var Gt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- Vt = new RegExp('^(?:([+-])=|)(' + Gt + ')([a-z%]*)$', 'i'),
- Yt = ['Top', 'Right', 'Bottom', 'Left'],
- Xt = function (t, e) {
- return (
- (t = e || t),
- 'none' === t.style.display ||
- ('' === t.style.display &&
- bt.contains(t.ownerDocument, t) &&
- 'none' === bt.css(t, 'display'))
- );
- },
- Jt = function (t, e, n, i) {
- var r,
- o,
- a = {};
- for (o in e) (a[o] = t.style[o]), (t.style[o] = e[o]);
- r = n.apply(t, i || []);
- for (o in e) t.style[o] = a[o];
- return r;
- },
- $t = {};
- bt.fn.extend({
- show: function () {
- return _(this, !0);
- },
- hide: function () {
- return _(this);
- },
- toggle: function (t) {
- return 'boolean' == typeof t
- ? t
- ? this.show()
- : this.hide()
- : this.each(function () {
- Xt(this) ? bt(this).show() : bt(this).hide();
- });
- },
- });
- var Kt = /^(?:checkbox|radio)$/i,
- Zt = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i,
- Qt = /^$|\/(?:java|ecma)script/i,
- te = {
- option: [1, "<select multiple='multiple'>", '</select>'],
- thead: [1, '<table>', '</table>'],
- col: [2, '<table><colgroup>', '</colgroup></table>'],
- tr: [2, '<table><tbody>', '</tbody></table>'],
- td: [3, '<table><tbody><tr>', '</tr></tbody></table>'],
- _default: [0, '', ''],
- };
- (te.optgroup = te.option),
- (te.tbody = te.tfoot = te.colgroup = te.caption = te.thead),
- (te.th = te.td);
- var ee = /<|&#?\w+;/;
- !(function () {
- var t = st.createDocumentFragment(),
- e = t.appendChild(st.createElement('div')),
- n = st.createElement('input');
- n.setAttribute('type', 'radio'),
- n.setAttribute('checked', 'checked'),
- n.setAttribute('name', 't'),
- e.appendChild(n),
- (gt.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked),
- (e.innerHTML = '<textarea>x</textarea>'),
- (gt.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue);
- })();
- var ne = st.documentElement,
- ie = /^key/,
- re = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- oe = /^([^.]*)(?:\.(.+)|)/;
- (bt.event = {
- global: {},
- add: function (t, e, n, i, r) {
- var o,
- a,
- s,
- u,
- l,
- f,
- c,
- h,
- d,
- p,
- y,
- m = Ht.get(t);
- if (m)
- for (
- n.handler && ((o = n), (n = o.handler), (r = o.selector)),
- r && bt.find.matchesSelector(ne, r),
- n.guid || (n.guid = bt.guid++),
- (u = m.events) || (u = m.events = {}),
- (a = m.handle) ||
- (a = m.handle = function (e) {
- return 'undefined' != typeof bt &&
- bt.event.triggered !== e.type
- ? bt.event.dispatch.apply(t, arguments)
- : void 0;
- }),
- e = (e || '').match(Ot) || [''],
- l = e.length;
- l--;
- )
- (s = oe.exec(e[l]) || []),
- (d = y = s[1]),
- (p = (s[2] || '').split('.').sort()),
- d &&
- ((c = bt.event.special[d] || {}),
- (d = (r ? c.delegateType : c.bindType) || d),
- (c = bt.event.special[d] || {}),
- (f = bt.extend(
- {
- type: d,
- origType: y,
- data: i,
- handler: n,
- guid: n.guid,
- selector: r,
- needsContext: r && bt.expr.match.needsContext.test(r),
- namespace: p.join('.'),
- },
- o
- )),
- (h = u[d]) ||
- ((h = u[d] = []),
- (h.delegateCount = 0),
- (c.setup && c.setup.call(t, i, p, a) !== !1) ||
- (t.addEventListener && t.addEventListener(d, a))),
- c.add &&
- (c.add.call(t, f),
- f.handler.guid || (f.handler.guid = n.guid)),
- r ? h.splice(h.delegateCount++, 0, f) : h.push(f),
- (bt.event.global[d] = !0));
- },
- remove: function (t, e, n, i, r) {
- var o,
- a,
- s,
- u,
- l,
- f,
- c,
- h,
- d,
- p,
- y,
- m = Ht.hasData(t) && Ht.get(t);
- if (m && (u = m.events)) {
- for (e = (e || '').match(Ot) || [''], l = e.length; l--;)
- if (
- ((s = oe.exec(e[l]) || []),
- (d = y = s[1]),
- (p = (s[2] || '').split('.').sort()),
- d)
- ) {
- for (
- c = bt.event.special[d] || {},
- d = (i ? c.delegateType : c.bindType) || d,
- h = u[d] || [],
- s =
- s[2] &&
- new RegExp(
- '(^|\\.)' + p.join('\\.(?:.*\\.|)') + '(\\.|$)'
- ),
- a = o = h.length;
- o--;
- )
- (f = h[o]),
- (!r && y !== f.origType) ||
- (n && n.guid !== f.guid) ||
- (s && !s.test(f.namespace)) ||
- (i &&
- i !== f.selector &&
- ('**' !== i || !f.selector)) ||
- (h.splice(o, 1),
- f.selector && h.delegateCount--,
- c.remove && c.remove.call(t, f));
- a &&
- !h.length &&
- ((c.teardown && c.teardown.call(t, p, m.handle) !== !1) ||
- bt.removeEvent(t, d, m.handle),
- delete u[d]);
- } else for (d in u) bt.event.remove(t, d + e[l], n, i, !0);
- bt.isEmptyObject(u) && Ht.remove(t, 'handle events');
- }
- },
- dispatch: function (t) {
- var e,
- n,
- i,
- r,
- o,
- a,
- s = bt.event.fix(t),
- u = new Array(arguments.length),
- l = (Ht.get(this, 'events') || {})[s.type] || [],
- f = bt.event.special[s.type] || {};
- for (u[0] = s, e = 1; e < arguments.length; e++)
- u[e] = arguments[e];
- if (
- ((s.delegateTarget = this),
- !f.preDispatch || f.preDispatch.call(this, s) !== !1)
- ) {
- for (
- a = bt.event.handlers.call(this, s, l), e = 0;
- (r = a[e++]) && !s.isPropagationStopped();
- )
- for (
- s.currentTarget = r.elem, n = 0;
- (o = r.handlers[n++]) && !s.isImmediatePropagationStopped();
- )
- (s.rnamespace && !s.rnamespace.test(o.namespace)) ||
- ((s.handleObj = o),
- (s.data = o.data),
- (i = (
- (bt.event.special[o.origType] || {}).handle || o.handler
- ).apply(r.elem, u)),
- void 0 !== i &&
- (s.result = i) === !1 &&
- (s.preventDefault(), s.stopPropagation()));
- return f.postDispatch && f.postDispatch.call(this, s), s.result;
- }
- },
- handlers: function (t, e) {
- var n,
- i,
- r,
- o,
- a,
- s = [],
- u = e.delegateCount,
- l = t.target;
- if (u && l.nodeType && !('click' === t.type && t.button >= 1))
- for (; l !== this; l = l.parentNode || this)
- if (
- 1 === l.nodeType &&
- ('click' !== t.type || l.disabled !== !0)
- ) {
- for (o = [], a = {}, n = 0; n < u; n++)
- (i = e[n]),
- (r = i.selector + ' '),
- void 0 === a[r] &&
- (a[r] = i.needsContext
- ? bt(r, this).index(l) > -1
- : bt.find(r, this, null, [l]).length),
- a[r] && o.push(i);
- o.length && s.push({elem: l, handlers: o});
- }
- return (
- (l = this),
- u < e.length && s.push({elem: l, handlers: e.slice(u)}),
- s
- );
- },
- addProp: function (t, e) {
- Object.defineProperty(bt.Event.prototype, t, {
- enumerable: !0,
- configurable: !0,
- get: bt.isFunction(e)
- ? function () {
- if (this.originalEvent) return e(this.originalEvent);
- }
- : function () {
- if (this.originalEvent) return this.originalEvent[t];
- },
- set: function (e) {
- Object.defineProperty(this, t, {
- enumerable: !0,
- configurable: !0,
- writable: !0,
- value: e,
- });
- },
- });
- },
- fix: function (t) {
- return t[bt.expando] ? t : new bt.Event(t);
- },
- special: {
- load: {noBubble: !0},
- focus: {
- trigger: function () {
- if (this !== D() && this.focus) return this.focus(), !1;
- },
- delegateType: 'focusin',
- },
- blur: {
- trigger: function () {
- if (this === D() && this.blur) return this.blur(), !1;
- },
- delegateType: 'focusout',
- },
- click: {
- trigger: function () {
- if (
- 'checkbox' === this.type &&
- this.click &&
- l(this, 'input')
- )
- return this.click(), !1;
- },
- _default: function (t) {
- return l(t.target, 'a');
- },
- },
- beforeunload: {
- postDispatch: function (t) {
- void 0 !== t.result &&
- t.originalEvent &&
- (t.originalEvent.returnValue = t.result);
- },
- },
- },
- }),
- (bt.removeEvent = function (t, e, n) {
- t.removeEventListener && t.removeEventListener(e, n);
- }),
- (bt.Event = function (t, e) {
- return this instanceof bt.Event
- ? (t && t.type
- ? ((this.originalEvent = t),
- (this.type = t.type),
- (this.isDefaultPrevented =
- t.defaultPrevented ||
- (void 0 === t.defaultPrevented && t.returnValue === !1)
- ? T
- : k),
- (this.target =
- t.target && 3 === t.target.nodeType
- ? t.target.parentNode
- : t.target),
- (this.currentTarget = t.currentTarget),
- (this.relatedTarget = t.relatedTarget))
- : (this.type = t),
- e && bt.extend(this, e),
- (this.timeStamp = (t && t.timeStamp) || bt.now()),
- void (this[bt.expando] = !0))
- : new bt.Event(t, e);
- }),
- (bt.Event.prototype = {
- constructor: bt.Event,
- isDefaultPrevented: k,
- isPropagationStopped: k,
- isImmediatePropagationStopped: k,
- isSimulated: !1,
- preventDefault: function () {
- var t = this.originalEvent;
- (this.isDefaultPrevented = T),
- t && !this.isSimulated && t.preventDefault();
- },
- stopPropagation: function () {
- var t = this.originalEvent;
- (this.isPropagationStopped = T),
- t && !this.isSimulated && t.stopPropagation();
- },
- stopImmediatePropagation: function () {
- var t = this.originalEvent;
- (this.isImmediatePropagationStopped = T),
- t && !this.isSimulated && t.stopImmediatePropagation(),
- this.stopPropagation();
- },
- }),
- bt.each(
- {
- altKey: !0,
- bubbles: !0,
- cancelable: !0,
- changedTouches: !0,
- ctrlKey: !0,
- detail: !0,
- eventPhase: !0,
- metaKey: !0,
- pageX: !0,
- pageY: !0,
- shiftKey: !0,
- view: !0,
- char: !0,
- charCode: !0,
- key: !0,
- keyCode: !0,
- button: !0,
- buttons: !0,
- clientX: !0,
- clientY: !0,
- offsetX: !0,
- offsetY: !0,
- pointerId: !0,
- pointerType: !0,
- screenX: !0,
- screenY: !0,
- targetTouches: !0,
- toElement: !0,
- touches: !0,
- which: function (t) {
- var e = t.button;
- return null == t.which && ie.test(t.type)
- ? null != t.charCode
- ? t.charCode
- : t.keyCode
- : !t.which && void 0 !== e && re.test(t.type)
- ? 1 & e
- ? 1
- : 2 & e
- ? 3
- : 4 & e
- ? 2
- : 0
- : t.which;
- },
- },
- bt.event.addProp
- ),
- bt.each(
- {
- mouseenter: 'mouseover',
- mouseleave: 'mouseout',
- pointerenter: 'pointerover',
- pointerleave: 'pointerout',
- },
- function (t, e) {
- bt.event.special[t] = {
- delegateType: e,
- bindType: e,
- handle: function (t) {
- var n,
- i = this,
- r = t.relatedTarget,
- o = t.handleObj;
- return (
- (r && (r === i || bt.contains(i, r))) ||
- ((t.type = o.origType),
- (n = o.handler.apply(this, arguments)),
- (t.type = e)),
- n
- );
- },
- };
- }
- ),
- bt.fn.extend({
- on: function (t, e, n, i) {
- return M(this, t, e, n, i);
- },
- one: function (t, e, n, i) {
- return M(this, t, e, n, i, 1);
- },
- off: function (t, e, i) {
- var r, o;
- if (t && t.preventDefault && t.handleObj)
- return (
- (r = t.handleObj),
- bt(t.delegateTarget).off(
- r.namespace ? r.origType + '.' + r.namespace : r.origType,
- r.selector,
- r.handler
- ),
- this
- );
- if (
- 'object' === ('undefined' == typeof t ? 'undefined' : n(t))
- ) {
- for (o in t) this.off(o, e, t[o]);
- return this;
- }
- return (
- (e !== !1 && 'function' != typeof e) ||
- ((i = e), (e = void 0)),
- i === !1 && (i = k),
- this.each(function () {
- bt.event.remove(this, t, i, e);
- })
- );
- },
- });
- var ae = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
- se = /<script|<style|<link/i,
- ue = /checked\s*(?:[^=]|=\s*.checked.)/i,
- le = /^true\/(.*)/,
- fe = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
- bt.extend({
- htmlPrefilter: function (t) {
- return t.replace(ae, '<$1></$2>');
- },
- clone: function t(e, n, i) {
- var r,
- o,
- a,
- s,
- t = e.cloneNode(!0),
- u = bt.contains(e.ownerDocument, e);
- if (
- !(
- gt.noCloneChecked ||
- (1 !== e.nodeType && 11 !== e.nodeType) ||
- bt.isXMLDoc(e)
- )
- )
- for (s = P(t), a = P(e), r = 0, o = a.length; r < o; r++)
- A(a[r], s[r]);
- if (n)
- if (i)
- for (
- a = a || P(e), s = s || P(t), r = 0, o = a.length;
- r < o;
- r++
- )
- I(a[r], s[r]);
- else I(e, t);
- return (
- (s = P(t, 'script')),
- s.length > 0 && C(s, !u && P(e, 'script')),
- t
- );
- },
- cleanData: function (t) {
- for (
- var e, n, i, r = bt.event.special, o = 0;
- void 0 !== (n = t[o]);
- o++
- )
- if (qt(n)) {
- if ((e = n[Ht.expando])) {
- if (e.events)
- for (i in e.events)
- r[i]
- ? bt.event.remove(n, i)
- : bt.removeEvent(n, i, e.handle);
- n[Ht.expando] = void 0;
- }
- n[jt.expando] && (n[jt.expando] = void 0);
- }
- },
- }),
- bt.fn.extend({
- detach: function (t) {
- return O(this, t, !0);
- },
- remove: function (t) {
- return O(this, t);
- },
- text: function (t) {
- return Nt(
- this,
- function (t) {
- return void 0 === t
- ? bt.text(this)
- : this.empty().each(function () {
- (1 !== this.nodeType &&
- 11 !== this.nodeType &&
- 9 !== this.nodeType) ||
- (this.textContent = t);
- });
- },
- null,
- t,
- arguments.length
- );
- },
- append: function () {
- return F(this, arguments, function (t) {
- if (
- 1 === this.nodeType ||
- 11 === this.nodeType ||
- 9 === this.nodeType
- ) {
- var e = R(this, t);
- e.appendChild(t);
- }
- });
- },
- prepend: function () {
- return F(this, arguments, function (t) {
- if (
- 1 === this.nodeType ||
- 11 === this.nodeType ||
- 9 === this.nodeType
- ) {
- var e = R(this, t);
- e.insertBefore(t, e.firstChild);
- }
- });
- },
- before: function () {
- return F(this, arguments, function (t) {
- this.parentNode && this.parentNode.insertBefore(t, this);
- });
- },
- after: function () {
- return F(this, arguments, function (t) {
- this.parentNode &&
- this.parentNode.insertBefore(t, this.nextSibling);
- });
- },
- empty: function () {
- for (var t, e = 0; null != (t = this[e]); e++)
- 1 === t.nodeType &&
- (bt.cleanData(P(t, !1)), (t.textContent = ''));
- return this;
- },
- clone: function (t, e) {
- return (
- (t = null != t && t),
- (e = null == e ? t : e),
- this.map(function () {
- return bt.clone(this, t, e);
- })
- );
- },
- html: function (t) {
- return Nt(
- this,
- function (t) {
- var e = this[0] || {},
- n = 0,
- i = this.length;
- if (void 0 === t && 1 === e.nodeType) return e.innerHTML;
- if (
- 'string' == typeof t &&
- !se.test(t) &&
- !te[(Zt.exec(t) || ['', ''])[1].toLowerCase()]
- ) {
- t = bt.htmlPrefilter(t);
- try {
- for (; n < i; n++)
- (e = this[n] || {}),
- 1 === e.nodeType &&
- (bt.cleanData(P(e, !1)), (e.innerHTML = t));
- e = 0;
- } catch (t) {
- }
- }
- e && this.empty().append(t);
- },
- null,
- t,
- arguments.length
- );
- },
- replaceWith: function () {
- var t = [];
- return F(
- this,
- arguments,
- function (e) {
- var n = this.parentNode;
- bt.inArray(this, t) < 0 &&
- (bt.cleanData(P(this)), n && n.replaceChild(e, this));
- },
- t
- );
- },
- }),
- bt.each(
- {
- appendTo: 'append',
- prependTo: 'prepend',
- insertBefore: 'before',
- insertAfter: 'after',
- replaceAll: 'replaceWith',
- },
- function (t, e) {
- bt.fn[t] = function (t) {
- for (
- var n, i = [], r = bt(t), o = r.length - 1, a = 0;
- a <= o;
- a++
- )
- (n = a === o ? this : this.clone(!0)),
- bt(r[a])[e](n),
- ct.apply(i, n.get());
- return this.pushStack(i);
- };
- }
- );
- var ce = /^margin/,
- he = new RegExp('^(' + Gt + ')(?!px)[a-z%]+$', 'i'),
- de = function (t) {
- var e = t.ownerDocument.defaultView;
- return (e && e.opener) || (e = o), e.getComputedStyle(t);
- };
- !(function () {
- function t() {
- if (s) {
- (s.style.cssText =
- 'box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%'),
- (s.innerHTML = ''),
- ne.appendChild(a);
- var t = o.getComputedStyle(s);
- (e = '1%' !== t.top),
- (r = '2px' === t.marginLeft),
- (n = '4px' === t.width),
- (s.style.marginRight = '50%'),
- (i = '4px' === t.marginRight),
- ne.removeChild(a),
- (s = null);
- }
- }
- var e,
- n,
- i,
- r,
- a = st.createElement('div'),
- s = st.createElement('div');
- s.style &&
- ((s.style.backgroundClip = 'content-box'),
- (s.cloneNode(!0).style.backgroundClip = ''),
- (gt.clearCloneStyle = 'content-box' === s.style.backgroundClip),
- (a.style.cssText =
- 'border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute'),
- a.appendChild(s),
- bt.extend(gt, {
- pixelPosition: function () {
- return t(), e;
- },
- boxSizingReliable: function () {
- return t(), n;
- },
- pixelMarginRight: function () {
- return t(), i;
- },
- reliableMarginLeft: function () {
- return t(), r;
- },
- }));
- })();
- var pe = /^(none|table(?!-c[ea]).+)/,
- ye = /^--/,
- me = {
- position: 'absolute',
- visibility: 'hidden',
- display: 'block',
- },
- ve = {letterSpacing: '0', fontWeight: '400'},
- ge = ['Webkit', 'Moz', 'ms'],
- Se = st.createElement('div').style;
- bt.extend({
- cssHooks: {
- opacity: {
- get: function (t, e) {
- if (e) {
- var n = B(t, 'opacity');
- return '' === n ? '1' : n;
- }
- },
- },
- },
- cssNumber: {
- animationIterationCount: !0,
- columnCount: !0,
- fillOpacity: !0,
- flexGrow: !0,
- flexShrink: !0,
- fontWeight: !0,
- lineHeight: !0,
- opacity: !0,
- order: !0,
- orphans: !0,
- widows: !0,
- zIndex: !0,
- zoom: !0,
- },
- cssProps: {float: 'cssFloat'},
- style: function t(e, i, r, o) {
- if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
- var a,
- s,
- u,
- l = bt.camelCase(i),
- f = ye.test(i),
- t = e.style;
- return (
- f || (i = q(l)),
- (u = bt.cssHooks[i] || bt.cssHooks[l]),
- void 0 === r
- ? u && 'get' in u && void 0 !== (a = u.get(e, !1, o))
- ? a
- : t[i]
- : ((s = 'undefined' == typeof r ? 'undefined' : n(r)),
- 'string' === s &&
- (a = Vt.exec(r)) &&
- a[1] &&
- ((r = b(e, i, a)), (s = 'number')),
- null != r &&
- r === r &&
- ('number' === s &&
- (r += (a && a[3]) || (bt.cssNumber[l] ? '' : 'px')),
- gt.clearCloneStyle ||
- '' !== r ||
- 0 !== i.indexOf('background') ||
- (t[i] = 'inherit'),
- (u && 'set' in u && void 0 === (r = u.set(e, r, o))) ||
- (f ? t.setProperty(i, r) : (t[i] = r))),
- void 0)
- );
- }
- },
- css: function (t, e, n, i) {
- var r,
- o,
- a,
- s = bt.camelCase(e),
- u = ye.test(e);
- return (
- u || (e = q(s)),
- (a = bt.cssHooks[e] || bt.cssHooks[s]),
- a && 'get' in a && (r = a.get(t, !0, n)),
- void 0 === r && (r = B(t, e, i)),
- 'normal' === r && e in ve && (r = ve[e]),
- '' === n || n
- ? ((o = parseFloat(r)), n === !0 || isFinite(o) ? o || 0 : r)
- : r
- );
- },
- }),
- bt.each(['height', 'width'], function (t, e) {
- bt.cssHooks[e] = {
- get: function (t, n, i) {
- if (n)
- return !pe.test(bt.css(t, 'display')) ||
- (t.getClientRects().length &&
- t.getBoundingClientRect().width)
- ? W(t, e, i)
- : Jt(t, me, function () {
- return W(t, e, i);
- });
- },
- set: function (t, n, i) {
- var r,
- o = i && de(t),
- a =
- i &&
- j(
- t,
- e,
- i,
- 'border-box' === bt.css(t, 'boxSizing', !1, o),
- o
- );
- return (
- a &&
- (r = Vt.exec(n)) &&
- 'px' !== (r[3] || 'px') &&
- ((t.style[e] = n), (n = bt.css(t, e))),
- H(t, n, a)
- );
- },
- };
- }),
- (bt.cssHooks.marginLeft = L(gt.reliableMarginLeft, function (t, e) {
- if (e)
- return (
- (parseFloat(B(t, 'marginLeft')) ||
- t.getBoundingClientRect().left -
- Jt(t, {marginLeft: 0}, function () {
- return t.getBoundingClientRect().left;
- })) + 'px'
- );
- })),
- bt.each({margin: '', padding: '', border: 'Width'}, function (
- t,
- e
- ) {
- (bt.cssHooks[t + e] = {
- expand: function (n) {
- for (
- var i = 0,
- r = {},
- o = 'string' == typeof n ? n.split(' ') : [n];
- i < 4;
- i++
- )
- r[t + Yt[i] + e] = o[i] || o[i - 2] || o[0];
- return r;
- },
- }),
- ce.test(t) || (bt.cssHooks[t + e].set = H);
- }),
- bt.fn.extend({
- css: function (t, e) {
- return Nt(
- this,
- function (t, e, n) {
- var i,
- r,
- o = {},
- a = 0;
- if (Array.isArray(e)) {
- for (i = de(t), r = e.length; a < r; a++)
- o[e[a]] = bt.css(t, e[a], !1, i);
- return o;
- }
- return void 0 !== n ? bt.style(t, e, n) : bt.css(t, e);
- },
- t,
- e,
- arguments.length > 1
- );
- },
- }),
- (bt.Tween = U),
- (U.prototype = {
- constructor: U,
- init: function (t, e, n, i, r, o) {
- (this.elem = t),
- (this.prop = n),
- (this.easing = r || bt.easing._default),
- (this.options = e),
- (this.start = this.now = this.cur()),
- (this.end = i),
- (this.unit = o || (bt.cssNumber[n] ? '' : 'px'));
- },
- cur: function () {
- var t = U.propHooks[this.prop];
- return t && t.get
- ? t.get(this)
- : U.propHooks._default.get(this);
- },
- run: function (t) {
- var e,
- n = U.propHooks[this.prop];
- return (
- this.options.duration
- ? (this.pos = e = bt.easing[this.easing](
- t,
- this.options.duration * t,
- 0,
- 1,
- this.options.duration
- ))
- : (this.pos = e = t),
- (this.now = (this.end - this.start) * e + this.start),
- this.options.step &&
- this.options.step.call(this.elem, this.now, this),
- n && n.set ? n.set(this) : U.propHooks._default.set(this),
- this
- );
- },
- }),
- (U.prototype.init.prototype = U.prototype),
- (U.propHooks = {
- _default: {
- get: function (t) {
- var e;
- return 1 !== t.elem.nodeType ||
- (null != t.elem[t.prop] && null == t.elem.style[t.prop])
- ? t.elem[t.prop]
- : ((e = bt.css(t.elem, t.prop, '')),
- e && 'auto' !== e ? e : 0);
- },
- set: function (t) {
- bt.fx.step[t.prop]
- ? bt.fx.step[t.prop](t)
- : 1 !== t.elem.nodeType ||
- (null == t.elem.style[bt.cssProps[t.prop]] &&
- !bt.cssHooks[t.prop])
- ? (t.elem[t.prop] = t.now)
- : bt.style(t.elem, t.prop, t.now + t.unit);
- },
- },
- }),
- (U.propHooks.scrollTop = U.propHooks.scrollLeft = {
- set: function (t) {
- t.elem.nodeType &&
- t.elem.parentNode &&
- (t.elem[t.prop] = t.now);
- },
- }),
- (bt.easing = {
- linear: function (t) {
- return t;
- },
- swing: function (t) {
- return 0.5 - Math.cos(t * Math.PI) / 2;
- },
- _default: 'swing',
- }),
- (bt.fx = U.prototype.init),
- (bt.fx.step = {});
- var be,
- we,
- _e = /^(?:toggle|show|hide)$/,
- Pe = /queueHooks$/;
- (bt.Animation = bt.extend(K, {
- tweeners: {
- '*': [
- function (t, e) {
- var n = this.createTween(t, e);
- return b(n.elem, t, Vt.exec(e), n), n;
- },
- ],
- },
- tweener: function (t, e) {
- bt.isFunction(t) ? ((e = t), (t = ['*'])) : (t = t.match(Ot));
- for (var n, i = 0, r = t.length; i < r; i++)
- (n = t[i]),
- (K.tweeners[n] = K.tweeners[n] || []),
- K.tweeners[n].unshift(e);
- },
- prefilters: [J],
- prefilter: function (t, e) {
- e ? K.prefilters.unshift(t) : K.prefilters.push(t);
- },
- })),
- (bt.speed = function (t, e, i) {
- var r =
- t && 'object' === ('undefined' == typeof t ? 'undefined' : n(t))
- ? bt.extend({}, t)
- : {
- complete: i || (!i && e) || (bt.isFunction(t) && t),
- duration: t,
- easing: (i && e) || (e && !bt.isFunction(e) && e),
- };
- return (
- bt.fx.off
- ? (r.duration = 0)
- : 'number' != typeof r.duration &&
- (r.duration in bt.fx.speeds
- ? (r.duration = bt.fx.speeds[r.duration])
- : (r.duration = bt.fx.speeds._default)),
- (null != r.queue && r.queue !== !0) || (r.queue = 'fx'),
- (r.old = r.complete),
- (r.complete = function () {
- bt.isFunction(r.old) && r.old.call(this),
- r.queue && bt.dequeue(this, r.queue);
- }),
- r
- );
- }),
- bt.fn.extend({
- fadeTo: function (t, e, n, i) {
- return this.filter(Xt)
- .css('opacity', 0)
- .show()
- .end()
- .animate({opacity: e}, t, n, i);
- },
- animate: function (t, e, n, i) {
- var r = bt.isEmptyObject(t),
- o = bt.speed(e, n, i),
- a = function () {
- var e = K(this, bt.extend({}, t), o);
- (r || Ht.get(this, 'finish')) && e.stop(!0);
- };
- return (
- (a.finish = a),
- r || o.queue === !1 ? this.each(a) : this.queue(o.queue, a)
- );
- },
- stop: function (t, e, n) {
- var i = function (t) {
- var e = t.stop;
- delete t.stop, e(n);
- };
- return (
- 'string' != typeof t && ((n = e), (e = t), (t = void 0)),
- e && t !== !1 && this.queue(t || 'fx', []),
- this.each(function () {
- var e = !0,
- r = null != t && t + 'queueHooks',
- o = bt.timers,
- a = Ht.get(this);
- if (r) a[r] && a[r].stop && i(a[r]);
- else
- for (r in a) a[r] && a[r].stop && Pe.test(r) && i(a[r]);
- for (r = o.length; r--;)
- o[r].elem !== this ||
- (null != t && o[r].queue !== t) ||
- (o[r].anim.stop(n), (e = !1), o.splice(r, 1));
- (!e && n) || bt.dequeue(this, t);
- })
- );
- },
- finish: function (t) {
- return (
- t !== !1 && (t = t || 'fx'),
- this.each(function () {
- var e,
- n = Ht.get(this),
- i = n[t + 'queue'],
- r = n[t + 'queueHooks'],
- o = bt.timers,
- a = i ? i.length : 0;
- for (
- n.finish = !0,
- bt.queue(this, t, []),
- r && r.stop && r.stop.call(this, !0),
- e = o.length;
- e--;
- )
- o[e].elem === this &&
- o[e].queue === t &&
- (o[e].anim.stop(!0), o.splice(e, 1));
- for (e = 0; e < a; e++)
- i[e] && i[e].finish && i[e].finish.call(this);
- delete n.finish;
- })
- );
- },
- }),
- bt.each(['toggle', 'show', 'hide'], function (t, e) {
- var n = bt.fn[e];
- bt.fn[e] = function (t, i, r) {
- return null == t || 'boolean' == typeof t
- ? n.apply(this, arguments)
- : this.animate(Y(e, !0), t, i, r);
- };
- }),
- bt.each(
- {
- slideDown: Y('show'),
- slideUp: Y('hide'),
- slideToggle: Y('toggle'),
- fadeIn: {opacity: 'show'},
- fadeOut: {opacity: 'hide'},
- fadeToggle: {opacity: 'toggle'},
- },
- function (t, e) {
- bt.fn[t] = function (t, n, i) {
- return this.animate(e, t, n, i);
- };
- }
- ),
- (bt.timers = []),
- (bt.fx.tick = function () {
- var t,
- e = 0,
- n = bt.timers;
- for (be = bt.now(); e < n.length; e++)
- (t = n[e]), t() || n[e] !== t || n.splice(e--, 1);
- n.length || bt.fx.stop(), (be = void 0);
- }),
- (bt.fx.timer = function (t) {
- bt.timers.push(t), bt.fx.start();
- }),
- (bt.fx.interval = 13),
- (bt.fx.start = function () {
- we || ((we = !0), G());
- }),
- (bt.fx.stop = function () {
- we = null;
- }),
- (bt.fx.speeds = {slow: 600, fast: 200, _default: 400}),
- (bt.fn.delay = function (t, e) {
- return (
- (t = bt.fx ? bt.fx.speeds[t] || t : t),
- (e = e || 'fx'),
- this.queue(e, function (e, n) {
- var i = o.setTimeout(e, t);
- n.stop = function () {
- o.clearTimeout(i);
- };
- })
- );
- }),
- (function () {
- var t = st.createElement('input'),
- e = st.createElement('select'),
- n = e.appendChild(st.createElement('option'));
- (t.type = 'checkbox'),
- (gt.checkOn = '' !== t.value),
- (gt.optSelected = n.selected),
- (t = st.createElement('input')),
- (t.value = 't'),
- (t.type = 'radio'),
- (gt.radioValue = 't' === t.value);
- })();
- var Ce,
- xe = bt.expr.attrHandle;
- bt.fn.extend({
- attr: function (t, e) {
- return Nt(this, bt.attr, t, e, arguments.length > 1);
- },
- removeAttr: function (t) {
- return this.each(function () {
- bt.removeAttr(this, t);
- });
- },
- }),
- bt.extend({
- attr: function (t, e, n) {
- var i,
- r,
- o = t.nodeType;
- if (3 !== o && 8 !== o && 2 !== o)
- return 'undefined' == typeof t.getAttribute
- ? bt.prop(t, e, n)
- : ((1 === o && bt.isXMLDoc(t)) ||
- (r =
- bt.attrHooks[e.toLowerCase()] ||
- (bt.expr.match.bool.test(e) ? Ce : void 0)),
- void 0 !== n
- ? null === n
- ? void bt.removeAttr(t, e)
- : r && 'set' in r && void 0 !== (i = r.set(t, n, e))
- ? i
- : (t.setAttribute(e, n + ''), n)
- : r && 'get' in r && null !== (i = r.get(t, e))
- ? i
- : ((i = bt.find.attr(t, e)), null == i ? void 0 : i));
- },
- attrHooks: {
- type: {
- set: function (t, e) {
- if (!gt.radioValue && 'radio' === e && l(t, 'input')) {
- var n = t.value;
- return t.setAttribute('type', e), n && (t.value = n), e;
- }
- },
- },
- },
- removeAttr: function (t, e) {
- var n,
- i = 0,
- r = e && e.match(Ot);
- if (r && 1 === t.nodeType)
- for (; (n = r[i++]);) t.removeAttribute(n);
- },
- }),
- (Ce = {
- set: function (t, e, n) {
- return e === !1 ? bt.removeAttr(t, n) : t.setAttribute(n, n), n;
- },
- }),
- bt.each(bt.expr.match.bool.source.match(/\w+/g), function (t, e) {
- var n = xe[e] || bt.find.attr;
- xe[e] = function (t, e, i) {
- var r,
- o,
- a = e.toLowerCase();
- return (
- i ||
- ((o = xe[a]),
- (xe[a] = r),
- (r = null != n(t, e, i) ? a : null),
- (xe[a] = o)),
- r
- );
- };
- });
- var Te = /^(?:input|select|textarea|button)$/i,
- ke = /^(?:a|area)$/i;
- bt.fn.extend({
- prop: function (t, e) {
- return Nt(this, bt.prop, t, e, arguments.length > 1);
- },
- removeProp: function (t) {
- return this.each(function () {
- delete this[bt.propFix[t] || t];
- });
- },
- }),
- bt.extend({
- prop: function (t, e, n) {
- var i,
- r,
- o = t.nodeType;
- if (3 !== o && 8 !== o && 2 !== o)
- return (
- (1 === o && bt.isXMLDoc(t)) ||
- ((e = bt.propFix[e] || e), (r = bt.propHooks[e])),
- void 0 !== n
- ? r && 'set' in r && void 0 !== (i = r.set(t, n, e))
- ? i
- : (t[e] = n)
- : r && 'get' in r && null !== (i = r.get(t, e))
- ? i
- : t[e]
- );
- },
- propHooks: {
- tabIndex: {
- get: function (t) {
- var e = bt.find.attr(t, 'tabindex');
- return e
- ? parseInt(e, 10)
- : Te.test(t.nodeName) || (ke.test(t.nodeName) && t.href)
- ? 0
- : -1;
- },
- },
- },
- propFix: {for: 'htmlFor', class: 'className'},
- }),
- gt.optSelected ||
- (bt.propHooks.selected = {
- get: function (t) {
- var e = t.parentNode;
- return e && e.parentNode && e.parentNode.selectedIndex, null;
- },
- set: function (t) {
- var e = t.parentNode;
- e &&
- (e.selectedIndex,
- e.parentNode && e.parentNode.selectedIndex);
- },
- }),
- bt.each(
- [
- 'tabIndex',
- 'readOnly',
- 'maxLength',
- 'cellSpacing',
- 'cellPadding',
- 'rowSpan',
- 'colSpan',
- 'useMap',
- 'frameBorder',
- 'contentEditable',
- ],
- function () {
- bt.propFix[this.toLowerCase()] = this;
- }
- ),
- bt.fn.extend({
- addClass: function (t) {
- var e,
- n,
- i,
- r,
- o,
- a,
- s,
- u = 0;
- if (bt.isFunction(t))
- return this.each(function (e) {
- bt(this).addClass(t.call(this, e, Q(this)));
- });
- if ('string' == typeof t && t)
- for (e = t.match(Ot) || []; (n = this[u++]);)
- if (
- ((r = Q(n)), (i = 1 === n.nodeType && ' ' + Z(r) + ' '))
- ) {
- for (a = 0; (o = e[a++]);)
- i.indexOf(' ' + o + ' ') < 0 && (i += o + ' ');
- (s = Z(i)), r !== s && n.setAttribute('class', s);
- }
- return this;
- },
- removeClass: function (t) {
- var e,
- n,
- i,
- r,
- o,
- a,
- s,
- u = 0;
- if (bt.isFunction(t))
- return this.each(function (e) {
- bt(this).removeClass(t.call(this, e, Q(this)));
- });
- if (!arguments.length) return this.attr('class', '');
- if ('string' == typeof t && t)
- for (e = t.match(Ot) || []; (n = this[u++]);)
- if (
- ((r = Q(n)), (i = 1 === n.nodeType && ' ' + Z(r) + ' '))
- ) {
- for (a = 0; (o = e[a++]);)
- for (; i.indexOf(' ' + o + ' ') > -1;)
- i = i.replace(' ' + o + ' ', ' ');
- (s = Z(i)), r !== s && n.setAttribute('class', s);
- }
- return this;
- },
- toggleClass: function (t, e) {
- var i = 'undefined' == typeof t ? 'undefined' : n(t);
- return 'boolean' == typeof e && 'string' === i
- ? e
- ? this.addClass(t)
- : this.removeClass(t)
- : bt.isFunction(t)
- ? this.each(function (n) {
- bt(this).toggleClass(t.call(this, n, Q(this), e), e);
- })
- : this.each(function () {
- var e, n, r, o;
- if ('string' === i)
- for (
- n = 0, r = bt(this), o = t.match(Ot) || [];
- (e = o[n++]);
- )
- r.hasClass(e) ? r.removeClass(e) : r.addClass(e);
- else
- (void 0 !== t && 'boolean' !== i) ||
- ((e = Q(this)),
- e && Ht.set(this, '__className__', e),
- this.setAttribute &&
- this.setAttribute(
- 'class',
- e || t === !1
- ? ''
- : Ht.get(this, '__className__') || ''
- ));
- });
- },
- hasClass: function (t) {
- var e,
- n,
- i = 0;
- for (e = ' ' + t + ' '; (n = this[i++]);)
- if (1 === n.nodeType && (' ' + Z(Q(n)) + ' ').indexOf(e) > -1)
- return !0;
- return !1;
- },
- });
- var De = /\r/g;
- bt.fn.extend({
- val: function (t) {
- var e,
- n,
- i,
- r = this[0];
- {
- if (arguments.length)
- return (
- (i = bt.isFunction(t)),
- this.each(function (n) {
- var r;
- 1 === this.nodeType &&
- ((r = i ? t.call(this, n, bt(this).val()) : t),
- null == r
- ? (r = '')
- : 'number' == typeof r
- ? (r += '')
- : Array.isArray(r) &&
- (r = bt.map(r, function (t) {
- return null == t ? '' : t + '';
- })),
- (e =
- bt.valHooks[this.type] ||
- bt.valHooks[this.nodeName.toLowerCase()]),
- (e &&
- 'set' in e &&
- void 0 !== e.set(this, r, 'value')) ||
- (this.value = r));
- })
- );
- if (r)
- return (
- (e =
- bt.valHooks[r.type] ||
- bt.valHooks[r.nodeName.toLowerCase()]),
- e && 'get' in e && void 0 !== (n = e.get(r, 'value'))
- ? n
- : ((n = r.value),
- 'string' == typeof n
- ? n.replace(De, '')
- : null == n
- ? ''
- : n)
- );
- }
- },
- }),
- bt.extend({
- valHooks: {
- option: {
- get: function (t) {
- var e = bt.find.attr(t, 'value');
- return null != e ? e : Z(bt.text(t));
- },
- },
- select: {
- get: function (t) {
- var e,
- n,
- i,
- r = t.options,
- o = t.selectedIndex,
- a = 'select-one' === t.type,
- s = a ? null : [],
- u = a ? o + 1 : r.length;
- for (i = o < 0 ? u : a ? o : 0; i < u; i++)
- if (
- ((n = r[i]),
- (n.selected || i === o) &&
- !n.disabled &&
- (!n.parentNode.disabled ||
- !l(n.parentNode, 'optgroup')))
- ) {
- if (((e = bt(n).val()), a)) return e;
- s.push(e);
- }
- return s;
- },
- set: function (t, e) {
- for (
- var n,
- i,
- r = t.options,
- o = bt.makeArray(e),
- a = r.length;
- a--;
- )
- (i = r[a]),
- (i.selected =
- bt.inArray(bt.valHooks.option.get(i), o) > -1) &&
- (n = !0);
- return n || (t.selectedIndex = -1), o;
- },
- },
- },
- }),
- bt.each(['radio', 'checkbox'], function () {
- (bt.valHooks[this] = {
- set: function (t, e) {
- if (Array.isArray(e))
- return (t.checked = bt.inArray(bt(t).val(), e) > -1);
- },
- }),
- gt.checkOn ||
- (bt.valHooks[this].get = function (t) {
- return null === t.getAttribute('value') ? 'on' : t.value;
- });
- });
- var Me = /^(?:focusinfocus|focusoutblur)$/;
- bt.extend(bt.event, {
- trigger: function (t, e, i, r) {
- var a,
- s,
- u,
- l,
- f,
- c,
- h,
- d = [i || st],
- p = yt.call(t, 'type') ? t.type : t,
- y = yt.call(t, 'namespace') ? t.namespace.split('.') : [];
- if (
- ((s = u = i = i || st),
- 3 !== i.nodeType &&
- 8 !== i.nodeType &&
- !Me.test(p + bt.event.triggered) &&
- (p.indexOf('.') > -1 &&
- ((y = p.split('.')), (p = y.shift()), y.sort()),
- (f = p.indexOf(':') < 0 && 'on' + p),
- (t = t[bt.expando]
- ? t
- : new bt.Event(
- p,
- 'object' ===
- ('undefined' == typeof t ? 'undefined' : n(t)) && t
- )),
- (t.isTrigger = r ? 2 : 3),
- (t.namespace = y.join('.')),
- (t.rnamespace = t.namespace
- ? new RegExp(
- '(^|\\.)' + y.join('\\.(?:.*\\.|)') + '(\\.|$)'
- )
- : null),
- (t.result = void 0),
- t.target || (t.target = i),
- (e = null == e ? [t] : bt.makeArray(e, [t])),
- (h = bt.event.special[p] || {}),
- r || !h.trigger || h.trigger.apply(i, e) !== !1))
- ) {
- if (!r && !h.noBubble && !bt.isWindow(i)) {
- for (
- l = h.delegateType || p,
- Me.test(l + p) || (s = s.parentNode);
- s;
- s = s.parentNode
- )
- d.push(s), (u = s);
- u === (i.ownerDocument || st) &&
- d.push(u.defaultView || u.parentWindow || o);
- }
- for (a = 0; (s = d[a++]) && !t.isPropagationStopped();)
- (t.type = a > 1 ? l : h.bindType || p),
- (c =
- (Ht.get(s, 'events') || {})[t.type] &&
- Ht.get(s, 'handle')),
- c && c.apply(s, e),
- (c = f && s[f]),
- c &&
- c.apply &&
- qt(s) &&
- ((t.result = c.apply(s, e)),
- t.result === !1 && t.preventDefault());
- return (
- (t.type = p),
- r ||
- t.isDefaultPrevented() ||
- (h._default && h._default.apply(d.pop(), e) !== !1) ||
- !qt(i) ||
- (f &&
- bt.isFunction(i[p]) &&
- !bt.isWindow(i) &&
- ((u = i[f]),
- u && (i[f] = null),
- (bt.event.triggered = p),
- i[p](),
- (bt.event.triggered = void 0),
- u && (i[f] = u))),
- t.result
- );
- }
- },
- simulate: function (t, e, n) {
- var i = bt.extend(new bt.Event(), n, {
- type: t,
- isSimulated: !0,
- });
- bt.event.trigger(i, null, e);
- },
- }),
- bt.fn.extend({
- trigger: function (t, e) {
- return this.each(function () {
- bt.event.trigger(t, e, this);
- });
- },
- triggerHandler: function (t, e) {
- var n = this[0];
- if (n) return bt.event.trigger(t, e, n, !0);
- },
- }),
- bt.each(
- 'blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu'.split(
- ' '
- ),
- function (t, e) {
- bt.fn[e] = function (t, n) {
- return arguments.length > 0
- ? this.on(e, null, t, n)
- : this.trigger(e);
- };
- }
- ),
- bt.fn.extend({
- hover: function (t, e) {
- return this.mouseenter(t).mouseleave(e || t);
- },
- }),
- (gt.focusin = 'onfocusin' in o),
- gt.focusin ||
- bt.each({focus: 'focusin', blur: 'focusout'}, function (t, e) {
- var n = function (t) {
- bt.event.simulate(e, t.target, bt.event.fix(t));
- };
- bt.event.special[e] = {
- setup: function () {
- var i = this.ownerDocument || this,
- r = Ht.access(i, e);
- r || i.addEventListener(t, n, !0),
- Ht.access(i, e, (r || 0) + 1);
- },
- teardown: function () {
- var i = this.ownerDocument || this,
- r = Ht.access(i, e) - 1;
- r
- ? Ht.access(i, e, r)
- : (i.removeEventListener(t, n, !0), Ht.remove(i, e));
- },
- };
- });
- var Re = o.location,
- Ee = bt.now(),
- ze = /\?/;
- bt.parseXML = function (t) {
- var e;
- if (!t || 'string' != typeof t) return null;
- try {
- e = new o.DOMParser().parseFromString(t, 'text/xml');
- } catch (t) {
- e = void 0;
- }
- return (
- (e && !e.getElementsByTagName('parsererror').length) ||
- bt.error('Invalid XML: ' + t),
- e
- );
- };
- var Ie = /\[\]$/,
- Ae = /\r?\n/g,
- Fe = /^(?:submit|button|image|reset|file)$/i,
- Oe = /^(?:input|select|textarea|keygen)/i;
- (bt.param = function (t, e) {
- var n,
- i = [],
- r = function (t, e) {
- var n = bt.isFunction(e) ? e() : e;
- i[i.length] =
- encodeURIComponent(t) +
- '=' +
- encodeURIComponent(null == n ? '' : n);
- };
- if (Array.isArray(t) || (t.jquery && !bt.isPlainObject(t)))
- bt.each(t, function () {
- r(this.name, this.value);
- });
- else for (n in t) tt(n, t[n], e, r);
- return i.join('&');
- }),
- bt.fn.extend({
- serialize: function () {
- return bt.param(this.serializeArray());
- },
- serializeArray: function () {
- return this.map(function () {
- var t = bt.prop(this, 'elements');
- return t ? bt.makeArray(t) : this;
- })
- .filter(function () {
- var t = this.type;
- return (
- this.name &&
- !bt(this).is(':disabled') &&
- Oe.test(this.nodeName) &&
- !Fe.test(t) &&
- (this.checked || !Kt.test(t))
- );
- })
- .map(function (t, e) {
- var n = bt(this).val();
- return null == n
- ? null
- : Array.isArray(n)
- ? bt.map(n, function (t) {
- return {
- name: e.name,
- value: t.replace(Ae, '\r\n'),
- };
- })
- : {name: e.name, value: n.replace(Ae, '\r\n')};
- })
- .get();
- },
- });
- var Be = /%20/g,
- Le = /#.*$/,
- Ne = /([?&])_=[^&]*/,
- qe = /^(.*?):[ \t]*([^\r\n]*)$/gm,
- He = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- je = /^(?:GET|HEAD)$/,
- We = /^\/\//,
- Ue = {},
- Ge = {},
- Ve = '*/'.concat('*'),
- Ye = st.createElement('a');
- (Ye.href = Re.href),
- bt.extend({
- active: 0,
- lastModified: {},
- etag: {},
- ajaxSettings: {
- url: Re.href,
- type: 'GET',
- isLocal: He.test(Re.protocol),
- global: !0,
- processData: !0,
- async: !0,
- contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
- accepts: {
- '*': Ve,
- text: 'text/plain',
- html: 'text/html',
- xml: 'application/xml, text/xml',
- json: 'application/json, text/javascript',
- },
- contents: {xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/},
- responseFields: {
- xml: 'responseXML',
- text: 'responseText',
- json: 'responseJSON',
- },
- converters: {
- '* text': String,
- 'text html': !0,
- 'text json': JSON.parse,
- 'text xml': bt.parseXML,
- },
- flatOptions: {url: !0, context: !0},
- },
- ajaxSetup: function (t, e) {
- return e
- ? it(it(t, bt.ajaxSettings), e)
- : it(bt.ajaxSettings, t);
- },
- ajaxPrefilter: et(Ue),
- ajaxTransport: et(Ge),
- ajax: function (t, e) {
- function i(t, e, n, i) {
- var u,
- f,
- d,
- p,
- w,
- _ = e;
- c ||
- ((c = !0),
- l && o.clearTimeout(l),
- (r = void 0),
- (s = i || ''),
- (C.readyState = t > 0 ? 4 : 0),
- (u = (t >= 200 && t < 300) || 304 === t),
- n && (p = rt(y, C, n)),
- (p = ot(y, p, C, u)),
- u
- ? (y.ifModified &&
- ((w = C.getResponseHeader('Last-Modified')),
- w && (bt.lastModified[a] = w),
- (w = C.getResponseHeader('etag')),
- w && (bt.etag[a] = w)),
- 204 === t || 'HEAD' === y.type
- ? (_ = 'nocontent')
- : 304 === t
- ? (_ = 'notmodified')
- : ((_ = p.state),
- (f = p.data),
- (d = p.error),
- (u = !d)))
- : ((d = _),
- (!t && _) || ((_ = 'error'), t < 0 && (t = 0))),
- (C.status = t),
- (C.statusText = (e || _) + ''),
- u
- ? g.resolveWith(m, [f, _, C])
- : g.rejectWith(m, [C, _, d]),
- C.statusCode(b),
- (b = void 0),
- h &&
- v.trigger(u ? 'ajaxSuccess' : 'ajaxError', [
- C,
- y,
- u ? f : d,
- ]),
- S.fireWith(m, [C, _]),
- h &&
- (v.trigger('ajaxComplete', [C, y]),
- --bt.active || bt.event.trigger('ajaxStop')));
- }
- 'object' === ('undefined' == typeof t ? 'undefined' : n(t)) &&
- ((e = t), (t = void 0)),
- (e = e || {});
- var r,
- a,
- s,
- u,
- l,
- f,
- c,
- h,
- d,
- p,
- y = bt.ajaxSetup({}, e),
- m = y.context || y,
- v = y.context && (m.nodeType || m.jquery) ? bt(m) : bt.event,
- g = bt.Deferred(),
- S = bt.Callbacks('once memory'),
- b = y.statusCode || {},
- w = {},
- _ = {},
- P = 'canceled',
- C = {
- readyState: 0,
- getResponseHeader: function (t) {
- var e;
- if (c) {
- if (!u)
- for (u = {}; (e = qe.exec(s));)
- u[e[1].toLowerCase()] = e[2];
- e = u[t.toLowerCase()];
- }
- return null == e ? null : e;
- },
- getAllResponseHeaders: function () {
- return c ? s : null;
- },
- setRequestHeader: function (t, e) {
- return (
- null == c &&
- ((t = _[t.toLowerCase()] = _[t.toLowerCase()] || t),
- (w[t] = e)),
- this
- );
- },
- overrideMimeType: function (t) {
- return null == c && (y.mimeType = t), this;
- },
- statusCode: function (t) {
- var e;
- if (t)
- if (c) C.always(t[C.status]);
- else for (e in t) b[e] = [b[e], t[e]];
- return this;
- },
- abort: function (t) {
- var e = t || P;
- return r && r.abort(e), i(0, e), this;
- },
- };
- if (
- (g.promise(C),
- (y.url = ((t || y.url || Re.href) + '').replace(
- We,
- Re.protocol + '//'
- )),
- (y.type = e.method || e.type || y.method || y.type),
- (y.dataTypes = (y.dataType || '*')
- .toLowerCase()
- .match(Ot) || ['']),
- null == y.crossDomain)
- ) {
- f = st.createElement('a');
- try {
- console.log("YE", Ye, Ye.host)
- (f.href = y.url),
- (f.href = f.href),
- (y.crossDomain =
- Ye.protocol + '//' + Ye.host !=
- f.protocol + '//' + f.host);
- } catch (t) {
- y.crossDomain = !0;
- }
- }
- if (
- (y.data &&
- y.processData &&
- 'string' != typeof y.data &&
- (y.data = bt.param(y.data, y.traditional)),
- nt(Ue, y, e, C),
- c)
- )
- return C;
- (h = bt.event && y.global),
- h && 0 === bt.active++ && bt.event.trigger('ajaxStart'),
- (y.type = y.type.toUpperCase()),
- (y.hasContent = !je.test(y.type)),
- (a = y.url.replace(Le, '')),
- y.hasContent
- ? y.data &&
- y.processData &&
- 0 ===
- (y.contentType || '').indexOf(
- 'application/x-www-form-urlencoded'
- ) &&
- (y.data = y.data.replace(Be, '+'))
- : ((p = y.url.slice(a.length)),
- y.data &&
- ((a += (ze.test(a) ? '&' : '?') + y.data),
- delete y.data),
- y.cache === !1 &&
- ((a = a.replace(Ne, '$1')),
- (p = (ze.test(a) ? '&' : '?') + '_=' + Ee++ + p)),
- (y.url = a + p)),
- y.ifModified &&
- (bt.lastModified[a] &&
- C.setRequestHeader(
- 'If-Modified-Since',
- bt.lastModified[a]
- ),
- bt.etag[a] &&
- C.setRequestHeader('If-None-Match', bt.etag[a])),
- ((y.data && y.hasContent && y.contentType !== !1) ||
- e.contentType) &&
- C.setRequestHeader('Content-Type', y.contentType),
- C.setRequestHeader(
- 'Accept',
- y.dataTypes[0] && y.accepts[y.dataTypes[0]]
- ? y.accepts[y.dataTypes[0]] +
- ('*' !== y.dataTypes[0] ? ', ' + Ve + '; q=0.01' : '')
- : y.accepts['*']
- );
- for (d in y.headers) C.setRequestHeader(d, y.headers[d]);
- if (y.beforeSend && (y.beforeSend.call(m, C, y) === !1 || c))
- return C.abort();
- if (
- ((P = 'abort'),
- S.add(y.complete),
- C.done(y.success),
- C.fail(y.error),
- (r = nt(Ge, y, e, C)))
- ) {
- if (
- ((C.readyState = 1), h && v.trigger('ajaxSend', [C, y]), c)
- )
- return C;
- y.async &&
- y.timeout > 0 &&
- (l = o.setTimeout(function () {
- C.abort('timeout');
- }, y.timeout));
- try {
- (c = !1), r.send(w, i);
- } catch (t) {
- if (c) throw t;
- i(-1, t);
- }
- } else i(-1, 'No Transport');
- return C;
- },
- getJSON: function (t, e, n) {
- return bt.get(t, e, n, 'json');
- },
- getScript: function (t, e) {
- return bt.get(t, void 0, e, 'script');
- },
- }),
- bt.each(['get', 'post'], function (t, e) {
- bt[e] = function (t, n, i, r) {
- return (
- bt.isFunction(n) && ((r = r || i), (i = n), (n = void 0)),
- bt.ajax(
- bt.extend(
- {url: t, type: e, dataType: r, data: n, success: i},
- bt.isPlainObject(t) && t
- )
- )
- );
- };
- }),
- (bt._evalUrl = function (t) {
- return bt.ajax({
- url: t,
- type: 'GET',
- dataType: 'script',
- cache: !0,
- async: !1,
- global: !1,
- throws: !0,
- });
- }),
- bt.fn.extend({
- wrapAll: function (t) {
- var e;
- return (
- this[0] &&
- (bt.isFunction(t) && (t = t.call(this[0])),
- (e = bt(t, this[0].ownerDocument)
- .eq(0)
- .clone(!0)),
- this[0].parentNode && e.insertBefore(this[0]),
- e
- .map(function () {
- for (var t = this; t.firstElementChild;)
- t = t.firstElementChild;
- return t;
- })
- .append(this)),
- this
- );
- },
- wrapInner: function (t) {
- return bt.isFunction(t)
- ? this.each(function (e) {
- bt(this).wrapInner(t.call(this, e));
- })
- : this.each(function () {
- var e = bt(this),
- n = e.contents();
- n.length ? n.wrapAll(t) : e.append(t);
- });
- },
- wrap: function (t) {
- var e = bt.isFunction(t);
- return this.each(function (n) {
- bt(this).wrapAll(e ? t.call(this, n) : t);
- });
- },
- unwrap: function (t) {
- return (
- this.parent(t)
- .not('body')
- .each(function () {
- bt(this).replaceWith(this.childNodes);
- }),
- this
- );
- },
- }),
- (bt.expr.pseudos.hidden = function (t) {
- return !bt.expr.pseudos.visible(t);
- }),
- (bt.expr.pseudos.visible = function (t) {
- return !!(
- t.offsetWidth ||
- t.offsetHeight ||
- t.getClientRects().length
- );
- }),
- (bt.ajaxSettings.xhr = function () {
- try {
- return new o.XMLHttpRequest();
- } catch (t) {
- }
- });
- var Xe = {0: 200, 1223: 204},
- Je = bt.ajaxSettings.xhr();
- (gt.cors = !!Je && 'withCredentials' in Je),
- (gt.ajax = Je = !!Je),
- bt.ajaxTransport(function (t) {
- var e, n;
- if (gt.cors || (Je && !t.crossDomain))
- return {
- send: function (i, r) {
- var a,
- s = t.xhr();
- if (
- (s.open(t.type, t.url, t.async, t.username, t.password),
- t.xhrFields)
- )
- for (a in t.xhrFields) s[a] = t.xhrFields[a];
- t.mimeType &&
- s.overrideMimeType &&
- s.overrideMimeType(t.mimeType),
- t.crossDomain ||
- i['X-Requested-With'] ||
- (i['X-Requested-With'] = 'XMLHttpRequest');
- for (a in i) s.setRequestHeader(a, i[a]);
- (e = function (t) {
- return function () {
- e &&
- ((e = n = s.onload = s.onerror = s.onabort = s.onreadystatechange = null),
- 'abort' === t
- ? s.abort()
- : 'error' === t
- ? 'number' != typeof s.status
- ? r(0, 'error')
- : r(s.status, s.statusText)
- : r(
- Xe[s.status] || s.status,
- s.statusText,
- 'text' !== (s.responseType || 'text') ||
- 'string' != typeof s.responseText
- ? {binary: s.response}
- : {text: s.responseText},
- s.getAllResponseHeaders()
- ));
- };
- }),
- (s.onload = e()),
- (n = s.onerror = e('error')),
- void 0 !== s.onabort
- ? (s.onabort = n)
- : (s.onreadystatechange = function () {
- 4 === s.readyState &&
- o.setTimeout(function () {
- e && n();
- });
- }),
- (e = e('abort'));
- try {
- s.send((t.hasContent && t.data) || null);
- } catch (t) {
- if (e) throw t;
- }
- },
- abort: function () {
- e && e();
- },
- };
- }),
- bt.ajaxPrefilter(function (t) {
- t.crossDomain && (t.contents.script = !1);
- }),
- bt.ajaxSetup({
- accepts: {
- script:
- 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript',
- },
- contents: {script: /\b(?:java|ecma)script\b/},
- converters: {
- 'text script': function (t) {
- return bt.globalEval(t), t;
- },
- },
- }),
- bt.ajaxPrefilter('script', function (t) {
- void 0 === t.cache && (t.cache = !1),
- t.crossDomain && (t.type = 'GET');
- }),
- bt.ajaxTransport('script', function (t) {
- if (t.crossDomain) {
- var e, n;
- return {
- send: function (i, r) {
- (e = bt('<script>')
- .prop({charset: t.scriptCharset, src: t.url})
- .on(
- 'load error',
- (n = function (t) {
- e.remove(),
- (n = null),
- t && r('error' === t.type ? 404 : 200, t.type);
- })
- )),
- st.head.appendChild(e[0]);
- },
- abort: function () {
- n && n();
- },
- };
- }
- });
- var $e = [],
- Ke = /(=)\?(?=&|$)|\?\?/;
- bt.ajaxSetup({
- jsonp: 'callback',
- jsonpCallback: function () {
- var t = $e.pop() || bt.expando + '_' + Ee++;
- return (this[t] = !0), t;
- },
- }),
- bt.ajaxPrefilter('json jsonp', function (t, e, n) {
- var i,
- r,
- a,
- s =
- t.jsonp !== !1 &&
- (Ke.test(t.url)
- ? 'url'
- : 'string' == typeof t.data &&
- 0 ===
- (t.contentType || '').indexOf(
- 'application/x-www-form-urlencoded'
- ) &&
- Ke.test(t.data) &&
- 'data');
- if (s || 'jsonp' === t.dataTypes[0])
- return (
- (i = t.jsonpCallback = bt.isFunction(t.jsonpCallback)
- ? t.jsonpCallback()
- : t.jsonpCallback),
- s
- ? (t[s] = t[s].replace(Ke, '$1' + i))
- : t.jsonp !== !1 &&
- (t.url +=
- (ze.test(t.url) ? '&' : '?') + t.jsonp + '=' + i),
- (t.converters['script json'] = function () {
- return a || bt.error(i + ' was not called'), a[0];
- }),
- (t.dataTypes[0] = 'json'),
- (r = o[i]),
- (o[i] = function () {
- a = arguments;
- }),
- n.always(function () {
- void 0 === r ? bt(o).removeProp(i) : (o[i] = r),
- t[i] && ((t.jsonpCallback = e.jsonpCallback), $e.push(i)),
- a && bt.isFunction(r) && r(a[0]),
- (a = r = void 0);
- }),
- 'script'
- );
- }),
- (gt.createHTMLDocument = (function () {
- var t = st.implementation.createHTMLDocument('').body;
- return (
- (t.innerHTML = '<form></form><form></form>'),
- 2 === t.childNodes.length
- );
- })()),
- (bt.parseHTML = function (t, e, n) {
- if ('string' != typeof t) return [];
- 'boolean' == typeof e && ((n = e), (e = !1));
- var i, r, o;
- return (
- e ||
- (gt.createHTMLDocument
- ? ((e = st.implementation.createHTMLDocument('')),
- (i = e.createElement('base')),
- (i.href = st.location.href),
- e.head.appendChild(i))
- : (e = st)),
- (r = Mt.exec(t)),
- (o = !n && []),
- r
- ? [e.createElement(r[1])]
- : ((r = x([t], e, o)),
- o && o.length && bt(o).remove(),
- bt.merge([], r.childNodes))
- );
- }),
- (bt.fn.load = function (t, e, i) {
- var r,
- o,
- a,
- s = this,
- u = t.indexOf(' ');
- return (
- u > -1 && ((r = Z(t.slice(u))), (t = t.slice(0, u))),
- bt.isFunction(e)
- ? ((i = e), (e = void 0))
- : e &&
- 'object' ===
- ('undefined' == typeof e ? 'undefined' : n(e)) &&
- (o = 'POST'),
- s.length > 0 &&
- bt
- .ajax({
- url: t,
- type: o || 'GET',
- dataType: 'html',
- data: e,
- })
- .done(function (t) {
- (a = arguments),
- s.html(
- r
- ? bt('<div>')
- .append(bt.parseHTML(t))
- .find(r)
- : t
- );
- })
- .always(
- i &&
- function (t, e) {
- s.each(function () {
- i.apply(this, a || [t.responseText, e, t]);
- });
- }
- ),
- this
- );
- }),
- bt.each(
- [
- 'ajaxStart',
- 'ajaxStop',
- 'ajaxComplete',
- 'ajaxError',
- 'ajaxSuccess',
- 'ajaxSend',
- ],
- function (t, e) {
- bt.fn[e] = function (t) {
- return this.on(e, t);
- };
- }
- ),
- (bt.expr.pseudos.animated = function (t) {
- return bt.grep(bt.timers, function (e) {
- return t === e.elem;
- }).length;
- }),
- (bt.offset = {
- setOffset: function (t, e, n) {
- var i,
- r,
- o,
- a,
- s,
- u,
- l,
- f = bt.css(t, 'position'),
- c = bt(t),
- h = {};
- 'static' === f && (t.style.position = 'relative'),
- (s = c.offset()),
- (o = bt.css(t, 'top')),
- (u = bt.css(t, 'left')),
- (l =
- ('absolute' === f || 'fixed' === f) &&
- (o + u).indexOf('auto') > -1),
- l
- ? ((i = c.position()), (a = i.top), (r = i.left))
- : ((a = parseFloat(o) || 0), (r = parseFloat(u) || 0)),
- bt.isFunction(e) && (e = e.call(t, n, bt.extend({}, s))),
- null != e.top && (h.top = e.top - s.top + a),
- null != e.left && (h.left = e.left - s.left + r),
- 'using' in e ? e.using.call(t, h) : c.css(h);
- },
- }),
- bt.fn.extend({
- offset: function (t) {
- if (arguments.length)
- return void 0 === t
- ? this
- : this.each(function (e) {
- bt.offset.setOffset(this, t, e);
- });
- var e,
- n,
- i,
- r,
- o = this[0];
- if (o)
- return o.getClientRects().length
- ? ((i = o.getBoundingClientRect()),
- (e = o.ownerDocument),
- (n = e.documentElement),
- (r = e.defaultView),
- {
- top: i.top + r.pageYOffset - n.clientTop,
- left: i.left + r.pageXOffset - n.clientLeft,
- })
- : {top: 0, left: 0};
- },
- position: function () {
- if (this[0]) {
- var t,
- e,
- n = this[0],
- i = {top: 0, left: 0};
- return (
- 'fixed' === bt.css(n, 'position')
- ? (e = n.getBoundingClientRect())
- : ((t = this.offsetParent()),
- (e = this.offset()),
- l(t[0], 'html') || (i = t.offset()),
- (i = {
- top: i.top + bt.css(t[0], 'borderTopWidth', !0),
- left: i.left + bt.css(t[0], 'borderLeftWidth', !0),
- })),
- {
- top: e.top - i.top - bt.css(n, 'marginTop', !0),
- left: e.left - i.left - bt.css(n, 'marginLeft', !0),
- }
- );
- }
- },
- offsetParent: function () {
- return this.map(function () {
- for (
- var t = this.offsetParent;
- t && 'static' === bt.css(t, 'position');
- )
- t = t.offsetParent;
- return t || ne;
- });
- },
- }),
- bt.each(
- {scrollLeft: 'pageXOffset', scrollTop: 'pageYOffset'},
- function (t, e) {
- var n = 'pageYOffset' === e;
- bt.fn[t] = function (i) {
- return Nt(
- this,
- function (t, i, r) {
- var o;
- return (
- bt.isWindow(t)
- ? (o = t)
- : 9 === t.nodeType && (o = t.defaultView),
- void 0 === r
- ? o
- ? o[e]
- : t[i]
- : void (o
- ? o.scrollTo(
- n ? o.pageXOffset : r,
- n ? r : o.pageYOffset
- )
- : (t[i] = r))
- );
- },
- t,
- i,
- arguments.length
- );
- };
- }
- ),
- bt.each(['top', 'left'], function (t, e) {
- bt.cssHooks[e] = L(gt.pixelPosition, function (t, n) {
- if (n)
- return (
- (n = B(t, e)), he.test(n) ? bt(t).position()[e] + 'px' : n
- );
- });
- }),
- bt.each({Height: 'height', Width: 'width'}, function (t, e) {
- bt.each(
- {padding: 'inner' + t, content: e, '': 'outer' + t},
- function (n, i) {
- bt.fn[i] = function (r, o) {
- var a = arguments.length && (n || 'boolean' != typeof r),
- s = n || (r === !0 || o === !0 ? 'margin' : 'border');
- return Nt(
- this,
- function (e, n, r) {
- var o;
- return bt.isWindow(e)
- ? 0 === i.indexOf('outer')
- ? e['inner' + t]
- : e.document.documentElement['client' + t]
- : 9 === e.nodeType
- ? ((o = e.documentElement),
- Math.max(
- e.body['scroll' + t],
- o['scroll' + t],
- e.body['offset' + t],
- o['offset' + t],
- o['client' + t]
- ))
- : void 0 === r
- ? bt.css(e, n, s)
- : bt.style(e, n, r, s);
- },
- e,
- a ? r : void 0,
- a
- );
- };
- }
- );
- }),
- bt.fn.extend({
- bind: function (t, e, n) {
- return this.on(t, null, e, n);
- },
- unbind: function (t, e) {
- return this.off(t, null, e);
- },
- delegate: function (t, e, n, i) {
- return this.on(e, t, n, i);
- },
- undelegate: function (t, e, n) {
- return 1 === arguments.length
- ? this.off(t, '**')
- : this.off(e, t || '**', n);
- },
- }),
- (bt.holdReady = function (t) {
- t ? bt.readyWait++ : bt.ready(!0);
- }),
- (bt.isArray = Array.isArray),
- (bt.parseJSON = JSON.parse),
- (bt.nodeName = l),
- (i = []),
- (r = function () {
- return bt;
- }.apply(e, i)),
- !(void 0 !== r && (t.exports = r));
- var Ze = o.jQuery,
- Qe = o.$;
- return (
- (bt.noConflict = function (t) {
- return (
- o.$ === bt && (o.$ = Qe),
- t && o.jQuery === bt && (o.jQuery = Ze),
- bt
- );
- }),
- a || (o.jQuery = o.$ = bt),
- bt
- );
- });
- }.call(e, n(8)(t)));
- },
- function (t, e, n) {
- 'use strict';
- var i = n(6),
- r = n(7),
- o = r;
- (o.v1 = i), (o.v4 = r), (t.exports = o);
- },
- function (t, e) {
- 'use strict';
- function n(t, e) {
- var n = e || 0,
- r = i;
- return (
- r[t[n++]] +
- r[t[n++]] +
- r[t[n++]] +
- r[t[n++]] +
- '-' +
- r[t[n++]] +
- r[t[n++]] +
- '-' +
- r[t[n++]] +
- r[t[n++]] +
- '-' +
- r[t[n++]] +
- r[t[n++]] +
- '-' +
- r[t[n++]] +
- r[t[n++]] +
- r[t[n++]] +
- r[t[n++]] +
- r[t[n++]] +
- r[t[n++]]
- );
- }
- for (var i = [], r = 0; r < 256; ++r)
- i[r] = (r + 256).toString(16).substr(1);
- t.exports = n;
- },
- function (t, e) {
- (function (e) {
- 'use strict';
- var n,
- i = e.crypto || e.msCrypto;
- if (i && i.getRandomValues) {
- var r = new Uint8Array(16);
- n = function () {
- return i.getRandomValues(r), r;
- };
- }
- if (!n) {
- var o = new Array(16);
- n = function () {
- for (var t, e = 0; e < 16; e++)
- 0 === (3 & e) && (t = 4294967296 * Math.random()),
- (o[e] = (t >>> ((3 & e) << 3)) & 255);
- return o;
- };
- }
- t.exports = n;
- }.call(
- e,
- (function () {
- return this;
- })()
- ));
- },
- function (t, e) {
- 'use strict';
- function n(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0});
- var i = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- r = (function () {
- function t() {
- n(this, t),
- (this._keyStr =
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=');
- }
- return (
- i(t, [
- {
- key: '$',
- value: function (t) {
- var e = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
- n = /^(?:\s*(<[\w\W]+>)[^>]*|.([\w-]*))$/;
- if (e.test(t)) {
- var i = e.exec(t);
- return document.getElementById(i[2]);
- }
- if (n.test(t)) {
- for (
- var r = n.exec(t),
- o = document.getElementsByTagName('*'),
- a = [],
- s = 0,
- u = o.length;
- s < u;
- s++
- )
- o[s].className.match(
- new RegExp('(\\s|^)' + r[2] + '(\\s|$)')
- ) && a.push(o[s]);
- return a;
- }
- },
- },
- {
- key: 'dateFormat',
- value: function (t, e) {
- var n = {
- 'M+': t.getMonth() + 1,
- 'd+': t.getDate(),
- 'h+': t.getHours(),
- 'm+': t.getMinutes(),
- 's+': t.getSeconds(),
- 'q+': Math.floor((t.getMonth() + 3) / 3),
- S: t.getMilliseconds(),
- };
- /(y+)/.test(e) &&
- (e = e.replace(
- RegExp.$1,
- (t.getFullYear() + '').substr(4 - RegExp.$1.length)
- ));
- for (var i in n)
- new RegExp('(' + i + ')').test(e) &&
- (e = e.replace(
- RegExp.$1,
- 1 === RegExp.$1.length
- ? n[i]
- : ('00' + n[i]).substr(('' + n[i]).length)
- ));
- return e;
- },
- },
- {
- key: 'downloadFile',
- value: function (t, e) {
- var n = t;
- t instanceof Blob || t instanceof File || (n = new Blob([t]));
- var i = window.URL.createObjectURL(n),
- r = window.document.createElement('a');
- (r.href = i), (r.download = e);
- var o = document.createEvent('MouseEvents');
- o.initEvent('click', !0, !0), r.dispatchEvent(o);
- },
- },
- {
- key: 'createxmlDoc',
- value: function () {
- for (
- var t,
- e = [
- 'MSXML2.DOMDocument',
- 'MSXML2.DOMDocument.5.0',
- 'MSXML2.DOMDocument.4.0',
- 'MSXML2.DOMDocument.3.0',
- 'Microsoft.XmlDom',
- ],
- n = 0,
- i = e.length;
- n < i;
- n++
- )
- try {
- t = new ActiveXObject(e[n]);
- break;
- } catch (e) {
- t = document.implementation.createDocument('', '', null);
- break;
- }
- return (t.async = 'false'), t;
- },
- },
- {
- key: 'parseXmlFromStr',
- value: function (t) {
- if (null === t || '' === t) return null;
- var e = this.createxmlDoc();
- if (
- 'Netscape' === navigator.appName ||
- 'Opera' === navigator.appName
- ) {
- var n = new DOMParser();
- e = n.parseFromString(t, 'text/xml');
- } else e.loadXML(t);
- return e;
- },
- },
- {
- key: 'encode',
- value: function (t) {
- var e,
- n,
- i,
- r,
- o,
- a,
- s,
- u = '',
- l = 0;
- for (t = this._utf8_encode(t); l < t.length;)
- (e = t.charCodeAt(l++)),
- (n = t.charCodeAt(l++)),
- (i = t.charCodeAt(l++)),
- (r = e >> 2),
- (o = ((3 & e) << 4) | (n >> 4)),
- (a = ((15 & n) << 2) | (i >> 6)),
- (s = 63 & i),
- isNaN(n) ? (a = s = 64) : isNaN(i) && (s = 64),
- (u =
- u +
- this._keyStr.charAt(r) +
- this._keyStr.charAt(o) +
- this._keyStr.charAt(a) +
- this._keyStr.charAt(s));
- return u;
- },
- },
- {
- key: 'decode',
- value: function (t) {
- var e,
- n,
- i,
- r,
- o,
- a,
- s,
- u = '',
- l = 0;
- for (t = t.replace(/[^A-Za-z0-9+\/=]/g, ''); l < t.length;)
- (r = this._keyStr.indexOf(t.charAt(l++))),
- (o = this._keyStr.indexOf(t.charAt(l++))),
- (a = this._keyStr.indexOf(t.charAt(l++))),
- (s = this._keyStr.indexOf(t.charAt(l++))),
- (e = (r << 2) | (o >> 4)),
- (n = ((15 & o) << 4) | (a >> 2)),
- (i = ((3 & a) << 6) | s),
- (u += String.fromCharCode(e)),
- 64 !== a && (u += String.fromCharCode(n)),
- 64 !== s && (u += String.fromCharCode(i));
- return (u = this._utf8_decode(u));
- },
- },
- {
- key: '_utf8_encode',
- value: function (t) {
- t = t.replace(/\r\n/g, '\n');
- for (var e = '', n = 0; n < t.length; n++) {
- var i = t.charCodeAt(n);
- i < 128
- ? (e += String.fromCharCode(i))
- : i > 127 && i < 2048
- ? ((e += String.fromCharCode((i >> 6) | 192)),
- (e += String.fromCharCode((63 & i) | 128)))
- : ((e += String.fromCharCode((i >> 12) | 224)),
- (e += String.fromCharCode(((i >> 6) & 63) | 128)),
- (e += String.fromCharCode((63 & i) | 128)));
- }
- return e;
- },
- },
- {
- key: '_utf8_decode',
- value: function (t) {
- for (var e = '', n = 0, i = 0, r = 0; n < t.length;)
- if (((i = t.charCodeAt(n)), i < 128))
- (e += String.fromCharCode(i)), n++;
- else if (i > 191 && i < 224)
- (r = t.charCodeAt(n + 1)),
- (e += String.fromCharCode(((31 & i) << 6) | (63 & r))),
- (n += 2);
- else {
- r = t.charCodeAt(n + 1);
- var o = t.charCodeAt(n + 2);
- (e += String.fromCharCode(
- ((15 & i) << 12) | ((63 & r) << 6) | (63 & o)
- )),
- (n += 3);
- }
- return e;
- },
- },
- {
- key: 'isFirefox',
- value: function () {
- var t = !1,
- e = navigator.userAgent.toLowerCase(),
- n = '',
- i = -1;
- return (
- e.match(/firefox\/([\d.]+)/) &&
- ((n = e.match(/firefox\/([\d.]+)/)[1]),
- (i = parseInt(n.split('.')[0], 10)),
- i > -1 && (t = !0)),
- t
- );
- },
- },
- ]),
- t
- );
- })();
- e.oTool = new r();
- },
- function (t, e, n) {
- 'use strict';
- function i(t, e, n) {
- var i = (e && n) || 0,
- r = e || [];
- t = t || {};
- var a = void 0 !== t.clockseq ? t.clockseq : u,
- c = void 0 !== t.msecs ? t.msecs : new Date().getTime(),
- h = void 0 !== t.nsecs ? t.nsecs : f + 1,
- d = c - l + (h - f) / 1e4;
- if (
- (d < 0 && void 0 === t.clockseq && (a = (a + 1) & 16383),
- (d < 0 || c > l) && void 0 === t.nsecs && (h = 0),
- h >= 1e4)
- )
- throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
- (l = c), (f = h), (u = a), (c += 122192928e5);
- var p = (1e4 * (268435455 & c) + h) % 4294967296;
- (r[i++] = (p >>> 24) & 255),
- (r[i++] = (p >>> 16) & 255),
- (r[i++] = (p >>> 8) & 255),
- (r[i++] = 255 & p);
- var y = (c / 4294967296 * 1e4) & 268435455;
- (r[i++] = (y >>> 8) & 255),
- (r[i++] = 255 & y),
- (r[i++] = ((y >>> 24) & 15) | 16),
- (r[i++] = (y >>> 16) & 255),
- (r[i++] = (a >>> 8) | 128),
- (r[i++] = 255 & a);
- for (var m = t.node || s, v = 0; v < 6; ++v) r[i + v] = m[v];
- return e ? e : o(r);
- }
- var r = n(4),
- o = n(3),
- a = r(),
- s = [1 | a[0], a[1], a[2], a[3], a[4], a[5]],
- u = 16383 & ((a[6] << 8) | a[7]),
- l = 0,
- f = 0;
- t.exports = i;
- },
- function (t, e, n) {
- 'use strict';
- function i(t, e, n) {
- var i = (e && n) || 0;
- 'string' == typeof t &&
- ((e = 'binary' == t ? new Array(16) : null), (t = null)),
- (t = t || {});
- var a = t.random || (t.rng || r)();
- if (((a[6] = (15 & a[6]) | 64), (a[8] = (63 & a[8]) | 128), e))
- for (var s = 0; s < 16; ++s) e[i + s] = a[s];
- return e || o(a);
- }
- var r = n(4),
- o = n(3);
- t.exports = i;
- },
- function (t, e) {
- 'use strict';
- t.exports = function (t) {
- return (
- t.webpackPolyfill ||
- ((t.deprecate = function () {
- }),
- (t.paths = []),
- (t.children = []),
- (t.webpackPolyfill = 1)),
- t
- );
- };
- },
- function (t, e, n) {
- 'use strict';
- function i(t) {
- return t && t.__esModule ? t : {default: t};
- }
- function r(t, e) {
- if (!t)
- throw new ReferenceError(
- "this hasn't been initialised - super() hasn't been called"
- );
- return !e || ('object' != typeof e && 'function' != typeof e) ? t : e;
- }
- function o(t, e) {
- if ('function' != typeof e && null !== e)
- throw new TypeError(
- 'Super expression must either be null or a function, not ' +
- typeof e
- );
- (t.prototype = Object.create(e && e.prototype, {
- constructor: {
- value: t,
- enumerable: !1,
- writable: !0,
- configurable: !0,
- },
- })),
- e &&
- (Object.setPrototypeOf
- ? Object.setPrototypeOf(t, e)
- : (t.__proto__ = e));
- }
- function a(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0}),
- (e.ESCanvas = void 0);
- var s = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- u = n(1),
- l = i(u),
- f = (function () {
- function t() {
- i[f].clearRect(0, 0, i.m_iCanvasWidth, i.m_iCanvasHeight);
- for (var t = 0, e = i[c].length; t < e; t++) i[c][t].draw();
- }
- function e(t) {
- var e = i[c].length;
- e < i[p] && i[c].push(t);
- }
- function n() {
- function n() {
- for (var t = -1, e = 0, n = i[c].length; e < n; e++)
- if (i[c][e].m_bChoosed) {
- t = e;
- break;
- }
- return t;
- }
- var r = !1,
- o = 0,
- a = 0,
- s = 'draw',
- l = null;
- (i[u][0].oncontextmenu = function () {
- return !1;
- }),
- (i[u][0].onselectstart = function () {
- return !1;
- }),
- i[u].unbind(),
- i[u].bind('mousedown', function (f) {
- if (2 === f.button)
- i[m] &&
- l &&
- l.m_aPoint.length >= l.m_iMinClosed - 1 &&
- ((l.m_bClosed = !0),
- (i[m] = !1),
- l.setPointInfo(l.m_aPoint),
- e(l),
- t(),
- (r = !1),
- i[g] || (i[h] = !1));
- else if (0 === f.button) {
- if (((o = f.offsetX), (a = f.offsetY), (s = 'draw'), !i[m])) {
- var y = n();
- if (
- (y !== -1 &&
- i[c][y].inArc(f.offsetX, f.offsetY, 5) &&
- (s = 'stretch'),
- 'stretch' !== s)
- )
- for (var S = 0, b = i[c].length; S < b; S++)
- i[c][S].inShape(f.offsetX, f.offsetY)
- ? ((i[c][S].m_bChoosed = !0),
- i[c][S].getMouseDownPoints(f.offsetX, f.offsetY),
- (s = 'drag'))
- : (i[c][S].m_bChoosed = !1);
- 'drag' === s
- ? (i[u][0].style.cursor = 'move')
- : (i[u][0].style.cursor = 'default');
- }
- if ('draw' === s && i[h]) {
- if (i[p] <= i[c].length && 'Grid' !== i[d]) return;
- 'Rect' === i[d]
- ? (l = new w())
- : 'Grid' === i[d]
- ? 0 === i[c].length && ((l = new P()), e(l))
- : 'Polygon' === i[d] &&
- (i[m] ||
- ((i[m] = !0),
- (l = new x()),
- (l.m_szId = i[v].szId || ''),
- (l.m_szTips = i[v].szTips || ''),
- (l.m_iMinClosed = i[v].iMinClosed || 3),
- (l.m_iMaxPointNum = i[v].iMaxPointNum || 11),
- (l.m_iPolygonType = i[v].iPolygonType),
- (l.m_szDrawColor = i[v].szDrawColor),
- (l.m_szFillColor = i[v].szFillColor),
- (l.m_iTranslucent = i[v].iTranslucent)),
- 1 === l.m_iPolygonType &&
- (l.addPoint(o, a),
- l.m_aPoint.length === l.m_iMaxPointNum &&
- ((l.m_bClosed = !0),
- (i[m] = !1),
- e(l),
- t(),
- (r = !1),
- i[g] || (i[h] = !1))));
- }
- r = !0;
- }
- }),
- i[u].bind('mousemove', function (e) {
- if (i[m])
- i[h] &&
- r &&
- ('Polygon' === i[d] &&
- 0 === l.m_iPolygonType &&
- (l.m_bClosed = !0),
- t(),
- l.move(e.offsetX, e.offsetY, o, a));
- else {
- var u = n();
- u > -1
- ? r &&
- ('drag' === s
- ? i[c][u].drag(e.offsetX, e.offsetY)
- : 'stretch' === s &&
- i[c][u].stretch(e.offsetX, e.offsetY))
- : i[h] &&
- r &&
- ('Rect' === i[d]
- ? l.move([[o, a], [e.offsetX, e.offsetY]])
- : 'Grid' === i[d] &&
- i[c][0].move(o, a, e.offsetX, e.offsetY));
- }
- }),
- i[u].bind('mouseup', function (n) {
- if (
- ((i[u][0].style.cursor = 'default'),
- null !== l && 'undefined' != typeof l && 'draw' === s)
- )
- if ('Rect' === i[d]) {
- if (
- (Math.abs(n.offsetX - o) > 2 &&
- Math.abs(n.offsetY - a) > 2 &&
- (e(l), i[g] || (i[h] = !1)),
- i[S])
- ) {
- var f = {startPos: [], endPos: []};
- n.offsetX > o && n.offsetY > a
- ? ((f.startPos = l.m_aPoint[0] || [
- n.offsetX,
- n.offsetY,
- ]),
- (f.endPos = l.m_aPoint[2] || [n.offsetX, n.offsetY]))
- : ((f.startPos = l.m_aPoint[2] || [
- n.offsetX,
- n.offsetY,
- ]),
- (f.endPos = l.m_aPoint[0] || [n.offsetX, n.offsetY])),
- i[S] && i[S](f),
- (l = null),
- i.clearAllShape();
- }
- } else
- 'Polygon' === i[d] &&
- 0 === l.m_iPolygonType &&
- i[m] &&
- Math.abs(n.offsetX - o) > 2 &&
- Math.abs(n.offsetY - a) > 2 &&
- (e(l), (i[m] = !1), i[g] || (i[h] = !1));
- (r = !!i[m]), t();
- }),
- i[u].bind('dblclick', function () {
- i[h] &&
- 'Grid' === i[d] &&
- ((i[c][0].m_szGridMap =
- 'fffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffc'),
- t());
- }),
- i[u].bind('mouseout', function () {
- (i[u][0].style.cursor = 'default'), (r = !!i[m]);
- });
- }
- if ('undefined' != typeof Symbol) {
- var i = null,
- u = Symbol('CANVAS'),
- f = Symbol('CONTEXT'),
- c = Symbol('SHAPES'),
- h = Symbol('DRAWSTATUS'),
- d = Symbol('SHAPETYPE'),
- p = Symbol('MAXSHAPENUMSUPPORT'),
- y = Symbol('SHAPESTYLE'),
- m = Symbol('POLYGONDRAWING'),
- v = Symbol('CURRENTSHAPEINFO'),
- g = Symbol('DRAWSHAPEMULTIONETIME'),
- S = Symbol('EVENTCALLBACK'),
- b = (function () {
- function e() {
- a(this, e),
- (this.m_szId = ''),
- (this.m_aPoint = []),
- (this.m_bChoosed = !1),
- (this.m_szDrawColor = i[y].szDrawColor),
- (this.m_szFillColor = i[y].szFillColor),
- (this.m_iTranslucent = i[y].iTranslucent),
- (this.m_iIndexChoosePoint = -1),
- (this.m_iDriftStartX = 0),
- (this.m_iDriftStartY = 0),
- (this.m_oEdgePoints = {
- top: {x: 0, y: 0},
- left: {x: 0, y: 0},
- right: {x: 0, y: 0},
- bottom: {x: 0, y: 0},
- }),
- (this.m_szTips = ''),
- (this.m_iEditType = 0),
- (this.m_iMinClosed = 3),
- (this.m_iMaxPointNum = 11),
- (this.m_bClosed = !1);
- }
- return (
- s(e, [
- {
- key: 'draw', value: function () {
- }
- },
- {
- key: 'drag',
- value: function (e, n) {
- var r = this.m_aPoint.length,
- o = 0;
- for (o = 0; o < r; o++)
- if (
- this.m_aPoint[o][0] + e - this.m_iDriftStartX >
- i.m_iCanvasWidth ||
- this.m_aPoint[o][1] + n - this.m_iDriftStartY >
- i.m_iCanvasHeight ||
- this.m_aPoint[o][0] + e - this.m_iDriftStartX < 0 ||
- this.m_aPoint[o][1] + n - this.m_iDriftStartY < 0
- )
- return (
- (this.m_iDriftStartX = e),
- void (this.m_iDriftStartY = n)
- );
- for (o = 0; o < r; o++)
- (this.m_aPoint[o][0] =
- this.m_aPoint[o][0] + e - this.m_iDriftStartX),
- (this.m_aPoint[o][1] =
- this.m_aPoint[o][1] + n - this.m_iDriftStartY);
- (this.m_iDriftStartX = e),
- (this.m_iDriftStartY = n),
- this.setPointInfo(this.m_aPoint),
- t();
- },
- },
- {
- key: 'stretch',
- value: function (e, n) {
- 0 === this.m_iEditType &&
- (this.m_iIndexChoosePoint !== -1 &&
- ((this.m_aPoint[this.m_iIndexChoosePoint][0] = e),
- (this.m_aPoint[this.m_iIndexChoosePoint][1] = n)),
- this.setPointInfo(this.m_aPoint),
- t());
- },
- },
- {
- key: 'inShape',
- value: function (t, e) {
- for (
- var n = !1,
- i = this.m_aPoint.length,
- r = 0,
- o = i - 1;
- r < i;
- o = r++
- )
- this.m_aPoint[r][1] > e != this.m_aPoint[o][1] > e &&
- t <
- (this.m_aPoint[o][0] - this.m_aPoint[r][0]) *
- (e - this.m_aPoint[r][1]) /
- (this.m_aPoint[o][1] - this.m_aPoint[r][1]) +
- this.m_aPoint[r][0] &&
- (n = !n);
- return n;
- },
- },
- {
- key: 'inArc',
- value: function (t, e, n) {
- for (
- var i = !1, r = 0, o = this.m_aPoint.length;
- r < o;
- r++
- ) {
- var a = Math.sqrt(
- (t - this.m_aPoint[r][0]) *
- (t - this.m_aPoint[r][0]) +
- (e - this.m_aPoint[r][1]) *
- (e - this.m_aPoint[r][1])
- );
- if (a < n) {
- (i = !0), (this.m_iIndexChoosePoint = r);
- break;
- }
- }
- return i;
- },
- },
- {
- key: 'getMouseDownPoints',
- value: function (t, e) {
- (this.m_iDriftStartX = t), (this.m_iDriftStartY = e);
- },
- },
- {
- key: 'getPointInfo',
- value: function () {
- return this.m_aPoint;
- },
- },
- {
- key: 'setPointInfo',
- value: function (t) {
- null !== t &&
- 'undefined' != typeof t &&
- t.length > 0 &&
- ((this.m_aPoint = t), this.setEdgePoints(t));
- },
- },
- {
- key: 'addPoint',
- value: function (t, e) {
- this.m_aPoint.length < this.m_iMaxPointNum &&
- this.m_aPoint.push([t, e]),
- this.m_aPoint.length === this.m_iMaxPointNum &&
- this.setPointInfo(this.m_aPoint);
- },
- },
- {
- key: 'setEdgePoints',
- value: function (t) {
- for (var e = 0, n = t.length; e < n; e++)
- 0 === e
- ? ((this.m_oEdgePoints.top.x = t[e][0]),
- (this.m_oEdgePoints.top.y = t[e][1]),
- (this.m_oEdgePoints.left.x = t[e][0]),
- (this.m_oEdgePoints.left.y = t[e][1]),
- (this.m_oEdgePoints.right.x = t[e][0]),
- (this.m_oEdgePoints.right.y = t[e][1]),
- (this.m_oEdgePoints.bottom.x = t[e][0]),
- (this.m_oEdgePoints.bottom.y = t[e][1]))
- : (t[e][1] < this.m_oEdgePoints.top.y &&
- ((this.m_oEdgePoints.top.x = t[e][0]),
- (this.m_oEdgePoints.top.y = t[e][1])),
- t[e][0] > this.m_oEdgePoints.right.x &&
- ((this.m_oEdgePoints.right.x = t[e][0]),
- (this.m_oEdgePoints.right.y = t[e][1])),
- t[e][1] > this.m_oEdgePoints.bottom.y &&
- ((this.m_oEdgePoints.bottom.x = t[e][0]),
- (this.m_oEdgePoints.bottom.y = t[e][1])),
- t[e][0] < this.m_oEdgePoints.left.x &&
- ((this.m_oEdgePoints.left.x = t[e][0]),
- (this.m_oEdgePoints.left.y = t[e][1])));
- },
- },
- ]),
- e
- );
- })(),
- w = (function (e) {
- function n() {
- a(this, n);
- var t = r(
- this,
- (n.__proto__ || Object.getPrototypeOf(n)).call(this)
- );
- return (t.m_szType = 'Rect'), t;
- }
- return (
- o(n, e),
- s(n, [
- {
- key: 'setPointInfo',
- value: function (t) {
- if (null !== t && 'undefined' != typeof t) {
- for (
- var e = t[0][0],
- n = t[0][1],
- i = t[0][0],
- r = t[0][1],
- o = 0,
- a = t.length;
- o < a;
- o++
- )
- e > t[o][0] && (e = t[o][0]),
- n > t[o][1] && (n = t[o][1]),
- i < t[o][0] && (i = t[o][0]),
- r < t[o][1] && (r = t[o][1]);
- this.m_aPoint = [[e, n], [i, n], [i, r], [e, r]];
- }
- },
- },
- {
- key: 'draw',
- value: function () {
- (i[f].fillStyle = this.m_szFillColor),
- (i[f].strokeStyle = this.m_szDrawColor);
- var t = this.m_aPoint[0][0],
- e = this.m_aPoint[0][1],
- n = this.m_aPoint[2][0] - t,
- r = this.m_aPoint[2][1] - e;
- if (
- ((i[f].globalAlpha = this.m_iTranslucent),
- i[f].fillRect(t, e, n, r),
- (i[f].globalAlpha = 1),
- i[f].fillText(
- this.m_szTips,
- (t + this.m_aPoint[2][0]) / 2,
- (e + this.m_aPoint[2][1]) / 2
- ),
- this.m_bChoosed)
- ) {
- var o = Math.round(n / 2),
- a = Math.round(r / 2);
- if (0 === this.m_iEditType)
- for (
- var s = [
- t,
- t + o,
- t + n,
- t,
- t + n,
- t,
- t + o,
- t + n,
- ],
- u = [
- e,
- e,
- e,
- e + a,
- e + a,
- e + r,
- e + r,
- e + r,
- ],
- l = 0;
- l < 8;
- l++
- )
- i[f].beginPath(),
- i[f].arc(s[l], u[l], 3, 0, 360, !1),
- (i[f].fillStyle = this.m_szDrawColor),
- i[f].closePath(),
- i[f].fill();
- }
- i[f].strokeRect(t, e, n, r);
- },
- },
- {
- key: 'stretch',
- value: function (e, n) {
- 0 === this.m_iEditType &&
- (0 === this.m_iIndexChoosePoint
- ? e < this.m_aPoint[2][0] &&
- n < this.m_aPoint[2][1] &&
- ((this.m_aPoint[0][0] = e),
- (this.m_aPoint[0][1] = n),
- (this.m_aPoint[3][0] = e),
- (this.m_aPoint[1][1] = n))
- : 1 === this.m_iIndexChoosePoint
- ? n < this.m_aPoint[2][1] &&
- ((this.m_aPoint[0][1] = n),
- (this.m_aPoint[1][1] = n))
- : 2 === this.m_iIndexChoosePoint
- ? e > this.m_aPoint[3][0] &&
- n < this.m_aPoint[3][1] &&
- ((this.m_aPoint[1][0] = e),
- (this.m_aPoint[1][1] = n),
- (this.m_aPoint[2][0] = e),
- (this.m_aPoint[0][1] = n))
- : 3 === this.m_iIndexChoosePoint
- ? e < this.m_aPoint[2][0] &&
- ((this.m_aPoint[0][0] = e),
- (this.m_aPoint[3][0] = e))
- : 4 === this.m_iIndexChoosePoint
- ? e > this.m_aPoint[0][0] &&
- ((this.m_aPoint[1][0] = e),
- (this.m_aPoint[2][0] = e))
- : 5 === this.m_iIndexChoosePoint
- ? e < this.m_aPoint[1][0] &&
- n > this.m_aPoint[1][1] &&
- ((this.m_aPoint[3][0] = e),
- (this.m_aPoint[3][1] = n),
- (this.m_aPoint[0][0] = e),
- (this.m_aPoint[2][1] = n))
- : 6 === this.m_iIndexChoosePoint
- ? n > this.m_aPoint[1][1] &&
- ((this.m_aPoint[2][1] = n),
- (this.m_aPoint[3][1] = n))
- : 7 === this.m_iIndexChoosePoint &&
- e > this.m_aPoint[0][0] &&
- n > this.m_aPoint[0][1] &&
- ((this.m_aPoint[2][0] = e),
- (this.m_aPoint[2][1] = n),
- (this.m_aPoint[1][0] = e),
- (this.m_aPoint[3][1] = n)),
- t());
- },
- },
- {
- key: 'move',
- value: function (e) {
- t(), (this.m_bChoosed = !0);
- var n = e[0][0],
- i = e[0][1],
- r = e[1][0],
- o = e[1][1];
- this.setPointInfo([[n, i], [r, i], [r, o], [n, o]]),
- this.draw();
- },
- },
- {
- key: 'inArc',
- value: function (t, e, n) {
- for (
- var i = this.m_aPoint[0][0],
- r = this.m_aPoint[0][1],
- o = this.m_aPoint[2][0] - i,
- a = this.m_aPoint[2][1] - r,
- s = Math.round(o / 2),
- u = Math.round(a / 2),
- l = [i, i + s, i + o, i, i + o, i, i + s, i + o],
- f = [r, r, r, r + u, r + u, r + a, r + a, r + a],
- c = 0;
- c < 8;
- c++
- ) {
- var h = Math.sqrt(
- (t - l[c]) * (t - l[c]) + (e - f[c]) * (e - f[c])
- );
- if (h < n) return (this.m_iIndexChoosePoint = c), !0;
- }
- return !1;
- },
- },
- ]),
- n
- );
- })(b),
- _ = (function (e) {
- function n(t, e) {
- a(this, n);
- var i = r(
- this,
- (n.__proto__ || Object.getPrototypeOf(n)).call(this)
- );
- return (
- (i.m_szType = 'RectOSD'),
- (i.m_szOSDType = 'overlay-date'),
- (i.m_szText = t || ''),
- (i.m_szEnabled = e || ''),
- (i.m_szDateStyle = ''),
- (i.m_szClockType = ''),
- (i.m_szDisplayWeek = ''),
- (i.m_szId = ''),
- i
- );
- }
- return (
- o(n, e),
- s(n, [
- {
- key: 'draw',
- value: function () {
- if ('true' === this.m_szEnabled) {
- var t = this.m_aPoint[0][0],
- e = this.m_aPoint[0][1],
- n = this.m_aPoint[2][0] - t,
- r = this.m_aPoint[2][1] - e;
- i[f].beginPath(),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].globalAlpha = 1),
- i[f].rect(t, e, n, r),
- (i[f].font = '15px serif'),
- i[f].strokeText(this.m_szText, t, e + 15),
- i[f].stroke();
- }
- },
- },
- {
- key: 'drag',
- value: function (e, n) {
- var r = this.m_aPoint.length,
- o = 0;
- for (o = 0; o < r; o++)
- if (
- this.m_aPoint[o][1] + n - this.m_iDriftStartY >
- i.m_iCanvasHeight ||
- this.m_aPoint[o][0] + e - this.m_iDriftStartX < 0 ||
- this.m_aPoint[o][1] + n - this.m_iDriftStartY < 0
- )
- return (
- (this.m_iDriftStartX = e),
- void (this.m_iDriftStartY = n)
- );
- for (o = 0; o < r; o++)
- (this.m_aPoint[o][0] =
- this.m_aPoint[o][0] + e - this.m_iDriftStartX),
- (this.m_aPoint[o][1] =
- this.m_aPoint[o][1] + n - this.m_iDriftStartY);
- (this.m_iDriftStartX = e),
- (this.m_iDriftStartY = n),
- this.setEdgePoints(this.m_aPoint),
- t();
- },
- },
- {
- key: 'stretch', value: function () {
- }
- },
- ]),
- n
- );
- })(b),
- P = (function (t) {
- function e() {
- a(this, e);
- var t = r(
- this,
- (e.__proto__ || Object.getPrototypeOf(e)).call(this)
- );
- return (
- (t.m_szType = 'Grid'),
- (t.m_iGridColNum = 22),
- (t.m_iGridRowNum = 18),
- (t.m_szGridMap = ''),
- (t.m_aAddGridMap = []),
- t
- );
- }
- return (
- o(e, t),
- s(e, [
- {
- key: 'draw',
- value: function () {
- for (
- var t = i.m_iCanvasWidth / this.m_iGridColNum,
- e = i.m_iCanvasHeight / this.m_iGridRowNum,
- n = '',
- r = 0;
- r < this.m_iGridRowNum;
- r++
- ) {
- for (
- var o = this.m_szGridMap.substring(
- 6 * r,
- 6 * r + 6
- ),
- a = parseInt('f' + o, 16)
- .toString(2)
- .split('')
- .slice(4),
- s = '',
- u = 0;
- u < this.m_iGridColNum;
- u++
- ) {
- var l = '';
- '1' === a[u]
- ? ((i[f].strokeStyle = this.m_szDrawColor),
- (i[f].globalAlpha = 1),
- i[f].strokeRect(t * u, e * r, t, e),
- (l = '1'))
- : (l = '0'),
- this.m_aAddGridMap.length &&
- 1 === this.m_aAddGridMap[r][u] &&
- ((i[f].strokeStyle = this.m_szDrawColor),
- i[f].strokeRect(t * u, e * r, t, e),
- (l = '1')),
- (s += l);
- }
- n += parseInt('1111' + s + '00', 2)
- .toString(16)
- .substring(1);
- }
- this.m_szGridMap = n;
- },
- },
- {
- key: 'move',
- value: function (t, e, n, r) {
- var o = i.m_iCanvasWidth / this.m_iGridColNum,
- a = i.m_iCanvasHeight / this.m_iGridRowNum,
- s = Math.floor(t / o),
- u = Math.floor(e / a),
- l = Math.floor(Math.abs(n - t) / o),
- f = Math.floor(Math.abs(r - e) / a),
- c = 1,
- h = 1;
- (c = n - t > 0 ? 1 : -1), (h = r - e > 0 ? 1 : -1);
- for (var d = [], p = 0; p < this.m_iGridRowNum; p++) {
- d[p] = [];
- for (var y = 0; y < this.m_iGridColNum; y++)
- 1 === c
- ? 1 === h
- ? p >= u && p <= u + f && y >= s && y <= s + l
- ? (d[p][y] = 1)
- : (d[p][y] = 0)
- : p <= u && p >= u - f && y >= s && y <= s + l
- ? (d[p][y] = 1)
- : (d[p][y] = 0)
- : 1 === h
- ? p >= u && p <= u + f && y <= s && y >= s - l
- ? (d[p][y] = 1)
- : (d[p][y] = 0)
- : p <= u && p >= u - f && y <= s && y >= s - l
- ? (d[p][y] = 1)
- : (d[p][y] = 0);
- }
- (this.m_aAddGridMap = d), this.draw();
- },
- },
- ]),
- e
- );
- })(b),
- C = (function (t) {
- function e() {
- a(this, e);
- var t = r(
- this,
- (e.__proto__ || Object.getPrototypeOf(e)).call(this)
- );
- return (
- (t.m_szType = 'Line'),
- (t.m_iLineType = 0),
- (t.m_iDirection = 0),
- (t.m_iArrowType = 0),
- (t.m_aCrossArrowPoint = []),
- t
- );
- }
- return (
- o(e, t),
- s(e, [
- {
- key: 'draw',
- value: function () {
- 0 === this.m_iLineType
- ? this.drawNormalLine()
- : 1 === this.m_iLineType
- ? this.drawArrowLine()
- : 3 === this.m_iLineType
- ? this.drawCrossLine()
- : 4 === this.m_iLineType && this.drawLineCount();
- },
- },
- {
- key: 'drawNormalLine',
- value: function () {
- if (
- ((i[f].globalAlpha = 1), this.m_aPoint.length > 0)
- ) {
- i[f].beginPath(),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].lineWidth = 2),
- i[f].moveTo(
- this.m_aPoint[0][0],
- this.m_aPoint[0][1]
- );
- for (var t = 1, e = this.m_aPoint.length; t < e; t++)
- i[f].lineTo(
- this.m_aPoint[t][0],
- this.m_aPoint[t][1]
- );
- if ((i[f].stroke(), this.m_bChoosed))
- for (
- var n = 0, r = this.m_aPoint.length;
- n < r;
- n++
- )
- i[f].beginPath(),
- (i[f].fillStyle = this.m_szDrawColor),
- i[f].arc(
- this.m_aPoint[n][0],
- this.m_aPoint[n][1],
- 3,
- 0,
- 2 * Math.PI,
- !0
- ),
- i[f].closePath(),
- i[f].fill();
- '' !== this.m_szTips &&
- ((i[f].strokeStyle = this.m_szDrawColor),
- i[f].fillText(
- this.m_szTips,
- this.m_aPoint[0][0] + 10,
- this.m_aPoint[0][1] + 4
- ));
- }
- },
- },
- {
- key: 'drawArrowLine',
- value: function (t, e, n, r, o, a, s, u) {
- (a = 'undefined' != typeof a ? a : 30),
- (s = 'undefined' != typeof s ? s : 10),
- (u = 'undefined' != typeof u ? u : 1);
- var l = 180 * Math.atan2(n - o, e - r) / Math.PI,
- c = (l + a) * Math.PI / 180,
- h = (l - a) * Math.PI / 180,
- d = s * Math.cos(c),
- p = s * Math.sin(c),
- y = s * Math.cos(h),
- m = s * Math.sin(h);
- i[f].save(), i[f].beginPath();
- var v = e - d,
- g = n - p;
- i[f].moveTo(v, g),
- i[f].lineTo(e, n),
- (v = e - y),
- (g = n - m),
- i[f].lineTo(v, g),
- i[f].moveTo(e, n),
- i[f].lineTo(r, o),
- 1 === t &&
- ((v = r + d),
- (g = o + p),
- i[f].moveTo(v, g),
- i[f].lineTo(r, o),
- (v = r + y),
- (g = o + m),
- i[f].lineTo(v, g)),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].lineWidth = u),
- i[f].stroke(),
- i[f].restore();
- },
- },
- {
- key: 'drawCrossLine',
- value: function () {
- this.drawNormalLine();
- var t = (this.m_aPoint[0][0] + this.m_aPoint[1][0]) / 2,
- e = (this.m_aPoint[0][1] + this.m_aPoint[1][1]) / 2,
- n =
- 180 *
- Math.atan2(
- e - this.m_aPoint[0][1],
- t - this.m_aPoint[0][0]
- ) /
- Math.PI,
- r = (n + 90) * Math.PI / 180,
- o = (n - 90) * Math.PI / 180,
- a = 25 * Math.cos(r),
- s = 25 * Math.sin(r),
- u = 25 * Math.cos(o),
- l = 25 * Math.sin(o),
- c = 0,
- h = 0;
- (c = t - a), (h = e - s);
- var d = 0,
- p = 0;
- 0 === this.m_iDirection
- ? ((d = -10), (p = -15))
- : 1 === this.m_iDirection
- ? ((d = 10), (p = 10))
- : ((d = 10), (p = -15)),
- 0 !== this.m_iDirection &&
- this.drawArrowLine(0, c, h, t, e),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].font = '8px'),
- i[f].strokeText('A', c + d, h + 4),
- (c = t - u),
- (h = e - l),
- 1 !== this.m_iDirection &&
- this.drawArrowLine(0, c, h, t, e),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].font = '8px'),
- i[f].strokeText('B', c + p, h + 4);
- },
- },
- {
- key: 'drawLineCount',
- value: function () {
- this.drawNormalLine();
- var t = (this.m_aPoint[0][0] + this.m_aPoint[1][0]) / 2,
- e = (this.m_aPoint[0][1] + this.m_aPoint[1][1]) / 2,
- n =
- 180 *
- Math.atan2(
- e - this.m_aPoint[0][1],
- t - this.m_aPoint[0][0]
- ) /
- Math.PI,
- i = (n + 90) * Math.PI / 180,
- r = (n - 90) * Math.PI / 180,
- o = 25 * Math.cos(i),
- a = 25 * Math.sin(i),
- s = 25 * Math.cos(r),
- u = 25 * Math.sin(r),
- l = 0,
- f = 0;
- (l = t - o),
- (f = e - a),
- 1 === this.m_iArrowType
- ? ((l = t - s),
- (f = e - u),
- this.drawArrowLine(0, l, f, t, e))
- : 0 === this.m_iArrowType &&
- this.drawArrowLine(0, l, f, t, e),
- (this.m_aCrossArrowPoint = [[t, e], [l, f]]);
- },
- },
- {
- key: 'inShape',
- value: function (t, e) {
- for (
- var n = !1, i = 0, r = this.m_aPoint.length - 1;
- i < r;
- i++
- ) {
- var o = Math.sqrt(
- (this.m_aPoint[i + 1][0] - this.m_aPoint[i][0]) *
- (this.m_aPoint[i + 1][0] -
- this.m_aPoint[i][0]) +
- (this.m_aPoint[i + 1][1] -
- this.m_aPoint[i][1]) *
- (this.m_aPoint[i + 1][1] -
- this.m_aPoint[i][1])
- ),
- a = Math.sqrt(
- (t - this.m_aPoint[i][0]) *
- (t - this.m_aPoint[i][0]) +
- (e - this.m_aPoint[i][1]) *
- (e - this.m_aPoint[i][1])
- ),
- s = Math.sqrt(
- (t - this.m_aPoint[i + 1][0]) *
- (t - this.m_aPoint[i + 1][0]) +
- (e - this.m_aPoint[i + 1][1]) *
- (e - this.m_aPoint[i + 1][1])
- );
- a + s - o < 1 && (n = !0);
- }
- return n;
- },
- },
- ]),
- e
- );
- })(b),
- x = (function (e) {
- function n() {
- a(this, n);
- var t = r(
- this,
- (n.__proto__ || Object.getPrototypeOf(n)).call(this)
- );
- return (t.m_szType = 'Polygon'), (t.m_iPolygonType = 1), t;
- }
- return (
- o(n, e),
- s(n, [
- {
- key: 'setPointInfo',
- value: function (t) {
- if (null !== t && 'undefined' != typeof t) {
- if (0 === this.m_iPolygonType) {
- for (
- var e = t[0][0],
- n = t[0][1],
- i = t[0][0],
- r = t[0][1],
- o = 0,
- a = t.length;
- o < a;
- o++
- )
- e > t[o][0] && (e = t[o][0]),
- n > t[o][1] && (n = t[o][1]),
- i < t[o][0] && (i = t[o][0]),
- r < t[o][1] && (r = t[o][1]);
- this.m_aPoint = [[e, n], [i, n], [i, r], [e, r]];
- } else
- 1 === this.m_iPolygonType
- ? (this.m_aPoint = t)
- : (this.m_aPoint = t);
- this.setEdgePoints(t);
- }
- },
- },
- {
- key: 'draw',
- value: function () {
- if (this.m_aPoint.length > 0) {
- (i[f].fillStyle = this.m_szFillColor),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].globalAlpha = 1);
- var t = 0,
- e = 0;
- if (this.m_bChoosed)
- for (t = 0, e = this.m_aPoint.length; t < e; t++)
- i[f].beginPath(),
- i[f].arc(
- this.m_aPoint[t][0],
- this.m_aPoint[t][1],
- 3,
- 0,
- 360,
- !1
- ),
- (i[f].fillStyle = this.m_szDrawColor),
- i[f].closePath(),
- i[f].fill();
- for (
- i[f].beginPath(),
- i[f].moveTo(
- this.m_aPoint[0][0],
- this.m_aPoint[0][1]
- ),
- t = 0,
- e = this.m_aPoint.length;
- t < e;
- t++
- )
- 0 !== t &&
- i[f].lineTo(
- this.m_aPoint[t][0],
- this.m_aPoint[t][1]
- );
- i[f].stroke(),
- this.m_bClosed &&
- (i[f].fillText(
- this.m_szTips,
- (this.m_oEdgePoints.left.x +
- this.m_oEdgePoints.right.x) /
- 2,
- (this.m_oEdgePoints.top.y +
- this.m_oEdgePoints.bottom.y) /
- 2
- ),
- i[f].closePath(),
- i[f].stroke(),
- (i[f].globalAlpha = this.m_iTranslucent),
- i[f].fill());
- }
- },
- },
- {
- key: 'move',
- value: function (t, e, n, r) {
- if (1 === this.m_iPolygonType) {
- if (
- this.m_aPoint.length < this.m_iMaxPointNum &&
- this.m_aPoint.length > 0
- ) {
- (i[f].fillStyle = this.m_szFillColor),
- (i[f].strokeStyle = this.m_szDrawColor),
- (i[f].globalAlpha = 1);
- var o = 0,
- a = 0;
- for (o = 0, a = this.m_aPoint.length; o < a; o++)
- i[f].beginPath(),
- i[f].arc(
- this.m_aPoint[o][0],
- this.m_aPoint[o][1],
- 3,
- 0,
- 360,
- !1
- ),
- (i[f].fillStyle = this.m_szDrawColor),
- i[f].closePath(),
- i[f].fill();
- for (
- i[f].beginPath(),
- i[f].moveTo(
- this.m_aPoint[0][0],
- this.m_aPoint[0][1]
- ),
- o = 0,
- a = this.m_aPoint.length;
- o < a;
- o++
- )
- 0 !== o &&
- i[f].lineTo(
- this.m_aPoint[o][0],
- this.m_aPoint[o][1]
- );
- i[f].lineTo(t, e), i[f].closePath(), i[f].stroke();
- }
- } else if (0 === this.m_iPolygonType) {
- this.m_bChoosed = !0;
- var s = n,
- u = r,
- l = t,
- c = e;
- this.setPointInfo([[s, u], [l, u], [l, c], [s, c]]),
- this.draw();
- }
- },
- },
- {
- key: 'stretch',
- value: function (e, n) {
- 0 === this.m_iEditType &&
- (1 === this.m_iPolygonType
- ? this.m_iIndexChoosePoint !== -1 &&
- ((this.m_aPoint[this.m_iIndexChoosePoint][0] = e),
- (this.m_aPoint[this.m_iIndexChoosePoint][1] = n))
- : 0 === this.m_iIndexChoosePoint
- ? e < this.m_aPoint[2][0] &&
- n < this.m_aPoint[2][1] &&
- ((this.m_aPoint[0][0] = e),
- (this.m_aPoint[0][1] = n),
- (this.m_aPoint[3][0] = e),
- (this.m_aPoint[1][1] = n))
- : 1 === this.m_iIndexChoosePoint
- ? e > this.m_aPoint[3][0] &&
- n < this.m_aPoint[3][1] &&
- ((this.m_aPoint[1][0] = e),
- (this.m_aPoint[1][1] = n),
- (this.m_aPoint[2][0] = e),
- (this.m_aPoint[0][1] = n))
- : 2 === this.m_iIndexChoosePoint
- ? e > this.m_aPoint[0][0] &&
- n > this.m_aPoint[0][1] &&
- ((this.m_aPoint[2][0] = e),
- (this.m_aPoint[2][1] = n),
- (this.m_aPoint[1][0] = e),
- (this.m_aPoint[3][1] = n))
- : 3 === this.m_iIndexChoosePoint &&
- e < this.m_aPoint[1][0] &&
- n > this.m_aPoint[1][1] &&
- ((this.m_aPoint[3][0] = e),
- (this.m_aPoint[3][1] = n),
- (this.m_aPoint[0][0] = e),
- (this.m_aPoint[2][1] = n)),
- this.setPointInfo(this.m_aPoint),
- t());
- },
- },
- ]),
- n
- );
- })(b),
- T = (function () {
- function r(t) {
- a(this, r),
- (i = this),
- (this[u] = (0, l.default)('#' + t)),
- (this[f] = this[u][0].getContext('2d')),
- (this[c] = []),
- (this[h] = !1),
- (this[d] = 'Rect'),
- (this[p] = 10),
- (this[g] = !0),
- (this[v] = {}),
- (this[S] = null),
- (this[y] = {
- szDrawColor: '#ff0000',
- szFillColor: '#343434',
- iTranslucent: 0.7,
- }),
- (this[m] = !1),
- (this.m_iCanvasWidth = this[u].width()),
- (this.m_iCanvasHeight = this[u].height()),
- (this.m_iHorizontalResolution = 0),
- (this.m_iVerticalResolution = 0),
- (this.m_szDisplayMode = ''),
- (this.m_szVideoFormat = ''),
- n(),
- (this[c].length = 0);
- }
- return (
- s(r, [
- {
- key: 'setDrawMutiShapeOneTime',
- value: function (t) {
- this[g] = t;
- },
- },
- {
- key: 'setMaxShapeSupport',
- value: function (t) {
- this[p] = t;
- },
- },
- {
- key: 'getMaxShapeSupport',
- value: function () {
- return this[p];
- },
- },
- {
- key: 'setDrawStatus',
- value: function (t, e) {
- (this[h] = t),
- e && t && (this[S] = e),
- t || (this[S] = null);
- },
- },
- {
- key: 'setShapeType',
- value: function (e) {
- (this[d] = e), t();
- },
- },
- {
- key: 'setCurrentShapeInfo',
- value: function (t) {
- this[v] = t || {
- szId: '',
- szTips: '',
- iMinClosed: 3,
- iMaxPointNum: 11,
- iPolygonType: 1,
- };
- },
- },
- {
- key: 'getShapeType',
- value: function () {
- return this[d];
- },
- },
- {
- key: 'getAllShapesInfo',
- value: function () {
- for (var t = [], e = 0, n = this[c].length; e < n; e++)
- 'Grid' === this[c][e].m_szType
- ? t.push({
- szType: this[c][e].m_szType,
- szGridMap: this[c][e].m_szGridMap,
- iGridColNum: this[c][e].m_iGridColNum,
- iGridRowNum: this[c][e].m_iGridRowNum,
- })
- : 'RectOSD' === this[c][e].m_szType
- ? t.push({
- szType: this[c][e].m_szType,
- szText: this[c][e].m_szText,
- szEnabled: this[c][e].m_szEnabled,
- szOSDType: this[c][e].m_szOSDType,
- iPositionX: this[c][e].m_aPoint[0][0],
- iPositionY: this[c][e].m_aPoint[0][1],
- szDateStyle: this[c][e].m_szDateStyle,
- szClockType: this[c][e].m_szClockType,
- szDisplayWeek: this[c][e].m_szDisplayWeek,
- szId: this[c][e].m_szId,
- })
- : t.push({
- szType: this[c][e].m_szType,
- aPoint: this[c][e].m_aPoint,
- szId: this[c][e].m_szId,
- });
- return t;
- },
- },
- {
- key: 'getShapesInfoByType',
- value: function (t) {
- for (var e = [], n = 0, i = this[c].length; n < i; n++)
- this[c][n].m_szType === t &&
- ('Grid' === this[c][n].m_szType
- ? e.push({
- szType: this[c][n].m_szType,
- szGridMap: this[c][n].m_szGridMap,
- iGridColNum: this[c][n].m_iGridColNum,
- iGridRowNum: this[c][n].m_iGridRowNum,
- })
- : 'RectOSD' === this[c][n].m_szType
- ? e.push({
- szType: this[c][n].m_szType,
- szText: this[c][n].m_szText,
- szEnabled: this[c][n].m_szEnabled,
- szOSDType: this[c][n].m_szOSDType,
- iPositionX: this[c][n].m_aPoint[0][0],
- iPositionY: this[c][n].m_aPoint[0][1],
- szDateStyle: this[c][n].m_szDateStyle,
- szClockType: this[c][n].m_szClockType,
- szDisplayWeek: this[c][n].m_szDisplayWeek,
- szId: this[c][n].m_szId,
- })
- : 'Polygon' === t
- ? e.push({
- szType: this[c][n].m_szType,
- szId: this[c][n].m_szId,
- iPolygonType: this[c][n].m_iPolygonType,
- iMinClosed: this[c][n].m_iMinClosed,
- iMaxPointNum: this[c][n].m_iMaxPointNum,
- iEditType: this[c][n].m_iEditType,
- aPoint: this[c][n].m_aPoint,
- bClosed: this[c][n].m_bClosed,
- szTips: this[c][n].m_szTips,
- szDrawColor: this[c][n].m_szDrawColor,
- szFillColor: this[c][n].m_szFillColor,
- iTranslucent: this[c][n].m_iTranslucent,
- })
- : 'Line' === t
- ? e.push({
- szType: this[c][n].m_szType,
- szId: this[c][n].m_szId,
- aPoint: this[c][n].m_aPoint,
- szTips: this[c][n].m_szTips,
- iLineType: this[c][n].m_iLineType,
- iDirection: this[c][n].m_iDirection,
- iArrowType: this[c][n].m_iArrowType,
- szDrawColor: this[c][n].m_szDrawColor,
- aCrossArrowPoint: this[c][n]
- .m_aCrossArrowPoint,
- })
- : 'Rect' === t
- ? e.push({
- szType: this[c][n].m_szType,
- iEditType: this[c][n].m_iEditType,
- aPoint: this[c][n].m_aPoint,
- szTips: this[c][n].m_szTips,
- szDrawColor: this[c][n].m_szDrawColor,
- szFillColor: this[c][n].m_szFillColor,
- iTranslucent: this[c][n]
- .m_iTranslucent,
- })
- : e.push({
- szType: this[c][n].m_szType,
- aPoint: this[c][n].m_aPoint,
- }));
- return e;
- },
- },
- {
- key: 'setShapesInfoByType',
- value: function (n, i) {
- i || (i = []);
- var r = null;
- if ('Rect' === n || 'Polygon' === n || 'Line' === n)
- for (var o = 0, a = i.length; o < a; o++)
- 'Rect' === n
- ? ((r = new w()),
- (r.m_iEditType = i[o].iEditType),
- (r.m_szTips = i[o].szTips),
- i[o].style &&
- ((r.m_szDrawColor = i[o].style.szDrawColor),
- (r.m_szFillColor = i[o].style.szFillColor),
- (r.m_iTranslucent = i[o].style.iTranslucent)))
- : 'Polygon' === n
- ? ((r = new x()),
- 0 === i[o].iPolygonType
- ? (r.m_bClosed = !0)
- : (r.m_bClosed = i[o].bClosed),
- (r.m_szTips = i[o].szTips),
- (r.m_szId = i[o].szId || ''),
- (r.m_iPolygonType = i[o].iPolygonType),
- (r.m_iMinClosed = i[o].iMinClosed || 3),
- (r.m_iMaxPointNum = i[o].iMaxPointNum || 11),
- (r.m_iEditType = i[o].iEditType),
- i[o].style &&
- ((r.m_szDrawColor = i[o].style.szDrawColor),
- (r.m_szFillColor = i[o].style.szFillColor),
- (r.m_iTranslucent =
- i[o].style.iTranslucent)))
- : 'Line' === n &&
- ((r = new C()),
- (r.m_iLineType = i[o].iLineType),
- (r.m_szTips = i[o].szTips),
- (r.m_szId = i[o].szId),
- (r.m_iDirection = i[o].iDirection),
- (r.m_iArrowType = i[o].iArrowType),
- i[o].style &&
- (r.m_szDrawColor = i[o].style.szDrawColor),
- r.setPointInfo(i[o].aPoint)),
- r.setPointInfo(i[o].aPoint),
- 0 === o && (r.m_bChoosed = !0),
- e(r);
- else
- 'Grid' === n &&
- ((r = new P()),
- (r.m_szGridMap = i[0].szGridMap || ''),
- (r.m_iGridColNum = i[0].iGridColNum || 22),
- (r.m_iGridRowNum = i[0].iGridRowNum || 18),
- e(r));
- t();
- },
- },
- {
- key: 'addOSDShape',
- value: function (n, i, r, o, a) {
- r || o || ((r = 0), (o = 0)), a || (a = {});
- var s = new _(n, i),
- u = 10 * n.length;
- (s.m_aPoint = [
- [r, o],
- [u + r, o],
- [u + r, o + 20],
- [r, o + 20],
- ]),
- (s.m_szOSDType = a.szOSDType || ''),
- (s.m_szDateStyle = a.szDateStyle || ''),
- (s.m_szClockType = a.szClockType || ''),
- (s.m_szDisplayWeek = a.szDisplayWeek || ''),
- (s.m_szId = a.szId || ''),
- e(s),
- t();
- },
- },
- {
- key: 'setCanvasSize',
- value: function (e, n) {
- e > 0 &&
- n > 0 &&
- ((this.m_iCanvasWidth = e),
- (this.m_iCanvasHeight = n),
- t());
- },
- },
- {
- key: 'setDrawStyle',
- value: function (t, e, n) {
- this[y] = {
- szDrawColor: t,
- szFillColor: e,
- iTranslucent: n,
- };
- },
- },
- {
- key: 'clearAllShape',
- value: function () {
- (this[c].length = 0), t();
- },
- },
- {
- key: 'clearShapeByType',
- value: function (e) {
- for (var n = this[c].length, i = n; i > 0; i--)
- this[c][i - 1].m_szType === e &&
- ('Grid' === e
- ? ((this[c][i - 1].m_szGridMap = ''),
- (this[c][i - 1].m_aAddGridMap = []))
- : this[c].splice(i - 1, 1));
- t();
- },
- },
- {
- key: 'deleteShape',
- value: function (e) {
- this[c].length > e && this[c].splice(e, 1), t();
- },
- },
- {
- key: 'updateCanvas',
- value: function (t) {
- (this[u] = (0, l.default)('#' + t)),
- (this[f] = this[u][0].getContext('2d')),
- (this.m_iCanvasWidth = this[u].width()),
- (this.m_iCanvasHeight = this[u].height()),
- n();
- },
- },
- {
- key: 'resizeCanvas',
- value: function () {
- (this.m_iCanvasWidth = this[u].width()),
- (this.m_iCanvasHeight = this[u].height());
- },
- },
- {
- key: 'canvasRedraw',
- value: function () {
- t();
- },
- },
- ]),
- r
- );
- })();
- return T;
- }
- })();
- e.ESCanvas = f;
- },
- function (t, e, n) {
- 'use strict';
- function i(t) {
- return t && t.__esModule ? t : {default: t};
- }
- function r(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0}),
- (e.StorageManager = void 0);
- var o = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- a = n(2),
- s = i(a),
- u = n(5),
- l = 'Web/RecordFiles/',
- f = 'Web/PlaybackFiles/',
- c = 1e3,
- h = 1,
- d = 3001;
- (window.requestFileSystem =
- window.requestFileSystem || window.webkitRequestFileSystem),
- (window.URL = window.URL || window.webkitURL);
- var p = (function () {
- function t(e, n, i, o) {
- r(this, t),
- (this.szUUID = e),
- (this.szFileName = n),
- (this.iStreamType = i),
- (this.szPath = ''),
- (this.bStart = !1),
- (this.aStreamList = []),
- (this.options = o);
- }
- return (
- o(t, [
- {
- key: 'init',
- value: function () {
- var t = this;
- 0 === this.iStreamType
- ? (this.szPath = l)
- : 1 === this.iStreamType && (this.szPath = f),
- (this.szPath += this.getDateDir());
- var e = t.szPath.split('/'),
- n = new Promise(function (n) {
- window.requestFileSystem(
- window.TEMPORARY,
- t.options.iFileSize,
- function (i) {
- t.createDir(i.root, e, function () {
- n();
- });
- },
- t.errorHandler
- );
- });
- return n;
- },
- },
- {
- key: 'getDateDir',
- value: function () {
- return u.oTool.dateFormat(new Date(), 'yyyy-MM-dd');
- },
- },
- {
- key: 'createDir',
- value: function (t, e, n) {
- var i = this;
- e.length
- ? t.getDirectory(
- e[0],
- {create: !0},
- function (t) {
- i.createDir(t, e.slice(1), n);
- },
- i.errorHandler
- )
- : n();
- },
- },
- {
- key: 'errorHandler', value: function () {
- }
- },
- {
- key: 'writeFileHeader',
- value: function (t) {
- var e = this;
- window.requestFileSystem(
- window.TEMPORARY,
- e.options.iFileSize,
- function (n) {
- n.root.getFile(
- e.szPath + '/' + e.szFileName,
- {create: !0},
- function (n) {
- n.createWriter(function (n) {
- (n.onwriteend = function () {
- (e.bStart = !0), e.writeFile(n);
- }),
- (n.onerror = function () {
- }),
- n.seek(n.length);
- var i = new Blob([t]);
- n.write(i);
- }, e.errorHandler);
- },
- e.errorHandler
- );
- },
- e.errorHandler
- );
- },
- },
- {
- key: 'writeFileContent',
- value: function (t) {
- this.aStreamList.push(t);
- },
- },
- {
- key: 'writeFile',
- value: function (t) {
- var e = this;
- if (this.bStart)
- if (this.aStreamList.length > 0) {
- var n = this.aStreamList.shift();
- if (
- (t.seek(t.length), t.length >= this.options.iFileSize)
- )
- return void (
- this.options.cbEventHandler &&
- this.options.cbEventHandler(d, this.szUUID)
- );
- var i = new Blob([n]);
- t.write(i);
- } else
- setTimeout(function () {
- e.writeFile(t);
- }, c);
- },
- },
- {
- key: 'stopWriteFile',
- value: function () {
- var t = this;
- (this.bStart = !1), (this.aStreamList.length = 0);
- var e = new Promise(function (e) {
- window.requestFileSystem(
- window.TEMPORARY,
- t.options.iFileSize,
- function (n) {
- n.root.getFile(
- t.szPath + '/' + t.szFileName,
- {create: !1},
- function (t) {
- t.file(function (t) {
- e(), u.oTool.downloadFile(t, t.name);
- });
- },
- t.errorHandler
- );
- },
- t.errorHandler
- );
- });
- return e;
- },
- },
- ]),
- t
- );
- })(),
- y = (function () {
- function t(e, n, i, o, a, s, u) {
- r(this, t),
- (this.szBasePath = e),
- (this.szUUID = n),
- (this.szFileName = i),
- (this.aHeadBuf = new Uint8Array(o)),
- (this.iPackType = a),
- (this.iStreamType = s),
- (this.oWorker = null),
- (this.oFileSystem = null),
- (this.options = u);
- }
- return (
- o(t, [
- {
- key: 'init',
- value: function () {
- var t = this,
- e = new Promise(function (e, n) {
- t.initFileSystem().then(
- function () {
- t.initWorker().then(
- function () {
- e(t.szUUID);
- },
- function (t) {
- n(t);
- }
- );
- },
- function (t) {
- n(t);
- }
- );
- });
- return e;
- },
- },
- {
- key: 'initFileSystem',
- value: function () {
- var t = this;
- this.oFileSystem = new p(
- this.szUUID,
- this.szFileName,
- this.iStreamType,
- this.options
- );
- var e = new Promise(function (e, n) {
- t.oFileSystem.init().then(
- function () {
- e();
- },
- function (t) {
- n(t);
- }
- );
- });
- return e;
- },
- },
- {
- key: 'initWorker',
- value: function () {
- var t = this,
- e = new Promise(function (e) {
- (t.oWorker = new Worker(
- t.szBasePath + '/systemTransform-worker.min.js'
- )),
- (t.oWorker.onmessage = function (n) {
- var i = n.data;
- if ('loaded' === i.type)
- t.oWorker.postMessage(
- {
- type: 'create',
- buf: t.aHeadBuf.buffer,
- len: 40,
- packType: t.iPackType,
- },
- [t.aHeadBuf.buffer]
- );
- else if ('created' === i.type) e();
- else if ('outputData' === i.type) {
- var r = new Uint8Array(i.buf);
- h === i.dType
- ? t.oFileSystem.writeFileHeader(r)
- : t.oFileSystem.writeFileContent(r);
- }
- });
- });
- return e;
- },
- },
- {
- key: 'inputData',
- value: function (t) {
- if (this.oWorker) {
- var e = new Uint8Array(t);
- this.oWorker.postMessage(
- {type: 'inputData', buf: e.buffer, len: e.length},
- [e.buffer]
- );
- }
- },
- },
- {
- key: 'stopRecord',
- value: function () {
- var t = this,
- e = new Promise(function (e, n) {
- t.oWorker
- ? t.oWorker.postMessage({type: 'release'})
- : n(),
- t.oFileSystem
- ? t.oFileSystem.stopWriteFile().then(
- function () {
- e();
- },
- function () {
- n();
- }
- )
- : n();
- });
- return e;
- },
- },
- ]),
- t
- );
- })(),
- m = (function () {
- if ('undefined' != typeof Symbol) {
- var t = Symbol('STORAGELIST'),
- e = (function () {
- function e(n, i) {
- r(this, e),
- (this.szBasePath = n),
- (this[t] = {}),
- (this.options = {iFileSize: 1073741824}),
- Object.assign(this.options, i);
- }
- return (
- o(e, [
- {
- key: 'startRecord',
- value: function (e, n, i, r, o) {
- var a = this,
- u = s.default.v4(),
- l = Object.assign({}, this.options, o),
- f = new y(this.szBasePath, u, e, n, i, r, l),
- c = new Promise(function (e, n) {
- f.init().then(
- function (n) {
- (a[t][n] = f), e(n);
- },
- function (t) {
- n(t);
- }
- );
- });
- return c;
- },
- },
- {
- key: 'inputData',
- value: function (e, n) {
- var i = this[t][e];
- i && i.inputData(n);
- },
- },
- {
- key: 'stopRecord',
- value: function (e) {
- var n = this,
- i = new Promise(function (i, r) {
- var o = n[t][e];
- o
- ? o.stopRecord().then(
- function () {
- delete n[t][e], i();
- },
- function () {
- r();
- }
- )
- : r();
- });
- return i;
- },
- },
- ]),
- e
- );
- })();
- return e;
- }
- })();
- e.StorageManager = m;
- },
- function (t, e) {
- 'use strict';
- function n(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0});
- var i = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- r = 3001,
- o = 3002,
- a = 3003,
- s = (function () {
- if ('undefined' != typeof Symbol) {
- var t = (function () {
- function t() {
- n(this, t);
- }
- return (
- i(t, [
- {
- key: 'createClientObject',
- value: function (t, e, n) {
- return {
- socket: t,
- id: e,
- playURL: n,
- resolve: null,
- reject: null,
- };
- },
- },
- {
- key: 'getMediaFromSdp',
- value: function (t) {
- for (
- var e = t.indexOf('MEDIAINFO=') + 10,
- n = t.slice(e, e + 80),
- i = [],
- r = 0,
- o = n.length / 2;
- r < o;
- r++
- )
- i[r] = parseInt(n.slice(2 * r, 2 * r + 2), 16);
- return new Uint8Array(i);
- },
- },
- {
- key: 'playCmd',
- value: function (t) {
- var e = {sequence: 0, cmd: 'realplay', url: t};
- return JSON.stringify(e);
- },
- },
- {
- key: 'playbackCmd',
- value: function (t, e, n) {
- var i = {
- sequence: 0,
- cmd: 'playback',
- url: n,
- startTime: t,
- endTime: e,
- };
- return JSON.stringify(i);
- },
- },
- {
- key: 'playRateCmd',
- value: function (t) {
- var e = {sequence: 0, cmd: 'speed', rate: t};
- return JSON.stringify(e);
- },
- },
- {
- key: 'pauseCmd',
- value: function () {
- var t = {sequence: 0, cmd: 'pause'};
- return JSON.stringify(t);
- },
- },
- {
- key: 'resumeCmd',
- value: function () {
- var t = {sequence: 0, cmd: 'resume'};
- return JSON.stringify(t);
- },
- },
- {
- key: 'getError',
- value: function (t) {
- var e = r;
- return (
- t &&
- (6 === parseInt(t.statusCode, 10) &&
- 'streamLimit' === t.subStatusCode
- ? (e = o)
- : 4 === parseInt(t.statusCode, 10) &&
- 'badAuthorization' === t.subStatusCode &&
- (e = a)),
- {iErrorNum: e, oError: t}
- );
- },
- },
- ]),
- t
- );
- })();
- return t;
- }
- })();
- e.DirectDevice = s;
- },
- function (t, e) {
- 'use strict';
- function n(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0});
- var i = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- r = (function () {
- if ('undefined' != typeof Symbol) {
- var t = (function () {
- function t() {
- n(this, t);
- }
- return (
- i(t, [
- {
- key: 'createClientObject',
- value: function (t, e, n, i) {
- return {
- socket: t,
- id: e,
- iCurChannel: n,
- iCurStream: i,
- resolve: null,
- reject: null,
- };
- },
- },
- {
- key: 'zeroPlayCmd',
- value: function (t, e) {
- var n = [
- 0,
- 0,
- 0,
- 44,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 19,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- t + 1,
- 0,
- 0,
- 0,
- e,
- 0,
- 0,
- 4,
- 0,
- ];
- return new Uint8Array(n);
- },
- },
- {
- key: 'playCmd',
- value: function (t, e) {
- var n = [
- 0,
- 0,
- 0,
- 44,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 3,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- t,
- 0,
- 0,
- 0,
- e,
- 0,
- 0,
- 4,
- 0,
- ];
- return new Uint8Array(n);
- },
- },
- {
- key: 'playbackCmd',
- value: function (t, e, n, i) {
- var r = t.split('T')[0],
- o = t.split('T')[1],
- a = '0' + parseInt(r.substring(0, 4), 10).toString(16),
- s = parseInt(r.substring(4, 6), 10),
- u = parseInt(r.substring(6), 10),
- l = parseInt(o.substring(0, 2), 10),
- f = parseInt(o.substring(2, 4), 10),
- c = parseInt(o.substring(4, 6), 10),
- h = e.split('T')[0],
- d = e.split('T')[1],
- p = '0' + parseInt(h.substring(0, 4), 10).toString(16),
- y = parseInt(h.substring(4, 6), 10),
- m = parseInt(d.substring(0, 2), 10),
- v = parseInt(d.substring(2, 4), 10),
- g = parseInt(d.substring(4, 6), 10),
- S = [
- 0,
- 0,
- 0,
- 96,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 3,
- 1,
- 2,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- n,
- 0,
- 0,
- parseInt(a.substring(0, 2), 16),
- parseInt(a.substring(2, 4), 16),
- 0,
- 0,
- 0,
- s,
- 0,
- 0,
- 0,
- u,
- 0,
- 0,
- 0,
- l,
- 0,
- 0,
- 0,
- f,
- 0,
- 0,
- 0,
- c,
- 0,
- 0,
- parseInt(p.substring(0, 2), 16),
- parseInt(p.substring(2, 4), 16),
- 0,
- 0,
- 0,
- y,
- 0,
- 0,
- 0,
- u,
- 0,
- 0,
- 0,
- m,
- 0,
- 0,
- 0,
- v,
- 0,
- 0,
- 0,
- g,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- i,
- 0,
- 0,
- 0,
- ];
- return new Uint8Array(S);
- },
- },
- {
- key: 'playRateCmd',
- value: function (t) {
- for (
- var e = (parseInt(t, 10) >>> 0)
- .toString(16)
- .toLocaleUpperCase()
- .toString(16),
- n = e.length;
- n < 8;
- n++
- )
- e = '0' + e;
- for (
- var i = [0, 0, 0, 0], r = 0, o = e.length;
- r < o;
- r += 2
- )
- i[Math.floor(r / 2)] = parseInt(
- e.substring(r, r + 2),
- 16
- );
- var a = [
- 0,
- 0,
- 0,
- 36,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 3,
- 1,
- 47,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- i[0],
- i[1],
- i[2],
- i[3],
- ];
- return new Uint8Array(a);
- },
- },
- {
- key: 'pauseCmd',
- value: function () {
- var t = [
- 0,
- 0,
- 0,
- 32,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 3,
- 1,
- 7,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- ];
- return new Uint8Array(t);
- },
- },
- {
- key: 'resumeCmd',
- value: function () {
- var t = [
- 0,
- 0,
- 0,
- 32,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 3,
- 1,
- 8,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- ];
- return new Uint8Array(t);
- },
- },
- ]),
- t
- );
- })();
- return t;
- }
- })();
- e.DirectDeviceCustom = r;
- },
- function (t, e, n) {
- 'use strict';
- function i(t) {
- return t && t.__esModule ? t : {default: t};
- }
- function r(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0}),
- (e.LiveMedia = void 0);
- var o = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- a = n(18),
- s = i(a),
- u = n(17),
- l = i(u),
- f = (function () {
- if ('undefined' != typeof Symbol) {
- var t = (function () {
- function t() {
- r(this, t);
- }
- return (
- o(t, [
- {
- key: 'createClientObject',
- value: function (t, e, n, i, r) {
- var o = l.default.AES.encrypt(
- new Date().getTime().toString(),
- l.default.enc.Hex.parse(
- '1234567891234567123456789123456712345678912345671234567891234567'
- ),
- {
- mode: l.default.mode.CBC,
- iv: l.default.enc.Hex.parse(
- '12345678912345671234567891234567'
- ),
- padding: l.default.pad.Pkcs7,
- }
- ).ciphertext.toString();
- o.length < 64 && (o += o);
- var a = l.default.AES.encrypt(
- new Date().getTime().toString(),
- l.default.enc.Hex.parse(
- '12345678912345671234567891234567'
- ),
- {
- mode: l.default.mode.CBC,
- iv: l.default.enc.Hex.parse(
- '12345678912345671234567891234567'
- ),
- padding: l.default.pad.Pkcs7,
- }
- ).ciphertext.toString();
- return {
- socket: t,
- id: e,
- PKD: n,
- rand: i,
- playURL: r.playURL || '',
- auth: r.auth || '',
- token: r.token || '',
- key: o,
- iv: a,
- resolve: null,
- reject: null,
- };
- },
- },
- {
- key: 'playCmd',
- value: function (t) {
- var e = {
- sequence: 0,
- cmd: 'realplay',
- url: t.playURL,
- key: s.default
- .encrypt(t.iv + ':' + t.key, t.PKD)
- .cipher.split('?')[0],
- authorization: l.default.AES.encrypt(
- t.rand + ':' + t.auth,
- l.default.enc.Hex.parse(t.key),
- {
- mode: l.default.mode.CBC,
- iv: l.default.enc.Hex.parse(t.iv),
- padding: l.default.pad.Pkcs7,
- }
- ).ciphertext.toString(),
- token: l.default.AES.encrypt(
- t.token,
- l.default.enc.Hex.parse(t.key),
- {
- mode: l.default.mode.CBC,
- iv: l.default.enc.Hex.parse(t.iv),
- padding: l.default.pad.Pkcs7,
- }
- ).ciphertext.toString(),
- };
- return JSON.stringify(e);
- },
- },
- {
- key: 'playbackCmd',
- value: function (t, e, n) {
- var i = {
- sequence: 0,
- cmd: 'playback',
- url: t.playURL,
- key: s.default
- .encrypt(t.iv + ':' + t.key, t.PKD)
- .cipher.split('?')[0],
- authorization: l.default.AES.encrypt(
- t.rand + ':' + t.auth,
- l.default.enc.Hex.parse(t.key),
- {
- mode: l.default.mode.CBC,
- iv: l.default.enc.Hex.parse(t.iv),
- padding: l.default.pad.Pkcs7,
- }
- ).ciphertext.toString(),
- token: l.default.AES.encrypt(
- t.token,
- l.default.enc.Hex.parse(t.key),
- {
- mode: l.default.mode.CBC,
- iv: l.default.enc.Hex.parse(t.iv),
- padding: l.default.pad.Pkcs7,
- }
- ).ciphertext.toString(),
- startTime: e,
- endTime: n,
- };
- return JSON.stringify(i);
- },
- },
- {
- key: 'seekCmd',
- value: function (t, e) {
- var n = {
- sequence: 0,
- cmd: 'seek',
- startTime: t,
- endTime: e,
- };
- return JSON.stringify(n);
- },
- },
- ]),
- t
- );
- })();
- return t;
- }
- })();
- e.LiveMedia = f;
- },
- function (t, e) {
- 'use strict';
- function n(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0});
- var i = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- r = (function () {
- if ('undefined' != typeof Symbol) {
- var t = (function () {
- function t() {
- n(this, t);
- }
- return (
- i(t, [
- {
- key: 'createClientObject',
- value: function (t, e, n, i) {
- return {
- socket: t,
- id: e,
- playURL: n,
- deviceSerial: i.deviceSerial || '',
- verificationCode: i.verificationCode || '',
- resolve: null,
- reject: null,
- };
- },
- },
- {
- key: 'playCmd',
- value: function (t) {
- var e = {
- sequence: 0,
- cmd: 'realplay',
- deviceSerial: t.deviceSerial,
- verificationCode: t.verificationCode,
- url: t.playURL,
- };
- return JSON.stringify(e);
- },
- },
- {
- key: 'playbackCmd',
- value: function (t, e, n) {
- var i = {
- sequence: 0,
- cmd: 'playback',
- deviceSerial: t.deviceSerial,
- verificationCode: t.verificationCode,
- url: t.playURL,
- startTime: e,
- endTime: n,
- };
- return JSON.stringify(i);
- },
- },
- ]),
- t
- );
- })();
- return t;
- }
- })();
- e.LocalService = r;
- },
- function (t, e, n) {
- 'use strict';
- function i(t) {
- return t && t.__esModule ? t : {default: t};
- }
- function r(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0}),
- (e.StreamClient = void 0);
- var o = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- a = n(2),
- s = i(a),
- u = n(12),
- l = n(11),
- f = n(13),
- c = n(14),
- h = (function () {
- if ('undefined' != typeof Symbol) {
- var t = Symbol('WEBSOCKET'),
- e = Symbol('GETINDEX'),
- n = Symbol('PROTOCOLVERSION'),
- i = Symbol('CIPHERSUITES'),
- a = new u.DirectDeviceCustom(),
- h = new l.DirectDevice(),
- d = new f.LiveMedia(),
- p = new c.LocalService(),
- y = (function () {
- function u() {
- r(this, u),
- (this[n] = '0.1'),
- (this[i] = 0),
- (this[t] = []),
- (this.ERRORS = {}),
- (this[e] = function (e) {
- for (var n = -1, i = 0, r = this[t].length; i < r; i++)
- if (this[t][i].id === e) {
- n = i;
- break;
- }
- return n;
- });
- }
- return (
- o(u, [
- {
- key: 'openStream',
- value: function (r, o, u, l) {
- console.log("r", r);
- var f = this,
- c = r.split(':'),
- y = c[0],
- m = c[1].split('//')[1],
- v = Math.floor(c[2].split('/')[0]);
- o = o || {};
- console.log("oooooo", o);
- console.log("this[M]-99-p", p);
- console.log("y,m,v", y, m, v);
- var g = o.sessionID || o.session || '',
- S = new window.WebSocket(r);
- S.binaryType = 'arraybuffer';
- var b = s.default.v4(),
- w = Math.floor(c[2].split('/')[1] / 100),
- _ = Math.floor(c[2].split('/')[1] % 100) - 1;
- 0 === w && (_ = 0);
- var P = new Promise(function (r, s) {
- (S.onopen = function () {
- o.playURL ||
- o.sessionID ||
- o.deviceSerial ||
- (f[t].push(a.createClientObject(S, b, w, _)),
- r(b));
- }),
- (S.onmessage = function (a) {
- if ('string' == typeof a.data) {
- var l = JSON.parse(a.data),
- c = f[e](b);
- if (l && l.version && l.cipherSuite) {
- if (
- ((f[n] = l.version),
- (f[i] = parseInt(l.cipherSuite, 10)),
- l && l.PKD && l.rand)
- )
- f[t].push(
- d.createClientObject(
- S,
- b,
- l.PKD,
- l.rand,
- o
- )
- );
- else {
- var y =
- 'live://' +
- m +
- ':' +
- v +
- '/' +
- w +
- '/' +
- _;
- f[i] === -1
- ? f[t].push(
- p.createClientObject(S, b, y, o)
- )
- : f[t].push(
- h.createClientObject(S, b, y)
- );
- }
- return void r(b);
- }
- if (l && l.sdp) {
- var g = h.getMediaFromSdp(l.sdp);
- u({bHead: !0, buf: g});
- }
- if (
- (l &&
- l.cmd &&
- 'end' === l.cmd &&
- u({type: 'exception', cmd: l.cmd}),
- l &&
- l.statusString &&
- ('ok' === l.statusString.toLowerCase() &&
- f[t][c].resolve &&
- f[t][c].resolve(l),
- 'ok' !== l.statusString.toLowerCase()))
- ) {
- var P = h.getError(l);
- c > -1
- ? f[t][c].reject && f[t][c].reject(P)
- : s(P);
- }
- } else {
- var C = {},
- x = new Uint8Array(a.data);
- if (
- 64 === x.byteLength ||
- 40 === x.byteLength
- ) {
- for (
- var T = -1, k = x.byteLength, D = 0;
- D < k;
- D++
- )
- if (
- 73 === x[D] &&
- 77 === x[D + 1] &&
- 75 === x[D + 2] &&
- 72 === x[D + 3]
- ) {
- T = D;
- break;
- }
- if (T !== -1) {
- var M = x.slice(T, T + 40);
- C = {bHead: !0, buf: M};
- } else C = {bHead: !1, buf: x};
- } else C = {bHead: !1, buf: x};
- u(C), (x = null), (C = null), (a = null);
- }
- }),
- (S.onclose = function () {
- for (var e = 0, n = f[t].length; e < n; e++)
- if (f[t][e].id === b) {
- f[t][e].resolve(),
- f[t].splice(e, 1),
- setTimeout(function () {
- l();
- }, 200);
- break;
- }
- s();
- });
- });
- return P;
- },
- },
- {
- key: 'startPlay',
- value: function (r, o, s) {
- var u = this,
- l = this[e](r);
- o &&
- s &&
- '0.1' === u[n] &&
- ((o = o.replace(/-/g, '').replace(/:/g, '')),
- (s = s.replace(/-/g, '').replace(/:/g, '')));
- var f = new Promise(function (e, r) {
- if (l > -1) {
- (u[t][l].resolve = e), (u[t][l].reject = r);
- var f = null;
- o && s
- ? '0.1' !== u[n]
- ? 0 === u[i]
- ? (f = d.playbackCmd(u[t][l], o, s))
- : 1 === u[i]
- ? (f = h.playbackCmd(o, s, u[t][l].playURL))
- : u[i] === -1 &&
- (f = p.playbackCmd(u[t][l], o, s))
- : (f = a.playbackCmd(
- o,
- s,
- u[t][l].iCurChannel,
- u[t][l].iCurStream
- ))
- : 0 === u[t][l].iCurChannel && '0.1' === u[n]
- ? (f = a.zeroPlayCmd(
- u[t][l].iCurChannel,
- u[t][l].iCurStream
- ))
- : '0.1' !== u[n]
- ? 0 === u[i]
- ? (f = d.playCmd(u[t][l]))
- : 1 === u[i]
- ? (f = h.playCmd(u[t][l].playURL))
- : u[i] === -1 && (f = p.playCmd(u[t][l]))
- : (f = a.playCmd(
- u[t][l].iCurChannel,
- u[t][l].iCurStream
- )),
- u[t][l].socket.send(f),
- '0.1' === u[n] && e();
- } else '0.1' === u[n] && r();
- });
- return f;
- },
- },
- {
- key: 'singleFrame', value: function () {
- }
- },
- {
- key: 'setPlayRate',
- value: function (e, i) {
- var r = this,
- o = new Promise(function (o, s) {
- for (var u = 0, l = r[t].length; u < l; u++)
- if (r[t][u].id === e) {
- if ('0.1' === r[n]) {
- var f = a.playRateCmd(i);
- r[t][u].socket.send(f), o();
- break;
- }
- (r[t][u].resolve = o), (r[t][u].reject = s);
- var c = h.playRateCmd(i);
- r[t][u].socket.send(c);
- }
- });
- return o;
- },
- },
- {
- key: 'seek',
- value: function (e, n, i) {
- var r = this,
- o = new Promise(function (o, a) {
- for (var s = 0, u = r[t].length; s < u; s++)
- if (r[t][s].id === e) {
- (r[t][s].resolve = o), (r[t][s].reject = a);
- var l = d.seekCmd(n, i);
- r[t][s].socket.send(l);
- }
- });
- return o;
- },
- },
- {
- key: 'pause',
- value: function (e) {
- var i = this,
- r = new Promise(function (r, o) {
- for (var s = 0, u = i[t].length; s < u; s++)
- if (i[t][s].id === e) {
- if ('0.1' === i[n]) {
- var l = a.pauseCmd();
- i[t][s].socket.send(l), r();
- break;
- }
- (i[t][s].resolve = r), (i[t][s].reject = o);
- var f = h.pauseCmd();
- i[t][s].socket.send(f);
- }
- });
- return r;
- },
- },
- {
- key: 'transmission',
- value: function (e, n) {
- var i = this,
- r = new Promise(function (r, o) {
- for (var a = 0, s = i[t].length; a < s; a++)
- i[t][a].id === e &&
- ((i[t][a].resolve = r),
- (i[t][a].reject = o),
- i[t][a].socket.send(n));
- });
- return r;
- },
- },
- {
- key: 'resume',
- value: function (e) {
- var i = this,
- r = new Promise(function (r, o) {
- for (var s = 0, u = i[t].length; s < u; s++)
- if (i[t][s].id === e) {
- if ('0.1' === i[n]) {
- var l = a.resumeCmd();
- i[t][s].socket.send(l), r();
- break;
- }
- (i[t][s].resolve = r), (i[t][s].reject = o);
- var f = h.resumeCmd();
- i[t][s].socket.send(f);
- }
- });
- return r;
- },
- },
- {
- key: 'stop',
- value: function (e) {
- var n = this,
- i = new Promise(function (i, r) {
- if (e) {
- for (
- var o = -1, a = 0, s = n[t].length;
- a < s;
- a++
- )
- if (n[t][a].id === e) {
- (o = a),
- (n[t][a].resolve = i),
- n[t][a].socket.close(1e3, 'CLOSE');
- break;
- }
- o === -1 && r();
- } else r();
- });
- return i;
- },
- },
- {
- key: 'stopAll',
- value: function () {
- for (var e = this, n = 0, i = e[t].length; n < i; n++)
- e[t][n].socket.close(1e3, 'CLOSE');
- },
- },
- ]),
- u
- );
- })();
- return y;
- }
- })();
- e.StreamClient = h;
- },
- function (t, e) {
- 'use strict';
- function n(t, e) {
- if (!(t instanceof e))
- throw new TypeError('Cannot call a class as a function');
- }
- Object.defineProperty(e, '__esModule', {value: !0});
- var i = (function () {
- function t(t, e) {
- for (var n = 0; n < e.length; n++) {
- var i = e[n];
- (i.enumerable = i.enumerable || !1),
- (i.configurable = !0),
- 'value' in i && (i.writable = !0),
- Object.defineProperty(t, i.key, i);
- }
- }
- return function (e, n, i) {
- return n && t(e.prototype, n), i && t(e, i), e;
- };
- })(),
- r = 0,
- o = 1,
- a = 2,
- s = 11,
- u = 16,
- l = 31,
- f = 60,
- c = 61,
- h = 63,
- d = 0,
- p = 1,
- y = 0,
- m = 1,
- v = 0,
- g = 1,
- S = 15,
- b = 8,
- w = 1,
- _ = 25,
- P = 20,
- C = 5,
- x = 5242880,
- T = 5e3,
- k = !1,
- D = !1,
- M = {id: null, cmd: null, data: null, errorCode: 0, status: null};
- e.JSPlayCtrl = (function () {
- function t(e, i, c) {
- if ((n(this, t), null == e || void 0 === e || 'string' != typeof e))
- return o;
- if (((this.szBasePath = e), !i || 'function' != typeof i)) return o;
- (this.fnCallBack = i),
- (this.decodeWorker = null),
- (this.streamOpenMode = null),
- (this.bOpenStream = !1),
- (this.audioRenderer = null),
- (this.aAudioBuffer = []),
- (this.iAudioBufferSize = 0),
- (this.oSuperRender = null),
- (this.aVideoFrameBuffer = []),
- (this.YUVBufferSize = w),
- (this.szOSDTime = null),
- (this.bPlaySound = !1),
- (this.bPlay = !1),
- (this.bPause = !1),
- (this.bOnebyOne = !1),
- (this.bPlayRateChange = !1),
- (this.dataCallBackFun = null),
- (this.nWidth = 0),
- (this.nHeight = 0),
- (this.sCanvasId = null),
- (this.aDisplayBuf = null),
- (this.bVisibility = !0),
- (this.nDecFrameType = v),
- (this.iCanvasWidth = 0),
- (this.iCanvasHeight = 0),
- (this.iZoomNum = 0),
- (this.iRatio_x = 1),
- (this.iRatio_y = 1),
- (this.stDisplayRect = {top: 0, left: 0, right: 0, bottom: 0}),
- (this.stYUVRect = {top: 0, left: 0, right: 0, bottom: 0}),
- (this.aInputDataLens = []),
- (this.aInputDataBuffer = []),
- (this.bIsGetYUV = !1),
- (this.bIsFirstFrame = !0),
- (this.iInputMaxBufSize = x),
- (this.bIsInput = !1),
- (this.bIsInputBufOver = !1),
- (this.iInputDataLen = T);
- var h = this;
- if (
- ((this.setCallBack = function (t, e, n, i, r) {
- var o = M;
- (o.id = c),
- (o.cmd = e),
- (o.data = n),
- (o.errorCode = i),
- (o.status = r),
- t.fnCallBack(o);
- }),
- !k)
- ) {
- k = !0;
- var d = document.createElement('script');
- (d.type = 'text/javascript'),
- (d.src = h.szBasePath + 'AudioRenderer.js');
- var p = document.getElementsByTagName('head')[0];
- p.appendChild(d),
- (d.onload = d.onreadystatechange = function () {
- !this.readyState ||
- 'loaded' === this.readyState ||
- 'complete' === this.readyState;
- });
- }
- if (!D) {
- D = !0;
- var y = document.createElement('script');
- (y.type = 'text/javascript'),
- (y.src = h.szBasePath + 'SuperRender_10.js');
- var m = document.getElementsByTagName('head')[0];
- m.appendChild(y),
- (y.onload = y.onreadystatechange = function () {
- !this.readyState ||
- 'loaded' === this.readyState ||
- 'complete' === this.readyState;
- });
- var g = document.createElement('script');
- (g.type = 'text/javascript'),
- (g.src = h.szBasePath + 'SuperRender_20.js');
- var R = document.getElementsByTagName('head')[0];
- R.appendChild(g),
- (g.onload = g.onreadystatechange = function () {
- !this.readyState ||
- 'loaded' === this.readyState ||
- 'complete' === this.readyState;
- });
- }
- (this.convertErrorCode = function (t) {
- switch (t) {
- case 1:
- return r;
- case 98:
- return o;
- default:
- return t;
- }
- }),
- (this.arrayBufferCopy = function (t) {
- var e = t.byteLength,
- n = new Uint8Array(e),
- i = new Uint8Array(t),
- r = 0;
- for (r = 0; r < e; r++) n[r] = i[r];
- return n;
- }),
- (this.inputDataFun = function () {
- var t,
- e = 0;
- if (((h.bIsGetYUV = !1), h.bIsInputBufOver))
- t = new Uint8Array(1);
- else {
- for (
- ;
- h.aInputDataLens.length > 0 &&
- ((e += h.aInputDataLens.shift()), !(e > h.iInputDataLen));
- ) ;
- t = h.aInputDataBuffer.splice(0, e);
- }
- var n = new Uint8Array(t),
- i = {command: 'InputData', data: n.buffer, dataSize: e};
- h.bPlay &&
- (h.bPause
- ? h.bOnebyOne && h.decodeWorker.postMessage(i, [i.data])
- : h.decodeWorker.postMessage(i, [i.data])),
- (t = null),
- (n = null);
- }),
- (this.getPic = function (t, e) {
- if (null == this.decodeWorker || null == this.oSuperRender)
- return a;
- if (!this.bPlay) return a;
- if (!t || 'function' != typeof t) return o;
- if (((this.dataCallBackFun = t), 0 === this.iZoomNum))
- (this.stYUVRect.left = 0),
- (this.stYUVRect.top = 0),
- (this.stYUVRect.right = 0),
- (this.stYUVRect.bottom = 0);
- else {
- if (0 === this.iCanvasWidth || 0 === this.iCanvasHeight)
- (this.stYUVRect.left = 0),
- (this.stYUVRect.top = 0),
- (this.stYUVRect.right = 0),
- (this.stYUVRect.bottom = 0);
- else {
- var n = this.nWidth / this.iCanvasWidth,
- i = this.nHeight / this.iCanvasHeight;
- (this.stYUVRect.left = Math.round(
- this.stDisplayRect.left * n
- )),
- (this.stYUVRect.top = Math.round(
- this.stDisplayRect.top * i
- )),
- (this.stYUVRect.right = Math.round(
- this.stDisplayRect.right * n
- )),
- (this.stYUVRect.bottom = Math.round(
- this.stDisplayRect.bottom * i
- ));
- }
- if (
- this.stYUVRect.right - this.stYUVRect.left < 32 ||
- this.stYUVRect.bottom - this.stYUVRect.top < 32
- )
- return o;
- }
- if (null == this.aDisplayBuf) return a;
- var s = this.arrayBufferCopy(this.aDisplayBuf),
- u = {
- command: e,
- data: s.buffer,
- width: this.nWidth,
- height: this.nHeight,
- rect: this.stYUVRect,
- };
- return this.decodeWorker.postMessage(u, [u.data]), r;
- }),
- (this.createWorker = function (t) {
- if (window.Worker) {
- if (
- null == this.decodeWorker &&
- ((this.decodeWorker = new Worker(
- h.szBasePath + 'DecodeWorker.js'
- )),
- null == this.decodeWorker)
- )
- return f;
- this.decodeWorker.onmessage = function (e) {
- var n = null,
- i = e.data;
- switch (i.function) {
- case 'loaded':
- (n = 'loaded'), t.setCallBack(t, 'loaded', 0, 0, !0);
- break;
- case 'SetStreamOpenMode':
- n = 'SetStreamOpenMode';
- break;
- case 'OpenStream':
- n = 'OpenStream';
- break;
- case 'InputData':
- (n = 'InputData'),
- i.errorCode === s &&
- ((h.bIsInputBufOver = !0), h.inputDataFun()),
- i.errorCode === l && (h.bIsInputBufOver = !1);
- break;
- case 'GetFrameData':
- if (
- ((n = 'GetFrameData'),
- !h.bIsFirstFrame && i.errorCode === l)
- ) {
- (h.bIsInputBufOver = !1),
- setTimeout(h.inputDataFun(), 5);
- break;
- }
- if (
- (h.bIsInputBufOver
- ? h.inputDataFun()
- : 'videoType' === i.type &&
- (h.aInputDataLens.length > 0 && h.bIsInput
- ? (h.inputDataFun(), (h.bIsInput = !1))
- : (h.bIsGetYUV = !0),
- (h.bIsFirstFrame = !1)),
- h.bVisibility)
- )
- switch (i.type) {
- case 'videoType':
- if (null == i.data || null == i.frameInfo) return o;
- (h.bIsFirstFrame = !1),
- (t.nWidth = i.frameInfo.width),
- (t.nHeight = i.frameInfo.height);
- var r = new Object();
- (r.data = i.data),
- (r.osdTime = i.osd),
- t.aVideoFrameBuffer.push(r),
- (r = null);
- var a = t.aVideoFrameBuffer.length;
- if (
- (a > P &&
- (t.bOnebyOne ||
- t.aVideoFrameBuffer.splice(0, C)),
- t.bOnebyOne && t.aVideoFrameBuffer.length >= S)
- ) {
- t.setCallBack(t, 'OnebyOne', 0, 0, !1),
- (t.bIsFirstFrame = !0);
- break;
- }
- break;
- case 'audioType':
- if (t.bPlaySound && !t.bPlayRateChange) {
- for (
- var f = new Uint8Array(i.data),
- c = t.aAudioBuffer.length,
- d = 0,
- p = f.length;
- d < p;
- d++
- )
- t.aAudioBuffer[c + d] = f[d];
- t.iAudioBufferSize++,
- (f = null),
- t.iAudioBufferSize >= _ &&
- (t.audioRenderer.Play(
- t.aAudioBuffer,
- t.aAudioBuffer.length,
- i.frameInfo
- ),
- t.aAudioBuffer.splice(
- 0,
- t.aAudioBuffer.length
- ),
- (t.aAudioBuffer.length = 0),
- (t.iAudioBufferSize = 0));
- }
- break;
- case 'privateType':
- }
- break;
- case 'PlaySound':
- n = 'PlaySound';
- break;
- case 'GetJPEG':
- n = 'GetJPEG';
- var y = i.data;
- t.dataCallBackFun(y);
- break;
- case 'GetBMP':
- n = 'GetBMP';
- var m = i.data;
- t.dataCallBackFun(m);
- }
- 'GetFrameData' !== n
- ? t.setCallBack(
- t,
- n,
- 0,
- t.convertErrorCode(i.errorCode),
- !0
- )
- : u === i.errorCode &&
- t.setCallBack(
- t,
- n,
- 0,
- t.convertErrorCode(i.errorCode),
- !0
- );
- };
- }
- }),
- this.createWorker(h),
- (this.draw = function () {
- if (h.bPlay) {
- h.bPause || requestAnimationFrame(h.draw);
- var t = h.aVideoFrameBuffer.length;
- if (
- (h.bOnebyOne &&
- t <= b &&
- h.setCallBack(h, 'OnebyOne', 0, l, !0),
- t > h.YUVBufferSize)
- ) {
- var e = h.aVideoFrameBuffer.shift();
- h.aDisplayBuf = e.data;
- var n = new Uint8Array(h.aDisplayBuf);
- h.oSuperRender.SR_DisplayFrameData(h.nWidth, h.nHeight, n),
- (n = null),
- (h.szOSDTime = e.osdTime),
- (e = null);
- }
- } else
- h.bPlay ||
- (h.aVideoFrameBuffer.splice(0, h.aVideoFrameBuffer.length),
- h.aAudioBuffer.splice(0, h.aAudioBuffer.length));
- });
- }
- return (
- i(t, [
- {
- key: 'PlayM4_SetStreamOpenMode',
- value: function (t) {
- return null == t || void 0 === t
- ? o
- : t !== y && t !== m
- ? o
- : ((this.streamOpenMode = t), r);
- },
- },
- {
- key: 'PlayM4_OpenStream',
- value: function (t, e, n) {
- return null == this.decodeWorker
- ? a
- : null == t || e <= 0 || n <= 0
- ? o
- : ((this.bPlay = !1),
- (this.bPause = !1),
- (this.bOnebyOne = !1),
- (this.bIsFirstFrame = !0),
- (this.bIsGetYUV = !1),
- (this.bIsInput = !1),
- this.decodeWorker.postMessage({
- command: 'SetStreamOpenMode',
- data: this.streamOpenMode,
- }),
- this.decodeWorker.postMessage({
- command: 'OpenStream',
- data: t,
- dataSize: e,
- bufPoolSize: n,
- }),
- (this.bOpenStream = !0),
- r);
- },
- },
- {
- key: 'PlayM4_CloseStream',
- value: function () {
- return null === this.decodeWorker || this.bOpenStream === !1
- ? a
- : (this.PlayM4_Stop(),
- this.decodeWorker.postMessage({command: 'CloseStream'}),
- null !== this.oSuperRender &&
- (this.oSuperRender.SR_Destroy(),
- (this.oSuperRender = null)),
- null !== this.audioRenderer &&
- (this.audioRenderer.Stop(), (this.audioRenderer = null)),
- this.aAudioBuffer.splice(0, this.aAudioBuffer.length),
- this.aVideoFrameBuffer.splice(
- 0,
- this.aVideoFrameBuffer.length
- ),
- this.aInputDataBuffer.splice(
- 0,
- this.aInputDataBuffer.length
- ),
- this.aInputDataLens.splice(0, this.aInputDataLens.length),
- (this.bOpenStream = !1),
- (this.iAudioBufferSize = 0),
- r);
- },
- },
- {
- key: 'PlayM4_Destroy',
- value: function () {
- return null === this.decodeWorker
- ? r
- : (this.PlayM4_CloseStream(),
- this.decodeWorker.terminate(),
- (this.decodeWorker = null),
- r);
- },
- },
- {
- key: 'PlayM4_InputData',
- value: function (t, e) {
- if (null === this.decodeWorker || this.bOpenStream === !1)
- return a;
- var n = this.aInputDataBuffer.length;
- if (4 === e) {
- var i = new Uint8Array(t.buffer);
- if (1 === i[0] && 2 === i[1] && 3 === i[2] && 4 === i[3])
- return (
- this.bIsFirstFrame
- ? this.inputDataFun()
- : this.bIsGetYUV
- ? this.inputDataFun()
- : (this.bIsInput = !0),
- (i = null),
- r
- );
- }
- if (n > this.iInputMaxBufSize) return s;
- var o = null,
- l = e;
- switch (this.streamOpenMode) {
- case m:
- (o = new Uint8Array(t.buffer)), this.aInputDataLens.push(e);
- break;
- case y:
- l = e + 4;
- var f = new Uint32Array([e]),
- c = new Uint8Array(f.buffer);
- (o = new Uint8Array(l)),
- o.set(c, 0),
- o.set(t, 4),
- (f = null),
- (c = null),
- this.aInputDataLens.push(e + 4);
- break;
- default:
- return u;
- }
- for (var h = 0; h < l; h++) this.aInputDataBuffer[n + h] = o[h];
- return (
- (o = null),
- this.bIsFirstFrame
- ? this.inputDataFun()
- : this.bIsGetYUV
- ? this.inputDataFun()
- : (this.bIsInput = !0),
- r
- );
- },
- },
- {
- key: 'PlayM4_Play',
- value: function (t) {
- if (null === this.decodeWorker || this.bOpenStream === !1)
- return a;
- if (null !== t && 'string' != typeof t) return o;
- if (
- (this.bOnebyOne &&
- ((this.bPlayRateChange = !1),
- (this.bOnebyOne = !1),
- (this.bPause = !1),
- this.draw()),
- this.bPlay)
- )
- return r;
- if (null == this.oSuperRender) {
- var e = document.getElementById(t),
- n = e.getContext('webgl2');
- if (
- (n
- ? (this.oSuperRender = new SuperRender2(
- t,
- this.szBasePath
- ))
- : (this.oSuperRender = new SuperRender(
- t,
- this.szBasePath
- )),
- null == this.oSuperRender)
- )
- return c;
- }
- return null == this.audioRenderer &&
- ((this.audioRenderer = new AudioRenderer()),
- null == this.audioRenderer)
- ? c
- : ((this.sCanvasId = t),
- (this.bPlay = !0),
- (this.bPause = !1),
- (this.bOnebyOne = !1),
- (this.bPlaySound = !1),
- (this.bPlayRateChange = !1),
- this.draw(),
- r);
- },
- },
- {
- key: 'PlayM4_Stop',
- value: function () {
- return null == this.decodeWorker || null == this.oSuperRender
- ? a
- : this.bPlay
- ? (this.bPlaySound &&
- (this.PlayM4_StopSound(), (this.bPlaySound = !0)),
- (this.bPlay = !1),
- (this.bOnebyOne = !1),
- (this.bPause = !1),
- this.oSuperRender.SR_SetDisplayRect(null),
- (this.iZoomNum = 0),
- this.oSuperRender.SR_DisplayFrameData(
- this.nWidth,
- this.nHeight,
- null
- ),
- r)
- : a;
- },
- },
- {
- key: 'PlayM4_PlayRate',
- value: function (t) {
- return null == this.decodeWorker
- ? a
- : (1 === t
- ? (this.bPlayRateChange = !1)
- : (this.bPlayRateChange = !0),
- t < 1 && (t = 1),
- (this.iInputDataLen = t * T),
- r);
- },
- },
- {
- key: 'PlayM4_Pause',
- value: function (t) {
- return null == this.decodeWorker || null == this.oSuperRender
- ? a
- : this.bPlay
- ? this.bOnebyOne
- ? a
- : 'boolean' != typeof t
- ? o
- : ((this.bPause = t),
- (this.bIsFirstFrame = !0),
- t
- ? this.bPlaySound &&
- (this.PlayM4_StopSound(), (this.bPlaySound = !0))
- : (this.bPlaySound && this.PlayM4_PlaySound(),
- this.draw()),
- r)
- : a;
- },
- },
- {
- key: 'PlayM4_OneByOne',
- value: function () {
- return null == this.decodeWorker || null == this.oSuperRender
- ? a
- : this.bPlay
- ? ((this.iInputDataLen = T),
- (this.bPause = !0),
- (this.bOnebyOne = !0),
- (this.bPlayRateChange = !0),
- this.draw(),
- r)
- : a;
- },
- },
- {
- key: 'PlayM4_PlaySound',
- value: function (t) {
- return null === this.decodeWorker || this.bOpenStream === !1
- ? a
- : t < 0 || t > 16
- ? o
- : null == this.audioRenderer &&
- ((this.audioRenderer = new AudioRenderer()),
- null == this.audioRenderer)
- ? c
- : (this.audioRenderer.SetWndNum(t),
- (this.bPlaySound = !0),
- r);
- },
- },
- {
- key: 'PlayM4_StopSound',
- value: function () {
- return null == this.decodeWorker || null == this.audioRenderer
- ? a
- : this.bPlaySound
- ? ((this.bPlaySound = !1), r)
- : a;
- },
- },
- {
- key: 'PlayM4_SetDisplayBuf',
- value: function (t) {
- return null == this.decodeWorker
- ? a
- : t <= 0
- ? o
- : ((this.YUVBufferSize = t), r);
- },
- },
- {
- key: 'PlayM4_SetSecretKey',
- value: function (t, e, n) {
- if (null == this.decodeWorker || this.bOpenStream === !1)
- return a;
- if (null == e) return o;
- if (p === t) {
- if (128 !== n) return o;
- if (null == e || void 0 === e) return o;
- } else if (d !== t) return o;
- return (
- this.decodeWorker.postMessage({
- command: 'SetSecretKey',
- data: e,
- nKeyType: t,
- nKeyLen: n,
- }),
- r
- );
- },
- },
- {
- key: 'PlayM4_SetDecodeFrameType',
- value: function (t) {
- return null == this.decodeWorker || null == this.oSuperRender
- ? a
- : t !== v && t !== g
- ? o
- : ((this.nDecFrameType = t),
- this.decodeWorker.postMessage({
- command: 'SetDecodeFrameType',
- data: t,
- }),
- r);
- },
- },
- {
- key: 'PlayM4_SetIFrameDecInterval',
- value: function (t) {
- return this.nDecFrameType !== g
- ? a
- : t < 0
- ? o
- : (this.decodeWorker.postMessage({
- command: 'SetIFrameDecInterval',
- data: t,
- }),
- r);
- },
- },
- {
- key: 'PlayM4_SetDisplayRegion',
- value: function (t, e) {
- if (
- null === this.decodeWorker ||
- this.bPlay === !1 ||
- null === this.oSuperRender
- )
- return a;
- if (null === this.canvasId) return a;
- if (e === !0) {
- if (null === t || void 0 === t) return o;
- if (
- 'number' != typeof t.left ||
- 'number' != typeof t.top ||
- 'number' != typeof t.right ||
- 'number' != typeof t.bottom
- )
- return o;
- if (t.right < 0 || t.left < 0 || t.top < 0 || t.bottom < 0)
- return o;
- var n = t.left,
- i = t.right,
- s = t.top,
- u = t.bottom;
- if (
- i - n < 16 ||
- u - s < 16 ||
- i - n > this.nWidth ||
- u - s > this.nHeight
- )
- return o;
- var l = document
- .getElementById(this.sCanvasId)
- .getBoundingClientRect();
- (this.iCanvasWidth = l.width),
- (this.iCanvasHeight = l.height),
- 0 !== this.iZoomNum &&
- ((n =
- Math.round(n / this.iRatio_x) +
- this.stDisplayRect.left),
- (s =
- Math.round(s / this.iRatio_y) + this.stDisplayRect.top),
- (i =
- Math.round(i / this.iRatio_x) +
- this.stDisplayRect.left),
- (u =
- Math.round(u / this.iRatio_y) +
- this.stDisplayRect.top)),
- (this.stDisplayRect = {
- top: s,
- left: n,
- right: i,
- bottom: u,
- }),
- this.oSuperRender.SR_SetDisplayRect(this.stDisplayRect);
- var f = i - n,
- c = u - s;
- (this.iRatio_x = this.iCanvasWidth / f),
- (this.iRatio_y = this.iCanvasHeight / c),
- this.iZoomNum++;
- } else
- this.oSuperRender.SR_SetDisplayRect(null),
- (this.iZoomNum = 0);
- return (
- (this.bPause || this.bOnebyOne || this.bPlayRateChange) &&
- this.oSuperRender.SR_DisplayFrameData(
- this.nWidth,
- this.nHeight,
- new Uint8Array(this.aDisplayBuf)
- ),
- r
- );
- },
- },
- {
- key: 'PlayM4_GetBMP',
- value: function (t) {
- return this.getPic(t, 'GetBMP');
- },
- },
- {
- key: 'PlayM4_GetJPEG',
- value: function (t) {
- return this.getPic(t, 'GetJPEG');
- },
- },
- {
- key: 'PlayM4_SetVolume',
- value: function (t) {
- return null == this.decodeWorker
- ? a
- : null == this.audioRenderer
- ? a
- : t < 0 || t > 100
- ? o
- : (this.audioRenderer.SetVolume(t / 100), r);
- },
- },
- {
- key: 'PlayM4_GetVolume',
- value: function (t) {
- if (null == this.decodeWorker) return a;
- if (null == this.audioRenderer) return a;
- if (t && 'function' == typeof t) {
- var e = this.audioRenderer.GetVolume();
- return null === e ? h : (t(10 * Math.round(10 * e)), r);
- }
- return o;
- },
- },
- {
- key: 'PlayM4_GetOSDTime',
- value: function (t) {
- return null == this.decodeWorker
- ? a
- : this.bPlay
- ? t && 'function' == typeof t
- ? (t(this.szOSDTime), r)
- : o
- : a;
- },
- },
- {
- key: 'PlayM4_IsVisible',
- value: function (t) {
- return (this.bVisibility = t), r;
- },
- },
- {
- key: 'PlayM4_GetSdkVersion',
- value: function () {
- return '07020114';
- },
- },
- {
- key: 'PlayM4_GetInputBufSize',
- value: function () {
- return this.aInputDataBuffer.length;
- },
- },
- {
- key: 'PlayM4_SetInputBufSize',
- value: function (t) {
- return t > 0 ? ((this.iInputMaxBufSize = t), r) : o;
- },
- },
- {
- key: 'PlayM4_GetYUVBufSize',
- value: function () {
- return this.aVideoFrameBuffer.length;
- },
- },
- {
- key: 'PlayM4_ClearCanvas',
- value: function () {
- return null == this.oSuperRender
- ? a
- : (this.oSuperRender.SR_DisplayFrameData(
- this.nWidth,
- this.nHeight,
- null
- ),
- r);
- },
- },
- {
- key: 'PlayM4_ReleaseInputBuffer',
- value: function () {
- return null === this.aInputDataBuffer
- ? a
- : (this.aInputDataBuffer.splice(
- 0,
- this.aInputDataBuffer.length
- ),
- this.aInputDataLens.splice(0, this.aInputDataLens.length),
- r);
- },
- },
- {
- key: 'PlayM4_GetDecodeFrameType',
- value: function () {
- return this.nDecFrameType;
- },
- },
- ]),
- t
- );
- })();
- },
- function (t, e) {
- 'use strict';
- Object.defineProperty(e, '__esModule', {value: !0});
- var n =
- n ||
- (function (t, e) {
- var n = {},
- i = (n.lib = {}),
- r = function () {
- },
- o = (i.Base = {
- extend: function (t) {
- r.prototype = this;
- var e = new r();
- return (
- t && e.mixIn(t),
- e.hasOwnProperty('init') ||
- (e.init = function () {
- e.$super.init.apply(this, arguments);
- }),
- (e.init.prototype = e),
- (e.$super = this),
- e
- );
- },
- create: function () {
- var t = this.extend();
- return t.init.apply(t, arguments), t;
- },
- init: function () {
- },
- mixIn: function (t) {
- for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
- t.hasOwnProperty('toString') && (this.toString = t.toString);
- },
- clone: function () {
- return this.init.prototype.extend(this);
- },
- }),
- a = (i.WordArray = o.extend({
- init: function (t, n) {
- (t = this.words = t || []),
- (this.sigBytes = n != e ? n : 4 * t.length);
- },
- toString: function (t) {
- return (t || u).stringify(this);
- },
- concat: function (t) {
- var e = this.words,
- n = t.words,
- i = this.sigBytes;
- if (((t = t.sigBytes), this.clamp(), i % 4))
- for (var r = 0; r < t; r++)
- e[(i + r) >>> 2] |=
- ((n[r >>> 2] >>> (24 - 8 * (r % 4))) & 255) <<
- (24 - 8 * ((i + r) % 4));
- else if (65535 < n.length)
- for (r = 0; r < t; r += 4) e[(i + r) >>> 2] = n[r >>> 2];
- else e.push.apply(e, n);
- return (this.sigBytes += t), this;
- },
- clamp: function () {
- var e = this.words,
- n = this.sigBytes;
- (e[n >>> 2] &= 4294967295 << (32 - 8 * (n % 4))),
- (e.length = t.ceil(n / 4));
- },
- clone: function () {
- var t = o.clone.call(this);
- return (t.words = this.words.slice(0)), t;
- },
- random: function (e) {
- for (var n = [], i = 0; i < e; i += 4)
- n.push((4294967296 * t.random()) | 0);
- return new a.init(n, e);
- },
- })),
- s = (n.enc = {}),
- u = (s.Hex = {
- stringify: function (t) {
- var e = t.words;
- t = t.sigBytes;
- for (var n = [], i = 0; i < t; i++) {
- var r = (e[i >>> 2] >>> (24 - 8 * (i % 4))) & 255;
- n.push((r >>> 4).toString(16)), n.push((15 & r).toString(16));
- }
- return n.join('');
- },
- parse: function (t) {
- for (var e = t.length, n = [], i = 0; i < e; i += 2)
- n[i >>> 3] |=
- parseInt(t.substr(i, 2), 16) << (24 - 4 * (i % 8));
- return new a.init(n, e / 2);
- },
- }),
- l = (s.Latin1 = {
- stringify: function (t) {
- var e = t.words;
- t = t.sigBytes;
- for (var n = [], i = 0; i < t; i++)
- n.push(
- String.fromCharCode(
- (e[i >>> 2] >>> (24 - 8 * (i % 4))) & 255
- )
- );
- return n.join('');
- },
- parse: function (t) {
- for (var e = t.length, n = [], i = 0; i < e; i++)
- n[i >>> 2] |= (255 & t.charCodeAt(i)) << (24 - 8 * (i % 4));
- return new a.init(n, e);
- },
- }),
- f = (s.Utf8 = {
- stringify: function (t) {
- try {
- return decodeURIComponent(escape(l.stringify(t)));
- } catch (t) {
- throw Error('Malformed UTF-8 data');
- }
- },
- parse: function (t) {
- return l.parse(unescape(encodeURIComponent(t)));
- },
- }),
- c = (i.BufferedBlockAlgorithm = o.extend({
- reset: function () {
- (this._data = new a.init()), (this._nDataBytes = 0);
- },
- _append: function (t) {
- 'string' == typeof t && (t = f.parse(t)),
- this._data.concat(t),
- (this._nDataBytes += t.sigBytes);
- },
- _process: function (e) {
- var n = this._data,
- i = n.words,
- r = n.sigBytes,
- o = this.blockSize,
- s = r / (4 * o),
- s = e ? t.ceil(s) : t.max((0 | s) - this._minBufferSize, 0);
- if (((e = s * o), (r = t.min(4 * e, r)), e)) {
- for (var u = 0; u < e; u += o) this._doProcessBlock(i, u);
- (u = i.splice(0, e)), (n.sigBytes -= r);
- }
- return new a.init(u, r);
- },
- clone: function () {
- var t = o.clone.call(this);
- return (t._data = this._data.clone()), t;
- },
- _minBufferSize: 0,
- }));
- i.Hasher = c.extend({
- cfg: o.extend(),
- init: function (t) {
- (this.cfg = this.cfg.extend(t)), this.reset();
- },
- reset: function () {
- c.reset.call(this), this._doReset();
- },
- update: function (t) {
- return this._append(t), this._process(), this;
- },
- finalize: function (t) {
- return t && this._append(t), this._doFinalize();
- },
- blockSize: 16,
- _createHelper: function (t) {
- return function (e, n) {
- return new t.init(n).finalize(e);
- };
- },
- _createHmacHelper: function (t) {
- return function (e, n) {
- return new h.HMAC.init(t, n).finalize(e);
- };
- },
- });
- var h = (n.algo = {});
- return n;
- })(Math);
- !(function () {
- var t = n,
- e = t.lib.WordArray;
- t.enc.Base64 = {
- stringify: function (t) {
- var e = t.words,
- n = t.sigBytes,
- i = this._map;
- t.clamp(), (t = []);
- for (var r = 0; r < n; r += 3)
- for (
- var o =
- (((e[r >>> 2] >>> (24 - 8 * (r % 4))) & 255) << 16) |
- (((e[(r + 1) >>> 2] >>> (24 - 8 * ((r + 1) % 4))) & 255) <<
- 8) |
- ((e[(r + 2) >>> 2] >>> (24 - 8 * ((r + 2) % 4))) & 255),
- a = 0;
- 4 > a && r + 0.75 * a < n;
- a++
- )
- t.push(i.charAt((o >>> (6 * (3 - a))) & 63));
- if ((e = i.charAt(64))) for (; t.length % 4;) t.push(e);
- return t.join('');
- },
- parse: function (t) {
- var n = t.length,
- i = this._map,
- r = i.charAt(64);
- r && ((r = t.indexOf(r)), -1 != r && (n = r));
- for (var r = [], o = 0, a = 0; a < n; a++)
- if (a % 4) {
- var s = i.indexOf(t.charAt(a - 1)) << (2 * (a % 4)),
- u = i.indexOf(t.charAt(a)) >>> (6 - 2 * (a % 4));
- (r[o >>> 2] |= (s | u) << (24 - 8 * (o % 4))), o++;
- }
- return e.create(r, o);
- },
- _map:
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
- };
- })(),
- (function (t) {
- function e(t, e, n, i, r, o, a) {
- return (
- (t = t + ((e & n) | (~e & i)) + r + a),
- ((t << o) | (t >>> (32 - o))) + e
- );
- }
- function i(t, e, n, i, r, o, a) {
- return (
- (t = t + ((e & i) | (n & ~i)) + r + a),
- ((t << o) | (t >>> (32 - o))) + e
- );
- }
- function r(t, e, n, i, r, o, a) {
- return (
- (t = t + (e ^ n ^ i) + r + a), ((t << o) | (t >>> (32 - o))) + e
- );
- }
- function o(t, e, n, i, r, o, a) {
- return (
- (t = t + (n ^ (e | ~i)) + r + a),
- ((t << o) | (t >>> (32 - o))) + e
- );
- }
- for (
- var a = n,
- s = a.lib,
- u = s.WordArray,
- l = s.Hasher,
- s = a.algo,
- f = [],
- c = 0;
- 64 > c;
- c++
- )
- f[c] = (4294967296 * t.abs(t.sin(c + 1))) | 0;
- (s = s.MD5 = l.extend({
- _doReset: function () {
- this._hash = new u.init([
- 1732584193,
- 4023233417,
- 2562383102,
- 271733878,
- ]);
- },
- _doProcessBlock: function (t, n) {
- for (var a = 0; 16 > a; a++) {
- var s = n + a,
- u = t[s];
- t[s] =
- (16711935 & ((u << 8) | (u >>> 24))) |
- (4278255360 & ((u << 24) | (u >>> 8)));
- }
- var a = this._hash.words,
- s = t[n + 0],
- u = t[n + 1],
- l = t[n + 2],
- c = t[n + 3],
- h = t[n + 4],
- d = t[n + 5],
- p = t[n + 6],
- y = t[n + 7],
- m = t[n + 8],
- v = t[n + 9],
- g = t[n + 10],
- S = t[n + 11],
- b = t[n + 12],
- w = t[n + 13],
- _ = t[n + 14],
- P = t[n + 15],
- C = a[0],
- x = a[1],
- T = a[2],
- k = a[3],
- C = e(C, x, T, k, s, 7, f[0]),
- k = e(k, C, x, T, u, 12, f[1]),
- T = e(T, k, C, x, l, 17, f[2]),
- x = e(x, T, k, C, c, 22, f[3]),
- C = e(C, x, T, k, h, 7, f[4]),
- k = e(k, C, x, T, d, 12, f[5]),
- T = e(T, k, C, x, p, 17, f[6]),
- x = e(x, T, k, C, y, 22, f[7]),
- C = e(C, x, T, k, m, 7, f[8]),
- k = e(k, C, x, T, v, 12, f[9]),
- T = e(T, k, C, x, g, 17, f[10]),
- x = e(x, T, k, C, S, 22, f[11]),
- C = e(C, x, T, k, b, 7, f[12]),
- k = e(k, C, x, T, w, 12, f[13]),
- T = e(T, k, C, x, _, 17, f[14]),
- x = e(x, T, k, C, P, 22, f[15]),
- C = i(C, x, T, k, u, 5, f[16]),
- k = i(k, C, x, T, p, 9, f[17]),
- T = i(T, k, C, x, S, 14, f[18]),
- x = i(x, T, k, C, s, 20, f[19]),
- C = i(C, x, T, k, d, 5, f[20]),
- k = i(k, C, x, T, g, 9, f[21]),
- T = i(T, k, C, x, P, 14, f[22]),
- x = i(x, T, k, C, h, 20, f[23]),
- C = i(C, x, T, k, v, 5, f[24]),
- k = i(k, C, x, T, _, 9, f[25]),
- T = i(T, k, C, x, c, 14, f[26]),
- x = i(x, T, k, C, m, 20, f[27]),
- C = i(C, x, T, k, w, 5, f[28]),
- k = i(k, C, x, T, l, 9, f[29]),
- T = i(T, k, C, x, y, 14, f[30]),
- x = i(x, T, k, C, b, 20, f[31]),
- C = r(C, x, T, k, d, 4, f[32]),
- k = r(k, C, x, T, m, 11, f[33]),
- T = r(T, k, C, x, S, 16, f[34]),
- x = r(x, T, k, C, _, 23, f[35]),
- C = r(C, x, T, k, u, 4, f[36]),
- k = r(k, C, x, T, h, 11, f[37]),
- T = r(T, k, C, x, y, 16, f[38]),
- x = r(x, T, k, C, g, 23, f[39]),
- C = r(C, x, T, k, w, 4, f[40]),
- k = r(k, C, x, T, s, 11, f[41]),
- T = r(T, k, C, x, c, 16, f[42]),
- x = r(x, T, k, C, p, 23, f[43]),
- C = r(C, x, T, k, v, 4, f[44]),
- k = r(k, C, x, T, b, 11, f[45]),
- T = r(T, k, C, x, P, 16, f[46]),
- x = r(x, T, k, C, l, 23, f[47]),
- C = o(C, x, T, k, s, 6, f[48]),
- k = o(k, C, x, T, y, 10, f[49]),
- T = o(T, k, C, x, _, 15, f[50]),
- x = o(x, T, k, C, d, 21, f[51]),
- C = o(C, x, T, k, b, 6, f[52]),
- k = o(k, C, x, T, c, 10, f[53]),
- T = o(T, k, C, x, g, 15, f[54]),
- x = o(x, T, k, C, u, 21, f[55]),
- C = o(C, x, T, k, m, 6, f[56]),
- k = o(k, C, x, T, P, 10, f[57]),
- T = o(T, k, C, x, p, 15, f[58]),
- x = o(x, T, k, C, w, 21, f[59]),
- C = o(C, x, T, k, h, 6, f[60]),
- k = o(k, C, x, T, S, 10, f[61]),
- T = o(T, k, C, x, l, 15, f[62]),
- x = o(x, T, k, C, v, 21, f[63]);
- (a[0] = (a[0] + C) | 0),
- (a[1] = (a[1] + x) | 0),
- (a[2] = (a[2] + T) | 0),
- (a[3] = (a[3] + k) | 0);
- },
- _doFinalize: function () {
- var e = this._data,
- n = e.words,
- i = 8 * this._nDataBytes,
- r = 8 * e.sigBytes;
- n[r >>> 5] |= 128 << (24 - r % 32);
- var o = t.floor(i / 4294967296);
- for (
- n[(((r + 64) >>> 9) << 4) + 15] =
- (16711935 & ((o << 8) | (o >>> 24))) |
- (4278255360 & ((o << 24) | (o >>> 8))),
- n[(((r + 64) >>> 9) << 4) + 14] =
- (16711935 & ((i << 8) | (i >>> 24))) |
- (4278255360 & ((i << 24) | (i >>> 8))),
- e.sigBytes = 4 * (n.length + 1),
- this._process(),
- e = this._hash,
- n = e.words,
- i = 0;
- 4 > i;
- i++
- )
- (r = n[i]),
- (n[i] =
- (16711935 & ((r << 8) | (r >>> 24))) |
- (4278255360 & ((r << 24) | (r >>> 8))));
- return e;
- },
- clone: function () {
- var t = l.clone.call(this);
- return (t._hash = this._hash.clone()), t;
- },
- })),
- (a.MD5 = l._createHelper(s)),
- (a.HmacMD5 = l._createHmacHelper(s));
- })(Math),
- (function () {
- var t = n,
- e = t.lib,
- i = e.Base,
- r = e.WordArray,
- e = t.algo,
- o = (e.EvpKDF = i.extend({
- cfg: i.extend({keySize: 4, hasher: e.MD5, iterations: 1}),
- init: function (t) {
- this.cfg = this.cfg.extend(t);
- },
- compute: function (t, e) {
- for (
- var n = this.cfg,
- i = n.hasher.create(),
- o = r.create(),
- a = o.words,
- s = n.keySize,
- n = n.iterations;
- a.length < s;
- ) {
- u && i.update(u);
- var u = i.update(t).finalize(e);
- i.reset();
- for (var l = 1; l < n; l++) (u = i.finalize(u)), i.reset();
- o.concat(u);
- }
- return (o.sigBytes = 4 * s), o;
- },
- }));
- t.EvpKDF = function (t, e, n) {
- return o.create(n).compute(t, e);
- };
- })(),
- n.lib.Cipher ||
- (function (t) {
- var e = n,
- i = e.lib,
- r = i.Base,
- o = i.WordArray,
- a = i.BufferedBlockAlgorithm,
- s = e.enc.Base64,
- u = e.algo.EvpKDF,
- l = (i.Cipher = a.extend({
- cfg: r.extend(),
- createEncryptor: function (t, e) {
- return this.create(this._ENC_XFORM_MODE, t, e);
- },
- createDecryptor: function (t, e) {
- return this.create(this._DEC_XFORM_MODE, t, e);
- },
- init: function (t, e, n) {
- (this.cfg = this.cfg.extend(n)),
- (this._xformMode = t),
- (this._key = e),
- this.reset();
- },
- reset: function () {
- a.reset.call(this), this._doReset();
- },
- process: function (t) {
- return this._append(t), this._process();
- },
- finalize: function (t) {
- return t && this._append(t), this._doFinalize();
- },
- keySize: 4,
- ivSize: 4,
- _ENC_XFORM_MODE: 1,
- _DEC_XFORM_MODE: 2,
- _createHelper: function (t) {
- return {
- encrypt: function (e, n, i) {
- return ('string' == typeof n ? y : p).encrypt(t, e, n, i);
- },
- decrypt: function (e, n, i) {
- return ('string' == typeof n ? y : p).decrypt(t, e, n, i);
- },
- };
- },
- }));
- i.StreamCipher = l.extend({
- _doFinalize: function () {
- return this._process(!0);
- },
- blockSize: 1,
- });
- var f = (e.mode = {}),
- c = function (e, n, i) {
- var r = this._iv;
- r ? (this._iv = t) : (r = this._prevBlock);
- for (var o = 0; o < i; o++) e[n + o] ^= r[o];
- },
- h = (i.BlockCipherMode = r.extend({
- createEncryptor: function (t, e) {
- return this.Encryptor.create(t, e);
- },
- createDecryptor: function (t, e) {
- return this.Decryptor.create(t, e);
- },
- init: function (t, e) {
- (this._cipher = t), (this._iv = e);
- },
- })).extend();
- (h.Encryptor = h.extend({
- processBlock: function (t, e) {
- var n = this._cipher,
- i = n.blockSize;
- c.call(this, t, e, i),
- n.encryptBlock(t, e),
- (this._prevBlock = t.slice(e, e + i));
- },
- })),
- (h.Decryptor = h.extend({
- processBlock: function (t, e) {
- var n = this._cipher,
- i = n.blockSize,
- r = t.slice(e, e + i);
- n.decryptBlock(t, e),
- c.call(this, t, e, i),
- (this._prevBlock = r);
- },
- })),
- (f = f.CBC = h),
- (h = (e.pad = {}).Pkcs7 = {
- pad: function (t, e) {
- for (
- var n = 4 * e,
- n = n - t.sigBytes % n,
- i = (n << 24) | (n << 16) | (n << 8) | n,
- r = [],
- a = 0;
- a < n;
- a += 4
- )
- r.push(i);
- (n = o.create(r, n)), t.concat(n);
- },
- unpad: function (t) {
- t.sigBytes -= 255 & t.words[(t.sigBytes - 1) >>> 2];
- },
- }),
- (i.BlockCipher = l.extend({
- cfg: l.cfg.extend({mode: f, padding: h}),
- reset: function () {
- l.reset.call(this);
- var t = this.cfg,
- e = t.iv,
- t = t.mode;
- if (this._xformMode == this._ENC_XFORM_MODE)
- var n = t.createEncryptor;
- else (n = t.createDecryptor), (this._minBufferSize = 1);
- this._mode = n.call(t, this, e && e.words);
- },
- _doProcessBlock: function (t, e) {
- this._mode.processBlock(t, e);
- },
- _doFinalize: function () {
- var t = this.cfg.padding;
- if (this._xformMode == this._ENC_XFORM_MODE) {
- t.pad(this._data, this.blockSize);
- var e = this._process(!0);
- } else (e = this._process(!0)), t.unpad(e);
- return e;
- },
- blockSize: 4,
- }));
- var d = (i.CipherParams = r.extend({
- init: function (t) {
- this.mixIn(t);
- },
- toString: function (t) {
- return (t || this.formatter).stringify(this);
- },
- })),
- f = ((e.format = {}).OpenSSL = {
- stringify: function (t) {
- var e = t.ciphertext;
- return (
- (t = t.salt),
- (t
- ? o
- .create([1398893684, 1701076831])
- .concat(t)
- .concat(e)
- : e
- ).toString(s)
- );
- },
- parse: function (t) {
- t = s.parse(t);
- var e = t.words;
- if (1398893684 == e[0] && 1701076831 == e[1]) {
- var n = o.create(e.slice(2, 4));
- e.splice(0, 4), (t.sigBytes -= 16);
- }
- return d.create({ciphertext: t, salt: n});
- },
- }),
- p = (i.SerializableCipher = r.extend({
- cfg: r.extend({format: f}),
- encrypt: function (t, e, n, i) {
- i = this.cfg.extend(i);
- var r = t.createEncryptor(n, i);
- return (
- (e = r.finalize(e)),
- (r = r.cfg),
- d.create({
- ciphertext: e,
- key: n,
- iv: r.iv,
- algorithm: t,
- mode: r.mode,
- padding: r.padding,
- blockSize: t.blockSize,
- formatter: i.format,
- })
- );
- },
- decrypt: function (t, e, n, i) {
- return (
- (i = this.cfg.extend(i)),
- (e = this._parse(e, i.format)),
- t.createDecryptor(n, i).finalize(e.ciphertext)
- );
- },
- _parse: function (t, e) {
- return 'string' == typeof t ? e.parse(t, this) : t;
- },
- })),
- e = ((e.kdf = {}).OpenSSL = {
- execute: function (t, e, n, i) {
- return (
- i || (i = o.random(8)),
- (t = u.create({keySize: e + n}).compute(t, i)),
- (n = o.create(t.words.slice(e), 4 * n)),
- (t.sigBytes = 4 * e),
- d.create({key: t, iv: n, salt: i})
- );
- },
- }),
- y = (i.PasswordBasedCipher = p.extend({
- cfg: p.cfg.extend({kdf: e}),
- encrypt: function (t, e, n, i) {
- return (
- (i = this.cfg.extend(i)),
- (n = i.kdf.execute(n, t.keySize, t.ivSize)),
- (i.iv = n.iv),
- (t = p.encrypt.call(this, t, e, n.key, i)),
- t.mixIn(n),
- t
- );
- },
- decrypt: function (t, e, n, i) {
- return (
- (i = this.cfg.extend(i)),
- (e = this._parse(e, i.format)),
- (n = i.kdf.execute(n, t.keySize, t.ivSize, e.salt)),
- (i.iv = n.iv),
- p.decrypt.call(this, t, e, n.key, i)
- );
- },
- }));
- })(),
- (function () {
- for (
- var t = n,
- e = t.lib.BlockCipher,
- i = t.algo,
- r = [],
- o = [],
- a = [],
- s = [],
- u = [],
- l = [],
- f = [],
- c = [],
- h = [],
- d = [],
- p = [],
- y = 0;
- 256 > y;
- y++
- )
- p[y] = 128 > y ? y << 1 : (y << 1) ^ 283;
- for (var m = 0, v = 0, y = 0; 256 > y; y++) {
- var g = v ^ (v << 1) ^ (v << 2) ^ (v << 3) ^ (v << 4),
- g = (g >>> 8) ^ (255 & g) ^ 99;
- (r[m] = g), (o[g] = m);
- var S = p[m],
- b = p[S],
- w = p[b],
- _ = (257 * p[g]) ^ (16843008 * g);
- (a[m] = (_ << 24) | (_ >>> 8)),
- (s[m] = (_ << 16) | (_ >>> 16)),
- (u[m] = (_ << 8) | (_ >>> 24)),
- (l[m] = _),
- (_ = (16843009 * w) ^ (65537 * b) ^ (257 * S) ^ (16843008 * m)),
- (f[g] = (_ << 24) | (_ >>> 8)),
- (c[g] = (_ << 16) | (_ >>> 16)),
- (h[g] = (_ << 8) | (_ >>> 24)),
- (d[g] = _),
- m ? ((m = S ^ p[p[p[w ^ S]]]), (v ^= p[p[v]])) : (m = v = 1);
- }
- var P = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],
- i = (i.AES = e.extend({
- _doReset: function () {
- for (
- var t = this._key,
- e = t.words,
- n = t.sigBytes / 4,
- t = 4 * ((this._nRounds = n + 6) + 1),
- i = (this._keySchedule = []),
- o = 0;
- o < t;
- o++
- )
- if (o < n) i[o] = e[o];
- else {
- var a = i[o - 1];
- o % n
- ? 6 < n &&
- 4 == o % n &&
- (a =
- (r[a >>> 24] << 24) |
- (r[(a >>> 16) & 255] << 16) |
- (r[(a >>> 8) & 255] << 8) |
- r[255 & a])
- : ((a = (a << 8) | (a >>> 24)),
- (a =
- (r[a >>> 24] << 24) |
- (r[(a >>> 16) & 255] << 16) |
- (r[(a >>> 8) & 255] << 8) |
- r[255 & a]),
- (a ^= P[(o / n) | 0] << 24)),
- (i[o] = i[o - n] ^ a);
- }
- for (e = this._invKeySchedule = [], n = 0; n < t; n++)
- (o = t - n),
- (a = n % 4 ? i[o] : i[o - 4]),
- (e[n] =
- 4 > n || 4 >= o
- ? a
- : f[r[a >>> 24]] ^
- c[r[(a >>> 16) & 255]] ^
- h[r[(a >>> 8) & 255]] ^
- d[r[255 & a]]);
- },
- encryptBlock: function (t, e) {
- this._doCryptBlock(t, e, this._keySchedule, a, s, u, l, r);
- },
- decryptBlock: function (t, e) {
- var n = t[e + 1];
- (t[e + 1] = t[e + 3]),
- (t[e + 3] = n),
- this._doCryptBlock(t, e, this._invKeySchedule, f, c, h, d, o),
- (n = t[e + 1]),
- (t[e + 1] = t[e + 3]),
- (t[e + 3] = n);
- },
- _doCryptBlock: function (t, e, n, i, r, o, a, s) {
- for (
- var u = this._nRounds,
- l = t[e] ^ n[0],
- f = t[e + 1] ^ n[1],
- c = t[e + 2] ^ n[2],
- h = t[e + 3] ^ n[3],
- d = 4,
- p = 1;
- p < u;
- p++
- )
- var y =
- i[l >>> 24] ^
- r[(f >>> 16) & 255] ^
- o[(c >>> 8) & 255] ^
- a[255 & h] ^
- n[d++],
- m =
- i[f >>> 24] ^
- r[(c >>> 16) & 255] ^
- o[(h >>> 8) & 255] ^
- a[255 & l] ^
- n[d++],
- v =
- i[c >>> 24] ^
- r[(h >>> 16) & 255] ^
- o[(l >>> 8) & 255] ^
- a[255 & f] ^
- n[d++],
- h =
- i[h >>> 24] ^
- r[(l >>> 16) & 255] ^
- o[(f >>> 8) & 255] ^
- a[255 & c] ^
- n[d++],
- l = y,
- f = m,
- c = v;
- (y =
- ((s[l >>> 24] << 24) |
- (s[(f >>> 16) & 255] << 16) |
- (s[(c >>> 8) & 255] << 8) |
- s[255 & h]) ^
- n[d++]),
- (m =
- ((s[f >>> 24] << 24) |
- (s[(c >>> 16) & 255] << 16) |
- (s[(h >>> 8) & 255] << 8) |
- s[255 & l]) ^
- n[d++]),
- (v =
- ((s[c >>> 24] << 24) |
- (s[(h >>> 16) & 255] << 16) |
- (s[(l >>> 8) & 255] << 8) |
- s[255 & f]) ^
- n[d++]),
- (h =
- ((s[h >>> 24] << 24) |
- (s[(l >>> 16) & 255] << 16) |
- (s[(f >>> 8) & 255] << 8) |
- s[255 & c]) ^
- n[d++]),
- (t[e] = y),
- (t[e + 1] = m),
- (t[e + 2] = v),
- (t[e + 3] = h);
- },
- keySize: 8,
- }));
- t.AES = e._createHelper(i);
- })(),
- (e.default = n);
- },
- function (t, e) {
- 'use strict';
- function n(t, e, n) {
- null != t &&
- ('number' == typeof t
- ? this.fromNumber(t, e, n)
- : null == e && 'string' != typeof t
- ? this.fromString(t, 256)
- : this.fromString(t, e));
- }
- function r() {
- return new n(null);
- }
- function o(t, e, n, i, r, o) {
- for (; --o >= 0;) {
- var a = e * this[t++] + n[i] + r,
- r = Math.floor(a / 67108864);
- n[i++] = 67108863 & a;
- }
- return r;
- }
- function a(t, e, n, i, r, o) {
- var a = 32767 & e;
- for (e >>= 15; --o >= 0;) {
- var s = 32767 & this[t],
- u = this[t++] >> 15,
- l = e * s + u * a,
- s = a * s + ((32767 & l) << 15) + n[i] + (1073741823 & r),
- r = (s >>> 30) + (l >>> 15) + e * u + (r >>> 30);
- n[i++] = 1073741823 & s;
- }
- return r;
- }
- function s(t, e, n, i, r, o) {
- var a = 16383 & e;
- for (e >>= 14; --o >= 0;) {
- var s = 16383 & this[t],
- u = this[t++] >> 14,
- l = e * s + u * a,
- s = a * s + ((16383 & l) << 14) + n[i] + r,
- r = (s >> 28) + (l >> 14) + e * u;
- n[i++] = 268435455 & s;
- }
- return r;
- }
- function u(t) {
- return Ge.charAt(t);
- }
- function l(t, e) {
- var n = Ve[t.charCodeAt(e)];
- return null == n ? -1 : n;
- }
- function f(t) {
- for (var e = this.t - 1; e >= 0; --e) t[e] = this[e];
- (t.t = this.t), (t.s = this.s);
- }
- function c(t) {
- (this.t = 1),
- (this.s = t < 0 ? -1 : 0),
- t > 0 ? (this[0] = t) : t < -1 ? (this[0] = t + DV) : (this.t = 0);
- }
- function h(t) {
- var e = r();
- return e.fromInt(t), e;
- }
- function d(t, e) {
- var i;
- if (16 == e) i = 4;
- else if (8 == e) i = 3;
- else if (256 == e) i = 8;
- else if (2 == e) i = 1;
- else if (32 == e) i = 5;
- else {
- if (4 != e) return void this.fromRadix(t, e);
- i = 2;
- }
- this.s = this.t = 0;
- for (var r = t.length, o = !1, a = 0; --r >= 0;) {
- var s = 8 == i ? 255 & t[r] : l(t, r);
- s < 0
- ? '-' == t.charAt(r) && (o = !0)
- : ((o = !1),
- 0 == a
- ? (this[this.t++] = s)
- : a + i > this.DB
- ? ((this[this.t - 1] |=
- (s & ((1 << (this.DB - a)) - 1)) << a),
- (this[this.t++] = s >> (this.DB - a)))
- : (this[this.t - 1] |= s << a),
- (a += i),
- a >= this.DB && (a -= this.DB));
- }
- 8 == i &&
- 0 != (128 & t[0]) &&
- ((this.s = -1),
- a > 0 && (this[this.t - 1] |= ((1 << (this.DB - a)) - 1) << a)),
- this.clamp(),
- o && n.ZERO.subTo(this, this);
- }
- function p() {
- for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t;)
- --this.t;
- }
- function y(t) {
- if (this.s < 0) return '-' + this.negate().toString(t);
- if (16 == t) t = 4;
- else if (8 == t) t = 3;
- else if (2 == t) t = 1;
- else if (32 == t) t = 5;
- else if (64 == t) t = 6;
- else {
- if (4 != t) return this.toRadix(t);
- t = 2;
- }
- var e,
- n = (1 << t) - 1,
- i = !1,
- r = '',
- o = this.t,
- a = this.DB - (o * this.DB) % t;
- if (o-- > 0)
- for (
- a < this.DB && (e = this[o] >> a) > 0 && ((i = !0), (r = u(e)));
- o >= 0;
- )
- a < t
- ? ((e = (this[o] & ((1 << a) - 1)) << (t - a)),
- (e |= this[--o] >> (a += this.DB - t)))
- : ((e = (this[o] >> (a -= t)) & n),
- a <= 0 && ((a += this.DB), --o)),
- e > 0 && (i = !0),
- i && (r += u(e));
- return i ? r : '0';
- }
- function m() {
- var t = r();
- return n.ZERO.subTo(this, t), t;
- }
- function g() {
- return this.s < 0 ? this.negate() : this;
- }
- function S(t) {
- var e = this.s - t.s;
- if (0 != e) return e;
- var n = this.t,
- e = n - t.t;
- if (0 != e) return e;
- for (; --n >= 0;) if (0 != (e = this[n] - t[n])) return e;
- return 0;
- }
- function b(t) {
- var e,
- n = 1;
- return (
- 0 != (e = t >>> 16) && ((t = e), (n += 16)),
- 0 != (e = t >> 8) && ((t = e), (n += 8)),
- 0 != (e = t >> 4) && ((t = e), (n += 4)),
- 0 != (e = t >> 2) && ((t = e), (n += 2)),
- t >> 1 != 0 && (n += 1),
- n
- );
- }
- function w() {
- return this.t <= 0
- ? 0
- : this.DB * (this.t - 1) + b(this[this.t - 1] ^ (this.s & this.DM));
- }
- function _(t, e) {
- var n;
- for (n = this.t - 1; n >= 0; --n) e[n + t] = this[n];
- for (n = t - 1; n >= 0; --n) e[n] = 0;
- (e.t = this.t + t), (e.s = this.s);
- }
- function P(t, e) {
- for (var n = t; n < this.t; ++n) e[n - t] = this[n];
- (e.t = Math.max(this.t - t, 0)), (e.s = this.s);
- }
- function C(t, e) {
- var n,
- i = t % this.DB,
- r = this.DB - i,
- o = (1 << r) - 1,
- a = Math.floor(t / this.DB),
- s = (this.s << i) & this.DM;
- for (n = this.t - 1; n >= 0; --n)
- (e[n + a + 1] = (this[n] >> r) | s), (s = (this[n] & o) << i);
- for (n = a - 1; n >= 0; --n) e[n] = 0;
- (e[a] = s), (e.t = this.t + a + 1), (e.s = this.s), e.clamp();
- }
- function x(t, e) {
- e.s = this.s;
- var n = Math.floor(t / this.DB);
- if (n >= this.t) e.t = 0;
- else {
- var i = t % this.DB,
- r = this.DB - i,
- o = (1 << i) - 1;
- e[0] = this[n] >> i;
- for (var a = n + 1; a < this.t; ++a)
- (e[a - n - 1] |= (this[a] & o) << r), (e[a - n] = this[a] >> i);
- i > 0 && (e[this.t - n - 1] |= (this.s & o) << r),
- (e.t = this.t - n),
- e.clamp();
- }
- }
- function T(t, e) {
- for (var n = 0, i = 0, r = Math.min(t.t, this.t); n < r;)
- (i += this[n] - t[n]), (e[n++] = i & this.DM), (i >>= this.DB);
- if (t.t < this.t) {
- for (i -= t.s; n < this.t;)
- (i += this[n]), (e[n++] = i & this.DM), (i >>= this.DB);
- i += this.s;
- } else {
- for (i += this.s; n < t.t;)
- (i -= t[n]), (e[n++] = i & this.DM), (i >>= this.DB);
- i -= t.s;
- }
- (e.s = i < 0 ? -1 : 0),
- i < -1 ? (e[n++] = this.DV + i) : i > 0 && (e[n++] = i),
- (e.t = n),
- e.clamp();
- }
- function k(t, e) {
- var i = this.abs(),
- r = t.abs(),
- o = i.t;
- for (e.t = o + r.t; --o >= 0;) e[o] = 0;
- for (o = 0; o < r.t; ++o) e[o + i.t] = i.am(0, r[o], e, o, 0, i.t);
- (e.s = 0), e.clamp(), this.s != t.s && n.ZERO.subTo(e, e);
- }
- function D(t) {
- for (var e = this.abs(), n = (t.t = 2 * e.t); --n >= 0;) t[n] = 0;
- for (n = 0; n < e.t - 1; ++n) {
- var i = e.am(n, e[n], t, 2 * n, 0, 1);
- (t[n + e.t] += e.am(n + 1, 2 * e[n], t, 2 * n + 1, i, e.t - n - 1)) >=
- e.DV && ((t[n + e.t] -= e.DV), (t[n + e.t + 1] = 1));
- }
- t.t > 0 && (t[t.t - 1] += e.am(n, e[n], t, 2 * n, 0, 1)),
- (t.s = 0),
- t.clamp();
- }
- function M(t, e, i) {
- var o = t.abs();
- if (!(o.t <= 0)) {
- var a = this.abs();
- if (a.t < o.t) null != e && e.fromInt(0), null != i && this.copyTo(i);
- else {
- null == i && (i = r());
- var s = r(),
- u = this.s,
- t = t.s,
- l = this.DB - b(o[o.t - 1]);
- if (
- (l > 0
- ? (o.lShiftTo(l, s), a.lShiftTo(l, i))
- : (o.copyTo(s), a.copyTo(i)),
- (o = s.t),
- (a = s[o - 1]),
- 0 != a)
- ) {
- var f = a * (1 << this.F1) + (o > 1 ? s[o - 2] >> this.F2 : 0),
- c = this.FV / f,
- f = (1 << this.F1) / f,
- h = 1 << this.F2,
- d = i.t,
- p = d - o,
- y = null == e ? r() : e;
- for (
- s.dlShiftTo(p, y),
- i.compareTo(y) >= 0 && ((i[i.t++] = 1), i.subTo(y, i)),
- n.ONE.dlShiftTo(o, y),
- y.subTo(s, s);
- s.t < o;
- )
- s[s.t++] = 0;
- for (; --p >= 0;) {
- var m =
- i[--d] == a
- ? this.DM
- : Math.floor(i[d] * c + (i[d - 1] + h) * f);
- if ((i[d] += s.am(0, m, i, p, 0, o)) < m)
- for (s.dlShiftTo(p, y), i.subTo(y, i); i[d] < --m;)
- i.subTo(y, i);
- }
- null != e && (i.drShiftTo(o, e), u != t && n.ZERO.subTo(e, e)),
- (i.t = o),
- i.clamp(),
- l > 0 && i.rShiftTo(l, i),
- u < 0 && n.ZERO.subTo(i, i);
- }
- }
- }
- }
- function R(t) {
- var e = r();
- return (
- this.abs().divRemTo(t, null, e),
- this.s < 0 && e.compareTo(n.ZERO) > 0 && t.subTo(e, e),
- e
- );
- }
- function E(t) {
- this.m = t;
- }
- function z(t) {
- return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t;
- }
- function I(t) {
- return t;
- }
- function A(t) {
- t.divRemTo(this.m, null, t);
- }
- function F(t, e, n) {
- t.multiplyTo(e, n), this.reduce(n);
- }
- function O(t, e) {
- t.squareTo(e), this.reduce(e);
- }
- function B() {
- if (this.t < 1) return 0;
- var t = this[0];
- if (0 == (1 & t)) return 0;
- var e = 3 & t,
- e = (e * (2 - (15 & t) * e)) & 15,
- e = (e * (2 - (255 & t) * e)) & 255,
- e = (e * (2 - (((65535 & t) * e) & 65535))) & 65535,
- e = (e * (2 - (t * e) % this.DV)) % this.DV;
- return e > 0 ? this.DV - e : -e;
- }
- function L(t) {
- (this.m = t),
- (this.mp = t.invDigit()),
- (this.mpl = 32767 & this.mp),
- (this.mph = this.mp >> 15),
- (this.um = (1 << (t.DB - 15)) - 1),
- (this.mt2 = 2 * t.t);
- }
- function N(t) {
- var e = r();
- return (
- t.abs().dlShiftTo(this.m.t, e),
- e.divRemTo(this.m, null, e),
- t.s < 0 && e.compareTo(n.ZERO) > 0 && this.m.subTo(e, e),
- e
- );
- }
- function q(t) {
- var e = r();
- return t.copyTo(e), this.reduce(e), e;
- }
- function H(t) {
- for (; t.t <= this.mt2;) t[t.t++] = 0;
- for (var e = 0; e < this.m.t; ++e) {
- var n = 32767 & t[e],
- i =
- (n * this.mpl +
- (((n * this.mph + (t[e] >> 15) * this.mpl) & this.um) << 15)) &
- t.DM,
- n = e + this.m.t;
- for (t[n] += this.m.am(0, i, t, e, 0, this.m.t); t[n] >= t.DV;)
- (t[n] -= t.DV), t[++n]++;
- }
- t.clamp(),
- t.drShiftTo(this.m.t, t),
- t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
- }
- function j(t, e) {
- t.squareTo(e), this.reduce(e);
- }
- function W(t, e, n) {
- t.multiplyTo(e, n), this.reduce(n);
- }
- function U() {
- return 0 == (this.t > 0 ? 1 & this[0] : this.s);
- }
- function G(t, e) {
- if (t > 4294967295 || t < 1) return n.ONE;
- var i = r(),
- o = r(),
- a = e.convert(this),
- s = b(t) - 1;
- for (a.copyTo(i); --s >= 0;)
- if ((e.sqrTo(i, o), (t & (1 << s)) > 0)) e.mulTo(o, a, i);
- else
- var u = i,
- i = o,
- o = u;
- return e.revert(i);
- }
- function V(t, e) {
- var n;
- return (
- (n = t < 256 || e.isEven() ? new E(e) : new L(e)), this.exp(t, n)
- );
- }
- function Y() {
- var t = r();
- return this.copyTo(t), t;
- }
- function X() {
- if (this.s < 0) {
- if (1 == this.t) return this[0] - this.DV;
- if (0 == this.t) return -1;
- } else {
- if (1 == this.t) return this[0];
- if (0 == this.t) return 0;
- }
- return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];
- }
- function J() {
- return 0 == this.t ? this.s : (this[0] << 24) >> 24;
- }
- function $() {
- return 0 == this.t ? this.s : (this[0] << 16) >> 16;
- }
- function K(t) {
- return Math.floor(Math.LN2 * this.DB / Math.log(t));
- }
- function Z() {
- return this.s < 0
- ? -1
- : this.t <= 0 || (1 == this.t && this[0] <= 0)
- ? 0
- : 1;
- }
- function Q(t) {
- if ((null == t && (t = 10), 0 == this.signum() || t < 2 || t > 36))
- return '0';
- var e = this.chunkSize(t),
- e = Math.pow(t, e),
- n = h(e),
- i = r(),
- o = r(),
- a = '';
- for (this.divRemTo(n, i, o); i.signum() > 0;)
- (a = (e + o.intValue()).toString(t).substr(1) + a),
- i.divRemTo(n, i, o);
- return o.intValue().toString(t) + a;
- }
- function tt(t, e) {
- this.fromInt(0), null == e && (e = 10);
- for (
- var i = this.chunkSize(e),
- r = Math.pow(e, i),
- o = !1,
- a = 0,
- s = 0,
- u = 0;
- u < t.length;
- ++u
- ) {
- var f = l(t, u);
- f < 0
- ? '-' == t.charAt(u) && 0 == this.signum() && (o = !0)
- : ((s = e * s + f),
- ++a >= i &&
- (this.dMultiply(r), this.dAddOffset(s, 0), (s = a = 0)));
- }
- a > 0 && (this.dMultiply(Math.pow(e, a)), this.dAddOffset(s, 0)),
- o && n.ZERO.subTo(this, this);
- }
- function et(t, e, i) {
- if ('number' == typeof e)
- if (t < 2) this.fromInt(1);
- else
- for (
- this.fromNumber(t, i),
- this.testBit(t - 1) ||
- this.bitwiseTo(n.ONE.shiftLeft(t - 1), lt, this),
- this.isEven() && this.dAddOffset(1, 0);
- !this.isProbablePrime(e);
- )
- this.dAddOffset(2, 0),
- this.bitLength() > t &&
- this.subTo(n.ONE.shiftLeft(t - 1), this);
- else {
- var i = [],
- r = 7 & t;
- (i.length = (t >> 3) + 1),
- e.nextBytes(i),
- r > 0 ? (i[0] &= (1 << r) - 1) : (i[0] = 0),
- this.fromString(i, 256);
- }
- }
- function nt() {
- var t = this.t,
- e = [];
- e[0] = this.s;
- var n,
- i = this.DB - (t * this.DB) % 8,
- r = 0;
- if (t-- > 0)
- for (
- i < this.DB &&
- (n = this[t] >> i) != (this.s & this.DM) >> i &&
- (e[r++] = n | (this.s << (this.DB - i)));
- t >= 0;
- )
- i < 8
- ? ((n = (this[t] & ((1 << i) - 1)) << (8 - i)),
- (n |= this[--t] >> (i += this.DB - 8)))
- : ((n = (this[t] >> (i -= 8)) & 255),
- i <= 0 && ((i += this.DB), --t)),
- 0 != (128 & n) && (n |= -256),
- 0 == r && (128 & this.s) != (128 & n) && ++r,
- (r > 0 || n != this.s) && (e[r++] = n);
- return e;
- }
- function it(t) {
- return 0 == this.compareTo(t);
- }
- function rt(t) {
- return this.compareTo(t) < 0 ? this : t;
- }
- function ot(t) {
- return this.compareTo(t) > 0 ? this : t;
- }
- function at(t, e, n) {
- var i,
- r,
- o = Math.min(t.t, this.t);
- for (i = 0; i < o; ++i) n[i] = e(this[i], t[i]);
- if (t.t < this.t) {
- for (r = t.s & this.DM, i = o; i < this.t; ++i) n[i] = e(this[i], r);
- n.t = this.t;
- } else {
- for (r = this.s & this.DM, i = o; i < t.t; ++i) n[i] = e(r, t[i]);
- n.t = t.t;
- }
- (n.s = e(this.s, t.s)), n.clamp();
- }
- function st(t, e) {
- return t & e;
- }
- function ut(t) {
- var e = r();
- return this.bitwiseTo(t, st, e), e;
- }
- function lt(t, e) {
- return t | e;
- }
- function ft(t) {
- var e = r();
- return this.bitwiseTo(t, lt, e), e;
- }
- function ct(t, e) {
- return t ^ e;
- }
- function ht(t) {
- var e = r();
- return this.bitwiseTo(t, ct, e), e;
- }
- function dt(t, e) {
- return t & ~e;
- }
- function pt(t) {
- var e = r();
- return this.bitwiseTo(t, dt, e), e;
- }
- function yt() {
- for (var t = r(), e = 0; e < this.t; ++e) t[e] = this.DM & ~this[e];
- return (t.t = this.t), (t.s = ~this.s), t;
- }
- function mt(t) {
- var e = r();
- return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
- }
- function vt(t) {
- var e = r();
- return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
- }
- function gt(t) {
- if (0 == t) return -1;
- var e = 0;
- return (
- 0 == (65535 & t) && ((t >>= 16), (e += 16)),
- 0 == (255 & t) && ((t >>= 8), (e += 8)),
- 0 == (15 & t) && ((t >>= 4), (e += 4)),
- 0 == (3 & t) && ((t >>= 2), (e += 2)),
- 0 == (1 & t) && ++e,
- e
- );
- }
- function St() {
- for (var t = 0; t < this.t; ++t)
- if (0 != this[t]) return t * this.DB + gt(this[t]);
- return this.s < 0 ? this.t * this.DB : -1;
- }
- function bt(t) {
- for (var e = 0; 0 != t;) (t &= t - 1), ++e;
- return e;
- }
- function wt() {
- for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
- t += bt(this[n] ^ e);
- return t;
- }
- function _t(t) {
- var e = Math.floor(t / this.DB);
- return e >= this.t
- ? 0 != this.s
- : 0 != (this[e] & (1 << (t % this.DB)));
- }
- function Pt(t, e) {
- var i = n.ONE.shiftLeft(t);
- return this.bitwiseTo(i, e, i), i;
- }
- function Ct(t) {
- return this.changeBit(t, lt);
- }
- function xt(t) {
- return this.changeBit(t, dt);
- }
- function Tt(t) {
- return this.changeBit(t, ct);
- }
- function kt(t, e) {
- for (var n = 0, i = 0, r = Math.min(t.t, this.t); n < r;)
- (i += this[n] + t[n]), (e[n++] = i & this.DM), (i >>= this.DB);
- if (t.t < this.t) {
- for (i += t.s; n < this.t;)
- (i += this[n]), (e[n++] = i & this.DM), (i >>= this.DB);
- i += this.s;
- } else {
- for (i += this.s; n < t.t;)
- (i += t[n]), (e[n++] = i & this.DM), (i >>= this.DB);
- i += t.s;
- }
- (e.s = i < 0 ? -1 : 0),
- i > 0 ? (e[n++] = i) : i < -1 && (e[n++] = this.DV + i),
- (e.t = n),
- e.clamp();
- }
- function Dt(t) {
- var e = r();
- return this.addTo(t, e), e;
- }
- function Mt(t) {
- var e = r();
- return this.subTo(t, e), e;
- }
- function Rt(t) {
- var e = r();
- return this.multiplyTo(t, e), e;
- }
- function Et() {
- var t = r();
- return this.squareTo(t), t;
- }
- function zt(t) {
- var e = r();
- return this.divRemTo(t, e, null), e;
- }
- function It(t) {
- var e = r();
- return this.divRemTo(t, null, e), e;
- }
- function At(t) {
- var e = r(),
- n = r();
- return this.divRemTo(t, e, n), [e, n];
- }
- function Ft(t) {
- (this[this.t] = this.am(0, t - 1, this, 0, 0, this.t)),
- ++this.t,
- this.clamp();
- }
- function Ot(t, e) {
- if (0 != t) {
- for (; this.t <= e;) this[this.t++] = 0;
- for (this[e] += t; this[e] >= this.DV;)
- (this[e] -= this.DV),
- ++e >= this.t && (this[this.t++] = 0),
- ++this[e];
- }
- }
- function Bt() {
- }
- function Lt(t) {
- return t;
- }
- function Nt(t, e, n) {
- t.multiplyTo(e, n);
- }
- function qt(t, e) {
- t.squareTo(e);
- }
- function Ht(t) {
- return this.exp(t, new Bt());
- }
- function jt(t, e, n) {
- var i = Math.min(this.t + t.t, e);
- for (n.s = 0, n.t = i; i > 0;) n[--i] = 0;
- var r;
- for (r = n.t - this.t; i < r; ++i)
- n[i + this.t] = this.am(0, t[i], n, i, 0, this.t);
- for (r = Math.min(t.t, e); i < r; ++i) this.am(0, t[i], n, i, 0, e - i);
- n.clamp();
- }
- function Wt(t, e, n) {
- --e;
- var i = (n.t = this.t + t.t - e);
- for (n.s = 0; --i >= 0;) n[i] = 0;
- for (i = Math.max(e - this.t, 0); i < t.t; ++i)
- n[this.t + i - e] = this.am(e - i, t[i], n, 0, 0, this.t + i - e);
- n.clamp(), n.drShiftTo(1, n);
- }
- function Ut(t) {
- (this.r2 = r()),
- (this.q3 = r()),
- n.ONE.dlShiftTo(2 * t.t, this.r2),
- (this.mu = this.r2.divide(t)),
- (this.m = t);
- }
- function Gt(t) {
- if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m);
- if (t.compareTo(this.m) < 0) return t;
- var e = r();
- return t.copyTo(e), this.reduce(e), e;
- }
- function Vt(t) {
- return t;
- }
- function Yt(t) {
- for (
- t.drShiftTo(this.m.t - 1, this.r2),
- t.t > this.m.t + 1 && ((t.t = this.m.t + 1), t.clamp()),
- this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
- this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
- t.compareTo(this.r2) < 0;
- )
- t.dAddOffset(1, this.m.t + 1);
- for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0;)
- t.subTo(this.m, t);
- }
- function Xt(t, e) {
- t.squareTo(e), this.reduce(e);
- }
- function Jt(t, e, n) {
- t.multiplyTo(e, n), this.reduce(n);
- }
- function $t(t, e) {
- var n,
- i,
- o = t.bitLength(),
- a = h(1);
- if (o <= 0) return a;
- (n = o < 18 ? 1 : o < 48 ? 3 : o < 144 ? 4 : o < 768 ? 5 : 6),
- (i = o < 8 ? new E(e) : e.isEven() ? new Ut(e) : new L(e));
- var s = [],
- u = 3,
- l = n - 1,
- f = (1 << n) - 1;
- if (((s[1] = i.convert(this)), n > 1))
- for (o = r(), i.sqrTo(s[1], o); u <= f;)
- (s[u] = r()), i.mulTo(o, s[u - 2], s[u]), (u += 2);
- for (var c, d = t.t - 1, p = !0, y = r(), o = b(t[d]) - 1; d >= 0;) {
- for (
- o >= l
- ? (c = (t[d] >> (o - l)) & f)
- : ((c = (t[d] & ((1 << (o + 1)) - 1)) << (l - o)),
- d > 0 && (c |= t[d - 1] >> (this.DB + o - l))),
- u = n;
- 0 == (1 & c);
- )
- (c >>= 1), --u;
- if (((o -= u) < 0 && ((o += this.DB), --d), p))
- s[c].copyTo(a), (p = !1);
- else {
- for (; u > 1;) i.sqrTo(a, y), i.sqrTo(y, a), (u -= 2);
- u > 0 ? i.sqrTo(a, y) : ((u = a), (a = y), (y = u)),
- i.mulTo(y, s[c], a);
- }
- for (; d >= 0 && 0 == (t[d] & (1 << o));)
- i.sqrTo(a, y),
- (u = a),
- (a = y),
- (y = u),
- --o < 0 && ((o = this.DB - 1), --d);
- }
- return i.revert(a);
- }
- function Kt(t) {
- var e = this.s < 0 ? this.negate() : this.clone(),
- t = t.s < 0 ? t.negate() : t.clone();
- if (e.compareTo(t) < 0)
- var n = e,
- e = t,
- t = n;
- var n = e.getLowestSetBit(),
- i = t.getLowestSetBit();
- if (i < 0) return e;
- for (
- n < i && (i = n), i > 0 && (e.rShiftTo(i, e), t.rShiftTo(i, t));
- e.signum() > 0;
- )
- (n = e.getLowestSetBit()) > 0 && e.rShiftTo(n, e),
- (n = t.getLowestSetBit()) > 0 && t.rShiftTo(n, t),
- e.compareTo(t) >= 0
- ? (e.subTo(t, e), e.rShiftTo(1, e))
- : (t.subTo(e, t), t.rShiftTo(1, t));
- return i > 0 && t.lShiftTo(i, t), t;
- }
- function Zt(t) {
- if (t <= 0) return 0;
- var e = this.DV % t,
- n = this.s < 0 ? t - 1 : 0;
- if (this.t > 0)
- if (0 == e) n = this[0] % t;
- else for (var i = this.t - 1; i >= 0; --i) n = (e * n + this[i]) % t;
- return n;
- }
- function Qt(t) {
- var e = t.isEven();
- if ((this.isEven() && e) || 0 == t.signum()) return n.ZERO;
- for (
- var i = t.clone(),
- r = this.clone(),
- o = h(1),
- a = h(0),
- s = h(0),
- u = h(1);
- 0 != i.signum();
- ) {
- for (; i.isEven();)
- i.rShiftTo(1, i),
- e
- ? ((o.isEven() && a.isEven()) ||
- (o.addTo(this, o), a.subTo(t, a)),
- o.rShiftTo(1, o))
- : a.isEven() || a.subTo(t, a),
- a.rShiftTo(1, a);
- for (; r.isEven();)
- r.rShiftTo(1, r),
- e
- ? ((s.isEven() && u.isEven()) ||
- (s.addTo(this, s), u.subTo(t, u)),
- s.rShiftTo(1, s))
- : u.isEven() || u.subTo(t, u),
- u.rShiftTo(1, u);
- i.compareTo(r) >= 0
- ? (i.subTo(r, i), e && o.subTo(s, o), a.subTo(u, a))
- : (r.subTo(i, r), e && s.subTo(o, s), u.subTo(a, u));
- }
- return 0 != r.compareTo(n.ONE)
- ? n.ZERO
- : u.compareTo(t) >= 0
- ? u.subtract(t)
- : u.signum() < 0
- ? (u.addTo(t, u), u.signum() < 0 ? u.add(t) : u)
- : u;
- }
- function te(t) {
- var e,
- n = this.abs();
- if (1 == n.t && n[0] <= Ye[Ye.length - 1]) {
- for (e = 0; e < Ye.length; ++e) if (n[0] == Ye[e]) return !0;
- return !1;
- }
- if (n.isEven()) return !1;
- for (e = 1; e < Ye.length;) {
- for (var i = Ye[e], r = e + 1; r < Ye.length && i < Xe;)
- i *= Ye[r++];
- for (i = n.modInt(i); e < r;) if (i % Ye[e++] == 0) return !1;
- }
- return n.millerRabin(t);
- }
- function ee(t) {
- var e = this.subtract(n.ONE),
- i = e.getLowestSetBit();
- if (i <= 0) return !1;
- var o = e.shiftRight(i),
- t = (t + 1) >> 1;
- t > Ye.length && (t = Ye.length);
- for (var a = r(), s = 0; s < t; ++s) {
- a.fromInt(Ye[Math.floor(Math.random() * Ye.length)]);
- var u = a.modPow(o, this);
- if (0 != u.compareTo(n.ONE) && 0 != u.compareTo(e)) {
- for (var l = 1; l++ < i && 0 != u.compareTo(e);)
- if (((u = u.modPowInt(2, this)), 0 == u.compareTo(n.ONE)))
- return !1;
- if (0 != u.compareTo(e)) return !1;
- }
- }
- return !0;
- }
- function ne() {
- }
- function ie(t) {
- var e;
- for (e = 0; e < t.length; e++) t[e] = Math.floor(256 * Math.random());
- }
- function re() {
- (this.j = this.i = 0), (this.S = []);
- }
- function oe(t) {
- var e, n, i;
- for (e = 0; e < 256; ++e) this.S[e] = e;
- for (e = n = 0; e < 256; ++e)
- (n = (n + this.S[e] + t[e % t.length]) & 255),
- (i = this.S[e]),
- (this.S[e] = this.S[n]),
- (this.S[n] = i);
- this.j = this.i = 0;
- }
- function ae() {
- var t;
- return (
- (this.i = (this.i + 1) & 255),
- (this.j = (this.j + this.S[this.i]) & 255),
- (t = this.S[this.i]),
- (this.S[this.i] = this.S[this.j]),
- (this.S[this.j] = t),
- this.S[(t + this.S[this.i]) & 255]
- );
- }
- function se() {
- return new re();
- }
- function ue(t) {
- ($e[Ke++] ^= 255 & t),
- ($e[Ke++] ^= (t >> 8) & 255),
- ($e[Ke++] ^= (t >> 16) & 255),
- ($e[Ke++] ^= (t >> 24) & 255),
- Ke >= Ze && (Ke -= Ze);
- }
- function le() {
- ue(new Date().getTime());
- }
- function fe() {
- if (null == Je) {
- for (le(), Je = se(), Je.init($e), Ke = 0; Ke < $e.length; ++Ke)
- $e[Ke] = 0;
- Ke = 0;
- }
- return Je.next();
- }
- function ce(t) {
- var e;
- for (e = 0; e < t.length; ++e) t[e] = fe();
- }
- function he() {
- }
- function de(t) {
- function e(t, e) {
- var n = (65535 & t) + (65535 & e);
- return (((t >> 16) + (e >> 16) + (n >> 16)) << 16) | (65535 & n);
- }
- function n(t, e) {
- return (t >>> e) | (t << (32 - e));
- }
- return (
- (t = (function (t) {
- for (
- var t = t.replace(/\r\n/g, '\n'), e = '', n = 0;
- n < t.length;
- n++
- ) {
- var i = t.charCodeAt(n);
- i < 128
- ? (e += String.fromCharCode(i))
- : (i > 127 && i < 2048
- ? (e += String.fromCharCode((i >> 6) | 192))
- : ((e += String.fromCharCode((i >> 12) | 224)),
- (e += String.fromCharCode(((i >> 6) & 63) | 128))),
- (e += String.fromCharCode((63 & i) | 128)));
- }
- return e;
- })(t)),
- (function (t) {
- for (var e = '', n = 0; n < 4 * t.length; n++)
- e +=
- '0123456789abcdef'.charAt(
- (t[n >> 2] >> (8 * (3 - n % 4) + 4)) & 15
- ) +
- '0123456789abcdef'.charAt(
- (t[n >> 2] >> (8 * (3 - n % 4))) & 15
- );
- return e;
- })(
- (function (t, i) {
- var r,
- o,
- a,
- s,
- u,
- l,
- f,
- c,
- h,
- d,
- p,
- y,
- m = [
- 1116352408,
- 1899447441,
- 3049323471,
- 3921009573,
- 961987163,
- 1508970993,
- 2453635748,
- 2870763221,
- 3624381080,
- 310598401,
- 607225278,
- 1426881987,
- 1925078388,
- 2162078206,
- 2614888103,
- 3248222580,
- 3835390401,
- 4022224774,
- 264347078,
- 604807628,
- 770255983,
- 1249150122,
- 1555081692,
- 1996064986,
- 2554220882,
- 2821834349,
- 2952996808,
- 3210313671,
- 3336571891,
- 3584528711,
- 113926993,
- 338241895,
- 666307205,
- 773529912,
- 1294757372,
- 1396182291,
- 1695183700,
- 1986661051,
- 2177026350,
- 2456956037,
- 2730485921,
- 2820302411,
- 3259730800,
- 3345764771,
- 3516065817,
- 3600352804,
- 4094571909,
- 275423344,
- 430227734,
- 506948616,
- 659060556,
- 883997877,
- 958139571,
- 1322822218,
- 1537002063,
- 1747873779,
- 1955562222,
- 2024104815,
- 2227730452,
- 2361852424,
- 2428436474,
- 2756734187,
- 3204031479,
- 3329325298,
- ],
- v = [
- 1779033703,
- 3144134277,
- 1013904242,
- 2773480762,
- 1359893119,
- 2600822924,
- 528734635,
- 1541459225,
- ],
- g = Array(64);
- for (
- t[i >> 5] |= 128 << (24 - i % 32),
- t[(((i + 64) >> 9) << 4) + 15] = i,
- h = 0;
- h < t.length;
- h += 16
- ) {
- for (
- r = v[0],
- o = v[1],
- a = v[2],
- s = v[3],
- u = v[4],
- l = v[5],
- f = v[6],
- c = v[7],
- d = 0;
- d < 64;
- d++
- )
- (g[d] =
- d < 16
- ? t[d + h]
- : e(
- e(
- e(
- n(g[d - 2], 17) ^
- n(g[d - 2], 19) ^
- (g[d - 2] >>> 10),
- g[d - 7]
- ),
- n(g[d - 15], 7) ^
- n(g[d - 15], 18) ^
- (g[d - 15] >>> 3)
- ),
- g[d - 16]
- )),
- (p = e(
- e(
- e(
- e(c, n(u, 6) ^ n(u, 11) ^ n(u, 25)),
- (u & l) ^ (~u & f)
- ),
- m[d]
- ),
- g[d]
- )),
- (y = e(
- n(r, 2) ^ n(r, 13) ^ n(r, 22),
- (r & o) ^ (r & a) ^ (o & a)
- )),
- (c = f),
- (f = l),
- (l = u),
- (u = e(s, p)),
- (s = a),
- (a = o),
- (o = r),
- (r = e(p, y));
- (v[0] = e(r, v[0])),
- (v[1] = e(o, v[1])),
- (v[2] = e(a, v[2])),
- (v[3] = e(s, v[3])),
- (v[4] = e(u, v[4])),
- (v[5] = e(l, v[5])),
- (v[6] = e(f, v[6])),
- (v[7] = e(c, v[7]));
- }
- return v;
- })(
- (function (t) {
- for (var e = [], n = 0; n < 8 * t.length; n += 8)
- e[n >> 5] |= (255 & t.charCodeAt(n / 8)) << (24 - n % 32);
- return e;
- })(t),
- 8 * t.length
- )
- )
- );
- }
- function pe(t) {
- function e(t, e) {
- return (t << e) | (t >>> (32 - e));
- }
- function n(t) {
- var e,
- n,
- i = '';
- for (e = 7; e >= 0; e--)
- (n = (t >>> (4 * e)) & 15), (i += n.toString(16));
- return i;
- }
- var i,
- r,
- o,
- a,
- s,
- u,
- l,
- f = Array(80),
- c = 1732584193,
- h = 4023233417,
- d = 2562383102,
- p = 271733878,
- y = 3285377520,
- t = (function (t) {
- for (
- var t = t.replace(/\r\n/g, '\n'), e = '', n = 0;
- n < t.length;
- n++
- ) {
- var i = t.charCodeAt(n);
- i < 128
- ? (e += String.fromCharCode(i))
- : (i > 127 && i < 2048
- ? (e += String.fromCharCode((i >> 6) | 192))
- : ((e += String.fromCharCode((i >> 12) | 224)),
- (e += String.fromCharCode(((i >> 6) & 63) | 128))),
- (e += String.fromCharCode((63 & i) | 128)));
- }
- return e;
- })(t);
- o = t.length;
- var m = [];
- for (i = 0; i < o - 3; i += 4)
- (r =
- (t.charCodeAt(i) << 24) |
- (t.charCodeAt(i + 1) << 16) |
- (t.charCodeAt(i + 2) << 8) |
- t.charCodeAt(i + 3)),
- m.push(r);
- switch (o % 4) {
- case 0:
- i = 2147483648;
- break;
- case 1:
- i = (t.charCodeAt(o - 1) << 24) | 8388608;
- break;
- case 2:
- i =
- (t.charCodeAt(o - 2) << 24) | (t.charCodeAt(o - 1) << 16) | 32768;
- break;
- case 3:
- i =
- (t.charCodeAt(o - 3) << 24) |
- (t.charCodeAt(o - 2) << 16) |
- (t.charCodeAt(o - 1) << 8) |
- 128;
- }
- for (m.push(i); m.length % 16 != 14;) m.push(0);
- for (
- m.push(o >>> 29), m.push((o << 3) & 4294967295), t = 0;
- t < m.length;
- t += 16
- ) {
- for (i = 0; i < 16; i++) f[i] = m[t + i];
- for (i = 16; i <= 79; i++)
- f[i] = e(f[i - 3] ^ f[i - 8] ^ f[i - 14] ^ f[i - 16], 1);
- for (r = c, o = h, a = d, s = p, u = y, i = 0; i <= 19; i++)
- (l =
- (e(r, 5) + ((o & a) | (~o & s)) + u + f[i] + 1518500249) &
- 4294967295),
- (u = s),
- (s = a),
- (a = e(o, 30)),
- (o = r),
- (r = l);
- for (i = 20; i <= 39; i++)
- (l = (e(r, 5) + (o ^ a ^ s) + u + f[i] + 1859775393) & 4294967295),
- (u = s),
- (s = a),
- (a = e(o, 30)),
- (o = r),
- (r = l);
- for (i = 40; i <= 59; i++)
- (l =
- (e(r, 5) +
- ((o & a) | (o & s) | (a & s)) +
- u +
- f[i] +
- 2400959708) &
- 4294967295),
- (u = s),
- (s = a),
- (a = e(o, 30)),
- (o = r),
- (r = l);
- for (i = 60; i <= 79; i++)
- (l = (e(r, 5) + (o ^ a ^ s) + u + f[i] + 3395469782) & 4294967295),
- (u = s),
- (s = a),
- (a = e(o, 30)),
- (o = r),
- (r = l);
- (c = (c + r) & 4294967295),
- (h = (h + o) & 4294967295),
- (d = (d + a) & 4294967295),
- (p = (p + s) & 4294967295),
- (y = (y + u) & 4294967295);
- }
- return (l = n(c) + n(h) + n(d) + n(p) + n(y)), l.toLowerCase();
- }
- function ye(t, e) {
- return new n(t, e);
- }
- function me(t, e) {
- if (e < t.length + 11)
- throw 'Message too long for RSA (n=' + e + ', l=' + t.length + ')';
- for (var i = [], r = t.length - 1; r >= 0 && e > 0;) {
- var o = t.charCodeAt(r--);
- o < 128
- ? (i[--e] = o)
- : o > 127 && o < 2048
- ? ((i[--e] = (63 & o) | 128), (i[--e] = (o >> 6) | 192))
- : ((i[--e] = (63 & o) | 128),
- (i[--e] = ((o >> 6) & 63) | 128),
- (i[--e] = (o >> 12) | 224));
- }
- for (i[--e] = 0, r = new he(), o = []; e > 2;) {
- for (o[0] = 0; 0 == o[0];) r.nextBytes(o);
- i[--e] = o[0];
- }
- return (i[--e] = 2), (i[--e] = 0), new n(i);
- }
- function ve() {
- (this.n = null),
- (this.e = 0),
- (this.coeff = this.dmq1 = this.dmp1 = this.q = this.p = this.d = null);
- }
- function ge(t, e) {
- null != t && null != e && t.length > 0 && e.length > 0
- ? ((this.n = ye(t, 16)), (this.e = parseInt(e, 16)))
- : alert('Invalid RSA public key');
- }
- function Se(t) {
- return t.modPowInt(this.e, this.n);
- }
- function be(t) {
- return (
- (t = me(t, (this.n.bitLength() + 7) >> 3)),
- null == t
- ? null
- : ((t = this.doPublic(t)),
- null == t
- ? null
- : ((t = t.toString(16)), 0 == (1 & t.length) ? t : '0' + t))
- );
- }
- function we(t, e) {
- for (var n = t.toByteArray(), i = 0; i < n.length && 0 == n[i];) ++i;
- if (n.length - i != e - 1 || 2 != n[i]) return null;
- for (++i; 0 != n[i];) if (++i >= n.length) return null;
- for (var r = ''; ++i < n.length;) {
- var o = 255 & n[i];
- o < 128
- ? (r += String.fromCharCode(o))
- : o > 191 && o < 224
- ? ((r += String.fromCharCode(((31 & o) << 6) | (63 & n[i + 1]))),
- ++i)
- : ((r += String.fromCharCode(
- ((15 & o) << 12) | ((63 & n[i + 1]) << 6) | (63 & n[i + 2])
- )),
- (i += 2));
- }
- return r;
- }
- function _e(t, e, n) {
- null != t && null != e && t.length > 0 && e.length > 0
- ? ((this.n = ye(t, 16)),
- (this.e = parseInt(e, 16)),
- (this.d = ye(n, 16)))
- : alert('Invalid RSA private key');
- }
- function Pe(t, e, n, i, r, o, a, s) {
- null != t && null != e && t.length > 0 && e.length > 0
- ? ((this.n = ye(t, 16)),
- (this.e = parseInt(e, 16)),
- (this.d = ye(n, 16)),
- (this.p = ye(i, 16)),
- (this.q = ye(r, 16)),
- (this.dmp1 = ye(o, 16)),
- (this.dmq1 = ye(a, 16)),
- (this.coeff = ye(s, 16)))
- : alert('Invalid RSA private key');
- }
- function Ce(t, e) {
- var i = new ne(),
- r = t >> 1;
- this.e = parseInt(e, 16);
- for (var o = new n(e, 16); ;) {
- for (
- ;
- (this.p = new n(t - r, 1, i)),
- 0 !=
- this.p
- .subtract(n.ONE)
- .gcd(o)
- .compareTo(n.ONE) || !this.p.isProbablePrime(10);
- ) ;
- for (
- ;
- (this.q = new n(r, 1, i)),
- 0 !=
- this.q
- .subtract(n.ONE)
- .gcd(o)
- .compareTo(n.ONE) || !this.q.isProbablePrime(10);
- ) ;
- if (this.p.compareTo(this.q) <= 0) {
- var a = this.p;
- (this.p = this.q), (this.q = a);
- }
- var a = this.p.subtract(n.ONE),
- s = this.q.subtract(n.ONE),
- u = a.multiply(s);
- if (0 == u.gcd(o).compareTo(n.ONE)) {
- (this.n = this.p.multiply(this.q)),
- (this.d = o.modInverse(u)),
- (this.dmp1 = this.d.mod(a)),
- (this.dmq1 = this.d.mod(s)),
- (this.coeff = this.q.modInverse(this.p));
- break;
- }
- }
- }
- function xe(t) {
- if (null == this.p || null == this.q) return t.modPow(this.d, this.n);
- for (
- var e = t.mod(this.p).modPow(this.dmp1, this.p),
- t = t.mod(this.q).modPow(this.dmq1, this.q);
- e.compareTo(t) < 0;
- )
- e = e.add(this.p);
- return e
- .subtract(t)
- .multiply(this.coeff)
- .mod(this.p)
- .multiply(this.q)
- .add(t);
- }
- function Te(t) {
- return (
- (t = this.doPrivate(ye(t, 16))),
- null == t ? null : we(t, (this.n.bitLength() + 7) >> 3)
- );
- }
- function ke(t, e, n) {
- e /= 4;
- for (
- var t = (0, an[n])(t),
- n = '00' + on[n] + t,
- t = '',
- e = e - 4 - n.length,
- i = 0;
- i < e;
- i += 2
- )
- t += 'ff';
- return (sPaddedMessageHex = '0001' + t + n);
- }
- function De(t, e) {
- var n = ke(t, this.n.bitLength(), e);
- return this.doPrivate(ye(n, 16)).toString(16);
- }
- function Me(t) {
- return (
- (t = ke(t, this.n.bitLength(), 'sha1')),
- this.doPrivate(ye(t, 16)).toString(16)
- );
- }
- function Re(t) {
- return (
- (t = ke(t, this.n.bitLength(), 'sha256')),
- this.doPrivate(ye(t, 16)).toString(16)
- );
- }
- function Ee(t, e, n) {
- var i = new ve();
- return i.setPublic(e, n), i.doPublic(t);
- }
- function ze(t, e, n) {
- return Ee(t, e, n)
- .toString(16)
- .replace(/^1f+00/, '');
- }
- function Ie(t) {
- for (var e in on) {
- var n = on[e],
- i = n.length;
- if (t.substring(0, i) == n) return [e, t.substring(i)];
- }
- return [];
- }
- function Ae(t, e, n, i) {
- return (
- (e = ze(e, n, i)),
- (n = Ie(e)),
- 0 != n.length && ((e = n[1]), (t = (0, an[n[0]])(t)), e == t)
- );
- }
- function Fe(t, e) {
- var n = ye(t, 16);
- return Ae(e, n, this.n.toString(16), this.e.toString(16));
- }
- function Oe(t, e) {
- var e = e.replace(/[ \n]+/g, ''),
- n = this.doPublic(ye(e, 16))
- .toString(16)
- .replace(/^1f+00/, ''),
- i = Ie(n);
- return 0 != i.length && ((n = i[1]), (i = (0, an[i[0]])(t)), n == i);
- }
- var Be,
- Le =
- 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator
- ? function (t) {
- return typeof t;
- }
- : function (t) {
- return t &&
- 'function' == typeof Symbol &&
- t.constructor === Symbol &&
- t !== Symbol.prototype
- ? 'symbol'
- : typeof t;
- },
- Ne = {appName: 'Netscape', appVersion: 40},
- qe = 0xdeadbeefcafe,
- He = 15715070 == (16777215 & qe);
- He && 'Microsoft Internet Explorer' == Ne.appName
- ? ((n.prototype.am = a), (Be = 30))
- : He && 'Netscape' != Ne.appName
- ? ((n.prototype.am = o), (Be = 26))
- : ((n.prototype.am = s), (Be = 28)),
- (n.prototype.DB = Be),
- (n.prototype.DM = (1 << Be) - 1),
- (n.prototype.DV = 1 << Be);
- var je = 52;
- (n.prototype.FV = Math.pow(2, je)),
- (n.prototype.F1 = je - Be),
- (n.prototype.F2 = 2 * Be - je);
- var We,
- Ue,
- Ge = '0123456789abcdefghijklmnopqrstuvwxyz',
- Ve = [];
- for (We = '0'.charCodeAt(0), Ue = 0; Ue <= 9; ++Ue) Ve[We++] = Ue;
- for (We = 'a'.charCodeAt(0), Ue = 10; Ue < 36; ++Ue) Ve[We++] = Ue;
- for (We = 'A'.charCodeAt(0), Ue = 10; Ue < 36; ++Ue) Ve[We++] = Ue;
- (E.prototype.convert = z),
- (E.prototype.revert = I),
- (E.prototype.reduce = A),
- (E.prototype.mulTo = F),
- (E.prototype.sqrTo = O),
- (L.prototype.convert = N),
- (L.prototype.revert = q),
- (L.prototype.reduce = H),
- (L.prototype.mulTo = W),
- (L.prototype.sqrTo = j),
- (n.prototype.copyTo = f),
- (n.prototype.fromInt = c),
- (n.prototype.fromString = d),
- (n.prototype.clamp = p),
- (n.prototype.dlShiftTo = _),
- (n.prototype.drShiftTo = P),
- (n.prototype.lShiftTo = C),
- (n.prototype.rShiftTo = x),
- (n.prototype.subTo = T),
- (n.prototype.multiplyTo = k),
- (n.prototype.squareTo = D),
- (n.prototype.divRemTo = M),
- (n.prototype.invDigit = B),
- (n.prototype.isEven = U),
- (n.prototype.exp = G),
- (n.prototype.toString = y),
- (n.prototype.negate = m),
- (n.prototype.abs = g),
- (n.prototype.compareTo = S),
- (n.prototype.bitLength = w),
- (n.prototype.mod = R),
- (n.prototype.modPowInt = V),
- (n.ZERO = h(0)),
- (n.ONE = h(1)),
- (Bt.prototype.convert = Lt),
- (Bt.prototype.revert = Lt),
- (Bt.prototype.mulTo = Nt),
- (Bt.prototype.sqrTo = qt),
- (Ut.prototype.convert = Gt),
- (Ut.prototype.revert = Vt),
- (Ut.prototype.reduce = Yt),
- (Ut.prototype.mulTo = Jt),
- (Ut.prototype.sqrTo = Xt);
- var Ye = [
- 2,
- 3,
- 5,
- 7,
- 11,
- 13,
- 17,
- 19,
- 23,
- 29,
- 31,
- 37,
- 41,
- 43,
- 47,
- 53,
- 59,
- 61,
- 67,
- 71,
- 73,
- 79,
- 83,
- 89,
- 97,
- 101,
- 103,
- 107,
- 109,
- 113,
- 127,
- 131,
- 137,
- 139,
- 149,
- 151,
- 157,
- 163,
- 167,
- 173,
- 179,
- 181,
- 191,
- 193,
- 197,
- 199,
- 211,
- 223,
- 227,
- 229,
- 233,
- 239,
- 241,
- 251,
- 257,
- 263,
- 269,
- 271,
- 277,
- 281,
- 283,
- 293,
- 307,
- 311,
- 313,
- 317,
- 331,
- 337,
- 347,
- 349,
- 353,
- 359,
- 367,
- 373,
- 379,
- 383,
- 389,
- 397,
- 401,
- 409,
- 419,
- 421,
- 431,
- 433,
- 439,
- 443,
- 449,
- 457,
- 461,
- 463,
- 467,
- 479,
- 487,
- 491,
- 499,
- 503,
- 509,
- 521,
- 523,
- 541,
- 547,
- 557,
- 563,
- 569,
- 571,
- 577,
- 587,
- 593,
- 599,
- 601,
- 607,
- 613,
- 617,
- 619,
- 631,
- 641,
- 643,
- 647,
- 653,
- 659,
- 661,
- 673,
- 677,
- 683,
- 691,
- 701,
- 709,
- 719,
- 727,
- 733,
- 739,
- 743,
- 751,
- 757,
- 761,
- 769,
- 773,
- 787,
- 797,
- 809,
- 811,
- 821,
- 823,
- 827,
- 829,
- 839,
- 853,
- 857,
- 859,
- 863,
- 877,
- 881,
- 883,
- 887,
- 907,
- 911,
- 919,
- 929,
- 937,
- 941,
- 947,
- 953,
- 967,
- 971,
- 977,
- 983,
- 991,
- 997,
- ],
- Xe = 67108864 / Ye[Ye.length - 1];
- (n.prototype.chunkSize = K),
- (n.prototype.toRadix = Q),
- (n.prototype.fromRadix = tt),
- (n.prototype.fromNumber = et),
- (n.prototype.bitwiseTo = at),
- (n.prototype.changeBit = Pt),
- (n.prototype.addTo = kt),
- (n.prototype.dMultiply = Ft),
- (n.prototype.dAddOffset = Ot),
- (n.prototype.multiplyLowerTo = jt),
- (n.prototype.multiplyUpperTo = Wt),
- (n.prototype.modInt = Zt),
- (n.prototype.millerRabin = ee),
- (n.prototype.clone = Y),
- (n.prototype.intValue = X),
- (n.prototype.byteValue = J),
- (n.prototype.shortValue = $),
- (n.prototype.signum = Z),
- (n.prototype.toByteArray = nt),
- (n.prototype.equals = it),
- (n.prototype.min = rt),
- (n.prototype.max = ot),
- (n.prototype.and = ut),
- (n.prototype.or = ft),
- (n.prototype.xor = ht),
- (n.prototype.andNot = pt),
- (n.prototype.not = yt),
- (n.prototype.shiftLeft = mt),
- (n.prototype.shiftRight = vt),
- (n.prototype.getLowestSetBit = St),
- (n.prototype.bitCount = wt),
- (n.prototype.testBit = _t),
- (n.prototype.setBit = Ct),
- (n.prototype.clearBit = xt),
- (n.prototype.flipBit = Tt),
- (n.prototype.add = Dt),
- (n.prototype.subtract = Mt),
- (n.prototype.multiply = Rt),
- (n.prototype.divide = zt),
- (n.prototype.remainder = It),
- (n.prototype.divideAndRemainder = At),
- (n.prototype.modPow = $t),
- (n.prototype.modInverse = Qt),
- (n.prototype.pow = Ht),
- (n.prototype.gcd = Kt),
- (n.prototype.isProbablePrime = te),
- (n.prototype.square = Et),
- (function (t, e, n, i, r, o, a) {
- function s(t) {
- var e,
- i,
- r = this,
- o = t.length,
- a = 0,
- s = (r.i = r.j = r.m = 0);
- for (r.S = [], r.c = [], o || (t = [o++]); a < n;) r.S[a] = a++;
- for (a = 0; a < n; a++)
- (e = r.S[a]),
- (s = (s + e + t[a % o]) & (n - 1)),
- (i = r.S[s]),
- (r.S[a] = i),
- (r.S[s] = e);
- (r.g = function (t) {
- var e = r.S,
- i = (r.i + 1) & (n - 1),
- o = e[i],
- a = (r.j + o) & (n - 1),
- s = e[a];
- (e[i] = s), (e[a] = o);
- for (var u = e[(o + s) & (n - 1)]; --t;)
- (i = (i + 1) & (n - 1)),
- (o = e[i]),
- (a = (a + o) & (n - 1)),
- (s = e[a]),
- (e[i] = s),
- (e[a] = o),
- (u = u * n + e[(o + s) & (n - 1)]);
- return (r.i = i), (r.j = a), u;
- }),
- r.g(n);
- }
- function u(t, e, n, i, r) {
- if (
- ((n = []),
- (r = 'undefined' == typeof t ? 'undefined' : Le(t)),
- e && 'object' == r)
- )
- for (i in t)
- if (i.indexOf('S') < 5)
- try {
- n.push(u(t[i], e - 1));
- } catch (t) {
- }
- return n.length ? n : t + ('string' != r ? '\0' : '');
- }
- function l(t, e, i, r) {
- for (t += '', r = i = 0; r < t.length; r++) {
- var o = e,
- a = r & (n - 1),
- s = (i ^= 19 * e[r & (n - 1)]) + t.charCodeAt(r);
- o[a] = s & (n - 1);
- }
- t = '';
- for (r in e) t += String.fromCharCode(e[r]);
- return t;
- }
- (e.seedrandom = function (f, c) {
- var h,
- d = [],
- f = l(
- u(
- c
- ? [f, t]
- : arguments.length
- ? f
- : [new Date().getTime(), t, window],
- 3
- ),
- d
- );
- return (
- (h = new s(d)),
- l(h.S, t),
- (e.random = function () {
- for (var t = h.g(i), e = a, s = 0; t < r;)
- (t = (t + s) * n), (e *= n), (s = h.g(1));
- for (; t >= o;) (t /= 2), (e /= 2), (s >>>= 1);
- return (t + s) / e;
- }),
- f
- );
- }),
- (a = e.pow(n, i)),
- (r = e.pow(2, r)),
- (o = 2 * r),
- l(e.random(), t);
- })([], Math, 256, 6, 52),
- (ne.prototype.nextBytes = ie),
- (re.prototype.init = oe),
- (re.prototype.next = ae);
- var Je,
- $e,
- Ke,
- Ze = 256;
- if (null == $e) {
- ($e = []), (Ke = 0);
- var Qe;
- if ('Netscape' == Ne.appName && Ne.appVersion < '5' && window.crypto) {
- var tn = window.crypto.random(32);
- for (Qe = 0; Qe < tn.length; ++Qe) $e[Ke++] = 255 & tn.charCodeAt(Qe);
- }
- for (; Ke < Ze;)
- (Qe = Math.floor(65536 * Math.random())),
- ($e[Ke++] = Qe >>> 8),
- ($e[Ke++] = 255 & Qe);
- (Ke = 0), le();
- }
- he.prototype.nextBytes = ce;
- var en = {
- hex: function (t) {
- return de(t);
- },
- },
- nn = {
- hex: function (t) {
- return pe(t);
- },
- },
- rn = function (t) {
- function e(t, e) {
- var n, i, r, o, a;
- return (
- (r = 2147483648 & t),
- (o = 2147483648 & e),
- (n = 1073741824 & t),
- (i = 1073741824 & e),
- (a = (1073741823 & t) + (1073741823 & e)),
- n & i
- ? 2147483648 ^ a ^ r ^ o
- : n | i
- ? 1073741824 & a
- ? 3221225472 ^ a ^ r ^ o
- : 1073741824 ^ a ^ r ^ o
- : a ^ r ^ o
- );
- }
- function n(t, n, i, r, o, a, s) {
- return (
- (t = e(t, e(e((n & i) | (~n & r), o), s))),
- e((t << a) | (t >>> (32 - a)), n)
- );
- }
- function i(t, n, i, r, o, a, s) {
- return (
- (t = e(t, e(e((n & r) | (i & ~r), o), s))),
- e((t << a) | (t >>> (32 - a)), n)
- );
- }
- function r(t, n, i, r, o, a, s) {
- return (
- (t = e(t, e(e(n ^ i ^ r, o), s))),
- e((t << a) | (t >>> (32 - a)), n)
- );
- }
- function o(t, n, i, r, o, a, s) {
- return (
- (t = e(t, e(e(i ^ (n | ~r), o), s))),
- e((t << a) | (t >>> (32 - a)), n)
- );
- }
- function a(t) {
- var e,
- n = '',
- i = '';
- for (e = 0; e <= 3; e++)
- (i = (t >>> (8 * e)) & 255),
- (i = '0' + i.toString(16)),
- (n += i.substr(i.length - 2, 2));
- return n;
- }
- var s,
- u,
- l,
- f,
- c,
- h,
- d,
- p,
- y = [],
- t = (function (t) {
- for (
- var t = t.replace(/\r\n/g, '\n'), e = '', n = 0;
- n < t.length;
- n++
- ) {
- var i = t.charCodeAt(n);
- i < 128
- ? (e += String.fromCharCode(i))
- : (i > 127 && i < 2048
- ? (e += String.fromCharCode((i >> 6) | 192))
- : ((e += String.fromCharCode((i >> 12) | 224)),
- (e += String.fromCharCode(((i >> 6) & 63) | 128))),
- (e += String.fromCharCode((63 & i) | 128)));
- }
- return e;
- })(t),
- y = (function (t) {
- var e,
- n = t.length;
- e = n + 8;
- for (
- var i = 16 * ((e - e % 64) / 64 + 1),
- r = Array(i - 1),
- o = 0,
- a = 0;
- a < n;
- )
- (e = (a - a % 4) / 4),
- (o = (a % 4) * 8),
- (r[e] |= t.charCodeAt(a) << o),
- a++;
- return (
- (r[(a - a % 4) / 4] |= 128 << ((a % 4) * 8)),
- (r[i - 2] = n << 3),
- (r[i - 1] = n >>> 29),
- r
- );
- })(t);
- for (
- c = 1732584193,
- h = 4023233417,
- d = 2562383102,
- p = 271733878,
- t = 0;
- t < y.length;
- t += 16
- )
- (s = c),
- (u = h),
- (l = d),
- (f = p),
- (c = n(c, h, d, p, y[t + 0], 7, 3614090360)),
- (p = n(p, c, h, d, y[t + 1], 12, 3905402710)),
- (d = n(d, p, c, h, y[t + 2], 17, 606105819)),
- (h = n(h, d, p, c, y[t + 3], 22, 3250441966)),
- (c = n(c, h, d, p, y[t + 4], 7, 4118548399)),
- (p = n(p, c, h, d, y[t + 5], 12, 1200080426)),
- (d = n(d, p, c, h, y[t + 6], 17, 2821735955)),
- (h = n(h, d, p, c, y[t + 7], 22, 4249261313)),
- (c = n(c, h, d, p, y[t + 8], 7, 1770035416)),
- (p = n(p, c, h, d, y[t + 9], 12, 2336552879)),
- (d = n(d, p, c, h, y[t + 10], 17, 4294925233)),
- (h = n(h, d, p, c, y[t + 11], 22, 2304563134)),
- (c = n(c, h, d, p, y[t + 12], 7, 1804603682)),
- (p = n(p, c, h, d, y[t + 13], 12, 4254626195)),
- (d = n(d, p, c, h, y[t + 14], 17, 2792965006)),
- (h = n(h, d, p, c, y[t + 15], 22, 1236535329)),
- (c = i(c, h, d, p, y[t + 1], 5, 4129170786)),
- (p = i(p, c, h, d, y[t + 6], 9, 3225465664)),
- (d = i(d, p, c, h, y[t + 11], 14, 643717713)),
- (h = i(h, d, p, c, y[t + 0], 20, 3921069994)),
- (c = i(c, h, d, p, y[t + 5], 5, 3593408605)),
- (p = i(p, c, h, d, y[t + 10], 9, 38016083)),
- (d = i(d, p, c, h, y[t + 15], 14, 3634488961)),
- (h = i(h, d, p, c, y[t + 4], 20, 3889429448)),
- (c = i(c, h, d, p, y[t + 9], 5, 568446438)),
- (p = i(p, c, h, d, y[t + 14], 9, 3275163606)),
- (d = i(d, p, c, h, y[t + 3], 14, 4107603335)),
- (h = i(h, d, p, c, y[t + 8], 20, 1163531501)),
- (c = i(c, h, d, p, y[t + 13], 5, 2850285829)),
- (p = i(p, c, h, d, y[t + 2], 9, 4243563512)),
- (d = i(d, p, c, h, y[t + 7], 14, 1735328473)),
- (h = i(h, d, p, c, y[t + 12], 20, 2368359562)),
- (c = r(c, h, d, p, y[t + 5], 4, 4294588738)),
- (p = r(p, c, h, d, y[t + 8], 11, 2272392833)),
- (d = r(d, p, c, h, y[t + 11], 16, 1839030562)),
- (h = r(h, d, p, c, y[t + 14], 23, 4259657740)),
- (c = r(c, h, d, p, y[t + 1], 4, 2763975236)),
- (p = r(p, c, h, d, y[t + 4], 11, 1272893353)),
- (d = r(d, p, c, h, y[t + 7], 16, 4139469664)),
- (h = r(h, d, p, c, y[t + 10], 23, 3200236656)),
- (c = r(c, h, d, p, y[t + 13], 4, 681279174)),
- (p = r(p, c, h, d, y[t + 0], 11, 3936430074)),
- (d = r(d, p, c, h, y[t + 3], 16, 3572445317)),
- (h = r(h, d, p, c, y[t + 6], 23, 76029189)),
- (c = r(c, h, d, p, y[t + 9], 4, 3654602809)),
- (p = r(p, c, h, d, y[t + 12], 11, 3873151461)),
- (d = r(d, p, c, h, y[t + 15], 16, 530742520)),
- (h = r(h, d, p, c, y[t + 2], 23, 3299628645)),
- (c = o(c, h, d, p, y[t + 0], 6, 4096336452)),
- (p = o(p, c, h, d, y[t + 7], 10, 1126891415)),
- (d = o(d, p, c, h, y[t + 14], 15, 2878612391)),
- (h = o(h, d, p, c, y[t + 5], 21, 4237533241)),
- (c = o(c, h, d, p, y[t + 12], 6, 1700485571)),
- (p = o(p, c, h, d, y[t + 3], 10, 2399980690)),
- (d = o(d, p, c, h, y[t + 10], 15, 4293915773)),
- (h = o(h, d, p, c, y[t + 1], 21, 2240044497)),
- (c = o(c, h, d, p, y[t + 8], 6, 1873313359)),
- (p = o(p, c, h, d, y[t + 15], 10, 4264355552)),
- (d = o(d, p, c, h, y[t + 6], 15, 2734768916)),
- (h = o(h, d, p, c, y[t + 13], 21, 1309151649)),
- (c = o(c, h, d, p, y[t + 4], 6, 4149444226)),
- (p = o(p, c, h, d, y[t + 11], 10, 3174756917)),
- (d = o(d, p, c, h, y[t + 2], 15, 718787259)),
- (h = o(h, d, p, c, y[t + 9], 21, 3951481745)),
- (c = e(c, s)),
- (h = e(h, u)),
- (d = e(d, l)),
- (p = e(p, f));
- return (a(c) + a(h) + a(d) + a(p)).toLowerCase();
- };
- (ve.prototype.doPublic = Se),
- (ve.prototype.setPublic = ge),
- (ve.prototype.encrypt = be),
- (ve.prototype.doPrivate = xe),
- (ve.prototype.setPrivate = _e),
- (ve.prototype.setPrivateEx = Pe),
- (ve.prototype.generate = Ce),
- (ve.prototype.decrypt = Te);
- var on = [];
- (on.sha1 = '3021300906052b0e03021a05000414'),
- (on.sha256 = '3031300d060960864801650304020105000420');
- var an = [];
- (an.sha1 = nn.hex),
- (an.sha256 = en.hex),
- (ve.prototype.signString = De),
- (ve.prototype.signStringWithSHA1 = Me),
- (ve.prototype.signStringWithSHA256 = Re),
- (ve.prototype.verifyString = Oe),
- (ve.prototype.verifyHexSignatureForMessage = Fe);
- var sn = (function () {
- var t = {
- Sbox: [
- 99,
- 124,
- 119,
- 123,
- 242,
- 107,
- 111,
- 197,
- 48,
- 1,
- 103,
- 43,
- 254,
- 215,
- 171,
- 118,
- 202,
- 130,
- 201,
- 125,
- 250,
- 89,
- 71,
- 240,
- 173,
- 212,
- 162,
- 175,
- 156,
- 164,
- 114,
- 192,
- 183,
- 253,
- 147,
- 38,
- 54,
- 63,
- 247,
- 204,
- 52,
- 165,
- 229,
- 241,
- 113,
- 216,
- 49,
- 21,
- 4,
- 199,
- 35,
- 195,
- 24,
- 150,
- 5,
- 154,
- 7,
- 18,
- 128,
- 226,
- 235,
- 39,
- 178,
- 117,
- 9,
- 131,
- 44,
- 26,
- 27,
- 110,
- 90,
- 160,
- 82,
- 59,
- 214,
- 179,
- 41,
- 227,
- 47,
- 132,
- 83,
- 209,
- 0,
- 237,
- 32,
- 252,
- 177,
- 91,
- 106,
- 203,
- 190,
- 57,
- 74,
- 76,
- 88,
- 207,
- 208,
- 239,
- 170,
- 251,
- 67,
- 77,
- 51,
- 133,
- 69,
- 249,
- 2,
- 127,
- 80,
- 60,
- 159,
- 168,
- 81,
- 163,
- 64,
- 143,
- 146,
- 157,
- 56,
- 245,
- 188,
- 182,
- 218,
- 33,
- 16,
- 255,
- 243,
- 210,
- 205,
- 12,
- 19,
- 236,
- 95,
- 151,
- 68,
- 23,
- 196,
- 167,
- 126,
- 61,
- 100,
- 93,
- 25,
- 115,
- 96,
- 129,
- 79,
- 220,
- 34,
- 42,
- 144,
- 136,
- 70,
- 238,
- 184,
- 20,
- 222,
- 94,
- 11,
- 219,
- 224,
- 50,
- 58,
- 10,
- 73,
- 6,
- 36,
- 92,
- 194,
- 211,
- 172,
- 98,
- 145,
- 149,
- 228,
- 121,
- 231,
- 200,
- 55,
- 109,
- 141,
- 213,
- 78,
- 169,
- 108,
- 86,
- 244,
- 234,
- 101,
- 122,
- 174,
- 8,
- 186,
- 120,
- 37,
- 46,
- 28,
- 166,
- 180,
- 198,
- 232,
- 221,
- 116,
- 31,
- 75,
- 189,
- 139,
- 138,
- 112,
- 62,
- 181,
- 102,
- 72,
- 3,
- 246,
- 14,
- 97,
- 53,
- 87,
- 185,
- 134,
- 193,
- 29,
- 158,
- 225,
- 248,
- 152,
- 17,
- 105,
- 217,
- 142,
- 148,
- 155,
- 30,
- 135,
- 233,
- 206,
- 85,
- 40,
- 223,
- 140,
- 161,
- 137,
- 13,
- 191,
- 230,
- 66,
- 104,
- 65,
- 153,
- 45,
- 15,
- 176,
- 84,
- 187,
- 22,
- ],
- ShiftRowTab: [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11],
- };
- return (
- (t.Init = function () {
- t.Sbox_Inv = Array(256);
- for (var e = 0; e < 256; e++) t.Sbox_Inv[t.Sbox[e]] = e;
- for (t.ShiftRowTab_Inv = Array(16), e = 0; e < 16; e++)
- t.ShiftRowTab_Inv[t.ShiftRowTab[e]] = e;
- for (t.xtime = Array(256), e = 0; e < 128; e++)
- (t.xtime[e] = e << 1), (t.xtime[128 + e] = (e << 1) ^ 27);
- }),
- (t.Done = function () {
- delete t.Sbox_Inv, delete t.ShiftRowTab_Inv, delete t.xtime;
- }),
- (t.ExpandKey = function (e) {
- var n,
- i = e.length,
- r = 1;
- switch (i) {
- case 16:
- n = 176;
- break;
- case 24:
- n = 208;
- break;
- case 32:
- n = 240;
- break;
- default:
- alert(
- 'my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!'
- );
- }
- for (var o = i; o < n; o += 4) {
- var a = e.slice(o - 4, o);
- o % i == 0
- ? ((a = [
- t.Sbox[a[1]] ^ r,
- t.Sbox[a[2]],
- t.Sbox[a[3]],
- t.Sbox[a[0]],
- ]),
- (r <<= 1) >= 256 && (r ^= 283))
- : i > 24 &&
- o % i == 16 &&
- (a = [
- t.Sbox[a[0]],
- t.Sbox[a[1]],
- t.Sbox[a[2]],
- t.Sbox[a[3]],
- ]);
- for (var s = 0; s < 4; s++) e[o + s] = e[o + s - i] ^ a[s];
- }
- }),
- (t.Encrypt = function (e, n) {
- var i = n.length;
- t.AddRoundKey(e, n.slice(0, 16));
- for (var r = 16; r < i - 16; r += 16)
- t.SubBytes(e, t.Sbox),
- t.ShiftRows(e, t.ShiftRowTab),
- t.MixColumns(e),
- t.AddRoundKey(e, n.slice(r, r + 16));
- t.SubBytes(e, t.Sbox),
- t.ShiftRows(e, t.ShiftRowTab),
- t.AddRoundKey(e, n.slice(r, i));
- }),
- (t.Decrypt = function (e, n) {
- var i = n.length;
- for (
- t.AddRoundKey(e, n.slice(i - 16, i)),
- t.ShiftRows(e, t.ShiftRowTab_Inv),
- t.SubBytes(e, t.Sbox_Inv),
- i -= 32;
- i >= 16;
- i -= 16
- )
- t.AddRoundKey(e, n.slice(i, i + 16)),
- t.MixColumns_Inv(e),
- t.ShiftRows(e, t.ShiftRowTab_Inv),
- t.SubBytes(e, t.Sbox_Inv);
- t.AddRoundKey(e, n.slice(0, 16));
- }),
- (t.SubBytes = function (t, e) {
- for (var n = 0; n < 16; n++) t[n] = e[t[n]];
- }),
- (t.AddRoundKey = function (t, e) {
- for (var n = 0; n < 16; n++) t[n] ^= e[n];
- }),
- (t.ShiftRows = function (t, e) {
- for (var n = [].concat(t), i = 0; i < 16; i++) t[i] = n[e[i]];
- }),
- (t.MixColumns = function (e) {
- for (var n = 0; n < 16; n += 4) {
- var i = e[n + 0],
- r = e[n + 1],
- o = e[n + 2],
- a = e[n + 3],
- s = i ^ r ^ o ^ a;
- (e[n + 0] ^= s ^ t.xtime[i ^ r]),
- (e[n + 1] ^= s ^ t.xtime[r ^ o]),
- (e[n + 2] ^= s ^ t.xtime[o ^ a]),
- (e[n + 3] ^= s ^ t.xtime[a ^ i]);
- }
- }),
- (t.MixColumns_Inv = function (e) {
- for (var n = 0; n < 16; n += 4) {
- var i = e[n + 0],
- r = e[n + 1],
- o = e[n + 2],
- a = e[n + 3],
- s = i ^ r ^ o ^ a,
- u = t.xtime[s],
- l = t.xtime[t.xtime[u ^ i ^ o]] ^ s;
- (s ^= t.xtime[t.xtime[u ^ r ^ a]]),
- (e[n + 0] ^= l ^ t.xtime[i ^ r]),
- (e[n + 1] ^= s ^ t.xtime[r ^ o]),
- (e[n + 2] ^= l ^ t.xtime[o ^ a]),
- (e[n + 3] ^= s ^ t.xtime[a ^ i]);
- }
- }),
- t
- );
- })(),
- un = (function () {
- var t = {};
- return (
- sn.Init(),
- (t.b256to64 = function (t) {
- var e,
- n,
- i,
- r = '',
- o = 0,
- a = 0,
- s = t.length;
- for (i = 0; i < s; i++)
- (n = t.charCodeAt(i)),
- 0 == a
- ? ((r += 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- (n >> 2) & 63
- )),
- (e = (3 & n) << 4))
- : 1 == a
- ? ((r += 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- e | ((n >> 4) & 15)
- )),
- (e = (15 & n) << 2))
- : 2 == a &&
- ((r += 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- e | ((n >> 6) & 3)
- )),
- (o += 1),
- (r += 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- 63 & n
- ))),
- (o += 1),
- (a += 1),
- 3 == a && (a = 0);
- return (
- a > 0 &&
- ((r += 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- e
- )),
- (r += '=')),
- 1 == a && (r += '='),
- r
- );
- }),
- (t.b64to256 = function (t) {
- var e,
- n,
- i = '',
- r = 0,
- o = 0,
- a = t.length;
- for (n = 0; n < a; n++)
- (e = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.indexOf(
- t.charAt(n)
- )),
- e >= 0 &&
- (r &&
- (i += String.fromCharCode(o | ((e >> (6 - r)) & 255))),
- (r = (r + 2) & 7),
- (o = (e << r) & 255));
- return i;
- }),
- (t.b16to64 = function (t) {
- var e,
- n,
- i = '';
- for (
- t.length % 2 == 1 && (t = '0' + t), e = 0;
- e + 3 <= t.length;
- e += 3
- )
- (n = parseInt(t.substring(e, e + 3), 16)),
- (i +=
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- n >> 6
- ) +
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- 63 & n
- ));
- for (
- e + 1 == t.length
- ? ((n = parseInt(t.substring(e, e + 1), 16)),
- (i += 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- n << 2
- )))
- : e + 2 == t.length &&
- ((n = parseInt(t.substring(e, e + 2), 16)),
- (i +=
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- n >> 2
- ) +
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(
- (3 & n) << 4
- )));
- (3 & i.length) > 0;
- )
- i += '=';
- return i;
- }),
- (t.b64to16 = function (t) {
- var e,
- n,
- i = '',
- r = 0;
- for (e = 0; e < t.length && '=' != t.charAt(e); ++e)
- (v = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.indexOf(
- t.charAt(e)
- )),
- v < 0 ||
- (0 == r
- ? ((i += u(v >> 2)), (n = 3 & v), (r = 1))
- : 1 == r
- ? ((i += u((n << 2) | (v >> 4))), (n = 15 & v), (r = 2))
- : 2 == r
- ? ((i += u(n)),
- (i += u(v >> 2)),
- (n = 3 & v),
- (r = 3))
- : ((i += u((n << 2) | (v >> 4))),
- (i += u(15 & v)),
- (r = 0)));
- return 1 == r && (i += u(n << 2)), i;
- }),
- (t.string2bytes = function (t) {
- for (var e = [], n = 0; n < t.length; n++)
- e.push(t.charCodeAt(n));
- return e;
- }),
- (t.bytes2string = function (t) {
- for (var e = '', n = 0; n < t.length; n++)
- e += String.fromCharCode(t[n]);
- return e;
- }),
- (t.blockXOR = function (t, e) {
- for (var n = Array(16), i = 0; i < 16; i++) n[i] = t[i] ^ e[i];
- return n;
- }),
- (t.blockIV = function () {
- var t = new he(),
- e = Array(16);
- return t.nextBytes(e), e;
- }),
- (t.pad16 = function (t) {
- var e = t.slice(0),
- n = (16 - t.length % 16) % 16;
- for (i = t.length; i < t.length + n; i++) e.push(0);
- return e;
- }),
- (t.depad = function (t) {
- for (t = t.slice(0); 0 == t[t.length - 1];)
- t = t.slice(0, t.length - 1);
- return t;
- }),
- (t.encryptAESCBC = function (e, n) {
- var i = n.slice(0);
- sn.ExpandKey(i);
- for (
- var r = t.string2bytes(e),
- r = t.pad16(r),
- o = t.blockIV(),
- a = 0;
- a < r.length / 16;
- a++
- ) {
- var s = r.slice(16 * a, 16 * a + 16),
- u = o.slice(16 * a, 16 * a + 16),
- s = t.blockXOR(u, s);
- sn.Encrypt(s, i), (o = o.concat(s));
- }
- return (i = t.bytes2string(o)), t.b256to64(i);
- }),
- (t.decryptAESCBC = function (e, n) {
- var i = n.slice(0);
- sn.ExpandKey(i);
- for (
- var e = t.b64to256(e), r = t.string2bytes(e), o = [], a = 1;
- a < r.length / 16;
- a++
- ) {
- var s = r.slice(16 * a, 16 * a + 16),
- u = r.slice(16 * (a - 1), 16 * (a - 1) + 16);
- sn.Decrypt(s, i), (s = t.blockXOR(u, s)), (o = o.concat(s));
- }
- return (o = t.depad(o)), t.bytes2string(o);
- }),
- (t.wrap60 = function (t) {
- for (var e = '', n = 0; n < t.length; n++)
- n % 60 == 0 && 0 != n && (e += '\n'), (e += t[n]);
- return e;
- }),
- (t.generateAESKey = function () {
- var t = Array(16);
- return new he().nextBytes(t), t;
- }),
- (t.generateRSAKey = function (t, e) {
- Math.seedrandom(en.hex(t));
- var n = new ve();
- return n.generate(e, '10001'), n;
- }),
- (t.publicKeyString = function (t) {
- return (pubkey = t.n.toString(16));
- }),
- (t.publicKeyID = function (t) {
- return rn(t);
- }),
- (t.publicKeyFromString = function (t) {
- var t = t.split('|')[0],
- e = new ve();
- return e.setPublic(t, '10001'), e;
- }),
- (t.encrypt = function (e, n, i) {
- var r = '';
- try {
- var o = t.publicKeyFromString(n);
- r += o.encrypt(e) + '?';
- } catch (t) {
- return {status: 'Invalid public key'};
- }
- return {status: 'success', cipher: r};
- }),
- (t.decrypt = function (t, e) {
- var n = t.split('?'),
- i = e.decrypt(n[0]);
- return {status: 'success', plaintext: i, signature: 'unsigned'};
- }),
- t
- );
- })();
- t.exports = un;
- },
- ]);
- });
|