12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911 |
- import {
- b8 as openBlock,
- ah as createElementBlock,
- ai as createBaseVNode,
- aY as normalizeClass,
- d as defineComponent,
- r as ref,
- a as useRoute,
- n as onMounted,
- E as nextTick,
- O as onUnmounted,
- y as watch,
- f as createVNode,
- k as createTextVNode,
- dl as NInputNumber,
- w as NSpace,
- j as NButton,
- t as NImage,
- dm as getSecond,
- V as dayjs,
- x as mergeProps,
- F as Fragment,
- c as useUserStore,
- dn as NSkeleton,
- c3 as commonjsGlobal,
- c4 as getDefaultExportFromCjs,
- L as computed,
- a_ as normalizeStyle,
- bB as toRefs,
- e as reactive,
- v as NModal,
- b as useMessage,
- u as useRouter,
- T as Transition,
- dp as NDrawer,
- dq as NDrawerContent,
- R as px2vw,
- aU as isVNode
- } from './index-6f73a5a0-1694138600520.js';
- import {
- T as TCPlayer,
- b as iconplay,
- c as iconpause,
- d as iconReplay$2,
- f as tickMp3,
- V as Vudio,
- N as NScrollbar
- } from './contants-b5c5ecbc-1694138600520.js';
- import { N as NSlider } from './Slider-51f6cd78-1694138600520.js';
- import {
- c as lessonCoursewareDetail,
- h as lessonPreTrainingPage,
- C as CardType,
- q as queryCourseware,
- u as courseScheduleUpdate
- } from './isCollaose-94c46d24-1694138600520.js';
- import { a as TrainSettings } from './index-972d5f96-1694138600520.js';
- import { v as vaildUrl } from './urlUtils-b7caaee8-1694138600520.js';
- import { d as dingPng$1, m as moveTop } from './ding-8e9054d5-1694138600520.js';
- import { s as state } from './state-72990c21-1694138600520.js';
- const timerWrap = '_timerWrap_1ilvi_1',
- timerTop = '_timerTop_1ilvi_8',
- timerTopPane = '_timerTopPane_1ilvi_19',
- timerTopPaneActive = '_timerTopPaneActive_1ilvi_25',
- timerItemInfo = '_timerItemInfo_1ilvi_30',
- timerItemInset = '_timerItemInset_1ilvi_38',
- timerItemInfoTop = '_timerItemInfoTop_1ilvi_43',
- dot = '_dot_1ilvi_50',
- dotTop = '_dotTop_1ilvi_58',
- timerItemTopCore = '_timerItemTopCore_1ilvi_62',
- nowTimerWrap = '_nowTimerWrap_1ilvi_74',
- btnGroupModal$2 = '_btnGroupModal_1ilvi_86',
- palyIcon = '_palyIcon_1ilvi_93',
- playText = '_playText_1ilvi_97',
- countInput = '_countInput_1ilvi_100',
- dotBtm = '_dotBtm_1ilvi_120',
- chioseWrap = '_chioseWrap_1ilvi_124',
- add$1 = '_add_1ilvi_144',
- minus$1 = '_minus_1ilvi_149',
- chioseHidden = '_chioseHidden_1ilvi_154',
- numberWrap = '_numberWrap_1ilvi_157',
- styles$7 = {
- timerWrap,
- timerTop,
- timerTopPane,
- timerTopPaneActive,
- timerItemInfo,
- timerItemInset,
- timerItemInfoTop,
- dot,
- dotTop,
- timerItemTopCore,
- nowTimerWrap,
- btnGroupModal: btnGroupModal$2,
- palyIcon,
- playText,
- countInput,
- dotBtm,
- chioseWrap,
- add: add$1,
- minus: minus$1,
- chioseHidden,
- numberWrap
- },
- flipper_vue_vue_type_style_index_0_lang = '',
- _export_sfc$1 = (e, t) => {
- const r = e.__vccOpts || e;
- for (const [i, s] of t) r[i] = s;
- return r;
- },
- _sfc_main$1 = {
- name: 'FlipClock',
- data() {
- return {
- isFlipping: !1,
- flipType: 'down',
- frontTextFromData: 0,
- backTextFromData: 1
- };
- },
- props: {
- frontText: { type: [Number, String], default: 0 },
- backText: { type: [Number, String], default: 1 },
- duration: { type: Number, default: 600 }
- },
- methods: {
- _textClass(e) {
- return 'number' + e;
- },
- _flip(e, t, r) {
- console.log(e, t, r, '=====>'),
- (this.frontTextFromData = t),
- (this.backTextFromData = r),
- (this.flipType = e),
- (this.isFlipping = !0),
- setTimeout(() => {
- (this.isFlipping = !1), (this.frontTextFromData = r);
- }, this.duration);
- },
- flipDown(e, t) {
- this._flip('down', e, t);
- },
- flipUp(e, t) {
- this._flip('up', e, t);
- },
- setFront(e) {
- this.frontTextFromData = e;
- },
- setBack(e) {
- this.backTextFromData = e;
- }
- },
- created() {
- (this.frontTextFromData = this.frontText),
- (this.backTextFromData = this.backText);
- }
- };
- function _sfc_render$1(e, t, r, i, s, a) {
- return (
- openBlock(),
- createElementBlock(
- 'div',
- {
- class: normalizeClass(['M-Flipper', [s.flipType, { go: s.isFlipping }]])
- },
- [
- createBaseVNode(
- 'div',
- {
- class: normalizeClass([
- 'digital front',
- a._textClass(s.frontTextFromData)
- ])
- },
- null,
- 2
- ),
- createBaseVNode(
- 'div',
- {
- class: normalizeClass([
- 'digital back',
- a._textClass(s.backTextFromData)
- ])
- },
- null,
- 2
- )
- ],
- 2
- )
- );
- }
- const Flipper = _export_sfc$1(_sfc_main$1, [['render', _sfc_render$1]]),
- playIcon =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAcCAYAAABlL09dAAAAAXNSR0IArs4c6QAAAR1JREFUSEvV1rFOwlAYxfH/eQx2VgcfBJ+AOMqCE5uB6OITyAPwCPogKBMOOhITQuLkaq45iU1KKL2X9nbgWzq0/X03/dpzKzoqhRAE3AAD4BNYSFq17Wf4HngoQb/AEzCT9NO0geEvoFcBbICxpJcmuOEQufEZuJXkRsmVAhvzI5kCc0l+VNFKhQtoCYwk+Vhbp8LGkobbBC5WWjvcNnDRoHK4OeDK4eaCy8O9lrTODbvBN3DRBWx8clbwDrjMveJXYCjpPRfsLJk5bossyQE7Vh2ve+nXBjbkOPWXd1BNYIfQ3DFat8OcCmePzYPh5MjjyuGkwB9A/8hmenQ4KfAd8Fi6MGmHiMK+IIQwAq6A7f9L/ha7MXbef0Gd1B+5cJ8q7osJlgAAAABJRU5ErkJggg==',
- suspend =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAcCAYAAAB75n/uAAAAAXNSR0IArs4c6QAAAMlJREFUSEvtlj0OwUEQxX+voXARtZBwAgWVA2hVOgfQ6FQ0DkLCBSioxRncgObJikr+X4msaqfaZF/ey8zO7BsRORT4bQ+AOdAEbuEsaVdV23YDWAAjoA4cgJmkuz7k2wyyYVUR23ug/8VxBVpB4Ay0MwQukjplWdjuAccc3DgIPIBaBuApKaRbGLYnwCYHtAwCzmOQ9H6jorA9BVY5mHUSCC2eSpS6KA1amoP0m/7FD6Jb5q+m3wVORaYfdqJ4a0v0xausz3+9fwE+w+v3NO9E8gAAAABJRU5ErkJggg==',
- add =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAJhJREFUWEftlzEOQEAURPffgwOhRkPrUFoa1NaBuMeXLyTqsQmS2X7mT95uMvvFgaeffOLUtYdcXFPl6YJYCSIyTT/6VVWjY77IVhVpjHjBAbph1vvAuswgL0hkgxmABEiABEggGIGr1a5iQQoF0ViBWYvKvdUQoycaC/GBAOfH4rUrQBEGe4QMQAIkQAIk8FsCry+nodbzHQqVmosCTFkgAAAAAElFTkSuQmCC',
- minus =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAECAYAAADvRz3UAAAAAXNSR0IArs4c6QAAADNJREFUKFNjXLJ6myfDf4ZZ////l2GgI2BkZHzCwMiQxrhk1bbH9LYc5k+QIwaBAwY4CgCYmB5vQGvODAAAAABJRU5ErkJggg==',
- soundWav = '' + new URL('timer-ee5a21d4.wav', import.meta.url).href,
- Countdown = defineComponent({
- name: 'timer-countdown',
- setup() {
- ref('positive'), useRoute();
- const e = ref(),
- t = ref(),
- r = ref(),
- i = ref(),
- s = ref(null),
- a = ref(null),
- o = ref(new Date());
- a.value = setInterval(() => {
- o.value = new Date();
- }, 1e3);
- const n = ref(0),
- l = ref(0),
- f = ref(0),
- g = ref(!1),
- S = ref([e, t, r, i]),
- c = () => {
- const T = '0000';
- (l.value = 0), (f.value = 0);
- for (let E = 0; E < S.value.length; E++)
- S.value[E].value.setFront(T[E]);
- },
- P = new Audio(soundWav),
- d = () => {
- (g.value = !0),
- (s.value = setInterval(() => {
- const T = getSecond(n.value);
- if ((n.value == 4 && P.play(), n.value <= 0)) {
- x();
- return;
- }
- n.value--;
- const E = getSecond(n.value);
- for (let _ = 0; _ < S.value.length; _++)
- T[_] !== E[_] && S.value[_].value.flipDown(T[_], E[_]);
- }, 1e3));
- },
- p = () => {
- setTimeout(() => {
- (g.value = !1),
- (P.currentTime = 0),
- P.pause(),
- s.value && (clearInterval(s.value), (s.value = null));
- }, 600);
- },
- x = () => {
- g.value
- ? (p(),
- (n.value = 0),
- (P.currentTime = 0),
- P.pause(),
- setTimeout(() => {
- c();
- }, 600))
- : ((n.value = 0), c());
- };
- onMounted(() => {
- nextTick(() => {
- c();
- });
- }),
- onUnmounted(() => {
- P.pause();
- });
- const u = T => {
- const E = getSecond(n.value);
- (n.value += T), n.value > 3599 ? (n.value = 3599) : n.value;
- const _ = getSecond(n.value);
- for (let I = 0; I < S.value.length; I++)
- E[I] !== _[I] && S.value[I].value.flipDown(E[I], _[I]);
- (l.value = Math.floor(n.value / 60)),
- (f.value = Math.floor(n.value % 60));
- },
- y = T => {
- const E = getSecond(n.value);
- (n.value -= T), n.value < 0 ? (n.value = 0) : n.value;
- const _ = getSecond(n.value);
- for (let I = 0; I < S.value.length; I++)
- E[I] !== _[I] && S.value[I].value.flipUp(E[I], _[I]);
- (l.value = Math.floor(n.value / 60)),
- (f.value = Math.floor(n.value % 60));
- },
- m = T => {
- let E = parseInt(T.target.value);
- Number.isNaN(E) && (E = 0), E > 59 && (E = 59), (l.value = E);
- const _ = getSecond(n.value);
- console.log(l.value), (n.value = l.value * 60 + f.value);
- const I = getSecond(n.value);
- console.log(I, _);
- for (let B = 0; B < S.value.length; B++) _[B], I[B];
- },
- A = T => {
- let E = parseInt(T.target.value);
- Number.isNaN(E) && (E = 0), E > 59 && (E = 59), (f.value = E);
- const _ = getSecond(n.value);
- n.value = l.value * 60 + f.value;
- const I = getSecond(n.value);
- for (let B = 0; B < S.value.length; B++)
- _[B] !== I[B] && S.value[B].value.flipUp(_[B], I[B]);
- };
- return (
- watch(
- () => n.value,
- T => {
- (l.value = Math.floor(T / 60)), (f.value = Math.floor(T % 60));
- }
- ),
- () =>
- createVNode('div', { class: styles$7.timerItemWrap }, [
- createVNode('div', { class: styles$7.timerItemInfo }, [
- createVNode('div', { class: styles$7.timerItemInset }, [
- createVNode('div', { class: styles$7.timerItemInfoTop }, [
- createVNode('div', { class: styles$7.timerItemTopCore }, [
- createVNode('h4', null, [createTextVNode(' 分')]),
- createVNode('div', { class: styles$7.FlipClock }, [
- createVNode('div', { class: styles$7.numberWrap }, [
- createVNode(Flipper, { ref: e }, null),
- createVNode(Flipper, { ref: t }, null)
- ]),
- createVNode(
- 'div',
- {
- class: [
- styles$7.chioseWrap,
- g.value ? styles$7.chioseHidden : ''
- ]
- },
- [
- createVNode(
- 'img',
- {
- src: add,
- class: styles$7.add,
- alt: '',
- onClick: () => u(60)
- },
- null
- ),
- createVNode(
- NInputNumber,
- {
- class: styles$7.countInput,
- min: 0,
- max: 59,
- 'show-button': !1,
- onInput: m,
- value: l.value,
- 'onUpdate:value': T => (l.value = T)
- },
- null
- ),
- createVNode(
- 'img',
- {
- src: minus,
- class: styles$7.minus,
- alt: '',
- onClick: () => y(60)
- },
- null
- )
- ]
- )
- ])
- ]),
- createVNode('div', { class: styles$7.timerItemTopCore }, [
- createVNode('div', { class: styles$7.dot }, null),
- createVNode('div', { class: styles$7.dot }, null),
- createVNode('h4', { class: styles$7.dotBtm }, null)
- ]),
- createVNode('div', { class: styles$7.timerItemTopCore }, [
- createVNode('h4', null, [createTextVNode(' 秒 ')]),
- createVNode('div', { class: styles$7.FlipClock }, [
- createVNode('div', { class: styles$7.numberWrap }, [
- createVNode(Flipper, { ref: r }, null),
- createVNode(Flipper, { ref: i }, null)
- ]),
- createVNode(
- 'div',
- {
- class: [
- styles$7.chioseWrap,
- g.value ? styles$7.chioseHidden : ''
- ]
- },
- [
- createVNode(
- 'img',
- {
- src: add,
- class: styles$7.add,
- alt: '',
- onClick: () => u(1)
- },
- null
- ),
- createVNode(
- NInputNumber,
- {
- class: styles$7.countInput,
- min: 0,
- max: 59,
- 'show-button': !1,
- value: f.value,
- 'onUpdate:value': T => (f.value = T),
- onInput: A
- },
- null
- ),
- createVNode(
- 'img',
- {
- src: minus,
- class: styles$7.minus,
- alt: '',
- onClick: () => y(1)
- },
- null
- )
- ]
- )
- ])
- ])
- ])
- ])
- ]),
- createVNode(
- NSpace,
- { class: styles$7.btnGroupModal, justify: 'center' },
- {
- default: () => [
- createVNode(
- NButton,
- { round: !0, onClick: () => x() },
- { default: () => [createTextVNode('重置')] }
- ),
- g.value
- ? createVNode(
- NButton,
- {
- round: !0,
- type: 'primary',
- 'icon-placement': 'right',
- onClick: () => p()
- },
- {
- default: () =>
- createVNode('p', { class: styles$7.playText }, [
- createTextVNode('暂停')
- ]),
- icon: () =>
- createVNode(
- NImage,
- {
- previewDisabled: !0,
- class: styles$7.palyIcon,
- src: suspend
- },
- null
- )
- }
- )
- : createVNode(
- NButton,
- {
- round: !0,
- type: 'primary',
- disabled: n.value == 0,
- 'icon-placement': 'right',
- onClick: () => d()
- },
- {
- default: () =>
- createVNode('p', { class: styles$7.playText }, [
- createTextVNode('开始')
- ]),
- icon: () =>
- createVNode(
- NImage,
- {
- previewDisabled: !0,
- class: styles$7.palyIcon,
- src: playIcon
- },
- null
- )
- }
- )
- ]
- }
- )
- ])
- );
- }
- }),
- Positive = defineComponent({
- name: 'timer-positive',
- setup() {
- ref('positive'), useRoute();
- const e = ref(),
- t = ref(),
- r = ref(),
- i = ref(),
- s = ref(null),
- a = ref(null),
- o = ref(new Date());
- a.value = setInterval(() => {
- o.value = new Date();
- }, 1e3);
- const n = ref(0),
- l = ref(!1),
- f = ref([e, t, r, i]),
- g = () => {
- const d = '0000';
- for (let p = 0; p < f.value.length; p++)
- f.value[p].value.setFront(d[p]);
- },
- S = () => {
- (l.value = !0),
- (s.value = setInterval(() => {
- const d = getSecond(n.value);
- n.value++;
- const p = getSecond(n.value);
- for (let x = 0; x < f.value.length; x++)
- d[x] !== p[x] && f.value[x].value.flipDown(d[x], p[x]);
- }, 1e3));
- },
- c = () => {
- (l.value = !1), s.value && (clearInterval(s.value), (s.value = null));
- },
- P = () => {
- c(),
- (n.value = 0),
- setTimeout(() => {
- g();
- }, 600);
- };
- return (
- onMounted(() => {
- nextTick(() => {
- g();
- });
- }),
- () =>
- createVNode('div', { class: styles$7.timerItemWrap }, [
- createVNode('div', { class: styles$7.timerItemInfo }, [
- createVNode('div', { class: styles$7.timerItemInset }, [
- createVNode('div', { class: styles$7.timerItemInfoTop }, [
- createVNode('div', { class: styles$7.timerItemTopCore }, [
- createVNode('h4', null, [createTextVNode(' 分')]),
- createVNode('div', { class: styles$7.FlipClock }, [
- createVNode('div', { class: styles$7.numberWrap }, [
- createVNode(Flipper, { ref: e }, null),
- createVNode(Flipper, { ref: t }, null)
- ])
- ])
- ]),
- createVNode('div', { class: styles$7.timerItemTopCore }, [
- createVNode('h4', { class: styles$7.dotTop }, null),
- createVNode('div', { class: styles$7.dot }, null),
- createVNode('div', { class: styles$7.dot }, null)
- ]),
- createVNode('div', { class: styles$7.timerItemTopCore }, [
- createVNode('h4', null, [createTextVNode(' 秒')]),
- createVNode('div', { class: styles$7.FlipClock }, [
- createVNode('div', { class: styles$7.numberWrap }, [
- createVNode(Flipper, { ref: r }, null),
- createVNode(Flipper, { ref: i }, null)
- ])
- ])
- ])
- ]),
- createVNode('div', { class: styles$7.nowTimerWrap }, [
- dayjs(o.value).format('YYYY年MM月DD日 HH:mm:ss')
- ])
- ])
- ]),
- createVNode(
- NSpace,
- { class: styles$7.btnGroupModal, justify: 'center' },
- {
- default: () => [
- createVNode(
- NButton,
- { round: !0, onClick: () => P() },
- { default: () => [createTextVNode('重置')] }
- ),
- l.value
- ? createVNode(
- NButton,
- {
- round: !0,
- type: 'primary',
- 'icon-placement': 'right',
- onClick: () => c()
- },
- {
- default: () =>
- createVNode('p', { class: styles$7.playText }, [
- createTextVNode('暂停')
- ]),
- icon: () =>
- createVNode(
- NImage,
- {
- previewDisabled: !0,
- class: styles$7.palyIcon,
- src: suspend
- },
- null
- )
- }
- )
- : createVNode(
- NButton,
- {
- round: !0,
- type: 'primary',
- 'icon-placement': 'right',
- onClick: () => S()
- },
- {
- default: () =>
- createVNode('p', { class: styles$7.playText }, [
- createTextVNode('开始')
- ]),
- icon: () =>
- createVNode(
- NImage,
- {
- previewDisabled: !0,
- class: styles$7.palyIcon,
- src: playIcon
- },
- null
- )
- }
- )
- ]
- }
- )
- ])
- );
- }
- }),
- TimerMeter = defineComponent({
- name: 'data-module',
- setup() {
- const e = ref('positive');
- useRoute();
- const t = r => {
- e.value = r;
- };
- return () =>
- createVNode('div', null, [
- createVNode('div', { class: styles$7.timerWrap }, [
- createVNode('div', { class: styles$7.timerTop }, [
- createVNode(
- 'div',
- {
- class: [
- styles$7.timerTopPane,
- e.value == 'positive' ? styles$7.timerTopPaneActive : ''
- ],
- onClick: () => {
- t('positive');
- }
- },
- [createTextVNode('正计时')]
- ),
- createVNode(
- 'div',
- {
- class: [
- styles$7.timerTopPane,
- e.value == 'countdown' ? styles$7.timerTopPaneActive : ''
- ],
- onClick: () => {
- t('countdown');
- }
- },
- [createTextVNode('倒计时')]
- )
- ]),
- e.value == 'positive'
- ? createVNode(Positive, null, null)
- : createVNode(Countdown, null, null)
- ])
- ]);
- }
- }),
- downMove = '_downMove_137wx_1',
- downMoveBg = '_downMoveBg_137wx_9',
- dingPng = '_dingPng_137wx_16',
- closeAble = '_closeAble_137wx_25',
- submitAppBtn = '_submitAppBtn_137wx_53',
- styles$6 = { downMove, downMoveBg, dingPng, closeAble, submitAppBtn },
- PlaceholderTone = defineComponent({
- props: ['item'],
- emits: ['close'],
- name: 'placeholderTone',
- setup(e, { emit: t }) {
- return () =>
- createVNode(Fragment, null, [
- createVNode('div', { class: styles$6.downMove }, [
- createVNode(
- 'img',
- { src: dingPng$1, class: styles$6.dingPng, alt: '' },
- null
- ),
- createVNode(
- 'img',
- { src: moveTop, class: styles$6.downMoveBg, alt: '' },
- null
- ),
- createVNode('h2', null, [createTextVNode('温馨提示')]),
- createVNode('p', null, [
- createTextVNode('调音器功能暂未开放,敬请期待!')
- ]),
- createVNode(
- NSpace,
- { style: { padding: '25px 0 0 0' }, justify: 'center' },
- {
- default: () => [
- createVNode(
- NButton,
- mergeProps(
- { id: 'submitBtn' },
- {
- class: styles$6.submitAppBtn,
- round: !0,
- type: 'primary',
- onClick: () => {
- t('close');
- }
- }
- ),
- { default: () => [createTextVNode('我知道了')] }
- )
- ]
- }
- )
- ])
- ]);
- }
- }),
- playContent = '_playContent_z3eb0_1',
- assignHomeworkClose = '_assignHomeworkClose_z3eb0_10',
- coursewarePlay = '_coursewarePlay_z3eb0_23',
- playModel = '_playModel_z3eb0_29',
- headerContainer = '_headerContainer_z3eb0_38',
- backBtn = '_backBtn_z3eb0_58',
- headRight = '_headRight_z3eb0_70',
- rightBtn = '_rightBtn_z3eb0_79',
- menu = '_menu_z3eb0_91',
- tabsContent = '_tabsContent_z3eb0_102',
- wraps = '_wraps_z3eb0_113',
- itemDiv = '_itemDiv_z3eb0_120',
- itemActive = '_itemActive_z3eb0_133',
- acitveAnimation = '_acitveAnimation_z3eb0_136',
- show = '_show_z3eb0_139',
- hide$1 = '_hide_z3eb0_142',
- rightFixedBtns = '_rightFixedBtns_z3eb0_155',
- fullBtn = '_fullBtn_z3eb0_162',
- point = '_point_z3eb0_167',
- iconUp$1 = '_iconUp_z3eb0_177',
- iconDown$1 = '_iconDown_z3eb0_178',
- btnsDisabled = '_btnsDisabled_z3eb0_181',
- loadWrap = '_loadWrap_z3eb0_211',
- drawerContainer = '_drawerContainer_z3eb0_222',
- cardContainer = '_cardContainer_z3eb0_225',
- sectionAnimate$2 = '_sectionAnimate_z3eb0_261',
- sectionAnimateUp = '_sectionAnimateUp_z3eb0_267',
- switchDisplaySection = '_switchDisplaySection_z3eb0_273',
- switchSpace = '_switchSpace_z3eb0_288',
- btnItem = '_btnItem_z3eb0_291',
- attendClassModal = '_attendClassModal_z3eb0_313',
- modelAttendContent = '_modelAttendContent_z3eb0_337',
- modelAttendBtnGroup = '_modelAttendBtnGroup_z3eb0_343',
- trainClassModal = '_trainClassModal_z3eb0_351',
- workContainer = '_workContainer_z3eb0_357',
- toolboxImg = '_toolboxImg_z3eb0_364',
- isDragIng = '_isDragIng_z3eb0_373',
- toolClassImg = '_toolClassImg_z3eb0_377',
- booxToolWrap = '_booxToolWrap_z3eb0_392',
- booxToolItem = '_booxToolItem_z3eb0_403',
- setTimeImage = '_setTimeImage_z3eb0_420',
- beatImage = '_beatImage_z3eb0_426',
- changePwdModal = '_changePwdModal_z3eb0_432',
- imChatModal = '_imChatModal_z3eb0_435',
- modeWrap = '_modeWrap_z3eb0_438',
- showModalTone = '_showModalTone_z3eb0_443',
- studentRemove$1 = '_studentRemove_z3eb0_446',
- removeVisiable$1 = '_removeVisiable_z3eb0_458',
- btnGroupModal$1 = '_btnGroupModal_z3eb0_476',
- styles$5 = {
- playContent,
- assignHomeworkClose,
- coursewarePlay,
- playModel,
- headerContainer,
- backBtn,
- headRight,
- rightBtn,
- menu,
- tabsContent,
- wraps,
- itemDiv,
- itemActive,
- acitveAnimation,
- show,
- hide: hide$1,
- rightFixedBtns,
- fullBtn,
- point,
- iconUp: iconUp$1,
- iconDown: iconDown$1,
- btnsDisabled,
- loadWrap,
- drawerContainer,
- cardContainer,
- sectionAnimate: sectionAnimate$2,
- sectionAnimateUp,
- switchDisplaySection,
- switchSpace,
- btnItem,
- attendClassModal,
- modelAttendContent,
- modelAttendBtnGroup,
- trainClassModal,
- workContainer,
- toolboxImg,
- isDragIng,
- toolClassImg,
- booxToolWrap,
- booxToolItem,
- setTimeImage,
- beatImage,
- changePwdModal,
- imChatModal,
- modeWrap,
- showModalTone,
- studentRemove: studentRemove$1,
- removeVisiable: removeVisiable$1,
- btnGroupModal: btnGroupModal$1
- },
- plyr = '',
- musicScore = '_musicScore_6u588_1',
- container = '_container_6u588_7',
- musicModel = '_musicModel_6u588_15',
- errorModel = '_errorModel_6u588_22',
- startBtn = '_startBtn_6u588_34',
- loading = '_loading_6u588_44',
- skeletonWrap = '_skeletonWrap_6u588_50',
- skeleton = '_skeleton_6u588_50',
- styles$4 = {
- musicScore,
- container,
- musicModel,
- errorModel,
- startBtn,
- loading,
- skeletonWrap,
- skeleton
- };
- var inBrowser = typeof window < 'u',
- visibility;
- function usePageVisibility() {
- if (!visibility && ((visibility = ref('visible')), inBrowser)) {
- const e = () => {
- visibility.value = document.hidden ? 'hidden' : 'visible';
- };
- e(), window.addEventListener('visibilitychange', e);
- }
- return visibility;
- }
- const MusicScore = defineComponent({
- name: 'musicScore',
- props: {
- music: { type: Object, default: () => ({}) },
- activeModel: { type: Boolean },
- activeStatus: { type: Boolean }
- },
- emits: ['setIframe'],
- setup(e, { emit: t }) {
- const r = useUserStore(),
- i = ref(!1),
- s = usePageVisibility();
- watch(s, c => {
- console.log('🚀 ~ value:', c), c == 'hidden' && (i.value = !1);
- });
- const a = ref(),
- o = ref(!1),
- n = ref(!1),
- l = ref(!1),
- f = /(localhost|192)/.test(location.host)
- ? 'https://test.lexiaoya.cn/instrument'
- : location.origin + '/instrument',
- g = ''
- .concat(
- f,
- '?showGuide=true&platform=pc&zoom=1.2&modelType=practise&id='
- )
- .concat(e.music.content, '&Authorization=')
- .concat(r.getToken),
- S = () => {
- fetch(g)
- .then(() => {
- (l.value = !0), (n.value = !1);
- })
- .catch(() => {
- n.value = !0;
- });
- };
- return (
- watch(
- () => e.music,
- () => {
- l.value || ((n.value = !1), e.music.display && S());
- }
- ),
- watch(
- () => e.activeModel,
- () => {
- a.value.contentWindow &&
- e.activeStatus &&
- a.value.contentWindow.postMessage(
- { api: 'attendClassBarStatus', hideMenu: !e.activeModel },
- '*'
- );
- }
- ),
- () =>
- createVNode('div', { class: styles$4.musicScore }, [
- createVNode(
- 'iframe',
- {
- ref: a,
- onLoad: () => {
- t('setIframe', a.value), (o.value = !0);
- },
- class: [styles$4.container, 'musicIframe'],
- frameborder: '0',
- src: g
- },
- null
- ),
- o.value &&
- createVNode('div', { class: styles$4.skeletonWrap }, [
- createVNode('div', null, [
- createVNode(NSkeleton, { text: !0, repeat: 8 }, null)
- ])
- ])
- ])
- );
- }
- });
- var lottie = { exports: {} };
- (function (module, exports) {
- typeof navigator < 'u' &&
- (function (e, t) {
- module.exports = t();
- })(commonjsGlobal, function () {
- var svgNS = 'http://www.w3.org/2000/svg',
- locationHref = '',
- _useWebWorker = !1,
- initialDefaultFrame = -999999,
- setWebWorker = function (t) {
- _useWebWorker = !!t;
- },
- getWebWorker = function () {
- return _useWebWorker;
- },
- setLocationHref = function (t) {
- locationHref = t;
- },
- getLocationHref = function () {
- return locationHref;
- };
- function createTag(e) {
- return document.createElement(e);
- }
- function extendPrototype(e, t) {
- var r,
- i = e.length,
- s;
- for (r = 0; r < i; r += 1) {
- s = e[r].prototype;
- for (var a in s)
- Object.prototype.hasOwnProperty.call(s, a) &&
- (t.prototype[a] = s[a]);
- }
- }
- function getDescriptor(e, t) {
- return Object.getOwnPropertyDescriptor(e, t);
- }
- function createProxyFunction(e) {
- function t() {}
- return (t.prototype = e), t;
- }
- var audioControllerFactory = (function () {
- function e(t) {
- (this.audios = []),
- (this.audioFactory = t),
- (this._volume = 1),
- (this._isMuted = !1);
- }
- return (
- (e.prototype = {
- addAudio: function (r) {
- this.audios.push(r);
- },
- pause: function () {
- var r,
- i = this.audios.length;
- for (r = 0; r < i; r += 1) this.audios[r].pause();
- },
- resume: function () {
- var r,
- i = this.audios.length;
- for (r = 0; r < i; r += 1) this.audios[r].resume();
- },
- setRate: function (r) {
- var i,
- s = this.audios.length;
- for (i = 0; i < s; i += 1) this.audios[i].setRate(r);
- },
- createAudio: function (r) {
- return this.audioFactory
- ? this.audioFactory(r)
- : window.Howl
- ? new window.Howl({ src: [r] })
- : {
- isPlaying: !1,
- play: function () {
- this.isPlaying = !0;
- },
- seek: function () {
- this.isPlaying = !1;
- },
- playing: function () {},
- rate: function () {},
- setVolume: function () {}
- };
- },
- setAudioFactory: function (r) {
- this.audioFactory = r;
- },
- setVolume: function (r) {
- (this._volume = r), this._updateVolume();
- },
- mute: function () {
- (this._isMuted = !0), this._updateVolume();
- },
- unmute: function () {
- (this._isMuted = !1), this._updateVolume();
- },
- getVolume: function () {
- return this._volume;
- },
- _updateVolume: function () {
- var r,
- i = this.audios.length;
- for (r = 0; r < i; r += 1)
- this.audios[r].volume(this._volume * (this._isMuted ? 0 : 1));
- }
- }),
- function () {
- return new e();
- }
- );
- })(),
- createTypedArray = (function () {
- function e(r, i) {
- var s = 0,
- a = [],
- o;
- switch (r) {
- case 'int16':
- case 'uint8c':
- o = 1;
- break;
- default:
- o = 1.1;
- break;
- }
- for (s = 0; s < i; s += 1) a.push(o);
- return a;
- }
- function t(r, i) {
- return r === 'float32'
- ? new Float32Array(i)
- : r === 'int16'
- ? new Int16Array(i)
- : r === 'uint8c'
- ? new Uint8ClampedArray(i)
- : e(r, i);
- }
- return typeof Uint8ClampedArray == 'function' &&
- typeof Float32Array == 'function'
- ? t
- : e;
- })();
- function createSizedArray(e) {
- return Array.apply(null, { length: e });
- }
- function _typeof$6(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof$6 = function (r) {
- return typeof r;
- })
- : (_typeof$6 = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof$6(e)
- );
- }
- var subframeEnabled = !0,
- expressionsPlugin = null,
- expressionsInterfaces = null,
- idPrefix$1 = '',
- isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
- bmPow = Math.pow,
- bmSqrt = Math.sqrt,
- bmFloor = Math.floor,
- bmMax = Math.max,
- bmMin = Math.min,
- BMMath = {};
- (function () {
- var e = [
- 'abs',
- 'acos',
- 'acosh',
- 'asin',
- 'asinh',
- 'atan',
- 'atanh',
- 'atan2',
- 'ceil',
- 'cbrt',
- 'expm1',
- 'clz32',
- 'cos',
- 'cosh',
- 'exp',
- 'floor',
- 'fround',
- 'hypot',
- 'imul',
- 'log',
- 'log1p',
- 'log2',
- 'log10',
- 'max',
- 'min',
- 'pow',
- 'random',
- 'round',
- 'sign',
- 'sin',
- 'sinh',
- 'sqrt',
- 'tan',
- 'tanh',
- 'trunc',
- 'E',
- 'LN10',
- 'LN2',
- 'LOG10E',
- 'LOG2E',
- 'PI',
- 'SQRT1_2',
- 'SQRT2'
- ],
- t,
- r = e.length;
- for (t = 0; t < r; t += 1) BMMath[e[t]] = Math[e[t]];
- })(),
- (BMMath.random = Math.random),
- (BMMath.abs = function (e) {
- var t = _typeof$6(e);
- if (t === 'object' && e.length) {
- var r = createSizedArray(e.length),
- i,
- s = e.length;
- for (i = 0; i < s; i += 1) r[i] = Math.abs(e[i]);
- return r;
- }
- return Math.abs(e);
- });
- var defaultCurveSegments = 150,
- degToRads = Math.PI / 180,
- roundCorner = 0.5519;
- function styleDiv(e) {
- (e.style.position = 'absolute'),
- (e.style.top = 0),
- (e.style.left = 0),
- (e.style.display = 'block'),
- (e.style.transformOrigin = '0 0'),
- (e.style.webkitTransformOrigin = '0 0'),
- (e.style.backfaceVisibility = 'visible'),
- (e.style.webkitBackfaceVisibility = 'visible'),
- (e.style.transformStyle = 'preserve-3d'),
- (e.style.webkitTransformStyle = 'preserve-3d'),
- (e.style.mozTransformStyle = 'preserve-3d');
- }
- function BMEnterFrameEvent(e, t, r, i) {
- (this.type = e),
- (this.currentTime = t),
- (this.totalTime = r),
- (this.direction = i < 0 ? -1 : 1);
- }
- function BMCompleteEvent(e, t) {
- (this.type = e), (this.direction = t < 0 ? -1 : 1);
- }
- function BMCompleteLoopEvent(e, t, r, i) {
- (this.type = e),
- (this.currentLoop = r),
- (this.totalLoops = t),
- (this.direction = i < 0 ? -1 : 1);
- }
- function BMSegmentStartEvent(e, t, r) {
- (this.type = e), (this.firstFrame = t), (this.totalFrames = r);
- }
- function BMDestroyEvent(e, t) {
- (this.type = e), (this.target = t);
- }
- function BMRenderFrameErrorEvent(e, t) {
- (this.type = 'renderFrameError'),
- (this.nativeError = e),
- (this.currentTime = t);
- }
- function BMConfigErrorEvent(e) {
- (this.type = 'configError'), (this.nativeError = e);
- }
- var createElementID = (function () {
- var e = 0;
- return function () {
- return (e += 1), idPrefix$1 + '__lottie_element_' + e;
- };
- })();
- function HSVtoRGB(e, t, r) {
- var i, s, a, o, n, l, f, g;
- switch (
- ((o = Math.floor(e * 6)),
- (n = e * 6 - o),
- (l = r * (1 - t)),
- (f = r * (1 - n * t)),
- (g = r * (1 - (1 - n) * t)),
- o % 6)
- ) {
- case 0:
- (i = r), (s = g), (a = l);
- break;
- case 1:
- (i = f), (s = r), (a = l);
- break;
- case 2:
- (i = l), (s = r), (a = g);
- break;
- case 3:
- (i = l), (s = f), (a = r);
- break;
- case 4:
- (i = g), (s = l), (a = r);
- break;
- case 5:
- (i = r), (s = l), (a = f);
- break;
- }
- return [i, s, a];
- }
- function RGBtoHSV(e, t, r) {
- var i = Math.max(e, t, r),
- s = Math.min(e, t, r),
- a = i - s,
- o,
- n = i === 0 ? 0 : a / i,
- l = i / 255;
- switch (i) {
- case s:
- o = 0;
- break;
- case e:
- (o = t - r + a * (t < r ? 6 : 0)), (o /= 6 * a);
- break;
- case t:
- (o = r - e + a * 2), (o /= 6 * a);
- break;
- case r:
- (o = e - t + a * 4), (o /= 6 * a);
- break;
- }
- return [o, n, l];
- }
- function addSaturationToRGB(e, t) {
- var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
- return (
- (r[1] += t),
- r[1] > 1 ? (r[1] = 1) : r[1] <= 0 && (r[1] = 0),
- HSVtoRGB(r[0], r[1], r[2])
- );
- }
- function addBrightnessToRGB(e, t) {
- var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
- return (
- (r[2] += t),
- r[2] > 1 ? (r[2] = 1) : r[2] < 0 && (r[2] = 0),
- HSVtoRGB(r[0], r[1], r[2])
- );
- }
- function addHueToRGB(e, t) {
- var r = RGBtoHSV(e[0] * 255, e[1] * 255, e[2] * 255);
- return (
- (r[0] += t / 360),
- r[0] > 1 ? (r[0] -= 1) : r[0] < 0 && (r[0] += 1),
- HSVtoRGB(r[0], r[1], r[2])
- );
- }
- var rgbToHex = (function () {
- var e = [],
- t,
- r;
- for (t = 0; t < 256; t += 1)
- (r = t.toString(16)), (e[t] = r.length === 1 ? '0' + r : r);
- return function (i, s, a) {
- return (
- i < 0 && (i = 0),
- s < 0 && (s = 0),
- a < 0 && (a = 0),
- '#' + e[i] + e[s] + e[a]
- );
- };
- })(),
- setSubframeEnabled = function (t) {
- subframeEnabled = !!t;
- },
- getSubframeEnabled = function () {
- return subframeEnabled;
- },
- setExpressionsPlugin = function (t) {
- expressionsPlugin = t;
- },
- getExpressionsPlugin = function () {
- return expressionsPlugin;
- },
- setExpressionInterfaces = function (t) {
- expressionsInterfaces = t;
- },
- getExpressionInterfaces = function () {
- return expressionsInterfaces;
- },
- setDefaultCurveSegments = function (t) {
- defaultCurveSegments = t;
- },
- getDefaultCurveSegments = function () {
- return defaultCurveSegments;
- },
- setIdPrefix = function (t) {
- idPrefix$1 = t;
- };
- function createNS(e) {
- return document.createElementNS(svgNS, e);
- }
- function _typeof$5(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof$5 = function (r) {
- return typeof r;
- })
- : (_typeof$5 = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof$5(e)
- );
- }
- var dataManager = (function () {
- var e = 1,
- t = [],
- r,
- i,
- s = {
- onmessage: function () {},
- postMessage: function (P) {
- r({ data: P });
- }
- },
- a = {
- postMessage: function (P) {
- s.onmessage({ data: P });
- }
- };
- function o(c) {
- if (window.Worker && window.Blob && getWebWorker()) {
- var P = new Blob(
- ['var _workerSelf = self; self.onmessage = ', c.toString()],
- { type: 'text/javascript' }
- ),
- d = URL.createObjectURL(P);
- return new Worker(d);
- }
- return (r = c), s;
- }
- function n() {
- i ||
- ((i = o(function (P) {
- function d() {
- function x(N, M) {
- var k,
- b,
- C = N.length,
- L,
- F,
- U,
- D;
- for (b = 0; b < C; b += 1)
- if (((k = N[b]), 'ks' in k && !k.completed)) {
- if (((k.completed = !0), k.hasMask)) {
- var V = k.masksProperties;
- for (F = V.length, L = 0; L < F; L += 1)
- if (V[L].pt.k.i) T(V[L].pt.k);
- else
- for (D = V[L].pt.k.length, U = 0; U < D; U += 1)
- V[L].pt.k[U].s && T(V[L].pt.k[U].s[0]),
- V[L].pt.k[U].e && T(V[L].pt.k[U].e[0]);
- }
- k.ty === 0
- ? ((k.layers = m(k.refId, M)), x(k.layers, M))
- : k.ty === 4
- ? A(k.shapes)
- : k.ty === 5 && W(k);
- }
- }
- function u(N, M) {
- if (N) {
- var k = 0,
- b = N.length;
- for (k = 0; k < b; k += 1)
- N[k].t === 1 &&
- ((N[k].data.layers = m(N[k].data.refId, M)),
- x(N[k].data.layers, M));
- }
- }
- function y(N, M) {
- for (var k = 0, b = M.length; k < b; ) {
- if (M[k].id === N) return M[k];
- k += 1;
- }
- return null;
- }
- function m(N, M) {
- var k = y(N, M);
- return k
- ? k.layers.__used
- ? JSON.parse(JSON.stringify(k.layers))
- : ((k.layers.__used = !0), k.layers)
- : null;
- }
- function A(N) {
- var M,
- k = N.length,
- b,
- C;
- for (M = k - 1; M >= 0; M -= 1)
- if (N[M].ty === 'sh')
- if (N[M].ks.k.i) T(N[M].ks.k);
- else
- for (C = N[M].ks.k.length, b = 0; b < C; b += 1)
- N[M].ks.k[b].s && T(N[M].ks.k[b].s[0]),
- N[M].ks.k[b].e && T(N[M].ks.k[b].e[0]);
- else N[M].ty === 'gr' && A(N[M].it);
- }
- function T(N) {
- var M,
- k = N.i.length;
- for (M = 0; M < k; M += 1)
- (N.i[M][0] += N.v[M][0]),
- (N.i[M][1] += N.v[M][1]),
- (N.o[M][0] += N.v[M][0]),
- (N.o[M][1] += N.v[M][1]);
- }
- function E(N, M) {
- var k = M ? M.split('.') : [100, 100, 100];
- return N[0] > k[0]
- ? !0
- : k[0] > N[0]
- ? !1
- : N[1] > k[1]
- ? !0
- : k[1] > N[1]
- ? !1
- : N[2] > k[2]
- ? !0
- : k[2] > N[2]
- ? !1
- : null;
- }
- var _ = (function () {
- var N = [4, 4, 14];
- function M(b) {
- var C = b.t.d;
- b.t.d = { k: [{ s: C, t: 0 }] };
- }
- function k(b) {
- var C,
- L = b.length;
- for (C = 0; C < L; C += 1) b[C].ty === 5 && M(b[C]);
- }
- return function (b) {
- if (E(N, b.v) && (k(b.layers), b.assets)) {
- var C,
- L = b.assets.length;
- for (C = 0; C < L; C += 1)
- b.assets[C].layers && k(b.assets[C].layers);
- }
- };
- })(),
- I = (function () {
- var N = [4, 7, 99];
- return function (M) {
- if (M.chars && !E(N, M.v)) {
- var k,
- b = M.chars.length;
- for (k = 0; k < b; k += 1) {
- var C = M.chars[k];
- C.data &&
- C.data.shapes &&
- (A(C.data.shapes),
- (C.data.ip = 0),
- (C.data.op = 99999),
- (C.data.st = 0),
- (C.data.sr = 1),
- (C.data.ks = {
- p: { k: [0, 0], a: 0 },
- s: { k: [100, 100], a: 0 },
- a: { k: [0, 0], a: 0 },
- r: { k: 0, a: 0 },
- o: { k: 100, a: 0 }
- }),
- M.chars[k].t ||
- (C.data.shapes.push({ ty: 'no' }),
- C.data.shapes[0].it.push({
- p: { k: [0, 0], a: 0 },
- s: { k: [100, 100], a: 0 },
- a: { k: [0, 0], a: 0 },
- r: { k: 0, a: 0 },
- o: { k: 100, a: 0 },
- sk: { k: 0, a: 0 },
- sa: { k: 0, a: 0 },
- ty: 'tr'
- })));
- }
- }
- };
- })(),
- B = (function () {
- var N = [5, 7, 15];
- function M(b) {
- var C = b.t.p;
- typeof C.a == 'number' && (C.a = { a: 0, k: C.a }),
- typeof C.p == 'number' && (C.p = { a: 0, k: C.p }),
- typeof C.r == 'number' && (C.r = { a: 0, k: C.r });
- }
- function k(b) {
- var C,
- L = b.length;
- for (C = 0; C < L; C += 1) b[C].ty === 5 && M(b[C]);
- }
- return function (b) {
- if (E(N, b.v) && (k(b.layers), b.assets)) {
- var C,
- L = b.assets.length;
- for (C = 0; C < L; C += 1)
- b.assets[C].layers && k(b.assets[C].layers);
- }
- };
- })(),
- z = (function () {
- var N = [4, 1, 9];
- function M(b) {
- var C,
- L = b.length,
- F,
- U;
- for (C = 0; C < L; C += 1)
- if (b[C].ty === 'gr') M(b[C].it);
- else if (b[C].ty === 'fl' || b[C].ty === 'st')
- if (b[C].c.k && b[C].c.k[0].i)
- for (U = b[C].c.k.length, F = 0; F < U; F += 1)
- b[C].c.k[F].s &&
- ((b[C].c.k[F].s[0] /= 255),
- (b[C].c.k[F].s[1] /= 255),
- (b[C].c.k[F].s[2] /= 255),
- (b[C].c.k[F].s[3] /= 255)),
- b[C].c.k[F].e &&
- ((b[C].c.k[F].e[0] /= 255),
- (b[C].c.k[F].e[1] /= 255),
- (b[C].c.k[F].e[2] /= 255),
- (b[C].c.k[F].e[3] /= 255));
- else
- (b[C].c.k[0] /= 255),
- (b[C].c.k[1] /= 255),
- (b[C].c.k[2] /= 255),
- (b[C].c.k[3] /= 255);
- }
- function k(b) {
- var C,
- L = b.length;
- for (C = 0; C < L; C += 1)
- b[C].ty === 4 && M(b[C].shapes);
- }
- return function (b) {
- if (E(N, b.v) && (k(b.layers), b.assets)) {
- var C,
- L = b.assets.length;
- for (C = 0; C < L; C += 1)
- b.assets[C].layers && k(b.assets[C].layers);
- }
- };
- })(),
- G = (function () {
- var N = [4, 4, 18];
- function M(b) {
- var C,
- L = b.length,
- F,
- U;
- for (C = L - 1; C >= 0; C -= 1)
- if (b[C].ty === 'sh')
- if (b[C].ks.k.i) b[C].ks.k.c = b[C].closed;
- else
- for (U = b[C].ks.k.length, F = 0; F < U; F += 1)
- b[C].ks.k[F].s &&
- (b[C].ks.k[F].s[0].c = b[C].closed),
- b[C].ks.k[F].e &&
- (b[C].ks.k[F].e[0].c = b[C].closed);
- else b[C].ty === 'gr' && M(b[C].it);
- }
- function k(b) {
- var C,
- L,
- F = b.length,
- U,
- D,
- V,
- O;
- for (L = 0; L < F; L += 1) {
- if (((C = b[L]), C.hasMask)) {
- var j = C.masksProperties;
- for (D = j.length, U = 0; U < D; U += 1)
- if (j[U].pt.k.i) j[U].pt.k.c = j[U].cl;
- else
- for (O = j[U].pt.k.length, V = 0; V < O; V += 1)
- j[U].pt.k[V].s &&
- (j[U].pt.k[V].s[0].c = j[U].cl),
- j[U].pt.k[V].e &&
- (j[U].pt.k[V].e[0].c = j[U].cl);
- }
- C.ty === 4 && M(C.shapes);
- }
- }
- return function (b) {
- if (E(N, b.v) && (k(b.layers), b.assets)) {
- var C,
- L = b.assets.length;
- for (C = 0; C < L; C += 1)
- b.assets[C].layers && k(b.assets[C].layers);
- }
- };
- })();
- function R(N) {
- N.__complete ||
- (z(N),
- _(N),
- I(N),
- B(N),
- G(N),
- x(N.layers, N.assets),
- u(N.chars, N.assets),
- (N.__complete = !0));
- }
- function W(N) {
- N.t.a.length === 0 && 'm' in N.t.p;
- }
- var H = {};
- return (
- (H.completeData = R),
- (H.checkColors = z),
- (H.checkChars = I),
- (H.checkPathProperties = B),
- (H.checkShapes = G),
- (H.completeLayers = x),
- H
- );
- }
- if (
- (a.dataManager || (a.dataManager = d()),
- a.assetLoader ||
- (a.assetLoader = (function () {
- function x(y) {
- var m = y.getResponseHeader('content-type');
- return (m &&
- y.responseType === 'json' &&
- m.indexOf('json') !== -1) ||
- (y.response && _typeof$5(y.response) === 'object')
- ? y.response
- : y.response && typeof y.response == 'string'
- ? JSON.parse(y.response)
- : y.responseText
- ? JSON.parse(y.responseText)
- : null;
- }
- function u(y, m, A, T) {
- var E,
- _ = new XMLHttpRequest();
- try {
- _.responseType = 'json';
- } catch (I) {}
- _.onreadystatechange = function () {
- if (_.readyState === 4)
- if (_.status === 200) (E = x(_)), A(E);
- else
- try {
- (E = x(_)), A(E);
- } catch (I) {
- T && T(I);
- }
- };
- try {
- _.open(['G', 'E', 'T'].join(''), y, !0);
- } catch (I) {
- _.open(['G', 'E', 'T'].join(''), m + '/' + y, !0);
- }
- _.send();
- }
- return { load: u };
- })()),
- P.data.type === 'loadAnimation')
- )
- a.assetLoader.load(
- P.data.path,
- P.data.fullPath,
- function (x) {
- a.dataManager.completeData(x),
- a.postMessage({
- id: P.data.id,
- payload: x,
- status: 'success'
- });
- },
- function () {
- a.postMessage({ id: P.data.id, status: 'error' });
- }
- );
- else if (P.data.type === 'complete') {
- var p = P.data.animation;
- a.dataManager.completeData(p),
- a.postMessage({
- id: P.data.id,
- payload: p,
- status: 'success'
- });
- } else
- P.data.type === 'loadData' &&
- a.assetLoader.load(
- P.data.path,
- P.data.fullPath,
- function (x) {
- a.postMessage({
- id: P.data.id,
- payload: x,
- status: 'success'
- });
- },
- function () {
- a.postMessage({ id: P.data.id, status: 'error' });
- }
- );
- })),
- (i.onmessage = function (c) {
- var P = c.data,
- d = P.id,
- p = t[d];
- (t[d] = null),
- P.status === 'success'
- ? p.onComplete(P.payload)
- : p.onError && p.onError();
- }));
- }
- function l(c, P) {
- e += 1;
- var d = 'processId_' + e;
- return (t[d] = { onComplete: c, onError: P }), d;
- }
- function f(c, P, d) {
- n();
- var p = l(P, d);
- i.postMessage({
- type: 'loadAnimation',
- path: c,
- fullPath: window.location.origin + window.location.pathname,
- id: p
- });
- }
- function g(c, P, d) {
- n();
- var p = l(P, d);
- i.postMessage({
- type: 'loadData',
- path: c,
- fullPath: window.location.origin + window.location.pathname,
- id: p
- });
- }
- function S(c, P, d) {
- n();
- var p = l(P, d);
- i.postMessage({ type: 'complete', animation: c, id: p });
- }
- return { loadAnimation: f, loadData: g, completeAnimation: S };
- })(),
- ImagePreloader = (function () {
- var e = (function () {
- var u = createTag('canvas');
- (u.width = 1), (u.height = 1);
- var y = u.getContext('2d');
- return (y.fillStyle = 'rgba(0,0,0,0)'), y.fillRect(0, 0, 1, 1), u;
- })();
- function t() {
- (this.loadedAssets += 1),
- this.loadedAssets === this.totalImages &&
- this.loadedFootagesCount === this.totalFootages &&
- this.imagesLoadedCb &&
- this.imagesLoadedCb(null);
- }
- function r() {
- (this.loadedFootagesCount += 1),
- this.loadedAssets === this.totalImages &&
- this.loadedFootagesCount === this.totalFootages &&
- this.imagesLoadedCb &&
- this.imagesLoadedCb(null);
- }
- function i(u, y, m) {
- var A = '';
- if (u.e) A = u.p;
- else if (y) {
- var T = u.p;
- T.indexOf('images/') !== -1 && (T = T.split('/')[1]), (A = y + T);
- } else (A = m), (A += u.u ? u.u : ''), (A += u.p);
- return A;
- }
- function s(u) {
- var y = 0,
- m = setInterval(
- function () {
- var A = u.getBBox();
- (A.width || y > 500) &&
- (this._imageLoaded(), clearInterval(m)),
- (y += 1);
- }.bind(this),
- 50
- );
- }
- function a(u) {
- var y = i(u, this.assetsPath, this.path),
- m = createNS('image');
- isSafari
- ? this.testImageLoaded(m)
- : m.addEventListener('load', this._imageLoaded, !1),
- m.addEventListener(
- 'error',
- function () {
- (A.img = e), this._imageLoaded();
- }.bind(this),
- !1
- ),
- m.setAttributeNS('http://www.w3.org/1999/xlink', 'href', y),
- this._elementHelper.append
- ? this._elementHelper.append(m)
- : this._elementHelper.appendChild(m);
- var A = { img: m, assetData: u };
- return A;
- }
- function o(u) {
- var y = i(u, this.assetsPath, this.path),
- m = createTag('img');
- (m.crossOrigin = 'anonymous'),
- m.addEventListener('load', this._imageLoaded, !1),
- m.addEventListener(
- 'error',
- function () {
- (A.img = e), this._imageLoaded();
- }.bind(this),
- !1
- ),
- (m.src = y);
- var A = { img: m, assetData: u };
- return A;
- }
- function n(u) {
- var y = { assetData: u },
- m = i(u, this.assetsPath, this.path);
- return (
- dataManager.loadData(
- m,
- function (A) {
- (y.img = A), this._footageLoaded();
- }.bind(this),
- function () {
- (y.img = {}), this._footageLoaded();
- }.bind(this)
- ),
- y
- );
- }
- function l(u, y) {
- this.imagesLoadedCb = y;
- var m,
- A = u.length;
- for (m = 0; m < A; m += 1)
- u[m].layers ||
- (!u[m].t || u[m].t === 'seq'
- ? ((this.totalImages += 1),
- this.images.push(this._createImageData(u[m])))
- : u[m].t === 3 &&
- ((this.totalFootages += 1),
- this.images.push(this.createFootageData(u[m]))));
- }
- function f(u) {
- this.path = u || '';
- }
- function g(u) {
- this.assetsPath = u || '';
- }
- function S(u) {
- for (var y = 0, m = this.images.length; y < m; ) {
- if (this.images[y].assetData === u) return this.images[y].img;
- y += 1;
- }
- return null;
- }
- function c() {
- (this.imagesLoadedCb = null), (this.images.length = 0);
- }
- function P() {
- return this.totalImages === this.loadedAssets;
- }
- function d() {
- return this.totalFootages === this.loadedFootagesCount;
- }
- function p(u, y) {
- u === 'svg'
- ? ((this._elementHelper = y),
- (this._createImageData = this.createImageData.bind(this)))
- : (this._createImageData = this.createImgData.bind(this));
- }
- function x() {
- (this._imageLoaded = t.bind(this)),
- (this._footageLoaded = r.bind(this)),
- (this.testImageLoaded = s.bind(this)),
- (this.createFootageData = n.bind(this)),
- (this.assetsPath = ''),
- (this.path = ''),
- (this.totalImages = 0),
- (this.totalFootages = 0),
- (this.loadedAssets = 0),
- (this.loadedFootagesCount = 0),
- (this.imagesLoadedCb = null),
- (this.images = []);
- }
- return (
- (x.prototype = {
- loadAssets: l,
- setAssetsPath: g,
- setPath: f,
- loadedImages: P,
- loadedFootages: d,
- destroy: c,
- getAsset: S,
- createImgData: o,
- createImageData: a,
- imageLoaded: t,
- footageLoaded: r,
- setCacheType: p
- }),
- x
- );
- })();
- function BaseEvent() {}
- BaseEvent.prototype = {
- triggerEvent: function (t, r) {
- if (this._cbs[t])
- for (var i = this._cbs[t], s = 0; s < i.length; s += 1) i[s](r);
- },
- addEventListener: function (t, r) {
- return (
- this._cbs[t] || (this._cbs[t] = []),
- this._cbs[t].push(r),
- function () {
- this.removeEventListener(t, r);
- }.bind(this)
- );
- },
- removeEventListener: function (t, r) {
- if (!r) this._cbs[t] = null;
- else if (this._cbs[t]) {
- for (var i = 0, s = this._cbs[t].length; i < s; )
- this._cbs[t][i] === r &&
- (this._cbs[t].splice(i, 1), (i -= 1), (s -= 1)),
- (i += 1);
- this._cbs[t].length || (this._cbs[t] = null);
- }
- }
- };
- var markerParser = (function () {
- function e(t) {
- for (
- var r = t.split('\r\n'), i = {}, s, a = 0, o = 0;
- o < r.length;
- o += 1
- )
- (s = r[o].split(':')),
- s.length === 2 && ((i[s[0]] = s[1].trim()), (a += 1));
- if (a === 0) throw new Error();
- return i;
- }
- return function (t) {
- for (var r = [], i = 0; i < t.length; i += 1) {
- var s = t[i],
- a = { time: s.tm, duration: s.dr };
- try {
- a.payload = JSON.parse(t[i].cm);
- } catch (o) {
- try {
- a.payload = e(t[i].cm);
- } catch (n) {
- a.payload = { name: t[i].cm };
- }
- }
- r.push(a);
- }
- return r;
- };
- })(),
- ProjectInterface = (function () {
- function e(t) {
- this.compositions.push(t);
- }
- return function () {
- function t(r) {
- for (var i = 0, s = this.compositions.length; i < s; ) {
- if (
- this.compositions[i].data &&
- this.compositions[i].data.nm === r
- )
- return (
- this.compositions[i].prepareFrame &&
- this.compositions[i].data.xt &&
- this.compositions[i].prepareFrame(this.currentFrame),
- this.compositions[i].compInterface
- );
- i += 1;
- }
- return null;
- }
- return (
- (t.compositions = []),
- (t.currentFrame = 0),
- (t.registerComposition = e),
- t
- );
- };
- })(),
- renderers = {},
- registerRenderer = function (t, r) {
- renderers[t] = r;
- };
- function getRenderer(e) {
- return renderers[e];
- }
- function getRegisteredRenderer() {
- if (renderers.canvas) return 'canvas';
- for (var e in renderers) if (renderers[e]) return e;
- return '';
- }
- function _typeof$4(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof$4 = function (r) {
- return typeof r;
- })
- : (_typeof$4 = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof$4(e)
- );
- }
- var AnimationItem = function () {
- (this._cbs = []),
- (this.name = ''),
- (this.path = ''),
- (this.isLoaded = !1),
- (this.currentFrame = 0),
- (this.currentRawFrame = 0),
- (this.firstFrame = 0),
- (this.totalFrames = 0),
- (this.frameRate = 0),
- (this.frameMult = 0),
- (this.playSpeed = 1),
- (this.playDirection = 1),
- (this.playCount = 0),
- (this.animationData = {}),
- (this.assets = []),
- (this.isPaused = !0),
- (this.autoplay = !1),
- (this.loop = !0),
- (this.renderer = null),
- (this.animationID = createElementID()),
- (this.assetsPath = ''),
- (this.timeCompleted = 0),
- (this.segmentPos = 0),
- (this.isSubframeEnabled = getSubframeEnabled()),
- (this.segments = []),
- (this._idle = !0),
- (this._completedLoop = !1),
- (this.projectInterface = ProjectInterface()),
- (this.imagePreloader = new ImagePreloader()),
- (this.audioController = audioControllerFactory()),
- (this.markers = []),
- (this.configAnimation = this.configAnimation.bind(this)),
- (this.onSetupError = this.onSetupError.bind(this)),
- (this.onSegmentComplete = this.onSegmentComplete.bind(this)),
- (this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0)),
- (this.expressionsPlugin = getExpressionsPlugin());
- };
- extendPrototype([BaseEvent], AnimationItem),
- (AnimationItem.prototype.setParams = function (e) {
- (e.wrapper || e.container) &&
- (this.wrapper = e.wrapper || e.container);
- var t = 'svg';
- e.animType ? (t = e.animType) : e.renderer && (t = e.renderer);
- var r = getRenderer(t);
- (this.renderer = new r(this, e.rendererSettings)),
- this.imagePreloader.setCacheType(t, this.renderer.globalData.defs),
- this.renderer.setProjectInterface(this.projectInterface),
- (this.animType = t),
- e.loop === '' ||
- e.loop === null ||
- e.loop === void 0 ||
- e.loop === !0
- ? (this.loop = !0)
- : e.loop === !1
- ? (this.loop = !1)
- : (this.loop = parseInt(e.loop, 10)),
- (this.autoplay = 'autoplay' in e ? e.autoplay : !0),
- (this.name = e.name ? e.name : ''),
- (this.autoloadSegments = Object.prototype.hasOwnProperty.call(
- e,
- 'autoloadSegments'
- )
- ? e.autoloadSegments
- : !0),
- (this.assetsPath = e.assetsPath),
- (this.initialSegment = e.initialSegment),
- e.audioFactory &&
- this.audioController.setAudioFactory(e.audioFactory),
- e.animationData
- ? this.setupAnimation(e.animationData)
- : e.path &&
- (e.path.lastIndexOf('\\') !== -1
- ? (this.path = e.path.substr(0, e.path.lastIndexOf('\\') + 1))
- : (this.path = e.path.substr(0, e.path.lastIndexOf('/') + 1)),
- (this.fileName = e.path.substr(e.path.lastIndexOf('/') + 1)),
- (this.fileName = this.fileName.substr(
- 0,
- this.fileName.lastIndexOf('.json')
- )),
- dataManager.loadAnimation(
- e.path,
- this.configAnimation,
- this.onSetupError
- ));
- }),
- (AnimationItem.prototype.onSetupError = function () {
- this.trigger('data_failed');
- }),
- (AnimationItem.prototype.setupAnimation = function (e) {
- dataManager.completeAnimation(e, this.configAnimation);
- }),
- (AnimationItem.prototype.setData = function (e, t) {
- t && _typeof$4(t) !== 'object' && (t = JSON.parse(t));
- var r = { wrapper: e, animationData: t },
- i = e.attributes;
- (r.path = i.getNamedItem('data-animation-path')
- ? i.getNamedItem('data-animation-path').value
- : i.getNamedItem('data-bm-path')
- ? i.getNamedItem('data-bm-path').value
- : i.getNamedItem('bm-path')
- ? i.getNamedItem('bm-path').value
- : ''),
- (r.animType = i.getNamedItem('data-anim-type')
- ? i.getNamedItem('data-anim-type').value
- : i.getNamedItem('data-bm-type')
- ? i.getNamedItem('data-bm-type').value
- : i.getNamedItem('bm-type')
- ? i.getNamedItem('bm-type').value
- : i.getNamedItem('data-bm-renderer')
- ? i.getNamedItem('data-bm-renderer').value
- : i.getNamedItem('bm-renderer')
- ? i.getNamedItem('bm-renderer').value
- : getRegisteredRenderer() || 'canvas');
- var s = i.getNamedItem('data-anim-loop')
- ? i.getNamedItem('data-anim-loop').value
- : i.getNamedItem('data-bm-loop')
- ? i.getNamedItem('data-bm-loop').value
- : i.getNamedItem('bm-loop')
- ? i.getNamedItem('bm-loop').value
- : '';
- s === 'false'
- ? (r.loop = !1)
- : s === 'true'
- ? (r.loop = !0)
- : s !== '' && (r.loop = parseInt(s, 10));
- var a = i.getNamedItem('data-anim-autoplay')
- ? i.getNamedItem('data-anim-autoplay').value
- : i.getNamedItem('data-bm-autoplay')
- ? i.getNamedItem('data-bm-autoplay').value
- : i.getNamedItem('bm-autoplay')
- ? i.getNamedItem('bm-autoplay').value
- : !0;
- (r.autoplay = a !== 'false'),
- (r.name = i.getNamedItem('data-name')
- ? i.getNamedItem('data-name').value
- : i.getNamedItem('data-bm-name')
- ? i.getNamedItem('data-bm-name').value
- : i.getNamedItem('bm-name')
- ? i.getNamedItem('bm-name').value
- : '');
- var o = i.getNamedItem('data-anim-prerender')
- ? i.getNamedItem('data-anim-prerender').value
- : i.getNamedItem('data-bm-prerender')
- ? i.getNamedItem('data-bm-prerender').value
- : i.getNamedItem('bm-prerender')
- ? i.getNamedItem('bm-prerender').value
- : '';
- o === 'false' && (r.prerender = !1),
- r.path ? this.setParams(r) : this.trigger('destroy');
- }),
- (AnimationItem.prototype.includeLayers = function (e) {
- e.op > this.animationData.op &&
- ((this.animationData.op = e.op),
- (this.totalFrames = Math.floor(e.op - this.animationData.ip)));
- var t = this.animationData.layers,
- r,
- i = t.length,
- s = e.layers,
- a,
- o = s.length;
- for (a = 0; a < o; a += 1)
- for (r = 0; r < i; ) {
- if (t[r].id === s[a].id) {
- t[r] = s[a];
- break;
- }
- r += 1;
- }
- if (
- ((e.chars || e.fonts) &&
- (this.renderer.globalData.fontManager.addChars(e.chars),
- this.renderer.globalData.fontManager.addFonts(
- e.fonts,
- this.renderer.globalData.defs
- )),
- e.assets)
- )
- for (i = e.assets.length, r = 0; r < i; r += 1)
- this.animationData.assets.push(e.assets[r]);
- (this.animationData.__complete = !1),
- dataManager.completeAnimation(
- this.animationData,
- this.onSegmentComplete
- );
- }),
- (AnimationItem.prototype.onSegmentComplete = function (e) {
- this.animationData = e;
- var t = getExpressionsPlugin();
- t && t.initExpressions(this), this.loadNextSegment();
- }),
- (AnimationItem.prototype.loadNextSegment = function () {
- var e = this.animationData.segments;
- if (!e || e.length === 0 || !this.autoloadSegments) {
- this.trigger('data_ready'), (this.timeCompleted = this.totalFrames);
- return;
- }
- var t = e.shift();
- this.timeCompleted = t.time * this.frameRate;
- var r = this.path + this.fileName + '_' + this.segmentPos + '.json';
- (this.segmentPos += 1),
- dataManager.loadData(
- r,
- this.includeLayers.bind(this),
- function () {
- this.trigger('data_failed');
- }.bind(this)
- );
- }),
- (AnimationItem.prototype.loadSegments = function () {
- var e = this.animationData.segments;
- e || (this.timeCompleted = this.totalFrames), this.loadNextSegment();
- }),
- (AnimationItem.prototype.imagesLoaded = function () {
- this.trigger('loaded_images'), this.checkLoaded();
- }),
- (AnimationItem.prototype.preloadImages = function () {
- this.imagePreloader.setAssetsPath(this.assetsPath),
- this.imagePreloader.setPath(this.path),
- this.imagePreloader.loadAssets(
- this.animationData.assets,
- this.imagesLoaded.bind(this)
- );
- }),
- (AnimationItem.prototype.configAnimation = function (e) {
- if (this.renderer)
- try {
- (this.animationData = e),
- this.initialSegment
- ? ((this.totalFrames = Math.floor(
- this.initialSegment[1] - this.initialSegment[0]
- )),
- (this.firstFrame = Math.round(this.initialSegment[0])))
- : ((this.totalFrames = Math.floor(
- this.animationData.op - this.animationData.ip
- )),
- (this.firstFrame = Math.round(this.animationData.ip))),
- this.renderer.configAnimation(e),
- e.assets || (e.assets = []),
- (this.assets = this.animationData.assets),
- (this.frameRate = this.animationData.fr),
- (this.frameMult = this.animationData.fr / 1e3),
- this.renderer.searchExtraCompositions(e.assets),
- (this.markers = markerParser(e.markers || [])),
- this.trigger('config_ready'),
- this.preloadImages(),
- this.loadSegments(),
- this.updaFrameModifier(),
- this.waitForFontsLoaded(),
- this.isPaused && this.audioController.pause();
- } catch (t) {
- this.triggerConfigError(t);
- }
- }),
- (AnimationItem.prototype.waitForFontsLoaded = function () {
- this.renderer &&
- (this.renderer.globalData.fontManager.isLoaded
- ? this.checkLoaded()
- : setTimeout(this.waitForFontsLoaded.bind(this), 20));
- }),
- (AnimationItem.prototype.checkLoaded = function () {
- if (
- !this.isLoaded &&
- this.renderer.globalData.fontManager.isLoaded &&
- (this.imagePreloader.loadedImages() ||
- this.renderer.rendererType !== 'canvas') &&
- this.imagePreloader.loadedFootages()
- ) {
- this.isLoaded = !0;
- var e = getExpressionsPlugin();
- e && e.initExpressions(this),
- this.renderer.initItems(),
- setTimeout(
- function () {
- this.trigger('DOMLoaded');
- }.bind(this),
- 0
- ),
- this.gotoFrame(),
- this.autoplay && this.play();
- }
- }),
- (AnimationItem.prototype.resize = function (e, t) {
- var r = typeof e == 'number' ? e : void 0,
- i = typeof t == 'number' ? t : void 0;
- this.renderer.updateContainerSize(r, i);
- }),
- (AnimationItem.prototype.setSubframe = function (e) {
- this.isSubframeEnabled = !!e;
- }),
- (AnimationItem.prototype.gotoFrame = function () {
- (this.currentFrame = this.isSubframeEnabled
- ? this.currentRawFrame
- : ~~this.currentRawFrame),
- this.timeCompleted !== this.totalFrames &&
- this.currentFrame > this.timeCompleted &&
- (this.currentFrame = this.timeCompleted),
- this.trigger('enterFrame'),
- this.renderFrame(),
- this.trigger('drawnFrame');
- }),
- (AnimationItem.prototype.renderFrame = function () {
- if (!(this.isLoaded === !1 || !this.renderer))
- try {
- this.expressionsPlugin && this.expressionsPlugin.resetFrame(),
- this.renderer.renderFrame(this.currentFrame + this.firstFrame);
- } catch (e) {
- this.triggerRenderFrameError(e);
- }
- }),
- (AnimationItem.prototype.play = function (e) {
- (e && this.name !== e) ||
- (this.isPaused === !0 &&
- ((this.isPaused = !1),
- this.trigger('_play'),
- this.audioController.resume(),
- this._idle && ((this._idle = !1), this.trigger('_active'))));
- }),
- (AnimationItem.prototype.pause = function (e) {
- (e && this.name !== e) ||
- (this.isPaused === !1 &&
- ((this.isPaused = !0),
- this.trigger('_pause'),
- (this._idle = !0),
- this.trigger('_idle'),
- this.audioController.pause()));
- }),
- (AnimationItem.prototype.togglePause = function (e) {
- (e && this.name !== e) ||
- (this.isPaused === !0 ? this.play() : this.pause());
- }),
- (AnimationItem.prototype.stop = function (e) {
- (e && this.name !== e) ||
- (this.pause(),
- (this.playCount = 0),
- (this._completedLoop = !1),
- this.setCurrentRawFrameValue(0));
- }),
- (AnimationItem.prototype.getMarkerData = function (e) {
- for (var t, r = 0; r < this.markers.length; r += 1)
- if (((t = this.markers[r]), t.payload && t.payload.name === e))
- return t;
- return null;
- }),
- (AnimationItem.prototype.goToAndStop = function (e, t, r) {
- if (!(r && this.name !== r)) {
- var i = Number(e);
- if (isNaN(i)) {
- var s = this.getMarkerData(e);
- s && this.goToAndStop(s.time, !0);
- } else
- t
- ? this.setCurrentRawFrameValue(e)
- : this.setCurrentRawFrameValue(e * this.frameModifier);
- this.pause();
- }
- }),
- (AnimationItem.prototype.goToAndPlay = function (e, t, r) {
- if (!(r && this.name !== r)) {
- var i = Number(e);
- if (isNaN(i)) {
- var s = this.getMarkerData(e);
- s &&
- (s.duration
- ? this.playSegments([s.time, s.time + s.duration], !0)
- : this.goToAndStop(s.time, !0));
- } else this.goToAndStop(i, t, r);
- this.play();
- }
- }),
- (AnimationItem.prototype.advanceTime = function (e) {
- if (!(this.isPaused === !0 || this.isLoaded === !1)) {
- var t = this.currentRawFrame + e * this.frameModifier,
- r = !1;
- t >= this.totalFrames - 1 && this.frameModifier > 0
- ? !this.loop || this.playCount === this.loop
- ? this.checkSegments(
- t > this.totalFrames ? t % this.totalFrames : 0
- ) || ((r = !0), (t = this.totalFrames - 1))
- : t >= this.totalFrames
- ? ((this.playCount += 1),
- this.checkSegments(t % this.totalFrames) ||
- (this.setCurrentRawFrameValue(t % this.totalFrames),
- (this._completedLoop = !0),
- this.trigger('loopComplete')))
- : this.setCurrentRawFrameValue(t)
- : t < 0
- ? this.checkSegments(t % this.totalFrames) ||
- (this.loop && !(this.playCount-- <= 0 && this.loop !== !0)
- ? (this.setCurrentRawFrameValue(
- this.totalFrames + (t % this.totalFrames)
- ),
- this._completedLoop
- ? this.trigger('loopComplete')
- : (this._completedLoop = !0))
- : ((r = !0), (t = 0)))
- : this.setCurrentRawFrameValue(t),
- r &&
- (this.setCurrentRawFrameValue(t),
- this.pause(),
- this.trigger('complete'));
- }
- }),
- (AnimationItem.prototype.adjustSegment = function (e, t) {
- (this.playCount = 0),
- e[1] < e[0]
- ? (this.frameModifier > 0 &&
- (this.playSpeed < 0
- ? this.setSpeed(-this.playSpeed)
- : this.setDirection(-1)),
- (this.totalFrames = e[0] - e[1]),
- (this.timeCompleted = this.totalFrames),
- (this.firstFrame = e[1]),
- this.setCurrentRawFrameValue(this.totalFrames - 0.001 - t))
- : e[1] > e[0] &&
- (this.frameModifier < 0 &&
- (this.playSpeed < 0
- ? this.setSpeed(-this.playSpeed)
- : this.setDirection(1)),
- (this.totalFrames = e[1] - e[0]),
- (this.timeCompleted = this.totalFrames),
- (this.firstFrame = e[0]),
- this.setCurrentRawFrameValue(0.001 + t)),
- this.trigger('segmentStart');
- }),
- (AnimationItem.prototype.setSegment = function (e, t) {
- var r = -1;
- this.isPaused &&
- (this.currentRawFrame + this.firstFrame < e
- ? (r = e)
- : this.currentRawFrame + this.firstFrame > t && (r = t - e)),
- (this.firstFrame = e),
- (this.totalFrames = t - e),
- (this.timeCompleted = this.totalFrames),
- r !== -1 && this.goToAndStop(r, !0);
- }),
- (AnimationItem.prototype.playSegments = function (e, t) {
- if ((t && (this.segments.length = 0), _typeof$4(e[0]) === 'object')) {
- var r,
- i = e.length;
- for (r = 0; r < i; r += 1) this.segments.push(e[r]);
- } else this.segments.push(e);
- this.segments.length &&
- t &&
- this.adjustSegment(this.segments.shift(), 0),
- this.isPaused && this.play();
- }),
- (AnimationItem.prototype.resetSegments = function (e) {
- (this.segments.length = 0),
- this.segments.push([this.animationData.ip, this.animationData.op]),
- e && this.checkSegments(0);
- }),
- (AnimationItem.prototype.checkSegments = function (e) {
- return this.segments.length
- ? (this.adjustSegment(this.segments.shift(), e), !0)
- : !1;
- }),
- (AnimationItem.prototype.destroy = function (e) {
- (e && this.name !== e) ||
- !this.renderer ||
- (this.renderer.destroy(),
- this.imagePreloader.destroy(),
- this.trigger('destroy'),
- (this._cbs = null),
- (this.onEnterFrame = null),
- (this.onLoopComplete = null),
- (this.onComplete = null),
- (this.onSegmentStart = null),
- (this.onDestroy = null),
- (this.renderer = null),
- (this.expressionsPlugin = null),
- (this.imagePreloader = null),
- (this.projectInterface = null));
- }),
- (AnimationItem.prototype.setCurrentRawFrameValue = function (e) {
- (this.currentRawFrame = e), this.gotoFrame();
- }),
- (AnimationItem.prototype.setSpeed = function (e) {
- (this.playSpeed = e), this.updaFrameModifier();
- }),
- (AnimationItem.prototype.setDirection = function (e) {
- (this.playDirection = e < 0 ? -1 : 1), this.updaFrameModifier();
- }),
- (AnimationItem.prototype.setLoop = function (e) {
- this.loop = e;
- }),
- (AnimationItem.prototype.setVolume = function (e, t) {
- (t && this.name !== t) || this.audioController.setVolume(e);
- }),
- (AnimationItem.prototype.getVolume = function () {
- return this.audioController.getVolume();
- }),
- (AnimationItem.prototype.mute = function (e) {
- (e && this.name !== e) || this.audioController.mute();
- }),
- (AnimationItem.prototype.unmute = function (e) {
- (e && this.name !== e) || this.audioController.unmute();
- }),
- (AnimationItem.prototype.updaFrameModifier = function () {
- (this.frameModifier =
- this.frameMult * this.playSpeed * this.playDirection),
- this.audioController.setRate(this.playSpeed * this.playDirection);
- }),
- (AnimationItem.prototype.getPath = function () {
- return this.path;
- }),
- (AnimationItem.prototype.getAssetsPath = function (e) {
- var t = '';
- if (e.e) t = e.p;
- else if (this.assetsPath) {
- var r = e.p;
- r.indexOf('images/') !== -1 && (r = r.split('/')[1]),
- (t = this.assetsPath + r);
- } else (t = this.path), (t += e.u ? e.u : ''), (t += e.p);
- return t;
- }),
- (AnimationItem.prototype.getAssetData = function (e) {
- for (var t = 0, r = this.assets.length; t < r; ) {
- if (e === this.assets[t].id) return this.assets[t];
- t += 1;
- }
- return null;
- }),
- (AnimationItem.prototype.hide = function () {
- this.renderer.hide();
- }),
- (AnimationItem.prototype.show = function () {
- this.renderer.show();
- }),
- (AnimationItem.prototype.getDuration = function (e) {
- return e ? this.totalFrames : this.totalFrames / this.frameRate;
- }),
- (AnimationItem.prototype.updateDocumentData = function (e, t, r) {
- try {
- var i = this.renderer.getElementByPath(e);
- i.updateDocumentData(t, r);
- } catch (s) {}
- }),
- (AnimationItem.prototype.trigger = function (e) {
- if (this._cbs && this._cbs[e])
- switch (e) {
- case 'enterFrame':
- this.triggerEvent(
- e,
- new BMEnterFrameEvent(
- e,
- this.currentFrame,
- this.totalFrames,
- this.frameModifier
- )
- );
- break;
- case 'drawnFrame':
- (this.drawnFrameEvent.currentTime = this.currentFrame),
- (this.drawnFrameEvent.totalTime = this.totalFrames),
- (this.drawnFrameEvent.direction = this.frameModifier),
- this.triggerEvent(e, this.drawnFrameEvent);
- break;
- case 'loopComplete':
- this.triggerEvent(
- e,
- new BMCompleteLoopEvent(
- e,
- this.loop,
- this.playCount,
- this.frameMult
- )
- );
- break;
- case 'complete':
- this.triggerEvent(e, new BMCompleteEvent(e, this.frameMult));
- break;
- case 'segmentStart':
- this.triggerEvent(
- e,
- new BMSegmentStartEvent(e, this.firstFrame, this.totalFrames)
- );
- break;
- case 'destroy':
- this.triggerEvent(e, new BMDestroyEvent(e, this));
- break;
- default:
- this.triggerEvent(e);
- }
- e === 'enterFrame' &&
- this.onEnterFrame &&
- this.onEnterFrame.call(
- this,
- new BMEnterFrameEvent(
- e,
- this.currentFrame,
- this.totalFrames,
- this.frameMult
- )
- ),
- e === 'loopComplete' &&
- this.onLoopComplete &&
- this.onLoopComplete.call(
- this,
- new BMCompleteLoopEvent(
- e,
- this.loop,
- this.playCount,
- this.frameMult
- )
- ),
- e === 'complete' &&
- this.onComplete &&
- this.onComplete.call(
- this,
- new BMCompleteEvent(e, this.frameMult)
- ),
- e === 'segmentStart' &&
- this.onSegmentStart &&
- this.onSegmentStart.call(
- this,
- new BMSegmentStartEvent(e, this.firstFrame, this.totalFrames)
- ),
- e === 'destroy' &&
- this.onDestroy &&
- this.onDestroy.call(this, new BMDestroyEvent(e, this));
- }),
- (AnimationItem.prototype.triggerRenderFrameError = function (e) {
- var t = new BMRenderFrameErrorEvent(e, this.currentFrame);
- this.triggerEvent('error', t),
- this.onError && this.onError.call(this, t);
- }),
- (AnimationItem.prototype.triggerConfigError = function (e) {
- var t = new BMConfigErrorEvent(e, this.currentFrame);
- this.triggerEvent('error', t),
- this.onError && this.onError.call(this, t);
- });
- var animationManager = (function () {
- var e = {},
- t = [],
- r = 0,
- i = 0,
- s = 0,
- a = !0,
- o = !1;
- function n(M) {
- for (var k = 0, b = M.target; k < i; )
- t[k].animation === b &&
- (t.splice(k, 1), (k -= 1), (i -= 1), b.isPaused || S()),
- (k += 1);
- }
- function l(M, k) {
- if (!M) return null;
- for (var b = 0; b < i; ) {
- if (t[b].elem === M && t[b].elem !== null) return t[b].animation;
- b += 1;
- }
- var C = new AnimationItem();
- return c(C, M), C.setData(M, k), C;
- }
- function f() {
- var M,
- k = t.length,
- b = [];
- for (M = 0; M < k; M += 1) b.push(t[M].animation);
- return b;
- }
- function g() {
- (s += 1), z();
- }
- function S() {
- s -= 1;
- }
- function c(M, k) {
- M.addEventListener('destroy', n),
- M.addEventListener('_active', g),
- M.addEventListener('_idle', S),
- t.push({ elem: k, animation: M }),
- (i += 1);
- }
- function P(M) {
- var k = new AnimationItem();
- return c(k, null), k.setParams(M), k;
- }
- function d(M, k) {
- var b;
- for (b = 0; b < i; b += 1) t[b].animation.setSpeed(M, k);
- }
- function p(M, k) {
- var b;
- for (b = 0; b < i; b += 1) t[b].animation.setDirection(M, k);
- }
- function x(M) {
- var k;
- for (k = 0; k < i; k += 1) t[k].animation.play(M);
- }
- function u(M) {
- var k = M - r,
- b;
- for (b = 0; b < i; b += 1) t[b].animation.advanceTime(k);
- (r = M), s && !o ? window.requestAnimationFrame(u) : (a = !0);
- }
- function y(M) {
- (r = M), window.requestAnimationFrame(u);
- }
- function m(M) {
- var k;
- for (k = 0; k < i; k += 1) t[k].animation.pause(M);
- }
- function A(M, k, b) {
- var C;
- for (C = 0; C < i; C += 1) t[C].animation.goToAndStop(M, k, b);
- }
- function T(M) {
- var k;
- for (k = 0; k < i; k += 1) t[k].animation.stop(M);
- }
- function E(M) {
- var k;
- for (k = 0; k < i; k += 1) t[k].animation.togglePause(M);
- }
- function _(M) {
- var k;
- for (k = i - 1; k >= 0; k -= 1) t[k].animation.destroy(M);
- }
- function I(M, k, b) {
- var C = [].concat(
- [].slice.call(document.getElementsByClassName('lottie')),
- [].slice.call(document.getElementsByClassName('bodymovin'))
- ),
- L,
- F = C.length;
- for (L = 0; L < F; L += 1)
- b && C[L].setAttribute('data-bm-type', b), l(C[L], M);
- if (k && F === 0) {
- b || (b = 'svg');
- var U = document.getElementsByTagName('body')[0];
- U.innerText = '';
- var D = createTag('div');
- (D.style.width = '100%'),
- (D.style.height = '100%'),
- D.setAttribute('data-bm-type', b),
- U.appendChild(D),
- l(D, M);
- }
- }
- function B() {
- var M;
- for (M = 0; M < i; M += 1) t[M].animation.resize();
- }
- function z() {
- !o && s && a && (window.requestAnimationFrame(y), (a = !1));
- }
- function G() {
- o = !0;
- }
- function R() {
- (o = !1), z();
- }
- function W(M, k) {
- var b;
- for (b = 0; b < i; b += 1) t[b].animation.setVolume(M, k);
- }
- function H(M) {
- var k;
- for (k = 0; k < i; k += 1) t[k].animation.mute(M);
- }
- function N(M) {
- var k;
- for (k = 0; k < i; k += 1) t[k].animation.unmute(M);
- }
- return (
- (e.registerAnimation = l),
- (e.loadAnimation = P),
- (e.setSpeed = d),
- (e.setDirection = p),
- (e.play = x),
- (e.pause = m),
- (e.stop = T),
- (e.togglePause = E),
- (e.searchAnimations = I),
- (e.resize = B),
- (e.goToAndStop = A),
- (e.destroy = _),
- (e.freeze = G),
- (e.unfreeze = R),
- (e.setVolume = W),
- (e.mute = H),
- (e.unmute = N),
- (e.getRegisteredAnimations = f),
- e
- );
- })(),
- BezierFactory = (function () {
- var e = {};
- e.getBezierEasing = r;
- var t = {};
- function r(y, m, A, T, E) {
- var _ =
- E ||
- ('bez_' + y + '_' + m + '_' + A + '_' + T).replace(/\./g, 'p');
- if (t[_]) return t[_];
- var I = new u([y, m, A, T]);
- return (t[_] = I), I;
- }
- var i = 4,
- s = 0.001,
- a = 1e-7,
- o = 10,
- n = 11,
- l = 1 / (n - 1),
- f = typeof Float32Array == 'function';
- function g(y, m) {
- return 1 - 3 * m + 3 * y;
- }
- function S(y, m) {
- return 3 * m - 6 * y;
- }
- function c(y) {
- return 3 * y;
- }
- function P(y, m, A) {
- return ((g(m, A) * y + S(m, A)) * y + c(m)) * y;
- }
- function d(y, m, A) {
- return 3 * g(m, A) * y * y + 2 * S(m, A) * y + c(m);
- }
- function p(y, m, A, T, E) {
- var _,
- I,
- B = 0;
- do
- (I = m + (A - m) / 2),
- (_ = P(I, T, E) - y),
- _ > 0 ? (A = I) : (m = I);
- while (Math.abs(_) > a && ++B < o);
- return I;
- }
- function x(y, m, A, T) {
- for (var E = 0; E < i; ++E) {
- var _ = d(m, A, T);
- if (_ === 0) return m;
- var I = P(m, A, T) - y;
- m -= I / _;
- }
- return m;
- }
- function u(y) {
- (this._p = y),
- (this._mSampleValues = f ? new Float32Array(n) : new Array(n)),
- (this._precomputed = !1),
- (this.get = this.get.bind(this));
- }
- return (
- (u.prototype = {
- get: function (m) {
- var A = this._p[0],
- T = this._p[1],
- E = this._p[2],
- _ = this._p[3];
- return (
- this._precomputed || this._precompute(),
- A === T && E === _
- ? m
- : m === 0
- ? 0
- : m === 1
- ? 1
- : P(this._getTForX(m), T, _)
- );
- },
- _precompute: function () {
- var m = this._p[0],
- A = this._p[1],
- T = this._p[2],
- E = this._p[3];
- (this._precomputed = !0),
- (m !== A || T !== E) && this._calcSampleValues();
- },
- _calcSampleValues: function () {
- for (var m = this._p[0], A = this._p[2], T = 0; T < n; ++T)
- this._mSampleValues[T] = P(T * l, m, A);
- },
- _getTForX: function (m) {
- for (
- var A = this._p[0],
- T = this._p[2],
- E = this._mSampleValues,
- _ = 0,
- I = 1,
- B = n - 1;
- I !== B && E[I] <= m;
- ++I
- )
- _ += l;
- --I;
- var z = (m - E[I]) / (E[I + 1] - E[I]),
- G = _ + z * l,
- R = d(G, A, T);
- return R >= s
- ? x(m, G, A, T)
- : R === 0
- ? G
- : p(m, _, _ + l, A, T);
- }
- }),
- e
- );
- })(),
- pooling = (function () {
- function e(t) {
- return t.concat(createSizedArray(t.length));
- }
- return { double: e };
- })(),
- poolFactory = (function () {
- return function (e, t, r) {
- var i = 0,
- s = e,
- a = createSizedArray(s),
- o = { newElement: n, release: l };
- function n() {
- var f;
- return i ? ((i -= 1), (f = a[i])) : (f = t()), f;
- }
- function l(f) {
- i === s && ((a = pooling.double(a)), (s *= 2)),
- r && r(f),
- (a[i] = f),
- (i += 1);
- }
- return o;
- };
- })(),
- bezierLengthPool = (function () {
- function e() {
- return {
- addedLength: 0,
- percents: createTypedArray('float32', getDefaultCurveSegments()),
- lengths: createTypedArray('float32', getDefaultCurveSegments())
- };
- }
- return poolFactory(8, e);
- })(),
- segmentsLengthPool = (function () {
- function e() {
- return { lengths: [], totalLength: 0 };
- }
- function t(r) {
- var i,
- s = r.lengths.length;
- for (i = 0; i < s; i += 1) bezierLengthPool.release(r.lengths[i]);
- r.lengths.length = 0;
- }
- return poolFactory(8, e, t);
- })();
- function bezFunction() {
- var e = Math;
- function t(c, P, d, p, x, u) {
- var y = c * p + P * x + d * u - x * p - u * c - d * P;
- return y > -0.001 && y < 0.001;
- }
- function r(c, P, d, p, x, u, y, m, A) {
- if (d === 0 && u === 0 && A === 0) return t(c, P, p, x, y, m);
- var T = e.sqrt(e.pow(p - c, 2) + e.pow(x - P, 2) + e.pow(u - d, 2)),
- E = e.sqrt(e.pow(y - c, 2) + e.pow(m - P, 2) + e.pow(A - d, 2)),
- _ = e.sqrt(e.pow(y - p, 2) + e.pow(m - x, 2) + e.pow(A - u, 2)),
- I;
- return (
- T > E
- ? T > _
- ? (I = T - E - _)
- : (I = _ - E - T)
- : _ > E
- ? (I = _ - E - T)
- : (I = E - T - _),
- I > -1e-4 && I < 1e-4
- );
- }
- var i = (function () {
- return function (c, P, d, p) {
- var x = getDefaultCurveSegments(),
- u,
- y,
- m,
- A,
- T,
- E = 0,
- _,
- I = [],
- B = [],
- z = bezierLengthPool.newElement();
- for (m = d.length, u = 0; u < x; u += 1) {
- for (T = u / (x - 1), _ = 0, y = 0; y < m; y += 1)
- (A =
- bmPow(1 - T, 3) * c[y] +
- 3 * bmPow(1 - T, 2) * T * d[y] +
- 3 * (1 - T) * bmPow(T, 2) * p[y] +
- bmPow(T, 3) * P[y]),
- (I[y] = A),
- B[y] !== null && (_ += bmPow(I[y] - B[y], 2)),
- (B[y] = I[y]);
- _ && ((_ = bmSqrt(_)), (E += _)),
- (z.percents[u] = T),
- (z.lengths[u] = E);
- }
- return (z.addedLength = E), z;
- };
- })();
- function s(c) {
- var P = segmentsLengthPool.newElement(),
- d = c.c,
- p = c.v,
- x = c.o,
- u = c.i,
- y,
- m = c._length,
- A = P.lengths,
- T = 0;
- for (y = 0; y < m - 1; y += 1)
- (A[y] = i(p[y], p[y + 1], x[y], u[y + 1])), (T += A[y].addedLength);
- return (
- d &&
- m &&
- ((A[y] = i(p[y], p[0], x[y], u[0])), (T += A[y].addedLength)),
- (P.totalLength = T),
- P
- );
- }
- function a(c) {
- (this.segmentLength = 0), (this.points = new Array(c));
- }
- function o(c, P) {
- (this.partialLength = c), (this.point = P);
- }
- var n = (function () {
- var c = {};
- return function (P, d, p, x) {
- var u = (
- P[0] +
- '_' +
- P[1] +
- '_' +
- d[0] +
- '_' +
- d[1] +
- '_' +
- p[0] +
- '_' +
- p[1] +
- '_' +
- x[0] +
- '_' +
- x[1]
- ).replace(/\./g, 'p');
- if (!c[u]) {
- var y = getDefaultCurveSegments(),
- m,
- A,
- T,
- E,
- _,
- I = 0,
- B,
- z,
- G = null;
- P.length === 2 &&
- (P[0] !== d[0] || P[1] !== d[1]) &&
- t(P[0], P[1], d[0], d[1], P[0] + p[0], P[1] + p[1]) &&
- t(P[0], P[1], d[0], d[1], d[0] + x[0], d[1] + x[1]) &&
- (y = 2);
- var R = new a(y);
- for (T = p.length, m = 0; m < y; m += 1) {
- for (
- z = createSizedArray(T), _ = m / (y - 1), B = 0, A = 0;
- A < T;
- A += 1
- )
- (E =
- bmPow(1 - _, 3) * P[A] +
- 3 * bmPow(1 - _, 2) * _ * (P[A] + p[A]) +
- 3 * (1 - _) * bmPow(_, 2) * (d[A] + x[A]) +
- bmPow(_, 3) * d[A]),
- (z[A] = E),
- G !== null && (B += bmPow(z[A] - G[A], 2));
- (B = bmSqrt(B)), (I += B), (R.points[m] = new o(B, z)), (G = z);
- }
- (R.segmentLength = I), (c[u] = R);
- }
- return c[u];
- };
- })();
- function l(c, P) {
- var d = P.percents,
- p = P.lengths,
- x = d.length,
- u = bmFloor((x - 1) * c),
- y = c * P.addedLength,
- m = 0;
- if (u === x - 1 || u === 0 || y === p[u]) return d[u];
- for (var A = p[u] > y ? -1 : 1, T = !0; T; )
- if (
- (p[u] <= y && p[u + 1] > y
- ? ((m = (y - p[u]) / (p[u + 1] - p[u])), (T = !1))
- : (u += A),
- u < 0 || u >= x - 1)
- ) {
- if (u === x - 1) return d[u];
- T = !1;
- }
- return d[u] + (d[u + 1] - d[u]) * m;
- }
- function f(c, P, d, p, x, u) {
- var y = l(x, u),
- m = 1 - y,
- A =
- e.round(
- (m * m * m * c[0] +
- (y * m * m + m * y * m + m * m * y) * d[0] +
- (y * y * m + m * y * y + y * m * y) * p[0] +
- y * y * y * P[0]) *
- 1e3
- ) / 1e3,
- T =
- e.round(
- (m * m * m * c[1] +
- (y * m * m + m * y * m + m * m * y) * d[1] +
- (y * y * m + m * y * y + y * m * y) * p[1] +
- y * y * y * P[1]) *
- 1e3
- ) / 1e3;
- return [A, T];
- }
- var g = createTypedArray('float32', 8);
- function S(c, P, d, p, x, u, y) {
- x < 0 ? (x = 0) : x > 1 && (x = 1);
- var m = l(x, y);
- u = u > 1 ? 1 : u;
- var A = l(u, y),
- T,
- E = c.length,
- _ = 1 - m,
- I = 1 - A,
- B = _ * _ * _,
- z = m * _ * _ * 3,
- G = m * m * _ * 3,
- R = m * m * m,
- W = _ * _ * I,
- H = m * _ * I + _ * m * I + _ * _ * A,
- N = m * m * I + _ * m * A + m * _ * A,
- M = m * m * A,
- k = _ * I * I,
- b = m * I * I + _ * A * I + _ * I * A,
- C = m * A * I + _ * A * A + m * I * A,
- L = m * A * A,
- F = I * I * I,
- U = A * I * I + I * A * I + I * I * A,
- D = A * A * I + I * A * A + A * I * A,
- V = A * A * A;
- for (T = 0; T < E; T += 1)
- (g[T * 4] =
- e.round((B * c[T] + z * d[T] + G * p[T] + R * P[T]) * 1e3) / 1e3),
- (g[T * 4 + 1] =
- e.round((W * c[T] + H * d[T] + N * p[T] + M * P[T]) * 1e3) /
- 1e3),
- (g[T * 4 + 2] =
- e.round((k * c[T] + b * d[T] + C * p[T] + L * P[T]) * 1e3) /
- 1e3),
- (g[T * 4 + 3] =
- e.round((F * c[T] + U * d[T] + D * p[T] + V * P[T]) * 1e3) /
- 1e3);
- return g;
- }
- return {
- getSegmentsLength: s,
- getNewSegment: S,
- getPointInSegment: f,
- buildBezierData: n,
- pointOnLine2D: t,
- pointOnLine3D: r
- };
- }
- var bez = bezFunction(),
- initFrame = initialDefaultFrame,
- mathAbs = Math.abs;
- function interpolateValue(e, t) {
- var r = this.offsetTime,
- i;
- this.propType === 'multidimensional' &&
- (i = createTypedArray('float32', this.pv.length));
- for (
- var s = t.lastIndex,
- a = s,
- o = this.keyframes.length - 1,
- n = !0,
- l,
- f,
- g;
- n;
- ) {
- if (
- ((l = this.keyframes[a]),
- (f = this.keyframes[a + 1]),
- a === o - 1 && e >= f.t - r)
- ) {
- l.h && (l = f), (s = 0);
- break;
- }
- if (f.t - r > e) {
- s = a;
- break;
- }
- a < o - 1 ? (a += 1) : ((s = 0), (n = !1));
- }
- g = this.keyframesMetadata[a] || {};
- var S,
- c,
- P,
- d,
- p,
- x,
- u = f.t - r,
- y = l.t - r,
- m;
- if (l.to) {
- g.bezierData ||
- (g.bezierData = bez.buildBezierData(l.s, f.s || l.e, l.to, l.ti));
- var A = g.bezierData;
- if (e >= u || e < y) {
- var T = e >= u ? A.points.length - 1 : 0;
- for (c = A.points[T].point.length, S = 0; S < c; S += 1)
- i[S] = A.points[T].point[S];
- } else {
- g.__fnct
- ? (x = g.__fnct)
- : ((x = BezierFactory.getBezierEasing(
- l.o.x,
- l.o.y,
- l.i.x,
- l.i.y,
- l.n
- ).get),
- (g.__fnct = x)),
- (P = x((e - y) / (u - y)));
- var E = A.segmentLength * P,
- _,
- I =
- t.lastFrame < e && t._lastKeyframeIndex === a
- ? t._lastAddedLength
- : 0;
- for (
- p =
- t.lastFrame < e && t._lastKeyframeIndex === a
- ? t._lastPoint
- : 0,
- n = !0,
- d = A.points.length;
- n;
- ) {
- if (
- ((I += A.points[p].partialLength),
- E === 0 || P === 0 || p === A.points.length - 1)
- ) {
- for (c = A.points[p].point.length, S = 0; S < c; S += 1)
- i[S] = A.points[p].point[S];
- break;
- } else if (E >= I && E < I + A.points[p + 1].partialLength) {
- for (
- _ = (E - I) / A.points[p + 1].partialLength,
- c = A.points[p].point.length,
- S = 0;
- S < c;
- S += 1
- )
- i[S] =
- A.points[p].point[S] +
- (A.points[p + 1].point[S] - A.points[p].point[S]) * _;
- break;
- }
- p < d - 1 ? (p += 1) : (n = !1);
- }
- (t._lastPoint = p),
- (t._lastAddedLength = I - A.points[p].partialLength),
- (t._lastKeyframeIndex = a);
- }
- } else {
- var B, z, G, R, W;
- if (((o = l.s.length), (m = f.s || l.e), this.sh && l.h !== 1))
- if (e >= u) (i[0] = m[0]), (i[1] = m[1]), (i[2] = m[2]);
- else if (e <= y) (i[0] = l.s[0]), (i[1] = l.s[1]), (i[2] = l.s[2]);
- else {
- var H = createQuaternion(l.s),
- N = createQuaternion(m),
- M = (e - y) / (u - y);
- quaternionToEuler(i, slerp(H, N, M));
- }
- else
- for (a = 0; a < o; a += 1)
- l.h !== 1 &&
- (e >= u
- ? (P = 1)
- : e < y
- ? (P = 0)
- : (l.o.x.constructor === Array
- ? (g.__fnct || (g.__fnct = []),
- g.__fnct[a]
- ? (x = g.__fnct[a])
- : ((B = l.o.x[a] === void 0 ? l.o.x[0] : l.o.x[a]),
- (z = l.o.y[a] === void 0 ? l.o.y[0] : l.o.y[a]),
- (G = l.i.x[a] === void 0 ? l.i.x[0] : l.i.x[a]),
- (R = l.i.y[a] === void 0 ? l.i.y[0] : l.i.y[a]),
- (x = BezierFactory.getBezierEasing(B, z, G, R).get),
- (g.__fnct[a] = x)))
- : g.__fnct
- ? (x = g.__fnct)
- : ((B = l.o.x),
- (z = l.o.y),
- (G = l.i.x),
- (R = l.i.y),
- (x = BezierFactory.getBezierEasing(B, z, G, R).get),
- (l.keyframeMetadata = x)),
- (P = x((e - y) / (u - y))))),
- (m = f.s || l.e),
- (W = l.h === 1 ? l.s[a] : l.s[a] + (m[a] - l.s[a]) * P),
- this.propType === 'multidimensional' ? (i[a] = W) : (i = W);
- }
- return (t.lastIndex = s), i;
- }
- function slerp(e, t, r) {
- var i = [],
- s = e[0],
- a = e[1],
- o = e[2],
- n = e[3],
- l = t[0],
- f = t[1],
- g = t[2],
- S = t[3],
- c,
- P,
- d,
- p,
- x;
- return (
- (P = s * l + a * f + o * g + n * S),
- P < 0 && ((P = -P), (l = -l), (f = -f), (g = -g), (S = -S)),
- 1 - P > 1e-6
- ? ((c = Math.acos(P)),
- (d = Math.sin(c)),
- (p = Math.sin((1 - r) * c) / d),
- (x = Math.sin(r * c) / d))
- : ((p = 1 - r), (x = r)),
- (i[0] = p * s + x * l),
- (i[1] = p * a + x * f),
- (i[2] = p * o + x * g),
- (i[3] = p * n + x * S),
- i
- );
- }
- function quaternionToEuler(e, t) {
- var r = t[0],
- i = t[1],
- s = t[2],
- a = t[3],
- o = Math.atan2(2 * i * a - 2 * r * s, 1 - 2 * i * i - 2 * s * s),
- n = Math.asin(2 * r * i + 2 * s * a),
- l = Math.atan2(2 * r * a - 2 * i * s, 1 - 2 * r * r - 2 * s * s);
- (e[0] = o / degToRads), (e[1] = n / degToRads), (e[2] = l / degToRads);
- }
- function createQuaternion(e) {
- var t = e[0] * degToRads,
- r = e[1] * degToRads,
- i = e[2] * degToRads,
- s = Math.cos(t / 2),
- a = Math.cos(r / 2),
- o = Math.cos(i / 2),
- n = Math.sin(t / 2),
- l = Math.sin(r / 2),
- f = Math.sin(i / 2),
- g = s * a * o - n * l * f,
- S = n * l * o + s * a * f,
- c = n * a * o + s * l * f,
- P = s * l * o - n * a * f;
- return [S, c, P, g];
- }
- function getValueAtCurrentTime() {
- var e = this.comp.renderedFrame - this.offsetTime,
- t = this.keyframes[0].t - this.offsetTime,
- r = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
- if (
- !(
- e === this._caching.lastFrame ||
- (this._caching.lastFrame !== initFrame &&
- ((this._caching.lastFrame >= r && e >= r) ||
- (this._caching.lastFrame < t && e < t)))
- )
- ) {
- this._caching.lastFrame >= e &&
- ((this._caching._lastKeyframeIndex = -1),
- (this._caching.lastIndex = 0));
- var i = this.interpolateValue(e, this._caching);
- this.pv = i;
- }
- return (this._caching.lastFrame = e), this.pv;
- }
- function setVValue(e) {
- var t;
- if (this.propType === 'unidimensional')
- (t = e * this.mult),
- mathAbs(this.v - t) > 1e-5 && ((this.v = t), (this._mdf = !0));
- else
- for (var r = 0, i = this.v.length; r < i; )
- (t = e[r] * this.mult),
- mathAbs(this.v[r] - t) > 1e-5 &&
- ((this.v[r] = t), (this._mdf = !0)),
- (r += 1);
- }
- function processEffectsSequence() {
- if (
- !(
- this.elem.globalData.frameId === this.frameId ||
- !this.effectsSequence.length
- )
- ) {
- if (this.lock) {
- this.setVValue(this.pv);
- return;
- }
- (this.lock = !0), (this._mdf = this._isFirstFrame);
- var e,
- t = this.effectsSequence.length,
- r = this.kf ? this.pv : this.data.k;
- for (e = 0; e < t; e += 1) r = this.effectsSequence[e](r);
- this.setVValue(r),
- (this._isFirstFrame = !1),
- (this.lock = !1),
- (this.frameId = this.elem.globalData.frameId);
- }
- }
- function addEffect(e) {
- this.effectsSequence.push(e), this.container.addDynamicProperty(this);
- }
- function ValueProperty(e, t, r, i) {
- (this.propType = 'unidimensional'),
- (this.mult = r || 1),
- (this.data = t),
- (this.v = r ? t.k * r : t.k),
- (this.pv = t.k),
- (this._mdf = !1),
- (this.elem = e),
- (this.container = i),
- (this.comp = e.comp),
- (this.k = !1),
- (this.kf = !1),
- (this.vel = 0),
- (this.effectsSequence = []),
- (this._isFirstFrame = !0),
- (this.getValue = processEffectsSequence),
- (this.setVValue = setVValue),
- (this.addEffect = addEffect);
- }
- function MultiDimensionalProperty(e, t, r, i) {
- (this.propType = 'multidimensional'),
- (this.mult = r || 1),
- (this.data = t),
- (this._mdf = !1),
- (this.elem = e),
- (this.container = i),
- (this.comp = e.comp),
- (this.k = !1),
- (this.kf = !1),
- (this.frameId = -1);
- var s,
- a = t.k.length;
- for (
- this.v = createTypedArray('float32', a),
- this.pv = createTypedArray('float32', a),
- this.vel = createTypedArray('float32', a),
- s = 0;
- s < a;
- s += 1
- )
- (this.v[s] = t.k[s] * this.mult), (this.pv[s] = t.k[s]);
- (this._isFirstFrame = !0),
- (this.effectsSequence = []),
- (this.getValue = processEffectsSequence),
- (this.setVValue = setVValue),
- (this.addEffect = addEffect);
- }
- function KeyframedValueProperty(e, t, r, i) {
- (this.propType = 'unidimensional'),
- (this.keyframes = t.k),
- (this.keyframesMetadata = []),
- (this.offsetTime = e.data.st),
- (this.frameId = -1),
- (this._caching = {
- lastFrame: initFrame,
- lastIndex: 0,
- value: 0,
- _lastKeyframeIndex: -1
- }),
- (this.k = !0),
- (this.kf = !0),
- (this.data = t),
- (this.mult = r || 1),
- (this.elem = e),
- (this.container = i),
- (this.comp = e.comp),
- (this.v = initFrame),
- (this.pv = initFrame),
- (this._isFirstFrame = !0),
- (this.getValue = processEffectsSequence),
- (this.setVValue = setVValue),
- (this.interpolateValue = interpolateValue),
- (this.effectsSequence = [getValueAtCurrentTime.bind(this)]),
- (this.addEffect = addEffect);
- }
- function KeyframedMultidimensionalProperty(e, t, r, i) {
- this.propType = 'multidimensional';
- var s,
- a = t.k.length,
- o,
- n,
- l,
- f;
- for (s = 0; s < a - 1; s += 1)
- t.k[s].to &&
- t.k[s].s &&
- t.k[s + 1] &&
- t.k[s + 1].s &&
- ((o = t.k[s].s),
- (n = t.k[s + 1].s),
- (l = t.k[s].to),
- (f = t.k[s].ti),
- ((o.length === 2 &&
- !(o[0] === n[0] && o[1] === n[1]) &&
- bez.pointOnLine2D(
- o[0],
- o[1],
- n[0],
- n[1],
- o[0] + l[0],
- o[1] + l[1]
- ) &&
- bez.pointOnLine2D(
- o[0],
- o[1],
- n[0],
- n[1],
- n[0] + f[0],
- n[1] + f[1]
- )) ||
- (o.length === 3 &&
- !(o[0] === n[0] && o[1] === n[1] && o[2] === n[2]) &&
- bez.pointOnLine3D(
- o[0],
- o[1],
- o[2],
- n[0],
- n[1],
- n[2],
- o[0] + l[0],
- o[1] + l[1],
- o[2] + l[2]
- ) &&
- bez.pointOnLine3D(
- o[0],
- o[1],
- o[2],
- n[0],
- n[1],
- n[2],
- n[0] + f[0],
- n[1] + f[1],
- n[2] + f[2]
- ))) &&
- ((t.k[s].to = null), (t.k[s].ti = null)),
- o[0] === n[0] &&
- o[1] === n[1] &&
- l[0] === 0 &&
- l[1] === 0 &&
- f[0] === 0 &&
- f[1] === 0 &&
- (o.length === 2 || (o[2] === n[2] && l[2] === 0 && f[2] === 0)) &&
- ((t.k[s].to = null), (t.k[s].ti = null)));
- (this.effectsSequence = [getValueAtCurrentTime.bind(this)]),
- (this.data = t),
- (this.keyframes = t.k),
- (this.keyframesMetadata = []),
- (this.offsetTime = e.data.st),
- (this.k = !0),
- (this.kf = !0),
- (this._isFirstFrame = !0),
- (this.mult = r || 1),
- (this.elem = e),
- (this.container = i),
- (this.comp = e.comp),
- (this.getValue = processEffectsSequence),
- (this.setVValue = setVValue),
- (this.interpolateValue = interpolateValue),
- (this.frameId = -1);
- var g = t.k[0].s.length;
- for (
- this.v = createTypedArray('float32', g),
- this.pv = createTypedArray('float32', g),
- s = 0;
- s < g;
- s += 1
- )
- (this.v[s] = initFrame), (this.pv[s] = initFrame);
- (this._caching = {
- lastFrame: initFrame,
- lastIndex: 0,
- value: createTypedArray('float32', g)
- }),
- (this.addEffect = addEffect);
- }
- var PropertyFactory = (function () {
- function e(r, i, s, a, o) {
- i.sid && (i = r.globalData.slotManager.getProp(i));
- var n;
- if (!i.k.length) n = new ValueProperty(r, i, a, o);
- else if (typeof i.k[0] == 'number')
- n = new MultiDimensionalProperty(r, i, a, o);
- else
- switch (s) {
- case 0:
- n = new KeyframedValueProperty(r, i, a, o);
- break;
- case 1:
- n = new KeyframedMultidimensionalProperty(r, i, a, o);
- break;
- }
- return n.effectsSequence.length && o.addDynamicProperty(n), n;
- }
- var t = { getProp: e };
- return t;
- })();
- function DynamicPropertyContainer() {}
- DynamicPropertyContainer.prototype = {
- addDynamicProperty: function (t) {
- this.dynamicProperties.indexOf(t) === -1 &&
- (this.dynamicProperties.push(t),
- this.container.addDynamicProperty(this),
- (this._isAnimated = !0));
- },
- iterateDynamicProperties: function () {
- this._mdf = !1;
- var t,
- r = this.dynamicProperties.length;
- for (t = 0; t < r; t += 1)
- this.dynamicProperties[t].getValue(),
- this.dynamicProperties[t]._mdf && (this._mdf = !0);
- },
- initDynamicPropertyContainer: function (t) {
- (this.container = t),
- (this.dynamicProperties = []),
- (this._mdf = !1),
- (this._isAnimated = !1);
- }
- };
- var pointPool = (function () {
- function e() {
- return createTypedArray('float32', 2);
- }
- return poolFactory(8, e);
- })();
- function ShapePath() {
- (this.c = !1),
- (this._length = 0),
- (this._maxLength = 8),
- (this.v = createSizedArray(this._maxLength)),
- (this.o = createSizedArray(this._maxLength)),
- (this.i = createSizedArray(this._maxLength));
- }
- (ShapePath.prototype.setPathData = function (e, t) {
- (this.c = e), this.setLength(t);
- for (var r = 0; r < t; )
- (this.v[r] = pointPool.newElement()),
- (this.o[r] = pointPool.newElement()),
- (this.i[r] = pointPool.newElement()),
- (r += 1);
- }),
- (ShapePath.prototype.setLength = function (e) {
- for (; this._maxLength < e; ) this.doubleArrayLength();
- this._length = e;
- }),
- (ShapePath.prototype.doubleArrayLength = function () {
- (this.v = this.v.concat(createSizedArray(this._maxLength))),
- (this.i = this.i.concat(createSizedArray(this._maxLength))),
- (this.o = this.o.concat(createSizedArray(this._maxLength))),
- (this._maxLength *= 2);
- }),
- (ShapePath.prototype.setXYAt = function (e, t, r, i, s) {
- var a;
- switch (
- ((this._length = Math.max(this._length, i + 1)),
- this._length >= this._maxLength && this.doubleArrayLength(),
- r)
- ) {
- case 'v':
- a = this.v;
- break;
- case 'i':
- a = this.i;
- break;
- case 'o':
- a = this.o;
- break;
- default:
- a = [];
- break;
- }
- (!a[i] || (a[i] && !s)) && (a[i] = pointPool.newElement()),
- (a[i][0] = e),
- (a[i][1] = t);
- }),
- (ShapePath.prototype.setTripleAt = function (e, t, r, i, s, a, o, n) {
- this.setXYAt(e, t, 'v', o, n),
- this.setXYAt(r, i, 'o', o, n),
- this.setXYAt(s, a, 'i', o, n);
- }),
- (ShapePath.prototype.reverse = function () {
- var e = new ShapePath();
- e.setPathData(this.c, this._length);
- var t = this.v,
- r = this.o,
- i = this.i,
- s = 0;
- this.c &&
- (e.setTripleAt(
- t[0][0],
- t[0][1],
- i[0][0],
- i[0][1],
- r[0][0],
- r[0][1],
- 0,
- !1
- ),
- (s = 1));
- var a = this._length - 1,
- o = this._length,
- n;
- for (n = s; n < o; n += 1)
- e.setTripleAt(
- t[a][0],
- t[a][1],
- i[a][0],
- i[a][1],
- r[a][0],
- r[a][1],
- n,
- !1
- ),
- (a -= 1);
- return e;
- }),
- (ShapePath.prototype.length = function () {
- return this._length;
- });
- var shapePool = (function () {
- function e() {
- return new ShapePath();
- }
- function t(s) {
- var a = s._length,
- o;
- for (o = 0; o < a; o += 1)
- pointPool.release(s.v[o]),
- pointPool.release(s.i[o]),
- pointPool.release(s.o[o]),
- (s.v[o] = null),
- (s.i[o] = null),
- (s.o[o] = null);
- (s._length = 0), (s.c = !1);
- }
- function r(s) {
- var a = i.newElement(),
- o,
- n = s._length === void 0 ? s.v.length : s._length;
- for (a.setLength(n), a.c = s.c, o = 0; o < n; o += 1)
- a.setTripleAt(
- s.v[o][0],
- s.v[o][1],
- s.o[o][0],
- s.o[o][1],
- s.i[o][0],
- s.i[o][1],
- o
- );
- return a;
- }
- var i = poolFactory(4, e, t);
- return (i.clone = r), i;
- })();
- function ShapeCollection() {
- (this._length = 0),
- (this._maxLength = 4),
- (this.shapes = createSizedArray(this._maxLength));
- }
- (ShapeCollection.prototype.addShape = function (e) {
- this._length === this._maxLength &&
- ((this.shapes = this.shapes.concat(
- createSizedArray(this._maxLength)
- )),
- (this._maxLength *= 2)),
- (this.shapes[this._length] = e),
- (this._length += 1);
- }),
- (ShapeCollection.prototype.releaseShapes = function () {
- var e;
- for (e = 0; e < this._length; e += 1)
- shapePool.release(this.shapes[e]);
- this._length = 0;
- });
- var shapeCollectionPool = (function () {
- var e = { newShapeCollection: s, release: a },
- t = 0,
- r = 4,
- i = createSizedArray(r);
- function s() {
- var o;
- return t ? ((t -= 1), (o = i[t])) : (o = new ShapeCollection()), o;
- }
- function a(o) {
- var n,
- l = o._length;
- for (n = 0; n < l; n += 1) shapePool.release(o.shapes[n]);
- (o._length = 0),
- t === r && ((i = pooling.double(i)), (r *= 2)),
- (i[t] = o),
- (t += 1);
- }
- return e;
- })(),
- ShapePropertyFactory = (function () {
- var e = -999999;
- function t(u, y, m) {
- var A = m.lastIndex,
- T,
- E,
- _,
- I,
- B,
- z,
- G,
- R,
- W,
- H = this.keyframes;
- if (u < H[0].t - this.offsetTime)
- (T = H[0].s[0]), (_ = !0), (A = 0);
- else if (u >= H[H.length - 1].t - this.offsetTime)
- (T = H[H.length - 1].s
- ? H[H.length - 1].s[0]
- : H[H.length - 2].e[0]),
- (_ = !0);
- else {
- for (
- var N = A, M = H.length - 1, k = !0, b, C, L;
- k && ((b = H[N]), (C = H[N + 1]), !(C.t - this.offsetTime > u));
- )
- N < M - 1 ? (N += 1) : (k = !1);
- if (
- ((L = this.keyframesMetadata[N] || {}),
- (_ = b.h === 1),
- (A = N),
- !_)
- ) {
- if (u >= C.t - this.offsetTime) R = 1;
- else if (u < b.t - this.offsetTime) R = 0;
- else {
- var F;
- L.__fnct
- ? (F = L.__fnct)
- : ((F = BezierFactory.getBezierEasing(
- b.o.x,
- b.o.y,
- b.i.x,
- b.i.y
- ).get),
- (L.__fnct = F)),
- (R = F(
- (u - (b.t - this.offsetTime)) /
- (C.t - this.offsetTime - (b.t - this.offsetTime))
- ));
- }
- E = C.s ? C.s[0] : b.e[0];
- }
- T = b.s[0];
- }
- for (
- z = y._length, G = T.i[0].length, m.lastIndex = A, I = 0;
- I < z;
- I += 1
- )
- for (B = 0; B < G; B += 1)
- (W = _ ? T.i[I][B] : T.i[I][B] + (E.i[I][B] - T.i[I][B]) * R),
- (y.i[I][B] = W),
- (W = _ ? T.o[I][B] : T.o[I][B] + (E.o[I][B] - T.o[I][B]) * R),
- (y.o[I][B] = W),
- (W = _ ? T.v[I][B] : T.v[I][B] + (E.v[I][B] - T.v[I][B]) * R),
- (y.v[I][B] = W);
- }
- function r() {
- var u = this.comp.renderedFrame - this.offsetTime,
- y = this.keyframes[0].t - this.offsetTime,
- m = this.keyframes[this.keyframes.length - 1].t - this.offsetTime,
- A = this._caching.lastFrame;
- return (
- (A !== e && ((A < y && u < y) || (A > m && u > m))) ||
- ((this._caching.lastIndex =
- A < u ? this._caching.lastIndex : 0),
- this.interpolateShape(u, this.pv, this._caching)),
- (this._caching.lastFrame = u),
- this.pv
- );
- }
- function i() {
- this.paths = this.localShapeCollection;
- }
- function s(u, y) {
- if (u._length !== y._length || u.c !== y.c) return !1;
- var m,
- A = u._length;
- for (m = 0; m < A; m += 1)
- if (
- u.v[m][0] !== y.v[m][0] ||
- u.v[m][1] !== y.v[m][1] ||
- u.o[m][0] !== y.o[m][0] ||
- u.o[m][1] !== y.o[m][1] ||
- u.i[m][0] !== y.i[m][0] ||
- u.i[m][1] !== y.i[m][1]
- )
- return !1;
- return !0;
- }
- function a(u) {
- s(this.v, u) ||
- ((this.v = shapePool.clone(u)),
- this.localShapeCollection.releaseShapes(),
- this.localShapeCollection.addShape(this.v),
- (this._mdf = !0),
- (this.paths = this.localShapeCollection));
- }
- function o() {
- if (this.elem.globalData.frameId !== this.frameId) {
- if (!this.effectsSequence.length) {
- this._mdf = !1;
- return;
- }
- if (this.lock) {
- this.setVValue(this.pv);
- return;
- }
- (this.lock = !0), (this._mdf = !1);
- var u;
- this.kf
- ? (u = this.pv)
- : this.data.ks
- ? (u = this.data.ks.k)
- : (u = this.data.pt.k);
- var y,
- m = this.effectsSequence.length;
- for (y = 0; y < m; y += 1) u = this.effectsSequence[y](u);
- this.setVValue(u),
- (this.lock = !1),
- (this.frameId = this.elem.globalData.frameId);
- }
- }
- function n(u, y, m) {
- (this.propType = 'shape'),
- (this.comp = u.comp),
- (this.container = u),
- (this.elem = u),
- (this.data = y),
- (this.k = !1),
- (this.kf = !1),
- (this._mdf = !1);
- var A = m === 3 ? y.pt.k : y.ks.k;
- (this.v = shapePool.clone(A)),
- (this.pv = shapePool.clone(this.v)),
- (this.localShapeCollection =
- shapeCollectionPool.newShapeCollection()),
- (this.paths = this.localShapeCollection),
- this.paths.addShape(this.v),
- (this.reset = i),
- (this.effectsSequence = []);
- }
- function l(u) {
- this.effectsSequence.push(u),
- this.container.addDynamicProperty(this);
- }
- (n.prototype.interpolateShape = t),
- (n.prototype.getValue = o),
- (n.prototype.setVValue = a),
- (n.prototype.addEffect = l);
- function f(u, y, m) {
- (this.propType = 'shape'),
- (this.comp = u.comp),
- (this.elem = u),
- (this.container = u),
- (this.offsetTime = u.data.st),
- (this.keyframes = m === 3 ? y.pt.k : y.ks.k),
- (this.keyframesMetadata = []),
- (this.k = !0),
- (this.kf = !0);
- var A = this.keyframes[0].s[0].i.length;
- (this.v = shapePool.newElement()),
- this.v.setPathData(this.keyframes[0].s[0].c, A),
- (this.pv = shapePool.clone(this.v)),
- (this.localShapeCollection =
- shapeCollectionPool.newShapeCollection()),
- (this.paths = this.localShapeCollection),
- this.paths.addShape(this.v),
- (this.lastFrame = e),
- (this.reset = i),
- (this._caching = { lastFrame: e, lastIndex: 0 }),
- (this.effectsSequence = [r.bind(this)]);
- }
- (f.prototype.getValue = o),
- (f.prototype.interpolateShape = t),
- (f.prototype.setVValue = a),
- (f.prototype.addEffect = l);
- var g = (function () {
- var u = roundCorner;
- function y(m, A) {
- (this.v = shapePool.newElement()),
- this.v.setPathData(!0, 4),
- (this.localShapeCollection =
- shapeCollectionPool.newShapeCollection()),
- (this.paths = this.localShapeCollection),
- this.localShapeCollection.addShape(this.v),
- (this.d = A.d),
- (this.elem = m),
- (this.comp = m.comp),
- (this.frameId = -1),
- this.initDynamicPropertyContainer(m),
- (this.p = PropertyFactory.getProp(m, A.p, 1, 0, this)),
- (this.s = PropertyFactory.getProp(m, A.s, 1, 0, this)),
- this.dynamicProperties.length
- ? (this.k = !0)
- : ((this.k = !1), this.convertEllToPath());
- }
- return (
- (y.prototype = {
- reset: i,
- getValue: function () {
- this.elem.globalData.frameId !== this.frameId &&
- ((this.frameId = this.elem.globalData.frameId),
- this.iterateDynamicProperties(),
- this._mdf && this.convertEllToPath());
- },
- convertEllToPath: function () {
- var A = this.p.v[0],
- T = this.p.v[1],
- E = this.s.v[0] / 2,
- _ = this.s.v[1] / 2,
- I = this.d !== 3,
- B = this.v;
- (B.v[0][0] = A),
- (B.v[0][1] = T - _),
- (B.v[1][0] = I ? A + E : A - E),
- (B.v[1][1] = T),
- (B.v[2][0] = A),
- (B.v[2][1] = T + _),
- (B.v[3][0] = I ? A - E : A + E),
- (B.v[3][1] = T),
- (B.i[0][0] = I ? A - E * u : A + E * u),
- (B.i[0][1] = T - _),
- (B.i[1][0] = I ? A + E : A - E),
- (B.i[1][1] = T - _ * u),
- (B.i[2][0] = I ? A + E * u : A - E * u),
- (B.i[2][1] = T + _),
- (B.i[3][0] = I ? A - E : A + E),
- (B.i[3][1] = T + _ * u),
- (B.o[0][0] = I ? A + E * u : A - E * u),
- (B.o[0][1] = T - _),
- (B.o[1][0] = I ? A + E : A - E),
- (B.o[1][1] = T + _ * u),
- (B.o[2][0] = I ? A - E * u : A + E * u),
- (B.o[2][1] = T + _),
- (B.o[3][0] = I ? A - E : A + E),
- (B.o[3][1] = T - _ * u);
- }
- }),
- extendPrototype([DynamicPropertyContainer], y),
- y
- );
- })(),
- S = (function () {
- function u(y, m) {
- (this.v = shapePool.newElement()),
- this.v.setPathData(!0, 0),
- (this.elem = y),
- (this.comp = y.comp),
- (this.data = m),
- (this.frameId = -1),
- (this.d = m.d),
- this.initDynamicPropertyContainer(y),
- m.sy === 1
- ? ((this.ir = PropertyFactory.getProp(y, m.ir, 0, 0, this)),
- (this.is = PropertyFactory.getProp(
- y,
- m.is,
- 0,
- 0.01,
- this
- )),
- (this.convertToPath = this.convertStarToPath))
- : (this.convertToPath = this.convertPolygonToPath),
- (this.pt = PropertyFactory.getProp(y, m.pt, 0, 0, this)),
- (this.p = PropertyFactory.getProp(y, m.p, 1, 0, this)),
- (this.r = PropertyFactory.getProp(
- y,
- m.r,
- 0,
- degToRads,
- this
- )),
- (this.or = PropertyFactory.getProp(y, m.or, 0, 0, this)),
- (this.os = PropertyFactory.getProp(y, m.os, 0, 0.01, this)),
- (this.localShapeCollection =
- shapeCollectionPool.newShapeCollection()),
- this.localShapeCollection.addShape(this.v),
- (this.paths = this.localShapeCollection),
- this.dynamicProperties.length
- ? (this.k = !0)
- : ((this.k = !1), this.convertToPath());
- }
- return (
- (u.prototype = {
- reset: i,
- getValue: function () {
- this.elem.globalData.frameId !== this.frameId &&
- ((this.frameId = this.elem.globalData.frameId),
- this.iterateDynamicProperties(),
- this._mdf && this.convertToPath());
- },
- convertStarToPath: function () {
- var m = Math.floor(this.pt.v) * 2,
- A = (Math.PI * 2) / m,
- T = !0,
- E = this.or.v,
- _ = this.ir.v,
- I = this.os.v,
- B = this.is.v,
- z = (2 * Math.PI * E) / (m * 2),
- G = (2 * Math.PI * _) / (m * 2),
- R,
- W,
- H,
- N,
- M = -Math.PI / 2;
- M += this.r.v;
- var k = this.data.d === 3 ? -1 : 1;
- for (this.v._length = 0, R = 0; R < m; R += 1) {
- (W = T ? E : _), (H = T ? I : B), (N = T ? z : G);
- var b = W * Math.cos(M),
- C = W * Math.sin(M),
- L =
- b === 0 && C === 0 ? 0 : C / Math.sqrt(b * b + C * C),
- F =
- b === 0 && C === 0
- ? 0
- : -b / Math.sqrt(b * b + C * C);
- (b += +this.p.v[0]),
- (C += +this.p.v[1]),
- this.v.setTripleAt(
- b,
- C,
- b - L * N * H * k,
- C - F * N * H * k,
- b + L * N * H * k,
- C + F * N * H * k,
- R,
- !0
- ),
- (T = !T),
- (M += A * k);
- }
- },
- convertPolygonToPath: function () {
- var m = Math.floor(this.pt.v),
- A = (Math.PI * 2) / m,
- T = this.or.v,
- E = this.os.v,
- _ = (2 * Math.PI * T) / (m * 4),
- I,
- B = -Math.PI * 0.5,
- z = this.data.d === 3 ? -1 : 1;
- for (
- B += this.r.v, this.v._length = 0, I = 0;
- I < m;
- I += 1
- ) {
- var G = T * Math.cos(B),
- R = T * Math.sin(B),
- W =
- G === 0 && R === 0 ? 0 : R / Math.sqrt(G * G + R * R),
- H =
- G === 0 && R === 0
- ? 0
- : -G / Math.sqrt(G * G + R * R);
- (G += +this.p.v[0]),
- (R += +this.p.v[1]),
- this.v.setTripleAt(
- G,
- R,
- G - W * _ * E * z,
- R - H * _ * E * z,
- G + W * _ * E * z,
- R + H * _ * E * z,
- I,
- !0
- ),
- (B += A * z);
- }
- (this.paths.length = 0), (this.paths[0] = this.v);
- }
- }),
- extendPrototype([DynamicPropertyContainer], u),
- u
- );
- })(),
- c = (function () {
- function u(y, m) {
- (this.v = shapePool.newElement()),
- (this.v.c = !0),
- (this.localShapeCollection =
- shapeCollectionPool.newShapeCollection()),
- this.localShapeCollection.addShape(this.v),
- (this.paths = this.localShapeCollection),
- (this.elem = y),
- (this.comp = y.comp),
- (this.frameId = -1),
- (this.d = m.d),
- this.initDynamicPropertyContainer(y),
- (this.p = PropertyFactory.getProp(y, m.p, 1, 0, this)),
- (this.s = PropertyFactory.getProp(y, m.s, 1, 0, this)),
- (this.r = PropertyFactory.getProp(y, m.r, 0, 0, this)),
- this.dynamicProperties.length
- ? (this.k = !0)
- : ((this.k = !1), this.convertRectToPath());
- }
- return (
- (u.prototype = {
- convertRectToPath: function () {
- var m = this.p.v[0],
- A = this.p.v[1],
- T = this.s.v[0] / 2,
- E = this.s.v[1] / 2,
- _ = bmMin(T, E, this.r.v),
- I = _ * (1 - roundCorner);
- (this.v._length = 0),
- this.d === 2 || this.d === 1
- ? (this.v.setTripleAt(
- m + T,
- A - E + _,
- m + T,
- A - E + _,
- m + T,
- A - E + I,
- 0,
- !0
- ),
- this.v.setTripleAt(
- m + T,
- A + E - _,
- m + T,
- A + E - I,
- m + T,
- A + E - _,
- 1,
- !0
- ),
- _ !== 0
- ? (this.v.setTripleAt(
- m + T - _,
- A + E,
- m + T - _,
- A + E,
- m + T - I,
- A + E,
- 2,
- !0
- ),
- this.v.setTripleAt(
- m - T + _,
- A + E,
- m - T + I,
- A + E,
- m - T + _,
- A + E,
- 3,
- !0
- ),
- this.v.setTripleAt(
- m - T,
- A + E - _,
- m - T,
- A + E - _,
- m - T,
- A + E - I,
- 4,
- !0
- ),
- this.v.setTripleAt(
- m - T,
- A - E + _,
- m - T,
- A - E + I,
- m - T,
- A - E + _,
- 5,
- !0
- ),
- this.v.setTripleAt(
- m - T + _,
- A - E,
- m - T + _,
- A - E,
- m - T + I,
- A - E,
- 6,
- !0
- ),
- this.v.setTripleAt(
- m + T - _,
- A - E,
- m + T - I,
- A - E,
- m + T - _,
- A - E,
- 7,
- !0
- ))
- : (this.v.setTripleAt(
- m - T,
- A + E,
- m - T + I,
- A + E,
- m - T,
- A + E,
- 2
- ),
- this.v.setTripleAt(
- m - T,
- A - E,
- m - T,
- A - E + I,
- m - T,
- A - E,
- 3
- )))
- : (this.v.setTripleAt(
- m + T,
- A - E + _,
- m + T,
- A - E + I,
- m + T,
- A - E + _,
- 0,
- !0
- ),
- _ !== 0
- ? (this.v.setTripleAt(
- m + T - _,
- A - E,
- m + T - _,
- A - E,
- m + T - I,
- A - E,
- 1,
- !0
- ),
- this.v.setTripleAt(
- m - T + _,
- A - E,
- m - T + I,
- A - E,
- m - T + _,
- A - E,
- 2,
- !0
- ),
- this.v.setTripleAt(
- m - T,
- A - E + _,
- m - T,
- A - E + _,
- m - T,
- A - E + I,
- 3,
- !0
- ),
- this.v.setTripleAt(
- m - T,
- A + E - _,
- m - T,
- A + E - I,
- m - T,
- A + E - _,
- 4,
- !0
- ),
- this.v.setTripleAt(
- m - T + _,
- A + E,
- m - T + _,
- A + E,
- m - T + I,
- A + E,
- 5,
- !0
- ),
- this.v.setTripleAt(
- m + T - _,
- A + E,
- m + T - I,
- A + E,
- m + T - _,
- A + E,
- 6,
- !0
- ),
- this.v.setTripleAt(
- m + T,
- A + E - _,
- m + T,
- A + E - _,
- m + T,
- A + E - I,
- 7,
- !0
- ))
- : (this.v.setTripleAt(
- m - T,
- A - E,
- m - T + I,
- A - E,
- m - T,
- A - E,
- 1,
- !0
- ),
- this.v.setTripleAt(
- m - T,
- A + E,
- m - T,
- A + E - I,
- m - T,
- A + E,
- 2,
- !0
- ),
- this.v.setTripleAt(
- m + T,
- A + E,
- m + T - I,
- A + E,
- m + T,
- A + E,
- 3,
- !0
- )));
- },
- getValue: function () {
- this.elem.globalData.frameId !== this.frameId &&
- ((this.frameId = this.elem.globalData.frameId),
- this.iterateDynamicProperties(),
- this._mdf && this.convertRectToPath());
- },
- reset: i
- }),
- extendPrototype([DynamicPropertyContainer], u),
- u
- );
- })();
- function P(u, y, m) {
- var A;
- if (m === 3 || m === 4) {
- var T = m === 3 ? y.pt : y.ks,
- E = T.k;
- E.length ? (A = new f(u, y, m)) : (A = new n(u, y, m));
- } else
- m === 5
- ? (A = new c(u, y))
- : m === 6
- ? (A = new g(u, y))
- : m === 7 && (A = new S(u, y));
- return A.k && u.addDynamicProperty(A), A;
- }
- function d() {
- return n;
- }
- function p() {
- return f;
- }
- var x = {};
- return (
- (x.getShapeProp = P),
- (x.getConstructorFunction = d),
- (x.getKeyframedConstructorFunction = p),
- x
- );
- })();
- /*!
- Transformation Matrix v2.0
- (c) Epistemex 2014-2015
- www.epistemex.com
- By Ken Fyrstenberg
- Contributions by leeoniya.
- License: MIT, header required.
- */ var Matrix = (function () {
- var e = Math.cos,
- t = Math.sin,
- r = Math.tan,
- i = Math.round;
- function s() {
- return (
- (this.props[0] = 1),
- (this.props[1] = 0),
- (this.props[2] = 0),
- (this.props[3] = 0),
- (this.props[4] = 0),
- (this.props[5] = 1),
- (this.props[6] = 0),
- (this.props[7] = 0),
- (this.props[8] = 0),
- (this.props[9] = 0),
- (this.props[10] = 1),
- (this.props[11] = 0),
- (this.props[12] = 0),
- (this.props[13] = 0),
- (this.props[14] = 0),
- (this.props[15] = 1),
- this
- );
- }
- function a(b) {
- if (b === 0) return this;
- var C = e(b),
- L = t(b);
- return this._t(C, -L, 0, 0, L, C, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
- }
- function o(b) {
- if (b === 0) return this;
- var C = e(b),
- L = t(b);
- return this._t(1, 0, 0, 0, 0, C, -L, 0, 0, L, C, 0, 0, 0, 0, 1);
- }
- function n(b) {
- if (b === 0) return this;
- var C = e(b),
- L = t(b);
- return this._t(C, 0, L, 0, 0, 1, 0, 0, -L, 0, C, 0, 0, 0, 0, 1);
- }
- function l(b) {
- if (b === 0) return this;
- var C = e(b),
- L = t(b);
- return this._t(C, -L, 0, 0, L, C, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
- }
- function f(b, C) {
- return this._t(1, C, b, 1, 0, 0);
- }
- function g(b, C) {
- return this.shear(r(b), r(C));
- }
- function S(b, C) {
- var L = e(C),
- F = t(C);
- return this._t(L, F, 0, 0, -F, L, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
- ._t(1, 0, 0, 0, r(b), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
- ._t(L, -F, 0, 0, F, L, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
- }
- function c(b, C, L) {
- return (
- !L && L !== 0 && (L = 1),
- b === 1 && C === 1 && L === 1
- ? this
- : this._t(b, 0, 0, 0, 0, C, 0, 0, 0, 0, L, 0, 0, 0, 0, 1)
- );
- }
- function P(b, C, L, F, U, D, V, O, j, $, J, X, Y, K, Z, Q) {
- return (
- (this.props[0] = b),
- (this.props[1] = C),
- (this.props[2] = L),
- (this.props[3] = F),
- (this.props[4] = U),
- (this.props[5] = D),
- (this.props[6] = V),
- (this.props[7] = O),
- (this.props[8] = j),
- (this.props[9] = $),
- (this.props[10] = J),
- (this.props[11] = X),
- (this.props[12] = Y),
- (this.props[13] = K),
- (this.props[14] = Z),
- (this.props[15] = Q),
- this
- );
- }
- function d(b, C, L) {
- return (
- (L = L || 0),
- b !== 0 || C !== 0 || L !== 0
- ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, b, C, L, 1)
- : this
- );
- }
- function p(b, C, L, F, U, D, V, O, j, $, J, X, Y, K, Z, Q) {
- var q = this.props;
- if (
- b === 1 &&
- C === 0 &&
- L === 0 &&
- F === 0 &&
- U === 0 &&
- D === 1 &&
- V === 0 &&
- O === 0 &&
- j === 0 &&
- $ === 0 &&
- J === 1 &&
- X === 0
- )
- return (
- (q[12] = q[12] * b + q[15] * Y),
- (q[13] = q[13] * D + q[15] * K),
- (q[14] = q[14] * J + q[15] * Z),
- (q[15] *= Q),
- (this._identityCalculated = !1),
- this
- );
- var ee = q[0],
- te = q[1],
- ne = q[2],
- ae = q[3],
- oe = q[4],
- le = q[5],
- re = q[6],
- he = q[7],
- fe = q[8],
- ie = q[9],
- ce = q[10],
- se = q[11],
- pe = q[12],
- ue = q[13],
- de = q[14],
- me = q[15];
- return (
- (q[0] = ee * b + te * U + ne * j + ae * Y),
- (q[1] = ee * C + te * D + ne * $ + ae * K),
- (q[2] = ee * L + te * V + ne * J + ae * Z),
- (q[3] = ee * F + te * O + ne * X + ae * Q),
- (q[4] = oe * b + le * U + re * j + he * Y),
- (q[5] = oe * C + le * D + re * $ + he * K),
- (q[6] = oe * L + le * V + re * J + he * Z),
- (q[7] = oe * F + le * O + re * X + he * Q),
- (q[8] = fe * b + ie * U + ce * j + se * Y),
- (q[9] = fe * C + ie * D + ce * $ + se * K),
- (q[10] = fe * L + ie * V + ce * J + se * Z),
- (q[11] = fe * F + ie * O + ce * X + se * Q),
- (q[12] = pe * b + ue * U + de * j + me * Y),
- (q[13] = pe * C + ue * D + de * $ + me * K),
- (q[14] = pe * L + ue * V + de * J + me * Z),
- (q[15] = pe * F + ue * O + de * X + me * Q),
- (this._identityCalculated = !1),
- this
- );
- }
- function x(b) {
- var C = b.props;
- return this.transform(
- C[0],
- C[1],
- C[2],
- C[3],
- C[4],
- C[5],
- C[6],
- C[7],
- C[8],
- C[9],
- C[10],
- C[11],
- C[12],
- C[13],
- C[14],
- C[15]
- );
- }
- function u() {
- return (
- this._identityCalculated ||
- ((this._identity = !(
- this.props[0] !== 1 ||
- this.props[1] !== 0 ||
- this.props[2] !== 0 ||
- this.props[3] !== 0 ||
- this.props[4] !== 0 ||
- this.props[5] !== 1 ||
- this.props[6] !== 0 ||
- this.props[7] !== 0 ||
- this.props[8] !== 0 ||
- this.props[9] !== 0 ||
- this.props[10] !== 1 ||
- this.props[11] !== 0 ||
- this.props[12] !== 0 ||
- this.props[13] !== 0 ||
- this.props[14] !== 0 ||
- this.props[15] !== 1
- )),
- (this._identityCalculated = !0)),
- this._identity
- );
- }
- function y(b) {
- for (var C = 0; C < 16; ) {
- if (b.props[C] !== this.props[C]) return !1;
- C += 1;
- }
- return !0;
- }
- function m(b) {
- var C;
- for (C = 0; C < 16; C += 1) b.props[C] = this.props[C];
- return b;
- }
- function A(b) {
- var C;
- for (C = 0; C < 16; C += 1) this.props[C] = b[C];
- }
- function T(b, C, L) {
- return {
- x:
- b * this.props[0] +
- C * this.props[4] +
- L * this.props[8] +
- this.props[12],
- y:
- b * this.props[1] +
- C * this.props[5] +
- L * this.props[9] +
- this.props[13],
- z:
- b * this.props[2] +
- C * this.props[6] +
- L * this.props[10] +
- this.props[14]
- };
- }
- function E(b, C, L) {
- return (
- b * this.props[0] +
- C * this.props[4] +
- L * this.props[8] +
- this.props[12]
- );
- }
- function _(b, C, L) {
- return (
- b * this.props[1] +
- C * this.props[5] +
- L * this.props[9] +
- this.props[13]
- );
- }
- function I(b, C, L) {
- return (
- b * this.props[2] +
- C * this.props[6] +
- L * this.props[10] +
- this.props[14]
- );
- }
- function B() {
- var b = this.props[0] * this.props[5] - this.props[1] * this.props[4],
- C = this.props[5] / b,
- L = -this.props[1] / b,
- F = -this.props[4] / b,
- U = this.props[0] / b,
- D =
- (this.props[4] * this.props[13] -
- this.props[5] * this.props[12]) /
- b,
- V =
- -(
- this.props[0] * this.props[13] -
- this.props[1] * this.props[12]
- ) / b,
- O = new Matrix();
- return (
- (O.props[0] = C),
- (O.props[1] = L),
- (O.props[4] = F),
- (O.props[5] = U),
- (O.props[12] = D),
- (O.props[13] = V),
- O
- );
- }
- function z(b) {
- var C = this.getInverseMatrix();
- return C.applyToPointArray(b[0], b[1], b[2] || 0);
- }
- function G(b) {
- var C,
- L = b.length,
- F = [];
- for (C = 0; C < L; C += 1) F[C] = z(b[C]);
- return F;
- }
- function R(b, C, L) {
- var F = createTypedArray('float32', 6);
- if (this.isIdentity())
- (F[0] = b[0]),
- (F[1] = b[1]),
- (F[2] = C[0]),
- (F[3] = C[1]),
- (F[4] = L[0]),
- (F[5] = L[1]);
- else {
- var U = this.props[0],
- D = this.props[1],
- V = this.props[4],
- O = this.props[5],
- j = this.props[12],
- $ = this.props[13];
- (F[0] = b[0] * U + b[1] * V + j),
- (F[1] = b[0] * D + b[1] * O + $),
- (F[2] = C[0] * U + C[1] * V + j),
- (F[3] = C[0] * D + C[1] * O + $),
- (F[4] = L[0] * U + L[1] * V + j),
- (F[5] = L[0] * D + L[1] * O + $);
- }
- return F;
- }
- function W(b, C, L) {
- var F;
- return (
- this.isIdentity()
- ? (F = [b, C, L])
- : (F = [
- b * this.props[0] +
- C * this.props[4] +
- L * this.props[8] +
- this.props[12],
- b * this.props[1] +
- C * this.props[5] +
- L * this.props[9] +
- this.props[13],
- b * this.props[2] +
- C * this.props[6] +
- L * this.props[10] +
- this.props[14]
- ]),
- F
- );
- }
- function H(b, C) {
- if (this.isIdentity()) return b + ',' + C;
- var L = this.props;
- return (
- Math.round((b * L[0] + C * L[4] + L[12]) * 100) / 100 +
- ',' +
- Math.round((b * L[1] + C * L[5] + L[13]) * 100) / 100
- );
- }
- function N() {
- for (var b = 0, C = this.props, L = 'matrix3d(', F = 1e4; b < 16; )
- (L += i(C[b] * F) / F), (L += b === 15 ? ')' : ','), (b += 1);
- return L;
- }
- function M(b) {
- var C = 1e4;
- return (b < 1e-6 && b > 0) || (b > -1e-6 && b < 0) ? i(b * C) / C : b;
- }
- function k() {
- var b = this.props,
- C = M(b[0]),
- L = M(b[1]),
- F = M(b[4]),
- U = M(b[5]),
- D = M(b[12]),
- V = M(b[13]);
- return (
- 'matrix(' +
- C +
- ',' +
- L +
- ',' +
- F +
- ',' +
- U +
- ',' +
- D +
- ',' +
- V +
- ')'
- );
- }
- return function () {
- (this.reset = s),
- (this.rotate = a),
- (this.rotateX = o),
- (this.rotateY = n),
- (this.rotateZ = l),
- (this.skew = g),
- (this.skewFromAxis = S),
- (this.shear = f),
- (this.scale = c),
- (this.setTransform = P),
- (this.translate = d),
- (this.transform = p),
- (this.multiply = x),
- (this.applyToPoint = T),
- (this.applyToX = E),
- (this.applyToY = _),
- (this.applyToZ = I),
- (this.applyToPointArray = W),
- (this.applyToTriplePoints = R),
- (this.applyToPointStringified = H),
- (this.toCSS = N),
- (this.to2dCSS = k),
- (this.clone = m),
- (this.cloneFromProps = A),
- (this.equals = y),
- (this.inversePoints = G),
- (this.inversePoint = z),
- (this.getInverseMatrix = B),
- (this._t = this.transform),
- (this.isIdentity = u),
- (this._identity = !0),
- (this._identityCalculated = !1),
- (this.props = createTypedArray('float32', 16)),
- this.reset();
- };
- })();
- function _typeof$3(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof$3 = function (r) {
- return typeof r;
- })
- : (_typeof$3 = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof$3(e)
- );
- }
- var lottie = {};
- function setLocation(e) {
- setLocationHref(e);
- }
- function searchAnimations() {
- animationManager.searchAnimations();
- }
- function setSubframeRendering(e) {
- setSubframeEnabled(e);
- }
- function setPrefix(e) {
- setIdPrefix(e);
- }
- function loadAnimation(e) {
- return animationManager.loadAnimation(e);
- }
- function setQuality(e) {
- if (typeof e == 'string')
- switch (e) {
- case 'high':
- setDefaultCurveSegments(200);
- break;
- default:
- case 'medium':
- setDefaultCurveSegments(50);
- break;
- case 'low':
- setDefaultCurveSegments(10);
- break;
- }
- else !isNaN(e) && e > 1 && setDefaultCurveSegments(e);
- }
- function inBrowser() {
- return typeof navigator < 'u';
- }
- function installPlugin(e, t) {
- e === 'expressions' && setExpressionsPlugin(t);
- }
- function getFactory(e) {
- switch (e) {
- case 'propertyFactory':
- return PropertyFactory;
- case 'shapePropertyFactory':
- return ShapePropertyFactory;
- case 'matrix':
- return Matrix;
- default:
- return null;
- }
- }
- (lottie.play = animationManager.play),
- (lottie.pause = animationManager.pause),
- (lottie.setLocationHref = setLocation),
- (lottie.togglePause = animationManager.togglePause),
- (lottie.setSpeed = animationManager.setSpeed),
- (lottie.setDirection = animationManager.setDirection),
- (lottie.stop = animationManager.stop),
- (lottie.searchAnimations = searchAnimations),
- (lottie.registerAnimation = animationManager.registerAnimation),
- (lottie.loadAnimation = loadAnimation),
- (lottie.setSubframeRendering = setSubframeRendering),
- (lottie.resize = animationManager.resize),
- (lottie.goToAndStop = animationManager.goToAndStop),
- (lottie.destroy = animationManager.destroy),
- (lottie.setQuality = setQuality),
- (lottie.inBrowser = inBrowser),
- (lottie.installPlugin = installPlugin),
- (lottie.freeze = animationManager.freeze),
- (lottie.unfreeze = animationManager.unfreeze),
- (lottie.setVolume = animationManager.setVolume),
- (lottie.mute = animationManager.mute),
- (lottie.unmute = animationManager.unmute),
- (lottie.getRegisteredAnimations =
- animationManager.getRegisteredAnimations),
- (lottie.useWebWorker = setWebWorker),
- (lottie.setIDPrefix = setPrefix),
- (lottie.__getFactory = getFactory),
- (lottie.version = '5.12.2');
- function checkReady() {
- document.readyState === 'complete' &&
- (clearInterval(readyStateCheckInterval), searchAnimations());
- }
- function getQueryVariable(e) {
- for (var t = queryString.split('&'), r = 0; r < t.length; r += 1) {
- var i = t[r].split('=');
- if (decodeURIComponent(i[0]) == e) return decodeURIComponent(i[1]);
- }
- return null;
- }
- var queryString = '';
- {
- var scripts = document.getElementsByTagName('script'),
- index = scripts.length - 1,
- myScript = scripts[index] || { src: '' };
- (queryString = myScript.src
- ? myScript.src.replace(/^[^\?]+\??/, '')
- : ''),
- getQueryVariable('renderer');
- }
- var readyStateCheckInterval = setInterval(checkReady, 100);
- try {
- _typeof$3(exports) !== 'object' && (window.bodymovin = lottie);
- } catch (e) {}
- var ShapeModifiers = (function () {
- var e = {},
- t = {};
- (e.registerModifier = r), (e.getModifier = i);
- function r(s, a) {
- t[s] || (t[s] = a);
- }
- function i(s, a, o) {
- return new t[s](a, o);
- }
- return e;
- })();
- function ShapeModifier() {}
- (ShapeModifier.prototype.initModifierProperties = function () {}),
- (ShapeModifier.prototype.addShapeToModifier = function () {}),
- (ShapeModifier.prototype.addShape = function (e) {
- if (!this.closed) {
- e.sh.container.addDynamicProperty(e.sh);
- var t = {
- shape: e.sh,
- data: e,
- localShapeCollection: shapeCollectionPool.newShapeCollection()
- };
- this.shapes.push(t),
- this.addShapeToModifier(t),
- this._isAnimated && e.setAsAnimated();
- }
- }),
- (ShapeModifier.prototype.init = function (e, t) {
- (this.shapes = []),
- (this.elem = e),
- this.initDynamicPropertyContainer(e),
- this.initModifierProperties(e, t),
- (this.frameId = initialDefaultFrame),
- (this.closed = !1),
- (this.k = !1),
- this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0);
- }),
- (ShapeModifier.prototype.processKeys = function () {
- this.elem.globalData.frameId !== this.frameId &&
- ((this.frameId = this.elem.globalData.frameId),
- this.iterateDynamicProperties());
- }),
- extendPrototype([DynamicPropertyContainer], ShapeModifier);
- function TrimModifier() {}
- extendPrototype([ShapeModifier], TrimModifier),
- (TrimModifier.prototype.initModifierProperties = function (e, t) {
- (this.s = PropertyFactory.getProp(e, t.s, 0, 0.01, this)),
- (this.e = PropertyFactory.getProp(e, t.e, 0, 0.01, this)),
- (this.o = PropertyFactory.getProp(e, t.o, 0, 0, this)),
- (this.sValue = 0),
- (this.eValue = 0),
- (this.getValue = this.processKeys),
- (this.m = t.m),
- (this._isAnimated =
- !!this.s.effectsSequence.length ||
- !!this.e.effectsSequence.length ||
- !!this.o.effectsSequence.length);
- }),
- (TrimModifier.prototype.addShapeToModifier = function (e) {
- e.pathsData = [];
- }),
- (TrimModifier.prototype.calculateShapeEdges = function (e, t, r, i, s) {
- var a = [];
- t <= 1
- ? a.push({ s: e, e: t })
- : e >= 1
- ? a.push({ s: e - 1, e: t - 1 })
- : (a.push({ s: e, e: 1 }), a.push({ s: 0, e: t - 1 }));
- var o = [],
- n,
- l = a.length,
- f;
- for (n = 0; n < l; n += 1)
- if (((f = a[n]), !(f.e * s < i || f.s * s > i + r))) {
- var g, S;
- f.s * s <= i ? (g = 0) : (g = (f.s * s - i) / r),
- f.e * s >= i + r ? (S = 1) : (S = (f.e * s - i) / r),
- o.push([g, S]);
- }
- return o.length || o.push([0, 0]), o;
- }),
- (TrimModifier.prototype.releasePathsData = function (e) {
- var t,
- r = e.length;
- for (t = 0; t < r; t += 1) segmentsLengthPool.release(e[t]);
- return (e.length = 0), e;
- }),
- (TrimModifier.prototype.processShapes = function (e) {
- var t, r;
- if (this._mdf || e) {
- var i = (this.o.v % 360) / 360;
- if (
- (i < 0 && (i += 1),
- this.s.v > 1
- ? (t = 1 + i)
- : this.s.v < 0
- ? (t = 0 + i)
- : (t = this.s.v + i),
- this.e.v > 1
- ? (r = 1 + i)
- : this.e.v < 0
- ? (r = 0 + i)
- : (r = this.e.v + i),
- t > r)
- ) {
- var s = t;
- (t = r), (r = s);
- }
- (t = Math.round(t * 1e4) * 1e-4),
- (r = Math.round(r * 1e4) * 1e-4),
- (this.sValue = t),
- (this.eValue = r);
- } else (t = this.sValue), (r = this.eValue);
- var a,
- o,
- n = this.shapes.length,
- l,
- f,
- g,
- S,
- c,
- P = 0;
- if (r === t)
- for (o = 0; o < n; o += 1)
- this.shapes[o].localShapeCollection.releaseShapes(),
- (this.shapes[o].shape._mdf = !0),
- (this.shapes[o].shape.paths =
- this.shapes[o].localShapeCollection),
- this._mdf && (this.shapes[o].pathsData.length = 0);
- else if ((r === 1 && t === 0) || (r === 0 && t === 1)) {
- if (this._mdf)
- for (o = 0; o < n; o += 1)
- (this.shapes[o].pathsData.length = 0),
- (this.shapes[o].shape._mdf = !0);
- } else {
- var d = [],
- p,
- x;
- for (o = 0; o < n; o += 1)
- if (
- ((p = this.shapes[o]),
- !p.shape._mdf && !this._mdf && !e && this.m !== 2)
- )
- p.shape.paths = p.localShapeCollection;
- else {
- if (
- ((a = p.shape.paths),
- (f = a._length),
- (c = 0),
- !p.shape._mdf && p.pathsData.length)
- )
- c = p.totalShapeLength;
- else {
- for (
- g = this.releasePathsData(p.pathsData), l = 0;
- l < f;
- l += 1
- )
- (S = bez.getSegmentsLength(a.shapes[l])),
- g.push(S),
- (c += S.totalLength);
- (p.totalShapeLength = c), (p.pathsData = g);
- }
- (P += c), (p.shape._mdf = !0);
- }
- var u = t,
- y = r,
- m = 0,
- A;
- for (o = n - 1; o >= 0; o -= 1)
- if (((p = this.shapes[o]), p.shape._mdf)) {
- for (
- x = p.localShapeCollection,
- x.releaseShapes(),
- this.m === 2 && n > 1
- ? ((A = this.calculateShapeEdges(
- t,
- r,
- p.totalShapeLength,
- m,
- P
- )),
- (m += p.totalShapeLength))
- : (A = [[u, y]]),
- f = A.length,
- l = 0;
- l < f;
- l += 1
- ) {
- (u = A[l][0]),
- (y = A[l][1]),
- (d.length = 0),
- y <= 1
- ? d.push({
- s: p.totalShapeLength * u,
- e: p.totalShapeLength * y
- })
- : u >= 1
- ? d.push({
- s: p.totalShapeLength * (u - 1),
- e: p.totalShapeLength * (y - 1)
- })
- : (d.push({
- s: p.totalShapeLength * u,
- e: p.totalShapeLength
- }),
- d.push({ s: 0, e: p.totalShapeLength * (y - 1) }));
- var T = this.addShapes(p, d[0]);
- if (d[0].s !== d[0].e) {
- if (d.length > 1) {
- var E = p.shape.paths.shapes[p.shape.paths._length - 1];
- if (E.c) {
- var _ = T.pop();
- this.addPaths(T, x), (T = this.addShapes(p, d[1], _));
- } else this.addPaths(T, x), (T = this.addShapes(p, d[1]));
- }
- this.addPaths(T, x);
- }
- }
- p.shape.paths = x;
- }
- }
- }),
- (TrimModifier.prototype.addPaths = function (e, t) {
- var r,
- i = e.length;
- for (r = 0; r < i; r += 1) t.addShape(e[r]);
- }),
- (TrimModifier.prototype.addSegment = function (e, t, r, i, s, a, o) {
- s.setXYAt(t[0], t[1], 'o', a),
- s.setXYAt(r[0], r[1], 'i', a + 1),
- o && s.setXYAt(e[0], e[1], 'v', a),
- s.setXYAt(i[0], i[1], 'v', a + 1);
- }),
- (TrimModifier.prototype.addSegmentFromArray = function (e, t, r, i) {
- t.setXYAt(e[1], e[5], 'o', r),
- t.setXYAt(e[2], e[6], 'i', r + 1),
- i && t.setXYAt(e[0], e[4], 'v', r),
- t.setXYAt(e[3], e[7], 'v', r + 1);
- }),
- (TrimModifier.prototype.addShapes = function (e, t, r) {
- var i = e.pathsData,
- s = e.shape.paths.shapes,
- a,
- o = e.shape.paths._length,
- n,
- l,
- f = 0,
- g,
- S,
- c,
- P,
- d = [],
- p,
- x = !0;
- for (
- r
- ? ((S = r._length), (p = r._length))
- : ((r = shapePool.newElement()), (S = 0), (p = 0)),
- d.push(r),
- a = 0;
- a < o;
- a += 1
- ) {
- for (
- c = i[a].lengths,
- r.c = s[a].c,
- l = s[a].c ? c.length : c.length + 1,
- n = 1;
- n < l;
- n += 1
- )
- if (((g = c[n - 1]), f + g.addedLength < t.s))
- (f += g.addedLength), (r.c = !1);
- else if (f > t.e) {
- r.c = !1;
- break;
- } else
- t.s <= f && t.e >= f + g.addedLength
- ? (this.addSegment(
- s[a].v[n - 1],
- s[a].o[n - 1],
- s[a].i[n],
- s[a].v[n],
- r,
- S,
- x
- ),
- (x = !1))
- : ((P = bez.getNewSegment(
- s[a].v[n - 1],
- s[a].v[n],
- s[a].o[n - 1],
- s[a].i[n],
- (t.s - f) / g.addedLength,
- (t.e - f) / g.addedLength,
- c[n - 1]
- )),
- this.addSegmentFromArray(P, r, S, x),
- (x = !1),
- (r.c = !1)),
- (f += g.addedLength),
- (S += 1);
- if (s[a].c && c.length) {
- if (((g = c[n - 1]), f <= t.e)) {
- var u = c[n - 1].addedLength;
- t.s <= f && t.e >= f + u
- ? (this.addSegment(
- s[a].v[n - 1],
- s[a].o[n - 1],
- s[a].i[0],
- s[a].v[0],
- r,
- S,
- x
- ),
- (x = !1))
- : ((P = bez.getNewSegment(
- s[a].v[n - 1],
- s[a].v[0],
- s[a].o[n - 1],
- s[a].i[0],
- (t.s - f) / u,
- (t.e - f) / u,
- c[n - 1]
- )),
- this.addSegmentFromArray(P, r, S, x),
- (x = !1),
- (r.c = !1));
- } else r.c = !1;
- (f += g.addedLength), (S += 1);
- }
- if (
- (r._length &&
- (r.setXYAt(r.v[p][0], r.v[p][1], 'i', p),
- r.setXYAt(
- r.v[r._length - 1][0],
- r.v[r._length - 1][1],
- 'o',
- r._length - 1
- )),
- f > t.e)
- )
- break;
- a < o - 1 &&
- ((r = shapePool.newElement()), (x = !0), d.push(r), (S = 0));
- }
- return d;
- });
- function PuckerAndBloatModifier() {}
- extendPrototype([ShapeModifier], PuckerAndBloatModifier),
- (PuckerAndBloatModifier.prototype.initModifierProperties = function (
- e,
- t
- ) {
- (this.getValue = this.processKeys),
- (this.amount = PropertyFactory.getProp(e, t.a, 0, null, this)),
- (this._isAnimated = !!this.amount.effectsSequence.length);
- }),
- (PuckerAndBloatModifier.prototype.processPath = function (e, t) {
- var r = t / 100,
- i = [0, 0],
- s = e._length,
- a = 0;
- for (a = 0; a < s; a += 1) (i[0] += e.v[a][0]), (i[1] += e.v[a][1]);
- (i[0] /= s), (i[1] /= s);
- var o = shapePool.newElement();
- o.c = e.c;
- var n, l, f, g, S, c;
- for (a = 0; a < s; a += 1)
- (n = e.v[a][0] + (i[0] - e.v[a][0]) * r),
- (l = e.v[a][1] + (i[1] - e.v[a][1]) * r),
- (f = e.o[a][0] + (i[0] - e.o[a][0]) * -r),
- (g = e.o[a][1] + (i[1] - e.o[a][1]) * -r),
- (S = e.i[a][0] + (i[0] - e.i[a][0]) * -r),
- (c = e.i[a][1] + (i[1] - e.i[a][1]) * -r),
- o.setTripleAt(n, l, f, g, S, c, a);
- return o;
- }),
- (PuckerAndBloatModifier.prototype.processShapes = function (e) {
- var t,
- r,
- i = this.shapes.length,
- s,
- a,
- o = this.amount.v;
- if (o !== 0) {
- var n, l;
- for (r = 0; r < i; r += 1) {
- if (
- ((n = this.shapes[r]),
- (l = n.localShapeCollection),
- !(!n.shape._mdf && !this._mdf && !e))
- )
- for (
- l.releaseShapes(),
- n.shape._mdf = !0,
- t = n.shape.paths.shapes,
- a = n.shape.paths._length,
- s = 0;
- s < a;
- s += 1
- )
- l.addShape(this.processPath(t[s], o));
- n.shape.paths = n.localShapeCollection;
- }
- }
- this.dynamicProperties.length || (this._mdf = !1);
- });
- var TransformPropertyFactory = (function () {
- var e = [0, 0];
- function t(l) {
- var f = this._mdf;
- this.iterateDynamicProperties(),
- (this._mdf = this._mdf || f),
- this.a && l.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
- this.s && l.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
- this.sk && l.skewFromAxis(-this.sk.v, this.sa.v),
- this.r
- ? l.rotate(-this.r.v)
- : l
- .rotateZ(-this.rz.v)
- .rotateY(this.ry.v)
- .rotateX(this.rx.v)
- .rotateZ(-this.or.v[2])
- .rotateY(this.or.v[1])
- .rotateX(this.or.v[0]),
- this.data.p.s
- ? this.data.p.z
- ? l.translate(this.px.v, this.py.v, -this.pz.v)
- : l.translate(this.px.v, this.py.v, 0)
- : l.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
- }
- function r(l) {
- if (this.elem.globalData.frameId !== this.frameId) {
- if (
- (this._isDirty &&
- (this.precalculateMatrix(), (this._isDirty = !1)),
- this.iterateDynamicProperties(),
- this._mdf || l)
- ) {
- var f;
- if (
- (this.v.cloneFromProps(this.pre.props),
- this.appliedTransformations < 1 &&
- this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
- this.appliedTransformations < 2 &&
- this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
- this.sk &&
- this.appliedTransformations < 3 &&
- this.v.skewFromAxis(-this.sk.v, this.sa.v),
- this.r && this.appliedTransformations < 4
- ? this.v.rotate(-this.r.v)
- : !this.r &&
- this.appliedTransformations < 4 &&
- this.v
- .rotateZ(-this.rz.v)
- .rotateY(this.ry.v)
- .rotateX(this.rx.v)
- .rotateZ(-this.or.v[2])
- .rotateY(this.or.v[1])
- .rotateX(this.or.v[0]),
- this.autoOriented)
- ) {
- var g, S;
- if (
- ((f = this.elem.globalData.frameRate),
- this.p && this.p.keyframes && this.p.getValueAtTime)
- )
- this.p._caching.lastFrame + this.p.offsetTime <=
- this.p.keyframes[0].t
- ? ((g = this.p.getValueAtTime(
- (this.p.keyframes[0].t + 0.01) / f,
- 0
- )),
- (S = this.p.getValueAtTime(this.p.keyframes[0].t / f, 0)))
- : this.p._caching.lastFrame + this.p.offsetTime >=
- this.p.keyframes[this.p.keyframes.length - 1].t
- ? ((g = this.p.getValueAtTime(
- this.p.keyframes[this.p.keyframes.length - 1].t / f,
- 0
- )),
- (S = this.p.getValueAtTime(
- (this.p.keyframes[this.p.keyframes.length - 1].t -
- 0.05) /
- f,
- 0
- )))
- : ((g = this.p.pv),
- (S = this.p.getValueAtTime(
- (this.p._caching.lastFrame + this.p.offsetTime - 0.01) /
- f,
- this.p.offsetTime
- )));
- else if (
- this.px &&
- this.px.keyframes &&
- this.py.keyframes &&
- this.px.getValueAtTime &&
- this.py.getValueAtTime
- ) {
- (g = []), (S = []);
- var c = this.px,
- P = this.py;
- c._caching.lastFrame + c.offsetTime <= c.keyframes[0].t
- ? ((g[0] = c.getValueAtTime(
- (c.keyframes[0].t + 0.01) / f,
- 0
- )),
- (g[1] = P.getValueAtTime(
- (P.keyframes[0].t + 0.01) / f,
- 0
- )),
- (S[0] = c.getValueAtTime(c.keyframes[0].t / f, 0)),
- (S[1] = P.getValueAtTime(P.keyframes[0].t / f, 0)))
- : c._caching.lastFrame + c.offsetTime >=
- c.keyframes[c.keyframes.length - 1].t
- ? ((g[0] = c.getValueAtTime(
- c.keyframes[c.keyframes.length - 1].t / f,
- 0
- )),
- (g[1] = P.getValueAtTime(
- P.keyframes[P.keyframes.length - 1].t / f,
- 0
- )),
- (S[0] = c.getValueAtTime(
- (c.keyframes[c.keyframes.length - 1].t - 0.01) / f,
- 0
- )),
- (S[1] = P.getValueAtTime(
- (P.keyframes[P.keyframes.length - 1].t - 0.01) / f,
- 0
- )))
- : ((g = [c.pv, P.pv]),
- (S[0] = c.getValueAtTime(
- (c._caching.lastFrame + c.offsetTime - 0.01) / f,
- c.offsetTime
- )),
- (S[1] = P.getValueAtTime(
- (P._caching.lastFrame + P.offsetTime - 0.01) / f,
- P.offsetTime
- )));
- } else (S = e), (g = S);
- this.v.rotate(-Math.atan2(g[1] - S[1], g[0] - S[0]));
- }
- this.data.p && this.data.p.s
- ? this.data.p.z
- ? this.v.translate(this.px.v, this.py.v, -this.pz.v)
- : this.v.translate(this.px.v, this.py.v, 0)
- : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
- }
- this.frameId = this.elem.globalData.frameId;
- }
- }
- function i() {
- if (
- ((this.appliedTransformations = 0),
- this.pre.reset(),
- !this.a.effectsSequence.length)
- )
- this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]),
- (this.appliedTransformations = 1);
- else return;
- if (!this.s.effectsSequence.length)
- this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]),
- (this.appliedTransformations = 2);
- else return;
- if (this.sk)
- if (
- !this.sk.effectsSequence.length &&
- !this.sa.effectsSequence.length
- )
- this.pre.skewFromAxis(-this.sk.v, this.sa.v),
- (this.appliedTransformations = 3);
- else return;
- this.r
- ? this.r.effectsSequence.length ||
- (this.pre.rotate(-this.r.v), (this.appliedTransformations = 4))
- : !this.rz.effectsSequence.length &&
- !this.ry.effectsSequence.length &&
- !this.rx.effectsSequence.length &&
- !this.or.effectsSequence.length &&
- (this.pre
- .rotateZ(-this.rz.v)
- .rotateY(this.ry.v)
- .rotateX(this.rx.v)
- .rotateZ(-this.or.v[2])
- .rotateY(this.or.v[1])
- .rotateX(this.or.v[0]),
- (this.appliedTransformations = 4));
- }
- function s() {}
- function a(l) {
- this._addDynamicProperty(l),
- this.elem.addDynamicProperty(l),
- (this._isDirty = !0);
- }
- function o(l, f, g) {
- if (
- ((this.elem = l),
- (this.frameId = -1),
- (this.propType = 'transform'),
- (this.data = f),
- (this.v = new Matrix()),
- (this.pre = new Matrix()),
- (this.appliedTransformations = 0),
- this.initDynamicPropertyContainer(g || l),
- f.p && f.p.s
- ? ((this.px = PropertyFactory.getProp(l, f.p.x, 0, 0, this)),
- (this.py = PropertyFactory.getProp(l, f.p.y, 0, 0, this)),
- f.p.z &&
- (this.pz = PropertyFactory.getProp(l, f.p.z, 0, 0, this)))
- : (this.p = PropertyFactory.getProp(
- l,
- f.p || { k: [0, 0, 0] },
- 1,
- 0,
- this
- )),
- f.rx)
- ) {
- if (
- ((this.rx = PropertyFactory.getProp(l, f.rx, 0, degToRads, this)),
- (this.ry = PropertyFactory.getProp(l, f.ry, 0, degToRads, this)),
- (this.rz = PropertyFactory.getProp(l, f.rz, 0, degToRads, this)),
- f.or.k[0].ti)
- ) {
- var S,
- c = f.or.k.length;
- for (S = 0; S < c; S += 1)
- (f.or.k[S].to = null), (f.or.k[S].ti = null);
- }
- (this.or = PropertyFactory.getProp(l, f.or, 1, degToRads, this)),
- (this.or.sh = !0);
- } else
- this.r = PropertyFactory.getProp(
- l,
- f.r || { k: 0 },
- 0,
- degToRads,
- this
- );
- f.sk &&
- ((this.sk = PropertyFactory.getProp(l, f.sk, 0, degToRads, this)),
- (this.sa = PropertyFactory.getProp(l, f.sa, 0, degToRads, this))),
- (this.a = PropertyFactory.getProp(
- l,
- f.a || { k: [0, 0, 0] },
- 1,
- 0,
- this
- )),
- (this.s = PropertyFactory.getProp(
- l,
- f.s || { k: [100, 100, 100] },
- 1,
- 0.01,
- this
- )),
- f.o
- ? (this.o = PropertyFactory.getProp(l, f.o, 0, 0.01, l))
- : (this.o = { _mdf: !1, v: 1 }),
- (this._isDirty = !0),
- this.dynamicProperties.length || this.getValue(!0);
- }
- (o.prototype = {
- applyToMatrix: t,
- getValue: r,
- precalculateMatrix: i,
- autoOrient: s
- }),
- extendPrototype([DynamicPropertyContainer], o),
- (o.prototype.addDynamicProperty = a),
- (o.prototype._addDynamicProperty =
- DynamicPropertyContainer.prototype.addDynamicProperty);
- function n(l, f, g) {
- return new o(l, f, g);
- }
- return { getTransformProperty: n };
- })();
- function RepeaterModifier() {}
- extendPrototype([ShapeModifier], RepeaterModifier),
- (RepeaterModifier.prototype.initModifierProperties = function (e, t) {
- (this.getValue = this.processKeys),
- (this.c = PropertyFactory.getProp(e, t.c, 0, null, this)),
- (this.o = PropertyFactory.getProp(e, t.o, 0, null, this)),
- (this.tr = TransformPropertyFactory.getTransformProperty(
- e,
- t.tr,
- this
- )),
- (this.so = PropertyFactory.getProp(e, t.tr.so, 0, 0.01, this)),
- (this.eo = PropertyFactory.getProp(e, t.tr.eo, 0, 0.01, this)),
- (this.data = t),
- this.dynamicProperties.length || this.getValue(!0),
- (this._isAnimated = !!this.dynamicProperties.length),
- (this.pMatrix = new Matrix()),
- (this.rMatrix = new Matrix()),
- (this.sMatrix = new Matrix()),
- (this.tMatrix = new Matrix()),
- (this.matrix = new Matrix());
- }),
- (RepeaterModifier.prototype.applyTransforms = function (
- e,
- t,
- r,
- i,
- s,
- a
- ) {
- var o = a ? -1 : 1,
- n = i.s.v[0] + (1 - i.s.v[0]) * (1 - s),
- l = i.s.v[1] + (1 - i.s.v[1]) * (1 - s);
- e.translate(i.p.v[0] * o * s, i.p.v[1] * o * s, i.p.v[2]),
- t.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]),
- t.rotate(-i.r.v * o * s),
- t.translate(i.a.v[0], i.a.v[1], i.a.v[2]),
- r.translate(-i.a.v[0], -i.a.v[1], i.a.v[2]),
- r.scale(a ? 1 / n : n, a ? 1 / l : l),
- r.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
- }),
- (RepeaterModifier.prototype.init = function (e, t, r, i) {
- for (
- this.elem = e,
- this.arr = t,
- this.pos = r,
- this.elemsData = i,
- this._currentCopies = 0,
- this._elements = [],
- this._groups = [],
- this.frameId = -1,
- this.initDynamicPropertyContainer(e),
- this.initModifierProperties(e, t[r]);
- r > 0;
- )
- (r -= 1), this._elements.unshift(t[r]);
- this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0);
- }),
- (RepeaterModifier.prototype.resetElements = function (e) {
- var t,
- r = e.length;
- for (t = 0; t < r; t += 1)
- (e[t]._processed = !1),
- e[t].ty === 'gr' && this.resetElements(e[t].it);
- }),
- (RepeaterModifier.prototype.cloneElements = function (e) {
- var t = JSON.parse(JSON.stringify(e));
- return this.resetElements(t), t;
- }),
- (RepeaterModifier.prototype.changeGroupRender = function (e, t) {
- var r,
- i = e.length;
- for (r = 0; r < i; r += 1)
- (e[r]._render = t),
- e[r].ty === 'gr' && this.changeGroupRender(e[r].it, t);
- }),
- (RepeaterModifier.prototype.processShapes = function (e) {
- var t,
- r,
- i,
- s,
- a,
- o = !1;
- if (this._mdf || e) {
- var n = Math.ceil(this.c.v);
- if (this._groups.length < n) {
- for (; this._groups.length < n; ) {
- var l = { it: this.cloneElements(this._elements), ty: 'gr' };
- l.it.push({
- a: { a: 0, ix: 1, k: [0, 0] },
- nm: 'Transform',
- o: { a: 0, ix: 7, k: 100 },
- p: { a: 0, ix: 2, k: [0, 0] },
- r: {
- a: 1,
- ix: 6,
- k: [
- { s: 0, e: 0, t: 0 },
- { s: 0, e: 0, t: 1 }
- ]
- },
- s: { a: 0, ix: 3, k: [100, 100] },
- sa: { a: 0, ix: 5, k: 0 },
- sk: { a: 0, ix: 4, k: 0 },
- ty: 'tr'
- }),
- this.arr.splice(0, 0, l),
- this._groups.splice(0, 0, l),
- (this._currentCopies += 1);
- }
- this.elem.reloadShapes(), (o = !0);
- }
- a = 0;
- var f;
- for (i = 0; i <= this._groups.length - 1; i += 1) {
- if (
- ((f = a < n),
- (this._groups[i]._render = f),
- this.changeGroupRender(this._groups[i].it, f),
- !f)
- ) {
- var g = this.elemsData[i].it,
- S = g[g.length - 1];
- S.transform.op.v !== 0
- ? ((S.transform.op._mdf = !0), (S.transform.op.v = 0))
- : (S.transform.op._mdf = !1);
- }
- a += 1;
- }
- this._currentCopies = n;
- var c = this.o.v,
- P = c % 1,
- d = c > 0 ? Math.floor(c) : Math.ceil(c),
- p = this.pMatrix.props,
- x = this.rMatrix.props,
- u = this.sMatrix.props;
- this.pMatrix.reset(),
- this.rMatrix.reset(),
- this.sMatrix.reset(),
- this.tMatrix.reset(),
- this.matrix.reset();
- var y = 0;
- if (c > 0) {
- for (; y < d; )
- this.applyTransforms(
- this.pMatrix,
- this.rMatrix,
- this.sMatrix,
- this.tr,
- 1,
- !1
- ),
- (y += 1);
- P &&
- (this.applyTransforms(
- this.pMatrix,
- this.rMatrix,
- this.sMatrix,
- this.tr,
- P,
- !1
- ),
- (y += P));
- } else if (c < 0) {
- for (; y > d; )
- this.applyTransforms(
- this.pMatrix,
- this.rMatrix,
- this.sMatrix,
- this.tr,
- 1,
- !0
- ),
- (y -= 1);
- P &&
- (this.applyTransforms(
- this.pMatrix,
- this.rMatrix,
- this.sMatrix,
- this.tr,
- -P,
- !0
- ),
- (y -= P));
- }
- (i = this.data.m === 1 ? 0 : this._currentCopies - 1),
- (s = this.data.m === 1 ? 1 : -1),
- (a = this._currentCopies);
- for (var m, A; a; ) {
- if (
- ((t = this.elemsData[i].it),
- (r = t[t.length - 1].transform.mProps.v.props),
- (A = r.length),
- (t[t.length - 1].transform.mProps._mdf = !0),
- (t[t.length - 1].transform.op._mdf = !0),
- (t[t.length - 1].transform.op.v =
- this._currentCopies === 1
- ? this.so.v
- : this.so.v +
- (this.eo.v - this.so.v) *
- (i / (this._currentCopies - 1))),
- y !== 0)
- ) {
- for (
- ((i !== 0 && s === 1) ||
- (i !== this._currentCopies - 1 && s === -1)) &&
- this.applyTransforms(
- this.pMatrix,
- this.rMatrix,
- this.sMatrix,
- this.tr,
- 1,
- !1
- ),
- this.matrix.transform(
- x[0],
- x[1],
- x[2],
- x[3],
- x[4],
- x[5],
- x[6],
- x[7],
- x[8],
- x[9],
- x[10],
- x[11],
- x[12],
- x[13],
- x[14],
- x[15]
- ),
- this.matrix.transform(
- u[0],
- u[1],
- u[2],
- u[3],
- u[4],
- u[5],
- u[6],
- u[7],
- u[8],
- u[9],
- u[10],
- u[11],
- u[12],
- u[13],
- u[14],
- u[15]
- ),
- this.matrix.transform(
- p[0],
- p[1],
- p[2],
- p[3],
- p[4],
- p[5],
- p[6],
- p[7],
- p[8],
- p[9],
- p[10],
- p[11],
- p[12],
- p[13],
- p[14],
- p[15]
- ),
- m = 0;
- m < A;
- m += 1
- )
- r[m] = this.matrix.props[m];
- this.matrix.reset();
- } else
- for (this.matrix.reset(), m = 0; m < A; m += 1)
- r[m] = this.matrix.props[m];
- (y += 1), (a -= 1), (i += s);
- }
- } else
- for (a = this._currentCopies, i = 0, s = 1; a; )
- (t = this.elemsData[i].it),
- (r = t[t.length - 1].transform.mProps.v.props),
- (t[t.length - 1].transform.mProps._mdf = !1),
- (t[t.length - 1].transform.op._mdf = !1),
- (a -= 1),
- (i += s);
- return o;
- }),
- (RepeaterModifier.prototype.addShape = function () {});
- function RoundCornersModifier() {}
- extendPrototype([ShapeModifier], RoundCornersModifier),
- (RoundCornersModifier.prototype.initModifierProperties = function (
- e,
- t
- ) {
- (this.getValue = this.processKeys),
- (this.rd = PropertyFactory.getProp(e, t.r, 0, null, this)),
- (this._isAnimated = !!this.rd.effectsSequence.length);
- }),
- (RoundCornersModifier.prototype.processPath = function (e, t) {
- var r = shapePool.newElement();
- r.c = e.c;
- var i,
- s = e._length,
- a,
- o,
- n,
- l,
- f,
- g,
- S = 0,
- c,
- P,
- d,
- p,
- x,
- u;
- for (i = 0; i < s; i += 1)
- (a = e.v[i]),
- (n = e.o[i]),
- (o = e.i[i]),
- a[0] === n[0] && a[1] === n[1] && a[0] === o[0] && a[1] === o[1]
- ? (i === 0 || i === s - 1) && !e.c
- ? (r.setTripleAt(a[0], a[1], n[0], n[1], o[0], o[1], S),
- (S += 1))
- : (i === 0 ? (l = e.v[s - 1]) : (l = e.v[i - 1]),
- (f = Math.sqrt(
- Math.pow(a[0] - l[0], 2) + Math.pow(a[1] - l[1], 2)
- )),
- (g = f ? Math.min(f / 2, t) / f : 0),
- (x = a[0] + (l[0] - a[0]) * g),
- (c = x),
- (u = a[1] - (a[1] - l[1]) * g),
- (P = u),
- (d = c - (c - a[0]) * roundCorner),
- (p = P - (P - a[1]) * roundCorner),
- r.setTripleAt(c, P, d, p, x, u, S),
- (S += 1),
- i === s - 1 ? (l = e.v[0]) : (l = e.v[i + 1]),
- (f = Math.sqrt(
- Math.pow(a[0] - l[0], 2) + Math.pow(a[1] - l[1], 2)
- )),
- (g = f ? Math.min(f / 2, t) / f : 0),
- (d = a[0] + (l[0] - a[0]) * g),
- (c = d),
- (p = a[1] + (l[1] - a[1]) * g),
- (P = p),
- (x = c - (c - a[0]) * roundCorner),
- (u = P - (P - a[1]) * roundCorner),
- r.setTripleAt(c, P, d, p, x, u, S),
- (S += 1))
- : (r.setTripleAt(
- e.v[i][0],
- e.v[i][1],
- e.o[i][0],
- e.o[i][1],
- e.i[i][0],
- e.i[i][1],
- S
- ),
- (S += 1));
- return r;
- }),
- (RoundCornersModifier.prototype.processShapes = function (e) {
- var t,
- r,
- i = this.shapes.length,
- s,
- a,
- o = this.rd.v;
- if (o !== 0) {
- var n, l;
- for (r = 0; r < i; r += 1) {
- if (
- ((n = this.shapes[r]),
- (l = n.localShapeCollection),
- !(!n.shape._mdf && !this._mdf && !e))
- )
- for (
- l.releaseShapes(),
- n.shape._mdf = !0,
- t = n.shape.paths.shapes,
- a = n.shape.paths._length,
- s = 0;
- s < a;
- s += 1
- )
- l.addShape(this.processPath(t[s], o));
- n.shape.paths = n.localShapeCollection;
- }
- }
- this.dynamicProperties.length || (this._mdf = !1);
- });
- function floatEqual(e, t) {
- return Math.abs(e - t) * 1e5 <= Math.min(Math.abs(e), Math.abs(t));
- }
- function floatZero(e) {
- return Math.abs(e) <= 1e-5;
- }
- function lerp(e, t, r) {
- return e * (1 - r) + t * r;
- }
- function lerpPoint(e, t, r) {
- return [lerp(e[0], t[0], r), lerp(e[1], t[1], r)];
- }
- function quadRoots(e, t, r) {
- if (e === 0) return [];
- var i = t * t - 4 * e * r;
- if (i < 0) return [];
- var s = -t / (2 * e);
- if (i === 0) return [s];
- var a = Math.sqrt(i) / (2 * e);
- return [s - a, s + a];
- }
- function polynomialCoefficients(e, t, r, i) {
- return [
- -e + 3 * t - 3 * r + i,
- 3 * e - 6 * t + 3 * r,
- -3 * e + 3 * t,
- e
- ];
- }
- function singlePoint(e) {
- return new PolynomialBezier(e, e, e, e, !1);
- }
- function PolynomialBezier(e, t, r, i, s) {
- s && pointEqual(e, t) && (t = lerpPoint(e, i, 1 / 3)),
- s && pointEqual(r, i) && (r = lerpPoint(e, i, 2 / 3));
- var a = polynomialCoefficients(e[0], t[0], r[0], i[0]),
- o = polynomialCoefficients(e[1], t[1], r[1], i[1]);
- (this.a = [a[0], o[0]]),
- (this.b = [a[1], o[1]]),
- (this.c = [a[2], o[2]]),
- (this.d = [a[3], o[3]]),
- (this.points = [e, t, r, i]);
- }
- (PolynomialBezier.prototype.point = function (e) {
- return [
- ((this.a[0] * e + this.b[0]) * e + this.c[0]) * e + this.d[0],
- ((this.a[1] * e + this.b[1]) * e + this.c[1]) * e + this.d[1]
- ];
- }),
- (PolynomialBezier.prototype.derivative = function (e) {
- return [
- (3 * e * this.a[0] + 2 * this.b[0]) * e + this.c[0],
- (3 * e * this.a[1] + 2 * this.b[1]) * e + this.c[1]
- ];
- }),
- (PolynomialBezier.prototype.tangentAngle = function (e) {
- var t = this.derivative(e);
- return Math.atan2(t[1], t[0]);
- }),
- (PolynomialBezier.prototype.normalAngle = function (e) {
- var t = this.derivative(e);
- return Math.atan2(t[0], t[1]);
- }),
- (PolynomialBezier.prototype.inflectionPoints = function () {
- var e = this.a[1] * this.b[0] - this.a[0] * this.b[1];
- if (floatZero(e)) return [];
- var t = (-0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1])) / e,
- r =
- t * t -
- ((1 / 3) * (this.b[1] * this.c[0] - this.b[0] * this.c[1])) / e;
- if (r < 0) return [];
- var i = Math.sqrt(r);
- return floatZero(i)
- ? i > 0 && i < 1
- ? [t]
- : []
- : [t - i, t + i].filter(function (s) {
- return s > 0 && s < 1;
- });
- }),
- (PolynomialBezier.prototype.split = function (e) {
- if (e <= 0) return [singlePoint(this.points[0]), this];
- if (e >= 1)
- return [this, singlePoint(this.points[this.points.length - 1])];
- var t = lerpPoint(this.points[0], this.points[1], e),
- r = lerpPoint(this.points[1], this.points[2], e),
- i = lerpPoint(this.points[2], this.points[3], e),
- s = lerpPoint(t, r, e),
- a = lerpPoint(r, i, e),
- o = lerpPoint(s, a, e);
- return [
- new PolynomialBezier(this.points[0], t, s, o, !0),
- new PolynomialBezier(o, a, i, this.points[3], !0)
- ];
- });
- function extrema(e, t) {
- var r = e.points[0][t],
- i = e.points[e.points.length - 1][t];
- if (r > i) {
- var s = i;
- (i = r), (r = s);
- }
- for (
- var a = quadRoots(3 * e.a[t], 2 * e.b[t], e.c[t]), o = 0;
- o < a.length;
- o += 1
- )
- if (a[o] > 0 && a[o] < 1) {
- var n = e.point(a[o])[t];
- n < r ? (r = n) : n > i && (i = n);
- }
- return { min: r, max: i };
- }
- (PolynomialBezier.prototype.bounds = function () {
- return { x: extrema(this, 0), y: extrema(this, 1) };
- }),
- (PolynomialBezier.prototype.boundingBox = function () {
- var e = this.bounds();
- return {
- left: e.x.min,
- right: e.x.max,
- top: e.y.min,
- bottom: e.y.max,
- width: e.x.max - e.x.min,
- height: e.y.max - e.y.min,
- cx: (e.x.max + e.x.min) / 2,
- cy: (e.y.max + e.y.min) / 2
- };
- });
- function intersectData(e, t, r) {
- var i = e.boundingBox();
- return {
- cx: i.cx,
- cy: i.cy,
- width: i.width,
- height: i.height,
- bez: e,
- t: (t + r) / 2,
- t1: t,
- t2: r
- };
- }
- function splitData(e) {
- var t = e.bez.split(0.5);
- return [intersectData(t[0], e.t1, e.t), intersectData(t[1], e.t, e.t2)];
- }
- function boxIntersect(e, t) {
- return (
- Math.abs(e.cx - t.cx) * 2 < e.width + t.width &&
- Math.abs(e.cy - t.cy) * 2 < e.height + t.height
- );
- }
- function intersectsImpl(e, t, r, i, s, a) {
- if (boxIntersect(e, t)) {
- if (
- r >= a ||
- (e.width <= i && e.height <= i && t.width <= i && t.height <= i)
- ) {
- s.push([e.t, t.t]);
- return;
- }
- var o = splitData(e),
- n = splitData(t);
- intersectsImpl(o[0], n[0], r + 1, i, s, a),
- intersectsImpl(o[0], n[1], r + 1, i, s, a),
- intersectsImpl(o[1], n[0], r + 1, i, s, a),
- intersectsImpl(o[1], n[1], r + 1, i, s, a);
- }
- }
- (PolynomialBezier.prototype.intersections = function (e, t, r) {
- t === void 0 && (t = 2), r === void 0 && (r = 7);
- var i = [];
- return (
- intersectsImpl(
- intersectData(this, 0, 1),
- intersectData(e, 0, 1),
- 0,
- t,
- i,
- r
- ),
- i
- );
- }),
- (PolynomialBezier.shapeSegment = function (e, t) {
- var r = (t + 1) % e.length();
- return new PolynomialBezier(e.v[t], e.o[t], e.i[r], e.v[r], !0);
- }),
- (PolynomialBezier.shapeSegmentInverted = function (e, t) {
- var r = (t + 1) % e.length();
- return new PolynomialBezier(e.v[r], e.i[r], e.o[t], e.v[t], !0);
- });
- function crossProduct(e, t) {
- return [
- e[1] * t[2] - e[2] * t[1],
- e[2] * t[0] - e[0] * t[2],
- e[0] * t[1] - e[1] * t[0]
- ];
- }
- function lineIntersection(e, t, r, i) {
- var s = [e[0], e[1], 1],
- a = [t[0], t[1], 1],
- o = [r[0], r[1], 1],
- n = [i[0], i[1], 1],
- l = crossProduct(crossProduct(s, a), crossProduct(o, n));
- return floatZero(l[2]) ? null : [l[0] / l[2], l[1] / l[2]];
- }
- function polarOffset(e, t, r) {
- return [e[0] + Math.cos(t) * r, e[1] - Math.sin(t) * r];
- }
- function pointDistance(e, t) {
- return Math.hypot(e[0] - t[0], e[1] - t[1]);
- }
- function pointEqual(e, t) {
- return floatEqual(e[0], t[0]) && floatEqual(e[1], t[1]);
- }
- function ZigZagModifier() {}
- extendPrototype([ShapeModifier], ZigZagModifier),
- (ZigZagModifier.prototype.initModifierProperties = function (e, t) {
- (this.getValue = this.processKeys),
- (this.amplitude = PropertyFactory.getProp(e, t.s, 0, null, this)),
- (this.frequency = PropertyFactory.getProp(e, t.r, 0, null, this)),
- (this.pointsType = PropertyFactory.getProp(e, t.pt, 0, null, this)),
- (this._isAnimated =
- this.amplitude.effectsSequence.length !== 0 ||
- this.frequency.effectsSequence.length !== 0 ||
- this.pointsType.effectsSequence.length !== 0);
- });
- function setPoint(e, t, r, i, s, a, o) {
- var n = r - Math.PI / 2,
- l = r + Math.PI / 2,
- f = t[0] + Math.cos(r) * i * s,
- g = t[1] - Math.sin(r) * i * s;
- e.setTripleAt(
- f,
- g,
- f + Math.cos(n) * a,
- g - Math.sin(n) * a,
- f + Math.cos(l) * o,
- g - Math.sin(l) * o,
- e.length()
- );
- }
- function getPerpendicularVector(e, t) {
- var r = [t[0] - e[0], t[1] - e[1]],
- i = -Math.PI * 0.5,
- s = [
- Math.cos(i) * r[0] - Math.sin(i) * r[1],
- Math.sin(i) * r[0] + Math.cos(i) * r[1]
- ];
- return s;
- }
- function getProjectingAngle(e, t) {
- var r = t === 0 ? e.length() - 1 : t - 1,
- i = (t + 1) % e.length(),
- s = e.v[r],
- a = e.v[i],
- o = getPerpendicularVector(s, a);
- return Math.atan2(0, 1) - Math.atan2(o[1], o[0]);
- }
- function zigZagCorner(e, t, r, i, s, a, o) {
- var n = getProjectingAngle(t, r),
- l = t.v[r % t._length],
- f = t.v[r === 0 ? t._length - 1 : r - 1],
- g = t.v[(r + 1) % t._length],
- S =
- a === 2
- ? Math.sqrt(Math.pow(l[0] - f[0], 2) + Math.pow(l[1] - f[1], 2))
- : 0,
- c =
- a === 2
- ? Math.sqrt(Math.pow(l[0] - g[0], 2) + Math.pow(l[1] - g[1], 2))
- : 0;
- setPoint(
- e,
- t.v[r % t._length],
- n,
- o,
- i,
- c / ((s + 1) * 2),
- S / ((s + 1) * 2)
- );
- }
- function zigZagSegment(e, t, r, i, s, a) {
- for (var o = 0; o < i; o += 1) {
- var n = (o + 1) / (i + 1),
- l =
- s === 2
- ? Math.sqrt(
- Math.pow(t.points[3][0] - t.points[0][0], 2) +
- Math.pow(t.points[3][1] - t.points[0][1], 2)
- )
- : 0,
- f = t.normalAngle(n),
- g = t.point(n);
- setPoint(e, g, f, a, r, l / ((i + 1) * 2), l / ((i + 1) * 2)),
- (a = -a);
- }
- return a;
- }
- (ZigZagModifier.prototype.processPath = function (e, t, r, i) {
- var s = e._length,
- a = shapePool.newElement();
- if (((a.c = e.c), e.c || (s -= 1), s === 0)) return a;
- var o = -1,
- n = PolynomialBezier.shapeSegment(e, 0);
- zigZagCorner(a, e, 0, t, r, i, o);
- for (var l = 0; l < s; l += 1)
- (o = zigZagSegment(a, n, t, r, i, -o)),
- l === s - 1 && !e.c
- ? (n = null)
- : (n = PolynomialBezier.shapeSegment(e, (l + 1) % s)),
- zigZagCorner(a, e, l + 1, t, r, i, o);
- return a;
- }),
- (ZigZagModifier.prototype.processShapes = function (e) {
- var t,
- r,
- i = this.shapes.length,
- s,
- a,
- o = this.amplitude.v,
- n = Math.max(0, Math.round(this.frequency.v)),
- l = this.pointsType.v;
- if (o !== 0) {
- var f, g;
- for (r = 0; r < i; r += 1) {
- if (
- ((f = this.shapes[r]),
- (g = f.localShapeCollection),
- !(!f.shape._mdf && !this._mdf && !e))
- )
- for (
- g.releaseShapes(),
- f.shape._mdf = !0,
- t = f.shape.paths.shapes,
- a = f.shape.paths._length,
- s = 0;
- s < a;
- s += 1
- )
- g.addShape(this.processPath(t[s], o, n, l));
- f.shape.paths = f.localShapeCollection;
- }
- }
- this.dynamicProperties.length || (this._mdf = !1);
- });
- function linearOffset(e, t, r) {
- var i = Math.atan2(t[0] - e[0], t[1] - e[1]);
- return [polarOffset(e, i, r), polarOffset(t, i, r)];
- }
- function offsetSegment(e, t) {
- var r, i, s, a, o, n, l;
- (l = linearOffset(e.points[0], e.points[1], t)),
- (r = l[0]),
- (i = l[1]),
- (l = linearOffset(e.points[1], e.points[2], t)),
- (s = l[0]),
- (a = l[1]),
- (l = linearOffset(e.points[2], e.points[3], t)),
- (o = l[0]),
- (n = l[1]);
- var f = lineIntersection(r, i, s, a);
- f === null && (f = i);
- var g = lineIntersection(o, n, s, a);
- return g === null && (g = o), new PolynomialBezier(r, f, g, n);
- }
- function joinLines(e, t, r, i, s) {
- var a = t.points[3],
- o = r.points[0];
- if (i === 3 || pointEqual(a, o)) return a;
- if (i === 2) {
- var n = -t.tangentAngle(1),
- l = -r.tangentAngle(0) + Math.PI,
- f = lineIntersection(
- a,
- polarOffset(a, n + Math.PI / 2, 100),
- o,
- polarOffset(o, n + Math.PI / 2, 100)
- ),
- g = f ? pointDistance(f, a) : pointDistance(a, o) / 2,
- S = polarOffset(a, n, 2 * g * roundCorner);
- return (
- e.setXYAt(S[0], S[1], 'o', e.length() - 1),
- (S = polarOffset(o, l, 2 * g * roundCorner)),
- e.setTripleAt(o[0], o[1], o[0], o[1], S[0], S[1], e.length()),
- o
- );
- }
- var c = pointEqual(a, t.points[2]) ? t.points[0] : t.points[2],
- P = pointEqual(o, r.points[1]) ? r.points[3] : r.points[1],
- d = lineIntersection(c, a, o, P);
- return d && pointDistance(d, a) < s
- ? (e.setTripleAt(d[0], d[1], d[0], d[1], d[0], d[1], e.length()), d)
- : a;
- }
- function getIntersection(e, t) {
- var r = e.intersections(t);
- return (
- r.length && floatEqual(r[0][0], 1) && r.shift(),
- r.length ? r[0] : null
- );
- }
- function pruneSegmentIntersection(e, t) {
- var r = e.slice(),
- i = t.slice(),
- s = getIntersection(e[e.length - 1], t[0]);
- return (
- s &&
- ((r[e.length - 1] = e[e.length - 1].split(s[0])[0]),
- (i[0] = t[0].split(s[1])[1])),
- e.length > 1 &&
- t.length > 1 &&
- ((s = getIntersection(e[0], t[t.length - 1])), s)
- ? [[e[0].split(s[0])[0]], [t[t.length - 1].split(s[1])[1]]]
- : [r, i]
- );
- }
- function pruneIntersections(e) {
- for (var t, r = 1; r < e.length; r += 1)
- (t = pruneSegmentIntersection(e[r - 1], e[r])),
- (e[r - 1] = t[0]),
- (e[r] = t[1]);
- return (
- e.length > 1 &&
- ((t = pruneSegmentIntersection(e[e.length - 1], e[0])),
- (e[e.length - 1] = t[0]),
- (e[0] = t[1])),
- e
- );
- }
- function offsetSegmentSplit(e, t) {
- var r = e.inflectionPoints(),
- i,
- s,
- a,
- o;
- if (r.length === 0) return [offsetSegment(e, t)];
- if (r.length === 1 || floatEqual(r[1], 1))
- return (
- (a = e.split(r[0])),
- (i = a[0]),
- (s = a[1]),
- [offsetSegment(i, t), offsetSegment(s, t)]
- );
- (a = e.split(r[0])), (i = a[0]);
- var n = (r[1] - r[0]) / (1 - r[0]);
- return (
- (a = a[1].split(n)),
- (o = a[0]),
- (s = a[1]),
- [offsetSegment(i, t), offsetSegment(o, t), offsetSegment(s, t)]
- );
- }
- function OffsetPathModifier() {}
- extendPrototype([ShapeModifier], OffsetPathModifier),
- (OffsetPathModifier.prototype.initModifierProperties = function (e, t) {
- (this.getValue = this.processKeys),
- (this.amount = PropertyFactory.getProp(e, t.a, 0, null, this)),
- (this.miterLimit = PropertyFactory.getProp(e, t.ml, 0, null, this)),
- (this.lineJoin = t.lj),
- (this._isAnimated = this.amount.effectsSequence.length !== 0);
- }),
- (OffsetPathModifier.prototype.processPath = function (e, t, r, i) {
- var s = shapePool.newElement();
- s.c = e.c;
- var a = e.length();
- e.c || (a -= 1);
- var o,
- n,
- l,
- f = [];
- for (o = 0; o < a; o += 1)
- (l = PolynomialBezier.shapeSegment(e, o)),
- f.push(offsetSegmentSplit(l, t));
- if (!e.c)
- for (o = a - 1; o >= 0; o -= 1)
- (l = PolynomialBezier.shapeSegmentInverted(e, o)),
- f.push(offsetSegmentSplit(l, t));
- f = pruneIntersections(f);
- var g = null,
- S = null;
- for (o = 0; o < f.length; o += 1) {
- var c = f[o];
- for (
- S && (g = joinLines(s, S, c[0], r, i)),
- S = c[c.length - 1],
- n = 0;
- n < c.length;
- n += 1
- )
- (l = c[n]),
- g && pointEqual(l.points[0], g)
- ? s.setXYAt(
- l.points[1][0],
- l.points[1][1],
- 'o',
- s.length() - 1
- )
- : s.setTripleAt(
- l.points[0][0],
- l.points[0][1],
- l.points[1][0],
- l.points[1][1],
- l.points[0][0],
- l.points[0][1],
- s.length()
- ),
- s.setTripleAt(
- l.points[3][0],
- l.points[3][1],
- l.points[3][0],
- l.points[3][1],
- l.points[2][0],
- l.points[2][1],
- s.length()
- ),
- (g = l.points[3]);
- }
- return f.length && joinLines(s, S, f[0][0], r, i), s;
- }),
- (OffsetPathModifier.prototype.processShapes = function (e) {
- var t,
- r,
- i = this.shapes.length,
- s,
- a,
- o = this.amount.v,
- n = this.miterLimit.v,
- l = this.lineJoin;
- if (o !== 0) {
- var f, g;
- for (r = 0; r < i; r += 1) {
- if (
- ((f = this.shapes[r]),
- (g = f.localShapeCollection),
- !(!f.shape._mdf && !this._mdf && !e))
- )
- for (
- g.releaseShapes(),
- f.shape._mdf = !0,
- t = f.shape.paths.shapes,
- a = f.shape.paths._length,
- s = 0;
- s < a;
- s += 1
- )
- g.addShape(this.processPath(t[s], o, l, n));
- f.shape.paths = f.localShapeCollection;
- }
- }
- this.dynamicProperties.length || (this._mdf = !1);
- });
- function getFontProperties(e) {
- for (
- var t = e.fStyle ? e.fStyle.split(' ') : [],
- r = 'normal',
- i = 'normal',
- s = t.length,
- a,
- o = 0;
- o < s;
- o += 1
- )
- switch (((a = t[o].toLowerCase()), a)) {
- case 'italic':
- i = 'italic';
- break;
- case 'bold':
- r = '700';
- break;
- case 'black':
- r = '900';
- break;
- case 'medium':
- r = '500';
- break;
- case 'regular':
- case 'normal':
- r = '400';
- break;
- case 'light':
- case 'thin':
- r = '200';
- break;
- }
- return { style: i, weight: e.fWeight || r };
- }
- var FontManager = (function () {
- var e = 5e3,
- t = { w: 0, size: 0, shapes: [], data: { shapes: [] } },
- r = [];
- r = r.concat([
- 2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368,
- 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379,
- 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403
- ]);
- var i = 127988,
- s = 917631,
- a = 917601,
- o = 917626,
- n = 65039,
- l = 8205,
- f = 127462,
- g = 127487,
- S = ['d83cdffb', 'd83cdffc', 'd83cdffd', 'd83cdffe', 'd83cdfff'];
- function c(M) {
- var k = M.split(','),
- b,
- C = k.length,
- L = [];
- for (b = 0; b < C; b += 1)
- k[b] !== 'sans-serif' && k[b] !== 'monospace' && L.push(k[b]);
- return L.join(',');
- }
- function P(M, k) {
- var b = createTag('span');
- b.setAttribute('aria-hidden', !0), (b.style.fontFamily = k);
- var C = createTag('span');
- (C.innerText = 'giItT1WQy@!-/#'),
- (b.style.position = 'absolute'),
- (b.style.left = '-10000px'),
- (b.style.top = '-10000px'),
- (b.style.fontSize = '300px'),
- (b.style.fontVariant = 'normal'),
- (b.style.fontStyle = 'normal'),
- (b.style.fontWeight = 'normal'),
- (b.style.letterSpacing = '0'),
- b.appendChild(C),
- document.body.appendChild(b);
- var L = C.offsetWidth;
- return (
- (C.style.fontFamily = c(M) + ', ' + k), { node: C, w: L, parent: b }
- );
- }
- function d() {
- var M,
- k = this.fonts.length,
- b,
- C,
- L = k;
- for (M = 0; M < k; M += 1)
- this.fonts[M].loaded
- ? (L -= 1)
- : this.fonts[M].fOrigin === 'n' || this.fonts[M].origin === 0
- ? (this.fonts[M].loaded = !0)
- : ((b = this.fonts[M].monoCase.node),
- (C = this.fonts[M].monoCase.w),
- b.offsetWidth !== C
- ? ((L -= 1), (this.fonts[M].loaded = !0))
- : ((b = this.fonts[M].sansCase.node),
- (C = this.fonts[M].sansCase.w),
- b.offsetWidth !== C &&
- ((L -= 1), (this.fonts[M].loaded = !0))),
- this.fonts[M].loaded &&
- (this.fonts[M].sansCase.parent.parentNode.removeChild(
- this.fonts[M].sansCase.parent
- ),
- this.fonts[M].monoCase.parent.parentNode.removeChild(
- this.fonts[M].monoCase.parent
- )));
- L !== 0 && Date.now() - this.initTime < e
- ? setTimeout(this.checkLoadedFontsBinded, 20)
- : setTimeout(this.setIsLoadedBinded, 10);
- }
- function p(M, k) {
- var b = document.body && k ? 'svg' : 'canvas',
- C,
- L = getFontProperties(M);
- if (b === 'svg') {
- var F = createNS('text');
- (F.style.fontSize = '100px'),
- F.setAttribute('font-family', M.fFamily),
- F.setAttribute('font-style', L.style),
- F.setAttribute('font-weight', L.weight),
- (F.textContent = '1'),
- M.fClass
- ? ((F.style.fontFamily = 'inherit'),
- F.setAttribute('class', M.fClass))
- : (F.style.fontFamily = M.fFamily),
- k.appendChild(F),
- (C = F);
- } else {
- var U = new OffscreenCanvas(500, 500).getContext('2d');
- (U.font = L.style + ' ' + L.weight + ' 100px ' + M.fFamily),
- (C = U);
- }
- function D(V) {
- return b === 'svg'
- ? ((C.textContent = V), C.getComputedTextLength())
- : C.measureText(V).width;
- }
- return { measureText: D };
- }
- function x(M, k) {
- if (!M) {
- this.isLoaded = !0;
- return;
- }
- if (this.chars) {
- (this.isLoaded = !0), (this.fonts = M.list);
- return;
- }
- if (!document.body) {
- (this.isLoaded = !0),
- M.list.forEach(function (J) {
- (J.helper = p(J)), (J.cache = {});
- }),
- (this.fonts = M.list);
- return;
- }
- var b = M.list,
- C,
- L = b.length,
- F = L;
- for (C = 0; C < L; C += 1) {
- var U = !0,
- D,
- V;
- if (
- ((b[C].loaded = !1),
- (b[C].monoCase = P(b[C].fFamily, 'monospace')),
- (b[C].sansCase = P(b[C].fFamily, 'sans-serif')),
- !b[C].fPath)
- )
- (b[C].loaded = !0), (F -= 1);
- else if (b[C].fOrigin === 'p' || b[C].origin === 3) {
- if (
- ((D = document.querySelectorAll(
- 'style[f-forigin="p"][f-family="' +
- b[C].fFamily +
- '"], style[f-origin="3"][f-family="' +
- b[C].fFamily +
- '"]'
- )),
- D.length > 0 && (U = !1),
- U)
- ) {
- var O = createTag('style');
- O.setAttribute('f-forigin', b[C].fOrigin),
- O.setAttribute('f-origin', b[C].origin),
- O.setAttribute('f-family', b[C].fFamily),
- (O.type = 'text/css'),
- (O.innerText =
- '@font-face {font-family: ' +
- b[C].fFamily +
- "; font-style: normal; src: url('" +
- b[C].fPath +
- "');}"),
- k.appendChild(O);
- }
- } else if (b[C].fOrigin === 'g' || b[C].origin === 1) {
- for (
- D = document.querySelectorAll(
- 'link[f-forigin="g"], link[f-origin="1"]'
- ),
- V = 0;
- V < D.length;
- V += 1
- )
- D[V].href.indexOf(b[C].fPath) !== -1 && (U = !1);
- if (U) {
- var j = createTag('link');
- j.setAttribute('f-forigin', b[C].fOrigin),
- j.setAttribute('f-origin', b[C].origin),
- (j.type = 'text/css'),
- (j.rel = 'stylesheet'),
- (j.href = b[C].fPath),
- document.body.appendChild(j);
- }
- } else if (b[C].fOrigin === 't' || b[C].origin === 2) {
- for (
- D = document.querySelectorAll(
- 'script[f-forigin="t"], script[f-origin="2"]'
- ),
- V = 0;
- V < D.length;
- V += 1
- )
- b[C].fPath === D[V].src && (U = !1);
- if (U) {
- var $ = createTag('link');
- $.setAttribute('f-forigin', b[C].fOrigin),
- $.setAttribute('f-origin', b[C].origin),
- $.setAttribute('rel', 'stylesheet'),
- $.setAttribute('href', b[C].fPath),
- k.appendChild($);
- }
- }
- (b[C].helper = p(b[C], k)),
- (b[C].cache = {}),
- this.fonts.push(b[C]);
- }
- F === 0
- ? (this.isLoaded = !0)
- : setTimeout(this.checkLoadedFonts.bind(this), 100);
- }
- function u(M) {
- if (M) {
- this.chars || (this.chars = []);
- var k,
- b = M.length,
- C,
- L = this.chars.length,
- F;
- for (k = 0; k < b; k += 1) {
- for (C = 0, F = !1; C < L; )
- this.chars[C].style === M[k].style &&
- this.chars[C].fFamily === M[k].fFamily &&
- this.chars[C].ch === M[k].ch &&
- (F = !0),
- (C += 1);
- F || (this.chars.push(M[k]), (L += 1));
- }
- }
- }
- function y(M, k, b) {
- for (var C = 0, L = this.chars.length; C < L; ) {
- if (
- this.chars[C].ch === M &&
- this.chars[C].style === k &&
- this.chars[C].fFamily === b
- )
- return this.chars[C];
- C += 1;
- }
- return (
- ((typeof M == 'string' && M.charCodeAt(0) !== 13) || !M) &&
- console &&
- console.warn &&
- !this._warned &&
- ((this._warned = !0),
- console.warn(
- 'Missing character from exported characters list: ',
- M,
- k,
- b
- )),
- t
- );
- }
- function m(M, k, b) {
- var C = this.getFontByName(k),
- L = M;
- if (!C.cache[L]) {
- var F = C.helper;
- if (M === ' ') {
- var U = F.measureText('|' + M + '|'),
- D = F.measureText('||');
- C.cache[L] = (U - D) / 100;
- } else C.cache[L] = F.measureText(M) / 100;
- }
- return C.cache[L] * b;
- }
- function A(M) {
- for (var k = 0, b = this.fonts.length; k < b; ) {
- if (this.fonts[k].fName === M) return this.fonts[k];
- k += 1;
- }
- return this.fonts[0];
- }
- function T(M) {
- var k = 0,
- b = M.charCodeAt(0);
- if (b >= 55296 && b <= 56319) {
- var C = M.charCodeAt(1);
- C >= 56320 &&
- C <= 57343 &&
- (k = (b - 55296) * 1024 + C - 56320 + 65536);
- }
- return k;
- }
- function E(M, k) {
- var b = M.toString(16) + k.toString(16);
- return S.indexOf(b) !== -1;
- }
- function _(M) {
- return M === l;
- }
- function I(M) {
- return M === n;
- }
- function B(M) {
- var k = T(M);
- return k >= f && k <= g;
- }
- function z(M) {
- return B(M.substr(0, 2)) && B(M.substr(2, 2));
- }
- function G(M) {
- return r.indexOf(M) !== -1;
- }
- function R(M, k) {
- var b = T(M.substr(k, 2));
- if (b !== i) return !1;
- var C = 0;
- for (k += 2; C < 5; ) {
- if (((b = T(M.substr(k, 2))), b < a || b > o)) return !1;
- (C += 1), (k += 2);
- }
- return T(M.substr(k, 2)) === s;
- }
- function W() {
- this.isLoaded = !0;
- }
- var H = function () {
- (this.fonts = []),
- (this.chars = null),
- (this.typekitLoaded = 0),
- (this.isLoaded = !1),
- (this._warned = !1),
- (this.initTime = Date.now()),
- (this.setIsLoadedBinded = this.setIsLoaded.bind(this)),
- (this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this));
- };
- (H.isModifier = E),
- (H.isZeroWidthJoiner = _),
- (H.isFlagEmoji = z),
- (H.isRegionalCode = B),
- (H.isCombinedCharacter = G),
- (H.isRegionalFlag = R),
- (H.isVariationSelector = I),
- (H.BLACK_FLAG_CODE_POINT = i);
- var N = {
- addChars: u,
- addFonts: x,
- getCharData: y,
- getFontByName: A,
- measureText: m,
- checkLoadedFonts: d,
- setIsLoaded: W
- };
- return (H.prototype = N), H;
- })();
- function SlotManager(e) {
- this.animationData = e;
- }
- SlotManager.prototype.getProp = function (e) {
- return this.animationData.slots && this.animationData.slots[e.sid]
- ? Object.assign(e, this.animationData.slots[e.sid].p)
- : e;
- };
- function slotFactory(e) {
- return new SlotManager(e);
- }
- function RenderableElement() {}
- RenderableElement.prototype = {
- initRenderable: function () {
- (this.isInRange = !1),
- (this.hidden = !1),
- (this.isTransparent = !1),
- (this.renderableComponents = []);
- },
- addRenderableComponent: function (t) {
- this.renderableComponents.indexOf(t) === -1 &&
- this.renderableComponents.push(t);
- },
- removeRenderableComponent: function (t) {
- this.renderableComponents.indexOf(t) !== -1 &&
- this.renderableComponents.splice(
- this.renderableComponents.indexOf(t),
- 1
- );
- },
- prepareRenderableFrame: function (t) {
- this.checkLayerLimits(t);
- },
- checkTransparency: function () {
- this.finalTransform.mProp.o.v <= 0
- ? !this.isTransparent &&
- this.globalData.renderConfig.hideOnTransparent &&
- ((this.isTransparent = !0), this.hide())
- : this.isTransparent && ((this.isTransparent = !1), this.show());
- },
- checkLayerLimits: function (t) {
- this.data.ip - this.data.st <= t && this.data.op - this.data.st > t
- ? this.isInRange !== !0 &&
- ((this.globalData._mdf = !0),
- (this._mdf = !0),
- (this.isInRange = !0),
- this.show())
- : this.isInRange !== !1 &&
- ((this.globalData._mdf = !0), (this.isInRange = !1), this.hide());
- },
- renderRenderable: function () {
- var t,
- r = this.renderableComponents.length;
- for (t = 0; t < r; t += 1)
- this.renderableComponents[t].renderFrame(this._isFirstFrame);
- },
- sourceRectAtTime: function () {
- return { top: 0, left: 0, width: 100, height: 100 };
- },
- getLayerSize: function () {
- return this.data.ty === 5
- ? { w: this.data.textData.width, h: this.data.textData.height }
- : { w: this.data.width, h: this.data.height };
- }
- };
- var getBlendMode = (function () {
- var e = {
- 0: 'source-over',
- 1: 'multiply',
- 2: 'screen',
- 3: 'overlay',
- 4: 'darken',
- 5: 'lighten',
- 6: 'color-dodge',
- 7: 'color-burn',
- 8: 'hard-light',
- 9: 'soft-light',
- 10: 'difference',
- 11: 'exclusion',
- 12: 'hue',
- 13: 'saturation',
- 14: 'color',
- 15: 'luminosity'
- };
- return function (t) {
- return e[t] || '';
- };
- })();
- function SliderEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
- }
- function AngleEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
- }
- function ColorEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 1, 0, r);
- }
- function PointEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 1, 0, r);
- }
- function LayerIndexEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
- }
- function MaskIndexEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
- }
- function CheckboxEffect(e, t, r) {
- this.p = PropertyFactory.getProp(t, e.v, 0, 0, r);
- }
- function NoValueEffect() {
- this.p = {};
- }
- function EffectsManager(e, t) {
- var r = e.ef || [];
- this.effectElements = [];
- var i,
- s = r.length,
- a;
- for (i = 0; i < s; i += 1)
- (a = new GroupEffect(r[i], t)), this.effectElements.push(a);
- }
- function GroupEffect(e, t) {
- this.init(e, t);
- }
- extendPrototype([DynamicPropertyContainer], GroupEffect),
- (GroupEffect.prototype.getValue =
- GroupEffect.prototype.iterateDynamicProperties),
- (GroupEffect.prototype.init = function (e, t) {
- (this.data = e),
- (this.effectElements = []),
- this.initDynamicPropertyContainer(t);
- var r,
- i = this.data.ef.length,
- s,
- a = this.data.ef;
- for (r = 0; r < i; r += 1) {
- switch (((s = null), a[r].ty)) {
- case 0:
- s = new SliderEffect(a[r], t, this);
- break;
- case 1:
- s = new AngleEffect(a[r], t, this);
- break;
- case 2:
- s = new ColorEffect(a[r], t, this);
- break;
- case 3:
- s = new PointEffect(a[r], t, this);
- break;
- case 4:
- case 7:
- s = new CheckboxEffect(a[r], t, this);
- break;
- case 10:
- s = new LayerIndexEffect(a[r], t, this);
- break;
- case 11:
- s = new MaskIndexEffect(a[r], t, this);
- break;
- case 5:
- s = new EffectsManager(a[r], t);
- break;
- default:
- s = new NoValueEffect(a[r]);
- break;
- }
- s && this.effectElements.push(s);
- }
- });
- function BaseElement() {}
- BaseElement.prototype = {
- checkMasks: function () {
- if (!this.data.hasMask) return !1;
- for (var t = 0, r = this.data.masksProperties.length; t < r; ) {
- if (
- this.data.masksProperties[t].mode !== 'n' &&
- this.data.masksProperties[t].cl !== !1
- )
- return !0;
- t += 1;
- }
- return !1;
- },
- initExpressions: function () {
- var t = getExpressionInterfaces();
- if (t) {
- var r = t('layer'),
- i = t('effects'),
- s = t('shape'),
- a = t('text'),
- o = t('comp');
- (this.layerInterface = r(this)),
- this.data.hasMask &&
- this.maskManager &&
- this.layerInterface.registerMaskInterface(this.maskManager);
- var n = i.createEffectsInterface(this, this.layerInterface);
- this.layerInterface.registerEffectsInterface(n),
- this.data.ty === 0 || this.data.xt
- ? (this.compInterface = o(this))
- : this.data.ty === 4
- ? ((this.layerInterface.shapeInterface = s(
- this.shapesData,
- this.itemsData,
- this.layerInterface
- )),
- (this.layerInterface.content =
- this.layerInterface.shapeInterface))
- : this.data.ty === 5 &&
- ((this.layerInterface.textInterface = a(this)),
- (this.layerInterface.text =
- this.layerInterface.textInterface));
- }
- },
- setBlendMode: function () {
- var t = getBlendMode(this.data.bm),
- r = this.baseElement || this.layerElement;
- r.style['mix-blend-mode'] = t;
- },
- initBaseData: function (t, r, i) {
- (this.globalData = r),
- (this.comp = i),
- (this.data = t),
- (this.layerId = createElementID()),
- this.data.sr || (this.data.sr = 1),
- (this.effectsManager = new EffectsManager(
- this.data,
- this,
- this.dynamicProperties
- ));
- },
- getType: function () {
- return this.type;
- },
- sourceRectAtTime: function () {}
- };
- function FrameElement() {}
- FrameElement.prototype = {
- initFrame: function () {
- (this._isFirstFrame = !1),
- (this.dynamicProperties = []),
- (this._mdf = !1);
- },
- prepareProperties: function (t, r) {
- var i,
- s = this.dynamicProperties.length;
- for (i = 0; i < s; i += 1)
- (r ||
- (this._isParent &&
- this.dynamicProperties[i].propType === 'transform')) &&
- (this.dynamicProperties[i].getValue(),
- this.dynamicProperties[i]._mdf &&
- ((this.globalData._mdf = !0), (this._mdf = !0)));
- },
- addDynamicProperty: function (t) {
- this.dynamicProperties.indexOf(t) === -1 &&
- this.dynamicProperties.push(t);
- }
- };
- function FootageElement(e, t, r) {
- this.initFrame(),
- this.initRenderable(),
- (this.assetData = t.getAssetData(e.refId)),
- (this.footageData = t.imageLoader.getAsset(this.assetData)),
- this.initBaseData(e, t, r);
- }
- (FootageElement.prototype.prepareFrame = function () {}),
- extendPrototype(
- [RenderableElement, BaseElement, FrameElement],
- FootageElement
- ),
- (FootageElement.prototype.getBaseElement = function () {
- return null;
- }),
- (FootageElement.prototype.renderFrame = function () {}),
- (FootageElement.prototype.destroy = function () {}),
- (FootageElement.prototype.initExpressions = function () {
- var e = getExpressionInterfaces();
- if (e) {
- var t = e('footage');
- this.layerInterface = t(this);
- }
- }),
- (FootageElement.prototype.getFootageData = function () {
- return this.footageData;
- });
- function AudioElement(e, t, r) {
- this.initFrame(),
- this.initRenderable(),
- (this.assetData = t.getAssetData(e.refId)),
- this.initBaseData(e, t, r),
- (this._isPlaying = !1),
- (this._canPlay = !1);
- var i = this.globalData.getAssetsPath(this.assetData);
- (this.audio = this.globalData.audioController.createAudio(i)),
- (this._currentTime = 0),
- this.globalData.audioController.addAudio(this),
- (this._volumeMultiplier = 1),
- (this._volume = 1),
- (this._previousVolume = null),
- (this.tm = e.tm
- ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
- : { _placeholder: !0 }),
- (this.lv = PropertyFactory.getProp(
- this,
- e.au && e.au.lv ? e.au.lv : { k: [100] },
- 1,
- 0.01,
- this
- ));
- }
- (AudioElement.prototype.prepareFrame = function (e) {
- if (
- (this.prepareRenderableFrame(e, !0),
- this.prepareProperties(e, !0),
- this.tm._placeholder)
- )
- this._currentTime = e / this.data.sr;
- else {
- var t = this.tm.v;
- this._currentTime = t;
- }
- this._volume = this.lv.v[0];
- var r = this._volume * this._volumeMultiplier;
- this._previousVolume !== r &&
- ((this._previousVolume = r), this.audio.volume(r));
- }),
- extendPrototype(
- [RenderableElement, BaseElement, FrameElement],
- AudioElement
- ),
- (AudioElement.prototype.renderFrame = function () {
- this.isInRange &&
- this._canPlay &&
- (this._isPlaying
- ? (!this.audio.playing() ||
- Math.abs(
- this._currentTime / this.globalData.frameRate -
- this.audio.seek()
- ) > 0.1) &&
- this.audio.seek(this._currentTime / this.globalData.frameRate)
- : (this.audio.play(),
- this.audio.seek(this._currentTime / this.globalData.frameRate),
- (this._isPlaying = !0)));
- }),
- (AudioElement.prototype.show = function () {}),
- (AudioElement.prototype.hide = function () {
- this.audio.pause(), (this._isPlaying = !1);
- }),
- (AudioElement.prototype.pause = function () {
- this.audio.pause(), (this._isPlaying = !1), (this._canPlay = !1);
- }),
- (AudioElement.prototype.resume = function () {
- this._canPlay = !0;
- }),
- (AudioElement.prototype.setRate = function (e) {
- this.audio.rate(e);
- }),
- (AudioElement.prototype.volume = function (e) {
- (this._volumeMultiplier = e),
- (this._previousVolume = e * this._volume),
- this.audio.volume(this._previousVolume);
- }),
- (AudioElement.prototype.getBaseElement = function () {
- return null;
- }),
- (AudioElement.prototype.destroy = function () {}),
- (AudioElement.prototype.sourceRectAtTime = function () {}),
- (AudioElement.prototype.initExpressions = function () {});
- function BaseRenderer() {}
- (BaseRenderer.prototype.checkLayers = function (e) {
- var t,
- r = this.layers.length,
- i;
- for (this.completeLayers = !0, t = r - 1; t >= 0; t -= 1)
- this.elements[t] ||
- ((i = this.layers[t]),
- i.ip - i.st <= e - this.layers[t].st &&
- i.op - i.st > e - this.layers[t].st &&
- this.buildItem(t)),
- (this.completeLayers = this.elements[t] ? this.completeLayers : !1);
- this.checkPendingElements();
- }),
- (BaseRenderer.prototype.createItem = function (e) {
- switch (e.ty) {
- case 2:
- return this.createImage(e);
- case 0:
- return this.createComp(e);
- case 1:
- return this.createSolid(e);
- case 3:
- return this.createNull(e);
- case 4:
- return this.createShape(e);
- case 5:
- return this.createText(e);
- case 6:
- return this.createAudio(e);
- case 13:
- return this.createCamera(e);
- case 15:
- return this.createFootage(e);
- default:
- return this.createNull(e);
- }
- }),
- (BaseRenderer.prototype.createCamera = function () {
- throw new Error("You're using a 3d camera. Try the html renderer.");
- }),
- (BaseRenderer.prototype.createAudio = function (e) {
- return new AudioElement(e, this.globalData, this);
- }),
- (BaseRenderer.prototype.createFootage = function (e) {
- return new FootageElement(e, this.globalData, this);
- }),
- (BaseRenderer.prototype.buildAllItems = function () {
- var e,
- t = this.layers.length;
- for (e = 0; e < t; e += 1) this.buildItem(e);
- this.checkPendingElements();
- }),
- (BaseRenderer.prototype.includeLayers = function (e) {
- this.completeLayers = !1;
- var t,
- r = e.length,
- i,
- s = this.layers.length;
- for (t = 0; t < r; t += 1)
- for (i = 0; i < s; ) {
- if (this.layers[i].id === e[t].id) {
- this.layers[i] = e[t];
- break;
- }
- i += 1;
- }
- }),
- (BaseRenderer.prototype.setProjectInterface = function (e) {
- this.globalData.projectInterface = e;
- }),
- (BaseRenderer.prototype.initItems = function () {
- this.globalData.progressiveLoad || this.buildAllItems();
- }),
- (BaseRenderer.prototype.buildElementParenting = function (e, t, r) {
- for (
- var i = this.elements, s = this.layers, a = 0, o = s.length;
- a < o;
- )
- s[a].ind == t &&
- (!i[a] || i[a] === !0
- ? (this.buildItem(a), this.addPendingElement(e))
- : (r.push(i[a]),
- i[a].setAsParent(),
- s[a].parent !== void 0
- ? this.buildElementParenting(e, s[a].parent, r)
- : e.setHierarchy(r))),
- (a += 1);
- }),
- (BaseRenderer.prototype.addPendingElement = function (e) {
- this.pendingElements.push(e);
- }),
- (BaseRenderer.prototype.searchExtraCompositions = function (e) {
- var t,
- r = e.length;
- for (t = 0; t < r; t += 1)
- if (e[t].xt) {
- var i = this.createComp(e[t]);
- i.initExpressions(),
- this.globalData.projectInterface.registerComposition(i);
- }
- }),
- (BaseRenderer.prototype.getElementById = function (e) {
- var t,
- r = this.elements.length;
- for (t = 0; t < r; t += 1)
- if (this.elements[t].data.ind === e) return this.elements[t];
- return null;
- }),
- (BaseRenderer.prototype.getElementByPath = function (e) {
- var t = e.shift(),
- r;
- if (typeof t == 'number') r = this.elements[t];
- else {
- var i,
- s = this.elements.length;
- for (i = 0; i < s; i += 1)
- if (this.elements[i].data.nm === t) {
- r = this.elements[i];
- break;
- }
- }
- return e.length === 0 ? r : r.getElementByPath(e);
- }),
- (BaseRenderer.prototype.setupGlobalData = function (e, t) {
- (this.globalData.fontManager = new FontManager()),
- (this.globalData.slotManager = slotFactory(e)),
- this.globalData.fontManager.addChars(e.chars),
- this.globalData.fontManager.addFonts(e.fonts, t),
- (this.globalData.getAssetData =
- this.animationItem.getAssetData.bind(this.animationItem)),
- (this.globalData.getAssetsPath =
- this.animationItem.getAssetsPath.bind(this.animationItem)),
- (this.globalData.imageLoader = this.animationItem.imagePreloader),
- (this.globalData.audioController =
- this.animationItem.audioController),
- (this.globalData.frameId = 0),
- (this.globalData.frameRate = e.fr),
- (this.globalData.nm = e.nm),
- (this.globalData.compSize = { w: e.w, h: e.h });
- });
- var effectTypes = { TRANSFORM_EFFECT: 'transformEFfect' };
- function TransformElement() {}
- TransformElement.prototype = {
- initTransform: function () {
- var t = new Matrix();
- (this.finalTransform = {
- mProp: this.data.ks
- ? TransformPropertyFactory.getTransformProperty(
- this,
- this.data.ks,
- this
- )
- : { o: 0 },
- _matMdf: !1,
- _localMatMdf: !1,
- _opMdf: !1,
- mat: t,
- localMat: t,
- localOpacity: 1
- }),
- this.data.ao && (this.finalTransform.mProp.autoOriented = !0),
- this.data.ty;
- },
- renderTransform: function () {
- if (
- ((this.finalTransform._opMdf =
- this.finalTransform.mProp.o._mdf || this._isFirstFrame),
- (this.finalTransform._matMdf =
- this.finalTransform.mProp._mdf || this._isFirstFrame),
- this.hierarchy)
- ) {
- var t,
- r = this.finalTransform.mat,
- i = 0,
- s = this.hierarchy.length;
- if (!this.finalTransform._matMdf)
- for (; i < s; ) {
- if (this.hierarchy[i].finalTransform.mProp._mdf) {
- this.finalTransform._matMdf = !0;
- break;
- }
- i += 1;
- }
- if (this.finalTransform._matMdf)
- for (
- t = this.finalTransform.mProp.v.props,
- r.cloneFromProps(t),
- i = 0;
- i < s;
- i += 1
- )
- r.multiply(this.hierarchy[i].finalTransform.mProp.v);
- }
- this.finalTransform._matMdf &&
- (this.finalTransform._localMatMdf = this.finalTransform._matMdf),
- this.finalTransform._opMdf &&
- (this.finalTransform.localOpacity =
- this.finalTransform.mProp.o.v);
- },
- renderLocalTransform: function () {
- if (this.localTransforms) {
- var t = 0,
- r = this.localTransforms.length;
- if (
- ((this.finalTransform._localMatMdf = this.finalTransform._matMdf),
- !this.finalTransform._localMatMdf || !this.finalTransform._opMdf)
- )
- for (; t < r; )
- this.localTransforms[t]._mdf &&
- (this.finalTransform._localMatMdf = !0),
- this.localTransforms[t]._opMdf &&
- !this.finalTransform._opMdf &&
- ((this.finalTransform.localOpacity =
- this.finalTransform.mProp.o.v),
- (this.finalTransform._opMdf = !0)),
- (t += 1);
- if (this.finalTransform._localMatMdf) {
- var i = this.finalTransform.localMat;
- for (
- this.localTransforms[0].matrix.clone(i), t = 1;
- t < r;
- t += 1
- ) {
- var s = this.localTransforms[t].matrix;
- i.multiply(s);
- }
- i.multiply(this.finalTransform.mat);
- }
- if (this.finalTransform._opMdf) {
- var a = this.finalTransform.localOpacity;
- for (t = 0; t < r; t += 1)
- a *= this.localTransforms[t].opacity * 0.01;
- this.finalTransform.localOpacity = a;
- }
- }
- },
- searchEffectTransforms: function () {
- if (this.renderableEffectsManager) {
- var t = this.renderableEffectsManager.getEffects(
- effectTypes.TRANSFORM_EFFECT
- );
- if (t.length) {
- (this.localTransforms = []),
- (this.finalTransform.localMat = new Matrix());
- var r = 0,
- i = t.length;
- for (r = 0; r < i; r += 1) this.localTransforms.push(t[r]);
- }
- }
- },
- globalToLocal: function (t) {
- var r = [];
- r.push(this.finalTransform);
- for (var i = !0, s = this.comp; i; )
- s.finalTransform
- ? (s.data.hasMask && r.splice(0, 0, s.finalTransform),
- (s = s.comp))
- : (i = !1);
- var a,
- o = r.length,
- n;
- for (a = 0; a < o; a += 1)
- (n = r[a].mat.applyToPointArray(0, 0, 0)),
- (t = [t[0] - n[0], t[1] - n[1], 0]);
- return t;
- },
- mHelper: new Matrix()
- };
- function MaskElement(e, t, r) {
- (this.data = e),
- (this.element = t),
- (this.globalData = r),
- (this.storedData = []),
- (this.masksProperties = this.data.masksProperties || []),
- (this.maskElement = null);
- var i = this.globalData.defs,
- s,
- a = this.masksProperties ? this.masksProperties.length : 0;
- (this.viewData = createSizedArray(a)), (this.solidPath = '');
- var o,
- n = this.masksProperties,
- l = 0,
- f = [],
- g,
- S,
- c = createElementID(),
- P,
- d,
- p,
- x,
- u = 'clipPath',
- y = 'clip-path';
- for (s = 0; s < a; s += 1)
- if (
- (((n[s].mode !== 'a' && n[s].mode !== 'n') ||
- n[s].inv ||
- n[s].o.k !== 100 ||
- n[s].o.x) &&
- ((u = 'mask'), (y = 'mask')),
- (n[s].mode === 's' || n[s].mode === 'i') && l === 0
- ? ((P = createNS('rect')),
- P.setAttribute('fill', '#ffffff'),
- P.setAttribute('width', this.element.comp.data.w || 0),
- P.setAttribute('height', this.element.comp.data.h || 0),
- f.push(P))
- : (P = null),
- (o = createNS('path')),
- n[s].mode === 'n')
- )
- (this.viewData[s] = {
- op: PropertyFactory.getProp(
- this.element,
- n[s].o,
- 0,
- 0.01,
- this.element
- ),
- prop: ShapePropertyFactory.getShapeProp(this.element, n[s], 3),
- elem: o,
- lastPath: ''
- }),
- i.appendChild(o);
- else {
- (l += 1),
- o.setAttribute('fill', n[s].mode === 's' ? '#000000' : '#ffffff'),
- o.setAttribute('clip-rule', 'nonzero');
- var m;
- if (
- (n[s].x.k !== 0
- ? ((u = 'mask'),
- (y = 'mask'),
- (x = PropertyFactory.getProp(
- this.element,
- n[s].x,
- 0,
- null,
- this.element
- )),
- (m = createElementID()),
- (d = createNS('filter')),
- d.setAttribute('id', m),
- (p = createNS('feMorphology')),
- p.setAttribute('operator', 'erode'),
- p.setAttribute('in', 'SourceGraphic'),
- p.setAttribute('radius', '0'),
- d.appendChild(p),
- i.appendChild(d),
- o.setAttribute(
- 'stroke',
- n[s].mode === 's' ? '#000000' : '#ffffff'
- ))
- : ((p = null), (x = null)),
- (this.storedData[s] = {
- elem: o,
- x,
- expan: p,
- lastPath: '',
- lastOperator: '',
- filterId: m,
- lastRadius: 0
- }),
- n[s].mode === 'i')
- ) {
- S = f.length;
- var A = createNS('g');
- for (g = 0; g < S; g += 1) A.appendChild(f[g]);
- var T = createNS('mask');
- T.setAttribute('mask-type', 'alpha'),
- T.setAttribute('id', c + '_' + l),
- T.appendChild(o),
- i.appendChild(T),
- A.setAttribute(
- 'mask',
- 'url(' + getLocationHref() + '#' + c + '_' + l + ')'
- ),
- (f.length = 0),
- f.push(A);
- } else f.push(o);
- n[s].inv &&
- !this.solidPath &&
- (this.solidPath = this.createLayerSolidPath()),
- (this.viewData[s] = {
- elem: o,
- lastPath: '',
- op: PropertyFactory.getProp(
- this.element,
- n[s].o,
- 0,
- 0.01,
- this.element
- ),
- prop: ShapePropertyFactory.getShapeProp(this.element, n[s], 3),
- invRect: P
- }),
- this.viewData[s].prop.k ||
- this.drawPath(n[s], this.viewData[s].prop.v, this.viewData[s]);
- }
- for (this.maskElement = createNS(u), a = f.length, s = 0; s < a; s += 1)
- this.maskElement.appendChild(f[s]);
- l > 0 &&
- (this.maskElement.setAttribute('id', c),
- this.element.maskedElement.setAttribute(
- y,
- 'url(' + getLocationHref() + '#' + c + ')'
- ),
- i.appendChild(this.maskElement)),
- this.viewData.length && this.element.addRenderableComponent(this);
- }
- (MaskElement.prototype.getMaskProperty = function (e) {
- return this.viewData[e].prop;
- }),
- (MaskElement.prototype.renderFrame = function (e) {
- var t = this.element.finalTransform.mat,
- r,
- i = this.masksProperties.length;
- for (r = 0; r < i; r += 1)
- if (
- ((this.viewData[r].prop._mdf || e) &&
- this.drawPath(
- this.masksProperties[r],
- this.viewData[r].prop.v,
- this.viewData[r]
- ),
- (this.viewData[r].op._mdf || e) &&
- this.viewData[r].elem.setAttribute(
- 'fill-opacity',
- this.viewData[r].op.v
- ),
- this.masksProperties[r].mode !== 'n' &&
- (this.viewData[r].invRect &&
- (this.element.finalTransform.mProp._mdf || e) &&
- this.viewData[r].invRect.setAttribute(
- 'transform',
- t.getInverseMatrix().to2dCSS()
- ),
- this.storedData[r].x && (this.storedData[r].x._mdf || e)))
- ) {
- var s = this.storedData[r].expan;
- this.storedData[r].x.v < 0
- ? (this.storedData[r].lastOperator !== 'erode' &&
- ((this.storedData[r].lastOperator = 'erode'),
- this.storedData[r].elem.setAttribute(
- 'filter',
- 'url(' +
- getLocationHref() +
- '#' +
- this.storedData[r].filterId +
- ')'
- )),
- s.setAttribute('radius', -this.storedData[r].x.v))
- : (this.storedData[r].lastOperator !== 'dilate' &&
- ((this.storedData[r].lastOperator = 'dilate'),
- this.storedData[r].elem.setAttribute('filter', null)),
- this.storedData[r].elem.setAttribute(
- 'stroke-width',
- this.storedData[r].x.v * 2
- ));
- }
- }),
- (MaskElement.prototype.getMaskelement = function () {
- return this.maskElement;
- }),
- (MaskElement.prototype.createLayerSolidPath = function () {
- var e = 'M0,0 ';
- return (
- (e += ' h' + this.globalData.compSize.w),
- (e += ' v' + this.globalData.compSize.h),
- (e += ' h-' + this.globalData.compSize.w),
- (e += ' v-' + this.globalData.compSize.h + ' '),
- e
- );
- }),
- (MaskElement.prototype.drawPath = function (e, t, r) {
- var i = ' M' + t.v[0][0] + ',' + t.v[0][1],
- s,
- a;
- for (a = t._length, s = 1; s < a; s += 1)
- i +=
- ' C' +
- t.o[s - 1][0] +
- ',' +
- t.o[s - 1][1] +
- ' ' +
- t.i[s][0] +
- ',' +
- t.i[s][1] +
- ' ' +
- t.v[s][0] +
- ',' +
- t.v[s][1];
- if (
- (t.c &&
- a > 1 &&
- (i +=
- ' C' +
- t.o[s - 1][0] +
- ',' +
- t.o[s - 1][1] +
- ' ' +
- t.i[0][0] +
- ',' +
- t.i[0][1] +
- ' ' +
- t.v[0][0] +
- ',' +
- t.v[0][1]),
- r.lastPath !== i)
- ) {
- var o = '';
- r.elem &&
- (t.c && (o = e.inv ? this.solidPath + i : i),
- r.elem.setAttribute('d', o)),
- (r.lastPath = i);
- }
- }),
- (MaskElement.prototype.destroy = function () {
- (this.element = null),
- (this.globalData = null),
- (this.maskElement = null),
- (this.data = null),
- (this.masksProperties = null);
- });
- var filtersFactory = (function () {
- var e = {};
- (e.createFilter = t), (e.createAlphaToLuminanceFilter = r);
- function t(i, s) {
- var a = createNS('filter');
- return (
- a.setAttribute('id', i),
- s !== !0 &&
- (a.setAttribute('filterUnits', 'objectBoundingBox'),
- a.setAttribute('x', '0%'),
- a.setAttribute('y', '0%'),
- a.setAttribute('width', '100%'),
- a.setAttribute('height', '100%')),
- a
- );
- }
- function r() {
- var i = createNS('feColorMatrix');
- return (
- i.setAttribute('type', 'matrix'),
- i.setAttribute('color-interpolation-filters', 'sRGB'),
- i.setAttribute(
- 'values',
- '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1'
- ),
- i
- );
- }
- return e;
- })(),
- featureSupport = (function () {
- var e = {
- maskType: !0,
- svgLumaHidden: !0,
- offscreenCanvas: typeof OffscreenCanvas < 'u'
- };
- return (
- (/MSIE 10/i.test(navigator.userAgent) ||
- /MSIE 9/i.test(navigator.userAgent) ||
- /rv:11.0/i.test(navigator.userAgent) ||
- /Edge\/\d./i.test(navigator.userAgent)) &&
- (e.maskType = !1),
- /firefox/i.test(navigator.userAgent) && (e.svgLumaHidden = !1),
- e
- );
- })(),
- registeredEffects$1 = {},
- idPrefix = 'filter_result_';
- function SVGEffects(e) {
- var t,
- r = 'SourceGraphic',
- i = e.data.ef ? e.data.ef.length : 0,
- s = createElementID(),
- a = filtersFactory.createFilter(s, !0),
- o = 0;
- this.filters = [];
- var n;
- for (t = 0; t < i; t += 1) {
- n = null;
- var l = e.data.ef[t].ty;
- if (registeredEffects$1[l]) {
- var f = registeredEffects$1[l].effect;
- (n = new f(
- a,
- e.effectsManager.effectElements[t],
- e,
- idPrefix + o,
- r
- )),
- (r = idPrefix + o),
- registeredEffects$1[l].countsAsEffect && (o += 1);
- }
- n && this.filters.push(n);
- }
- o &&
- (e.globalData.defs.appendChild(a),
- e.layerElement.setAttribute(
- 'filter',
- 'url(' + getLocationHref() + '#' + s + ')'
- )),
- this.filters.length && e.addRenderableComponent(this);
- }
- (SVGEffects.prototype.renderFrame = function (e) {
- var t,
- r = this.filters.length;
- for (t = 0; t < r; t += 1) this.filters[t].renderFrame(e);
- }),
- (SVGEffects.prototype.getEffects = function (e) {
- var t,
- r = this.filters.length,
- i = [];
- for (t = 0; t < r; t += 1)
- this.filters[t].type === e && i.push(this.filters[t]);
- return i;
- });
- function registerEffect$1(e, t, r) {
- registeredEffects$1[e] = { effect: t, countsAsEffect: r };
- }
- function SVGBaseElement() {}
- SVGBaseElement.prototype = {
- initRendererElement: function () {
- this.layerElement = createNS('g');
- },
- createContainerElements: function () {
- (this.matteElement = createNS('g')),
- (this.transformedElement = this.layerElement),
- (this.maskedElement = this.layerElement),
- (this._sizeChanged = !1);
- var t = null;
- if (this.data.td) {
- this.matteMasks = {};
- var r = createNS('g');
- r.setAttribute('id', this.layerId),
- r.appendChild(this.layerElement),
- (t = r),
- this.globalData.defs.appendChild(r);
- } else
- this.data.tt
- ? (this.matteElement.appendChild(this.layerElement),
- (t = this.matteElement),
- (this.baseElement = this.matteElement))
- : (this.baseElement = this.layerElement);
- if (
- (this.data.ln && this.layerElement.setAttribute('id', this.data.ln),
- this.data.cl &&
- this.layerElement.setAttribute('class', this.data.cl),
- this.data.ty === 0 && !this.data.hd)
- ) {
- var i = createNS('clipPath'),
- s = createNS('path');
- s.setAttribute(
- 'd',
- 'M0,0 L' +
- this.data.w +
- ',0 L' +
- this.data.w +
- ',' +
- this.data.h +
- ' L0,' +
- this.data.h +
- 'z'
- );
- var a = createElementID();
- if (
- (i.setAttribute('id', a),
- i.appendChild(s),
- this.globalData.defs.appendChild(i),
- this.checkMasks())
- ) {
- var o = createNS('g');
- o.setAttribute(
- 'clip-path',
- 'url(' + getLocationHref() + '#' + a + ')'
- ),
- o.appendChild(this.layerElement),
- (this.transformedElement = o),
- t
- ? t.appendChild(this.transformedElement)
- : (this.baseElement = this.transformedElement);
- } else
- this.layerElement.setAttribute(
- 'clip-path',
- 'url(' + getLocationHref() + '#' + a + ')'
- );
- }
- this.data.bm !== 0 && this.setBlendMode();
- },
- renderElement: function () {
- this.finalTransform._localMatMdf &&
- this.transformedElement.setAttribute(
- 'transform',
- this.finalTransform.localMat.to2dCSS()
- ),
- this.finalTransform._opMdf &&
- this.transformedElement.setAttribute(
- 'opacity',
- this.finalTransform.localOpacity
- );
- },
- destroyBaseElement: function () {
- (this.layerElement = null),
- (this.matteElement = null),
- this.maskManager.destroy();
- },
- getBaseElement: function () {
- return this.data.hd ? null : this.baseElement;
- },
- createRenderableComponents: function () {
- (this.maskManager = new MaskElement(
- this.data,
- this,
- this.globalData
- )),
- (this.renderableEffectsManager = new SVGEffects(this)),
- this.searchEffectTransforms();
- },
- getMatte: function (t) {
- if (
- (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t])
- ) {
- var r = this.layerId + '_' + t,
- i,
- s,
- a,
- o;
- if (t === 1 || t === 3) {
- var n = createNS('mask');
- n.setAttribute('id', r),
- n.setAttribute('mask-type', t === 3 ? 'luminance' : 'alpha'),
- (a = createNS('use')),
- a.setAttributeNS(
- 'http://www.w3.org/1999/xlink',
- 'href',
- '#' + this.layerId
- ),
- n.appendChild(a),
- this.globalData.defs.appendChild(n),
- !featureSupport.maskType &&
- t === 1 &&
- (n.setAttribute('mask-type', 'luminance'),
- (i = createElementID()),
- (s = filtersFactory.createFilter(i)),
- this.globalData.defs.appendChild(s),
- s.appendChild(filtersFactory.createAlphaToLuminanceFilter()),
- (o = createNS('g')),
- o.appendChild(a),
- n.appendChild(o),
- o.setAttribute(
- 'filter',
- 'url(' + getLocationHref() + '#' + i + ')'
- ));
- } else if (t === 2) {
- var l = createNS('mask');
- l.setAttribute('id', r), l.setAttribute('mask-type', 'alpha');
- var f = createNS('g');
- l.appendChild(f),
- (i = createElementID()),
- (s = filtersFactory.createFilter(i));
- var g = createNS('feComponentTransfer');
- g.setAttribute('in', 'SourceGraphic'), s.appendChild(g);
- var S = createNS('feFuncA');
- S.setAttribute('type', 'table'),
- S.setAttribute('tableValues', '1.0 0.0'),
- g.appendChild(S),
- this.globalData.defs.appendChild(s);
- var c = createNS('rect');
- c.setAttribute('width', this.comp.data.w),
- c.setAttribute('height', this.comp.data.h),
- c.setAttribute('x', '0'),
- c.setAttribute('y', '0'),
- c.setAttribute('fill', '#ffffff'),
- c.setAttribute('opacity', '0'),
- f.setAttribute(
- 'filter',
- 'url(' + getLocationHref() + '#' + i + ')'
- ),
- f.appendChild(c),
- (a = createNS('use')),
- a.setAttributeNS(
- 'http://www.w3.org/1999/xlink',
- 'href',
- '#' + this.layerId
- ),
- f.appendChild(a),
- featureSupport.maskType ||
- (l.setAttribute('mask-type', 'luminance'),
- s.appendChild(filtersFactory.createAlphaToLuminanceFilter()),
- (o = createNS('g')),
- f.appendChild(c),
- o.appendChild(this.layerElement),
- f.appendChild(o)),
- this.globalData.defs.appendChild(l);
- }
- this.matteMasks[t] = r;
- }
- return this.matteMasks[t];
- },
- setMatte: function (t) {
- this.matteElement &&
- this.matteElement.setAttribute(
- 'mask',
- 'url(' + getLocationHref() + '#' + t + ')'
- );
- }
- };
- function HierarchyElement() {}
- HierarchyElement.prototype = {
- initHierarchy: function () {
- (this.hierarchy = []), (this._isParent = !1), this.checkParenting();
- },
- setHierarchy: function (t) {
- this.hierarchy = t;
- },
- setAsParent: function () {
- this._isParent = !0;
- },
- checkParenting: function () {
- this.data.parent !== void 0 &&
- this.comp.buildElementParenting(this, this.data.parent, []);
- }
- };
- function RenderableDOMElement() {}
- (function () {
- var e = {
- initElement: function (r, i, s) {
- this.initFrame(),
- this.initBaseData(r, i, s),
- this.initTransform(r, i, s),
- this.initHierarchy(),
- this.initRenderable(),
- this.initRendererElement(),
- this.createContainerElements(),
- this.createRenderableComponents(),
- this.createContent(),
- this.hide();
- },
- hide: function () {
- if (!this.hidden && (!this.isInRange || this.isTransparent)) {
- var r = this.baseElement || this.layerElement;
- (r.style.display = 'none'), (this.hidden = !0);
- }
- },
- show: function () {
- if (this.isInRange && !this.isTransparent) {
- if (!this.data.hd) {
- var r = this.baseElement || this.layerElement;
- r.style.display = 'block';
- }
- (this.hidden = !1), (this._isFirstFrame = !0);
- }
- },
- renderFrame: function () {
- this.data.hd ||
- this.hidden ||
- (this.renderTransform(),
- this.renderRenderable(),
- this.renderLocalTransform(),
- this.renderElement(),
- this.renderInnerContent(),
- this._isFirstFrame && (this._isFirstFrame = !1));
- },
- renderInnerContent: function () {},
- prepareFrame: function (r) {
- (this._mdf = !1),
- this.prepareRenderableFrame(r),
- this.prepareProperties(r, this.isInRange),
- this.checkTransparency();
- },
- destroy: function () {
- (this.innerElem = null), this.destroyBaseElement();
- }
- };
- extendPrototype(
- [RenderableElement, createProxyFunction(e)],
- RenderableDOMElement
- );
- })();
- function IImageElement(e, t, r) {
- (this.assetData = t.getAssetData(e.refId)),
- this.assetData &&
- this.assetData.sid &&
- (this.assetData = t.slotManager.getProp(this.assetData)),
- this.initElement(e, t, r),
- (this.sourceRect = {
- top: 0,
- left: 0,
- width: this.assetData.w,
- height: this.assetData.h
- });
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- SVGBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableDOMElement
- ],
- IImageElement
- ),
- (IImageElement.prototype.createContent = function () {
- var e = this.globalData.getAssetsPath(this.assetData);
- (this.innerElem = createNS('image')),
- this.innerElem.setAttribute('width', this.assetData.w + 'px'),
- this.innerElem.setAttribute('height', this.assetData.h + 'px'),
- this.innerElem.setAttribute(
- 'preserveAspectRatio',
- this.assetData.pr ||
- this.globalData.renderConfig.imagePreserveAspectRatio
- ),
- this.innerElem.setAttributeNS(
- 'http://www.w3.org/1999/xlink',
- 'href',
- e
- ),
- this.layerElement.appendChild(this.innerElem);
- }),
- (IImageElement.prototype.sourceRectAtTime = function () {
- return this.sourceRect;
- });
- function ProcessedElement(e, t) {
- (this.elem = e), (this.pos = t);
- }
- function IShapeElement() {}
- IShapeElement.prototype = {
- addShapeToModifiers: function (t) {
- var r,
- i = this.shapeModifiers.length;
- for (r = 0; r < i; r += 1) this.shapeModifiers[r].addShape(t);
- },
- isShapeInAnimatedModifiers: function (t) {
- for (var r = 0, i = this.shapeModifiers.length; r < i; )
- if (this.shapeModifiers[r].isAnimatedWithShape(t)) return !0;
- return !1;
- },
- renderModifiers: function () {
- if (this.shapeModifiers.length) {
- var t,
- r = this.shapes.length;
- for (t = 0; t < r; t += 1) this.shapes[t].sh.reset();
- r = this.shapeModifiers.length;
- var i;
- for (
- t = r - 1;
- t >= 0 &&
- ((i = this.shapeModifiers[t].processShapes(this._isFirstFrame)),
- !i);
- t -= 1
- );
- }
- },
- searchProcessedElement: function (t) {
- for (var r = this.processedElements, i = 0, s = r.length; i < s; ) {
- if (r[i].elem === t) return r[i].pos;
- i += 1;
- }
- return 0;
- },
- addProcessedElement: function (t, r) {
- for (var i = this.processedElements, s = i.length; s; )
- if (((s -= 1), i[s].elem === t)) {
- i[s].pos = r;
- return;
- }
- i.push(new ProcessedElement(t, r));
- },
- prepareFrame: function (t) {
- this.prepareRenderableFrame(t),
- this.prepareProperties(t, this.isInRange);
- }
- };
- var lineCapEnum = { 1: 'butt', 2: 'round', 3: 'square' },
- lineJoinEnum = { 1: 'miter', 2: 'round', 3: 'bevel' };
- function SVGShapeData(e, t, r) {
- (this.caches = []),
- (this.styles = []),
- (this.transformers = e),
- (this.lStr = ''),
- (this.sh = r),
- (this.lvl = t),
- (this._isAnimated = !!r.k);
- for (var i = 0, s = e.length; i < s; ) {
- if (e[i].mProps.dynamicProperties.length) {
- this._isAnimated = !0;
- break;
- }
- i += 1;
- }
- }
- SVGShapeData.prototype.setAsAnimated = function () {
- this._isAnimated = !0;
- };
- function SVGStyleData(e, t) {
- (this.data = e),
- (this.type = e.ty),
- (this.d = ''),
- (this.lvl = t),
- (this._mdf = !1),
- (this.closed = e.hd === !0),
- (this.pElem = createNS('path')),
- (this.msElem = null);
- }
- SVGStyleData.prototype.reset = function () {
- (this.d = ''), (this._mdf = !1);
- };
- function DashProperty(e, t, r, i) {
- (this.elem = e),
- (this.frameId = -1),
- (this.dataProps = createSizedArray(t.length)),
- (this.renderer = r),
- (this.k = !1),
- (this.dashStr = ''),
- (this.dashArray = createTypedArray(
- 'float32',
- t.length ? t.length - 1 : 0
- )),
- (this.dashoffset = createTypedArray('float32', 1)),
- this.initDynamicPropertyContainer(i);
- var s,
- a = t.length || 0,
- o;
- for (s = 0; s < a; s += 1)
- (o = PropertyFactory.getProp(e, t[s].v, 0, 0, this)),
- (this.k = o.k || this.k),
- (this.dataProps[s] = { n: t[s].n, p: o });
- this.k || this.getValue(!0), (this._isAnimated = this.k);
- }
- (DashProperty.prototype.getValue = function (e) {
- if (
- !(this.elem.globalData.frameId === this.frameId && !e) &&
- ((this.frameId = this.elem.globalData.frameId),
- this.iterateDynamicProperties(),
- (this._mdf = this._mdf || e),
- this._mdf)
- ) {
- var t = 0,
- r = this.dataProps.length;
- for (
- this.renderer === 'svg' && (this.dashStr = ''), t = 0;
- t < r;
- t += 1
- )
- this.dataProps[t].n !== 'o'
- ? this.renderer === 'svg'
- ? (this.dashStr += ' ' + this.dataProps[t].p.v)
- : (this.dashArray[t] = this.dataProps[t].p.v)
- : (this.dashoffset[0] = this.dataProps[t].p.v);
- }
- }),
- extendPrototype([DynamicPropertyContainer], DashProperty);
- function SVGStrokeStyleData(e, t, r) {
- this.initDynamicPropertyContainer(e),
- (this.getValue = this.iterateDynamicProperties),
- (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
- (this.w = PropertyFactory.getProp(e, t.w, 0, null, this)),
- (this.d = new DashProperty(e, t.d || {}, 'svg', this)),
- (this.c = PropertyFactory.getProp(e, t.c, 1, 255, this)),
- (this.style = r),
- (this._isAnimated = !!this._isAnimated);
- }
- extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
- function SVGFillStyleData(e, t, r) {
- this.initDynamicPropertyContainer(e),
- (this.getValue = this.iterateDynamicProperties),
- (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
- (this.c = PropertyFactory.getProp(e, t.c, 1, 255, this)),
- (this.style = r);
- }
- extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
- function SVGNoStyleData(e, t, r) {
- this.initDynamicPropertyContainer(e),
- (this.getValue = this.iterateDynamicProperties),
- (this.style = r);
- }
- extendPrototype([DynamicPropertyContainer], SVGNoStyleData);
- function GradientProperty(e, t, r) {
- (this.data = t), (this.c = createTypedArray('uint8c', t.p * 4));
- var i = t.k.k[0].s
- ? t.k.k[0].s.length - t.p * 4
- : t.k.k.length - t.p * 4;
- (this.o = createTypedArray('float32', i)),
- (this._cmdf = !1),
- (this._omdf = !1),
- (this._collapsable = this.checkCollapsable()),
- (this._hasOpacity = i),
- this.initDynamicPropertyContainer(r),
- (this.prop = PropertyFactory.getProp(e, t.k, 1, null, this)),
- (this.k = this.prop.k),
- this.getValue(!0);
- }
- (GradientProperty.prototype.comparePoints = function (e, t) {
- for (var r = 0, i = this.o.length / 2, s; r < i; ) {
- if (((s = Math.abs(e[r * 4] - e[t * 4 + r * 2])), s > 0.01))
- return !1;
- r += 1;
- }
- return !0;
- }),
- (GradientProperty.prototype.checkCollapsable = function () {
- if (this.o.length / 2 !== this.c.length / 4) return !1;
- if (this.data.k.k[0].s)
- for (var e = 0, t = this.data.k.k.length; e < t; ) {
- if (!this.comparePoints(this.data.k.k[e].s, this.data.p))
- return !1;
- e += 1;
- }
- else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1;
- return !0;
- }),
- (GradientProperty.prototype.getValue = function (e) {
- if (
- (this.prop.getValue(),
- (this._mdf = !1),
- (this._cmdf = !1),
- (this._omdf = !1),
- this.prop._mdf || e)
- ) {
- var t,
- r = this.data.p * 4,
- i,
- s;
- for (t = 0; t < r; t += 1)
- (i = t % 4 === 0 ? 100 : 255),
- (s = Math.round(this.prop.v[t] * i)),
- this.c[t] !== s && ((this.c[t] = s), (this._cmdf = !e));
- if (this.o.length)
- for (r = this.prop.v.length, t = this.data.p * 4; t < r; t += 1)
- (i = t % 2 === 0 ? 100 : 1),
- (s =
- t % 2 === 0
- ? Math.round(this.prop.v[t] * 100)
- : this.prop.v[t]),
- this.o[t - this.data.p * 4] !== s &&
- ((this.o[t - this.data.p * 4] = s), (this._omdf = !e));
- this._mdf = !e;
- }
- }),
- extendPrototype([DynamicPropertyContainer], GradientProperty);
- function SVGGradientFillStyleData(e, t, r) {
- this.initDynamicPropertyContainer(e),
- (this.getValue = this.iterateDynamicProperties),
- this.initGradientData(e, t, r);
- }
- (SVGGradientFillStyleData.prototype.initGradientData = function (
- e,
- t,
- r
- ) {
- (this.o = PropertyFactory.getProp(e, t.o, 0, 0.01, this)),
- (this.s = PropertyFactory.getProp(e, t.s, 1, null, this)),
- (this.e = PropertyFactory.getProp(e, t.e, 1, null, this)),
- (this.h = PropertyFactory.getProp(e, t.h || { k: 0 }, 0, 0.01, this)),
- (this.a = PropertyFactory.getProp(
- e,
- t.a || { k: 0 },
- 0,
- degToRads,
- this
- )),
- (this.g = new GradientProperty(e, t.g, this)),
- (this.style = r),
- (this.stops = []),
- this.setGradientData(r.pElem, t),
- this.setGradientOpacity(t, r),
- (this._isAnimated = !!this._isAnimated);
- }),
- (SVGGradientFillStyleData.prototype.setGradientData = function (e, t) {
- var r = createElementID(),
- i = createNS(t.t === 1 ? 'linearGradient' : 'radialGradient');
- i.setAttribute('id', r),
- i.setAttribute('spreadMethod', 'pad'),
- i.setAttribute('gradientUnits', 'userSpaceOnUse');
- var s = [],
- a,
- o,
- n;
- for (n = t.g.p * 4, o = 0; o < n; o += 4)
- (a = createNS('stop')), i.appendChild(a), s.push(a);
- e.setAttribute(
- t.ty === 'gf' ? 'fill' : 'stroke',
- 'url(' + getLocationHref() + '#' + r + ')'
- ),
- (this.gf = i),
- (this.cst = s);
- }),
- (SVGGradientFillStyleData.prototype.setGradientOpacity = function (
- e,
- t
- ) {
- if (this.g._hasOpacity && !this.g._collapsable) {
- var r,
- i,
- s,
- a = createNS('mask'),
- o = createNS('path');
- a.appendChild(o);
- var n = createElementID(),
- l = createElementID();
- a.setAttribute('id', l);
- var f = createNS(e.t === 1 ? 'linearGradient' : 'radialGradient');
- f.setAttribute('id', n),
- f.setAttribute('spreadMethod', 'pad'),
- f.setAttribute('gradientUnits', 'userSpaceOnUse'),
- (s = e.g.k.k[0].s ? e.g.k.k[0].s.length : e.g.k.k.length);
- var g = this.stops;
- for (i = e.g.p * 4; i < s; i += 2)
- (r = createNS('stop')),
- r.setAttribute('stop-color', 'rgb(255,255,255)'),
- f.appendChild(r),
- g.push(r);
- o.setAttribute(
- e.ty === 'gf' ? 'fill' : 'stroke',
- 'url(' + getLocationHref() + '#' + n + ')'
- ),
- e.ty === 'gs' &&
- (o.setAttribute('stroke-linecap', lineCapEnum[e.lc || 2]),
- o.setAttribute('stroke-linejoin', lineJoinEnum[e.lj || 2]),
- e.lj === 1 && o.setAttribute('stroke-miterlimit', e.ml)),
- (this.of = f),
- (this.ms = a),
- (this.ost = g),
- (this.maskId = l),
- (t.msElem = o);
- }
- }),
- extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
- function SVGGradientStrokeStyleData(e, t, r) {
- this.initDynamicPropertyContainer(e),
- (this.getValue = this.iterateDynamicProperties),
- (this.w = PropertyFactory.getProp(e, t.w, 0, null, this)),
- (this.d = new DashProperty(e, t.d || {}, 'svg', this)),
- this.initGradientData(e, t, r),
- (this._isAnimated = !!this._isAnimated);
- }
- extendPrototype(
- [SVGGradientFillStyleData, DynamicPropertyContainer],
- SVGGradientStrokeStyleData
- );
- function ShapeGroupData() {
- (this.it = []), (this.prevViewData = []), (this.gr = createNS('g'));
- }
- function SVGTransformData(e, t, r) {
- (this.transform = { mProps: e, op: t, container: r }),
- (this.elements = []),
- (this._isAnimated =
- this.transform.mProps.dynamicProperties.length ||
- this.transform.op.effectsSequence.length);
- }
- var buildShapeString = function (t, r, i, s) {
- if (r === 0) return '';
- var a = t.o,
- o = t.i,
- n = t.v,
- l,
- f = ' M' + s.applyToPointStringified(n[0][0], n[0][1]);
- for (l = 1; l < r; l += 1)
- f +=
- ' C' +
- s.applyToPointStringified(a[l - 1][0], a[l - 1][1]) +
- ' ' +
- s.applyToPointStringified(o[l][0], o[l][1]) +
- ' ' +
- s.applyToPointStringified(n[l][0], n[l][1]);
- return (
- i &&
- r &&
- ((f +=
- ' C' +
- s.applyToPointStringified(a[l - 1][0], a[l - 1][1]) +
- ' ' +
- s.applyToPointStringified(o[0][0], o[0][1]) +
- ' ' +
- s.applyToPointStringified(n[0][0], n[0][1])),
- (f += 'z')),
- f
- );
- },
- SVGElementsRenderer = (function () {
- var e = new Matrix(),
- t = new Matrix(),
- r = { createRenderFunction: i };
- function i(S) {
- switch (S.ty) {
- case 'fl':
- return n;
- case 'gf':
- return f;
- case 'gs':
- return l;
- case 'st':
- return g;
- case 'sh':
- case 'el':
- case 'rc':
- case 'sr':
- return o;
- case 'tr':
- return s;
- case 'no':
- return a;
- default:
- return null;
- }
- }
- function s(S, c, P) {
- (P || c.transform.op._mdf) &&
- c.transform.container.setAttribute('opacity', c.transform.op.v),
- (P || c.transform.mProps._mdf) &&
- c.transform.container.setAttribute(
- 'transform',
- c.transform.mProps.v.to2dCSS()
- );
- }
- function a() {}
- function o(S, c, P) {
- var d,
- p,
- x,
- u,
- y,
- m,
- A = c.styles.length,
- T = c.lvl,
- E,
- _,
- I,
- B;
- for (m = 0; m < A; m += 1) {
- if (((u = c.sh._mdf || P), c.styles[m].lvl < T)) {
- for (
- _ = t.reset(),
- I = T - c.styles[m].lvl,
- B = c.transformers.length - 1;
- !u && I > 0;
- )
- (u = c.transformers[B].mProps._mdf || u), (I -= 1), (B -= 1);
- if (u)
- for (
- I = T - c.styles[m].lvl, B = c.transformers.length - 1;
- I > 0;
- )
- _.multiply(c.transformers[B].mProps.v), (I -= 1), (B -= 1);
- } else _ = e;
- if (((E = c.sh.paths), (p = E._length), u)) {
- for (x = '', d = 0; d < p; d += 1)
- (y = E.shapes[d]),
- y &&
- y._length &&
- (x += buildShapeString(y, y._length, y.c, _));
- c.caches[m] = x;
- } else x = c.caches[m];
- (c.styles[m].d += S.hd === !0 ? '' : x),
- (c.styles[m]._mdf = u || c.styles[m]._mdf);
- }
- }
- function n(S, c, P) {
- var d = c.style;
- (c.c._mdf || P) &&
- d.pElem.setAttribute(
- 'fill',
- 'rgb(' +
- bmFloor(c.c.v[0]) +
- ',' +
- bmFloor(c.c.v[1]) +
- ',' +
- bmFloor(c.c.v[2]) +
- ')'
- ),
- (c.o._mdf || P) && d.pElem.setAttribute('fill-opacity', c.o.v);
- }
- function l(S, c, P) {
- f(S, c, P), g(S, c, P);
- }
- function f(S, c, P) {
- var d = c.gf,
- p = c.g._hasOpacity,
- x = c.s.v,
- u = c.e.v;
- if (c.o._mdf || P) {
- var y = S.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
- c.style.pElem.setAttribute(y, c.o.v);
- }
- if (c.s._mdf || P) {
- var m = S.t === 1 ? 'x1' : 'cx',
- A = m === 'x1' ? 'y1' : 'cy';
- d.setAttribute(m, x[0]),
- d.setAttribute(A, x[1]),
- p &&
- !c.g._collapsable &&
- (c.of.setAttribute(m, x[0]), c.of.setAttribute(A, x[1]));
- }
- var T, E, _, I;
- if (c.g._cmdf || P) {
- T = c.cst;
- var B = c.g.c;
- for (_ = T.length, E = 0; E < _; E += 1)
- (I = T[E]),
- I.setAttribute('offset', B[E * 4] + '%'),
- I.setAttribute(
- 'stop-color',
- 'rgb(' +
- B[E * 4 + 1] +
- ',' +
- B[E * 4 + 2] +
- ',' +
- B[E * 4 + 3] +
- ')'
- );
- }
- if (p && (c.g._omdf || P)) {
- var z = c.g.o;
- for (
- c.g._collapsable ? (T = c.cst) : (T = c.ost),
- _ = T.length,
- E = 0;
- E < _;
- E += 1
- )
- (I = T[E]),
- c.g._collapsable || I.setAttribute('offset', z[E * 2] + '%'),
- I.setAttribute('stop-opacity', z[E * 2 + 1]);
- }
- if (S.t === 1)
- (c.e._mdf || P) &&
- (d.setAttribute('x2', u[0]),
- d.setAttribute('y2', u[1]),
- p &&
- !c.g._collapsable &&
- (c.of.setAttribute('x2', u[0]),
- c.of.setAttribute('y2', u[1])));
- else {
- var G;
- if (
- ((c.s._mdf || c.e._mdf || P) &&
- ((G = Math.sqrt(
- Math.pow(x[0] - u[0], 2) + Math.pow(x[1] - u[1], 2)
- )),
- d.setAttribute('r', G),
- p && !c.g._collapsable && c.of.setAttribute('r', G)),
- c.e._mdf || c.h._mdf || c.a._mdf || P)
- ) {
- G ||
- (G = Math.sqrt(
- Math.pow(x[0] - u[0], 2) + Math.pow(x[1] - u[1], 2)
- ));
- var R = Math.atan2(u[1] - x[1], u[0] - x[0]),
- W = c.h.v;
- W >= 1 ? (W = 0.99) : W <= -1 && (W = -0.99);
- var H = G * W,
- N = Math.cos(R + c.a.v) * H + x[0],
- M = Math.sin(R + c.a.v) * H + x[1];
- d.setAttribute('fx', N),
- d.setAttribute('fy', M),
- p &&
- !c.g._collapsable &&
- (c.of.setAttribute('fx', N), c.of.setAttribute('fy', M));
- }
- }
- }
- function g(S, c, P) {
- var d = c.style,
- p = c.d;
- p &&
- (p._mdf || P) &&
- p.dashStr &&
- (d.pElem.setAttribute('stroke-dasharray', p.dashStr),
- d.pElem.setAttribute('stroke-dashoffset', p.dashoffset[0])),
- c.c &&
- (c.c._mdf || P) &&
- d.pElem.setAttribute(
- 'stroke',
- 'rgb(' +
- bmFloor(c.c.v[0]) +
- ',' +
- bmFloor(c.c.v[1]) +
- ',' +
- bmFloor(c.c.v[2]) +
- ')'
- ),
- (c.o._mdf || P) && d.pElem.setAttribute('stroke-opacity', c.o.v),
- (c.w._mdf || P) &&
- (d.pElem.setAttribute('stroke-width', c.w.v),
- d.msElem && d.msElem.setAttribute('stroke-width', c.w.v));
- }
- return r;
- })();
- function SVGShapeElement(e, t, r) {
- (this.shapes = []),
- (this.shapesData = e.shapes),
- (this.stylesList = []),
- (this.shapeModifiers = []),
- (this.itemsData = []),
- (this.processedElements = []),
- (this.animatedContents = []),
- this.initElement(e, t, r),
- (this.prevViewData = []);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- SVGBaseElement,
- IShapeElement,
- HierarchyElement,
- FrameElement,
- RenderableDOMElement
- ],
- SVGShapeElement
- ),
- (SVGShapeElement.prototype.initSecondaryElement = function () {}),
- (SVGShapeElement.prototype.identityMatrix = new Matrix()),
- (SVGShapeElement.prototype.buildExpressionInterface = function () {}),
- (SVGShapeElement.prototype.createContent = function () {
- this.searchShapes(
- this.shapesData,
- this.itemsData,
- this.prevViewData,
- this.layerElement,
- 0,
- [],
- !0
- ),
- this.filterUniqueShapes();
- }),
- (SVGShapeElement.prototype.filterUniqueShapes = function () {
- var e,
- t = this.shapes.length,
- r,
- i,
- s = this.stylesList.length,
- a,
- o = [],
- n = !1;
- for (i = 0; i < s; i += 1) {
- for (
- a = this.stylesList[i], n = !1, o.length = 0, e = 0;
- e < t;
- e += 1
- )
- (r = this.shapes[e]),
- r.styles.indexOf(a) !== -1 &&
- (o.push(r), (n = r._isAnimated || n));
- o.length > 1 && n && this.setShapesAsAnimated(o);
- }
- }),
- (SVGShapeElement.prototype.setShapesAsAnimated = function (e) {
- var t,
- r = e.length;
- for (t = 0; t < r; t += 1) e[t].setAsAnimated();
- }),
- (SVGShapeElement.prototype.createStyleElement = function (e, t) {
- var r,
- i = new SVGStyleData(e, t),
- s = i.pElem;
- if (e.ty === 'st') r = new SVGStrokeStyleData(this, e, i);
- else if (e.ty === 'fl') r = new SVGFillStyleData(this, e, i);
- else if (e.ty === 'gf' || e.ty === 'gs') {
- var a =
- e.ty === 'gf'
- ? SVGGradientFillStyleData
- : SVGGradientStrokeStyleData;
- (r = new a(this, e, i)),
- this.globalData.defs.appendChild(r.gf),
- r.maskId &&
- (this.globalData.defs.appendChild(r.ms),
- this.globalData.defs.appendChild(r.of),
- s.setAttribute(
- 'mask',
- 'url(' + getLocationHref() + '#' + r.maskId + ')'
- ));
- } else e.ty === 'no' && (r = new SVGNoStyleData(this, e, i));
- return (
- (e.ty === 'st' || e.ty === 'gs') &&
- (s.setAttribute('stroke-linecap', lineCapEnum[e.lc || 2]),
- s.setAttribute('stroke-linejoin', lineJoinEnum[e.lj || 2]),
- s.setAttribute('fill-opacity', '0'),
- e.lj === 1 && s.setAttribute('stroke-miterlimit', e.ml)),
- e.r === 2 && s.setAttribute('fill-rule', 'evenodd'),
- e.ln && s.setAttribute('id', e.ln),
- e.cl && s.setAttribute('class', e.cl),
- e.bm && (s.style['mix-blend-mode'] = getBlendMode(e.bm)),
- this.stylesList.push(i),
- this.addToAnimatedContents(e, r),
- r
- );
- }),
- (SVGShapeElement.prototype.createGroupElement = function (e) {
- var t = new ShapeGroupData();
- return (
- e.ln && t.gr.setAttribute('id', e.ln),
- e.cl && t.gr.setAttribute('class', e.cl),
- e.bm && (t.gr.style['mix-blend-mode'] = getBlendMode(e.bm)),
- t
- );
- }),
- (SVGShapeElement.prototype.createTransformElement = function (e, t) {
- var r = TransformPropertyFactory.getTransformProperty(this, e, this),
- i = new SVGTransformData(r, r.o, t);
- return this.addToAnimatedContents(e, i), i;
- }),
- (SVGShapeElement.prototype.createShapeElement = function (e, t, r) {
- var i = 4;
- e.ty === 'rc'
- ? (i = 5)
- : e.ty === 'el'
- ? (i = 6)
- : e.ty === 'sr' && (i = 7);
- var s = ShapePropertyFactory.getShapeProp(this, e, i, this),
- a = new SVGShapeData(t, r, s);
- return (
- this.shapes.push(a),
- this.addShapeToModifiers(a),
- this.addToAnimatedContents(e, a),
- a
- );
- }),
- (SVGShapeElement.prototype.addToAnimatedContents = function (e, t) {
- for (var r = 0, i = this.animatedContents.length; r < i; ) {
- if (this.animatedContents[r].element === t) return;
- r += 1;
- }
- this.animatedContents.push({
- fn: SVGElementsRenderer.createRenderFunction(e),
- element: t,
- data: e
- });
- }),
- (SVGShapeElement.prototype.setElementStyles = function (e) {
- var t = e.styles,
- r,
- i = this.stylesList.length;
- for (r = 0; r < i; r += 1)
- this.stylesList[r].closed || t.push(this.stylesList[r]);
- }),
- (SVGShapeElement.prototype.reloadShapes = function () {
- this._isFirstFrame = !0;
- var e,
- t = this.itemsData.length;
- for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
- for (
- this.searchShapes(
- this.shapesData,
- this.itemsData,
- this.prevViewData,
- this.layerElement,
- 0,
- [],
- !0
- ),
- this.filterUniqueShapes(),
- t = this.dynamicProperties.length,
- e = 0;
- e < t;
- e += 1
- )
- this.dynamicProperties[e].getValue();
- this.renderModifiers();
- }),
- (SVGShapeElement.prototype.searchShapes = function (
- e,
- t,
- r,
- i,
- s,
- a,
- o
- ) {
- var n = [].concat(a),
- l,
- f = e.length - 1,
- g,
- S,
- c = [],
- P = [],
- d,
- p,
- x;
- for (l = f; l >= 0; l -= 1) {
- if (
- ((x = this.searchProcessedElement(e[l])),
- x ? (t[l] = r[x - 1]) : (e[l]._render = o),
- e[l].ty === 'fl' ||
- e[l].ty === 'st' ||
- e[l].ty === 'gf' ||
- e[l].ty === 'gs' ||
- e[l].ty === 'no')
- )
- x
- ? (t[l].style.closed = !1)
- : (t[l] = this.createStyleElement(e[l], s)),
- e[l]._render &&
- t[l].style.pElem.parentNode !== i &&
- i.appendChild(t[l].style.pElem),
- c.push(t[l].style);
- else if (e[l].ty === 'gr') {
- if (!x) t[l] = this.createGroupElement(e[l]);
- else
- for (S = t[l].it.length, g = 0; g < S; g += 1)
- t[l].prevViewData[g] = t[l].it[g];
- this.searchShapes(
- e[l].it,
- t[l].it,
- t[l].prevViewData,
- t[l].gr,
- s + 1,
- n,
- o
- ),
- e[l]._render &&
- t[l].gr.parentNode !== i &&
- i.appendChild(t[l].gr);
- } else
- e[l].ty === 'tr'
- ? (x || (t[l] = this.createTransformElement(e[l], i)),
- (d = t[l].transform),
- n.push(d))
- : e[l].ty === 'sh' ||
- e[l].ty === 'rc' ||
- e[l].ty === 'el' ||
- e[l].ty === 'sr'
- ? (x || (t[l] = this.createShapeElement(e[l], n, s)),
- this.setElementStyles(t[l]))
- : e[l].ty === 'tm' ||
- e[l].ty === 'rd' ||
- e[l].ty === 'ms' ||
- e[l].ty === 'pb' ||
- e[l].ty === 'zz' ||
- e[l].ty === 'op'
- ? (x
- ? ((p = t[l]), (p.closed = !1))
- : ((p = ShapeModifiers.getModifier(e[l].ty)),
- p.init(this, e[l]),
- (t[l] = p),
- this.shapeModifiers.push(p)),
- P.push(p))
- : e[l].ty === 'rp' &&
- (x
- ? ((p = t[l]), (p.closed = !0))
- : ((p = ShapeModifiers.getModifier(e[l].ty)),
- (t[l] = p),
- p.init(this, e, l, t),
- this.shapeModifiers.push(p),
- (o = !1)),
- P.push(p));
- this.addProcessedElement(e[l], l + 1);
- }
- for (f = c.length, l = 0; l < f; l += 1) c[l].closed = !0;
- for (f = P.length, l = 0; l < f; l += 1) P[l].closed = !0;
- }),
- (SVGShapeElement.prototype.renderInnerContent = function () {
- this.renderModifiers();
- var e,
- t = this.stylesList.length;
- for (e = 0; e < t; e += 1) this.stylesList[e].reset();
- for (this.renderShape(), e = 0; e < t; e += 1)
- (this.stylesList[e]._mdf || this._isFirstFrame) &&
- (this.stylesList[e].msElem &&
- (this.stylesList[e].msElem.setAttribute(
- 'd',
- this.stylesList[e].d
- ),
- (this.stylesList[e].d = 'M0 0' + this.stylesList[e].d)),
- this.stylesList[e].pElem.setAttribute(
- 'd',
- this.stylesList[e].d || 'M0 0'
- ));
- }),
- (SVGShapeElement.prototype.renderShape = function () {
- var e,
- t = this.animatedContents.length,
- r;
- for (e = 0; e < t; e += 1)
- (r = this.animatedContents[e]),
- (this._isFirstFrame || r.element._isAnimated) &&
- r.data !== !0 &&
- r.fn(r.data, r.element, this._isFirstFrame);
- }),
- (SVGShapeElement.prototype.destroy = function () {
- this.destroyBaseElement(),
- (this.shapesData = null),
- (this.itemsData = null);
- });
- function LetterProps(e, t, r, i, s, a) {
- (this.o = e),
- (this.sw = t),
- (this.sc = r),
- (this.fc = i),
- (this.m = s),
- (this.p = a),
- (this._mdf = { o: !0, sw: !!t, sc: !!r, fc: !!i, m: !0, p: !0 });
- }
- LetterProps.prototype.update = function (e, t, r, i, s, a) {
- (this._mdf.o = !1),
- (this._mdf.sw = !1),
- (this._mdf.sc = !1),
- (this._mdf.fc = !1),
- (this._mdf.m = !1),
- (this._mdf.p = !1);
- var o = !1;
- return (
- this.o !== e && ((this.o = e), (this._mdf.o = !0), (o = !0)),
- this.sw !== t && ((this.sw = t), (this._mdf.sw = !0), (o = !0)),
- this.sc !== r && ((this.sc = r), (this._mdf.sc = !0), (o = !0)),
- this.fc !== i && ((this.fc = i), (this._mdf.fc = !0), (o = !0)),
- this.m !== s && ((this.m = s), (this._mdf.m = !0), (o = !0)),
- a.length &&
- (this.p[0] !== a[0] ||
- this.p[1] !== a[1] ||
- this.p[4] !== a[4] ||
- this.p[5] !== a[5] ||
- this.p[12] !== a[12] ||
- this.p[13] !== a[13]) &&
- ((this.p = a), (this._mdf.p = !0), (o = !0)),
- o
- );
- };
- function TextProperty(e, t) {
- (this._frameId = initialDefaultFrame),
- (this.pv = ''),
- (this.v = ''),
- (this.kf = !1),
- (this._isFirstFrame = !0),
- (this._mdf = !1),
- t.d && t.d.sid && (t.d = e.globalData.slotManager.getProp(t.d)),
- (this.data = t),
- (this.elem = e),
- (this.comp = this.elem.comp),
- (this.keysIndex = 0),
- (this.canResize = !1),
- (this.minimumFontSize = 1),
- (this.effectsSequence = []),
- (this.currentData = {
- ascent: 0,
- boxWidth: this.defaultBoxWidth,
- f: '',
- fStyle: '',
- fWeight: '',
- fc: '',
- j: '',
- justifyOffset: '',
- l: [],
- lh: 0,
- lineWidths: [],
- ls: '',
- of: '',
- s: '',
- sc: '',
- sw: 0,
- t: 0,
- tr: 0,
- sz: 0,
- ps: null,
- fillColorAnim: !1,
- strokeColorAnim: !1,
- strokeWidthAnim: !1,
- yOffset: 0,
- finalSize: 0,
- finalText: [],
- finalLineHeight: 0,
- __complete: !1
- }),
- this.copyData(this.currentData, this.data.d.k[0].s),
- this.searchProperty() || this.completeTextData(this.currentData);
- }
- (TextProperty.prototype.defaultBoxWidth = [0, 0]),
- (TextProperty.prototype.copyData = function (e, t) {
- for (var r in t)
- Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
- return e;
- }),
- (TextProperty.prototype.setCurrentData = function (e) {
- e.__complete || this.completeTextData(e),
- (this.currentData = e),
- (this.currentData.boxWidth =
- this.currentData.boxWidth || this.defaultBoxWidth),
- (this._mdf = !0);
- }),
- (TextProperty.prototype.searchProperty = function () {
- return this.searchKeyframes();
- }),
- (TextProperty.prototype.searchKeyframes = function () {
- return (
- (this.kf = this.data.d.k.length > 1),
- this.kf && this.addEffect(this.getKeyframeValue.bind(this)),
- this.kf
- );
- }),
- (TextProperty.prototype.addEffect = function (e) {
- this.effectsSequence.push(e), this.elem.addDynamicProperty(this);
- }),
- (TextProperty.prototype.getValue = function (e) {
- if (
- !(
- (this.elem.globalData.frameId === this.frameId ||
- !this.effectsSequence.length) &&
- !e
- )
- ) {
- this.currentData.t = this.data.d.k[this.keysIndex].s.t;
- var t = this.currentData,
- r = this.keysIndex;
- if (this.lock) {
- this.setCurrentData(this.currentData);
- return;
- }
- (this.lock = !0), (this._mdf = !1);
- var i,
- s = this.effectsSequence.length,
- a = e || this.data.d.k[this.keysIndex].s;
- for (i = 0; i < s; i += 1)
- r !== this.keysIndex
- ? (a = this.effectsSequence[i](a, a.t))
- : (a = this.effectsSequence[i](this.currentData, a.t));
- t !== a && this.setCurrentData(a),
- (this.v = this.currentData),
- (this.pv = this.v),
- (this.lock = !1),
- (this.frameId = this.elem.globalData.frameId);
- }
- }),
- (TextProperty.prototype.getKeyframeValue = function () {
- for (
- var e = this.data.d.k,
- t = this.elem.comp.renderedFrame,
- r = 0,
- i = e.length;
- r <= i - 1 && !(r === i - 1 || e[r + 1].t > t);
- )
- r += 1;
- return (
- this.keysIndex !== r && (this.keysIndex = r),
- this.data.d.k[this.keysIndex].s
- );
- }),
- (TextProperty.prototype.buildFinalText = function (e) {
- for (
- var t = [], r = 0, i = e.length, s, a, o = !1, n = !1, l = '';
- r < i;
- )
- (o = n),
- (n = !1),
- (s = e.charCodeAt(r)),
- (l = e.charAt(r)),
- FontManager.isCombinedCharacter(s)
- ? (o = !0)
- : s >= 55296 && s <= 56319
- ? FontManager.isRegionalFlag(e, r)
- ? (l = e.substr(r, 14))
- : ((a = e.charCodeAt(r + 1)),
- a >= 56320 &&
- a <= 57343 &&
- (FontManager.isModifier(s, a)
- ? ((l = e.substr(r, 2)), (o = !0))
- : FontManager.isFlagEmoji(e.substr(r, 4))
- ? (l = e.substr(r, 4))
- : (l = e.substr(r, 2))))
- : s > 56319
- ? ((a = e.charCodeAt(r + 1)),
- FontManager.isVariationSelector(s) && (o = !0))
- : FontManager.isZeroWidthJoiner(s) && ((o = !0), (n = !0)),
- o ? ((t[t.length - 1] += l), (o = !1)) : t.push(l),
- (r += l.length);
- return t;
- }),
- (TextProperty.prototype.completeTextData = function (e) {
- e.__complete = !0;
- var t = this.elem.globalData.fontManager,
- r = this.data,
- i = [],
- s,
- a,
- o,
- n = 0,
- l,
- f = r.m.g,
- g = 0,
- S = 0,
- c = 0,
- P = [],
- d = 0,
- p = 0,
- x,
- u,
- y = t.getFontByName(e.f),
- m,
- A = 0,
- T = getFontProperties(y);
- (e.fWeight = T.weight),
- (e.fStyle = T.style),
- (e.finalSize = e.s),
- (e.finalText = this.buildFinalText(e.t)),
- (a = e.finalText.length),
- (e.finalLineHeight = e.lh);
- var E = (e.tr / 1e3) * e.finalSize,
- _;
- if (e.sz)
- for (var I = !0, B = e.sz[0], z = e.sz[1], G, R; I; ) {
- (R = this.buildFinalText(e.t)),
- (G = 0),
- (d = 0),
- (a = R.length),
- (E = (e.tr / 1e3) * e.finalSize);
- var W = -1;
- for (s = 0; s < a; s += 1)
- (_ = R[s].charCodeAt(0)),
- (o = !1),
- R[s] === ' '
- ? (W = s)
- : (_ === 13 || _ === 3) &&
- ((d = 0),
- (o = !0),
- (G += e.finalLineHeight || e.finalSize * 1.2)),
- t.chars
- ? ((m = t.getCharData(R[s], y.fStyle, y.fFamily)),
- (A = o ? 0 : (m.w * e.finalSize) / 100))
- : (A = t.measureText(R[s], e.f, e.finalSize)),
- d + A > B && R[s] !== ' '
- ? (W === -1 ? (a += 1) : (s = W),
- (G += e.finalLineHeight || e.finalSize * 1.2),
- R.splice(s, W === s ? 1 : 0, '\r'),
- (W = -1),
- (d = 0))
- : ((d += A), (d += E));
- (G += (y.ascent * e.finalSize) / 100),
- this.canResize && e.finalSize > this.minimumFontSize && z < G
- ? ((e.finalSize -= 1),
- (e.finalLineHeight = (e.finalSize * e.lh) / e.s))
- : ((e.finalText = R), (a = e.finalText.length), (I = !1));
- }
- (d = -E), (A = 0);
- var H = 0,
- N;
- for (s = 0; s < a; s += 1)
- if (
- ((o = !1),
- (N = e.finalText[s]),
- (_ = N.charCodeAt(0)),
- _ === 13 || _ === 3
- ? ((H = 0),
- P.push(d),
- (p = d > p ? d : p),
- (d = -2 * E),
- (l = ''),
- (o = !0),
- (c += 1))
- : (l = N),
- t.chars
- ? ((m = t.getCharData(
- N,
- y.fStyle,
- t.getFontByName(e.f).fFamily
- )),
- (A = o ? 0 : (m.w * e.finalSize) / 100))
- : (A = t.measureText(l, e.f, e.finalSize)),
- N === ' ' ? (H += A + E) : ((d += A + E + H), (H = 0)),
- i.push({
- l: A,
- an: A,
- add: g,
- n: o,
- anIndexes: [],
- val: l,
- line: c,
- animatorJustifyOffset: 0
- }),
- f == 2)
- ) {
- if (((g += A), l === '' || l === ' ' || s === a - 1)) {
- for ((l === '' || l === ' ') && (g -= A); S <= s; )
- (i[S].an = g), (i[S].ind = n), (i[S].extra = A), (S += 1);
- (n += 1), (g = 0);
- }
- } else if (f == 3) {
- if (((g += A), l === '' || s === a - 1)) {
- for (l === '' && (g -= A); S <= s; )
- (i[S].an = g), (i[S].ind = n), (i[S].extra = A), (S += 1);
- (g = 0), (n += 1);
- }
- } else (i[n].ind = n), (i[n].extra = 0), (n += 1);
- if (((e.l = i), (p = d > p ? d : p), P.push(d), e.sz))
- (e.boxWidth = e.sz[0]), (e.justifyOffset = 0);
- else
- switch (((e.boxWidth = p), e.j)) {
- case 1:
- e.justifyOffset = -e.boxWidth;
- break;
- case 2:
- e.justifyOffset = -e.boxWidth / 2;
- break;
- default:
- e.justifyOffset = 0;
- }
- e.lineWidths = P;
- var M = r.a,
- k,
- b;
- u = M.length;
- var C,
- L,
- F = [];
- for (x = 0; x < u; x += 1) {
- for (
- k = M[x],
- k.a.sc && (e.strokeColorAnim = !0),
- k.a.sw && (e.strokeWidthAnim = !0),
- (k.a.fc || k.a.fh || k.a.fs || k.a.fb) &&
- (e.fillColorAnim = !0),
- L = 0,
- C = k.s.b,
- s = 0;
- s < a;
- s += 1
- )
- (b = i[s]),
- (b.anIndexes[x] = L),
- ((C == 1 && b.val !== '') ||
- (C == 2 && b.val !== '' && b.val !== ' ') ||
- (C == 3 && (b.n || b.val == ' ' || s == a - 1)) ||
- (C == 4 && (b.n || s == a - 1))) &&
- (k.s.rn === 1 && F.push(L), (L += 1));
- r.a[x].s.totalChars = L;
- var U = -1,
- D;
- if (k.s.rn === 1)
- for (s = 0; s < a; s += 1)
- (b = i[s]),
- U != b.anIndexes[x] &&
- ((U = b.anIndexes[x]),
- (D = F.splice(Math.floor(Math.random() * F.length), 1)[0])),
- (b.anIndexes[x] = D);
- }
- (e.yOffset = e.finalLineHeight || e.finalSize * 1.2),
- (e.ls = e.ls || 0),
- (e.ascent = (y.ascent * e.finalSize) / 100);
- }),
- (TextProperty.prototype.updateDocumentData = function (e, t) {
- t = t === void 0 ? this.keysIndex : t;
- var r = this.copyData({}, this.data.d.k[t].s);
- (r = this.copyData(r, e)),
- (this.data.d.k[t].s = r),
- this.recalculate(t),
- this.setCurrentData(r),
- this.elem.addDynamicProperty(this);
- }),
- (TextProperty.prototype.recalculate = function (e) {
- var t = this.data.d.k[e].s;
- (t.__complete = !1),
- (this.keysIndex = 0),
- (this._isFirstFrame = !0),
- this.getValue(t);
- }),
- (TextProperty.prototype.canResizeFont = function (e) {
- (this.canResize = e),
- this.recalculate(this.keysIndex),
- this.elem.addDynamicProperty(this);
- }),
- (TextProperty.prototype.setMinimumFontSize = function (e) {
- (this.minimumFontSize = Math.floor(e) || 1),
- this.recalculate(this.keysIndex),
- this.elem.addDynamicProperty(this);
- });
- var TextSelectorProp = (function () {
- var e = Math.max,
- t = Math.min,
- r = Math.floor;
- function i(a, o) {
- (this._currentTextLength = -1),
- (this.k = !1),
- (this.data = o),
- (this.elem = a),
- (this.comp = a.comp),
- (this.finalS = 0),
- (this.finalE = 0),
- this.initDynamicPropertyContainer(a),
- (this.s = PropertyFactory.getProp(a, o.s || { k: 0 }, 0, 0, this)),
- 'e' in o
- ? (this.e = PropertyFactory.getProp(a, o.e, 0, 0, this))
- : (this.e = { v: 100 }),
- (this.o = PropertyFactory.getProp(a, o.o || { k: 0 }, 0, 0, this)),
- (this.xe = PropertyFactory.getProp(
- a,
- o.xe || { k: 0 },
- 0,
- 0,
- this
- )),
- (this.ne = PropertyFactory.getProp(
- a,
- o.ne || { k: 0 },
- 0,
- 0,
- this
- )),
- (this.sm = PropertyFactory.getProp(
- a,
- o.sm || { k: 100 },
- 0,
- 0,
- this
- )),
- (this.a = PropertyFactory.getProp(a, o.a, 0, 0.01, this)),
- this.dynamicProperties.length || this.getValue();
- }
- (i.prototype = {
- getMult: function (o) {
- this._currentTextLength !==
- this.elem.textProperty.currentData.l.length && this.getValue();
- var n = 0,
- l = 0,
- f = 1,
- g = 1;
- this.ne.v > 0 ? (n = this.ne.v / 100) : (l = -this.ne.v / 100),
- this.xe.v > 0
- ? (f = 1 - this.xe.v / 100)
- : (g = 1 + this.xe.v / 100);
- var S = BezierFactory.getBezierEasing(n, l, f, g).get,
- c = 0,
- P = this.finalS,
- d = this.finalE,
- p = this.data.sh;
- if (p === 2)
- d === P
- ? (c = o >= d ? 1 : 0)
- : (c = e(0, t(0.5 / (d - P) + (o - P) / (d - P), 1))),
- (c = S(c));
- else if (p === 3)
- d === P
- ? (c = o >= d ? 0 : 1)
- : (c = 1 - e(0, t(0.5 / (d - P) + (o - P) / (d - P), 1))),
- (c = S(c));
- else if (p === 4)
- d === P
- ? (c = 0)
- : ((c = e(0, t(0.5 / (d - P) + (o - P) / (d - P), 1))),
- c < 0.5 ? (c *= 2) : (c = 1 - 2 * (c - 0.5))),
- (c = S(c));
- else if (p === 5) {
- if (d === P) c = 0;
- else {
- var x = d - P;
- o = t(e(0, o + 0.5 - P), d - P);
- var u = -x / 2 + o,
- y = x / 2;
- c = Math.sqrt(1 - (u * u) / (y * y));
- }
- c = S(c);
- } else
- p === 6
- ? (d === P
- ? (c = 0)
- : ((o = t(e(0, o + 0.5 - P), d - P)),
- (c =
- (1 + Math.cos(Math.PI + (Math.PI * 2 * o) / (d - P))) /
- 2)),
- (c = S(c)))
- : (o >= r(P) &&
- (o - P < 0
- ? (c = e(0, t(t(d, 1) - (P - o), 1)))
- : (c = e(0, t(d - o, 1)))),
- (c = S(c)));
- if (this.sm.v !== 100) {
- var m = this.sm.v * 0.01;
- m === 0 && (m = 1e-8);
- var A = 0.5 - m * 0.5;
- c < A ? (c = 0) : ((c = (c - A) / m), c > 1 && (c = 1));
- }
- return c * this.a.v;
- },
- getValue: function (o) {
- this.iterateDynamicProperties(),
- (this._mdf = o || this._mdf),
- (this._currentTextLength =
- this.elem.textProperty.currentData.l.length || 0),
- o && this.data.r === 2 && (this.e.v = this._currentTextLength);
- var n = this.data.r === 2 ? 1 : 100 / this.data.totalChars,
- l = this.o.v / n,
- f = this.s.v / n + l,
- g = this.e.v / n + l;
- if (f > g) {
- var S = f;
- (f = g), (g = S);
- }
- (this.finalS = f), (this.finalE = g);
- }
- }),
- extendPrototype([DynamicPropertyContainer], i);
- function s(a, o, n) {
- return new i(a, o);
- }
- return { getTextSelectorProp: s };
- })();
- function TextAnimatorDataProperty(e, t, r) {
- var i = { propType: !1 },
- s = PropertyFactory.getProp,
- a = t.a;
- (this.a = {
- r: a.r ? s(e, a.r, 0, degToRads, r) : i,
- rx: a.rx ? s(e, a.rx, 0, degToRads, r) : i,
- ry: a.ry ? s(e, a.ry, 0, degToRads, r) : i,
- sk: a.sk ? s(e, a.sk, 0, degToRads, r) : i,
- sa: a.sa ? s(e, a.sa, 0, degToRads, r) : i,
- s: a.s ? s(e, a.s, 1, 0.01, r) : i,
- a: a.a ? s(e, a.a, 1, 0, r) : i,
- o: a.o ? s(e, a.o, 0, 0.01, r) : i,
- p: a.p ? s(e, a.p, 1, 0, r) : i,
- sw: a.sw ? s(e, a.sw, 0, 0, r) : i,
- sc: a.sc ? s(e, a.sc, 1, 0, r) : i,
- fc: a.fc ? s(e, a.fc, 1, 0, r) : i,
- fh: a.fh ? s(e, a.fh, 0, 0, r) : i,
- fs: a.fs ? s(e, a.fs, 0, 0.01, r) : i,
- fb: a.fb ? s(e, a.fb, 0, 0.01, r) : i,
- t: a.t ? s(e, a.t, 0, 0, r) : i
- }),
- (this.s = TextSelectorProp.getTextSelectorProp(e, t.s, r)),
- (this.s.t = t.s.t);
- }
- function TextAnimatorProperty(e, t, r) {
- (this._isFirstFrame = !0),
- (this._hasMaskedPath = !1),
- (this._frameId = -1),
- (this._textData = e),
- (this._renderType = t),
- (this._elem = r),
- (this._animatorsData = createSizedArray(this._textData.a.length)),
- (this._pathData = {}),
- (this._moreOptions = { alignment: {} }),
- (this.renderedLetters = []),
- (this.lettersChangedFlag = !1),
- this.initDynamicPropertyContainer(r);
- }
- (TextAnimatorProperty.prototype.searchProperties = function () {
- var e,
- t = this._textData.a.length,
- r,
- i = PropertyFactory.getProp;
- for (e = 0; e < t; e += 1)
- (r = this._textData.a[e]),
- (this._animatorsData[e] = new TextAnimatorDataProperty(
- this._elem,
- r,
- this
- ));
- this._textData.p && 'm' in this._textData.p
- ? ((this._pathData = {
- a: i(this._elem, this._textData.p.a, 0, 0, this),
- f: i(this._elem, this._textData.p.f, 0, 0, this),
- l: i(this._elem, this._textData.p.l, 0, 0, this),
- r: i(this._elem, this._textData.p.r, 0, 0, this),
- p: i(this._elem, this._textData.p.p, 0, 0, this),
- m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
- }),
- (this._hasMaskedPath = !0))
- : (this._hasMaskedPath = !1),
- (this._moreOptions.alignment = i(
- this._elem,
- this._textData.m.a,
- 1,
- 0,
- this
- ));
- }),
- (TextAnimatorProperty.prototype.getMeasures = function (e, t) {
- if (
- ((this.lettersChangedFlag = t),
- !(
- !this._mdf &&
- !this._isFirstFrame &&
- !t &&
- (!this._hasMaskedPath || !this._pathData.m._mdf)
- ))
- ) {
- this._isFirstFrame = !1;
- var r = this._moreOptions.alignment.v,
- i = this._animatorsData,
- s = this._textData,
- a = this.mHelper,
- o = this._renderType,
- n = this.renderedLetters.length,
- l,
- f,
- g,
- S,
- c = e.l,
- P,
- d,
- p,
- x,
- u,
- y,
- m,
- A,
- T,
- E,
- _,
- I,
- B,
- z,
- G;
- if (this._hasMaskedPath) {
- if (
- ((G = this._pathData.m),
- !this._pathData.n || this._pathData._mdf)
- ) {
- var R = G.v;
- this._pathData.r.v && (R = R.reverse()),
- (P = { tLength: 0, segments: [] }),
- (S = R._length - 1);
- var W;
- for (I = 0, g = 0; g < S; g += 1)
- (W = bez.buildBezierData(
- R.v[g],
- R.v[g + 1],
- [R.o[g][0] - R.v[g][0], R.o[g][1] - R.v[g][1]],
- [
- R.i[g + 1][0] - R.v[g + 1][0],
- R.i[g + 1][1] - R.v[g + 1][1]
- ]
- )),
- (P.tLength += W.segmentLength),
- P.segments.push(W),
- (I += W.segmentLength);
- (g = S),
- G.v.c &&
- ((W = bez.buildBezierData(
- R.v[g],
- R.v[0],
- [R.o[g][0] - R.v[g][0], R.o[g][1] - R.v[g][1]],
- [R.i[0][0] - R.v[0][0], R.i[0][1] - R.v[0][1]]
- )),
- (P.tLength += W.segmentLength),
- P.segments.push(W),
- (I += W.segmentLength)),
- (this._pathData.pi = P);
- }
- if (
- ((P = this._pathData.pi),
- (d = this._pathData.f.v),
- (m = 0),
- (y = 1),
- (x = 0),
- (u = !0),
- (E = P.segments),
- d < 0 && G.v.c)
- )
- for (
- P.tLength < Math.abs(d) && (d = -Math.abs(d) % P.tLength),
- m = E.length - 1,
- T = E[m].points,
- y = T.length - 1;
- d < 0;
- )
- (d += T[y].partialLength),
- (y -= 1),
- y < 0 && ((m -= 1), (T = E[m].points), (y = T.length - 1));
- (T = E[m].points),
- (A = T[y - 1]),
- (p = T[y]),
- (_ = p.partialLength);
- }
- (S = c.length), (l = 0), (f = 0);
- var H = e.finalSize * 1.2 * 0.714,
- N = !0,
- M,
- k,
- b,
- C,
- L;
- C = i.length;
- var F,
- U = -1,
- D,
- V,
- O,
- j = d,
- $ = m,
- J = y,
- X = -1,
- Y,
- K,
- Z,
- Q,
- q,
- ee,
- te,
- ne,
- ae = '',
- oe = this.defaultPropsArray,
- le;
- if (e.j === 2 || e.j === 1) {
- var re = 0,
- he = 0,
- fe = e.j === 2 ? -0.5 : -1,
- ie = 0,
- ce = !0;
- for (g = 0; g < S; g += 1)
- if (c[g].n) {
- for (re && (re += he); ie < g; )
- (c[ie].animatorJustifyOffset = re), (ie += 1);
- (re = 0), (ce = !0);
- } else {
- for (b = 0; b < C; b += 1)
- (M = i[b].a),
- M.t.propType &&
- (ce && e.j === 2 && (he += M.t.v * fe),
- (k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- F.length
- ? (re += M.t.v * F[0] * fe)
- : (re += M.t.v * F * fe));
- ce = !1;
- }
- for (re && (re += he); ie < g; )
- (c[ie].animatorJustifyOffset = re), (ie += 1);
- }
- for (g = 0; g < S; g += 1) {
- if ((a.reset(), (Y = 1), c[g].n))
- (l = 0),
- (f += e.yOffset),
- (f += N ? 1 : 0),
- (d = j),
- (N = !1),
- this._hasMaskedPath &&
- ((m = $),
- (y = J),
- (T = E[m].points),
- (A = T[y - 1]),
- (p = T[y]),
- (_ = p.partialLength),
- (x = 0)),
- (ae = ''),
- (ne = ''),
- (ee = ''),
- (le = ''),
- (oe = this.defaultPropsArray);
- else {
- if (this._hasMaskedPath) {
- if (X !== c[g].line) {
- switch (e.j) {
- case 1:
- d += I - e.lineWidths[c[g].line];
- break;
- case 2:
- d += (I - e.lineWidths[c[g].line]) / 2;
- break;
- }
- X = c[g].line;
- }
- U !== c[g].ind &&
- (c[U] && (d += c[U].extra),
- (d += c[g].an / 2),
- (U = c[g].ind)),
- (d += r[0] * c[g].an * 0.005);
- var se = 0;
- for (b = 0; b < C; b += 1)
- (M = i[b].a),
- M.p.propType &&
- ((k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- F.length
- ? (se += M.p.v[0] * F[0])
- : (se += M.p.v[0] * F)),
- M.a.propType &&
- ((k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- F.length
- ? (se += M.a.v[0] * F[0])
- : (se += M.a.v[0] * F));
- for (
- u = !0,
- this._pathData.a.v &&
- ((d =
- c[0].an * 0.5 +
- ((I -
- this._pathData.f.v -
- c[0].an * 0.5 -
- c[c.length - 1].an * 0.5) *
- U) /
- (S - 1)),
- (d += this._pathData.f.v));
- u;
- )
- x + _ >= d + se || !T
- ? ((B = (d + se - x) / p.partialLength),
- (V = A.point[0] + (p.point[0] - A.point[0]) * B),
- (O = A.point[1] + (p.point[1] - A.point[1]) * B),
- a.translate(
- -r[0] * c[g].an * 0.005,
- -(r[1] * H) * 0.01
- ),
- (u = !1))
- : T &&
- ((x += p.partialLength),
- (y += 1),
- y >= T.length &&
- ((y = 0),
- (m += 1),
- E[m]
- ? (T = E[m].points)
- : G.v.c
- ? ((y = 0), (m = 0), (T = E[m].points))
- : ((x -= p.partialLength), (T = null))),
- T && ((A = p), (p = T[y]), (_ = p.partialLength)));
- (D = c[g].an / 2 - c[g].add), a.translate(-D, 0, 0);
- } else
- (D = c[g].an / 2 - c[g].add),
- a.translate(-D, 0, 0),
- a.translate(-r[0] * c[g].an * 0.005, -r[1] * H * 0.01, 0);
- for (b = 0; b < C; b += 1)
- (M = i[b].a),
- M.t.propType &&
- ((k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- (l !== 0 || e.j !== 0) &&
- (this._hasMaskedPath
- ? F.length
- ? (d += M.t.v * F[0])
- : (d += M.t.v * F)
- : F.length
- ? (l += M.t.v * F[0])
- : (l += M.t.v * F)));
- for (
- e.strokeWidthAnim && (Z = e.sw || 0),
- e.strokeColorAnim &&
- (e.sc
- ? (K = [e.sc[0], e.sc[1], e.sc[2]])
- : (K = [0, 0, 0])),
- e.fillColorAnim &&
- e.fc &&
- (Q = [e.fc[0], e.fc[1], e.fc[2]]),
- b = 0;
- b < C;
- b += 1
- )
- (M = i[b].a),
- M.a.propType &&
- ((k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- F.length
- ? a.translate(
- -M.a.v[0] * F[0],
- -M.a.v[1] * F[1],
- M.a.v[2] * F[2]
- )
- : a.translate(
- -M.a.v[0] * F,
- -M.a.v[1] * F,
- M.a.v[2] * F
- ));
- for (b = 0; b < C; b += 1)
- (M = i[b].a),
- M.s.propType &&
- ((k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- F.length
- ? a.scale(
- 1 + (M.s.v[0] - 1) * F[0],
- 1 + (M.s.v[1] - 1) * F[1],
- 1
- )
- : a.scale(
- 1 + (M.s.v[0] - 1) * F,
- 1 + (M.s.v[1] - 1) * F,
- 1
- ));
- for (b = 0; b < C; b += 1) {
- if (
- ((M = i[b].a),
- (k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- M.sk.propType &&
- (F.length
- ? a.skewFromAxis(-M.sk.v * F[0], M.sa.v * F[1])
- : a.skewFromAxis(-M.sk.v * F, M.sa.v * F)),
- M.r.propType &&
- (F.length
- ? a.rotateZ(-M.r.v * F[2])
- : a.rotateZ(-M.r.v * F)),
- M.ry.propType &&
- (F.length
- ? a.rotateY(M.ry.v * F[1])
- : a.rotateY(M.ry.v * F)),
- M.rx.propType &&
- (F.length
- ? a.rotateX(M.rx.v * F[0])
- : a.rotateX(M.rx.v * F)),
- M.o.propType &&
- (F.length
- ? (Y += (M.o.v * F[0] - Y) * F[0])
- : (Y += (M.o.v * F - Y) * F)),
- e.strokeWidthAnim &&
- M.sw.propType &&
- (F.length ? (Z += M.sw.v * F[0]) : (Z += M.sw.v * F)),
- e.strokeColorAnim && M.sc.propType)
- )
- for (q = 0; q < 3; q += 1)
- F.length
- ? (K[q] += (M.sc.v[q] - K[q]) * F[0])
- : (K[q] += (M.sc.v[q] - K[q]) * F);
- if (e.fillColorAnim && e.fc) {
- if (M.fc.propType)
- for (q = 0; q < 3; q += 1)
- F.length
- ? (Q[q] += (M.fc.v[q] - Q[q]) * F[0])
- : (Q[q] += (M.fc.v[q] - Q[q]) * F);
- M.fh.propType &&
- (F.length
- ? (Q = addHueToRGB(Q, M.fh.v * F[0]))
- : (Q = addHueToRGB(Q, M.fh.v * F))),
- M.fs.propType &&
- (F.length
- ? (Q = addSaturationToRGB(Q, M.fs.v * F[0]))
- : (Q = addSaturationToRGB(Q, M.fs.v * F))),
- M.fb.propType &&
- (F.length
- ? (Q = addBrightnessToRGB(Q, M.fb.v * F[0]))
- : (Q = addBrightnessToRGB(Q, M.fb.v * F)));
- }
- }
- for (b = 0; b < C; b += 1)
- (M = i[b].a),
- M.p.propType &&
- ((k = i[b].s),
- (F = k.getMult(c[g].anIndexes[b], s.a[b].s.totalChars)),
- this._hasMaskedPath
- ? F.length
- ? a.translate(0, M.p.v[1] * F[0], -M.p.v[2] * F[1])
- : a.translate(0, M.p.v[1] * F, -M.p.v[2] * F)
- : F.length
- ? a.translate(
- M.p.v[0] * F[0],
- M.p.v[1] * F[1],
- -M.p.v[2] * F[2]
- )
- : a.translate(
- M.p.v[0] * F,
- M.p.v[1] * F,
- -M.p.v[2] * F
- ));
- if (
- (e.strokeWidthAnim && (ee = Z < 0 ? 0 : Z),
- e.strokeColorAnim &&
- (te =
- 'rgb(' +
- Math.round(K[0] * 255) +
- ',' +
- Math.round(K[1] * 255) +
- ',' +
- Math.round(K[2] * 255) +
- ')'),
- e.fillColorAnim &&
- e.fc &&
- (ne =
- 'rgb(' +
- Math.round(Q[0] * 255) +
- ',' +
- Math.round(Q[1] * 255) +
- ',' +
- Math.round(Q[2] * 255) +
- ')'),
- this._hasMaskedPath)
- ) {
- if (
- (a.translate(0, -e.ls),
- a.translate(0, r[1] * H * 0.01 + f, 0),
- this._pathData.p.v)
- ) {
- z = (p.point[1] - A.point[1]) / (p.point[0] - A.point[0]);
- var pe = (Math.atan(z) * 180) / Math.PI;
- p.point[0] < A.point[0] && (pe += 180),
- a.rotate((-pe * Math.PI) / 180);
- }
- a.translate(V, O, 0),
- (d -= r[0] * c[g].an * 0.005),
- c[g + 1] &&
- U !== c[g + 1].ind &&
- ((d += c[g].an / 2), (d += e.tr * 0.001 * e.finalSize));
- } else {
- switch (
- (a.translate(l, f, 0),
- e.ps && a.translate(e.ps[0], e.ps[1] + e.ascent, 0),
- e.j)
- ) {
- case 1:
- a.translate(
- c[g].animatorJustifyOffset +
- e.justifyOffset +
- (e.boxWidth - e.lineWidths[c[g].line]),
- 0,
- 0
- );
- break;
- case 2:
- a.translate(
- c[g].animatorJustifyOffset +
- e.justifyOffset +
- (e.boxWidth - e.lineWidths[c[g].line]) / 2,
- 0,
- 0
- );
- break;
- }
- a.translate(0, -e.ls),
- a.translate(D, 0, 0),
- a.translate(r[0] * c[g].an * 0.005, r[1] * H * 0.01, 0),
- (l += c[g].l + e.tr * 0.001 * e.finalSize);
- }
- o === 'html'
- ? (ae = a.toCSS())
- : o === 'svg'
- ? (ae = a.to2dCSS())
- : (oe = [
- a.props[0],
- a.props[1],
- a.props[2],
- a.props[3],
- a.props[4],
- a.props[5],
- a.props[6],
- a.props[7],
- a.props[8],
- a.props[9],
- a.props[10],
- a.props[11],
- a.props[12],
- a.props[13],
- a.props[14],
- a.props[15]
- ]),
- (le = Y);
- }
- n <= g
- ? ((L = new LetterProps(le, ee, te, ne, ae, oe)),
- this.renderedLetters.push(L),
- (n += 1),
- (this.lettersChangedFlag = !0))
- : ((L = this.renderedLetters[g]),
- (this.lettersChangedFlag =
- L.update(le, ee, te, ne, ae, oe) ||
- this.lettersChangedFlag));
- }
- }
- }),
- (TextAnimatorProperty.prototype.getValue = function () {
- this._elem.globalData.frameId !== this._frameId &&
- ((this._frameId = this._elem.globalData.frameId),
- this.iterateDynamicProperties());
- }),
- (TextAnimatorProperty.prototype.mHelper = new Matrix()),
- (TextAnimatorProperty.prototype.defaultPropsArray = []),
- extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
- function ITextElement() {}
- (ITextElement.prototype.initElement = function (e, t, r) {
- (this.lettersChangedFlag = !0),
- this.initFrame(),
- this.initBaseData(e, t, r),
- (this.textProperty = new TextProperty(
- this,
- e.t,
- this.dynamicProperties
- )),
- (this.textAnimator = new TextAnimatorProperty(
- e.t,
- this.renderType,
- this
- )),
- this.initTransform(e, t, r),
- this.initHierarchy(),
- this.initRenderable(),
- this.initRendererElement(),
- this.createContainerElements(),
- this.createRenderableComponents(),
- this.createContent(),
- this.hide(),
- this.textAnimator.searchProperties(this.dynamicProperties);
- }),
- (ITextElement.prototype.prepareFrame = function (e) {
- (this._mdf = !1),
- this.prepareRenderableFrame(e),
- this.prepareProperties(e, this.isInRange);
- }),
- (ITextElement.prototype.createPathShape = function (e, t) {
- var r,
- i = t.length,
- s,
- a = '';
- for (r = 0; r < i; r += 1)
- t[r].ty === 'sh' &&
- ((s = t[r].ks.k), (a += buildShapeString(s, s.i.length, !0, e)));
- return a;
- }),
- (ITextElement.prototype.updateDocumentData = function (e, t) {
- this.textProperty.updateDocumentData(e, t);
- }),
- (ITextElement.prototype.canResizeFont = function (e) {
- this.textProperty.canResizeFont(e);
- }),
- (ITextElement.prototype.setMinimumFontSize = function (e) {
- this.textProperty.setMinimumFontSize(e);
- }),
- (ITextElement.prototype.applyTextPropertiesToMatrix = function (
- e,
- t,
- r,
- i,
- s
- ) {
- switch (
- (e.ps && t.translate(e.ps[0], e.ps[1] + e.ascent, 0),
- t.translate(0, -e.ls, 0),
- e.j)
- ) {
- case 1:
- t.translate(
- e.justifyOffset + (e.boxWidth - e.lineWidths[r]),
- 0,
- 0
- );
- break;
- case 2:
- t.translate(
- e.justifyOffset + (e.boxWidth - e.lineWidths[r]) / 2,
- 0,
- 0
- );
- break;
- }
- t.translate(i, s, 0);
- }),
- (ITextElement.prototype.buildColor = function (e) {
- return (
- 'rgb(' +
- Math.round(e[0] * 255) +
- ',' +
- Math.round(e[1] * 255) +
- ',' +
- Math.round(e[2] * 255) +
- ')'
- );
- }),
- (ITextElement.prototype.emptyProp = new LetterProps()),
- (ITextElement.prototype.destroy = function () {}),
- (ITextElement.prototype.validateText = function () {
- (this.textProperty._mdf || this.textProperty._isFirstFrame) &&
- (this.buildNewText(),
- (this.textProperty._isFirstFrame = !1),
- (this.textProperty._mdf = !1));
- });
- var emptyShapeData = { shapes: [] };
- function SVGTextLottieElement(e, t, r) {
- (this.textSpans = []),
- (this.renderType = 'svg'),
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- SVGBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableDOMElement,
- ITextElement
- ],
- SVGTextLottieElement
- ),
- (SVGTextLottieElement.prototype.createContent = function () {
- this.data.singleShape &&
- !this.globalData.fontManager.chars &&
- (this.textContainer = createNS('text'));
- }),
- (SVGTextLottieElement.prototype.buildTextContents = function (e) {
- for (var t = 0, r = e.length, i = [], s = ''; t < r; )
- e[t] === String.fromCharCode(13) || e[t] === String.fromCharCode(3)
- ? (i.push(s), (s = ''))
- : (s += e[t]),
- (t += 1);
- return i.push(s), i;
- }),
- (SVGTextLottieElement.prototype.buildShapeData = function (e, t) {
- if (e.shapes && e.shapes.length) {
- var r = e.shapes[0];
- if (r.it) {
- var i = r.it[r.it.length - 1];
- i.s && ((i.s.k[0] = t), (i.s.k[1] = t));
- }
- }
- return e;
- }),
- (SVGTextLottieElement.prototype.buildNewText = function () {
- this.addDynamicProperty(this);
- var e,
- t,
- r = this.textProperty.currentData;
- (this.renderedLetters = createSizedArray(r ? r.l.length : 0)),
- r.fc
- ? this.layerElement.setAttribute('fill', this.buildColor(r.fc))
- : this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)'),
- r.sc &&
- (this.layerElement.setAttribute('stroke', this.buildColor(r.sc)),
- this.layerElement.setAttribute('stroke-width', r.sw)),
- this.layerElement.setAttribute('font-size', r.finalSize);
- var i = this.globalData.fontManager.getFontByName(r.f);
- if (i.fClass) this.layerElement.setAttribute('class', i.fClass);
- else {
- this.layerElement.setAttribute('font-family', i.fFamily);
- var s = r.fWeight,
- a = r.fStyle;
- this.layerElement.setAttribute('font-style', a),
- this.layerElement.setAttribute('font-weight', s);
- }
- this.layerElement.setAttribute('aria-label', r.t);
- var o = r.l || [],
- n = !!this.globalData.fontManager.chars;
- t = o.length;
- var l,
- f = this.mHelper,
- g = '',
- S = this.data.singleShape,
- c = 0,
- P = 0,
- d = !0,
- p = r.tr * 0.001 * r.finalSize;
- if (S && !n && !r.sz) {
- var x = this.textContainer,
- u = 'start';
- switch (r.j) {
- case 1:
- u = 'end';
- break;
- case 2:
- u = 'middle';
- break;
- default:
- u = 'start';
- break;
- }
- x.setAttribute('text-anchor', u),
- x.setAttribute('letter-spacing', p);
- var y = this.buildTextContents(r.finalText);
- for (
- t = y.length, P = r.ps ? r.ps[1] + r.ascent : 0, e = 0;
- e < t;
- e += 1
- )
- (l = this.textSpans[e].span || createNS('tspan')),
- (l.textContent = y[e]),
- l.setAttribute('x', 0),
- l.setAttribute('y', P),
- (l.style.display = 'inherit'),
- x.appendChild(l),
- this.textSpans[e] ||
- (this.textSpans[e] = { span: null, glyph: null }),
- (this.textSpans[e].span = l),
- (P += r.finalLineHeight);
- this.layerElement.appendChild(x);
- } else {
- var m = this.textSpans.length,
- A;
- for (e = 0; e < t; e += 1) {
- if (
- (this.textSpans[e] ||
- (this.textSpans[e] = {
- span: null,
- childSpan: null,
- glyph: null
- }),
- !n || !S || e === 0)
- ) {
- if (
- ((l =
- m > e
- ? this.textSpans[e].span
- : createNS(n ? 'g' : 'text')),
- m <= e)
- ) {
- if (
- (l.setAttribute('stroke-linecap', 'butt'),
- l.setAttribute('stroke-linejoin', 'round'),
- l.setAttribute('stroke-miterlimit', '4'),
- (this.textSpans[e].span = l),
- n)
- ) {
- var T = createNS('g');
- l.appendChild(T), (this.textSpans[e].childSpan = T);
- }
- (this.textSpans[e].span = l),
- this.layerElement.appendChild(l);
- }
- l.style.display = 'inherit';
- }
- if (
- (f.reset(),
- S &&
- (o[e].n &&
- ((c = -p), (P += r.yOffset), (P += d ? 1 : 0), (d = !1)),
- this.applyTextPropertiesToMatrix(r, f, o[e].line, c, P),
- (c += o[e].l || 0),
- (c += p)),
- n)
- ) {
- A = this.globalData.fontManager.getCharData(
- r.finalText[e],
- i.fStyle,
- this.globalData.fontManager.getFontByName(r.f).fFamily
- );
- var E;
- if (A.t === 1)
- E = new SVGCompElement(A.data, this.globalData, this);
- else {
- var _ = emptyShapeData;
- A.data &&
- A.data.shapes &&
- (_ = this.buildShapeData(A.data, r.finalSize)),
- (E = new SVGShapeElement(_, this.globalData, this));
- }
- if (this.textSpans[e].glyph) {
- var I = this.textSpans[e].glyph;
- this.textSpans[e].childSpan.removeChild(I.layerElement),
- I.destroy();
- }
- (this.textSpans[e].glyph = E),
- (E._debug = !0),
- E.prepareFrame(0),
- E.renderFrame(),
- this.textSpans[e].childSpan.appendChild(E.layerElement),
- A.t === 1 &&
- this.textSpans[e].childSpan.setAttribute(
- 'transform',
- 'scale(' +
- r.finalSize / 100 +
- ',' +
- r.finalSize / 100 +
- ')'
- );
- } else
- S &&
- l.setAttribute(
- 'transform',
- 'translate(' + f.props[12] + ',' + f.props[13] + ')'
- ),
- (l.textContent = o[e].val),
- l.setAttributeNS(
- 'http://www.w3.org/XML/1998/namespace',
- 'xml:space',
- 'preserve'
- );
- }
- S && l && l.setAttribute('d', g);
- }
- for (; e < this.textSpans.length; )
- (this.textSpans[e].span.style.display = 'none'), (e += 1);
- this._sizeChanged = !0;
- }),
- (SVGTextLottieElement.prototype.sourceRectAtTime = function () {
- if (
- (this.prepareFrame(this.comp.renderedFrame - this.data.st),
- this.renderInnerContent(),
- this._sizeChanged)
- ) {
- this._sizeChanged = !1;
- var e = this.layerElement.getBBox();
- this.bbox = {
- top: e.y,
- left: e.x,
- width: e.width,
- height: e.height
- };
- }
- return this.bbox;
- }),
- (SVGTextLottieElement.prototype.getValue = function () {
- var e,
- t = this.textSpans.length,
- r;
- for (
- this.renderedFrame = this.comp.renderedFrame, e = 0;
- e < t;
- e += 1
- )
- (r = this.textSpans[e].glyph),
- r &&
- (r.prepareFrame(this.comp.renderedFrame - this.data.st),
- r._mdf && (this._mdf = !0));
- }),
- (SVGTextLottieElement.prototype.renderInnerContent = function () {
- if (
- (this.validateText(),
- (!this.data.singleShape || this._mdf) &&
- (this.textAnimator.getMeasures(
- this.textProperty.currentData,
- this.lettersChangedFlag
- ),
- this.lettersChangedFlag || this.textAnimator.lettersChangedFlag))
- ) {
- this._sizeChanged = !0;
- var e,
- t,
- r = this.textAnimator.renderedLetters,
- i = this.textProperty.currentData.l;
- t = i.length;
- var s, a, o;
- for (e = 0; e < t; e += 1)
- i[e].n ||
- ((s = r[e]),
- (a = this.textSpans[e].span),
- (o = this.textSpans[e].glyph),
- o && o.renderFrame(),
- s._mdf.m && a.setAttribute('transform', s.m),
- s._mdf.o && a.setAttribute('opacity', s.o),
- s._mdf.sw && a.setAttribute('stroke-width', s.sw),
- s._mdf.sc && a.setAttribute('stroke', s.sc),
- s._mdf.fc && a.setAttribute('fill', s.fc));
- }
- });
- function ISolidElement(e, t, r) {
- this.initElement(e, t, r);
- }
- extendPrototype([IImageElement], ISolidElement),
- (ISolidElement.prototype.createContent = function () {
- var e = createNS('rect');
- e.setAttribute('width', this.data.sw),
- e.setAttribute('height', this.data.sh),
- e.setAttribute('fill', this.data.sc),
- this.layerElement.appendChild(e);
- });
- function NullElement(e, t, r) {
- this.initFrame(),
- this.initBaseData(e, t, r),
- this.initFrame(),
- this.initTransform(e, t, r),
- this.initHierarchy();
- }
- (NullElement.prototype.prepareFrame = function (e) {
- this.prepareProperties(e, !0);
- }),
- (NullElement.prototype.renderFrame = function () {}),
- (NullElement.prototype.getBaseElement = function () {
- return null;
- }),
- (NullElement.prototype.destroy = function () {}),
- (NullElement.prototype.sourceRectAtTime = function () {}),
- (NullElement.prototype.hide = function () {}),
- extendPrototype(
- [BaseElement, TransformElement, HierarchyElement, FrameElement],
- NullElement
- );
- function SVGRendererBase() {}
- extendPrototype([BaseRenderer], SVGRendererBase),
- (SVGRendererBase.prototype.createNull = function (e) {
- return new NullElement(e, this.globalData, this);
- }),
- (SVGRendererBase.prototype.createShape = function (e) {
- return new SVGShapeElement(e, this.globalData, this);
- }),
- (SVGRendererBase.prototype.createText = function (e) {
- return new SVGTextLottieElement(e, this.globalData, this);
- }),
- (SVGRendererBase.prototype.createImage = function (e) {
- return new IImageElement(e, this.globalData, this);
- }),
- (SVGRendererBase.prototype.createSolid = function (e) {
- return new ISolidElement(e, this.globalData, this);
- }),
- (SVGRendererBase.prototype.configAnimation = function (e) {
- this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg'),
- this.svgElement.setAttribute(
- 'xmlns:xlink',
- 'http://www.w3.org/1999/xlink'
- ),
- this.renderConfig.viewBoxSize
- ? this.svgElement.setAttribute(
- 'viewBox',
- this.renderConfig.viewBoxSize
- )
- : this.svgElement.setAttribute(
- 'viewBox',
- '0 0 ' + e.w + ' ' + e.h
- ),
- this.renderConfig.viewBoxOnly ||
- (this.svgElement.setAttribute('width', e.w),
- this.svgElement.setAttribute('height', e.h),
- (this.svgElement.style.width = '100%'),
- (this.svgElement.style.height = '100%'),
- (this.svgElement.style.transform = 'translate3d(0,0,0)'),
- (this.svgElement.style.contentVisibility =
- this.renderConfig.contentVisibility)),
- this.renderConfig.width &&
- this.svgElement.setAttribute('width', this.renderConfig.width),
- this.renderConfig.height &&
- this.svgElement.setAttribute('height', this.renderConfig.height),
- this.renderConfig.className &&
- this.svgElement.setAttribute(
- 'class',
- this.renderConfig.className
- ),
- this.renderConfig.id &&
- this.svgElement.setAttribute('id', this.renderConfig.id),
- this.renderConfig.focusable !== void 0 &&
- this.svgElement.setAttribute(
- 'focusable',
- this.renderConfig.focusable
- ),
- this.svgElement.setAttribute(
- 'preserveAspectRatio',
- this.renderConfig.preserveAspectRatio
- ),
- this.animationItem.wrapper.appendChild(this.svgElement);
- var t = this.globalData.defs;
- this.setupGlobalData(e, t),
- (this.globalData.progressiveLoad =
- this.renderConfig.progressiveLoad),
- (this.data = e);
- var r = createNS('clipPath'),
- i = createNS('rect');
- i.setAttribute('width', e.w),
- i.setAttribute('height', e.h),
- i.setAttribute('x', 0),
- i.setAttribute('y', 0);
- var s = createElementID();
- r.setAttribute('id', s),
- r.appendChild(i),
- this.layerElement.setAttribute(
- 'clip-path',
- 'url(' + getLocationHref() + '#' + s + ')'
- ),
- t.appendChild(r),
- (this.layers = e.layers),
- (this.elements = createSizedArray(e.layers.length));
- }),
- (SVGRendererBase.prototype.destroy = function () {
- this.animationItem.wrapper &&
- (this.animationItem.wrapper.innerText = ''),
- (this.layerElement = null),
- (this.globalData.defs = null);
- var e,
- t = this.layers ? this.layers.length : 0;
- for (e = 0; e < t; e += 1)
- this.elements[e] &&
- this.elements[e].destroy &&
- this.elements[e].destroy();
- (this.elements.length = 0),
- (this.destroyed = !0),
- (this.animationItem = null);
- }),
- (SVGRendererBase.prototype.updateContainerSize = function () {}),
- (SVGRendererBase.prototype.findIndexByInd = function (e) {
- var t = 0,
- r = this.layers.length;
- for (t = 0; t < r; t += 1) if (this.layers[t].ind === e) return t;
- return -1;
- }),
- (SVGRendererBase.prototype.buildItem = function (e) {
- var t = this.elements;
- if (!(t[e] || this.layers[e].ty === 99)) {
- t[e] = !0;
- var r = this.createItem(this.layers[e]);
- if (
- ((t[e] = r),
- getExpressionsPlugin() &&
- (this.layers[e].ty === 0 &&
- this.globalData.projectInterface.registerComposition(r),
- r.initExpressions()),
- this.appendElementInPos(r, e),
- this.layers[e].tt)
- ) {
- var i =
- 'tp' in this.layers[e]
- ? this.findIndexByInd(this.layers[e].tp)
- : e - 1;
- if (i === -1) return;
- if (!this.elements[i] || this.elements[i] === !0)
- this.buildItem(i), this.addPendingElement(r);
- else {
- var s = t[i],
- a = s.getMatte(this.layers[e].tt);
- r.setMatte(a);
- }
- }
- }
- }),
- (SVGRendererBase.prototype.checkPendingElements = function () {
- for (; this.pendingElements.length; ) {
- var e = this.pendingElements.pop();
- if ((e.checkParenting(), e.data.tt))
- for (var t = 0, r = this.elements.length; t < r; ) {
- if (this.elements[t] === e) {
- var i =
- 'tp' in e.data ? this.findIndexByInd(e.data.tp) : t - 1,
- s = this.elements[i],
- a = s.getMatte(this.layers[t].tt);
- e.setMatte(a);
- break;
- }
- t += 1;
- }
- }
- }),
- (SVGRendererBase.prototype.renderFrame = function (e) {
- if (!(this.renderedFrame === e || this.destroyed)) {
- e === null ? (e = this.renderedFrame) : (this.renderedFrame = e),
- (this.globalData.frameNum = e),
- (this.globalData.frameId += 1),
- (this.globalData.projectInterface.currentFrame = e),
- (this.globalData._mdf = !1);
- var t,
- r = this.layers.length;
- for (
- this.completeLayers || this.checkLayers(e), t = r - 1;
- t >= 0;
- t -= 1
- )
- (this.completeLayers || this.elements[t]) &&
- this.elements[t].prepareFrame(e - this.layers[t].st);
- if (this.globalData._mdf)
- for (t = 0; t < r; t += 1)
- (this.completeLayers || this.elements[t]) &&
- this.elements[t].renderFrame();
- }
- }),
- (SVGRendererBase.prototype.appendElementInPos = function (e, t) {
- var r = e.getBaseElement();
- if (r) {
- for (var i = 0, s; i < t; )
- this.elements[i] &&
- this.elements[i] !== !0 &&
- this.elements[i].getBaseElement() &&
- (s = this.elements[i].getBaseElement()),
- (i += 1);
- s
- ? this.layerElement.insertBefore(r, s)
- : this.layerElement.appendChild(r);
- }
- }),
- (SVGRendererBase.prototype.hide = function () {
- this.layerElement.style.display = 'none';
- }),
- (SVGRendererBase.prototype.show = function () {
- this.layerElement.style.display = 'block';
- });
- function ICompElement() {}
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- HierarchyElement,
- FrameElement,
- RenderableDOMElement
- ],
- ICompElement
- ),
- (ICompElement.prototype.initElement = function (e, t, r) {
- this.initFrame(),
- this.initBaseData(e, t, r),
- this.initTransform(e, t, r),
- this.initRenderable(),
- this.initHierarchy(),
- this.initRendererElement(),
- this.createContainerElements(),
- this.createRenderableComponents(),
- (this.data.xt || !t.progressiveLoad) && this.buildAllItems(),
- this.hide();
- }),
- (ICompElement.prototype.prepareFrame = function (e) {
- if (
- ((this._mdf = !1),
- this.prepareRenderableFrame(e),
- this.prepareProperties(e, this.isInRange),
- !(!this.isInRange && !this.data.xt))
- ) {
- if (this.tm._placeholder) this.renderedFrame = e / this.data.sr;
- else {
- var t = this.tm.v;
- t === this.data.op && (t = this.data.op - 1),
- (this.renderedFrame = t);
- }
- var r,
- i = this.elements.length;
- for (
- this.completeLayers || this.checkLayers(this.renderedFrame),
- r = i - 1;
- r >= 0;
- r -= 1
- )
- (this.completeLayers || this.elements[r]) &&
- (this.elements[r].prepareFrame(
- this.renderedFrame - this.layers[r].st
- ),
- this.elements[r]._mdf && (this._mdf = !0));
- }
- }),
- (ICompElement.prototype.renderInnerContent = function () {
- var e,
- t = this.layers.length;
- for (e = 0; e < t; e += 1)
- (this.completeLayers || this.elements[e]) &&
- this.elements[e].renderFrame();
- }),
- (ICompElement.prototype.setElements = function (e) {
- this.elements = e;
- }),
- (ICompElement.prototype.getElements = function () {
- return this.elements;
- }),
- (ICompElement.prototype.destroyElements = function () {
- var e,
- t = this.layers.length;
- for (e = 0; e < t; e += 1)
- this.elements[e] && this.elements[e].destroy();
- }),
- (ICompElement.prototype.destroy = function () {
- this.destroyElements(), this.destroyBaseElement();
- });
- function SVGCompElement(e, t, r) {
- (this.layers = e.layers),
- (this.supports3d = !0),
- (this.completeLayers = !1),
- (this.pendingElements = []),
- (this.elements = this.layers
- ? createSizedArray(this.layers.length)
- : []),
- this.initElement(e, t, r),
- (this.tm = e.tm
- ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
- : { _placeholder: !0 });
- }
- extendPrototype(
- [SVGRendererBase, ICompElement, SVGBaseElement],
- SVGCompElement
- ),
- (SVGCompElement.prototype.createComp = function (e) {
- return new SVGCompElement(e, this.globalData, this);
- });
- function SVGRenderer(e, t) {
- (this.animationItem = e),
- (this.layers = null),
- (this.renderedFrame = -1),
- (this.svgElement = createNS('svg'));
- var r = '';
- if (t && t.title) {
- var i = createNS('title'),
- s = createElementID();
- i.setAttribute('id', s),
- (i.textContent = t.title),
- this.svgElement.appendChild(i),
- (r += s);
- }
- if (t && t.description) {
- var a = createNS('desc'),
- o = createElementID();
- a.setAttribute('id', o),
- (a.textContent = t.description),
- this.svgElement.appendChild(a),
- (r += ' ' + o);
- }
- r && this.svgElement.setAttribute('aria-labelledby', r);
- var n = createNS('defs');
- this.svgElement.appendChild(n);
- var l = createNS('g');
- this.svgElement.appendChild(l),
- (this.layerElement = l),
- (this.renderConfig = {
- preserveAspectRatio:
- (t && t.preserveAspectRatio) || 'xMidYMid meet',
- imagePreserveAspectRatio:
- (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
- contentVisibility: (t && t.contentVisibility) || 'visible',
- progressiveLoad: (t && t.progressiveLoad) || !1,
- hideOnTransparent: !(t && t.hideOnTransparent === !1),
- viewBoxOnly: (t && t.viewBoxOnly) || !1,
- viewBoxSize: (t && t.viewBoxSize) || !1,
- className: (t && t.className) || '',
- id: (t && t.id) || '',
- focusable: t && t.focusable,
- filterSize: {
- width: (t && t.filterSize && t.filterSize.width) || '100%',
- height: (t && t.filterSize && t.filterSize.height) || '100%',
- x: (t && t.filterSize && t.filterSize.x) || '0%',
- y: (t && t.filterSize && t.filterSize.y) || '0%'
- },
- width: t && t.width,
- height: t && t.height,
- runExpressions:
- !t || t.runExpressions === void 0 || t.runExpressions
- }),
- (this.globalData = {
- _mdf: !1,
- frameNum: -1,
- defs: n,
- renderConfig: this.renderConfig
- }),
- (this.elements = []),
- (this.pendingElements = []),
- (this.destroyed = !1),
- (this.rendererType = 'svg');
- }
- extendPrototype([SVGRendererBase], SVGRenderer),
- (SVGRenderer.prototype.createComp = function (e) {
- return new SVGCompElement(e, this.globalData, this);
- });
- function ShapeTransformManager() {
- (this.sequences = {}),
- (this.sequenceList = []),
- (this.transform_key_count = 0);
- }
- ShapeTransformManager.prototype = {
- addTransformSequence: function (t) {
- var r,
- i = t.length,
- s = '_';
- for (r = 0; r < i; r += 1) s += t[r].transform.key + '_';
- var a = this.sequences[s];
- return (
- a ||
- ((a = {
- transforms: [].concat(t),
- finalTransform: new Matrix(),
- _mdf: !1
- }),
- (this.sequences[s] = a),
- this.sequenceList.push(a)),
- a
- );
- },
- processSequence: function (t, r) {
- for (var i = 0, s = t.transforms.length, a = r; i < s && !r; ) {
- if (t.transforms[i].transform.mProps._mdf) {
- a = !0;
- break;
- }
- i += 1;
- }
- if (a)
- for (t.finalTransform.reset(), i = s - 1; i >= 0; i -= 1)
- t.finalTransform.multiply(t.transforms[i].transform.mProps.v);
- t._mdf = a;
- },
- processSequences: function (t) {
- var r,
- i = this.sequenceList.length;
- for (r = 0; r < i; r += 1)
- this.processSequence(this.sequenceList[r], t);
- },
- getNewKey: function () {
- return (
- (this.transform_key_count += 1), '_' + this.transform_key_count
- );
- }
- };
- var lumaLoader = function () {
- var t = '__lottie_element_luma_buffer',
- r = null,
- i = null,
- s = null;
- function a() {
- var l = createNS('svg'),
- f = createNS('filter'),
- g = createNS('feColorMatrix');
- return (
- f.setAttribute('id', t),
- g.setAttribute('type', 'matrix'),
- g.setAttribute('color-interpolation-filters', 'sRGB'),
- g.setAttribute(
- 'values',
- '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0'
- ),
- f.appendChild(g),
- l.appendChild(f),
- l.setAttribute('id', t + '_svg'),
- featureSupport.svgLumaHidden && (l.style.display = 'none'),
- l
- );
- }
- function o() {
- r ||
- ((s = a()),
- document.body.appendChild(s),
- (r = createTag('canvas')),
- (i = r.getContext('2d')),
- (i.filter = 'url(#' + t + ')'),
- (i.fillStyle = 'rgba(0,0,0,0)'),
- i.fillRect(0, 0, 1, 1));
- }
- function n(l) {
- return (
- r || o(),
- (r.width = l.width),
- (r.height = l.height),
- (i.filter = 'url(#' + t + ')'),
- r
- );
- }
- return { load: o, get: n };
- };
- function createCanvas(e, t) {
- if (featureSupport.offscreenCanvas) return new OffscreenCanvas(e, t);
- var r = createTag('canvas');
- return (r.width = e), (r.height = t), r;
- }
- var assetLoader = (function () {
- return {
- loadLumaCanvas: lumaLoader.load,
- getLumaCanvas: lumaLoader.get,
- createCanvas
- };
- })(),
- registeredEffects = {};
- function CVEffects(e) {
- var t,
- r = e.data.ef ? e.data.ef.length : 0;
- this.filters = [];
- var i;
- for (t = 0; t < r; t += 1) {
- i = null;
- var s = e.data.ef[t].ty;
- if (registeredEffects[s]) {
- var a = registeredEffects[s].effect;
- i = new a(e.effectsManager.effectElements[t], e);
- }
- i && this.filters.push(i);
- }
- this.filters.length && e.addRenderableComponent(this);
- }
- (CVEffects.prototype.renderFrame = function (e) {
- var t,
- r = this.filters.length;
- for (t = 0; t < r; t += 1) this.filters[t].renderFrame(e);
- }),
- (CVEffects.prototype.getEffects = function (e) {
- var t,
- r = this.filters.length,
- i = [];
- for (t = 0; t < r; t += 1)
- this.filters[t].type === e && i.push(this.filters[t]);
- return i;
- });
- function registerEffect(e, t) {
- registeredEffects[e] = { effect: t };
- }
- function CVMaskElement(e, t) {
- (this.data = e),
- (this.element = t),
- (this.masksProperties = this.data.masksProperties || []),
- (this.viewData = createSizedArray(this.masksProperties.length));
- var r,
- i = this.masksProperties.length,
- s = !1;
- for (r = 0; r < i; r += 1)
- this.masksProperties[r].mode !== 'n' && (s = !0),
- (this.viewData[r] = ShapePropertyFactory.getShapeProp(
- this.element,
- this.masksProperties[r],
- 3
- ));
- (this.hasMasks = s), s && this.element.addRenderableComponent(this);
- }
- (CVMaskElement.prototype.renderFrame = function () {
- if (this.hasMasks) {
- var e = this.element.finalTransform.mat,
- t = this.element.canvasContext,
- r,
- i = this.masksProperties.length,
- s,
- a,
- o;
- for (t.beginPath(), r = 0; r < i; r += 1)
- if (this.masksProperties[r].mode !== 'n') {
- this.masksProperties[r].inv &&
- (t.moveTo(0, 0),
- t.lineTo(this.element.globalData.compSize.w, 0),
- t.lineTo(
- this.element.globalData.compSize.w,
- this.element.globalData.compSize.h
- ),
- t.lineTo(0, this.element.globalData.compSize.h),
- t.lineTo(0, 0)),
- (o = this.viewData[r].v),
- (s = e.applyToPointArray(o.v[0][0], o.v[0][1], 0)),
- t.moveTo(s[0], s[1]);
- var n,
- l = o._length;
- for (n = 1; n < l; n += 1)
- (a = e.applyToTriplePoints(o.o[n - 1], o.i[n], o.v[n])),
- t.bezierCurveTo(a[0], a[1], a[2], a[3], a[4], a[5]);
- (a = e.applyToTriplePoints(o.o[n - 1], o.i[0], o.v[0])),
- t.bezierCurveTo(a[0], a[1], a[2], a[3], a[4], a[5]);
- }
- this.element.globalData.renderer.save(!0), t.clip();
- }
- }),
- (CVMaskElement.prototype.getMaskProperty =
- MaskElement.prototype.getMaskProperty),
- (CVMaskElement.prototype.destroy = function () {
- this.element = null;
- });
- function CVBaseElement() {}
- var operationsMap = {
- 1: 'source-in',
- 2: 'source-out',
- 3: 'source-in',
- 4: 'source-out'
- };
- (CVBaseElement.prototype = {
- createElements: function () {},
- initRendererElement: function () {},
- createContainerElements: function () {
- if (this.data.tt >= 1) {
- this.buffers = [];
- var t = this.globalData.canvasContext,
- r = assetLoader.createCanvas(t.canvas.width, t.canvas.height);
- this.buffers.push(r);
- var i = assetLoader.createCanvas(t.canvas.width, t.canvas.height);
- this.buffers.push(i),
- this.data.tt >= 3 &&
- !document._isProxy &&
- assetLoader.loadLumaCanvas();
- }
- (this.canvasContext = this.globalData.canvasContext),
- (this.transformCanvas = this.globalData.transformCanvas),
- (this.renderableEffectsManager = new CVEffects(this)),
- this.searchEffectTransforms();
- },
- createContent: function () {},
- setBlendMode: function () {
- var t = this.globalData;
- if (t.blendMode !== this.data.bm) {
- t.blendMode = this.data.bm;
- var r = getBlendMode(this.data.bm);
- t.canvasContext.globalCompositeOperation = r;
- }
- },
- createRenderableComponents: function () {
- (this.maskManager = new CVMaskElement(this.data, this)),
- (this.transformEffects = this.renderableEffectsManager.getEffects(
- effectTypes.TRANSFORM_EFFECT
- ));
- },
- hideElement: function () {
- !this.hidden &&
- (!this.isInRange || this.isTransparent) &&
- (this.hidden = !0);
- },
- showElement: function () {
- this.isInRange &&
- !this.isTransparent &&
- ((this.hidden = !1),
- (this._isFirstFrame = !0),
- (this.maskManager._isFirstFrame = !0));
- },
- clearCanvas: function (t) {
- t.clearRect(
- this.transformCanvas.tx,
- this.transformCanvas.ty,
- this.transformCanvas.w * this.transformCanvas.sx,
- this.transformCanvas.h * this.transformCanvas.sy
- );
- },
- prepareLayer: function () {
- if (this.data.tt >= 1) {
- var t = this.buffers[0],
- r = t.getContext('2d');
- this.clearCanvas(r),
- r.drawImage(this.canvasContext.canvas, 0, 0),
- (this.currentTransform = this.canvasContext.getTransform()),
- this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
- this.clearCanvas(this.canvasContext),
- this.canvasContext.setTransform(this.currentTransform);
- }
- },
- exitLayer: function () {
- if (this.data.tt >= 1) {
- var t = this.buffers[1],
- r = t.getContext('2d');
- this.clearCanvas(r),
- r.drawImage(this.canvasContext.canvas, 0, 0),
- this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
- this.clearCanvas(this.canvasContext),
- this.canvasContext.setTransform(this.currentTransform);
- var i = this.comp.getElementById(
- 'tp' in this.data ? this.data.tp : this.data.ind - 1
- );
- if (
- (i.renderFrame(!0),
- this.canvasContext.setTransform(1, 0, 0, 1, 0, 0),
- this.data.tt >= 3 && !document._isProxy)
- ) {
- var s = assetLoader.getLumaCanvas(this.canvasContext.canvas),
- a = s.getContext('2d');
- a.drawImage(this.canvasContext.canvas, 0, 0),
- this.clearCanvas(this.canvasContext),
- this.canvasContext.drawImage(s, 0, 0);
- }
- (this.canvasContext.globalCompositeOperation =
- operationsMap[this.data.tt]),
- this.canvasContext.drawImage(t, 0, 0),
- (this.canvasContext.globalCompositeOperation =
- 'destination-over'),
- this.canvasContext.drawImage(this.buffers[0], 0, 0),
- this.canvasContext.setTransform(this.currentTransform),
- (this.canvasContext.globalCompositeOperation = 'source-over');
- }
- },
- renderFrame: function (t) {
- if (!(this.hidden || this.data.hd) && !(this.data.td === 1 && !t)) {
- this.renderTransform(),
- this.renderRenderable(),
- this.renderLocalTransform(),
- this.setBlendMode();
- var r = this.data.ty === 0;
- this.prepareLayer(),
- this.globalData.renderer.save(r),
- this.globalData.renderer.ctxTransform(
- this.finalTransform.localMat.props
- ),
- this.globalData.renderer.ctxOpacity(
- this.finalTransform.localOpacity
- ),
- this.renderInnerContent(),
- this.globalData.renderer.restore(r),
- this.exitLayer(),
- this.maskManager.hasMasks && this.globalData.renderer.restore(!0),
- this._isFirstFrame && (this._isFirstFrame = !1);
- }
- },
- destroy: function () {
- (this.canvasContext = null),
- (this.data = null),
- (this.globalData = null),
- this.maskManager.destroy();
- },
- mHelper: new Matrix()
- }),
- (CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement),
- (CVBaseElement.prototype.show = CVBaseElement.prototype.showElement);
- function CVShapeData(e, t, r, i) {
- (this.styledShapes = []), (this.tr = [0, 0, 0, 0, 0, 0]);
- var s = 4;
- t.ty === 'rc'
- ? (s = 5)
- : t.ty === 'el'
- ? (s = 6)
- : t.ty === 'sr' && (s = 7),
- (this.sh = ShapePropertyFactory.getShapeProp(e, t, s, e));
- var a,
- o = r.length,
- n;
- for (a = 0; a < o; a += 1)
- r[a].closed ||
- ((n = {
- transforms: i.addTransformSequence(r[a].transforms),
- trNodes: []
- }),
- this.styledShapes.push(n),
- r[a].elements.push(n));
- }
- CVShapeData.prototype.setAsAnimated =
- SVGShapeData.prototype.setAsAnimated;
- function CVShapeElement(e, t, r) {
- (this.shapes = []),
- (this.shapesData = e.shapes),
- (this.stylesList = []),
- (this.itemsData = []),
- (this.prevViewData = []),
- (this.shapeModifiers = []),
- (this.processedElements = []),
- (this.transformsManager = new ShapeTransformManager()),
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- CVBaseElement,
- IShapeElement,
- HierarchyElement,
- FrameElement,
- RenderableElement
- ],
- CVShapeElement
- ),
- (CVShapeElement.prototype.initElement =
- RenderableDOMElement.prototype.initElement),
- (CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: !1 }),
- (CVShapeElement.prototype.dashResetter = []),
- (CVShapeElement.prototype.createContent = function () {
- this.searchShapes(
- this.shapesData,
- this.itemsData,
- this.prevViewData,
- !0,
- []
- );
- }),
- (CVShapeElement.prototype.createStyleElement = function (e, t) {
- var r = {
- data: e,
- type: e.ty,
- preTransforms: this.transformsManager.addTransformSequence(t),
- transforms: [],
- elements: [],
- closed: e.hd === !0
- },
- i = {};
- if (
- (e.ty === 'fl' || e.ty === 'st'
- ? ((i.c = PropertyFactory.getProp(this, e.c, 1, 255, this)),
- i.c.k ||
- (r.co =
- 'rgb(' +
- bmFloor(i.c.v[0]) +
- ',' +
- bmFloor(i.c.v[1]) +
- ',' +
- bmFloor(i.c.v[2]) +
- ')'))
- : (e.ty === 'gf' || e.ty === 'gs') &&
- ((i.s = PropertyFactory.getProp(this, e.s, 1, null, this)),
- (i.e = PropertyFactory.getProp(this, e.e, 1, null, this)),
- (i.h = PropertyFactory.getProp(
- this,
- e.h || { k: 0 },
- 0,
- 0.01,
- this
- )),
- (i.a = PropertyFactory.getProp(
- this,
- e.a || { k: 0 },
- 0,
- degToRads,
- this
- )),
- (i.g = new GradientProperty(this, e.g, this))),
- (i.o = PropertyFactory.getProp(this, e.o, 0, 0.01, this)),
- e.ty === 'st' || e.ty === 'gs')
- ) {
- if (
- ((r.lc = lineCapEnum[e.lc || 2]),
- (r.lj = lineJoinEnum[e.lj || 2]),
- e.lj == 1 && (r.ml = e.ml),
- (i.w = PropertyFactory.getProp(this, e.w, 0, null, this)),
- i.w.k || (r.wi = i.w.v),
- e.d)
- ) {
- var s = new DashProperty(this, e.d, 'canvas', this);
- (i.d = s),
- i.d.k || ((r.da = i.d.dashArray), (r.do = i.d.dashoffset[0]));
- }
- } else r.r = e.r === 2 ? 'evenodd' : 'nonzero';
- return this.stylesList.push(r), (i.style = r), i;
- }),
- (CVShapeElement.prototype.createGroupElement = function () {
- var e = { it: [], prevViewData: [] };
- return e;
- }),
- (CVShapeElement.prototype.createTransformElement = function (e) {
- var t = {
- transform: {
- opacity: 1,
- _opMdf: !1,
- key: this.transformsManager.getNewKey(),
- op: PropertyFactory.getProp(this, e.o, 0, 0.01, this),
- mProps: TransformPropertyFactory.getTransformProperty(
- this,
- e,
- this
- )
- }
- };
- return t;
- }),
- (CVShapeElement.prototype.createShapeElement = function (e) {
- var t = new CVShapeData(
- this,
- e,
- this.stylesList,
- this.transformsManager
- );
- return this.shapes.push(t), this.addShapeToModifiers(t), t;
- }),
- (CVShapeElement.prototype.reloadShapes = function () {
- this._isFirstFrame = !0;
- var e,
- t = this.itemsData.length;
- for (e = 0; e < t; e += 1) this.prevViewData[e] = this.itemsData[e];
- for (
- this.searchShapes(
- this.shapesData,
- this.itemsData,
- this.prevViewData,
- !0,
- []
- ),
- t = this.dynamicProperties.length,
- e = 0;
- e < t;
- e += 1
- )
- this.dynamicProperties[e].getValue();
- this.renderModifiers(),
- this.transformsManager.processSequences(this._isFirstFrame);
- }),
- (CVShapeElement.prototype.addTransformToStyleList = function (e) {
- var t,
- r = this.stylesList.length;
- for (t = 0; t < r; t += 1)
- this.stylesList[t].closed || this.stylesList[t].transforms.push(e);
- }),
- (CVShapeElement.prototype.removeTransformFromStyleList = function () {
- var e,
- t = this.stylesList.length;
- for (e = 0; e < t; e += 1)
- this.stylesList[e].closed || this.stylesList[e].transforms.pop();
- }),
- (CVShapeElement.prototype.closeStyles = function (e) {
- var t,
- r = e.length;
- for (t = 0; t < r; t += 1) e[t].closed = !0;
- }),
- (CVShapeElement.prototype.searchShapes = function (e, t, r, i, s) {
- var a,
- o = e.length - 1,
- n,
- l,
- f = [],
- g = [],
- S,
- c,
- P,
- d = [].concat(s);
- for (a = o; a >= 0; a -= 1) {
- if (
- ((S = this.searchProcessedElement(e[a])),
- S ? (t[a] = r[S - 1]) : (e[a]._shouldRender = i),
- e[a].ty === 'fl' ||
- e[a].ty === 'st' ||
- e[a].ty === 'gf' ||
- e[a].ty === 'gs')
- )
- S
- ? (t[a].style.closed = !1)
- : (t[a] = this.createStyleElement(e[a], d)),
- f.push(t[a].style);
- else if (e[a].ty === 'gr') {
- if (!S) t[a] = this.createGroupElement(e[a]);
- else
- for (l = t[a].it.length, n = 0; n < l; n += 1)
- t[a].prevViewData[n] = t[a].it[n];
- this.searchShapes(e[a].it, t[a].it, t[a].prevViewData, i, d);
- } else
- e[a].ty === 'tr'
- ? (S || ((P = this.createTransformElement(e[a])), (t[a] = P)),
- d.push(t[a]),
- this.addTransformToStyleList(t[a]))
- : e[a].ty === 'sh' ||
- e[a].ty === 'rc' ||
- e[a].ty === 'el' ||
- e[a].ty === 'sr'
- ? S || (t[a] = this.createShapeElement(e[a]))
- : e[a].ty === 'tm' ||
- e[a].ty === 'rd' ||
- e[a].ty === 'pb' ||
- e[a].ty === 'zz' ||
- e[a].ty === 'op'
- ? (S
- ? ((c = t[a]), (c.closed = !1))
- : ((c = ShapeModifiers.getModifier(e[a].ty)),
- c.init(this, e[a]),
- (t[a] = c),
- this.shapeModifiers.push(c)),
- g.push(c))
- : e[a].ty === 'rp' &&
- (S
- ? ((c = t[a]), (c.closed = !0))
- : ((c = ShapeModifiers.getModifier(e[a].ty)),
- (t[a] = c),
- c.init(this, e, a, t),
- this.shapeModifiers.push(c),
- (i = !1)),
- g.push(c));
- this.addProcessedElement(e[a], a + 1);
- }
- for (
- this.removeTransformFromStyleList(),
- this.closeStyles(f),
- o = g.length,
- a = 0;
- a < o;
- a += 1
- )
- g[a].closed = !0;
- }),
- (CVShapeElement.prototype.renderInnerContent = function () {
- (this.transformHelper.opacity = 1),
- (this.transformHelper._opMdf = !1),
- this.renderModifiers(),
- this.transformsManager.processSequences(this._isFirstFrame),
- this.renderShape(
- this.transformHelper,
- this.shapesData,
- this.itemsData,
- !0
- );
- }),
- (CVShapeElement.prototype.renderShapeTransform = function (e, t) {
- (e._opMdf || t.op._mdf || this._isFirstFrame) &&
- ((t.opacity = e.opacity), (t.opacity *= t.op.v), (t._opMdf = !0));
- }),
- (CVShapeElement.prototype.drawLayer = function () {
- var e,
- t = this.stylesList.length,
- r,
- i,
- s,
- a,
- o,
- n,
- l = this.globalData.renderer,
- f = this.globalData.canvasContext,
- g,
- S;
- for (e = 0; e < t; e += 1)
- if (
- ((S = this.stylesList[e]),
- (g = S.type),
- !(
- ((g === 'st' || g === 'gs') && S.wi === 0) ||
- !S.data._shouldRender ||
- S.coOp === 0 ||
- this.globalData.currentGlobalAlpha === 0
- ))
- ) {
- for (
- l.save(),
- o = S.elements,
- g === 'st' || g === 'gs'
- ? (l.ctxStrokeStyle(g === 'st' ? S.co : S.grd),
- l.ctxLineWidth(S.wi),
- l.ctxLineCap(S.lc),
- l.ctxLineJoin(S.lj),
- l.ctxMiterLimit(S.ml || 0))
- : l.ctxFillStyle(g === 'fl' ? S.co : S.grd),
- l.ctxOpacity(S.coOp),
- g !== 'st' && g !== 'gs' && f.beginPath(),
- l.ctxTransform(S.preTransforms.finalTransform.props),
- i = o.length,
- r = 0;
- r < i;
- r += 1
- ) {
- for (
- (g === 'st' || g === 'gs') &&
- (f.beginPath(),
- S.da && (f.setLineDash(S.da), (f.lineDashOffset = S.do))),
- n = o[r].trNodes,
- a = n.length,
- s = 0;
- s < a;
- s += 1
- )
- n[s].t === 'm'
- ? f.moveTo(n[s].p[0], n[s].p[1])
- : n[s].t === 'c'
- ? f.bezierCurveTo(
- n[s].pts[0],
- n[s].pts[1],
- n[s].pts[2],
- n[s].pts[3],
- n[s].pts[4],
- n[s].pts[5]
- )
- : f.closePath();
- (g === 'st' || g === 'gs') &&
- (l.ctxStroke(), S.da && f.setLineDash(this.dashResetter));
- }
- g !== 'st' && g !== 'gs' && this.globalData.renderer.ctxFill(S.r),
- l.restore();
- }
- }),
- (CVShapeElement.prototype.renderShape = function (e, t, r, i) {
- var s,
- a = t.length - 1,
- o;
- for (o = e, s = a; s >= 0; s -= 1)
- t[s].ty === 'tr'
- ? ((o = r[s].transform), this.renderShapeTransform(e, o))
- : t[s].ty === 'sh' ||
- t[s].ty === 'el' ||
- t[s].ty === 'rc' ||
- t[s].ty === 'sr'
- ? this.renderPath(t[s], r[s])
- : t[s].ty === 'fl'
- ? this.renderFill(t[s], r[s], o)
- : t[s].ty === 'st'
- ? this.renderStroke(t[s], r[s], o)
- : t[s].ty === 'gf' || t[s].ty === 'gs'
- ? this.renderGradientFill(t[s], r[s], o)
- : t[s].ty === 'gr'
- ? this.renderShape(o, t[s].it, r[s].it)
- : t[s].ty;
- i && this.drawLayer();
- }),
- (CVShapeElement.prototype.renderStyledShape = function (e, t) {
- if (this._isFirstFrame || t._mdf || e.transforms._mdf) {
- var r = e.trNodes,
- i = t.paths,
- s,
- a,
- o,
- n = i._length;
- r.length = 0;
- var l = e.transforms.finalTransform;
- for (o = 0; o < n; o += 1) {
- var f = i.shapes[o];
- if (f && f.v) {
- for (a = f._length, s = 1; s < a; s += 1)
- s === 1 &&
- r.push({
- t: 'm',
- p: l.applyToPointArray(f.v[0][0], f.v[0][1], 0)
- }),
- r.push({
- t: 'c',
- pts: l.applyToTriplePoints(f.o[s - 1], f.i[s], f.v[s])
- });
- a === 1 &&
- r.push({
- t: 'm',
- p: l.applyToPointArray(f.v[0][0], f.v[0][1], 0)
- }),
- f.c &&
- a &&
- (r.push({
- t: 'c',
- pts: l.applyToTriplePoints(f.o[s - 1], f.i[0], f.v[0])
- }),
- r.push({ t: 'z' }));
- }
- }
- e.trNodes = r;
- }
- }),
- (CVShapeElement.prototype.renderPath = function (e, t) {
- if (e.hd !== !0 && e._shouldRender) {
- var r,
- i = t.styledShapes.length;
- for (r = 0; r < i; r += 1)
- this.renderStyledShape(t.styledShapes[r], t.sh);
- }
- }),
- (CVShapeElement.prototype.renderFill = function (e, t, r) {
- var i = t.style;
- (t.c._mdf || this._isFirstFrame) &&
- (i.co =
- 'rgb(' +
- bmFloor(t.c.v[0]) +
- ',' +
- bmFloor(t.c.v[1]) +
- ',' +
- bmFloor(t.c.v[2]) +
- ')'),
- (t.o._mdf || r._opMdf || this._isFirstFrame) &&
- (i.coOp = t.o.v * r.opacity);
- }),
- (CVShapeElement.prototype.renderGradientFill = function (e, t, r) {
- var i = t.style,
- s;
- if (
- !i.grd ||
- t.g._mdf ||
- t.s._mdf ||
- t.e._mdf ||
- (e.t !== 1 && (t.h._mdf || t.a._mdf))
- ) {
- var a = this.globalData.canvasContext,
- o = t.s.v,
- n = t.e.v;
- if (e.t === 1) s = a.createLinearGradient(o[0], o[1], n[0], n[1]);
- else {
- var l = Math.sqrt(
- Math.pow(o[0] - n[0], 2) + Math.pow(o[1] - n[1], 2)
- ),
- f = Math.atan2(n[1] - o[1], n[0] - o[0]),
- g = t.h.v;
- g >= 1 ? (g = 0.99) : g <= -1 && (g = -0.99);
- var S = l * g,
- c = Math.cos(f + t.a.v) * S + o[0],
- P = Math.sin(f + t.a.v) * S + o[1];
- s = a.createRadialGradient(c, P, 0, o[0], o[1], l);
- }
- var d,
- p = e.g.p,
- x = t.g.c,
- u = 1;
- for (d = 0; d < p; d += 1)
- t.g._hasOpacity && t.g._collapsable && (u = t.g.o[d * 2 + 1]),
- s.addColorStop(
- x[d * 4] / 100,
- 'rgba(' +
- x[d * 4 + 1] +
- ',' +
- x[d * 4 + 2] +
- ',' +
- x[d * 4 + 3] +
- ',' +
- u +
- ')'
- );
- i.grd = s;
- }
- i.coOp = t.o.v * r.opacity;
- }),
- (CVShapeElement.prototype.renderStroke = function (e, t, r) {
- var i = t.style,
- s = t.d;
- s &&
- (s._mdf || this._isFirstFrame) &&
- ((i.da = s.dashArray), (i.do = s.dashoffset[0])),
- (t.c._mdf || this._isFirstFrame) &&
- (i.co =
- 'rgb(' +
- bmFloor(t.c.v[0]) +
- ',' +
- bmFloor(t.c.v[1]) +
- ',' +
- bmFloor(t.c.v[2]) +
- ')'),
- (t.o._mdf || r._opMdf || this._isFirstFrame) &&
- (i.coOp = t.o.v * r.opacity),
- (t.w._mdf || this._isFirstFrame) && (i.wi = t.w.v);
- }),
- (CVShapeElement.prototype.destroy = function () {
- (this.shapesData = null),
- (this.globalData = null),
- (this.canvasContext = null),
- (this.stylesList.length = 0),
- (this.itemsData.length = 0);
- });
- function CVTextElement(e, t, r) {
- (this.textSpans = []),
- (this.yOffset = 0),
- (this.fillColorAnim = !1),
- (this.strokeColorAnim = !1),
- (this.strokeWidthAnim = !1),
- (this.stroke = !1),
- (this.fill = !1),
- (this.justifyOffset = 0),
- (this.currentRender = null),
- (this.renderType = 'canvas'),
- (this.values = {
- fill: 'rgba(0,0,0,0)',
- stroke: 'rgba(0,0,0,0)',
- sWidth: 0,
- fValue: ''
- }),
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- CVBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableElement,
- ITextElement
- ],
- CVTextElement
- ),
- (CVTextElement.prototype.tHelper =
- createTag('canvas').getContext('2d')),
- (CVTextElement.prototype.buildNewText = function () {
- var e = this.textProperty.currentData;
- this.renderedLetters = createSizedArray(e.l ? e.l.length : 0);
- var t = !1;
- e.fc
- ? ((t = !0), (this.values.fill = this.buildColor(e.fc)))
- : (this.values.fill = 'rgba(0,0,0,0)'),
- (this.fill = t);
- var r = !1;
- e.sc &&
- ((r = !0),
- (this.values.stroke = this.buildColor(e.sc)),
- (this.values.sWidth = e.sw));
- var i = this.globalData.fontManager.getFontByName(e.f),
- s,
- a,
- o = e.l,
- n = this.mHelper;
- (this.stroke = r),
- (this.values.fValue =
- e.finalSize +
- 'px ' +
- this.globalData.fontManager.getFontByName(e.f).fFamily),
- (a = e.finalText.length);
- var l,
- f,
- g,
- S,
- c,
- P,
- d,
- p,
- x,
- u,
- y = this.data.singleShape,
- m = e.tr * 0.001 * e.finalSize,
- A = 0,
- T = 0,
- E = !0,
- _ = 0;
- for (s = 0; s < a; s += 1) {
- (l = this.globalData.fontManager.getCharData(
- e.finalText[s],
- i.fStyle,
- this.globalData.fontManager.getFontByName(e.f).fFamily
- )),
- (f = (l && l.data) || {}),
- n.reset(),
- y &&
- o[s].n &&
- ((A = -m), (T += e.yOffset), (T += E ? 1 : 0), (E = !1)),
- (c = f.shapes ? f.shapes[0].it : []),
- (d = c.length),
- n.scale(e.finalSize / 100, e.finalSize / 100),
- y && this.applyTextPropertiesToMatrix(e, n, o[s].line, A, T),
- (x = createSizedArray(d - 1));
- var I = 0;
- for (P = 0; P < d; P += 1)
- if (c[P].ty === 'sh') {
- for (
- S = c[P].ks.k.i.length, p = c[P].ks.k, u = [], g = 1;
- g < S;
- g += 1
- )
- g === 1 &&
- u.push(
- n.applyToX(p.v[0][0], p.v[0][1], 0),
- n.applyToY(p.v[0][0], p.v[0][1], 0)
- ),
- u.push(
- n.applyToX(p.o[g - 1][0], p.o[g - 1][1], 0),
- n.applyToY(p.o[g - 1][0], p.o[g - 1][1], 0),
- n.applyToX(p.i[g][0], p.i[g][1], 0),
- n.applyToY(p.i[g][0], p.i[g][1], 0),
- n.applyToX(p.v[g][0], p.v[g][1], 0),
- n.applyToY(p.v[g][0], p.v[g][1], 0)
- );
- u.push(
- n.applyToX(p.o[g - 1][0], p.o[g - 1][1], 0),
- n.applyToY(p.o[g - 1][0], p.o[g - 1][1], 0),
- n.applyToX(p.i[0][0], p.i[0][1], 0),
- n.applyToY(p.i[0][0], p.i[0][1], 0),
- n.applyToX(p.v[0][0], p.v[0][1], 0),
- n.applyToY(p.v[0][0], p.v[0][1], 0)
- ),
- (x[I] = u),
- (I += 1);
- }
- y && ((A += o[s].l), (A += m)),
- this.textSpans[_]
- ? (this.textSpans[_].elem = x)
- : (this.textSpans[_] = { elem: x }),
- (_ += 1);
- }
- }),
- (CVTextElement.prototype.renderInnerContent = function () {
- this.validateText();
- var e = this.canvasContext;
- (e.font = this.values.fValue),
- this.globalData.renderer.ctxLineCap('butt'),
- this.globalData.renderer.ctxLineJoin('miter'),
- this.globalData.renderer.ctxMiterLimit(4),
- this.data.singleShape ||
- this.textAnimator.getMeasures(
- this.textProperty.currentData,
- this.lettersChangedFlag
- );
- var t,
- r,
- i,
- s,
- a,
- o,
- n = this.textAnimator.renderedLetters,
- l = this.textProperty.currentData.l;
- r = l.length;
- var f,
- g = null,
- S = null,
- c = null,
- P,
- d,
- p = this.globalData.renderer;
- for (t = 0; t < r; t += 1)
- if (!l[t].n) {
- if (
- ((f = n[t]),
- f && (p.save(), p.ctxTransform(f.p), p.ctxOpacity(f.o)),
- this.fill)
- ) {
- for (
- f && f.fc
- ? g !== f.fc && (p.ctxFillStyle(f.fc), (g = f.fc))
- : g !== this.values.fill &&
- ((g = this.values.fill),
- p.ctxFillStyle(this.values.fill)),
- P = this.textSpans[t].elem,
- s = P.length,
- this.globalData.canvasContext.beginPath(),
- i = 0;
- i < s;
- i += 1
- )
- for (
- d = P[i],
- o = d.length,
- this.globalData.canvasContext.moveTo(d[0], d[1]),
- a = 2;
- a < o;
- a += 6
- )
- this.globalData.canvasContext.bezierCurveTo(
- d[a],
- d[a + 1],
- d[a + 2],
- d[a + 3],
- d[a + 4],
- d[a + 5]
- );
- this.globalData.canvasContext.closePath(), p.ctxFill();
- }
- if (this.stroke) {
- for (
- f && f.sw
- ? c !== f.sw && ((c = f.sw), p.ctxLineWidth(f.sw))
- : c !== this.values.sWidth &&
- ((c = this.values.sWidth),
- p.ctxLineWidth(this.values.sWidth)),
- f && f.sc
- ? S !== f.sc && ((S = f.sc), p.ctxStrokeStyle(f.sc))
- : S !== this.values.stroke &&
- ((S = this.values.stroke),
- p.ctxStrokeStyle(this.values.stroke)),
- P = this.textSpans[t].elem,
- s = P.length,
- this.globalData.canvasContext.beginPath(),
- i = 0;
- i < s;
- i += 1
- )
- for (
- d = P[i],
- o = d.length,
- this.globalData.canvasContext.moveTo(d[0], d[1]),
- a = 2;
- a < o;
- a += 6
- )
- this.globalData.canvasContext.bezierCurveTo(
- d[a],
- d[a + 1],
- d[a + 2],
- d[a + 3],
- d[a + 4],
- d[a + 5]
- );
- this.globalData.canvasContext.closePath(), p.ctxStroke();
- }
- f && this.globalData.renderer.restore();
- }
- });
- function CVImageElement(e, t, r) {
- (this.assetData = t.getAssetData(e.refId)),
- (this.img = t.imageLoader.getAsset(this.assetData)),
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- CVBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableElement
- ],
- CVImageElement
- ),
- (CVImageElement.prototype.initElement =
- SVGShapeElement.prototype.initElement),
- (CVImageElement.prototype.prepareFrame =
- IImageElement.prototype.prepareFrame),
- (CVImageElement.prototype.createContent = function () {
- if (
- this.img.width &&
- (this.assetData.w !== this.img.width ||
- this.assetData.h !== this.img.height)
- ) {
- var e = createTag('canvas');
- (e.width = this.assetData.w), (e.height = this.assetData.h);
- var t = e.getContext('2d'),
- r = this.img.width,
- i = this.img.height,
- s = r / i,
- a = this.assetData.w / this.assetData.h,
- o,
- n,
- l =
- this.assetData.pr ||
- this.globalData.renderConfig.imagePreserveAspectRatio;
- (s > a && l === 'xMidYMid slice') ||
- (s < a && l !== 'xMidYMid slice')
- ? ((n = i), (o = n * a))
- : ((o = r), (n = o / a)),
- t.drawImage(
- this.img,
- (r - o) / 2,
- (i - n) / 2,
- o,
- n,
- 0,
- 0,
- this.assetData.w,
- this.assetData.h
- ),
- (this.img = e);
- }
- }),
- (CVImageElement.prototype.renderInnerContent = function () {
- this.canvasContext.drawImage(this.img, 0, 0);
- }),
- (CVImageElement.prototype.destroy = function () {
- this.img = null;
- });
- function CVSolidElement(e, t, r) {
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- CVBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableElement
- ],
- CVSolidElement
- ),
- (CVSolidElement.prototype.initElement =
- SVGShapeElement.prototype.initElement),
- (CVSolidElement.prototype.prepareFrame =
- IImageElement.prototype.prepareFrame),
- (CVSolidElement.prototype.renderInnerContent = function () {
- this.globalData.renderer.ctxFillStyle(this.data.sc),
- this.globalData.renderer.ctxFillRect(
- 0,
- 0,
- this.data.sw,
- this.data.sh
- );
- });
- function CanvasRendererBase() {}
- extendPrototype([BaseRenderer], CanvasRendererBase),
- (CanvasRendererBase.prototype.createShape = function (e) {
- return new CVShapeElement(e, this.globalData, this);
- }),
- (CanvasRendererBase.prototype.createText = function (e) {
- return new CVTextElement(e, this.globalData, this);
- }),
- (CanvasRendererBase.prototype.createImage = function (e) {
- return new CVImageElement(e, this.globalData, this);
- }),
- (CanvasRendererBase.prototype.createSolid = function (e) {
- return new CVSolidElement(e, this.globalData, this);
- }),
- (CanvasRendererBase.prototype.createNull =
- SVGRenderer.prototype.createNull),
- (CanvasRendererBase.prototype.ctxTransform = function (e) {
- (e[0] === 1 &&
- e[1] === 0 &&
- e[4] === 0 &&
- e[5] === 1 &&
- e[12] === 0 &&
- e[13] === 0) ||
- this.canvasContext.transform(e[0], e[1], e[4], e[5], e[12], e[13]);
- }),
- (CanvasRendererBase.prototype.ctxOpacity = function (e) {
- this.canvasContext.globalAlpha *= e < 0 ? 0 : e;
- }),
- (CanvasRendererBase.prototype.ctxFillStyle = function (e) {
- this.canvasContext.fillStyle = e;
- }),
- (CanvasRendererBase.prototype.ctxStrokeStyle = function (e) {
- this.canvasContext.strokeStyle = e;
- }),
- (CanvasRendererBase.prototype.ctxLineWidth = function (e) {
- this.canvasContext.lineWidth = e;
- }),
- (CanvasRendererBase.prototype.ctxLineCap = function (e) {
- this.canvasContext.lineCap = e;
- }),
- (CanvasRendererBase.prototype.ctxLineJoin = function (e) {
- this.canvasContext.lineJoin = e;
- }),
- (CanvasRendererBase.prototype.ctxMiterLimit = function (e) {
- this.canvasContext.miterLimit = e;
- }),
- (CanvasRendererBase.prototype.ctxFill = function (e) {
- this.canvasContext.fill(e);
- }),
- (CanvasRendererBase.prototype.ctxFillRect = function (e, t, r, i) {
- this.canvasContext.fillRect(e, t, r, i);
- }),
- (CanvasRendererBase.prototype.ctxStroke = function () {
- this.canvasContext.stroke();
- }),
- (CanvasRendererBase.prototype.reset = function () {
- if (!this.renderConfig.clearCanvas) {
- this.canvasContext.restore();
- return;
- }
- this.contextData.reset();
- }),
- (CanvasRendererBase.prototype.save = function () {
- this.canvasContext.save();
- }),
- (CanvasRendererBase.prototype.restore = function (e) {
- if (!this.renderConfig.clearCanvas) {
- this.canvasContext.restore();
- return;
- }
- e && (this.globalData.blendMode = 'source-over'),
- this.contextData.restore(e);
- }),
- (CanvasRendererBase.prototype.configAnimation = function (e) {
- if (this.animationItem.wrapper) {
- this.animationItem.container = createTag('canvas');
- var t = this.animationItem.container.style;
- (t.width = '100%'), (t.height = '100%');
- var r = '0px 0px 0px';
- (t.transformOrigin = r),
- (t.mozTransformOrigin = r),
- (t.webkitTransformOrigin = r),
- (t['-webkit-transform'] = r),
- (t.contentVisibility = this.renderConfig.contentVisibility),
- this.animationItem.wrapper.appendChild(
- this.animationItem.container
- ),
- (this.canvasContext =
- this.animationItem.container.getContext('2d')),
- this.renderConfig.className &&
- this.animationItem.container.setAttribute(
- 'class',
- this.renderConfig.className
- ),
- this.renderConfig.id &&
- this.animationItem.container.setAttribute(
- 'id',
- this.renderConfig.id
- );
- } else this.canvasContext = this.renderConfig.context;
- this.contextData.setContext(this.canvasContext),
- (this.data = e),
- (this.layers = e.layers),
- (this.transformCanvas = {
- w: e.w,
- h: e.h,
- sx: 0,
- sy: 0,
- tx: 0,
- ty: 0
- }),
- this.setupGlobalData(e, document.body),
- (this.globalData.canvasContext = this.canvasContext),
- (this.globalData.renderer = this),
- (this.globalData.isDashed = !1),
- (this.globalData.progressiveLoad =
- this.renderConfig.progressiveLoad),
- (this.globalData.transformCanvas = this.transformCanvas),
- (this.elements = createSizedArray(e.layers.length)),
- this.updateContainerSize();
- }),
- (CanvasRendererBase.prototype.updateContainerSize = function (e, t) {
- this.reset();
- var r, i;
- e
- ? ((r = e),
- (i = t),
- (this.canvasContext.canvas.width = r),
- (this.canvasContext.canvas.height = i))
- : (this.animationItem.wrapper && this.animationItem.container
- ? ((r = this.animationItem.wrapper.offsetWidth),
- (i = this.animationItem.wrapper.offsetHeight))
- : ((r = this.canvasContext.canvas.width),
- (i = this.canvasContext.canvas.height)),
- (this.canvasContext.canvas.width = r * this.renderConfig.dpr),
- (this.canvasContext.canvas.height = i * this.renderConfig.dpr));
- var s, a;
- if (
- this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 ||
- this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1
- ) {
- var o = this.renderConfig.preserveAspectRatio.split(' '),
- n = o[1] || 'meet',
- l = o[0] || 'xMidYMid',
- f = l.substr(0, 4),
- g = l.substr(4);
- (s = r / i),
- (a = this.transformCanvas.w / this.transformCanvas.h),
- (a > s && n === 'meet') || (a < s && n === 'slice')
- ? ((this.transformCanvas.sx =
- r / (this.transformCanvas.w / this.renderConfig.dpr)),
- (this.transformCanvas.sy =
- r / (this.transformCanvas.w / this.renderConfig.dpr)))
- : ((this.transformCanvas.sx =
- i / (this.transformCanvas.h / this.renderConfig.dpr)),
- (this.transformCanvas.sy =
- i / (this.transformCanvas.h / this.renderConfig.dpr))),
- f === 'xMid' &&
- ((a < s && n === 'meet') || (a > s && n === 'slice'))
- ? (this.transformCanvas.tx =
- ((r -
- this.transformCanvas.w * (i / this.transformCanvas.h)) /
- 2) *
- this.renderConfig.dpr)
- : f === 'xMax' &&
- ((a < s && n === 'meet') || (a > s && n === 'slice'))
- ? (this.transformCanvas.tx =
- (r -
- this.transformCanvas.w * (i / this.transformCanvas.h)) *
- this.renderConfig.dpr)
- : (this.transformCanvas.tx = 0),
- g === 'YMid' &&
- ((a > s && n === 'meet') || (a < s && n === 'slice'))
- ? (this.transformCanvas.ty =
- ((i -
- this.transformCanvas.h * (r / this.transformCanvas.w)) /
- 2) *
- this.renderConfig.dpr)
- : g === 'YMax' &&
- ((a > s && n === 'meet') || (a < s && n === 'slice'))
- ? (this.transformCanvas.ty =
- (i -
- this.transformCanvas.h * (r / this.transformCanvas.w)) *
- this.renderConfig.dpr)
- : (this.transformCanvas.ty = 0);
- } else
- this.renderConfig.preserveAspectRatio === 'none'
- ? ((this.transformCanvas.sx =
- r / (this.transformCanvas.w / this.renderConfig.dpr)),
- (this.transformCanvas.sy =
- i / (this.transformCanvas.h / this.renderConfig.dpr)),
- (this.transformCanvas.tx = 0),
- (this.transformCanvas.ty = 0))
- : ((this.transformCanvas.sx = this.renderConfig.dpr),
- (this.transformCanvas.sy = this.renderConfig.dpr),
- (this.transformCanvas.tx = 0),
- (this.transformCanvas.ty = 0));
- (this.transformCanvas.props = [
- this.transformCanvas.sx,
- 0,
- 0,
- 0,
- 0,
- this.transformCanvas.sy,
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- this.transformCanvas.tx,
- this.transformCanvas.ty,
- 0,
- 1
- ]),
- this.ctxTransform(this.transformCanvas.props),
- this.canvasContext.beginPath(),
- this.canvasContext.rect(
- 0,
- 0,
- this.transformCanvas.w,
- this.transformCanvas.h
- ),
- this.canvasContext.closePath(),
- this.canvasContext.clip(),
- this.renderFrame(this.renderedFrame, !0);
- }),
- (CanvasRendererBase.prototype.destroy = function () {
- this.renderConfig.clearCanvas &&
- this.animationItem.wrapper &&
- (this.animationItem.wrapper.innerText = '');
- var e,
- t = this.layers ? this.layers.length : 0;
- for (e = t - 1; e >= 0; e -= 1)
- this.elements[e] &&
- this.elements[e].destroy &&
- this.elements[e].destroy();
- (this.elements.length = 0),
- (this.globalData.canvasContext = null),
- (this.animationItem.container = null),
- (this.destroyed = !0);
- }),
- (CanvasRendererBase.prototype.renderFrame = function (e, t) {
- if (
- !(
- (this.renderedFrame === e &&
- this.renderConfig.clearCanvas === !0 &&
- !t) ||
- this.destroyed ||
- e === -1
- )
- ) {
- (this.renderedFrame = e),
- (this.globalData.frameNum = e - this.animationItem._isFirstFrame),
- (this.globalData.frameId += 1),
- (this.globalData._mdf = !this.renderConfig.clearCanvas || t),
- (this.globalData.projectInterface.currentFrame = e);
- var r,
- i = this.layers.length;
- for (
- this.completeLayers || this.checkLayers(e), r = i - 1;
- r >= 0;
- r -= 1
- )
- (this.completeLayers || this.elements[r]) &&
- this.elements[r].prepareFrame(e - this.layers[r].st);
- if (this.globalData._mdf) {
- for (
- this.renderConfig.clearCanvas === !0
- ? this.canvasContext.clearRect(
- 0,
- 0,
- this.transformCanvas.w,
- this.transformCanvas.h
- )
- : this.save(),
- r = i - 1;
- r >= 0;
- r -= 1
- )
- (this.completeLayers || this.elements[r]) &&
- this.elements[r].renderFrame();
- this.renderConfig.clearCanvas !== !0 && this.restore();
- }
- }
- }),
- (CanvasRendererBase.prototype.buildItem = function (e) {
- var t = this.elements;
- if (!(t[e] || this.layers[e].ty === 99)) {
- var r = this.createItem(this.layers[e], this, this.globalData);
- (t[e] = r), r.initExpressions();
- }
- }),
- (CanvasRendererBase.prototype.checkPendingElements = function () {
- for (; this.pendingElements.length; ) {
- var e = this.pendingElements.pop();
- e.checkParenting();
- }
- }),
- (CanvasRendererBase.prototype.hide = function () {
- this.animationItem.container.style.display = 'none';
- }),
- (CanvasRendererBase.prototype.show = function () {
- this.animationItem.container.style.display = 'block';
- });
- function CanvasContext() {
- (this.opacity = -1),
- (this.transform = createTypedArray('float32', 16)),
- (this.fillStyle = ''),
- (this.strokeStyle = ''),
- (this.lineWidth = ''),
- (this.lineCap = ''),
- (this.lineJoin = ''),
- (this.miterLimit = ''),
- (this.id = Math.random());
- }
- function CVContextData() {
- (this.stack = []), (this.cArrPos = 0), (this.cTr = new Matrix());
- var e,
- t = 15;
- for (e = 0; e < t; e += 1) {
- var r = new CanvasContext();
- this.stack[e] = r;
- }
- (this._length = t),
- (this.nativeContext = null),
- (this.transformMat = new Matrix()),
- (this.currentOpacity = 1),
- (this.currentFillStyle = ''),
- (this.appliedFillStyle = ''),
- (this.currentStrokeStyle = ''),
- (this.appliedStrokeStyle = ''),
- (this.currentLineWidth = ''),
- (this.appliedLineWidth = ''),
- (this.currentLineCap = ''),
- (this.appliedLineCap = ''),
- (this.currentLineJoin = ''),
- (this.appliedLineJoin = ''),
- (this.appliedMiterLimit = ''),
- (this.currentMiterLimit = '');
- }
- (CVContextData.prototype.duplicate = function () {
- var e = this._length * 2,
- t = 0;
- for (t = this._length; t < e; t += 1)
- this.stack[t] = new CanvasContext();
- this._length = e;
- }),
- (CVContextData.prototype.reset = function () {
- (this.cArrPos = 0),
- this.cTr.reset(),
- (this.stack[this.cArrPos].opacity = 1);
- }),
- (CVContextData.prototype.restore = function (e) {
- this.cArrPos -= 1;
- var t = this.stack[this.cArrPos],
- r = t.transform,
- i,
- s = this.cTr.props;
- for (i = 0; i < 16; i += 1) s[i] = r[i];
- if (e) {
- this.nativeContext.restore();
- var a = this.stack[this.cArrPos + 1];
- (this.appliedFillStyle = a.fillStyle),
- (this.appliedStrokeStyle = a.strokeStyle),
- (this.appliedLineWidth = a.lineWidth),
- (this.appliedLineCap = a.lineCap),
- (this.appliedLineJoin = a.lineJoin),
- (this.appliedMiterLimit = a.miterLimit);
- }
- this.nativeContext.setTransform(r[0], r[1], r[4], r[5], r[12], r[13]),
- (e || (t.opacity !== -1 && this.currentOpacity !== t.opacity)) &&
- ((this.nativeContext.globalAlpha = t.opacity),
- (this.currentOpacity = t.opacity)),
- (this.currentFillStyle = t.fillStyle),
- (this.currentStrokeStyle = t.strokeStyle),
- (this.currentLineWidth = t.lineWidth),
- (this.currentLineCap = t.lineCap),
- (this.currentLineJoin = t.lineJoin),
- (this.currentMiterLimit = t.miterLimit);
- }),
- (CVContextData.prototype.save = function (e) {
- e && this.nativeContext.save();
- var t = this.cTr.props;
- this._length <= this.cArrPos && this.duplicate();
- var r = this.stack[this.cArrPos],
- i;
- for (i = 0; i < 16; i += 1) r.transform[i] = t[i];
- this.cArrPos += 1;
- var s = this.stack[this.cArrPos];
- (s.opacity = r.opacity),
- (s.fillStyle = r.fillStyle),
- (s.strokeStyle = r.strokeStyle),
- (s.lineWidth = r.lineWidth),
- (s.lineCap = r.lineCap),
- (s.lineJoin = r.lineJoin),
- (s.miterLimit = r.miterLimit);
- }),
- (CVContextData.prototype.setOpacity = function (e) {
- this.stack[this.cArrPos].opacity = e;
- }),
- (CVContextData.prototype.setContext = function (e) {
- this.nativeContext = e;
- }),
- (CVContextData.prototype.fillStyle = function (e) {
- this.stack[this.cArrPos].fillStyle !== e &&
- ((this.currentFillStyle = e),
- (this.stack[this.cArrPos].fillStyle = e));
- }),
- (CVContextData.prototype.strokeStyle = function (e) {
- this.stack[this.cArrPos].strokeStyle !== e &&
- ((this.currentStrokeStyle = e),
- (this.stack[this.cArrPos].strokeStyle = e));
- }),
- (CVContextData.prototype.lineWidth = function (e) {
- this.stack[this.cArrPos].lineWidth !== e &&
- ((this.currentLineWidth = e),
- (this.stack[this.cArrPos].lineWidth = e));
- }),
- (CVContextData.prototype.lineCap = function (e) {
- this.stack[this.cArrPos].lineCap !== e &&
- ((this.currentLineCap = e), (this.stack[this.cArrPos].lineCap = e));
- }),
- (CVContextData.prototype.lineJoin = function (e) {
- this.stack[this.cArrPos].lineJoin !== e &&
- ((this.currentLineJoin = e),
- (this.stack[this.cArrPos].lineJoin = e));
- }),
- (CVContextData.prototype.miterLimit = function (e) {
- this.stack[this.cArrPos].miterLimit !== e &&
- ((this.currentMiterLimit = e),
- (this.stack[this.cArrPos].miterLimit = e));
- }),
- (CVContextData.prototype.transform = function (e) {
- this.transformMat.cloneFromProps(e);
- var t = this.cTr;
- this.transformMat.multiply(t),
- t.cloneFromProps(this.transformMat.props);
- var r = t.props;
- this.nativeContext.setTransform(r[0], r[1], r[4], r[5], r[12], r[13]);
- }),
- (CVContextData.prototype.opacity = function (e) {
- var t = this.stack[this.cArrPos].opacity;
- (t *= e < 0 ? 0 : e),
- this.stack[this.cArrPos].opacity !== t &&
- (this.currentOpacity !== e &&
- ((this.nativeContext.globalAlpha = e),
- (this.currentOpacity = e)),
- (this.stack[this.cArrPos].opacity = t));
- }),
- (CVContextData.prototype.fill = function (e) {
- this.appliedFillStyle !== this.currentFillStyle &&
- ((this.appliedFillStyle = this.currentFillStyle),
- (this.nativeContext.fillStyle = this.appliedFillStyle)),
- this.nativeContext.fill(e);
- }),
- (CVContextData.prototype.fillRect = function (e, t, r, i) {
- this.appliedFillStyle !== this.currentFillStyle &&
- ((this.appliedFillStyle = this.currentFillStyle),
- (this.nativeContext.fillStyle = this.appliedFillStyle)),
- this.nativeContext.fillRect(e, t, r, i);
- }),
- (CVContextData.prototype.stroke = function () {
- this.appliedStrokeStyle !== this.currentStrokeStyle &&
- ((this.appliedStrokeStyle = this.currentStrokeStyle),
- (this.nativeContext.strokeStyle = this.appliedStrokeStyle)),
- this.appliedLineWidth !== this.currentLineWidth &&
- ((this.appliedLineWidth = this.currentLineWidth),
- (this.nativeContext.lineWidth = this.appliedLineWidth)),
- this.appliedLineCap !== this.currentLineCap &&
- ((this.appliedLineCap = this.currentLineCap),
- (this.nativeContext.lineCap = this.appliedLineCap)),
- this.appliedLineJoin !== this.currentLineJoin &&
- ((this.appliedLineJoin = this.currentLineJoin),
- (this.nativeContext.lineJoin = this.appliedLineJoin)),
- this.appliedMiterLimit !== this.currentMiterLimit &&
- ((this.appliedMiterLimit = this.currentMiterLimit),
- (this.nativeContext.miterLimit = this.appliedMiterLimit)),
- this.nativeContext.stroke();
- });
- function CVCompElement(e, t, r) {
- (this.completeLayers = !1),
- (this.layers = e.layers),
- (this.pendingElements = []),
- (this.elements = createSizedArray(this.layers.length)),
- this.initElement(e, t, r),
- (this.tm = e.tm
- ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
- : { _placeholder: !0 });
- }
- extendPrototype(
- [CanvasRendererBase, ICompElement, CVBaseElement],
- CVCompElement
- ),
- (CVCompElement.prototype.renderInnerContent = function () {
- var e = this.canvasContext;
- e.beginPath(),
- e.moveTo(0, 0),
- e.lineTo(this.data.w, 0),
- e.lineTo(this.data.w, this.data.h),
- e.lineTo(0, this.data.h),
- e.lineTo(0, 0),
- e.clip();
- var t,
- r = this.layers.length;
- for (t = r - 1; t >= 0; t -= 1)
- (this.completeLayers || this.elements[t]) &&
- this.elements[t].renderFrame();
- }),
- (CVCompElement.prototype.destroy = function () {
- var e,
- t = this.layers.length;
- for (e = t - 1; e >= 0; e -= 1)
- this.elements[e] && this.elements[e].destroy();
- (this.layers = null), (this.elements = null);
- }),
- (CVCompElement.prototype.createComp = function (e) {
- return new CVCompElement(e, this.globalData, this);
- });
- function CanvasRenderer(e, t) {
- (this.animationItem = e),
- (this.renderConfig = {
- clearCanvas: t && t.clearCanvas !== void 0 ? t.clearCanvas : !0,
- context: (t && t.context) || null,
- progressiveLoad: (t && t.progressiveLoad) || !1,
- preserveAspectRatio:
- (t && t.preserveAspectRatio) || 'xMidYMid meet',
- imagePreserveAspectRatio:
- (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
- contentVisibility: (t && t.contentVisibility) || 'visible',
- className: (t && t.className) || '',
- id: (t && t.id) || '',
- runExpressions:
- !t || t.runExpressions === void 0 || t.runExpressions
- }),
- (this.renderConfig.dpr = (t && t.dpr) || 1),
- this.animationItem.wrapper &&
- (this.renderConfig.dpr =
- (t && t.dpr) || window.devicePixelRatio || 1),
- (this.renderedFrame = -1),
- (this.globalData = {
- frameNum: -1,
- _mdf: !1,
- renderConfig: this.renderConfig,
- currentGlobalAlpha: -1
- }),
- (this.contextData = new CVContextData()),
- (this.elements = []),
- (this.pendingElements = []),
- (this.transformMat = new Matrix()),
- (this.completeLayers = !1),
- (this.rendererType = 'canvas'),
- this.renderConfig.clearCanvas &&
- ((this.ctxTransform = this.contextData.transform.bind(
- this.contextData
- )),
- (this.ctxOpacity = this.contextData.opacity.bind(this.contextData)),
- (this.ctxFillStyle = this.contextData.fillStyle.bind(
- this.contextData
- )),
- (this.ctxStrokeStyle = this.contextData.strokeStyle.bind(
- this.contextData
- )),
- (this.ctxLineWidth = this.contextData.lineWidth.bind(
- this.contextData
- )),
- (this.ctxLineCap = this.contextData.lineCap.bind(this.contextData)),
- (this.ctxLineJoin = this.contextData.lineJoin.bind(
- this.contextData
- )),
- (this.ctxMiterLimit = this.contextData.miterLimit.bind(
- this.contextData
- )),
- (this.ctxFill = this.contextData.fill.bind(this.contextData)),
- (this.ctxFillRect = this.contextData.fillRect.bind(
- this.contextData
- )),
- (this.ctxStroke = this.contextData.stroke.bind(this.contextData)),
- (this.save = this.contextData.save.bind(this.contextData)));
- }
- extendPrototype([CanvasRendererBase], CanvasRenderer),
- (CanvasRenderer.prototype.createComp = function (e) {
- return new CVCompElement(e, this.globalData, this);
- });
- function HBaseElement() {}
- (HBaseElement.prototype = {
- checkBlendMode: function () {},
- initRendererElement: function () {
- (this.baseElement = createTag(this.data.tg || 'div')),
- this.data.hasMask
- ? ((this.svgElement = createNS('svg')),
- (this.layerElement = createNS('g')),
- (this.maskedElement = this.layerElement),
- this.svgElement.appendChild(this.layerElement),
- this.baseElement.appendChild(this.svgElement))
- : (this.layerElement = this.baseElement),
- styleDiv(this.baseElement);
- },
- createContainerElements: function () {
- (this.renderableEffectsManager = new CVEffects(this)),
- (this.transformedElement = this.baseElement),
- (this.maskedElement = this.layerElement),
- this.data.ln && this.layerElement.setAttribute('id', this.data.ln),
- this.data.cl &&
- this.layerElement.setAttribute('class', this.data.cl),
- this.data.bm !== 0 && this.setBlendMode();
- },
- renderElement: function () {
- var t = this.transformedElement ? this.transformedElement.style : {};
- if (this.finalTransform._matMdf) {
- var r = this.finalTransform.mat.toCSS();
- (t.transform = r), (t.webkitTransform = r);
- }
- this.finalTransform._opMdf &&
- (t.opacity = this.finalTransform.mProp.o.v);
- },
- renderFrame: function () {
- this.data.hd ||
- this.hidden ||
- (this.renderTransform(),
- this.renderRenderable(),
- this.renderElement(),
- this.renderInnerContent(),
- this._isFirstFrame && (this._isFirstFrame = !1));
- },
- destroy: function () {
- (this.layerElement = null),
- (this.transformedElement = null),
- this.matteElement && (this.matteElement = null),
- this.maskManager &&
- (this.maskManager.destroy(), (this.maskManager = null));
- },
- createRenderableComponents: function () {
- this.maskManager = new MaskElement(this.data, this, this.globalData);
- },
- addEffects: function () {},
- setMatte: function () {}
- }),
- (HBaseElement.prototype.getBaseElement =
- SVGBaseElement.prototype.getBaseElement),
- (HBaseElement.prototype.destroyBaseElement =
- HBaseElement.prototype.destroy),
- (HBaseElement.prototype.buildElementParenting =
- BaseRenderer.prototype.buildElementParenting);
- function HSolidElement(e, t, r) {
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- HBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableDOMElement
- ],
- HSolidElement
- ),
- (HSolidElement.prototype.createContent = function () {
- var e;
- this.data.hasMask
- ? ((e = createNS('rect')),
- e.setAttribute('width', this.data.sw),
- e.setAttribute('height', this.data.sh),
- e.setAttribute('fill', this.data.sc),
- this.svgElement.setAttribute('width', this.data.sw),
- this.svgElement.setAttribute('height', this.data.sh))
- : ((e = createTag('div')),
- (e.style.width = this.data.sw + 'px'),
- (e.style.height = this.data.sh + 'px'),
- (e.style.backgroundColor = this.data.sc)),
- this.layerElement.appendChild(e);
- });
- function HShapeElement(e, t, r) {
- (this.shapes = []),
- (this.shapesData = e.shapes),
- (this.stylesList = []),
- (this.shapeModifiers = []),
- (this.itemsData = []),
- (this.processedElements = []),
- (this.animatedContents = []),
- (this.shapesContainer = createNS('g')),
- this.initElement(e, t, r),
- (this.prevViewData = []),
- (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 });
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- HSolidElement,
- SVGShapeElement,
- HBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableElement
- ],
- HShapeElement
- ),
- (HShapeElement.prototype._renderShapeFrame =
- HShapeElement.prototype.renderInnerContent),
- (HShapeElement.prototype.createContent = function () {
- var e;
- if (((this.baseElement.style.fontSize = 0), this.data.hasMask))
- this.layerElement.appendChild(this.shapesContainer),
- (e = this.svgElement);
- else {
- e = createNS('svg');
- var t = this.comp.data ? this.comp.data : this.globalData.compSize;
- e.setAttribute('width', t.w),
- e.setAttribute('height', t.h),
- e.appendChild(this.shapesContainer),
- this.layerElement.appendChild(e);
- }
- this.searchShapes(
- this.shapesData,
- this.itemsData,
- this.prevViewData,
- this.shapesContainer,
- 0,
- [],
- !0
- ),
- this.filterUniqueShapes(),
- (this.shapeCont = e);
- }),
- (HShapeElement.prototype.getTransformedPoint = function (e, t) {
- var r,
- i = e.length;
- for (r = 0; r < i; r += 1)
- t = e[r].mProps.v.applyToPointArray(t[0], t[1], 0);
- return t;
- }),
- (HShapeElement.prototype.calculateShapeBoundingBox = function (e, t) {
- var r = e.sh.v,
- i = e.transformers,
- s,
- a = r._length,
- o,
- n,
- l,
- f;
- if (!(a <= 1)) {
- for (s = 0; s < a - 1; s += 1)
- (o = this.getTransformedPoint(i, r.v[s])),
- (n = this.getTransformedPoint(i, r.o[s])),
- (l = this.getTransformedPoint(i, r.i[s + 1])),
- (f = this.getTransformedPoint(i, r.v[s + 1])),
- this.checkBounds(o, n, l, f, t);
- r.c &&
- ((o = this.getTransformedPoint(i, r.v[s])),
- (n = this.getTransformedPoint(i, r.o[s])),
- (l = this.getTransformedPoint(i, r.i[0])),
- (f = this.getTransformedPoint(i, r.v[0])),
- this.checkBounds(o, n, l, f, t));
- }
- }),
- (HShapeElement.prototype.checkBounds = function (e, t, r, i, s) {
- this.getBoundsOfCurve(e, t, r, i);
- var a = this.shapeBoundingBox;
- (s.x = bmMin(a.left, s.x)),
- (s.xMax = bmMax(a.right, s.xMax)),
- (s.y = bmMin(a.top, s.y)),
- (s.yMax = bmMax(a.bottom, s.yMax));
- }),
- (HShapeElement.prototype.shapeBoundingBox = {
- left: 0,
- right: 0,
- top: 0,
- bottom: 0
- }),
- (HShapeElement.prototype.tempBoundingBox = {
- x: 0,
- xMax: 0,
- y: 0,
- yMax: 0,
- width: 0,
- height: 0
- }),
- (HShapeElement.prototype.getBoundsOfCurve = function (e, t, r, i) {
- for (
- var s = [
- [e[0], i[0]],
- [e[1], i[1]]
- ],
- a,
- o,
- n,
- l,
- f,
- g,
- S,
- c = 0;
- c < 2;
- ++c
- )
- (o = 6 * e[c] - 12 * t[c] + 6 * r[c]),
- (a = -3 * e[c] + 9 * t[c] - 9 * r[c] + 3 * i[c]),
- (n = 3 * t[c] - 3 * e[c]),
- (o |= 0),
- (a |= 0),
- (n |= 0),
- (a === 0 && o === 0) ||
- (a === 0
- ? ((l = -n / o),
- l > 0 &&
- l < 1 &&
- s[c].push(this.calculateF(l, e, t, r, i, c)))
- : ((f = o * o - 4 * n * a),
- f >= 0 &&
- ((g = (-o + bmSqrt(f)) / (2 * a)),
- g > 0 &&
- g < 1 &&
- s[c].push(this.calculateF(g, e, t, r, i, c)),
- (S = (-o - bmSqrt(f)) / (2 * a)),
- S > 0 &&
- S < 1 &&
- s[c].push(this.calculateF(S, e, t, r, i, c)))));
- (this.shapeBoundingBox.left = bmMin.apply(null, s[0])),
- (this.shapeBoundingBox.top = bmMin.apply(null, s[1])),
- (this.shapeBoundingBox.right = bmMax.apply(null, s[0])),
- (this.shapeBoundingBox.bottom = bmMax.apply(null, s[1]));
- }),
- (HShapeElement.prototype.calculateF = function (e, t, r, i, s, a) {
- return (
- bmPow(1 - e, 3) * t[a] +
- 3 * bmPow(1 - e, 2) * e * r[a] +
- 3 * (1 - e) * bmPow(e, 2) * i[a] +
- bmPow(e, 3) * s[a]
- );
- }),
- (HShapeElement.prototype.calculateBoundingBox = function (e, t) {
- var r,
- i = e.length;
- for (r = 0; r < i; r += 1)
- e[r] && e[r].sh
- ? this.calculateShapeBoundingBox(e[r], t)
- : e[r] && e[r].it
- ? this.calculateBoundingBox(e[r].it, t)
- : e[r] &&
- e[r].style &&
- e[r].w &&
- this.expandStrokeBoundingBox(e[r].w, t);
- }),
- (HShapeElement.prototype.expandStrokeBoundingBox = function (e, t) {
- var r = 0;
- if (e.keyframes) {
- for (var i = 0; i < e.keyframes.length; i += 1) {
- var s = e.keyframes[i].s;
- s > r && (r = s);
- }
- r *= e.mult;
- } else r = e.v * e.mult;
- (t.x -= r), (t.xMax += r), (t.y -= r), (t.yMax += r);
- }),
- (HShapeElement.prototype.currentBoxContains = function (e) {
- return (
- this.currentBBox.x <= e.x &&
- this.currentBBox.y <= e.y &&
- this.currentBBox.width + this.currentBBox.x >= e.x + e.width &&
- this.currentBBox.height + this.currentBBox.y >= e.y + e.height
- );
- }),
- (HShapeElement.prototype.renderInnerContent = function () {
- if (
- (this._renderShapeFrame(),
- !this.hidden && (this._isFirstFrame || this._mdf))
- ) {
- var e = this.tempBoundingBox,
- t = 999999;
- if (
- ((e.x = t),
- (e.xMax = -t),
- (e.y = t),
- (e.yMax = -t),
- this.calculateBoundingBox(this.itemsData, e),
- (e.width = e.xMax < e.x ? 0 : e.xMax - e.x),
- (e.height = e.yMax < e.y ? 0 : e.yMax - e.y),
- this.currentBoxContains(e))
- )
- return;
- var r = !1;
- if (
- (this.currentBBox.w !== e.width &&
- ((this.currentBBox.w = e.width),
- this.shapeCont.setAttribute('width', e.width),
- (r = !0)),
- this.currentBBox.h !== e.height &&
- ((this.currentBBox.h = e.height),
- this.shapeCont.setAttribute('height', e.height),
- (r = !0)),
- r || this.currentBBox.x !== e.x || this.currentBBox.y !== e.y)
- ) {
- (this.currentBBox.w = e.width),
- (this.currentBBox.h = e.height),
- (this.currentBBox.x = e.x),
- (this.currentBBox.y = e.y),
- this.shapeCont.setAttribute(
- 'viewBox',
- this.currentBBox.x +
- ' ' +
- this.currentBBox.y +
- ' ' +
- this.currentBBox.w +
- ' ' +
- this.currentBBox.h
- );
- var i = this.shapeCont.style,
- s =
- 'translate(' +
- this.currentBBox.x +
- 'px,' +
- this.currentBBox.y +
- 'px)';
- (i.transform = s), (i.webkitTransform = s);
- }
- }
- });
- function HTextElement(e, t, r) {
- (this.textSpans = []),
- (this.textPaths = []),
- (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }),
- (this.renderType = 'svg'),
- (this.isMasked = !1),
- this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- HBaseElement,
- HierarchyElement,
- FrameElement,
- RenderableDOMElement,
- ITextElement
- ],
- HTextElement
- ),
- (HTextElement.prototype.createContent = function () {
- if (((this.isMasked = this.checkMasks()), this.isMasked)) {
- (this.renderType = 'svg'),
- (this.compW = this.comp.data.w),
- (this.compH = this.comp.data.h),
- this.svgElement.setAttribute('width', this.compW),
- this.svgElement.setAttribute('height', this.compH);
- var e = createNS('g');
- this.maskedElement.appendChild(e), (this.innerElem = e);
- } else
- (this.renderType = 'html'), (this.innerElem = this.layerElement);
- this.checkParenting();
- }),
- (HTextElement.prototype.buildNewText = function () {
- var e = this.textProperty.currentData;
- this.renderedLetters = createSizedArray(e.l ? e.l.length : 0);
- var t = this.innerElem.style,
- r = e.fc ? this.buildColor(e.fc) : 'rgba(0,0,0,0)';
- (t.fill = r),
- (t.color = r),
- e.sc &&
- ((t.stroke = this.buildColor(e.sc)),
- (t.strokeWidth = e.sw + 'px'));
- var i = this.globalData.fontManager.getFontByName(e.f);
- if (!this.globalData.fontManager.chars)
- if (
- ((t.fontSize = e.finalSize + 'px'),
- (t.lineHeight = e.finalSize + 'px'),
- i.fClass)
- )
- this.innerElem.className = i.fClass;
- else {
- t.fontFamily = i.fFamily;
- var s = e.fWeight,
- a = e.fStyle;
- (t.fontStyle = a), (t.fontWeight = s);
- }
- var o,
- n,
- l = e.l;
- n = l.length;
- var f,
- g,
- S,
- c = this.mHelper,
- P,
- d = '',
- p = 0;
- for (o = 0; o < n; o += 1) {
- if (
- (this.globalData.fontManager.chars
- ? (this.textPaths[p]
- ? (f = this.textPaths[p])
- : ((f = createNS('path')),
- f.setAttribute('stroke-linecap', lineCapEnum[1]),
- f.setAttribute('stroke-linejoin', lineJoinEnum[2]),
- f.setAttribute('stroke-miterlimit', '4')),
- this.isMasked ||
- (this.textSpans[p]
- ? ((g = this.textSpans[p]), (S = g.children[0]))
- : ((g = createTag('div')),
- (g.style.lineHeight = 0),
- (S = createNS('svg')),
- S.appendChild(f),
- styleDiv(g))))
- : this.isMasked
- ? (f = this.textPaths[p] ? this.textPaths[p] : createNS('text'))
- : this.textSpans[p]
- ? ((g = this.textSpans[p]), (f = this.textPaths[p]))
- : ((g = createTag('span')),
- styleDiv(g),
- (f = createTag('span')),
- styleDiv(f),
- g.appendChild(f)),
- this.globalData.fontManager.chars)
- ) {
- var x = this.globalData.fontManager.getCharData(
- e.finalText[o],
- i.fStyle,
- this.globalData.fontManager.getFontByName(e.f).fFamily
- ),
- u;
- if (
- (x ? (u = x.data) : (u = null),
- c.reset(),
- u &&
- u.shapes &&
- u.shapes.length &&
- ((P = u.shapes[0].it),
- c.scale(e.finalSize / 100, e.finalSize / 100),
- (d = this.createPathShape(c, P)),
- f.setAttribute('d', d)),
- this.isMasked)
- )
- this.innerElem.appendChild(f);
- else {
- if ((this.innerElem.appendChild(g), u && u.shapes)) {
- document.body.appendChild(S);
- var y = S.getBBox();
- S.setAttribute('width', y.width + 2),
- S.setAttribute('height', y.height + 2),
- S.setAttribute(
- 'viewBox',
- y.x -
- 1 +
- ' ' +
- (y.y - 1) +
- ' ' +
- (y.width + 2) +
- ' ' +
- (y.height + 2)
- );
- var m = S.style,
- A = 'translate(' + (y.x - 1) + 'px,' + (y.y - 1) + 'px)';
- (m.transform = A),
- (m.webkitTransform = A),
- (l[o].yOffset = y.y - 1);
- } else S.setAttribute('width', 1), S.setAttribute('height', 1);
- g.appendChild(S);
- }
- } else if (
- ((f.textContent = l[o].val),
- f.setAttributeNS(
- 'http://www.w3.org/XML/1998/namespace',
- 'xml:space',
- 'preserve'
- ),
- this.isMasked)
- )
- this.innerElem.appendChild(f);
- else {
- this.innerElem.appendChild(g);
- var T = f.style,
- E = 'translate3d(0,' + -e.finalSize / 1.2 + 'px,0)';
- (T.transform = E), (T.webkitTransform = E);
- }
- this.isMasked ? (this.textSpans[p] = f) : (this.textSpans[p] = g),
- (this.textSpans[p].style.display = 'block'),
- (this.textPaths[p] = f),
- (p += 1);
- }
- for (; p < this.textSpans.length; )
- (this.textSpans[p].style.display = 'none'), (p += 1);
- }),
- (HTextElement.prototype.renderInnerContent = function () {
- this.validateText();
- var e;
- if (this.data.singleShape) {
- if (!this._isFirstFrame && !this.lettersChangedFlag) return;
- if (this.isMasked && this.finalTransform._matMdf) {
- this.svgElement.setAttribute(
- 'viewBox',
- -this.finalTransform.mProp.p.v[0] +
- ' ' +
- -this.finalTransform.mProp.p.v[1] +
- ' ' +
- this.compW +
- ' ' +
- this.compH
- ),
- (e = this.svgElement.style);
- var t =
- 'translate(' +
- -this.finalTransform.mProp.p.v[0] +
- 'px,' +
- -this.finalTransform.mProp.p.v[1] +
- 'px)';
- (e.transform = t), (e.webkitTransform = t);
- }
- }
- if (
- (this.textAnimator.getMeasures(
- this.textProperty.currentData,
- this.lettersChangedFlag
- ),
- !(
- !this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag
- ))
- ) {
- var r,
- i,
- s = 0,
- a = this.textAnimator.renderedLetters,
- o = this.textProperty.currentData.l;
- i = o.length;
- var n, l, f;
- for (r = 0; r < i; r += 1)
- o[r].n
- ? (s += 1)
- : ((l = this.textSpans[r]),
- (f = this.textPaths[r]),
- (n = a[s]),
- (s += 1),
- n._mdf.m &&
- (this.isMasked
- ? l.setAttribute('transform', n.m)
- : ((l.style.webkitTransform = n.m),
- (l.style.transform = n.m))),
- (l.style.opacity = n.o),
- n.sw && n._mdf.sw && f.setAttribute('stroke-width', n.sw),
- n.sc && n._mdf.sc && f.setAttribute('stroke', n.sc),
- n.fc &&
- n._mdf.fc &&
- (f.setAttribute('fill', n.fc), (f.style.color = n.fc)));
- if (
- this.innerElem.getBBox &&
- !this.hidden &&
- (this._isFirstFrame || this._mdf)
- ) {
- var g = this.innerElem.getBBox();
- this.currentBBox.w !== g.width &&
- ((this.currentBBox.w = g.width),
- this.svgElement.setAttribute('width', g.width)),
- this.currentBBox.h !== g.height &&
- ((this.currentBBox.h = g.height),
- this.svgElement.setAttribute('height', g.height));
- var S = 1;
- if (
- this.currentBBox.w !== g.width + S * 2 ||
- this.currentBBox.h !== g.height + S * 2 ||
- this.currentBBox.x !== g.x - S ||
- this.currentBBox.y !== g.y - S
- ) {
- (this.currentBBox.w = g.width + S * 2),
- (this.currentBBox.h = g.height + S * 2),
- (this.currentBBox.x = g.x - S),
- (this.currentBBox.y = g.y - S),
- this.svgElement.setAttribute(
- 'viewBox',
- this.currentBBox.x +
- ' ' +
- this.currentBBox.y +
- ' ' +
- this.currentBBox.w +
- ' ' +
- this.currentBBox.h
- ),
- (e = this.svgElement.style);
- var c =
- 'translate(' +
- this.currentBBox.x +
- 'px,' +
- this.currentBBox.y +
- 'px)';
- (e.transform = c), (e.webkitTransform = c);
- }
- }
- }
- });
- function HCameraElement(e, t, r) {
- this.initFrame(), this.initBaseData(e, t, r), this.initHierarchy();
- var i = PropertyFactory.getProp;
- if (
- ((this.pe = i(this, e.pe, 0, 0, this)),
- e.ks.p.s
- ? ((this.px = i(this, e.ks.p.x, 1, 0, this)),
- (this.py = i(this, e.ks.p.y, 1, 0, this)),
- (this.pz = i(this, e.ks.p.z, 1, 0, this)))
- : (this.p = i(this, e.ks.p, 1, 0, this)),
- e.ks.a && (this.a = i(this, e.ks.a, 1, 0, this)),
- e.ks.or.k.length && e.ks.or.k[0].to)
- ) {
- var s,
- a = e.ks.or.k.length;
- for (s = 0; s < a; s += 1)
- (e.ks.or.k[s].to = null), (e.ks.or.k[s].ti = null);
- }
- (this.or = i(this, e.ks.or, 1, degToRads, this)),
- (this.or.sh = !0),
- (this.rx = i(this, e.ks.rx, 0, degToRads, this)),
- (this.ry = i(this, e.ks.ry, 0, degToRads, this)),
- (this.rz = i(this, e.ks.rz, 0, degToRads, this)),
- (this.mat = new Matrix()),
- (this._prevMat = new Matrix()),
- (this._isFirstFrame = !0),
- (this.finalTransform = { mProp: this });
- }
- extendPrototype(
- [BaseElement, FrameElement, HierarchyElement],
- HCameraElement
- ),
- (HCameraElement.prototype.setup = function () {
- var e,
- t = this.comp.threeDElements.length,
- r,
- i,
- s;
- for (e = 0; e < t; e += 1)
- if (((r = this.comp.threeDElements[e]), r.type === '3d')) {
- (i = r.perspectiveElem.style), (s = r.container.style);
- var a = this.pe.v + 'px',
- o = '0px 0px 0px',
- n = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
- (i.perspective = a),
- (i.webkitPerspective = a),
- (s.transformOrigin = o),
- (s.mozTransformOrigin = o),
- (s.webkitTransformOrigin = o),
- (i.transform = n),
- (i.webkitTransform = n);
- }
- }),
- (HCameraElement.prototype.createElements = function () {}),
- (HCameraElement.prototype.hide = function () {}),
- (HCameraElement.prototype.renderFrame = function () {
- var e = this._isFirstFrame,
- t,
- r;
- if (this.hierarchy)
- for (r = this.hierarchy.length, t = 0; t < r; t += 1)
- e = this.hierarchy[t].finalTransform.mProp._mdf || e;
- if (
- e ||
- this.pe._mdf ||
- (this.p && this.p._mdf) ||
- (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) ||
- this.rx._mdf ||
- this.ry._mdf ||
- this.rz._mdf ||
- this.or._mdf ||
- (this.a && this.a._mdf)
- ) {
- if ((this.mat.reset(), this.hierarchy))
- for (r = this.hierarchy.length - 1, t = r; t >= 0; t -= 1) {
- var i = this.hierarchy[t].finalTransform.mProp;
- this.mat.translate(-i.p.v[0], -i.p.v[1], i.p.v[2]),
- this.mat
- .rotateX(-i.or.v[0])
- .rotateY(-i.or.v[1])
- .rotateZ(i.or.v[2]),
- this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),
- this.mat.scale(1 / i.s.v[0], 1 / i.s.v[1], 1 / i.s.v[2]),
- this.mat.translate(i.a.v[0], i.a.v[1], i.a.v[2]);
- }
- if (
- (this.p
- ? this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2])
- : this.mat.translate(-this.px.v, -this.py.v, this.pz.v),
- this.a)
- ) {
- var s;
- this.p
- ? (s = [
- this.p.v[0] - this.a.v[0],
- this.p.v[1] - this.a.v[1],
- this.p.v[2] - this.a.v[2]
- ])
- : (s = [
- this.px.v - this.a.v[0],
- this.py.v - this.a.v[1],
- this.pz.v - this.a.v[2]
- ]);
- var a = Math.sqrt(
- Math.pow(s[0], 2) + Math.pow(s[1], 2) + Math.pow(s[2], 2)
- ),
- o = [s[0] / a, s[1] / a, s[2] / a],
- n = Math.sqrt(o[2] * o[2] + o[0] * o[0]),
- l = Math.atan2(o[1], n),
- f = Math.atan2(o[0], -o[2]);
- this.mat.rotateY(f).rotateX(-l);
- }
- this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),
- this.mat
- .rotateX(-this.or.v[0])
- .rotateY(-this.or.v[1])
- .rotateZ(this.or.v[2]),
- this.mat.translate(
- this.globalData.compSize.w / 2,
- this.globalData.compSize.h / 2,
- 0
- ),
- this.mat.translate(0, 0, this.pe.v);
- var g = !this._prevMat.equals(this.mat);
- if ((g || this.pe._mdf) && this.comp.threeDElements) {
- r = this.comp.threeDElements.length;
- var S, c, P;
- for (t = 0; t < r; t += 1)
- if (((S = this.comp.threeDElements[t]), S.type === '3d')) {
- if (g) {
- var d = this.mat.toCSS();
- (P = S.container.style),
- (P.transform = d),
- (P.webkitTransform = d);
- }
- this.pe._mdf &&
- ((c = S.perspectiveElem.style),
- (c.perspective = this.pe.v + 'px'),
- (c.webkitPerspective = this.pe.v + 'px'));
- }
- this.mat.clone(this._prevMat);
- }
- }
- this._isFirstFrame = !1;
- }),
- (HCameraElement.prototype.prepareFrame = function (e) {
- this.prepareProperties(e, !0);
- }),
- (HCameraElement.prototype.destroy = function () {}),
- (HCameraElement.prototype.getBaseElement = function () {
- return null;
- });
- function HImageElement(e, t, r) {
- (this.assetData = t.getAssetData(e.refId)), this.initElement(e, t, r);
- }
- extendPrototype(
- [
- BaseElement,
- TransformElement,
- HBaseElement,
- HSolidElement,
- HierarchyElement,
- FrameElement,
- RenderableElement
- ],
- HImageElement
- ),
- (HImageElement.prototype.createContent = function () {
- var e = this.globalData.getAssetsPath(this.assetData),
- t = new Image();
- this.data.hasMask
- ? ((this.imageElem = createNS('image')),
- this.imageElem.setAttribute('width', this.assetData.w + 'px'),
- this.imageElem.setAttribute('height', this.assetData.h + 'px'),
- this.imageElem.setAttributeNS(
- 'http://www.w3.org/1999/xlink',
- 'href',
- e
- ),
- this.layerElement.appendChild(this.imageElem),
- this.baseElement.setAttribute('width', this.assetData.w),
- this.baseElement.setAttribute('height', this.assetData.h))
- : this.layerElement.appendChild(t),
- (t.crossOrigin = 'anonymous'),
- (t.src = e),
- this.data.ln && this.baseElement.setAttribute('id', this.data.ln);
- });
- function HybridRendererBase(e, t) {
- (this.animationItem = e),
- (this.layers = null),
- (this.renderedFrame = -1),
- (this.renderConfig = {
- className: (t && t.className) || '',
- imagePreserveAspectRatio:
- (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
- hideOnTransparent: !(t && t.hideOnTransparent === !1),
- filterSize: {
- width: (t && t.filterSize && t.filterSize.width) || '400%',
- height: (t && t.filterSize && t.filterSize.height) || '400%',
- x: (t && t.filterSize && t.filterSize.x) || '-100%',
- y: (t && t.filterSize && t.filterSize.y) || '-100%'
- }
- }),
- (this.globalData = {
- _mdf: !1,
- frameNum: -1,
- renderConfig: this.renderConfig
- }),
- (this.pendingElements = []),
- (this.elements = []),
- (this.threeDElements = []),
- (this.destroyed = !1),
- (this.camera = null),
- (this.supports3d = !0),
- (this.rendererType = 'html');
- }
- extendPrototype([BaseRenderer], HybridRendererBase),
- (HybridRendererBase.prototype.buildItem =
- SVGRenderer.prototype.buildItem),
- (HybridRendererBase.prototype.checkPendingElements = function () {
- for (; this.pendingElements.length; ) {
- var e = this.pendingElements.pop();
- e.checkParenting();
- }
- }),
- (HybridRendererBase.prototype.appendElementInPos = function (e, t) {
- var r = e.getBaseElement();
- if (r) {
- var i = this.layers[t];
- if (!i.ddd || !this.supports3d)
- if (this.threeDElements) this.addTo3dContainer(r, t);
- else {
- for (var s = 0, a, o, n; s < t; )
- this.elements[s] &&
- this.elements[s] !== !0 &&
- this.elements[s].getBaseElement &&
- ((o = this.elements[s]),
- (n = this.layers[s].ddd
- ? this.getThreeDContainerByPos(s)
- : o.getBaseElement()),
- (a = n || a)),
- (s += 1);
- a
- ? (!i.ddd || !this.supports3d) &&
- this.layerElement.insertBefore(r, a)
- : (!i.ddd || !this.supports3d) &&
- this.layerElement.appendChild(r);
- }
- else this.addTo3dContainer(r, t);
- }
- }),
- (HybridRendererBase.prototype.createShape = function (e) {
- return this.supports3d
- ? new HShapeElement(e, this.globalData, this)
- : new SVGShapeElement(e, this.globalData, this);
- }),
- (HybridRendererBase.prototype.createText = function (e) {
- return this.supports3d
- ? new HTextElement(e, this.globalData, this)
- : new SVGTextLottieElement(e, this.globalData, this);
- }),
- (HybridRendererBase.prototype.createCamera = function (e) {
- return (
- (this.camera = new HCameraElement(e, this.globalData, this)),
- this.camera
- );
- }),
- (HybridRendererBase.prototype.createImage = function (e) {
- return this.supports3d
- ? new HImageElement(e, this.globalData, this)
- : new IImageElement(e, this.globalData, this);
- }),
- (HybridRendererBase.prototype.createSolid = function (e) {
- return this.supports3d
- ? new HSolidElement(e, this.globalData, this)
- : new ISolidElement(e, this.globalData, this);
- }),
- (HybridRendererBase.prototype.createNull =
- SVGRenderer.prototype.createNull),
- (HybridRendererBase.prototype.getThreeDContainerByPos = function (e) {
- for (var t = 0, r = this.threeDElements.length; t < r; ) {
- if (
- this.threeDElements[t].startPos <= e &&
- this.threeDElements[t].endPos >= e
- )
- return this.threeDElements[t].perspectiveElem;
- t += 1;
- }
- return null;
- }),
- (HybridRendererBase.prototype.createThreeDContainer = function (e, t) {
- var r = createTag('div'),
- i,
- s;
- styleDiv(r);
- var a = createTag('div');
- if ((styleDiv(a), t === '3d')) {
- (i = r.style),
- (i.width = this.globalData.compSize.w + 'px'),
- (i.height = this.globalData.compSize.h + 'px');
- var o = '50% 50%';
- (i.webkitTransformOrigin = o),
- (i.mozTransformOrigin = o),
- (i.transformOrigin = o),
- (s = a.style);
- var n = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
- (s.transform = n), (s.webkitTransform = n);
- }
- r.appendChild(a);
- var l = {
- container: a,
- perspectiveElem: r,
- startPos: e,
- endPos: e,
- type: t
- };
- return this.threeDElements.push(l), l;
- }),
- (HybridRendererBase.prototype.build3dContainers = function () {
- var e,
- t = this.layers.length,
- r,
- i = '';
- for (e = 0; e < t; e += 1)
- this.layers[e].ddd && this.layers[e].ty !== 3
- ? (i !== '3d' &&
- ((i = '3d'), (r = this.createThreeDContainer(e, '3d'))),
- (r.endPos = Math.max(r.endPos, e)))
- : (i !== '2d' &&
- ((i = '2d'), (r = this.createThreeDContainer(e, '2d'))),
- (r.endPos = Math.max(r.endPos, e)));
- for (t = this.threeDElements.length, e = t - 1; e >= 0; e -= 1)
- this.resizerElem.appendChild(
- this.threeDElements[e].perspectiveElem
- );
- }),
- (HybridRendererBase.prototype.addTo3dContainer = function (e, t) {
- for (var r = 0, i = this.threeDElements.length; r < i; ) {
- if (t <= this.threeDElements[r].endPos) {
- for (var s = this.threeDElements[r].startPos, a; s < t; )
- this.elements[s] &&
- this.elements[s].getBaseElement &&
- (a = this.elements[s].getBaseElement()),
- (s += 1);
- a
- ? this.threeDElements[r].container.insertBefore(e, a)
- : this.threeDElements[r].container.appendChild(e);
- break;
- }
- r += 1;
- }
- }),
- (HybridRendererBase.prototype.configAnimation = function (e) {
- var t = createTag('div'),
- r = this.animationItem.wrapper,
- i = t.style;
- (i.width = e.w + 'px'),
- (i.height = e.h + 'px'),
- (this.resizerElem = t),
- styleDiv(t),
- (i.transformStyle = 'flat'),
- (i.mozTransformStyle = 'flat'),
- (i.webkitTransformStyle = 'flat'),
- this.renderConfig.className &&
- t.setAttribute('class', this.renderConfig.className),
- r.appendChild(t),
- (i.overflow = 'hidden');
- var s = createNS('svg');
- s.setAttribute('width', '1'),
- s.setAttribute('height', '1'),
- styleDiv(s),
- this.resizerElem.appendChild(s);
- var a = createNS('defs');
- s.appendChild(a),
- (this.data = e),
- this.setupGlobalData(e, s),
- (this.globalData.defs = a),
- (this.layers = e.layers),
- (this.layerElement = this.resizerElem),
- this.build3dContainers(),
- this.updateContainerSize();
- }),
- (HybridRendererBase.prototype.destroy = function () {
- this.animationItem.wrapper &&
- (this.animationItem.wrapper.innerText = ''),
- (this.animationItem.container = null),
- (this.globalData.defs = null);
- var e,
- t = this.layers ? this.layers.length : 0;
- for (e = 0; e < t; e += 1)
- this.elements[e] &&
- this.elements[e].destroy &&
- this.elements[e].destroy();
- (this.elements.length = 0),
- (this.destroyed = !0),
- (this.animationItem = null);
- }),
- (HybridRendererBase.prototype.updateContainerSize = function () {
- var e = this.animationItem.wrapper.offsetWidth,
- t = this.animationItem.wrapper.offsetHeight,
- r = e / t,
- i = this.globalData.compSize.w / this.globalData.compSize.h,
- s,
- a,
- o,
- n;
- i > r
- ? ((s = e / this.globalData.compSize.w),
- (a = e / this.globalData.compSize.w),
- (o = 0),
- (n =
- (t -
- this.globalData.compSize.h *
- (e / this.globalData.compSize.w)) /
- 2))
- : ((s = t / this.globalData.compSize.h),
- (a = t / this.globalData.compSize.h),
- (o =
- (e -
- this.globalData.compSize.w *
- (t / this.globalData.compSize.h)) /
- 2),
- (n = 0));
- var l = this.resizerElem.style;
- (l.webkitTransform =
- 'matrix3d(' +
- s +
- ',0,0,0,0,' +
- a +
- ',0,0,0,0,1,0,' +
- o +
- ',' +
- n +
- ',0,1)'),
- (l.transform = l.webkitTransform);
- }),
- (HybridRendererBase.prototype.renderFrame =
- SVGRenderer.prototype.renderFrame),
- (HybridRendererBase.prototype.hide = function () {
- this.resizerElem.style.display = 'none';
- }),
- (HybridRendererBase.prototype.show = function () {
- this.resizerElem.style.display = 'block';
- }),
- (HybridRendererBase.prototype.initItems = function () {
- if ((this.buildAllItems(), this.camera)) this.camera.setup();
- else {
- var e = this.globalData.compSize.w,
- t = this.globalData.compSize.h,
- r,
- i = this.threeDElements.length;
- for (r = 0; r < i; r += 1) {
- var s = this.threeDElements[r].perspectiveElem.style;
- (s.webkitPerspective =
- Math.sqrt(Math.pow(e, 2) + Math.pow(t, 2)) + 'px'),
- (s.perspective = s.webkitPerspective);
- }
- }
- }),
- (HybridRendererBase.prototype.searchExtraCompositions = function (e) {
- var t,
- r = e.length,
- i = createTag('div');
- for (t = 0; t < r; t += 1)
- if (e[t].xt) {
- var s = this.createComp(e[t], i, this.globalData.comp, null);
- s.initExpressions(),
- this.globalData.projectInterface.registerComposition(s);
- }
- });
- function HCompElement(e, t, r) {
- (this.layers = e.layers),
- (this.supports3d = !e.hasMask),
- (this.completeLayers = !1),
- (this.pendingElements = []),
- (this.elements = this.layers
- ? createSizedArray(this.layers.length)
- : []),
- this.initElement(e, t, r),
- (this.tm = e.tm
- ? PropertyFactory.getProp(this, e.tm, 0, t.frameRate, this)
- : { _placeholder: !0 });
- }
- extendPrototype(
- [HybridRendererBase, ICompElement, HBaseElement],
- HCompElement
- ),
- (HCompElement.prototype._createBaseContainerElements =
- HCompElement.prototype.createContainerElements),
- (HCompElement.prototype.createContainerElements = function () {
- this._createBaseContainerElements(),
- this.data.hasMask
- ? (this.svgElement.setAttribute('width', this.data.w),
- this.svgElement.setAttribute('height', this.data.h),
- (this.transformedElement = this.baseElement))
- : (this.transformedElement = this.layerElement);
- }),
- (HCompElement.prototype.addTo3dContainer = function (e, t) {
- for (var r = 0, i; r < t; )
- this.elements[r] &&
- this.elements[r].getBaseElement &&
- (i = this.elements[r].getBaseElement()),
- (r += 1);
- i
- ? this.layerElement.insertBefore(e, i)
- : this.layerElement.appendChild(e);
- }),
- (HCompElement.prototype.createComp = function (e) {
- return this.supports3d
- ? new HCompElement(e, this.globalData, this)
- : new SVGCompElement(e, this.globalData, this);
- });
- function HybridRenderer(e, t) {
- (this.animationItem = e),
- (this.layers = null),
- (this.renderedFrame = -1),
- (this.renderConfig = {
- className: (t && t.className) || '',
- imagePreserveAspectRatio:
- (t && t.imagePreserveAspectRatio) || 'xMidYMid slice',
- hideOnTransparent: !(t && t.hideOnTransparent === !1),
- filterSize: {
- width: (t && t.filterSize && t.filterSize.width) || '400%',
- height: (t && t.filterSize && t.filterSize.height) || '400%',
- x: (t && t.filterSize && t.filterSize.x) || '-100%',
- y: (t && t.filterSize && t.filterSize.y) || '-100%'
- },
- runExpressions:
- !t || t.runExpressions === void 0 || t.runExpressions
- }),
- (this.globalData = {
- _mdf: !1,
- frameNum: -1,
- renderConfig: this.renderConfig
- }),
- (this.pendingElements = []),
- (this.elements = []),
- (this.threeDElements = []),
- (this.destroyed = !1),
- (this.camera = null),
- (this.supports3d = !0),
- (this.rendererType = 'html');
- }
- extendPrototype([HybridRendererBase], HybridRenderer),
- (HybridRenderer.prototype.createComp = function (e) {
- return this.supports3d
- ? new HCompElement(e, this.globalData, this)
- : new SVGCompElement(e, this.globalData, this);
- });
- var CompExpressionInterface = (function () {
- return function (e) {
- function t(r) {
- for (var i = 0, s = e.layers.length; i < s; ) {
- if (e.layers[i].nm === r || e.layers[i].ind === r)
- return e.elements[i].layerInterface;
- i += 1;
- }
- return null;
- }
- return (
- Object.defineProperty(t, '_name', { value: e.data.nm }),
- (t.layer = t),
- (t.pixelAspect = 1),
- (t.height = e.data.h || e.globalData.compSize.h),
- (t.width = e.data.w || e.globalData.compSize.w),
- (t.pixelAspect = 1),
- (t.frameDuration = 1 / e.globalData.frameRate),
- (t.displayStartTime = 0),
- (t.numLayers = e.layers.length),
- t
- );
- };
- })();
- function _typeof$2(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof$2 = function (r) {
- return typeof r;
- })
- : (_typeof$2 = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof$2(e)
- );
- }
- function seedRandom(e, t) {
- var r = this,
- i = 256,
- s = 6,
- a = 52,
- o = 'random',
- n = t.pow(i, s),
- l = t.pow(2, a),
- f = l * 2,
- g = i - 1,
- S;
- function c(m, A, T) {
- var E = [];
- A = A === !0 ? { entropy: !0 } : A || {};
- var _ = x(p(A.entropy ? [m, y(e)] : m === null ? u() : m, 3), E),
- I = new P(E),
- B = function () {
- for (var G = I.g(s), R = n, W = 0; G < l; )
- (G = (G + W) * i), (R *= i), (W = I.g(1));
- for (; G >= f; ) (G /= 2), (R /= 2), (W >>>= 1);
- return (G + W) / R;
- };
- return (
- (B.int32 = function () {
- return I.g(4) | 0;
- }),
- (B.quick = function () {
- return I.g(4) / 4294967296;
- }),
- (B.double = B),
- x(y(I.S), e),
- (
- A.pass ||
- T ||
- function (z, G, R, W) {
- return (
- W &&
- (W.S && d(W, I),
- (z.state = function () {
- return d(I, {});
- })),
- R ? ((t[o] = z), G) : z
- );
- }
- )(B, _, 'global' in A ? A.global : this == t, A.state)
- );
- }
- t['seed' + o] = c;
- function P(m) {
- var A,
- T = m.length,
- E = this,
- _ = 0,
- I = (E.i = E.j = 0),
- B = (E.S = []);
- for (T || (m = [T++]); _ < i; ) B[_] = _++;
- for (_ = 0; _ < i; _++)
- (B[_] = B[(I = g & (I + m[_ % T] + (A = B[_])))]), (B[I] = A);
- E.g = function (z) {
- for (var G, R = 0, W = E.i, H = E.j, N = E.S; z--; )
- (G = N[(W = g & (W + 1))]),
- (R =
- R * i + N[g & ((N[W] = N[(H = g & (H + G))]) + (N[H] = G))]);
- return (E.i = W), (E.j = H), R;
- };
- }
- function d(m, A) {
- return (A.i = m.i), (A.j = m.j), (A.S = m.S.slice()), A;
- }
- function p(m, A) {
- var T = [],
- E = _typeof$2(m),
- _;
- if (A && E == 'object')
- for (_ in m)
- try {
- T.push(p(m[_], A - 1));
- } catch (I) {}
- return T.length ? T : E == 'string' ? m : m + '\0';
- }
- function x(m, A) {
- for (var T = m + '', E, _ = 0; _ < T.length; )
- A[g & _] = g & ((E ^= A[g & _] * 19) + T.charCodeAt(_++));
- return y(A);
- }
- function u() {
- try {
- var m = new Uint8Array(i);
- return (r.crypto || r.msCrypto).getRandomValues(m), y(m);
- } catch (E) {
- var A = r.navigator,
- T = A && A.plugins;
- return [+new Date(), r, T, r.screen, y(e)];
- }
- }
- function y(m) {
- return String.fromCharCode.apply(0, m);
- }
- x(t.random(), e);
- }
- function initialize$2(e) {
- seedRandom([], e);
- }
- var propTypes = { SHAPE: 'shape' };
- function _typeof$1(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof$1 = function (r) {
- return typeof r;
- })
- : (_typeof$1 = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof$1(e)
- );
- }
- var ExpressionManager = (function () {
- var ob = {},
- Math = BMMath,
- window = null,
- document = null,
- XMLHttpRequest = null,
- fetch = null,
- frames = null,
- _lottieGlobal = {};
- initialize$2(BMMath);
- function resetFrame() {
- _lottieGlobal = {};
- }
- function $bm_isInstanceOfArray(e) {
- return e.constructor === Array || e.constructor === Float32Array;
- }
- function isNumerable(e, t) {
- return (
- e === 'number' ||
- t instanceof Number ||
- e === 'boolean' ||
- e === 'string'
- );
- }
- function $bm_neg(e) {
- var t = _typeof$1(e);
- if (t === 'number' || e instanceof Number || t === 'boolean')
- return -e;
- if ($bm_isInstanceOfArray(e)) {
- var r,
- i = e.length,
- s = [];
- for (r = 0; r < i; r += 1) s[r] = -e[r];
- return s;
- }
- return e.propType ? e.v : -e;
- }
- var easeInBez = BezierFactory.getBezierEasing(
- 0.333,
- 0,
- 0.833,
- 0.833,
- 'easeIn'
- ).get,
- easeOutBez = BezierFactory.getBezierEasing(
- 0.167,
- 0.167,
- 0.667,
- 1,
- 'easeOut'
- ).get,
- easeInOutBez = BezierFactory.getBezierEasing(
- 0.33,
- 0,
- 0.667,
- 1,
- 'easeInOut'
- ).get;
- function sum(e, t) {
- var r = _typeof$1(e),
- i = _typeof$1(t);
- if (
- (isNumerable(r, e) && isNumerable(i, t)) ||
- r === 'string' ||
- i === 'string'
- )
- return e + t;
- if ($bm_isInstanceOfArray(e) && isNumerable(i, t))
- return (e = e.slice(0)), (e[0] += t), e;
- if (isNumerable(r, e) && $bm_isInstanceOfArray(t))
- return (t = t.slice(0)), (t[0] = e + t[0]), t;
- if ($bm_isInstanceOfArray(e) && $bm_isInstanceOfArray(t)) {
- for (
- var s = 0, a = e.length, o = t.length, n = [];
- s < a || s < o;
- )
- (typeof e[s] == 'number' || e[s] instanceof Number) &&
- (typeof t[s] == 'number' || t[s] instanceof Number)
- ? (n[s] = e[s] + t[s])
- : (n[s] = t[s] === void 0 ? e[s] : e[s] || t[s]),
- (s += 1);
- return n;
- }
- return 0;
- }
- var add = sum;
- function sub(e, t) {
- var r = _typeof$1(e),
- i = _typeof$1(t);
- if (isNumerable(r, e) && isNumerable(i, t))
- return (
- r === 'string' && (e = parseInt(e, 10)),
- i === 'string' && (t = parseInt(t, 10)),
- e - t
- );
- if ($bm_isInstanceOfArray(e) && isNumerable(i, t))
- return (e = e.slice(0)), (e[0] -= t), e;
- if (isNumerable(r, e) && $bm_isInstanceOfArray(t))
- return (t = t.slice(0)), (t[0] = e - t[0]), t;
- if ($bm_isInstanceOfArray(e) && $bm_isInstanceOfArray(t)) {
- for (
- var s = 0, a = e.length, o = t.length, n = [];
- s < a || s < o;
- )
- (typeof e[s] == 'number' || e[s] instanceof Number) &&
- (typeof t[s] == 'number' || t[s] instanceof Number)
- ? (n[s] = e[s] - t[s])
- : (n[s] = t[s] === void 0 ? e[s] : e[s] || t[s]),
- (s += 1);
- return n;
- }
- return 0;
- }
- function mul(e, t) {
- var r = _typeof$1(e),
- i = _typeof$1(t),
- s;
- if (isNumerable(r, e) && isNumerable(i, t)) return e * t;
- var a, o;
- if ($bm_isInstanceOfArray(e) && isNumerable(i, t)) {
- for (
- o = e.length, s = createTypedArray('float32', o), a = 0;
- a < o;
- a += 1
- )
- s[a] = e[a] * t;
- return s;
- }
- if (isNumerable(r, e) && $bm_isInstanceOfArray(t)) {
- for (
- o = t.length, s = createTypedArray('float32', o), a = 0;
- a < o;
- a += 1
- )
- s[a] = e * t[a];
- return s;
- }
- return 0;
- }
- function div(e, t) {
- var r = _typeof$1(e),
- i = _typeof$1(t),
- s;
- if (isNumerable(r, e) && isNumerable(i, t)) return e / t;
- var a, o;
- if ($bm_isInstanceOfArray(e) && isNumerable(i, t)) {
- for (
- o = e.length, s = createTypedArray('float32', o), a = 0;
- a < o;
- a += 1
- )
- s[a] = e[a] / t;
- return s;
- }
- if (isNumerable(r, e) && $bm_isInstanceOfArray(t)) {
- for (
- o = t.length, s = createTypedArray('float32', o), a = 0;
- a < o;
- a += 1
- )
- s[a] = e / t[a];
- return s;
- }
- return 0;
- }
- function mod(e, t) {
- return (
- typeof e == 'string' && (e = parseInt(e, 10)),
- typeof t == 'string' && (t = parseInt(t, 10)),
- e % t
- );
- }
- var $bm_sum = sum,
- $bm_sub = sub,
- $bm_mul = mul,
- $bm_div = div,
- $bm_mod = mod;
- function clamp(e, t, r) {
- if (t > r) {
- var i = r;
- (r = t), (t = i);
- }
- return Math.min(Math.max(e, t), r);
- }
- function radiansToDegrees(e) {
- return e / degToRads;
- }
- var radians_to_degrees = radiansToDegrees;
- function degreesToRadians(e) {
- return e * degToRads;
- }
- var degrees_to_radians = radiansToDegrees,
- helperLengthArray = [0, 0, 0, 0, 0, 0];
- function length(e, t) {
- if (typeof e == 'number' || e instanceof Number)
- return (t = t || 0), Math.abs(e - t);
- t || (t = helperLengthArray);
- var r,
- i = Math.min(e.length, t.length),
- s = 0;
- for (r = 0; r < i; r += 1) s += Math.pow(t[r] - e[r], 2);
- return Math.sqrt(s);
- }
- function normalize(e) {
- return div(e, length(e));
- }
- function rgbToHsl(e) {
- var t = e[0],
- r = e[1],
- i = e[2],
- s = Math.max(t, r, i),
- a = Math.min(t, r, i),
- o,
- n,
- l = (s + a) / 2;
- if (s === a) (o = 0), (n = 0);
- else {
- var f = s - a;
- switch (((n = l > 0.5 ? f / (2 - s - a) : f / (s + a)), s)) {
- case t:
- o = (r - i) / f + (r < i ? 6 : 0);
- break;
- case r:
- o = (i - t) / f + 2;
- break;
- case i:
- o = (t - r) / f + 4;
- break;
- }
- o /= 6;
- }
- return [o, n, l, e[3]];
- }
- function hue2rgb(e, t, r) {
- return (
- r < 0 && (r += 1),
- r > 1 && (r -= 1),
- r < 1 / 6
- ? e + (t - e) * 6 * r
- : r < 1 / 2
- ? t
- : r < 2 / 3
- ? e + (t - e) * (2 / 3 - r) * 6
- : e
- );
- }
- function hslToRgb(e) {
- var t = e[0],
- r = e[1],
- i = e[2],
- s,
- a,
- o;
- if (r === 0) (s = i), (o = i), (a = i);
- else {
- var n = i < 0.5 ? i * (1 + r) : i + r - i * r,
- l = 2 * i - n;
- (s = hue2rgb(l, n, t + 1 / 3)),
- (a = hue2rgb(l, n, t)),
- (o = hue2rgb(l, n, t - 1 / 3));
- }
- return [s, a, o, e[3]];
- }
- function linear(e, t, r, i, s) {
- if (
- ((i === void 0 || s === void 0) &&
- ((i = t), (s = r), (t = 0), (r = 1)),
- r < t)
- ) {
- var a = r;
- (r = t), (t = a);
- }
- if (e <= t) return i;
- if (e >= r) return s;
- var o = r === t ? 0 : (e - t) / (r - t);
- if (!i.length) return i + (s - i) * o;
- var n,
- l = i.length,
- f = createTypedArray('float32', l);
- for (n = 0; n < l; n += 1) f[n] = i[n] + (s[n] - i[n]) * o;
- return f;
- }
- function random(e, t) {
- if (
- (t === void 0 &&
- (e === void 0 ? ((e = 0), (t = 1)) : ((t = e), (e = void 0))),
- t.length)
- ) {
- var r,
- i = t.length;
- e || (e = createTypedArray('float32', i));
- var s = createTypedArray('float32', i),
- a = BMMath.random();
- for (r = 0; r < i; r += 1) s[r] = e[r] + a * (t[r] - e[r]);
- return s;
- }
- e === void 0 && (e = 0);
- var o = BMMath.random();
- return e + o * (t - e);
- }
- function createPath(e, t, r, i) {
- var s,
- a = e.length,
- o = shapePool.newElement();
- o.setPathData(!!i, a);
- var n = [0, 0],
- l,
- f;
- for (s = 0; s < a; s += 1)
- (l = t && t[s] ? t[s] : n),
- (f = r && r[s] ? r[s] : n),
- o.setTripleAt(
- e[s][0],
- e[s][1],
- f[0] + e[s][0],
- f[1] + e[s][1],
- l[0] + e[s][0],
- l[1] + e[s][1],
- s,
- !0
- );
- return o;
- }
- function initiateExpression(elem, data, property) {
- function noOp(e) {
- return e;
- }
- if (!elem.globalData.renderConfig.runExpressions) return noOp;
- var val = data.x,
- needsVelocity = /velocity(?![\w\d])/.test(val),
- _needsRandom = val.indexOf('random') !== -1,
- elemType = elem.data.ty,
- transform,
- $bm_transform,
- content,
- effect,
- thisProperty = property;
- (thisProperty.valueAtTime = thisProperty.getValueAtTime),
- Object.defineProperty(thisProperty, 'value', {
- get: function () {
- return thisProperty.v;
- }
- }),
- (elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate),
- (elem.comp.displayStartTime = 0);
- var inPoint = elem.data.ip / elem.comp.globalData.frameRate,
- outPoint = elem.data.op / elem.comp.globalData.frameRate,
- width = elem.data.sw ? elem.data.sw : 0,
- height = elem.data.sh ? elem.data.sh : 0,
- name = elem.data.nm,
- loopIn,
- loop_in,
- loopOut,
- loop_out,
- smooth,
- toWorld,
- fromWorld,
- fromComp,
- toComp,
- fromCompToSurface,
- position,
- rotation,
- anchorPoint,
- scale,
- thisLayer,
- thisComp,
- mask,
- valueAtTime,
- velocityAtTime,
- scoped_bm_rt,
- expression_function = eval(
- '[function _expression_function(){' +
- val +
- ';scoped_bm_rt=$bm_rt}]'
- )[0],
- numKeys = property.kf ? data.k.length : 0,
- active = !this.data || this.data.hd !== !0,
- wiggle = function e(t, r) {
- var i,
- s,
- a = this.pv.length ? this.pv.length : 1,
- o = createTypedArray('float32', a);
- t = 5;
- var n = Math.floor(time * t);
- for (i = 0, s = 0; i < n; ) {
- for (s = 0; s < a; s += 1)
- o[s] += -r + r * 2 * BMMath.random();
- i += 1;
- }
- var l = time * t,
- f = l - Math.floor(l),
- g = createTypedArray('float32', a);
- if (a > 1) {
- for (s = 0; s < a; s += 1)
- g[s] =
- this.pv[s] + o[s] + (-r + r * 2 * BMMath.random()) * f;
- return g;
- }
- return this.pv + o[0] + (-r + r * 2 * BMMath.random()) * f;
- }.bind(this);
- thisProperty.loopIn &&
- ((loopIn = thisProperty.loopIn.bind(thisProperty)),
- (loop_in = loopIn)),
- thisProperty.loopOut &&
- ((loopOut = thisProperty.loopOut.bind(thisProperty)),
- (loop_out = loopOut)),
- thisProperty.smooth &&
- (smooth = thisProperty.smooth.bind(thisProperty));
- function loopInDuration(e, t) {
- return loopIn(e, t, !0);
- }
- function loopOutDuration(e, t) {
- return loopOut(e, t, !0);
- }
- this.getValueAtTime &&
- (valueAtTime = this.getValueAtTime.bind(this)),
- this.getVelocityAtTime &&
- (velocityAtTime = this.getVelocityAtTime.bind(this));
- var comp = elem.comp.globalData.projectInterface.bind(
- elem.comp.globalData.projectInterface
- );
- function lookAt(e, t) {
- var r = [t[0] - e[0], t[1] - e[1], t[2] - e[2]],
- i =
- Math.atan2(r[0], Math.sqrt(r[1] * r[1] + r[2] * r[2])) /
- degToRads,
- s = -Math.atan2(r[1], r[2]) / degToRads;
- return [s, i, 0];
- }
- function easeOut(e, t, r, i, s) {
- return applyEase(easeOutBez, e, t, r, i, s);
- }
- function easeIn(e, t, r, i, s) {
- return applyEase(easeInBez, e, t, r, i, s);
- }
- function ease(e, t, r, i, s) {
- return applyEase(easeInOutBez, e, t, r, i, s);
- }
- function applyEase(e, t, r, i, s, a) {
- s === void 0 ? ((s = r), (a = i)) : (t = (t - r) / (i - r)),
- t > 1 ? (t = 1) : t < 0 && (t = 0);
- var o = e(t);
- if ($bm_isInstanceOfArray(s)) {
- var n,
- l = s.length,
- f = createTypedArray('float32', l);
- for (n = 0; n < l; n += 1) f[n] = (a[n] - s[n]) * o + s[n];
- return f;
- }
- return (a - s) * o + s;
- }
- function nearestKey(e) {
- var t,
- r = data.k.length,
- i,
- s;
- if (!data.k.length || typeof data.k[0] == 'number')
- (i = 0), (s = 0);
- else if (
- ((i = -1),
- (e *= elem.comp.globalData.frameRate),
- e < data.k[0].t)
- )
- (i = 1), (s = data.k[0].t);
- else {
- for (t = 0; t < r - 1; t += 1)
- if (e === data.k[t].t) {
- (i = t + 1), (s = data.k[t].t);
- break;
- } else if (e > data.k[t].t && e < data.k[t + 1].t) {
- e - data.k[t].t > data.k[t + 1].t - e
- ? ((i = t + 2), (s = data.k[t + 1].t))
- : ((i = t + 1), (s = data.k[t].t));
- break;
- }
- i === -1 && ((i = t + 1), (s = data.k[t].t));
- }
- var a = {};
- return (
- (a.index = i), (a.time = s / elem.comp.globalData.frameRate), a
- );
- }
- function key(e) {
- var t, r, i;
- if (!data.k.length || typeof data.k[0] == 'number')
- throw new Error('The property has no keyframe at index ' + e);
- (e -= 1),
- (t = {
- time: data.k[e].t / elem.comp.globalData.frameRate,
- value: []
- });
- var s = Object.prototype.hasOwnProperty.call(data.k[e], 's')
- ? data.k[e].s
- : data.k[e - 1].e;
- for (i = s.length, r = 0; r < i; r += 1)
- (t[r] = s[r]), (t.value[r] = s[r]);
- return t;
- }
- function framesToTime(e, t) {
- return t || (t = elem.comp.globalData.frameRate), e / t;
- }
- function timeToFrames(e, t) {
- return (
- !e && e !== 0 && (e = time),
- t || (t = elem.comp.globalData.frameRate),
- e * t
- );
- }
- function seedRandom(e) {
- BMMath.seedrandom(randSeed + e);
- }
- function sourceRectAtTime() {
- return elem.sourceRectAtTime();
- }
- function substring(e, t) {
- return typeof value == 'string'
- ? t === void 0
- ? value.substring(e)
- : value.substring(e, t)
- : '';
- }
- function substr(e, t) {
- return typeof value == 'string'
- ? t === void 0
- ? value.substr(e)
- : value.substr(e, t)
- : '';
- }
- function posterizeTime(e) {
- (time = e === 0 ? 0 : Math.floor(time * e) / e),
- (value = valueAtTime(time));
- }
- var time,
- velocity,
- value,
- text,
- textIndex,
- textTotal,
- selectorValue,
- index = elem.data.ind,
- hasParent = !!(elem.hierarchy && elem.hierarchy.length),
- parent,
- randSeed = Math.floor(Math.random() * 1e6),
- globalData = elem.globalData;
- function executeExpression(e) {
- return (
- (value = e),
- this.frameExpressionId === elem.globalData.frameId &&
- this.propType !== 'textSelector'
- ? value
- : (this.propType === 'textSelector' &&
- ((textIndex = this.textIndex),
- (textTotal = this.textTotal),
- (selectorValue = this.selectorValue)),
- thisLayer ||
- ((text = elem.layerInterface.text),
- (thisLayer = elem.layerInterface),
- (thisComp = elem.comp.compInterface),
- (toWorld = thisLayer.toWorld.bind(thisLayer)),
- (fromWorld = thisLayer.fromWorld.bind(thisLayer)),
- (fromComp = thisLayer.fromComp.bind(thisLayer)),
- (toComp = thisLayer.toComp.bind(thisLayer)),
- (mask = thisLayer.mask
- ? thisLayer.mask.bind(thisLayer)
- : null),
- (fromCompToSurface = fromComp)),
- transform ||
- ((transform = elem.layerInterface(
- 'ADBE Transform Group'
- )),
- ($bm_transform = transform),
- transform && (anchorPoint = transform.anchorPoint)),
- elemType === 4 &&
- !content &&
- (content = thisLayer('ADBE Root Vectors Group')),
- effect || (effect = thisLayer(4)),
- (hasParent = !!(elem.hierarchy && elem.hierarchy.length)),
- hasParent &&
- !parent &&
- (parent = elem.hierarchy[0].layerInterface),
- (time =
- this.comp.renderedFrame / this.comp.globalData.frameRate),
- _needsRandom && seedRandom(randSeed + time),
- needsVelocity && (velocity = velocityAtTime(time)),
- expression_function(),
- (this.frameExpressionId = elem.globalData.frameId),
- (scoped_bm_rt =
- scoped_bm_rt.propType === propTypes.SHAPE
- ? scoped_bm_rt.v
- : scoped_bm_rt),
- scoped_bm_rt)
- );
- }
- return (
- (executeExpression.__preventDeadCodeRemoval = [
- $bm_transform,
- anchorPoint,
- time,
- velocity,
- inPoint,
- outPoint,
- width,
- height,
- name,
- loop_in,
- loop_out,
- smooth,
- toComp,
- fromCompToSurface,
- toWorld,
- fromWorld,
- mask,
- position,
- rotation,
- scale,
- thisComp,
- numKeys,
- active,
- wiggle,
- loopInDuration,
- loopOutDuration,
- comp,
- lookAt,
- easeOut,
- easeIn,
- ease,
- nearestKey,
- key,
- text,
- textIndex,
- textTotal,
- selectorValue,
- framesToTime,
- timeToFrames,
- sourceRectAtTime,
- substring,
- substr,
- posterizeTime,
- index,
- globalData
- ]),
- executeExpression
- );
- }
- return (
- (ob.initiateExpression = initiateExpression),
- (ob.__preventDeadCodeRemoval = [
- window,
- document,
- XMLHttpRequest,
- fetch,
- frames,
- $bm_neg,
- add,
- $bm_sum,
- $bm_sub,
- $bm_mul,
- $bm_div,
- $bm_mod,
- clamp,
- radians_to_degrees,
- degreesToRadians,
- degrees_to_radians,
- normalize,
- rgbToHsl,
- hslToRgb,
- linear,
- random,
- createPath,
- _lottieGlobal
- ]),
- (ob.resetFrame = resetFrame),
- ob
- );
- })(),
- Expressions = (function () {
- var e = {};
- (e.initExpressions = t),
- (e.resetFrame = ExpressionManager.resetFrame);
- function t(r) {
- var i = 0,
- s = [];
- function a() {
- i += 1;
- }
- function o() {
- (i -= 1), i === 0 && l();
- }
- function n(f) {
- s.indexOf(f) === -1 && s.push(f);
- }
- function l() {
- var f,
- g = s.length;
- for (f = 0; f < g; f += 1) s[f].release();
- s.length = 0;
- }
- (r.renderer.compInterface = CompExpressionInterface(r.renderer)),
- r.renderer.globalData.projectInterface.registerComposition(
- r.renderer
- ),
- (r.renderer.globalData.pushExpression = a),
- (r.renderer.globalData.popExpression = o),
- (r.renderer.globalData.registerExpressionProperty = n);
- }
- return e;
- })(),
- MaskManagerInterface = (function () {
- function e(r, i) {
- (this._mask = r), (this._data = i);
- }
- Object.defineProperty(e.prototype, 'maskPath', {
- get: function () {
- return (
- this._mask.prop.k && this._mask.prop.getValue(), this._mask.prop
- );
- }
- }),
- Object.defineProperty(e.prototype, 'maskOpacity', {
- get: function () {
- return (
- this._mask.op.k && this._mask.op.getValue(),
- this._mask.op.v * 100
- );
- }
- });
- var t = function (i) {
- var s = createSizedArray(i.viewData.length),
- a,
- o = i.viewData.length;
- for (a = 0; a < o; a += 1)
- s[a] = new e(i.viewData[a], i.masksProperties[a]);
- var n = function (f) {
- for (a = 0; a < o; ) {
- if (i.masksProperties[a].nm === f) return s[a];
- a += 1;
- }
- return null;
- };
- return n;
- };
- return t;
- })(),
- ExpressionPropertyInterface = (function () {
- var e = { pv: 0, v: 0, mult: 1 },
- t = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 };
- function r(o, n, l) {
- Object.defineProperty(o, 'velocity', {
- get: function () {
- return n.getVelocityAtTime(n.comp.currentFrame);
- }
- }),
- (o.numKeys = n.keyframes ? n.keyframes.length : 0),
- (o.key = function (f) {
- if (!o.numKeys) return 0;
- var g = '';
- 's' in n.keyframes[f - 1]
- ? (g = n.keyframes[f - 1].s)
- : 'e' in n.keyframes[f - 2]
- ? (g = n.keyframes[f - 2].e)
- : (g = n.keyframes[f - 2].s);
- var S =
- l === 'unidimensional' ? new Number(g) : Object.assign({}, g);
- return (
- (S.time =
- n.keyframes[f - 1].t / n.elem.comp.globalData.frameRate),
- (S.value = l === 'unidimensional' ? g[0] : g),
- S
- );
- }),
- (o.valueAtTime = n.getValueAtTime),
- (o.speedAtTime = n.getSpeedAtTime),
- (o.velocityAtTime = n.getVelocityAtTime),
- (o.propertyGroup = n.propertyGroup);
- }
- function i(o) {
- (!o || !('pv' in o)) && (o = e);
- var n = 1 / o.mult,
- l = o.pv * n,
- f = new Number(l);
- return (
- (f.value = l),
- r(f, o, 'unidimensional'),
- function () {
- return (
- o.k && o.getValue(),
- (l = o.v * n),
- f.value !== l &&
- ((f = new Number(l)),
- (f.value = l),
- r(f, o, 'unidimensional')),
- f
- );
- }
- );
- }
- function s(o) {
- (!o || !('pv' in o)) && (o = t);
- var n = 1 / o.mult,
- l = (o.data && o.data.l) || o.pv.length,
- f = createTypedArray('float32', l),
- g = createTypedArray('float32', l);
- return (
- (f.value = g),
- r(f, o, 'multidimensional'),
- function () {
- o.k && o.getValue();
- for (var S = 0; S < l; S += 1)
- (g[S] = o.v[S] * n), (f[S] = g[S]);
- return f;
- }
- );
- }
- function a() {
- return e;
- }
- return function (o) {
- return o ? (o.propType === 'unidimensional' ? i(o) : s(o)) : a;
- };
- })(),
- TransformExpressionInterface = (function () {
- return function (e) {
- function t(o) {
- switch (o) {
- case 'scale':
- case 'Scale':
- case 'ADBE Scale':
- case 6:
- return t.scale;
- case 'rotation':
- case 'Rotation':
- case 'ADBE Rotation':
- case 'ADBE Rotate Z':
- case 10:
- return t.rotation;
- case 'ADBE Rotate X':
- return t.xRotation;
- case 'ADBE Rotate Y':
- return t.yRotation;
- case 'position':
- case 'Position':
- case 'ADBE Position':
- case 2:
- return t.position;
- case 'ADBE Position_0':
- return t.xPosition;
- case 'ADBE Position_1':
- return t.yPosition;
- case 'ADBE Position_2':
- return t.zPosition;
- case 'anchorPoint':
- case 'AnchorPoint':
- case 'Anchor Point':
- case 'ADBE AnchorPoint':
- case 1:
- return t.anchorPoint;
- case 'opacity':
- case 'Opacity':
- case 11:
- return t.opacity;
- default:
- return null;
- }
- }
- Object.defineProperty(t, 'rotation', {
- get: ExpressionPropertyInterface(e.r || e.rz)
- }),
- Object.defineProperty(t, 'zRotation', {
- get: ExpressionPropertyInterface(e.rz || e.r)
- }),
- Object.defineProperty(t, 'xRotation', {
- get: ExpressionPropertyInterface(e.rx)
- }),
- Object.defineProperty(t, 'yRotation', {
- get: ExpressionPropertyInterface(e.ry)
- }),
- Object.defineProperty(t, 'scale', {
- get: ExpressionPropertyInterface(e.s)
- });
- var r, i, s, a;
- return (
- e.p
- ? (a = ExpressionPropertyInterface(e.p))
- : ((r = ExpressionPropertyInterface(e.px)),
- (i = ExpressionPropertyInterface(e.py)),
- e.pz && (s = ExpressionPropertyInterface(e.pz))),
- Object.defineProperty(t, 'position', {
- get: function () {
- return e.p ? a() : [r(), i(), s ? s() : 0];
- }
- }),
- Object.defineProperty(t, 'xPosition', {
- get: ExpressionPropertyInterface(e.px)
- }),
- Object.defineProperty(t, 'yPosition', {
- get: ExpressionPropertyInterface(e.py)
- }),
- Object.defineProperty(t, 'zPosition', {
- get: ExpressionPropertyInterface(e.pz)
- }),
- Object.defineProperty(t, 'anchorPoint', {
- get: ExpressionPropertyInterface(e.a)
- }),
- Object.defineProperty(t, 'opacity', {
- get: ExpressionPropertyInterface(e.o)
- }),
- Object.defineProperty(t, 'skew', {
- get: ExpressionPropertyInterface(e.sk)
- }),
- Object.defineProperty(t, 'skewAxis', {
- get: ExpressionPropertyInterface(e.sa)
- }),
- Object.defineProperty(t, 'orientation', {
- get: ExpressionPropertyInterface(e.or)
- }),
- t
- );
- };
- })(),
- LayerExpressionInterface = (function () {
- function e(f) {
- var g = new Matrix();
- if (f !== void 0) {
- var S = this._elem.finalTransform.mProp.getValueAtTime(f);
- S.clone(g);
- } else {
- var c = this._elem.finalTransform.mProp;
- c.applyToMatrix(g);
- }
- return g;
- }
- function t(f, g) {
- var S = this.getMatrix(g);
- return (
- (S.props[12] = 0),
- (S.props[13] = 0),
- (S.props[14] = 0),
- this.applyPoint(S, f)
- );
- }
- function r(f, g) {
- var S = this.getMatrix(g);
- return this.applyPoint(S, f);
- }
- function i(f, g) {
- var S = this.getMatrix(g);
- return (
- (S.props[12] = 0),
- (S.props[13] = 0),
- (S.props[14] = 0),
- this.invertPoint(S, f)
- );
- }
- function s(f, g) {
- var S = this.getMatrix(g);
- return this.invertPoint(S, f);
- }
- function a(f, g) {
- if (this._elem.hierarchy && this._elem.hierarchy.length) {
- var S,
- c = this._elem.hierarchy.length;
- for (S = 0; S < c; S += 1)
- this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(f);
- }
- return f.applyToPointArray(g[0], g[1], g[2] || 0);
- }
- function o(f, g) {
- if (this._elem.hierarchy && this._elem.hierarchy.length) {
- var S,
- c = this._elem.hierarchy.length;
- for (S = 0; S < c; S += 1)
- this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(f);
- }
- return f.inversePoint(g);
- }
- function n(f) {
- var g = new Matrix();
- if (
- (g.reset(),
- this._elem.finalTransform.mProp.applyToMatrix(g),
- this._elem.hierarchy && this._elem.hierarchy.length)
- ) {
- var S,
- c = this._elem.hierarchy.length;
- for (S = 0; S < c; S += 1)
- this._elem.hierarchy[S].finalTransform.mProp.applyToMatrix(g);
- return g.inversePoint(f);
- }
- return g.inversePoint(f);
- }
- function l() {
- return [1, 1, 1, 1];
- }
- return function (f) {
- var g;
- function S(p) {
- P.mask = new MaskManagerInterface(p, f);
- }
- function c(p) {
- P.effect = p;
- }
- function P(p) {
- switch (p) {
- case 'ADBE Root Vectors Group':
- case 'Contents':
- case 2:
- return P.shapeInterface;
- case 1:
- case 6:
- case 'Transform':
- case 'transform':
- case 'ADBE Transform Group':
- return g;
- case 4:
- case 'ADBE Effect Parade':
- case 'effects':
- case 'Effects':
- return P.effect;
- case 'ADBE Text Properties':
- return P.textInterface;
- default:
- return null;
- }
- }
- (P.getMatrix = e),
- (P.invertPoint = o),
- (P.applyPoint = a),
- (P.toWorld = r),
- (P.toWorldVec = t),
- (P.fromWorld = s),
- (P.fromWorldVec = i),
- (P.toComp = r),
- (P.fromComp = n),
- (P.sampleImage = l),
- (P.sourceRectAtTime = f.sourceRectAtTime.bind(f)),
- (P._elem = f),
- (g = TransformExpressionInterface(f.finalTransform.mProp));
- var d = getDescriptor(g, 'anchorPoint');
- return (
- Object.defineProperties(P, {
- hasParent: {
- get: function () {
- return f.hierarchy.length;
- }
- },
- parent: {
- get: function () {
- return f.hierarchy[0].layerInterface;
- }
- },
- rotation: getDescriptor(g, 'rotation'),
- scale: getDescriptor(g, 'scale'),
- position: getDescriptor(g, 'position'),
- opacity: getDescriptor(g, 'opacity'),
- anchorPoint: d,
- anchor_point: d,
- transform: {
- get: function () {
- return g;
- }
- },
- active: {
- get: function () {
- return f.isInRange;
- }
- }
- }),
- (P.startTime = f.data.st),
- (P.index = f.data.ind),
- (P.source = f.data.refId),
- (P.height = f.data.ty === 0 ? f.data.h : 100),
- (P.width = f.data.ty === 0 ? f.data.w : 100),
- (P.inPoint = f.data.ip / f.comp.globalData.frameRate),
- (P.outPoint = f.data.op / f.comp.globalData.frameRate),
- (P._name = f.data.nm),
- (P.registerMaskInterface = S),
- (P.registerEffectsInterface = c),
- P
- );
- };
- })(),
- propertyGroupFactory = (function () {
- return function (e, t) {
- return function (r) {
- return (r = r === void 0 ? 1 : r), r <= 0 ? e : t(r - 1);
- };
- };
- })(),
- PropertyInterface = (function () {
- return function (e, t) {
- var r = { _name: e };
- function i(s) {
- return (s = s === void 0 ? 1 : s), s <= 0 ? r : t(s - 1);
- }
- return i;
- };
- })(),
- EffectsExpressionInterface = (function () {
- var e = { createEffectsInterface: t };
- function t(s, a) {
- if (s.effectsManager) {
- var o = [],
- n = s.data.ef,
- l,
- f = s.effectsManager.effectElements.length;
- for (l = 0; l < f; l += 1)
- o.push(r(n[l], s.effectsManager.effectElements[l], a, s));
- var g = s.data.ef || [],
- S = function (P) {
- for (l = 0, f = g.length; l < f; ) {
- if (P === g[l].nm || P === g[l].mn || P === g[l].ix)
- return o[l];
- l += 1;
- }
- return null;
- };
- return (
- Object.defineProperty(S, 'numProperties', {
- get: function () {
- return g.length;
- }
- }),
- S
- );
- }
- return null;
- }
- function r(s, a, o, n) {
- function l(P) {
- for (var d = s.ef, p = 0, x = d.length; p < x; ) {
- if (P === d[p].nm || P === d[p].mn || P === d[p].ix)
- return d[p].ty === 5 ? g[p] : g[p]();
- p += 1;
- }
- throw new Error();
- }
- var f = propertyGroupFactory(l, o),
- g = [],
- S,
- c = s.ef.length;
- for (S = 0; S < c; S += 1)
- s.ef[S].ty === 5
- ? g.push(
- r(
- s.ef[S],
- a.effectElements[S],
- a.effectElements[S].propertyGroup,
- n
- )
- )
- : g.push(i(a.effectElements[S], s.ef[S].ty, n, f));
- return (
- s.mn === 'ADBE Color Control' &&
- Object.defineProperty(l, 'color', {
- get: function () {
- return g[0]();
- }
- }),
- Object.defineProperties(l, {
- numProperties: {
- get: function () {
- return s.np;
- }
- },
- _name: { value: s.nm },
- propertyGroup: { value: f }
- }),
- (l.enabled = s.en !== 0),
- (l.active = l.enabled),
- l
- );
- }
- function i(s, a, o, n) {
- var l = ExpressionPropertyInterface(s.p);
- function f() {
- return a === 10 ? o.comp.compInterface(s.p.v) : l();
- }
- return (
- s.p.setGroupProperty &&
- s.p.setGroupProperty(PropertyInterface('', n)),
- f
- );
- }
- return e;
- })(),
- ShapePathInterface = (function () {
- return function (t, r, i) {
- var s = r.sh;
- function a(n) {
- return n === 'Shape' ||
- n === 'shape' ||
- n === 'Path' ||
- n === 'path' ||
- n === 'ADBE Vector Shape' ||
- n === 2
- ? a.path
- : null;
- }
- var o = propertyGroupFactory(a, i);
- return (
- s.setGroupProperty(PropertyInterface('Path', o)),
- Object.defineProperties(a, {
- path: {
- get: function () {
- return s.k && s.getValue(), s;
- }
- },
- shape: {
- get: function () {
- return s.k && s.getValue(), s;
- }
- },
- _name: { value: t.nm },
- ix: { value: t.ix },
- propertyIndex: { value: t.ix },
- mn: { value: t.mn },
- propertyGroup: { value: i }
- }),
- a
- );
- };
- })(),
- ShapeExpressionInterface = (function () {
- function e(d, p, x) {
- var u = [],
- y,
- m = d ? d.length : 0;
- for (y = 0; y < m; y += 1)
- d[y].ty === 'gr'
- ? u.push(r(d[y], p[y], x))
- : d[y].ty === 'fl'
- ? u.push(i(d[y], p[y], x))
- : d[y].ty === 'st'
- ? u.push(o(d[y], p[y], x))
- : d[y].ty === 'tm'
- ? u.push(n(d[y], p[y], x))
- : d[y].ty === 'tr' ||
- (d[y].ty === 'el'
- ? u.push(f(d[y], p[y], x))
- : d[y].ty === 'sr'
- ? u.push(g(d[y], p[y], x))
- : d[y].ty === 'sh'
- ? u.push(ShapePathInterface(d[y], p[y], x))
- : d[y].ty === 'rc'
- ? u.push(S(d[y], p[y], x))
- : d[y].ty === 'rd'
- ? u.push(c(d[y], p[y], x))
- : d[y].ty === 'rp'
- ? u.push(P(d[y], p[y], x))
- : d[y].ty === 'gf'
- ? u.push(s(d[y], p[y], x))
- : u.push(a(d[y], p[y])));
- return u;
- }
- function t(d, p, x) {
- var u,
- y = function (T) {
- for (var E = 0, _ = u.length; E < _; ) {
- if (
- u[E]._name === T ||
- u[E].mn === T ||
- u[E].propertyIndex === T ||
- u[E].ix === T ||
- u[E].ind === T
- )
- return u[E];
- E += 1;
- }
- return typeof T == 'number' ? u[T - 1] : null;
- };
- (y.propertyGroup = propertyGroupFactory(y, x)),
- (u = e(d.it, p.it, y.propertyGroup)),
- (y.numProperties = u.length);
- var m = l(
- d.it[d.it.length - 1],
- p.it[p.it.length - 1],
- y.propertyGroup
- );
- return (
- (y.transform = m), (y.propertyIndex = d.cix), (y._name = d.nm), y
- );
- }
- function r(d, p, x) {
- var u = function (T) {
- switch (T) {
- case 'ADBE Vectors Group':
- case 'Contents':
- case 2:
- return u.content;
- default:
- return u.transform;
- }
- };
- u.propertyGroup = propertyGroupFactory(u, x);
- var y = t(d, p, u.propertyGroup),
- m = l(
- d.it[d.it.length - 1],
- p.it[p.it.length - 1],
- u.propertyGroup
- );
- return (
- (u.content = y),
- (u.transform = m),
- Object.defineProperty(u, '_name', {
- get: function () {
- return d.nm;
- }
- }),
- (u.numProperties = d.np),
- (u.propertyIndex = d.ix),
- (u.nm = d.nm),
- (u.mn = d.mn),
- u
- );
- }
- function i(d, p, x) {
- function u(y) {
- return y === 'Color' || y === 'color'
- ? u.color
- : y === 'Opacity' || y === 'opacity'
- ? u.opacity
- : null;
- }
- return (
- Object.defineProperties(u, {
- color: { get: ExpressionPropertyInterface(p.c) },
- opacity: { get: ExpressionPropertyInterface(p.o) },
- _name: { value: d.nm },
- mn: { value: d.mn }
- }),
- p.c.setGroupProperty(PropertyInterface('Color', x)),
- p.o.setGroupProperty(PropertyInterface('Opacity', x)),
- u
- );
- }
- function s(d, p, x) {
- function u(y) {
- return y === 'Start Point' || y === 'start point'
- ? u.startPoint
- : y === 'End Point' || y === 'end point'
- ? u.endPoint
- : y === 'Opacity' || y === 'opacity'
- ? u.opacity
- : null;
- }
- return (
- Object.defineProperties(u, {
- startPoint: { get: ExpressionPropertyInterface(p.s) },
- endPoint: { get: ExpressionPropertyInterface(p.e) },
- opacity: { get: ExpressionPropertyInterface(p.o) },
- type: {
- get: function () {
- return 'a';
- }
- },
- _name: { value: d.nm },
- mn: { value: d.mn }
- }),
- p.s.setGroupProperty(PropertyInterface('Start Point', x)),
- p.e.setGroupProperty(PropertyInterface('End Point', x)),
- p.o.setGroupProperty(PropertyInterface('Opacity', x)),
- u
- );
- }
- function a() {
- function d() {
- return null;
- }
- return d;
- }
- function o(d, p, x) {
- var u = propertyGroupFactory(_, x),
- y = propertyGroupFactory(E, u);
- function m(I) {
- Object.defineProperty(E, d.d[I].nm, {
- get: ExpressionPropertyInterface(p.d.dataProps[I].p)
- });
- }
- var A,
- T = d.d ? d.d.length : 0,
- E = {};
- for (A = 0; A < T; A += 1)
- m(A), p.d.dataProps[A].p.setGroupProperty(y);
- function _(I) {
- return I === 'Color' || I === 'color'
- ? _.color
- : I === 'Opacity' || I === 'opacity'
- ? _.opacity
- : I === 'Stroke Width' || I === 'stroke width'
- ? _.strokeWidth
- : null;
- }
- return (
- Object.defineProperties(_, {
- color: { get: ExpressionPropertyInterface(p.c) },
- opacity: { get: ExpressionPropertyInterface(p.o) },
- strokeWidth: { get: ExpressionPropertyInterface(p.w) },
- dash: {
- get: function () {
- return E;
- }
- },
- _name: { value: d.nm },
- mn: { value: d.mn }
- }),
- p.c.setGroupProperty(PropertyInterface('Color', u)),
- p.o.setGroupProperty(PropertyInterface('Opacity', u)),
- p.w.setGroupProperty(PropertyInterface('Stroke Width', u)),
- _
- );
- }
- function n(d, p, x) {
- function u(m) {
- return m === d.e.ix || m === 'End' || m === 'end'
- ? u.end
- : m === d.s.ix
- ? u.start
- : m === d.o.ix
- ? u.offset
- : null;
- }
- var y = propertyGroupFactory(u, x);
- return (
- (u.propertyIndex = d.ix),
- p.s.setGroupProperty(PropertyInterface('Start', y)),
- p.e.setGroupProperty(PropertyInterface('End', y)),
- p.o.setGroupProperty(PropertyInterface('Offset', y)),
- (u.propertyIndex = d.ix),
- (u.propertyGroup = x),
- Object.defineProperties(u, {
- start: { get: ExpressionPropertyInterface(p.s) },
- end: { get: ExpressionPropertyInterface(p.e) },
- offset: { get: ExpressionPropertyInterface(p.o) },
- _name: { value: d.nm }
- }),
- (u.mn = d.mn),
- u
- );
- }
- function l(d, p, x) {
- function u(m) {
- return d.a.ix === m || m === 'Anchor Point'
- ? u.anchorPoint
- : d.o.ix === m || m === 'Opacity'
- ? u.opacity
- : d.p.ix === m || m === 'Position'
- ? u.position
- : d.r.ix === m ||
- m === 'Rotation' ||
- m === 'ADBE Vector Rotation'
- ? u.rotation
- : d.s.ix === m || m === 'Scale'
- ? u.scale
- : (d.sk && d.sk.ix === m) || m === 'Skew'
- ? u.skew
- : (d.sa && d.sa.ix === m) || m === 'Skew Axis'
- ? u.skewAxis
- : null;
- }
- var y = propertyGroupFactory(u, x);
- return (
- p.transform.mProps.o.setGroupProperty(
- PropertyInterface('Opacity', y)
- ),
- p.transform.mProps.p.setGroupProperty(
- PropertyInterface('Position', y)
- ),
- p.transform.mProps.a.setGroupProperty(
- PropertyInterface('Anchor Point', y)
- ),
- p.transform.mProps.s.setGroupProperty(
- PropertyInterface('Scale', y)
- ),
- p.transform.mProps.r.setGroupProperty(
- PropertyInterface('Rotation', y)
- ),
- p.transform.mProps.sk &&
- (p.transform.mProps.sk.setGroupProperty(
- PropertyInterface('Skew', y)
- ),
- p.transform.mProps.sa.setGroupProperty(
- PropertyInterface('Skew Angle', y)
- )),
- p.transform.op.setGroupProperty(PropertyInterface('Opacity', y)),
- Object.defineProperties(u, {
- opacity: {
- get: ExpressionPropertyInterface(p.transform.mProps.o)
- },
- position: {
- get: ExpressionPropertyInterface(p.transform.mProps.p)
- },
- anchorPoint: {
- get: ExpressionPropertyInterface(p.transform.mProps.a)
- },
- scale: {
- get: ExpressionPropertyInterface(p.transform.mProps.s)
- },
- rotation: {
- get: ExpressionPropertyInterface(p.transform.mProps.r)
- },
- skew: {
- get: ExpressionPropertyInterface(p.transform.mProps.sk)
- },
- skewAxis: {
- get: ExpressionPropertyInterface(p.transform.mProps.sa)
- },
- _name: { value: d.nm }
- }),
- (u.ty = 'tr'),
- (u.mn = d.mn),
- (u.propertyGroup = x),
- u
- );
- }
- function f(d, p, x) {
- function u(A) {
- return d.p.ix === A ? u.position : d.s.ix === A ? u.size : null;
- }
- var y = propertyGroupFactory(u, x);
- u.propertyIndex = d.ix;
- var m = p.sh.ty === 'tm' ? p.sh.prop : p.sh;
- return (
- m.s.setGroupProperty(PropertyInterface('Size', y)),
- m.p.setGroupProperty(PropertyInterface('Position', y)),
- Object.defineProperties(u, {
- size: { get: ExpressionPropertyInterface(m.s) },
- position: { get: ExpressionPropertyInterface(m.p) },
- _name: { value: d.nm }
- }),
- (u.mn = d.mn),
- u
- );
- }
- function g(d, p, x) {
- function u(A) {
- return d.p.ix === A
- ? u.position
- : d.r.ix === A
- ? u.rotation
- : d.pt.ix === A
- ? u.points
- : d.or.ix === A || A === 'ADBE Vector Star Outer Radius'
- ? u.outerRadius
- : d.os.ix === A
- ? u.outerRoundness
- : d.ir &&
- (d.ir.ix === A || A === 'ADBE Vector Star Inner Radius')
- ? u.innerRadius
- : d.is && d.is.ix === A
- ? u.innerRoundness
- : null;
- }
- var y = propertyGroupFactory(u, x),
- m = p.sh.ty === 'tm' ? p.sh.prop : p.sh;
- return (
- (u.propertyIndex = d.ix),
- m.or.setGroupProperty(PropertyInterface('Outer Radius', y)),
- m.os.setGroupProperty(PropertyInterface('Outer Roundness', y)),
- m.pt.setGroupProperty(PropertyInterface('Points', y)),
- m.p.setGroupProperty(PropertyInterface('Position', y)),
- m.r.setGroupProperty(PropertyInterface('Rotation', y)),
- d.ir &&
- (m.ir.setGroupProperty(PropertyInterface('Inner Radius', y)),
- m.is.setGroupProperty(PropertyInterface('Inner Roundness', y))),
- Object.defineProperties(u, {
- position: { get: ExpressionPropertyInterface(m.p) },
- rotation: { get: ExpressionPropertyInterface(m.r) },
- points: { get: ExpressionPropertyInterface(m.pt) },
- outerRadius: { get: ExpressionPropertyInterface(m.or) },
- outerRoundness: { get: ExpressionPropertyInterface(m.os) },
- innerRadius: { get: ExpressionPropertyInterface(m.ir) },
- innerRoundness: { get: ExpressionPropertyInterface(m.is) },
- _name: { value: d.nm }
- }),
- (u.mn = d.mn),
- u
- );
- }
- function S(d, p, x) {
- function u(A) {
- return d.p.ix === A
- ? u.position
- : d.r.ix === A
- ? u.roundness
- : d.s.ix === A || A === 'Size' || A === 'ADBE Vector Rect Size'
- ? u.size
- : null;
- }
- var y = propertyGroupFactory(u, x),
- m = p.sh.ty === 'tm' ? p.sh.prop : p.sh;
- return (
- (u.propertyIndex = d.ix),
- m.p.setGroupProperty(PropertyInterface('Position', y)),
- m.s.setGroupProperty(PropertyInterface('Size', y)),
- m.r.setGroupProperty(PropertyInterface('Rotation', y)),
- Object.defineProperties(u, {
- position: { get: ExpressionPropertyInterface(m.p) },
- roundness: { get: ExpressionPropertyInterface(m.r) },
- size: { get: ExpressionPropertyInterface(m.s) },
- _name: { value: d.nm }
- }),
- (u.mn = d.mn),
- u
- );
- }
- function c(d, p, x) {
- function u(A) {
- return d.r.ix === A || A === 'Round Corners 1' ? u.radius : null;
- }
- var y = propertyGroupFactory(u, x),
- m = p;
- return (
- (u.propertyIndex = d.ix),
- m.rd.setGroupProperty(PropertyInterface('Radius', y)),
- Object.defineProperties(u, {
- radius: { get: ExpressionPropertyInterface(m.rd) },
- _name: { value: d.nm }
- }),
- (u.mn = d.mn),
- u
- );
- }
- function P(d, p, x) {
- function u(A) {
- return d.c.ix === A || A === 'Copies'
- ? u.copies
- : d.o.ix === A || A === 'Offset'
- ? u.offset
- : null;
- }
- var y = propertyGroupFactory(u, x),
- m = p;
- return (
- (u.propertyIndex = d.ix),
- m.c.setGroupProperty(PropertyInterface('Copies', y)),
- m.o.setGroupProperty(PropertyInterface('Offset', y)),
- Object.defineProperties(u, {
- copies: { get: ExpressionPropertyInterface(m.c) },
- offset: { get: ExpressionPropertyInterface(m.o) },
- _name: { value: d.nm }
- }),
- (u.mn = d.mn),
- u
- );
- }
- return function (d, p, x) {
- var u;
- function y(A) {
- if (typeof A == 'number')
- return (A = A === void 0 ? 1 : A), A === 0 ? x : u[A - 1];
- for (var T = 0, E = u.length; T < E; ) {
- if (u[T]._name === A) return u[T];
- T += 1;
- }
- return null;
- }
- function m() {
- return x;
- }
- return (
- (y.propertyGroup = propertyGroupFactory(y, m)),
- (u = e(d, p, y.propertyGroup)),
- (y.numProperties = u.length),
- (y._name = 'Contents'),
- y
- );
- };
- })(),
- TextExpressionInterface = (function () {
- return function (e) {
- var t;
- function r(i) {
- switch (i) {
- case 'ADBE Text Document':
- return r.sourceText;
- default:
- return null;
- }
- }
- return (
- Object.defineProperty(r, 'sourceText', {
- get: function () {
- e.textProperty.getValue();
- var s = e.textProperty.currentData.t;
- return (
- (!t || s !== t.value) &&
- ((t = new String(s)),
- (t.value = s || new String(s)),
- Object.defineProperty(t, 'style', {
- get: function () {
- return { fillColor: e.textProperty.currentData.fc };
- }
- })),
- t
- );
- }
- }),
- r
- );
- };
- })();
- function _typeof(e) {
- '@babel/helpers - typeof';
- return (
- typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol'
- ? (_typeof = function (r) {
- return typeof r;
- })
- : (_typeof = function (r) {
- return r &&
- typeof Symbol == 'function' &&
- r.constructor === Symbol &&
- r !== Symbol.prototype
- ? 'symbol'
- : typeof r;
- }),
- _typeof(e)
- );
- }
- var FootageInterface = (function () {
- var e = function (i) {
- var s = '',
- a = i.getFootageData();
- function o() {
- return (s = ''), (a = i.getFootageData()), n;
- }
- function n(l) {
- if (a[l])
- return (s = l), (a = a[l]), _typeof(a) === 'object' ? n : a;
- var f = l.indexOf(s);
- if (f !== -1) {
- var g = parseInt(l.substr(f + s.length), 10);
- return (a = a[g]), _typeof(a) === 'object' ? n : a;
- }
- return '';
- }
- return o;
- },
- t = function (i) {
- function s(a) {
- return a === 'Outline' ? s.outlineInterface() : null;
- }
- return (s._name = 'Outline'), (s.outlineInterface = e(i)), s;
- };
- return function (r) {
- function i(s) {
- return s === 'Data' ? i.dataInterface : null;
- }
- return (i._name = 'Data'), (i.dataInterface = t(r)), i;
- };
- })(),
- interfaces = {
- layer: LayerExpressionInterface,
- effects: EffectsExpressionInterface,
- comp: CompExpressionInterface,
- shape: ShapeExpressionInterface,
- text: TextExpressionInterface,
- footage: FootageInterface
- };
- function getInterface(e) {
- return interfaces[e] || null;
- }
- var expressionHelpers = (function () {
- function e(o, n, l) {
- n.x &&
- ((l.k = !0),
- (l.x = !0),
- (l.initiateExpression = ExpressionManager.initiateExpression),
- l.effectsSequence.push(l.initiateExpression(o, n, l).bind(l)));
- }
- function t(o) {
- return (
- (o *= this.elem.globalData.frameRate),
- (o -= this.offsetTime),
- o !== this._cachingAtTime.lastFrame &&
- ((this._cachingAtTime.lastIndex =
- this._cachingAtTime.lastFrame < o
- ? this._cachingAtTime.lastIndex
- : 0),
- (this._cachingAtTime.value = this.interpolateValue(
- o,
- this._cachingAtTime
- )),
- (this._cachingAtTime.lastFrame = o)),
- this._cachingAtTime.value
- );
- }
- function r(o) {
- var n = -0.01,
- l = this.getValueAtTime(o),
- f = this.getValueAtTime(o + n),
- g = 0;
- if (l.length) {
- var S;
- for (S = 0; S < l.length; S += 1) g += Math.pow(f[S] - l[S], 2);
- g = Math.sqrt(g) * 100;
- } else g = 0;
- return g;
- }
- function i(o) {
- if (this.vel !== void 0) return this.vel;
- var n = -0.001,
- l = this.getValueAtTime(o),
- f = this.getValueAtTime(o + n),
- g;
- if (l.length) {
- g = createTypedArray('float32', l.length);
- var S;
- for (S = 0; S < l.length; S += 1) g[S] = (f[S] - l[S]) / n;
- } else g = (f - l) / n;
- return g;
- }
- function s() {
- return this.pv;
- }
- function a(o) {
- this.propertyGroup = o;
- }
- return {
- searchExpressions: e,
- getSpeedAtTime: r,
- getVelocityAtTime: i,
- getValueAtTime: t,
- getStaticValueAtTime: s,
- setGroupProperty: a
- };
- })();
- function addPropertyDecorator() {
- function e(c, P, d) {
- if (!this.k || !this.keyframes) return this.pv;
- c = c ? c.toLowerCase() : '';
- var p = this.comp.renderedFrame,
- x = this.keyframes,
- u = x[x.length - 1].t;
- if (p <= u) return this.pv;
- var y, m;
- d
- ? (P
- ? (y = Math.abs(u - this.elem.comp.globalData.frameRate * P))
- : (y = Math.max(0, u - this.elem.data.ip)),
- (m = u - y))
- : ((!P || P > x.length - 1) && (P = x.length - 1),
- (m = x[x.length - 1 - P].t),
- (y = u - m));
- var A, T, E;
- if (c === 'pingpong') {
- var _ = Math.floor((p - m) / y);
- if (_ % 2 !== 0)
- return this.getValueAtTime(
- (y - ((p - m) % y) + m) / this.comp.globalData.frameRate,
- 0
- );
- } else if (c === 'offset') {
- var I = this.getValueAtTime(m / this.comp.globalData.frameRate, 0),
- B = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
- z = this.getValueAtTime(
- (((p - m) % y) + m) / this.comp.globalData.frameRate,
- 0
- ),
- G = Math.floor((p - m) / y);
- if (this.pv.length) {
- for (E = new Array(I.length), T = E.length, A = 0; A < T; A += 1)
- E[A] = (B[A] - I[A]) * G + z[A];
- return E;
- }
- return (B - I) * G + z;
- } else if (c === 'continue') {
- var R = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
- W = this.getValueAtTime(
- (u - 0.001) / this.comp.globalData.frameRate,
- 0
- );
- if (this.pv.length) {
- for (E = new Array(R.length), T = E.length, A = 0; A < T; A += 1)
- E[A] =
- R[A] +
- ((R[A] - W[A]) * ((p - u) / this.comp.globalData.frameRate)) /
- 5e-4;
- return E;
- }
- return R + (R - W) * ((p - u) / 0.001);
- }
- return this.getValueAtTime(
- (((p - m) % y) + m) / this.comp.globalData.frameRate,
- 0
- );
- }
- function t(c, P, d) {
- if (!this.k) return this.pv;
- c = c ? c.toLowerCase() : '';
- var p = this.comp.renderedFrame,
- x = this.keyframes,
- u = x[0].t;
- if (p >= u) return this.pv;
- var y, m;
- d
- ? (P
- ? (y = Math.abs(this.elem.comp.globalData.frameRate * P))
- : (y = Math.max(0, this.elem.data.op - u)),
- (m = u + y))
- : ((!P || P > x.length - 1) && (P = x.length - 1),
- (m = x[P].t),
- (y = m - u));
- var A, T, E;
- if (c === 'pingpong') {
- var _ = Math.floor((u - p) / y);
- if (_ % 2 === 0)
- return this.getValueAtTime(
- (((u - p) % y) + u) / this.comp.globalData.frameRate,
- 0
- );
- } else if (c === 'offset') {
- var I = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
- B = this.getValueAtTime(m / this.comp.globalData.frameRate, 0),
- z = this.getValueAtTime(
- (y - ((u - p) % y) + u) / this.comp.globalData.frameRate,
- 0
- ),
- G = Math.floor((u - p) / y) + 1;
- if (this.pv.length) {
- for (E = new Array(I.length), T = E.length, A = 0; A < T; A += 1)
- E[A] = z[A] - (B[A] - I[A]) * G;
- return E;
- }
- return z - (B - I) * G;
- } else if (c === 'continue') {
- var R = this.getValueAtTime(u / this.comp.globalData.frameRate, 0),
- W = this.getValueAtTime(
- (u + 0.001) / this.comp.globalData.frameRate,
- 0
- );
- if (this.pv.length) {
- for (E = new Array(R.length), T = E.length, A = 0; A < T; A += 1)
- E[A] = R[A] + ((R[A] - W[A]) * (u - p)) / 0.001;
- return E;
- }
- return R + ((R - W) * (u - p)) / 0.001;
- }
- return this.getValueAtTime(
- (y - (((u - p) % y) + u)) / this.comp.globalData.frameRate,
- 0
- );
- }
- function r(c, P) {
- if (!this.k) return this.pv;
- if (((c = (c || 0.4) * 0.5), (P = Math.floor(P || 5)), P <= 1))
- return this.pv;
- var d = this.comp.renderedFrame / this.comp.globalData.frameRate,
- p = d - c,
- x = d + c,
- u = P > 1 ? (x - p) / (P - 1) : 1,
- y = 0,
- m = 0,
- A;
- this.pv.length
- ? (A = createTypedArray('float32', this.pv.length))
- : (A = 0);
- for (var T; y < P; ) {
- if (((T = this.getValueAtTime(p + y * u)), this.pv.length))
- for (m = 0; m < this.pv.length; m += 1) A[m] += T[m];
- else A += T;
- y += 1;
- }
- if (this.pv.length) for (m = 0; m < this.pv.length; m += 1) A[m] /= P;
- else A /= P;
- return A;
- }
- function i(c) {
- this._transformCachingAtTime ||
- (this._transformCachingAtTime = { v: new Matrix() });
- var P = this._transformCachingAtTime.v;
- if (
- (P.cloneFromProps(this.pre.props), this.appliedTransformations < 1)
- ) {
- var d = this.a.getValueAtTime(c);
- P.translate(
- -d[0] * this.a.mult,
- -d[1] * this.a.mult,
- d[2] * this.a.mult
- );
- }
- if (this.appliedTransformations < 2) {
- var p = this.s.getValueAtTime(c);
- P.scale(p[0] * this.s.mult, p[1] * this.s.mult, p[2] * this.s.mult);
- }
- if (this.sk && this.appliedTransformations < 3) {
- var x = this.sk.getValueAtTime(c),
- u = this.sa.getValueAtTime(c);
- P.skewFromAxis(-x * this.sk.mult, u * this.sa.mult);
- }
- if (this.r && this.appliedTransformations < 4) {
- var y = this.r.getValueAtTime(c);
- P.rotate(-y * this.r.mult);
- } else if (!this.r && this.appliedTransformations < 4) {
- var m = this.rz.getValueAtTime(c),
- A = this.ry.getValueAtTime(c),
- T = this.rx.getValueAtTime(c),
- E = this.or.getValueAtTime(c);
- P.rotateZ(-m * this.rz.mult)
- .rotateY(A * this.ry.mult)
- .rotateX(T * this.rx.mult)
- .rotateZ(-E[2] * this.or.mult)
- .rotateY(E[1] * this.or.mult)
- .rotateX(E[0] * this.or.mult);
- }
- if (this.data.p && this.data.p.s) {
- var _ = this.px.getValueAtTime(c),
- I = this.py.getValueAtTime(c);
- if (this.data.p.z) {
- var B = this.pz.getValueAtTime(c);
- P.translate(
- _ * this.px.mult,
- I * this.py.mult,
- -B * this.pz.mult
- );
- } else P.translate(_ * this.px.mult, I * this.py.mult, 0);
- } else {
- var z = this.p.getValueAtTime(c);
- P.translate(
- z[0] * this.p.mult,
- z[1] * this.p.mult,
- -z[2] * this.p.mult
- );
- }
- return P;
- }
- function s() {
- return this.v.clone(new Matrix());
- }
- var a = TransformPropertyFactory.getTransformProperty;
- TransformPropertyFactory.getTransformProperty = function (c, P, d) {
- var p = a(c, P, d);
- return (
- p.dynamicProperties.length
- ? (p.getValueAtTime = i.bind(p))
- : (p.getValueAtTime = s.bind(p)),
- (p.setGroupProperty = expressionHelpers.setGroupProperty),
- p
- );
- };
- var o = PropertyFactory.getProp;
- PropertyFactory.getProp = function (c, P, d, p, x) {
- var u = o(c, P, d, p, x);
- u.kf
- ? (u.getValueAtTime = expressionHelpers.getValueAtTime.bind(u))
- : (u.getValueAtTime =
- expressionHelpers.getStaticValueAtTime.bind(u)),
- (u.setGroupProperty = expressionHelpers.setGroupProperty),
- (u.loopOut = e),
- (u.loopIn = t),
- (u.smooth = r),
- (u.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(u)),
- (u.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(u)),
- (u.numKeys = P.a === 1 ? P.k.length : 0),
- (u.propertyIndex = P.ix);
- var y = 0;
- return (
- d !== 0 &&
- (y = createTypedArray(
- 'float32',
- P.a === 1 ? P.k[0].s.length : P.k.length
- )),
- (u._cachingAtTime = {
- lastFrame: initialDefaultFrame,
- lastIndex: 0,
- value: y
- }),
- expressionHelpers.searchExpressions(c, P, u),
- u.k && x.addDynamicProperty(u),
- u
- );
- };
- function n(c) {
- return (
- this._cachingAtTime ||
- (this._cachingAtTime = {
- shapeValue: shapePool.clone(this.pv),
- lastIndex: 0,
- lastTime: initialDefaultFrame
- }),
- (c *= this.elem.globalData.frameRate),
- (c -= this.offsetTime),
- c !== this._cachingAtTime.lastTime &&
- ((this._cachingAtTime.lastIndex =
- this._cachingAtTime.lastTime < c ? this._caching.lastIndex : 0),
- (this._cachingAtTime.lastTime = c),
- this.interpolateShape(
- c,
- this._cachingAtTime.shapeValue,
- this._cachingAtTime
- )),
- this._cachingAtTime.shapeValue
- );
- }
- var l = ShapePropertyFactory.getConstructorFunction(),
- f = ShapePropertyFactory.getKeyframedConstructorFunction();
- function g() {}
- (g.prototype = {
- vertices: function (P, d) {
- this.k && this.getValue();
- var p = this.v;
- d !== void 0 && (p = this.getValueAtTime(d, 0));
- var x,
- u = p._length,
- y = p[P],
- m = p.v,
- A = createSizedArray(u);
- for (x = 0; x < u; x += 1)
- P === 'i' || P === 'o'
- ? (A[x] = [y[x][0] - m[x][0], y[x][1] - m[x][1]])
- : (A[x] = [y[x][0], y[x][1]]);
- return A;
- },
- points: function (P) {
- return this.vertices('v', P);
- },
- inTangents: function (P) {
- return this.vertices('i', P);
- },
- outTangents: function (P) {
- return this.vertices('o', P);
- },
- isClosed: function () {
- return this.v.c;
- },
- pointOnPath: function (P, d) {
- var p = this.v;
- d !== void 0 && (p = this.getValueAtTime(d, 0)),
- this._segmentsLength ||
- (this._segmentsLength = bez.getSegmentsLength(p));
- for (
- var x = this._segmentsLength,
- u = x.lengths,
- y = x.totalLength * P,
- m = 0,
- A = u.length,
- T = 0,
- E;
- m < A;
- ) {
- if (T + u[m].addedLength > y) {
- var _ = m,
- I = p.c && m === A - 1 ? 0 : m + 1,
- B = (y - T) / u[m].addedLength;
- E = bez.getPointInSegment(
- p.v[_],
- p.v[I],
- p.o[_],
- p.i[I],
- B,
- u[m]
- );
- break;
- } else T += u[m].addedLength;
- m += 1;
- }
- return (
- E ||
- (E = p.c
- ? [p.v[0][0], p.v[0][1]]
- : [p.v[p._length - 1][0], p.v[p._length - 1][1]]),
- E
- );
- },
- vectorOnPath: function (P, d, p) {
- P == 1 ? (P = this.v.c) : P == 0 && (P = 0.999);
- var x = this.pointOnPath(P, d),
- u = this.pointOnPath(P + 0.001, d),
- y = u[0] - x[0],
- m = u[1] - x[1],
- A = Math.sqrt(Math.pow(y, 2) + Math.pow(m, 2));
- if (A === 0) return [0, 0];
- var T = p === 'tangent' ? [y / A, m / A] : [-m / A, y / A];
- return T;
- },
- tangentOnPath: function (P, d) {
- return this.vectorOnPath(P, d, 'tangent');
- },
- normalOnPath: function (P, d) {
- return this.vectorOnPath(P, d, 'normal');
- },
- setGroupProperty: expressionHelpers.setGroupProperty,
- getValueAtTime: expressionHelpers.getStaticValueAtTime
- }),
- extendPrototype([g], l),
- extendPrototype([g], f),
- (f.prototype.getValueAtTime = n),
- (f.prototype.initiateExpression =
- ExpressionManager.initiateExpression);
- var S = ShapePropertyFactory.getShapeProp;
- ShapePropertyFactory.getShapeProp = function (c, P, d, p, x) {
- var u = S(c, P, d, p, x);
- return (
- (u.propertyIndex = P.ix),
- (u.lock = !1),
- d === 3
- ? expressionHelpers.searchExpressions(c, P.pt, u)
- : d === 4 && expressionHelpers.searchExpressions(c, P.ks, u),
- u.k && c.addDynamicProperty(u),
- u
- );
- };
- }
- function initialize$1() {
- addPropertyDecorator();
- }
- function addDecorator() {
- function e() {
- return this.data.d.x
- ? ((this.calculateExpression =
- ExpressionManager.initiateExpression.bind(this)(
- this.elem,
- this.data.d,
- this
- )),
- this.addEffect(this.getExpressionValue.bind(this)),
- !0)
- : null;
- }
- (TextProperty.prototype.getExpressionValue = function (t, r) {
- var i = this.calculateExpression(r);
- if (t.t !== i) {
- var s = {};
- return (
- this.copyData(s, t), (s.t = i.toString()), (s.__complete = !1), s
- );
- }
- return t;
- }),
- (TextProperty.prototype.searchProperty = function () {
- var t = this.searchKeyframes(),
- r = this.searchExpressions();
- return (this.kf = t || r), this.kf;
- }),
- (TextProperty.prototype.searchExpressions = e);
- }
- function initialize() {
- addDecorator();
- }
- function SVGComposableEffect() {}
- SVGComposableEffect.prototype = {
- createMergeNode: function e(t, r) {
- var i = createNS('feMerge');
- i.setAttribute('result', t);
- var s, a;
- for (a = 0; a < r.length; a += 1)
- (s = createNS('feMergeNode')),
- s.setAttribute('in', r[a]),
- i.appendChild(s),
- i.appendChild(s);
- return i;
- }
- };
- var linearFilterValue =
- '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0';
- function SVGTintFilter(e, t, r, i, s) {
- this.filterManager = t;
- var a = createNS('feColorMatrix');
- a.setAttribute('type', 'matrix'),
- a.setAttribute('color-interpolation-filters', 'linearRGB'),
- a.setAttribute('values', linearFilterValue + ' 1 0'),
- (this.linearFilter = a),
- a.setAttribute('result', i + '_tint_1'),
- e.appendChild(a),
- (a = createNS('feColorMatrix')),
- a.setAttribute('type', 'matrix'),
- a.setAttribute('color-interpolation-filters', 'sRGB'),
- a.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'),
- a.setAttribute('result', i + '_tint_2'),
- e.appendChild(a),
- (this.matrixFilter = a);
- var o = this.createMergeNode(i, [s, i + '_tint_1', i + '_tint_2']);
- e.appendChild(o);
- }
- extendPrototype([SVGComposableEffect], SVGTintFilter),
- (SVGTintFilter.prototype.renderFrame = function (e) {
- if (e || this.filterManager._mdf) {
- var t = this.filterManager.effectElements[0].p.v,
- r = this.filterManager.effectElements[1].p.v,
- i = this.filterManager.effectElements[2].p.v / 100;
- this.linearFilter.setAttribute(
- 'values',
- linearFilterValue + ' ' + i + ' 0'
- ),
- this.matrixFilter.setAttribute(
- 'values',
- r[0] -
- t[0] +
- ' 0 0 0 ' +
- t[0] +
- ' ' +
- (r[1] - t[1]) +
- ' 0 0 0 ' +
- t[1] +
- ' ' +
- (r[2] - t[2]) +
- ' 0 0 0 ' +
- t[2] +
- ' 0 0 0 1 0'
- );
- }
- });
- function SVGFillFilter(e, t, r, i) {
- this.filterManager = t;
- var s = createNS('feColorMatrix');
- s.setAttribute('type', 'matrix'),
- s.setAttribute('color-interpolation-filters', 'sRGB'),
- s.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'),
- s.setAttribute('result', i),
- e.appendChild(s),
- (this.matrixFilter = s);
- }
- SVGFillFilter.prototype.renderFrame = function (e) {
- if (e || this.filterManager._mdf) {
- var t = this.filterManager.effectElements[2].p.v,
- r = this.filterManager.effectElements[6].p.v;
- this.matrixFilter.setAttribute(
- 'values',
- '0 0 0 0 ' +
- t[0] +
- ' 0 0 0 0 ' +
- t[1] +
- ' 0 0 0 0 ' +
- t[2] +
- ' 0 0 0 ' +
- r +
- ' 0'
- );
- }
- };
- function SVGStrokeEffect(e, t, r) {
- (this.initialized = !1),
- (this.filterManager = t),
- (this.elem = r),
- (this.paths = []);
- }
- (SVGStrokeEffect.prototype.initialize = function () {
- var e =
- this.elem.layerElement.children ||
- this.elem.layerElement.childNodes,
- t,
- r,
- i,
- s;
- for (
- this.filterManager.effectElements[1].p.v === 1
- ? ((s = this.elem.maskManager.masksProperties.length), (i = 0))
- : ((i = this.filterManager.effectElements[0].p.v - 1), (s = i + 1)),
- r = createNS('g'),
- r.setAttribute('fill', 'none'),
- r.setAttribute('stroke-linecap', 'round'),
- r.setAttribute('stroke-dashoffset', 1),
- i;
- i < s;
- i += 1
- )
- (t = createNS('path')),
- r.appendChild(t),
- this.paths.push({ p: t, m: i });
- if (this.filterManager.effectElements[10].p.v === 3) {
- var a = createNS('mask'),
- o = createElementID();
- a.setAttribute('id', o),
- a.setAttribute('mask-type', 'alpha'),
- a.appendChild(r),
- this.elem.globalData.defs.appendChild(a);
- var n = createNS('g');
- for (
- n.setAttribute('mask', 'url(' + getLocationHref() + '#' + o + ')');
- e[0];
- )
- n.appendChild(e[0]);
- this.elem.layerElement.appendChild(n),
- (this.masker = a),
- r.setAttribute('stroke', '#fff');
- } else if (
- this.filterManager.effectElements[10].p.v === 1 ||
- this.filterManager.effectElements[10].p.v === 2
- ) {
- if (this.filterManager.effectElements[10].p.v === 2)
- for (
- e =
- this.elem.layerElement.children ||
- this.elem.layerElement.childNodes;
- e.length;
- )
- this.elem.layerElement.removeChild(e[0]);
- this.elem.layerElement.appendChild(r),
- this.elem.layerElement.removeAttribute('mask'),
- r.setAttribute('stroke', '#fff');
- }
- (this.initialized = !0), (this.pathMasker = r);
- }),
- (SVGStrokeEffect.prototype.renderFrame = function (e) {
- this.initialized || this.initialize();
- var t,
- r = this.paths.length,
- i,
- s;
- for (t = 0; t < r; t += 1)
- if (
- this.paths[t].m !== -1 &&
- ((i = this.elem.maskManager.viewData[this.paths[t].m]),
- (s = this.paths[t].p),
- (e || this.filterManager._mdf || i.prop._mdf) &&
- s.setAttribute('d', i.lastPath),
- e ||
- this.filterManager.effectElements[9].p._mdf ||
- this.filterManager.effectElements[4].p._mdf ||
- this.filterManager.effectElements[7].p._mdf ||
- this.filterManager.effectElements[8].p._mdf ||
- i.prop._mdf)
- ) {
- var a;
- if (
- this.filterManager.effectElements[7].p.v !== 0 ||
- this.filterManager.effectElements[8].p.v !== 100
- ) {
- var o =
- Math.min(
- this.filterManager.effectElements[7].p.v,
- this.filterManager.effectElements[8].p.v
- ) * 0.01,
- n =
- Math.max(
- this.filterManager.effectElements[7].p.v,
- this.filterManager.effectElements[8].p.v
- ) * 0.01,
- l = s.getTotalLength();
- a = '0 0 0 ' + l * o + ' ';
- var f = l * (n - o),
- g =
- 1 +
- this.filterManager.effectElements[4].p.v *
- 2 *
- this.filterManager.effectElements[9].p.v *
- 0.01,
- S = Math.floor(f / g),
- c;
- for (c = 0; c < S; c += 1)
- a +=
- '1 ' +
- this.filterManager.effectElements[4].p.v *
- 2 *
- this.filterManager.effectElements[9].p.v *
- 0.01 +
- ' ';
- a += '0 ' + l * 10 + ' 0 0';
- } else
- a =
- '1 ' +
- this.filterManager.effectElements[4].p.v *
- 2 *
- this.filterManager.effectElements[9].p.v *
- 0.01;
- s.setAttribute('stroke-dasharray', a);
- }
- if (
- ((e || this.filterManager.effectElements[4].p._mdf) &&
- this.pathMasker.setAttribute(
- 'stroke-width',
- this.filterManager.effectElements[4].p.v * 2
- ),
- (e || this.filterManager.effectElements[6].p._mdf) &&
- this.pathMasker.setAttribute(
- 'opacity',
- this.filterManager.effectElements[6].p.v
- ),
- (this.filterManager.effectElements[10].p.v === 1 ||
- this.filterManager.effectElements[10].p.v === 2) &&
- (e || this.filterManager.effectElements[3].p._mdf))
- ) {
- var P = this.filterManager.effectElements[3].p.v;
- this.pathMasker.setAttribute(
- 'stroke',
- 'rgb(' +
- bmFloor(P[0] * 255) +
- ',' +
- bmFloor(P[1] * 255) +
- ',' +
- bmFloor(P[2] * 255) +
- ')'
- );
- }
- });
- function SVGTritoneFilter(e, t, r, i) {
- this.filterManager = t;
- var s = createNS('feColorMatrix');
- s.setAttribute('type', 'matrix'),
- s.setAttribute('color-interpolation-filters', 'linearRGB'),
- s.setAttribute(
- 'values',
- '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'
- ),
- e.appendChild(s);
- var a = createNS('feComponentTransfer');
- a.setAttribute('color-interpolation-filters', 'sRGB'),
- a.setAttribute('result', i),
- (this.matrixFilter = a);
- var o = createNS('feFuncR');
- o.setAttribute('type', 'table'), a.appendChild(o), (this.feFuncR = o);
- var n = createNS('feFuncG');
- n.setAttribute('type', 'table'), a.appendChild(n), (this.feFuncG = n);
- var l = createNS('feFuncB');
- l.setAttribute('type', 'table'),
- a.appendChild(l),
- (this.feFuncB = l),
- e.appendChild(a);
- }
- SVGTritoneFilter.prototype.renderFrame = function (e) {
- if (e || this.filterManager._mdf) {
- var t = this.filterManager.effectElements[0].p.v,
- r = this.filterManager.effectElements[1].p.v,
- i = this.filterManager.effectElements[2].p.v,
- s = i[0] + ' ' + r[0] + ' ' + t[0],
- a = i[1] + ' ' + r[1] + ' ' + t[1],
- o = i[2] + ' ' + r[2] + ' ' + t[2];
- this.feFuncR.setAttribute('tableValues', s),
- this.feFuncG.setAttribute('tableValues', a),
- this.feFuncB.setAttribute('tableValues', o);
- }
- };
- function SVGProLevelsFilter(e, t, r, i) {
- this.filterManager = t;
- var s = this.filterManager.effectElements,
- a = createNS('feComponentTransfer');
- (s[10].p.k ||
- s[10].p.v !== 0 ||
- s[11].p.k ||
- s[11].p.v !== 1 ||
- s[12].p.k ||
- s[12].p.v !== 1 ||
- s[13].p.k ||
- s[13].p.v !== 0 ||
- s[14].p.k ||
- s[14].p.v !== 1) &&
- (this.feFuncR = this.createFeFunc('feFuncR', a)),
- (s[17].p.k ||
- s[17].p.v !== 0 ||
- s[18].p.k ||
- s[18].p.v !== 1 ||
- s[19].p.k ||
- s[19].p.v !== 1 ||
- s[20].p.k ||
- s[20].p.v !== 0 ||
- s[21].p.k ||
- s[21].p.v !== 1) &&
- (this.feFuncG = this.createFeFunc('feFuncG', a)),
- (s[24].p.k ||
- s[24].p.v !== 0 ||
- s[25].p.k ||
- s[25].p.v !== 1 ||
- s[26].p.k ||
- s[26].p.v !== 1 ||
- s[27].p.k ||
- s[27].p.v !== 0 ||
- s[28].p.k ||
- s[28].p.v !== 1) &&
- (this.feFuncB = this.createFeFunc('feFuncB', a)),
- (s[31].p.k ||
- s[31].p.v !== 0 ||
- s[32].p.k ||
- s[32].p.v !== 1 ||
- s[33].p.k ||
- s[33].p.v !== 1 ||
- s[34].p.k ||
- s[34].p.v !== 0 ||
- s[35].p.k ||
- s[35].p.v !== 1) &&
- (this.feFuncA = this.createFeFunc('feFuncA', a)),
- (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) &&
- (a.setAttribute('color-interpolation-filters', 'sRGB'),
- e.appendChild(a)),
- (s[3].p.k ||
- s[3].p.v !== 0 ||
- s[4].p.k ||
- s[4].p.v !== 1 ||
- s[5].p.k ||
- s[5].p.v !== 1 ||
- s[6].p.k ||
- s[6].p.v !== 0 ||
- s[7].p.k ||
- s[7].p.v !== 1) &&
- ((a = createNS('feComponentTransfer')),
- a.setAttribute('color-interpolation-filters', 'sRGB'),
- a.setAttribute('result', i),
- e.appendChild(a),
- (this.feFuncRComposed = this.createFeFunc('feFuncR', a)),
- (this.feFuncGComposed = this.createFeFunc('feFuncG', a)),
- (this.feFuncBComposed = this.createFeFunc('feFuncB', a)));
- }
- (SVGProLevelsFilter.prototype.createFeFunc = function (e, t) {
- var r = createNS(e);
- return r.setAttribute('type', 'table'), t.appendChild(r), r;
- }),
- (SVGProLevelsFilter.prototype.getTableValue = function (e, t, r, i, s) {
- for (
- var a = 0,
- o = 256,
- n,
- l = Math.min(e, t),
- f = Math.max(e, t),
- g = Array.call(null, { length: o }),
- S,
- c = 0,
- P = s - i,
- d = t - e;
- a <= 256;
- )
- (n = a / 256),
- n <= l
- ? (S = d < 0 ? s : i)
- : n >= f
- ? (S = d < 0 ? i : s)
- : (S = i + P * Math.pow((n - e) / d, 1 / r)),
- (g[c] = S),
- (c += 1),
- (a += 256 / (o - 1));
- return g.join(' ');
- }),
- (SVGProLevelsFilter.prototype.renderFrame = function (e) {
- if (e || this.filterManager._mdf) {
- var t,
- r = this.filterManager.effectElements;
- this.feFuncRComposed &&
- (e ||
- r[3].p._mdf ||
- r[4].p._mdf ||
- r[5].p._mdf ||
- r[6].p._mdf ||
- r[7].p._mdf) &&
- ((t = this.getTableValue(
- r[3].p.v,
- r[4].p.v,
- r[5].p.v,
- r[6].p.v,
- r[7].p.v
- )),
- this.feFuncRComposed.setAttribute('tableValues', t),
- this.feFuncGComposed.setAttribute('tableValues', t),
- this.feFuncBComposed.setAttribute('tableValues', t)),
- this.feFuncR &&
- (e ||
- r[10].p._mdf ||
- r[11].p._mdf ||
- r[12].p._mdf ||
- r[13].p._mdf ||
- r[14].p._mdf) &&
- ((t = this.getTableValue(
- r[10].p.v,
- r[11].p.v,
- r[12].p.v,
- r[13].p.v,
- r[14].p.v
- )),
- this.feFuncR.setAttribute('tableValues', t)),
- this.feFuncG &&
- (e ||
- r[17].p._mdf ||
- r[18].p._mdf ||
- r[19].p._mdf ||
- r[20].p._mdf ||
- r[21].p._mdf) &&
- ((t = this.getTableValue(
- r[17].p.v,
- r[18].p.v,
- r[19].p.v,
- r[20].p.v,
- r[21].p.v
- )),
- this.feFuncG.setAttribute('tableValues', t)),
- this.feFuncB &&
- (e ||
- r[24].p._mdf ||
- r[25].p._mdf ||
- r[26].p._mdf ||
- r[27].p._mdf ||
- r[28].p._mdf) &&
- ((t = this.getTableValue(
- r[24].p.v,
- r[25].p.v,
- r[26].p.v,
- r[27].p.v,
- r[28].p.v
- )),
- this.feFuncB.setAttribute('tableValues', t)),
- this.feFuncA &&
- (e ||
- r[31].p._mdf ||
- r[32].p._mdf ||
- r[33].p._mdf ||
- r[34].p._mdf ||
- r[35].p._mdf) &&
- ((t = this.getTableValue(
- r[31].p.v,
- r[32].p.v,
- r[33].p.v,
- r[34].p.v,
- r[35].p.v
- )),
- this.feFuncA.setAttribute('tableValues', t));
- }
- });
- function SVGDropShadowEffect(e, t, r, i, s) {
- var a = t.container.globalData.renderConfig.filterSize,
- o = t.data.fs || a;
- e.setAttribute('x', o.x || a.x),
- e.setAttribute('y', o.y || a.y),
- e.setAttribute('width', o.width || a.width),
- e.setAttribute('height', o.height || a.height),
- (this.filterManager = t);
- var n = createNS('feGaussianBlur');
- n.setAttribute('in', 'SourceAlpha'),
- n.setAttribute('result', i + '_drop_shadow_1'),
- n.setAttribute('stdDeviation', '0'),
- (this.feGaussianBlur = n),
- e.appendChild(n);
- var l = createNS('feOffset');
- l.setAttribute('dx', '25'),
- l.setAttribute('dy', '0'),
- l.setAttribute('in', i + '_drop_shadow_1'),
- l.setAttribute('result', i + '_drop_shadow_2'),
- (this.feOffset = l),
- e.appendChild(l);
- var f = createNS('feFlood');
- f.setAttribute('flood-color', '#00ff00'),
- f.setAttribute('flood-opacity', '1'),
- f.setAttribute('result', i + '_drop_shadow_3'),
- (this.feFlood = f),
- e.appendChild(f);
- var g = createNS('feComposite');
- g.setAttribute('in', i + '_drop_shadow_3'),
- g.setAttribute('in2', i + '_drop_shadow_2'),
- g.setAttribute('operator', 'in'),
- g.setAttribute('result', i + '_drop_shadow_4'),
- e.appendChild(g);
- var S = this.createMergeNode(i, [i + '_drop_shadow_4', s]);
- e.appendChild(S);
- }
- extendPrototype([SVGComposableEffect], SVGDropShadowEffect),
- (SVGDropShadowEffect.prototype.renderFrame = function (e) {
- if (e || this.filterManager._mdf) {
- if (
- ((e || this.filterManager.effectElements[4].p._mdf) &&
- this.feGaussianBlur.setAttribute(
- 'stdDeviation',
- this.filterManager.effectElements[4].p.v / 4
- ),
- e || this.filterManager.effectElements[0].p._mdf)
- ) {
- var t = this.filterManager.effectElements[0].p.v;
- this.feFlood.setAttribute(
- 'flood-color',
- rgbToHex(
- Math.round(t[0] * 255),
- Math.round(t[1] * 255),
- Math.round(t[2] * 255)
- )
- );
- }
- if (
- ((e || this.filterManager.effectElements[1].p._mdf) &&
- this.feFlood.setAttribute(
- 'flood-opacity',
- this.filterManager.effectElements[1].p.v / 255
- ),
- e ||
- this.filterManager.effectElements[2].p._mdf ||
- this.filterManager.effectElements[3].p._mdf)
- ) {
- var r = this.filterManager.effectElements[3].p.v,
- i = (this.filterManager.effectElements[2].p.v - 90) * degToRads,
- s = r * Math.cos(i),
- a = r * Math.sin(i);
- this.feOffset.setAttribute('dx', s),
- this.feOffset.setAttribute('dy', a);
- }
- }
- });
- var _svgMatteSymbols = [];
- function SVGMatte3Effect(e, t, r) {
- (this.initialized = !1),
- (this.filterManager = t),
- (this.filterElem = e),
- (this.elem = r),
- (r.matteElement = createNS('g')),
- r.matteElement.appendChild(r.layerElement),
- r.matteElement.appendChild(r.transformedElement),
- (r.baseElement = r.matteElement);
- }
- (SVGMatte3Effect.prototype.findSymbol = function (e) {
- for (var t = 0, r = _svgMatteSymbols.length; t < r; ) {
- if (_svgMatteSymbols[t] === e) return _svgMatteSymbols[t];
- t += 1;
- }
- return null;
- }),
- (SVGMatte3Effect.prototype.replaceInParent = function (e, t) {
- var r = e.layerElement.parentNode;
- if (r) {
- for (
- var i = r.children, s = 0, a = i.length;
- s < a && i[s] !== e.layerElement;
- )
- s += 1;
- var o;
- s <= a - 2 && (o = i[s + 1]);
- var n = createNS('use');
- n.setAttribute('href', '#' + t),
- o ? r.insertBefore(n, o) : r.appendChild(n);
- }
- }),
- (SVGMatte3Effect.prototype.setElementAsMask = function (e, t) {
- if (!this.findSymbol(t)) {
- var r = createElementID(),
- i = createNS('mask');
- i.setAttribute('id', t.layerId),
- i.setAttribute('mask-type', 'alpha'),
- _svgMatteSymbols.push(t);
- var s = e.globalData.defs;
- s.appendChild(i);
- var a = createNS('symbol');
- a.setAttribute('id', r),
- this.replaceInParent(t, r),
- a.appendChild(t.layerElement),
- s.appendChild(a);
- var o = createNS('use');
- o.setAttribute('href', '#' + r),
- i.appendChild(o),
- (t.data.hd = !1),
- t.show();
- }
- e.setMatte(t.layerId);
- }),
- (SVGMatte3Effect.prototype.initialize = function () {
- for (
- var e = this.filterManager.effectElements[0].p.v,
- t = this.elem.comp.elements,
- r = 0,
- i = t.length;
- r < i;
- )
- t[r] &&
- t[r].data.ind === e &&
- this.setElementAsMask(this.elem, t[r]),
- (r += 1);
- this.initialized = !0;
- }),
- (SVGMatte3Effect.prototype.renderFrame = function () {
- this.initialized || this.initialize();
- });
- function SVGGaussianBlurEffect(e, t, r, i) {
- e.setAttribute('x', '-100%'),
- e.setAttribute('y', '-100%'),
- e.setAttribute('width', '300%'),
- e.setAttribute('height', '300%'),
- (this.filterManager = t);
- var s = createNS('feGaussianBlur');
- s.setAttribute('result', i),
- e.appendChild(s),
- (this.feGaussianBlur = s);
- }
- SVGGaussianBlurEffect.prototype.renderFrame = function (e) {
- if (e || this.filterManager._mdf) {
- var t = 0.3,
- r = this.filterManager.effectElements[0].p.v * t,
- i = this.filterManager.effectElements[1].p.v,
- s = i == 3 ? 0 : r,
- a = i == 2 ? 0 : r;
- this.feGaussianBlur.setAttribute('stdDeviation', s + ' ' + a);
- var o =
- this.filterManager.effectElements[2].p.v == 1
- ? 'wrap'
- : 'duplicate';
- this.feGaussianBlur.setAttribute('edgeMode', o);
- }
- };
- function TransformEffect() {}
- (TransformEffect.prototype.init = function (e) {
- (this.effectsManager = e),
- (this.type = effectTypes.TRANSFORM_EFFECT),
- (this.matrix = new Matrix()),
- (this.opacity = -1),
- (this._mdf = !1),
- (this._opMdf = !1);
- }),
- (TransformEffect.prototype.renderFrame = function (e) {
- if (
- ((this._opMdf = !1),
- (this._mdf = !1),
- e || this.effectsManager._mdf)
- ) {
- var t = this.effectsManager.effectElements,
- r = t[0].p.v,
- i = t[1].p.v,
- s = t[2].p.v === 1,
- a = t[3].p.v,
- o = s ? a : t[4].p.v,
- n = t[5].p.v,
- l = t[6].p.v,
- f = t[7].p.v;
- this.matrix.reset(),
- this.matrix.translate(-r[0], -r[1], r[2]),
- this.matrix.scale(o * 0.01, a * 0.01, 1),
- this.matrix.rotate(-f * degToRads),
- this.matrix.skewFromAxis(-n * degToRads, (l + 90) * degToRads),
- this.matrix.translate(i[0], i[1], 0),
- (this._mdf = !0),
- this.opacity !== t[8].p.v &&
- ((this.opacity = t[8].p.v), (this._opMdf = !0));
- }
- });
- function SVGTransformEffect(e, t) {
- this.init(t);
- }
- extendPrototype([TransformEffect], SVGTransformEffect);
- function CVTransformEffect(e) {
- this.init(e);
- }
- return (
- extendPrototype([TransformEffect], CVTransformEffect),
- registerRenderer('canvas', CanvasRenderer),
- registerRenderer('html', HybridRenderer),
- registerRenderer('svg', SVGRenderer),
- ShapeModifiers.registerModifier('tm', TrimModifier),
- ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier),
- ShapeModifiers.registerModifier('rp', RepeaterModifier),
- ShapeModifiers.registerModifier('rd', RoundCornersModifier),
- ShapeModifiers.registerModifier('zz', ZigZagModifier),
- ShapeModifiers.registerModifier('op', OffsetPathModifier),
- setExpressionsPlugin(Expressions),
- setExpressionInterfaces(getInterface),
- initialize$1(),
- initialize(),
- registerEffect$1(20, SVGTintFilter, !0),
- registerEffect$1(21, SVGFillFilter, !0),
- registerEffect$1(22, SVGStrokeEffect, !1),
- registerEffect$1(23, SVGTritoneFilter, !0),
- registerEffect$1(24, SVGProLevelsFilter, !0),
- registerEffect$1(25, SVGDropShadowEffect, !0),
- registerEffect$1(28, SVGMatte3Effect, !1),
- registerEffect$1(29, SVGGaussianBlurEffect, !0),
- registerEffect$1(35, SVGTransformEffect, !1),
- registerEffect(35, CVTransformEffect),
- lottie
- );
- });
- })(lottie, lottie.exports);
- var lottieExports = lottie.exports;
- const Lottie = getDefaultExportFromCjs(lottieExports);
- var freeGlobal =
- typeof global == 'object' && global && global.Object === Object && global,
- freeGlobal$1 = freeGlobal,
- freeSelf = typeof self == 'object' && self && self.Object === Object && self,
- root = freeGlobal$1 || freeSelf || Function('return this')(),
- root$1 = root,
- Symbol$1 = root$1.Symbol,
- Symbol$2 = Symbol$1,
- objectProto$e = Object.prototype,
- hasOwnProperty$b = objectProto$e.hasOwnProperty,
- nativeObjectToString$1 = objectProto$e.toString,
- symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
- function getRawTag(e) {
- var t = hasOwnProperty$b.call(e, symToStringTag$1),
- r = e[symToStringTag$1];
- try {
- e[symToStringTag$1] = void 0;
- var i = !0;
- } catch (a) {}
- var s = nativeObjectToString$1.call(e);
- return i && (t ? (e[symToStringTag$1] = r) : delete e[symToStringTag$1]), s;
- }
- var objectProto$d = Object.prototype,
- nativeObjectToString = objectProto$d.toString;
- function objectToString(e) {
- return nativeObjectToString.call(e);
- }
- var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]',
- symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
- function baseGetTag(e) {
- return e == null
- ? e === void 0
- ? undefinedTag
- : nullTag
- : symToStringTag && symToStringTag in Object(e)
- ? getRawTag(e)
- : objectToString(e);
- }
- function isObjectLike(e) {
- return e != null && typeof e == 'object';
- }
- var isArray = Array.isArray,
- isArray$1 = isArray;
- function isObject(e) {
- var t = typeof e;
- return e != null && (t == 'object' || t == 'function');
- }
- var asyncTag = '[object AsyncFunction]',
- funcTag$2 = '[object Function]',
- genTag$1 = '[object GeneratorFunction]',
- proxyTag = '[object Proxy]';
- function isFunction(e) {
- if (!isObject(e)) return !1;
- var t = baseGetTag(e);
- return t == funcTag$2 || t == genTag$1 || t == asyncTag || t == proxyTag;
- }
- var coreJsData = root$1['__core-js_shared__'],
- coreJsData$1 = coreJsData,
- maskSrcKey = (function () {
- var e = /[^.]+$/.exec(
- (coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO) || ''
- );
- return e ? 'Symbol(src)_1.' + e : '';
- })();
- function isMasked(e) {
- return !!maskSrcKey && maskSrcKey in e;
- }
- var funcProto$1 = Function.prototype,
- funcToString$1 = funcProto$1.toString;
- function toSource(e) {
- if (e != null) {
- try {
- return funcToString$1.call(e);
- } catch (t) {}
- try {
- return e + '';
- } catch (t) {}
- }
- return '';
- }
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
- reIsHostCtor = /^\[object .+?Constructor\]$/,
- funcProto = Function.prototype,
- objectProto$c = Object.prototype,
- funcToString = funcProto.toString,
- hasOwnProperty$a = objectProto$c.hasOwnProperty,
- reIsNative = RegExp(
- '^' +
- funcToString
- .call(hasOwnProperty$a)
- .replace(reRegExpChar, '\\$&')
- .replace(
- /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
- '$1.*?'
- ) +
- '$'
- );
- function baseIsNative(e) {
- if (!isObject(e) || isMasked(e)) return !1;
- var t = isFunction(e) ? reIsNative : reIsHostCtor;
- return t.test(toSource(e));
- }
- function getValue(e, t) {
- return e == null ? void 0 : e[t];
- }
- function getNative(e, t) {
- var r = getValue(e, t);
- return baseIsNative(r) ? r : void 0;
- }
- var WeakMap = getNative(root$1, 'WeakMap'),
- WeakMap$1 = WeakMap,
- objectCreate = Object.create,
- baseCreate = (function () {
- function e() {}
- return function (t) {
- if (!isObject(t)) return {};
- if (objectCreate) return objectCreate(t);
- e.prototype = t;
- var r = new e();
- return (e.prototype = void 0), r;
- };
- })(),
- baseCreate$1 = baseCreate;
- function copyArray(e, t) {
- var r = -1,
- i = e.length;
- for (t || (t = Array(i)); ++r < i; ) t[r] = e[r];
- return t;
- }
- var defineProperty = (function () {
- try {
- var e = getNative(Object, 'defineProperty');
- return e({}, '', {}), e;
- } catch (t) {}
- })(),
- defineProperty$1 = defineProperty;
- function arrayEach(e, t) {
- for (
- var r = -1, i = e == null ? 0 : e.length;
- ++r < i && t(e[r], r, e) !== !1;
- );
- return e;
- }
- var MAX_SAFE_INTEGER$1 = 9007199254740991,
- reIsUint = /^(?:0|[1-9]\d*)$/;
- function isIndex(e, t) {
- var r = typeof e;
- return (
- (t = t == null ? MAX_SAFE_INTEGER$1 : t),
- !!t &&
- (r == 'number' || (r != 'symbol' && reIsUint.test(e))) &&
- e > -1 &&
- e % 1 == 0 &&
- e < t
- );
- }
- function baseAssignValue(e, t, r) {
- t == '__proto__' && defineProperty$1
- ? defineProperty$1(e, t, {
- configurable: !0,
- enumerable: !0,
- value: r,
- writable: !0
- })
- : (e[t] = r);
- }
- function eq(e, t) {
- return e === t || (e !== e && t !== t);
- }
- var objectProto$b = Object.prototype,
- hasOwnProperty$9 = objectProto$b.hasOwnProperty;
- function assignValue(e, t, r) {
- var i = e[t];
- (!(hasOwnProperty$9.call(e, t) && eq(i, r)) || (r === void 0 && !(t in e))) &&
- baseAssignValue(e, t, r);
- }
- function copyObject(e, t, r, i) {
- var s = !r;
- r || (r = {});
- for (var a = -1, o = t.length; ++a < o; ) {
- var n = t[a],
- l = i ? i(r[n], e[n], n, r, e) : void 0;
- l === void 0 && (l = e[n]),
- s ? baseAssignValue(r, n, l) : assignValue(r, n, l);
- }
- return r;
- }
- var MAX_SAFE_INTEGER = 9007199254740991;
- function isLength(e) {
- return typeof e == 'number' && e > -1 && e % 1 == 0 && e <= MAX_SAFE_INTEGER;
- }
- function isArrayLike(e) {
- return e != null && isLength(e.length) && !isFunction(e);
- }
- var objectProto$a = Object.prototype;
- function isPrototype(e) {
- var t = e && e.constructor,
- r = (typeof t == 'function' && t.prototype) || objectProto$a;
- return e === r;
- }
- function baseTimes(e, t) {
- for (var r = -1, i = Array(e); ++r < e; ) i[r] = t(r);
- return i;
- }
- var argsTag$3 = '[object Arguments]';
- function baseIsArguments(e) {
- return isObjectLike(e) && baseGetTag(e) == argsTag$3;
- }
- var objectProto$9 = Object.prototype,
- hasOwnProperty$8 = objectProto$9.hasOwnProperty,
- propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable,
- isArguments = baseIsArguments(
- (function () {
- return arguments;
- })()
- )
- ? baseIsArguments
- : function (e) {
- return (
- isObjectLike(e) &&
- hasOwnProperty$8.call(e, 'callee') &&
- !propertyIsEnumerable$1.call(e, 'callee')
- );
- },
- isArguments$1 = isArguments;
- function stubFalse() {
- return !1;
- }
- var freeExports$2 =
- typeof exports == 'object' && exports && !exports.nodeType && exports,
- freeModule$2 =
- freeExports$2 &&
- typeof module == 'object' &&
- module &&
- !module.nodeType &&
- module,
- moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2,
- Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0,
- nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0,
- isBuffer = nativeIsBuffer || stubFalse,
- isBuffer$1 = isBuffer,
- argsTag$2 = '[object Arguments]',
- arrayTag$2 = '[object Array]',
- boolTag$3 = '[object Boolean]',
- dateTag$3 = '[object Date]',
- errorTag$2 = '[object Error]',
- funcTag$1 = '[object Function]',
- mapTag$5 = '[object Map]',
- numberTag$3 = '[object Number]',
- objectTag$3 = '[object Object]',
- regexpTag$3 = '[object RegExp]',
- setTag$5 = '[object Set]',
- stringTag$3 = '[object String]',
- weakMapTag$2 = '[object WeakMap]',
- arrayBufferTag$3 = '[object ArrayBuffer]',
- dataViewTag$4 = '[object DataView]',
- float32Tag$2 = '[object Float32Array]',
- float64Tag$2 = '[object Float64Array]',
- int8Tag$2 = '[object Int8Array]',
- int16Tag$2 = '[object Int16Array]',
- int32Tag$2 = '[object Int32Array]',
- uint8Tag$2 = '[object Uint8Array]',
- uint8ClampedTag$2 = '[object Uint8ClampedArray]',
- uint16Tag$2 = '[object Uint16Array]',
- uint32Tag$2 = '[object Uint32Array]',
- typedArrayTags = {};
- typedArrayTags[float32Tag$2] =
- typedArrayTags[float64Tag$2] =
- typedArrayTags[int8Tag$2] =
- typedArrayTags[int16Tag$2] =
- typedArrayTags[int32Tag$2] =
- typedArrayTags[uint8Tag$2] =
- typedArrayTags[uint8ClampedTag$2] =
- typedArrayTags[uint16Tag$2] =
- typedArrayTags[uint32Tag$2] =
- !0;
- typedArrayTags[argsTag$2] =
- typedArrayTags[arrayTag$2] =
- typedArrayTags[arrayBufferTag$3] =
- typedArrayTags[boolTag$3] =
- typedArrayTags[dataViewTag$4] =
- typedArrayTags[dateTag$3] =
- typedArrayTags[errorTag$2] =
- typedArrayTags[funcTag$1] =
- typedArrayTags[mapTag$5] =
- typedArrayTags[numberTag$3] =
- typedArrayTags[objectTag$3] =
- typedArrayTags[regexpTag$3] =
- typedArrayTags[setTag$5] =
- typedArrayTags[stringTag$3] =
- typedArrayTags[weakMapTag$2] =
- !1;
- function baseIsTypedArray(e) {
- return (
- isObjectLike(e) && isLength(e.length) && !!typedArrayTags[baseGetTag(e)]
- );
- }
- function baseUnary(e) {
- return function (t) {
- return e(t);
- };
- }
- var freeExports$1 =
- typeof exports == 'object' && exports && !exports.nodeType && exports,
- freeModule$1 =
- freeExports$1 &&
- typeof module == 'object' &&
- module &&
- !module.nodeType &&
- module,
- moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1,
- freeProcess = moduleExports$1 && freeGlobal$1.process,
- nodeUtil = (function () {
- try {
- var e =
- freeModule$1 &&
- freeModule$1.require &&
- freeModule$1.require('util').types;
- return (
- e || (freeProcess && freeProcess.binding && freeProcess.binding('util'))
- );
- } catch (t) {}
- })(),
- nodeUtil$1 = nodeUtil,
- nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray,
- isTypedArray = nodeIsTypedArray
- ? baseUnary(nodeIsTypedArray)
- : baseIsTypedArray,
- isTypedArray$1 = isTypedArray,
- objectProto$8 = Object.prototype,
- hasOwnProperty$7 = objectProto$8.hasOwnProperty;
- function arrayLikeKeys(e, t) {
- var r = isArray$1(e),
- i = !r && isArguments$1(e),
- s = !r && !i && isBuffer$1(e),
- a = !r && !i && !s && isTypedArray$1(e),
- o = r || i || s || a,
- n = o ? baseTimes(e.length, String) : [],
- l = n.length;
- for (var f in e)
- (t || hasOwnProperty$7.call(e, f)) &&
- !(
- o &&
- (f == 'length' ||
- (s && (f == 'offset' || f == 'parent')) ||
- (a && (f == 'buffer' || f == 'byteLength' || f == 'byteOffset')) ||
- isIndex(f, l))
- ) &&
- n.push(f);
- return n;
- }
- function overArg(e, t) {
- return function (r) {
- return e(t(r));
- };
- }
- var nativeKeys = overArg(Object.keys, Object),
- nativeKeys$1 = nativeKeys,
- objectProto$7 = Object.prototype,
- hasOwnProperty$6 = objectProto$7.hasOwnProperty;
- function baseKeys(e) {
- if (!isPrototype(e)) return nativeKeys$1(e);
- var t = [];
- for (var r in Object(e))
- hasOwnProperty$6.call(e, r) && r != 'constructor' && t.push(r);
- return t;
- }
- function keys(e) {
- return isArrayLike(e) ? arrayLikeKeys(e) : baseKeys(e);
- }
- function nativeKeysIn(e) {
- var t = [];
- if (e != null) for (var r in Object(e)) t.push(r);
- return t;
- }
- var objectProto$6 = Object.prototype,
- hasOwnProperty$5 = objectProto$6.hasOwnProperty;
- function baseKeysIn(e) {
- if (!isObject(e)) return nativeKeysIn(e);
- var t = isPrototype(e),
- r = [];
- for (var i in e)
- (i == 'constructor' && (t || !hasOwnProperty$5.call(e, i))) || r.push(i);
- return r;
- }
- function keysIn(e) {
- return isArrayLike(e) ? arrayLikeKeys(e, !0) : baseKeysIn(e);
- }
- var nativeCreate = getNative(Object, 'create'),
- nativeCreate$1 = nativeCreate;
- function hashClear() {
- (this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {}), (this.size = 0);
- }
- function hashDelete(e) {
- var t = this.has(e) && delete this.__data__[e];
- return (this.size -= t ? 1 : 0), t;
- }
- var HASH_UNDEFINED$2 = '__lodash_hash_undefined__',
- objectProto$5 = Object.prototype,
- hasOwnProperty$4 = objectProto$5.hasOwnProperty;
- function hashGet(e) {
- var t = this.__data__;
- if (nativeCreate$1) {
- var r = t[e];
- return r === HASH_UNDEFINED$2 ? void 0 : r;
- }
- return hasOwnProperty$4.call(t, e) ? t[e] : void 0;
- }
- var objectProto$4 = Object.prototype,
- hasOwnProperty$3 = objectProto$4.hasOwnProperty;
- function hashHas(e) {
- var t = this.__data__;
- return nativeCreate$1 ? t[e] !== void 0 : hasOwnProperty$3.call(t, e);
- }
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
- function hashSet(e, t) {
- var r = this.__data__;
- return (
- (this.size += this.has(e) ? 0 : 1),
- (r[e] = nativeCreate$1 && t === void 0 ? HASH_UNDEFINED$1 : t),
- this
- );
- }
- function Hash(e) {
- var t = -1,
- r = e == null ? 0 : e.length;
- for (this.clear(); ++t < r; ) {
- var i = e[t];
- this.set(i[0], i[1]);
- }
- }
- Hash.prototype.clear = hashClear;
- Hash.prototype.delete = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- function listCacheClear() {
- (this.__data__ = []), (this.size = 0);
- }
- function assocIndexOf(e, t) {
- for (var r = e.length; r--; ) if (eq(e[r][0], t)) return r;
- return -1;
- }
- var arrayProto = Array.prototype,
- splice = arrayProto.splice;
- function listCacheDelete(e) {
- var t = this.__data__,
- r = assocIndexOf(t, e);
- if (r < 0) return !1;
- var i = t.length - 1;
- return r == i ? t.pop() : splice.call(t, r, 1), --this.size, !0;
- }
- function listCacheGet(e) {
- var t = this.__data__,
- r = assocIndexOf(t, e);
- return r < 0 ? void 0 : t[r][1];
- }
- function listCacheHas(e) {
- return assocIndexOf(this.__data__, e) > -1;
- }
- function listCacheSet(e, t) {
- var r = this.__data__,
- i = assocIndexOf(r, e);
- return i < 0 ? (++this.size, r.push([e, t])) : (r[i][1] = t), this;
- }
- function ListCache(e) {
- var t = -1,
- r = e == null ? 0 : e.length;
- for (this.clear(); ++t < r; ) {
- var i = e[t];
- this.set(i[0], i[1]);
- }
- }
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype.delete = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- var Map = getNative(root$1, 'Map'),
- Map$1 = Map;
- function mapCacheClear() {
- (this.size = 0),
- (this.__data__ = {
- hash: new Hash(),
- map: new (Map$1 || ListCache)(),
- string: new Hash()
- });
- }
- function isKeyable(e) {
- var t = typeof e;
- return t == 'string' || t == 'number' || t == 'symbol' || t == 'boolean'
- ? e !== '__proto__'
- : e === null;
- }
- function getMapData(e, t) {
- var r = e.__data__;
- return isKeyable(t) ? r[typeof t == 'string' ? 'string' : 'hash'] : r.map;
- }
- function mapCacheDelete(e) {
- var t = getMapData(this, e).delete(e);
- return (this.size -= t ? 1 : 0), t;
- }
- function mapCacheGet(e) {
- return getMapData(this, e).get(e);
- }
- function mapCacheHas(e) {
- return getMapData(this, e).has(e);
- }
- function mapCacheSet(e, t) {
- var r = getMapData(this, e),
- i = r.size;
- return r.set(e, t), (this.size += r.size == i ? 0 : 1), this;
- }
- function MapCache(e) {
- var t = -1,
- r = e == null ? 0 : e.length;
- for (this.clear(); ++t < r; ) {
- var i = e[t];
- this.set(i[0], i[1]);
- }
- }
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype.delete = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- function arrayPush(e, t) {
- for (var r = -1, i = t.length, s = e.length; ++r < i; ) e[s + r] = t[r];
- return e;
- }
- var getPrototype = overArg(Object.getPrototypeOf, Object),
- getPrototype$1 = getPrototype;
- function stackClear() {
- (this.__data__ = new ListCache()), (this.size = 0);
- }
- function stackDelete(e) {
- var t = this.__data__,
- r = t.delete(e);
- return (this.size = t.size), r;
- }
- function stackGet(e) {
- return this.__data__.get(e);
- }
- function stackHas(e) {
- return this.__data__.has(e);
- }
- var LARGE_ARRAY_SIZE = 200;
- function stackSet(e, t) {
- var r = this.__data__;
- if (r instanceof ListCache) {
- var i = r.__data__;
- if (!Map$1 || i.length < LARGE_ARRAY_SIZE - 1)
- return i.push([e, t]), (this.size = ++r.size), this;
- r = this.__data__ = new MapCache(i);
- }
- return r.set(e, t), (this.size = r.size), this;
- }
- function Stack(e) {
- var t = (this.__data__ = new ListCache(e));
- this.size = t.size;
- }
- Stack.prototype.clear = stackClear;
- Stack.prototype.delete = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- function baseAssign(e, t) {
- return e && copyObject(t, keys(t), e);
- }
- function baseAssignIn(e, t) {
- return e && copyObject(t, keysIn(t), e);
- }
- var freeExports =
- typeof exports == 'object' && exports && !exports.nodeType && exports,
- freeModule =
- freeExports &&
- typeof module == 'object' &&
- module &&
- !module.nodeType &&
- module,
- moduleExports = freeModule && freeModule.exports === freeExports,
- Buffer = moduleExports ? root$1.Buffer : void 0,
- allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
- function cloneBuffer(e, t) {
- if (t) return e.slice();
- var r = e.length,
- i = allocUnsafe ? allocUnsafe(r) : new e.constructor(r);
- return e.copy(i), i;
- }
- function arrayFilter(e, t) {
- for (var r = -1, i = e == null ? 0 : e.length, s = 0, a = []; ++r < i; ) {
- var o = e[r];
- t(o, r, e) && (a[s++] = o);
- }
- return a;
- }
- function stubArray() {
- return [];
- }
- var objectProto$3 = Object.prototype,
- propertyIsEnumerable = objectProto$3.propertyIsEnumerable,
- nativeGetSymbols$1 = Object.getOwnPropertySymbols,
- getSymbols = nativeGetSymbols$1
- ? function (e) {
- return e == null
- ? []
- : ((e = Object(e)),
- arrayFilter(nativeGetSymbols$1(e), function (t) {
- return propertyIsEnumerable.call(e, t);
- }));
- }
- : stubArray,
- getSymbols$1 = getSymbols;
- function copySymbols(e, t) {
- return copyObject(e, getSymbols$1(e), t);
- }
- var nativeGetSymbols = Object.getOwnPropertySymbols,
- getSymbolsIn = nativeGetSymbols
- ? function (e) {
- for (var t = []; e; )
- arrayPush(t, getSymbols$1(e)), (e = getPrototype$1(e));
- return t;
- }
- : stubArray,
- getSymbolsIn$1 = getSymbolsIn;
- function copySymbolsIn(e, t) {
- return copyObject(e, getSymbolsIn$1(e), t);
- }
- function baseGetAllKeys(e, t, r) {
- var i = t(e);
- return isArray$1(e) ? i : arrayPush(i, r(e));
- }
- function getAllKeys(e) {
- return baseGetAllKeys(e, keys, getSymbols$1);
- }
- function getAllKeysIn(e) {
- return baseGetAllKeys(e, keysIn, getSymbolsIn$1);
- }
- var DataView = getNative(root$1, 'DataView'),
- DataView$1 = DataView,
- Promise$1 = getNative(root$1, 'Promise'),
- Promise$2 = Promise$1,
- Set = getNative(root$1, 'Set'),
- Set$1 = Set,
- mapTag$4 = '[object Map]',
- objectTag$2 = '[object Object]',
- promiseTag = '[object Promise]',
- setTag$4 = '[object Set]',
- weakMapTag$1 = '[object WeakMap]',
- dataViewTag$3 = '[object DataView]',
- dataViewCtorString = toSource(DataView$1),
- mapCtorString = toSource(Map$1),
- promiseCtorString = toSource(Promise$2),
- setCtorString = toSource(Set$1),
- weakMapCtorString = toSource(WeakMap$1),
- getTag = baseGetTag;
- ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3) ||
- (Map$1 && getTag(new Map$1()) != mapTag$4) ||
- (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
- (Set$1 && getTag(new Set$1()) != setTag$4) ||
- (WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1)) &&
- (getTag = function (e) {
- var t = baseGetTag(e),
- r = t == objectTag$2 ? e.constructor : void 0,
- i = r ? toSource(r) : '';
- if (i)
- switch (i) {
- case dataViewCtorString:
- return dataViewTag$3;
- case mapCtorString:
- return mapTag$4;
- case promiseCtorString:
- return promiseTag;
- case setCtorString:
- return setTag$4;
- case weakMapCtorString:
- return weakMapTag$1;
- }
- return t;
- });
- var getTag$1 = getTag,
- objectProto$2 = Object.prototype,
- hasOwnProperty$2 = objectProto$2.hasOwnProperty;
- function initCloneArray(e) {
- var t = e.length,
- r = new e.constructor(t);
- return (
- t &&
- typeof e[0] == 'string' &&
- hasOwnProperty$2.call(e, 'index') &&
- ((r.index = e.index), (r.input = e.input)),
- r
- );
- }
- var Uint8Array$1 = root$1.Uint8Array,
- Uint8Array$1$1 = Uint8Array$1;
- function cloneArrayBuffer(e) {
- var t = new e.constructor(e.byteLength);
- return new Uint8Array$1$1(t).set(new Uint8Array$1$1(e)), t;
- }
- function cloneDataView(e, t) {
- var r = t ? cloneArrayBuffer(e.buffer) : e.buffer;
- return new e.constructor(r, e.byteOffset, e.byteLength);
- }
- var reFlags = /\w*$/;
- function cloneRegExp(e) {
- var t = new e.constructor(e.source, reFlags.exec(e));
- return (t.lastIndex = e.lastIndex), t;
- }
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0,
- symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
- function cloneSymbol(e) {
- return symbolValueOf$1 ? Object(symbolValueOf$1.call(e)) : {};
- }
- function cloneTypedArray(e, t) {
- var r = t ? cloneArrayBuffer(e.buffer) : e.buffer;
- return new e.constructor(r, e.byteOffset, e.length);
- }
- var boolTag$2 = '[object Boolean]',
- dateTag$2 = '[object Date]',
- mapTag$3 = '[object Map]',
- numberTag$2 = '[object Number]',
- regexpTag$2 = '[object RegExp]',
- setTag$3 = '[object Set]',
- stringTag$2 = '[object String]',
- symbolTag$2 = '[object Symbol]',
- arrayBufferTag$2 = '[object ArrayBuffer]',
- dataViewTag$2 = '[object DataView]',
- float32Tag$1 = '[object Float32Array]',
- float64Tag$1 = '[object Float64Array]',
- int8Tag$1 = '[object Int8Array]',
- int16Tag$1 = '[object Int16Array]',
- int32Tag$1 = '[object Int32Array]',
- uint8Tag$1 = '[object Uint8Array]',
- uint8ClampedTag$1 = '[object Uint8ClampedArray]',
- uint16Tag$1 = '[object Uint16Array]',
- uint32Tag$1 = '[object Uint32Array]';
- function initCloneByTag(e, t, r) {
- var i = e.constructor;
- switch (t) {
- case arrayBufferTag$2:
- return cloneArrayBuffer(e);
- case boolTag$2:
- case dateTag$2:
- return new i(+e);
- case dataViewTag$2:
- return cloneDataView(e, r);
- case float32Tag$1:
- case float64Tag$1:
- case int8Tag$1:
- case int16Tag$1:
- case int32Tag$1:
- case uint8Tag$1:
- case uint8ClampedTag$1:
- case uint16Tag$1:
- case uint32Tag$1:
- return cloneTypedArray(e, r);
- case mapTag$3:
- return new i();
- case numberTag$2:
- case stringTag$2:
- return new i(e);
- case regexpTag$2:
- return cloneRegExp(e);
- case setTag$3:
- return new i();
- case symbolTag$2:
- return cloneSymbol(e);
- }
- }
- function initCloneObject(e) {
- return typeof e.constructor == 'function' && !isPrototype(e)
- ? baseCreate$1(getPrototype$1(e))
- : {};
- }
- var mapTag$2 = '[object Map]';
- function baseIsMap(e) {
- return isObjectLike(e) && getTag$1(e) == mapTag$2;
- }
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap,
- isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap,
- isMap$1 = isMap,
- setTag$2 = '[object Set]';
- function baseIsSet(e) {
- return isObjectLike(e) && getTag$1(e) == setTag$2;
- }
- var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet,
- isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet,
- isSet$1 = isSet,
- CLONE_DEEP_FLAG$1 = 1,
- CLONE_FLAT_FLAG = 2,
- CLONE_SYMBOLS_FLAG$1 = 4,
- argsTag$1 = '[object Arguments]',
- arrayTag$1 = '[object Array]',
- boolTag$1 = '[object Boolean]',
- dateTag$1 = '[object Date]',
- errorTag$1 = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag$1 = '[object Map]',
- numberTag$1 = '[object Number]',
- objectTag$1 = '[object Object]',
- regexpTag$1 = '[object RegExp]',
- setTag$1 = '[object Set]',
- stringTag$1 = '[object String]',
- symbolTag$1 = '[object Symbol]',
- weakMapTag = '[object WeakMap]',
- arrayBufferTag$1 = '[object ArrayBuffer]',
- dataViewTag$1 = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]',
- cloneableTags = {};
- cloneableTags[argsTag$1] =
- cloneableTags[arrayTag$1] =
- cloneableTags[arrayBufferTag$1] =
- cloneableTags[dataViewTag$1] =
- cloneableTags[boolTag$1] =
- cloneableTags[dateTag$1] =
- cloneableTags[float32Tag] =
- cloneableTags[float64Tag] =
- cloneableTags[int8Tag] =
- cloneableTags[int16Tag] =
- cloneableTags[int32Tag] =
- cloneableTags[mapTag$1] =
- cloneableTags[numberTag$1] =
- cloneableTags[objectTag$1] =
- cloneableTags[regexpTag$1] =
- cloneableTags[setTag$1] =
- cloneableTags[stringTag$1] =
- cloneableTags[symbolTag$1] =
- cloneableTags[uint8Tag] =
- cloneableTags[uint8ClampedTag] =
- cloneableTags[uint16Tag] =
- cloneableTags[uint32Tag] =
- !0;
- cloneableTags[errorTag$1] =
- cloneableTags[funcTag] =
- cloneableTags[weakMapTag] =
- !1;
- function baseClone(e, t, r, i, s, a) {
- var o,
- n = t & CLONE_DEEP_FLAG$1,
- l = t & CLONE_FLAT_FLAG,
- f = t & CLONE_SYMBOLS_FLAG$1;
- if ((r && (o = s ? r(e, i, s, a) : r(e)), o !== void 0)) return o;
- if (!isObject(e)) return e;
- var g = isArray$1(e);
- if (g) {
- if (((o = initCloneArray(e)), !n)) return copyArray(e, o);
- } else {
- var S = getTag$1(e),
- c = S == funcTag || S == genTag;
- if (isBuffer$1(e)) return cloneBuffer(e, n);
- if (S == objectTag$1 || S == argsTag$1 || (c && !s)) {
- if (((o = l || c ? {} : initCloneObject(e)), !n))
- return l
- ? copySymbolsIn(e, baseAssignIn(o, e))
- : copySymbols(e, baseAssign(o, e));
- } else {
- if (!cloneableTags[S]) return s ? e : {};
- o = initCloneByTag(e, S, n);
- }
- }
- a || (a = new Stack());
- var P = a.get(e);
- if (P) return P;
- a.set(e, o),
- isSet$1(e)
- ? e.forEach(function (x) {
- o.add(baseClone(x, t, r, x, e, a));
- })
- : isMap$1(e) &&
- e.forEach(function (x, u) {
- o.set(u, baseClone(x, t, r, u, e, a));
- });
- var d = f ? (l ? getAllKeysIn : getAllKeys) : l ? keysIn : keys,
- p = g ? void 0 : d(e);
- return (
- arrayEach(p || e, function (x, u) {
- p && ((u = x), (x = e[u])),
- assignValue(o, u, baseClone(x, t, r, u, e, a));
- }),
- o
- );
- }
- var CLONE_DEEP_FLAG = 1,
- CLONE_SYMBOLS_FLAG = 4;
- function cloneDeep(e) {
- return baseClone(e, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
- }
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
- function setCacheAdd(e) {
- return this.__data__.set(e, HASH_UNDEFINED), this;
- }
- function setCacheHas(e) {
- return this.__data__.has(e);
- }
- function SetCache(e) {
- var t = -1,
- r = e == null ? 0 : e.length;
- for (this.__data__ = new MapCache(); ++t < r; ) this.add(e[t]);
- }
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
- function arraySome(e, t) {
- for (var r = -1, i = e == null ? 0 : e.length; ++r < i; )
- if (t(e[r], r, e)) return !0;
- return !1;
- }
- function cacheHas(e, t) {
- return e.has(t);
- }
- var COMPARE_PARTIAL_FLAG$3 = 1,
- COMPARE_UNORDERED_FLAG$1 = 2;
- function equalArrays(e, t, r, i, s, a) {
- var o = r & COMPARE_PARTIAL_FLAG$3,
- n = e.length,
- l = t.length;
- if (n != l && !(o && l > n)) return !1;
- var f = a.get(e),
- g = a.get(t);
- if (f && g) return f == t && g == e;
- var S = -1,
- c = !0,
- P = r & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
- for (a.set(e, t), a.set(t, e); ++S < n; ) {
- var d = e[S],
- p = t[S];
- if (i) var x = o ? i(p, d, S, t, e, a) : i(d, p, S, e, t, a);
- if (x !== void 0) {
- if (x) continue;
- c = !1;
- break;
- }
- if (P) {
- if (
- !arraySome(t, function (u, y) {
- if (!cacheHas(P, y) && (d === u || s(d, u, r, i, a)))
- return P.push(y);
- })
- ) {
- c = !1;
- break;
- }
- } else if (!(d === p || s(d, p, r, i, a))) {
- c = !1;
- break;
- }
- }
- return a.delete(e), a.delete(t), c;
- }
- function mapToArray(e) {
- var t = -1,
- r = Array(e.size);
- return (
- e.forEach(function (i, s) {
- r[++t] = [s, i];
- }),
- r
- );
- }
- function setToArray(e) {
- var t = -1,
- r = Array(e.size);
- return (
- e.forEach(function (i) {
- r[++t] = i;
- }),
- r
- );
- }
- var COMPARE_PARTIAL_FLAG$2 = 1,
- COMPARE_UNORDERED_FLAG = 2,
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- symbolProto = Symbol$2 ? Symbol$2.prototype : void 0,
- symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
- function equalByTag(e, t, r, i, s, a, o) {
- switch (r) {
- case dataViewTag:
- if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
- return !1;
- (e = e.buffer), (t = t.buffer);
- case arrayBufferTag:
- return !(
- e.byteLength != t.byteLength ||
- !a(new Uint8Array$1$1(e), new Uint8Array$1$1(t))
- );
- case boolTag:
- case dateTag:
- case numberTag:
- return eq(+e, +t);
- case errorTag:
- return e.name == t.name && e.message == t.message;
- case regexpTag:
- case stringTag:
- return e == t + '';
- case mapTag:
- var n = mapToArray;
- case setTag:
- var l = i & COMPARE_PARTIAL_FLAG$2;
- if ((n || (n = setToArray), e.size != t.size && !l)) return !1;
- var f = o.get(e);
- if (f) return f == t;
- (i |= COMPARE_UNORDERED_FLAG), o.set(e, t);
- var g = equalArrays(n(e), n(t), i, s, a, o);
- return o.delete(e), g;
- case symbolTag:
- if (symbolValueOf) return symbolValueOf.call(e) == symbolValueOf.call(t);
- }
- return !1;
- }
- var COMPARE_PARTIAL_FLAG$1 = 1,
- objectProto$1 = Object.prototype,
- hasOwnProperty$1 = objectProto$1.hasOwnProperty;
- function equalObjects(e, t, r, i, s, a) {
- var o = r & COMPARE_PARTIAL_FLAG$1,
- n = getAllKeys(e),
- l = n.length,
- f = getAllKeys(t),
- g = f.length;
- if (l != g && !o) return !1;
- for (var S = l; S--; ) {
- var c = n[S];
- if (!(o ? c in t : hasOwnProperty$1.call(t, c))) return !1;
- }
- var P = a.get(e),
- d = a.get(t);
- if (P && d) return P == t && d == e;
- var p = !0;
- a.set(e, t), a.set(t, e);
- for (var x = o; ++S < l; ) {
- c = n[S];
- var u = e[c],
- y = t[c];
- if (i) var m = o ? i(y, u, c, t, e, a) : i(u, y, c, e, t, a);
- if (!(m === void 0 ? u === y || s(u, y, r, i, a) : m)) {
- p = !1;
- break;
- }
- x || (x = c == 'constructor');
- }
- if (p && !x) {
- var A = e.constructor,
- T = t.constructor;
- A != T &&
- 'constructor' in e &&
- 'constructor' in t &&
- !(
- typeof A == 'function' &&
- A instanceof A &&
- typeof T == 'function' &&
- T instanceof T
- ) &&
- (p = !1);
- }
- return a.delete(e), a.delete(t), p;
- }
- var COMPARE_PARTIAL_FLAG = 1,
- argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- objectTag = '[object Object]',
- objectProto = Object.prototype,
- hasOwnProperty = objectProto.hasOwnProperty;
- function baseIsEqualDeep(e, t, r, i, s, a) {
- var o = isArray$1(e),
- n = isArray$1(t),
- l = o ? arrayTag : getTag$1(e),
- f = n ? arrayTag : getTag$1(t);
- (l = l == argsTag ? objectTag : l), (f = f == argsTag ? objectTag : f);
- var g = l == objectTag,
- S = f == objectTag,
- c = l == f;
- if (c && isBuffer$1(e)) {
- if (!isBuffer$1(t)) return !1;
- (o = !0), (g = !1);
- }
- if (c && !g)
- return (
- a || (a = new Stack()),
- o || isTypedArray$1(e)
- ? equalArrays(e, t, r, i, s, a)
- : equalByTag(e, t, l, r, i, s, a)
- );
- if (!(r & COMPARE_PARTIAL_FLAG)) {
- var P = g && hasOwnProperty.call(e, '__wrapped__'),
- d = S && hasOwnProperty.call(t, '__wrapped__');
- if (P || d) {
- var p = P ? e.value() : e,
- x = d ? t.value() : t;
- return a || (a = new Stack()), s(p, x, r, i, a);
- }
- }
- return c ? (a || (a = new Stack()), equalObjects(e, t, r, i, s, a)) : !1;
- }
- function baseIsEqual(e, t, r, i, s) {
- return e === t
- ? !0
- : e == null || t == null || (!isObjectLike(e) && !isObjectLike(t))
- ? e !== e && t !== t
- : baseIsEqualDeep(e, t, r, i, baseIsEqual, s);
- }
- function isEqual(e, t) {
- return baseIsEqual(e, t);
- }
- var _export_sfc = (e, t) => {
- const r = e.__vccOpts || e;
- for (const [i, s] of t) r[i] = s;
- return r;
- };
- const _sfc_main = defineComponent({
- props: {
- animationData: { type: Object, default: () => ({}) },
- animationLink: { type: String, default: '' },
- loop: { type: [Boolean, Number], default: !0 },
- autoPlay: { type: Boolean, default: !0 },
- width: { type: [Number, String], default: '100%' },
- height: { type: [Number, String], default: '100%' },
- speed: { type: Number, default: 1 },
- delay: { type: Number, default: 0 },
- direction: { type: String, default: 'forward' },
- pauseOnHover: { type: Boolean, default: !1 },
- playOnHover: { type: Boolean, default: !1 },
- backgroundColor: { type: String, default: 'transparent' },
- pauseAnimation: { type: Boolean, default: !1 },
- renderer: { type: String, default: 'svg' },
- rendererSettings: { type: Object, default: () => ({}) },
- assetsPath: { type: String, default: '' }
- },
- emits: {
- onComplete: null,
- onLoopComplete: null,
- onEnterFrame: null,
- onSegmentStart: null,
- onAnimationLoaded: null
- },
- setup(e, { emit: t }) {
- let r = ref(null);
- const i = ref('');
- let s = 1;
- const a = I =>
- document.querySelector('[data-id="'.concat(I, '"]')) !== null,
- o = async I => {
- let B = e.autoPlay;
- e.playOnHover && (B = !1);
- let z = {};
- if (
- (isEqual(e.animationData, {}) === !1 &&
- (z = cloneDeep(e.animationData)),
- e.animationLink != '')
- )
- try {
- z = await (await fetch(e.animationLink)).json();
- } catch (W) {
- console.error(W);
- return;
- }
- let G = e.loop;
- typeof G == 'number' && G > 0 && (G = G - 1), e.delay > 0 && (B = !1);
- const R = {
- container: I,
- renderer: e.renderer,
- loop: G,
- autoplay: B,
- animationData: z,
- assetsPath: e.assetsPath
- };
- isEqual(e.rendererSettings, {}) === !1 &&
- (R.rendererSettings = e.rendererSettings),
- (r = Lottie.loadAnimation(R)),
- setTimeout(() => {
- (B = e.autoPlay),
- e.playOnHover ? r.pause() : B ? r.play() : r.pause(),
- t('onAnimationLoaded');
- }, e.delay),
- r.setSpeed(e.speed),
- e.direction === 'reverse' && r.setDirection(-1),
- e.direction === 'normal' && r.setDirection(1),
- (e.pauseAnimation || e.playOnHover) && r.pause(),
- r.addEventListener('loopComplete', () => {
- e.direction === 'alternate' &&
- (r.stop(), (s = s * -1), r.setDirection(s), r.play()),
- t('onLoopComplete');
- }),
- r.addEventListener('complete', () => {
- t('onComplete');
- }),
- r.addEventListener('enterFrame', () => {
- t('onEnterFrame');
- }),
- r.addEventListener('segmentStart', () => {
- t('onSegmentStart');
- });
- },
- n = computed(() => {
- let I = e.width,
- B = e.height;
- return (
- typeof e.width == 'number' && (I = ''.concat(e.width, 'px')),
- typeof e.height == 'number' && (B = ''.concat(e.height, 'px')),
- {
- '--lottie-animation-container-width': I,
- '--lottie-animation-container-height': B,
- '--lottie-animation-container-background-color': e.backgroundColor
- }
- );
- }),
- l = () => {
- r && e.pauseOnHover && r.pause(), r && e.playOnHover && r.play();
- },
- f = () => {
- r && e.pauseOnHover && r.play(), r && e.playOnHover && r.pause();
- };
- watch(
- () => e.pauseAnimation,
- () => {
- if ((e.pauseOnHover || e.playOnHover) && e.pauseAnimation) {
- console.error(
- 'If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover'
- );
- return;
- }
- r && (e.pauseAnimation ? r.pause() : r.play());
- }
- );
- const g = () => {
- r && r.play();
- },
- S = () => {
- r && r.pause();
- },
- c = () => {
- r && r.stop();
- },
- P = () => {
- r && r.destroy();
- },
- d = (I = 1) => {
- if (I <= 0) throw new Error('Speed must be greater than 0');
- r && r.setSpeed(I);
- },
- p = I => {
- r &&
- (I === 'forward'
- ? r.setDirection(1)
- : I === 'reverse' && r.setDirection(-1));
- },
- x = (I, B = !0) => {
- r && r.goToAndStop(I, B);
- },
- u = (I, B = !0) => {
- r && r.goToAndPlay(I, B);
- },
- y = (I, B = !1) => {
- r && r.playSegments(I, B);
- },
- m = (I = !0) => {
- r && r.setSubframe(I);
- },
- A = (I = !0) => {
- if (r) return r.getDuration(I);
- },
- T = (I, B = 0) => {
- r && r.renderer.elements[B].updateDocumentData(I);
- },
- E = I => {
- for (
- var B = '',
- z =
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
- G = z.length,
- R = 0;
- R < I;
- R++
- )
- B += z.charAt(Math.floor(Math.random() * G));
- return B;
- },
- _ = I => {
- if (e.pauseOnHover && e.playOnHover)
- throw new Error(
- 'You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.'
- );
- if (e.animationLink === '' && isEqual(e.animationData, {}))
- throw new Error(
- 'You must provide either animationLink or animationData'
- );
- const B = setInterval(() => {
- if (a(I)) {
- clearInterval(B);
- const z = document.querySelector('[data-id="'.concat(I, '" ]'));
- z && o(z);
- }
- }, 0);
- };
- return (
- onMounted(async () => {
- (i.value = E(20)), _(i.value);
- }),
- {
- elementid: i,
- hoverEnded: f,
- hoverStarted: l,
- getCurrentStyle: n,
- play: g,
- pause: S,
- stop: c,
- destroy: P,
- setSpeed: d,
- setDirection: p,
- goToAndStop: x,
- goToAndPlay: u,
- playSegments: y,
- setSubFrame: m,
- getDuration: A,
- updateDocumentData: T
- }
- );
- }
- }),
- _hoisted_1 = ['data-id'];
- function _sfc_render(e, t, r, i, s, a) {
- return (
- openBlock(),
- createElementBlock(
- 'div',
- {
- 'data-id': e.elementid,
- class: 'lottie-animation-container',
- style: normalizeStyle(e.getCurrentStyle),
- onMouseenter:
- t[0] || (t[0] = (...o) => e.hoverStarted && e.hoverStarted(...o)),
- onMouseleave:
- t[1] || (t[1] = (...o) => e.hoverEnded && e.hoverEnded(...o))
- },
- null,
- 44,
- _hoisted_1
- )
- );
- }
- var Vue3Lottie = _export_sfc(_sfc_main, [['render', _sfc_render]]);
- const v = '5.7.1',
- fr = 60,
- ip = 0,
- op = 120,
- w = 2436,
- h = 1125,
- nm = '合成 1',
- ddd = 0,
- assets = [
- {
- id: 'image_0',
- w: 195,
- h: 264,
- u: '',
- p: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMMAAAEICAYAAADiJ0BpAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAgAElEQVR4nO19ebxlRXXut85tGhBoZGjAhEkRISjJQ5QYYwjghBFiVMQ5xhiHRJOoz0jEiahIElEjUcOLmJ8xosGg4hRFoy2IedHggMg8NUQF6WZqmga6++4vf1StqlW19xnu1Hc3d31w+5yzd1WtqtprrqpzBFsh7r9p1aOmNzdHgTyK4AFosFKEKwksBxj+JwEBQMZa8TV+ZvwcitC0Hu+T4R6YmpFUj6bdXDYWCKVqurlwqgMBpCiby5CESEm37Kul30Ay8dwJ4C6Qt1HkFwJ+F4PBBZze8Vu7PubEu0bP8NKELHYHJgV5zbb3rb7p+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T3A1OqgpagsGupaegr0jailp2SVwFiu2J1lSGsES1tZOtt9SsSF1BRgs/lfTE3Z4hb+F1JUpjSkbtClRtrZYuqktukLVacYYSlXctsGTZT0m1wJTlKO4XpwwLRPMRl1amXcdINdWkr9HhUD/8ovZKVdqsc+PWWq+jduU8nbuLyWlxtY27qpBzmHS+NV3iGVprAvn2nq5XyV7IIyYlpay/hW6NNvQU8b/tv8hijRx67vHqoFPc/rU8VdbRpwzmbyZZtskBq8z+WMy1f+pQs2hWEc3MdoKBrn1yV5GG707xOEUhkQ7TCYUn++lL5wAbs+t1SVcUqsAK0+lvXQusk9+OW8lXeXLv97onf+PdnAlz/RvEdqyMiv5VTs0EebEambuaeKtK7oqSvv4O72hTou8xvfZ3mdZxBkEhOWPeof0VIldsZLieY7v5f+Z6kSiZRGbarsiXMDeJ8aU2TqYMneZt+kjV2d7a08aWfANQSXWnpJSoZM5Pa86alKYrhN0Pj7PB2lfvVlX59J7hkRdTFLljtUKvYnjakrlBsLbZ/qPNJZX6Se/lOFy2OocUix2CBpczskB0zthsQ0DWkNsEnv2KSoDO9AsrzNhGv09jQq/55xs5XNQ0rOxET5Ul745RG223vl1VNVSl4L/GKqSktVWnw5VSXt7JDXNJVmo3nGy4rT0lRKCgn0NJWZ+r1x8gwsU5RxsZS7B8xzE6vSCjPNkKlpKiVFpcEtlPSiZZrM8v9MVZnnloFS6oZUFTjZntY0lXkyS0lTubPNPBmHD7bhgKn1wGFuNw9mw4mTZx8BjuWWABH2MYxr+olnw225PdDSVKLcGOAGbo4Fzi43AUqayg320VcPcrlNAGzSVGqKymtnf8CHXExR4SGuOC1NxbEYHuO8+H1SVIDLaSpAS1X55m+wfPLaT3jCy5cvefLpH0r7n1+ZF9s0la/4is9+/q/LNxDuuX3wa5rKv6/8EycY65bo+YM2AAAAAElFTkSuQmCC',
- e: 1
- }
- ],
- layers = [
- {
- ddd: 0,
- ind: 1,
- ty: 2,
- nm: '加载视频@3x.png',
- cl: 'png',
- refId: 'image_0',
- sr: 1,
- ks: {
- o: { a: 0, k: 100, ix: 11 },
- r: { a: 0, k: 0, ix: 10 },
- p: { a: 0, k: [1218, 562, 0], ix: 2 },
- a: { a: 0, k: [97.5, 132, 0], ix: 1 },
- s: { a: 0, k: [100, 100, 100], ix: 6 }
- },
- ao: 0,
- ip: 0,
- op: 300,
- st: 0,
- bm: 0
- },
- {
- ddd: 0,
- ind: 2,
- ty: 2,
- nm: '进度条@3x.png',
- cl: 'png',
- refId: 'image_1',
- sr: 1,
- ks: {
- o: {
- a: 1,
- k: [
- {
- i: { x: [0.667], y: [1] },
- o: { x: [0.333], y: [0] },
- t: 60,
- s: [100],
- e: [0]
- },
- {
- i: { x: [0.667], y: [1] },
- o: { x: [0.333], y: [0] },
- t: 61,
- s: [0],
- e: [0]
- },
- { t: 120 }
- ],
- ix: 11
- },
- r: { a: 0, k: 0, ix: 10 },
- p: { a: 0, k: [678, 587.5, 0], ix: 2 },
- a: { a: 0, k: [0, 1.5, 0], ix: 1 },
- s: {
- a: 1,
- k: [
- {
- i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
- o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
- t: 0,
- s: [0, 100, 100],
- e: [100, 100, 100]
- },
- { t: 60 }
- ],
- ix: 6
- }
- },
- ao: 0,
- ip: 0,
- op: 300,
- st: 0,
- bm: 0
- },
- {
- ddd: 0,
- ind: 3,
- ty: 2,
- nm: '进度条@3x.png',
- cl: 'png',
- refId: 'image_1',
- sr: 1,
- ks: {
- o: {
- a: 1,
- k: [
- {
- i: { x: [0.667], y: [1] },
- o: { x: [0.333], y: [0] },
- t: 0,
- s: [0],
- e: [0]
- },
- {
- i: { x: [0.667], y: [1] },
- o: { x: [0.333], y: [0] },
- t: 60,
- s: [0],
- e: [100]
- },
- { t: 61 }
- ],
- ix: 11
- },
- r: { a: 0, k: 0, ix: 10 },
- p: { a: 0, k: [1758, 589, 0], ix: 2 },
- a: { a: 0, k: [1080, 3, 0], ix: 1 },
- s: {
- a: 1,
- k: [
- {
- i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
- o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
- t: 60,
- s: [100, 100, 100],
- e: [100, 100, 100]
- },
- {
- i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] },
- o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] },
- t: 61,
- s: [100, 100, 100],
- e: [0, 100, 100]
- },
- { t: 120 }
- ],
- ix: 6
- }
- },
- ao: 0,
- ip: 0,
- op: 300,
- st: 0,
- bm: 0
- }
- ],
- markers = [],
- playLoadData = { v, fr, ip, op, w, h, nm, ddd, assets, layers, markers },
- videoWrap = '_videoWrap_19uw7_1',
- sectionAnimate$1 = '_sectionAnimate_19uw7_5',
- controls$1 = '_controls_19uw7_11',
- time$1 = '_time_19uw7_24',
- line$1 = '_line_19uw7_36',
- actions$1 = '_actions_19uw7_43',
- actionWrap$1 = '_actionWrap_19uw7_51',
- actionBtn$1 = '_actionBtn_19uw7_54',
- iconReplay$1 = '_iconReplay_19uw7_65',
- slider$1 = '_slider_19uw7_74',
- styles$3 = {
- videoWrap,
- sectionAnimate: sectionAnimate$1,
- controls: controls$1,
- time: time$1,
- line: line$1,
- actions: actions$1,
- actionWrap: actionWrap$1,
- actionBtn: actionBtn$1,
- iconReplay: iconReplay$1,
- slider: slider$1
- },
- VideoPlay = defineComponent({
- name: 'video-play',
- props: {
- item: { type: Object, default: () => ({}) },
- isEmtry: { type: Boolean, default: !1 }
- },
- emits: ['loadedmetadata', 'togglePlay', 'ended', 'reset', 'error'],
- setup(e, { emit: t, expose: r }) {
- const { item: i, isEmtry: s } = toRefs(e),
- a = reactive({
- paused: !0,
- currentTimeNum: 0,
- currentTime: '00:00',
- durationNum: 0,
- duration: '00:00',
- showBar: !0
- }),
- o = ref(),
- n = ref(),
- l = ref('video' + Date.now() + Math.floor(Math.random() * 100)),
- f = p => {
- if (p > 0) {
- const x = Math.floor(p / 60),
- u = p % 60;
- return (x < 10 ? '0' + x : x) + ':' + (u < 10 ? '0' + u : u);
- } else return '00:00';
- },
- g = () => {
- n.value && (n.value.src(i.value.content), t('reset'));
- },
- S = p => {
- a.showBar = p;
- },
- c = () => {
- n.value && n.value.currentTime(0);
- },
- P = p => {
- p == null || p.stopPropagation(),
- a.paused
- ? (n.value.play(), (a.paused = !1))
- : (n.value.pause(), (a.paused = !0)),
- t('togglePlay', a.paused);
- };
- onMounted(() => {
- (n.value = TCPlayer(l.value, { appID: '', controls: !1 })),
- n.value &&
- (n.value.src(s.value ? '' : i.value.content),
- n.value.one('loadedmetadata', () => {
- console.log(' Loading metadata'),
- (a.duration = f(Math.round(n.value.duration()))),
- (a.durationNum = n.value.duration()),
- t('loadedmetadata', n.value);
- }),
- n.value.on('timeupdate', () => {
- var p;
- (a.currentTime = f(
- Math.round(
- ((p = n.value) == null ? void 0 : p.currentTime()) || 0
- )
- )),
- (a.currentTimeNum = n.value.currentTime());
- }),
- n.value.on('ended', () => {
- (a.paused = !0), t('ended');
- }),
- n.value.on('pause', () => {
- a.paused = !0;
- }),
- n.value.on('playing', () => {
- a.paused = !1;
- }),
- n.value.on('error', p => {
- t('error'), console.log(p, 'error');
- }));
- });
- const d = () => {
- n.value.currentTime(0), n.value.pause();
- };
- return (
- onUnmounted(() => {
- n.value && (n.value.pause(), n.value.src(''), n.value.dispose());
- }),
- r({ onPlay: g, stop: d, toggleHideControl: S }),
- () =>
- createVNode('div', { class: styles$3.videoWrap }, [
- createVNode(
- 'video',
- {
- style: { width: '100%', height: '100%' },
- src: s.value ? '' : i.value.content,
- ref: o,
- id: l.value,
- preload: 'auto',
- playsinline: !0,
- 'webkit-playsinline': !0
- },
- null
- ),
- createVNode(
- 'div',
- {
- class: [
- styles$3.controls,
- a.showBar ? '' : styles$3.sectionAnimate
- ],
- onClick: p => {
- p.stopPropagation(), t('reset');
- }
- },
- [
- createVNode('div', { class: styles$3.actions }, [
- createVNode('div', { class: styles$3.actionWrap }, [
- createVNode(
- 'button',
- { class: styles$3.actionBtn, onClick: P },
- [
- a.paused
- ? createVNode(
- 'img',
- { class: styles$3.playIcon, src: iconplay },
- null
- )
- : createVNode(
- 'img',
- { class: styles$3.playIcon, src: iconpause },
- null
- )
- ]
- )
- ]),
- createVNode('div', { class: styles$3.time }, [
- createVNode(
- 'div',
- {
- class: 'plyr__time plyr__time--current',
- 'aria-label': 'Current time'
- },
- [a.currentTime]
- ),
- createVNode('span', { class: styles$3.line }, [
- createTextVNode('/')
- ]),
- createVNode(
- 'div',
- {
- class: 'plyr__time plyr__time--duration',
- 'aria-label': 'Duration'
- },
- [a.duration]
- )
- ])
- ]),
- createVNode('div', { class: styles$3.slider }, [
- createVNode(
- NSlider,
- {
- value: a.currentTimeNum,
- step: 0.01,
- max: a.durationNum,
- tooltip: !1,
- 'onUpdate:value': p => {
- n.value.currentTime(p),
- (a.currentTimeNum = p),
- (a.currentTime = f(Math.round(p || 0)));
- }
- },
- null
- )
- ]),
- createVNode('div', { class: styles$3.actions }, [
- createVNode('div', { class: styles$3.actionWrap }, [
- createVNode(
- 'button',
- { class: styles$3.iconReplay, onClick: c },
- [createVNode('img', { src: iconReplay$2 }, null)]
- )
- ])
- ])
- ]
- )
- ])
- );
- }
- }),
- pen = '_pen_apyjn_1',
- open = '_open_apyjn_9',
- whiteboard = '_whiteboard_apyjn_12',
- hide = '_hide_apyjn_15',
- iframe = '_iframe_apyjn_18',
- dely = '_dely_apyjn_24',
- rightItem = '_rightItem_apyjn_27',
- img = '_img_apyjn_42',
- removeVisiable = '_removeVisiable_apyjn_50',
- studentRemove = '_studentRemove_apyjn_56',
- btnGroupModal = '_btnGroupModal_apyjn_68',
- styles$2 = {
- pen,
- open,
- whiteboard,
- hide,
- iframe,
- dely,
- rightItem,
- img,
- removeVisiable,
- studentRemove,
- btnGroupModal
- },
- Pen = defineComponent({
- name: 'pen-page',
- props: {
- show: { type: Boolean, default: !1 },
- type: { type: String, default: 'pen' },
- close: { type: Function, default: () => ({}) }
- },
- setup(e) {
- const { show: t, type: r } = toRefs(e),
- i = reactive({
- status: !1,
- title: r.value === 'pen' ? '退出批注' : '退出白板',
- content:
- r.value === 'pen' ? '确认是否退出批注?' : '确认是否退出白板?'
- }),
- s = ref(!0),
- a = /(localhost|192)/.test(location.host)
- ? 'https://test.lexiaoya.cn/'
- : location.origin,
- o = ''.concat(a, '/classroom-whiteboard?t=').concat(+new Date());
- return () =>
- createVNode(
- 'div',
- {
- class: [
- styles$2.pen,
- r.value === 'whiteboard' ? styles$2.whiteboard : '',
- s.value ? styles$2.dely : '',
- t.value ? styles$2.open : styles$2.hide
- ]
- },
- [
- createVNode(
- 'iframe',
- {
- class: styles$2.iframe,
- frameborder: '0',
- width: '100vw',
- height: '100vh',
- src: o,
- onLoad: () => {
- s.value = !1;
- }
- },
- null
- ),
- createVNode(
- 'div',
- { class: styles$2.rightItem, onClick: () => (i.status = !0) },
- [
- createVNode(
- 'svg',
- {
- width: '28px',
- height: '28px',
- viewBox: '0 0 34 34',
- version: '1.1',
- xmlns: 'http://www.w3.org/2000/svg'
- },
- [
- createVNode(
- 'g',
- {
- stroke: 'none',
- 'stroke-width': '1',
- fill: 'none',
- 'fill-rule': 'evenodd'
- },
- [
- createVNode(
- 'g',
- {
- transform: 'translate(-1842.000000, -1016.000000)',
- stroke: '#FFFFFF'
- },
- [
- createVNode(
- 'g',
- {
- transform: 'translate(980.000000, 1006.000000)'
- },
- [
- createVNode(
- 'g',
- {
- transform:
- 'translate(862.000000, 10.000000)'
- },
- [
- createVNode(
- 'g',
- {
- transform:
- 'translate(4.000000, 5.000000)'
- },
- [
- createVNode(
- 'g',
- {
- transform:
- 'translate(8.058241, 5.009812)',
- fill: '#FFFFFF',
- 'fill-rule': 'nonzero',
- 'stroke-width': '0.3'
- },
- [
- createVNode(
- 'path',
- {
- d: 'M11.6084252,-0.15 C11.9880433,-0.15 12.3676614,-0.00518057514 12.6573002,0.284458275 L12.6573002,0.284458275 L18.3141545,5.94131252 C18.6037933,6.23095137 18.7486128,6.61056948 18.7486128,6.99018758 C18.7486128,7.36980569 18.6037933,7.74942379 18.3141545,8.03906264 L18.3141545,8.03906264 L12.6573002,13.6959169 C12.3676614,13.9855557 11.9880433,14.1303752 11.6084252,14.1303752 C11.2288071,14.1303752 10.849189,13.9855557 10.5595501,13.6959169 C10.2699113,13.406278 10.1250918,13.0266599 10.1250918,12.6470418 C10.1250918,12.2674237 10.2699113,11.8878056 10.5595368,11.5981801 L10.5595368,11.5981801 L13.6839174,8.47301484 L1.33333333,8.47352092 C0.923722144,8.47352092 0.552888811,8.30749318 0.284458275,8.03906264 C0.0160277386,7.77063211 -0.15,7.39979877 -0.15,6.99018758 C-0.15,6.61194961 -0.00841906355,6.26678575 0.224608408,6.00476938 C0.462154637,5.73767211 0.794779811,5.55707713 1.16932931,5.51583101 L1.16932931,5.51583101 L13.6841044,5.50627626 L10.5595501,2.38220839 C10.2699113,2.09256954 10.1250918,1.71295144 10.1250918,1.33333333 C10.1250918,0.953715229 10.2699113,0.574097124 10.5595501,0.284458275 C10.849189,-0.00518057514 11.2288071,-0.15 11.6084252,-0.15 Z'
- },
- null
- )
- ]
- ),
- createVNode(
- 'path',
- {
- d: 'M15,24 L3,24 C1.34314575,24 -1.1293615e-15,22.6568542 0,21 L0,3 C-2.02906125e-16,1.34314575 1.34314575,3.04359188e-16 3,0 L15,0 L15,0',
- 'stroke-width': '3.5',
- 'stroke-linecap': 'round',
- 'stroke-linejoin': 'round'
- },
- null
- )
- ]
- )
- ]
- )
- ]
- )
- ]
- )
- ]
- )
- ]
- )
- ]
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- show: i.status,
- 'onUpdate:show': n => (i.status = n),
- preset: 'card',
- title: i.title,
- class: ['modalTitle', styles$2.removeVisiable]
- },
- {
- default: () => [
- createVNode('div', { class: styles$2.studentRemove }, [
- createVNode('p', null, [i.content]),
- createVNode(
- NSpace,
- { class: styles$2.btnGroupModal },
- {
- default: () => [
- createVNode(
- NButton,
- {
- type: 'default',
- round: !0,
- onClick: () => {
- i.status = !1;
- }
- },
- { default: () => [createTextVNode('取消')] }
- ),
- createVNode(
- NButton,
- {
- type: 'primary',
- round: !0,
- onClick: () => {
- (i.status = !1), e.close();
- }
- },
- { default: () => [createTextVNode('确认')] }
- )
- ]
- }
- )
- ])
- ]
- }
- )
- ]
- );
- }
- }),
- audioWrap = '_audioWrap_8oxfj_1',
- audioContainer = '_audioContainer_8oxfj_6',
- audio = '_audio_8oxfj_1',
- tempVudio = '_tempVudio_8oxfj_22',
- sectionAnimate = '_sectionAnimate_8oxfj_34',
- controls = '_controls_8oxfj_40',
- time = '_time_8oxfj_53',
- line = '_line_8oxfj_65',
- actions = '_actions_8oxfj_72',
- actionWrap = '_actionWrap_8oxfj_80',
- actionBtn = '_actionBtn_8oxfj_83',
- iconReplay = '_iconReplay_8oxfj_95',
- slider = '_slider_8oxfj_104',
- styles$1 = {
- audioWrap,
- audioContainer,
- audio,
- tempVudio,
- sectionAnimate,
- controls,
- time,
- line,
- actions,
- actionWrap,
- actionBtn,
- iconReplay,
- slider
- },
- AudioPay = defineComponent({
- name: 'audio-play',
- props: {
- item: { type: Object, default: () => ({}) },
- isEmtry: { type: Boolean, default: !1 }
- },
- emits: ['loadedmetadata', 'togglePlay', 'ended', 'reset'],
- setup(e, { emit: t, expose: r }) {
- const i = reactive({
- paused: !0,
- currentTimeNum: 0,
- currentTime: '00:00',
- durationNum: 0,
- duration: '00:00',
- showBar: !0,
- afterMa3: !0
- }),
- s = ref(),
- a = ref();
- let o = null;
- const n = p => {
- var x, u, y;
- console.log(p, 'e', p),
- p == null || p.stopPropagation(),
- a.value.paused
- ? (l(a.value, s.value), a.value.play(), (i.afterMa3 = !1))
- : (x = a.value) == null || x.pause(),
- (i.paused = (u = a.value) == null ? void 0 : u.paused),
- (y = p.target) == null || y.focus(),
- t('togglePlay', i.paused);
- },
- l = (p, x) => {
- o ||
- ((o = new Vudio(p, x, {
- effect: 'waveform',
- accuracy: 256,
- width: 1024,
- height: 600,
- waveform: {
- maxHeight: 200,
- color: [
- [0, '#44D1FF'],
- [0.5, '#44D1FF'],
- [0.5, '#198CFE'],
- [1, '#198CFE']
- ],
- prettify: !1
- }
- })),
- o.dance());
- },
- f = p => {
- if (p > 0) {
- const x = Math.floor(p / 60),
- u = p % 60;
- return (x < 10 ? '0' + x : x) + ':' + (u < 10 ? '0' + u : u);
- } else return '00:00';
- },
- g = p => {
- i.showBar = p;
- },
- S = () => {
- a.value && (a.value.currentTime = 0);
- };
- let c = null;
- const P = ref(),
- d = ref();
- return (
- nextTick(() => {
- (c = new Vudio(d.value, P.value, {
- effect: 'waveform',
- accuracy: 256,
- width: 1024,
- height: 600,
- waveform: {
- maxHeight: 200,
- color: [
- [0, '#44D1FF'],
- [0.5, '#44D1FF'],
- [0.5, '#198CFE'],
- [1, '#198CFE']
- ],
- prettify: !1
- }
- })),
- c.dance();
- }),
- r({ toggleHideControl: g }),
- () =>
- createVNode('div', { class: styles$1.audioWrap }, [
- createVNode('div', { class: styles$1.audioContainer }, [
- createVNode(
- 'audio',
- {
- ref: a,
- crossorigin: 'anonymous',
- src: e.item.content + '?time=1',
- onEnded: () => {
- (i.paused = !0), t('ended');
- },
- onTimeupdate: () => {
- var p, x;
- (i.currentTime = f(
- Math.round(
- ((p = a.value) == null ? void 0 : p.currentTime) || 0
- )
- )),
- (i.currentTimeNum =
- ((x = a.value) == null ? void 0 : x.currentTime) || 0);
- },
- onLoadedmetadata: () => {
- var p, x;
- (i.duration = f(
- Math.round((p = a.value) == null ? void 0 : p.duration)
- )),
- (i.durationNum =
- (x = a.value) == null ? void 0 : x.duration),
- e.item.autoPlay && a.value && a.value.play(),
- a.value &&
- ((a.value.stop = () => {
- var u;
- (u = a.value) == null || u.pause(),
- (i.paused = !0),
- t('togglePlay', i.paused);
- }),
- (a.value.onPlay = () => {
- var u;
- (u = a.value) == null || u.play(),
- (i.paused = !1),
- l(a.value, s.value),
- t('togglePlay', i.paused);
- })),
- t('loadedmetadata', a.value);
- }
- },
- null
- ),
- createVNode('canvas', { ref: s }, null),
- i.afterMa3 &&
- createVNode('div', { class: styles$1.tempVudio }, [
- createVNode('audio', { ref: d, src: tickMp3 }, null),
- createVNode('canvas', { ref: P }, null)
- ])
- ]),
- createVNode(
- 'div',
- {
- class: [
- styles$1.controls,
- i.showBar ? '' : styles$1.sectionAnimate
- ],
- onClick: p => {
- p.stopPropagation(), t('reset');
- }
- },
- [
- createVNode('div', { class: styles$1.actions }, [
- createVNode('div', { class: styles$1.actionWrap }, [
- createVNode(
- 'div',
- { class: styles$1.actionBtn, onClick: n },
- [
- i.paused
- ? createVNode(
- 'img',
- { class: styles$1.playIcon, src: iconplay },
- null
- )
- : createVNode(
- 'img',
- { class: styles$1.playIcon, src: iconpause },
- null
- )
- ]
- )
- ]),
- createVNode('div', { class: styles$1.time }, [
- createVNode(
- 'div',
- {
- class: 'plyr__time plyr__time--current',
- 'aria-label': 'Current time'
- },
- [i.currentTime]
- ),
- createVNode('span', { class: styles$1.line }, [
- createTextVNode('/')
- ]),
- createVNode(
- 'div',
- {
- class: 'plyr__time plyr__time--duration',
- 'aria-label': 'Duration'
- },
- [i.duration]
- )
- ])
- ]),
- createVNode('div', { class: styles$1.slider }, [
- createVNode(
- NSlider,
- {
- value: i.currentTimeNum,
- step: 0.01,
- max: i.durationNum,
- tooltip: !1,
- 'onUpdate:value': p => {
- (a.value.currentTime = p),
- (i.currentTimeNum = p),
- (i.currentTime = f(Math.round(p || 0)));
- }
- },
- null
- )
- ]),
- createVNode('div', { class: styles$1.actions }, [
- createVNode('div', { class: styles$1.actionWrap }, [
- createVNode(
- 'button',
- { class: styles$1.iconReplay, onClick: S },
- [createVNode('img', { src: iconReplay$2 }, null)]
- )
- ])
- ])
- ]
- )
- ])
- );
- }
- }),
- scrollBar = '_scrollBar_ds6lg_1',
- treeParent = '_treeParent_ds6lg_5',
- treeChild = '_treeChild_ds6lg_8',
- treeItem = '_treeItem_ds6lg_11',
- title = '_title_ds6lg_23',
- dir = '_dir_ds6lg_33',
- titleSelect = '_titleSelect_ds6lg_42',
- arrow = '_arrow_ds6lg_50',
- arrowSelect = '_arrowSelect_ds6lg_57',
- childArrow = '_childArrow_ds6lg_61',
- childItem = '_childItem_ds6lg_64',
- childSelect = '_childSelect_ds6lg_71',
- styles = {
- scrollBar,
- treeParent,
- treeChild,
- treeItem,
- title,
- dir,
- titleSelect,
- arrow,
- arrowSelect,
- childArrow,
- childItem,
- childSelect
- },
- Chapter = defineComponent({
- name: 'chapter-modal',
- props: {
- treeList: { type: Array, default: () => [] },
- itemActive: { type: String, default: '' }
- },
- emits: ['handleSelect'],
- setup(e, { emit: t }) {
- const r = useMessage(),
- { treeList: i, itemActive: s } = toRefs(e),
- a = (o, n, l = []) => {
- for (const f of n) {
- if (f.knowledgeList && f.knowledgeList.length > 0) {
- const g = a(o, f.knowledgeList, [...l, f.id]);
- if (g.includes(o)) return g;
- }
- if (f.id === o) return [...l, o];
- }
- return l;
- };
- return (
- watch(
- () => e.itemActive,
- () => {
- const o = a(s.value, i.value);
- o.length > 0 &&
- i.value.forEach(n => {
- n.id == o[0] ? (n.selected = !0) : (n.selected = !1);
- });
- }
- ),
- onMounted(() => {
- const o = a(s.value, i.value);
- o.length > 0 &&
- i.value.forEach(n => {
- n.id == o[0] && (n.selected = !0);
- });
- }),
- () =>
- createVNode(
- NScrollbar,
- { class: styles.scrollBar },
- {
- default: () => [
- createVNode('div', { class: [styles.listSection] }, [
- i.value.map((o, n) =>
- createVNode(
- 'div',
- { class: styles.treeParent, key: 'parent' + n },
- [
- createVNode(
- 'div',
- {
- class: [styles.treeItem, styles.parentItem],
- onClick: () => {
- i.value.forEach(l => {
- o.id !== l.id && (l.selected = !1);
- }),
- (o.selected = !o.selected);
- }
- },
- [
- o.knowledgeList &&
- o.knowledgeList.length > 0 &&
- createVNode(
- 'span',
- {
- class: [
- styles.arrow,
- o.selected ? styles.arrowSelect : ''
- ]
- },
- null
- ),
- createVNode(
- 'p',
- {
- class: [
- styles.title,
- o.selected ? styles.titleSelect : ''
- ]
- },
- [
- createVNode(
- 'span',
- {
- class: [
- styles.dir,
- o.selected ? styles.dirSelect : ''
- ]
- },
- null
- ),
- o.name
- ]
- )
- ]
- ),
- o.selected &&
- o.knowledgeList &&
- o.knowledgeList.map((l, f) =>
- createVNode(
- 'div',
- {
- key: 'child' + f,
- class: [
- styles.treeItem,
- styles.childItem,
- styles.animation,
- s.value === l.id ? styles.childSelect : ''
- ],
- onClick: () => {
- if (s.value != l.id) {
- if (!l.containMaterial) {
- r.error('该章节暂无课件');
- return;
- }
- t('handleSelect', {
- itemActive: l.id,
- itemName: l.name
- });
- }
- }
- },
- [
- createVNode(
- 'span',
- { class: styles.childArrow },
- null
- ),
- createVNode('p', { class: styles.title }, [
- l.name
- ])
- ]
- )
- )
- ]
- )
- )
- ])
- ]
- }
- )
- );
- }
- }),
- iconBeatIcon =
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAMAAADxPgR5AAAAw1BMVEUAAADk9P/k8//l9f/n9f/l9P/l9P/l8//l9P/l9P/l8//l9P/m9P/o9v/o+P/q///k9P/l8//k9P/m9P/m8//l8//l9f/n9v/o8//p9P/////l9P/k8/8wmP/f8f94vf9HpP9gsP/M5/83nP/W6/+94P+Ryf9Cof9Tqv9Np/9xuf/Z7f99v/9ptf80mv/R6v88n//E4/+dz/+Ixf+i0v9XrP+t2P+Zzf9dr/+m1P+Nx/9ksv/i8v+33f+z2/+Bwf+43P+CkBr8AAAAHHRSTlMA+cdMSc777eG2mIpwKyAM0ca/jIOBalRCFwWp75BYaQAABSBJREFUaN7Vm+lyokAQgL3vK9FsstkeFAUv8L6iJjHv/1S7AsFSmO4Gcct8v6yKoZmZvqeNBaOSKhXyD7VcNh7P5moP+UIpVYndiGqqno6DD/F0PVWNWlq5kcgAQibRKEcn7XcpDQzSpd+RiHvJZ4BJJv9ytbhkAgKRSF4l7rkGgUk/h9eURwjFYzmcGRTjEJ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+FUzLBCov8hxvQFk4IrSiE9NkHfSElI7ywQF84Ij0tYfrj+PMDx+U7UtgjlzrC6MhOSHyc8JI4GkLeZjjGCR094VNZuEEK9b5S2J36jmvkV6r50Kwfto8f2N772Iem+1jQboWUTLoVTsi0W+GUuN0KXWJ1K7SIV0EYv/7g87pfo7cYxEELD9JXe+wmithYoc9kbNDbxD5WmEqFMXojbGKFsJP4ggVKaGUvM1jhYhmEAnZP+JcZQruLBc1fSLsTDjLhvDvhnGTYXQltVdskKnpeOA6KtomyMRRkRQQwFMEJxY0hZevrscg0vvGwU7a+yI28kRgijXHeIX9QNPdkUfQDlpFsl0q2CcsIF8IQFpiyJeKRL9BEtaCXVX1bYSZwTfaoonG5xjXZyRhEvCR4XbAHEWPVQUnBOl6ukkBJslrGa/xBCZlBq8wwh114dA67iAUtYvEPLFujLzqSbQl6Jzx0boUL71yO1dsaHDin0Yg2hj/Obbyl6QGecxxRanII61zHzJoapDvnUcEGhiHPf9yz64FW/ZHd0df/aSi5+tj1/zhY3vHofMHQFP84wMTHoPOfP/wGTQWP9qtjfVcAAAAASUVORK5CYII=';
- function _isSlot(e) {
- return (
- typeof e == 'function' ||
- (Object.prototype.toString.call(e) === '[object Object]' && !isVNode(e))
- );
- }
- const AttendClass = defineComponent({
- name: 'CoursewarePlay',
- props: {
- type: { type: String, default: '' },
- subjectId: { type: [String, Number], default: '' },
- lessonCourseId: { type: [String, Number], default: '' },
- detailId: { type: String, default: '' },
- classGroupId: { type: String, default: '' },
- classId: { type: String, defaault: '' },
- preStudentNum: { type: [String, Number], default: '' }
- },
- emits: ['close'],
- setup(e, { emit: t }) {
- const r = useMessage(),
- i = useRoute(),
- s = useRouter(),
- a = useUserStore(),
- o = reactive({ width: '100vw' });
- onUnmounted(() => {});
- const n = reactive({
- type: 'class',
- subjectId: '',
- lessonCourseId: '',
- lessonCoursewareDetailId: '',
- detailId: '',
- classGroupId: '',
- classId: '',
- preStudentNum: '',
- knowledgePointList: [],
- itemList: [],
- videoRefs: {},
- audioRefs: {},
- modelAttendStatus: !1,
- modalAttendMessage: '本节课未设置课后作业,是否继续?',
- modelTrainStatus: !1,
- homeworkStatus: !0,
- removeVisiable: !1,
- removeTitle: '',
- removeContent: ''
- }),
- l = reactive({
- nowTime: 0,
- model: !0,
- isAnimation: !0,
- timer: null,
- item: null
- }),
- f = async () => {
- try {
- const V =
- (
- await queryCourseware({
- coursewareDetailKnowledgeId: n.detailId,
- subjectId: n.subjectId,
- pag: 1,
- rows: 99
- })
- ).data.rows || [],
- O = [];
- V.forEach(j => {
- j.removeFlag ||
- O.push({
- id: j.id,
- materialId: j.materialId,
- coverImg: j.coverImg,
- type: j.materialType,
- title: j.materialName,
- isCollect: !!j.favoriteFlag,
- isSelected: j.source === 'PLATFORM',
- content: j.content
- });
- }),
- (n.knowledgePointList = O),
- (n.itemList = n.knowledgePointList.map(j => ({
- ...j,
- iframeRef: null,
- videoEle: null,
- audioEle: null,
- autoPlay: !1,
- isprepare: !1,
- isRender: !1
- })));
- } catch (D) {}
- },
- g = ref(!1),
- S = ref(!1),
- c = ref(!1),
- P = D => {
- var V, O, j, $, J, X, Y, K;
- if (
- (console.log(
- (V = D.data) == null ? void 0 : V.api,
- D.data,
- 'ev.data'
- ),
- ((O = D.data) == null ? void 0 : O.api) === 'headerTogge' &&
- (l.model = D.data.show || D.data.playState != 'play'),
- ((j = D.data) == null ? void 0 : j.api) === 'onAttendToggleMenu' &&
- (l.model = !l.model),
- (($ = D.data) == null ? void 0 : $.api) === 'api_fingerPreView' &&
- (clearInterval(l.timer), (l.model = !D.data.state)),
- ((J = D.data) == null ? void 0 : J.api) === 'documentBodyKeyup' &&
- (((X = D.data) == null ? void 0 : X.code) === 'ArrowLeft' &&
- (M(), H('up')),
- ((Y = D.data) == null ? void 0 : Y.code) === 'ArrowRight' &&
- (M(), H('down'))),
- ((K = D.data) == null ? void 0 : K.api) === 'onLogin')
- ) {
- const Z = document;
- Z.exitFullscreen
- ? Z.exitFullscreen()
- : Z.mozCancelFullScreen
- ? Z.mozCancelFullScreen()
- : Z.webkitExitFullscreen && Z.webkitExitFullscreen(),
- a.logout(),
- s.replace('/login');
- }
- };
- onMounted(() => {
- const D = i.query;
- console.log(D, e.preStudentNum, '学生人数'),
- (n.type = e.type || D.type),
- (n.subjectId = e.subjectId || D.subjectId),
- (n.detailId = e.detailId || D.detailId),
- (n.lessonCourseId = e.lessonCourseId || D.lessonCourseId),
- (n.classGroupId = e.classGroupId || D.classGroupId),
- (n.classId = e.classId || D.classId),
- (n.preStudentNum = e.preStudentNum || D.preStudentNum),
- window.addEventListener('message', P),
- f(),
- x();
- });
- const d = reactive({
- open: !1,
- activeIndex: 0,
- toolOpen: !1,
- chapterOpen: !1,
- chapterDetails: [],
- chapterLoading: !1
- }),
- p = (D, V, O = []) => {
- for (const j of V) {
- if (j.knowledgeList && j.knowledgeList.length > 0) {
- const $ = p(D, j.knowledgeList, [...O, j.id]);
- if ($.includes(D)) return $;
- }
- if (j.id === D) return [...O, D];
- }
- return O;
- },
- x = async () => {
- try {
- const D = await lessonCoursewareDetail({
- id: n.lessonCourseId,
- subjectId: n.subjectId
- });
- d.chapterDetails = D.data.lessonList || [];
- const V = p(n.detailId, d.chapterDetails);
- n.lessonCoursewareDetailId = V[0];
- } catch (D) {}
- },
- u = async () => {
- try {
- if (!n.classId) return;
- await courseScheduleUpdate({
- lessonCoursewareKnowledgeDetailId: n.detailId,
- id: n.classId
- });
- } catch (D) {}
- },
- y = computed(() => {
- let D = '';
- return (
- d.chapterDetails.forEach(V => {
- var O;
- V.id === n.lessonCoursewareDetailId &&
- ((D = V.name),
- (O = V.knowledgeList) == null ||
- O.forEach(j => {
- j.id === n.detailId && (D += ' - ' + j.name);
- }));
- }),
- D
- );
- }),
- m = () => {
- var D, V, O, j, $;
- for (let J = 0; J < n.itemList.length; J++) {
- const X = n.itemList[J];
- if (X.type === 'VIDEO' && X.videoEle)
- try {
- (D = X.videoEle) == null || D.currentTime(0),
- (V = X.videoEle) == null || V.pause();
- } catch (Y) {}
- X.type === 'SONG' &&
- X.audioEle &&
- ((O = X.audioEle) == null || O.stop()),
- X.type === 'MUSIC' &&
- (($ = (j = X.iframeRef) == null ? void 0 : j.contentWindow) ==
- null ||
- $.postMessage({ api: 'setPlayState' }, '*'));
- }
- },
- A = D => {
- const V = n.itemList.findIndex(O => O.id == D);
- V > -1 && R(V);
- },
- T = () => {
- clearTimeout(l.timer),
- r.destroyAll(),
- (l.timer = setTimeout(() => {
- (l.model = !1),
- Object.values(n.videoRefs).map(D =>
- D == null ? void 0 : D.toggleHideControl(!1)
- ),
- Object.values(n.audioRefs).map(D =>
- D == null ? void 0 : D.toggleHideControl(!1)
- );
- }, 4e3));
- },
- E = () => {
- clearTimeout(l.timer),
- r.destroyAll(),
- (l.model = !1),
- Object.values(n.videoRefs).map(D =>
- D == null ? void 0 : D.toggleHideControl(!1)
- ),
- Object.values(n.audioRefs).map(D =>
- D == null ? void 0 : D.toggleHideControl(!1)
- );
- },
- _ = (D = !0) => {
- (l.model = D),
- Object.values(n.videoRefs).map(V =>
- V == null ? void 0 : V.toggleHideControl(D)
- ),
- Object.values(n.audioRefs).map(V =>
- V == null ? void 0 : V.toggleHideControl(D)
- );
- },
- I = D => {
- if (D && D.type === 'VIDEO') {
- const V = D.videoEle;
- V &&
- (V.paused
- ? (r.destroyAll(), V.play())
- : (r.warning('已暂停'), V.pause()));
- }
- },
- B = ref(3),
- z = [
- {
- prev: { transform: 'translate3d(0, 0, -800px) rotateX(180deg)' },
- next: { transform: 'translate3d(0, 0, -800px) rotateX(-180deg)' }
- },
- {
- prev: { transform: 'translate3d(-100%, 0, -800px)' },
- next: { transform: 'translate3d(100%, 0, -800px)' }
- },
- {
- prev: { transform: 'translate3d(-50%, 0, -800px) rotateY(80deg)' },
- next: { transform: 'translate3d(50%, 0, -800px) rotateY(-80deg)' }
- },
- {
- prev: {
- transform: 'translate3d(-100%, 0, -800px) rotateY(-120deg)'
- },
- next: { transform: 'translate3d(100%, 0, -800px) rotateY(120deg)' }
- },
- {
- prev: {
- transform: 'translate3d(-50%, 50%, -800px) rotateZ(-14deg)',
- opacity: 0
- },
- next: {
- transform: 'translate3d(50%, 50%, -800px) rotateZ(14deg)',
- opacity: 0
- }
- },
- {
- prev: {
- transform: 'translateZ(-800px) rotate3d(0, -1, 0, 90deg)',
- opacity: 0
- },
- next: {
- transform: 'translateZ(-800px) rotate3d(0, 1, 0, 90deg)',
- opacity: 0
- },
- current: { transitionDelay: '700ms' }
- }
- ],
- G = ref(),
- R = D => {
- d.activeIndex != D &&
- (m(),
- clearTimeout(G.value),
- W(d.activeIndex, D),
- (d.activeIndex = D),
- (G.value = setTimeout(
- () => {
- const V = n.itemList[D];
- V &&
- (V.type == 'MUSIC' && (l.model = !0),
- V.type === 'SONG' && (clearTimeout(l.timer), r.destroyAll()),
- V.type === 'VIDEO' &&
- (clearTimeout(l.timer),
- r.destroyAll(),
- nextTick(() => {
- var O;
- V.error &&
- ((O = V.videoEle) == null || O.src(V.content),
- (V.error = !1));
- })));
- },
- l.isAnimation ? 800 : 0
- )));
- },
- W = (D, V) => {
- const O = n.itemList[D],
- j = n.itemList[V];
- if (j) {
- if (j.knowledgePointId != O.knowledgePointId) {
- l.isAnimation = !0;
- return;
- }
- const $ = O.videoEle,
- J = j.videoEle;
- ($ && $.duration < 8 && D < V) || (J && J.duration < 8 && D > V)
- ? (l.isAnimation = !1)
- : (l.isAnimation = !0);
- } else
- l.isAnimation = !(
- (O == null ? void 0 : O.adviseStudyTimeSecond) < 8
- );
- },
- H = async D => {
- var V, O, j, $;
- if (D === 'up') {
- if (d.activeIndex > 0) {
- R(d.activeIndex - 1);
- return;
- }
- let J = d.chapterDetails.findIndex(
- ee => ee.id == n.lessonCoursewareDetailId
- );
- const X =
- ((V = d.chapterDetails[J]) == null ? void 0 : V.knowledgeList) ||
- [];
- let Y = X.findIndex(ee => ee.id == n.detailId),
- K = !1,
- Z = '',
- Q = '';
- for (
- ;
- Y >= 0 &&
- (Y--,
- Y >= 0 &&
- X[Y].containMaterial &&
- ((K = !0), (Z = X[Y].lessonCoursewareDetailId), (Q = X[Y].id)),
- !K);
- );
- if (K) {
- (d.chapterLoading = !0),
- (n.detailId = Q),
- (n.lessonCoursewareDetailId = Z),
- n.type !== 'preview' && (await u()),
- await f(),
- (d.activeIndex = n.itemList.length - 1 || 0),
- (d.chapterOpen = !1),
- (d.chapterLoading = !1);
- return;
- }
- let q = !1;
- for (; J >= 0; ) {
- J--;
- const ee =
- ((O = d.chapterDetails[J]) == null
- ? void 0
- : O.knowledgeList) || [];
- let te = ee.length;
- for (
- ;
- te > 0 &&
- (ee[te - 1].containMaterial &&
- ((q = !0),
- (Z = ee[te - 1].lessonCoursewareDetailId),
- (Q = ee[te - 1].id)),
- te--,
- !q);
- );
- if (q) break;
- }
- if (q) {
- (d.chapterLoading = !0),
- (n.detailId = Q),
- (n.lessonCoursewareDetailId = Z),
- await f(),
- (d.activeIndex = n.itemList.length - 1 || 0),
- (d.chapterLoading = !1);
- return;
- }
- } else {
- if (d.activeIndex < n.itemList.length - 1) {
- R(d.activeIndex + 1);
- return;
- }
- let J = d.chapterDetails.findIndex(
- ee => ee.id == n.lessonCoursewareDetailId
- );
- const X =
- ((j = d.chapterDetails[J]) == null ? void 0 : j.knowledgeList) ||
- [];
- let Y = X.findIndex(ee => ee.id == n.detailId),
- K = !1,
- Z = '',
- Q = '';
- for (
- ;
- Y < X.length - 1 &&
- (Y++,
- Y >= 0 &&
- X[Y].containMaterial &&
- ((K = !0), (Z = X[Y].lessonCoursewareDetailId), (Q = X[Y].id)),
- !K);
- );
- if (K) {
- (d.chapterLoading = !0),
- (n.detailId = Q),
- (n.lessonCoursewareDetailId = Z),
- n.type !== 'preview' && (await u()),
- await f(),
- (d.activeIndex = 0),
- (d.chapterOpen = !1),
- (d.chapterLoading = !1);
- return;
- }
- let q = !1;
- for (; J <= d.chapterDetails.length - 1; ) {
- J++;
- const ee =
- (($ = d.chapterDetails[J]) == null
- ? void 0
- : $.knowledgeList) || [];
- let te = 0;
- for (
- ;
- te <= ee.length - 1 &&
- (ee[te].containMaterial &&
- ((q = !0),
- (Z = ee[te].lessonCoursewareDetailId),
- (Q = ee[te].id)),
- te++,
- !q);
- );
- if (q) break;
- }
- if (q) {
- (d.chapterLoading = !0),
- (n.detailId = Q),
- (n.lessonCoursewareDetailId = Z),
- n.type !== 'preview' && (await u()),
- await f(),
- (d.activeIndex = 0),
- (d.chapterOpen = !1),
- (d.chapterLoading = !1);
- return;
- }
- }
- },
- N = () => {
- var V, O;
- const D = n.itemList[d.activeIndex];
- (D == null ? void 0 : D.type) == 'VIDEO' &&
- !((V = D.videoEle) != null && V.paused) &&
- T(),
- (D == null ? void 0 : D.type) == 'SONG' &&
- !((O = D.audioEle) != null && O.paused) &&
- T();
- };
- document.body.addEventListener('keyup', D => {
- D.code === 'ArrowLeft'
- ? (M(), H('up'))
- : D.code === 'ArrowRight' && (M(), H('down'));
- });
- const M = (D = !0) => {
- clearTimeout(l.timer),
- (l.model = D),
- Object.values(n.videoRefs).map(V =>
- V == null ? void 0 : V.toggleHideControl(D)
- ),
- Object.values(n.audioRefs).map(V =>
- V == null ? void 0 : V.toggleHideControl(D)
- );
- },
- k = reactive({ type: '', penShow: !1, whiteboardShow: !1 }),
- b = D => {
- var O, j, $, J;
- const V = n.itemList[d.activeIndex];
- switch (
- (V.type === 'VIDEO' &&
- V.videoEle &&
- ((O = V.videoEle) == null || O.pause()),
- V.type === 'SONG' &&
- V.audioEle &&
- ((j = V.audioEle) == null || j.stop()),
- V.type === 'MUSIC' &&
- ((J = ($ = V.iframeRef) == null ? void 0 : $.contentWindow) ==
- null ||
- J.postMessage({ api: 'setPlayState' }, '*')),
- E(),
- (d.toolOpen = !1),
- (k.type = D.type),
- D.type)
- ) {
- case 'pen':
- k.penShow = !0;
- break;
- case 'whiteboard':
- k.whiteboardShow = !0;
- }
- },
- C = () => {
- (k.type = 'init'), _();
- },
- L = D => {
- D == 'setTimeIcon' && (c.value = !0),
- D == 'beatIcon' && (g.value = !0),
- D == 'toneIcon' && (S.value = !0);
- },
- F = computed(() => {
- var J, X;
- if (d.activeIndex > 0) return !0;
- let D = d.chapterDetails.findIndex(
- Y => Y.id == n.lessonCoursewareDetailId
- );
- const V =
- ((J = d.chapterDetails[D]) == null ? void 0 : J.knowledgeList) ||
- [];
- let O = V.findIndex(Y => Y.id == n.detailId);
- if (D <= 0 && O <= 0) return !1;
- let j = !1;
- for (; O >= 0; ) O--, O >= 0 && V[O].containMaterial && (j = !0);
- if (j) return !0;
- if (D <= 0) return !1;
- let $ = !1;
- for (; D >= 0; ) {
- D--;
- const Y =
- ((X = d.chapterDetails[D]) == null ? void 0 : X.knowledgeList) ||
- [];
- let K = Y.length;
- for (; K > 0; ) Y[K - 1].containMaterial && ($ = !0), K--;
- if ($) return !0;
- }
- return !1;
- }),
- U = computed(() => {
- var J, X;
- if (d.activeIndex < n.itemList.length - 1) return !0;
- let D = d.chapterDetails.findIndex(
- Y => Y.id == n.lessonCoursewareDetailId
- );
- const V =
- ((J = d.chapterDetails[D]) == null ? void 0 : J.knowledgeList) ||
- [];
- let O = V.findIndex(Y => Y.id == n.detailId);
- if (D >= d.chapterDetails.length - 1 && O >= V.length - 1) return !1;
- let j = !1;
- for (; O < V.length - 1; )
- O++, O >= 0 && V[O].containMaterial && (j = !0);
- if (j) return !0;
- if (D >= d.chapterDetails.length - 1) return !1;
- let $ = !1;
- for (; D < d.chapterDetails.length - 1; ) {
- D++;
- const Y =
- ((X = d.chapterDetails[D]) == null ? void 0 : X.knowledgeList) ||
- [];
- let K = 0;
- for (; K <= Y.length - 1; ) Y[K].containMaterial && ($ = !0), K++;
- if ($) return !0;
- }
- return !1;
- });
- return () => {
- let D;
- return createVNode(
- 'div',
- { id: 'playContent', class: [styles$5.playContent, 'wrap'] },
- [
- createVNode(
- 'div',
- {
- onClick: () => {
- clearTimeout(l.timer),
- (l.model = !l.model),
- Object.values(n.videoRefs).map(V =>
- V == null ? void 0 : V.toggleHideControl(l.model)
- ),
- Object.values(n.audioRefs).map(V =>
- V == null ? void 0 : V.toggleHideControl(l.model)
- );
- }
- },
- [
- createVNode(
- 'div',
- {
- class: styles$5.coursewarePlay,
- style: { width: o.width },
- onClick: V => {
- V.stopPropagation(), T();
- }
- },
- [
- d.chapterLoading
- ? ''
- : createVNode('div', { class: styles$5.wraps }, [
- n.itemList.map((V, O) => {
- const j = Math.abs(d.activeIndex - O) < 2,
- $ = Math.abs(d.activeIndex - O) > 4;
- return j
- ? createVNode(
- 'div',
- {
- key: 'index' + O,
- class: [
- styles$5.itemDiv,
- d.activeIndex === O &&
- styles$5.itemActive,
- l.isAnimation && styles$5.acitveAnimation,
- Math.abs(d.activeIndex - O) < 2
- ? styles$5.show
- : styles$5.hide
- ],
- style:
- O < d.activeIndex
- ? z[B.value].prev
- : O > d.activeIndex
- ? z[B.value].next
- : {},
- onClick: J => {
- if (
- (J.stopPropagation(),
- clearTimeout(l.timer),
- Date.now() - l.nowTime < 300)
- ) {
- I(V);
- return;
- }
- (l.nowTime = Date.now()),
- (l.timer = setTimeout(() => {
- (l.model = !l.model),
- Object.values(n.videoRefs).map(X =>
- X == null
- ? void 0
- : X.toggleHideControl(l.model)
- ),
- Object.values(n.audioRefs).map(X =>
- X == null
- ? void 0
- : X.toggleHideControl(l.model)
- ),
- l.model && T();
- }, 300));
- }
- },
- [
- V.type === 'VIDEO'
- ? createVNode(Fragment, null, [
- createVNode(
- VideoPlay,
- {
- ref: J => (n.videoRefs[O] = J),
- item: V,
- isEmtry: $,
- onLoadedmetadata: J => {
- (V.videoEle = J),
- (V.isprepare = !0);
- },
- onTogglePlay: J => {
- (V.autoPlay = !1),
- J || d.open
- ? clearTimeout(l.timer)
- : T();
- },
- onReset: () => {
- var J;
- ((J = V.videoEle) != null &&
- J.paused) ||
- T();
- },
- onError: () => {
- console.log('video error'),
- (V.error = !0);
- }
- },
- null
- ),
- createVNode(
- Transition,
- { name: 'van-fade' },
- {
- default: () => [
- !V.isprepare &&
- createVNode(
- 'div',
- {
- class: styles$5.loadWrap
- },
- [
- createVNode(
- Vue3Lottie,
- {
- animationData:
- playLoadData
- },
- null
- )
- ]
- )
- ]
- }
- )
- ])
- : V.type === 'IMG'
- ? createVNode(
- 'img',
- { src: V.content },
- null
- )
- : V.type === 'SONG'
- ? createVNode(
- AudioPay,
- {
- item: V,
- ref: J => (n.audioRefs[O] = J),
- onLoadedmetadata: J => {
- (V.audioEle = J),
- (V.isprepare = !0);
- },
- onTogglePlay: J => {
- (V.autoPlay = !1),
- J || d.open
- ? clearTimeout(l.timer)
- : T();
- },
- onEnded: () => {
- const J = d.activeIndex + 1;
- J < n.itemList.length && R(J);
- },
- onReset: () => {
- var J;
- ((J = V.audioEle) != null &&
- J.paused) ||
- T();
- }
- },
- null
- )
- : createVNode(
- MusicScore,
- {
- activeModel: l.model,
- activeStatus: d.activeIndex === O,
- 'data-vid': V.id,
- music: V,
- onSetIframe: J => {
- V.iframeRef = J;
- }
- },
- null
- )
- ]
- )
- : null;
- })
- ])
- ]
- )
- ]
- ),
- createVNode(
- 'div',
- {
- style: { transform: l.model ? '' : 'translateY(-100%)' },
- class: styles$5.headerContainer
- },
- [createVNode('div', { class: styles$5.menu }, [y.value]), '14:56']
- ),
- createVNode(
- 'div',
- {
- onClick: V => {
- V.stopPropagation();
- },
- class: [
- styles$5.switchDisplaySection,
- l.model ? '' : styles$5.sectionAnimate
- ]
- },
- [
- createVNode(
- NSpace,
- { class: styles$5.switchSpace },
- {
- default: () => [
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: async () => {
- n.type === 'preview'
- ? (m(),
- (n.removeVisiable = !0),
- (n.removeTitle = '结束预览'),
- (n.removeContent = '请确认是否结束预览?'))
- : ((n.removeVisiable = !0),
- (n.removeTitle = '结束课程'),
- (n.removeContent = '请确认是否结束课程?'));
- }
- },
- [
- createVNode('img', { src: iconOverClass }, null),
- createVNode('p', null, [
- n.type !== 'preview' ? '结束课程' : '结束预览'
- ])
- ]
- ),
- n.type !== 'preview' &&
- createVNode(
- 'div',
- {
- class: [
- styles$5.btnItem,
- n.preStudentNum <= 0 ? styles$5.btnsDisabled : ''
- ],
- onClick: async () => {
- if (n.preStudentNum <= 0) return;
- const V = await lessonPreTrainingPage({
- coursewareKnowledgeDetailId: n.detailId,
- subjectId: n.subjectId,
- page: 1,
- rows: 99
- });
- V.data.rows &&
- V.data.rows.length &&
- (n.modalAttendMessage =
- '本节课已设置课后作业,是否布置?'),
- (n.modelAttendStatus = !0);
- }
- },
- [
- createVNode('img', { src: iconWork }, null),
- createVNode('p', null, [
- createTextVNode('布置作业')
- ])
- ]
- ),
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () =>
- b({ type: 'pen', icon: iconNote, name: '批注' })
- },
- [
- createVNode('img', { src: iconNote }, null),
- createVNode('p', null, [createTextVNode('批注')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () =>
- b({
- type: 'whiteboard',
- icon: iconWhite,
- name: '白板'
- })
- },
- [
- createVNode('img', { src: iconWhite }, null),
- createVNode('p', null, [createTextVNode('白板')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () => L('beatIcon')
- },
- [
- createVNode('img', { src: iconToneIcon }, null),
- createVNode('p', null, [createTextVNode('节拍器')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () => L('toneIcon')
- },
- [
- createVNode('img', { src: iconSetTime }, null),
- createVNode('p', null, [createTextVNode('调音器')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () => L('setTimeIcon')
- },
- [
- createVNode('img', { src: iconBeatIcon }, null),
- createVNode('p', null, [createTextVNode('计时器')])
- ]
- )
- ]
- }
- ),
- createVNode(
- NSpace,
- { class: styles$5.switchSpace },
- {
- default: () => [
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () => (d.chapterOpen = !0)
- },
- [
- createVNode('img', { src: iconChange }, null),
- createVNode('p', null, [createTextVNode('切换章节')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: styles$5.btnItem,
- onClick: () => (d.open = !0)
- },
- [
- createVNode('img', { src: iconMenu }, null),
- createVNode('p', null, [createTextVNode('资源列表')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: [
- styles$5.btnItem,
- F.value ? '' : styles$5.btnsDisabled
- ],
- onClick: () => {
- F.value && H('up');
- }
- },
- [
- createVNode('img', { src: iconUp }, null),
- createVNode('p', null, [createTextVNode('上一个')])
- ]
- ),
- createVNode(
- 'div',
- {
- class: [
- styles$5.btnItem,
- U.value ? '' : styles$5.btnsDisabled
- ],
- onClick: () => {
- U.value && H('down');
- }
- },
- [
- createVNode('img', { src: iconDown }, null),
- createVNode('p', null, [createTextVNode('下一个')])
- ]
- )
- ]
- }
- )
- ]
- ),
- createVNode(
- NDrawer,
- {
- show: d.open,
- 'onUpdate:show': V => (d.open = V),
- class: styles$5.drawerContainer,
- onAfterLeave: N,
- showMask: !1
- },
- {
- default: () => [
- createVNode(
- NDrawerContent,
- { title: '资源列表', closable: !0 },
- _isSlot(
- (D = n.knowledgePointList.map((V, O) =>
- createVNode('div', { class: styles$5.cardContainer }, [
- createVNode(
- CardType,
- {
- item: V,
- isActive: d.activeIndex === O,
- isCollect: !1,
- isShowCollect: !1,
- onClick: j => {
- (d.open = !1), A(j.id);
- }
- },
- null
- )
- ])
- ))
- )
- ? D
- : { default: () => [D] }
- )
- ]
- }
- ),
- createVNode(
- NDrawer,
- {
- show: d.chapterOpen,
- 'onUpdate:show': V => (d.chapterOpen = V),
- class: styles$5.drawerContainer,
- onAfterLeave: N,
- showMask: !1,
- displayDirective: 'show'
- },
- {
- default: () => [
- createVNode(
- NDrawerContent,
- { title: '切换章节', closable: !0 },
- {
- default: () => [
- createVNode(
- Chapter,
- {
- treeList: d.chapterDetails,
- itemActive: n.detailId,
- onHandleSelect: async V => {
- d.chapterLoading = !0;
- try {
- n.detailId = V.itemActive;
- const O = p(V.itemActive, d.chapterDetails);
- (n.lessonCoursewareDetailId = O[0]),
- n.type !== 'preview' && (await u()),
- await f(),
- (d.activeIndex = 0),
- (d.chapterOpen = !1);
- } catch (O) {}
- d.chapterLoading = !1;
- }
- },
- null
- )
- ]
- }
- )
- ]
- }
- ),
- k.penShow &&
- createVNode(
- Pen,
- { show: k.type === 'pen', type: k.type, close: () => C() },
- null
- ),
- k.whiteboardShow &&
- createVNode(
- Pen,
- {
- show: k.type === 'whiteboard',
- type: k.type,
- close: () => C()
- },
- null
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- show: n.modelAttendStatus,
- 'onUpdate:show': V => (n.modelAttendStatus = V),
- preset: 'card',
- title: '课后作业',
- class: ['modalTitle', styles$5.removeVisiable]
- },
- {
- default: () => [
- createVNode('div', { class: styles$5.studentRemove }, [
- createVNode('p', null, [n.modalAttendMessage]),
- createVNode(
- NSpace,
- { class: styles$5.btnGroupModal },
- {
- default: () => [
- createVNode(
- NButton,
- {
- type: 'default',
- round: !0,
- onClick: () => {
- (n.modelAttendStatus = !1),
- m(),
- (n.modelAttendStatus = !1);
- }
- },
- { default: () => [createTextVNode('暂不布置')] }
- ),
- createVNode(
- NButton,
- {
- type: 'primary',
- round: !0,
- onClick: () => {
- (n.modelTrainStatus = !0),
- (n.modelAttendStatus = !1);
- }
- },
- { default: () => [createTextVNode('布置')] }
- )
- ]
- }
- )
- ])
- ]
- }
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- show: n.modelTrainStatus,
- 'onUpdate:show': V => (n.modelTrainStatus = V),
- preset: 'card',
- class: [styles$5.attendClassModal, styles$5.trainClassModal],
- title: '作业设置'
- },
- {
- default: () => [
- createVNode(
- TrainSettings,
- {
- detailId: n.detailId,
- subjectId: n.subjectId,
- classGroupId: n.classGroupId,
- onClose: () => (n.modelTrainStatus = !1),
- onConfirm: () => {
- n.modelTrainStatus = !1;
- }
- },
- null
- )
- ]
- }
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- class: ['modalTitle background'],
- title: '节拍器',
- preset: 'card',
- show: g.value,
- 'onUpdate:show': V => (g.value = V),
- style: { width: '687px' }
- },
- {
- default: () => [
- createVNode('div', { class: styles$5.modeWrap }, [
- createVNode(
- 'iframe',
- {
- src: ''
- .concat(vaildUrl(), '/metronome/?id=')
- .concat(new Date().getTime()),
- scrolling: 'no',
- frameborder: '0',
- width: '100%',
- height: '650px'
- },
- null
- )
- ])
- ]
- }
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- class: ['background'],
- show: S.value,
- 'onUpdate:show': V => (S.value = V)
- },
- {
- default: () => [
- createVNode('div', null, [
- createVNode(
- PlaceholderTone,
- {
- onClose: () => {
- S.value = !1;
- }
- },
- null
- )
- ])
- ]
- }
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- show: c.value,
- 'onUpdate:show': V => (c.value = V),
- class: ['modalTitle background'],
- title: '计时器',
- preset: 'card',
- style: { width: px2vw(772) }
- },
- {
- default: () => [
- createVNode('div', null, [
- createVNode(TimerMeter, null, null)
- ])
- ]
- }
- ),
- createVNode(
- NModal,
- {
- transformOrigin: 'center',
- show: n.removeVisiable,
- 'onUpdate:show': V => (n.removeVisiable = V),
- preset: 'card',
- class: ['modalTitle', styles$5.removeVisiable],
- title: n.removeTitle
- },
- {
- default: () => [
- createVNode('div', { class: styles$5.studentRemove }, [
- createVNode('p', null, [n.removeContent]),
- createVNode(
- NSpace,
- { class: styles$5.btnGroupModal, justify: 'center' },
- {
- default: () => [
- createVNode(
- NButton,
- {
- round: !0,
- onClick: () => (n.removeVisiable = !1)
- },
- { default: () => [createTextVNode('取消')] }
- ),
- createVNode(
- NButton,
- {
- round: !0,
- type: 'primary',
- onClick: () => {
- state.application
- ? (document.exitFullscreen
- ? document.exitFullscreen()
- : document.mozCancelFullScreen
- ? document.mozCancelFullScreen()
- : document.webkitExitFullscreen &&
- document.webkitExitFullscreen(),
- t('close'))
- : window.close();
- }
- },
- { default: () => [createTextVNode('确定')] }
- )
- ]
- }
- )
- ])
- ]
- }
- )
- ]
- );
- };
- }
- }),
- index = Object.freeze(
- Object.defineProperty(
- { __proto__: null, default: AttendClass },
- Symbol.toStringTag,
- { value: 'Module' }
- )
- );
- export {
- AttendClass as A,
- Pen as P,
- TimerMeter as T,
- PlaceholderTone as a,
- index as i
- };
|