Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

onsenui.js 2.8MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903
  1. /* onsenui v2.10.10 - 2019-07-29 */
  2. (function (global, factory) {
  3. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  4. typeof define === 'function' && define.amd ? define(factory) :
  5. (global.ons = factory());
  6. }(this, (function () { 'use strict';
  7. var onsElements = {};
  8. /*
  9. Copyright 2013-2015 ASIAL CORPORATION
  10. Licensed under the Apache License, Version 2.0 (the "License");
  11. you may not use this file except in compliance with the License.
  12. You may obtain a copy of the License at
  13. http://www.apache.org/licenses/LICENSE-2.0
  14. Unless required by applicable law or agreed to in writing, software
  15. distributed under the License is distributed on an "AS IS" BASIS,
  16. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. See the License for the specific language governing permissions and
  18. limitations under the License.
  19. */
  20. /**
  21. * Add vendor prefix.
  22. *
  23. * @param {String} name
  24. * @return {String}
  25. */
  26. var prefix = function () {
  27. var styles = window.getComputedStyle(document.documentElement, '');
  28. var prefix = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || styles.OLink === '' && ['', 'o'])[1];
  29. return function (name) {
  30. return '-' + prefix + '-' + util$1.hyphenate(name);
  31. };
  32. }();
  33. /**
  34. * Minimal utility library for manipulating element's style.
  35. * Set element's style.
  36. *
  37. * @param {Element} element
  38. * @param {Object} styles
  39. * @return {Element}
  40. */
  41. var styler = function styler(element, style) {
  42. Object.keys(style).forEach(function (key) {
  43. if (key in element.style) {
  44. element.style[key] = style[key];
  45. } else if (prefix(key) in element.style) {
  46. element.style[prefix(key)] = style[key];
  47. } else {
  48. util$1.warn('No such style property: ' + key);
  49. }
  50. });
  51. return element;
  52. };
  53. /**
  54. * @param {Element} element
  55. * @param {String} styles Space-separated CSS properties to remove
  56. */
  57. styler.clear = function (element) {
  58. var styles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  59. var clearlist = styles.split(/\s+/).reduce(function (r, s) {
  60. return r.concat([util$1.hyphenate(s), prefix(s)]);
  61. }, []),
  62. keys = [];
  63. var _loop = function _loop(i) {
  64. var key = element.style[i];
  65. if (clearlist.length === 0 || clearlist.some(function (s) {
  66. return key.indexOf(s) === 0;
  67. })) {
  68. keys.push(key); // Store the key to fix Safari style indexes
  69. }
  70. };
  71. for (var i = element.style.length - 1; i >= 0; i--) {
  72. _loop(i);
  73. }
  74. keys.forEach(function (key) {
  75. return element.style[key] = '';
  76. });
  77. element.getAttribute('style') === '' && element.removeAttribute('style');
  78. };
  79. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  80. return typeof obj;
  81. } : function (obj) {
  82. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  83. };
  84. var classCallCheck = function (instance, Constructor) {
  85. if (!(instance instanceof Constructor)) {
  86. throw new TypeError("Cannot call a class as a function");
  87. }
  88. };
  89. var createClass = function () {
  90. function defineProperties(target, props) {
  91. for (var i = 0; i < props.length; i++) {
  92. var descriptor = props[i];
  93. descriptor.enumerable = descriptor.enumerable || false;
  94. descriptor.configurable = true;
  95. if ("value" in descriptor) descriptor.writable = true;
  96. Object.defineProperty(target, descriptor.key, descriptor);
  97. }
  98. }
  99. return function (Constructor, protoProps, staticProps) {
  100. if (protoProps) defineProperties(Constructor.prototype, protoProps);
  101. if (staticProps) defineProperties(Constructor, staticProps);
  102. return Constructor;
  103. };
  104. }();
  105. var defineProperty = function (obj, key, value) {
  106. if (key in obj) {
  107. Object.defineProperty(obj, key, {
  108. value: value,
  109. enumerable: true,
  110. configurable: true,
  111. writable: true
  112. });
  113. } else {
  114. obj[key] = value;
  115. }
  116. return obj;
  117. };
  118. var _extends = Object.assign || function (target) {
  119. for (var i = 1; i < arguments.length; i++) {
  120. var source = arguments[i];
  121. for (var key in source) {
  122. if (Object.prototype.hasOwnProperty.call(source, key)) {
  123. target[key] = source[key];
  124. }
  125. }
  126. }
  127. return target;
  128. };
  129. var get = function get(object, property, receiver) {
  130. if (object === null) object = Function.prototype;
  131. var desc = Object.getOwnPropertyDescriptor(object, property);
  132. if (desc === undefined) {
  133. var parent = Object.getPrototypeOf(object);
  134. if (parent === null) {
  135. return undefined;
  136. } else {
  137. return get(parent, property, receiver);
  138. }
  139. } else if ("value" in desc) {
  140. return desc.value;
  141. } else {
  142. var getter = desc.get;
  143. if (getter === undefined) {
  144. return undefined;
  145. }
  146. return getter.call(receiver);
  147. }
  148. };
  149. var inherits = function (subClass, superClass) {
  150. if (typeof superClass !== "function" && superClass !== null) {
  151. throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
  152. }
  153. subClass.prototype = Object.create(superClass && superClass.prototype, {
  154. constructor: {
  155. value: subClass,
  156. enumerable: false,
  157. writable: true,
  158. configurable: true
  159. }
  160. });
  161. if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
  162. };
  163. var objectWithoutProperties = function (obj, keys) {
  164. var target = {};
  165. for (var i in obj) {
  166. if (keys.indexOf(i) >= 0) continue;
  167. if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
  168. target[i] = obj[i];
  169. }
  170. return target;
  171. };
  172. var possibleConstructorReturn = function (self, call) {
  173. if (!self) {
  174. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  175. }
  176. return call && (typeof call === "object" || typeof call === "function") ? call : self;
  177. };
  178. var toConsumableArray = function (arr) {
  179. if (Array.isArray(arr)) {
  180. for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
  181. return arr2;
  182. } else {
  183. return Array.from(arr);
  184. }
  185. };
  186. /*
  187. Copyright 2013-2015 ASIAL CORPORATION
  188. Licensed under the Apache License, Version 2.0 (the "License");
  189. you may not use this file except in compliance with the License.
  190. You may obtain a copy of the License at
  191. http://www.apache.org/licenses/LICENSE-2.0
  192. Unless required by applicable law or agreed to in writing, software
  193. distributed under the License is distributed on an "AS IS" BASIS,
  194. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  195. See the License for the specific language governing permissions and
  196. limitations under the License.
  197. */
  198. // Save HTMLElement object before Custom Elements polyfill patch global HTMLElement.
  199. var NativeHTMLElement = window.HTMLElement;
  200. /**
  201. * @object ons.platform
  202. * @category util
  203. * @description
  204. * [en]Utility methods to detect current platform.[/en]
  205. * [ja]現在実行されているプラットフォームを検知するためのユーティリティメソッドを収めたオブジェクトです。[/ja]
  206. */
  207. var Platform = function () {
  208. /**
  209. * All elements will be rendered as if the app was running on this platform.
  210. * @type {String}
  211. */
  212. function Platform() {
  213. classCallCheck(this, Platform);
  214. this._selectedPlatform = null;
  215. this._ignorePlatformSelect = false;
  216. }
  217. /**
  218. * @method select
  219. * @signature select(platform)
  220. * @param {string} platform Name of the platform.
  221. * [en]Possible values are: "opera", "firefox", "safari", "chrome", "ie", "android", "blackberry", "ios" or "wp".[/en]
  222. * [ja]"opera", "firefox", "safari", "chrome", "ie", "android", "blackberry", "ios", "wp"のいずれかを指定します。[/ja]
  223. * @description
  224. * [en]Sets the platform used to render the elements. Useful for testing.[/en]
  225. * [ja]要素を描画するために利用するプラットフォーム名を設定します。テストに便利です。[/ja]
  226. */
  227. createClass(Platform, [{
  228. key: 'select',
  229. value: function select(platform) {
  230. if (typeof platform === 'string') {
  231. this._selectedPlatform = platform.trim().toLowerCase();
  232. }
  233. }
  234. }, {
  235. key: '_getSelectedPlatform',
  236. value: function _getSelectedPlatform() {
  237. return this._ignorePlatformSelect ? null : this._selectedPlatform;
  238. }
  239. }, {
  240. key: '_runOnActualPlatform',
  241. value: function _runOnActualPlatform(fn) {
  242. this._ignorePlatformSelect = true;
  243. var result = fn();
  244. this._ignorePlatformSelect = false;
  245. return result;
  246. }
  247. //----------------
  248. // General
  249. //----------------
  250. /**
  251. * @method isWebView
  252. * @signature isWebView()
  253. * @description
  254. * [en]Returns whether app is running in Cordova.[/en]
  255. * [ja]Cordova内で実行されているかどうかを返します。[/ja]
  256. * @return {Boolean}
  257. */
  258. }, {
  259. key: 'isWebView',
  260. value: function isWebView() {
  261. if (document.readyState === 'loading' || document.readyState == 'uninitialized') {
  262. throw new Error('isWebView() method is available after dom contents loaded.');
  263. }
  264. return !!(window.cordova || window.phonegap || window.PhoneGap);
  265. }
  266. //----------------
  267. // iOS devices
  268. //----------------
  269. /**
  270. * @method isIPhone
  271. * @signature isIPhone()
  272. * @description
  273. * [en]Returns whether the device is iPhone.[/en]
  274. * [ja]iPhone上で実行されているかどうかを返します。[/ja]
  275. * @return {Boolean}
  276. */
  277. }, {
  278. key: 'isIPhone',
  279. value: function isIPhone() {
  280. return (/iPhone/i.test(navigator.userAgent)
  281. );
  282. }
  283. /**
  284. * @method isIPhoneX
  285. * @signature isIPhoneX()
  286. * @description
  287. * [en]Returns whether the device is iPhone X, XS, XS Max, or XR.[/en]
  288. * [ja]iPhone X や XS、XS Max、または XR 上で実行されているかどうかを返します。[/ja]
  289. * @return {Boolean}
  290. */
  291. }, {
  292. key: 'isIPhoneX',
  293. value: function isIPhoneX() {
  294. // iOS WebViews on the same iOS version have the same user agent.
  295. // We cannot avoid using window.screen.
  296. // We also cannot use cordova-plugin-device since its behavior is different between simulators and real devices.
  297. // This works well both in iOS Safari and (UI|WK)WebView of iPhone X.
  298. return this.isIPhone() && (window.screen.width === 375 && window.screen.height === 812 || // X, XS portrait
  299. window.screen.width === 812 && window.screen.height === 375 || // X, XS landscape
  300. window.screen.width === 414 && window.screen.height === 896 || // XS Max, XR portrait
  301. window.screen.width === 896 && window.screen.height === 414); // XS Max, XR landscape
  302. }
  303. /**
  304. * @method isIPad
  305. * @signature isIPad()
  306. * @description
  307. * [en]Returns whether the device is iPad.[/en]
  308. * [ja]iPad上で実行されているかどうかを返します。[/ja]
  309. * @return {Boolean}
  310. */
  311. }, {
  312. key: 'isIPad',
  313. value: function isIPad() {
  314. return (/iPad/i.test(navigator.userAgent)
  315. );
  316. }
  317. /**
  318. * @return {Boolean}
  319. */
  320. }, {
  321. key: 'isIPod',
  322. value: function isIPod() {
  323. return (/iPod/i.test(navigator.userAgent)
  324. );
  325. }
  326. //----------------
  327. // iOS versions
  328. //----------------
  329. /**
  330. * @method isIOS
  331. * @signature isIOS([forceActualPlatform])
  332. * @param {Boolean} forceActualPlatform
  333. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  334. * [ja][/ja]
  335. * @description
  336. * [en]Returns whether the OS is iOS. By default will return manually selected platform if it is set.[/en]
  337. * [ja]iOS上で実行されているかどうかを返します。[/ja]
  338. * @return {Boolean}
  339. */
  340. }, {
  341. key: 'isIOS',
  342. value: function isIOS(forceActualPlatform) {
  343. if (!forceActualPlatform && this._getSelectedPlatform()) {
  344. return this._getSelectedPlatform() === 'ios';
  345. }
  346. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  347. return (/iOS/i.test(device.platform)
  348. );
  349. } else {
  350. return (/iPhone|iPad|iPod/i.test(navigator.userAgent)
  351. );
  352. }
  353. }
  354. /**
  355. * @method isIOS7above
  356. * @signature isIOS7above()
  357. * @description
  358. * [en]Returns whether the iOS version is 7 or above.[/en]
  359. * [ja]iOS7以上で実行されているかどうかを返します。[/ja]
  360. * @return {Boolean}
  361. */
  362. }, {
  363. key: 'isIOS7above',
  364. value: function isIOS7above() {
  365. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  366. return (/iOS/i.test(device.platform) && parseInt(device.version.split('.')[0]) >= 7
  367. );
  368. } else if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
  369. var ver = (navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/) || [''])[0].replace(/_/g, '.');
  370. return parseInt(ver.split('.')[0]) >= 7;
  371. }
  372. return false;
  373. }
  374. //----------------
  375. // iOS browsers
  376. //----------------
  377. /**
  378. * @method isIOSSafari
  379. * @signature isIOSSafari()
  380. * @description
  381. * [en]Returns whether app is running in iOS Safari.[/en]
  382. * [ja]iOS Safariで実行されているかどうかを返します。[/ja]
  383. * @return {Boolean}
  384. */
  385. }, {
  386. key: 'isIOSSafari',
  387. value: function isIOSSafari() {
  388. var navigator = window.navigator;
  389. var ua = navigator.userAgent;
  390. return !!(this.isIOS() && ua.indexOf('Safari') !== -1 && ua.indexOf('Version') !== -1 && !navigator.standalone);
  391. }
  392. /**
  393. * @method isWKWebView
  394. * @signature isWKWebView()
  395. * @description
  396. * [en]Returns whether app is running in WKWebView.[/en]
  397. * [ja]WKWebViewで実行されているかどうかを返します。[/ja]
  398. * @return {Boolean}
  399. */
  400. }, {
  401. key: 'isWKWebView',
  402. value: function isWKWebView() {
  403. var lte9 = /constructor/i.test(NativeHTMLElement);
  404. return !!(this.isIOS() && window.webkit && window.webkit.messageHandlers && window.indexedDB && !lte9);
  405. }
  406. /**
  407. * @method isUIWebView
  408. * @signature isUIWebView()
  409. * @description
  410. * [en]Returns whether app is running in UIWebView.[/en]
  411. * [ja]UIWebViewで実行されているかどうかを返します。[/ja]
  412. * @return {Boolean}
  413. */
  414. }, {
  415. key: 'isUIWebView',
  416. value: function isUIWebView() {
  417. return !!(this.isIOS() && !this.isIOSSafari() && !this.isWKWebView());
  418. }
  419. //----------------
  420. // Android devices
  421. //----------------
  422. /**
  423. * @method isAndroidPhone
  424. * @signature isAndroidPhone()
  425. * @description
  426. * [en]Returns whether the device is Android phone.[/en]
  427. * [ja]Android携帯上で実行されているかどうかを返します。[/ja]
  428. * @return {Boolean}
  429. */
  430. }, {
  431. key: 'isAndroidPhone',
  432. value: function isAndroidPhone() {
  433. return (/Android/i.test(navigator.userAgent) && /Mobile/i.test(navigator.userAgent)
  434. );
  435. }
  436. /**
  437. * @method isAndroidTablet
  438. * @signature isAndroidTablet()
  439. * @description
  440. * [en]Returns whether the device is Android tablet.[/en]
  441. * [ja]Androidタブレット上で実行されているかどうかを返します。[/ja]
  442. * @return {Boolean}
  443. */
  444. }, {
  445. key: 'isAndroidTablet',
  446. value: function isAndroidTablet() {
  447. return (/Android/i.test(navigator.userAgent) && !/Mobile/i.test(navigator.userAgent)
  448. );
  449. }
  450. //----------------
  451. // Android versions
  452. //----------------
  453. /**
  454. * @method isAndroid
  455. * @signature isAndroid([forceActualPlatform])
  456. * @param {Boolean} forceActualPlatform
  457. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  458. * [ja][/ja]
  459. * @description
  460. * [en]Returns whether the OS is Android. By default will return manually selected platform if it is set.[/en]
  461. * [ja]Android上で実行されているかどうかを返します。[/ja]
  462. * @return {Boolean}
  463. */
  464. }, {
  465. key: 'isAndroid',
  466. value: function isAndroid(forceActualPlatform) {
  467. if (!forceActualPlatform && this._getSelectedPlatform()) {
  468. return this._getSelectedPlatform() === 'android';
  469. }
  470. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  471. return (/Android/i.test(device.platform)
  472. );
  473. } else {
  474. return (/Android/i.test(navigator.userAgent)
  475. );
  476. }
  477. }
  478. //----------------
  479. // Other devices
  480. //----------------
  481. /**
  482. * @method isWP
  483. * @signature isWP([forceActualPlatform])
  484. * @param {Boolean} forceActualPlatform
  485. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  486. * [ja][/ja]
  487. * @description
  488. * [en]Returns whether the OS is Windows phone. By default will return manually selected platform if it is set.[/en]
  489. * [ja][/ja]
  490. * @return {Boolean}
  491. */
  492. }, {
  493. key: 'isWP',
  494. value: function isWP(forceActualPlatform) {
  495. if (!forceActualPlatform && this._getSelectedPlatform()) {
  496. return this._getSelectedPlatform() === 'wp';
  497. }
  498. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  499. return (/Win32NT|WinCE/i.test(device.platform)
  500. );
  501. } else {
  502. return (/Windows Phone|IEMobile|WPDesktop/i.test(navigator.userAgent)
  503. );
  504. }
  505. }
  506. /**
  507. * @method isBlackBerry
  508. * @signature isBlackBerry([forceActualPlatform])
  509. * @param {Boolean} forceActualPlatform
  510. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  511. * [ja][/ja]
  512. * @description
  513. * [en]Returns whether the device is BlackBerry. By default will return manually selected platform if it is set.[/en]
  514. * [ja]BlackBerry上で実行されているかどうかを返します。[/ja]
  515. * @return {Boolean}
  516. */
  517. }, {
  518. key: 'isBlackBerry',
  519. value: function isBlackBerry(forceActualPlatform) {
  520. if (!forceActualPlatform && this._getSelectedPlatform()) {
  521. return this._getSelectedPlatform() === 'blackberry';
  522. }
  523. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object' && !/browser/i.test(device.platform)) {
  524. return (/BlackBerry/i.test(device.platform)
  525. );
  526. } else {
  527. return (/BlackBerry|RIM Tablet OS|BB10/i.test(navigator.userAgent)
  528. );
  529. }
  530. }
  531. //----------------
  532. // Other browsers
  533. //----------------
  534. /**
  535. * @method isOpera
  536. * @signature isOpera([forceActualPlatform])
  537. * @param {Boolean} forceActualPlatform
  538. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  539. * [ja][/ja]
  540. * @description
  541. * [en]Returns whether the browser is Opera. By default will return manually selected platform if it is set.[/en]
  542. * [ja]Opera上で実行されているかどうかを返します。[/ja]
  543. * @return {Boolean}
  544. */
  545. }, {
  546. key: 'isOpera',
  547. value: function isOpera(forceActualPlatform) {
  548. if (!forceActualPlatform && this._getSelectedPlatform()) {
  549. return this._getSelectedPlatform() === 'opera';
  550. }
  551. return !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
  552. }
  553. /**
  554. * @method isFirefox
  555. * @signature isFirefox([forceActualPlatform])
  556. * @param {Boolean} forceActualPlatform
  557. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  558. * [ja][/ja]
  559. * @description
  560. * [en]Returns whether the browser is Firefox. By default will return manually selected platform if it is set.[/en]
  561. * [ja]Firefox上で実行されているかどうかを返します。[/ja]
  562. * @return {Boolean}
  563. */
  564. }, {
  565. key: 'isFirefox',
  566. value: function isFirefox(forceActualPlatform) {
  567. if (!forceActualPlatform && this._getSelectedPlatform()) {
  568. return this._getSelectedPlatform() === 'firefox';
  569. }
  570. return typeof InstallTrigger !== 'undefined';
  571. }
  572. /**
  573. * @method isSafari
  574. * @signature isSafari([forceActualPlatform])
  575. * @param {Boolean} forceActualPlatform
  576. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  577. * [ja][/ja]
  578. * @description
  579. * [en]Returns whether the browser is Safari. By default will return manually selected platform if it is set.[/en]
  580. * [ja]Safari上で実行されているかどうかを返します。[/ja]
  581. * @return {Boolean}
  582. */
  583. }, {
  584. key: 'isSafari',
  585. value: function isSafari(forceActualPlatform) {
  586. if (!forceActualPlatform && this._getSelectedPlatform()) {
  587. return this._getSelectedPlatform() === 'safari';
  588. }
  589. return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || function (p) {
  590. return p.toString() === '[object SafariRemoteNotification]';
  591. }(!window['safari'] || safari.pushNotification);
  592. }
  593. /**
  594. * @method isChrome
  595. * @signature isChrome([forceActualPlatform])
  596. * @param {Boolean} forceActualPlatform
  597. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  598. * [ja][/ja]
  599. * @description
  600. * [en]Returns whether the browser is Chrome. By default will return manually selected platform if it is set.[/en]
  601. * [ja]Chrome上で実行されているかどうかを返します。[/ja]
  602. * @return {Boolean}
  603. */
  604. }, {
  605. key: 'isChrome',
  606. value: function isChrome(forceActualPlatform) {
  607. if (!forceActualPlatform && this._getSelectedPlatform()) {
  608. return this._getSelectedPlatform() === 'chrome';
  609. }
  610. return !!window.chrome && !(!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) && !(navigator.userAgent.indexOf(' Edge/') >= 0);
  611. }
  612. /**
  613. * @method isIE
  614. * @signature isIE([forceActualPlatform])
  615. * @param {Boolean} forceActualPlatform
  616. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  617. * [ja][/ja]
  618. * @description
  619. * [en]Returns whether the browser is Internet Explorer. By default will return manually selected platform if it is set.[/en]
  620. * [ja]Internet Explorer上で実行されているかどうかを返します。[/ja]
  621. * @return {Boolean}
  622. */
  623. }, {
  624. key: 'isIE',
  625. value: function isIE(forceActualPlatform) {
  626. if (!forceActualPlatform && this._getSelectedPlatform()) {
  627. return this._getSelectedPlatform() === 'ie';
  628. }
  629. return false || !!document.documentMode;
  630. }
  631. /**
  632. * @method isEdge
  633. * @signature isEdge([forceActualPlatform])
  634. * @param {Boolean} forceActualPlatform
  635. * [en]If true, selected platform is ignored and the actual platform is returned.[/en]
  636. * [ja][/ja]
  637. * @description
  638. * [en]Returns whether the browser is Edge. By default will return manually selected platform if it is set.[/en]
  639. * [ja]Edge上で実行されているかどうかを返します。[/ja]
  640. * @return {Boolean}
  641. */
  642. }, {
  643. key: 'isEdge',
  644. value: function isEdge(forceActualPlatform) {
  645. if (!forceActualPlatform && this._getSelectedPlatform()) {
  646. return this._getSelectedPlatform() === 'edge';
  647. }
  648. return navigator.userAgent.indexOf(' Edge/') >= 0;
  649. }
  650. //----------------
  651. // Utility functions
  652. //----------------
  653. /**
  654. * @return {String}
  655. */
  656. }, {
  657. key: 'getMobileOS',
  658. value: function getMobileOS() {
  659. if (this.isAndroid()) {
  660. return 'android';
  661. } else if (this.isIOS()) {
  662. return 'ios';
  663. } else if (this.isWP()) {
  664. return 'wp';
  665. } else {
  666. return 'other';
  667. }
  668. }
  669. /**
  670. * @return {String}
  671. */
  672. }, {
  673. key: 'getIOSDevice',
  674. value: function getIOSDevice() {
  675. if (this.isIPhone()) {
  676. return 'iphone';
  677. } else if (this.isIPad()) {
  678. return 'ipad';
  679. } else if (this.isIPod()) {
  680. return 'ipod';
  681. } else {
  682. return 'na';
  683. }
  684. }
  685. }]);
  686. return Platform;
  687. }();
  688. var platform = new Platform();
  689. /*
  690. Copyright 2013-2015 ASIAL CORPORATION
  691. Licensed under the Apache License, Version 2.0 (the "License");
  692. you may not use this file except in compliance with the License.
  693. You may obtain a copy of the License at
  694. http://www.apache.org/licenses/LICENSE-2.0
  695. Unless required by applicable law or agreed to in writing, software
  696. distributed under the License is distributed on an "AS IS" BASIS,
  697. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  698. See the License for the specific language governing permissions and
  699. limitations under the License.
  700. */
  701. var error = function error(message) {
  702. return util$1.throw('In PageAttributeExpression: ' + message);
  703. };
  704. var pageAttributeExpression = {
  705. _variables: {},
  706. /**
  707. * Define a variable.
  708. *
  709. * @param {String} name Name of the variable
  710. * @param {String|Function} value Value of the variable. Can be a string or a function. The function must return a string.
  711. * @param {Boolean} overwrite If this value is false, an error will be thrown when trying to define a variable that has already been defined.
  712. */
  713. defineVariable: function defineVariable(name, value) {
  714. var overwrite = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  715. if (typeof name !== 'string') {
  716. error('Variable name must be a string');
  717. } else if (typeof value !== 'string' && typeof value !== 'function') {
  718. error('Variable value must be a string or a function');
  719. } else if (this._variables.hasOwnProperty(name) && !overwrite) {
  720. error('"' + name + '" is already defined');
  721. }
  722. this._variables[name] = value;
  723. },
  724. /**
  725. * Get a variable.
  726. *
  727. * @param {String} name Name of the variable.
  728. * @return {String|Function|null}
  729. */
  730. getVariable: function getVariable(name) {
  731. if (!this._variables.hasOwnProperty(name)) {
  732. return null;
  733. }
  734. return this._variables[name];
  735. },
  736. /**
  737. * Remove a variable.
  738. *
  739. * @param {String} name Name of the varaible.
  740. */
  741. removeVariable: function removeVariable(name) {
  742. delete this._variables[name];
  743. },
  744. /**
  745. * Get all variables.
  746. *
  747. * @return {Object}
  748. */
  749. getAllVariables: function getAllVariables() {
  750. return this._variables;
  751. },
  752. _parsePart: function _parsePart(part) {
  753. var c = void 0,
  754. inInterpolation = false,
  755. currentIndex = 0;
  756. var tokens = [];
  757. if (part.length === 0) {
  758. error('Unable to parse empty string');
  759. }
  760. for (var i = 0; i < part.length; i++) {
  761. c = part.charAt(i);
  762. if (c === '$' && part.charAt(i + 1) === '{') {
  763. if (inInterpolation) {
  764. error('Nested interpolation not supported');
  765. }
  766. var token = part.substring(currentIndex, i);
  767. if (token.length > 0) {
  768. tokens.push(part.substring(currentIndex, i));
  769. }
  770. currentIndex = i;
  771. inInterpolation = true;
  772. } else if (c === '}') {
  773. if (!inInterpolation) {
  774. error('} must be preceeded by ${');
  775. }
  776. var _token = part.substring(currentIndex, i + 1);
  777. if (_token.length > 0) {
  778. tokens.push(part.substring(currentIndex, i + 1));
  779. }
  780. currentIndex = i + 1;
  781. inInterpolation = false;
  782. }
  783. }
  784. if (inInterpolation) {
  785. error('Unterminated interpolation');
  786. }
  787. tokens.push(part.substring(currentIndex, part.length));
  788. return tokens;
  789. },
  790. _replaceToken: function _replaceToken(token) {
  791. var re = /^\${(.*?)}$/,
  792. match = token.match(re);
  793. if (match) {
  794. var name = match[1].trim();
  795. var variable = this.getVariable(name);
  796. if (variable === null) {
  797. error('Variable "' + name + '" does not exist');
  798. } else if (typeof variable === 'string') {
  799. return variable;
  800. } else {
  801. var rv = variable();
  802. if (typeof rv !== 'string') {
  803. error('Must return a string');
  804. }
  805. return rv;
  806. }
  807. } else {
  808. return token;
  809. }
  810. },
  811. _replaceTokens: function _replaceTokens(tokens) {
  812. return tokens.map(this._replaceToken.bind(this));
  813. },
  814. _parseExpression: function _parseExpression(expression) {
  815. return expression.split(',').map(function (part) {
  816. return part.trim();
  817. }).map(this._parsePart.bind(this)).map(this._replaceTokens.bind(this)).map(function (part) {
  818. return part.join('');
  819. });
  820. },
  821. /**
  822. * Evaluate an expression.
  823. *
  824. * @param {String} expression An page attribute expression.
  825. * @return {Array}
  826. */
  827. evaluate: function evaluate(expression) {
  828. if (!expression) {
  829. return [];
  830. }
  831. return this._parseExpression(expression);
  832. }
  833. };
  834. // Define default variables.
  835. pageAttributeExpression.defineVariable('mobileOS', platform.getMobileOS());
  836. pageAttributeExpression.defineVariable('iOSDevice', platform.getIOSDevice());
  837. pageAttributeExpression.defineVariable('runtime', function () {
  838. return platform.isWebView() ? 'cordova' : 'browser';
  839. });
  840. /*
  841. Copyright 2013-2015 ASIAL CORPORATION
  842. Licensed under the Apache License, Version 2.0 (the "License");
  843. you may not use this file except in compliance with the License.
  844. You may obtain a copy of the License at
  845. http://www.apache.org/licenses/LICENSE-2.0
  846. Unless required by applicable law or agreed to in writing, software
  847. distributed under the License is distributed on an "AS IS" BASIS,
  848. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  849. See the License for the specific language governing permissions and
  850. limitations under the License.
  851. */
  852. var internal$1 = {};
  853. internal$1.config = {
  854. autoStatusBarFill: true,
  855. animationsDisabled: false,
  856. warningsDisabled: false
  857. };
  858. internal$1.nullElement = window.document.createElement('div');
  859. /**
  860. * @return {Boolean}
  861. */
  862. internal$1.isEnabledAutoStatusBarFill = function () {
  863. return !!internal$1.config.autoStatusBarFill;
  864. };
  865. /**
  866. * @param {String} html
  867. * @return {String}
  868. */
  869. internal$1.normalizePageHTML = function (html) {
  870. return ('' + html).trim();
  871. };
  872. internal$1.waitDOMContentLoaded = function (callback) {
  873. if (window.document.readyState === 'loading' || window.document.readyState == 'uninitialized') {
  874. var wrappedCallback = function wrappedCallback() {
  875. callback();
  876. window.document.removeEventListener('DOMContentLoaded', wrappedCallback);
  877. };
  878. window.document.addEventListener('DOMContentLoaded', wrappedCallback);
  879. } else {
  880. setImmediate(callback);
  881. }
  882. };
  883. internal$1.autoStatusBarFill = function (action) {
  884. var onReady = function onReady() {
  885. if (internal$1.shouldFillStatusBar()) {
  886. action();
  887. }
  888. document.removeEventListener('deviceready', onReady);
  889. };
  890. if ((typeof device === 'undefined' ? 'undefined' : _typeof(device)) === 'object') {
  891. document.addEventListener('deviceready', onReady);
  892. } else if (['complete', 'interactive'].indexOf(document.readyState) === -1) {
  893. internal$1.waitDOMContentLoaded(onReady);
  894. } else {
  895. onReady();
  896. }
  897. };
  898. internal$1.shouldFillStatusBar = function () {
  899. return internal$1.isEnabledAutoStatusBarFill() && (platform.isWebView() && platform.isIOS7above() && !platform.isIPhoneX() || document.body.querySelector('.ons-status-bar-mock.ios'));
  900. };
  901. internal$1.templateStore = {
  902. _storage: {},
  903. /**
  904. * @param {String} key
  905. * @return {String/null} template
  906. */
  907. get: function get$$1(key) {
  908. return internal$1.templateStore._storage[key] || null;
  909. },
  910. /**
  911. * @param {String} key
  912. * @param {String} template
  913. */
  914. set: function set$$1(key, template) {
  915. internal$1.templateStore._storage[key] = template;
  916. }
  917. };
  918. window.document.addEventListener('_templateloaded', function (e) {
  919. if (e.target.nodeName.toLowerCase() === 'ons-template') {
  920. internal$1.templateStore.set(e.templateId, e.template);
  921. }
  922. }, false);
  923. internal$1.waitDOMContentLoaded(function () {
  924. register('script[type="text/ons-template"]');
  925. register('script[type="text/template"]');
  926. register('script[type="text/ng-template"]');
  927. register('template');
  928. function register(query) {
  929. var templates = window.document.querySelectorAll(query);
  930. for (var i = 0; i < templates.length; i++) {
  931. internal$1.templateStore.set(templates[i].getAttribute('id'), templates[i].textContent || templates[i].content);
  932. }
  933. }
  934. });
  935. /**
  936. * @param {String} page
  937. * @return {Promise}
  938. */
  939. internal$1.getTemplateHTMLAsync = function (page) {
  940. return new Promise(function (resolve, reject) {
  941. internal$1.waitDOMContentLoaded(function () {
  942. var cache = internal$1.templateStore.get(page);
  943. if (cache) {
  944. if (cache instanceof DocumentFragment) {
  945. return resolve(cache);
  946. }
  947. var html = typeof cache === 'string' ? cache : cache[1];
  948. return resolve(internal$1.normalizePageHTML(html));
  949. }
  950. var local = window.document.getElementById(page);
  951. if (local) {
  952. var _html = local.textContent || local.content;
  953. return resolve(_html);
  954. }
  955. var xhr = new XMLHttpRequest();
  956. xhr.open('GET', page, true);
  957. xhr.onload = function () {
  958. var html = xhr.responseText;
  959. if (xhr.status >= 400 && xhr.status < 600) {
  960. reject(html);
  961. } else {
  962. // Refresh script tags
  963. var fragment = util$1.createFragment(html);
  964. util$1.arrayFrom(fragment.querySelectorAll('script')).forEach(function (el) {
  965. var script = document.createElement('script');
  966. script.type = el.type || 'text/javascript';
  967. script.appendChild(document.createTextNode(el.text || el.textContent || el.innerHTML));
  968. el.parentNode.replaceChild(script, el);
  969. });
  970. internal$1.templateStore.set(page, fragment);
  971. resolve(fragment);
  972. }
  973. };
  974. xhr.onerror = function () {
  975. util$1.throw('Page template not found: ' + page);
  976. };
  977. xhr.send(null);
  978. });
  979. });
  980. };
  981. /**
  982. * @param {String} page
  983. * @return {Promise}
  984. */
  985. internal$1.getPageHTMLAsync = function (page) {
  986. var pages = pageAttributeExpression.evaluate(page);
  987. var getPage = function getPage(page) {
  988. if (typeof page !== 'string') {
  989. return Promise.reject('Must specify a page.');
  990. }
  991. return internal$1.getTemplateHTMLAsync(page).catch(function (error) {
  992. if (pages.length === 0) {
  993. return Promise.reject(error);
  994. }
  995. return getPage(pages.shift());
  996. });
  997. };
  998. return getPage(pages.shift());
  999. };
  1000. /*
  1001. Copyright 2013-2015 ASIAL CORPORATION
  1002. Licensed under the Apache License, Version 2.0 (the "License");
  1003. you may not use this file except in compliance with the License.
  1004. You may obtain a copy of the License at
  1005. http://www.apache.org/licenses/LICENSE-2.0
  1006. Unless required by applicable law or agreed to in writing, software
  1007. distributed under the License is distributed on an "AS IS" BASIS,
  1008. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1009. See the License for the specific language governing permissions and
  1010. limitations under the License.
  1011. */
  1012. var AnimatorFactory = function () {
  1013. /**
  1014. * @param {Object} opts
  1015. * @param {Object} opts.animators The dictionary for animator classes
  1016. * @param {Function} opts.baseClass The base class of animators
  1017. * @param {String} [opts.baseClassName] The name of the base class of animators
  1018. * @param {String} [opts.defaultAnimation] The default animation name
  1019. * @param {Object} [opts.defaultAnimationOptions] The default animation options
  1020. */
  1021. function AnimatorFactory(opts) {
  1022. classCallCheck(this, AnimatorFactory);
  1023. this._animators = opts.animators;
  1024. this._baseClass = opts.baseClass;
  1025. this._baseClassName = opts.baseClassName || opts.baseClass.name;
  1026. this._animation = opts.defaultAnimation || 'default';
  1027. this._animationOptions = opts.defaultAnimationOptions || {};
  1028. if (!this._animators[this._animation]) {
  1029. util$1.throw('No such animation: ' + this._animation);
  1030. }
  1031. }
  1032. /**
  1033. * @param {String} jsonString
  1034. * @return {Object/null}
  1035. */
  1036. createClass(AnimatorFactory, [{
  1037. key: 'setAnimationOptions',
  1038. /**
  1039. * @param {Object} options
  1040. */
  1041. value: function setAnimationOptions(options) {
  1042. this._animationOptions = options;
  1043. }
  1044. /**
  1045. * @param {Object} options
  1046. * @param {String} [options.animation] The animation name
  1047. * @param {Object} [options.animationOptions] The animation options
  1048. * @param {Object} defaultAnimator The default animator instance
  1049. * @return {Object} An animator instance
  1050. */
  1051. }, {
  1052. key: 'newAnimator',
  1053. value: function newAnimator() {
  1054. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1055. var defaultAnimator = arguments[1];
  1056. var animator = null;
  1057. if (options.animation instanceof this._baseClass) {
  1058. return options.animation;
  1059. }
  1060. var Animator = null;
  1061. if (typeof options.animation === 'string') {
  1062. Animator = this._animators[options.animation];
  1063. }
  1064. if (!Animator && defaultAnimator) {
  1065. animator = defaultAnimator;
  1066. } else {
  1067. Animator = Animator || this._animators[this._animation];
  1068. var animationOpts = util$1.extend({}, this._animationOptions, options.animationOptions || {}, internal$1.config.animationsDisabled ? { duration: 0, delay: 0 } : {});
  1069. animator = new Animator(animationOpts);
  1070. if (typeof animator === 'function') {
  1071. animator = new animator(animationOpts); // eslint-disable-line new-cap
  1072. }
  1073. }
  1074. if (!(animator instanceof this._baseClass)) {
  1075. util$1.throw('"animator" is not an instance of ' + this._baseClassName);
  1076. }
  1077. return animator;
  1078. }
  1079. }], [{
  1080. key: 'parseAnimationOptionsString',
  1081. value: function parseAnimationOptionsString(jsonString) {
  1082. try {
  1083. if (typeof jsonString === 'string') {
  1084. var result = util$1.animationOptionsParse(jsonString);
  1085. if ((typeof result === 'undefined' ? 'undefined' : _typeof(result)) === 'object' && result !== null) {
  1086. return result;
  1087. } else {
  1088. console.error('"animation-options" attribute must be a JSON object string: ' + jsonString);
  1089. }
  1090. }
  1091. return {};
  1092. } catch (e) {
  1093. console.error('"animation-options" attribute must be a JSON object string: ' + jsonString);
  1094. return {};
  1095. }
  1096. }
  1097. }]);
  1098. return AnimatorFactory;
  1099. }();
  1100. /*
  1101. Copyright 2013-2015 ASIAL CORPORATION
  1102. Licensed under the Apache License, Version 2.0 (the "License");
  1103. you may not use this file except in compliance with the License.
  1104. You may obtain a copy of the License at
  1105. http://www.apache.org/licenses/LICENSE-2.0
  1106. Unless required by applicable law or agreed to in writing, software
  1107. distributed under the License is distributed on an "AS IS" BASIS,
  1108. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1109. See the License for the specific language governing permissions and
  1110. limitations under the License.
  1111. */
  1112. var autoStyleEnabled = true;
  1113. // Modifiers
  1114. var modifiersMap = {
  1115. 'quiet': 'material--flat',
  1116. 'light': 'material--flat',
  1117. 'outline': 'material--flat',
  1118. 'cta': '',
  1119. 'large--quiet': 'material--flat large',
  1120. 'large--cta': 'large',
  1121. 'noborder': '',
  1122. 'tappable': ''
  1123. };
  1124. var platforms = {};
  1125. platforms.android = function (element) {
  1126. var elementName = element.tagName.toLowerCase();
  1127. if (!util$1.hasModifier(element, 'material')) {
  1128. var oldModifier = element.getAttribute('modifier') || '';
  1129. var newModifier = oldModifier.trim().split(/\s+/).map(function (e) {
  1130. return modifiersMap.hasOwnProperty(e) ? modifiersMap[e] : e;
  1131. });
  1132. newModifier.unshift('material');
  1133. element.setAttribute('modifier', newModifier.join(' ').trim());
  1134. }
  1135. var elements = ['ons-alert-dialog-button', 'ons-toolbar-button', 'ons-back-button', 'ons-button', 'ons-list-item', 'ons-fab', 'ons-speed-dial', 'ons-speed-dial-item', 'ons-tab'];
  1136. // Effects
  1137. if (elements.indexOf(elementName) !== -1 && !element.hasAttribute('ripple') && !element.querySelector('ons-ripple')) {
  1138. if (elementName === 'ons-list-item') {
  1139. if (element.hasAttribute('tappable')) {
  1140. element.setAttribute('ripple', '');
  1141. element.removeAttribute('tappable');
  1142. }
  1143. } else {
  1144. element.setAttribute('ripple', '');
  1145. }
  1146. }
  1147. };
  1148. platforms.ios = function (element) {
  1149. // Modifiers
  1150. if (util$1.removeModifier(element, 'material')) {
  1151. if (util$1.removeModifier(element, 'material--flat')) {
  1152. util$1.addModifier(element, util$1.removeModifier(element, 'large') ? 'large--quiet' : 'quiet');
  1153. }
  1154. if (!element.getAttribute('modifier')) {
  1155. element.removeAttribute('modifier');
  1156. }
  1157. }
  1158. // Effects
  1159. if (element.hasAttribute('ripple')) {
  1160. if (element.tagName.toLowerCase() === 'ons-list-item') {
  1161. element.setAttribute('tappable', '');
  1162. }
  1163. element.removeAttribute('ripple');
  1164. }
  1165. };
  1166. var unlocked = {
  1167. android: true
  1168. };
  1169. var getPlatform = function getPlatform(element, force) {
  1170. if (autoStyleEnabled && !element.hasAttribute('disable-auto-styling')) {
  1171. var mobileOS = platform.getMobileOS();
  1172. if (platforms.hasOwnProperty(mobileOS) && (unlocked.hasOwnProperty(mobileOS) || force)) {
  1173. return mobileOS;
  1174. }
  1175. }
  1176. return null;
  1177. };
  1178. var prepare = function prepare(element, force) {
  1179. var p = getPlatform(element, force);
  1180. p && platforms[p](element);
  1181. };
  1182. var mapModifier = function mapModifier(modifier, element, force) {
  1183. if (getPlatform(element, force)) {
  1184. return modifier.split(/\s+/).map(function (m) {
  1185. return modifiersMap.hasOwnProperty(m) ? modifiersMap[m] : m;
  1186. }).join(' ');
  1187. }
  1188. return modifier;
  1189. };
  1190. var restoreModifier = function restoreModifier(element) {
  1191. if (getPlatform(element) === 'android') {
  1192. var modifier = element.getAttribute('modifier') || '';
  1193. var newModifier = mapModifier(modifier, element);
  1194. if (!/(^|\s+)material($|\s+)/i.test(modifier)) {
  1195. newModifier = 'material ' + newModifier;
  1196. }
  1197. if (newModifier !== modifier) {
  1198. element.setAttribute('modifier', newModifier.trim());
  1199. return true;
  1200. }
  1201. }
  1202. return false;
  1203. };
  1204. var autoStyle = {
  1205. isEnabled: function isEnabled() {
  1206. return autoStyleEnabled;
  1207. },
  1208. enable: function enable() {
  1209. return autoStyleEnabled = true;
  1210. },
  1211. disable: function disable() {
  1212. return autoStyleEnabled = false;
  1213. },
  1214. prepare: prepare,
  1215. mapModifier: mapModifier,
  1216. getPlatform: getPlatform,
  1217. restoreModifier: restoreModifier
  1218. };
  1219. /*
  1220. Copyright 2013-2015 ASIAL CORPORATION
  1221. Licensed under the Apache License, Version 2.0 (the "License");
  1222. you may not use this file except in compliance with the License.
  1223. You may obtain a copy of the License at
  1224. http://www.apache.org/licenses/LICENSE-2.0
  1225. Unless required by applicable law or agreed to in writing, software
  1226. distributed under the License is distributed on an "AS IS" BASIS,
  1227. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1228. See the License for the specific language governing permissions and
  1229. limitations under the License.
  1230. */
  1231. var ModifierUtil = function () {
  1232. function ModifierUtil() {
  1233. classCallCheck(this, ModifierUtil);
  1234. }
  1235. createClass(ModifierUtil, null, [{
  1236. key: 'diff',
  1237. /**
  1238. * @param {String} last
  1239. * @param {String} current
  1240. */
  1241. value: function diff(last, current) {
  1242. last = makeDict(('' + last).trim());
  1243. current = makeDict(('' + current).trim());
  1244. var removed = Object.keys(last).reduce(function (result, token) {
  1245. if (!current[token]) {
  1246. result.push(token);
  1247. }
  1248. return result;
  1249. }, []);
  1250. var added = Object.keys(current).reduce(function (result, token) {
  1251. if (!last[token]) {
  1252. result.push(token);
  1253. }
  1254. return result;
  1255. }, []);
  1256. return { added: added, removed: removed };
  1257. function makeDict(modifier) {
  1258. var dict = {};
  1259. ModifierUtil.split(modifier).forEach(function (token) {
  1260. return dict[token] = token;
  1261. });
  1262. return dict;
  1263. }
  1264. }
  1265. /**
  1266. * @param {Object} diff
  1267. * @param {Array} diff.removed
  1268. * @param {Array} diff.added
  1269. * @param {Object} classList
  1270. * @param {String} template
  1271. */
  1272. }, {
  1273. key: 'applyDiffToClassList',
  1274. value: function applyDiffToClassList(diff, classList, template) {
  1275. diff.added.map(function (modifier) {
  1276. return template.replace(/\*/g, modifier);
  1277. }).forEach(function (klass) {
  1278. return klass.split(/\s+/).forEach(function (k) {
  1279. return classList.add(k);
  1280. });
  1281. });
  1282. diff.removed.map(function (modifier) {
  1283. return template.replace(/\*/g, modifier);
  1284. }).forEach(function (klass) {
  1285. return klass.split(/\s+/).forEach(function (k) {
  1286. return classList.remove(k);
  1287. });
  1288. });
  1289. }
  1290. /**
  1291. * @param {Object} diff
  1292. * @param {Array} diff.removed
  1293. * @param {Array} diff.added
  1294. * @param {HTMLElement} element
  1295. * @param {Object} scheme
  1296. */
  1297. }, {
  1298. key: 'applyDiffToElement',
  1299. value: function applyDiffToElement(diff, element, scheme) {
  1300. Object.keys(scheme).forEach(function (selector) {
  1301. var targetElements = !selector || util$1.match(element, selector) ? [element] : Array.prototype.filter.call(element.querySelectorAll(selector), function (targetElement) {
  1302. return !util$1.findParent(targetElement, element.tagName, function (parent) {
  1303. return parent === element;
  1304. });
  1305. });
  1306. for (var i = 0; i < targetElements.length; i++) {
  1307. ModifierUtil.applyDiffToClassList(diff, targetElements[i].classList, scheme[selector]);
  1308. }
  1309. });
  1310. }
  1311. /**
  1312. * @param {String} last
  1313. * @param {String} current
  1314. * @param {HTMLElement} element
  1315. * @param {Object} scheme
  1316. */
  1317. }, {
  1318. key: 'onModifierChanged',
  1319. value: function onModifierChanged(last, current, element, scheme) {
  1320. ModifierUtil.applyDiffToElement(ModifierUtil.diff(last, current), element, scheme);
  1321. autoStyle.restoreModifier(element);
  1322. }
  1323. }, {
  1324. key: 'refresh',
  1325. value: function refresh(element, scheme) {
  1326. ModifierUtil.applyDiffToElement(ModifierUtil.diff('', element.getAttribute('modifier') || ''), element, scheme);
  1327. }
  1328. /**
  1329. * @param {HTMLElement} element
  1330. * @param {Object} scheme
  1331. */
  1332. }, {
  1333. key: 'initModifier',
  1334. value: function initModifier(element, scheme) {
  1335. var modifier = element.getAttribute('modifier');
  1336. if (typeof modifier !== 'string') {
  1337. return;
  1338. }
  1339. ModifierUtil.applyDiffToElement({
  1340. removed: [],
  1341. added: ModifierUtil.split(modifier)
  1342. }, element, scheme);
  1343. }
  1344. }, {
  1345. key: 'split',
  1346. value: function split(modifier) {
  1347. if (typeof modifier !== 'string') {
  1348. return [];
  1349. }
  1350. return modifier.trim().split(/ +/).filter(function (token) {
  1351. return token !== '';
  1352. });
  1353. }
  1354. /**
  1355. * Add modifier token to an element.
  1356. */
  1357. }, {
  1358. key: 'addModifier',
  1359. value: function addModifier(element, modifierToken) {
  1360. if (!element.hasAttribute('modifier')) {
  1361. element.setAttribute('modifier', modifierToken);
  1362. } else {
  1363. var tokens = ModifierUtil.split(element.getAttribute('modifier'));
  1364. if (tokens.indexOf(modifierToken) == -1) {
  1365. tokens.push(modifierToken);
  1366. element.setAttribute('modifier', tokens.join(' '));
  1367. }
  1368. }
  1369. }
  1370. /**
  1371. * Remove modifier token from an element.
  1372. */
  1373. }, {
  1374. key: 'removeModifier',
  1375. value: function removeModifier(element, modifierToken) {
  1376. if (element.hasAttribute('modifier')) {
  1377. var tokens = ModifierUtil.split(element.getAttribute('modifier'));
  1378. var index = tokens.indexOf(modifierToken);
  1379. if (index !== -1) {
  1380. tokens.splice(index, 1);
  1381. element.setAttribute('modifier', tokens.join(' '));
  1382. }
  1383. }
  1384. }
  1385. }]);
  1386. return ModifierUtil;
  1387. }();
  1388. /*
  1389. Copyright 2013-2015 ASIAL CORPORATION
  1390. Licensed under the Apache License, Version 2.0 (the "License");
  1391. you may not use this file except in compliance with the License.
  1392. You may obtain a copy of the License at
  1393. http://www.apache.org/licenses/LICENSE-2.0
  1394. Unless required by applicable law or agreed to in writing, software
  1395. distributed under the License is distributed on an "AS IS" BASIS,
  1396. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1397. See the License for the specific language governing permissions and
  1398. limitations under the License.
  1399. */
  1400. var util$3 = {
  1401. _ready: false,
  1402. _domContentLoaded: false,
  1403. _onDOMContentLoaded: function _onDOMContentLoaded() {
  1404. util$3._domContentLoaded = true;
  1405. if (platform.isWebView()) {
  1406. window.document.addEventListener('deviceready', function () {
  1407. util$3._ready = true;
  1408. }, false);
  1409. } else {
  1410. util$3._ready = true;
  1411. }
  1412. },
  1413. addBackButtonListener: function addBackButtonListener(fn) {
  1414. if (!this._domContentLoaded) {
  1415. throw new Error('This method is available after DOMContentLoaded');
  1416. }
  1417. if (this._ready) {
  1418. window.document.addEventListener('backbutton', fn, false);
  1419. } else {
  1420. window.document.addEventListener('deviceready', function () {
  1421. window.document.addEventListener('backbutton', fn, false);
  1422. });
  1423. }
  1424. },
  1425. removeBackButtonListener: function removeBackButtonListener(fn) {
  1426. if (!this._domContentLoaded) {
  1427. throw new Error('This method is available after DOMContentLoaded');
  1428. }
  1429. if (this._ready) {
  1430. window.document.removeEventListener('backbutton', fn, false);
  1431. } else {
  1432. window.document.addEventListener('deviceready', function () {
  1433. window.document.removeEventListener('backbutton', fn, false);
  1434. });
  1435. }
  1436. }
  1437. };
  1438. window.addEventListener('DOMContentLoaded', function () {
  1439. return util$3._onDOMContentLoaded();
  1440. }, false);
  1441. var HandlerRepository = {
  1442. _store: {},
  1443. _genId: function () {
  1444. var i = 0;
  1445. return function () {
  1446. return i++;
  1447. };
  1448. }(),
  1449. set: function set$$1(element, handler) {
  1450. if (element.dataset.deviceBackButtonHandlerId) {
  1451. this.remove(element);
  1452. }
  1453. var id = element.dataset.deviceBackButtonHandlerId = HandlerRepository._genId();
  1454. this._store[id] = handler;
  1455. },
  1456. remove: function remove(element) {
  1457. if (element.dataset.deviceBackButtonHandlerId) {
  1458. delete this._store[element.dataset.deviceBackButtonHandlerId];
  1459. delete element.dataset.deviceBackButtonHandlerId;
  1460. }
  1461. },
  1462. get: function get$$1(element) {
  1463. if (!element.dataset.deviceBackButtonHandlerId) {
  1464. return undefined;
  1465. }
  1466. var id = element.dataset.deviceBackButtonHandlerId;
  1467. if (!this._store[id]) {
  1468. throw new Error();
  1469. }
  1470. return this._store[id];
  1471. },
  1472. has: function has(element) {
  1473. if (!element.dataset) {
  1474. return false;
  1475. }
  1476. var id = element.dataset.deviceBackButtonHandlerId;
  1477. return !!this._store[id];
  1478. }
  1479. };
  1480. var DeviceBackButtonDispatcher = function () {
  1481. function DeviceBackButtonDispatcher() {
  1482. classCallCheck(this, DeviceBackButtonDispatcher);
  1483. this._isEnabled = false;
  1484. this._boundCallback = this._callback.bind(this);
  1485. }
  1486. /**
  1487. * Enable to handle 'backbutton' events.
  1488. */
  1489. createClass(DeviceBackButtonDispatcher, [{
  1490. key: 'enable',
  1491. value: function enable() {
  1492. if (!this._isEnabled) {
  1493. util$3.addBackButtonListener(this._boundCallback);
  1494. this._isEnabled = true;
  1495. }
  1496. }
  1497. /**
  1498. * Disable to handle 'backbutton' events.
  1499. */
  1500. }, {
  1501. key: 'disable',
  1502. value: function disable() {
  1503. if (this._isEnabled) {
  1504. util$3.removeBackButtonListener(this._boundCallback);
  1505. this._isEnabled = false;
  1506. }
  1507. }
  1508. /**
  1509. * Fire a 'backbutton' event manually.
  1510. */
  1511. }, {
  1512. key: 'fireDeviceBackButtonEvent',
  1513. value: function fireDeviceBackButtonEvent() {
  1514. var event = document.createEvent('Event');
  1515. event.initEvent('backbutton', true, true);
  1516. document.dispatchEvent(event);
  1517. }
  1518. }, {
  1519. key: '_callback',
  1520. value: function _callback() {
  1521. this._dispatchDeviceBackButtonEvent();
  1522. }
  1523. /**
  1524. * @param {HTMLElement} element
  1525. * @param {Function} callback
  1526. */
  1527. }, {
  1528. key: 'createHandler',
  1529. value: function createHandler(element, callback) {
  1530. if (!(element instanceof HTMLElement)) {
  1531. throw new Error('element must be an instance of HTMLElement');
  1532. }
  1533. if (!(callback instanceof Function)) {
  1534. throw new Error('callback must be an instance of Function');
  1535. }
  1536. var handler = {
  1537. _callback: callback,
  1538. _element: element,
  1539. disable: function disable() {
  1540. HandlerRepository.remove(element);
  1541. },
  1542. setListener: function setListener(callback) {
  1543. this._callback = callback;
  1544. },
  1545. enable: function enable() {
  1546. HandlerRepository.set(element, this);
  1547. },
  1548. isEnabled: function isEnabled() {
  1549. return HandlerRepository.get(element) === this;
  1550. },
  1551. destroy: function destroy() {
  1552. HandlerRepository.remove(element);
  1553. this._callback = this._element = null;
  1554. }
  1555. };
  1556. handler.enable();
  1557. return handler;
  1558. }
  1559. }, {
  1560. key: '_dispatchDeviceBackButtonEvent',
  1561. value: function _dispatchDeviceBackButtonEvent() {
  1562. var tree = this._captureTree();
  1563. var element = this._findHandlerLeafElement(tree);
  1564. var handler = HandlerRepository.get(element);
  1565. handler._callback(createEvent(element));
  1566. function createEvent(element) {
  1567. return {
  1568. _element: element,
  1569. callParentHandler: function callParentHandler() {
  1570. var parent = this._element.parentNode;
  1571. while (parent) {
  1572. handler = HandlerRepository.get(parent);
  1573. if (handler) {
  1574. return handler._callback(createEvent(parent));
  1575. }
  1576. parent = parent.parentNode;
  1577. }
  1578. }
  1579. };
  1580. }
  1581. }
  1582. /**
  1583. * @return {Object}
  1584. */
  1585. }, {
  1586. key: '_captureTree',
  1587. value: function _captureTree() {
  1588. return createTree(document.body);
  1589. function createTree(element) {
  1590. var tree = {
  1591. element: element,
  1592. children: Array.prototype.concat.apply([], arrayOf(element.children).map(function (childElement) {
  1593. if (childElement.style.display === 'none' || childElement._isShown === false) {
  1594. return [];
  1595. }
  1596. if (childElement.children.length === 0 && !HandlerRepository.has(childElement)) {
  1597. return [];
  1598. }
  1599. var result = createTree(childElement);
  1600. if (result.children.length === 0 && !HandlerRepository.has(result.element)) {
  1601. return [];
  1602. }
  1603. return [result];
  1604. }))
  1605. };
  1606. if (!HandlerRepository.has(tree.element)) {
  1607. for (var i = 0; i < tree.children.length; i++) {
  1608. var subTree = tree.children[i];
  1609. if (HandlerRepository.has(subTree.element)) {
  1610. return subTree;
  1611. }
  1612. }
  1613. }
  1614. return tree;
  1615. }
  1616. function arrayOf(target) {
  1617. var result = [];
  1618. for (var i = 0; i < target.length; i++) {
  1619. result.push(target[i]);
  1620. }
  1621. return result;
  1622. }
  1623. }
  1624. /**
  1625. * @param {Object} tree
  1626. * @return {HTMLElement}
  1627. */
  1628. }, {
  1629. key: '_findHandlerLeafElement',
  1630. value: function _findHandlerLeafElement(tree) {
  1631. return find(tree);
  1632. function find(node) {
  1633. if (node.children.length === 0) {
  1634. return node.element;
  1635. }
  1636. if (node.children.length === 1) {
  1637. return find(node.children[0]);
  1638. }
  1639. return node.children.map(function (childNode) {
  1640. return childNode.element;
  1641. }).reduce(function (left, right) {
  1642. if (!left) {
  1643. return right;
  1644. }
  1645. var leftZ = parseInt(window.getComputedStyle(left, '').zIndex, 10);
  1646. var rightZ = parseInt(window.getComputedStyle(right, '').zIndex, 10);
  1647. if (!isNaN(leftZ) && !isNaN(rightZ)) {
  1648. return leftZ > rightZ ? left : right;
  1649. }
  1650. throw new Error('Capturing backbutton-handler is failure.');
  1651. }, null);
  1652. }
  1653. }
  1654. }]);
  1655. return DeviceBackButtonDispatcher;
  1656. }();
  1657. var deviceBackButtonDispatcher = new DeviceBackButtonDispatcher();
  1658. /*
  1659. Copyright 2013-2015 ASIAL CORPORATION
  1660. Licensed under the Apache License, Version 2.0 (the "License");
  1661. you may not use this file except in compliance with the License.
  1662. You may obtain a copy of the License at
  1663. http://www.apache.org/licenses/LICENSE-2.0
  1664. Unless required by applicable law or agreed to in writing, software
  1665. distributed under the License is distributed on an "AS IS" BASIS,
  1666. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1667. See the License for the specific language governing permissions and
  1668. limitations under the License.
  1669. */
  1670. internal$1.AnimatorFactory = AnimatorFactory;
  1671. internal$1.ModifierUtil = ModifierUtil;
  1672. internal$1.dbbDispatcher = deviceBackButtonDispatcher;
  1673. /*
  1674. Copyright 2013-2015 ASIAL CORPORATION
  1675. Licensed under the Apache License, Version 2.0 (the "License");
  1676. you may not use this file except in compliance with the License.
  1677. You may obtain a copy of the License at
  1678. http://www.apache.org/licenses/LICENSE-2.0
  1679. Unless required by applicable law or agreed to in writing, software
  1680. distributed under the License is distributed on an "AS IS" BASIS,
  1681. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1682. See the License for the specific language governing permissions and
  1683. limitations under the License.
  1684. */
  1685. var startsWith = function startsWith(s, c) {
  1686. return s.substr(0, c.length) === c;
  1687. };
  1688. var endsWith = function endsWith(s, c) {
  1689. return s.substr(s.length - c.length, c.length) === c;
  1690. };
  1691. var unwrap = function unwrap(s) {
  1692. return s.slice(1, -1);
  1693. };
  1694. var isObjectString = function isObjectString(s) {
  1695. return startsWith(s, '{') && endsWith(s, '}');
  1696. };
  1697. var isArrayString = function isArrayString(s) {
  1698. return startsWith(s, '[') && endsWith(s, ']');
  1699. };
  1700. var isQuotedString = function isQuotedString(s) {
  1701. return startsWith(s, '\'') && endsWith(s, '\'') || startsWith(s, '"') && endsWith(s, '"');
  1702. };
  1703. var error$1 = function error(token, string, originalString) {
  1704. throw new Error('Unexpected token \'' + token + '\' at position ' + (originalString.length - string.length - 1) + ' in string: \'' + originalString + '\'');
  1705. };
  1706. var processToken = function processToken(token, string, originalString) {
  1707. if (token === 'true' || token === 'false') {
  1708. return token === 'true';
  1709. } else if (isQuotedString(token)) {
  1710. return unwrap(token);
  1711. } else if (!isNaN(token)) {
  1712. return +token;
  1713. } else if (isObjectString(token)) {
  1714. return parseObject(unwrap(token));
  1715. } else if (isArrayString(token)) {
  1716. return parseArray(unwrap(token));
  1717. } else {
  1718. error$1(token, string, originalString);
  1719. }
  1720. };
  1721. var nextToken = function nextToken(string) {
  1722. string = string.trim();
  1723. var limit = string.length;
  1724. if (string[0] === ':' || string[0] === ',') {
  1725. limit = 1;
  1726. } else if (string[0] === '{' || string[0] === '[') {
  1727. var c = string.charCodeAt(0);
  1728. var nestedObject = 1;
  1729. for (var i = 1; i < string.length; i++) {
  1730. if (string.charCodeAt(i) === c) {
  1731. nestedObject++;
  1732. } else if (string.charCodeAt(i) === c + 2) {
  1733. nestedObject--;
  1734. if (nestedObject === 0) {
  1735. limit = i + 1;
  1736. break;
  1737. }
  1738. }
  1739. }
  1740. } else if (string[0] === '\'' || string[0] === '"') {
  1741. for (var _i = 1; _i < string.length; _i++) {
  1742. if (string[_i] === string[0]) {
  1743. limit = _i + 1;
  1744. break;
  1745. }
  1746. }
  1747. } else {
  1748. for (var _i2 = 1; _i2 < string.length; _i2++) {
  1749. if ([' ', ',', ':'].indexOf(string[_i2]) !== -1) {
  1750. limit = _i2;
  1751. break;
  1752. }
  1753. }
  1754. }
  1755. return string.slice(0, limit);
  1756. };
  1757. var parseObject = function parseObject(string) {
  1758. var isValidKey = function isValidKey(key) {
  1759. return (/^[A-Z_$][A-Z0-9_$]*$/i.test(key)
  1760. );
  1761. };
  1762. string = string.trim();
  1763. var originalString = string;
  1764. var object = {};
  1765. var readingKey = true,
  1766. key = void 0,
  1767. previousToken = void 0,
  1768. token = void 0;
  1769. while (string.length > 0) {
  1770. previousToken = token;
  1771. token = nextToken(string);
  1772. string = string.slice(token.length, string.length).trim();
  1773. if (token === ':' && (!readingKey || !previousToken || previousToken === ',') || token === ',' && readingKey || token !== ':' && token !== ',' && previousToken && previousToken !== ',' && previousToken !== ':') {
  1774. error$1(token, string, originalString);
  1775. } else if (token === ':' && readingKey && previousToken) {
  1776. previousToken = isQuotedString(previousToken) ? unwrap(previousToken) : previousToken;
  1777. if (isValidKey(previousToken)) {
  1778. key = previousToken;
  1779. readingKey = false;
  1780. } else {
  1781. throw new Error('Invalid key token \'' + previousToken + '\' at position 0 in string: \'' + originalString + '\'');
  1782. }
  1783. } else if (token === ',' && !readingKey && previousToken) {
  1784. object[key] = processToken(previousToken, string, originalString);
  1785. readingKey = true;
  1786. }
  1787. }
  1788. if (token) {
  1789. object[key] = processToken(token, string, originalString);
  1790. }
  1791. return object;
  1792. };
  1793. var parseArray = function parseArray(string) {
  1794. string = string.trim();
  1795. var originalString = string;
  1796. var array = [];
  1797. var previousToken = void 0,
  1798. token = void 0;
  1799. while (string.length > 0) {
  1800. previousToken = token;
  1801. token = nextToken(string);
  1802. string = string.slice(token.length, string.length).trim();
  1803. if (token === ',' && (!previousToken || previousToken === ',')) {
  1804. error$1(token, string, originalString);
  1805. } else if (token === ',') {
  1806. array.push(processToken(previousToken, string, originalString));
  1807. }
  1808. }
  1809. if (token) {
  1810. if (token !== ',') {
  1811. array.push(processToken(token, string, originalString));
  1812. } else {
  1813. error$1(token, string, originalString);
  1814. }
  1815. }
  1816. return array;
  1817. };
  1818. var parse = function parse(string) {
  1819. string = string.trim();
  1820. if (isObjectString(string)) {
  1821. return parseObject(unwrap(string));
  1822. } else if (isArrayString(string)) {
  1823. return parseArray(unwrap(string));
  1824. } else {
  1825. throw new Error('Provided string must be object or array like: ' + string);
  1826. }
  1827. };
  1828. /*
  1829. Copyright 2013-2015 ASIAL CORPORATION
  1830. Licensed under the Apache License, Version 2.0 (the "License");
  1831. you may not use this file except in compliance with the License.
  1832. You may obtain a copy of the License at
  1833. http://www.apache.org/licenses/LICENSE-2.0
  1834. Unless required by applicable law or agreed to in writing, software
  1835. distributed under the License is distributed on an "AS IS" BASIS,
  1836. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1837. See the License for the specific language governing permissions and
  1838. limitations under the License.
  1839. */
  1840. var util$1 = {};
  1841. var errorPrefix = '[Onsen UI]';
  1842. util$1.globals = {
  1843. fabOffset: 0,
  1844. errorPrefix: errorPrefix,
  1845. supportsPassive: false
  1846. };
  1847. platform._runOnActualPlatform(function () {
  1848. util$1.globals.actualMobileOS = platform.getMobileOS();
  1849. util$1.globals.isUIWebView = platform.isUIWebView();
  1850. util$1.globals.isWKWebView = platform.isWKWebView();
  1851. });
  1852. try {
  1853. var opts = Object.defineProperty({}, 'passive', {
  1854. get: function get$$1() {
  1855. util$1.globals.supportsPassive = true;
  1856. }
  1857. });
  1858. window.addEventListener('testPassive', null, opts);
  1859. window.removeEventListener('testPassive', null, opts);
  1860. } catch (e) {
  1861. }
  1862. /**
  1863. * @param {Element} el Target
  1864. * @param {String} name Event name
  1865. * @param {Function} handler Event handler
  1866. * @param {Object} [opt] Event options (passive, capture...)
  1867. * @param {Boolean} [isGD] If comes from GestureDetector. Just for testing.
  1868. */
  1869. util$1.addEventListener = function (el, name, handler, opt, isGD) {
  1870. el.addEventListener(name, handler, util$1.globals.supportsPassive ? opt : (opt || {}).capture);
  1871. };
  1872. util$1.removeEventListener = function (el, name, handler, opt, isGD) {
  1873. el.removeEventListener(name, handler, util$1.globals.supportsPassive ? opt : (opt || {}).capture);
  1874. };
  1875. /**
  1876. * @param {String/Function} query dot class name or node name or matcher function.
  1877. * @return {Function}
  1878. */
  1879. util$1.prepareQuery = function (query) {
  1880. return query instanceof Function ? query : function (element) {
  1881. return util$1.match(element, query);
  1882. };
  1883. };
  1884. /**
  1885. * @param {Element} e
  1886. * @param {String/Function} s CSS Selector.
  1887. * @return {Boolean}
  1888. */
  1889. util$1.match = function (e, s) {
  1890. return (e.matches || e.webkitMatchesSelector || e.mozMatchesSelector || e.msMatchesSelector).call(e, s);
  1891. };
  1892. /**
  1893. * @param {Element} element
  1894. * @param {String/Function} query dot class name or node name or matcher function.
  1895. * @return {HTMLElement/null}
  1896. */
  1897. util$1.findChild = function (element, query) {
  1898. var match = util$1.prepareQuery(query);
  1899. // Caution: `element.children` is `undefined` in some environments if `element` is `svg`
  1900. for (var i = 0; i < element.childNodes.length; i++) {
  1901. var node = element.childNodes[i];
  1902. if (node.nodeType !== Node.ELEMENT_NODE) {
  1903. // process only element nodes
  1904. continue;
  1905. }
  1906. if (match(node)) {
  1907. return node;
  1908. }
  1909. }
  1910. return null;
  1911. };
  1912. /**
  1913. * @param {Element} element
  1914. * @param {String/Function} query dot class name or node name or matcher function.
  1915. * @return {HTMLElement/null}
  1916. */
  1917. util$1.findParent = function (element, query, until) {
  1918. var match = util$1.prepareQuery(query);
  1919. var parent = element.parentNode;
  1920. for (;;) {
  1921. if (!parent || parent === document || parent instanceof DocumentFragment || until && until(parent)) {
  1922. return null;
  1923. } else if (match(parent)) {
  1924. return parent;
  1925. }
  1926. parent = parent.parentNode;
  1927. }
  1928. };
  1929. /**
  1930. * @param {Element} element
  1931. * @return {boolean}
  1932. */
  1933. util$1.isAttached = function (element) {
  1934. return document.body.contains(element);
  1935. };
  1936. /**
  1937. * @param {Element} element
  1938. * @return {boolean}
  1939. */
  1940. util$1.hasAnyComponentAsParent = function (element) {
  1941. while (element && document.documentElement !== element) {
  1942. element = element.parentNode;
  1943. if (element && element.nodeName.toLowerCase().match(/(ons-navigator|ons-tabbar|ons-modal)/)) {
  1944. return true;
  1945. }
  1946. }
  1947. return false;
  1948. };
  1949. /**
  1950. * @param {Object} element
  1951. * @return {Array}
  1952. */
  1953. util$1.getAllChildNodes = function (element) {
  1954. var _ref;
  1955. return (_ref = [element]).concat.apply(_ref, toConsumableArray(Array.from(element.children).map(function (childEl) {
  1956. return util$1.getAllChildNodes(childEl);
  1957. })));
  1958. };
  1959. /**
  1960. * @param {Element} element
  1961. * @return {boolean}
  1962. */
  1963. util$1.isPageControl = function (element) {
  1964. return element.nodeName.match(/^ons-(navigator|splitter|tabbar|page)$/i);
  1965. };
  1966. /**
  1967. * @param {Element} element
  1968. * @param {String} action to propagate
  1969. */
  1970. util$1.propagateAction = function (element, action) {
  1971. for (var i = 0; i < element.childNodes.length; i++) {
  1972. var child = element.childNodes[i];
  1973. if (child[action] instanceof Function) {
  1974. child[action]();
  1975. } else {
  1976. util$1.propagateAction(child, action);
  1977. }
  1978. }
  1979. };
  1980. /**
  1981. * @param {String} string - string to be camelized
  1982. * @return {String} Camelized string
  1983. */
  1984. util$1.camelize = function (string) {
  1985. return string.toLowerCase().replace(/-([a-z])/g, function (m, l) {
  1986. return l.toUpperCase();
  1987. });
  1988. };
  1989. /**
  1990. * @param {String} string - string to be hyphenated
  1991. * @return {String} Hyphenated string
  1992. */
  1993. util$1.hyphenate = function (string) {
  1994. return string.replace(/([a-zA-Z])([A-Z])/g, '$1-$2').toLowerCase();
  1995. };
  1996. /**
  1997. * @param {String} selector - tag and class only
  1998. * @param {Object} style
  1999. * @param {Element}
  2000. */
  2001. util$1.create = function () {
  2002. var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  2003. var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2004. var classList = selector.split('.');
  2005. var element = document.createElement(classList.shift() || 'div');
  2006. if (classList.length) {
  2007. element.className = classList.join(' ');
  2008. }
  2009. styler(element, style);
  2010. return element;
  2011. };
  2012. /**
  2013. * @param {String} html
  2014. * @return {Element}
  2015. */
  2016. util$1.createElement = function (html) {
  2017. var wrapper = document.createElement('div');
  2018. if (html instanceof DocumentFragment) {
  2019. wrapper.appendChild(document.importNode(html, true));
  2020. } else {
  2021. wrapper.innerHTML = html.trim();
  2022. }
  2023. if (wrapper.children.length > 1) {
  2024. util$1.throw('HTML template must contain a single root element');
  2025. }
  2026. var element = wrapper.children[0];
  2027. wrapper.children[0].remove();
  2028. return element;
  2029. };
  2030. /**
  2031. * @param {String} html
  2032. * @return {HTMLFragment}
  2033. */
  2034. util$1.createFragment = function (html) {
  2035. var template = document.createElement('template');
  2036. template.innerHTML = html;
  2037. return document.importNode(template.content, true);
  2038. };
  2039. /*
  2040. * @param {Object} dst Destination object.
  2041. * @param {...Object} src Source object(s).
  2042. * @returns {Object} Reference to `dst`.
  2043. */
  2044. util$1.extend = function (dst) {
  2045. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  2046. args[_key - 1] = arguments[_key];
  2047. }
  2048. for (var i = 0; i < args.length; i++) {
  2049. if (args[i]) {
  2050. var keys = Object.keys(args[i]);
  2051. for (var j = 0; j < keys.length; j++) {
  2052. var key = keys[j];
  2053. dst[key] = args[i][key];
  2054. }
  2055. }
  2056. }
  2057. return dst;
  2058. };
  2059. /**
  2060. * @param {Object} arrayLike
  2061. * @return {Array}
  2062. */
  2063. util$1.arrayFrom = function (arrayLike) {
  2064. return Array.prototype.slice.apply(arrayLike);
  2065. };
  2066. /**
  2067. * @param {String} jsonString
  2068. * @param {Object} [failSafe]
  2069. * @return {Object}
  2070. */
  2071. util$1.parseJSONObjectSafely = function (jsonString) {
  2072. var failSafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2073. try {
  2074. var result = JSON.parse('' + jsonString);
  2075. if ((typeof result === 'undefined' ? 'undefined' : _typeof(result)) === 'object' && result !== null) {
  2076. return result;
  2077. }
  2078. } catch (e) {
  2079. return failSafe;
  2080. }
  2081. return failSafe;
  2082. };
  2083. /**
  2084. * @param {String} path - path such as 'myApp.controllers.data.loadData'
  2085. * @return {Any} - whatever is located at that path
  2086. */
  2087. util$1.findFromPath = function (path) {
  2088. path = path.split('.');
  2089. var el = window,
  2090. key;
  2091. while (key = path.shift()) {
  2092. // eslint-disable-line no-cond-assign
  2093. el = el[key];
  2094. }
  2095. return el;
  2096. };
  2097. /**
  2098. * @param {HTMLElement} container - Page or page-container that implements 'topPage'
  2099. * @return {HTMLElement|null} - Visible page element or null if not found.
  2100. */
  2101. util$1.getTopPage = function (container) {
  2102. return container && (container.tagName.toLowerCase() === 'ons-page' ? container : container.topPage) || null;
  2103. };
  2104. /**
  2105. * @param {HTMLElement} container - Element where the search begins
  2106. * @return {HTMLElement|null} - Page element that contains the visible toolbar or null.
  2107. */
  2108. util$1.findToolbarPage = function (container) {
  2109. var page = util$1.getTopPage(container);
  2110. if (page) {
  2111. if (page._canAnimateToolbar()) {
  2112. return page;
  2113. }
  2114. for (var i = 0; i < page._contentElement.children.length; i++) {
  2115. var nextPage = util$1.getTopPage(page._contentElement.children[i]);
  2116. if (nextPage && !/ons-tabbar/i.test(page._contentElement.children[i].tagName)) {
  2117. return util$1.findToolbarPage(nextPage);
  2118. }
  2119. }
  2120. }
  2121. return null;
  2122. };
  2123. /**
  2124. * @param {Element} element
  2125. * @param {String} eventName
  2126. * @param {Object} [detail]
  2127. * @return {CustomEvent}
  2128. */
  2129. util$1.triggerElementEvent = function (target, eventName) {
  2130. var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2131. var event = new CustomEvent(eventName, {
  2132. bubbles: true,
  2133. cancelable: true,
  2134. detail: detail
  2135. });
  2136. Object.keys(detail).forEach(function (key) {
  2137. event[key] = detail[key];
  2138. });
  2139. target.dispatchEvent(event);
  2140. return event;
  2141. };
  2142. /**
  2143. * @param {Element} target
  2144. * @param {String} modifierName
  2145. * @return {Boolean}
  2146. */
  2147. util$1.hasModifier = function (target, modifierName) {
  2148. if (!target.hasAttribute('modifier')) {
  2149. return false;
  2150. }
  2151. return RegExp('(^|\\s+)' + modifierName + '($|\\s+)', 'i').test(target.getAttribute('modifier'));
  2152. };
  2153. /**
  2154. * @param {Element} target
  2155. * @param {String} modifierName
  2156. * @param {Object} options.autoStyle Maps the modifierName to the corresponding styled modifier.
  2157. * @param {Object} options.forceAutoStyle Ignores platform limitation.
  2158. * @return {Boolean} Whether it was added or not.
  2159. */
  2160. util$1.addModifier = function (target, modifierName) {
  2161. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2162. if (options.autoStyle) {
  2163. modifierName = autoStyle.mapModifier(modifierName, target, options.forceAutoStyle);
  2164. }
  2165. if (util$1.hasModifier(target, modifierName)) {
  2166. return false;
  2167. }
  2168. target.setAttribute('modifier', ((target.getAttribute('modifier') || '') + ' ' + modifierName).trim());
  2169. return true;
  2170. };
  2171. /**
  2172. * @param {Element} target
  2173. * @param {String} modifierName
  2174. * @param {Object} options.autoStyle Maps the modifierName to the corresponding styled modifier.
  2175. * @param {Object} options.forceAutoStyle Ignores platform limitation.
  2176. * @return {Boolean} Whether it was found or not.
  2177. */
  2178. util$1.removeModifier = function (target, modifierName) {
  2179. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2180. if (options.autoStyle) {
  2181. modifierName = autoStyle.mapModifier(modifierName, target, options.forceAutoStyle);
  2182. }
  2183. if (!target.getAttribute('modifier') || !util$1.hasModifier(target, modifierName)) {
  2184. return false;
  2185. }
  2186. var newModifiers = target.getAttribute('modifier').split(/\s+/).filter(function (m) {
  2187. return m && m !== modifierName;
  2188. });
  2189. newModifiers.length ? target.setAttribute('modifier', newModifiers.join(' ')) : target.removeAttribute('modifier');
  2190. return true;
  2191. };
  2192. /**
  2193. * @param {Element} target
  2194. * @param {String} modifierName
  2195. * @param {Boolean} options.force Forces modifier to be added or removed.
  2196. * @param {Object} options.autoStyle Maps the modifierName to the corresponding styled modifier.
  2197. * @param {Boolean} options.forceAutoStyle Ignores platform limitation.
  2198. * @return {Boolean} Whether it was found or not.
  2199. */
  2200. util$1.toggleModifier = function () {
  2201. var options = arguments.length > 2 ? arguments.length <= 2 ? undefined : arguments[2] : {};
  2202. var force = typeof options === 'boolean' ? options : options.force;
  2203. var toggle = typeof force === 'boolean' ? force : !util$1.hasModifier.apply(util$1, arguments);
  2204. toggle ? util$1.addModifier.apply(util$1, arguments) : util$1.removeModifier.apply(util$1, arguments);
  2205. };
  2206. /**
  2207. * @param {Element} el
  2208. * @param {String} defaultClass
  2209. * @param {Object} scheme
  2210. */
  2211. util$1.restoreClass = function (el, defaultClass, scheme) {
  2212. defaultClass.split(/\s+/).forEach(function (c) {
  2213. return c !== '' && !el.classList.contains(c) && el.classList.add(c);
  2214. });
  2215. el.hasAttribute('modifier') && ModifierUtil.refresh(el, scheme);
  2216. };
  2217. // TODO: FIX
  2218. util$1.updateParentPosition = function (el) {
  2219. if (!el._parentUpdated && el.parentElement) {
  2220. if (window.getComputedStyle(el.parentElement).getPropertyValue('position') === 'static') {
  2221. el.parentElement.style.position = 'relative';
  2222. }
  2223. el._parentUpdated = true;
  2224. }
  2225. };
  2226. util$1.toggleAttribute = function (element, name, value) {
  2227. if (value) {
  2228. element.setAttribute(name, typeof value === 'boolean' ? '' : value);
  2229. } else {
  2230. element.removeAttribute(name);
  2231. }
  2232. };
  2233. util$1.bindListeners = function (element, listenerNames) {
  2234. listenerNames.forEach(function (name) {
  2235. var boundName = name.replace(/^_[a-z]/, '_bound' + name[1].toUpperCase());
  2236. element[boundName] = element[boundName] || element[name].bind(element);
  2237. });
  2238. };
  2239. util$1.each = function (obj, f) {
  2240. return Object.keys(obj).forEach(function (key) {
  2241. return f(key, obj[key]);
  2242. });
  2243. };
  2244. /**
  2245. * @param {Element} target
  2246. * @param {boolean} hasRipple
  2247. * @param {Object} attrs
  2248. */
  2249. util$1.updateRipple = function (target, hasRipple) {
  2250. var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2251. if (hasRipple === undefined) {
  2252. hasRipple = target.hasAttribute('ripple');
  2253. }
  2254. var rippleElement = util$1.findChild(target, 'ons-ripple');
  2255. if (hasRipple) {
  2256. if (!rippleElement) {
  2257. var element = document.createElement('ons-ripple');
  2258. Object.keys(attrs).forEach(function (key) {
  2259. return element.setAttribute(key, attrs[key]);
  2260. });
  2261. target.insertBefore(element, target.firstChild);
  2262. }
  2263. } else if (rippleElement) {
  2264. rippleElement.remove();
  2265. }
  2266. };
  2267. /**
  2268. * @param {String}
  2269. * @return {Object}
  2270. */
  2271. util$1.animationOptionsParse = parse;
  2272. /**
  2273. * @param {*} value
  2274. */
  2275. util$1.isInteger = function (value) {
  2276. return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
  2277. };
  2278. /**
  2279. * @return {Object} Deferred promise.
  2280. */
  2281. util$1.defer = function () {
  2282. var deferred = {};
  2283. deferred.promise = new Promise(function (resolve, reject) {
  2284. deferred.resolve = resolve;
  2285. deferred.reject = reject;
  2286. });
  2287. return deferred;
  2288. };
  2289. /**
  2290. * Show warnings when they are enabled.
  2291. *
  2292. * @param {*} arguments to console.warn
  2293. */
  2294. util$1.warn = function () {
  2295. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2296. args[_key2] = arguments[_key2];
  2297. }
  2298. if (!internal$1.config.warningsDisabled) {
  2299. var _console;
  2300. (_console = console).warn.apply(_console, [errorPrefix].concat(args));
  2301. }
  2302. };
  2303. util$1.throw = function (message) {
  2304. throw new Error(errorPrefix + ' ' + message);
  2305. };
  2306. util$1.throwAbstract = function () {
  2307. return util$1.throw('Cannot instantiate abstract class');
  2308. };
  2309. util$1.throwMember = function () {
  2310. return util$1.throw('Class member must be implemented');
  2311. };
  2312. util$1.throwPageLoader = function () {
  2313. return util$1.throw('First parameter should be an instance of PageLoader');
  2314. };
  2315. util$1.throwAnimator = function (el) {
  2316. return util$1.throw('"Animator" param must inherit ' + el + 'Animator');
  2317. };
  2318. var prevent = function prevent(e) {
  2319. return e.cancelable && e.preventDefault();
  2320. };
  2321. /**
  2322. * Prevent scrolling while draging horizontally on iOS.
  2323. *
  2324. * @param {gd} GestureDetector instance
  2325. */
  2326. util$1.iosPreventScroll = function (gd) {
  2327. if (util$1.globals.actualMobileOS === 'ios') {
  2328. var clean = function clean(e) {
  2329. gd.off('touchmove', prevent);
  2330. gd.off('dragend', clean);
  2331. };
  2332. gd.on('touchmove', prevent);
  2333. gd.on('dragend', clean);
  2334. }
  2335. };
  2336. /**
  2337. * Prevents scroll in underlying pages on iOS. See #2220 #2274 #1949
  2338. *
  2339. * @param {el} HTMLElement that prevents the events
  2340. * @param {add} Boolean Add or remove event listeners
  2341. */
  2342. util$1.iosPageScrollFix = function (add) {
  2343. // Full fix - May cause issues with UIWebView's momentum scroll
  2344. if (util$1.globals.actualMobileOS === 'ios') {
  2345. document.body.classList.toggle('ons-ios-scroll', add); // Allows custom and localized fixes (#2274)
  2346. if (!util$1.globals.isUIWebView || internal$1.config.forceUIWebViewScrollFix) {
  2347. document.body.classList.toggle('ons-ios-scroll-fix', add);
  2348. }
  2349. }
  2350. };
  2351. util$1.iosMaskScrollFix = function (el, add) {
  2352. // Half fix - only prevents scroll on masks
  2353. if (util$1.globals.isUIWebView) {
  2354. var action = (add ? 'add' : 'remove') + 'EventListener';
  2355. el[action]('touchmove', prevent, false);
  2356. }
  2357. };
  2358. /**
  2359. * Distance and deltaTime filter some weird dragstart events that are not fired immediately.
  2360. *
  2361. * @param {event}
  2362. */
  2363. util$1.isValidGesture = function (event) {
  2364. return event.gesture !== undefined && (event.gesture.distance <= 15 || event.gesture.deltaTime <= 100);
  2365. };
  2366. util$1.checkMissingImport = function () {
  2367. for (var _len3 = arguments.length, elementNames = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  2368. elementNames[_key3] = arguments[_key3];
  2369. }
  2370. elementNames.forEach(function (name) {
  2371. if (!onsElements[name]) {
  2372. util$1.throw('Ons' + name + ' is required but was not imported (Custom Elements)');
  2373. }
  2374. });
  2375. };
  2376. /*
  2377. Copyright 2013-2015 ASIAL CORPORATION
  2378. Licensed under the Apache License, Version 2.0 (the "License");
  2379. you may not use this file except in compliance with the License.
  2380. You may obtain a copy of the License at
  2381. http://www.apache.org/licenses/LICENSE-2.0
  2382. Unless required by applicable law or agreed to in writing, software
  2383. distributed under the License is distributed on an "AS IS" BASIS,
  2384. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  2385. See the License for the specific language governing permissions and
  2386. limitations under the License.
  2387. */
  2388. /**
  2389. * Minimal animation library for managing css transition on mobile browsers.
  2390. */
  2391. var TIMEOUT_RATIO = 1.4;
  2392. var util$4 = {};
  2393. // capitalize string
  2394. util$4.capitalize = function (str) {
  2395. return str.charAt(0).toUpperCase() + str.slice(1);
  2396. };
  2397. /**
  2398. * @param {Object} params
  2399. * @param {String} params.property
  2400. * @param {Float} params.duration
  2401. * @param {String} params.timing
  2402. */
  2403. util$4.buildTransitionValue = function (params) {
  2404. params.property = params.property || 'all';
  2405. params.duration = params.duration || 0.4;
  2406. params.timing = params.timing || 'linear';
  2407. var props = params.property.split(/ +/);
  2408. return props.map(function (prop) {
  2409. return prop + ' ' + params.duration + 's ' + params.timing;
  2410. }).join(', ');
  2411. };
  2412. /**
  2413. * Add an event handler on "transitionend" event.
  2414. */
  2415. util$4.onceOnTransitionEnd = function (element, callback) {
  2416. if (!element) {
  2417. return function () {};
  2418. }
  2419. var fn = function fn(event) {
  2420. if (element == event.target) {
  2421. event.stopPropagation();
  2422. removeListeners();
  2423. callback();
  2424. }
  2425. };
  2426. var removeListeners = function removeListeners() {
  2427. util$4._transitionEndEvents.forEach(function (eventName) {
  2428. element.removeEventListener(eventName, fn, false);
  2429. });
  2430. };
  2431. util$4._transitionEndEvents.forEach(function (eventName) {
  2432. element.addEventListener(eventName, fn, false);
  2433. });
  2434. return removeListeners;
  2435. };
  2436. util$4._transitionEndEvents = function () {
  2437. if ('ontransitionend' in window) {
  2438. return ['transitionend'];
  2439. }
  2440. if ('onwebkittransitionend' in window) {
  2441. return ['webkitTransitionEnd'];
  2442. }
  2443. if (util$4.vendorPrefix === 'webkit' || util$4.vendorPrefix === 'o' || util$4.vendorPrefix === 'moz' || util$4.vendorPrefix === 'ms') {
  2444. return [util$4.vendorPrefix + 'TransitionEnd', 'transitionend'];
  2445. }
  2446. return [];
  2447. }();
  2448. util$4._cssPropertyDict = function () {
  2449. var styles = window.getComputedStyle(document.documentElement, '');
  2450. var dict = {};
  2451. var a = 'A'.charCodeAt(0);
  2452. var z = 'z'.charCodeAt(0);
  2453. var upper = function upper(s) {
  2454. return s.substr(1).toUpperCase();
  2455. };
  2456. for (var i = 0; i < styles.length; i++) {
  2457. var key = styles[i].replace(/^[-]+/, '').replace(/[-][a-z]/g, upper).replace(/^moz/, 'Moz');
  2458. if (a <= key.charCodeAt(0) && z >= key.charCodeAt(0)) {
  2459. if (key !== 'cssText' && key !== 'parentText') {
  2460. dict[key] = true;
  2461. }
  2462. }
  2463. }
  2464. return dict;
  2465. }();
  2466. util$4.hasCssProperty = function (name) {
  2467. return name in util$4._cssPropertyDict;
  2468. };
  2469. /**
  2470. * Vendor prefix for css property.
  2471. */
  2472. util$4.vendorPrefix = function () {
  2473. var styles = window.getComputedStyle(document.documentElement, ''),
  2474. pre = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || styles.OLink === '' && ['', 'o'])[1];
  2475. return pre;
  2476. }();
  2477. util$4.forceLayoutAtOnce = function (elements, callback) {
  2478. this.batchImmediate(function () {
  2479. elements.forEach(function (element) {
  2480. // force layout
  2481. element.offsetHeight;
  2482. });
  2483. callback();
  2484. });
  2485. };
  2486. util$4.batchImmediate = function () {
  2487. var callbacks = [];
  2488. return function (callback) {
  2489. if (callbacks.length === 0) {
  2490. setImmediate(function () {
  2491. var concreateCallbacks = callbacks.slice(0);
  2492. callbacks = [];
  2493. concreateCallbacks.forEach(function (callback) {
  2494. callback();
  2495. });
  2496. });
  2497. }
  2498. callbacks.push(callback);
  2499. };
  2500. }();
  2501. util$4.batchAnimationFrame = function () {
  2502. var callbacks = [];
  2503. var raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {
  2504. setTimeout(callback, 1000 / 60);
  2505. };
  2506. return function (callback) {
  2507. if (callbacks.length === 0) {
  2508. raf(function () {
  2509. var concreateCallbacks = callbacks.slice(0);
  2510. callbacks = [];
  2511. concreateCallbacks.forEach(function (callback) {
  2512. callback();
  2513. });
  2514. });
  2515. }
  2516. callbacks.push(callback);
  2517. };
  2518. }();
  2519. util$4.transitionPropertyName = function () {
  2520. if (util$4.hasCssProperty('transitionDuration')) {
  2521. return 'transition';
  2522. }
  2523. if (util$4.hasCssProperty(util$4.vendorPrefix + 'TransitionDuration')) {
  2524. return util$4.vendorPrefix + 'Transition';
  2525. }
  2526. throw new Error('Invalid state');
  2527. }();
  2528. /**
  2529. * @param {HTMLElement} element
  2530. */
  2531. var Animit = function Animit(element, defaults) {
  2532. if (!(this instanceof Animit)) {
  2533. return new Animit(element, defaults);
  2534. }
  2535. if (element instanceof HTMLElement) {
  2536. this.elements = [element];
  2537. } else if (Object.prototype.toString.call(element) === '[object Array]') {
  2538. this.elements = element;
  2539. } else {
  2540. throw new Error('First argument must be an array or an instance of HTMLElement.');
  2541. }
  2542. this.defaults = defaults;
  2543. this.transitionQueue = [];
  2544. this.lastStyleAttributeDict = [];
  2545. };
  2546. Animit.prototype = {
  2547. /**
  2548. * @property {Array}
  2549. */
  2550. transitionQueue: undefined,
  2551. /**
  2552. * @property {Array}
  2553. */
  2554. elements: undefined,
  2555. /**
  2556. * @property {Object}
  2557. */
  2558. defaults: undefined,
  2559. /**
  2560. * Start animation sequence with passed animations.
  2561. *
  2562. * @param {Function} callback
  2563. */
  2564. play: function play(callback) {
  2565. if (typeof callback === 'function') {
  2566. this.transitionQueue.push(function (done) {
  2567. callback();
  2568. done();
  2569. });
  2570. }
  2571. this.startAnimation();
  2572. return this;
  2573. },
  2574. /**
  2575. * Most of the animations follow this default process.
  2576. *
  2577. * @param {from} css or options object containing css
  2578. * @param {to} css or options object containing css
  2579. * @param {delay} delay to wait
  2580. */
  2581. default: function _default(from, to, delay) {
  2582. function step(params, duration, timing) {
  2583. if (params.duration !== undefined) {
  2584. duration = params.duration;
  2585. }
  2586. if (params.timing !== undefined) {
  2587. timing = params.timing;
  2588. }
  2589. return {
  2590. css: params.css || params,
  2591. duration: duration,
  2592. timing: timing
  2593. };
  2594. }
  2595. return this.saveStyle().queue(step(from, 0, this.defaults.timing)).wait(delay === undefined ? this.defaults.delay : delay).queue(step(to, this.defaults.duration, this.defaults.timing)).restoreStyle();
  2596. },
  2597. /**
  2598. * Queue transition animations or other function.
  2599. *
  2600. * e.g. animit(elt).queue({color: 'red'})
  2601. * e.g. animit(elt).queue({color: 'red'}, {duration: 0.4})
  2602. * e.g. animit(elt).queue({css: {color: 'red'}, duration: 0.2})
  2603. *
  2604. * @param {Object|Animit.Transition|Function} transition
  2605. * @param {Object} [options]
  2606. */
  2607. queue: function queue(transition, options) {
  2608. var queue = this.transitionQueue;
  2609. if (transition && options) {
  2610. options.css = transition;
  2611. transition = new Animit.Transition(options);
  2612. }
  2613. if (!(transition instanceof Function || transition instanceof Animit.Transition)) {
  2614. if (transition.css) {
  2615. transition = new Animit.Transition(transition);
  2616. } else {
  2617. transition = new Animit.Transition({
  2618. css: transition
  2619. });
  2620. }
  2621. }
  2622. if (transition instanceof Function) {
  2623. queue.push(transition);
  2624. } else if (transition instanceof Animit.Transition) {
  2625. queue.push(transition.build());
  2626. } else {
  2627. throw new Error('Invalid arguments');
  2628. }
  2629. return this;
  2630. },
  2631. /**
  2632. * Queue transition animations.
  2633. *
  2634. * @param {Float} seconds
  2635. */
  2636. wait: function wait(seconds) {
  2637. if (seconds > 0) {
  2638. this.transitionQueue.push(function (done) {
  2639. setTimeout(done, 1000 * seconds);
  2640. });
  2641. }
  2642. return this;
  2643. },
  2644. saveStyle: function saveStyle() {
  2645. this.transitionQueue.push(function (done) {
  2646. this.elements.forEach(function (element, index) {
  2647. var css = this.lastStyleAttributeDict[index] = {};
  2648. for (var i = 0; i < element.style.length; i++) {
  2649. css[element.style[i]] = element.style[element.style[i]];
  2650. }
  2651. }.bind(this));
  2652. done();
  2653. }.bind(this));
  2654. return this;
  2655. },
  2656. /**
  2657. * Restore element's style.
  2658. *
  2659. * @param {Object} [options]
  2660. * @param {Float} [options.duration]
  2661. * @param {String} [options.timing]
  2662. * @param {String} [options.transition]
  2663. */
  2664. restoreStyle: function restoreStyle(options) {
  2665. options = options || {};
  2666. var self = this;
  2667. if (options.transition && !options.duration) {
  2668. throw new Error('"options.duration" is required when "options.transition" is enabled.');
  2669. }
  2670. var transitionName = util$4.transitionPropertyName;
  2671. if (options.transition || options.duration && options.duration > 0) {
  2672. var transitionValue = options.transition || 'all ' + options.duration + 's ' + (options.timing || 'linear');
  2673. this.transitionQueue.push(function (done) {
  2674. var elements = this.elements;
  2675. var timeoutId;
  2676. var clearTransition = function clearTransition() {
  2677. elements.forEach(function (element) {
  2678. element.style[transitionName] = '';
  2679. });
  2680. };
  2681. // add "transitionend" event handler
  2682. var removeListeners = util$4.onceOnTransitionEnd(elements[0], function () {
  2683. clearTimeout(timeoutId);
  2684. clearTransition();
  2685. done();
  2686. });
  2687. // for fail safe.
  2688. timeoutId = setTimeout(function () {
  2689. removeListeners();
  2690. clearTransition();
  2691. done();
  2692. }, options.duration * 1000 * TIMEOUT_RATIO);
  2693. // transition and style settings
  2694. elements.forEach(function (element, index) {
  2695. var css = self.lastStyleAttributeDict[index];
  2696. if (!css) {
  2697. throw new Error('restoreStyle(): The style is not saved. Invoke saveStyle() before.');
  2698. }
  2699. self.lastStyleAttributeDict[index] = undefined;
  2700. var name;
  2701. for (var i = 0, len = element.style.length; i < len; i++) {
  2702. name = element.style[i];
  2703. if (css[name] === undefined) {
  2704. css[name] = '';
  2705. }
  2706. }
  2707. element.style[transitionName] = transitionValue;
  2708. Object.keys(css).forEach(function (key) {
  2709. if (key !== transitionName) {
  2710. element.style[key] = css[key];
  2711. }
  2712. });
  2713. element.style[transitionName] = transitionValue;
  2714. });
  2715. });
  2716. } else {
  2717. this.transitionQueue.push(function (done) {
  2718. reset();
  2719. done();
  2720. });
  2721. }
  2722. return this;
  2723. function reset() {
  2724. // Clear transition animation settings.
  2725. self.elements.forEach(function (element, index) {
  2726. element.style[transitionName] = 'none';
  2727. var css = self.lastStyleAttributeDict[index];
  2728. if (!css) {
  2729. throw new Error('restoreStyle(): The style is not saved. Invoke saveStyle() before.');
  2730. }
  2731. self.lastStyleAttributeDict[index] = undefined;
  2732. for (var i = 0, name = ''; i < element.style.length; i++) {
  2733. name = element.style[i];
  2734. if (typeof css[element.style[i]] === 'undefined') {
  2735. css[element.style[i]] = '';
  2736. }
  2737. }
  2738. Object.keys(css).forEach(function (key) {
  2739. element.style[key] = css[key];
  2740. });
  2741. });
  2742. }
  2743. },
  2744. /**
  2745. * Start animation sequence.
  2746. */
  2747. startAnimation: function startAnimation() {
  2748. this._dequeueTransition();
  2749. return this;
  2750. },
  2751. _dequeueTransition: function _dequeueTransition() {
  2752. var transition = this.transitionQueue.shift();
  2753. if (this._currentTransition) {
  2754. throw new Error('Current transition exists.');
  2755. }
  2756. this._currentTransition = transition;
  2757. var self = this;
  2758. var called = false;
  2759. var done = function done() {
  2760. if (!called) {
  2761. called = true;
  2762. self._currentTransition = undefined;
  2763. self._dequeueTransition();
  2764. } else {
  2765. throw new Error('Invalid state: This callback is called twice.');
  2766. }
  2767. };
  2768. if (transition) {
  2769. transition.call(this, done);
  2770. }
  2771. }
  2772. };
  2773. /**
  2774. * @param {Animit} arguments
  2775. */
  2776. Animit.runAll = function () /* arguments... */{
  2777. for (var i = 0; i < arguments.length; i++) {
  2778. arguments[i].play();
  2779. }
  2780. };
  2781. /**
  2782. * @param {Object} options
  2783. * @param {Float} [options.duration]
  2784. * @param {String} [options.property]
  2785. * @param {String} [options.timing]
  2786. */
  2787. Animit.Transition = function (options) {
  2788. this.options = options || {};
  2789. this.options.duration = this.options.duration || 0;
  2790. this.options.timing = this.options.timing || 'linear';
  2791. this.options.css = this.options.css || {};
  2792. this.options.property = this.options.property || 'all';
  2793. };
  2794. Animit.Transition.prototype = {
  2795. /**
  2796. * @param {HTMLElement} element
  2797. * @return {Function}
  2798. */
  2799. build: function build() {
  2800. if (Object.keys(this.options.css).length === 0) {
  2801. throw new Error('options.css is required.');
  2802. }
  2803. var css = createActualCssProps(this.options.css);
  2804. if (this.options.duration > 0) {
  2805. var transitionValue = util$4.buildTransitionValue(this.options);
  2806. var self = this;
  2807. return function (callback) {
  2808. var elements = this.elements;
  2809. var timeout = self.options.duration * 1000 * TIMEOUT_RATIO;
  2810. var timeoutId;
  2811. var removeListeners = util$4.onceOnTransitionEnd(elements[0], function () {
  2812. clearTimeout(timeoutId);
  2813. callback();
  2814. });
  2815. timeoutId = setTimeout(function () {
  2816. removeListeners();
  2817. callback();
  2818. }, timeout);
  2819. elements.forEach(function (element) {
  2820. element.style[util$4.transitionPropertyName] = transitionValue;
  2821. Object.keys(css).forEach(function (name) {
  2822. element.style[name] = css[name];
  2823. });
  2824. });
  2825. };
  2826. }
  2827. if (this.options.duration <= 0) {
  2828. return function (callback) {
  2829. var elements = this.elements;
  2830. elements.forEach(function (element) {
  2831. element.style[util$4.transitionPropertyName] = '';
  2832. Object.keys(css).forEach(function (name) {
  2833. element.style[name] = css[name];
  2834. });
  2835. });
  2836. if (elements.length > 0) {
  2837. util$4.forceLayoutAtOnce(elements, function () {
  2838. util$4.batchAnimationFrame(callback);
  2839. });
  2840. } else {
  2841. util$4.batchAnimationFrame(callback);
  2842. }
  2843. };
  2844. }
  2845. function createActualCssProps(css) {
  2846. var result = {};
  2847. Object.keys(css).forEach(function (name) {
  2848. var value = css[name];
  2849. if (util$4.hasCssProperty(name)) {
  2850. result[name] = value;
  2851. return;
  2852. }
  2853. var prefixed = util$4.vendorPrefix + util$4.capitalize(name);
  2854. if (util$4.hasCssProperty(prefixed)) {
  2855. result[prefixed] = value;
  2856. } else {
  2857. result[prefixed] = value;
  2858. result[name] = value;
  2859. }
  2860. });
  2861. return result;
  2862. }
  2863. }
  2864. };
  2865. /*
  2866. * Gesture detector library that forked from github.com/EightMedia/hammer.js.
  2867. */
  2868. var Event$1;
  2869. var Utils;
  2870. var Detection;
  2871. var PointerEvent;
  2872. /**
  2873. * @object ons.GestureDetector
  2874. * @category gesture
  2875. * @description
  2876. * [en]Utility class for gesture detection.[/en]
  2877. * [ja]ジェスチャを検知するためのユーティリティクラスです。[/ja]
  2878. */
  2879. /**
  2880. * @method constructor
  2881. * @signature constructor(element[, options])
  2882. * @description
  2883. * [en]Create a new GestureDetector instance.[/en]
  2884. * [ja]GestureDetectorのインスタンスを生成します。[/ja]
  2885. * @param {Element} element
  2886. * [en]Name of the event.[/en]
  2887. * [ja]ジェスチャを検知するDOM要素を指定します。[/ja]
  2888. * @param {Object} [options]
  2889. * [en]Options object.[/en]
  2890. * [ja]オプションを指定します。[/ja]
  2891. * @return {ons.GestureDetector.Instance}
  2892. */
  2893. var GestureDetector = function GestureDetector(element, options) {
  2894. return new GestureDetector.Instance(element, options || {});
  2895. };
  2896. /**
  2897. * default settings.
  2898. * more settings are defined per gesture at `/gestures`. Each gesture can be disabled/enabled
  2899. * by setting it's name (like `swipe`) to false.
  2900. * You can set the defaults for all instances by changing this object before creating an instance.
  2901. * @example
  2902. * ````
  2903. * GestureDetector.defaults.drag = false;
  2904. * GestureDetector.defaults.behavior.touchAction = 'pan-y';
  2905. * delete GestureDetector.defaults.behavior.userSelect;
  2906. * ````
  2907. * @property defaults
  2908. * @type {Object}
  2909. */
  2910. GestureDetector.defaults = {
  2911. behavior: {
  2912. // userSelect: 'none', // Also disables selection in `input` children
  2913. touchAction: 'pan-y',
  2914. touchCallout: 'none',
  2915. contentZooming: 'none',
  2916. userDrag: 'none',
  2917. tapHighlightColor: 'rgba(0,0,0,0)'
  2918. }
  2919. };
  2920. /**
  2921. * GestureDetector document where the base events are added at
  2922. * @property DOCUMENT
  2923. * @type {HTMLElement}
  2924. * @default window.document
  2925. */
  2926. GestureDetector.DOCUMENT = document;
  2927. /**
  2928. * detect support for pointer events
  2929. * @property HAS_POINTEREVENTS
  2930. * @type {Boolean}
  2931. */
  2932. GestureDetector.HAS_POINTEREVENTS = navigator.pointerEnabled || navigator.msPointerEnabled;
  2933. /**
  2934. * detect support for touch events
  2935. * @property HAS_TOUCHEVENTS
  2936. * @type {Boolean}
  2937. */
  2938. GestureDetector.HAS_TOUCHEVENTS = 'ontouchstart' in window;
  2939. /**
  2940. * detect mobile browsers
  2941. * @property IS_MOBILE
  2942. * @type {Boolean}
  2943. */
  2944. GestureDetector.IS_MOBILE = /mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent);
  2945. /**
  2946. * detect if we want to support mouseevents at all
  2947. * @property NO_MOUSEEVENTS
  2948. * @type {Boolean}
  2949. */
  2950. GestureDetector.NO_MOUSEEVENTS = GestureDetector.HAS_TOUCHEVENTS && GestureDetector.IS_MOBILE || GestureDetector.HAS_POINTEREVENTS;
  2951. /**
  2952. * interval in which GestureDetector recalculates current velocity/direction/angle in ms
  2953. * @property CALCULATE_INTERVAL
  2954. * @type {Number}
  2955. * @default 25
  2956. */
  2957. GestureDetector.CALCULATE_INTERVAL = 25;
  2958. /**
  2959. * eventtypes per touchevent (start, move, end) are filled by `Event.determineEventTypes` on `setup`
  2960. * the object contains the DOM event names per type (`EVENT_START`, `EVENT_MOVE`, `EVENT_END`)
  2961. * @property EVENT_TYPES
  2962. * @private
  2963. * @writeOnce
  2964. * @type {Object}
  2965. */
  2966. var EVENT_TYPES = {};
  2967. /**
  2968. * direction strings, for safe comparisons
  2969. * @property DIRECTION_DOWN|LEFT|UP|RIGHT
  2970. * @final
  2971. * @type {String}
  2972. * @default 'down' 'left' 'up' 'right'
  2973. */
  2974. var DIRECTION_DOWN = GestureDetector.DIRECTION_DOWN = 'down';
  2975. var DIRECTION_LEFT = GestureDetector.DIRECTION_LEFT = 'left';
  2976. var DIRECTION_UP = GestureDetector.DIRECTION_UP = 'up';
  2977. var DIRECTION_RIGHT = GestureDetector.DIRECTION_RIGHT = 'right';
  2978. /**
  2979. * pointertype strings, for safe comparisons
  2980. * @property POINTER_MOUSE|TOUCH|PEN
  2981. * @final
  2982. * @type {String}
  2983. * @default 'mouse' 'touch' 'pen'
  2984. */
  2985. var POINTER_MOUSE = GestureDetector.POINTER_MOUSE = 'mouse';
  2986. var POINTER_TOUCH = GestureDetector.POINTER_TOUCH = 'touch';
  2987. var POINTER_PEN = GestureDetector.POINTER_PEN = 'pen';
  2988. /**
  2989. * eventtypes
  2990. * @property EVENT_START|MOVE|END|RELEASE|TOUCH
  2991. * @final
  2992. * @type {String}
  2993. * @default 'start' 'change' 'move' 'end' 'release' 'touch'
  2994. */
  2995. var EVENT_START = GestureDetector.EVENT_START = 'start';
  2996. var EVENT_MOVE = GestureDetector.EVENT_MOVE = 'move';
  2997. var EVENT_END = GestureDetector.EVENT_END = 'end';
  2998. var EVENT_RELEASE = GestureDetector.EVENT_RELEASE = 'release';
  2999. var EVENT_TOUCH = GestureDetector.EVENT_TOUCH = 'touch';
  3000. /**
  3001. * if the window events are set...
  3002. * @property READY
  3003. * @writeOnce
  3004. * @type {Boolean}
  3005. * @default false
  3006. */
  3007. GestureDetector.READY = false;
  3008. /**
  3009. * plugins namespace
  3010. * @property plugins
  3011. * @type {Object}
  3012. */
  3013. GestureDetector.plugins = GestureDetector.plugins || {};
  3014. /**
  3015. * gestures namespace
  3016. * see `/gestures` for the definitions
  3017. * @property gestures
  3018. * @type {Object}
  3019. */
  3020. GestureDetector.gestures = GestureDetector.gestures || {};
  3021. /**
  3022. * setup events to detect gestures on the document
  3023. * this function is called when creating an new instance
  3024. * @private
  3025. */
  3026. function setup(opts) {
  3027. if (GestureDetector.READY) {
  3028. return;
  3029. }
  3030. // find what eventtypes we add listeners to
  3031. Event$1.determineEventTypes();
  3032. // Register all gestures inside GestureDetector.gestures
  3033. Utils.each(GestureDetector.gestures, function (gesture) {
  3034. Detection.register(gesture);
  3035. });
  3036. // Add touch events on the document
  3037. Event$1.onTouch(GestureDetector.DOCUMENT, EVENT_MOVE, Detection.detect, opts);
  3038. Event$1.onTouch(GestureDetector.DOCUMENT, EVENT_END, Detection.detect, opts);
  3039. // GestureDetector is ready...!
  3040. GestureDetector.READY = true;
  3041. }
  3042. /**
  3043. * @module GestureDetector
  3044. *
  3045. * @class Utils
  3046. * @static
  3047. */
  3048. Utils = GestureDetector.utils = {
  3049. /**
  3050. * extend method, could also be used for cloning when `dest` is an empty object.
  3051. * changes the dest object
  3052. * @param {Object} dest
  3053. * @param {Object} src
  3054. * @param {Boolean} [merge=false] do a merge
  3055. * @return {Object} dest
  3056. */
  3057. extend: function extend(dest, src, merge) {
  3058. for (var key in src) {
  3059. if (src.hasOwnProperty(key) && (dest[key] === undefined || !merge)) {
  3060. dest[key] = src[key];
  3061. }
  3062. }
  3063. return dest;
  3064. },
  3065. /**
  3066. * simple addEventListener wrapper
  3067. * @param {HTMLElement} element
  3068. * @param {String} type
  3069. * @param {Function} handler
  3070. */
  3071. on: function on(element, type, handler, opt) {
  3072. util$1.addEventListener(element, type, handler, opt, true);
  3073. },
  3074. /**
  3075. * simple removeEventListener wrapper
  3076. * @param {HTMLElement} element
  3077. * @param {String} type
  3078. * @param {Function} handler
  3079. */
  3080. off: function off(element, type, handler, opt) {
  3081. util$1.removeEventListener(element, type, handler, opt, true);
  3082. },
  3083. /**
  3084. * forEach over arrays and objects
  3085. * @param {Object|Array} obj
  3086. * @param {Function} iterator
  3087. * @param {any} iterator.item
  3088. * @param {Number} iterator.index
  3089. * @param {Object|Array} iterator.obj the source object
  3090. * @param {Object} context value to use as `this` in the iterator
  3091. */
  3092. each: function each(obj, iterator, context) {
  3093. var i, len;
  3094. // native forEach on arrays
  3095. if ('forEach' in obj) {
  3096. obj.forEach(iterator, context);
  3097. // arrays
  3098. } else if (obj.length !== undefined) {
  3099. for (i = 0, len = obj.length; i < len; i++) {
  3100. if (iterator.call(context, obj[i], i, obj) === false) {
  3101. return;
  3102. }
  3103. }
  3104. // objects
  3105. } else {
  3106. for (i in obj) {
  3107. if (obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj) === false) {
  3108. return;
  3109. }
  3110. }
  3111. }
  3112. },
  3113. /**
  3114. * find if a string contains the string using indexOf
  3115. * @param {String} src
  3116. * @param {String} find
  3117. * @return {Boolean} found
  3118. */
  3119. inStr: function inStr(src, find) {
  3120. return src.indexOf(find) > -1;
  3121. },
  3122. /**
  3123. * find if a array contains the object using indexOf or a simple polyfill
  3124. * @param {String} src
  3125. * @param {String} find
  3126. * @return {Boolean|Number} false when not found, or the index
  3127. */
  3128. inArray: function inArray(src, find, deep) {
  3129. if (deep) {
  3130. for (var i = 0, len = src.length; i < len; i++) {
  3131. // Array.findIndex
  3132. if (Object.keys(find).every(function (key) {
  3133. return src[i][key] === find[key];
  3134. })) {
  3135. return i;
  3136. }
  3137. }
  3138. return -1;
  3139. }
  3140. if (src.indexOf) {
  3141. return src.indexOf(find);
  3142. } else {
  3143. for (var i = 0, len = src.length; i < len; i++) {
  3144. if (src[i] === find) {
  3145. return i;
  3146. }
  3147. }
  3148. return -1;
  3149. }
  3150. },
  3151. /**
  3152. * convert an array-like object (`arguments`, `touchlist`) to an array
  3153. * @param {Object} obj
  3154. * @return {Array}
  3155. */
  3156. toArray: function toArray(obj) {
  3157. return Array.prototype.slice.call(obj, 0);
  3158. },
  3159. /**
  3160. * find if a node is in the given parent
  3161. * @param {HTMLElement} node
  3162. * @param {HTMLElement} parent
  3163. * @return {Boolean} found
  3164. */
  3165. hasParent: function hasParent(node, parent) {
  3166. while (node) {
  3167. if (node == parent) {
  3168. return true;
  3169. }
  3170. node = node.parentNode;
  3171. }
  3172. return false;
  3173. },
  3174. /**
  3175. * get the center of all the touches
  3176. * @param {Array} touches
  3177. * @return {Object} center contains `pageX`, `pageY`, `clientX` and `clientY` properties
  3178. */
  3179. getCenter: function getCenter(touches) {
  3180. var pageX = [],
  3181. pageY = [],
  3182. clientX = [],
  3183. clientY = [],
  3184. min = Math.min,
  3185. max = Math.max;
  3186. // no need to loop when only one touch
  3187. if (touches.length === 1) {
  3188. return {
  3189. pageX: touches[0].pageX,
  3190. pageY: touches[0].pageY,
  3191. clientX: touches[0].clientX,
  3192. clientY: touches[0].clientY
  3193. };
  3194. }
  3195. Utils.each(touches, function (touch) {
  3196. pageX.push(touch.pageX);
  3197. pageY.push(touch.pageY);
  3198. clientX.push(touch.clientX);
  3199. clientY.push(touch.clientY);
  3200. });
  3201. return {
  3202. pageX: (min.apply(Math, pageX) + max.apply(Math, pageX)) / 2,
  3203. pageY: (min.apply(Math, pageY) + max.apply(Math, pageY)) / 2,
  3204. clientX: (min.apply(Math, clientX) + max.apply(Math, clientX)) / 2,
  3205. clientY: (min.apply(Math, clientY) + max.apply(Math, clientY)) / 2
  3206. };
  3207. },
  3208. /**
  3209. * calculate the velocity between two points. unit is in px per ms.
  3210. * @param {Number} deltaTime
  3211. * @param {Number} deltaX
  3212. * @param {Number} deltaY
  3213. * @return {Object} velocity `x` and `y`
  3214. */
  3215. getVelocity: function getVelocity(deltaTime, deltaX, deltaY) {
  3216. return {
  3217. x: Math.abs(deltaX / deltaTime) || 0,
  3218. y: Math.abs(deltaY / deltaTime) || 0
  3219. };
  3220. },
  3221. /**
  3222. * calculate the angle between two coordinates
  3223. * @param {Touch} touch1
  3224. * @param {Touch} touch2
  3225. * @return {Number} angle
  3226. */
  3227. getAngle: function getAngle(touch1, touch2) {
  3228. var x = touch2.clientX - touch1.clientX,
  3229. y = touch2.clientY - touch1.clientY;
  3230. return Math.atan2(y, x) * 180 / Math.PI;
  3231. },
  3232. /**
  3233. * do a small comparison to get the direction between two touches.
  3234. * @param {Touch} touch1
  3235. * @param {Touch} touch2
  3236. * @return {String} direction matches `DIRECTION_LEFT|RIGHT|UP|DOWN`
  3237. */
  3238. getDirection: function getDirection(touch1, touch2) {
  3239. var x = Math.abs(touch1.clientX - touch2.clientX),
  3240. y = Math.abs(touch1.clientY - touch2.clientY);
  3241. if (x >= y) {
  3242. return touch1.clientX - touch2.clientX > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
  3243. }
  3244. return touch1.clientY - touch2.clientY > 0 ? DIRECTION_UP : DIRECTION_DOWN;
  3245. },
  3246. /**
  3247. * calculate the distance between two touches
  3248. * @param {Touch}touch1
  3249. * @param {Touch} touch2
  3250. * @return {Number} distance
  3251. */
  3252. getDistance: function getDistance(touch1, touch2) {
  3253. var x = touch2.clientX - touch1.clientX,
  3254. y = touch2.clientY - touch1.clientY;
  3255. return Math.sqrt(x * x + y * y);
  3256. },
  3257. /**
  3258. * calculate the scale factor between two touchLists
  3259. * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
  3260. * @param {Array} start array of touches
  3261. * @param {Array} end array of touches
  3262. * @return {Number} scale
  3263. */
  3264. getScale: function getScale(start, end) {
  3265. // need two fingers...
  3266. if (start.length >= 2 && end.length >= 2) {
  3267. return this.getDistance(end[0], end[1]) / this.getDistance(start[0], start[1]);
  3268. }
  3269. return 1;
  3270. },
  3271. /**
  3272. * calculate the rotation degrees between two touchLists
  3273. * @param {Array} start array of touches
  3274. * @param {Array} end array of touches
  3275. * @return {Number} rotation
  3276. */
  3277. getRotation: function getRotation(start, end) {
  3278. // need two fingers
  3279. if (start.length >= 2 && end.length >= 2) {
  3280. return this.getAngle(end[1], end[0]) - this.getAngle(start[1], start[0]);
  3281. }
  3282. return 0;
  3283. },
  3284. /**
  3285. * find out if the direction is vertical *
  3286. * @param {String} direction matches `DIRECTION_UP|DOWN`
  3287. * @return {Boolean} is_vertical
  3288. */
  3289. isVertical: function isVertical(direction) {
  3290. return direction == DIRECTION_UP || direction == DIRECTION_DOWN;
  3291. },
  3292. /**
  3293. * set css properties with their prefixes
  3294. * @param {HTMLElement} element
  3295. * @param {String} prop
  3296. * @param {String} value
  3297. * @param {Boolean} [toggle=true]
  3298. * @return {Boolean}
  3299. */
  3300. setPrefixedCss: function setPrefixedCss(element, prop, value, toggle) {
  3301. var prefixes = ['', 'Webkit', 'Moz', 'O', 'ms'];
  3302. prop = Utils.toCamelCase(prop);
  3303. for (var i = 0; i < prefixes.length; i++) {
  3304. var p = prop;
  3305. // prefixes
  3306. if (prefixes[i]) {
  3307. p = prefixes[i] + p.slice(0, 1).toUpperCase() + p.slice(1);
  3308. }
  3309. // test the style
  3310. if (p in element.style) {
  3311. element.style[p] = (toggle === null || toggle) && value || '';
  3312. break;
  3313. }
  3314. }
  3315. },
  3316. /**
  3317. * toggle browser default behavior by setting css properties.
  3318. * `userSelect='none'` also sets `element.onselectstart` to false
  3319. * `userDrag='none'` also sets `element.ondragstart` to false
  3320. *
  3321. * @param {HtmlElement} element
  3322. * @param {Object} props
  3323. * @param {Boolean} [toggle=true]
  3324. */
  3325. toggleBehavior: function toggleBehavior(element, props, toggle) {
  3326. if (!props || !element || !element.style) {
  3327. return;
  3328. }
  3329. // set the css properties
  3330. Utils.each(props, function (value, prop) {
  3331. Utils.setPrefixedCss(element, prop, value, toggle);
  3332. });
  3333. var falseFn = toggle && function () {
  3334. return false;
  3335. };
  3336. // also the disable onselectstart
  3337. if (props.userSelect == 'none') {
  3338. element.onselectstart = falseFn;
  3339. }
  3340. // and disable ondragstart
  3341. if (props.userDrag == 'none') {
  3342. element.ondragstart = falseFn;
  3343. }
  3344. },
  3345. /**
  3346. * convert a string with underscores to camelCase
  3347. * so prevent_default becomes preventDefault
  3348. * @param {String} str
  3349. * @return {String} camelCaseStr
  3350. */
  3351. toCamelCase: function toCamelCase(str) {
  3352. return str.replace(/[_-]([a-z])/g, function (s) {
  3353. return s[1].toUpperCase();
  3354. });
  3355. }
  3356. };
  3357. /**
  3358. * @module GestureDetector
  3359. */
  3360. /**
  3361. * @class Event
  3362. * @static
  3363. */
  3364. Event$1 = GestureDetector.event = {
  3365. /**
  3366. * when touch events have been fired, this is true
  3367. * this is used to stop mouse events
  3368. * @property prevent_mouseevents
  3369. * @private
  3370. * @type {Boolean}
  3371. */
  3372. preventMouseEvents: false,
  3373. /**
  3374. * if EVENT_START has been fired
  3375. * @property started
  3376. * @private
  3377. * @type {Boolean}
  3378. */
  3379. started: false,
  3380. /**
  3381. * when the mouse is hold down, this is true
  3382. * @property should_detect
  3383. * @private
  3384. * @type {Boolean}
  3385. */
  3386. shouldDetect: false,
  3387. /**
  3388. * simple event binder with a hook and support for multiple types
  3389. * @param {HTMLElement} element
  3390. * @param {String} type
  3391. * @param {Function} handler
  3392. * @param {Object} [opt]
  3393. * @param {Function} [hook]
  3394. * @param {Object} hook.type
  3395. */
  3396. on: function on(element, type, handler, opt, hook) {
  3397. var types = type.split(' ');
  3398. Utils.each(types, function (type) {
  3399. Utils.on(element, type, handler, opt);
  3400. hook && hook(type);
  3401. });
  3402. },
  3403. /**
  3404. * simple event unbinder with a hook and support for multiple types
  3405. * @param {HTMLElement} element
  3406. * @param {String} type
  3407. * @param {Function} handler
  3408. * @param {Object} [opt]
  3409. * @param {Function} [hook]
  3410. * @param {Object} hook.type
  3411. */
  3412. off: function off(element, type, handler, opt, hook) {
  3413. var types = type.split(' ');
  3414. Utils.each(types, function (type) {
  3415. Utils.off(element, type, handler, opt);
  3416. hook && hook(type);
  3417. });
  3418. },
  3419. /**
  3420. * the core touch event handler.
  3421. * this finds out if we should to detect gestures
  3422. * @param {HTMLElement} element
  3423. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3424. * @param {Function} handler
  3425. * @return onTouchHandler {Function} the core event handler
  3426. */
  3427. onTouch: function onTouch(element, eventType, handler, opt) {
  3428. var self = this;
  3429. var onTouchHandler = function onTouchHandler(ev) {
  3430. var srcType = ev.type.toLowerCase(),
  3431. isPointer = GestureDetector.HAS_POINTEREVENTS,
  3432. isMouse = Utils.inStr(srcType, 'mouse'),
  3433. triggerType;
  3434. // if we are in a mouseevent, but there has been a touchevent triggered in this session
  3435. // we want to do nothing. simply break out of the event.
  3436. if (isMouse && self.preventMouseEvents) {
  3437. return;
  3438. // mousebutton must be down
  3439. } else if (isMouse && eventType == EVENT_START && ev.button === 0) {
  3440. self.preventMouseEvents = false;
  3441. self.shouldDetect = true;
  3442. } else if (isPointer && eventType == EVENT_START) {
  3443. self.shouldDetect = ev.buttons === 1 || PointerEvent.matchType(POINTER_TOUCH, ev);
  3444. // just a valid start event, but no mouse
  3445. } else if (!isMouse && eventType == EVENT_START) {
  3446. self.preventMouseEvents = true;
  3447. self.shouldDetect = true;
  3448. }
  3449. // update the pointer event before entering the detection
  3450. if (isPointer && eventType != EVENT_END) {
  3451. PointerEvent.updatePointer(eventType, ev);
  3452. }
  3453. // we are in a touch/down state, so allowed detection of gestures
  3454. if (self.shouldDetect) {
  3455. triggerType = self.doDetect.call(self, ev, eventType, element, handler);
  3456. }
  3457. // ...and we are done with the detection
  3458. // so reset everything to start each detection totally fresh
  3459. if (triggerType == EVENT_END) {
  3460. self.preventMouseEvents = false;
  3461. self.shouldDetect = false;
  3462. PointerEvent.reset();
  3463. // update the pointerevent object after the detection
  3464. }
  3465. if (isPointer && eventType == EVENT_END) {
  3466. PointerEvent.updatePointer(eventType, ev);
  3467. }
  3468. };
  3469. this.on(element, EVENT_TYPES[eventType], onTouchHandler, opt);
  3470. return onTouchHandler;
  3471. },
  3472. /**
  3473. * the core detection method
  3474. * this finds out what GestureDetector-touch-events to trigger
  3475. * @param {Object} ev
  3476. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3477. * @param {HTMLElement} element
  3478. * @param {Function} handler
  3479. * @return {String} triggerType matches `EVENT_START|MOVE|END`
  3480. */
  3481. doDetect: function doDetect(ev, eventType, element, handler) {
  3482. var touchList = this.getTouchList(ev, eventType);
  3483. var touchListLength = touchList.length;
  3484. var triggerType = eventType;
  3485. var triggerChange = touchList.trigger; // used by fakeMultitouch plugin
  3486. var changedLength = touchListLength;
  3487. // at each touchstart-like event we want also want to trigger a TOUCH event...
  3488. if (eventType == EVENT_START) {
  3489. triggerChange = EVENT_TOUCH;
  3490. // ...the same for a touchend-like event
  3491. } else if (eventType == EVENT_END) {
  3492. triggerChange = EVENT_RELEASE;
  3493. // keep track of how many touches have been removed
  3494. changedLength = touchList.length - (ev.changedTouches ? ev.changedTouches.length : 1);
  3495. }
  3496. // after there are still touches on the screen,
  3497. // we just want to trigger a MOVE event. so change the START or END to a MOVE
  3498. // but only after detection has been started, the first time we actually want a START
  3499. if (changedLength > 0 && this.started) {
  3500. triggerType = EVENT_MOVE;
  3501. }
  3502. // detection has been started, we keep track of this, see above
  3503. this.started = true;
  3504. // generate some event data, some basic information
  3505. var evData = this.collectEventData(element, triggerType, touchList, ev);
  3506. // trigger the triggerType event before the change (TOUCH, RELEASE) events
  3507. // but the END event should be at last
  3508. if (eventType != EVENT_END) {
  3509. handler.call(Detection, evData);
  3510. }
  3511. // trigger a change (TOUCH, RELEASE) event, this means the length of the touches changed
  3512. if (triggerChange) {
  3513. evData.changedLength = changedLength;
  3514. evData.eventType = triggerChange;
  3515. handler.call(Detection, evData);
  3516. evData.eventType = triggerType;
  3517. delete evData.changedLength;
  3518. }
  3519. // trigger the END event
  3520. if (triggerType == EVENT_END) {
  3521. handler.call(Detection, evData);
  3522. // ...and we are done with the detection
  3523. // so reset everything to start each detection totally fresh
  3524. this.started = false;
  3525. }
  3526. return triggerType;
  3527. },
  3528. /**
  3529. * we have different events for each device/browser
  3530. * determine what we need and set them in the EVENT_TYPES constant
  3531. * the `onTouch` method is bind to these properties.
  3532. * @return {Object} events
  3533. */
  3534. determineEventTypes: function determineEventTypes() {
  3535. var types;
  3536. if (GestureDetector.HAS_POINTEREVENTS) {
  3537. if (window.PointerEvent) {
  3538. types = ['pointerdown', 'pointermove', 'pointerup pointercancel lostpointercapture'];
  3539. } else {
  3540. types = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp MSPointerCancel MSLostPointerCapture'];
  3541. }
  3542. } else if (GestureDetector.NO_MOUSEEVENTS) {
  3543. types = ['touchstart', 'touchmove', 'touchend touchcancel'];
  3544. } else {
  3545. types = ['touchstart mousedown', 'touchmove mousemove', 'touchend touchcancel mouseup'];
  3546. }
  3547. EVENT_TYPES[EVENT_START] = types[0];
  3548. EVENT_TYPES[EVENT_MOVE] = types[1];
  3549. EVENT_TYPES[EVENT_END] = types[2];
  3550. return EVENT_TYPES;
  3551. },
  3552. /**
  3553. * create touchList depending on the event
  3554. * @param {Object} ev
  3555. * @param {String} eventType
  3556. * @return {Array} touches
  3557. */
  3558. getTouchList: function getTouchList(ev, eventType) {
  3559. // get the fake pointerEvent touchlist
  3560. if (GestureDetector.HAS_POINTEREVENTS) {
  3561. return PointerEvent.getTouchList();
  3562. }
  3563. // get the touchlist
  3564. if (ev.touches) {
  3565. if (eventType == EVENT_MOVE) {
  3566. return ev.touches;
  3567. }
  3568. var identifiers = [];
  3569. var concat = [].concat(Utils.toArray(ev.touches), Utils.toArray(ev.changedTouches));
  3570. var touchList = [];
  3571. Utils.each(concat, function (touch) {
  3572. if (Utils.inArray(identifiers, touch.identifier) === -1) {
  3573. touchList.push(touch);
  3574. }
  3575. identifiers.push(touch.identifier);
  3576. });
  3577. return touchList;
  3578. }
  3579. // make fake touchList from mouse position
  3580. ev.identifier = 1;
  3581. return [ev];
  3582. },
  3583. /**
  3584. * collect basic event data
  3585. * @param {HTMLElement} element
  3586. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3587. * @param {Array} touches
  3588. * @param {Object} ev
  3589. * @return {Object} ev
  3590. */
  3591. collectEventData: function collectEventData(element, eventType, touches, ev) {
  3592. // find out pointerType
  3593. var pointerType = POINTER_TOUCH;
  3594. if (Utils.inStr(ev.type, 'mouse') || PointerEvent.matchType(POINTER_MOUSE, ev)) {
  3595. pointerType = POINTER_MOUSE;
  3596. } else if (PointerEvent.matchType(POINTER_PEN, ev)) {
  3597. pointerType = POINTER_PEN;
  3598. }
  3599. return {
  3600. center: Utils.getCenter(touches),
  3601. timeStamp: Date.now(),
  3602. target: ev.target,
  3603. touches: touches,
  3604. eventType: eventType,
  3605. pointerType: pointerType,
  3606. srcEvent: ev,
  3607. /**
  3608. * prevent the browser default actions
  3609. * mostly used to disable scrolling of the browser
  3610. */
  3611. preventDefault: function preventDefault() {
  3612. var srcEvent = this.srcEvent;
  3613. srcEvent.preventManipulation && srcEvent.preventManipulation();
  3614. srcEvent.preventDefault && srcEvent.preventDefault();
  3615. },
  3616. /**
  3617. * stop bubbling the event up to its parents
  3618. */
  3619. stopPropagation: function stopPropagation() {
  3620. this.srcEvent.stopPropagation();
  3621. },
  3622. /**
  3623. * immediately stop gesture detection
  3624. * might be useful after a swipe was detected
  3625. * @return {*}
  3626. */
  3627. stopDetect: function stopDetect() {
  3628. return Detection.stopDetect();
  3629. }
  3630. };
  3631. }
  3632. };
  3633. /**
  3634. * @module GestureDetector
  3635. *
  3636. * @class PointerEvent
  3637. * @static
  3638. */
  3639. PointerEvent = GestureDetector.PointerEvent = {
  3640. /**
  3641. * holds all pointers, by `identifier`
  3642. * @property pointers
  3643. * @type {Object}
  3644. */
  3645. pointers: {},
  3646. /**
  3647. * get the pointers as an array
  3648. * @return {Array} touchlist
  3649. */
  3650. getTouchList: function getTouchList() {
  3651. var touchlist = [];
  3652. // we can use forEach since pointerEvents only is in IE10
  3653. Utils.each(this.pointers, function (pointer) {
  3654. touchlist.push(pointer);
  3655. });
  3656. return touchlist;
  3657. },
  3658. /**
  3659. * update the position of a pointer
  3660. * @param {String} eventType matches `EVENT_START|MOVE|END`
  3661. * @param {Object} pointerEvent
  3662. */
  3663. updatePointer: function updatePointer(eventType, pointerEvent) {
  3664. if (eventType == EVENT_END || eventType != EVENT_END && pointerEvent.buttons !== 1) {
  3665. delete this.pointers[pointerEvent.pointerId];
  3666. } else {
  3667. pointerEvent.identifier = pointerEvent.pointerId;
  3668. this.pointers[pointerEvent.pointerId] = pointerEvent;
  3669. }
  3670. },
  3671. /**
  3672. * check if ev matches pointertype
  3673. * @param {String} pointerType matches `POINTER_MOUSE|TOUCH|PEN`
  3674. * @param {PointerEvent} ev
  3675. */
  3676. matchType: function matchType(pointerType, ev) {
  3677. if (!ev.pointerType) {
  3678. return false;
  3679. }
  3680. var pt = ev.pointerType,
  3681. types = {};
  3682. types[POINTER_MOUSE] = pt === (ev.MSPOINTER_TYPE_MOUSE || POINTER_MOUSE);
  3683. types[POINTER_TOUCH] = pt === (ev.MSPOINTER_TYPE_TOUCH || POINTER_TOUCH);
  3684. types[POINTER_PEN] = pt === (ev.MSPOINTER_TYPE_PEN || POINTER_PEN);
  3685. return types[pointerType];
  3686. },
  3687. /**
  3688. * reset the stored pointers
  3689. */
  3690. reset: function resetList() {
  3691. this.pointers = {};
  3692. }
  3693. };
  3694. /**
  3695. * @module GestureDetector
  3696. *
  3697. * @class Detection
  3698. * @static
  3699. */
  3700. Detection = GestureDetector.detection = {
  3701. // contains all registered GestureDetector.gestures in the correct order
  3702. gestures: [],
  3703. // data of the current GestureDetector.gesture detection session
  3704. current: null,
  3705. // the previous GestureDetector.gesture session data
  3706. // is a full clone of the previous gesture.current object
  3707. previous: null,
  3708. // when this becomes true, no gestures are fired
  3709. stopped: false,
  3710. /**
  3711. * start GestureDetector.gesture detection
  3712. * @param {GestureDetector.Instance} inst
  3713. * @param {Object} eventData
  3714. */
  3715. startDetect: function startDetect(inst, eventData) {
  3716. // already busy with a GestureDetector.gesture detection on an element
  3717. if (this.current) {
  3718. return;
  3719. }
  3720. this.stopped = false;
  3721. // holds current session
  3722. this.current = {
  3723. inst: inst, // reference to GestureDetectorInstance we're working for
  3724. startEvent: Utils.extend({}, eventData), // start eventData for distances, timing etc
  3725. lastEvent: false, // last eventData
  3726. lastCalcEvent: false, // last eventData for calculations.
  3727. futureCalcEvent: false, // last eventData for calculations.
  3728. lastCalcData: {}, // last lastCalcData
  3729. name: '' // current gesture we're in/detected, can be 'tap', 'hold' etc
  3730. };
  3731. this.detect(eventData);
  3732. },
  3733. /**
  3734. * GestureDetector.gesture detection
  3735. * @param {Object} eventData
  3736. * @return {any}
  3737. */
  3738. detect: function detect(eventData) {
  3739. if (!this.current || this.stopped) {
  3740. return;
  3741. }
  3742. // extend event data with calculations about scale, distance etc
  3743. eventData = this.extendEventData(eventData);
  3744. // GestureDetector instance and instance options
  3745. var inst = this.current.inst,
  3746. instOptions = inst.options;
  3747. // call GestureDetector.gesture handlers
  3748. Utils.each(this.gestures, function triggerGesture(gesture) {
  3749. // only when the instance options have enabled this gesture
  3750. if (!this.stopped && inst.enabled && instOptions[gesture.name]) {
  3751. gesture.handler.call(gesture, eventData, inst);
  3752. }
  3753. }, this);
  3754. // store as previous event event
  3755. if (this.current) {
  3756. this.current.lastEvent = eventData;
  3757. }
  3758. if (eventData.eventType == EVENT_END) {
  3759. this.stopDetect();
  3760. }
  3761. return eventData; // eslint-disable-line consistent-return
  3762. },
  3763. /**
  3764. * clear the GestureDetector.gesture vars
  3765. * this is called on endDetect, but can also be used when a final GestureDetector.gesture has been detected
  3766. * to stop other GestureDetector.gestures from being fired
  3767. */
  3768. stopDetect: function stopDetect() {
  3769. // clone current data to the store as the previous gesture
  3770. // used for the double tap gesture, since this is an other gesture detect session
  3771. this.previous = Utils.extend({}, this.current);
  3772. // reset the current
  3773. this.current = null;
  3774. this.stopped = true;
  3775. },
  3776. /**
  3777. * calculate velocity, angle and direction
  3778. * @param {Object} ev
  3779. * @param {Object} center
  3780. * @param {Number} deltaTime
  3781. * @param {Number} deltaX
  3782. * @param {Number} deltaY
  3783. */
  3784. getCalculatedData: function getCalculatedData(ev, center, deltaTime, deltaX, deltaY) {
  3785. var cur = this.current,
  3786. recalc = false,
  3787. calcEv = cur.lastCalcEvent,
  3788. calcData = cur.lastCalcData;
  3789. if (calcEv && ev.timeStamp - calcEv.timeStamp > GestureDetector.CALCULATE_INTERVAL) {
  3790. center = calcEv.center;
  3791. deltaTime = ev.timeStamp - calcEv.timeStamp;
  3792. deltaX = ev.center.clientX - calcEv.center.clientX;
  3793. deltaY = ev.center.clientY - calcEv.center.clientY;
  3794. recalc = true;
  3795. }
  3796. if (ev.eventType == EVENT_TOUCH || ev.eventType == EVENT_RELEASE) {
  3797. cur.futureCalcEvent = ev;
  3798. }
  3799. if (!cur.lastCalcEvent || recalc) {
  3800. calcData.velocity = Utils.getVelocity(deltaTime, deltaX, deltaY);
  3801. calcData.angle = Utils.getAngle(center, ev.center);
  3802. calcData.direction = Utils.getDirection(center, ev.center);
  3803. cur.lastCalcEvent = cur.futureCalcEvent || ev;
  3804. cur.futureCalcEvent = ev;
  3805. }
  3806. ev.velocityX = calcData.velocity.x;
  3807. ev.velocityY = calcData.velocity.y;
  3808. ev.interimAngle = calcData.angle;
  3809. ev.interimDirection = calcData.direction;
  3810. },
  3811. /**
  3812. * extend eventData for GestureDetector.gestures
  3813. * @param {Object} ev
  3814. * @return {Object} ev
  3815. */
  3816. extendEventData: function extendEventData(ev) {
  3817. var cur = this.current,
  3818. startEv = cur.startEvent,
  3819. lastEv = cur.lastEvent || startEv;
  3820. // update the start touchlist to calculate the scale/rotation
  3821. if (ev.eventType == EVENT_TOUCH || ev.eventType == EVENT_RELEASE) {
  3822. startEv.touches = [];
  3823. Utils.each(ev.touches, function (touch) {
  3824. startEv.touches.push({
  3825. clientX: touch.clientX,
  3826. clientY: touch.clientY
  3827. });
  3828. });
  3829. }
  3830. var deltaTime = ev.timeStamp - startEv.timeStamp,
  3831. deltaX = ev.center.clientX - startEv.center.clientX,
  3832. deltaY = ev.center.clientY - startEv.center.clientY;
  3833. this.getCalculatedData(ev, lastEv.center, deltaTime, deltaX, deltaY);
  3834. Utils.extend(ev, {
  3835. startEvent: startEv,
  3836. deltaTime: deltaTime,
  3837. deltaX: deltaX,
  3838. deltaY: deltaY,
  3839. distance: Utils.getDistance(startEv.center, ev.center),
  3840. angle: Utils.getAngle(startEv.center, ev.center),
  3841. direction: Utils.getDirection(startEv.center, ev.center),
  3842. scale: Utils.getScale(startEv.touches, ev.touches),
  3843. rotation: Utils.getRotation(startEv.touches, ev.touches)
  3844. });
  3845. return ev;
  3846. },
  3847. /**
  3848. * register new gesture
  3849. * @param {Object} gesture object, see `gestures/` for documentation
  3850. * @return {Array} gestures
  3851. */
  3852. register: function register(gesture) {
  3853. // add an enable gesture options if there is no given
  3854. var options = gesture.defaults || {};
  3855. if (options[gesture.name] === undefined) {
  3856. options[gesture.name] = true;
  3857. }
  3858. // extend GestureDetector default options with the GestureDetector.gesture options
  3859. Utils.extend(GestureDetector.defaults, options, true);
  3860. // set its index
  3861. gesture.index = gesture.index || 1000;
  3862. // add GestureDetector.gesture to the list
  3863. this.gestures.push(gesture);
  3864. // sort the list by index
  3865. this.gestures.sort(function (a, b) {
  3866. if (a.index < b.index) {
  3867. return -1;
  3868. }
  3869. if (a.index > b.index) {
  3870. return 1;
  3871. }
  3872. return 0;
  3873. });
  3874. return this.gestures;
  3875. }
  3876. };
  3877. /**
  3878. * @module GestureDetector
  3879. */
  3880. /**
  3881. * create new GestureDetector instance
  3882. * all methods should return the instance itself, so it is chainable.
  3883. *
  3884. * @class Instance
  3885. * @constructor
  3886. * @param {HTMLElement} element
  3887. * @param {Object} [options={}] options are merged with `GestureDetector.defaults`
  3888. * @return {GestureDetector.Instance}
  3889. */
  3890. GestureDetector.Instance = function (element, options) {
  3891. var self = this;
  3892. var listenerOptions = options && options.passive ? { passive: true } : undefined;
  3893. // setup GestureDetectorJS window events and register all gestures
  3894. // this also sets up the default options
  3895. setup(listenerOptions);
  3896. /**
  3897. * @property element
  3898. * @type {HTMLElement}
  3899. */
  3900. this.element = element;
  3901. /**
  3902. * @property enabled
  3903. * @type {Boolean}
  3904. * @protected
  3905. */
  3906. this.enabled = true;
  3907. /**
  3908. * options, merged with the defaults
  3909. * options with an _ are converted to camelCase
  3910. * @property options
  3911. * @type {Object}
  3912. */
  3913. Utils.each(options, function (value, name) {
  3914. delete options[name];
  3915. options[Utils.toCamelCase(name)] = value;
  3916. });
  3917. this.options = Utils.extend(Utils.extend({}, GestureDetector.defaults), options || {});
  3918. this.options.listenerOptions = listenerOptions;
  3919. // add some css to the element to prevent the browser from doing its native behavior
  3920. if (this.options.behavior) {
  3921. Utils.toggleBehavior(this.element, this.options.behavior, true);
  3922. }
  3923. /**
  3924. * event start handler on the element to start the detection
  3925. * @property eventStartHandler
  3926. * @type {Object}
  3927. */
  3928. this.eventStartHandler = Event$1.onTouch(element, EVENT_START, function (ev) {
  3929. if (self.enabled && ev.eventType == EVENT_START) {
  3930. Detection.startDetect(self, ev);
  3931. } else if (ev.eventType == EVENT_TOUCH) {
  3932. Detection.detect(ev);
  3933. }
  3934. }, listenerOptions);
  3935. /**
  3936. * keep a list of user event handlers which needs to be removed when calling 'dispose'
  3937. * @property eventHandlers
  3938. * @type {Array}
  3939. */
  3940. this.eventHandlers = [];
  3941. };
  3942. GestureDetector.Instance.prototype = {
  3943. /**
  3944. * @method on
  3945. * @signature on(gestures, handler)
  3946. * @description
  3947. * [en]Adds an event handler for a gesture. Available gestures are: drag, dragleft, dragright, dragup, dragdown, hold, release, swipe, swipeleft, swiperight, swipeup, swipedown, tap, doubletap, touch, transform, pinch, pinchin, pinchout and rotate. [/en]
  3948. * [ja]ジェスチャに対するイベントハンドラを追加します。指定できるジェスチャ名は、drag dragleft dragright dragup dragdown hold release swipe swipeleft swiperight swipeup swipedown tap doubletap touch transform pinch pinchin pinchout rotate です。[/ja]
  3949. * @param {String} gestures
  3950. * [en]A space separated list of gestures.[/en]
  3951. * [ja]検知するジェスチャ名を指定します。スペースで複数指定することができます。[/ja]
  3952. * @param {Function} handler
  3953. * [en]An event handling function.[/en]
  3954. * [ja]イベントハンドラとなる関数オブジェクトを指定します。[/ja]
  3955. */
  3956. on: function onEvent(gestures, handler, opt) {
  3957. var self = this;
  3958. Event$1.on(self.element, gestures, handler, util$1.extend({}, self.options.listenerOptions, opt), function (type) {
  3959. self.eventHandlers.push({ gesture: type, handler: handler });
  3960. });
  3961. return self;
  3962. },
  3963. /**
  3964. * @method off
  3965. * @signature off(gestures, handler)
  3966. * @description
  3967. * [en]Remove an event listener.[/en]
  3968. * [ja]イベントリスナーを削除します。[/ja]
  3969. * @param {String} gestures
  3970. * [en]A space separated list of gestures.[/en]
  3971. * [ja]ジェスチャ名を指定します。スペースで複数指定することができます。[/ja]
  3972. * @param {Function} handler
  3973. * [en]An event handling function.[/en]
  3974. * [ja]イベントハンドラとなる関数オブジェクトを指定します。[/ja]
  3975. */
  3976. off: function offEvent(gestures, handler, opt) {
  3977. var self = this;
  3978. Event$1.off(self.element, gestures, handler, util$1.extend({}, self.options.listenerOptions, opt), function (type) {
  3979. var index = Utils.inArray(self.eventHandlers, { gesture: type, handler: handler }, true);
  3980. if (index >= 0) {
  3981. self.eventHandlers.splice(index, 1);
  3982. }
  3983. });
  3984. return self;
  3985. },
  3986. /**
  3987. * trigger gesture event
  3988. * @method trigger
  3989. * @signature trigger(gesture, eventData)
  3990. * @param {String} gesture
  3991. * @param {Object} [eventData]
  3992. */
  3993. trigger: function triggerEvent(gesture, eventData) {
  3994. // optional
  3995. if (!eventData) {
  3996. eventData = {};
  3997. }
  3998. // create DOM event
  3999. var event = GestureDetector.DOCUMENT.createEvent('Event');
  4000. event.initEvent(gesture, true, true);
  4001. event.gesture = eventData;
  4002. // trigger on the target if it is in the instance element,
  4003. // this is for event delegation tricks
  4004. var element = this.element;
  4005. if (Utils.hasParent(eventData.target, element)) {
  4006. element = eventData.target;
  4007. }
  4008. element.dispatchEvent(event);
  4009. return this;
  4010. },
  4011. /**
  4012. * @method enable
  4013. * @signature enable(state)
  4014. * @description
  4015. * [en]Enable or disable gesture detection.[/en]
  4016. * [ja]ジェスチャ検知を有効化/無効化します。[/ja]
  4017. * @param {Boolean} state
  4018. * [en]Specify if it should be enabled or not.[/en]
  4019. * [ja]有効にするかどうかを指定します。[/ja]
  4020. */
  4021. enable: function enable(state) {
  4022. this.enabled = state;
  4023. return this;
  4024. },
  4025. /**
  4026. * @method dispose
  4027. * @signature dispose()
  4028. * @description
  4029. * [en]Remove and destroy all event handlers for this instance.[/en]
  4030. * [ja]このインスタンスでのジェスチャの検知や、イベントハンドラを全て解除して廃棄します。[/ja]
  4031. */
  4032. dispose: function dispose() {
  4033. var i, eh;
  4034. // undo all changes made by stop_browser_behavior
  4035. Utils.toggleBehavior(this.element, this.options.behavior, false);
  4036. // unbind all custom event handlers
  4037. for (i = -1; eh = this.eventHandlers[++i];) {
  4038. // eslint-disable-line no-cond-assign
  4039. Utils.off(this.element, eh.gesture, eh.handler);
  4040. }
  4041. this.eventHandlers = [];
  4042. // unbind the start event listener
  4043. Event$1.off(this.element, EVENT_TYPES[EVENT_START], this.eventStartHandler);
  4044. return null;
  4045. }
  4046. };
  4047. /**
  4048. * @module gestures
  4049. */
  4050. /**
  4051. * Move with x fingers (default 1) around on the page.
  4052. * Preventing the default browser behavior is a good way to improve feel and working.
  4053. * ````
  4054. * GestureDetectortime.on("drag", function(ev) {
  4055. * console.log(ev);
  4056. * ev.gesture.preventDefault();
  4057. * });
  4058. * ````
  4059. *
  4060. * @class Drag
  4061. * @static
  4062. */
  4063. /**
  4064. * @event drag
  4065. * @param {Object} ev
  4066. */
  4067. /**
  4068. * @event dragstart
  4069. * @param {Object} ev
  4070. */
  4071. /**
  4072. * @event dragend
  4073. * @param {Object} ev
  4074. */
  4075. /**
  4076. * @event drapleft
  4077. * @param {Object} ev
  4078. */
  4079. /**
  4080. * @event dragright
  4081. * @param {Object} ev
  4082. */
  4083. /**
  4084. * @event dragup
  4085. * @param {Object} ev
  4086. */
  4087. /**
  4088. * @event dragdown
  4089. * @param {Object} ev
  4090. */
  4091. /**
  4092. * @param {String} name
  4093. */
  4094. (function (name) {
  4095. var triggered = false;
  4096. function dragGesture(ev, inst) {
  4097. var cur = Detection.current;
  4098. // max touches
  4099. if (inst.options.dragMaxTouches > 0 && ev.touches.length > inst.options.dragMaxTouches) {
  4100. return;
  4101. }
  4102. switch (ev.eventType) {
  4103. case EVENT_START:
  4104. triggered = false;
  4105. break;
  4106. case EVENT_MOVE:
  4107. // when the distance we moved is too small we skip this gesture
  4108. // or we can be already in dragging
  4109. if (ev.distance < inst.options.dragMinDistance && cur.name != name) {
  4110. return;
  4111. }
  4112. var startCenter = cur.startEvent.center;
  4113. // we are dragging!
  4114. if (cur.name != name) {
  4115. cur.name = name;
  4116. if (inst.options.dragDistanceCorrection && ev.distance > 0) {
  4117. // When a drag is triggered, set the event center to dragMinDistance pixels from the original event center.
  4118. // Without this correction, the dragged distance would jumpstart at dragMinDistance pixels instead of at 0.
  4119. // It might be useful to save the original start point somewhere
  4120. var factor = Math.abs(inst.options.dragMinDistance / ev.distance);
  4121. startCenter.pageX += ev.deltaX * factor;
  4122. startCenter.pageY += ev.deltaY * factor;
  4123. startCenter.clientX += ev.deltaX * factor;
  4124. startCenter.clientY += ev.deltaY * factor;
  4125. // recalculate event data using new start point
  4126. ev = Detection.extendEventData(ev);
  4127. }
  4128. }
  4129. // lock drag to axis?
  4130. if (cur.lastEvent.dragLockToAxis || inst.options.dragLockToAxis && inst.options.dragLockMinDistance <= ev.distance) {
  4131. ev.dragLockToAxis = true;
  4132. }
  4133. // keep direction on the axis that the drag gesture started on
  4134. var lastDirection = cur.lastEvent.direction;
  4135. if (ev.dragLockToAxis && lastDirection !== ev.direction) {
  4136. if (Utils.isVertical(lastDirection)) {
  4137. ev.direction = ev.deltaY < 0 ? DIRECTION_UP : DIRECTION_DOWN;
  4138. } else {
  4139. ev.direction = ev.deltaX < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
  4140. }
  4141. }
  4142. // first time, trigger dragstart event
  4143. if (!triggered) {
  4144. inst.trigger(name + 'start', ev);
  4145. triggered = true;
  4146. }
  4147. // trigger events
  4148. inst.trigger(name, ev);
  4149. inst.trigger(name + ev.direction, ev);
  4150. var isVertical = Utils.isVertical(ev.direction);
  4151. // block the browser events
  4152. if (inst.options.dragBlockVertical && isVertical || inst.options.dragBlockHorizontal && !isVertical) {
  4153. ev.preventDefault();
  4154. }
  4155. break;
  4156. case EVENT_RELEASE:
  4157. if (triggered && ev.changedLength <= inst.options.dragMaxTouches) {
  4158. inst.trigger(name + 'end', ev);
  4159. triggered = false;
  4160. }
  4161. break;
  4162. case EVENT_END:
  4163. triggered = false;
  4164. break;
  4165. }
  4166. }
  4167. GestureDetector.gestures.Drag = {
  4168. name: name,
  4169. index: 50,
  4170. handler: dragGesture,
  4171. defaults: {
  4172. /**
  4173. * minimal movement that have to be made before the drag event gets triggered
  4174. * @property dragMinDistance
  4175. * @type {Number}
  4176. * @default 10
  4177. */
  4178. dragMinDistance: 10,
  4179. /**
  4180. * Set dragDistanceCorrection to true to make the starting point of the drag
  4181. * be calculated from where the drag was triggered, not from where the touch started.
  4182. * Useful to avoid a jerk-starting drag, which can make fine-adjustments
  4183. * through dragging difficult, and be visually unappealing.
  4184. * @property dragDistanceCorrection
  4185. * @type {Boolean}
  4186. * @default true
  4187. */
  4188. dragDistanceCorrection: true,
  4189. /**
  4190. * set 0 for unlimited, but this can conflict with transform
  4191. * @property dragMaxTouches
  4192. * @type {Number}
  4193. * @default 1
  4194. */
  4195. dragMaxTouches: 1,
  4196. /**
  4197. * prevent default browser behavior when dragging occurs
  4198. * be careful with it, it makes the element a blocking element
  4199. * when you are using the drag gesture, it is a good practice to set this true
  4200. * @property dragBlockHorizontal
  4201. * @type {Boolean}
  4202. * @default false
  4203. */
  4204. dragBlockHorizontal: false,
  4205. /**
  4206. * same as `dragBlockHorizontal`, but for vertical movement
  4207. * @property dragBlockVertical
  4208. * @type {Boolean}
  4209. * @default false
  4210. */
  4211. dragBlockVertical: false,
  4212. /**
  4213. * dragLockToAxis keeps the drag gesture on the axis that it started on,
  4214. * It disallows vertical directions if the initial direction was horizontal, and vice versa.
  4215. * @property dragLockToAxis
  4216. * @type {Boolean}
  4217. * @default false
  4218. */
  4219. dragLockToAxis: false,
  4220. /**
  4221. * drag lock only kicks in when distance > dragLockMinDistance
  4222. * This way, locking occurs only when the distance has become large enough to reliably determine the direction
  4223. * @property dragLockMinDistance
  4224. * @type {Number}
  4225. * @default 25
  4226. */
  4227. dragLockMinDistance: 25
  4228. }
  4229. };
  4230. })('drag');
  4231. /**
  4232. * @module gestures
  4233. */
  4234. /**
  4235. * trigger a simple gesture event, so you can do anything in your handler.
  4236. * only usable if you know what your doing...
  4237. *
  4238. * @class Gesture
  4239. * @static
  4240. */
  4241. /**
  4242. * @event gesture
  4243. * @param {Object} ev
  4244. */
  4245. GestureDetector.gestures.Gesture = {
  4246. name: 'gesture',
  4247. index: 1337,
  4248. handler: function releaseGesture(ev, inst) {
  4249. inst.trigger(this.name, ev);
  4250. }
  4251. };
  4252. /**
  4253. * @module gestures
  4254. */
  4255. /**
  4256. * Touch stays at the same place for x time
  4257. *
  4258. * @class Hold
  4259. * @static
  4260. */
  4261. /**
  4262. * @event hold
  4263. * @param {Object} ev
  4264. */
  4265. /**
  4266. * @param {String} name
  4267. */
  4268. (function (name) {
  4269. var timer;
  4270. function holdGesture(ev, inst) {
  4271. var options = inst.options,
  4272. current = Detection.current;
  4273. switch (ev.eventType) {
  4274. case EVENT_START:
  4275. clearTimeout(timer);
  4276. // set the gesture so we can check in the timeout if it still is
  4277. current.name = name;
  4278. // set timer and if after the timeout it still is hold,
  4279. // we trigger the hold event
  4280. timer = setTimeout(function () {
  4281. if (current && current.name == name) {
  4282. inst.trigger(name, ev);
  4283. }
  4284. }, options.holdTimeout);
  4285. break;
  4286. case EVENT_MOVE:
  4287. if (ev.distance > options.holdThreshold) {
  4288. clearTimeout(timer);
  4289. }
  4290. break;
  4291. case EVENT_RELEASE:
  4292. clearTimeout(timer);
  4293. break;
  4294. }
  4295. }
  4296. GestureDetector.gestures.Hold = {
  4297. name: name,
  4298. index: 10,
  4299. defaults: {
  4300. /**
  4301. * @property holdTimeout
  4302. * @type {Number}
  4303. * @default 500
  4304. */
  4305. holdTimeout: 500,
  4306. /**
  4307. * movement allowed while holding
  4308. * @property holdThreshold
  4309. * @type {Number}
  4310. * @default 2
  4311. */
  4312. holdThreshold: 2
  4313. },
  4314. handler: holdGesture
  4315. };
  4316. })('hold');
  4317. /**
  4318. * @module gestures
  4319. */
  4320. /**
  4321. * when a touch is being released from the page
  4322. *
  4323. * @class Release
  4324. * @static
  4325. */
  4326. /**
  4327. * @event release
  4328. * @param {Object} ev
  4329. */
  4330. GestureDetector.gestures.Release = {
  4331. name: 'release',
  4332. index: Infinity,
  4333. handler: function releaseGesture(ev, inst) {
  4334. if (ev.eventType == EVENT_RELEASE) {
  4335. inst.trigger(this.name, ev);
  4336. }
  4337. }
  4338. };
  4339. /**
  4340. * @module gestures
  4341. */
  4342. /**
  4343. * triggers swipe events when the end velocity is above the threshold
  4344. * for best usage, set `preventDefault` (on the drag gesture) to `true`
  4345. * ````
  4346. * GestureDetectortime.on("dragleft swipeleft", function(ev) {
  4347. * console.log(ev);
  4348. * ev.gesture.preventDefault();
  4349. * });
  4350. * ````
  4351. *
  4352. * @class Swipe
  4353. * @static
  4354. */
  4355. /**
  4356. * @event swipe
  4357. * @param {Object} ev
  4358. */
  4359. /**
  4360. * @event swipeleft
  4361. * @param {Object} ev
  4362. */
  4363. /**
  4364. * @event swiperight
  4365. * @param {Object} ev
  4366. */
  4367. /**
  4368. * @event swipeup
  4369. * @param {Object} ev
  4370. */
  4371. /**
  4372. * @event swipedown
  4373. * @param {Object} ev
  4374. */
  4375. GestureDetector.gestures.Swipe = {
  4376. name: 'swipe',
  4377. index: 40,
  4378. defaults: {
  4379. /**
  4380. * @property swipeMinTouches
  4381. * @type {Number}
  4382. * @default 1
  4383. */
  4384. swipeMinTouches: 1,
  4385. /**
  4386. * @property swipeMaxTouches
  4387. * @type {Number}
  4388. * @default 1
  4389. */
  4390. swipeMaxTouches: 1,
  4391. /**
  4392. * horizontal swipe velocity
  4393. * @property swipeVelocityX
  4394. * @type {Number}
  4395. * @default 0.6
  4396. */
  4397. swipeVelocityX: 0.6,
  4398. /**
  4399. * vertical swipe velocity
  4400. * @property swipeVelocityY
  4401. * @type {Number}
  4402. * @default 0.6
  4403. */
  4404. swipeVelocityY: 0.6
  4405. },
  4406. handler: function swipeGesture(ev, inst) {
  4407. if (ev.eventType == EVENT_RELEASE) {
  4408. var touches = ev.touches.length,
  4409. options = inst.options;
  4410. // max touches
  4411. if (touches < options.swipeMinTouches || touches > options.swipeMaxTouches) {
  4412. return;
  4413. }
  4414. // when the distance we moved is too small we skip this gesture
  4415. // or we can be already in dragging
  4416. if (ev.velocityX > options.swipeVelocityX || ev.velocityY > options.swipeVelocityY) {
  4417. // trigger swipe events
  4418. inst.trigger(this.name, ev);
  4419. inst.trigger(this.name + ev.direction, ev);
  4420. }
  4421. }
  4422. }
  4423. };
  4424. /**
  4425. * @module gestures
  4426. */
  4427. /**
  4428. * Single tap and a double tap on a place
  4429. *
  4430. * @class Tap
  4431. * @static
  4432. */
  4433. /**
  4434. * @event tap
  4435. * @param {Object} ev
  4436. */
  4437. /**
  4438. * @event doubletap
  4439. * @param {Object} ev
  4440. */
  4441. /**
  4442. * @param {String} name
  4443. */
  4444. (function (name) {
  4445. var hasMoved = false;
  4446. function tapGesture(ev, inst) {
  4447. var options = inst.options,
  4448. current = Detection.current,
  4449. prev = Detection.previous,
  4450. sincePrev,
  4451. didDoubleTap;
  4452. switch (ev.eventType) {
  4453. case EVENT_START:
  4454. hasMoved = false;
  4455. break;
  4456. case EVENT_MOVE:
  4457. hasMoved = hasMoved || ev.distance > options.tapMaxDistance;
  4458. break;
  4459. case EVENT_END:
  4460. if (!Utils.inStr(ev.srcEvent.type, 'cancel') && ev.deltaTime < options.tapMaxTime && !hasMoved) {
  4461. // previous gesture, for the double tap since these are two different gesture detections
  4462. sincePrev = prev && prev.lastEvent && ev.timeStamp - prev.lastEvent.timeStamp;
  4463. didDoubleTap = false;
  4464. // check if double tap
  4465. if (prev && prev.name == name && sincePrev && sincePrev < options.doubleTapInterval && ev.distance < options.doubleTapDistance) {
  4466. inst.trigger('doubletap', ev);
  4467. didDoubleTap = true;
  4468. }
  4469. // do a single tap
  4470. if (!didDoubleTap || options.tapAlways) {
  4471. current.name = name;
  4472. inst.trigger(current.name, ev);
  4473. }
  4474. }
  4475. break;
  4476. }
  4477. }
  4478. GestureDetector.gestures.Tap = {
  4479. name: name,
  4480. index: 100,
  4481. handler: tapGesture,
  4482. defaults: {
  4483. /**
  4484. * max time of a tap, this is for the slow tappers
  4485. * @property tapMaxTime
  4486. * @type {Number}
  4487. * @default 250
  4488. */
  4489. tapMaxTime: 250,
  4490. /**
  4491. * max distance of movement of a tap, this is for the slow tappers
  4492. * @property tapMaxDistance
  4493. * @type {Number}
  4494. * @default 10
  4495. */
  4496. tapMaxDistance: 10,
  4497. /**
  4498. * always trigger the `tap` event, even while double-tapping
  4499. * @property tapAlways
  4500. * @type {Boolean}
  4501. * @default true
  4502. */
  4503. tapAlways: true,
  4504. /**
  4505. * max distance between two taps
  4506. * @property doubleTapDistance
  4507. * @type {Number}
  4508. * @default 20
  4509. */
  4510. doubleTapDistance: 20,
  4511. /**
  4512. * max time between two taps
  4513. * @property doubleTapInterval
  4514. * @type {Number}
  4515. * @default 300
  4516. */
  4517. doubleTapInterval: 300
  4518. }
  4519. };
  4520. })('tap');
  4521. /**
  4522. * @module gestures
  4523. */
  4524. /**
  4525. * when a touch is being touched at the page
  4526. *
  4527. * @class Touch
  4528. * @static
  4529. */
  4530. /**
  4531. * @event touch
  4532. * @param {Object} ev
  4533. */
  4534. GestureDetector.gestures.Touch = {
  4535. name: 'touch',
  4536. index: -Infinity,
  4537. defaults: {
  4538. /**
  4539. * call preventDefault at touchstart, and makes the element blocking by disabling the scrolling of the page,
  4540. * but it improves gestures like transforming and dragging.
  4541. * be careful with using this, it can be very annoying for users to be stuck on the page
  4542. * @property preventDefault
  4543. * @type {Boolean}
  4544. * @default false
  4545. */
  4546. preventDefault: false,
  4547. /**
  4548. * disable mouse events, so only touch (or pen!) input triggers events
  4549. * @property preventMouse
  4550. * @type {Boolean}
  4551. * @default false
  4552. */
  4553. preventMouse: false
  4554. },
  4555. handler: function touchGesture(ev, inst) {
  4556. if (inst.options.preventMouse && ev.pointerType == POINTER_MOUSE) {
  4557. ev.stopDetect();
  4558. return;
  4559. }
  4560. if (inst.options.preventDefault) {
  4561. ev.preventDefault();
  4562. }
  4563. if (ev.eventType == EVENT_TOUCH) {
  4564. inst.trigger('touch', ev);
  4565. }
  4566. }
  4567. };
  4568. /**
  4569. * @module gestures
  4570. */
  4571. /**
  4572. * User want to scale or rotate with 2 fingers
  4573. * Preventing the default browser behavior is a good way to improve feel and working. This can be done with the
  4574. * `preventDefault` option.
  4575. *
  4576. * @class Transform
  4577. * @static
  4578. */
  4579. /**
  4580. * @event transform
  4581. * @param {Object} ev
  4582. */
  4583. /**
  4584. * @event transformstart
  4585. * @param {Object} ev
  4586. */
  4587. /**
  4588. * @event transformend
  4589. * @param {Object} ev
  4590. */
  4591. /**
  4592. * @event pinchin
  4593. * @param {Object} ev
  4594. */
  4595. /**
  4596. * @event pinchout
  4597. * @param {Object} ev
  4598. */
  4599. /**
  4600. * @event rotate
  4601. * @param {Object} ev
  4602. */
  4603. /**
  4604. * @param {String} name
  4605. */
  4606. (function (name) {
  4607. var triggered = false;
  4608. function transformGesture(ev, inst) {
  4609. switch (ev.eventType) {
  4610. case EVENT_START:
  4611. triggered = false;
  4612. break;
  4613. case EVENT_MOVE:
  4614. // at least multitouch
  4615. if (ev.touches.length < 2) {
  4616. return;
  4617. }
  4618. var scaleThreshold = Math.abs(1 - ev.scale);
  4619. var rotationThreshold = Math.abs(ev.rotation);
  4620. // when the distance we moved is too small we skip this gesture
  4621. // or we can be already in dragging
  4622. if (scaleThreshold < inst.options.transformMinScale && rotationThreshold < inst.options.transformMinRotation) {
  4623. return;
  4624. }
  4625. // we are transforming!
  4626. Detection.current.name = name;
  4627. // first time, trigger dragstart event
  4628. if (!triggered) {
  4629. inst.trigger(name + 'start', ev);
  4630. triggered = true;
  4631. }
  4632. inst.trigger(name, ev); // basic transform event
  4633. // trigger rotate event
  4634. if (rotationThreshold > inst.options.transformMinRotation) {
  4635. inst.trigger('rotate', ev);
  4636. }
  4637. // trigger pinch event
  4638. if (scaleThreshold > inst.options.transformMinScale) {
  4639. inst.trigger('pinch', ev);
  4640. inst.trigger('pinch' + (ev.scale < 1 ? 'in' : 'out'), ev);
  4641. }
  4642. break;
  4643. case EVENT_RELEASE:
  4644. if (triggered && ev.changedLength < 2) {
  4645. inst.trigger(name + 'end', ev);
  4646. triggered = false;
  4647. }
  4648. break;
  4649. }
  4650. }
  4651. GestureDetector.gestures.Transform = {
  4652. name: name,
  4653. index: 45,
  4654. defaults: {
  4655. /**
  4656. * minimal scale factor, no scale is 1, zoomin is to 0 and zoomout until higher then 1
  4657. * @property transformMinScale
  4658. * @type {Number}
  4659. * @default 0.01
  4660. */
  4661. transformMinScale: 0.01,
  4662. /**
  4663. * rotation in degrees
  4664. * @property transformMinRotation
  4665. * @type {Number}
  4666. * @default 1
  4667. */
  4668. transformMinRotation: 1
  4669. },
  4670. handler: transformGesture
  4671. };
  4672. })('transform');
  4673. /*
  4674. Copyright 2013-2015 ASIAL CORPORATION
  4675. Licensed under the Apache License, Version 2.0 (the "License");
  4676. you may not use this file except in compliance with the License.
  4677. You may obtain a copy of the License at
  4678. http://www.apache.org/licenses/LICENSE-2.0
  4679. Unless required by applicable law or agreed to in writing, software
  4680. distributed under the License is distributed on an "AS IS" BASIS,
  4681. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  4682. See the License for the specific language governing permissions and
  4683. limitations under the License.
  4684. */
  4685. var readyMap = void 0;
  4686. var queueMap = void 0;
  4687. function isContentReady(element) {
  4688. if (element.childNodes.length > 0) {
  4689. setContentReady(element);
  4690. }
  4691. return readyMap.has(element);
  4692. }
  4693. function setContentReady(element) {
  4694. readyMap.set(element, true);
  4695. }
  4696. function addCallback(element, fn) {
  4697. if (!queueMap.has(element)) {
  4698. queueMap.set(element, []);
  4699. }
  4700. queueMap.get(element).push(fn);
  4701. }
  4702. function consumeQueue(element) {
  4703. var callbacks = queueMap.get(element, []) || [];
  4704. queueMap.delete(element);
  4705. callbacks.forEach(function (callback) {
  4706. return callback();
  4707. });
  4708. }
  4709. function contentReady(element) {
  4710. var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
  4711. if (readyMap === undefined) {
  4712. readyMap = new WeakMap();
  4713. queueMap = new WeakMap();
  4714. }
  4715. addCallback(element, fn);
  4716. if (isContentReady(element)) {
  4717. consumeQueue(element);
  4718. return;
  4719. }
  4720. var observer = new MutationObserver(function (changes) {
  4721. setContentReady(element);
  4722. consumeQueue(element);
  4723. });
  4724. observer.observe(element, { childList: true, characterData: true });
  4725. // failback for elements has empty content.
  4726. setImmediate(function () {
  4727. setContentReady(element);
  4728. consumeQueue(element);
  4729. });
  4730. }
  4731. /*
  4732. Copyright 2013-2015 ASIAL CORPORATION
  4733. Licensed under the Apache License, Version 2.0 (the "License");
  4734. you may not use this file except in compliance with the License.
  4735. You may obtain a copy of the License at
  4736. http://www.apache.org/licenses/LICENSE-2.0
  4737. Unless required by applicable law or agreed to in writing, software
  4738. distributed under the License is distributed on an "AS IS" BASIS,
  4739. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  4740. See the License for the specific language governing permissions and
  4741. limitations under the License.
  4742. */
  4743. var ToastQueue = function () {
  4744. function ToastQueue() {
  4745. classCallCheck(this, ToastQueue);
  4746. this.queue = [];
  4747. }
  4748. createClass(ToastQueue, [{
  4749. key: "add",
  4750. value: function add(fn, promise) {
  4751. var _this = this;
  4752. this.queue.push(fn);
  4753. if (this.queue.length === 1) {
  4754. setImmediate(this.queue[0]);
  4755. }
  4756. promise.then(function () {
  4757. _this.queue.shift();
  4758. if (_this.queue.length > 0) {
  4759. setTimeout(_this.queue[0], 1000 / 30); // Apply some visual delay
  4760. }
  4761. });
  4762. }
  4763. }]);
  4764. return ToastQueue;
  4765. }();
  4766. var ToastQueue$1 = new ToastQueue();
  4767. /*
  4768. Copyright 2013-2015 ASIAL CORPORATION
  4769. Licensed under the Apache License, Version 2.0 (the "License");
  4770. you may not use this file except in compliance with the License.
  4771. You may obtain a copy of the License at
  4772. http://www.apache.org/licenses/LICENSE-2.0
  4773. Unless required by applicable law or agreed to in writing, software
  4774. distributed under the License is distributed on an "AS IS" BASIS,
  4775. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  4776. See the License for the specific language governing permissions and
  4777. limitations under the License.
  4778. */
  4779. var _setAttributes = function _setAttributes(element, options) {
  4780. ['id', 'class', 'animation'].forEach(function (a) {
  4781. return options.hasOwnProperty(a) && element.setAttribute(a, options[a]);
  4782. });
  4783. if (options.modifier) {
  4784. util$1.addModifier(element, options.modifier);
  4785. }
  4786. };
  4787. var _normalizeArguments = function _normalizeArguments(message) {
  4788. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4789. var defaults$$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  4790. options = _extends({}, options);
  4791. typeof message === 'string' ? options.message = message : options = message;
  4792. if (!options || !options.message && !options.messageHTML) {
  4793. util$1.throw('Notifications must contain a message');
  4794. }
  4795. if (options.hasOwnProperty('buttonLabels') || options.hasOwnProperty('buttonLabel')) {
  4796. options.buttonLabels = options.buttonLabels || options.buttonLabel;
  4797. if (!Array.isArray(options.buttonLabels)) {
  4798. options.buttonLabels = [options.buttonLabels || ''];
  4799. }
  4800. }
  4801. return util$1.extend({
  4802. compile: function compile(param) {
  4803. return param;
  4804. },
  4805. callback: function callback(param) {
  4806. return param;
  4807. },
  4808. animation: 'default',
  4809. cancelable: false,
  4810. primaryButtonIndex: (options.buttonLabels || defaults$$1.buttonLabels || []).length - 1
  4811. }, defaults$$1, options);
  4812. };
  4813. /**
  4814. * @object ons.notification
  4815. * @category dialog
  4816. * @tutorial vanilla/Reference/notification
  4817. * @description
  4818. * [en]
  4819. * Utility methods to create different kinds of notifications. There are three methods available:
  4820. *
  4821. * * `ons.notification.alert()`
  4822. * * `ons.notification.confirm()`
  4823. * * `ons.notification.prompt()`
  4824. * * `ons.notification.toast()`
  4825. *
  4826. * It will automatically display a Material Design dialog on Android devices.
  4827. * [/en]
  4828. * [ja]いくつかの種類のアラートダイアログを作成するためのユーティリティメソッドを収めたオブジェクトです。[/ja]
  4829. * @example
  4830. * ons.notification.alert('Hello, world!');
  4831. *
  4832. * ons.notification.confirm('Are you ready?')
  4833. * .then(
  4834. * function(answer) {
  4835. * if (answer === 1) {
  4836. * ons.notification.alert('Let\'s go!');
  4837. * }
  4838. * }
  4839. * );
  4840. *
  4841. * ons.notification.prompt('How old are ?')
  4842. * .then(
  4843. * function(age) {
  4844. * ons.notification.alert('You are ' + age + ' years old.');
  4845. * }
  4846. * );
  4847. */
  4848. var notification = {};
  4849. notification._createAlertDialog = function () {
  4850. for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) {
  4851. params[_key] = arguments[_key];
  4852. }
  4853. return new Promise(function (resolve) {
  4854. var options = _normalizeArguments.apply(undefined, params);
  4855. util$1.checkMissingImport('AlertDialog', 'AlertDialogButton');
  4856. // Prompt input string
  4857. var inputString = '';
  4858. if (options.isPrompt) {
  4859. inputString = '\n <input\n class="text-input text-input--underbar"\n type="' + (options.inputType || 'text') + '"\n placeholder="' + (options.placeholder || '') + '"\n value="' + (options.defaultValue || '') + '"\n style="width: 100%; margin-top: 10px;"\n />\n ';
  4860. }
  4861. // Buttons string
  4862. var buttons = '';
  4863. options.buttonLabels.forEach(function (label, index) {
  4864. buttons += '\n <ons-alert-dialog-button\n class="\n ' + (index === options.primaryButtonIndex ? ' alert-dialog-button--primal' : '') + '\n ' + (options.buttonLabels.length <= 2 ? ' alert-dialog-button--rowfooter' : '') + '\n "\n style="position: relative;">\n ' + label + '\n </ons-alert-dialog-button>\n ';
  4865. });
  4866. // Dialog Element
  4867. var el = {};
  4868. var _destroyDialog = function _destroyDialog() {
  4869. if (el.dialog.onDialogCancel) {
  4870. el.dialog.removeEventListener('dialog-cancel', el.dialog.onDialogCancel);
  4871. }
  4872. Object.keys(el).forEach(function (key) {
  4873. return delete el[key];
  4874. });
  4875. el = null;
  4876. if (options.destroy instanceof Function) {
  4877. options.destroy();
  4878. }
  4879. };
  4880. el.dialog = document.createElement('ons-alert-dialog');
  4881. el.dialog.innerHTML = '\n <div class="alert-dialog-mask"\n style="\n ' + (options.maskColor ? 'background-color: ' + options.maskColor : '') + '\n "></div>\n <div class="alert-dialog">\n <div class="alert-dialog-container">\n <div class="alert-dialog-title">\n ' + (options.title || '') + '\n </div>\n <div class="alert-dialog-content">\n ' + (options.message || options.messageHTML) + '\n ' + inputString + '\n </div>\n <div class="\n alert-dialog-footer\n ' + (options.buttonLabels.length <= 2 ? ' alert-dialog-footer--rowfooter' : '') + '\n ">\n ' + buttons + '\n </div>\n </div>\n </div>\n ';
  4882. contentReady(el.dialog);
  4883. // Set attributes
  4884. _setAttributes(el.dialog, options);
  4885. // Prompt events
  4886. if (options.isPrompt && options.submitOnEnter) {
  4887. el.input = el.dialog.querySelector('.text-input');
  4888. el.input.onkeypress = function (event) {
  4889. if (event.keyCode === 13) {
  4890. el.dialog.hide().then(function () {
  4891. if (el) {
  4892. var resolveValue = el.input.value;
  4893. _destroyDialog();
  4894. options.callback(resolveValue);
  4895. resolve(resolveValue);
  4896. }
  4897. });
  4898. }
  4899. };
  4900. }
  4901. // Button events
  4902. el.footer = el.dialog.querySelector('.alert-dialog-footer');
  4903. util$1.arrayFrom(el.dialog.querySelectorAll('.alert-dialog-button')).forEach(function (buttonElement, index) {
  4904. buttonElement.onclick = function () {
  4905. el.dialog.hide().then(function () {
  4906. if (el) {
  4907. var resolveValue = index;
  4908. if (options.isPrompt) {
  4909. resolveValue = index === options.primaryButtonIndex ? el.input.value : null;
  4910. }
  4911. el.dialog.remove();
  4912. _destroyDialog();
  4913. options.callback(resolveValue);
  4914. resolve(resolveValue);
  4915. }
  4916. });
  4917. };
  4918. el.footer.appendChild(buttonElement);
  4919. });
  4920. // Cancel events
  4921. if (options.cancelable) {
  4922. el.dialog.cancelable = true;
  4923. el.dialog.onDialogCancel = function () {
  4924. setImmediate(function () {
  4925. el.dialog.remove();
  4926. _destroyDialog();
  4927. });
  4928. var resolveValue = options.isPrompt ? null : -1;
  4929. options.callback(resolveValue);
  4930. resolve(resolveValue);
  4931. };
  4932. el.dialog.addEventListener('dialog-cancel', el.dialog.onDialogCancel, false);
  4933. }
  4934. // Show dialog
  4935. document.body.appendChild(el.dialog);
  4936. options.compile(el.dialog);
  4937. setImmediate(function () {
  4938. el.dialog.show().then(function () {
  4939. if (el.input && options.isPrompt && options.autofocus) {
  4940. var strLength = el.input.value.length;
  4941. el.input.focus();
  4942. el.input.setSelectionRange(strLength, strLength);
  4943. }
  4944. });
  4945. });
  4946. });
  4947. };
  4948. /**
  4949. * @method alert
  4950. * @signature alert(message [, options] | options)
  4951. * @return {Promise}
  4952. * [en]Will resolve to the index of the button that was pressed or `-1` when canceled.[/en]
  4953. * [ja][/ja]
  4954. * @param {String} message
  4955. * [en]Notification message. This argument is optional but if it's not defined either `options.message` or `options.messageHTML` must be defined instead.[/en]
  4956. * [ja][/ja]
  4957. * @param {Object} options
  4958. * [en]Parameter object.[/en]
  4959. * [ja]オプションを指定するオブジェクトです。[/ja]
  4960. * @param {String} [options.message]
  4961. * [en]Notification message.[/en]
  4962. * [ja]アラートダイアログに表示する文字列を指定します。[/ja]
  4963. * @param {String} [options.messageHTML]
  4964. * [en]Notification message in HTML.[/en]
  4965. * [ja]アラートダイアログに表示するHTMLを指定します。[/ja]
  4966. * @param {String | Array} [options.buttonLabels]
  4967. * [en]Labels for the buttons. Default is `"OK"`.[/en]
  4968. * [ja]確認ボタンのラベルを指定します。"OK"がデフォルトです。[/ja]
  4969. * @param {Number} [options.primaryButtonIndex]
  4970. * [en]Index of primary button. Default is the last one.[/en]
  4971. * [ja]プライマリボタンのインデックスを指定します。デフォルトは 0 です。[/ja]
  4972. * @param {Boolean} [options.cancelable]
  4973. * [en]Whether the dialog is cancelable or not. Default is `false`. If the dialog is cancelable it can be closed by clicking the background or pressing the Android back button.[/en]
  4974. * [ja]ダイアログがキャンセル可能かどうかを指定します。[/ja]
  4975. * @param {String} [options.animation]
  4976. * [en]Animation name. Available animations are `none` and `fade`. Default is `fade`.[/en]
  4977. * [ja]アラートダイアログを表示する際のアニメーション名を指定します。"none", "fade"のいずれかを指定できます。[/ja]
  4978. * @param {String} [options.id]
  4979. * [en]The `<ons-alert-dialog>` element's ID.[/en]
  4980. * [ja]ons-alert-dialog要素のID。[/ja]
  4981. * @param {String} [options.class]
  4982. * [en]The `<ons-alert-dialog>` element's class.[/en]
  4983. * [ja]ons-alert-dialog要素のclass。[/ja]
  4984. * @param {String} [options.title]
  4985. * [en]Dialog title. Default is `"Alert"`.[/en]
  4986. * [ja]アラートダイアログの上部に表示するタイトルを指定します。"Alert"がデフォルトです。[/ja]
  4987. * @param {String} [options.modifier]
  4988. * [en]Modifier for the dialog.[/en]
  4989. * [ja]アラートダイアログのmodifier属性の値を指定します。[/ja]
  4990. * @param {String} [options.maskColor]
  4991. * [en]Color of the background mask. Default is "rgba(0, 0, 0, 0.2)" ("rgba(0, 0, 0, 0.3)" for Material).[/en]
  4992. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  4993. * @param {Function} [options.callback]
  4994. * [en]Function that executes after dialog has been closed.[/en]
  4995. * [ja]アラートダイアログが閉じられた時に呼び出される関数オブジェクトを指定します。[/ja]
  4996. * @description
  4997. * [en]
  4998. * Display an alert dialog to show the user a message.
  4999. *
  5000. * The content of the message can be either simple text or HTML.
  5001. *
  5002. * It can be called in the following ways:
  5003. *
  5004. * ```
  5005. * ons.notification.alert(message, options);
  5006. * ons.notification.alert(options);
  5007. * ```
  5008. *
  5009. * Must specify either `message` or `messageHTML`.
  5010. * [/en]
  5011. * [ja]
  5012. * ユーザーへメッセージを見せるためのアラートダイアログを表示します。
  5013. * 表示するメッセージは、テキストかもしくはHTMLを指定できます。
  5014. * このメソッドの引数には、options.messageもしくはoptions.messageHTMLのどちらかを必ず指定する必要があります。
  5015. * [/ja]
  5016. */
  5017. notification.alert = function (message, options) {
  5018. return notification._createAlertDialog(message, options, {
  5019. buttonLabels: ['OK'],
  5020. title: 'Alert'
  5021. });
  5022. };
  5023. /**
  5024. * @method confirm
  5025. * @signature confirm(message [, options] | options)
  5026. * @return {Promise}
  5027. * [en]Will resolve to the index of the button that was pressed or `-1` when canceled.[/en]
  5028. * [ja][/ja]
  5029. * @param {String} message
  5030. * [en]Notification message. This argument is optional but if it's not defined either `options.message` or `options.messageHTML` must be defined instead.[/en]
  5031. * [ja][/ja]
  5032. * @param {Object} options
  5033. * [en]Parameter object.[/en]
  5034. * @param {Array} [options.buttonLabels]
  5035. * [en]Labels for the buttons. Default is `["Cancel", "OK"]`.[/en]
  5036. * [ja]ボタンのラベルの配列を指定します。["Cancel", "OK"]がデフォルトです。[/ja]
  5037. * @param {Number} [options.primaryButtonIndex]
  5038. * [en]Index of primary button. Default is the last one.[/en]
  5039. * [ja]プライマリボタンのインデックスを指定します。デフォルトは 1 です。[/ja]
  5040. * @description
  5041. * [en]
  5042. * Display a dialog to ask the user for confirmation. Extends `alert()` parameters.
  5043. * The default button labels are `"Cancel"` and `"OK"` but they can be customized.
  5044. *
  5045. * It can be called in the following ways:
  5046. *
  5047. * ```
  5048. * ons.notification.confirm(message, options);
  5049. * ons.notification.confirm(options);
  5050. * ```
  5051. *
  5052. * Must specify either `message` or `messageHTML`.
  5053. * [/en]
  5054. * [ja]
  5055. * ユーザに確認を促すダイアログを表示します。
  5056. * デオルとのボタンラベルは、"Cancel"と"OK"ですが、これはこのメソッドの引数でカスタマイズできます。
  5057. * このメソッドの引数には、options.messageもしくはoptions.messageHTMLのどちらかを必ず指定する必要があります。
  5058. * [/ja]
  5059. */
  5060. notification.confirm = function (message, options) {
  5061. return notification._createAlertDialog(message, options, {
  5062. buttonLabels: ['Cancel', 'OK'],
  5063. title: 'Confirm'
  5064. });
  5065. };
  5066. /**
  5067. * @method prompt
  5068. * @signature prompt(message [, options] | options)
  5069. * @param {String} message
  5070. * [en]Notification message. This argument is optional but if it's not defined either `options.message` or `options.messageHTML` must be defined instead.[/en]
  5071. * [ja][/ja]
  5072. * @return {Promise}
  5073. * [en]Will resolve to the input value when the dialog is closed or `null` when canceled.[/en]
  5074. * [ja][/ja]
  5075. * @param {Object} options
  5076. * [en]Parameter object.[/en]
  5077. * [ja]オプションを指定するオブジェクトです。[/ja]
  5078. * @param {String | Array} [options.buttonLabels]
  5079. * [en]Labels for the buttons. Default is `"OK"`.[/en]
  5080. * [ja]確認ボタンのラベルを指定します。"OK"がデフォルトです。[/ja]
  5081. * @param {Number} [options.primaryButtonIndex]
  5082. * [en]Index of primary button. Default is the last one.[/en]
  5083. * [ja]プライマリボタンのインデックスを指定します。デフォルトは 0 です。[/ja]
  5084. * @param {String} [options.placeholder]
  5085. * [en]Placeholder for the text input.[/en]
  5086. * [ja]テキスト欄のプレースホルダに表示するテキストを指定します。[/ja]
  5087. * @param {String} [options.defaultValue]
  5088. * [en]Default value for the text input.[/en]
  5089. * [ja]テキスト欄のデフォルトの値を指定します。[/ja]
  5090. * @param {String} [options.inputType]
  5091. * [en]Type of the input element (`password`, `date`...). Default is `text`.[/en]
  5092. * [ja][/ja]
  5093. * @param {Boolean} [options.autofocus]
  5094. * [en]Autofocus the input element. Default is `true`. In Cordova, `KeyboardDisplayRequiresUserAction` in `config.xml` must be `false` to activate this feature.[/en]
  5095. * [ja]input要素に自動的にフォーカスするかどうかを指定します。デフォルトはtrueです。Cordova環境では、この機能を有効にするためには `config.xml` で `KeyboardDisplayRequiresUserAction` を `false` に設定する必要があります。[/ja]
  5096. * @param {Boolean} [options.submitOnEnter]
  5097. * [en]Submit automatically when enter is pressed. Default is `true`.[/en]
  5098. * [ja]Enterが押された際にそのformをsubmitするかどうかを指定します。デフォルトはtrueです。[/ja]
  5099. * @description
  5100. * [en]
  5101. * Display a dialog with a prompt to ask the user a question. Extends `alert()` parameters.
  5102. *
  5103. * It can be called in the following ways:
  5104. *
  5105. * ```
  5106. * ons.notification.prompt(message, options);
  5107. * ons.notification.prompt(options);
  5108. * ```
  5109. *
  5110. * Must specify either `message` or `messageHTML`.
  5111. * [/en]
  5112. * [ja]
  5113. * ユーザーに入力を促すダイアログを表示します。
  5114. * このメソッドの引数には、options.messageもしくはoptions.messageHTMLのどちらかを必ず指定する必要があります。
  5115. * [/ja]
  5116. */
  5117. notification.prompt = function (message, options) {
  5118. return notification._createAlertDialog(message, options, {
  5119. buttonLabels: ['OK'],
  5120. title: 'Alert',
  5121. isPrompt: true,
  5122. autofocus: true,
  5123. submitOnEnter: true
  5124. });
  5125. };
  5126. /**
  5127. * @method toast
  5128. * @signature toast(message [, options] | options)
  5129. * @return {Promise}
  5130. * [en]Will resolve when the toast is hidden.[/en]
  5131. * [ja][/ja]
  5132. * @param {String} message
  5133. * [en]Toast message. This argument is optional but if it's not defined then `options.message` must be defined instead.[/en]
  5134. * [ja][/ja]
  5135. * @param {Object} options
  5136. * [en]Parameter object.[/en]
  5137. * [ja]オプションを指定するオブジェクトです。[/ja]
  5138. * @param {String} [options.message]
  5139. * [en]Notification message.[/en]
  5140. * [ja]トーストに表示する文字列を指定します。[/ja]
  5141. * @param {String} [options.buttonLabel]
  5142. * [en]Label for the button.[/en]
  5143. * [ja]確認ボタンのラベルを指定します。[/ja]
  5144. * @param {String} [options.animation]
  5145. * [en]Animation name. Available animations are `none`, `fade`, `ascend`, `lift` and `fall`. Default is `ascend` for Android and `lift` for iOS.[/en]
  5146. * [ja]トーストを表示する際のアニメーション名を指定します。"none", "fade", "ascend", "lift", "fall"のいずれかを指定できます。[/ja]
  5147. * @param {Number} [options.timeout]
  5148. * [en]Number of miliseconds where the toast is visible before hiding automatically.[/en]
  5149. * [ja][/ja]
  5150. * @param {Boolean} [options.force]
  5151. * [en]If `true`, the toast skips the notification queue and is shown immediately. Defaults to `false`.[/en]
  5152. * [ja][/ja]
  5153. * @param {String} [options.id]
  5154. * [en]The `<ons-toast>` element's ID.[/en]
  5155. * [ja]ons-toast要素のID。[/ja]
  5156. * @param {String} [options.class]
  5157. * [en]The `<ons-toast>` element's class.[/en]
  5158. * [ja]ons-toast要素のclass。[/ja]
  5159. * @param {String} [options.modifier]
  5160. * [en]Modifier for the element.[/en]
  5161. * [ja]トーストのmodifier属性の値を指定します。[/ja]
  5162. * @param {Function} [options.callback]
  5163. * [en]Function that executes after toast has been hidden.[/en]
  5164. * [ja]トーストが閉じられた時に呼び出される関数オブジェクトを指定します。[/ja]
  5165. * @description
  5166. * [en]
  5167. * Display a simple notification toast with an optional button that can be used for simple actions.
  5168. *
  5169. * It can be called in the following ways:
  5170. *
  5171. * ```
  5172. * ons.notification.toast(message, options);
  5173. * ons.notification.toast(options);
  5174. * ```
  5175. * [/en]
  5176. * [ja][/ja]
  5177. */
  5178. notification.toast = function (message, options) {
  5179. var promise = new Promise(function (resolve) {
  5180. util$1.checkMissingImport('Toast'); // Throws error, must be inside promise
  5181. options = _normalizeArguments(message, options, {
  5182. timeout: 0,
  5183. force: false
  5184. });
  5185. var toast = util$1.createElement('\n <ons-toast>\n ' + options.message + '\n ' + (options.buttonLabels ? '<button>' + options.buttonLabels[0] + '</button>' : '') + '\n </ons-toast>\n ');
  5186. _setAttributes(toast, options);
  5187. var finish = function finish(value) {
  5188. if (toast) {
  5189. toast.hide().then(function () {
  5190. if (toast) {
  5191. toast.remove();
  5192. toast = null;
  5193. options.callback(value);
  5194. resolve(value);
  5195. }
  5196. });
  5197. }
  5198. };
  5199. if (options.buttonLabels) {
  5200. util$1.findChild(toast._toast, 'button').onclick = function () {
  5201. return finish(0);
  5202. };
  5203. }
  5204. document.body.appendChild(toast);
  5205. options.compile(toast);
  5206. var show = function show() {
  5207. toast.parentElement && toast.show(options).then(function () {
  5208. if (options.timeout) {
  5209. setTimeout(function () {
  5210. return finish(-1);
  5211. }, options.timeout);
  5212. }
  5213. });
  5214. };
  5215. setImmediate(function () {
  5216. return options.force ? show() : ToastQueue$1.add(show, promise);
  5217. });
  5218. });
  5219. return promise;
  5220. };
  5221. /*
  5222. Copyright 2013-2015 ASIAL CORPORATION
  5223. Licensed under the Apache License, Version 2.0 (the "License");
  5224. you may not use this file except in compliance with the License.
  5225. You may obtain a copy of the License at
  5226. http://www.apache.org/licenses/LICENSE-2.0
  5227. Unless required by applicable law or agreed to in writing, software
  5228. distributed under the License is distributed on an "AS IS" BASIS,
  5229. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5230. See the License for the specific language governing permissions and
  5231. limitations under the License.
  5232. */
  5233. // Validate parameters
  5234. var checkOptions = function checkOptions(options) {
  5235. var err = function err(prop) {
  5236. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Function';
  5237. return util$1.throw('"options.' + prop + '" must be an instance of ' + type);
  5238. };
  5239. var hasOwnProperty = function hasOwnProperty(prop) {
  5240. return Object.hasOwnProperty.call(options, prop);
  5241. };
  5242. var instanceOf = function instanceOf(prop) {
  5243. var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Function;
  5244. return options[prop] instanceof type;
  5245. };
  5246. var b = 'buttons',
  5247. cb = 'callback',
  5248. c = 'compile',
  5249. d = 'destroy';
  5250. (!hasOwnProperty(b) || !instanceOf(b, Array)) && err(b, 'Array');
  5251. hasOwnProperty(cb) && !instanceOf(cb) && err(cb);
  5252. hasOwnProperty(c) && !instanceOf(c) && err(c);
  5253. hasOwnProperty(d) && !instanceOf(d) && err(d);
  5254. };
  5255. // Action Sheet
  5256. var actionSheet = (function () {
  5257. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  5258. return new Promise(function (resolve) {
  5259. util$1.checkMissingImport('ActionSheet');
  5260. checkOptions(options);
  5261. // Main component
  5262. var actionSheet = util$1.createElement('\n <ons-action-sheet\n ' + (options.title ? 'title="' + options.title + '"' : '') + '\n ' + (options.cancelable ? 'cancelable' : '') + '\n ' + (options.modifier ? 'modifier="' + options.modifier + '"' : '') + '\n ' + (options.maskColor ? 'mask-color="' + options.maskColor + '"' : '') + '\n ' + (options.id ? 'id="' + options.id + '"' : '') + '\n ' + (options.class ? 'class="' + options.class + '"' : '') + '\n >\n <div class="action-sheet"></div>\n </ons-action-sheet>\n ');
  5263. // Resolve action and clean up
  5264. var finish = function finish(event) {
  5265. var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
  5266. if (actionSheet) {
  5267. options.destroy && options.destroy(actionSheet);
  5268. actionSheet.removeEventListener('dialog-cancel', finish, false);
  5269. actionSheet.remove();
  5270. actionSheet = null;
  5271. options.callback && options.callback(index);
  5272. resolve(index);
  5273. }
  5274. };
  5275. // Link cancel handler
  5276. actionSheet.addEventListener('dialog-cancel', finish, false);
  5277. // Create buttons and link action handler
  5278. var buttons = document.createDocumentFragment();
  5279. options.buttons.forEach(function (item, index) {
  5280. var buttonOptions = typeof item === 'string' ? { label: item } : _extends({}, item);
  5281. if (options.destructive === index) {
  5282. buttonOptions.modifier = (buttonOptions.modifier || '') + ' destructive';
  5283. }
  5284. var button = util$1.createElement('\n <ons-action-sheet-button\n ' + (buttonOptions.icon ? 'icon="' + buttonOptions.icon + '"' : '') + '\n ' + (buttonOptions.modifier ? 'modifier="' + buttonOptions.modifier + '"' : '') + '\n >\n ' + buttonOptions.label + '\n </ons-action-sheet-button>\n ');
  5285. button.onclick = function (event) {
  5286. return actionSheet.hide().then(function () {
  5287. return finish(event, index);
  5288. });
  5289. };
  5290. buttons.appendChild(button);
  5291. });
  5292. // Finish component and attach
  5293. util$1.findChild(actionSheet, '.action-sheet').appendChild(buttons);
  5294. document.body.appendChild(actionSheet);
  5295. options.compile && options.compile(el.dialog);
  5296. // Show
  5297. setImmediate(function () {
  5298. return actionSheet.show({
  5299. animation: options.animation,
  5300. animationOptions: options.animationOptions
  5301. });
  5302. });
  5303. });
  5304. });
  5305. /**
  5306. * MicroEvent - to make any js object an event emitter (server or browser)
  5307. *
  5308. * - pure javascript - server compatible, browser compatible
  5309. * - dont rely on the browser doms
  5310. * - super simple - you get it immediately, no mystery, no magic involved
  5311. *
  5312. * - create a MicroEventDebug with goodies to debug
  5313. * - make it safer to use
  5314. */
  5315. /** NOTE: This library is customized for Onsen UI. */
  5316. var MicroEvent = function MicroEvent() {};
  5317. MicroEvent.prototype = {
  5318. on: function on(event, fct) {
  5319. this._events = this._events || {};
  5320. this._events[event] = this._events[event] || [];
  5321. this._events[event].push(fct);
  5322. },
  5323. once: function once(event, fct) {
  5324. var self = this;
  5325. var wrapper = function wrapper() {
  5326. self.off(event, wrapper);
  5327. return fct.apply(null, arguments);
  5328. };
  5329. this.on(event, wrapper);
  5330. },
  5331. off: function off(event, fct) {
  5332. this._events = this._events || {};
  5333. if (event in this._events === false) {
  5334. return;
  5335. }
  5336. this._events[event] = this._events[event].filter(function (_fct) {
  5337. if (fct) {
  5338. return fct !== _fct;
  5339. } else {
  5340. return false;
  5341. }
  5342. });
  5343. },
  5344. emit: function emit(event /* , args... */) {
  5345. this._events = this._events || {};
  5346. if (event in this._events === false) {
  5347. return;
  5348. }
  5349. for (var i = 0; i < this._events[event].length; i++) {
  5350. this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
  5351. }
  5352. }
  5353. };
  5354. /**
  5355. * mixin will delegate all MicroEvent.js function in the destination object
  5356. *
  5357. * - require('MicroEvent').mixin(Foobar) will make Foobar able to use MicroEvent
  5358. *
  5359. * @param {Object} the object which will support MicroEvent
  5360. */
  5361. MicroEvent.mixin = function (destObject) {
  5362. var props = ['on', 'once', 'off', 'emit'];
  5363. for (var i = 0; i < props.length; i++) {
  5364. if (typeof destObject === 'function') {
  5365. destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
  5366. } else {
  5367. destObject[props[i]] = MicroEvent.prototype[props[i]];
  5368. }
  5369. }
  5370. };
  5371. window.MicroEvent = MicroEvent;
  5372. /*
  5373. Copyright 2013-2015 ASIAL CORPORATION
  5374. Licensed under the Apache License, Version 2.0 (the "License");
  5375. you may not use this file except in compliance with the License.
  5376. You may obtain a copy of the License at
  5377. http://www.apache.org/licenses/LICENSE-2.0
  5378. Unless required by applicable law or agreed to in writing, software
  5379. distributed under the License is distributed on an "AS IS" BASIS,
  5380. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5381. See the License for the specific language governing permissions and
  5382. limitations under the License.
  5383. */
  5384. var create = function create() {
  5385. /**
  5386. * @object ons.orientation
  5387. * @category util
  5388. * @description
  5389. * [en]Utility methods for orientation detection.[/en]
  5390. * [ja]画面のオリエンテーション検知のためのユーティリティメソッドを収めているオブジェクトです。[/ja]
  5391. */
  5392. var obj = {
  5393. /**
  5394. * @event change
  5395. * @description
  5396. * [en]Fired when the device orientation changes.[/en]
  5397. * [ja]デバイスのオリエンテーションが変化した際に発火します。[/ja]
  5398. * @param {Object} event
  5399. * [en]Event object.[/en]
  5400. * [ja]イベントオブジェクトです。[/ja]
  5401. * @param {Boolean} event.isPortrait
  5402. * [en]Will be true if the current orientation is portrait mode.[/en]
  5403. * [ja]現在のオリエンテーションがportraitの場合にtrueを返します。[/ja]
  5404. */
  5405. /**
  5406. * @method on
  5407. * @signature on(eventName, listener)
  5408. * @description
  5409. * [en]Add an event listener.[/en]
  5410. * [ja]イベントリスナーを追加します。[/ja]
  5411. * @param {String} eventName
  5412. * [en]Name of the event.[/en]
  5413. * [ja]イベント名を指定します。[/ja]
  5414. * @param {Function} listener
  5415. * [en]Function to execute when the event is triggered.[/en]
  5416. * [ja]このイベントが発火された際に呼び出される関数オブジェクトを指定します。[/ja]
  5417. */
  5418. /**
  5419. * @method once
  5420. * @signature once(eventName, listener)
  5421. * @description
  5422. * [en]Add an event listener that's only triggered once.[/en]
  5423. * [ja]一度だけ呼び出されるイベントリスナーを追加します。[/ja]
  5424. * @param {String} eventName
  5425. * [en]Name of the event.[/en]
  5426. * [ja]イベント名を指定します。[/ja]
  5427. * @param {Function} listener
  5428. * [en]Function to execute when the event is triggered.[/en]
  5429. * [ja]イベントが発火した際に呼び出される関数オブジェクトを指定します。[/ja]
  5430. */
  5431. /**
  5432. * @method off
  5433. * @signature off(eventName, [listener])
  5434. * @description
  5435. * [en]Remove an event listener. If the listener is not specified all listeners for the event type will be removed.[/en]
  5436. * [ja]イベントリスナーを削除します。もしイベントリスナーを指定しなかった場合には、そのイベントに紐づく全てのイベントリスナーが削除されます。[/ja]
  5437. * @param {String} eventName
  5438. * [en]Name of the event.[/en]
  5439. * [ja]イベント名を指定します。[/ja]
  5440. * @param {Function} listener
  5441. * [en]Function to execute when the event is triggered.[/en]
  5442. * [ja]削除するイベントリスナーを指定します。[/ja]
  5443. */
  5444. // actual implementation to detect if whether current screen is portrait or not
  5445. _isPortrait: false,
  5446. /**
  5447. * @method isPortrait
  5448. * @signature isPortrait()
  5449. * @return {Boolean}
  5450. * [en]Will be true if the current orientation is portrait mode.[/en]
  5451. * [ja]オリエンテーションがportraitモードの場合にtrueになります。[/ja]
  5452. * @description
  5453. * [en]Returns whether the current screen orientation is portrait or not.[/en]
  5454. * [ja]オリエンテーションがportraitモードかどうかを返します。[/ja]
  5455. */
  5456. isPortrait: function isPortrait() {
  5457. return this._isPortrait();
  5458. },
  5459. /**
  5460. * @method isLandscape
  5461. * @signature isLandscape()
  5462. * @return {Boolean}
  5463. * [en]Will be true if the current orientation is landscape mode.[/en]
  5464. * [ja]オリエンテーションがlandscapeモードの場合にtrueになります。[/ja]
  5465. * @description
  5466. * [en]Returns whether the current screen orientation is landscape or not.[/en]
  5467. * [ja]オリエンテーションがlandscapeモードかどうかを返します。[/ja]
  5468. */
  5469. isLandscape: function isLandscape() {
  5470. return !this.isPortrait();
  5471. },
  5472. _init: function _init() {
  5473. document.addEventListener('DOMContentLoaded', this._onDOMContentLoaded.bind(this), false);
  5474. if ('orientation' in window) {
  5475. window.addEventListener('orientationchange', this._onOrientationChange.bind(this), false);
  5476. } else {
  5477. window.addEventListener('resize', this._onResize.bind(this), false);
  5478. }
  5479. this._isPortrait = function () {
  5480. return window.innerHeight > window.innerWidth;
  5481. };
  5482. return this;
  5483. },
  5484. _onDOMContentLoaded: function _onDOMContentLoaded() {
  5485. this._installIsPortraitImplementation();
  5486. this.emit('change', { isPortrait: this.isPortrait() });
  5487. },
  5488. _installIsPortraitImplementation: function _installIsPortraitImplementation() {
  5489. var isPortrait = window.innerWidth < window.innerHeight;
  5490. if (!('orientation' in window)) {
  5491. this._isPortrait = function () {
  5492. return window.innerHeight > window.innerWidth;
  5493. };
  5494. } else if (window.orientation % 180 === 0) {
  5495. this._isPortrait = function () {
  5496. return Math.abs(window.orientation % 180) === 0 ? isPortrait : !isPortrait;
  5497. };
  5498. } else {
  5499. this._isPortrait = function () {
  5500. return Math.abs(window.orientation % 180) === 90 ? isPortrait : !isPortrait;
  5501. };
  5502. }
  5503. },
  5504. _onOrientationChange: function _onOrientationChange() {
  5505. var _this = this;
  5506. var isPortrait = this._isPortrait();
  5507. // Wait for the dimensions to change because
  5508. // of Android inconsistency.
  5509. var nIter = 0;
  5510. var interval = setInterval(function () {
  5511. nIter++;
  5512. var w = window.innerWidth;
  5513. var h = window.innerHeight;
  5514. if (isPortrait && w <= h || !isPortrait && w >= h) {
  5515. _this.emit('change', { isPortrait: isPortrait });
  5516. clearInterval(interval);
  5517. } else if (nIter === 50) {
  5518. _this.emit('change', { isPortrait: isPortrait });
  5519. clearInterval(interval);
  5520. }
  5521. }, 20);
  5522. },
  5523. // Run on not mobile browser.
  5524. _onResize: function _onResize() {
  5525. this.emit('change', { isPortrait: this.isPortrait() });
  5526. }
  5527. };
  5528. MicroEvent.mixin(obj);
  5529. return obj;
  5530. };
  5531. var orientation = create()._init();
  5532. /*
  5533. Copyright 2013-2015 ASIAL CORPORATION
  5534. Licensed under the Apache License, Version 2.0 (the "License");
  5535. you may not use this file except in compliance with the License.
  5536. You may obtain a copy of the License at
  5537. http://www.apache.org/licenses/LICENSE-2.0
  5538. Unless required by applicable law or agreed to in writing, software
  5539. distributed under the License is distributed on an "AS IS" BASIS,
  5540. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5541. See the License for the specific language governing permissions and
  5542. limitations under the License.
  5543. */
  5544. /**
  5545. * @object ons.modifier
  5546. * @category visual
  5547. * @description
  5548. * [en]
  5549. * Utility methods to change modifier attributes of Onsen UI elements..
  5550. * [/en]
  5551. * [ja][/ja]
  5552. * @example
  5553. * ons.modifier.add(myOnsInputElement, 'underbar');
  5554. * ons.modifier.toggle(myOnsToastElement, 'custom-modifier');
  5555. *
  5556. */
  5557. var modifier = {
  5558. /**
  5559. * @method add
  5560. * @signature add(element, modifier [, modifier])
  5561. * @description
  5562. * [en]Add the specified modifiers to the element if they are not already included.[/en]
  5563. * [ja][/ja]
  5564. * @param {HTMLElement} element
  5565. * [en]Target element.[/en]
  5566. * [ja][/ja]
  5567. * @param {String} modifier
  5568. * [en]Name of the modifier.[/en]
  5569. * [ja][/ja]
  5570. */
  5571. add: function add(element) {
  5572. for (var _len = arguments.length, modifiers = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  5573. modifiers[_key - 1] = arguments[_key];
  5574. }
  5575. return modifiers.forEach(function (modifier) {
  5576. return util$1.addModifier(element, modifier);
  5577. });
  5578. },
  5579. /**
  5580. * @method remove
  5581. * @signature remove(element, modifier [, modifier])
  5582. * @description
  5583. * [en]Remove the specified modifiers from the element if they are included.[/en]
  5584. * [ja][/ja]
  5585. * @param {HTMLElement} element
  5586. * [en]Target element.[/en]
  5587. * [ja][/ja]
  5588. * @param {String} modifier
  5589. * [en]Name of the modifier.[/en]
  5590. * [ja][/ja]
  5591. */
  5592. remove: function remove(element) {
  5593. for (var _len2 = arguments.length, modifiers = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  5594. modifiers[_key2 - 1] = arguments[_key2];
  5595. }
  5596. return modifiers.forEach(function (modifier) {
  5597. return util$1.removeModifier(element, modifier);
  5598. });
  5599. },
  5600. /**
  5601. * @method contains
  5602. * @signature contains(element, modifier)
  5603. * @description
  5604. * [en]Check whether the specified modifier is included in the element.[/en]
  5605. * [ja][/ja]
  5606. * @param {HTMLElement} element
  5607. * [en]Target element.[/en]
  5608. * [ja][/ja]
  5609. * @param {String} modifier
  5610. * [en]Name of the modifier.[/en]
  5611. * [ja][/ja]
  5612. * @return {Boolean}
  5613. * [en]`true` when the specified modifier is found in the element's `modifier` attribute. `false` otherwise.[/en]
  5614. * [ja][/ja]
  5615. */
  5616. contains: util$1.hasModifier,
  5617. /**
  5618. * @method toggle
  5619. * @signature toggle(element, modifier [, force])
  5620. * @description
  5621. * [en]Toggle the specified modifier.[/en]
  5622. * [ja][/ja]
  5623. * @param {HTMLElement} element
  5624. * [en]Target element.[/en]
  5625. * [ja][/ja]
  5626. * @param {String} modifier
  5627. * [en]Name of the modifier.[/en]
  5628. * [ja][/ja]
  5629. * @param {String} force
  5630. * [en]If it evaluates to true, add specified modifier value, and if it evaluates to false, remove it.[/en]
  5631. * [ja][/ja]
  5632. */
  5633. toggle: util$1.toggleModifier
  5634. };
  5635. /*
  5636. Copyright 2013-2015 ASIAL CORPORATION
  5637. Licensed under the Apache License, Version 2.0 (the "License");
  5638. you may not use this file except in compliance with the License.
  5639. You may obtain a copy of the License at
  5640. http://www.apache.org/licenses/LICENSE-2.0
  5641. Unless required by applicable law or agreed to in writing, software
  5642. distributed under the License is distributed on an "AS IS" BASIS,
  5643. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5644. See the License for the specific language governing permissions and
  5645. limitations under the License.
  5646. */
  5647. var softwareKeyboard = new MicroEvent();
  5648. softwareKeyboard._visible = false;
  5649. var onShow = function onShow() {
  5650. softwareKeyboard._visible = true;
  5651. softwareKeyboard.emit('show');
  5652. };
  5653. var onHide = function onHide() {
  5654. softwareKeyboard._visible = false;
  5655. softwareKeyboard.emit('hide');
  5656. };
  5657. var bindEvents = function bindEvents() {
  5658. if (typeof Keyboard !== 'undefined') {
  5659. // https://github.com/martinmose/cordova-keyboard/blob/95f3da3a38d8f8e1fa41fbf40145352c13535a00/README.md
  5660. Keyboard.onshow = onShow;
  5661. Keyboard.onhide = onHide;
  5662. softwareKeyboard.emit('init', { visible: Keyboard.isVisible });
  5663. return true;
  5664. } else if (typeof cordova.plugins !== 'undefined' && typeof cordova.plugins.Keyboard !== 'undefined') {
  5665. // https://github.com/driftyco/ionic-plugins-keyboard/blob/ca27ecf/README.md
  5666. window.addEventListener('native.keyboardshow', onShow);
  5667. window.addEventListener('native.keyboardhide', onHide);
  5668. softwareKeyboard.emit('init', { visible: cordova.plugins.Keyboard.isVisible });
  5669. return true;
  5670. }
  5671. return false;
  5672. };
  5673. var noPluginError = function noPluginError() {
  5674. util$1.warn('ons-keyboard: Cordova Keyboard plugin is not present.');
  5675. };
  5676. document.addEventListener('deviceready', function () {
  5677. if (!bindEvents()) {
  5678. if (document.querySelector('[ons-keyboard-active]') || document.querySelector('[ons-keyboard-inactive]')) {
  5679. noPluginError();
  5680. }
  5681. softwareKeyboard.on = noPluginError;
  5682. }
  5683. });
  5684. /*
  5685. Copyright 2013-2015 ASIAL CORPORATION
  5686. Licensed under the Apache License, Version 2.0 (the "License");
  5687. you may not use this file except in compliance with the License.
  5688. You may obtain a copy of the License at
  5689. http://www.apache.org/licenses/LICENSE-2.0
  5690. Unless required by applicable law or agreed to in writing, software
  5691. distributed under the License is distributed on an "AS IS" BASIS,
  5692. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5693. See the License for the specific language governing permissions and
  5694. limitations under the License.
  5695. */
  5696. var generateId = function () {
  5697. var i = 0;
  5698. return function () {
  5699. return i++;
  5700. };
  5701. }();
  5702. /**
  5703. * Door locking system.
  5704. *
  5705. * @param {Object} [options]
  5706. * @param {Function} [options.log]
  5707. */
  5708. var DoorLock = function () {
  5709. function DoorLock() {
  5710. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  5711. classCallCheck(this, DoorLock);
  5712. this._lockList = [];
  5713. this._waitList = [];
  5714. this._log = options.log || function () {};
  5715. }
  5716. /**
  5717. * Register a lock.
  5718. *
  5719. * @return {Function} Callback for unlocking.
  5720. */
  5721. createClass(DoorLock, [{
  5722. key: 'lock',
  5723. value: function lock() {
  5724. var _this = this;
  5725. var unlock = function unlock() {
  5726. _this._unlock(unlock);
  5727. };
  5728. unlock.id = generateId();
  5729. this._lockList.push(unlock);
  5730. this._log('lock: ' + unlock.id);
  5731. return unlock;
  5732. }
  5733. }, {
  5734. key: '_unlock',
  5735. value: function _unlock(fn) {
  5736. var index = this._lockList.indexOf(fn);
  5737. if (index === -1) {
  5738. throw new Error('This function is not registered in the lock list.');
  5739. }
  5740. this._lockList.splice(index, 1);
  5741. this._log('unlock: ' + fn.id);
  5742. this._tryToFreeWaitList();
  5743. }
  5744. }, {
  5745. key: '_tryToFreeWaitList',
  5746. value: function _tryToFreeWaitList() {
  5747. while (!this.isLocked() && this._waitList.length > 0) {
  5748. this._waitList.shift()();
  5749. }
  5750. }
  5751. /**
  5752. * Register a callback for waiting unlocked door.
  5753. *
  5754. * @params {Function} callback Callback on unlocking the door completely.
  5755. */
  5756. }, {
  5757. key: 'waitUnlock',
  5758. value: function waitUnlock(callback) {
  5759. if (!(callback instanceof Function)) {
  5760. throw new Error('The callback param must be a function.');
  5761. }
  5762. if (this.isLocked()) {
  5763. this._waitList.push(callback);
  5764. } else {
  5765. callback();
  5766. }
  5767. }
  5768. /**
  5769. * @return {Boolean}
  5770. */
  5771. }, {
  5772. key: 'isLocked',
  5773. value: function isLocked() {
  5774. return this._lockList.length > 0;
  5775. }
  5776. }]);
  5777. return DoorLock;
  5778. }();
  5779. /*
  5780. Copyright 2013-2015 ASIAL CORPORATION
  5781. Licensed under the Apache License, Version 2.0 (the "License");
  5782. you may not use this file except in compliance with the License.
  5783. You may obtain a copy of the License at
  5784. http://www.apache.org/licenses/LICENSE-2.0
  5785. Unless required by applicable law or agreed to in writing, software
  5786. distributed under the License is distributed on an "AS IS" BASIS,
  5787. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5788. See the License for the specific language governing permissions and
  5789. limitations under the License.
  5790. */
  5791. // Default implementation for global PageLoader.
  5792. function loadPage(_ref, done) {
  5793. var page = _ref.page,
  5794. parent = _ref.parent,
  5795. _ref$params = _ref.params;
  5796. internal$1.getPageHTMLAsync(page).then(function (html) {
  5797. var pageElement = util$1.createElement(html);
  5798. parent.appendChild(pageElement);
  5799. done(pageElement);
  5800. });
  5801. }
  5802. function unloadPage(element) {
  5803. if (element._destroy instanceof Function) {
  5804. element._destroy();
  5805. } else {
  5806. element.remove();
  5807. }
  5808. }
  5809. var PageLoader = function () {
  5810. /**
  5811. * @param {Function} [fn] Returns an object that has "element" property and "unload" function.
  5812. */
  5813. function PageLoader(loader, unloader) {
  5814. classCallCheck(this, PageLoader);
  5815. this._loader = loader instanceof Function ? loader : loadPage;
  5816. this._unloader = unloader instanceof Function ? unloader : unloadPage;
  5817. }
  5818. /**
  5819. * Set internal loader implementation.
  5820. */
  5821. createClass(PageLoader, [{
  5822. key: 'load',
  5823. /**
  5824. * @param {any} options.page
  5825. * @param {Element} options.parent A location to load page.
  5826. * @param {Object} [options.params] Extra parameters for ons-page.
  5827. * @param {Function} done Take an object that has "element" property and "unload" function.
  5828. */
  5829. value: function load(_ref2, done) {
  5830. var page = _ref2.page,
  5831. parent = _ref2.parent,
  5832. _ref2$params = _ref2.params,
  5833. params = _ref2$params === undefined ? {} : _ref2$params;
  5834. this._loader({ page: page, parent: parent, params: params }, function (pageElement) {
  5835. if (!(pageElement instanceof Element)) {
  5836. throw Error('pageElement must be an instance of Element.');
  5837. }
  5838. done(pageElement);
  5839. });
  5840. }
  5841. }, {
  5842. key: 'unload',
  5843. value: function unload(pageElement) {
  5844. if (!(pageElement instanceof Element)) {
  5845. throw Error('pageElement must be an instance of Element.');
  5846. }
  5847. this._unloader(pageElement);
  5848. }
  5849. }, {
  5850. key: 'internalLoader',
  5851. set: function set$$1(fn) {
  5852. if (!(fn instanceof Function)) {
  5853. throw Error('First parameter must be an instance of Function');
  5854. }
  5855. this._loader = fn;
  5856. },
  5857. get: function get$$1() {
  5858. return this._loader;
  5859. }
  5860. }]);
  5861. return PageLoader;
  5862. }();
  5863. var defaultPageLoader = new PageLoader();
  5864. var instantPageLoader = new PageLoader(function (_ref3, done) {
  5865. var page = _ref3.page,
  5866. parent = _ref3.parent,
  5867. _ref3$params = _ref3.params;
  5868. var element = util$1.createElement(page.trim());
  5869. parent.appendChild(element);
  5870. done(element);
  5871. }, unloadPage);
  5872. /*
  5873. Copyright 2013-2015 ASIAL CORPORATION
  5874. Licensed under the Apache License, Version 2.0 (the "License");
  5875. you may not use this file except in compliance with the License.
  5876. You may obtain a copy of the License at
  5877. http://www.apache.org/licenses/LICENSE-2.0
  5878. Unless required by applicable law or agreed to in writing, software
  5879. distributed under the License is distributed on an "AS IS" BASIS,
  5880. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  5881. See the License for the specific language governing permissions and
  5882. limitations under the License.
  5883. */
  5884. /**
  5885. * @object ons
  5886. * @category util
  5887. * @description
  5888. * [ja]Onsen UIで利用できるグローバルなオブジェクトです。[/ja]
  5889. * [en]A global object that's used in Onsen UI. [/en]
  5890. */
  5891. var ons$1 = {
  5892. animit: Animit,
  5893. defaultPageLoader: defaultPageLoader,
  5894. elements: onsElements,
  5895. GestureDetector: GestureDetector,
  5896. modifier: modifier,
  5897. notification: notification,
  5898. orientation: orientation,
  5899. pageAttributeExpression: pageAttributeExpression,
  5900. PageLoader: PageLoader,
  5901. platform: platform,
  5902. softwareKeyboard: softwareKeyboard,
  5903. _autoStyle: autoStyle,
  5904. _internal: internal$1,
  5905. _readyLock: new DoorLock(),
  5906. _util: util$1
  5907. };
  5908. ons$1.platform.select((window.location.search.match(/platform=([\w-]+)/) || [])[1]);
  5909. waitDeviceReady();
  5910. var readyError = function readyError(after) {
  5911. return util$1.throw('This method must be called ' + (after ? 'after' : 'before') + ' ons.isReady() is true');
  5912. };
  5913. /**
  5914. * @method isReady
  5915. * @signature isReady()
  5916. * @return {Boolean}
  5917. * [en]Will be true if Onsen UI is initialized.[/en]
  5918. * [ja]初期化されているかどうかを返します。[/ja]
  5919. * @description
  5920. * [en]Returns true if Onsen UI is initialized.[/en]
  5921. * [ja]Onsen UIがすでに初期化されているかどうかを返すメソッドです。[/ja]
  5922. */
  5923. ons$1.isReady = function () {
  5924. return !ons$1._readyLock.isLocked();
  5925. };
  5926. /**
  5927. * @method isWebView
  5928. * @signature isWebView()
  5929. * @return {Boolean}
  5930. * [en]Will be true if the app is running in Cordova.[/en]
  5931. * [ja]Cordovaで実行されている場合にtrueになります。[/ja]
  5932. * @description
  5933. * [en]Returns true if running inside Cordova.[/en]
  5934. * [ja]Cordovaで実行されているかどうかを返すメソッドです。[/ja]
  5935. */
  5936. ons$1.isWebView = ons$1.platform.isWebView;
  5937. /**
  5938. * @method ready
  5939. * @signature ready(callback)
  5940. * @description
  5941. * [ja]アプリの初期化に利用するメソッドです。渡された関数は、Onsen UIの初期化が終了している時点で必ず呼ばれます。[/ja]
  5942. * [en]Method used to wait for app initialization. Waits for `DOMContentLoaded` and `deviceready`, when necessary, before executing the callback.[/en]
  5943. * @param {Function} callback
  5944. * [en]Function that executes after Onsen UI has been initialized.[/en]
  5945. * [ja]Onsen UIが初期化が完了した後に呼び出される関数オブジェクトを指定します。[/ja]
  5946. */
  5947. ons$1.ready = function (callback) {
  5948. if (ons$1.isReady()) {
  5949. callback();
  5950. } else {
  5951. ons$1._readyLock.waitUnlock(callback);
  5952. }
  5953. };
  5954. /**
  5955. * @method setDefaultDeviceBackButtonListener
  5956. * @signature setDefaultDeviceBackButtonListener(listener)
  5957. * @param {Function} listener
  5958. * [en]Function that executes when device back button is pressed. Must be called on `ons.ready`.[/en]
  5959. * [ja]デバイスのバックボタンが押された時に実行される関数オブジェクトを指定します。[/ja]
  5960. * @description
  5961. * [en]Set default handler for device back button.[/en]
  5962. * [ja]デバイスのバックボタンのためのデフォルトのハンドラを設定します。[/ja]
  5963. */
  5964. ons$1.setDefaultDeviceBackButtonListener = function (listener) {
  5965. if (!ons$1.isReady()) {
  5966. readyError(true);
  5967. }
  5968. ons$1._defaultDeviceBackButtonHandler.setListener(listener);
  5969. };
  5970. /**
  5971. * @method disableDeviceBackButtonHandler
  5972. * @signature disableDeviceBackButtonHandler()
  5973. * @description
  5974. * [en]Disable device back button event handler. Must be called on `ons.ready`.[/en]
  5975. * [ja]デバイスのバックボタンのイベントを受け付けないようにします。[/ja]
  5976. */
  5977. ons$1.disableDeviceBackButtonHandler = function () {
  5978. if (!ons$1.isReady()) {
  5979. readyError(true);
  5980. }
  5981. internal$1.dbbDispatcher.disable();
  5982. };
  5983. /**
  5984. * @method enableDeviceBackButtonHandler
  5985. * @signature enableDeviceBackButtonHandler()
  5986. * @description
  5987. * [en]Enable device back button event handler. Must be called on `ons.ready`.[/en]
  5988. * [ja]デバイスのバックボタンのイベントを受け付けるようにします。[/ja]
  5989. */
  5990. ons$1.enableDeviceBackButtonHandler = function () {
  5991. if (!ons$1.isReady()) {
  5992. readyError(true);
  5993. }
  5994. internal$1.dbbDispatcher.enable();
  5995. };
  5996. ons$1.fireDeviceBackButtonEvent = function () {
  5997. internal$1.dbbDispatcher.fireDeviceBackButtonEvent();
  5998. };
  5999. /**
  6000. * @method enableAutoStatusBarFill
  6001. * @signature enableAutoStatusBarFill()
  6002. * @description
  6003. * [en]Enable status bar fill feature on iOS7 and above (except for iPhone X). Must be called before `ons.ready`.[/en]
  6004. * [ja]iOS7以上(iPhone Xは除く)で、ステータスバー部分の高さを自動的に埋める処理を有効にします。[/ja]
  6005. */
  6006. ons$1.enableAutoStatusBarFill = function () {
  6007. if (ons$1.isReady()) {
  6008. readyError(false);
  6009. }
  6010. internal$1.config.autoStatusBarFill = true;
  6011. };
  6012. /**
  6013. * @method disableAutoStatusBarFill
  6014. * @signature disableAutoStatusBarFill()
  6015. * @description
  6016. * [en]Disable status bar fill feature on iOS7 and above (except for iPhone X). Must be called before `ons.ready`.[/en]
  6017. * [ja]iOS7以上(iPhone Xは除く)で、ステータスバー部分の高さを自動的に埋める処理を無効にします。[/ja]
  6018. */
  6019. ons$1.disableAutoStatusBarFill = function () {
  6020. if (ons$1.isReady()) {
  6021. readyError(false);
  6022. }
  6023. internal$1.config.autoStatusBarFill = false;
  6024. };
  6025. /**
  6026. * @method mockStatusBar
  6027. * @signature mockStatusBar()
  6028. * @description
  6029. * [en]Creates a static element similar to iOS status bar. Only useful for browser testing. Must be called before `ons.ready`.[/en]
  6030. * [ja][/ja]
  6031. */
  6032. ons$1.mockStatusBar = function () {
  6033. if (ons$1.isReady()) {
  6034. readyError(false);
  6035. }
  6036. var mock = function mock() {
  6037. if (!document.body.children[0] || !document.body.children[0].classList.contains('ons-status-bar-mock')) {
  6038. var android = platform.isAndroid(),
  6039. i = function i(_i) {
  6040. return '<i class="' + _i.split('-')[0] + ' ' + _i + '"></i>';
  6041. };
  6042. var left = android ? i('zmdi-twitter') + ' ' + i('zmdi-google-play') : 'No SIM ' + i('fa-wifi'),
  6043. center = android ? '' : '12:28 PM',
  6044. right = android ? i('zmdi-network') + ' ' + i('zmdi-wifi') + ' ' + i('zmdi-battery') + ' 12:28 PM' : '80% ' + i('fa-battery-three-quarters');
  6045. document.body.insertBefore(util$1.createElement('<div class="ons-status-bar-mock ' + (android ? 'android' : 'ios') + '">' + ('<div>' + left + '</div><div>' + center + '</div><div>' + right + '</div>') + '</div>'), document.body.firstChild);
  6046. }
  6047. };
  6048. document.body ? mock() : internal$1.waitDOMContentLoaded(mock);
  6049. };
  6050. /**
  6051. * @method disableAnimations
  6052. * @signature disableAnimations()
  6053. * @description
  6054. * [en]Disable all animations. Could be handy for testing and older devices.[/en]
  6055. * [ja]アニメーションを全て無効にします。テストの際に便利です。[/ja]
  6056. */
  6057. ons$1.disableAnimations = function () {
  6058. internal$1.config.animationsDisabled = true;
  6059. };
  6060. /**
  6061. * @method enableAnimations
  6062. * @signature enableAnimations()
  6063. * @description
  6064. * [en]Enable animations (default).[/en]
  6065. * [ja]アニメーションを有効にします。[/ja]
  6066. */
  6067. ons$1.enableAnimations = function () {
  6068. internal$1.config.animationsDisabled = false;
  6069. };
  6070. ons$1._disableWarnings = function () {
  6071. internal$1.config.warningsDisabled = true;
  6072. };
  6073. ons$1._enableWarnings = function () {
  6074. internal$1.config.warningsDisabled = false;
  6075. };
  6076. /**
  6077. * @method disableAutoStyling
  6078. * @signature disableAutoStyling()
  6079. * @description
  6080. * [en]Disable automatic styling.[/en]
  6081. * [ja][/ja]
  6082. */
  6083. ons$1.disableAutoStyling = autoStyle.disable;
  6084. /**
  6085. * @method enableAutoStyling
  6086. * @signature enableAutoStyling()
  6087. * @description
  6088. * [en]Enable automatic styling based on OS (default).[/en]
  6089. * [ja][/ja]
  6090. */
  6091. ons$1.enableAutoStyling = autoStyle.enable;
  6092. /**
  6093. * @method disableIconAutoPrefix
  6094. * @signature disableIconAutoPrefix()
  6095. * @description
  6096. * [en]Disable adding `fa-` prefix automatically to `ons-icon` classes. Useful when including custom icon packs.[/en]
  6097. * [ja][/ja]
  6098. */
  6099. ons$1.disableIconAutoPrefix = function () {
  6100. util$1.checkMissingImport('Icon');
  6101. onsElements.Icon.setAutoPrefix(false);
  6102. };
  6103. /**
  6104. * @method forceUIWebViewScrollFix
  6105. * @signature forceUIWebViewScrollFix()
  6106. * @param {Boolean} force Enable or disable the fix.
  6107. * @description
  6108. * [en]Applies a fix for iOS UIWebView which prevents scroll events jumping to pages under the top layer. This may visually affect normal scrolling of UIWebView if you open a dialog/menu before the scroll momentum finished. Disabled by default.[/en]
  6109. * [ja][/ja]
  6110. */
  6111. ons$1.forceUIWebViewScrollFix = function () {
  6112. var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  6113. internal$1.config.forceUIWebViewScrollFix = force;
  6114. };
  6115. /**
  6116. * @method forcePlatformStyling
  6117. * @signature forcePlatformStyling(platform)
  6118. * @description
  6119. * [en]Refresh styling for the given platform. Only useful for demos. Use `ons.platform.select(...)` instead for development and production.[/en]
  6120. * [ja][/ja]
  6121. * @param {string} platform New platform to style the elements.
  6122. */
  6123. ons$1.forcePlatformStyling = function (newPlatform) {
  6124. ons$1.enableAutoStyling();
  6125. ons$1.platform.select(newPlatform || 'ios');
  6126. ons$1._util.arrayFrom(document.querySelectorAll('*')).forEach(function (element) {
  6127. if (element.tagName.toLowerCase() === 'ons-if') {
  6128. element._platformUpdate();
  6129. } else if (element.tagName.match(/^ons-/i)) {
  6130. autoStyle.prepare(element, true);
  6131. if (element.tagName.toLowerCase() === 'ons-tabbar') {
  6132. element._updatePosition();
  6133. }
  6134. }
  6135. });
  6136. };
  6137. /**
  6138. * @method preload
  6139. * @signature preload(templatePaths)
  6140. * @param {String|Array} templatePaths
  6141. * [en]Set of HTML file paths containing 'ons-page' elements.[/en]
  6142. * [ja][/ja]
  6143. * @return {Promise}
  6144. * [en]Promise that resolves when all the templates are cached.[/en]
  6145. * [ja][/ja]
  6146. * @description
  6147. * [en]Separated files need to be requested on demand and this can slightly delay pushing new pages. This method requests and caches templates for later use.[/en]
  6148. * [ja][/ja]
  6149. */
  6150. ons$1.preload = function () {
  6151. var templates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  6152. return Promise.all((templates instanceof Array ? templates : [templates]).map(function (template) {
  6153. if (typeof template !== 'string') {
  6154. util$1.throw('Expected string arguments but got ' + (typeof template === 'undefined' ? 'undefined' : _typeof(template)));
  6155. }
  6156. return internal$1.getTemplateHTMLAsync(template);
  6157. }));
  6158. };
  6159. /**
  6160. * @method createElement
  6161. * @signature createElement(template, options)
  6162. * @param {String} template
  6163. * [en]Either an HTML file path, a `<template>` id or an HTML string such as `'<div id="foo">hoge</div>'`.[/en]
  6164. * [ja][/ja]
  6165. * @param {Object} [options]
  6166. * [en]Parameter object.[/en]
  6167. * [ja]オプションを指定するオブジェクト。[/ja]
  6168. * @param {Boolean|HTMLElement} [options.append]
  6169. * [en]Whether or not the element should be automatically appended to the DOM. Defaults to `false`. If `true` value is given, `document.body` will be used as the target.[/en]
  6170. * [ja][/ja]
  6171. * @param {HTMLElement} [options.insertBefore]
  6172. * [en]Reference node that becomes the next sibling of the new node (`options.append` element).[/en]
  6173. * [ja][/ja]
  6174. * @return {HTMLElement|Promise}
  6175. * [en]If the provided template was an inline HTML string, it returns the new element. Otherwise, it returns a promise that resolves to the new element.[/en]
  6176. * [ja][/ja]
  6177. * @description
  6178. * [en]Create a new element from a template. Both inline HTML and external files are supported although the return value differs.[/en]
  6179. * [ja][/ja]
  6180. */
  6181. ons$1.createElement = function (template) {
  6182. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  6183. template = template.trim();
  6184. var create = function create(html) {
  6185. var element = ons$1._util.createElement(html);
  6186. element.remove();
  6187. if (options.append) {
  6188. var target = options.append instanceof HTMLElement ? options.append : document.body;
  6189. target.insertBefore(element, options.insertBefore || null);
  6190. options.link instanceof Function && options.link(element);
  6191. }
  6192. return element;
  6193. };
  6194. return template.charAt(0) === '<' ? create(template) : internal$1.getPageHTMLAsync(template).then(create);
  6195. };
  6196. /**
  6197. * @method createPopover
  6198. * @signature createPopover(page, [options])
  6199. * @param {String} page
  6200. * [en]Page name. Can be either an HTML file or a <template> containing a <ons-dialog> component.[/en]
  6201. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6202. * @param {Object} [options]
  6203. * [en]Parameter object.[/en]
  6204. * [ja]オプションを指定するオブジェクト。[/ja]
  6205. * @param {Object} [options.parentScope]
  6206. * [en]Parent scope of the dialog. Used to bind models and access scope methods from the dialog.[/en]
  6207. * [ja]ダイアログ内で利用する親スコープを指定します。ダイアログからモデルやスコープのメソッドにアクセスするのに使います。このパラメータはAngularJSバインディングでのみ利用できます。[/ja]
  6208. * @return {Promise}
  6209. * [en]Promise object that resolves to the popover component object.[/en]
  6210. * [ja]ポップオーバーのコンポーネントオブジェクトを解決するPromiseオブジェクトを返します。[/ja]
  6211. * @description
  6212. * [en]Create a popover instance from a template.[/en]
  6213. * [ja]テンプレートからポップオーバーのインスタンスを生成します。[/ja]
  6214. */
  6215. /**
  6216. * @method createDialog
  6217. * @signature createDialog(page, [options])
  6218. * @param {String} page
  6219. * [en]Page name. Can be either an HTML file or an `<template>` containing a <ons-dialog> component.[/en]
  6220. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6221. * @param {Object} [options]
  6222. * [en]Parameter object.[/en]
  6223. * [ja]オプションを指定するオブジェクト。[/ja]
  6224. * @return {Promise}
  6225. * [en]Promise object that resolves to the dialog component object.[/en]
  6226. * [ja]ダイアログのコンポーネントオブジェクトを解決するPromiseオブジェクトを返します。[/ja]
  6227. * @description
  6228. * [en]Create a dialog instance from a template.[/en]
  6229. * [ja]テンプレートからダイアログのインスタンスを生成します。[/ja]
  6230. */
  6231. /**
  6232. * @method createAlertDialog
  6233. * @signature createAlertDialog(page, [options])
  6234. * @param {String} page
  6235. * [en]Page name. Can be either an HTML file or an `<template>` containing a <ons-alert-dialog> component.[/en]
  6236. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6237. * @param {Object} [options]
  6238. * [en]Parameter object.[/en]
  6239. * [ja]オプションを指定するオブジェクト。[/ja]
  6240. * @return {Promise}
  6241. * [en]Promise object that resolves to the alert dialog component object.[/en]
  6242. * [ja]ダイアログのコンポーネントオブジェクトを解決するPromiseオブジェクトを返します。[/ja]
  6243. * @description
  6244. * [en]Create a alert dialog instance from a template.[/en]
  6245. * [ja]テンプレートからアラートダイアログのインスタンスを生成します。[/ja]
  6246. */
  6247. ons$1.createPopover = ons$1.createDialog = ons$1.createAlertDialog = function (template) {
  6248. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  6249. return ons$1.createElement(template, _extends({ append: true }, options));
  6250. };
  6251. /**
  6252. * @method openActionSheet
  6253. * @signature openActionSheet(options)
  6254. * @description
  6255. * [en]Shows an instant Action Sheet and lets the user choose an action.[/en]
  6256. * [ja][/ja]
  6257. * @param {Object} [options]
  6258. * [en]Parameter object.[/en]
  6259. * [ja]オプションを指定するオブジェクト。[/ja]
  6260. * @param {Array} [options.buttons]
  6261. * [en]Represent each button of the action sheet following the specified order. Every item can be either a string label or an object containing `label`, `icon` and `modifier` properties.[/en]
  6262. * [ja][/ja]
  6263. * @param {String} [options.title]
  6264. * [en]Optional title for the action sheet.[/en]
  6265. * [ja][/ja]
  6266. * @param {Number} [options.destructive]
  6267. * [en]Optional index of the "destructive" button (only for iOS). It can be specified in the button array as well.[/en]
  6268. * [ja][/ja]
  6269. * @param {Boolean} [options.cancelable]
  6270. * [en]Whether the action sheet can be canceled by tapping on the background mask or not.[/en]
  6271. * [ja][/ja]
  6272. * @param {String} [options.modifier]
  6273. * [en]Modifier attribute of the action sheet. E.g. `'destructive'`.[/en]
  6274. * [ja][/ja]
  6275. * @param {String} [options.maskColor]
  6276. * [en]Optionally change the background mask color.[/en]
  6277. * [ja][/ja]
  6278. * @param {String} [options.id]
  6279. * [en]The element's id attribute.[/en]
  6280. * [ja][/ja]
  6281. * @param {String} [options.class]
  6282. * [en]The element's class attribute.[/en]
  6283. * [ja][/ja]
  6284. * @return {Promise}
  6285. * [en]Will resolve when the action sheet is closed. The resolve value is either the index of the tapped button or -1 when canceled.[/en]
  6286. * [ja][/ja]
  6287. */
  6288. ons$1.openActionSheet = actionSheet;
  6289. /**
  6290. * @method resolveLoadingPlaceholder
  6291. * @signature resolveLoadingPlaceholder(page)
  6292. * @param {String} page
  6293. * [en]Page name. Can be either an HTML file or a `<template>` id.[/en]
  6294. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  6295. * @description
  6296. * [en]If no page is defined for the `ons-loading-placeholder` attribute it will wait for this method being called before loading the page.[/en]
  6297. * [ja]ons-loading-placeholderの属性値としてページが指定されていない場合は、ページロード前に呼ばれるons.resolveLoadingPlaceholder処理が行われるまで表示されません。[/ja]
  6298. */
  6299. ons$1.resolveLoadingPlaceholder = function (page, link) {
  6300. var elements = ons$1._util.arrayFrom(window.document.querySelectorAll('[ons-loading-placeholder]'));
  6301. if (elements.length === 0) {
  6302. util$1.throw('No ons-loading-placeholder exists');
  6303. }
  6304. elements.filter(function (element) {
  6305. return !element.getAttribute('page');
  6306. }).forEach(function (element) {
  6307. element.setAttribute('ons-loading-placeholder', page);
  6308. ons$1._resolveLoadingPlaceholder(element, page, link);
  6309. });
  6310. };
  6311. ons$1._setupLoadingPlaceHolders = function () {
  6312. ons$1.ready(function () {
  6313. var elements = ons$1._util.arrayFrom(window.document.querySelectorAll('[ons-loading-placeholder]'));
  6314. elements.forEach(function (element) {
  6315. var page = element.getAttribute('ons-loading-placeholder');
  6316. if (typeof page === 'string') {
  6317. ons$1._resolveLoadingPlaceholder(element, page);
  6318. }
  6319. });
  6320. });
  6321. };
  6322. ons$1._resolveLoadingPlaceholder = function (parent, page) {
  6323. var link = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (el, done) {
  6324. return done();
  6325. };
  6326. page && ons$1.createElement(page).then(function (element) {
  6327. element.style.display = 'none';
  6328. parent.appendChild(element);
  6329. link(element, function () {
  6330. while (parent.firstChild && parent.firstChild !== element) {
  6331. parent.removeChild(parent.firstChild);
  6332. }
  6333. element.style.display = '';
  6334. });
  6335. }).catch(function (error) {
  6336. return Promise.reject('Unabled to resolve placeholder: ' + error);
  6337. });
  6338. };
  6339. function waitDeviceReady() {
  6340. var unlockDeviceReady = ons$1._readyLock.lock();
  6341. window.addEventListener('DOMContentLoaded', function () {
  6342. if (ons$1.isWebView()) {
  6343. window.document.addEventListener('deviceready', unlockDeviceReady, false);
  6344. } else {
  6345. unlockDeviceReady();
  6346. }
  6347. }, false);
  6348. }
  6349. /**
  6350. * @method getScriptPage
  6351. * @signature getScriptPage()
  6352. * @description
  6353. * [en]Access the last created page from the current `script` scope. Only works inside `<script></script>` tags that are direct children of `ons-page` element. Use this to add lifecycle hooks to a page.[/en]
  6354. * [ja][/ja]
  6355. * @return {HTMLElement}
  6356. * [en]Returns the corresponding page element.[/en]
  6357. * [ja][/ja]
  6358. */
  6359. var getCS = 'currentScript' in document ? function () {
  6360. return document.currentScript;
  6361. } : function () {
  6362. return document.scripts[document.scripts.length - 1];
  6363. };
  6364. ons$1.getScriptPage = function () {
  6365. return getCS() && /ons-page/i.test(getCS().parentElement.tagName) && getCS().parentElement || null;
  6366. };
  6367. function createCommonjsModule(fn, module) {
  6368. return module = { exports: {} }, fn(module, module.exports), module.exports;
  6369. }
  6370. var fastclick = createCommonjsModule(function (module) {
  6371. (function () {
  6372. function FastClick(layer, options) {
  6373. var oldOnClick;
  6374. options = options || {};
  6375. /**
  6376. * Whether a click is currently being tracked.
  6377. *
  6378. * @type boolean
  6379. */
  6380. this.trackingClick = false;
  6381. /**
  6382. * Timestamp for when click tracking started.
  6383. *
  6384. * @type number
  6385. */
  6386. this.trackingClickStart = 0;
  6387. /**
  6388. * The element being tracked for a click.
  6389. *
  6390. * @type EventTarget
  6391. */
  6392. this.targetElement = null;
  6393. /**
  6394. * X-coordinate of touch start event.
  6395. *
  6396. * @type number
  6397. */
  6398. this.touchStartX = 0;
  6399. /**
  6400. * Y-coordinate of touch start event.
  6401. *
  6402. * @type number
  6403. */
  6404. this.touchStartY = 0;
  6405. /**
  6406. * ID of the last touch, retrieved from Touch.identifier.
  6407. *
  6408. * @type number
  6409. */
  6410. this.lastTouchIdentifier = 0;
  6411. /**
  6412. * Touchmove boundary, beyond which a click will be cancelled.
  6413. *
  6414. * @type number
  6415. */
  6416. this.touchBoundary = options.touchBoundary || 10;
  6417. /**
  6418. * The FastClick layer.
  6419. *
  6420. * @type Element
  6421. */
  6422. this.layer = layer;
  6423. /**
  6424. * The minimum time between tap(touchstart and touchend) events
  6425. *
  6426. * @type number
  6427. */
  6428. this.tapDelay = options.tapDelay || 200;
  6429. /**
  6430. * The maximum time for a tap
  6431. *
  6432. * @type number
  6433. */
  6434. this.tapTimeout = options.tapTimeout || 700;
  6435. if (FastClick.notNeeded(layer)) {
  6436. return;
  6437. }
  6438. // Some old versions of Android don't have Function.prototype.bind
  6439. function bind(method, context) {
  6440. return function () {
  6441. return method.apply(context, arguments);
  6442. };
  6443. }
  6444. var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
  6445. var context = this;
  6446. for (var i = 0, l = methods.length; i < l; i++) {
  6447. context[methods[i]] = bind(context[methods[i]], context);
  6448. }
  6449. // Set up event handlers as required
  6450. if (deviceIsAndroid) {
  6451. layer.addEventListener('mouseover', this.onMouse, true);
  6452. layer.addEventListener('mousedown', this.onMouse, true);
  6453. layer.addEventListener('mouseup', this.onMouse, true);
  6454. }
  6455. layer.addEventListener('click', this.onClick, true);
  6456. layer.addEventListener('touchstart', this.onTouchStart, false);
  6457. layer.addEventListener('touchmove', this.onTouchMove, false);
  6458. layer.addEventListener('touchend', this.onTouchEnd, false);
  6459. layer.addEventListener('touchcancel', this.onTouchCancel, false);
  6460. // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
  6461. // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
  6462. // layer when they are cancelled.
  6463. if (!Event.prototype.stopImmediatePropagation) {
  6464. layer.removeEventListener = function (type, callback, capture) {
  6465. var rmv = Node.prototype.removeEventListener;
  6466. if (type === 'click') {
  6467. rmv.call(layer, type, callback.hijacked || callback, capture);
  6468. } else {
  6469. rmv.call(layer, type, callback, capture);
  6470. }
  6471. };
  6472. layer.addEventListener = function (type, callback, capture) {
  6473. var adv = Node.prototype.addEventListener;
  6474. if (type === 'click') {
  6475. adv.call(layer, type, callback.hijacked || (callback.hijacked = function (event) {
  6476. if (!event.propagationStopped) {
  6477. callback(event);
  6478. }
  6479. }), capture);
  6480. } else {
  6481. adv.call(layer, type, callback, capture);
  6482. }
  6483. };
  6484. }
  6485. // If a handler is already declared in the element's onclick attribute, it will be fired before
  6486. // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
  6487. // adding it as listener.
  6488. if (typeof layer.onclick === 'function') {
  6489. // Android browser on at least 3.2 requires a new reference to the function in layer.onclick
  6490. // - the old one won't work if passed to addEventListener directly.
  6491. oldOnClick = layer.onclick;
  6492. layer.addEventListener('click', function (event) {
  6493. oldOnClick(event);
  6494. }, false);
  6495. layer.onclick = null;
  6496. }
  6497. }
  6498. /**
  6499. * Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
  6500. *
  6501. * @type boolean
  6502. */
  6503. var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
  6504. /**
  6505. * Android requires exceptions.
  6506. *
  6507. * @type boolean
  6508. */
  6509. var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
  6510. /**
  6511. * iOS requires exceptions.
  6512. *
  6513. * @type boolean
  6514. */
  6515. var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
  6516. /**
  6517. * iOS 4 requires an exception for select elements.
  6518. *
  6519. * @type boolean
  6520. */
  6521. var deviceIsIOS4 = deviceIsIOS && /OS 4_\d(_\d)?/.test(navigator.userAgent);
  6522. /**
  6523. * iOS 6.0-7.* requires the target element to be manually derived
  6524. *
  6525. * @type boolean
  6526. */
  6527. var deviceIsIOSWithBadTarget = deviceIsIOS && /OS [6-7]_\d/.test(navigator.userAgent);
  6528. /**
  6529. * BlackBerry requires exceptions.
  6530. *
  6531. * @type boolean
  6532. */
  6533. var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
  6534. /**
  6535. * Valid types for text inputs
  6536. *
  6537. * @type array
  6538. */
  6539. var textFields = ['email', 'number', 'password', 'search', 'tel', 'text', 'url'];
  6540. /**
  6541. * Determine whether a given element requires a native click.
  6542. *
  6543. * @param {EventTarget|Element} target Target DOM element
  6544. * @returns {boolean} Returns true if the element needs a native click
  6545. */
  6546. FastClick.prototype.needsClick = function (target) {
  6547. switch (target.nodeName.toLowerCase()) {
  6548. // Don't send a synthetic click to disabled inputs (issue #62)
  6549. case 'button':
  6550. case 'select':
  6551. case 'textarea':
  6552. if (target.disabled) {
  6553. return true;
  6554. }
  6555. break;
  6556. case 'input':
  6557. // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
  6558. if (deviceIsIOS && target.type === 'file' || target.disabled) {
  6559. return true;
  6560. }
  6561. break;
  6562. case 'label':
  6563. case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
  6564. case 'video':
  6565. return true;
  6566. }
  6567. return (/\bneedsclick\b/.test(target.className)
  6568. );
  6569. };
  6570. /**
  6571. * Determine whether a given element requires a call to focus to simulate click into element.
  6572. *
  6573. * @param {EventTarget|Element} target Target DOM element
  6574. * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
  6575. */
  6576. FastClick.prototype.needsFocus = function (target) {
  6577. switch (target.nodeName.toLowerCase()) {
  6578. case 'textarea':
  6579. return true;
  6580. case 'select':
  6581. return !deviceIsAndroid;
  6582. case 'input':
  6583. switch (target.type) {
  6584. case 'button':
  6585. case 'checkbox':
  6586. case 'file':
  6587. case 'image':
  6588. case 'radio':
  6589. case 'submit':
  6590. return false;
  6591. }
  6592. // No point in attempting to focus disabled inputs
  6593. return !target.disabled && !target.readOnly;
  6594. default:
  6595. return (/\bneedsfocus\b/.test(target.className)
  6596. );
  6597. }
  6598. };
  6599. /**
  6600. * Send a click event to the specified element.
  6601. *
  6602. * @param {EventTarget|Element} targetElement
  6603. * @param {Event} event
  6604. */
  6605. FastClick.prototype.sendClick = function (targetElement, event) {
  6606. var clickEvent, touch;
  6607. // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
  6608. if (document.activeElement && document.activeElement !== targetElement) {
  6609. document.activeElement.blur();
  6610. }
  6611. touch = event.changedTouches[0];
  6612. // Synthesise a click event, with an extra attribute so it can be tracked
  6613. clickEvent = document.createEvent('MouseEvents');
  6614. clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
  6615. clickEvent.forwardedTouchEvent = true;
  6616. targetElement.dispatchEvent(clickEvent);
  6617. };
  6618. FastClick.prototype.determineEventType = function (targetElement) {
  6619. //Issue #159: Android Chrome Select Box does not open with a synthetic click event
  6620. if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
  6621. return 'mousedown';
  6622. }
  6623. return 'click';
  6624. };
  6625. /**
  6626. * @param {EventTarget|Element} targetElement
  6627. */
  6628. FastClick.prototype.focus = function (targetElement) {
  6629. var length;
  6630. // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
  6631. if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month' && targetElement.type !== 'email' && targetElement.type !== 'number') {
  6632. length = targetElement.value.length;
  6633. targetElement.setSelectionRange(length, length);
  6634. } else {
  6635. targetElement.focus();
  6636. }
  6637. };
  6638. /**
  6639. * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
  6640. *
  6641. * @param {EventTarget|Element} targetElement
  6642. */
  6643. FastClick.prototype.updateScrollParent = function (targetElement) {
  6644. var scrollParent, parentElement;
  6645. scrollParent = targetElement.fastClickScrollParent;
  6646. // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
  6647. // target element was moved to another parent.
  6648. if (!scrollParent || !scrollParent.contains(targetElement)) {
  6649. parentElement = targetElement;
  6650. do {
  6651. if (parentElement.scrollHeight > parentElement.offsetHeight) {
  6652. scrollParent = parentElement;
  6653. targetElement.fastClickScrollParent = parentElement;
  6654. break;
  6655. }
  6656. parentElement = parentElement.parentElement;
  6657. } while (parentElement);
  6658. }
  6659. // Always update the scroll top tracker if possible.
  6660. if (scrollParent) {
  6661. scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
  6662. }
  6663. };
  6664. /**
  6665. * @param {EventTarget} targetElement
  6666. * @returns {Element|EventTarget}
  6667. */
  6668. FastClick.prototype.getTargetElementFromEventTarget = function (eventTarget) {
  6669. // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
  6670. if (eventTarget.nodeType === Node.TEXT_NODE) {
  6671. return eventTarget.parentNode;
  6672. }
  6673. return eventTarget;
  6674. };
  6675. /**
  6676. * @param {EventTarget} targetElement
  6677. * @returns {boolean}
  6678. */
  6679. FastClick.prototype.isTextField = function (targetElement) {
  6680. return targetElement.tagName.toLowerCase() === 'textarea' || textFields.indexOf(targetElement.type) !== -1;
  6681. };
  6682. /**
  6683. * On touch start, record the position and scroll offset.
  6684. *
  6685. * @param {Event} event
  6686. * @returns {boolean}
  6687. */
  6688. FastClick.prototype.onTouchStart = function (event) {
  6689. var targetElement, touch;
  6690. // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
  6691. if (event.targetTouches.length > 1) {
  6692. return true;
  6693. }
  6694. targetElement = this.getTargetElementFromEventTarget(event.target);
  6695. touch = event.targetTouches[0];
  6696. // Ignore touches on contenteditable elements to prevent conflict with text selection.
  6697. // (For details: https://github.com/ftlabs/fastclick/pull/211 )
  6698. if (targetElement.isContentEditable) {
  6699. return true;
  6700. }
  6701. if (deviceIsIOS) {
  6702. // Ignore touchstart in focused text field
  6703. // Allows normal text selection and commands (select/paste/cut) when a field has focus, while still allowing fast tap-to-focus.
  6704. // Without this fix, user needs to tap-and-hold a text field for context menu, and double-tap to select text doesn't work at all.
  6705. if (targetElement === document.activeElement && this.isTextField(targetElement)) {
  6706. return true;
  6707. }
  6708. if (!deviceIsIOS4) {
  6709. // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
  6710. // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
  6711. // with the same identifier as the touch event that previously triggered the click that triggered the alert.
  6712. // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
  6713. // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
  6714. // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
  6715. // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
  6716. // random integers, it's safe to to continue if the identifier is 0 here.
  6717. if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
  6718. event.preventDefault();
  6719. return false;
  6720. }
  6721. this.lastTouchIdentifier = touch.identifier;
  6722. // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
  6723. // 1) the user does a fling scroll on the scrollable layer
  6724. // 2) the user stops the fling scroll with another tap
  6725. // then the event.target of the last 'touchend' event will be the element that was under the user's finger
  6726. // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
  6727. // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
  6728. this.updateScrollParent(targetElement);
  6729. }
  6730. }
  6731. this.trackingClick = true;
  6732. this.trackingClickStart = event.timeStamp;
  6733. this.targetElement = targetElement;
  6734. this.touchStartX = touch.pageX;
  6735. this.touchStartY = touch.pageY;
  6736. // Prevent phantom clicks on fast double-tap (issue #36)
  6737. if (event.timeStamp - this.lastClickTime < this.tapDelay && event.timeStamp - this.lastClickTime > -1) {
  6738. event.preventDefault();
  6739. }
  6740. return true;
  6741. };
  6742. /**
  6743. * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
  6744. *
  6745. * @param {Event} event
  6746. * @returns {boolean}
  6747. */
  6748. FastClick.prototype.touchHasMoved = function (event) {
  6749. var touch = event.changedTouches[0],
  6750. boundary = this.touchBoundary;
  6751. if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
  6752. return true;
  6753. }
  6754. return false;
  6755. };
  6756. /**
  6757. * Update the last position.
  6758. *
  6759. * @param {Event} event
  6760. * @returns {boolean}
  6761. */
  6762. FastClick.prototype.onTouchMove = function (event) {
  6763. if (!this.trackingClick) {
  6764. return true;
  6765. }
  6766. // If the touch has moved, cancel the click tracking
  6767. if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
  6768. this.trackingClick = false;
  6769. this.targetElement = null;
  6770. }
  6771. return true;
  6772. };
  6773. /**
  6774. * Attempt to find the labelled control for the given label element.
  6775. *
  6776. * @param {EventTarget|HTMLLabelElement} labelElement
  6777. * @returns {Element|null}
  6778. */
  6779. FastClick.prototype.findControl = function (labelElement) {
  6780. // Fast path for newer browsers supporting the HTML5 control attribute
  6781. if (labelElement.control !== undefined) {
  6782. return labelElement.control;
  6783. }
  6784. // All browsers under test that support touch events also support the HTML5 htmlFor attribute
  6785. if (labelElement.htmlFor) {
  6786. return document.getElementById(labelElement.htmlFor);
  6787. }
  6788. // If no for attribute exists, attempt to retrieve the first labellable descendant element
  6789. // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
  6790. return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
  6791. };
  6792. /**
  6793. * On touch end, determine whether to send a click event at once.
  6794. *
  6795. * @param {Event} event
  6796. * @returns {boolean}
  6797. */
  6798. FastClick.prototype.onTouchEnd = function (event) {
  6799. var forElement,
  6800. trackingClickStart,
  6801. targetTagName,
  6802. scrollParent,
  6803. touch,
  6804. targetElement = this.targetElement;
  6805. if (!this.trackingClick) {
  6806. return true;
  6807. }
  6808. // Prevent phantom clicks on fast double-tap (issue #36)
  6809. if (event.timeStamp - this.lastClickTime < this.tapDelay && event.timeStamp - this.lastClickTime > -1) {
  6810. this.cancelNextClick = true;
  6811. return true;
  6812. }
  6813. if (event.timeStamp - this.trackingClickStart > this.tapTimeout) {
  6814. return true;
  6815. }
  6816. // Reset to prevent wrong click cancel on input (issue #156).
  6817. this.cancelNextClick = false;
  6818. this.lastClickTime = event.timeStamp;
  6819. trackingClickStart = this.trackingClickStart;
  6820. this.trackingClick = false;
  6821. this.trackingClickStart = 0;
  6822. // On some iOS devices, the targetElement supplied with the event is invalid if the layer
  6823. // is performing a transition or scroll, and has to be re-detected manually. Note that
  6824. // for this to function correctly, it must be called *after* the event target is checked!
  6825. // See issue #57; also filed as rdar://13048589 .
  6826. if (deviceIsIOSWithBadTarget) {
  6827. touch = event.changedTouches[0];
  6828. // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
  6829. targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
  6830. targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
  6831. }
  6832. targetTagName = targetElement.tagName.toLowerCase();
  6833. if (targetTagName === 'label') {
  6834. forElement = this.findControl(targetElement);
  6835. if (forElement) {
  6836. this.focus(targetElement);
  6837. if (deviceIsAndroid) {
  6838. return false;
  6839. }
  6840. targetElement = forElement;
  6841. }
  6842. } else if (this.needsFocus(targetElement)) {
  6843. // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
  6844. // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
  6845. if (event.timeStamp - trackingClickStart > 100 || deviceIsIOS && window.top !== window && targetTagName === 'input') {
  6846. this.targetElement = null;
  6847. return false;
  6848. }
  6849. this.focus(targetElement);
  6850. this.sendClick(targetElement, event);
  6851. // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
  6852. // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
  6853. if (!deviceIsIOS4 || targetTagName !== 'select') {
  6854. this.targetElement = null;
  6855. event.preventDefault();
  6856. }
  6857. return false;
  6858. }
  6859. if (deviceIsIOS && !deviceIsIOS4) {
  6860. // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
  6861. // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
  6862. scrollParent = targetElement.fastClickScrollParent;
  6863. if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
  6864. return true;
  6865. }
  6866. }
  6867. // Prevent the actual click from going though - unless the target node is marked as requiring
  6868. // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
  6869. if (!this.needsClick(targetElement)) {
  6870. event.preventDefault();
  6871. this.sendClick(targetElement, event);
  6872. }
  6873. return false;
  6874. };
  6875. /**
  6876. * On touch cancel, stop tracking the click.
  6877. *
  6878. * @returns {void}
  6879. */
  6880. FastClick.prototype.onTouchCancel = function () {
  6881. this.trackingClick = false;
  6882. this.targetElement = null;
  6883. };
  6884. /**
  6885. * Determine mouse events which should be permitted.
  6886. *
  6887. * @param {Event} event
  6888. * @returns {boolean}
  6889. */
  6890. FastClick.prototype.onMouse = function (event) {
  6891. // If a target element was never set (because a touch event was never fired) allow the event
  6892. if (!this.targetElement) {
  6893. return true;
  6894. }
  6895. if (event.forwardedTouchEvent) {
  6896. return true;
  6897. }
  6898. // Programmatically generated events targeting a specific element should be permitted
  6899. if (!event.cancelable) {
  6900. return true;
  6901. }
  6902. // Derive and check the target element to see whether the mouse event needs to be permitted;
  6903. // unless explicitly enabled, prevent non-touch click events from triggering actions,
  6904. // to prevent ghost/doubleclicks.
  6905. if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
  6906. // Prevent any user-added listeners declared on FastClick element from being fired.
  6907. if (event.stopImmediatePropagation) {
  6908. event.stopImmediatePropagation();
  6909. } else {
  6910. // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
  6911. event.propagationStopped = true;
  6912. }
  6913. // Cancel the event
  6914. event.stopPropagation();
  6915. event.preventDefault();
  6916. return false;
  6917. }
  6918. // If the mouse event is permitted, return true for the action to go through.
  6919. return true;
  6920. };
  6921. /**
  6922. * On actual clicks, determine whether this is a touch-generated click, a click action occurring
  6923. * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
  6924. * an actual click which should be permitted.
  6925. *
  6926. * @param {Event} event
  6927. * @returns {boolean}
  6928. */
  6929. FastClick.prototype.onClick = function (event) {
  6930. var permitted;
  6931. // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
  6932. if (this.trackingClick) {
  6933. this.targetElement = null;
  6934. this.trackingClick = false;
  6935. return true;
  6936. }
  6937. // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
  6938. if (event.target.type === 'submit' && event.detail === 0) {
  6939. return true;
  6940. }
  6941. permitted = this.onMouse(event);
  6942. // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
  6943. if (!permitted) {
  6944. this.targetElement = null;
  6945. }
  6946. // If clicks are permitted, return true for the action to go through.
  6947. return permitted;
  6948. };
  6949. /**
  6950. * Remove all FastClick's event listeners.
  6951. *
  6952. * @returns {void}
  6953. */
  6954. FastClick.prototype.destroy = function () {
  6955. var layer = this.layer;
  6956. if (deviceIsAndroid) {
  6957. layer.removeEventListener('mouseover', this.onMouse, true);
  6958. layer.removeEventListener('mousedown', this.onMouse, true);
  6959. layer.removeEventListener('mouseup', this.onMouse, true);
  6960. }
  6961. layer.removeEventListener('click', this.onClick, true);
  6962. layer.removeEventListener('touchstart', this.onTouchStart, false);
  6963. layer.removeEventListener('touchmove', this.onTouchMove, false);
  6964. layer.removeEventListener('touchend', this.onTouchEnd, false);
  6965. layer.removeEventListener('touchcancel', this.onTouchCancel, false);
  6966. };
  6967. /**
  6968. * Check whether FastClick is needed.
  6969. *
  6970. * @param {Element} layer The layer to listen on
  6971. */
  6972. FastClick.notNeeded = function (layer) {
  6973. var metaViewport;
  6974. var chromeVersion;
  6975. var blackberryVersion;
  6976. var firefoxVersion;
  6977. // Devices that don't support touch don't need FastClick
  6978. if (typeof window.ontouchstart === 'undefined') {
  6979. return true;
  6980. }
  6981. // Chrome version - zero for other browsers
  6982. chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
  6983. if (chromeVersion) {
  6984. if (deviceIsAndroid) {
  6985. metaViewport = document.querySelector('meta[name=viewport]');
  6986. if (metaViewport) {
  6987. // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
  6988. if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
  6989. return true;
  6990. }
  6991. // Chrome 32 and above with width=device-width or less don't need FastClick
  6992. if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
  6993. return true;
  6994. }
  6995. }
  6996. // Chrome desktop doesn't need FastClick (issue #15)
  6997. } else {
  6998. return true;
  6999. }
  7000. }
  7001. if (deviceIsBlackBerry10) {
  7002. blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
  7003. // BlackBerry 10.3+ does not require Fastclick library.
  7004. // https://github.com/ftlabs/fastclick/issues/251
  7005. if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
  7006. metaViewport = document.querySelector('meta[name=viewport]');
  7007. if (metaViewport) {
  7008. // user-scalable=no eliminates click delay.
  7009. if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
  7010. return true;
  7011. }
  7012. // width=device-width (or less than device-width) eliminates click delay.
  7013. if (document.documentElement.scrollWidth <= window.outerWidth) {
  7014. return true;
  7015. }
  7016. }
  7017. }
  7018. }
  7019. // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
  7020. if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
  7021. return true;
  7022. }
  7023. // Firefox version - zero for other browsers
  7024. firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1];
  7025. if (firefoxVersion >= 27) {
  7026. // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
  7027. metaViewport = document.querySelector('meta[name=viewport]');
  7028. if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
  7029. return true;
  7030. }
  7031. }
  7032. // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
  7033. // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
  7034. if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
  7035. return true;
  7036. }
  7037. return false;
  7038. };
  7039. /**
  7040. * Factory method for creating a FastClick object
  7041. *
  7042. * @param {Element} layer The layer to listen on
  7043. * @param {Object} [options={}] The options to override the defaults
  7044. */
  7045. FastClick.attach = function (layer, options) {
  7046. return new FastClick(layer, options);
  7047. };
  7048. if (typeof undefined === 'function' && _typeof(undefined.amd) === 'object' && undefined.amd) {
  7049. // AMD. Register as an anonymous module.
  7050. undefined(function () {
  7051. return FastClick;
  7052. });
  7053. } else if ('object' !== 'undefined' && module.exports) {
  7054. module.exports = FastClick.attach;
  7055. module.exports.FastClick = FastClick;
  7056. } else {
  7057. window.FastClick = FastClick;
  7058. }
  7059. })();
  7060. });
  7061. var fastclick_1 = fastclick.FastClick;
  7062. // For @onsenui/custom-elements
  7063. if (window.customElements) {
  7064. // even if native CE1 impl exists, use polyfill
  7065. window.customElements.forcePolyfill = true;
  7066. }
  7067. var _global = createCommonjsModule(function (module) {
  7068. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  7069. var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self
  7070. // eslint-disable-next-line no-new-func
  7071. : Function('return this')();
  7072. if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
  7073. });
  7074. var _core = createCommonjsModule(function (module) {
  7075. var core = module.exports = { version: '2.5.1' };
  7076. if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
  7077. });
  7078. var _core_1 = _core.version;
  7079. var _isObject = function _isObject(it) {
  7080. return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function';
  7081. };
  7082. var _anObject = function _anObject(it) {
  7083. if (!_isObject(it)) throw TypeError(it + ' is not an object!');
  7084. return it;
  7085. };
  7086. var _fails = function _fails(exec) {
  7087. try {
  7088. return !!exec();
  7089. } catch (e) {
  7090. return true;
  7091. }
  7092. };
  7093. // Thank's IE8 for his funny defineProperty
  7094. var _descriptors = !_fails(function () {
  7095. return Object.defineProperty({}, 'a', { get: function get() {
  7096. return 7;
  7097. } }).a != 7;
  7098. });
  7099. var document$1 = _global.document;
  7100. // typeof document.createElement is 'object' in old IE
  7101. var is = _isObject(document$1) && _isObject(document$1.createElement);
  7102. var _domCreate = function _domCreate(it) {
  7103. return is ? document$1.createElement(it) : {};
  7104. };
  7105. var _ie8DomDefine = !_descriptors && !_fails(function () {
  7106. return Object.defineProperty(_domCreate('div'), 'a', { get: function get() {
  7107. return 7;
  7108. } }).a != 7;
  7109. });
  7110. // 7.1.1 ToPrimitive(input [, PreferredType])
  7111. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  7112. // and the second argument - flag - preferred type is a string
  7113. var _toPrimitive = function _toPrimitive(it, S) {
  7114. if (!_isObject(it)) return it;
  7115. var fn, val;
  7116. if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
  7117. if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) return val;
  7118. if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
  7119. throw TypeError("Can't convert object to primitive value");
  7120. };
  7121. var dP = Object.defineProperty;
  7122. var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  7123. _anObject(O);
  7124. P = _toPrimitive(P, true);
  7125. _anObject(Attributes);
  7126. if (_ie8DomDefine) try {
  7127. return dP(O, P, Attributes);
  7128. } catch (e) {/* empty */}
  7129. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  7130. if ('value' in Attributes) O[P] = Attributes.value;
  7131. return O;
  7132. };
  7133. var _objectDp = {
  7134. f: f
  7135. };
  7136. var _propertyDesc = function _propertyDesc(bitmap, value) {
  7137. return {
  7138. enumerable: !(bitmap & 1),
  7139. configurable: !(bitmap & 2),
  7140. writable: !(bitmap & 4),
  7141. value: value
  7142. };
  7143. };
  7144. var _hide = _descriptors ? function (object, key, value) {
  7145. return _objectDp.f(object, key, _propertyDesc(1, value));
  7146. } : function (object, key, value) {
  7147. object[key] = value;
  7148. return object;
  7149. };
  7150. var hasOwnProperty = {}.hasOwnProperty;
  7151. var _has = function _has(it, key) {
  7152. return hasOwnProperty.call(it, key);
  7153. };
  7154. var id = 0;
  7155. var px = Math.random();
  7156. var _uid = function _uid(key) {
  7157. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
  7158. };
  7159. var _redefine = createCommonjsModule(function (module) {
  7160. var SRC = _uid('src');
  7161. var TO_STRING = 'toString';
  7162. var $toString = Function[TO_STRING];
  7163. var TPL = ('' + $toString).split(TO_STRING);
  7164. _core.inspectSource = function (it) {
  7165. return $toString.call(it);
  7166. };
  7167. (module.exports = function (O, key, val, safe) {
  7168. var isFunction = typeof val == 'function';
  7169. if (isFunction) _has(val, 'name') || _hide(val, 'name', key);
  7170. if (O[key] === val) return;
  7171. if (isFunction) _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  7172. if (O === _global) {
  7173. O[key] = val;
  7174. } else if (!safe) {
  7175. delete O[key];
  7176. _hide(O, key, val);
  7177. } else if (O[key]) {
  7178. O[key] = val;
  7179. } else {
  7180. _hide(O, key, val);
  7181. }
  7182. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  7183. })(Function.prototype, TO_STRING, function toString() {
  7184. return typeof this == 'function' && this[SRC] || $toString.call(this);
  7185. });
  7186. });
  7187. var _aFunction = function _aFunction(it) {
  7188. if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  7189. return it;
  7190. };
  7191. // optional / simple context binding
  7192. var _ctx = function _ctx(fn, that, length) {
  7193. _aFunction(fn);
  7194. if (that === undefined) return fn;
  7195. switch (length) {
  7196. case 1:
  7197. return function (a) {
  7198. return fn.call(that, a);
  7199. };
  7200. case 2:
  7201. return function (a, b) {
  7202. return fn.call(that, a, b);
  7203. };
  7204. case 3:
  7205. return function (a, b, c) {
  7206. return fn.call(that, a, b, c);
  7207. };
  7208. }
  7209. return function () /* ...args */{
  7210. return fn.apply(that, arguments);
  7211. };
  7212. };
  7213. var PROTOTYPE = 'prototype';
  7214. var $export = function $export(type, name, source) {
  7215. var IS_FORCED = type & $export.F;
  7216. var IS_GLOBAL = type & $export.G;
  7217. var IS_STATIC = type & $export.S;
  7218. var IS_PROTO = type & $export.P;
  7219. var IS_BIND = type & $export.B;
  7220. var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];
  7221. var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
  7222. var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  7223. var key, own, out, exp;
  7224. if (IS_GLOBAL) source = name;
  7225. for (key in source) {
  7226. // contains in native
  7227. own = !IS_FORCED && target && target[key] !== undefined;
  7228. // export native or passed
  7229. out = (own ? target : source)[key];
  7230. // bind timers to global for call from export context
  7231. exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
  7232. // extend global
  7233. if (target) _redefine(target, key, out, type & $export.U);
  7234. // export
  7235. if (exports[key] != out) _hide(exports, key, exp);
  7236. if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  7237. }
  7238. };
  7239. _global.core = _core;
  7240. // type bitmap
  7241. $export.F = 1; // forced
  7242. $export.G = 2; // global
  7243. $export.S = 4; // static
  7244. $export.P = 8; // proto
  7245. $export.B = 16; // bind
  7246. $export.W = 32; // wrap
  7247. $export.U = 64; // safe
  7248. $export.R = 128; // real proto method for `library`
  7249. var _export = $export;
  7250. var f$2 = {}.propertyIsEnumerable;
  7251. var _objectPie = {
  7252. f: f$2
  7253. };
  7254. var toString = {}.toString;
  7255. var _cof = function _cof(it) {
  7256. return toString.call(it).slice(8, -1);
  7257. };
  7258. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  7259. // eslint-disable-next-line no-prototype-builtins
  7260. var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  7261. return _cof(it) == 'String' ? it.split('') : Object(it);
  7262. };
  7263. // 7.2.1 RequireObjectCoercible(argument)
  7264. var _defined = function _defined(it) {
  7265. if (it == undefined) throw TypeError("Can't call method on " + it);
  7266. return it;
  7267. };
  7268. // to indexed object, toObject with fallback for non-array-like ES3 strings
  7269. var _toIobject = function _toIobject(it) {
  7270. return _iobject(_defined(it));
  7271. };
  7272. var gOPD = Object.getOwnPropertyDescriptor;
  7273. var f$1 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {
  7274. O = _toIobject(O);
  7275. P = _toPrimitive(P, true);
  7276. if (_ie8DomDefine) try {
  7277. return gOPD(O, P);
  7278. } catch (e) {/* empty */}
  7279. if (_has(O, P)) return _propertyDesc(!_objectPie.f.call(O, P), O[P]);
  7280. };
  7281. var _objectGopd = {
  7282. f: f$1
  7283. };
  7284. // Works with __proto__ only. Old v8 can't work with null proto objects.
  7285. /* eslint-disable no-proto */
  7286. var check = function check(O, proto) {
  7287. _anObject(O);
  7288. if (!_isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
  7289. };
  7290. var _setProto = {
  7291. set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
  7292. function (test, buggy, set) {
  7293. try {
  7294. set = _ctx(Function.call, _objectGopd.f(Object.prototype, '__proto__').set, 2);
  7295. set(test, []);
  7296. buggy = !(test instanceof Array);
  7297. } catch (e) {
  7298. buggy = true;
  7299. }
  7300. return function setPrototypeOf(O, proto) {
  7301. check(O, proto);
  7302. if (buggy) O.__proto__ = proto;else set(O, proto);
  7303. return O;
  7304. };
  7305. }({}, false) : undefined),
  7306. check: check
  7307. };
  7308. // 19.1.3.19 Object.setPrototypeOf(O, proto)
  7309. _export(_export.S, 'Object', { setPrototypeOf: _setProto.set });
  7310. var setPrototypeOf = _core.Object.setPrototypeOf;
  7311. var SHARED = '__core-js_shared__';
  7312. var store = _global[SHARED] || (_global[SHARED] = {});
  7313. var _shared = function _shared(key) {
  7314. return store[key] || (store[key] = {});
  7315. };
  7316. var _wks = createCommonjsModule(function (module) {
  7317. var store = _shared('wks');
  7318. var _Symbol = _global.Symbol;
  7319. var USE_SYMBOL = typeof _Symbol == 'function';
  7320. var $exports = module.exports = function (name) {
  7321. return store[name] || (store[name] = USE_SYMBOL && _Symbol[name] || (USE_SYMBOL ? _Symbol : _uid)('Symbol.' + name));
  7322. };
  7323. $exports.store = store;
  7324. });
  7325. // getting tag from 19.1.3.6 Object.prototype.toString()
  7326. var TAG = _wks('toStringTag');
  7327. // ES3 wrong here
  7328. var ARG = _cof(function () {
  7329. return arguments;
  7330. }()) == 'Arguments';
  7331. // fallback for IE11 Script Access Denied error
  7332. var tryGet = function tryGet(it, key) {
  7333. try {
  7334. return it[key];
  7335. } catch (e) {/* empty */}
  7336. };
  7337. var _classof = function _classof(it) {
  7338. var O, T, B;
  7339. return it === undefined ? 'Undefined' : it === null ? 'Null'
  7340. // @@toStringTag case
  7341. : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
  7342. // builtinTag case
  7343. : ARG ? _cof(O)
  7344. // ES3 arguments fallback
  7345. : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
  7346. };
  7347. // 19.1.3.6 Object.prototype.toString()
  7348. var test = {};
  7349. test[_wks('toStringTag')] = 'z';
  7350. if (test + '' != '[object z]') {
  7351. _redefine(Object.prototype, 'toString', function toString() {
  7352. return '[object ' + _classof(this) + ']';
  7353. }, true);
  7354. }
  7355. // 7.1.4 ToInteger
  7356. var ceil = Math.ceil;
  7357. var floor = Math.floor;
  7358. var _toInteger = function _toInteger(it) {
  7359. return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
  7360. };
  7361. // true -> String#at
  7362. // false -> String#codePointAt
  7363. var _stringAt = function _stringAt(TO_STRING) {
  7364. return function (that, pos) {
  7365. var s = String(_defined(that));
  7366. var i = _toInteger(pos);
  7367. var l = s.length;
  7368. var a, b;
  7369. if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
  7370. a = s.charCodeAt(i);
  7371. return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  7372. };
  7373. };
  7374. var _library = false;
  7375. var _iterators = {};
  7376. // 7.1.15 ToLength
  7377. var min = Math.min;
  7378. var _toLength = function _toLength(it) {
  7379. return it > 0 ? min(_toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  7380. };
  7381. var max = Math.max;
  7382. var min$1 = Math.min;
  7383. var _toAbsoluteIndex = function _toAbsoluteIndex(index, length) {
  7384. index = _toInteger(index);
  7385. return index < 0 ? max(index + length, 0) : min$1(index, length);
  7386. };
  7387. // false -> Array#indexOf
  7388. // true -> Array#includes
  7389. var _arrayIncludes = function _arrayIncludes(IS_INCLUDES) {
  7390. return function ($this, el, fromIndex) {
  7391. var O = _toIobject($this);
  7392. var length = _toLength(O.length);
  7393. var index = _toAbsoluteIndex(fromIndex, length);
  7394. var value;
  7395. // Array#includes uses SameValueZero equality algorithm
  7396. // eslint-disable-next-line no-self-compare
  7397. if (IS_INCLUDES && el != el) while (length > index) {
  7398. value = O[index++];
  7399. // eslint-disable-next-line no-self-compare
  7400. if (value != value) return true;
  7401. // Array#indexOf ignores holes, Array#includes - not
  7402. } else for (; length > index; index++) {
  7403. if (IS_INCLUDES || index in O) {
  7404. if (O[index] === el) return IS_INCLUDES || index || 0;
  7405. }
  7406. }return !IS_INCLUDES && -1;
  7407. };
  7408. };
  7409. var shared = _shared('keys');
  7410. var _sharedKey = function _sharedKey(key) {
  7411. return shared[key] || (shared[key] = _uid(key));
  7412. };
  7413. var arrayIndexOf = _arrayIncludes(false);
  7414. var IE_PROTO$1 = _sharedKey('IE_PROTO');
  7415. var _objectKeysInternal = function _objectKeysInternal(object, names) {
  7416. var O = _toIobject(object);
  7417. var i = 0;
  7418. var result = [];
  7419. var key;
  7420. for (key in O) {
  7421. if (key != IE_PROTO$1) _has(O, key) && result.push(key);
  7422. } // Don't enum bug & hidden keys
  7423. while (names.length > i) {
  7424. if (_has(O, key = names[i++])) {
  7425. ~arrayIndexOf(result, key) || result.push(key);
  7426. }
  7427. }return result;
  7428. };
  7429. // IE 8- don't enum bug keys
  7430. var _enumBugKeys = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');
  7431. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  7432. var _objectKeys = Object.keys || function keys(O) {
  7433. return _objectKeysInternal(O, _enumBugKeys);
  7434. };
  7435. var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  7436. _anObject(O);
  7437. var keys = _objectKeys(Properties);
  7438. var length = keys.length;
  7439. var i = 0;
  7440. var P;
  7441. while (length > i) {
  7442. _objectDp.f(O, P = keys[i++], Properties[P]);
  7443. }return O;
  7444. };
  7445. var document$2 = _global.document;
  7446. var _html = document$2 && document$2.documentElement;
  7447. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  7448. var IE_PROTO = _sharedKey('IE_PROTO');
  7449. var Empty = function Empty() {/* empty */};
  7450. var PROTOTYPE$1 = 'prototype';
  7451. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  7452. var _createDict = function createDict() {
  7453. // Thrash, waste and sodomy: IE GC bug
  7454. var iframe = _domCreate('iframe');
  7455. var i = _enumBugKeys.length;
  7456. var lt = '<';
  7457. var gt = '>';
  7458. var iframeDocument;
  7459. iframe.style.display = 'none';
  7460. _html.appendChild(iframe);
  7461. iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  7462. // createDict = iframe.contentWindow.Object;
  7463. // html.removeChild(iframe);
  7464. iframeDocument = iframe.contentWindow.document;
  7465. iframeDocument.open();
  7466. iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  7467. iframeDocument.close();
  7468. _createDict = iframeDocument.F;
  7469. while (i--) {
  7470. delete _createDict[PROTOTYPE$1][_enumBugKeys[i]];
  7471. }return _createDict();
  7472. };
  7473. var _objectCreate = Object.create || function create(O, Properties) {
  7474. var result;
  7475. if (O !== null) {
  7476. Empty[PROTOTYPE$1] = _anObject(O);
  7477. result = new Empty();
  7478. Empty[PROTOTYPE$1] = null;
  7479. // add "__proto__" for Object.getPrototypeOf polyfill
  7480. result[IE_PROTO] = O;
  7481. } else result = _createDict();
  7482. return Properties === undefined ? result : _objectDps(result, Properties);
  7483. };
  7484. var def = _objectDp.f;
  7485. var TAG$1 = _wks('toStringTag');
  7486. var _setToStringTag = function _setToStringTag(it, tag, stat) {
  7487. if (it && !_has(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
  7488. };
  7489. var IteratorPrototype = {};
  7490. // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
  7491. _hide(IteratorPrototype, _wks('iterator'), function () {
  7492. return this;
  7493. });
  7494. var _iterCreate = function _iterCreate(Constructor, NAME, next) {
  7495. Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) });
  7496. _setToStringTag(Constructor, NAME + ' Iterator');
  7497. };
  7498. // 7.1.13 ToObject(argument)
  7499. var _toObject = function _toObject(it) {
  7500. return Object(_defined(it));
  7501. };
  7502. // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
  7503. var IE_PROTO$2 = _sharedKey('IE_PROTO');
  7504. var ObjectProto = Object.prototype;
  7505. var _objectGpo = Object.getPrototypeOf || function (O) {
  7506. O = _toObject(O);
  7507. if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];
  7508. if (typeof O.constructor == 'function' && O instanceof O.constructor) {
  7509. return O.constructor.prototype;
  7510. }return O instanceof Object ? ObjectProto : null;
  7511. };
  7512. var ITERATOR = _wks('iterator');
  7513. var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
  7514. var FF_ITERATOR = '@@iterator';
  7515. var KEYS = 'keys';
  7516. var VALUES = 'values';
  7517. var returnThis = function returnThis() {
  7518. return this;
  7519. };
  7520. var _iterDefine = function _iterDefine(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  7521. _iterCreate(Constructor, NAME, next);
  7522. var getMethod = function getMethod(kind) {
  7523. if (!BUGGY && kind in proto) return proto[kind];
  7524. switch (kind) {
  7525. case KEYS:
  7526. return function keys() {
  7527. return new Constructor(this, kind);
  7528. };
  7529. case VALUES:
  7530. return function values() {
  7531. return new Constructor(this, kind);
  7532. };
  7533. }return function entries() {
  7534. return new Constructor(this, kind);
  7535. };
  7536. };
  7537. var TAG = NAME + ' Iterator';
  7538. var DEF_VALUES = DEFAULT == VALUES;
  7539. var VALUES_BUG = false;
  7540. var proto = Base.prototype;
  7541. var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  7542. var $default = $native || getMethod(DEFAULT);
  7543. var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  7544. var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  7545. var methods, key, IteratorPrototype;
  7546. // Fix native
  7547. if ($anyNative) {
  7548. IteratorPrototype = _objectGpo($anyNative.call(new Base()));
  7549. if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
  7550. // Set @@toStringTag to native iterators
  7551. _setToStringTag(IteratorPrototype, TAG, true);
  7552. // fix for some old engines
  7553. if (!_library && !_has(IteratorPrototype, ITERATOR)) _hide(IteratorPrototype, ITERATOR, returnThis);
  7554. }
  7555. }
  7556. // fix Array#{values, @@iterator}.name in V8 / FF
  7557. if (DEF_VALUES && $native && $native.name !== VALUES) {
  7558. VALUES_BUG = true;
  7559. $default = function values() {
  7560. return $native.call(this);
  7561. };
  7562. }
  7563. // Define iterator
  7564. if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
  7565. _hide(proto, ITERATOR, $default);
  7566. }
  7567. // Plug for library
  7568. _iterators[NAME] = $default;
  7569. _iterators[TAG] = returnThis;
  7570. if (DEFAULT) {
  7571. methods = {
  7572. values: DEF_VALUES ? $default : getMethod(VALUES),
  7573. keys: IS_SET ? $default : getMethod(KEYS),
  7574. entries: $entries
  7575. };
  7576. if (FORCED) for (key in methods) {
  7577. if (!(key in proto)) _redefine(proto, key, methods[key]);
  7578. } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);
  7579. }
  7580. return methods;
  7581. };
  7582. var $at = _stringAt(true);
  7583. // 21.1.3.27 String.prototype[@@iterator]()
  7584. _iterDefine(String, 'String', function (iterated) {
  7585. this._t = String(iterated); // target
  7586. this._i = 0; // next index
  7587. // 21.1.5.2.1 %StringIteratorPrototype%.next()
  7588. }, function () {
  7589. var O = this._t;
  7590. var index = this._i;
  7591. var point;
  7592. if (index >= O.length) return { value: undefined, done: true };
  7593. point = $at(O, index);
  7594. this._i += point.length;
  7595. return { value: point, done: false };
  7596. });
  7597. // 22.1.3.31 Array.prototype[@@unscopables]
  7598. var UNSCOPABLES = _wks('unscopables');
  7599. var ArrayProto = Array.prototype;
  7600. if (ArrayProto[UNSCOPABLES] == undefined) _hide(ArrayProto, UNSCOPABLES, {});
  7601. var _addToUnscopables = function _addToUnscopables(key) {
  7602. ArrayProto[UNSCOPABLES][key] = true;
  7603. };
  7604. var _iterStep = function _iterStep(done, value) {
  7605. return { value: value, done: !!done };
  7606. };
  7607. // 22.1.3.4 Array.prototype.entries()
  7608. // 22.1.3.13 Array.prototype.keys()
  7609. // 22.1.3.29 Array.prototype.values()
  7610. // 22.1.3.30 Array.prototype[@@iterator]()
  7611. var es6_array_iterator = _iterDefine(Array, 'Array', function (iterated, kind) {
  7612. this._t = _toIobject(iterated); // target
  7613. this._i = 0; // next index
  7614. this._k = kind; // kind
  7615. // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
  7616. }, function () {
  7617. var O = this._t;
  7618. var kind = this._k;
  7619. var index = this._i++;
  7620. if (!O || index >= O.length) {
  7621. this._t = undefined;
  7622. return _iterStep(1);
  7623. }
  7624. if (kind == 'keys') return _iterStep(0, index);
  7625. if (kind == 'values') return _iterStep(0, O[index]);
  7626. return _iterStep(0, [index, O[index]]);
  7627. }, 'values');
  7628. // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
  7629. _iterators.Arguments = _iterators.Array;
  7630. _addToUnscopables('keys');
  7631. _addToUnscopables('values');
  7632. _addToUnscopables('entries');
  7633. var ITERATOR$1 = _wks('iterator');
  7634. var TO_STRING_TAG = _wks('toStringTag');
  7635. var ArrayValues = _iterators.Array;
  7636. var DOMIterables = {
  7637. CSSRuleList: true, // TODO: Not spec compliant, should be false.
  7638. CSSStyleDeclaration: false,
  7639. CSSValueList: false,
  7640. ClientRectList: false,
  7641. DOMRectList: false,
  7642. DOMStringList: false,
  7643. DOMTokenList: true,
  7644. DataTransferItemList: false,
  7645. FileList: false,
  7646. HTMLAllCollection: false,
  7647. HTMLCollection: false,
  7648. HTMLFormElement: false,
  7649. HTMLSelectElement: false,
  7650. MediaList: true, // TODO: Not spec compliant, should be false.
  7651. MimeTypeArray: false,
  7652. NamedNodeMap: false,
  7653. NodeList: true,
  7654. PaintRequestList: false,
  7655. Plugin: false,
  7656. PluginArray: false,
  7657. SVGLengthList: false,
  7658. SVGNumberList: false,
  7659. SVGPathSegList: false,
  7660. SVGPointList: false,
  7661. SVGStringList: false,
  7662. SVGTransformList: false,
  7663. SourceBufferList: false,
  7664. StyleSheetList: true, // TODO: Not spec compliant, should be false.
  7665. TextTrackCueList: false,
  7666. TextTrackList: false,
  7667. TouchList: false
  7668. };
  7669. for (var collections = _objectKeys(DOMIterables), i = 0; i < collections.length; i++) {
  7670. var NAME = collections[i];
  7671. var explicit = DOMIterables[NAME];
  7672. var Collection = _global[NAME];
  7673. var proto = Collection && Collection.prototype;
  7674. var key;
  7675. if (proto) {
  7676. if (!proto[ITERATOR$1]) _hide(proto, ITERATOR$1, ArrayValues);
  7677. if (!proto[TO_STRING_TAG]) _hide(proto, TO_STRING_TAG, NAME);
  7678. _iterators[NAME] = ArrayValues;
  7679. if (explicit) for (key in es6_array_iterator) {
  7680. if (!proto[key]) _redefine(proto, key, es6_array_iterator[key], true);
  7681. }
  7682. }
  7683. }
  7684. var _redefineAll = function _redefineAll(target, src, safe) {
  7685. for (var key in src) {
  7686. _redefine(target, key, src[key], safe);
  7687. }return target;
  7688. };
  7689. var _anInstance = function _anInstance(it, Constructor, name, forbiddenField) {
  7690. if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) {
  7691. throw TypeError(name + ': incorrect invocation!');
  7692. }return it;
  7693. };
  7694. // call something on iterator step with safe closing on error
  7695. var _iterCall = function _iterCall(iterator, fn, value, entries) {
  7696. try {
  7697. return entries ? fn(_anObject(value)[0], value[1]) : fn(value);
  7698. // 7.4.6 IteratorClose(iterator, completion)
  7699. } catch (e) {
  7700. var ret = iterator['return'];
  7701. if (ret !== undefined) _anObject(ret.call(iterator));
  7702. throw e;
  7703. }
  7704. };
  7705. // check on default Array iterator
  7706. var ITERATOR$2 = _wks('iterator');
  7707. var ArrayProto$1 = Array.prototype;
  7708. var _isArrayIter = function _isArrayIter(it) {
  7709. return it !== undefined && (_iterators.Array === it || ArrayProto$1[ITERATOR$2] === it);
  7710. };
  7711. var ITERATOR$3 = _wks('iterator');
  7712. var core_getIteratorMethod = _core.getIteratorMethod = function (it) {
  7713. if (it != undefined) return it[ITERATOR$3] || it['@@iterator'] || _iterators[_classof(it)];
  7714. };
  7715. var _forOf = createCommonjsModule(function (module) {
  7716. var BREAK = {};
  7717. var RETURN = {};
  7718. var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  7719. var iterFn = ITERATOR ? function () {
  7720. return iterable;
  7721. } : core_getIteratorMethod(iterable);
  7722. var f = _ctx(fn, that, entries ? 2 : 1);
  7723. var index = 0;
  7724. var length, step, iterator, result;
  7725. if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  7726. // fast case for arrays with default iterator
  7727. if (_isArrayIter(iterFn)) for (length = _toLength(iterable.length); length > index; index++) {
  7728. result = entries ? f(_anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
  7729. if (result === BREAK || result === RETURN) return result;
  7730. } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
  7731. result = _iterCall(iterator, f, step.value, entries);
  7732. if (result === BREAK || result === RETURN) return result;
  7733. }
  7734. };
  7735. exports.BREAK = BREAK;
  7736. exports.RETURN = RETURN;
  7737. });
  7738. var SPECIES = _wks('species');
  7739. var _setSpecies = function _setSpecies(KEY) {
  7740. var C = _global[KEY];
  7741. if (_descriptors && C && !C[SPECIES]) _objectDp.f(C, SPECIES, {
  7742. configurable: true,
  7743. get: function get() {
  7744. return this;
  7745. }
  7746. });
  7747. };
  7748. var _meta = createCommonjsModule(function (module) {
  7749. var META = _uid('meta');
  7750. var setDesc = _objectDp.f;
  7751. var id = 0;
  7752. var isExtensible = Object.isExtensible || function () {
  7753. return true;
  7754. };
  7755. var FREEZE = !_fails(function () {
  7756. return isExtensible(Object.preventExtensions({}));
  7757. });
  7758. var setMeta = function setMeta(it) {
  7759. setDesc(it, META, { value: {
  7760. i: 'O' + ++id, // object ID
  7761. w: {} // weak collections IDs
  7762. } });
  7763. };
  7764. var fastKey = function fastKey(it, create) {
  7765. // return primitive with prefix
  7766. if (!_isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  7767. if (!_has(it, META)) {
  7768. // can't set metadata to uncaught frozen object
  7769. if (!isExtensible(it)) return 'F';
  7770. // not necessary to add metadata
  7771. if (!create) return 'E';
  7772. // add missing metadata
  7773. setMeta(it);
  7774. // return object ID
  7775. }return it[META].i;
  7776. };
  7777. var getWeak = function getWeak(it, create) {
  7778. if (!_has(it, META)) {
  7779. // can't set metadata to uncaught frozen object
  7780. if (!isExtensible(it)) return true;
  7781. // not necessary to add metadata
  7782. if (!create) return false;
  7783. // add missing metadata
  7784. setMeta(it);
  7785. // return hash weak collections IDs
  7786. }return it[META].w;
  7787. };
  7788. // add metadata on freeze-family methods calling
  7789. var onFreeze = function onFreeze(it) {
  7790. if (FREEZE && meta.NEED && isExtensible(it) && !_has(it, META)) setMeta(it);
  7791. return it;
  7792. };
  7793. var meta = module.exports = {
  7794. KEY: META,
  7795. NEED: false,
  7796. fastKey: fastKey,
  7797. getWeak: getWeak,
  7798. onFreeze: onFreeze
  7799. };
  7800. });
  7801. var _meta_1 = _meta.KEY;
  7802. var _meta_2 = _meta.NEED;
  7803. var _meta_3 = _meta.fastKey;
  7804. var _meta_4 = _meta.getWeak;
  7805. var _meta_5 = _meta.onFreeze;
  7806. var _validateCollection = function _validateCollection(it, TYPE) {
  7807. if (!_isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  7808. return it;
  7809. };
  7810. var dP$1 = _objectDp.f;
  7811. var fastKey = _meta.fastKey;
  7812. var SIZE = _descriptors ? '_s' : 'size';
  7813. var getEntry = function getEntry(that, key) {
  7814. // fast case
  7815. var index = fastKey(key);
  7816. var entry;
  7817. if (index !== 'F') return that._i[index];
  7818. // frozen object case
  7819. for (entry = that._f; entry; entry = entry.n) {
  7820. if (entry.k == key) return entry;
  7821. }
  7822. };
  7823. var _collectionStrong = {
  7824. getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) {
  7825. var C = wrapper(function (that, iterable) {
  7826. _anInstance(that, C, NAME, '_i');
  7827. that._t = NAME; // collection type
  7828. that._i = _objectCreate(null); // index
  7829. that._f = undefined; // first entry
  7830. that._l = undefined; // last entry
  7831. that[SIZE] = 0; // size
  7832. if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
  7833. });
  7834. _redefineAll(C.prototype, {
  7835. // 23.1.3.1 Map.prototype.clear()
  7836. // 23.2.3.2 Set.prototype.clear()
  7837. clear: function clear() {
  7838. for (var that = _validateCollection(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
  7839. entry.r = true;
  7840. if (entry.p) entry.p = entry.p.n = undefined;
  7841. delete data[entry.i];
  7842. }
  7843. that._f = that._l = undefined;
  7844. that[SIZE] = 0;
  7845. },
  7846. // 23.1.3.3 Map.prototype.delete(key)
  7847. // 23.2.3.4 Set.prototype.delete(value)
  7848. 'delete': function _delete(key) {
  7849. var that = _validateCollection(this, NAME);
  7850. var entry = getEntry(that, key);
  7851. if (entry) {
  7852. var next = entry.n;
  7853. var prev = entry.p;
  7854. delete that._i[entry.i];
  7855. entry.r = true;
  7856. if (prev) prev.n = next;
  7857. if (next) next.p = prev;
  7858. if (that._f == entry) that._f = next;
  7859. if (that._l == entry) that._l = prev;
  7860. that[SIZE]--;
  7861. }return !!entry;
  7862. },
  7863. // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
  7864. // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
  7865. forEach: function forEach(callbackfn /* , that = undefined */) {
  7866. _validateCollection(this, NAME);
  7867. var f = _ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
  7868. var entry;
  7869. while (entry = entry ? entry.n : this._f) {
  7870. f(entry.v, entry.k, this);
  7871. // revert to the last existing entry
  7872. while (entry && entry.r) {
  7873. entry = entry.p;
  7874. }
  7875. }
  7876. },
  7877. // 23.1.3.7 Map.prototype.has(key)
  7878. // 23.2.3.7 Set.prototype.has(value)
  7879. has: function has(key) {
  7880. return !!getEntry(_validateCollection(this, NAME), key);
  7881. }
  7882. });
  7883. if (_descriptors) dP$1(C.prototype, 'size', {
  7884. get: function get() {
  7885. return _validateCollection(this, NAME)[SIZE];
  7886. }
  7887. });
  7888. return C;
  7889. },
  7890. def: function def(that, key, value) {
  7891. var entry = getEntry(that, key);
  7892. var prev, index;
  7893. // change existing entry
  7894. if (entry) {
  7895. entry.v = value;
  7896. // create new entry
  7897. } else {
  7898. that._l = entry = {
  7899. i: index = fastKey(key, true), // <- index
  7900. k: key, // <- key
  7901. v: value, // <- value
  7902. p: prev = that._l, // <- previous entry
  7903. n: undefined, // <- next entry
  7904. r: false // <- removed
  7905. };
  7906. if (!that._f) that._f = entry;
  7907. if (prev) prev.n = entry;
  7908. that[SIZE]++;
  7909. // add to index
  7910. if (index !== 'F') that._i[index] = entry;
  7911. }return that;
  7912. },
  7913. getEntry: getEntry,
  7914. setStrong: function setStrong(C, NAME, IS_MAP) {
  7915. // add .keys, .values, .entries, [@@iterator]
  7916. // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
  7917. _iterDefine(C, NAME, function (iterated, kind) {
  7918. this._t = _validateCollection(iterated, NAME); // target
  7919. this._k = kind; // kind
  7920. this._l = undefined; // previous
  7921. }, function () {
  7922. var that = this;
  7923. var kind = that._k;
  7924. var entry = that._l;
  7925. // revert to the last existing entry
  7926. while (entry && entry.r) {
  7927. entry = entry.p;
  7928. } // get next entry
  7929. if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
  7930. // or finish the iteration
  7931. that._t = undefined;
  7932. return _iterStep(1);
  7933. }
  7934. // return step by kind
  7935. if (kind == 'keys') return _iterStep(0, entry.k);
  7936. if (kind == 'values') return _iterStep(0, entry.v);
  7937. return _iterStep(0, [entry.k, entry.v]);
  7938. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  7939. // add [@@species], 23.1.2.2, 23.2.2.2
  7940. _setSpecies(NAME);
  7941. }
  7942. };
  7943. var ITERATOR$4 = _wks('iterator');
  7944. var SAFE_CLOSING = false;
  7945. try {
  7946. var riter = [7][ITERATOR$4]();
  7947. riter['return'] = function () {
  7948. SAFE_CLOSING = true;
  7949. };
  7950. // eslint-disable-next-line no-throw-literal
  7951. } catch (e) {/* empty */}
  7952. var _iterDetect = function _iterDetect(exec, skipClosing) {
  7953. if (!skipClosing && !SAFE_CLOSING) return false;
  7954. var safe = false;
  7955. try {
  7956. var arr = [7];
  7957. var iter = arr[ITERATOR$4]();
  7958. iter.next = function () {
  7959. return { done: safe = true };
  7960. };
  7961. arr[ITERATOR$4] = function () {
  7962. return iter;
  7963. };
  7964. exec(arr);
  7965. } catch (e) {/* empty */}
  7966. return safe;
  7967. };
  7968. var setPrototypeOf$2 = _setProto.set;
  7969. var _inheritIfRequired = function _inheritIfRequired(that, target, C) {
  7970. var S = target.constructor;
  7971. var P;
  7972. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && _isObject(P) && setPrototypeOf$2) {
  7973. setPrototypeOf$2(that, P);
  7974. }return that;
  7975. };
  7976. var _collection = function _collection(NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  7977. var Base = _global[NAME];
  7978. var C = Base;
  7979. var ADDER = IS_MAP ? 'set' : 'add';
  7980. var proto = C && C.prototype;
  7981. var O = {};
  7982. var fixMethod = function fixMethod(KEY) {
  7983. var fn = proto[KEY];
  7984. _redefine(proto, KEY, KEY == 'delete' ? function (a) {
  7985. return IS_WEAK && !_isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  7986. } : KEY == 'has' ? function has(a) {
  7987. return IS_WEAK && !_isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
  7988. } : KEY == 'get' ? function get(a) {
  7989. return IS_WEAK && !_isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
  7990. } : KEY == 'add' ? function add(a) {
  7991. fn.call(this, a === 0 ? 0 : a);return this;
  7992. } : function set(a, b) {
  7993. fn.call(this, a === 0 ? 0 : a, b);return this;
  7994. });
  7995. };
  7996. if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !_fails(function () {
  7997. new C().entries().next();
  7998. }))) {
  7999. // create collection constructor
  8000. C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
  8001. _redefineAll(C.prototype, methods);
  8002. _meta.NEED = true;
  8003. } else {
  8004. var instance = new C();
  8005. // early implementations not supports chaining
  8006. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  8007. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  8008. var THROWS_ON_PRIMITIVES = _fails(function () {
  8009. instance.has(1);
  8010. });
  8011. // most early implementations doesn't supports iterables, most modern - not close it correctly
  8012. var ACCEPT_ITERABLES = _iterDetect(function (iter) {
  8013. new C(iter);
  8014. }); // eslint-disable-line no-new
  8015. // for early implementations -0 and +0 not the same
  8016. var BUGGY_ZERO = !IS_WEAK && _fails(function () {
  8017. // V8 ~ Chromium 42- fails only with 5+ elements
  8018. var $instance = new C();
  8019. var index = 5;
  8020. while (index--) {
  8021. $instance[ADDER](index, index);
  8022. }return !$instance.has(-0);
  8023. });
  8024. if (!ACCEPT_ITERABLES) {
  8025. C = wrapper(function (target, iterable) {
  8026. _anInstance(target, C, NAME);
  8027. var that = _inheritIfRequired(new Base(), target, C);
  8028. if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
  8029. return that;
  8030. });
  8031. C.prototype = proto;
  8032. proto.constructor = C;
  8033. }
  8034. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  8035. fixMethod('delete');
  8036. fixMethod('has');
  8037. IS_MAP && fixMethod('get');
  8038. }
  8039. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  8040. // weak collections should not contains .clear method
  8041. if (IS_WEAK && proto.clear) delete proto.clear;
  8042. }
  8043. _setToStringTag(C, NAME);
  8044. O[NAME] = C;
  8045. _export(_export.G + _export.W + _export.F * (C != Base), O);
  8046. if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
  8047. return C;
  8048. };
  8049. var SET = 'Set';
  8050. // 23.2 Set Objects
  8051. var es6_set = _collection(SET, function (get) {
  8052. return function Set() {
  8053. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  8054. };
  8055. }, {
  8056. // 23.2.3.1 Set.prototype.add(value)
  8057. add: function add(value) {
  8058. return _collectionStrong.def(_validateCollection(this, SET), value = value === 0 ? 0 : value, value);
  8059. }
  8060. }, _collectionStrong);
  8061. var _arrayFromIterable = function _arrayFromIterable(iter, ITERATOR) {
  8062. var result = [];
  8063. _forOf(iter, false, result.push, result, ITERATOR);
  8064. return result;
  8065. };
  8066. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  8067. var _collectionToJson = function _collectionToJson(NAME) {
  8068. return function toJSON() {
  8069. if (_classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
  8070. return _arrayFromIterable(this);
  8071. };
  8072. };
  8073. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  8074. _export(_export.P + _export.R, 'Set', { toJSON: _collectionToJson('Set') });
  8075. // https://tc39.github.io/proposal-setmap-offrom/
  8076. var _setCollectionOf = function _setCollectionOf(COLLECTION) {
  8077. _export(_export.S, COLLECTION, { of: function of() {
  8078. var length = arguments.length;
  8079. var A = Array(length);
  8080. while (length--) {
  8081. A[length] = arguments[length];
  8082. }return new this(A);
  8083. } });
  8084. };
  8085. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
  8086. _setCollectionOf('Set');
  8087. // https://tc39.github.io/proposal-setmap-offrom/
  8088. var _setCollectionFrom = function _setCollectionFrom(COLLECTION) {
  8089. _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
  8090. var mapFn = arguments[1];
  8091. var mapping, A, n, cb;
  8092. _aFunction(this);
  8093. mapping = mapFn !== undefined;
  8094. if (mapping) _aFunction(mapFn);
  8095. if (source == undefined) return new this();
  8096. A = [];
  8097. if (mapping) {
  8098. n = 0;
  8099. cb = _ctx(mapFn, arguments[2], 2);
  8100. _forOf(source, false, function (nextItem) {
  8101. A.push(cb(nextItem, n++));
  8102. });
  8103. } else {
  8104. _forOf(source, false, A.push, A);
  8105. }
  8106. return new this(A);
  8107. } });
  8108. };
  8109. // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
  8110. _setCollectionFrom('Set');
  8111. var set$1 = _core.Set;
  8112. var MAP = 'Map';
  8113. // 23.1 Map Objects
  8114. var es6_map = _collection(MAP, function (get) {
  8115. return function Map() {
  8116. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  8117. };
  8118. }, {
  8119. // 23.1.3.6 Map.prototype.get(key)
  8120. get: function get(key) {
  8121. var entry = _collectionStrong.getEntry(_validateCollection(this, MAP), key);
  8122. return entry && entry.v;
  8123. },
  8124. // 23.1.3.9 Map.prototype.set(key, value)
  8125. set: function set(key, value) {
  8126. return _collectionStrong.def(_validateCollection(this, MAP), key === 0 ? 0 : key, value);
  8127. }
  8128. }, _collectionStrong, true);
  8129. // https://github.com/DavidBruant/Map-Set.prototype.toJSON
  8130. _export(_export.P + _export.R, 'Map', { toJSON: _collectionToJson('Map') });
  8131. // https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
  8132. _setCollectionOf('Map');
  8133. // https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
  8134. _setCollectionFrom('Map');
  8135. var map = _core.Map;
  8136. // 7.2.2 IsArray(argument)
  8137. var _isArray = Array.isArray || function isArray(arg) {
  8138. return _cof(arg) == 'Array';
  8139. };
  8140. var SPECIES$1 = _wks('species');
  8141. var _arraySpeciesConstructor = function _arraySpeciesConstructor(original) {
  8142. var C;
  8143. if (_isArray(original)) {
  8144. C = original.constructor;
  8145. // cross-realm fallback
  8146. if (typeof C == 'function' && (C === Array || _isArray(C.prototype))) C = undefined;
  8147. if (_isObject(C)) {
  8148. C = C[SPECIES$1];
  8149. if (C === null) C = undefined;
  8150. }
  8151. }return C === undefined ? Array : C;
  8152. };
  8153. // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
  8154. var _arraySpeciesCreate = function _arraySpeciesCreate(original, length) {
  8155. return new (_arraySpeciesConstructor(original))(length);
  8156. };
  8157. // 0 -> Array#forEach
  8158. // 1 -> Array#map
  8159. // 2 -> Array#filter
  8160. // 3 -> Array#some
  8161. // 4 -> Array#every
  8162. // 5 -> Array#find
  8163. // 6 -> Array#findIndex
  8164. var _arrayMethods = function _arrayMethods(TYPE, $create) {
  8165. var IS_MAP = TYPE == 1;
  8166. var IS_FILTER = TYPE == 2;
  8167. var IS_SOME = TYPE == 3;
  8168. var IS_EVERY = TYPE == 4;
  8169. var IS_FIND_INDEX = TYPE == 6;
  8170. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  8171. var create = $create || _arraySpeciesCreate;
  8172. return function ($this, callbackfn, that) {
  8173. var O = _toObject($this);
  8174. var self = _iobject(O);
  8175. var f = _ctx(callbackfn, that, 3);
  8176. var length = _toLength(self.length);
  8177. var index = 0;
  8178. var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  8179. var val, res;
  8180. for (; length > index; index++) {
  8181. if (NO_HOLES || index in self) {
  8182. val = self[index];
  8183. res = f(val, index, O);
  8184. if (TYPE) {
  8185. if (IS_MAP) result[index] = res; // map
  8186. else if (res) switch (TYPE) {
  8187. case 3:
  8188. return true; // some
  8189. case 5:
  8190. return val; // find
  8191. case 6:
  8192. return index; // findIndex
  8193. case 2:
  8194. result.push(val); // filter
  8195. } else if (IS_EVERY) return false; // every
  8196. }
  8197. }
  8198. }return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  8199. };
  8200. };
  8201. var f$3 = Object.getOwnPropertySymbols;
  8202. var _objectGops = {
  8203. f: f$3
  8204. };
  8205. // 19.1.2.1 Object.assign(target, source, ...)
  8206. var $assign = Object.assign;
  8207. // should work with symbols and should have deterministic property order (V8 bug)
  8208. var _objectAssign = !$assign || _fails(function () {
  8209. var A = {};
  8210. var B = {};
  8211. // eslint-disable-next-line no-undef
  8212. var S = Symbol();
  8213. var K = 'abcdefghijklmnopqrst';
  8214. A[S] = 7;
  8215. K.split('').forEach(function (k) {
  8216. B[k] = k;
  8217. });
  8218. return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
  8219. }) ? function assign(target, source) {
  8220. // eslint-disable-line no-unused-vars
  8221. var T = _toObject(target);
  8222. var aLen = arguments.length;
  8223. var index = 1;
  8224. var getSymbols = _objectGops.f;
  8225. var isEnum = _objectPie.f;
  8226. while (aLen > index) {
  8227. var S = _iobject(arguments[index++]);
  8228. var keys = getSymbols ? _objectKeys(S).concat(getSymbols(S)) : _objectKeys(S);
  8229. var length = keys.length;
  8230. var j = 0;
  8231. var key;
  8232. while (length > j) {
  8233. if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  8234. }
  8235. }return T;
  8236. } : $assign;
  8237. var getWeak = _meta.getWeak;
  8238. var arrayFind = _arrayMethods(5);
  8239. var arrayFindIndex = _arrayMethods(6);
  8240. var id$1 = 0;
  8241. // fallback for uncaught frozen keys
  8242. var uncaughtFrozenStore = function uncaughtFrozenStore(that) {
  8243. return that._l || (that._l = new UncaughtFrozenStore());
  8244. };
  8245. var UncaughtFrozenStore = function UncaughtFrozenStore() {
  8246. this.a = [];
  8247. };
  8248. var findUncaughtFrozen = function findUncaughtFrozen(store, key) {
  8249. return arrayFind(store.a, function (it) {
  8250. return it[0] === key;
  8251. });
  8252. };
  8253. UncaughtFrozenStore.prototype = {
  8254. get: function get(key) {
  8255. var entry = findUncaughtFrozen(this, key);
  8256. if (entry) return entry[1];
  8257. },
  8258. has: function has(key) {
  8259. return !!findUncaughtFrozen(this, key);
  8260. },
  8261. set: function set(key, value) {
  8262. var entry = findUncaughtFrozen(this, key);
  8263. if (entry) entry[1] = value;else this.a.push([key, value]);
  8264. },
  8265. 'delete': function _delete(key) {
  8266. var index = arrayFindIndex(this.a, function (it) {
  8267. return it[0] === key;
  8268. });
  8269. if (~index) this.a.splice(index, 1);
  8270. return !!~index;
  8271. }
  8272. };
  8273. var _collectionWeak = {
  8274. getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) {
  8275. var C = wrapper(function (that, iterable) {
  8276. _anInstance(that, C, NAME, '_i');
  8277. that._t = NAME; // collection type
  8278. that._i = id$1++; // collection id
  8279. that._l = undefined; // leak store for uncaught frozen objects
  8280. if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
  8281. });
  8282. _redefineAll(C.prototype, {
  8283. // 23.3.3.2 WeakMap.prototype.delete(key)
  8284. // 23.4.3.3 WeakSet.prototype.delete(value)
  8285. 'delete': function _delete(key) {
  8286. if (!_isObject(key)) return false;
  8287. var data = getWeak(key);
  8288. if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME))['delete'](key);
  8289. return data && _has(data, this._i) && delete data[this._i];
  8290. },
  8291. // 23.3.3.4 WeakMap.prototype.has(key)
  8292. // 23.4.3.4 WeakSet.prototype.has(value)
  8293. has: function has(key) {
  8294. if (!_isObject(key)) return false;
  8295. var data = getWeak(key);
  8296. if (data === true) return uncaughtFrozenStore(_validateCollection(this, NAME)).has(key);
  8297. return data && _has(data, this._i);
  8298. }
  8299. });
  8300. return C;
  8301. },
  8302. def: function def(that, key, value) {
  8303. var data = getWeak(_anObject(key), true);
  8304. if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value;
  8305. return that;
  8306. },
  8307. ufstore: uncaughtFrozenStore
  8308. };
  8309. var es6_weakMap = createCommonjsModule(function (module) {
  8310. var each = _arrayMethods(0);
  8311. var WEAK_MAP = 'WeakMap';
  8312. var getWeak = _meta.getWeak;
  8313. var isExtensible = Object.isExtensible;
  8314. var uncaughtFrozenStore = _collectionWeak.ufstore;
  8315. var tmp = {};
  8316. var InternalMap;
  8317. var wrapper = function wrapper(get) {
  8318. return function WeakMap() {
  8319. return get(this, arguments.length > 0 ? arguments[0] : undefined);
  8320. };
  8321. };
  8322. var methods = {
  8323. // 23.3.3.3 WeakMap.prototype.get(key)
  8324. get: function get(key) {
  8325. if (_isObject(key)) {
  8326. var data = getWeak(key);
  8327. if (data === true) return uncaughtFrozenStore(_validateCollection(this, WEAK_MAP)).get(key);
  8328. return data ? data[this._i] : undefined;
  8329. }
  8330. },
  8331. // 23.3.3.5 WeakMap.prototype.set(key, value)
  8332. set: function set(key, value) {
  8333. return _collectionWeak.def(_validateCollection(this, WEAK_MAP), key, value);
  8334. }
  8335. };
  8336. // 23.3 WeakMap Objects
  8337. var $WeakMap = module.exports = _collection(WEAK_MAP, wrapper, methods, _collectionWeak, true, true);
  8338. // IE11 WeakMap frozen keys fix
  8339. if (_fails(function () {
  8340. return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7;
  8341. })) {
  8342. InternalMap = _collectionWeak.getConstructor(wrapper, WEAK_MAP);
  8343. _objectAssign(InternalMap.prototype, methods);
  8344. _meta.NEED = true;
  8345. each(['delete', 'has', 'get', 'set'], function (key) {
  8346. var proto = $WeakMap.prototype;
  8347. var method = proto[key];
  8348. _redefine(proto, key, function (a, b) {
  8349. // store frozen objects on internal weakmap shim
  8350. if (_isObject(a) && !isExtensible(a)) {
  8351. if (!this._f) this._f = new InternalMap();
  8352. var result = this._f[key](a, b);
  8353. return key == 'set' ? this : result;
  8354. // store all the rest on native weakmap
  8355. }return method.call(this, a, b);
  8356. });
  8357. });
  8358. }
  8359. });
  8360. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
  8361. _setCollectionOf('WeakMap');
  8362. // https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
  8363. _setCollectionFrom('WeakMap');
  8364. var weakMap = _core.WeakMap;
  8365. var _createProperty = function _createProperty(object, index, value) {
  8366. if (index in object) _objectDp.f(object, index, _propertyDesc(0, value));else object[index] = value;
  8367. };
  8368. _export(_export.S + _export.F * !_iterDetect(function (iter) {
  8369. }), 'Array', {
  8370. // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  8371. from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  8372. var O = _toObject(arrayLike);
  8373. var C = typeof this == 'function' ? this : Array;
  8374. var aLen = arguments.length;
  8375. var mapfn = aLen > 1 ? arguments[1] : undefined;
  8376. var mapping = mapfn !== undefined;
  8377. var index = 0;
  8378. var iterFn = core_getIteratorMethod(O);
  8379. var length, result, step, iterator;
  8380. if (mapping) mapfn = _ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
  8381. // if object isn't iterable or it's array with default iterator - use simple case
  8382. if (iterFn != undefined && !(C == Array && _isArrayIter(iterFn))) {
  8383. for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
  8384. _createProperty(result, index, mapping ? _iterCall(iterator, mapfn, [step.value, index], true) : step.value);
  8385. }
  8386. } else {
  8387. length = _toLength(O.length);
  8388. for (result = new C(length); length > index; index++) {
  8389. _createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
  8390. }
  8391. }
  8392. result.length = index;
  8393. return result;
  8394. }
  8395. });
  8396. var from$1 = _core.Array.from;
  8397. var reservedTagList = new Set(['annotation-xml', 'color-profile', 'font-face', 'font-face-src', 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph']);
  8398. /**
  8399. * @param {string} localName
  8400. * @returns {boolean}
  8401. */
  8402. function isValidCustomElementName(localName) {
  8403. var reserved = reservedTagList.has(localName);
  8404. var validForm = /^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(localName);
  8405. return !reserved && validForm;
  8406. }
  8407. /**
  8408. * @private
  8409. * @param {!Node} node
  8410. * @return {boolean}
  8411. */
  8412. function isConnected(node) {
  8413. // Use `Node#isConnected`, if defined.
  8414. var nativeValue = node.isConnected;
  8415. if (nativeValue !== undefined) {
  8416. return nativeValue;
  8417. }
  8418. /** @type {?Node|undefined} */
  8419. var current = node;
  8420. while (current && !(current.__CE_isImportDocument || current instanceof Document)) {
  8421. current = current.parentNode || (window.ShadowRoot && current instanceof ShadowRoot ? current.host : undefined);
  8422. }
  8423. return !!(current && (current.__CE_isImportDocument || current instanceof Document));
  8424. }
  8425. /**
  8426. * @param {!Node} root
  8427. * @param {!Node} start
  8428. * @return {?Node}
  8429. */
  8430. function nextSiblingOrAncestorSibling(root, start) {
  8431. var node = start;
  8432. while (node && node !== root && !node.nextSibling) {
  8433. node = node.parentNode;
  8434. }
  8435. return !node || node === root ? null : node.nextSibling;
  8436. }
  8437. /**
  8438. * @param {!Node} root
  8439. * @param {!Node} start
  8440. * @return {?Node}
  8441. */
  8442. function nextNode(root, start) {
  8443. return start.firstChild ? start.firstChild : nextSiblingOrAncestorSibling(root, start);
  8444. }
  8445. /**
  8446. * @param {!Node} root
  8447. * @param {!function(!Element)} callback
  8448. * @param {!Set<Node>=} visitedImports
  8449. */
  8450. function walkDeepDescendantElements(root, callback) {
  8451. var visitedImports = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Set();
  8452. var node = root;
  8453. while (node) {
  8454. if (node.nodeType === Node.ELEMENT_NODE) {
  8455. var element = /** @type {!Element} */node;
  8456. callback(element);
  8457. var localName = element.localName;
  8458. if (localName === 'link' && element.getAttribute('rel') === 'import') {
  8459. // If this import (polyfilled or not) has it's root node available,
  8460. // walk it.
  8461. var importNode = /** @type {!Node} */element.import;
  8462. if (importNode instanceof Node && !visitedImports.has(importNode)) {
  8463. // Prevent multiple walks of the same import root.
  8464. visitedImports.add(importNode);
  8465. for (var child = importNode.firstChild; child; child = child.nextSibling) {
  8466. walkDeepDescendantElements(child, callback, visitedImports);
  8467. }
  8468. }
  8469. // Ignore descendants of import links to prevent attempting to walk the
  8470. // elements created by the HTML Imports polyfill that we just walked
  8471. // above.
  8472. node = nextSiblingOrAncestorSibling(root, element);
  8473. continue;
  8474. } else if (localName === 'template') {
  8475. // Ignore descendants of templates. There shouldn't be any descendants
  8476. // because they will be moved into `.content` during construction in
  8477. // browsers that support template but, in case they exist and are still
  8478. // waiting to be moved by a polyfill, they will be ignored.
  8479. node = nextSiblingOrAncestorSibling(root, element);
  8480. continue;
  8481. }
  8482. // Walk shadow roots.
  8483. var shadowRoot = element.__CE_shadowRoot;
  8484. if (shadowRoot) {
  8485. for (var _child = shadowRoot.firstChild; _child; _child = _child.nextSibling) {
  8486. walkDeepDescendantElements(_child, callback, visitedImports);
  8487. }
  8488. }
  8489. }
  8490. node = nextNode(root, node);
  8491. }
  8492. }
  8493. /**
  8494. * Used to suppress Closure's "Modifying the prototype is only allowed if the
  8495. * constructor is in the same scope" warning without using
  8496. * `@suppress {newCheckTypes, duplicate}` because `newCheckTypes` is too broad.
  8497. *
  8498. * @param {!Object} destination
  8499. * @param {string} name
  8500. * @param {*} value
  8501. */
  8502. function setPropertyUnchecked(destination, name, value) {
  8503. destination[name] = value;
  8504. }
  8505. /**
  8506. * @enum {number}
  8507. */
  8508. var CustomElementState = {
  8509. custom: 1,
  8510. failed: 2
  8511. };
  8512. var CustomElementInternals = function () {
  8513. function CustomElementInternals() {
  8514. classCallCheck(this, CustomElementInternals);
  8515. /** @type {!Map<string, !CustomElementDefinition>} */
  8516. this._localNameToDefinition = new Map();
  8517. /** @type {!Map<!Function, !CustomElementDefinition>} */
  8518. this._constructorToDefinition = new Map();
  8519. /** @type {!Array<!function(!Node)>} */
  8520. this._patches = [];
  8521. /** @type {boolean} */
  8522. this._hasPatches = false;
  8523. }
  8524. /**
  8525. * @param {string} localName
  8526. * @param {!CustomElementDefinition} definition
  8527. */
  8528. createClass(CustomElementInternals, [{
  8529. key: 'setDefinition',
  8530. value: function setDefinition(localName, definition) {
  8531. this._localNameToDefinition.set(localName, definition);
  8532. this._constructorToDefinition.set(definition.constructor, definition);
  8533. }
  8534. /**
  8535. * @param {string} localName
  8536. * @return {!CustomElementDefinition|undefined}
  8537. */
  8538. }, {
  8539. key: 'localNameToDefinition',
  8540. value: function localNameToDefinition(localName) {
  8541. return this._localNameToDefinition.get(localName);
  8542. }
  8543. /**
  8544. * @param {!Function} constructor
  8545. * @return {!CustomElementDefinition|undefined}
  8546. */
  8547. }, {
  8548. key: 'constructorToDefinition',
  8549. value: function constructorToDefinition(constructor) {
  8550. return this._constructorToDefinition.get(constructor);
  8551. }
  8552. /**
  8553. * @param {!function(!Node)} listener
  8554. */
  8555. }, {
  8556. key: 'addPatch',
  8557. value: function addPatch(listener) {
  8558. this._hasPatches = true;
  8559. this._patches.push(listener);
  8560. }
  8561. /**
  8562. * @param {!Node} node
  8563. */
  8564. }, {
  8565. key: 'patchTree',
  8566. value: function patchTree(node) {
  8567. var _this = this;
  8568. if (!this._hasPatches) return;
  8569. walkDeepDescendantElements(node, function (element) {
  8570. return _this.patch(element);
  8571. });
  8572. }
  8573. /**
  8574. * @param {!Node} node
  8575. */
  8576. }, {
  8577. key: 'patch',
  8578. value: function patch(node) {
  8579. if (!this._hasPatches) return;
  8580. if (node.__CE_patched) return;
  8581. node.__CE_patched = true;
  8582. for (var i = 0; i < this._patches.length; i++) {
  8583. this._patches[i](node);
  8584. }
  8585. }
  8586. /**
  8587. * @param {!Node} root
  8588. */
  8589. }, {
  8590. key: 'connectTree',
  8591. value: function connectTree(root) {
  8592. var elements = [];
  8593. walkDeepDescendantElements(root, function (element) {
  8594. return elements.push(element);
  8595. });
  8596. for (var i = 0; i < elements.length; i++) {
  8597. var element = elements[i];
  8598. if (element.__CE_state === CustomElementState.custom) {
  8599. if (isConnected(element)) {
  8600. this.connectedCallback(element);
  8601. }
  8602. } else {
  8603. this.upgradeElement(element);
  8604. }
  8605. }
  8606. }
  8607. /**
  8608. * @param {!Node} root
  8609. */
  8610. }, {
  8611. key: 'disconnectTree',
  8612. value: function disconnectTree(root) {
  8613. var elements = [];
  8614. walkDeepDescendantElements(root, function (element) {
  8615. return elements.push(element);
  8616. });
  8617. for (var i = 0; i < elements.length; i++) {
  8618. var element = elements[i];
  8619. if (element.__CE_state === CustomElementState.custom) {
  8620. this.disconnectedCallback(element);
  8621. }
  8622. }
  8623. }
  8624. /**
  8625. * Upgrades all uncustomized custom elements at and below a root node for
  8626. * which there is a definition. When custom element reaction callbacks are
  8627. * assumed to be called synchronously (which, by the current DOM / HTML spec
  8628. * definitions, they are *not*), callbacks for both elements customized
  8629. * synchronously by the parser and elements being upgraded occur in the same
  8630. * relative order.
  8631. *
  8632. * NOTE: This function, when used to simulate the construction of a tree that
  8633. * is already created but not customized (i.e. by the parser), does *not*
  8634. * prevent the element from reading the 'final' (true) state of the tree. For
  8635. * example, the element, during truly synchronous parsing / construction would
  8636. * see that it contains no children as they have not yet been inserted.
  8637. * However, this function does not modify the tree, the element will
  8638. * (incorrectly) have children. Additionally, self-modification restrictions
  8639. * for custom element constructors imposed by the DOM spec are *not* enforced.
  8640. *
  8641. *
  8642. * The following nested list shows the steps extending down from the HTML
  8643. * spec's parsing section that cause elements to be synchronously created and
  8644. * upgraded:
  8645. *
  8646. * The "in body" insertion mode:
  8647. * https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
  8648. * - Switch on token:
  8649. * .. other cases ..
  8650. * -> Any other start tag
  8651. * - [Insert an HTML element](below) for the token.
  8652. *
  8653. * Insert an HTML element:
  8654. * https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element
  8655. * - Insert a foreign element for the token in the HTML namespace:
  8656. * https://html.spec.whatwg.org/multipage/syntax.html#insert-a-foreign-element
  8657. * - Create an element for a token:
  8658. * https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token
  8659. * - Will execute script flag is true?
  8660. * - (Element queue pushed to the custom element reactions stack.)
  8661. * - Create an element:
  8662. * https://dom.spec.whatwg.org/#concept-create-element
  8663. * - Sync CE flag is true?
  8664. * - Constructor called.
  8665. * - Self-modification restrictions enforced.
  8666. * - Sync CE flag is false?
  8667. * - (Upgrade reaction enqueued.)
  8668. * - Attributes appended to element.
  8669. * (`attributeChangedCallback` reactions enqueued.)
  8670. * - Will execute script flag is true?
  8671. * - (Element queue popped from the custom element reactions stack.
  8672. * Reactions in the popped stack are invoked.)
  8673. * - (Element queue pushed to the custom element reactions stack.)
  8674. * - Insert the element:
  8675. * https://dom.spec.whatwg.org/#concept-node-insert
  8676. * - Shadow-including descendants are connected. During parsing
  8677. * construction, there are no shadow-*excluding* descendants.
  8678. * However, the constructor may have validly attached a shadow
  8679. * tree to itself and added descendants to that shadow tree.
  8680. * (`connectedCallback` reactions enqueued.)
  8681. * - (Element queue popped from the custom element reactions stack.
  8682. * Reactions in the popped stack are invoked.)
  8683. *
  8684. * @param {!Node} root
  8685. * @param {!Set<Node>=} visitedImports
  8686. */
  8687. }, {
  8688. key: 'patchAndUpgradeTree',
  8689. value: function patchAndUpgradeTree(root) {
  8690. var _this2 = this;
  8691. var visitedImports = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();
  8692. var elements = [];
  8693. var gatherElements = function gatherElements(element) {
  8694. if (element.localName === 'link' && element.getAttribute('rel') === 'import') {
  8695. // The HTML Imports polyfill sets a descendant element of the link to
  8696. // the `import` property, specifically this is *not* a Document.
  8697. var importNode = /** @type {?Node} */element.import;
  8698. if (importNode instanceof Node && importNode.readyState === 'complete') {
  8699. importNode.__CE_isImportDocument = true;
  8700. // Connected links are associated with the registry.
  8701. importNode.__CE_hasRegistry = true;
  8702. } else {
  8703. // If this link's import root is not available, its contents can't be
  8704. // walked. Wait for 'load' and walk it when it's ready.
  8705. element.addEventListener('load', function () {
  8706. var importNode = /** @type {!Node} */element.import;
  8707. if (importNode.__CE_documentLoadHandled) return;
  8708. importNode.__CE_documentLoadHandled = true;
  8709. importNode.__CE_isImportDocument = true;
  8710. // Connected links are associated with the registry.
  8711. importNode.__CE_hasRegistry = true;
  8712. // Clone the `visitedImports` set that was populated sync during
  8713. // the `patchAndUpgradeTree` call that caused this 'load' handler to
  8714. // be added. Then, remove *this* link's import node so that we can
  8715. // walk that import again, even if it was partially walked later
  8716. // during the same `patchAndUpgradeTree` call.
  8717. visitedImports.delete(importNode);
  8718. _this2.patchAndUpgradeTree(importNode, visitedImports);
  8719. });
  8720. }
  8721. } else {
  8722. elements.push(element);
  8723. }
  8724. };
  8725. // `walkDeepDescendantElements` populates (and internally checks against)
  8726. // `visitedImports` when traversing a loaded import.
  8727. walkDeepDescendantElements(root, gatherElements, visitedImports);
  8728. if (this._hasPatches) {
  8729. for (var i = 0; i < elements.length; i++) {
  8730. this.patch(elements[i]);
  8731. }
  8732. }
  8733. for (var _i = 0; _i < elements.length; _i++) {
  8734. this.upgradeElement(elements[_i]);
  8735. }
  8736. }
  8737. /**
  8738. * @param {!Element} element
  8739. */
  8740. }, {
  8741. key: 'upgradeElement',
  8742. value: function upgradeElement(element) {
  8743. var currentState = element.__CE_state;
  8744. if (currentState !== undefined) return;
  8745. var definition = this.localNameToDefinition(element.localName);
  8746. if (!definition) return;
  8747. definition.constructionStack.push(element);
  8748. var constructor = definition.constructor;
  8749. try {
  8750. try {
  8751. var result = new constructor();
  8752. if (result !== element) {
  8753. throw new Error('The custom element constructor did not produce the element being upgraded.');
  8754. }
  8755. } finally {
  8756. definition.constructionStack.pop();
  8757. }
  8758. } catch (e) {
  8759. element.__CE_state = CustomElementState.failed;
  8760. throw e;
  8761. }
  8762. element.__CE_state = CustomElementState.custom;
  8763. element.__CE_definition = definition;
  8764. if (definition.attributeChangedCallback) {
  8765. var observedAttributes = definition.observedAttributes;
  8766. for (var i = 0; i < observedAttributes.length; i++) {
  8767. var name = observedAttributes[i];
  8768. var value = element.getAttribute(name);
  8769. if (value !== null) {
  8770. this.attributeChangedCallback(element, name, null, value, null);
  8771. }
  8772. }
  8773. }
  8774. if (isConnected(element)) {
  8775. this.connectedCallback(element);
  8776. }
  8777. }
  8778. /**
  8779. * @param {!Element} element
  8780. */
  8781. }, {
  8782. key: 'connectedCallback',
  8783. value: function connectedCallback(element) {
  8784. var definition = element.__CE_definition;
  8785. if (definition.connectedCallback) {
  8786. definition.connectedCallback.call(element);
  8787. }
  8788. element.__CE_isConnectedCallbackCalled = true;
  8789. }
  8790. /**
  8791. * @param {!Element} element
  8792. */
  8793. }, {
  8794. key: 'disconnectedCallback',
  8795. value: function disconnectedCallback(element) {
  8796. if (!element.__CE_isConnectedCallbackCalled) {
  8797. this.connectedCallback(element);
  8798. }
  8799. var definition = element.__CE_definition;
  8800. if (definition.disconnectedCallback) {
  8801. definition.disconnectedCallback.call(element);
  8802. }
  8803. element.__CE_isConnectedCallbackCalled = undefined;
  8804. }
  8805. /**
  8806. * @param {!Element} element
  8807. * @param {string} name
  8808. * @param {?string} oldValue
  8809. * @param {?string} newValue
  8810. * @param {?string} namespace
  8811. */
  8812. }, {
  8813. key: 'attributeChangedCallback',
  8814. value: function attributeChangedCallback(element, name, oldValue, newValue, namespace) {
  8815. var definition = element.__CE_definition;
  8816. if (definition.attributeChangedCallback && definition.observedAttributes.indexOf(name) > -1) {
  8817. definition.attributeChangedCallback.call(element, name, oldValue, newValue, namespace);
  8818. }
  8819. }
  8820. }]);
  8821. return CustomElementInternals;
  8822. }();
  8823. var DocumentConstructionObserver = function () {
  8824. function DocumentConstructionObserver(internals, doc) {
  8825. classCallCheck(this, DocumentConstructionObserver);
  8826. /**
  8827. * @type {!CustomElementInternals}
  8828. */
  8829. this._internals = internals;
  8830. /**
  8831. * @type {!Document}
  8832. */
  8833. this._document = doc;
  8834. /**
  8835. * @type {MutationObserver|undefined}
  8836. */
  8837. this._observer = undefined;
  8838. // Simulate tree construction for all currently accessible nodes in the
  8839. // document.
  8840. this._internals.patchAndUpgradeTree(this._document);
  8841. if (this._document.readyState === 'loading') {
  8842. this._observer = new MutationObserver(this._handleMutations.bind(this));
  8843. // Nodes created by the parser are given to the observer *before* the next
  8844. // task runs. Inline scripts are run in a new task. This means that the
  8845. // observer will be able to handle the newly parsed nodes before the inline
  8846. // script is run.
  8847. this._observer.observe(this._document, {
  8848. childList: true,
  8849. subtree: true
  8850. });
  8851. }
  8852. }
  8853. createClass(DocumentConstructionObserver, [{
  8854. key: 'disconnect',
  8855. value: function disconnect() {
  8856. if (this._observer) {
  8857. this._observer.disconnect();
  8858. }
  8859. }
  8860. /**
  8861. * @param {!Array<!MutationRecord>} mutations
  8862. */
  8863. }, {
  8864. key: '_handleMutations',
  8865. value: function _handleMutations(mutations) {
  8866. // Once the document's `readyState` is 'interactive' or 'complete', all new
  8867. // nodes created within that document will be the result of script and
  8868. // should be handled by patching.
  8869. var readyState = this._document.readyState;
  8870. if (readyState === 'interactive' || readyState === 'complete') {
  8871. this.disconnect();
  8872. }
  8873. for (var i = 0; i < mutations.length; i++) {
  8874. var addedNodes = mutations[i].addedNodes;
  8875. for (var j = 0; j < addedNodes.length; j++) {
  8876. var node = addedNodes[j];
  8877. this._internals.patchAndUpgradeTree(node);
  8878. }
  8879. }
  8880. }
  8881. }]);
  8882. return DocumentConstructionObserver;
  8883. }();
  8884. /**
  8885. * @template T
  8886. */
  8887. var Deferred = function () {
  8888. function Deferred() {
  8889. var _this = this;
  8890. classCallCheck(this, Deferred);
  8891. /**
  8892. * @private
  8893. * @type {T|undefined}
  8894. */
  8895. this._value = undefined;
  8896. /**
  8897. * @private
  8898. * @type {Function|undefined}
  8899. */
  8900. this._resolve = undefined;
  8901. /**
  8902. * @private
  8903. * @type {!Promise<T>}
  8904. */
  8905. this._promise = new Promise(function (resolve) {
  8906. _this._resolve = resolve;
  8907. if (_this._value) {
  8908. resolve(_this._value);
  8909. }
  8910. });
  8911. }
  8912. /**
  8913. * @param {T} value
  8914. */
  8915. createClass(Deferred, [{
  8916. key: 'resolve',
  8917. value: function resolve(value) {
  8918. if (this._value) {
  8919. throw new Error('Already resolved.');
  8920. }
  8921. this._value = value;
  8922. if (this._resolve) {
  8923. this._resolve(value);
  8924. }
  8925. }
  8926. /**
  8927. * @return {!Promise<T>}
  8928. */
  8929. }, {
  8930. key: 'toPromise',
  8931. value: function toPromise() {
  8932. return this._promise;
  8933. }
  8934. }]);
  8935. return Deferred;
  8936. }();
  8937. /**
  8938. * @unrestricted
  8939. */
  8940. var CustomElementRegistry = function () {
  8941. /**
  8942. * @param {!CustomElementInternals} internals
  8943. */
  8944. function CustomElementRegistry(internals) {
  8945. classCallCheck(this, CustomElementRegistry);
  8946. /**
  8947. * @private
  8948. * @type {boolean}
  8949. */
  8950. this._elementDefinitionIsRunning = false;
  8951. /**
  8952. * @private
  8953. * @type {!CustomElementInternals}
  8954. */
  8955. this._internals = internals;
  8956. /**
  8957. * @private
  8958. * @type {!Map<string, !Deferred<undefined>>}
  8959. */
  8960. this._whenDefinedDeferred = new Map();
  8961. /**
  8962. * The default flush callback triggers the document walk synchronously.
  8963. * @private
  8964. * @type {!Function}
  8965. */
  8966. this._flushCallback = function (fn) {
  8967. return fn();
  8968. };
  8969. /**
  8970. * @private
  8971. * @type {boolean}
  8972. */
  8973. this._flushPending = false;
  8974. /**
  8975. * @private
  8976. * @type {!Array<string>}
  8977. */
  8978. this._unflushedLocalNames = [];
  8979. /**
  8980. * @private
  8981. * @type {!DocumentConstructionObserver}
  8982. */
  8983. this._documentConstructionObserver = new DocumentConstructionObserver(internals, document);
  8984. }
  8985. /**
  8986. * @param {string} localName
  8987. * @param {!Function} constructor
  8988. */
  8989. createClass(CustomElementRegistry, [{
  8990. key: 'define',
  8991. value: function define(localName, constructor) {
  8992. var _this = this;
  8993. if (!(constructor instanceof Function)) {
  8994. throw new TypeError('Custom element constructors must be functions.');
  8995. }
  8996. if (!isValidCustomElementName(localName)) {
  8997. throw new SyntaxError('The element name \'' + localName + '\' is not valid.');
  8998. }
  8999. if (this._internals.localNameToDefinition(localName)) {
  9000. throw new Error('A custom element with name \'' + localName + '\' has already been defined.');
  9001. }
  9002. if (this._elementDefinitionIsRunning) {
  9003. throw new Error('A custom element is already being defined.');
  9004. }
  9005. this._elementDefinitionIsRunning = true;
  9006. var connectedCallback = void 0;
  9007. var disconnectedCallback = void 0;
  9008. var adoptedCallback = void 0;
  9009. var attributeChangedCallback = void 0;
  9010. var observedAttributes = void 0;
  9011. try {
  9012. var getCallback = function getCallback(name) {
  9013. var callbackValue = prototype[name];
  9014. if (callbackValue !== undefined && !(callbackValue instanceof Function)) {
  9015. throw new Error('The \'' + name + '\' callback must be a function.');
  9016. }
  9017. return callbackValue;
  9018. };
  9019. /** @type {!Object} */
  9020. var prototype = constructor.prototype;
  9021. if (!(prototype instanceof Object)) {
  9022. throw new TypeError('The custom element constructor\'s prototype is not an object.');
  9023. }
  9024. connectedCallback = getCallback('connectedCallback');
  9025. disconnectedCallback = getCallback('disconnectedCallback');
  9026. adoptedCallback = getCallback('adoptedCallback');
  9027. attributeChangedCallback = getCallback('attributeChangedCallback');
  9028. observedAttributes = constructor['observedAttributes'] || [];
  9029. } catch (e) {
  9030. return;
  9031. } finally {
  9032. this._elementDefinitionIsRunning = false;
  9033. }
  9034. var definition = {
  9035. localName: localName,
  9036. constructor: constructor,
  9037. connectedCallback: connectedCallback,
  9038. disconnectedCallback: disconnectedCallback,
  9039. adoptedCallback: adoptedCallback,
  9040. attributeChangedCallback: attributeChangedCallback,
  9041. observedAttributes: observedAttributes,
  9042. constructionStack: []
  9043. };
  9044. this._internals.setDefinition(localName, definition);
  9045. this._unflushedLocalNames.push(localName);
  9046. // If we've already called the flush callback and it hasn't called back yet,
  9047. // don't call it again.
  9048. if (!this._flushPending) {
  9049. this._flushPending = true;
  9050. this._flushCallback(function () {
  9051. return _this._flush();
  9052. });
  9053. }
  9054. }
  9055. }, {
  9056. key: '_flush',
  9057. value: function _flush() {
  9058. // If no new definitions were defined, don't attempt to flush. This could
  9059. // happen if a flush callback keeps the function it is given and calls it
  9060. // multiple times.
  9061. if (this._flushPending === false) return;
  9062. this._flushPending = false;
  9063. this._internals.patchAndUpgradeTree(document);
  9064. while (this._unflushedLocalNames.length > 0) {
  9065. var localName = this._unflushedLocalNames.shift();
  9066. var deferred = this._whenDefinedDeferred.get(localName);
  9067. if (deferred) {
  9068. deferred.resolve(undefined);
  9069. }
  9070. }
  9071. }
  9072. /**
  9073. * @param {string} localName
  9074. * @return {Function|undefined}
  9075. */
  9076. }, {
  9077. key: 'get',
  9078. value: function get$$1(localName) {
  9079. var definition = this._internals.localNameToDefinition(localName);
  9080. if (definition) {
  9081. return definition.constructor;
  9082. }
  9083. return undefined;
  9084. }
  9085. /**
  9086. * @param {string} localName
  9087. * @return {!Promise<undefined>}
  9088. */
  9089. }, {
  9090. key: 'whenDefined',
  9091. value: function whenDefined(localName) {
  9092. if (!isValidCustomElementName(localName)) {
  9093. return Promise.reject(new SyntaxError('\'' + localName + '\' is not a valid custom element name.'));
  9094. }
  9095. var prior = this._whenDefinedDeferred.get(localName);
  9096. if (prior) {
  9097. return prior.toPromise();
  9098. }
  9099. var deferred = new Deferred();
  9100. this._whenDefinedDeferred.set(localName, deferred);
  9101. var definition = this._internals.localNameToDefinition(localName);
  9102. // Resolve immediately only if the given local name has a definition *and*
  9103. // the full document walk to upgrade elements with that local name has
  9104. // already happened.
  9105. if (definition && this._unflushedLocalNames.indexOf(localName) === -1) {
  9106. deferred.resolve(undefined);
  9107. }
  9108. return deferred.toPromise();
  9109. }
  9110. }, {
  9111. key: 'polyfillWrapFlushCallback',
  9112. value: function polyfillWrapFlushCallback(outer) {
  9113. this._documentConstructionObserver.disconnect();
  9114. var inner = this._flushCallback;
  9115. this._flushCallback = function (flush) {
  9116. return outer(function () {
  9117. return inner(flush);
  9118. });
  9119. };
  9120. }
  9121. }]);
  9122. return CustomElementRegistry;
  9123. }();
  9124. window['CustomElementRegistry'] = CustomElementRegistry;
  9125. CustomElementRegistry.prototype['define'] = CustomElementRegistry.prototype.define;
  9126. CustomElementRegistry.prototype['get'] = CustomElementRegistry.prototype.get;
  9127. CustomElementRegistry.prototype['whenDefined'] = CustomElementRegistry.prototype.whenDefined;
  9128. CustomElementRegistry.prototype['polyfillWrapFlushCallback'] = CustomElementRegistry.prototype.polyfillWrapFlushCallback;
  9129. var Native = {
  9130. Document_createElement: window.Document.prototype.createElement,
  9131. Document_createElementNS: window.Document.prototype.createElementNS,
  9132. Document_importNode: window.Document.prototype.importNode,
  9133. Document_prepend: window.Document.prototype['prepend'],
  9134. Document_append: window.Document.prototype['append'],
  9135. Node_cloneNode: window.Node.prototype.cloneNode,
  9136. Node_appendChild: window.Node.prototype.appendChild,
  9137. Node_insertBefore: window.Node.prototype.insertBefore,
  9138. Node_removeChild: window.Node.prototype.removeChild,
  9139. Node_replaceChild: window.Node.prototype.replaceChild,
  9140. Node_textContent: Object.getOwnPropertyDescriptor(window.Node.prototype, 'textContent'),
  9141. Element_attachShadow: window.Element.prototype['attachShadow'],
  9142. Element_innerHTML: Object.getOwnPropertyDescriptor(window.Element.prototype, 'innerHTML'),
  9143. Element_getAttribute: window.Element.prototype.getAttribute,
  9144. Element_setAttribute: window.Element.prototype.setAttribute,
  9145. Element_removeAttribute: window.Element.prototype.removeAttribute,
  9146. Element_getAttributeNS: window.Element.prototype.getAttributeNS,
  9147. Element_setAttributeNS: window.Element.prototype.setAttributeNS,
  9148. Element_removeAttributeNS: window.Element.prototype.removeAttributeNS,
  9149. Element_insertAdjacentElement: window.Element.prototype['insertAdjacentElement'],
  9150. Element_prepend: window.Element.prototype['prepend'],
  9151. Element_append: window.Element.prototype['append'],
  9152. Element_before: window.Element.prototype['before'],
  9153. Element_after: window.Element.prototype['after'],
  9154. Element_replaceWith: window.Element.prototype['replaceWith'],
  9155. Element_remove: window.Element.prototype['remove'],
  9156. HTMLElement: window.HTMLElement,
  9157. HTMLElement_innerHTML: Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, 'innerHTML'),
  9158. HTMLElement_insertAdjacentElement: window.HTMLElement.prototype['insertAdjacentElement']
  9159. };
  9160. /**
  9161. * This class exists only to work around Closure's lack of a way to describe
  9162. * singletons. It represents the 'already constructed marker' used in custom
  9163. * element construction stacks.
  9164. *
  9165. * https://html.spec.whatwg.org/#concept-already-constructed-marker
  9166. */
  9167. var AlreadyConstructedMarker = function AlreadyConstructedMarker() {
  9168. classCallCheck(this, AlreadyConstructedMarker);
  9169. };
  9170. var AlreadyConstructedMarker$1 = new AlreadyConstructedMarker();
  9171. /**
  9172. * @param {!CustomElementInternals} internals
  9173. */
  9174. var PatchHTMLElement = function (internals) {
  9175. window['HTMLElement'] = function () {
  9176. /**
  9177. * @type {function(new: HTMLElement): !HTMLElement}
  9178. */
  9179. function HTMLElement() {
  9180. // This should really be `new.target` but `new.target` can't be emulated
  9181. // in ES5. Assuming the user keeps the default value of the constructor's
  9182. // prototype's `constructor` property, this is equivalent.
  9183. /** @type {!Function} */
  9184. var constructor = this.constructor;
  9185. var definition = internals.constructorToDefinition(constructor);
  9186. if (!definition) {
  9187. throw new Error('The custom element being constructed was not registered with `customElements`.');
  9188. }
  9189. var constructionStack = definition.constructionStack;
  9190. if (constructionStack.length === 0) {
  9191. var _element = Native.Document_createElement.call(document, definition.localName);
  9192. Object.setPrototypeOf(_element, constructor.prototype);
  9193. _element.__CE_state = CustomElementState.custom;
  9194. _element.__CE_definition = definition;
  9195. internals.patch(_element);
  9196. return _element;
  9197. }
  9198. var lastIndex = constructionStack.length - 1;
  9199. var element = constructionStack[lastIndex];
  9200. if (element === AlreadyConstructedMarker$1) {
  9201. throw new Error('The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.');
  9202. }
  9203. constructionStack[lastIndex] = AlreadyConstructedMarker$1;
  9204. Object.setPrototypeOf(element, constructor.prototype);
  9205. internals.patch( /** @type {!HTMLElement} */element);
  9206. return element;
  9207. }
  9208. HTMLElement.prototype = Native.HTMLElement.prototype;
  9209. return HTMLElement;
  9210. }();
  9211. };
  9212. /**
  9213. * @param {!CustomElementInternals} internals
  9214. * @param {!Object} destination
  9215. * @param {!ParentNodeNativeMethods} builtIn
  9216. */
  9217. var PatchParentNode = function (internals, destination, builtIn) {
  9218. /**
  9219. * @param {...(!Node|string)} nodes
  9220. */
  9221. destination['prepend'] = function () {
  9222. for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
  9223. nodes[_key] = arguments[_key];
  9224. }
  9225. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9226. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9227. // DocumentFragments are not connected and will not be added to the list.
  9228. return node instanceof Node && isConnected(node);
  9229. });
  9230. builtIn.prepend.apply(this, nodes);
  9231. for (var i = 0; i < connectedBefore.length; i++) {
  9232. internals.disconnectTree(connectedBefore[i]);
  9233. }
  9234. if (isConnected(this)) {
  9235. for (var _i = 0; _i < nodes.length; _i++) {
  9236. var node = nodes[_i];
  9237. if (node instanceof Element) {
  9238. internals.connectTree(node);
  9239. }
  9240. }
  9241. }
  9242. };
  9243. /**
  9244. * @param {...(!Node|string)} nodes
  9245. */
  9246. destination['append'] = function () {
  9247. for (var _len2 = arguments.length, nodes = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  9248. nodes[_key2] = arguments[_key2];
  9249. }
  9250. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9251. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9252. // DocumentFragments are not connected and will not be added to the list.
  9253. return node instanceof Node && isConnected(node);
  9254. });
  9255. builtIn.append.apply(this, nodes);
  9256. for (var i = 0; i < connectedBefore.length; i++) {
  9257. internals.disconnectTree(connectedBefore[i]);
  9258. }
  9259. if (isConnected(this)) {
  9260. for (var _i2 = 0; _i2 < nodes.length; _i2++) {
  9261. var node = nodes[_i2];
  9262. if (node instanceof Element) {
  9263. internals.connectTree(node);
  9264. }
  9265. }
  9266. }
  9267. };
  9268. };
  9269. /**
  9270. * @param {!CustomElementInternals} internals
  9271. */
  9272. var PatchDocument = function (internals) {
  9273. setPropertyUnchecked(Document.prototype, 'createElement',
  9274. /**
  9275. * @this {Document}
  9276. * @param {string} localName
  9277. * @return {!Element}
  9278. */
  9279. function (localName) {
  9280. // Only create custom elements if this document is associated with the registry.
  9281. if (this.__CE_hasRegistry) {
  9282. var definition = internals.localNameToDefinition(localName);
  9283. if (definition) {
  9284. return new definition.constructor();
  9285. }
  9286. }
  9287. var result = /** @type {!Element} */
  9288. Native.Document_createElement.call(this, localName);
  9289. internals.patch(result);
  9290. return result;
  9291. });
  9292. setPropertyUnchecked(Document.prototype, 'importNode',
  9293. /**
  9294. * @this {Document}
  9295. * @param {!Node} node
  9296. * @param {boolean=} deep
  9297. * @return {!Node}
  9298. */
  9299. function (node, deep) {
  9300. var clone = Native.Document_importNode.call(this, node, deep);
  9301. // Only create custom elements if this document is associated with the registry.
  9302. if (!this.__CE_hasRegistry) {
  9303. internals.patchTree(clone);
  9304. } else {
  9305. internals.patchAndUpgradeTree(clone);
  9306. }
  9307. return clone;
  9308. });
  9309. var NS_HTML = "http://www.w3.org/1999/xhtml";
  9310. setPropertyUnchecked(Document.prototype, 'createElementNS',
  9311. /**
  9312. * @this {Document}
  9313. * @param {?string} namespace
  9314. * @param {string} localName
  9315. * @return {!Element}
  9316. */
  9317. function (namespace, localName) {
  9318. // Only create custom elements if this document is associated with the registry.
  9319. if (this.__CE_hasRegistry && (namespace === null || namespace === NS_HTML)) {
  9320. var definition = internals.localNameToDefinition(localName);
  9321. if (definition) {
  9322. return new definition.constructor();
  9323. }
  9324. }
  9325. var result = /** @type {!Element} */
  9326. Native.Document_createElementNS.call(this, namespace, localName);
  9327. internals.patch(result);
  9328. return result;
  9329. });
  9330. PatchParentNode(internals, Document.prototype, {
  9331. prepend: Native.Document_prepend,
  9332. append: Native.Document_append
  9333. });
  9334. };
  9335. /**
  9336. * @param {!CustomElementInternals} internals
  9337. */
  9338. var PatchNode = function (internals) {
  9339. // `Node#nodeValue` is implemented on `Attr`.
  9340. // `Node#textContent` is implemented on `Attr`, `Element`.
  9341. setPropertyUnchecked(Node.prototype, 'insertBefore',
  9342. /**
  9343. * @this {Node}
  9344. * @param {!Node} node
  9345. * @param {?Node} refNode
  9346. * @return {!Node}
  9347. */
  9348. function (node, refNode) {
  9349. if (node instanceof DocumentFragment) {
  9350. var insertedNodes = Array.prototype.slice.apply(node.childNodes);
  9351. var _nativeResult = Native.Node_insertBefore.call(this, node, refNode);
  9352. // DocumentFragments can't be connected, so `disconnectTree` will never
  9353. // need to be called on a DocumentFragment's children after inserting it.
  9354. if (isConnected(this)) {
  9355. for (var i = 0; i < insertedNodes.length; i++) {
  9356. internals.connectTree(insertedNodes[i]);
  9357. }
  9358. }
  9359. return _nativeResult;
  9360. }
  9361. var nodeWasConnected = isConnected(node);
  9362. var nativeResult = Native.Node_insertBefore.call(this, node, refNode);
  9363. if (nodeWasConnected) {
  9364. internals.disconnectTree(node);
  9365. }
  9366. if (isConnected(this)) {
  9367. internals.connectTree(node);
  9368. }
  9369. return nativeResult;
  9370. });
  9371. setPropertyUnchecked(Node.prototype, 'appendChild',
  9372. /**
  9373. * @this {Node}
  9374. * @param {!Node} node
  9375. * @return {!Node}
  9376. */
  9377. function (node) {
  9378. if (node instanceof DocumentFragment) {
  9379. var insertedNodes = Array.prototype.slice.apply(node.childNodes);
  9380. var _nativeResult2 = Native.Node_appendChild.call(this, node);
  9381. // DocumentFragments can't be connected, so `disconnectTree` will never
  9382. // need to be called on a DocumentFragment's children after inserting it.
  9383. if (isConnected(this)) {
  9384. for (var i = 0; i < insertedNodes.length; i++) {
  9385. internals.connectTree(insertedNodes[i]);
  9386. }
  9387. }
  9388. return _nativeResult2;
  9389. }
  9390. var nodeWasConnected = isConnected(node);
  9391. var nativeResult = Native.Node_appendChild.call(this, node);
  9392. if (nodeWasConnected) {
  9393. internals.disconnectTree(node);
  9394. }
  9395. if (isConnected(this)) {
  9396. internals.connectTree(node);
  9397. }
  9398. return nativeResult;
  9399. });
  9400. setPropertyUnchecked(Node.prototype, 'cloneNode',
  9401. /**
  9402. * @this {Node}
  9403. * @param {boolean=} deep
  9404. * @return {!Node}
  9405. */
  9406. function (deep) {
  9407. var clone = Native.Node_cloneNode.call(this, deep);
  9408. // Only create custom elements if this element's owner document is
  9409. // associated with the registry.
  9410. if (!this.ownerDocument.__CE_hasRegistry) {
  9411. internals.patchTree(clone);
  9412. } else {
  9413. internals.patchAndUpgradeTree(clone);
  9414. }
  9415. return clone;
  9416. });
  9417. setPropertyUnchecked(Node.prototype, 'removeChild',
  9418. /**
  9419. * @this {Node}
  9420. * @param {!Node} node
  9421. * @return {!Node}
  9422. */
  9423. function (node) {
  9424. var nodeWasConnected = isConnected(node);
  9425. var nativeResult = Native.Node_removeChild.call(this, node);
  9426. if (nodeWasConnected) {
  9427. internals.disconnectTree(node);
  9428. }
  9429. return nativeResult;
  9430. });
  9431. setPropertyUnchecked(Node.prototype, 'replaceChild',
  9432. /**
  9433. * @this {Node}
  9434. * @param {!Node} nodeToInsert
  9435. * @param {!Node} nodeToRemove
  9436. * @return {!Node}
  9437. */
  9438. function (nodeToInsert, nodeToRemove) {
  9439. if (nodeToInsert instanceof DocumentFragment) {
  9440. var insertedNodes = Array.prototype.slice.apply(nodeToInsert.childNodes);
  9441. var _nativeResult3 = Native.Node_replaceChild.call(this, nodeToInsert, nodeToRemove);
  9442. // DocumentFragments can't be connected, so `disconnectTree` will never
  9443. // need to be called on a DocumentFragment's children after inserting it.
  9444. if (isConnected(this)) {
  9445. internals.disconnectTree(nodeToRemove);
  9446. for (var i = 0; i < insertedNodes.length; i++) {
  9447. internals.connectTree(insertedNodes[i]);
  9448. }
  9449. }
  9450. return _nativeResult3;
  9451. }
  9452. var nodeToInsertWasConnected = isConnected(nodeToInsert);
  9453. var nativeResult = Native.Node_replaceChild.call(this, nodeToInsert, nodeToRemove);
  9454. var thisIsConnected = isConnected(this);
  9455. if (thisIsConnected) {
  9456. internals.disconnectTree(nodeToRemove);
  9457. }
  9458. if (nodeToInsertWasConnected) {
  9459. internals.disconnectTree(nodeToInsert);
  9460. }
  9461. if (thisIsConnected) {
  9462. internals.connectTree(nodeToInsert);
  9463. }
  9464. return nativeResult;
  9465. });
  9466. function patch_textContent(destination, baseDescriptor) {
  9467. Object.defineProperty(destination, 'textContent', {
  9468. enumerable: baseDescriptor.enumerable,
  9469. configurable: true,
  9470. get: baseDescriptor.get,
  9471. set: /** @this {Node} */function set(assignedValue) {
  9472. // If this is a text node then there are no nodes to disconnect.
  9473. if (this.nodeType === Node.TEXT_NODE) {
  9474. baseDescriptor.set.call(this, assignedValue);
  9475. return;
  9476. }
  9477. var removedNodes = undefined;
  9478. // Checking for `firstChild` is faster than reading `childNodes.length`
  9479. // to compare with 0.
  9480. if (this.firstChild) {
  9481. // Using `childNodes` is faster than `children`, even though we only
  9482. // care about elements.
  9483. var childNodes = this.childNodes;
  9484. var childNodesLength = childNodes.length;
  9485. if (childNodesLength > 0 && isConnected(this)) {
  9486. // Copying an array by iterating is faster than using slice.
  9487. removedNodes = new Array(childNodesLength);
  9488. for (var i = 0; i < childNodesLength; i++) {
  9489. removedNodes[i] = childNodes[i];
  9490. }
  9491. }
  9492. }
  9493. baseDescriptor.set.call(this, assignedValue);
  9494. if (removedNodes) {
  9495. for (var _i = 0; _i < removedNodes.length; _i++) {
  9496. internals.disconnectTree(removedNodes[_i]);
  9497. }
  9498. }
  9499. }
  9500. });
  9501. }
  9502. if (Native.Node_textContent && Native.Node_textContent.get) {
  9503. patch_textContent(Node.prototype, Native.Node_textContent);
  9504. } else {
  9505. internals.addPatch(function (element) {
  9506. patch_textContent(element, {
  9507. enumerable: true,
  9508. configurable: true,
  9509. // NOTE: This implementation of the `textContent` getter assumes that
  9510. // text nodes' `textContent` getter will not be patched.
  9511. get: /** @this {Node} */function get() {
  9512. /** @type {!Array<string>} */
  9513. var parts = [];
  9514. for (var i = 0; i < this.childNodes.length; i++) {
  9515. parts.push(this.childNodes[i].textContent);
  9516. }
  9517. return parts.join('');
  9518. },
  9519. set: /** @this {Node} */function set(assignedValue) {
  9520. while (this.firstChild) {
  9521. Native.Node_removeChild.call(this, this.firstChild);
  9522. }
  9523. Native.Node_appendChild.call(this, document.createTextNode(assignedValue));
  9524. }
  9525. });
  9526. });
  9527. }
  9528. };
  9529. /**
  9530. * @param {!CustomElementInternals} internals
  9531. * @param {!Object} destination
  9532. * @param {!ChildNodeNativeMethods} builtIn
  9533. */
  9534. var PatchChildNode = function (internals, destination, builtIn) {
  9535. /**
  9536. * @param {...(!Node|string)} nodes
  9537. */
  9538. destination['before'] = function () {
  9539. for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
  9540. nodes[_key] = arguments[_key];
  9541. }
  9542. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9543. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9544. // DocumentFragments are not connected and will not be added to the list.
  9545. return node instanceof Node && isConnected(node);
  9546. });
  9547. builtIn.before.apply(this, nodes);
  9548. for (var i = 0; i < connectedBefore.length; i++) {
  9549. internals.disconnectTree(connectedBefore[i]);
  9550. }
  9551. if (isConnected(this)) {
  9552. for (var _i = 0; _i < nodes.length; _i++) {
  9553. var node = nodes[_i];
  9554. if (node instanceof Element) {
  9555. internals.connectTree(node);
  9556. }
  9557. }
  9558. }
  9559. };
  9560. /**
  9561. * @param {...(!Node|string)} nodes
  9562. */
  9563. destination['after'] = function () {
  9564. for (var _len2 = arguments.length, nodes = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  9565. nodes[_key2] = arguments[_key2];
  9566. }
  9567. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9568. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9569. // DocumentFragments are not connected and will not be added to the list.
  9570. return node instanceof Node && isConnected(node);
  9571. });
  9572. builtIn.after.apply(this, nodes);
  9573. for (var i = 0; i < connectedBefore.length; i++) {
  9574. internals.disconnectTree(connectedBefore[i]);
  9575. }
  9576. if (isConnected(this)) {
  9577. for (var _i2 = 0; _i2 < nodes.length; _i2++) {
  9578. var node = nodes[_i2];
  9579. if (node instanceof Element) {
  9580. internals.connectTree(node);
  9581. }
  9582. }
  9583. }
  9584. };
  9585. /**
  9586. * @param {...(!Node|string)} nodes
  9587. */
  9588. destination['replaceWith'] = function () {
  9589. for (var _len3 = arguments.length, nodes = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  9590. nodes[_key3] = arguments[_key3];
  9591. }
  9592. // TODO: Fix this for when one of `nodes` is a DocumentFragment!
  9593. var connectedBefore = /** @type {!Array<!Node>} */nodes.filter(function (node) {
  9594. // DocumentFragments are not connected and will not be added to the list.
  9595. return node instanceof Node && isConnected(node);
  9596. });
  9597. var wasConnected = isConnected(this);
  9598. builtIn.replaceWith.apply(this, nodes);
  9599. for (var i = 0; i < connectedBefore.length; i++) {
  9600. internals.disconnectTree(connectedBefore[i]);
  9601. }
  9602. if (wasConnected) {
  9603. internals.disconnectTree(this);
  9604. for (var _i3 = 0; _i3 < nodes.length; _i3++) {
  9605. var node = nodes[_i3];
  9606. if (node instanceof Element) {
  9607. internals.connectTree(node);
  9608. }
  9609. }
  9610. }
  9611. };
  9612. destination['remove'] = function () {
  9613. var wasConnected = isConnected(this);
  9614. builtIn.remove.call(this);
  9615. if (wasConnected) {
  9616. internals.disconnectTree(this);
  9617. }
  9618. };
  9619. };
  9620. /**
  9621. * @param {!CustomElementInternals} internals
  9622. */
  9623. var PatchElement = function (internals) {
  9624. if (Native.Element_attachShadow) {
  9625. setPropertyUnchecked(Element.prototype, 'attachShadow',
  9626. /**
  9627. * @this {Element}
  9628. * @param {!{mode: string}} init
  9629. * @return {ShadowRoot}
  9630. */
  9631. function (init) {
  9632. var shadowRoot = Native.Element_attachShadow.call(this, init);
  9633. this.__CE_shadowRoot = shadowRoot;
  9634. return shadowRoot;
  9635. });
  9636. } else {
  9637. console.warn('Custom Elements: `Element#attachShadow` was not patched.');
  9638. }
  9639. function patch_innerHTML(destination, baseDescriptor) {
  9640. Object.defineProperty(destination, 'innerHTML', {
  9641. enumerable: baseDescriptor.enumerable,
  9642. configurable: true,
  9643. get: baseDescriptor.get,
  9644. set: /** @this {Element} */function set(htmlString) {
  9645. var _this = this;
  9646. var isConnected$$1 = isConnected(this);
  9647. // NOTE: In IE11, when using the native `innerHTML` setter, all nodes
  9648. // that were previously descendants of the context element have all of
  9649. // their children removed as part of the set - the entire subtree is
  9650. // 'disassembled'. This work around walks the subtree *before* using the
  9651. // native setter.
  9652. /** @type {!Array<!Element>|undefined} */
  9653. var removedElements = undefined;
  9654. if (isConnected$$1) {
  9655. removedElements = [];
  9656. walkDeepDescendantElements(this, function (element) {
  9657. if (element !== _this) {
  9658. removedElements.push(element);
  9659. }
  9660. });
  9661. }
  9662. baseDescriptor.set.call(this, htmlString);
  9663. if (removedElements) {
  9664. for (var i = 0; i < removedElements.length; i++) {
  9665. var element = removedElements[i];
  9666. if (element.__CE_state === CustomElementState.custom) {
  9667. internals.disconnectedCallback(element);
  9668. }
  9669. }
  9670. }
  9671. // Only create custom elements if this element's owner document is
  9672. // associated with the registry.
  9673. if (!this.ownerDocument.__CE_hasRegistry) {
  9674. internals.patchTree(this);
  9675. } else {
  9676. internals.patchAndUpgradeTree(this);
  9677. }
  9678. return htmlString;
  9679. }
  9680. });
  9681. }
  9682. if (Native.Element_innerHTML && Native.Element_innerHTML.get) {
  9683. patch_innerHTML(Element.prototype, Native.Element_innerHTML);
  9684. } else if (Native.HTMLElement_innerHTML && Native.HTMLElement_innerHTML.get) {
  9685. patch_innerHTML(HTMLElement.prototype, Native.HTMLElement_innerHTML);
  9686. } else {
  9687. /** @type {HTMLDivElement} */
  9688. var rawDiv = Native.Document_createElement.call(document, 'div');
  9689. internals.addPatch(function (element) {
  9690. patch_innerHTML(element, {
  9691. enumerable: true,
  9692. configurable: true,
  9693. // Implements getting `innerHTML` by performing an unpatched `cloneNode`
  9694. // of the element and returning the resulting element's `innerHTML`.
  9695. // TODO: Is this too expensive?
  9696. get: /** @this {Element} */function get() {
  9697. return Native.Node_cloneNode.call(this, true).innerHTML;
  9698. },
  9699. // Implements setting `innerHTML` by creating an unpatched element,
  9700. // setting `innerHTML` of that element and replacing the target
  9701. // element's children with those of the unpatched element.
  9702. set: /** @this {Element} */function set(assignedValue) {
  9703. // NOTE: re-route to `content` for `template` elements.
  9704. // We need to do this because `template.appendChild` does not
  9705. // route into `template.content`.
  9706. /** @type {!Node} */
  9707. var content = this.localName === 'template' ? /** @type {!HTMLTemplateElement} */this.content : this;
  9708. rawDiv.innerHTML = assignedValue;
  9709. while (content.childNodes.length > 0) {
  9710. Native.Node_removeChild.call(content, content.childNodes[0]);
  9711. }
  9712. while (rawDiv.childNodes.length > 0) {
  9713. Native.Node_appendChild.call(content, rawDiv.childNodes[0]);
  9714. }
  9715. }
  9716. });
  9717. });
  9718. }
  9719. setPropertyUnchecked(Element.prototype, 'setAttribute',
  9720. /**
  9721. * @this {Element}
  9722. * @param {string} name
  9723. * @param {string} newValue
  9724. */
  9725. function (name, newValue) {
  9726. // Fast path for non-custom elements.
  9727. if (this.__CE_state !== CustomElementState.custom) {
  9728. return Native.Element_setAttribute.call(this, name, newValue);
  9729. }
  9730. var oldValue = Native.Element_getAttribute.call(this, name);
  9731. Native.Element_setAttribute.call(this, name, newValue);
  9732. newValue = Native.Element_getAttribute.call(this, name);
  9733. internals.attributeChangedCallback(this, name, oldValue, newValue, null);
  9734. });
  9735. setPropertyUnchecked(Element.prototype, 'setAttributeNS',
  9736. /**
  9737. * @this {Element}
  9738. * @param {?string} namespace
  9739. * @param {string} name
  9740. * @param {string} newValue
  9741. */
  9742. function (namespace, name, newValue) {
  9743. // Fast path for non-custom elements.
  9744. if (this.__CE_state !== CustomElementState.custom) {
  9745. return Native.Element_setAttributeNS.call(this, namespace, name, newValue);
  9746. }
  9747. var oldValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9748. Native.Element_setAttributeNS.call(this, namespace, name, newValue);
  9749. newValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9750. internals.attributeChangedCallback(this, name, oldValue, newValue, namespace);
  9751. });
  9752. setPropertyUnchecked(Element.prototype, 'removeAttribute',
  9753. /**
  9754. * @this {Element}
  9755. * @param {string} name
  9756. */
  9757. function (name) {
  9758. // Fast path for non-custom elements.
  9759. if (this.__CE_state !== CustomElementState.custom) {
  9760. return Native.Element_removeAttribute.call(this, name);
  9761. }
  9762. var oldValue = Native.Element_getAttribute.call(this, name);
  9763. Native.Element_removeAttribute.call(this, name);
  9764. if (oldValue !== null) {
  9765. internals.attributeChangedCallback(this, name, oldValue, null, null);
  9766. }
  9767. });
  9768. setPropertyUnchecked(Element.prototype, 'removeAttributeNS',
  9769. /**
  9770. * @this {Element}
  9771. * @param {?string} namespace
  9772. * @param {string} name
  9773. */
  9774. function (namespace, name) {
  9775. // Fast path for non-custom elements.
  9776. if (this.__CE_state !== CustomElementState.custom) {
  9777. return Native.Element_removeAttributeNS.call(this, namespace, name);
  9778. }
  9779. var oldValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9780. Native.Element_removeAttributeNS.call(this, namespace, name);
  9781. // In older browsers, `Element#getAttributeNS` may return the empty string
  9782. // instead of null if the attribute does not exist. For details, see;
  9783. // https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS#Notes
  9784. var newValue = Native.Element_getAttributeNS.call(this, namespace, name);
  9785. if (oldValue !== newValue) {
  9786. internals.attributeChangedCallback(this, name, oldValue, newValue, namespace);
  9787. }
  9788. });
  9789. function patch_insertAdjacentElement(destination, baseMethod) {
  9790. setPropertyUnchecked(destination, 'insertAdjacentElement',
  9791. /**
  9792. * @this {Element}
  9793. * @param {string} where
  9794. * @param {!Element} element
  9795. * @return {?Element}
  9796. */
  9797. function (where, element) {
  9798. var wasConnected = isConnected(element);
  9799. var insertedElement = /** @type {!Element} */
  9800. baseMethod.call(this, where, element);
  9801. if (wasConnected) {
  9802. internals.disconnectTree(element);
  9803. }
  9804. if (isConnected(insertedElement)) {
  9805. internals.connectTree(element);
  9806. }
  9807. return insertedElement;
  9808. });
  9809. }
  9810. if (Native.HTMLElement_insertAdjacentElement) {
  9811. patch_insertAdjacentElement(HTMLElement.prototype, Native.HTMLElement_insertAdjacentElement);
  9812. } else if (Native.Element_insertAdjacentElement) {
  9813. patch_insertAdjacentElement(Element.prototype, Native.Element_insertAdjacentElement);
  9814. } else {
  9815. console.warn('Custom Elements: `Element#insertAdjacentElement` was not patched.');
  9816. }
  9817. PatchParentNode(internals, Element.prototype, {
  9818. prepend: Native.Element_prepend,
  9819. append: Native.Element_append
  9820. });
  9821. PatchChildNode(internals, Element.prototype, {
  9822. before: Native.Element_before,
  9823. after: Native.Element_after,
  9824. replaceWith: Native.Element_replaceWith,
  9825. remove: Native.Element_remove
  9826. });
  9827. };
  9828. /**
  9829. * @license
  9830. * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
  9831. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  9832. * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  9833. * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  9834. * Code distributed by Google as part of the polymer project is also
  9835. * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  9836. */
  9837. var priorCustomElements = window['customElements'];
  9838. if (!priorCustomElements || priorCustomElements['forcePolyfill'] || typeof priorCustomElements['define'] != 'function' || typeof priorCustomElements['get'] != 'function') {
  9839. /** @type {!CustomElementInternals} */
  9840. var internals = new CustomElementInternals();
  9841. PatchHTMLElement(internals);
  9842. PatchDocument(internals);
  9843. PatchNode(internals);
  9844. PatchElement(internals);
  9845. // The main document is always associated with the registry.
  9846. document.__CE_hasRegistry = true;
  9847. /** @type {!CustomElementRegistry} */
  9848. var customElements$1 = new CustomElementRegistry(internals);
  9849. Object.defineProperty(window, 'customElements', {
  9850. configurable: true,
  9851. enumerable: true,
  9852. value: customElements$1
  9853. });
  9854. }
  9855. /**
  9856. * @license
  9857. * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
  9858. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  9859. * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  9860. * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  9861. * Code distributed by Google as part of the polymer project is also
  9862. * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  9863. */
  9864. // @version 0.7.22
  9865. (function (global) {
  9866. if (global.JsMutationObserver) {
  9867. return;
  9868. }
  9869. var registrationsTable = new WeakMap();
  9870. var setImmediate;
  9871. if (/Trident|Edge/.test(navigator.userAgent)) {
  9872. setImmediate = setTimeout;
  9873. } else if (window.setImmediate) {
  9874. setImmediate = window.setImmediate;
  9875. } else {
  9876. var setImmediateQueue = [];
  9877. var sentinel = String(Math.random());
  9878. window.addEventListener("message", function (e) {
  9879. if (e.data === sentinel) {
  9880. var queue = setImmediateQueue;
  9881. setImmediateQueue = [];
  9882. queue.forEach(function (func) {
  9883. func();
  9884. });
  9885. }
  9886. });
  9887. setImmediate = function setImmediate(func) {
  9888. setImmediateQueue.push(func);
  9889. window.postMessage(sentinel, "*");
  9890. };
  9891. }
  9892. var isScheduled = false;
  9893. var scheduledObservers = [];
  9894. function scheduleCallback(observer) {
  9895. scheduledObservers.push(observer);
  9896. if (!isScheduled) {
  9897. isScheduled = true;
  9898. setImmediate(dispatchCallbacks);
  9899. }
  9900. }
  9901. function wrapIfNeeded(node) {
  9902. return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
  9903. }
  9904. function dispatchCallbacks() {
  9905. isScheduled = false;
  9906. var observers = scheduledObservers;
  9907. scheduledObservers = [];
  9908. observers.sort(function (o1, o2) {
  9909. return o1.uid_ - o2.uid_;
  9910. });
  9911. var anyNonEmpty = false;
  9912. observers.forEach(function (observer) {
  9913. var queue = observer.takeRecords();
  9914. removeTransientObserversFor(observer);
  9915. if (queue.length) {
  9916. observer.callback_(queue, observer);
  9917. anyNonEmpty = true;
  9918. }
  9919. });
  9920. if (anyNonEmpty) dispatchCallbacks();
  9921. }
  9922. function removeTransientObserversFor(observer) {
  9923. observer.nodes_.forEach(function (node) {
  9924. var registrations = registrationsTable.get(node);
  9925. if (!registrations) return;
  9926. registrations.forEach(function (registration) {
  9927. if (registration.observer === observer) registration.removeTransientObservers();
  9928. });
  9929. });
  9930. }
  9931. function forEachAncestorAndObserverEnqueueRecord(target, callback) {
  9932. for (var node = target; node; node = node.parentNode) {
  9933. var registrations = registrationsTable.get(node);
  9934. if (registrations) {
  9935. for (var j = 0; j < registrations.length; j++) {
  9936. var registration = registrations[j];
  9937. var options = registration.options;
  9938. if (node !== target && !options.subtree) continue;
  9939. var record = callback(options);
  9940. if (record) registration.enqueue(record);
  9941. }
  9942. }
  9943. }
  9944. }
  9945. var uidCounter = 0;
  9946. function JsMutationObserver(callback) {
  9947. this.callback_ = callback;
  9948. this.nodes_ = [];
  9949. this.records_ = [];
  9950. this.uid_ = ++uidCounter;
  9951. }
  9952. JsMutationObserver.prototype = {
  9953. observe: function observe(target, options) {
  9954. target = wrapIfNeeded(target);
  9955. if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
  9956. throw new SyntaxError();
  9957. }
  9958. var registrations = registrationsTable.get(target);
  9959. if (!registrations) registrationsTable.set(target, registrations = []);
  9960. var registration;
  9961. for (var i = 0; i < registrations.length; i++) {
  9962. if (registrations[i].observer === this) {
  9963. registration = registrations[i];
  9964. registration.removeListeners();
  9965. registration.options = options;
  9966. break;
  9967. }
  9968. }
  9969. if (!registration) {
  9970. registration = new Registration(this, target, options);
  9971. registrations.push(registration);
  9972. this.nodes_.push(target);
  9973. }
  9974. registration.addListeners();
  9975. },
  9976. disconnect: function disconnect() {
  9977. this.nodes_.forEach(function (node) {
  9978. var registrations = registrationsTable.get(node);
  9979. for (var i = 0; i < registrations.length; i++) {
  9980. var registration = registrations[i];
  9981. if (registration.observer === this) {
  9982. registration.removeListeners();
  9983. registrations.splice(i, 1);
  9984. break;
  9985. }
  9986. }
  9987. }, this);
  9988. this.records_ = [];
  9989. },
  9990. takeRecords: function takeRecords() {
  9991. var copyOfRecords = this.records_;
  9992. this.records_ = [];
  9993. return copyOfRecords;
  9994. }
  9995. };
  9996. function MutationRecord(type, target) {
  9997. this.type = type;
  9998. this.target = target;
  9999. this.addedNodes = [];
  10000. this.removedNodes = [];
  10001. this.previousSibling = null;
  10002. this.nextSibling = null;
  10003. this.attributeName = null;
  10004. this.attributeNamespace = null;
  10005. this.oldValue = null;
  10006. }
  10007. function copyMutationRecord(original) {
  10008. var record = new MutationRecord(original.type, original.target);
  10009. record.addedNodes = original.addedNodes.slice();
  10010. record.removedNodes = original.removedNodes.slice();
  10011. record.previousSibling = original.previousSibling;
  10012. record.nextSibling = original.nextSibling;
  10013. record.attributeName = original.attributeName;
  10014. record.attributeNamespace = original.attributeNamespace;
  10015. record.oldValue = original.oldValue;
  10016. return record;
  10017. }
  10018. var currentRecord, recordWithOldValue;
  10019. function getRecord(type, target) {
  10020. return currentRecord = new MutationRecord(type, target);
  10021. }
  10022. function getRecordWithOldValue(oldValue) {
  10023. if (recordWithOldValue) return recordWithOldValue;
  10024. recordWithOldValue = copyMutationRecord(currentRecord);
  10025. recordWithOldValue.oldValue = oldValue;
  10026. return recordWithOldValue;
  10027. }
  10028. function clearRecords() {
  10029. currentRecord = recordWithOldValue = undefined;
  10030. }
  10031. function recordRepresentsCurrentMutation(record) {
  10032. return record === recordWithOldValue || record === currentRecord;
  10033. }
  10034. function selectRecord(lastRecord, newRecord) {
  10035. if (lastRecord === newRecord) return lastRecord;
  10036. if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
  10037. return null;
  10038. }
  10039. function Registration(observer, target, options) {
  10040. this.observer = observer;
  10041. this.target = target;
  10042. this.options = options;
  10043. this.transientObservedNodes = [];
  10044. }
  10045. Registration.prototype = {
  10046. enqueue: function enqueue(record) {
  10047. var records = this.observer.records_;
  10048. var length = records.length;
  10049. if (records.length > 0) {
  10050. var lastRecord = records[length - 1];
  10051. var recordToReplaceLast = selectRecord(lastRecord, record);
  10052. if (recordToReplaceLast) {
  10053. records[length - 1] = recordToReplaceLast;
  10054. return;
  10055. }
  10056. } else {
  10057. scheduleCallback(this.observer);
  10058. }
  10059. records[length] = record;
  10060. },
  10061. addListeners: function addListeners() {
  10062. this.addListeners_(this.target);
  10063. },
  10064. addListeners_: function addListeners_(node) {
  10065. var options = this.options;
  10066. if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
  10067. if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
  10068. if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
  10069. if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
  10070. },
  10071. removeListeners: function removeListeners() {
  10072. this.removeListeners_(this.target);
  10073. },
  10074. removeListeners_: function removeListeners_(node) {
  10075. var options = this.options;
  10076. if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
  10077. if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
  10078. if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
  10079. if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
  10080. },
  10081. addTransientObserver: function addTransientObserver(node) {
  10082. if (node === this.target) return;
  10083. this.addListeners_(node);
  10084. this.transientObservedNodes.push(node);
  10085. var registrations = registrationsTable.get(node);
  10086. if (!registrations) registrationsTable.set(node, registrations = []);
  10087. registrations.push(this);
  10088. },
  10089. removeTransientObservers: function removeTransientObservers() {
  10090. var transientObservedNodes = this.transientObservedNodes;
  10091. this.transientObservedNodes = [];
  10092. transientObservedNodes.forEach(function (node) {
  10093. this.removeListeners_(node);
  10094. var registrations = registrationsTable.get(node);
  10095. for (var i = 0; i < registrations.length; i++) {
  10096. if (registrations[i] === this) {
  10097. registrations.splice(i, 1);
  10098. break;
  10099. }
  10100. }
  10101. }, this);
  10102. },
  10103. handleEvent: function handleEvent(e) {
  10104. e.stopImmediatePropagation();
  10105. switch (e.type) {
  10106. case "DOMAttrModified":
  10107. var name = e.attrName;
  10108. var namespace = e.relatedNode.namespaceURI;
  10109. var target = e.target;
  10110. var record = new getRecord("attributes", target);
  10111. record.attributeName = name;
  10112. record.attributeNamespace = namespace;
  10113. var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
  10114. forEachAncestorAndObserverEnqueueRecord(target, function (options) {
  10115. if (!options.attributes) return;
  10116. if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
  10117. return;
  10118. }
  10119. if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
  10120. return record;
  10121. });
  10122. break;
  10123. case "DOMCharacterDataModified":
  10124. var target = e.target;
  10125. var record = getRecord("characterData", target);
  10126. var oldValue = e.prevValue;
  10127. forEachAncestorAndObserverEnqueueRecord(target, function (options) {
  10128. if (!options.characterData) return;
  10129. if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
  10130. return record;
  10131. });
  10132. break;
  10133. case "DOMNodeRemoved":
  10134. this.addTransientObserver(e.target);
  10135. case "DOMNodeInserted":
  10136. var changedNode = e.target;
  10137. var addedNodes, removedNodes;
  10138. if (e.type === "DOMNodeInserted") {
  10139. addedNodes = [changedNode];
  10140. removedNodes = [];
  10141. } else {
  10142. addedNodes = [];
  10143. removedNodes = [changedNode];
  10144. }
  10145. var previousSibling = changedNode.previousSibling;
  10146. var nextSibling = changedNode.nextSibling;
  10147. var record = getRecord("childList", e.target.parentNode);
  10148. record.addedNodes = addedNodes;
  10149. record.removedNodes = removedNodes;
  10150. record.previousSibling = previousSibling;
  10151. record.nextSibling = nextSibling;
  10152. forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function (options) {
  10153. if (!options.childList) return;
  10154. return record;
  10155. });
  10156. }
  10157. clearRecords();
  10158. }
  10159. };
  10160. global.JsMutationObserver = JsMutationObserver;
  10161. if (!global.MutationObserver) {
  10162. global.MutationObserver = JsMutationObserver;
  10163. JsMutationObserver._isPolyfilled = true;
  10164. }
  10165. })(self);
  10166. /*
  10167. Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola
  10168. Permission is hereby granted, free of charge, to any person obtaining
  10169. a copy of this software and associated documentation files (the
  10170. "Software"), to deal in the Software without restriction, including
  10171. without limitation the rights to use, copy, modify, merge, publish,
  10172. distribute, sublicense, and/or sell copies of the Software, and to
  10173. permit persons to whom the Software is furnished to do so, subject to
  10174. the following conditions:
  10175. The above copyright notice and this permission notice shall be
  10176. included in all copies or substantial portions of the Software.
  10177. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  10178. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10179. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  10180. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  10181. LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  10182. OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  10183. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  10184. */
  10185. (function (global, undefined) {
  10186. if (global.setImmediate) {
  10187. return;
  10188. }
  10189. var nextHandle = 1; // Spec says greater than zero
  10190. var tasksByHandle = {};
  10191. var currentlyRunningATask = false;
  10192. var doc = global.document;
  10193. var setImmediate;
  10194. function addFromSetImmediateArguments(args) {
  10195. tasksByHandle[nextHandle] = partiallyApplied.apply(undefined, args);
  10196. return nextHandle++;
  10197. }
  10198. // This function accepts the same arguments as setImmediate, but
  10199. // returns a function that requires no arguments.
  10200. function partiallyApplied(handler) {
  10201. var args = [].slice.call(arguments, 1);
  10202. return function () {
  10203. if (typeof handler === "function") {
  10204. handler.apply(undefined, args);
  10205. } else {
  10206. new Function("" + handler)();
  10207. }
  10208. };
  10209. }
  10210. function runIfPresent(handle) {
  10211. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  10212. // So if we're currently running a task, we'll need to delay this invocation.
  10213. if (currentlyRunningATask) {
  10214. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  10215. // "too much recursion" error.
  10216. setTimeout(partiallyApplied(runIfPresent, handle), 0);
  10217. } else {
  10218. var task = tasksByHandle[handle];
  10219. if (task) {
  10220. currentlyRunningATask = true;
  10221. try {
  10222. task();
  10223. } finally {
  10224. clearImmediate(handle);
  10225. currentlyRunningATask = false;
  10226. }
  10227. }
  10228. }
  10229. }
  10230. function clearImmediate(handle) {
  10231. delete tasksByHandle[handle];
  10232. }
  10233. function installNextTickImplementation() {
  10234. setImmediate = function setImmediate() {
  10235. var handle = addFromSetImmediateArguments(arguments);
  10236. process.nextTick(partiallyApplied(runIfPresent, handle));
  10237. return handle;
  10238. };
  10239. }
  10240. function canUsePostMessage() {
  10241. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  10242. // where `global.postMessage` means something completely different and can't be used for this purpose.
  10243. if (global.postMessage && !global.importScripts) {
  10244. var postMessageIsAsynchronous = true;
  10245. var oldOnMessage = global.onmessage;
  10246. global.onmessage = function () {
  10247. postMessageIsAsynchronous = false;
  10248. };
  10249. global.postMessage("", "*");
  10250. global.onmessage = oldOnMessage;
  10251. return postMessageIsAsynchronous;
  10252. }
  10253. }
  10254. function installPostMessageImplementation() {
  10255. // Installs an event handler on `global` for the `message` event: see
  10256. // * https://developer.mozilla.org/en/DOM/window.postMessage
  10257. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  10258. var messagePrefix = "setImmediate$" + Math.random() + "$";
  10259. var onGlobalMessage = function onGlobalMessage(event) {
  10260. if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) {
  10261. runIfPresent(+event.data.slice(messagePrefix.length));
  10262. }
  10263. };
  10264. if (global.addEventListener) {
  10265. global.addEventListener("message", onGlobalMessage, false);
  10266. } else {
  10267. global.attachEvent("onmessage", onGlobalMessage);
  10268. }
  10269. setImmediate = function setImmediate() {
  10270. var handle = addFromSetImmediateArguments(arguments);
  10271. global.postMessage(messagePrefix + handle, "*");
  10272. return handle;
  10273. };
  10274. }
  10275. function installMessageChannelImplementation() {
  10276. var channel = new MessageChannel();
  10277. channel.port1.onmessage = function (event) {
  10278. var handle = event.data;
  10279. runIfPresent(handle);
  10280. };
  10281. setImmediate = function setImmediate() {
  10282. var handle = addFromSetImmediateArguments(arguments);
  10283. channel.port2.postMessage(handle);
  10284. return handle;
  10285. };
  10286. }
  10287. function installReadyStateChangeImplementation() {
  10288. var html = doc.documentElement;
  10289. setImmediate = function setImmediate() {
  10290. var handle = addFromSetImmediateArguments(arguments);
  10291. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  10292. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  10293. var script = doc.createElement("script");
  10294. script.onreadystatechange = function () {
  10295. runIfPresent(handle);
  10296. script.onreadystatechange = null;
  10297. html.removeChild(script);
  10298. script = null;
  10299. };
  10300. html.appendChild(script);
  10301. return handle;
  10302. };
  10303. }
  10304. function installSetTimeoutImplementation() {
  10305. setImmediate = function setImmediate() {
  10306. var handle = addFromSetImmediateArguments(arguments);
  10307. setTimeout(partiallyApplied(runIfPresent, handle), 0);
  10308. return handle;
  10309. };
  10310. }
  10311. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  10312. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  10313. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  10314. // Don't get fooled by e.g. browserify environments.
  10315. if ({}.toString.call(global.process) === "[object process]") {
  10316. // For Node.js before 0.9
  10317. installNextTickImplementation();
  10318. } else if (canUsePostMessage()) {
  10319. // For non-IE10 modern browsers
  10320. installPostMessageImplementation();
  10321. } else if (global.MessageChannel) {
  10322. // For web workers, where supported
  10323. installMessageChannelImplementation();
  10324. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  10325. // For IE 6–8
  10326. installReadyStateChangeImplementation();
  10327. } else {
  10328. // For older browsers
  10329. installSetTimeoutImplementation();
  10330. }
  10331. attachTo.setImmediate = setImmediate;
  10332. attachTo.clearImmediate = clearImmediate;
  10333. })(self);
  10334. // Caution:
  10335. // Do not replace this import statement with codes.
  10336. //
  10337. // If you replace this import statement with codes,
  10338. // the codes will be executed after the following polyfills are imported
  10339. // because import statements are hoisted during compilation.
  10340. // Polyfill ECMAScript standard features with global namespace pollution
  10341. // Polyfill Custom Elements v1 with global namespace pollution
  10342. // Polyfill MutationObserver with global namespace pollution
  10343. // Polyfill setImmediate with global namespace pollution
  10344. (function () {
  10345. var DEFAULT_VIEWPORT = 'width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no';
  10346. var Viewport = {
  10347. ensureViewportElement: function ensureViewportElement() {
  10348. var viewportElement = document.querySelector('meta[name=viewport]');
  10349. if (!viewportElement) {
  10350. viewportElement = document.createElement('meta');
  10351. viewportElement.name = 'viewport';
  10352. document.head.appendChild(viewportElement);
  10353. }
  10354. return viewportElement;
  10355. },
  10356. setup: function setup() {
  10357. var viewportElement = Viewport.ensureViewportElement();
  10358. if (!viewportElement) {
  10359. return;
  10360. }
  10361. if (!viewportElement.hasAttribute('content')) {
  10362. viewportElement.setAttribute('content', DEFAULT_VIEWPORT);
  10363. }
  10364. }
  10365. };
  10366. window.Viewport = Viewport;
  10367. })();
  10368. function setup$1(ons) {
  10369. if (window._onsLoaded) {
  10370. ons._util.warn('Onsen UI is loaded more than once.');
  10371. }
  10372. window._onsLoaded = true;
  10373. // fastclick
  10374. window.addEventListener('load', function () {
  10375. ons.fastClick = fastclick_1.attach(document.body);
  10376. var supportTouchAction = 'touch-action' in document.body.style;
  10377. ons.platform._runOnActualPlatform(function () {
  10378. if (ons.platform.isAndroid()) {
  10379. // In Android4.4+, correct viewport settings can remove click delay.
  10380. // So disable FastClick on Android.
  10381. ons.fastClick.destroy();
  10382. } else if (ons.platform.isIOS()) {
  10383. if (supportTouchAction && (ons.platform.isIOSSafari() || ons.platform.isWKWebView())) {
  10384. // If 'touch-action' supported in iOS Safari or WKWebView, disable FastClick.
  10385. ons.fastClick.destroy();
  10386. } else {
  10387. // Do nothing. 'touch-action: manipulation' has no effect on UIWebView.
  10388. }
  10389. }
  10390. });
  10391. }, false);
  10392. ons.ready(function () {
  10393. ons.enableDeviceBackButtonHandler();
  10394. ons._defaultDeviceBackButtonHandler = ons._internal.dbbDispatcher.createHandler(window.document.body, function () {
  10395. if (Object.hasOwnProperty.call(navigator, 'app')) {
  10396. navigator.app.exitApp();
  10397. } else {
  10398. console.warn('Could not close the app. Is \'cordova.js\' included?\nError: \'window.navigator.app\' is undefined.');
  10399. }
  10400. });
  10401. document.body._gestureDetector = new ons.GestureDetector(document.body, { passive: true });
  10402. // Simulate Device Back Button on ESC press
  10403. if (!ons.platform.isWebView()) {
  10404. document.body.addEventListener('keydown', function (event) {
  10405. if (event.keyCode === 27) {
  10406. ons.fireDeviceBackButtonEvent();
  10407. }
  10408. });
  10409. }
  10410. // setup loading placeholder
  10411. ons._setupLoadingPlaceHolders();
  10412. });
  10413. // viewport.js
  10414. Viewport.setup();
  10415. }
  10416. /*
  10417. Copyright 2013-2015 ASIAL CORPORATION
  10418. Licensed under the Apache License, Version 2.0 (the "License");
  10419. you may not use this file except in compliance with the License.
  10420. You may obtain a copy of the License at
  10421. http://www.apache.org/licenses/LICENSE-2.0
  10422. Unless required by applicable law or agreed to in writing, software
  10423. distributed under the License is distributed on an "AS IS" BASIS,
  10424. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10425. See the License for the specific language governing permissions and
  10426. limitations under the License.
  10427. */
  10428. function getElementClass() {
  10429. if (typeof HTMLElement !== 'function') {
  10430. // case of Safari
  10431. var _BaseElement = function _BaseElement() {};
  10432. _BaseElement.prototype = document.createElement('div');
  10433. return _BaseElement;
  10434. } else {
  10435. return HTMLElement;
  10436. }
  10437. }
  10438. var BaseElement = function (_getElementClass) {
  10439. inherits(BaseElement, _getElementClass);
  10440. function BaseElement() {
  10441. classCallCheck(this, BaseElement);
  10442. return possibleConstructorReturn(this, (BaseElement.__proto__ || Object.getPrototypeOf(BaseElement)).call(this));
  10443. }
  10444. return BaseElement;
  10445. }(getElementClass());
  10446. /*
  10447. Copyright 2013-2015 ASIAL CORPORATION
  10448. Licensed under the Apache License, Version 2.0 (the "License");
  10449. you may not use this file except in compliance with the License.
  10450. You may obtain a copy of the License at
  10451. http://www.apache.org/licenses/LICENSE-2.0
  10452. Unless required by applicable law or agreed to in writing, software
  10453. distributed under the License is distributed on an "AS IS" BASIS,
  10454. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10455. See the License for the specific language governing permissions and
  10456. limitations under the License.
  10457. */
  10458. /**
  10459. * @element ons-template
  10460. * @category util
  10461. * @description
  10462. * [en]
  10463. * Define a separate HTML fragment and use as a template. These templates can be loaded as pages in `<ons-navigator>`, `<ons-tabbar>` and `<ons-splitter>`. They can also be used to generate dialogs. Since Onsen UI 2.4.0, the native `<template>` element can be used instead of `<ons-template>` for better performance and features. `<ons-template>` is still supported for backward compatibility.
  10464. * [/en]
  10465. * [ja]テンプレートとして使用するためのHTMLフラグメントを定義します。この要素でHTMLを宣言すると、id属性に指定した名前をpageのURLとしてons-navigatorなどのコンポーネントから参照できます。[/ja]
  10466. * @seealso ons-navigator
  10467. * [en]The `<ons-navigator>` component enables stack based navigation.[/en]
  10468. * [ja][/ja]
  10469. * @seealso ons-tabbar
  10470. * [en]The `<ons-tabbar>` component is used to add tab navigation.[/en]
  10471. * [ja][/ja]
  10472. * @seealso ons-splitter
  10473. * [en]The `<ons-splitter>` component can be used to create a draggable menu or column based layout.[/en]
  10474. * [ja][/ja]
  10475. * @example
  10476. * <ons-template id="foobar.html">
  10477. * <ons-page>
  10478. * Page content
  10479. * </ons-page>
  10480. * </ons-template>
  10481. *
  10482. * <ons-navigator page="foobar.html"></ons-navigator>
  10483. */
  10484. var TemplateElement = function (_BaseElement) {
  10485. inherits(TemplateElement, _BaseElement);
  10486. /**
  10487. * @property template
  10488. * @type {String}
  10489. * @description
  10490. * [en]Template content. This property can not be used with AngularJS bindings.[/en]
  10491. * [ja][/ja]
  10492. */
  10493. function TemplateElement() {
  10494. classCallCheck(this, TemplateElement);
  10495. var _this = possibleConstructorReturn(this, (TemplateElement.__proto__ || Object.getPrototypeOf(TemplateElement)).call(this));
  10496. _this.template = _this.innerHTML;
  10497. while (_this.firstChild) {
  10498. _this.removeChild(_this.firstChild);
  10499. }
  10500. return _this;
  10501. }
  10502. createClass(TemplateElement, [{
  10503. key: 'connectedCallback',
  10504. value: function connectedCallback() {
  10505. if (this.parentNode) {
  10506. // Note: this.parentNode is not set in some CE0/CE1 polyfills.
  10507. // Show warning when the ons-template is not located just under document.body
  10508. if (this.parentNode !== document.body) {
  10509. // if the parent is not document.body
  10510. util$1.warn('ons-template (id = ' + this.getAttribute('id') + ') must be located just under document.body' + (this.parentNode.outerHTML ? ':\n\n' + this.parentNode.outerHTML : '.'));
  10511. }
  10512. }
  10513. var event = new CustomEvent('_templateloaded', { bubbles: true, cancelable: true });
  10514. event.template = this.template;
  10515. event.templateId = this.getAttribute('id');
  10516. this.dispatchEvent(event);
  10517. }
  10518. }]);
  10519. return TemplateElement;
  10520. }(BaseElement);
  10521. onsElements.Template = TemplateElement;
  10522. customElements.define('ons-template', TemplateElement);
  10523. /*
  10524. Copyright 2013-2015 ASIAL CORPORATION
  10525. Licensed under the Apache License, Version 2.0 (the "License");
  10526. you may not use this file except in compliance with the License.
  10527. You may obtain a copy of the License at
  10528. http://www.apache.org/licenses/LICENSE-2.0
  10529. Unless required by applicable law or agreed to in writing, software
  10530. distributed under the License is distributed on an "AS IS" BASIS,
  10531. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10532. See the License for the specific language governing permissions and
  10533. limitations under the License.
  10534. */
  10535. /**
  10536. * @element ons-if
  10537. * @category conditional
  10538. * @tutorial vanilla/Reference/if
  10539. * @description
  10540. * [en]
  10541. * Conditionally display content depending on the platform, device orientation or both.
  10542. *
  10543. * Sometimes it is useful to conditionally hide or show certain components based on platform. When running on iOS the `<ons-if>` element can be used to hide the `<ons-fab>` element.
  10544. * [/en]
  10545. * [ja][/ja]
  10546. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  10547. * @example
  10548. * <ons-page>
  10549. * <ons-if orientation="landscape">
  10550. * Landscape view!
  10551. * </ons-if>
  10552. * <ons-if platform="android">
  10553. * This is Android.
  10554. * </ons-if>
  10555. * <ons-if platform="ios other">
  10556. * This is not Android.
  10557. * </ons-if>
  10558. * </ons-page>
  10559. */
  10560. var IfElement = function (_BaseElement) {
  10561. inherits(IfElement, _BaseElement);
  10562. /**
  10563. * @attribute platform
  10564. * @initonly
  10565. * @type {string}
  10566. * @description
  10567. * [en]Space-separated platform names. Possible values are `"ios"`, `"android"`, `"windows"` and `"other"`.[/en]
  10568. * [ja][/ja]
  10569. */
  10570. /**
  10571. * @attribute orientation
  10572. * @type {string}
  10573. * @description
  10574. * [en]Either `"portrait"` or `"landscape"`.[/en]
  10575. * [ja]portraitもしくはlandscapeを指定します[/ja]
  10576. */
  10577. function IfElement() {
  10578. classCallCheck(this, IfElement);
  10579. var _this = possibleConstructorReturn(this, (IfElement.__proto__ || Object.getPrototypeOf(IfElement)).call(this));
  10580. contentReady(_this, function () {
  10581. if (platform._getSelectedPlatform() !== null) {
  10582. _this._platformUpdate();
  10583. } else if (!_this._isAllowedPlatform()) {
  10584. while (_this.childNodes[0]) {
  10585. _this.childNodes[0].remove();
  10586. }
  10587. _this._platformUpdate();
  10588. }
  10589. });
  10590. _this._onOrientationChange();
  10591. return _this;
  10592. }
  10593. createClass(IfElement, [{
  10594. key: 'connectedCallback',
  10595. value: function connectedCallback() {
  10596. orientation.on('change', this._onOrientationChange.bind(this));
  10597. }
  10598. }, {
  10599. key: 'attributeChangedCallback',
  10600. value: function attributeChangedCallback(name) {
  10601. if (name === 'orientation') {
  10602. this._onOrientationChange();
  10603. }
  10604. }
  10605. }, {
  10606. key: 'disconnectedCallback',
  10607. value: function disconnectedCallback() {
  10608. orientation.off('change', this._onOrientationChange);
  10609. }
  10610. }, {
  10611. key: '_platformUpdate',
  10612. value: function _platformUpdate() {
  10613. this.style.display = this._isAllowedPlatform() ? '' : 'none';
  10614. }
  10615. }, {
  10616. key: '_isAllowedPlatform',
  10617. value: function _isAllowedPlatform() {
  10618. return !this.getAttribute('platform') || this.getAttribute('platform').split(/\s+/).indexOf(platform.getMobileOS()) >= 0;
  10619. }
  10620. }, {
  10621. key: '_onOrientationChange',
  10622. value: function _onOrientationChange() {
  10623. if (this.hasAttribute('orientation') && this._isAllowedPlatform()) {
  10624. var conditionalOrientation = this.getAttribute('orientation').toLowerCase();
  10625. var currentOrientation = orientation.isPortrait() ? 'portrait' : 'landscape';
  10626. this.style.display = conditionalOrientation === currentOrientation ? '' : 'none';
  10627. }
  10628. }
  10629. }], [{
  10630. key: 'observedAttributes',
  10631. get: function get$$1() {
  10632. return ['orientation'];
  10633. }
  10634. }]);
  10635. return IfElement;
  10636. }(BaseElement);
  10637. onsElements.If = IfElement;
  10638. customElements.define('ons-if', IfElement);
  10639. /*
  10640. Copyright 2013-2015 ASIAL CORPORATION
  10641. Licensed under the Apache License, Version 2.0 (the "License");
  10642. you may not use this file except in compliance with the License.
  10643. You may obtain a copy of the License at
  10644. http://www.apache.org/licenses/LICENSE-2.0
  10645. Unless required by applicable law or agreed to in writing, software
  10646. distributed under the License is distributed on an "AS IS" BASIS,
  10647. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10648. See the License for the specific language governing permissions and
  10649. limitations under the License.
  10650. */
  10651. var BaseAnimator = function () {
  10652. /**
  10653. * @param {Object} options
  10654. * @param {String} options.timing
  10655. * @param {Number} options.duration
  10656. * @param {Number} options.delay
  10657. */
  10658. function BaseAnimator() {
  10659. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10660. classCallCheck(this, BaseAnimator);
  10661. this.timing = options.timing || 'linear';
  10662. this.duration = options.duration || 0;
  10663. this.delay = options.delay || 0;
  10664. this.def = {
  10665. timing: this.timing,
  10666. duration: this.duration,
  10667. delay: this.delay
  10668. };
  10669. }
  10670. createClass(BaseAnimator, null, [{
  10671. key: 'extend',
  10672. value: function extend() {
  10673. var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  10674. var extendedAnimator = this;
  10675. var newAnimator = function newAnimator() {
  10676. extendedAnimator.apply(this, arguments);
  10677. util$1.extend(this, properties);
  10678. };
  10679. newAnimator.prototype = this.prototype;
  10680. return newAnimator;
  10681. }
  10682. }]);
  10683. return BaseAnimator;
  10684. }();
  10685. /*
  10686. Copyright 2013-2015 ASIAL CORPORATION
  10687. Licensed under the Apache License, Version 2.0 (the "License");
  10688. you may not use this file except in compliance with the License.
  10689. You may obtain a copy of the License at
  10690. http://www.apache.org/licenses/LICENSE-2.0
  10691. Unless required by applicable law or agreed to in writing, software
  10692. distributed under the License is distributed on an "AS IS" BASIS,
  10693. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10694. See the License for the specific language governing permissions and
  10695. limitations under the License.
  10696. */
  10697. // This object should not be exposed to users. Please keep this private.
  10698. var iPhoneXPatch = {};
  10699. iPhoneXPatch.isIPhoneXPortraitPatchActive = function () {
  10700. return document.documentElement.getAttribute('onsflag-iphonex-portrait') != null && window.innerWidth < window.innerHeight;
  10701. };
  10702. iPhoneXPatch.isIPhoneXLandscapePatchActive = function () {
  10703. // If width === height, treat it as landscape
  10704. return document.documentElement.getAttribute('onsflag-iphonex-landscape') != null && window.innerWidth >= window.innerHeight;
  10705. };
  10706. /**
  10707. * Returns the safe area lengths based on the current state of the safe areas.
  10708. */
  10709. iPhoneXPatch.getSafeAreaLengths = function () {
  10710. var safeAreaLengths = void 0;
  10711. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  10712. safeAreaLengths = {
  10713. top: 44,
  10714. right: 0,
  10715. bottom: 34,
  10716. left: 0
  10717. };
  10718. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  10719. safeAreaLengths = {
  10720. top: 0,
  10721. right: 44,
  10722. bottom: 21,
  10723. left: 44
  10724. };
  10725. } else {
  10726. safeAreaLengths = {
  10727. top: 0,
  10728. right: 0,
  10729. bottom: 0,
  10730. left: 0
  10731. };
  10732. }
  10733. return safeAreaLengths;
  10734. };
  10735. /**
  10736. * Returns the safe area rect based on the current state of the safe areas.
  10737. */
  10738. iPhoneXPatch.getSafeAreaDOMRect = function () {
  10739. var safeAreaRect = void 0;
  10740. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  10741. safeAreaRect = {
  10742. x: 0,
  10743. y: 44, /* 0 + 44 (top safe area) */
  10744. width: window.innerWidth,
  10745. height: window.innerHeight - 78 /* height - 44 (top safe area) - 34 (bottom safe area) */
  10746. };
  10747. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  10748. safeAreaRect = {
  10749. x: 44, /* 0 + 44 (left safe area) */
  10750. y: 0,
  10751. width: window.innerWidth - 88, /* width - 44 (left safe area) - 34 (right safe area) */
  10752. height: window.innerHeight - 21 /* height - 21 (bottom safe area) */
  10753. };
  10754. } else {
  10755. safeAreaRect = {
  10756. x: 0,
  10757. y: 0,
  10758. width: window.innerWidth,
  10759. height: window.innerHeight
  10760. };
  10761. }
  10762. return _extends({}, safeAreaRect, {
  10763. left: safeAreaRect.x,
  10764. top: safeAreaRect.y,
  10765. right: safeAreaRect.x + safeAreaRect.width,
  10766. bottom: safeAreaRect.y + safeAreaRect.height
  10767. });
  10768. };
  10769. /*
  10770. Copyright 2013-2015 ASIAL CORPORATION
  10771. Licensed under the Apache License, Version 2.0 (the "License");
  10772. you may not use this file except in compliance with the License.
  10773. You may obtain a copy of the License at
  10774. http://www.apache.org/licenses/LICENSE-2.0
  10775. Unless required by applicable law or agreed to in writing, software
  10776. distributed under the License is distributed on an "AS IS" BASIS,
  10777. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10778. See the License for the specific language governing permissions and
  10779. limitations under the License.
  10780. */
  10781. var ActionSheetAnimator = function (_BaseAnimator) {
  10782. inherits(ActionSheetAnimator, _BaseAnimator);
  10783. function ActionSheetAnimator() {
  10784. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10785. _ref$timing = _ref.timing,
  10786. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  10787. _ref$delay = _ref.delay,
  10788. delay = _ref$delay === undefined ? 0 : _ref$delay,
  10789. _ref$duration = _ref.duration,
  10790. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  10791. classCallCheck(this, ActionSheetAnimator);
  10792. return possibleConstructorReturn(this, (ActionSheetAnimator.__proto__ || Object.getPrototypeOf(ActionSheetAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  10793. }
  10794. /**
  10795. * @param {HTMLElement} dialog
  10796. * @param {Function} done
  10797. */
  10798. createClass(ActionSheetAnimator, [{
  10799. key: 'show',
  10800. value: function show(dialog, done) {
  10801. done();
  10802. }
  10803. /**
  10804. * @param {HTMLElement} dialog
  10805. * @param {Function} done
  10806. */
  10807. }, {
  10808. key: 'hide',
  10809. value: function hide(dialog, done) {
  10810. done();
  10811. }
  10812. }]);
  10813. return ActionSheetAnimator;
  10814. }(BaseAnimator);
  10815. /**
  10816. * Android style animator for Action Sheet.
  10817. */
  10818. var MDActionSheetAnimator = function (_ActionSheetAnimator) {
  10819. inherits(MDActionSheetAnimator, _ActionSheetAnimator);
  10820. function MDActionSheetAnimator() {
  10821. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10822. _ref2$timing = _ref2.timing,
  10823. timing = _ref2$timing === undefined ? 'ease' : _ref2$timing,
  10824. _ref2$delay = _ref2.delay,
  10825. delay = _ref2$delay === undefined ? 0 : _ref2$delay,
  10826. _ref2$duration = _ref2.duration,
  10827. duration = _ref2$duration === undefined ? 0.4 : _ref2$duration;
  10828. classCallCheck(this, MDActionSheetAnimator);
  10829. var _this2 = possibleConstructorReturn(this, (MDActionSheetAnimator.__proto__ || Object.getPrototypeOf(MDActionSheetAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  10830. _this2.maskTiming = 'linear';
  10831. _this2.maskDuration = 0.2;
  10832. return _this2;
  10833. }
  10834. /**
  10835. * @param {Object} dialog
  10836. * @param {Function} callback
  10837. */
  10838. createClass(MDActionSheetAnimator, [{
  10839. key: 'show',
  10840. value: function show(dialog, callback) {
  10841. Animit.runAll(Animit(dialog._mask).queue({ opacity: 0 }).wait(this.delay).queue({ opacity: 1.0 }, {
  10842. duration: this.maskDuration,
  10843. timing: this.maskTiming
  10844. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, 80%, 0)', opacity: 0 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }).queue(function (done) {
  10845. callback && callback();
  10846. done();
  10847. }));
  10848. }
  10849. /**
  10850. * @param {Object} dialog
  10851. * @param {Function} callback
  10852. */
  10853. }, {
  10854. key: 'hide',
  10855. value: function hide(dialog, callback) {
  10856. Animit.runAll(Animit(dialog._mask).queue({ opacity: 1 }).wait(this.delay).queue({ opacity: 0 }, {
  10857. duration: this.maskDuration,
  10858. timing: this.maskTiming
  10859. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 1 }, { transform: 'translate3d(0, 80%, 0)', opacity: 0 }).queue(function (done) {
  10860. callback && callback();
  10861. done();
  10862. }));
  10863. }
  10864. }]);
  10865. return MDActionSheetAnimator;
  10866. }(ActionSheetAnimator);
  10867. /**
  10868. * iOS style animator for dialog.
  10869. */
  10870. var IOSActionSheetAnimator = function (_ActionSheetAnimator2) {
  10871. inherits(IOSActionSheetAnimator, _ActionSheetAnimator2);
  10872. function IOSActionSheetAnimator() {
  10873. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10874. _ref3$timing = _ref3.timing,
  10875. timing = _ref3$timing === undefined ? 'ease' : _ref3$timing,
  10876. _ref3$delay = _ref3.delay,
  10877. delay = _ref3$delay === undefined ? 0 : _ref3$delay,
  10878. _ref3$duration = _ref3.duration,
  10879. duration = _ref3$duration === undefined ? 0.3 : _ref3$duration;
  10880. classCallCheck(this, IOSActionSheetAnimator);
  10881. var _this3 = possibleConstructorReturn(this, (IOSActionSheetAnimator.__proto__ || Object.getPrototypeOf(IOSActionSheetAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  10882. _this3.maskTiming = 'linear';
  10883. _this3.maskDuration = 0.2;
  10884. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  10885. _this3.liftAmount = 'calc(100% + 48px)';
  10886. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  10887. _this3.liftAmount = 'calc(100% + 33px)';
  10888. } else {
  10889. _this3.liftAmount = document.body.clientHeight / 2.0 - 1 + 'px'; // avoid Forced Synchronous Layout
  10890. }
  10891. return _this3;
  10892. }
  10893. /**
  10894. * @param {Object} dialog
  10895. * @param {Function} callback
  10896. */
  10897. createClass(IOSActionSheetAnimator, [{
  10898. key: 'show',
  10899. value: function show(dialog, callback) {
  10900. Animit.runAll(Animit(dialog._mask).queue({ opacity: 0 }).wait(this.delay).queue({ opacity: 1 }, {
  10901. duration: this.maskDuration,
  10902. timing: this.maskTiming
  10903. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, ' + this.liftAmount + ', 0)' }, { transform: 'translate3d(0, 0, 0)' }).queue(function (done) {
  10904. callback && callback();
  10905. done();
  10906. }));
  10907. }
  10908. /**
  10909. * @param {Object} dialog
  10910. * @param {Function} callback
  10911. */
  10912. }, {
  10913. key: 'hide',
  10914. value: function hide(dialog, callback) {
  10915. Animit.runAll(Animit(dialog._mask).queue({ opacity: 1 }).wait(this.delay).queue({ opacity: 0 }, {
  10916. duration: this.maskDuration,
  10917. timing: this.maskTiming
  10918. }), Animit(dialog._sheet, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, ' + this.liftAmount + ', 0)' }).queue(function (done) {
  10919. callback && callback();
  10920. done();
  10921. }));
  10922. }
  10923. }]);
  10924. return IOSActionSheetAnimator;
  10925. }(ActionSheetAnimator);
  10926. /*
  10927. Copyright 2013-2015 ASIAL CORPORATION
  10928. Licensed under the Apache License, Version 2.0 (the "License");
  10929. you may not use this file except in compliance with the License.
  10930. You may obtain a copy of the License at
  10931. http://www.apache.org/licenses/LICENSE-2.0
  10932. Unless required by applicable law or agreed to in writing, software
  10933. distributed under the License is distributed on an "AS IS" BASIS,
  10934. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10935. See the License for the specific language governing permissions and
  10936. limitations under the License.
  10937. */
  10938. var BaseDialogElement = function (_BaseElement) {
  10939. inherits(BaseDialogElement, _BaseElement);
  10940. createClass(BaseDialogElement, [{
  10941. key: '_updateAnimatorFactory',
  10942. value: function _updateAnimatorFactory() {
  10943. util$1.throwMember();
  10944. }
  10945. }, {
  10946. key: '_toggleStyle',
  10947. value: function _toggleStyle(shouldShow) {
  10948. this.style.display = shouldShow ? 'block' : 'none';
  10949. }
  10950. }, {
  10951. key: '_scheme',
  10952. get: function get$$1() {
  10953. util$1.throwMember();
  10954. }
  10955. }]);
  10956. function BaseDialogElement() {
  10957. classCallCheck(this, BaseDialogElement);
  10958. var _this = possibleConstructorReturn(this, (BaseDialogElement.__proto__ || Object.getPrototypeOf(BaseDialogElement)).call(this));
  10959. if (_this.constructor === BaseDialogElement) {
  10960. util$1.throwAbstract();
  10961. }
  10962. _this._visible = false;
  10963. _this._doorLock = new DoorLock();
  10964. _this._cancel = _this._cancel.bind(_this);
  10965. _this._selfCamelName = util$1.camelize(_this.tagName.slice(4));
  10966. _this._defaultDBB = function (e) {
  10967. return _this.cancelable ? _this._cancel() : e.callParentHandler();
  10968. };
  10969. _this._animatorFactory = _this._updateAnimatorFactory();
  10970. return _this;
  10971. }
  10972. createClass(BaseDialogElement, [{
  10973. key: '_cancel',
  10974. value: function _cancel() {
  10975. var _this2 = this;
  10976. if (this.cancelable && !this._running) {
  10977. this._running = true;
  10978. this.hide().then(function () {
  10979. _this2._running = false;
  10980. util$1.triggerElementEvent(_this2, 'dialog-cancel');
  10981. }, function () {
  10982. return _this2._running = false;
  10983. });
  10984. }
  10985. }
  10986. }, {
  10987. key: 'show',
  10988. value: function show() {
  10989. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  10990. args[_key] = arguments[_key];
  10991. }
  10992. return this._setVisible.apply(this, [true].concat(args));
  10993. }
  10994. }, {
  10995. key: 'hide',
  10996. value: function hide() {
  10997. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  10998. args[_key2] = arguments[_key2];
  10999. }
  11000. return this._setVisible.apply(this, [false].concat(args));
  11001. }
  11002. }, {
  11003. key: 'toggle',
  11004. value: function toggle() {
  11005. for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  11006. args[_key3] = arguments[_key3];
  11007. }
  11008. return this._setVisible.apply(this, [!this.visible].concat(args));
  11009. }
  11010. }, {
  11011. key: '_setVisible',
  11012. value: function _setVisible(shouldShow) {
  11013. var _util$triggerElementE,
  11014. _this3 = this;
  11015. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11016. var action = shouldShow ? 'show' : 'hide';
  11017. options = _extends({}, options);
  11018. options.animationOptions = util$1.extend(options.animationOptions || {}, AnimatorFactory.parseAnimationOptionsString(this.getAttribute('animation-options')));
  11019. var canceled = false;
  11020. util$1.triggerElementEvent(this, 'pre' + action, (_util$triggerElementE = {}, defineProperty(_util$triggerElementE, this._selfCamelName, this), defineProperty(_util$triggerElementE, 'cancel', function cancel() {
  11021. return canceled = true;
  11022. }), _util$triggerElementE));
  11023. if (canceled) {
  11024. return Promise.reject('Canceled in pre' + action + ' event.');
  11025. }
  11026. return new Promise(function (resolve) {
  11027. _this3._doorLock.waitUnlock(function () {
  11028. var unlock = _this3._doorLock.lock();
  11029. var animator = _this3._animatorFactory.newAnimator(options);
  11030. shouldShow && _this3._toggleStyle(true, options);
  11031. _this3._visible = shouldShow;
  11032. util$1.iosPageScrollFix(shouldShow);
  11033. contentReady(_this3, function () {
  11034. animator[action](_this3, function () {
  11035. !shouldShow && _this3._toggleStyle(false, options);
  11036. unlock();
  11037. util$1.propagateAction(_this3, '_' + action);
  11038. util$1.triggerElementEvent(_this3, 'post' + action, defineProperty({}, _this3._selfCamelName, _this3)); // postshow posthide
  11039. if (options.callback instanceof Function) {
  11040. options.callback(_this3);
  11041. }
  11042. resolve(_this3);
  11043. });
  11044. });
  11045. });
  11046. });
  11047. }
  11048. }, {
  11049. key: '_updateMask',
  11050. value: function _updateMask() {
  11051. var _this4 = this;
  11052. contentReady(this, function () {
  11053. if (_this4._mask && _this4.getAttribute('mask-color')) {
  11054. _this4._mask.style.backgroundColor = _this4.getAttribute('mask-color');
  11055. }
  11056. });
  11057. }
  11058. }, {
  11059. key: 'connectedCallback',
  11060. value: function connectedCallback() {
  11061. var _this5 = this;
  11062. if (typeof this._defaultDBB === 'function') {
  11063. this.onDeviceBackButton = this._defaultDBB.bind(this);
  11064. }
  11065. contentReady(this, function () {
  11066. if (_this5._mask) {
  11067. _this5._mask.addEventListener('click', _this5._cancel, false);
  11068. util$1.iosMaskScrollFix(_this5._mask, true);
  11069. }
  11070. });
  11071. }
  11072. }, {
  11073. key: 'disconnectedCallback',
  11074. value: function disconnectedCallback() {
  11075. if (this._backButtonHandler) {
  11076. this._backButtonHandler.destroy();
  11077. this._backButtonHandler = null;
  11078. }
  11079. if (this._mask) {
  11080. this._mask.removeEventListener('click', this._cancel, false);
  11081. util$1.iosMaskScrollFix(this._mask, false);
  11082. }
  11083. }
  11084. }, {
  11085. key: 'attributeChangedCallback',
  11086. value: function attributeChangedCallback(name, last, current) {
  11087. switch (name) {
  11088. case 'modifier':
  11089. ModifierUtil.onModifierChanged(last, current, this, this._scheme);
  11090. break;
  11091. case 'animation':
  11092. this._animatorFactory = this._updateAnimatorFactory();
  11093. break;
  11094. case 'mask-color':
  11095. this._updateMask();
  11096. break;
  11097. }
  11098. }
  11099. }, {
  11100. key: 'onDeviceBackButton',
  11101. get: function get$$1() {
  11102. return this._backButtonHandler;
  11103. },
  11104. set: function set$$1(callback) {
  11105. if (this._backButtonHandler) {
  11106. this._backButtonHandler.destroy();
  11107. }
  11108. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  11109. }
  11110. }, {
  11111. key: 'visible',
  11112. get: function get$$1() {
  11113. return this._visible;
  11114. }
  11115. }, {
  11116. key: 'disabled',
  11117. set: function set$$1(value) {
  11118. return util$1.toggleAttribute(this, 'disabled', value);
  11119. },
  11120. get: function get$$1() {
  11121. return this.hasAttribute('disabled');
  11122. }
  11123. }, {
  11124. key: 'cancelable',
  11125. set: function set$$1(value) {
  11126. return util$1.toggleAttribute(this, 'cancelable', value);
  11127. },
  11128. get: function get$$1() {
  11129. return this.hasAttribute('cancelable');
  11130. }
  11131. }], [{
  11132. key: 'observedAttributes',
  11133. get: function get$$1() {
  11134. return ['modifier', 'animation', 'mask-color'];
  11135. }
  11136. }, {
  11137. key: 'events',
  11138. get: function get$$1() {
  11139. return ['preshow', 'postshow', 'prehide', 'posthide', 'dialog-cancel'];
  11140. }
  11141. }]);
  11142. return BaseDialogElement;
  11143. }(BaseElement);
  11144. /*
  11145. Copyright 2013-2015 ASIAL CORPORATION
  11146. Licensed under the Apache License, Version 2.0 (the "License");
  11147. you may not use this file except in compliance with the License.
  11148. You may obtain a copy of the License at
  11149. http://www.apache.org/licenses/LICENSE-2.0
  11150. Unless required by applicable law or agreed to in writing, software
  11151. distributed under the License is distributed on an "AS IS" BASIS,
  11152. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11153. See the License for the specific language governing permissions and
  11154. limitations under the License.
  11155. */
  11156. var scheme = {
  11157. '.action-sheet': 'action-sheet--*',
  11158. '.action-sheet-mask': 'action-sheet-mask--*',
  11159. '.action-sheet-title': 'action-sheet-title--*'
  11160. };
  11161. var _animatorDict = {
  11162. 'default': function _default() {
  11163. return platform.isAndroid() ? MDActionSheetAnimator : IOSActionSheetAnimator;
  11164. },
  11165. 'none': ActionSheetAnimator
  11166. };
  11167. /**
  11168. * @element ons-action-sheet
  11169. * @category dialog
  11170. * @description
  11171. * [en]
  11172. * Action/bottom sheet that is displayed on top of current screen.
  11173. *
  11174. * This element can either be attached directly to the `<body>` or dynamically created from a template using the `ons.createElement(template, { append: true })` utility function and the `<template>` tag.
  11175. *
  11176. * The action sheet is useful for displaying a list of options and asking the user to make a decision. A `ons-action-sheet-button` is provided for this purpose, although it can contain any type of content.
  11177. *
  11178. * It will automatically be displayed as Material Design (bottom sheet) when running on an Android device.
  11179. * [/en]
  11180. * [ja]
  11181. * アクションシート、もしくはボトムシートを現在のスクリーン上に表示します。
  11182. *
  11183. * この要素は、`<body>`要素に直接アタッチされるか、もしくは`ons.createElement(template, { append: true })`と`<template>`タグを使ってテンプレートから動的に生成されます。
  11184. *
  11185. * アクションシートは、選択肢のリストを表示してユーザーに尋ねるのに便利です。`ons-action-sheet-button`は、この要素の中に置くために提供されていますが、それ以外にも他のどのような要素を含むことができます。
  11186. *
  11187. * Androidデバイスで実行されるときには、自動的にマテリアルデザイン(ボトムシート)として表示されます。
  11188. * [/ja]
  11189. * @modifier material
  11190. * [en]Display a Material Design bottom sheet.[/en]
  11191. * [ja]マテリアルデザインのボトムシートを表示します。[/ja]
  11192. * @tutorial vanilla/reference/action-sheet
  11193. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  11194. * @seealso ons-popover
  11195. * [en]`<ons-popover>` component[/en]
  11196. * [ja]ons-popoverコンポーネント[/ja]
  11197. * @seealso ons-modal
  11198. * [en]`<ons-modal>` component[/en]
  11199. * [ja]ons-modalコンポーネント[/ja]
  11200. * @example
  11201. * <ons-action-sheet id="sheet">
  11202. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11203. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11204. * </ons-action-sheet>
  11205. *
  11206. * <script>
  11207. * document.getElementById('sheet').show();
  11208. * </script>
  11209. */
  11210. var ActionSheetElement = function (_BaseDialogElement) {
  11211. inherits(ActionSheetElement, _BaseDialogElement);
  11212. /**
  11213. * @event preshow
  11214. * @description
  11215. * [en]Fired just before the action sheet is displayed.[/en]
  11216. * [ja]ダイアログが表示される直前に発火します。[/ja]
  11217. * @param {Object} event [en]Event object.[/en]
  11218. * @param {Object} event.actionSheet
  11219. * [en]Component object.[/en]
  11220. * [ja]コンポーネントのオブジェクト。[/ja]
  11221. * @param {Function} event.cancel
  11222. * [en]Execute this function to stop the action sheet from being shown.[/en]
  11223. * [ja]この関数を実行すると、ダイアログの表示がキャンセルされます。[/ja]
  11224. */
  11225. /**
  11226. * @event postshow
  11227. * @description
  11228. * [en]Fired just after the action sheet is displayed.[/en]
  11229. * [ja]ダイアログが表示された直後に発火します。[/ja]
  11230. * @param {Object} event [en]Event object.[/en]
  11231. * @param {Object} event.actionSheet
  11232. * [en]Component object.[/en]
  11233. * [ja]コンポーネントのオブジェクト。[/ja]
  11234. */
  11235. /**
  11236. * @event prehide
  11237. * @description
  11238. * [en]Fired just before the action sheet is hidden.[/en]
  11239. * [ja]ダイアログが隠れる直前に発火します。[/ja]
  11240. * @param {Object} event [en]Event object.[/en]
  11241. * @param {Object} event.actionSheet
  11242. * [en]Component object.[/en]
  11243. * [ja]コンポーネントのオブジェクト。[/ja]
  11244. * @param {Function} event.cancel
  11245. * [en]Execute this function to stop the action sheet from being hidden.[/en]
  11246. * [ja]この関数を実行すると、ダイアログの非表示がキャンセルされます。[/ja]
  11247. */
  11248. /**
  11249. * @event posthide
  11250. * @description
  11251. * [en]Fired just after the action sheet is hidden.[/en]
  11252. * [ja]ダイアログが隠れた後に発火します。[/ja]
  11253. * @param {Object} event [en]Event object.[/en]
  11254. * @param {Object} event.actionSheet
  11255. * [en]Component object.[/en]
  11256. * [ja]コンポーネントのオブジェクト。[/ja]
  11257. */
  11258. /**
  11259. * @attribute title
  11260. * @type {String}
  11261. * @description
  11262. * [en]Optional title of the action sheet. A new element will be created containing this string.[/en]
  11263. * [ja]アクションシートのタイトルを指定します。ここで指定した文字列を含む新しい要素が作成されます。[/ja]
  11264. */
  11265. /**
  11266. * @attribute modifier
  11267. * @type {String}
  11268. * @description
  11269. * [en]The appearance of the action sheet.[/en]
  11270. * [ja]ダイアログの表現を指定します。[/ja]
  11271. */
  11272. /**
  11273. * @attribute cancelable
  11274. * @description
  11275. * [en]If this attribute is set the action sheet can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  11276. * [ja]この属性が設定されると、アクションシートの背景やAndroidデバイスのバックボタンを推すことでアクションシートが閉じるようになります。[/ja]
  11277. */
  11278. /**
  11279. * @attribute disabled
  11280. * @description
  11281. * [en]If this attribute is set the action sheet is disabled.[/en]
  11282. * [ja]この属性がある時、ダイアログはdisabled状態になります。[/ja]
  11283. */
  11284. /**
  11285. * @attribute animation
  11286. * @type {String}
  11287. * @default default
  11288. * @description
  11289. * [en]The animation used when showing and hiding the action sheet. Can be either `"none"` or `"default"`.[/en]
  11290. * [ja]ダイアログを表示する際のアニメーション名を指定します。"none"もしくは"default"を指定できます。[/ja]
  11291. */
  11292. /**
  11293. * @attribute animation-options
  11294. * @type {Expression}
  11295. * @description
  11296. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  11297. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/ja]
  11298. */
  11299. /**
  11300. * @attribute mask-color
  11301. * @type {String}
  11302. * @default rgba(0, 0, 0, 0.2)
  11303. * @description
  11304. * [en]Color of the background mask. Default is `"rgba(0, 0, 0, 0.2)"`.[/en]
  11305. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  11306. */
  11307. function ActionSheetElement() {
  11308. classCallCheck(this, ActionSheetElement);
  11309. var _this = possibleConstructorReturn(this, (ActionSheetElement.__proto__ || Object.getPrototypeOf(ActionSheetElement)).call(this));
  11310. contentReady(_this, function () {
  11311. return _this._compile();
  11312. });
  11313. return _this;
  11314. }
  11315. createClass(ActionSheetElement, [{
  11316. key: '_updateAnimatorFactory',
  11317. value: function _updateAnimatorFactory() {
  11318. return new AnimatorFactory({
  11319. animators: _animatorDict,
  11320. baseClass: ActionSheetAnimator,
  11321. baseClassName: 'ActionSheetAnimator',
  11322. defaultAnimation: this.getAttribute('animation')
  11323. });
  11324. }
  11325. }, {
  11326. key: '_compile',
  11327. value: function _compile() {
  11328. autoStyle.prepare(this);
  11329. this.style.display = 'none';
  11330. this.style.zIndex = 10001;
  11331. /* Expected result:
  11332. * <ons-action-sheet>
  11333. * <div class="action-sheet-mask"></div>
  11334. * <div class="action-sheet">
  11335. * <div class="action-sheet-title></div>
  11336. * ...
  11337. * </div>
  11338. * </ons-action-sheet>
  11339. */
  11340. if (!this._sheet) {
  11341. var sheet = document.createElement('div');
  11342. sheet.classList.add('action-sheet');
  11343. while (this.firstChild) {
  11344. sheet.appendChild(this.firstChild);
  11345. }
  11346. this.appendChild(sheet);
  11347. }
  11348. if (!this._title && this.hasAttribute('title')) {
  11349. var title = document.createElement('div');
  11350. title.innerHTML = this.getAttribute('title');
  11351. title.classList.add('action-sheet-title');
  11352. this._sheet.insertBefore(title, this._sheet.firstChild);
  11353. }
  11354. if (!this._mask) {
  11355. var mask = document.createElement('div');
  11356. mask.classList.add('action-sheet-mask');
  11357. this.insertBefore(mask, this.firstChild);
  11358. }
  11359. this._sheet.style.zIndex = 20001;
  11360. this._mask.style.zIndex = 20000;
  11361. ModifierUtil.initModifier(this, this._scheme);
  11362. }
  11363. }, {
  11364. key: '_updateTitle',
  11365. value: function _updateTitle() {
  11366. if (this._title) {
  11367. this._title.innerHTML = this.getAttribute('title');
  11368. }
  11369. }
  11370. /**
  11371. * @property onDeviceBackButton
  11372. * @type {Object}
  11373. * @description
  11374. * [en]Back-button handler.[/en]
  11375. * [ja]バックボタンハンドラ。[/ja]
  11376. */
  11377. /**
  11378. * @method show
  11379. * @signature show([options])
  11380. * @param {Object} [options]
  11381. * [en]Parameter object.[/en]
  11382. * [ja]オプションを指定するオブジェクト。[/ja]
  11383. * @param {String} [options.animation]
  11384. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  11385. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定します。[/ja]
  11386. * @param {String} [options.animationOptions]
  11387. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  11388. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  11389. * @param {Function} [options.callback]
  11390. * [en]This function is called after the action sheet has been revealed.[/en]
  11391. * [ja]ダイアログが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  11392. * @description
  11393. * [en]Show the action sheet.[/en]
  11394. * [ja]ダイアログを開きます。[/ja]
  11395. * @return {Promise} Resolves to the displayed element.
  11396. */
  11397. /**
  11398. * @method hide
  11399. * @signature hide([options])
  11400. * @param {Object} [options]
  11401. * [en]Parameter object.[/en]
  11402. * [ja]オプションを指定するオブジェクト。[/ja]
  11403. * @param {String} [options.animation]
  11404. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  11405. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定できます。[/ja]
  11406. * @param {String} [options.animationOptions]
  11407. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  11408. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/ja]
  11409. * @param {Function} [options.callback]
  11410. * [en]This functions is called after the action sheet has been hidden.[/en]
  11411. * [ja]ダイアログが隠れた後に呼び出される関数オブジェクトを指定します。[/ja]
  11412. * @description
  11413. * [en]Hide the action sheet.[/en]
  11414. * [ja]ダイアログを閉じます。[/ja]
  11415. * @return {Promise}
  11416. * [en]Resolves to the hidden element[/en]
  11417. * [ja]隠れた要素を解決します。[/ja]
  11418. */
  11419. /**
  11420. * @property visible
  11421. * @readonly
  11422. * @type {Boolean}
  11423. * @description
  11424. * [en]Whether the action sheet is visible or not.[/en]
  11425. * [ja]要素が見える場合に`true`。[/ja]
  11426. */
  11427. /**
  11428. * @property disabled
  11429. * @type {Boolean}
  11430. * @description
  11431. * [en]Whether the action sheet is disabled or not.[/en]
  11432. * [ja]無効化されている場合に`true`。[/ja]
  11433. */
  11434. /**
  11435. * @property cancelable
  11436. * @type {Boolean}
  11437. * @description
  11438. * [en]Whether the action sheet is cancelable or not. A cancelable action sheet can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  11439. * [ja]アクションシートがキャンセル可能かどうかを設定します。キャンセル可能なアクションシートは、背景をタップしたりAndroidデバイスのバックボタンを推すことで閉じるようになります。[/ja]
  11440. */
  11441. }, {
  11442. key: 'attributeChangedCallback',
  11443. value: function attributeChangedCallback(name, last, current) {
  11444. if (name === 'title') {
  11445. this._updateTitle();
  11446. } else {
  11447. get(ActionSheetElement.prototype.__proto__ || Object.getPrototypeOf(ActionSheetElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  11448. }
  11449. }
  11450. /**
  11451. * @param {String} name
  11452. * @param {ActionSheetAnimator} Animator
  11453. */
  11454. }, {
  11455. key: '_scheme',
  11456. get: function get$$1() {
  11457. return scheme;
  11458. }
  11459. }, {
  11460. key: '_mask',
  11461. get: function get$$1() {
  11462. return util$1.findChild(this, '.action-sheet-mask');
  11463. }
  11464. }, {
  11465. key: '_sheet',
  11466. get: function get$$1() {
  11467. return util$1.findChild(this, '.action-sheet');
  11468. }
  11469. }, {
  11470. key: '_title',
  11471. get: function get$$1() {
  11472. return this.querySelector('.action-sheet-title');
  11473. }
  11474. }], [{
  11475. key: 'registerAnimator',
  11476. value: function registerAnimator(name, Animator) {
  11477. if (!(Animator.prototype instanceof ActionSheetAnimator)) {
  11478. util$1.throwAnimator('ActionSheet');
  11479. }
  11480. _animatorDict[name] = Animator;
  11481. }
  11482. }, {
  11483. key: 'observedAttributes',
  11484. get: function get$$1() {
  11485. return [].concat(toConsumableArray(get(ActionSheetElement.__proto__ || Object.getPrototypeOf(ActionSheetElement), 'observedAttributes', this)), ['title']);
  11486. }
  11487. }, {
  11488. key: 'animators',
  11489. get: function get$$1() {
  11490. return _animatorDict;
  11491. }
  11492. }, {
  11493. key: 'ActionSheetAnimator',
  11494. get: function get$$1() {
  11495. return ActionSheetAnimator;
  11496. }
  11497. }]);
  11498. return ActionSheetElement;
  11499. }(BaseDialogElement);
  11500. onsElements.ActionSheet = ActionSheetElement;
  11501. customElements.define('ons-action-sheet', ActionSheetElement);
  11502. /*
  11503. Copyright 2013-2015 ASIAL CORPORATION
  11504. Licensed under the Apache License, Version 2.0 (the "License");
  11505. you may not use this file except in compliance with the License.
  11506. You may obtain a copy of the License at
  11507. http://www.apache.org/licenses/LICENSE-2.0
  11508. Unless required by applicable law or agreed to in writing, software
  11509. distributed under the License is distributed on an "AS IS" BASIS,
  11510. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11511. See the License for the specific language governing permissions and
  11512. limitations under the License.
  11513. */
  11514. var BaseButtonElement = function (_BaseElement) {
  11515. inherits(BaseButtonElement, _BaseElement);
  11516. createClass(BaseButtonElement, [{
  11517. key: '_scheme',
  11518. get: function get$$1() {
  11519. util$1.throwMember();
  11520. }
  11521. }, {
  11522. key: '_defaultClassName',
  11523. get: function get$$1() {
  11524. util$1.throwMember();
  11525. }
  11526. }, {
  11527. key: '_rippleOpt',
  11528. get: function get$$1() {
  11529. return [this];
  11530. }
  11531. }]);
  11532. function BaseButtonElement() {
  11533. classCallCheck(this, BaseButtonElement);
  11534. var _this = possibleConstructorReturn(this, (BaseButtonElement.__proto__ || Object.getPrototypeOf(BaseButtonElement)).call(this));
  11535. if (_this.constructor === BaseButtonElement) {
  11536. util$1.throwAbstract();
  11537. }
  11538. contentReady(_this, function () {
  11539. return _this._compile();
  11540. });
  11541. return _this;
  11542. }
  11543. createClass(BaseButtonElement, [{
  11544. key: '_compile',
  11545. value: function _compile() {
  11546. autoStyle.prepare(this);
  11547. this.classList.add(this._defaultClassName);
  11548. if (!this._icon && this.hasAttribute('icon')) {
  11549. util$1.checkMissingImport('Icon');
  11550. var icon = util$1.createElement('<ons-icon icon="' + this.getAttribute('icon') + '"></ons-icon>');
  11551. icon.classList.add(this._defaultClassName.replace('button', 'icon'));
  11552. this.insertBefore(icon, this.firstChild);
  11553. }
  11554. this._updateRipple();
  11555. ModifierUtil.initModifier(this, this._scheme);
  11556. }
  11557. }, {
  11558. key: '_updateIcon',
  11559. value: function _updateIcon() {
  11560. if (this._icon) {
  11561. this._icon.setAttribute('icon', this.getAttribute('icon'));
  11562. }
  11563. }
  11564. }, {
  11565. key: '_updateRipple',
  11566. value: function _updateRipple() {
  11567. this._rippleOpt && util$1.updateRipple.apply(util$1, toConsumableArray(this._rippleOpt));
  11568. }
  11569. }, {
  11570. key: 'attributeChangedCallback',
  11571. value: function attributeChangedCallback(name, last, current) {
  11572. switch (name) {
  11573. case 'class':
  11574. util$1.restoreClass(this, this._defaultClassName, this._scheme);
  11575. break;
  11576. case 'modifier':
  11577. ModifierUtil.onModifierChanged(last, current, this, this._scheme);
  11578. break;
  11579. case 'icon':
  11580. this._updateIcon();
  11581. break;
  11582. case 'ripple':
  11583. this.classList.contains(this._defaultClassName) && this._updateRipple();
  11584. break;
  11585. }
  11586. }
  11587. }, {
  11588. key: 'disabled',
  11589. set: function set$$1(value) {
  11590. return util$1.toggleAttribute(this, 'disabled', value);
  11591. },
  11592. get: function get$$1() {
  11593. return this.hasAttribute('disabled');
  11594. }
  11595. }, {
  11596. key: '_icon',
  11597. get: function get$$1() {
  11598. return util$1.findChild(this, 'ons-icon');
  11599. }
  11600. }], [{
  11601. key: 'observedAttributes',
  11602. get: function get$$1() {
  11603. return ['modifier', 'class', 'icon', 'ripple'];
  11604. }
  11605. }]);
  11606. return BaseButtonElement;
  11607. }(BaseElement);
  11608. /*
  11609. Copyright 2013-2015 ASIAL CORPORATION
  11610. Licensed under the Apache License, Version 2.0 (the "License");
  11611. you may not use this file except in compliance with the License.
  11612. You may obtain a copy of the License at
  11613. http://www.apache.org/licenses/LICENSE-2.0
  11614. Unless required by applicable law or agreed to in writing, software
  11615. distributed under the License is distributed on an "AS IS" BASIS,
  11616. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11617. See the License for the specific language governing permissions and
  11618. limitations under the License.
  11619. */
  11620. /**
  11621. * @element ons-action-sheet-button
  11622. * @category dialog
  11623. * @modifier destructive
  11624. * [en]Shows a "destructive" button (only for iOS).[/en]
  11625. * [ja]"destructive"なボタンを表示します(iOSでのみ有効)。[/ja]
  11626. * @description
  11627. * [en]Component that represent each button of the action sheet.[/en]
  11628. * [ja]アクションシートに表示される各ボタンを表現するコンポーネントです。[/ja]
  11629. * @seealso ons-action-sheet
  11630. * [en]The `<ons-action-sheet>` component[/en]
  11631. * [ja]ons-action-sheetコンポーネント[/ja]
  11632. * @seealso ons-list-item
  11633. * [en]The `<ons-list-item>` component[/en]
  11634. * [ja]ons-list-itemコンポーネント[/ja]
  11635. * @seealso ons-icon
  11636. * [en]The `<ons-icon>` component[/en]
  11637. * [ja]ons-iconコンポーネント[/ja]
  11638. * @tutorial vanilla/Reference/action-sheet
  11639. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  11640. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  11641. * @modifier material
  11642. * [en]Display a Material Design action sheet button.[/en]
  11643. * [ja]マテリアルデザインのアクションシート用のボタンを表示します。[/ja]
  11644. * @example
  11645. * <ons-action-sheet id="sheet">
  11646. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11647. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  11648. * </ons-action-sheet>
  11649. *
  11650. * <script>
  11651. * document.getElementById('sheet').show();
  11652. * </script>
  11653. */
  11654. var ActionSheetButtonElement = function (_BaseButtonElement) {
  11655. inherits(ActionSheetButtonElement, _BaseButtonElement);
  11656. function ActionSheetButtonElement() {
  11657. classCallCheck(this, ActionSheetButtonElement);
  11658. return possibleConstructorReturn(this, (ActionSheetButtonElement.__proto__ || Object.getPrototypeOf(ActionSheetButtonElement)).apply(this, arguments));
  11659. }
  11660. createClass(ActionSheetButtonElement, [{
  11661. key: '_scheme',
  11662. /**
  11663. * @attribute icon
  11664. * @type {String}
  11665. * @description
  11666. * [en]Creates an `ons-icon` component with this string. Only visible on Android. Check [See also](#seealso) section for more information.[/en]
  11667. * [ja]`ons-icon`コンポーネントを悪性します。Androidでのみ表示されます。[/ja]
  11668. */
  11669. /**
  11670. * @attribute modifier
  11671. * @type {String}
  11672. * @description
  11673. * [en]The appearance of the action sheet button.[/en]
  11674. * [ja]アクションシートボタンの見た目を設定します。[/ja]
  11675. */
  11676. get: function get$$1() {
  11677. return {
  11678. '': 'action-sheet-button--*',
  11679. '.action-sheet-icon': 'action-sheet-icon--*'
  11680. };
  11681. }
  11682. }, {
  11683. key: '_defaultClassName',
  11684. get: function get$$1() {
  11685. return 'action-sheet-button';
  11686. }
  11687. }, {
  11688. key: '_rippleOpt',
  11689. get: function get$$1() {
  11690. return undefined;
  11691. }
  11692. }]);
  11693. return ActionSheetButtonElement;
  11694. }(BaseButtonElement);
  11695. onsElements.ActionSheetButton = ActionSheetButtonElement;
  11696. customElements.define('ons-action-sheet-button', ActionSheetButtonElement);
  11697. /*
  11698. Copyright 2013-2015 ASIAL CORPORATION
  11699. Licensed under the Apache License, Version 2.0 (the "License");
  11700. you may not use this file except in compliance with the License.
  11701. You may obtain a copy of the License at
  11702. http://www.apache.org/licenses/LICENSE-2.0
  11703. Unless required by applicable law or agreed to in writing, software
  11704. distributed under the License is distributed on an "AS IS" BASIS,
  11705. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11706. See the License for the specific language governing permissions and
  11707. limitations under the License.
  11708. */
  11709. var AlertDialogAnimator = function (_BaseAnimator) {
  11710. inherits(AlertDialogAnimator, _BaseAnimator);
  11711. function AlertDialogAnimator() {
  11712. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11713. _ref$timing = _ref.timing,
  11714. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  11715. _ref$delay = _ref.delay,
  11716. delay = _ref$delay === undefined ? 0 : _ref$delay,
  11717. _ref$duration = _ref.duration,
  11718. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  11719. classCallCheck(this, AlertDialogAnimator);
  11720. return possibleConstructorReturn(this, (AlertDialogAnimator.__proto__ || Object.getPrototypeOf(AlertDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  11721. }
  11722. /**
  11723. * @param {HTMLElement} dialog
  11724. * @param {Function} done
  11725. */
  11726. createClass(AlertDialogAnimator, [{
  11727. key: 'show',
  11728. value: function show(dialog, done) {
  11729. done();
  11730. }
  11731. /**
  11732. * @param {HTMLElement} dialog
  11733. * @param {Function} done
  11734. */
  11735. }, {
  11736. key: 'hide',
  11737. value: function hide(dialog, done) {
  11738. done();
  11739. }
  11740. }]);
  11741. return AlertDialogAnimator;
  11742. }(BaseAnimator);
  11743. /**
  11744. * Android style animator for alert dialog.
  11745. */
  11746. var AndroidAlertDialogAnimator = function (_AlertDialogAnimator) {
  11747. inherits(AndroidAlertDialogAnimator, _AlertDialogAnimator);
  11748. function AndroidAlertDialogAnimator() {
  11749. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11750. _ref2$timing = _ref2.timing,
  11751. timing = _ref2$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref2$timing,
  11752. _ref2$duration = _ref2.duration,
  11753. duration = _ref2$duration === undefined ? 0.2 : _ref2$duration,
  11754. _ref2$delay = _ref2.delay,
  11755. delay = _ref2$delay === undefined ? 0 : _ref2$delay;
  11756. classCallCheck(this, AndroidAlertDialogAnimator);
  11757. return possibleConstructorReturn(this, (AndroidAlertDialogAnimator.__proto__ || Object.getPrototypeOf(AndroidAlertDialogAnimator)).call(this, { duration: duration, timing: timing, delay: delay }));
  11758. }
  11759. /**
  11760. * @param {Object} dialog
  11761. * @param {Function} callback
  11762. */
  11763. createClass(AndroidAlertDialogAnimator, [{
  11764. key: 'show',
  11765. value: function show(dialog, callback) {
  11766. callback = callback ? callback : function () {};
  11767. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)', opacity: 0 }, { transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)', opacity: 1 }).queue(function (done) {
  11768. callback();
  11769. done();
  11770. }));
  11771. }
  11772. /**
  11773. * @param {Object} dialog
  11774. * @param {Function} callback
  11775. */
  11776. }, {
  11777. key: 'hide',
  11778. value: function hide(dialog, callback) {
  11779. callback = callback ? callback : function () {};
  11780. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)', opacity: 1 }, { transform: 'translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)', opacity: 0 }).queue(function (done) {
  11781. callback();
  11782. done();
  11783. }));
  11784. }
  11785. }]);
  11786. return AndroidAlertDialogAnimator;
  11787. }(AlertDialogAnimator);
  11788. /**
  11789. * iOS style animator for alert dialog.
  11790. */
  11791. var IOSAlertDialogAnimator = function (_AlertDialogAnimator2) {
  11792. inherits(IOSAlertDialogAnimator, _AlertDialogAnimator2);
  11793. function IOSAlertDialogAnimator() {
  11794. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11795. _ref3$timing = _ref3.timing,
  11796. timing = _ref3$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref3$timing,
  11797. _ref3$duration = _ref3.duration,
  11798. duration = _ref3$duration === undefined ? 0.2 : _ref3$duration,
  11799. _ref3$delay = _ref3.delay,
  11800. delay = _ref3$delay === undefined ? 0 : _ref3$delay;
  11801. classCallCheck(this, IOSAlertDialogAnimator);
  11802. return possibleConstructorReturn(this, (IOSAlertDialogAnimator.__proto__ || Object.getPrototypeOf(IOSAlertDialogAnimator)).call(this, { duration: duration, timing: timing, delay: delay }));
  11803. }
  11804. /*
  11805. * @param {Object} dialog
  11806. * @param {Function} callback
  11807. */
  11808. createClass(IOSAlertDialogAnimator, [{
  11809. key: 'show',
  11810. value: function show(dialog, callback) {
  11811. callback = callback ? callback : function () {};
  11812. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0) scale3d(1.3, 1.3, 1)', opacity: 0 }, { transform: 'translate3d(-50%, -50%, 0) scale3d(1, 1, 1)', opacity: 1 }).queue(function (done) {
  11813. callback();
  11814. done();
  11815. }));
  11816. }
  11817. /**
  11818. * @param {Object} dialog
  11819. * @param {Function} callback
  11820. */
  11821. }, {
  11822. key: 'hide',
  11823. value: function hide(dialog, callback) {
  11824. callback = callback ? callback : function () {};
  11825. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ opacity: 1 }, { opacity: 0 }).queue(function (done) {
  11826. callback();
  11827. done();
  11828. }));
  11829. }
  11830. }]);
  11831. return IOSAlertDialogAnimator;
  11832. }(AlertDialogAnimator);
  11833. /*
  11834. Copyright 2013-2015 ASIAL CORPORATION
  11835. Licensed under the Apache License, Version 2.0 (the "License");
  11836. you may not use this file except in compliance with the License.
  11837. You may obtain a copy of the License at
  11838. http://www.apache.org/licenses/LICENSE-2.0
  11839. Unless required by applicable law or agreed to in writing, software
  11840. distributed under the License is distributed on an "AS IS" BASIS,
  11841. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11842. See the License for the specific language governing permissions and
  11843. limitations under the License.
  11844. */
  11845. var scheme$1 = {
  11846. '.alert-dialog': 'alert-dialog--*',
  11847. '.alert-dialog-container': 'alert-dialog-container--*',
  11848. '.alert-dialog-title': 'alert-dialog-title--*',
  11849. '.alert-dialog-content': 'alert-dialog-content--*',
  11850. '.alert-dialog-footer': 'alert-dialog-footer--*',
  11851. '.alert-dialog-footer--rowfooter': 'alert-dialog-footer--rowfooter--*',
  11852. '.alert-dialog-button--rowfooter': 'alert-dialog-button--rowfooter--*',
  11853. '.alert-dialog-button--primal': 'alert-dialog-button--primal--*',
  11854. '.alert-dialog-button': 'alert-dialog-button--*',
  11855. 'ons-alert-dialog-button': 'alert-dialog-button--*',
  11856. '.alert-dialog-mask': 'alert-dialog-mask--*',
  11857. '.text-input': 'text-input--*'
  11858. };
  11859. var _animatorDict$1 = {
  11860. 'none': AlertDialogAnimator,
  11861. 'default': function _default() {
  11862. return platform.isAndroid() ? AndroidAlertDialogAnimator : IOSAlertDialogAnimator;
  11863. },
  11864. 'fade': function fade() {
  11865. return platform.isAndroid() ? AndroidAlertDialogAnimator : IOSAlertDialogAnimator;
  11866. }
  11867. };
  11868. /**
  11869. * @element ons-alert-dialog
  11870. * @category dialog
  11871. * @description
  11872. * [en]
  11873. * Alert dialog that is displayed on top of the current screen. Useful for displaying questions, warnings or error messages to the user. The title, content and buttons can be easily customized and it will automatically switch style based on the platform.
  11874. *
  11875. * To use the element it can either be attached directly to the `<body>` element or dynamically created from a template using the `ons.createAlertDialog(template)` utility function and the `<template>` tag.
  11876. * [/en]
  11877. * [ja]
  11878. * 現在のスクリーンの上に表示するアラートダイアログです。ユーザに対する問いかけ、警告、エラーメッセージを表示するのに利用できます。タイトルやコンテンツやボタンは簡単にカスタマイズでき、実行しているプラットフォームに併せてスタイルが自動的に切り替わります。
  11879. * [/ja]
  11880. * @codepen Qwwxyp
  11881. * @tutorial vanilla/Reference/alert-dialog
  11882. * @modifier material
  11883. * [en]Material Design style[/en]
  11884. * [ja]マテリアルデザインのスタイル[/ja]
  11885. * @modifier rowfooter
  11886. * [en]Horizontally aligns the footer buttons.[/en]
  11887. * [ja]フッターの複数のボタンを水平に配置[/ja]
  11888. * @seealso ons-dialog
  11889. * [en]ons-dialog component[/en]
  11890. * [ja]ons-dialogコンポーネント[/ja]
  11891. * @seealso ons-popover
  11892. * [en]ons-popover component[/en]
  11893. * [ja]ons-dialogコンポーネント[/ja]
  11894. * @seealso ons.notification
  11895. * [en]Using ons.notification utility functions.[/en]
  11896. * [ja]アラートダイアログを表示するには、ons.notificationオブジェクトのメソッドを使うこともできます。[/ja]
  11897. * @example
  11898. * <ons-alert-dialog id="alert-dialog">
  11899. * <div class="alert-dialog-title">Warning!</div>
  11900. * <div class="alert-dialog-content">
  11901. * An error has occurred!
  11902. * </div>
  11903. * <div class="alert-dialog-footer">
  11904. * <button id="alert-dialog-button" class="alert-dialog-button">OK</button>
  11905. * </div>
  11906. * </ons-alert-dialog>
  11907. * <script>
  11908. * document.getElementById('alert-dialog').show();
  11909. * </script>
  11910. */
  11911. var AlertDialogElement = function (_BaseDialogElement) {
  11912. inherits(AlertDialogElement, _BaseDialogElement);
  11913. /**
  11914. * @event preshow
  11915. * @description
  11916. * [en]Fired just before the alert dialog is displayed.[/en]
  11917. * [ja]アラートダイアログが表示される直前に発火します。[/ja]
  11918. * @param {Object} event [en]Event object.[/en]
  11919. * @param {Object} event.alertDialog
  11920. * [en]Alert dialog object.[/en]
  11921. * [ja]アラートダイアログのオブジェクト。[/ja]
  11922. * @param {Function} event.cancel
  11923. * [en]Execute to stop the dialog from showing.[/en]
  11924. * [ja]この関数を実行すると、アラートダイアログの表示を止めます。[/ja]
  11925. */
  11926. /**
  11927. * @event postshow
  11928. * @description
  11929. * [en]Fired just after the alert dialog is displayed.[/en]
  11930. * [ja]アラートダイアログが表示された直後に発火します。[/ja]
  11931. * @param {Object} event [en]Event object.[/en]
  11932. * @param {Object} event.alertDialog
  11933. * [en]Alert dialog object.[/en]
  11934. * [ja]アラートダイアログのオブジェクト。[/ja]
  11935. */
  11936. /**
  11937. * @event prehide
  11938. * @description
  11939. * [en]Fired just before the alert dialog is hidden.[/en]
  11940. * [ja]アラートダイアログが隠れる直前に発火します。[/ja]
  11941. * @param {Object} event [en]Event object.[/en]
  11942. * @param {Object} event.alertDialog
  11943. * [en]Alert dialog object.[/en]
  11944. * [ja]アラートダイアログのオブジェクト。[/ja]
  11945. * @param {Function} event.cancel
  11946. * [en]Execute to stop the dialog from hiding.[/en]
  11947. * [ja]この関数を実行すると、アラートダイアログが閉じようとするのを止めます。[/ja]
  11948. */
  11949. /**
  11950. * @event posthide
  11951. * @description
  11952. * [en]Fired just after the alert dialog is hidden.[/en]
  11953. * [ja]アラートダイアログが隠れた後に発火します。[/ja]
  11954. * @param {Object} event [en]Event object.[/en]
  11955. * @param {Object} event.alertDialog
  11956. * [en]Alert dialog object.[/en]
  11957. * [ja]アラートダイアログのオブジェクト。[/ja]
  11958. */
  11959. /**
  11960. * @attribute modifier
  11961. * @type {String}
  11962. * @description
  11963. * [en]The appearance of the dialog.[/en]
  11964. * [ja]ダイアログの見た目を指定します。[/ja]
  11965. */
  11966. /**
  11967. * @attribute cancelable
  11968. * @description
  11969. * [en]If this attribute is set the dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  11970. * [ja]この属性を設定すると、ダイアログの背景をタップしたりAndroidデバイスのバックボタンを押すとダイアログが閉じるようになります。[/ja]
  11971. */
  11972. /**
  11973. * @attribute disabled
  11974. * @description
  11975. * [en]If this attribute is set the dialog is disabled.[/en]
  11976. * [ja]この属性がある時、アラートダイアログはdisabled状態になります。[/ja]
  11977. */
  11978. /**
  11979. * @attribute animation
  11980. * @type {String}
  11981. * @default default
  11982. * @description
  11983. * [en]The animation used when showing and hiding the dialog. Can be either `"none"` or `"default"`.[/en]
  11984. * [ja]ダイアログを表示する際のアニメーション名を指定します。デフォルトでは"none"か"default"が指定できます。[/ja]
  11985. */
  11986. /**
  11987. * @attribute animation-options
  11988. * @type {Expression}
  11989. * @description
  11990. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  11991. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。例:{duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  11992. */
  11993. /**
  11994. * @attribute mask-color
  11995. * @type {String}
  11996. * @default rgba(0, 0, 0, 0.2)
  11997. * @description
  11998. * [en]Color of the background mask. Default is "rgba(0, 0, 0, 0.2)".[/en]
  11999. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  12000. */
  12001. function AlertDialogElement() {
  12002. classCallCheck(this, AlertDialogElement);
  12003. var _this = possibleConstructorReturn(this, (AlertDialogElement.__proto__ || Object.getPrototypeOf(AlertDialogElement)).call(this));
  12004. contentReady(_this, function () {
  12005. return _this._compile();
  12006. });
  12007. return _this;
  12008. }
  12009. createClass(AlertDialogElement, [{
  12010. key: '_updateAnimatorFactory',
  12011. value: function _updateAnimatorFactory() {
  12012. return new AnimatorFactory({
  12013. animators: _animatorDict$1,
  12014. baseClass: AlertDialogAnimator,
  12015. baseClassName: 'AlertDialogAnimator',
  12016. defaultAnimation: this.getAttribute('animation')
  12017. });
  12018. }
  12019. }, {
  12020. key: '_compile',
  12021. value: function _compile() {
  12022. autoStyle.prepare(this);
  12023. this.style.display = 'none';
  12024. this.style.zIndex = 10001;
  12025. /**
  12026. * Expected result after compile:
  12027. *
  12028. * <ons-alert-dialog style="none">
  12029. * <div class="alert-dialog-mask"></div>
  12030. * <div class="alert-dialog">
  12031. * <div class="alert-dialog-container">...</div>
  12032. * </div>
  12033. * </ons-alert-dialog>
  12034. */
  12035. var content = document.createDocumentFragment();
  12036. if (!this._mask && !this._dialog) {
  12037. while (this.firstChild) {
  12038. content.appendChild(this.firstChild);
  12039. }
  12040. }
  12041. if (!this._mask) {
  12042. var mask = document.createElement('div');
  12043. mask.classList.add('alert-dialog-mask');
  12044. this.insertBefore(mask, this.children[0]);
  12045. }
  12046. if (!this._dialog) {
  12047. var dialog = document.createElement('div');
  12048. dialog.classList.add('alert-dialog');
  12049. this.insertBefore(dialog, null);
  12050. }
  12051. if (!util$1.findChild(this._dialog, '.alert-dialog-container')) {
  12052. var container = document.createElement('div');
  12053. container.classList.add('alert-dialog-container');
  12054. this._dialog.appendChild(container);
  12055. }
  12056. this._dialog.children[0].appendChild(content);
  12057. this._dialog.style.zIndex = 20001;
  12058. this._mask.style.zIndex = 20000;
  12059. ModifierUtil.initModifier(this, this._scheme);
  12060. }
  12061. /**
  12062. * @property disabled
  12063. * @type {Boolean}
  12064. * @description
  12065. * [en]Whether the element is disabled or not.[/en]
  12066. * [ja]無効化されている場合に`true`。[/ja]
  12067. */
  12068. /**
  12069. * @property cancelable
  12070. * @type {Boolean}
  12071. * @description
  12072. * [en]Whether the dialog is cancelable or not. A cancelable dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  12073. * [ja]そのダイアログがキャンセル可能かどうかを表します。キャンセル可能なダイアログは、背景をタップするかAndroidデバイスのバックボタンを押すことで閉じることが出来るようになります。[/ja]
  12074. */
  12075. /**
  12076. * @method show
  12077. * @signature show([options])
  12078. * @param {Object} [options]
  12079. * [en]Parameter object.[/en]
  12080. * [ja]オプションを指定するオブジェクトです。[/ja]
  12081. * @param {String} [options.animation]
  12082. * [en]Animation name. Available animations are `"fade"` and `"none"`.[/en]
  12083. * [ja]アニメーション名を指定します。指定できるのは、"fade", "none"のいずれかです。[/ja]
  12084. * @param {String} [options.animationOptions]
  12085. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  12086. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. <code>{duration: 0.2, delay: 0.4, timing: 'ease-in'}</code> [/ja]
  12087. * @param {Function} [options.callback]
  12088. * [en]Function to execute after the dialog has been revealed.[/en]
  12089. * [ja]ダイアログが表示され終わった時に呼び出されるコールバックを指定します。[/ja]
  12090. * @description
  12091. * [en]Show the alert dialog.[/en]
  12092. * [ja]ダイアログを表示します。[/ja]
  12093. * @return {Promise}
  12094. * [en]A `Promise` object that resolves to the displayed element.[/en]
  12095. * [ja]表示される要素を解決する`Promise`オブジェクトを返します。[/ja]
  12096. */
  12097. /**
  12098. * @method hide
  12099. * @signature hide([options])
  12100. * @param {Object} [options]
  12101. * [en]Parameter object.[/en]
  12102. * [ja]オプションを指定するオブジェクト。[/ja]
  12103. * @param {String} [options.animation]
  12104. * [en]Animation name. Available animations are `"fade"` and `"none"`.[/en]
  12105. * [ja]アニメーション名を指定します。"fade", "none"のいずれかを指定します。[/ja]
  12106. * @param {String} [options.animationOptions]
  12107. * [en]Specify the animation's duration, delay and timing. E.g. <code>{duration: 0.2, delay: 0.4, timing: 'ease-in'}</code>[/en]
  12108. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. <code>{duration: 0.2, delay: 0.4, timing: 'ease-in'}</code> [/ja]
  12109. * @param {Function} [options.callback]
  12110. * [en]Function to execute after the dialog has been hidden.[/en]
  12111. * [ja]このダイアログが閉じた時に呼び出されるコールバックを指定します。[/ja]
  12112. * @description
  12113. * [en]Hide the alert dialog.[/en]
  12114. * [ja]ダイアログを閉じます。[/ja]
  12115. * @return {Promise}
  12116. * [en]Resolves to the hidden element[/en]
  12117. * [ja]隠れた要素を解決する`Promise`オブジェクトを返します。[/ja]
  12118. */
  12119. /**
  12120. * @property visible
  12121. * @readonly
  12122. * @type {Boolean}
  12123. * @description
  12124. * [en]Whether the dialog is visible or not.[/en]
  12125. * [ja]要素が見える場合に`true`。[/ja]
  12126. */
  12127. /**
  12128. * @property onDeviceBackButton
  12129. * @type {Object}
  12130. * @description
  12131. * [en]Back-button handler.[/en]
  12132. * [ja]バックボタンハンドラ。[/ja]
  12133. */
  12134. /**
  12135. * @param {String} name
  12136. * @param {DialogAnimator} Animator
  12137. */
  12138. }, {
  12139. key: '_scheme',
  12140. get: function get$$1() {
  12141. return scheme$1;
  12142. }
  12143. /**
  12144. * @return {Element}
  12145. */
  12146. }, {
  12147. key: '_mask',
  12148. get: function get$$1() {
  12149. return util$1.findChild(this, '.alert-dialog-mask');
  12150. }
  12151. /**
  12152. * @return {Element}
  12153. */
  12154. }, {
  12155. key: '_dialog',
  12156. get: function get$$1() {
  12157. return util$1.findChild(this, '.alert-dialog');
  12158. }
  12159. /**
  12160. * @return {Element}
  12161. */
  12162. }, {
  12163. key: '_titleElement',
  12164. get: function get$$1() {
  12165. return util$1.findChild(this._dialog.children[0], '.alert-dialog-title');
  12166. }
  12167. /**
  12168. * @return {Element}
  12169. */
  12170. }, {
  12171. key: '_contentElement',
  12172. get: function get$$1() {
  12173. return util$1.findChild(this._dialog.children[0], '.alert-dialog-content');
  12174. }
  12175. }], [{
  12176. key: 'registerAnimator',
  12177. value: function registerAnimator(name, Animator) {
  12178. if (!(Animator.prototype instanceof AlertDialogAnimator)) {
  12179. util$1.throwAnimator('AlertDialog');
  12180. }
  12181. _animatorDict$1[name] = Animator;
  12182. }
  12183. }, {
  12184. key: 'animators',
  12185. get: function get$$1() {
  12186. return _animatorDict$1;
  12187. }
  12188. }, {
  12189. key: 'AlertDialogAnimator',
  12190. get: function get$$1() {
  12191. return AlertDialogAnimator;
  12192. }
  12193. }]);
  12194. return AlertDialogElement;
  12195. }(BaseDialogElement);
  12196. onsElements.AlertDialog = AlertDialogElement;
  12197. customElements.define('ons-alert-dialog', AlertDialogElement);
  12198. /*
  12199. Copyright 2013-2015 ASIAL CORPORATION
  12200. Licensed under the Apache License, Version 2.0 (the "License");
  12201. you may not use this file except in compliance with the License.
  12202. You may obtain a copy of the License at
  12203. http://www.apache.org/licenses/LICENSE-2.0
  12204. Unless required by applicable law or agreed to in writing, software
  12205. distributed under the License is distributed on an "AS IS" BASIS,
  12206. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12207. See the License for the specific language governing permissions and
  12208. limitations under the License.
  12209. */
  12210. /**
  12211. * @element ons-alert-dialog-button
  12212. * @modifier material
  12213. * [en]Material Design alert-dialog button.[/en]
  12214. * [ja]マテリアルデザインのボタンを表示します。[/ja]
  12215. * @description
  12216. * [en][/en]
  12217. * [ja][/ja]
  12218. * @seealso ons-alert-dialog
  12219. * [en]The `<ons-alert-dialog>` component displays a alert dialog.[/en]
  12220. * [ja]ons-alert-dialogコンポーネント[/ja]
  12221. * @example
  12222. * <ons-alert-dialog>
  12223. * <div class="alert-dialog-title">Warning!</div>
  12224. * <div class="alert-dialog-content">
  12225. * An error has occurred!
  12226. * </div>
  12227. * <div class="alert-dialog-footer">
  12228. * <alert-dialog-button onclick="app.close()">Cancel</alert-dialog-button>
  12229. * <alert-dialog-button class="alert-dialog-button" onclick="app.close()">OK</alert-dialog-button>
  12230. * </div>
  12231. * </ons-alert-dialog>
  12232. */
  12233. var AlertDialogButtonElement = function (_BaseButtonElement) {
  12234. inherits(AlertDialogButtonElement, _BaseButtonElement);
  12235. function AlertDialogButtonElement() {
  12236. classCallCheck(this, AlertDialogButtonElement);
  12237. return possibleConstructorReturn(this, (AlertDialogButtonElement.__proto__ || Object.getPrototypeOf(AlertDialogButtonElement)).apply(this, arguments));
  12238. }
  12239. createClass(AlertDialogButtonElement, [{
  12240. key: '_scheme',
  12241. /**
  12242. * @attribute modifier
  12243. * @type {String}
  12244. * @description
  12245. * [en]The appearance of the button.[/en]
  12246. * [ja]ボタンの表現を指定します。[/ja]
  12247. */
  12248. /**
  12249. * @attribute disabled
  12250. * @description
  12251. * [en]Specify if button should be disabled.[/en]
  12252. * [ja]ボタンを無効化する場合は指定してください。[/ja]
  12253. */
  12254. /**
  12255. * @property disabled
  12256. * @type {Boolean}
  12257. * @description
  12258. * [en]Whether the element is disabled or not.[/en]
  12259. * [ja]無効化されている場合に`true`。[/ja]
  12260. */
  12261. get: function get$$1() {
  12262. return { '': 'alert-dialog-button--*' };
  12263. }
  12264. }, {
  12265. key: '_defaultClassName',
  12266. get: function get$$1() {
  12267. return 'alert-dialog-button';
  12268. }
  12269. }, {
  12270. key: '_rippleOpt',
  12271. get: function get$$1() {
  12272. return [this, undefined, { 'modifier': 'light-gray' }];
  12273. }
  12274. }]);
  12275. return AlertDialogButtonElement;
  12276. }(BaseButtonElement);
  12277. onsElements.AlertDialogButton = AlertDialogButtonElement;
  12278. customElements.define('ons-alert-dialog-button', AlertDialogButtonElement);
  12279. var iosBackButtonIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"13px\" height=\"21px\" viewBox=\"0 0 13 21\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>ios-back-button-icon</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"toolbar-back-button\" stroke=\"none\" stroke-width=\"1\" fill-rule=\"evenodd\">\n <g id=\"ios\" transform=\"translate(-34.000000, -30.000000)\">\n <polygon id=\"ios-back-button-icon\" points=\"34 40.5 44.5 30 46.5 32 38 40.5 46.5 49 44.5 51\"></polygon>\n </g>\n </g>\n</svg>\n";
  12280. var mdBackButtonIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <title>md-back-button-icon</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"toolbar-back-button\" stroke=\"none\" stroke-width=\"1\" fill-rule=\"evenodd\">\n <g id=\"android\" transform=\"translate(-32.000000, -32.000000)\" fill-rule=\"nonzero\">\n <polygon id=\"md-back-button-icon\" points=\"48 39 35.83 39 41.42 33.41 40 32 32 40 40 48 41.41 46.59 35.83 41 48 41\"></polygon>\n </g>\n </g>\n</svg>\n";
  12281. /*
  12282. Copyright 2013-2015 ASIAL CORPORATION
  12283. Licensed under the Apache License, Version 2.0 (the "License");
  12284. you may not use this file except in compliance with the License.
  12285. You may obtain a copy of the License at
  12286. http://www.apache.org/licenses/LICENSE-2.0
  12287. Unless required by applicable law or agreed to in writing, software
  12288. distributed under the License is distributed on an "AS IS" BASIS,
  12289. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12290. See the License for the specific language governing permissions and
  12291. limitations under the License.
  12292. */
  12293. var defaultClassName = 'back-button';
  12294. var scheme$2 = {
  12295. '': 'back-button--*',
  12296. '.back-button__icon': 'back-button--*__icon',
  12297. '.back-button__label': 'back-button--*__label'
  12298. };
  12299. /**
  12300. * @element ons-back-button
  12301. * @category navigation
  12302. * @description
  12303. * [en]
  12304. * Back button component for `<ons-toolbar>`. Put it in the left part of the `<ons-toolbar>`.
  12305. *
  12306. * It will find the parent `<ons-navigator>` element and pop a page when clicked. This behavior can be overriden by specifying the `onClick` property.
  12307. * [/en]
  12308. * [ja][/ja]
  12309. * @codepen aHmGL
  12310. * @tutorial vanilla/Reference/back-button
  12311. * @modifier material
  12312. * [en]Material Design style[/en]
  12313. * [ja][/ja]
  12314. * @seealso ons-toolbar
  12315. * [en]ons-toolbar component[/en]
  12316. * [ja]ons-toolbarコンポーネント[/ja]
  12317. * @seealso ons-navigator
  12318. * [en]ons-navigator component[/en]
  12319. * [ja]ons-navigatorコンポーネント[/ja]
  12320. * @example
  12321. * <ons-toolbar>
  12322. * <div class="left">
  12323. * <ons-back-button>Back</ons-back-button>
  12324. * </div>
  12325. * <div class="center">
  12326. * Title
  12327. * <div>
  12328. * </ons-toolbar>
  12329. */
  12330. var BackButtonElement = function (_BaseElement) {
  12331. inherits(BackButtonElement, _BaseElement);
  12332. /**
  12333. * @attribute modifier
  12334. * @type {String}
  12335. * @description
  12336. * [en]The appearance of the back button.[/en]
  12337. * [ja]バックボタンの見た目を指定します。[/ja]
  12338. */
  12339. function BackButtonElement() {
  12340. classCallCheck(this, BackButtonElement);
  12341. var _this = possibleConstructorReturn(this, (BackButtonElement.__proto__ || Object.getPrototypeOf(BackButtonElement)).call(this));
  12342. contentReady(_this, function () {
  12343. _this._compile();
  12344. });
  12345. _this._options = {};
  12346. _this._boundOnClick = _this._onClick.bind(_this);
  12347. return _this;
  12348. }
  12349. createClass(BackButtonElement, [{
  12350. key: '_updateIcon',
  12351. value: function _updateIcon() {
  12352. var icon = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : util$1.findChild(this, '.back-button__icon');
  12353. icon.innerHTML = autoStyle.getPlatform(this) === 'android' || util$1.hasModifier(this, 'material') ? mdBackButtonIcon : iosBackButtonIcon;
  12354. }
  12355. }, {
  12356. key: '_compile',
  12357. value: function _compile() {
  12358. autoStyle.prepare(this);
  12359. this.classList.add(defaultClassName);
  12360. if (!util$1.findChild(this, '.back-button__label')) {
  12361. var label = util$1.create('span.back-button__label');
  12362. while (this.childNodes[0]) {
  12363. label.appendChild(this.childNodes[0]);
  12364. }
  12365. this.appendChild(label);
  12366. }
  12367. if (!util$1.findChild(this, '.back-button__icon')) {
  12368. var icon = util$1.create('span.back-button__icon');
  12369. this._updateIcon(icon);
  12370. this.insertBefore(icon, this.children[0]);
  12371. }
  12372. util$1.updateRipple(this, undefined, { center: '', 'size': 'contain', 'background': 'transparent' });
  12373. ModifierUtil.initModifier(this, scheme$2);
  12374. }
  12375. /**
  12376. * @property options
  12377. * @type {Object}
  12378. * @description
  12379. * [en]Options object.[/en]
  12380. * [ja]オプションを指定するオブジェクト。[/ja]
  12381. */
  12382. /**
  12383. * @property options.animation
  12384. * @type {String}
  12385. * @description
  12386. * [en]Animation name. Available animations are "slide", "lift", "fade" and "none".
  12387. * These are platform based animations. For fixed animations, add "-ios" or "-md"
  12388. * suffix to the animation name. E.g. "lift-ios", "lift-md". Defaults values are "slide-ios" and "fade-md".
  12389. * [/en]
  12390. * [ja][/ja]
  12391. */
  12392. /**
  12393. * @property options.animationOptions
  12394. * @type {String}
  12395. * @description
  12396. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/en]
  12397. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  12398. */
  12399. /**
  12400. * @property options.callback
  12401. * @type {String}
  12402. * @description
  12403. * [en]Function that is called when the transition has ended.[/en]
  12404. * [ja]このメソッドによる画面遷移が終了した際に呼び出される関数オブジェクトを指定します。[/ja]
  12405. */
  12406. }, {
  12407. key: '_onClick',
  12408. /**
  12409. * @property onClick
  12410. * @type {Function}
  12411. * @description
  12412. * [en]Used to override the default back button behavior.[/en]
  12413. * [ja][/ja]
  12414. */
  12415. value: function _onClick() {
  12416. if (this.onClick) {
  12417. this.onClick.apply(this);
  12418. } else {
  12419. var navigator = util$1.findParent(this, 'ons-navigator');
  12420. if (navigator) {
  12421. navigator.popPage(this.options);
  12422. }
  12423. }
  12424. }
  12425. }, {
  12426. key: 'connectedCallback',
  12427. value: function connectedCallback() {
  12428. this.addEventListener('click', this._boundOnClick, false);
  12429. }
  12430. }, {
  12431. key: 'attributeChangedCallback',
  12432. value: function attributeChangedCallback(name, last, current) {
  12433. switch (name) {
  12434. case 'class':
  12435. util$1.restoreClass(this, defaultClassName, scheme$2);
  12436. break;
  12437. case 'modifier':
  12438. {
  12439. ModifierUtil.onModifierChanged(last, current, this, scheme$2) && this._updateIcon();
  12440. break;
  12441. }
  12442. }
  12443. }
  12444. }, {
  12445. key: 'disconnectedCallback',
  12446. value: function disconnectedCallback() {
  12447. this.removeEventListener('click', this._boundOnClick, false);
  12448. }
  12449. }, {
  12450. key: 'show',
  12451. value: function show() {
  12452. this.style.display = 'inline-block';
  12453. }
  12454. }, {
  12455. key: 'hide',
  12456. value: function hide() {
  12457. this.style.display = 'none';
  12458. }
  12459. }, {
  12460. key: 'options',
  12461. get: function get$$1() {
  12462. return this._options;
  12463. },
  12464. set: function set$$1(object) {
  12465. this._options = object;
  12466. }
  12467. }], [{
  12468. key: 'observedAttributes',
  12469. get: function get$$1() {
  12470. return ['modifier', 'class'];
  12471. }
  12472. }]);
  12473. return BackButtonElement;
  12474. }(BaseElement);
  12475. onsElements.BackButton = BackButtonElement;
  12476. customElements.define('ons-back-button', BackButtonElement);
  12477. /*
  12478. Copyright 2013-2015 ASIAL CORPORATION
  12479. Licensed under the Apache License, Version 2.0 (the "License");
  12480. you may not use this file except in compliance with the License.
  12481. You may obtain a copy of the License at
  12482. http://www.apache.org/licenses/LICENSE-2.0
  12483. Unless required by applicable law or agreed to in writing, software
  12484. distributed under the License is distributed on an "AS IS" BASIS,
  12485. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12486. See the License for the specific language governing permissions and
  12487. limitations under the License.
  12488. */
  12489. var defaultClassName$1 = 'bottom-bar';
  12490. var scheme$3 = { '': 'bottom-bar--*' };
  12491. /**
  12492. * @element ons-bottom-toolbar
  12493. * @category page
  12494. * @description
  12495. * [en]Toolbar component that is positioned at the bottom of the page. Since bottom toolbars are very versatile elements, `ons-bottom-toolbar` does not provide any specific layout syntax for its children. Modifiers or custom CSS must be used.[/en]
  12496. * [ja]ページ下部に配置されるツールバー用コンポーネントです。[/ja]
  12497. * @modifier transparent
  12498. * [en]Make the toolbar transparent.[/en]
  12499. * [ja]ツールバーの背景を透明にして表示します。[/ja]
  12500. * @modifier aligned
  12501. * [en]Vertically aligns its children and applies flexbox for block elements. `justify-content` CSS rule can be used to change horizontal align.[/en]
  12502. * [ja]ツールバーの背景を透明にして表示します。[/ja]
  12503. * @seealso ons-toolbar [en]ons-toolbar component[/en][ja]ons-toolbarコンポーネント[/ja]
  12504. * @example
  12505. * <ons-bottom-toolbar>
  12506. * Content
  12507. * </ons-bottom-toolbar>
  12508. */
  12509. var BottomToolbarElement = function (_BaseElement) {
  12510. inherits(BottomToolbarElement, _BaseElement);
  12511. /**
  12512. * @attribute modifier
  12513. * @type {String}
  12514. * @description
  12515. * [en]The appearance of the toolbar.[/en]
  12516. * [ja]ツールバーの見た目の表現を指定します。[/ja]
  12517. */
  12518. function BottomToolbarElement() {
  12519. classCallCheck(this, BottomToolbarElement);
  12520. var _this = possibleConstructorReturn(this, (BottomToolbarElement.__proto__ || Object.getPrototypeOf(BottomToolbarElement)).call(this));
  12521. _this.classList.add(defaultClassName$1);
  12522. ModifierUtil.initModifier(_this, scheme$3);
  12523. return _this;
  12524. }
  12525. createClass(BottomToolbarElement, [{
  12526. key: 'attributeChangedCallback',
  12527. value: function attributeChangedCallback(name, last, current) {
  12528. switch (name) {
  12529. case 'class':
  12530. util$1.restoreClass(this, defaultClassName$1, scheme$3);
  12531. break;
  12532. case 'modifier':
  12533. ModifierUtil.onModifierChanged(last, current, this, scheme$3);
  12534. break;
  12535. }
  12536. }
  12537. }], [{
  12538. key: 'observedAttributes',
  12539. get: function get$$1() {
  12540. return ['modifier', 'class'];
  12541. }
  12542. }]);
  12543. return BottomToolbarElement;
  12544. }(BaseElement);
  12545. onsElements.BottomToolbar = BottomToolbarElement;
  12546. customElements.define('ons-bottom-toolbar', BottomToolbarElement);
  12547. /*
  12548. Copyright 2013-2015 ASIAL CORPORATION
  12549. Licensed under the Apache License, Version 2.0 (the "License");
  12550. you may not use this file except in compliance with the License.
  12551. You may obtain a copy of the License at
  12552. http://www.apache.org/licenses/LICENSE-2.0
  12553. Unless required by applicable law or agreed to in writing, software
  12554. distributed under the License is distributed on an "AS IS" BASIS,
  12555. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12556. See the License for the specific language governing permissions and
  12557. limitations under the License.
  12558. */
  12559. /**
  12560. * @element ons-button
  12561. * @category form
  12562. * @modifier outline
  12563. * [en]Button with outline and transparent background[/en]
  12564. * [ja]アウトラインを持ったボタンを表示します。[/ja]
  12565. * @modifier light
  12566. * [en]Button that doesn't stand out.[/en]
  12567. * [ja]目立たないボタンを表示します。[/ja]
  12568. * @modifier quiet
  12569. * [en]Button with no outline and or background..[/en]
  12570. * [ja]枠線や背景が無い文字だけのボタンを表示します。[/ja]
  12571. * @modifier cta
  12572. * [en]Button that really stands out.[/en]
  12573. * [ja]目立つボタンを表示します。[/ja]
  12574. * @modifier large
  12575. * [en]Large button that covers the width of the screen.[/en]
  12576. * [ja]横いっぱいに広がる大きなボタンを表示します。[/ja]
  12577. * @modifier large--quiet
  12578. * [en]Large quiet button.[/en]
  12579. * [ja]横いっぱいに広がるquietボタンを表示します。[/ja]
  12580. * @modifier large--cta
  12581. * [en]Large call to action button.[/en]
  12582. * [ja]横いっぱいに広がるctaボタンを表示します。[/ja]
  12583. * @modifier material
  12584. * [en]Material Design button[/en]
  12585. * [ja]マテリアルデザインのボタン[/ja]
  12586. * @modifier material--flat
  12587. * [en]Material Design flat button[/en]
  12588. * [ja]マテリアルデザインのフラットボタン[/ja]
  12589. * @description
  12590. * [en]
  12591. * Button component. If you want to place a button in a toolbar, use `<ons-toolbar-button>` or `<ons-back-button>` instead.
  12592. *
  12593. * Will automatically display as a Material Design button with a ripple effect on Android.
  12594. * [/en]
  12595. * [ja]ボタン用コンポーネント。ツールバーにボタンを設置する場合は、ons-toolbar-buttonもしくはons-back-buttonコンポーネントを使用します。[/ja]
  12596. * @codepen hLayx
  12597. * @tutorial vanilla/Reference/button
  12598. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  12599. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  12600. * @example
  12601. * <ons-button modifier="large--cta">
  12602. * Tap Me
  12603. * </ons-button>
  12604. */
  12605. var ButtonElement = function (_BaseButtonElement) {
  12606. inherits(ButtonElement, _BaseButtonElement);
  12607. function ButtonElement() {
  12608. classCallCheck(this, ButtonElement);
  12609. return possibleConstructorReturn(this, (ButtonElement.__proto__ || Object.getPrototypeOf(ButtonElement)).apply(this, arguments));
  12610. }
  12611. createClass(ButtonElement, [{
  12612. key: '_scheme',
  12613. /**
  12614. * @attribute modifier
  12615. * @type {String}
  12616. * @description
  12617. * [en]The appearance of the button.[/en]
  12618. * [ja]ボタンの表現を指定します。[/ja]
  12619. */
  12620. /**
  12621. * @attribute ripple
  12622. * @description
  12623. * [en]If this attribute is defined, the button will have a ripple effect.[/en]
  12624. * [ja][/ja]
  12625. */
  12626. /**
  12627. * @attribute disabled
  12628. * @description
  12629. * [en]Specify if button should be disabled.[/en]
  12630. * [ja]ボタンを無効化する場合は指定します。[/ja]
  12631. */
  12632. /**
  12633. * @property disabled
  12634. * @type {Boolean}
  12635. * @description
  12636. * [en]Whether the button is disabled or not.[/en]
  12637. * [ja]無効化されている場合に`true`。[/ja]
  12638. */
  12639. get: function get$$1() {
  12640. return { '': 'button--*' };
  12641. }
  12642. }, {
  12643. key: '_defaultClassName',
  12644. get: function get$$1() {
  12645. return 'button';
  12646. }
  12647. }]);
  12648. return ButtonElement;
  12649. }(BaseButtonElement);
  12650. onsElements.Button = ButtonElement;
  12651. customElements.define('ons-button', ButtonElement);
  12652. /*
  12653. Copyright 2013-2015 ASIAL CORPORATION
  12654. Licensed under the Apache License, Version 2.0 (the "License");
  12655. you may not use this file except in compliance with the License.
  12656. You may obtain a copy of the License at
  12657. http://www.apache.org/licenses/LICENSE-2.0
  12658. Unless required by applicable law or agreed to in writing, software
  12659. distributed under the License is distributed on an "AS IS" BASIS,
  12660. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12661. See the License for the specific language governing permissions and
  12662. limitations under the License.
  12663. */
  12664. var defaultClassName$2 = 'card';
  12665. var scheme$4 = {
  12666. '': 'card--*',
  12667. '.card__title': 'card--*__title',
  12668. '.card__content': 'card--*__content'
  12669. };
  12670. /**
  12671. * @element ons-card
  12672. * @category visual
  12673. * @modifier material
  12674. * [en]A card with material design.[/en]
  12675. * [ja]リストの上下のボーダーが無いリストを表示します。[/ja]
  12676. * @description
  12677. * [en]
  12678. * Component to create a card that displays some information.
  12679. *
  12680. * The card may be composed by divs with specially prepared classes `title` and/or `content`. You can also add your own content as you please.[/en]
  12681. * [ja][/ja]
  12682. * @tutorial vanilla/Reference/card
  12683. * @example
  12684. * <ons-card>
  12685. * <p>Some content</p>
  12686. * </ons-card>
  12687. */
  12688. var CardElement = function (_BaseElement) {
  12689. inherits(CardElement, _BaseElement);
  12690. /**
  12691. * @attribute modifier
  12692. * @type {String}
  12693. * @description
  12694. * [en]The appearance of the card.[/en]
  12695. * [ja]リストの表現を指定します。[/ja]
  12696. */
  12697. function CardElement() {
  12698. classCallCheck(this, CardElement);
  12699. var _this = possibleConstructorReturn(this, (CardElement.__proto__ || Object.getPrototypeOf(CardElement)).call(this));
  12700. contentReady(_this, function () {
  12701. _this._compile();
  12702. });
  12703. return _this;
  12704. }
  12705. createClass(CardElement, [{
  12706. key: '_compile',
  12707. value: function _compile() {
  12708. for (var i = 0; i < this.children.length; i++) {
  12709. var el = this.children[i];
  12710. if (el.classList.contains('title')) {
  12711. el.classList.add('card__title');
  12712. } else if (el.classList.contains('content')) {
  12713. el.classList.add('card__content');
  12714. }
  12715. }
  12716. autoStyle.prepare(this);
  12717. this.classList.add(defaultClassName$2);
  12718. ModifierUtil.initModifier(this, scheme$4);
  12719. }
  12720. }, {
  12721. key: 'attributeChangedCallback',
  12722. value: function attributeChangedCallback(name, last, current) {
  12723. switch (name) {
  12724. case 'class':
  12725. util$1.restoreClass(this, defaultClassName$2, scheme$4);
  12726. break;
  12727. case 'modifier':
  12728. ModifierUtil.onModifierChanged(last, current, this, scheme$4);
  12729. break;
  12730. }
  12731. }
  12732. }], [{
  12733. key: 'observedAttributes',
  12734. get: function get$$1() {
  12735. return ['modifier', 'class'];
  12736. }
  12737. }]);
  12738. return CardElement;
  12739. }(BaseElement);
  12740. onsElements.Card = CardElement;
  12741. customElements.define('ons-card', CardElement);
  12742. /*
  12743. Copyright 2013-2015 ASIAL CORPORATION
  12744. Licensed under the Apache License, Version 2.0 (the "License");
  12745. you may not use this file except in compliance with the License.
  12746. You may obtain a copy of the License at
  12747. http://www.apache.org/licenses/LICENSE-2.0
  12748. Unless required by applicable law or agreed to in writing, software
  12749. distributed under the License is distributed on an "AS IS" BASIS,
  12750. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12751. See the License for the specific language governing permissions and
  12752. limitations under the License.
  12753. */
  12754. var scheme$5 = { '': 'carousel-item--*' };
  12755. /**
  12756. * @element ons-carousel-item
  12757. * @category carousel
  12758. * @description
  12759. * [en]
  12760. * Carousel item component. Used as a child of the `<ons-carousel>` element.
  12761. * [/en]
  12762. * [ja][/ja]
  12763. * @codepen xbbzOQ
  12764. * @tutorial vanilla/Reference/carousel
  12765. * @seealso ons-carousel
  12766. * [en]`<ons-carousel>` components[/en]
  12767. * [ja]<ons-carousel>コンポーネント[/ja]
  12768. * @example
  12769. * <ons-carousel style="width: 100%; height: 200px">
  12770. * <ons-carousel-item>
  12771. * ...
  12772. * </ons-carousel-item>
  12773. * <ons-carousel-item>
  12774. * ...
  12775. * </ons-carousel-item>
  12776. * </ons-carousel>
  12777. */
  12778. var CarouselItemElement = function (_BaseElement) {
  12779. inherits(CarouselItemElement, _BaseElement);
  12780. function CarouselItemElement() {
  12781. classCallCheck(this, CarouselItemElement);
  12782. var _this = possibleConstructorReturn(this, (CarouselItemElement.__proto__ || Object.getPrototypeOf(CarouselItemElement)).call(this));
  12783. _this.style.width = '100%';
  12784. ModifierUtil.initModifier(_this, scheme$5);
  12785. return _this;
  12786. }
  12787. createClass(CarouselItemElement, [{
  12788. key: 'attributeChangedCallback',
  12789. value: function attributeChangedCallback(name, last, current) {
  12790. if (name === 'modifier') {
  12791. return ModifierUtil.onModifierChanged(last, current, this, scheme$5);
  12792. }
  12793. }
  12794. }], [{
  12795. key: 'observedAttributes',
  12796. get: function get$$1() {
  12797. return ['modifier'];
  12798. }
  12799. }]);
  12800. return CarouselItemElement;
  12801. }(BaseElement);
  12802. onsElements.CarouselItem = CarouselItemElement;
  12803. customElements.define('ons-carousel-item', CarouselItemElement);
  12804. var directionMap = {
  12805. vertical: {
  12806. axis: 'Y',
  12807. size: 'Height',
  12808. dir: ['up', 'down'],
  12809. t3d: ['0px, ', 'px, 0px']
  12810. },
  12811. horizontal: {
  12812. axis: 'X',
  12813. size: 'Width',
  12814. dir: ['left', 'right'],
  12815. t3d: ['', 'px, 0px, 0px']
  12816. }
  12817. };
  12818. var Swiper = function () {
  12819. function Swiper(params) {
  12820. var _this = this;
  12821. classCallCheck(this, Swiper);
  12822. // Parameters
  12823. var FALSE = function FALSE() {
  12824. return false;
  12825. };
  12826. 'getInitialIndex getBubbleWidth isVertical isOverScrollable isCentered\n isAutoScrollable refreshHook preChangeHook postChangeHook overScrollHook'.split(/\s+/).forEach(function (key) {
  12827. return _this[key] = params[key] || FALSE;
  12828. });
  12829. this.getElement = params.getElement; // Required
  12830. this.scrollHook = params.scrollHook; // Optional
  12831. this.itemSize = params.itemSize || '100%';
  12832. this.getAutoScrollRatio = function () {
  12833. var ratio = params.getAutoScrollRatio && params.getAutoScrollRatio.apply(params, arguments);
  12834. ratio = typeof ratio === 'number' && ratio === ratio ? ratio : .5;
  12835. if (ratio < 0.0 || ratio > 1.0) {
  12836. util$1.throw('Invalid auto-scroll-ratio ' + ratio + '. Must be between 0 and 1');
  12837. }
  12838. return ratio;
  12839. };
  12840. // Prevent clicks only on desktop
  12841. this.shouldBlock = util$1.globals.actualMobileOS === 'other';
  12842. // Bind handlers
  12843. this.onDragStart = this.onDragStart.bind(this);
  12844. this.onDrag = this.onDrag.bind(this);
  12845. this.onDragEnd = this.onDragEnd.bind(this);
  12846. this.onResize = this.onResize.bind(this);
  12847. this._shouldFixScroll = util$1.globals.actualMobileOS === 'ios';
  12848. }
  12849. createClass(Swiper, [{
  12850. key: 'init',
  12851. value: function init() {
  12852. var _this2 = this;
  12853. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12854. swipeable = _ref.swipeable,
  12855. autoRefresh = _ref.autoRefresh;
  12856. this.initialized = true;
  12857. this.target = this.getElement().children[0];
  12858. this.blocker = this.getElement().children[1];
  12859. if (!this.target || !this.blocker) {
  12860. util$1.throw('Expected "target" and "blocker" elements to exist before initializing Swiper');
  12861. }
  12862. if (!this.shouldBlock) {
  12863. this.blocker.style.display = 'none';
  12864. }
  12865. // Add classes
  12866. this.getElement().classList.add('ons-swiper');
  12867. this.target.classList.add('ons-swiper-target');
  12868. this.blocker.classList.add('ons-swiper-blocker');
  12869. // Setup listeners
  12870. this._gestureDetector = new GestureDetector(this.getElement(), { dragMinDistance: 1, dragLockToAxis: true, passive: !this._shouldFixScroll });
  12871. this._mutationObserver = new MutationObserver(function () {
  12872. return _this2.refresh();
  12873. });
  12874. this.updateSwipeable(swipeable);
  12875. this.updateAutoRefresh(autoRefresh);
  12876. // Setup initial layout
  12877. this._scroll = this._offset = this._lastActiveIndex = 0;
  12878. this._updateLayout();
  12879. this._setupInitialIndex();
  12880. setImmediate(function () {
  12881. return _this2.initialized && _this2._setupInitialIndex();
  12882. });
  12883. // Fix rendering glitch on Android 4.1
  12884. // Fix for iframes where the width is inconsistent at the beginning
  12885. if (window !== window.parent || this.offsetHeight === 0) {
  12886. window.requestAnimationFrame(function () {
  12887. return _this2.initialized && _this2.onResize();
  12888. });
  12889. }
  12890. }
  12891. }, {
  12892. key: 'dispose',
  12893. value: function dispose() {
  12894. this.initialized = false;
  12895. this.updateSwipeable(false);
  12896. this.updateAutoRefresh(false);
  12897. this._gestureDetector && this._gestureDetector.dispose();
  12898. this.target = this.blocker = this._gestureDetector = this._mutationObserver = null;
  12899. this.setupResize(false);
  12900. }
  12901. }, {
  12902. key: 'onResize',
  12903. value: function onResize() {
  12904. var i = this._scroll / this.targetSize;
  12905. this._reset();
  12906. this.setActiveIndex(i);
  12907. this.refresh();
  12908. }
  12909. }, {
  12910. key: '_calculateItemSize',
  12911. value: function _calculateItemSize() {
  12912. var matches = this.itemSize.match(/^(\d+)(px|%)/);
  12913. if (!matches) {
  12914. util$1.throw('Invalid state: swiper\'s size unit must be \'%\' or \'px\'');
  12915. }
  12916. var value = parseInt(matches[1], 10);
  12917. return matches[2] === '%' ? Math.round(value / 100 * this.targetSize) : value;
  12918. }
  12919. }, {
  12920. key: '_setupInitialIndex',
  12921. value: function _setupInitialIndex() {
  12922. this._reset();
  12923. this._lastActiveIndex = Math.max(Math.min(Number(this.getInitialIndex()), this.itemCount), 0);
  12924. this._scroll = this._offset + this.itemNumSize * this._lastActiveIndex;
  12925. this._scrollTo(this._scroll);
  12926. }
  12927. }, {
  12928. key: '_setSwiping',
  12929. value: function _setSwiping(toggle) {
  12930. this.target.classList.toggle('swiping', toggle); // Hides everything except shown pages
  12931. }
  12932. }, {
  12933. key: 'setActiveIndex',
  12934. value: function setActiveIndex(index) {
  12935. var _this3 = this;
  12936. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12937. this._setSwiping(true);
  12938. index = Math.max(0, Math.min(index, this.itemCount - 1));
  12939. var scroll = Math.max(0, Math.min(this.maxScroll, this._offset + this.itemNumSize * index));
  12940. if (platform.isUIWebView()) {
  12941. /* Dirty fix for #2231(https://github.com/OnsenUI/OnsenUI/issues/2231). begin */
  12942. var concat = function concat(arrayOfArray) {
  12943. return Array.prototype.concat.apply([], arrayOfArray);
  12944. };
  12945. var contents = concat(util$1.arrayFrom(this.target.children).map(function (page) {
  12946. return util$1.arrayFrom(page.children).filter(function (child) {
  12947. return child.classList.contains('page__content');
  12948. });
  12949. }));
  12950. var map = new Map();
  12951. return new Promise(function (resolve) {
  12952. contents.forEach(function (content) {
  12953. map.set(content, content.getAttribute('class'));
  12954. content.classList.add('page__content--suppress-layer-creation');
  12955. });
  12956. requestAnimationFrame(resolve);
  12957. }).then(function () {
  12958. return _this3._changeTo(scroll, options);
  12959. }).then(function () {
  12960. return new Promise(function (resolve) {
  12961. contents.forEach(function (content) {
  12962. content.setAttribute('class', map.get(content));
  12963. });
  12964. requestAnimationFrame(resolve);
  12965. });
  12966. });
  12967. /* end */
  12968. } else {
  12969. return this._changeTo(scroll, options);
  12970. }
  12971. }
  12972. }, {
  12973. key: 'getActiveIndex',
  12974. value: function getActiveIndex() {
  12975. var scroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._scroll;
  12976. scroll -= this._offset;
  12977. var count = this.itemCount,
  12978. size = this.itemNumSize;
  12979. if (this.itemNumSize === 0 || !util$1.isInteger(scroll)) {
  12980. return this._lastActiveIndex;
  12981. }
  12982. if (scroll <= 0) {
  12983. return 0;
  12984. }
  12985. for (var i = 0; i < count; i++) {
  12986. if (size * i <= scroll && size * (i + 1) > scroll) {
  12987. return i;
  12988. }
  12989. }
  12990. return count - 1;
  12991. }
  12992. }, {
  12993. key: 'setupResize',
  12994. value: function setupResize(add) {
  12995. window[(add ? 'add' : 'remove') + 'EventListener']('resize', this.onResize, true);
  12996. }
  12997. }, {
  12998. key: 'show',
  12999. value: function show() {
  13000. var _this4 = this;
  13001. this.setupResize(true);
  13002. this.onResize();
  13003. setTimeout(function () {
  13004. return _this4.target && _this4.target.classList.add('active');
  13005. }, 1000 / 60); // Hide elements after animations
  13006. }
  13007. }, {
  13008. key: 'hide',
  13009. value: function hide() {
  13010. this.setupResize(false);
  13011. this.target.classList.remove('active'); // Show elements before animations
  13012. }
  13013. }, {
  13014. key: 'updateSwipeable',
  13015. value: function updateSwipeable(shouldUpdate) {
  13016. if (this._gestureDetector) {
  13017. var action = shouldUpdate ? 'on' : 'off';
  13018. this._gestureDetector[action]('drag', this.onDrag);
  13019. this._gestureDetector[action]('dragstart', this.onDragStart);
  13020. this._gestureDetector[action]('dragend', this.onDragEnd);
  13021. }
  13022. }
  13023. }, {
  13024. key: 'updateAutoRefresh',
  13025. value: function updateAutoRefresh(shouldWatch) {
  13026. if (this._mutationObserver) {
  13027. shouldWatch ? this._mutationObserver.observe(this.target, { childList: true }) : this._mutationObserver.disconnect();
  13028. }
  13029. }
  13030. }, {
  13031. key: 'updateItemSize',
  13032. value: function updateItemSize(newSize) {
  13033. this.itemSize = newSize || '100%';
  13034. this.refresh();
  13035. }
  13036. }, {
  13037. key: 'toggleBlocker',
  13038. value: function toggleBlocker(block) {
  13039. this.blocker.style.pointerEvents = block ? 'auto' : 'none';
  13040. }
  13041. }, {
  13042. key: '_canConsumeGesture',
  13043. value: function _canConsumeGesture(gesture) {
  13044. var d = gesture.direction;
  13045. var isFirst = this._scroll === 0 && !this.isOverScrollable();
  13046. var isLast = this._scroll === this.maxScroll && !this.isOverScrollable();
  13047. return this.isVertical() ? d === 'down' && !isFirst || d === 'up' && !isLast : d === 'right' && !isFirst || d === 'left' && !isLast;
  13048. }
  13049. }, {
  13050. key: 'onDragStart',
  13051. value: function onDragStart(event) {
  13052. var _this5 = this;
  13053. this._ignoreDrag = event.consumed || !util$1.isValidGesture(event);
  13054. if (!this._ignoreDrag) {
  13055. var consume = event.consume;
  13056. event.consume = function () {
  13057. consume && consume();_this5._ignoreDrag = true;
  13058. };
  13059. if (this._canConsumeGesture(event.gesture)) {
  13060. var startX = event.gesture.center && event.gesture.center.clientX || 0,
  13061. distFromEdge = this.getBubbleWidth() || 0,
  13062. start = function start() {
  13063. consume && consume();
  13064. event.consumed = true;
  13065. _this5._started = true; // Avoid starting drag from outside
  13066. _this5.shouldBlock && _this5.toggleBlocker(true);
  13067. _this5._setSwiping(true);
  13068. util$1.iosPreventScroll(_this5._gestureDetector);
  13069. };
  13070. // Let parent elements consume the gesture or consume it right away
  13071. startX < distFromEdge || startX > this.targetSize - distFromEdge ? setImmediate(function () {
  13072. return !_this5._ignoreDrag && start();
  13073. }) : start();
  13074. }
  13075. }
  13076. }
  13077. }, {
  13078. key: 'onDrag',
  13079. value: function onDrag(event) {
  13080. if (!event.gesture || this._ignoreDrag || !this._started) {
  13081. return;
  13082. }
  13083. this._continued = true; // Fix for random 'dragend' without 'drag'
  13084. event.stopPropagation();
  13085. this._scrollTo(this._scroll - this._getDelta(event), { throttle: true });
  13086. }
  13087. }, {
  13088. key: 'onDragEnd',
  13089. value: function onDragEnd(event) {
  13090. this._started = false;
  13091. if (!event.gesture || this._ignoreDrag || !this._continued) {
  13092. this._ignoreDrag = true; // onDragEnd might fire before onDragStart's setImmediate
  13093. return;
  13094. }
  13095. this._continued = false;
  13096. event.stopPropagation();
  13097. var scroll = this._scroll - this._getDelta(event);
  13098. var normalizedScroll = this._normalizeScroll(scroll);
  13099. scroll === normalizedScroll ? this._startMomentumScroll(scroll, event) : this._killOverScroll(normalizedScroll);
  13100. this.shouldBlock && this.toggleBlocker(false);
  13101. }
  13102. }, {
  13103. key: '_startMomentumScroll',
  13104. value: function _startMomentumScroll(scroll, event) {
  13105. var velocity = this._getVelocity(event),
  13106. matchesDirection = event.gesture.interimDirection === this.dM.dir[this._getDelta(event) < 0 ? 0 : 1];
  13107. var nextScroll = this._getAutoScroll(scroll, velocity, matchesDirection);
  13108. var duration = Math.abs(nextScroll - scroll) / (velocity + 0.01) / 1000;
  13109. duration = Math.min(.25, Math.max(.1, duration));
  13110. this._changeTo(nextScroll, { swipe: true, animationOptions: { duration: duration, timing: 'cubic-bezier(.4, .7, .5, 1)' } });
  13111. }
  13112. }, {
  13113. key: '_killOverScroll',
  13114. value: function _killOverScroll(scroll) {
  13115. var _this6 = this;
  13116. this._scroll = scroll;
  13117. var direction = this.dM.dir[Number(scroll > 0)];
  13118. var killOverScroll = function killOverScroll() {
  13119. return _this6._changeTo(scroll, { animationOptions: { duration: .4, timing: 'cubic-bezier(.1, .4, .1, 1)' } });
  13120. };
  13121. this.overScrollHook({ direction: direction, killOverScroll: killOverScroll }) || killOverScroll();
  13122. }
  13123. }, {
  13124. key: '_changeTo',
  13125. value: function _changeTo(scroll) {
  13126. var _this7 = this;
  13127. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13128. var e = { activeIndex: this.getActiveIndex(scroll), lastActiveIndex: this._lastActiveIndex, swipe: options.swipe || false };
  13129. var change = e.activeIndex !== e.lastActiveIndex;
  13130. var canceled = change ? this.preChangeHook(e) : false;
  13131. this._scroll = canceled ? this._offset + e.lastActiveIndex * this.itemNumSize : scroll;
  13132. this._lastActiveIndex = canceled ? e.lastActiveIndex : e.activeIndex;
  13133. return this._scrollTo(this._scroll, options).then(function () {
  13134. if (scroll === _this7._scroll && !canceled) {
  13135. _this7._setSwiping(false);
  13136. change && _this7.postChangeHook(e);
  13137. } else if (options.reject) {
  13138. _this7._setSwiping(false);
  13139. return Promise.reject('Canceled');
  13140. }
  13141. });
  13142. }
  13143. }, {
  13144. key: '_scrollTo',
  13145. value: function _scrollTo(scroll) {
  13146. var _this8 = this;
  13147. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13148. if (options.throttle) {
  13149. var ratio = 0.35;
  13150. if (scroll < 0) {
  13151. scroll = this.isOverScrollable() ? Math.round(scroll * ratio) : 0;
  13152. } else {
  13153. var maxScroll = this.maxScroll;
  13154. if (maxScroll < scroll) {
  13155. scroll = this.isOverScrollable() ? maxScroll + Math.round((scroll - maxScroll) * ratio) : maxScroll;
  13156. }
  13157. }
  13158. }
  13159. var opt = options.animation === 'none' ? {} : options.animationOptions;
  13160. this.scrollHook && this.itemNumSize > 0 && this.scrollHook((scroll / this.itemNumSize).toFixed(2), options.animationOptions || {});
  13161. return new Promise(function (resolve) {
  13162. return Animit(_this8.target).queue({ transform: _this8._getTransform(scroll) }, opt).play(resolve);
  13163. });
  13164. }
  13165. }, {
  13166. key: '_getAutoScroll',
  13167. value: function _getAutoScroll(scroll, velocity, matchesDirection) {
  13168. var max = this.maxScroll,
  13169. offset = this._offset,
  13170. size = this.itemNumSize;
  13171. if (!this.isAutoScrollable()) {
  13172. return Math.max(0, Math.min(max, scroll));
  13173. }
  13174. var arr = [];
  13175. for (var s = offset; s < max; s += size) {
  13176. arr.push(s);
  13177. }
  13178. arr.push(max);
  13179. arr = arr.sort(function (left, right) {
  13180. return Math.abs(left - scroll) - Math.abs(right - scroll);
  13181. }).filter(function (item, pos) {
  13182. return !pos || item !== arr[pos - 1];
  13183. });
  13184. var result = arr[0];
  13185. var lastScroll = this._lastActiveIndex * size + offset;
  13186. var scrollRatio = Math.abs(scroll - lastScroll) / size;
  13187. if (scrollRatio <= this.getAutoScrollRatio(matchesDirection, velocity, size)) {
  13188. result = lastScroll;
  13189. } else {
  13190. if (scrollRatio < 1.0 && arr[0] === lastScroll && arr.length > 1) {
  13191. result = arr[1];
  13192. }
  13193. }
  13194. return Math.max(0, Math.min(max, result));
  13195. }
  13196. }, {
  13197. key: '_reset',
  13198. value: function _reset() {
  13199. this._targetSize = this._itemNumSize = undefined;
  13200. }
  13201. }, {
  13202. key: '_normalizeScroll',
  13203. value: function _normalizeScroll(scroll) {
  13204. return Math.max(Math.min(scroll, this.maxScroll), 0);
  13205. }
  13206. }, {
  13207. key: 'refresh',
  13208. value: function refresh() {
  13209. this._reset();
  13210. this._updateLayout();
  13211. if (util$1.isInteger(this._scroll)) {
  13212. var scroll = this._normalizeScroll(this._scroll);
  13213. scroll !== this._scroll ? this._killOverScroll(scroll) : this._changeTo(scroll);
  13214. } else {
  13215. this._setupInitialIndex();
  13216. }
  13217. this.refreshHook();
  13218. }
  13219. }, {
  13220. key: '_getDelta',
  13221. value: function _getDelta(event) {
  13222. return event.gesture['delta' + this.dM.axis];
  13223. }
  13224. }, {
  13225. key: '_getVelocity',
  13226. value: function _getVelocity(event) {
  13227. return event.gesture['velocity' + this.dM.axis];
  13228. }
  13229. }, {
  13230. key: '_getTransform',
  13231. value: function _getTransform(scroll) {
  13232. return 'translate3d(' + this.dM.t3d[0] + -scroll + this.dM.t3d[1] + ')';
  13233. }
  13234. }, {
  13235. key: '_updateLayout',
  13236. value: function _updateLayout() {
  13237. this.dM = directionMap[this.isVertical() ? 'vertical' : 'horizontal'];
  13238. this.target.classList.toggle('ons-swiper-target--vertical', this.isVertical());
  13239. for (var c = this.target.children[0]; c; c = c.nextElementSibling) {
  13240. c.style[this.dM.size.toLowerCase()] = this.itemSize;
  13241. }
  13242. if (this.isCentered()) {
  13243. this._offset = (this.targetSize - this.itemNumSize) / -2 || 0;
  13244. }
  13245. }
  13246. }, {
  13247. key: 'itemCount',
  13248. get: function get$$1() {
  13249. return this.target.children.length;
  13250. }
  13251. }, {
  13252. key: 'itemNumSize',
  13253. get: function get$$1() {
  13254. if (typeof this._itemNumSize !== 'number' || this._itemNumSize !== this._itemNumSize) {
  13255. this._itemNumSize = this._calculateItemSize();
  13256. }
  13257. return this._itemNumSize;
  13258. }
  13259. }, {
  13260. key: 'maxScroll',
  13261. get: function get$$1() {
  13262. var max = this.itemCount * this.itemNumSize - this.targetSize;
  13263. return Math.ceil(max < 0 ? 0 : max); // Need to return an integer value.
  13264. }
  13265. }, {
  13266. key: 'targetSize',
  13267. get: function get$$1() {
  13268. if (!this._targetSize) {
  13269. this._targetSize = this.target['offset' + this.dM.size];
  13270. }
  13271. return this._targetSize;
  13272. }
  13273. }]);
  13274. return Swiper;
  13275. }();
  13276. /*
  13277. Copyright 2013-2015 ASIAL CORPORATION
  13278. Licensed under the Apache License, Version 2.0 (the "License");
  13279. you may not use this file except in compliance with the License.
  13280. You may obtain a copy of the License at
  13281. http://www.apache.org/licenses/LICENSE-2.0
  13282. Unless required by applicable law or agreed to in writing, software
  13283. distributed under the License is distributed on an "AS IS" BASIS,
  13284. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13285. See the License for the specific language governing permissions and
  13286. limitations under the License.
  13287. */
  13288. /**
  13289. * @element ons-carousel
  13290. * @category carousel
  13291. * @description
  13292. * [en]
  13293. * Carousel component. A carousel can be used to display several items in the same space.
  13294. *
  13295. * The component supports displaying content both horizontally and vertically. The user can scroll through the items by dragging and it can also be controller programmatically.
  13296. * [/en]
  13297. * [ja][/ja]
  13298. * @codepen xbbzOQ
  13299. * @tutorial vanilla/Reference/carousel
  13300. * @seealso ons-carousel-item
  13301. * [en]`<ons-carousel-item>` component[/en]
  13302. * [ja]ons-carousel-itemコンポーネント[/ja]
  13303. * @example
  13304. * <ons-carousel style="width: 100%; height: 200px">
  13305. * <ons-carousel-item>
  13306. * ...
  13307. * </ons-carousel-item>
  13308. * <ons-carousel-item>
  13309. * ...
  13310. * </ons-carousel-item>
  13311. * </ons-carousel>
  13312. */
  13313. var CarouselElement = function (_BaseElement) {
  13314. inherits(CarouselElement, _BaseElement);
  13315. /**
  13316. * @event postchange
  13317. * @description
  13318. * [en]Fired just after the current carousel item has changed.[/en]
  13319. * [ja]現在表示しているカルーセルの要素が変わった時に発火します。[/ja]
  13320. * @param {Object} event
  13321. * [en]Event object.[/en]
  13322. * [ja]イベントオブジェクトです。[/ja]
  13323. * @param {Object} event.carousel
  13324. * [en]Carousel object.[/en]
  13325. * [ja]イベントが発火したCarouselオブジェクトです。[/ja]
  13326. * @param {Number} event.activeIndex
  13327. * [en]Current active index.[/en]
  13328. * [ja]現在アクティブになっている要素のインデックス。[/ja]
  13329. * @param {Number} event.lastActiveIndex
  13330. * [en]Previous active index.[/en]
  13331. * [ja]以前アクティブだった要素のインデックス。[/ja]
  13332. */
  13333. /**
  13334. * @event refresh
  13335. * @description
  13336. * [en]Fired when the carousel has been refreshed.[/en]
  13337. * [ja]カルーセルが更新された時に発火します。[/ja]
  13338. * @param {Object} event
  13339. * [en]Event object.[/en]
  13340. * [ja]イベントオブジェクトです。[/ja]
  13341. * @param {Object} event.carousel
  13342. * [en]Carousel object.[/en]
  13343. * [ja]イベントが発火したCarouselオブジェクトです。[/ja]
  13344. */
  13345. /**
  13346. * @event overscroll
  13347. * @description
  13348. * [en]Fired when the carousel has been overscrolled.[/en]
  13349. * [ja]カルーセルがオーバースクロールした時に発火します。[/ja]
  13350. * @param {Object} event
  13351. * [en]Event object.[/en]
  13352. * [ja]イベントオブジェクトです。[/ja]
  13353. * @param {Object} event.carousel
  13354. * [en]Fired when the carousel has been refreshed.[/en]
  13355. * [ja]カルーセルが更新された時に発火します。[/ja]
  13356. * @param {Number} event.activeIndex
  13357. * [en]Current active index.[/en]
  13358. * [ja]現在アクティブになっている要素のインデックス。[/ja]
  13359. * @param {String} event.direction
  13360. * [en]Can be one of either "up", "down", "left" or "right".[/en]
  13361. * [ja]オーバースクロールされた方向が得られます。"up", "down", "left", "right"のいずれかの方向が渡されます。[/ja]
  13362. * @param {Function} event.waitToReturn
  13363. * [en]Takes a <code>Promise</code> object as an argument. The carousel will not scroll back until the promise has been resolved or rejected.[/en]
  13364. * [ja]この関数はPromiseオブジェクトを引数として受け取ります。渡したPromiseオブジェクトがresolveされるかrejectされるまで、カルーセルはスクロールバックしません。[/ja]
  13365. */
  13366. /**
  13367. * @attribute direction
  13368. * @type {String}
  13369. * @description
  13370. * [en]The direction of the carousel. Can be either "horizontal" or "vertical". Default is "horizontal".[/en]
  13371. * [ja]カルーセルの方向を指定します。"horizontal"か"vertical"を指定できます。"horizontal"がデフォルト値です。[/ja]
  13372. */
  13373. /**
  13374. * @attribute fullscreen
  13375. * @description
  13376. * [en]If this attribute is set the carousel will cover the whole screen.[/en]
  13377. * [ja]この属性があると、absoluteポジションを使ってカルーセルが自動的に画面いっぱいに広がります。[/ja]
  13378. */
  13379. /**
  13380. * @attribute overscrollable
  13381. * @description
  13382. * [en]If this attribute is set the carousel will be scrollable over the edge. It will bounce back when released.[/en]
  13383. * [ja]この属性がある時、タッチやドラッグで端までスクロールした時に、バウンドするような効果が当たります。[/ja]
  13384. */
  13385. /**
  13386. * @attribute centered
  13387. * @description
  13388. * [en]If this attribute is set the carousel then the selected item will be in the center of the carousel instead of the beginning. Useful only when the items are smaller than the carousel. [/en]
  13389. * [ja]この属性がある時、選んでいるons-carousel-itemはカルーセルの真ん中へ行きます。項目がカルーセルよりも小さい場合にのみ、これは便利です。[/ja]
  13390. */
  13391. /**
  13392. * @attribute item-width
  13393. * @type {String}
  13394. * @description
  13395. * [en]ons-carousel-item's width. Only works when the direction is set to "horizontal".[/en]
  13396. * [ja]ons-carousel-itemの幅を指定します。この属性は、direction属性に"horizontal"を指定した時のみ有効になります。[/ja]
  13397. */
  13398. /**
  13399. * @attribute item-height
  13400. * @type {String}
  13401. * @description
  13402. * [en]ons-carousel-item's height. Only works when the direction is set to "vertical".[/en]
  13403. * [ja]ons-carousel-itemの高さを指定します。この属性は、direction属性に"vertical"を指定した時のみ有効になります。[/ja]
  13404. */
  13405. /**
  13406. * @attribute auto-scroll
  13407. * @description
  13408. * [en]If this attribute is set the carousel will be automatically scrolled to the closest item border when released.[/en]
  13409. * [ja]この属性がある時、一番近いcarousel-itemの境界まで自動的にスクロールするようになります。[/ja]
  13410. */
  13411. /**
  13412. * @attribute auto-scroll-ratio
  13413. * @type {Number}
  13414. * @description
  13415. * [en]A number between 0.0 and 1.0 that specifies how much the user must drag the carousel in order for it to auto scroll to the next item.[/en]
  13416. * [ja]0.0から1.0までの値を指定します。カルーセルの要素をどれぐらいの割合までドラッグすると次の要素に自動的にスクロールするかを指定します。[/ja]
  13417. */
  13418. /**
  13419. * @attribute swipeable
  13420. * @description
  13421. * [en]If this attribute is set the carousel can be scrolled by drag or swipe.[/en]
  13422. * [ja]この属性がある時、カルーセルをスワイプやドラッグで移動できるようになります。[/ja]
  13423. */
  13424. /**
  13425. * @attribute disabled
  13426. * @description
  13427. * [en]If this attribute is set the carousel is disabled.[/en]
  13428. * [ja]この属性がある時、dragやtouchやswipeを受け付けなくなります。[/ja]
  13429. */
  13430. /**
  13431. * @attribute initial-index
  13432. * @initonly
  13433. * @default 0
  13434. * @type {Number}
  13435. * @description
  13436. * [en]Specify the index of the ons-carousel-item to show initially. Default is 0.[/en]
  13437. * [ja]最初に表示するons-carousel-itemを0始まりのインデックスで指定します。デフォルト値は 0 です。[/ja]
  13438. */
  13439. /**
  13440. * @attribute auto-refresh
  13441. * @description
  13442. * [en]When this attribute is set the carousel will automatically refresh when the number of child nodes change.[/en]
  13443. * [ja]この属性がある時、子要素の数が変わるとカルーセルは自動的に更新されるようになります。[/ja]
  13444. */
  13445. /**
  13446. * @attribute animation
  13447. * @type {String}
  13448. * @description
  13449. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13450. * [ja][/ja]
  13451. */
  13452. /**
  13453. * @attribute animation-options
  13454. * @type {Expression}
  13455. * @description
  13456. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  13457. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。例:{duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  13458. */
  13459. function CarouselElement() {
  13460. classCallCheck(this, CarouselElement);
  13461. var _this = possibleConstructorReturn(this, (CarouselElement.__proto__ || Object.getPrototypeOf(CarouselElement)).call(this));
  13462. contentReady(_this, function () {
  13463. return _this._compile();
  13464. });
  13465. return _this;
  13466. }
  13467. createClass(CarouselElement, [{
  13468. key: '_compile',
  13469. value: function _compile() {
  13470. var target = this.children[0] && this.children[0].tagName !== 'ONS-CAROUSEL-ITEM' && this.children[0] || document.createElement('div');
  13471. if (!target.parentNode) {
  13472. while (this.firstChild) {
  13473. target.appendChild(this.firstChild);
  13474. }
  13475. this.appendChild(target);
  13476. }
  13477. !this.children[1] && this.appendChild(document.createElement('div'));
  13478. this.appendChild = this.appendChild.bind(target);
  13479. this.insertBefore = this.insertBefore.bind(target);
  13480. }
  13481. }, {
  13482. key: 'connectedCallback',
  13483. value: function connectedCallback() {
  13484. var _this2 = this;
  13485. if (!this._swiper) {
  13486. this._swiper = new Swiper({
  13487. getElement: function getElement() {
  13488. return _this2;
  13489. },
  13490. getInitialIndex: function getInitialIndex() {
  13491. return _this2.getAttribute('initial-index');
  13492. },
  13493. getAutoScrollRatio: function getAutoScrollRatio() {
  13494. return _this2.autoScrollRatio;
  13495. },
  13496. isVertical: function isVertical() {
  13497. return _this2.vertical;
  13498. },
  13499. isOverScrollable: function isOverScrollable() {
  13500. return _this2.overscrollable;
  13501. },
  13502. isCentered: function isCentered() {
  13503. return _this2.centered;
  13504. },
  13505. isAutoScrollable: function isAutoScrollable() {
  13506. return _this2.autoScroll;
  13507. },
  13508. itemSize: this.itemSize,
  13509. overScrollHook: this._onOverScroll.bind(this),
  13510. preChangeHook: this._onChange.bind(this, 'prechange'),
  13511. postChangeHook: this._onChange.bind(this, 'postchange'),
  13512. refreshHook: this._onRefresh.bind(this),
  13513. scrollHook: function scrollHook() {
  13514. return _this2._onSwipe && _this2._onSwipe.apply(_this2, arguments);
  13515. }
  13516. });
  13517. contentReady(this, function () {
  13518. return _this2._swiper.init({
  13519. swipeable: _this2.hasAttribute('swipeable'),
  13520. autoRefresh: _this2.hasAttribute('auto-refresh')
  13521. });
  13522. });
  13523. }
  13524. }
  13525. }, {
  13526. key: 'disconnectedCallback',
  13527. value: function disconnectedCallback() {
  13528. if (this._swiper && this._swiper.initialized) {
  13529. this._swiper.dispose();
  13530. this._swiper = null;
  13531. }
  13532. }
  13533. }, {
  13534. key: 'attributeChangedCallback',
  13535. value: function attributeChangedCallback(name, last, current) {
  13536. if (!this._swiper) {
  13537. return;
  13538. }
  13539. switch (name) {
  13540. case 'swipeable':
  13541. this._swiper.updateSwipeable(this.hasAttribute('swipeable'));
  13542. break;
  13543. case 'auto-refresh':
  13544. this._swiper.updateAutoRefresh(this.hasAttribute('auto-refresh'));
  13545. break;
  13546. case 'item-height':
  13547. this.vertical && this._swiper.updateItemSize(this.itemSize);
  13548. break;
  13549. case 'item-width':
  13550. this.vertical || this._swiper.updateItemSize(this.itemSize);
  13551. break;
  13552. case 'direction':
  13553. this._swiper.refresh();
  13554. }
  13555. }
  13556. }, {
  13557. key: '_show',
  13558. value: function _show() {
  13559. this._swiper.show();
  13560. }
  13561. }, {
  13562. key: '_hide',
  13563. value: function _hide() {
  13564. this._swiper.hide();
  13565. }
  13566. }, {
  13567. key: '_onOverScroll',
  13568. value: function _onOverScroll(_ref) {
  13569. var direction = _ref.direction,
  13570. killOverScroll = _ref.killOverScroll;
  13571. var waitForAction = false;
  13572. util$1.triggerElementEvent(this, 'overscroll', {
  13573. carousel: this,
  13574. activeIndex: this.getActiveIndex(),
  13575. direction: direction,
  13576. waitToReturn: function waitToReturn(promise) {
  13577. waitForAction = true;
  13578. promise.then(killOverScroll);
  13579. }
  13580. });
  13581. return waitForAction;
  13582. }
  13583. }, {
  13584. key: '_onChange',
  13585. value: function _onChange(eventName, _ref2) {
  13586. var activeIndex = _ref2.activeIndex,
  13587. lastActiveIndex = _ref2.lastActiveIndex;
  13588. util$1.triggerElementEvent(this, eventName, { carousel: this, activeIndex: activeIndex, lastActiveIndex: lastActiveIndex });
  13589. }
  13590. }, {
  13591. key: '_onRefresh',
  13592. value: function _onRefresh() {
  13593. util$1.triggerElementEvent(this, 'refresh', { carousel: this });
  13594. }
  13595. /**
  13596. * @method setActiveIndex
  13597. * @signature setActiveIndex(index, [options])
  13598. * @param {Number} index
  13599. * [en]The index that the carousel should be set to.[/en]
  13600. * [ja]carousel要素のインデックスを指定します。[/ja]
  13601. * @param {Object} [options]
  13602. * [en]Parameter object.[/en]
  13603. * [ja][/ja]
  13604. * @param {Function} [options.callback]
  13605. * [en]A function that will be called after the animation is finished.[/en]
  13606. * [ja][/ja]
  13607. * @param {String} [options.animation]
  13608. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13609. * [ja][/ja]
  13610. * @param {Object} [options.animationOptions]
  13611. * [en]An object that can be used to specify duration, delay and timing function of the animation.[/en]
  13612. * [ja][/ja]
  13613. * @description
  13614. * [en]Specify the index of the `<ons-carousel-item>` to show.[/en]
  13615. * [ja]表示するons-carousel-itemをindexで指定します。[/ja]
  13616. * @return {Promise}
  13617. * [en]Resolves to the carousel element.[/en]
  13618. * [ja][/ja]
  13619. */
  13620. }, {
  13621. key: 'setActiveIndex',
  13622. value: function setActiveIndex(index) {
  13623. var _this3 = this;
  13624. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13625. options = _extends({
  13626. animation: this.getAttribute('animation'),
  13627. animationOptions: this.hasAttribute('animation-options') ? util$1.animationOptionsParse(this.getAttribute('animation-options')) : { duration: .3, timing: 'cubic-bezier(.4, .7, .5, 1)' }
  13628. }, options);
  13629. return this._swiper.setActiveIndex(index, options).then(function () {
  13630. options.callback instanceof Function && options.callback(_this3);
  13631. return Promise.resolve(_this3);
  13632. });
  13633. }
  13634. /**
  13635. * @method getActiveIndex
  13636. * @signature getActiveIndex()
  13637. * @return {Number}
  13638. * [en]The current carousel item index.[/en]
  13639. * [ja]現在表示しているカルーセル要素のインデックスが返されます。[/ja]
  13640. * @description
  13641. * [en]Returns the index of the currently visible `<ons-carousel-item>`.[/en]
  13642. * [ja]現在表示されているons-carousel-item要素のインデックスを返します。[/ja]
  13643. */
  13644. }, {
  13645. key: 'getActiveIndex',
  13646. value: function getActiveIndex() {
  13647. return this._swiper.getActiveIndex();
  13648. }
  13649. /**
  13650. * @method next
  13651. * @signature next([options])
  13652. * @param {Object} [options]
  13653. * [en]Parameter object.[/en]
  13654. * [ja][/ja]
  13655. * @param {Function} [options.callback]
  13656. * [en]A function that will be executed after the animation has finished.[/en]
  13657. * [ja][/ja]
  13658. * @param {String} [options.animation]
  13659. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13660. * [ja][/ja]
  13661. * @param {Object} [options.animationOptions]
  13662. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13663. * [ja][/ja]
  13664. * @return {Promise}
  13665. * [en]Resolves to the carousel element[/en]
  13666. * [ja][/ja]
  13667. * @description
  13668. * [en]Show next `<ons-carousel-item>`.[/en]
  13669. * [ja]次のons-carousel-itemを表示します。[/ja]
  13670. */
  13671. }, {
  13672. key: 'next',
  13673. value: function next(options) {
  13674. return this.setActiveIndex(this.getActiveIndex() + 1, options);
  13675. }
  13676. /**
  13677. * @method prev
  13678. * @signature prev([options])
  13679. * @param {Object} [options]
  13680. * [en]Parameter object.[/en]
  13681. * [ja][/ja]
  13682. * @param {Function} [options.callback]
  13683. * [en]A function that will be executed after the animation has finished.[/en]
  13684. * [ja][/ja]
  13685. * @param {String} [options.animation]
  13686. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13687. * [ja][/ja]
  13688. * @param {Object} [options.animationOptions]
  13689. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13690. * [ja][/ja]
  13691. * @return {Promise}
  13692. * [en]Resolves to the carousel element[/en]
  13693. * [ja][/ja]
  13694. * @description
  13695. * [en]Show previous `<ons-carousel-item>`.[/en]
  13696. * [ja]前のons-carousel-itemを表示します。[/ja]
  13697. */
  13698. }, {
  13699. key: 'prev',
  13700. value: function prev(options) {
  13701. return this.setActiveIndex(this.getActiveIndex() - 1, options);
  13702. }
  13703. /**
  13704. * @method first
  13705. * @signature first()
  13706. * @param {Object} [options]
  13707. * [en]Parameter object.[/en]
  13708. * [ja][/ja]
  13709. * @param {Function} [options.callback]
  13710. * [en]A function that will be executed after the animation has finished.[/en]
  13711. * [ja][/ja]
  13712. * @param {String} [options.animation]
  13713. * [en]If this is set to `"none"`, the transitions will not be animated.[/en]
  13714. * [ja][/ja]
  13715. * @param {Object} [options.animationOptions]
  13716. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13717. * [ja][/ja]
  13718. * @return {Promise}
  13719. * [en]Resolves to the carousel element[/en]
  13720. * [ja][/ja]
  13721. * @description
  13722. * [en]Show first `<ons-carousel-item>`.[/en]
  13723. * [ja]最初のons-carousel-itemを表示します。[/ja]
  13724. */
  13725. }, {
  13726. key: 'first',
  13727. value: function first(options) {
  13728. return this.setActiveIndex(0, options);
  13729. }
  13730. /**
  13731. * @method last
  13732. * @signature last()
  13733. * @param {Object} [options]
  13734. * [en]Parameter object.[/en]
  13735. * [ja][/ja]
  13736. * @param {Function} [options.callback]
  13737. * [en]A function that will be executed after the animation has finished.[/en]
  13738. * [ja][/ja]
  13739. * @param {String} [options.animation]
  13740. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  13741. * [ja][/ja]
  13742. * @param {Object} [options.animationOptions]
  13743. * [en]An object that can be used to specify the duration, delay and timing function of the animation.[/en]
  13744. * [ja][/ja]
  13745. * @return {Promise}
  13746. * [en]Resolves to the carousel element[/en]
  13747. * [ja]Resolves to the carousel element[/ja]
  13748. * @description
  13749. * [en]Show last ons-carousel item.[/en]
  13750. * [ja]最後のons-carousel-itemを表示します。[/ja]
  13751. */
  13752. }, {
  13753. key: 'last',
  13754. value: function last(options) {
  13755. this.setActiveIndex(Math.max(this.itemCount - 1, 0), options);
  13756. }
  13757. /**
  13758. * @method refresh
  13759. * @signature refresh()
  13760. * @description
  13761. * [en]Update the layout of the carousel. Used when adding `<ons-carousel-items>` dynamically or to automatically adjust the size.[/en]
  13762. * [ja]レイアウトや内部の状態を最新のものに更新します。ons-carousel-itemを動的に増やしたり、ons-carouselの大きさを動的に変える際に利用します。[/ja]
  13763. */
  13764. }, {
  13765. key: 'refresh',
  13766. value: function refresh() {
  13767. this._swiper.refresh();
  13768. }
  13769. /**
  13770. * @property itemCount
  13771. * @readonly
  13772. * @type {Number}
  13773. * @description
  13774. * [en]The number of carousel items.[/en]
  13775. * [ja]カルーセル要素の数です。[/ja]
  13776. */
  13777. }, {
  13778. key: 'itemCount',
  13779. get: function get$$1() {
  13780. return this._swiper.itemCount;
  13781. }
  13782. /**
  13783. * @property swipeable
  13784. * @type {Boolean}
  13785. * @description
  13786. * [en]true if the carousel is swipeable.[/en]
  13787. * [ja]swipeableであればtrueを返します。[/ja]
  13788. */
  13789. }, {
  13790. key: 'swipeable',
  13791. get: function get$$1() {
  13792. return this.hasAttribute('swipeable');
  13793. },
  13794. set: function set$$1(value) {
  13795. return util$1.toggleAttribute(this, 'swipeable', value);
  13796. }
  13797. /**
  13798. * @property onSwipe
  13799. * @type {Function}
  13800. * @description
  13801. * [en]Hook called whenever the user slides the carousel. It gets a decimal index and an animationOptions object as arguments.[/en]
  13802. * [ja][/ja]
  13803. */
  13804. }, {
  13805. key: 'onSwipe',
  13806. get: function get$$1() {
  13807. return this._onSwipe;
  13808. },
  13809. set: function set$$1(value) {
  13810. if (value && !(value instanceof Function)) {
  13811. util$1.throw('"onSwipe" must be a function');
  13812. }
  13813. this._onSwipe = value;
  13814. }
  13815. /**
  13816. * @property autoScroll
  13817. * @type {Boolean}
  13818. * @description
  13819. * [en]true if auto scroll is enabled.[/en]
  13820. * [ja]オートスクロールが有効であればtrueを返します。[/ja]
  13821. */
  13822. }, {
  13823. key: 'autoScroll',
  13824. get: function get$$1() {
  13825. return this.hasAttribute('auto-scroll');
  13826. },
  13827. set: function set$$1(value) {
  13828. return util$1.toggleAttribute(this, 'auto-scroll', value);
  13829. }
  13830. }, {
  13831. key: 'vertical',
  13832. get: function get$$1() {
  13833. return this.getAttribute('direction') === 'vertical';
  13834. }
  13835. }, {
  13836. key: 'itemSize',
  13837. get: function get$$1() {
  13838. var itemSizeAttr = (this.getAttribute('item-' + (this.vertical ? 'height' : 'width')) || '').trim();
  13839. return itemSizeAttr.match(/^\d+(px|%)$/) ? itemSizeAttr : '100%';
  13840. }
  13841. /**
  13842. * @property autoScrollRatio
  13843. * @type {Number}
  13844. * @description
  13845. * [en]The current auto scroll ratio. [/en]
  13846. * [ja]現在のオートスクロールのratio値。[/ja]
  13847. */
  13848. }, {
  13849. key: 'autoScrollRatio',
  13850. get: function get$$1() {
  13851. return parseFloat(this.getAttribute('auto-scroll-ratio'));
  13852. },
  13853. set: function set$$1(ratio) {
  13854. this.setAttribute('auto-scroll-ratio', ratio);
  13855. }
  13856. /**
  13857. * @property disabled
  13858. * @type {Boolean}
  13859. * @description
  13860. * [en]Whether the carousel is disabled or not.[/en]
  13861. * [ja]無効化されている場合に`true`。[/ja]
  13862. */
  13863. }, {
  13864. key: 'disabled',
  13865. get: function get$$1() {
  13866. return this.hasAttribute('disabled');
  13867. },
  13868. set: function set$$1(value) {
  13869. return util$1.toggleAttribute(this, 'disabled', value);
  13870. }
  13871. /**
  13872. * @property overscrollable
  13873. * @type {Boolean}
  13874. * @description
  13875. * [en]Whether the carousel is overscrollable or not.[/en]
  13876. * [ja]overscrollできればtrueを返します。[/ja]
  13877. */
  13878. }, {
  13879. key: 'overscrollable',
  13880. get: function get$$1() {
  13881. return this.hasAttribute('overscrollable');
  13882. },
  13883. set: function set$$1(value) {
  13884. return util$1.toggleAttribute(this, 'overscrollable', value);
  13885. }
  13886. /**
  13887. * @property centered
  13888. * @type {Boolean}
  13889. * @description
  13890. * [en]Whether the carousel is centered or not.[/en]
  13891. * [ja]centered状態になっていればtrueを返します。[/ja]
  13892. */
  13893. }, {
  13894. key: 'centered',
  13895. get: function get$$1() {
  13896. return this.hasAttribute('centered');
  13897. },
  13898. set: function set$$1(value) {
  13899. return util$1.toggleAttribute(this, 'centered', value);
  13900. }
  13901. }], [{
  13902. key: 'observedAttributes',
  13903. get: function get$$1() {
  13904. return ['swipeable', 'auto-refresh', 'direction', 'item-height', 'item-width'];
  13905. }
  13906. }, {
  13907. key: 'events',
  13908. get: function get$$1() {
  13909. return ['postchange', 'refresh', 'overscroll'];
  13910. }
  13911. }]);
  13912. return CarouselElement;
  13913. }(BaseElement);
  13914. onsElements.Carousel = CarouselElement;
  13915. customElements.define('ons-carousel', CarouselElement);
  13916. /*
  13917. Copyright 2013-2015 ASIAL CORPORATION
  13918. Licensed under the Apache License, Version 2.0 (the "License");
  13919. you may not use this file except in compliance with the License.
  13920. You may obtain a copy of the License at
  13921. http://www.apache.org/licenses/LICENSE-2.0
  13922. Unless required by applicable law or agreed to in writing, software
  13923. distributed under the License is distributed on an "AS IS" BASIS,
  13924. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13925. See the License for the specific language governing permissions and
  13926. limitations under the License.
  13927. */
  13928. /**
  13929. * @element ons-col
  13930. * @category grid
  13931. * @description
  13932. * [en]Represents a column in the grid system. Use with `<ons-row>` to layout components.[/en]
  13933. * [ja]グリッドシステムにて列を定義します。ons-rowとともに使用し、コンポーネントのレイアウトに利用します。[/ja]
  13934. * @note
  13935. * [en]For Android 4.3 and earlier, and iOS6 and earlier, when using mixed alignment with ons-row and ons-column, they may not be displayed correctly. You can use only one alignment.[/en]
  13936. * [ja]Android 4.3以前、もしくはiOS 6以前のOSの場合、ons-rowとons-columnを組み合わせた場合に描画が崩れる場合があります。[/ja]
  13937. * @codepen GgujC {wide}
  13938. * @guide theming.html [en]Layouting guide[/en][ja]レイアウト機能[/ja]
  13939. * @seealso ons-row
  13940. * [en]The `<ons-row>` component is the parent of `<ons-col>`.[/en]
  13941. * [ja]ons-rowコンポーネント[/ja]
  13942. * @example
  13943. * <ons-row>
  13944. * <ons-col width="50px"><ons-icon icon="fa-twitter"></ons-icon></ons-col>
  13945. * <ons-col>Text</ons-col>
  13946. * </ons-row>
  13947. */
  13948. /**
  13949. * @attribute vertical-align
  13950. * @type {String}
  13951. * @description
  13952. * [en]Vertical alignment of the column. Valid values are "top", "center", and "bottom".[/en]
  13953. * [ja]縦の配置を指定する。"top", "center", "bottom"のいずれかを指定します。[/ja]
  13954. */
  13955. /**
  13956. * @attribute width
  13957. * @type {String}
  13958. * @description
  13959. * [en]The width of the column. Valid values are css width values ("10%", "50px").[/en]
  13960. * [ja]カラムの横幅を指定する。パーセントもしくはピクセルで指定します(10%や50px)。[/ja]
  13961. */
  13962. var ColElement = function (_BaseElement) {
  13963. inherits(ColElement, _BaseElement);
  13964. function ColElement() {
  13965. classCallCheck(this, ColElement);
  13966. var _this = possibleConstructorReturn(this, (ColElement.__proto__ || Object.getPrototypeOf(ColElement)).call(this));
  13967. if (_this.getAttribute('width')) {
  13968. _this._updateWidth();
  13969. }
  13970. return _this;
  13971. }
  13972. createClass(ColElement, [{
  13973. key: 'attributeChangedCallback',
  13974. value: function attributeChangedCallback(name, last, current) {
  13975. if (name === 'width') {
  13976. this._updateWidth();
  13977. }
  13978. }
  13979. }, {
  13980. key: '_updateWidth',
  13981. value: function _updateWidth() {
  13982. var width = this.getAttribute('width');
  13983. if (!width) {
  13984. styler.clear(this, 'flex maxWidth');
  13985. } else {
  13986. width = width.trim().match(/^\d+$/) ? width + '%' : width;
  13987. styler(this, {
  13988. flex: '0 0 ' + width,
  13989. maxWidth: width
  13990. });
  13991. }
  13992. }
  13993. }], [{
  13994. key: 'observedAttributes',
  13995. get: function get$$1() {
  13996. return ['width'];
  13997. }
  13998. }]);
  13999. return ColElement;
  14000. }(BaseElement);
  14001. onsElements.Col = ColElement;
  14002. customElements.define('ons-col', ColElement);
  14003. /*
  14004. Copyright 2013-2015 ASIAL CORPORATION
  14005. Licensed under the Apache License, Version 2.0 (the "License");
  14006. you may not use this file except in compliance with the License.
  14007. You may obtain a copy of the License at
  14008. http://www.apache.org/licenses/LICENSE-2.0
  14009. Unless required by applicable law or agreed to in writing, software
  14010. distributed under the License is distributed on an "AS IS" BASIS,
  14011. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14012. See the License for the specific language governing permissions and
  14013. limitations under the License.
  14014. */
  14015. var DialogAnimator = function (_BaseAnimator) {
  14016. inherits(DialogAnimator, _BaseAnimator);
  14017. function DialogAnimator() {
  14018. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14019. _ref$timing = _ref.timing,
  14020. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  14021. _ref$delay = _ref.delay,
  14022. delay = _ref$delay === undefined ? 0 : _ref$delay,
  14023. _ref$duration = _ref.duration,
  14024. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  14025. classCallCheck(this, DialogAnimator);
  14026. return possibleConstructorReturn(this, (DialogAnimator.__proto__ || Object.getPrototypeOf(DialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14027. }
  14028. /**
  14029. * @param {HTMLElement} dialog
  14030. * @param {Function} done
  14031. */
  14032. createClass(DialogAnimator, [{
  14033. key: 'show',
  14034. value: function show(dialog, done) {
  14035. done();
  14036. }
  14037. /**
  14038. * @param {HTMLElement} dialog
  14039. * @param {Function} done
  14040. */
  14041. }, {
  14042. key: 'hide',
  14043. value: function hide(dialog, done) {
  14044. done();
  14045. }
  14046. }]);
  14047. return DialogAnimator;
  14048. }(BaseAnimator);
  14049. /**
  14050. * Android style animator for dialog.
  14051. */
  14052. var AndroidDialogAnimator = function (_DialogAnimator) {
  14053. inherits(AndroidDialogAnimator, _DialogAnimator);
  14054. function AndroidDialogAnimator() {
  14055. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14056. _ref2$timing = _ref2.timing,
  14057. timing = _ref2$timing === undefined ? 'ease-in-out' : _ref2$timing,
  14058. _ref2$delay = _ref2.delay,
  14059. delay = _ref2$delay === undefined ? 0 : _ref2$delay,
  14060. _ref2$duration = _ref2.duration,
  14061. duration = _ref2$duration === undefined ? 0.3 : _ref2$duration;
  14062. classCallCheck(this, AndroidDialogAnimator);
  14063. return possibleConstructorReturn(this, (AndroidDialogAnimator.__proto__ || Object.getPrototypeOf(AndroidDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14064. }
  14065. /**
  14066. * @param {Object} dialog
  14067. * @param {Function} callback
  14068. */
  14069. createClass(AndroidDialogAnimator, [{
  14070. key: 'show',
  14071. value: function show(dialog, callback) {
  14072. callback = callback ? callback : function () {};
  14073. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -60%, 0)', opacity: 0 }, { transform: 'translate3d(-50%, -50%, 0)', opacity: 1 }).queue(function (done) {
  14074. callback();
  14075. done();
  14076. }));
  14077. }
  14078. /**
  14079. * @param {Object} dialog
  14080. * @param {Function} callback
  14081. */
  14082. }, {
  14083. key: 'hide',
  14084. value: function hide(dialog, callback) {
  14085. callback = callback ? callback : function () {};
  14086. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0)', opacity: 1 }, { transform: 'translate3d(-50%, -60%, 0)', opacity: 0 }).queue(function (done) {
  14087. callback();
  14088. done();
  14089. }));
  14090. }
  14091. }]);
  14092. return AndroidDialogAnimator;
  14093. }(DialogAnimator);
  14094. /**
  14095. * iOS style animator for dialog.
  14096. */
  14097. var IOSDialogAnimator = function (_DialogAnimator2) {
  14098. inherits(IOSDialogAnimator, _DialogAnimator2);
  14099. function IOSDialogAnimator() {
  14100. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14101. _ref3$timing = _ref3.timing,
  14102. timing = _ref3$timing === undefined ? 'ease-in-out' : _ref3$timing,
  14103. _ref3$delay = _ref3.delay,
  14104. delay = _ref3$delay === undefined ? 0 : _ref3$delay,
  14105. _ref3$duration = _ref3.duration,
  14106. duration = _ref3$duration === undefined ? 0.2 : _ref3$duration;
  14107. classCallCheck(this, IOSDialogAnimator);
  14108. var _this3 = possibleConstructorReturn(this, (IOSDialogAnimator.__proto__ || Object.getPrototypeOf(IOSDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14109. _this3.bodyHeight = document.body.clientHeight; // avoid Forced Synchronous Layout
  14110. return _this3;
  14111. }
  14112. /**
  14113. * @param {Object} dialog
  14114. * @param {Function} callback
  14115. */
  14116. createClass(IOSDialogAnimator, [{
  14117. key: 'show',
  14118. value: function show(dialog, callback) {
  14119. callback = callback ? callback : function () {};
  14120. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, ' + (this.bodyHeight / 2.0 - 1) + 'px, 0)' }, { transform: 'translate3d(-50%, -50%, 0)' }).queue(function (done) {
  14121. callback();
  14122. done();
  14123. }));
  14124. }
  14125. /**
  14126. * @param {Object} dialog
  14127. * @param {Function} callback
  14128. */
  14129. }, {
  14130. key: 'hide',
  14131. value: function hide(dialog, callback) {
  14132. callback = callback ? callback : function () {};
  14133. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0)' }, { transform: 'translate3d(-50%, ' + (this.bodyHeight / 2.0 - 1) + 'px, 0)' }).queue(function (done) {
  14134. callback();
  14135. done();
  14136. }));
  14137. }
  14138. }]);
  14139. return IOSDialogAnimator;
  14140. }(DialogAnimator);
  14141. /**
  14142. * Slide animator for dialog.
  14143. */
  14144. var SlideDialogAnimator = function (_DialogAnimator3) {
  14145. inherits(SlideDialogAnimator, _DialogAnimator3);
  14146. function SlideDialogAnimator() {
  14147. var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14148. _ref4$timing = _ref4.timing,
  14149. timing = _ref4$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref4$timing,
  14150. _ref4$delay = _ref4.delay,
  14151. delay = _ref4$delay === undefined ? 0 : _ref4$delay,
  14152. _ref4$duration = _ref4.duration,
  14153. duration = _ref4$duration === undefined ? 0.2 : _ref4$duration;
  14154. classCallCheck(this, SlideDialogAnimator);
  14155. var _this4 = possibleConstructorReturn(this, (SlideDialogAnimator.__proto__ || Object.getPrototypeOf(SlideDialogAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  14156. _this4.bodyHeight = document.body.clientHeight; // avoid Forced Synchronous Layout
  14157. return _this4;
  14158. }
  14159. /**
  14160. * @param {Object} dialog
  14161. * @param {Function} callback
  14162. */
  14163. createClass(SlideDialogAnimator, [{
  14164. key: 'show',
  14165. value: function show(dialog, callback) {
  14166. callback = callback ? callback : function () {};
  14167. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 0 }, { opacity: 1 }), Animit(dialog._dialog, this.def).default(
  14168. // FIXME: This should avoid Forced Synchronous Layout. Otherwise, fade animation of mask will be broken.
  14169. { transform: 'translate3d(-50%, ' + (-(this.bodyHeight / 2.0) + 1 - dialog._dialog.clientHeight) + 'px, 0)' }, { transform: 'translate3d(-50%, -50%, 0)' }).queue(function (done) {
  14170. callback();
  14171. done();
  14172. }));
  14173. }
  14174. /**
  14175. * @param {Object} dialog
  14176. * @param {Function} callback
  14177. */
  14178. }, {
  14179. key: 'hide',
  14180. value: function hide(dialog, callback) {
  14181. callback = callback ? callback : function () {};
  14182. Animit.runAll(Animit(dialog._mask, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(dialog._dialog, this.def).default({ transform: 'translate3d(-50%, -50%, 0)' },
  14183. // FIXME: This should avoid Forced Synchronous Layout. Otherwise, fade animation of mask will be broken.
  14184. { transform: 'translate3d(-50%, ' + (-(this.bodyHeight / 2.0) + 1 - dialog._dialog.clientHeight) + 'px, 0)' }).queue(function (done) {
  14185. callback();
  14186. done();
  14187. }));
  14188. }
  14189. }]);
  14190. return SlideDialogAnimator;
  14191. }(DialogAnimator);
  14192. /*
  14193. Copyright 2013-2015 ASIAL CORPORATION
  14194. Licensed under the Apache License, Version 2.0 (the "License");
  14195. you may not use this file except in compliance with the License.
  14196. You may obtain a copy of the License at
  14197. http://www.apache.org/licenses/LICENSE-2.0
  14198. Unless required by applicable law or agreed to in writing, software
  14199. distributed under the License is distributed on an "AS IS" BASIS,
  14200. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14201. See the License for the specific language governing permissions and
  14202. limitations under the License.
  14203. */
  14204. var scheme$6 = {
  14205. '.dialog': 'dialog--*',
  14206. '.dialog-container': 'dialog-container--*',
  14207. '.dialog-mask': 'dialog-mask--*'
  14208. };
  14209. var _animatorDict$2 = {
  14210. 'default': function _default() {
  14211. return platform.isAndroid() ? AndroidDialogAnimator : IOSDialogAnimator;
  14212. },
  14213. 'slide': SlideDialogAnimator,
  14214. 'none': DialogAnimator
  14215. };
  14216. /**
  14217. * @element ons-dialog
  14218. * @category dialog
  14219. * @description
  14220. * [en]
  14221. * Dialog that is displayed on top of current screen. As opposed to the `<ons-alert-dialog>` element, this component can contain any kind of content.
  14222. *
  14223. * To use the element it can either be attached directly to the `<body>` element or dynamically created from a template using the `ons.createDialog(template)` utility function and the `<template>` tag.
  14224. *
  14225. * The dialog is useful for displaying menus, additional information or to ask the user to make a decision.
  14226. *
  14227. * It will automatically be displayed as Material Design when running on an Android device.
  14228. * [/en]
  14229. * [ja][/ja]
  14230. * @modifier material
  14231. * [en]Display a Material Design dialog.[/en]
  14232. * [ja]マテリアルデザインのダイアログを表示します。[/ja]
  14233. * @codepen zxxaGa
  14234. * @tutorial vanilla/Reference/dialog
  14235. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  14236. * @seealso ons-alert-dialog
  14237. * [en]`<ons-alert-dialog>` component[/en]
  14238. * [ja]ons-alert-dialogコンポーネント[/ja]
  14239. * @seealso ons-popover
  14240. * [en]`<ons-popover>` component[/en]
  14241. * [ja]ons-popoverコンポーネント[/ja]
  14242. * @seealso ons-modal
  14243. * [en]`<ons-modal>` component[/en]
  14244. * [ja]ons-modalコンポーネント[/ja]
  14245. * @example
  14246. * <ons-dialog id="dialog">
  14247. * <p>This is a dialog!</p>
  14248. * </ons-dialog>
  14249. *
  14250. * <script>
  14251. * document.getElementById('dialog').show();
  14252. * </script>
  14253. */
  14254. var DialogElement = function (_BaseDialogElement) {
  14255. inherits(DialogElement, _BaseDialogElement);
  14256. /**
  14257. * @event preshow
  14258. * @description
  14259. * [en]Fired just before the dialog is displayed.[/en]
  14260. * [ja]ダイアログが表示される直前に発火します。[/ja]
  14261. * @param {Object} event [en]Event object.[/en]
  14262. * @param {Object} event.dialog
  14263. * [en]Component object.[/en]
  14264. * [ja]コンポーネントのオブジェクト。[/ja]
  14265. * @param {Function} event.cancel
  14266. * [en]Execute this function to stop the dialog from being shown.[/en]
  14267. * [ja]この関数を実行すると、ダイアログの表示がキャンセルされます。[/ja]
  14268. */
  14269. /**
  14270. * @event postshow
  14271. * @description
  14272. * [en]Fired just after the dialog is displayed.[/en]
  14273. * [ja]ダイアログが表示された直後に発火します。[/ja]
  14274. * @param {Object} event [en]Event object.[/en]
  14275. * @param {Object} event.dialog
  14276. * [en]Component object.[/en]
  14277. * [ja]コンポーネントのオブジェクト。[/ja]
  14278. */
  14279. /**
  14280. * @event prehide
  14281. * @description
  14282. * [en]Fired just before the dialog is hidden.[/en]
  14283. * [ja]ダイアログが隠れる直前に発火します。[/ja]
  14284. * @param {Object} event [en]Event object.[/en]
  14285. * @param {Object} event.dialog
  14286. * [en]Component object.[/en]
  14287. * [ja]コンポーネントのオブジェクト。[/ja]
  14288. * @param {Function} event.cancel
  14289. * [en]Execute this function to stop the dialog from being hidden.[/en]
  14290. * [ja]この関数を実行すると、ダイアログの非表示がキャンセルされます。[/ja]
  14291. */
  14292. /**
  14293. * @event posthide
  14294. * @description
  14295. * [en]Fired just after the dialog is hidden.[/en]
  14296. * [ja]ダイアログが隠れた後に発火します。[/ja]
  14297. * @param {Object} event [en]Event object.[/en]
  14298. * @param {Object} event.dialog
  14299. * [en]Component object.[/en]
  14300. * [ja]コンポーネントのオブジェクト。[/ja]
  14301. */
  14302. /**
  14303. * @attribute modifier
  14304. * @type {String}
  14305. * @description
  14306. * [en]The appearance of the dialog.[/en]
  14307. * [ja]ダイアログの表現を指定します。[/ja]
  14308. */
  14309. /**
  14310. * @attribute cancelable
  14311. * @description
  14312. * [en]If this attribute is set the dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  14313. * [ja][/ja]
  14314. */
  14315. /**
  14316. * @attribute disabled
  14317. * @description
  14318. * [en]If this attribute is set the dialog is disabled.[/en]
  14319. * [ja]この属性がある時、ダイアログはdisabled状態になります。[/ja]
  14320. */
  14321. /**
  14322. * @attribute animation
  14323. * @type {String}
  14324. * @default default
  14325. * @description
  14326. * [en]The animation used when showing and hiding the dialog. Can be either `"none"` or `"default"`.[/en]
  14327. * [ja]ダイアログを表示する際のアニメーション名を指定します。"none"もしくは"default"を指定できます。[/ja]
  14328. */
  14329. /**
  14330. * @attribute animation-options
  14331. * @type {Expression}
  14332. * @description
  14333. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  14334. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/ja]
  14335. */
  14336. /**
  14337. * @attribute mask-color
  14338. * @type {String}
  14339. * @default rgba(0, 0, 0, 0.2)
  14340. * @description
  14341. * [en]Color of the background mask. Default is `"rgba(0, 0, 0, 0.2)"`.[/en]
  14342. * [ja]背景のマスクの色を指定します。"rgba(0, 0, 0, 0.2)"がデフォルト値です。[/ja]
  14343. */
  14344. function DialogElement() {
  14345. classCallCheck(this, DialogElement);
  14346. var _this = possibleConstructorReturn(this, (DialogElement.__proto__ || Object.getPrototypeOf(DialogElement)).call(this));
  14347. contentReady(_this, function () {
  14348. return _this._compile();
  14349. });
  14350. return _this;
  14351. }
  14352. createClass(DialogElement, [{
  14353. key: '_updateAnimatorFactory',
  14354. value: function _updateAnimatorFactory() {
  14355. return new AnimatorFactory({
  14356. animators: _animatorDict$2,
  14357. baseClass: DialogAnimator,
  14358. baseClassName: 'DialogAnimator',
  14359. defaultAnimation: this.getAttribute('animation')
  14360. });
  14361. }
  14362. }, {
  14363. key: '_compile',
  14364. value: function _compile() {
  14365. autoStyle.prepare(this);
  14366. this.style.display = 'none';
  14367. this.style.zIndex = 10001;
  14368. /* Expected result:
  14369. * <ons-dialog>
  14370. * <div class="dialog-mask"></div>
  14371. * <div class="dialog">
  14372. * <div class="dialog-container">...</div>
  14373. * </div>
  14374. * </ons-dialog>
  14375. */
  14376. if (!this._dialog) {
  14377. var dialog = document.createElement('div');
  14378. dialog.classList.add('dialog');
  14379. var container = document.createElement('div');
  14380. container.classList.add('dialog-container');
  14381. while (this.firstChild) {
  14382. container.appendChild(this.firstChild);
  14383. }
  14384. dialog.appendChild(container);
  14385. this.appendChild(dialog);
  14386. }
  14387. if (!this._mask) {
  14388. var mask = document.createElement('div');
  14389. mask.classList.add('dialog-mask');
  14390. this.insertBefore(mask, this.firstChild);
  14391. }
  14392. this._dialog.style.zIndex = 20001;
  14393. this._mask.style.zIndex = 20000;
  14394. this.setAttribute('status-bar-fill', '');
  14395. ModifierUtil.initModifier(this, this._scheme);
  14396. }
  14397. /**
  14398. * @property onDeviceBackButton
  14399. * @type {Object}
  14400. * @description
  14401. * [en]Back-button handler.[/en]
  14402. * [ja]バックボタンハンドラ。[/ja]
  14403. */
  14404. /**
  14405. * @method show
  14406. * @signature show([options])
  14407. * @param {Object} [options]
  14408. * [en]Parameter object.[/en]
  14409. * [ja]オプションを指定するオブジェクト。[/ja]
  14410. * @param {String} [options.animation]
  14411. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  14412. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定します。[/ja]
  14413. * @param {String} [options.animationOptions]
  14414. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  14415. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  14416. * @param {Function} [options.callback]
  14417. * [en]This function is called after the dialog has been revealed.[/en]
  14418. * [ja]ダイアログが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  14419. * @description
  14420. * [en]Show the dialog.[/en]
  14421. * [ja]ダイアログを開きます。[/ja]
  14422. * @return {Promise} Resolves to the displayed element.
  14423. */
  14424. /**
  14425. * @method hide
  14426. * @signature hide([options])
  14427. * @param {Object} [options]
  14428. * [en]Parameter object.[/en]
  14429. * [ja]オプションを指定するオブジェクト。[/ja]
  14430. * @param {String} [options.animation]
  14431. * [en]Animation name. Available animations are `"none"` and `"slide"`.[/en]
  14432. * [ja]アニメーション名を指定します。"none", "slide"のいずれかを指定できます。[/ja]
  14433. * @param {String} [options.animationOptions]
  14434. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  14435. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/ja]
  14436. * @param {Function} [options.callback]
  14437. * [en]This functions is called after the dialog has been hidden.[/en]
  14438. * [ja]ダイアログが隠れた後に呼び出される関数オブジェクトを指定します。[/ja]
  14439. * @description
  14440. * [en]Hide the dialog.[/en]
  14441. * [ja]ダイアログを閉じます。[/ja]
  14442. * @return {Promise}
  14443. * [en]Resolves to the hidden element[/en]
  14444. * [ja][/ja]
  14445. */
  14446. /**
  14447. * @property visible
  14448. * @readonly
  14449. * @type {Boolean}
  14450. * @description
  14451. * [en]Whether the dialog is visible or not.[/en]
  14452. * [ja]要素が見える場合に`true`。[/ja]
  14453. */
  14454. /**
  14455. * @property disabled
  14456. * @type {Boolean}
  14457. * @description
  14458. * [en]Whether the dialog is disabled or not.[/en]
  14459. * [ja]無効化されている場合に`true`。[/ja]
  14460. */
  14461. /**
  14462. * @property cancelable
  14463. * @type {Boolean}
  14464. * @description
  14465. * [en]Whether the dialog is cancelable or not. A cancelable dialog can be closed by tapping the background or by pressing the back button on Android devices.[/en]
  14466. * [ja][/ja]
  14467. */
  14468. /**
  14469. * @param {String} name
  14470. * @param {DialogAnimator} Animator
  14471. */
  14472. }, {
  14473. key: '_scheme',
  14474. get: function get$$1() {
  14475. return scheme$6;
  14476. }
  14477. }, {
  14478. key: '_mask',
  14479. get: function get$$1() {
  14480. return util$1.findChild(this, '.dialog-mask');
  14481. }
  14482. }, {
  14483. key: '_dialog',
  14484. get: function get$$1() {
  14485. return util$1.findChild(this, '.dialog');
  14486. }
  14487. }], [{
  14488. key: 'registerAnimator',
  14489. value: function registerAnimator(name, Animator) {
  14490. if (!(Animator.prototype instanceof DialogAnimator)) {
  14491. util$1.throwAnimator('Dialog');
  14492. }
  14493. _animatorDict$2[name] = Animator;
  14494. }
  14495. }, {
  14496. key: 'animators',
  14497. get: function get$$1() {
  14498. return _animatorDict$2;
  14499. }
  14500. }, {
  14501. key: 'DialogAnimator',
  14502. get: function get$$1() {
  14503. return DialogAnimator;
  14504. }
  14505. }]);
  14506. return DialogElement;
  14507. }(BaseDialogElement);
  14508. onsElements.Dialog = DialogElement;
  14509. customElements.define('ons-dialog', DialogElement);
  14510. /*
  14511. Copyright 2013-2015 ASIAL CORPORATION
  14512. Licensed under the Apache License, Version 2.0 (the "License");
  14513. you may not use this file except in compliance with the License.
  14514. You may obtain a copy of the License at
  14515. http://www.apache.org/licenses/LICENSE-2.0
  14516. Unless required by applicable law or agreed to in writing, software
  14517. distributed under the License is distributed on an "AS IS" BASIS,
  14518. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14519. See the License for the specific language governing permissions and
  14520. limitations under the License.
  14521. */
  14522. var defaultClassName$3 = 'fab';
  14523. var scheme$7 = {
  14524. '': 'fab--*',
  14525. '.fab__icon': 'fab--*__icon'
  14526. };
  14527. /**
  14528. * @element ons-fab
  14529. * @category form
  14530. * @description
  14531. * [en]
  14532. * The Floating action button is a circular button defined in the [Material Design specification](https://www.google.com/design/spec/components/buttons-floating-action-button.html). They are often used to promote the primary action of the app.
  14533. *
  14534. * It can be displayed either as an inline element or in one of the corners. Normally it will be positioned in the lower right corner of the screen.
  14535. * [/en]
  14536. * [ja][/ja]
  14537. * @tutorial vanilla/Reference/fab
  14538. * @modifier mini
  14539. * [en]Makes the `ons-fab` smaller.[/en]
  14540. * [ja][/ja]
  14541. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  14542. * @seealso ons-speed-dial
  14543. * [en]The `<ons-speed-dial>` component is a Floating action button that displays a menu when tapped.[/en]
  14544. * [ja][/ja]
  14545. */
  14546. var FabElement = function (_BaseElement) {
  14547. inherits(FabElement, _BaseElement);
  14548. /**
  14549. * @attribute modifier
  14550. * @type {String}
  14551. * @description
  14552. * [en]The appearance of the button.[/en]
  14553. * [ja]ボタンの表現を指定します。[/ja]
  14554. */
  14555. /**
  14556. * @attribute ripple
  14557. * @description
  14558. * [en]If this attribute is defined, the button will have a ripple effect when tapped.[/en]
  14559. * [ja][/ja]
  14560. */
  14561. /**
  14562. * @attribute position
  14563. * @type {String}
  14564. * @description
  14565. * [en]The position of the button. Should be a string like `"bottom right"` or `"top left"`. If this attribute is not defined it will be displayed as an inline element.[/en]
  14566. * [ja][/ja]
  14567. */
  14568. /**
  14569. * @attribute disabled
  14570. * @description
  14571. * [en]Specify if button should be disabled.[/en]
  14572. * [ja]ボタンを無効化する場合は指定します。[/ja]
  14573. */
  14574. function FabElement() {
  14575. classCallCheck(this, FabElement);
  14576. // The following statements can be executed before contentReady
  14577. // since these do not access the children
  14578. var _this = possibleConstructorReturn(this, (FabElement.__proto__ || Object.getPrototypeOf(FabElement)).call(this));
  14579. _this._hide();
  14580. _this.classList.add(defaultClassName$3);
  14581. contentReady(_this, function () {
  14582. _this._compile();
  14583. });
  14584. return _this;
  14585. }
  14586. createClass(FabElement, [{
  14587. key: '_compile',
  14588. value: function _compile() {
  14589. autoStyle.prepare(this);
  14590. if (!util$1.findChild(this, '.fab__icon')) {
  14591. var content = document.createElement('span');
  14592. content.classList.add('fab__icon');
  14593. util$1.arrayFrom(this.childNodes).forEach(function (element) {
  14594. if (!element.tagName || element.tagName.toLowerCase() !== 'ons-ripple') {
  14595. content.appendChild(element);
  14596. }
  14597. });
  14598. this.appendChild(content);
  14599. }
  14600. this._updateRipple();
  14601. ModifierUtil.initModifier(this, scheme$7);
  14602. this._updatePosition();
  14603. }
  14604. }, {
  14605. key: 'connectedCallback',
  14606. value: function connectedCallback() {
  14607. var _this2 = this;
  14608. setImmediate(function () {
  14609. return _this2._show();
  14610. });
  14611. }
  14612. }, {
  14613. key: 'attributeChangedCallback',
  14614. value: function attributeChangedCallback(name, last, current) {
  14615. switch (name) {
  14616. case 'class':
  14617. util$1.restoreClass(this, defaultClassName$3, scheme$7);
  14618. break;
  14619. case 'modifier':
  14620. ModifierUtil.onModifierChanged(last, current, this, scheme$7);
  14621. break;
  14622. case 'ripple':
  14623. this._updateRipple();
  14624. break;
  14625. case 'position':
  14626. this._updatePosition();
  14627. break;
  14628. }
  14629. }
  14630. }, {
  14631. key: '_show',
  14632. value: function _show() {
  14633. if (!this._manuallyHidden) {
  14634. // if user has not called ons-fab.hide()
  14635. this._toggle(true);
  14636. }
  14637. }
  14638. }, {
  14639. key: '_hide',
  14640. value: function _hide() {
  14641. var _this3 = this;
  14642. setImmediate(function () {
  14643. return _this3._toggle(false);
  14644. });
  14645. }
  14646. }, {
  14647. key: '_updateRipple',
  14648. value: function _updateRipple() {
  14649. util$1.updateRipple(this);
  14650. }
  14651. }, {
  14652. key: '_updatePosition',
  14653. value: function _updatePosition() {
  14654. var position = this.getAttribute('position');
  14655. this.classList.remove('fab--top__left', 'fab--bottom__right', 'fab--bottom__left', 'fab--top__right', 'fab--top__center', 'fab--bottom__center');
  14656. switch (position) {
  14657. case 'top right':
  14658. case 'right top':
  14659. this.classList.add('fab--top__right');
  14660. break;
  14661. case 'top left':
  14662. case 'left top':
  14663. this.classList.add('fab--top__left');
  14664. break;
  14665. case 'bottom right':
  14666. case 'right bottom':
  14667. this.classList.add('fab--bottom__right');
  14668. break;
  14669. case 'bottom left':
  14670. case 'left bottom':
  14671. this.classList.add('fab--bottom__left');
  14672. break;
  14673. case 'center top':
  14674. case 'top center':
  14675. this.classList.add('fab--top__center');
  14676. break;
  14677. case 'center bottom':
  14678. case 'bottom center':
  14679. this.classList.add('fab--bottom__center');
  14680. break;
  14681. default:
  14682. break;
  14683. }
  14684. }
  14685. /**
  14686. * @method show
  14687. * @signature show()
  14688. * @description
  14689. * [en]Show the floating action button.[/en]
  14690. * [ja][/ja]
  14691. */
  14692. }, {
  14693. key: 'show',
  14694. value: function show() {
  14695. this.toggle(true);
  14696. }
  14697. /**
  14698. * @method hide
  14699. * @signature hide()
  14700. * @description
  14701. * [en]Hide the floating action button.[/en]
  14702. * [ja][/ja]
  14703. */
  14704. }, {
  14705. key: 'hide',
  14706. value: function hide() {
  14707. this.toggle(false);
  14708. }
  14709. /**
  14710. * @method toggle
  14711. * @signature toggle()
  14712. * @description
  14713. * [en]Toggle the visibility of the button.[/en]
  14714. * [ja][/ja]
  14715. */
  14716. }, {
  14717. key: 'toggle',
  14718. value: function toggle() {
  14719. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.visible;
  14720. this._manuallyHidden = !action;
  14721. this._toggle(action);
  14722. }
  14723. }, {
  14724. key: '_toggle',
  14725. value: function _toggle() {
  14726. var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.visible;
  14727. var isBottom = (this.getAttribute('position') || '').indexOf('bottom') >= 0;
  14728. var translate = isBottom ? 'translate3d(0px, -' + (util$1.globals.fabOffset || 0) + 'px, 0px)' : '';
  14729. styler(this, { transform: translate + ' scale(' + Number(action) + ')' });
  14730. }
  14731. /**
  14732. * @property disabled
  14733. * @type {Boolean}
  14734. * @description
  14735. * [en]Whether the element is disabled or not.[/en]
  14736. * [ja]無効化されている場合に`true`。[/ja]
  14737. */
  14738. }, {
  14739. key: 'disabled',
  14740. set: function set$$1(value) {
  14741. return util$1.toggleAttribute(this, 'disabled', value);
  14742. },
  14743. get: function get$$1() {
  14744. return this.hasAttribute('disabled');
  14745. }
  14746. /**
  14747. * @property visible
  14748. * @readonly
  14749. * @type {Boolean}
  14750. * @description
  14751. * [en]Whether the element is visible or not.[/en]
  14752. * [ja]要素が見える場合に`true`。[/ja]
  14753. */
  14754. }, {
  14755. key: 'visible',
  14756. get: function get$$1() {
  14757. return this.style.transform.indexOf('scale(0)') === -1 && this.style.display !== 'none';
  14758. }
  14759. }], [{
  14760. key: 'observedAttributes',
  14761. get: function get$$1() {
  14762. return ['modifier', 'ripple', 'position', 'class'];
  14763. }
  14764. }]);
  14765. return FabElement;
  14766. }(BaseElement);
  14767. onsElements.Fab = FabElement;
  14768. customElements.define('ons-fab', FabElement);
  14769. /*
  14770. Copyright 2013-2015 ASIAL CORPORATION
  14771. Licensed under the Apache License, Version 2.0 (the "License");
  14772. you may not use this file except in compliance with the License.
  14773. You may obtain a copy of the License at
  14774. http://www.apache.org/licenses/LICENSE-2.0
  14775. Unless required by applicable law or agreed to in writing, software
  14776. distributed under the License is distributed on an "AS IS" BASIS,
  14777. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14778. See the License for the specific language governing permissions and
  14779. limitations under the License.
  14780. */
  14781. /**
  14782. * @element ons-gesture-detector
  14783. * @category gesture
  14784. * @description
  14785. * [en]
  14786. * Component to detect finger gestures within the wrapped element. Following gestures are supported:
  14787. * - Drag gestures: `drag`, `dragleft`, `dragright`, `dragup`, `dragdown`
  14788. * - Hold gestures: `hold`, `release`
  14789. * - Swipe gestures: `swipe`, `swipeleft`, `swiperight`, `swipeup`, `swipedown`
  14790. * - Tap gestures: `tap`, `doubletap`
  14791. * - Pinch gestures: `pinch`, `pinchin`, `pinchout`
  14792. * - Other gestures: `touch`, `transform`, `rotate`
  14793. * [/en]
  14794. * [ja]要素内のジェスチャー操作を検知します。詳しくはガイドを参照してください。[/ja]
  14795. * @guide features.html#gesture-detection
  14796. * [en]Detecting finger gestures[/en]
  14797. * [ja]ジェスチャー操作の検知[/ja]
  14798. * @example
  14799. * <ons-gesture-detector>
  14800. * <div id="detect-area" style="width: 100px; height: 100px;">
  14801. * Swipe Here
  14802. * </div>
  14803. * </ons-gesture-detector>
  14804. *
  14805. * <script>
  14806. * document.addEventListener('swipeleft', function(event) {
  14807. * if (event.target.matches('#detect-area')) {
  14808. * console.log('Swipe left is detected.');
  14809. * }
  14810. * });
  14811. * </script>
  14812. */
  14813. var GestureDetectorElement = function (_BaseElement) {
  14814. inherits(GestureDetectorElement, _BaseElement);
  14815. function GestureDetectorElement() {
  14816. classCallCheck(this, GestureDetectorElement);
  14817. var _this = possibleConstructorReturn(this, (GestureDetectorElement.__proto__ || Object.getPrototypeOf(GestureDetectorElement)).call(this));
  14818. _this._gestureDetector = new GestureDetector(_this, { passive: true });
  14819. return _this;
  14820. }
  14821. return GestureDetectorElement;
  14822. }(BaseElement);
  14823. onsElements.GestureDetector = GestureDetectorElement;
  14824. customElements.define('ons-gesture-detector', GestureDetectorElement);
  14825. /*
  14826. Copyright 2013-2015 ASIAL CORPORATION
  14827. Licensed under the Apache License, Version 2.0 (the "License");
  14828. you may not use this file except in compliance with the License.
  14829. You may obtain a copy of the License at
  14830. http://www.apache.org/licenses/LICENSE-2.0
  14831. Unless required by applicable law or agreed to in writing, software
  14832. distributed under the License is distributed on an "AS IS" BASIS,
  14833. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14834. See the License for the specific language governing permissions and
  14835. limitations under the License.
  14836. */
  14837. var autoPrefix = 'fa'; // FIXME: To be removed in v3
  14838. /**
  14839. * @element ons-icon
  14840. * @category visual
  14841. * @description
  14842. * [en]
  14843. * Displays an icon. The following icon suites are available:
  14844. *
  14845. * * [Font Awesome](https://fortawesome.github.io/Font-Awesome/)
  14846. * * [Ionicons](http://ionicons.com/)
  14847. * * [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font/)
  14848. * [/en]
  14849. * [ja][/ja]
  14850. * @codepen xAhvg
  14851. * @tutorial vanilla/Reference/icon
  14852. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja][/ja]
  14853. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  14854. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  14855. * @example
  14856. * <ons-icon
  14857. * icon="md-car"
  14858. * size="20px"
  14859. * style="color: red">
  14860. * </ons-icon>
  14861. *
  14862. * <ons-button>
  14863. * <ons-icon icon="md-car"></ons-icon>
  14864. * Car
  14865. * </ons-button>
  14866. */
  14867. var IconElement = function (_BaseElement) {
  14868. inherits(IconElement, _BaseElement);
  14869. /**
  14870. * @attribute icon
  14871. * @type {String}
  14872. * @description
  14873. * [en]
  14874. * The icon name. `"md-"` prefix for Material Icons, `"fa-"` for Font Awesome and `"ion-"` prefix for Ionicons.
  14875. *
  14876. * See all available icons on the element description (at the top).
  14877. *
  14878. * Icons can also be styled based on modifier presence. Add comma-separated icons with `"modifierName:"` prefix.
  14879. *
  14880. * The code `<ons-icon icon="ion-edit, material:md-edit"></ons-icon>` will display `"md-edit"` for Material Design and `"ion-edit"` as the default icon.
  14881. *
  14882. * `fa-` prefix is added automatically if none is provided. Check [See also](#seealso) section for more information.
  14883. * [/en]
  14884. * [ja][/ja]
  14885. */
  14886. /**
  14887. * @attribute size
  14888. * @type {String}
  14889. * @description
  14890. * [en]
  14891. * The sizes of the icon. Valid values are lg, 2x, 3x, 4x, 5x, or in the size in pixels.
  14892. * Icons can also be styled based on modifier presence. Add comma-separated icons with `"modifierName:"` prefix.
  14893. *
  14894. * The code:
  14895. *
  14896. * ```
  14897. * <ons-icon
  14898. * icon="ion-edit"
  14899. * size="32px, material:24px">
  14900. * </ons-icon>
  14901. * ```
  14902. *
  14903. * will render as a `24px` icon if the `"material"` modifier is present and `32px` otherwise.
  14904. * [/en]
  14905. * [ja][/ja]
  14906. */
  14907. /**
  14908. * @attribute rotate
  14909. * @type {Number}
  14910. * @description
  14911. * [en]Number of degrees to rotate the icon. Valid values are 90, 180 and 270.[/en]
  14912. * [ja]アイコンを回転して表示します。90, 180, 270から指定できます。[/ja]
  14913. */
  14914. /**
  14915. * @attribute fixed-width
  14916. * @type {Boolean}
  14917. * @default false
  14918. * @description
  14919. * [en]When used in a list, you want the icons to have the same width so that they align vertically by defining this attribute.[/en]
  14920. * [ja][/ja]
  14921. */
  14922. /**
  14923. * @attribute spin
  14924. * @description
  14925. * [en]Specify whether the icon should be spinning.[/en]
  14926. * [ja]アイコンを回転するかどうかを指定します。[/ja]
  14927. */
  14928. function IconElement() {
  14929. classCallCheck(this, IconElement);
  14930. var _this = possibleConstructorReturn(this, (IconElement.__proto__ || Object.getPrototypeOf(IconElement)).call(this));
  14931. contentReady(_this, function () {
  14932. _this._compile();
  14933. });
  14934. return _this;
  14935. }
  14936. createClass(IconElement, [{
  14937. key: 'attributeChangedCallback',
  14938. value: function attributeChangedCallback(name, last, current) {
  14939. this._cleanClassAttribute(name === 'icon' ? last : this.getAttribute('icon'), name === 'modifier' ? last : undefined);
  14940. this._update();
  14941. }
  14942. }, {
  14943. key: '_compile',
  14944. value: function _compile() {
  14945. autoStyle.prepare(this);
  14946. this._update();
  14947. }
  14948. }, {
  14949. key: '_update',
  14950. value: function _update() {
  14951. var _this2 = this;
  14952. var _buildClassAndStyle2 = this._buildClassAndStyle(this._parseAttr('icon'), this._parseAttr('size')),
  14953. classList = _buildClassAndStyle2.classList,
  14954. style = _buildClassAndStyle2.style;
  14955. util$1.extend(this.style, style);
  14956. classList.forEach(function (className) {
  14957. return _this2.classList.add(className);
  14958. });
  14959. }
  14960. }, {
  14961. key: '_parseAttr',
  14962. value: function _parseAttr(attrName) {
  14963. var modifier = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getAttribute('modifier') || '';
  14964. var attr = this.getAttribute(attrName) || attrName || '';
  14965. var parts = attr.split(/\s*,\s*/);
  14966. var def = parts[0];
  14967. var md = parts[1];
  14968. md = (md || '').split(/\s*:\s*/);
  14969. return (modifier && RegExp('(^|\\s+)' + md[0] + '($|\\s+)', 'i').test(modifier) ? md[1] : def) || '';
  14970. }
  14971. /**
  14972. * Remove unneeded class value.
  14973. */
  14974. }, {
  14975. key: '_cleanClassAttribute',
  14976. value: function _cleanClassAttribute(lastIcon, lastModifier) {
  14977. var _this3 = this;
  14978. var _prefixIcon2 = this._prefixIcon(this._parseAttr(lastIcon, lastModifier)),
  14979. className = _prefixIcon2.className,
  14980. prefix = _prefixIcon2.prefix;
  14981. var customPrefixRE = className !== prefix ? '|' + prefix + '$|' + prefix + '-' : '|' + className + '$' || '';
  14982. var re = new RegExp('^(fa$|fa-|ion-|zmdi$|zmdi-|ons-icon--' + customPrefixRE + ')');
  14983. util$1.arrayFrom(this.classList).filter(function (className) {
  14984. return re.test(className);
  14985. }).forEach(function (className) {
  14986. return _this3.classList.remove(className);
  14987. });
  14988. }
  14989. }, {
  14990. key: '_prefixIcon',
  14991. value: function _prefixIcon(iconName) {
  14992. var className = autoPrefix + (autoPrefix ? '-' : '') + iconName;
  14993. return { className: className, prefix: className.split('-')[0] };
  14994. }
  14995. }, {
  14996. key: '_buildClassAndStyle',
  14997. value: function _buildClassAndStyle(iconName, size) {
  14998. var classList = ['ons-icon'];
  14999. var style = {};
  15000. // Icon
  15001. if (iconName.indexOf('ion-') === 0) {
  15002. classList.push(iconName);
  15003. classList.push('ons-icon--ion');
  15004. } else if (iconName.indexOf('fa-') === 0) {
  15005. classList.push(iconName);
  15006. // default icon style to Font Awesome Solid if icon style is not specified already
  15007. if (!(this.classList.contains('far') || this.classList.contains('fab') || this.classList.contains('fal'))) {
  15008. classList.push('fa');
  15009. }
  15010. } else if (iconName.indexOf('md-') === 0) {
  15011. classList.push('zmdi');
  15012. classList.push('zmdi-' + iconName.split(/-(.+)?/)[1]);
  15013. } else {
  15014. var _prefixIcon3 = this._prefixIcon(iconName),
  15015. className = _prefixIcon3.className,
  15016. prefix = _prefixIcon3.prefix;
  15017. prefix && classList.push(prefix);
  15018. className && classList.push(className);
  15019. }
  15020. // Size
  15021. if (size.match(/^[1-5]x|lg$/)) {
  15022. classList.push('ons-icon--' + size);
  15023. this.style.removeProperty('font-size');
  15024. } else {
  15025. style.fontSize = size;
  15026. }
  15027. return {
  15028. classList: classList,
  15029. style: style
  15030. };
  15031. }
  15032. }], [{
  15033. key: 'setAutoPrefix',
  15034. value: function setAutoPrefix(prefix) {
  15035. autoPrefix = prefix ? typeof prefix === 'string' && prefix || 'fa' : '';
  15036. }
  15037. }, {
  15038. key: 'observedAttributes',
  15039. get: function get$$1() {
  15040. return ['icon', 'size', 'modifier', 'class'];
  15041. }
  15042. }]);
  15043. return IconElement;
  15044. }(BaseElement);
  15045. onsElements.Icon = IconElement;
  15046. customElements.define('ons-icon', IconElement);
  15047. /*
  15048. Copyright 2013-2015 ASIAL CORPORATION
  15049. Licensed under the Apache License, Version 2.0 (the "License");
  15050. you may not use this file except in compliance with the License.
  15051. You may obtain a copy of the License at
  15052. http://www.apache.org/licenses/LICENSE-2.0
  15053. Unless required by applicable law or agreed to in writing, software
  15054. distributed under the License is distributed on an "AS IS" BASIS,
  15055. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15056. See the License for the specific language governing permissions and
  15057. limitations under the License.
  15058. */
  15059. var LazyRepeatDelegate = function () {
  15060. function LazyRepeatDelegate(userDelegate) {
  15061. var templateElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  15062. classCallCheck(this, LazyRepeatDelegate);
  15063. if ((typeof userDelegate === 'undefined' ? 'undefined' : _typeof(userDelegate)) !== 'object' || userDelegate === null) {
  15064. util$1.throw('"delegate" parameter must be an object');
  15065. }
  15066. this._userDelegate = userDelegate;
  15067. if (!(templateElement instanceof Element) && templateElement !== null) {
  15068. util$1.throw('"templateElement" parameter must be an instance of Element or null');
  15069. }
  15070. this._templateElement = templateElement;
  15071. }
  15072. createClass(LazyRepeatDelegate, [{
  15073. key: 'hasRenderFunction',
  15074. /**
  15075. * @return {Boolean}
  15076. */
  15077. value: function hasRenderFunction() {
  15078. return this._userDelegate._render instanceof Function;
  15079. }
  15080. /**
  15081. * @return {void}
  15082. */
  15083. }, {
  15084. key: '_render',
  15085. value: function _render() {
  15086. this._userDelegate._render.apply(this._userDelegate, arguments);
  15087. }
  15088. /**
  15089. * @param {Number} index
  15090. * @param {Function} done A function that take item object as parameter.
  15091. */
  15092. }, {
  15093. key: 'loadItemElement',
  15094. value: function loadItemElement(index, done) {
  15095. if (this._userDelegate.loadItemElement instanceof Function) {
  15096. this._userDelegate.loadItemElement(index, done);
  15097. } else {
  15098. var element = this._userDelegate.createItemContent(index, this._templateElement);
  15099. if (!(element instanceof Element)) {
  15100. util$1.throw('"createItemContent" must return an instance of Element');
  15101. }
  15102. done({ element: element });
  15103. }
  15104. }
  15105. /**
  15106. * @return {Number}
  15107. */
  15108. }, {
  15109. key: 'countItems',
  15110. value: function countItems() {
  15111. var count = this._userDelegate.countItems();
  15112. if (typeof count !== 'number') {
  15113. util$1.throw('"countItems" must return a number');
  15114. }
  15115. return count;
  15116. }
  15117. /**
  15118. * @param {Number} index
  15119. * @param {Object} item
  15120. * @param {Element} item.element
  15121. */
  15122. }, {
  15123. key: 'updateItem',
  15124. value: function updateItem(index, item) {
  15125. if (this._userDelegate.updateItemContent instanceof Function) {
  15126. this._userDelegate.updateItemContent(index, item);
  15127. }
  15128. }
  15129. /**
  15130. * @return {Number}
  15131. */
  15132. }, {
  15133. key: 'calculateItemHeight',
  15134. value: function calculateItemHeight(index) {
  15135. if (this._userDelegate.calculateItemHeight instanceof Function) {
  15136. var height = this._userDelegate.calculateItemHeight(index);
  15137. if (typeof height !== 'number') {
  15138. util$1.throw('"calculateItemHeight" must return a number');
  15139. }
  15140. return height;
  15141. }
  15142. return 0;
  15143. }
  15144. /**
  15145. * @param {Number} index
  15146. * @param {Object} item
  15147. */
  15148. }, {
  15149. key: 'destroyItem',
  15150. value: function destroyItem(index, item) {
  15151. if (this._userDelegate.destroyItem instanceof Function) {
  15152. this._userDelegate.destroyItem(index, item);
  15153. }
  15154. }
  15155. /**
  15156. * @return {void}
  15157. */
  15158. }, {
  15159. key: 'destroy',
  15160. value: function destroy() {
  15161. if (this._userDelegate.destroy instanceof Function) {
  15162. this._userDelegate.destroy();
  15163. }
  15164. this._userDelegate = this._templateElement = null;
  15165. }
  15166. }, {
  15167. key: 'itemHeight',
  15168. get: function get$$1() {
  15169. return this._userDelegate.itemHeight;
  15170. }
  15171. }]);
  15172. return LazyRepeatDelegate;
  15173. }();
  15174. /**
  15175. * This class provide core functions for ons-lazy-repeat.
  15176. */
  15177. var LazyRepeatProvider = function () {
  15178. /**
  15179. * @param {Element} wrapperElement
  15180. * @param {LazyRepeatDelegate} delegate
  15181. */
  15182. function LazyRepeatProvider(wrapperElement, delegate) {
  15183. classCallCheck(this, LazyRepeatProvider);
  15184. if (!(delegate instanceof LazyRepeatDelegate)) {
  15185. util$1.throw('"delegate" parameter must be an instance of LazyRepeatDelegate');
  15186. }
  15187. this._wrapperElement = wrapperElement;
  15188. this._delegate = delegate;
  15189. this._insertIndex = this._wrapperElement.children[0] && this._wrapperElement.children[0].tagName === 'ONS-LAZY-REPEAT' ? 1 : 0;
  15190. if (wrapperElement.tagName.toLowerCase() === 'ons-list') {
  15191. wrapperElement.classList.add('lazy-list');
  15192. }
  15193. this._pageContent = this._findPageContentElement(wrapperElement);
  15194. if (!this._pageContent) {
  15195. util$1.throw('LazyRepeat must be descendant of a Page element');
  15196. }
  15197. this.lastScrollTop = this._pageContent.scrollTop;
  15198. this.padding = 0;
  15199. this._topPositions = [0];
  15200. this._renderedItems = {};
  15201. if (!this._delegate.itemHeight && !this._delegate.calculateItemHeight(0)) {
  15202. this._unknownItemHeight = true;
  15203. }
  15204. this._addEventListeners();
  15205. this._onChange();
  15206. }
  15207. createClass(LazyRepeatProvider, [{
  15208. key: '_findPageContentElement',
  15209. value: function _findPageContentElement(wrapperElement) {
  15210. var pageContent = util$1.findParent(wrapperElement, '.page__content');
  15211. if (pageContent) {
  15212. return pageContent;
  15213. }
  15214. var page = util$1.findParent(wrapperElement, 'ons-page');
  15215. if (page) {
  15216. var content = util$1.findChild(page, '.content');
  15217. if (content) {
  15218. return content;
  15219. }
  15220. }
  15221. return null;
  15222. }
  15223. }, {
  15224. key: '_checkItemHeight',
  15225. value: function _checkItemHeight(callback) {
  15226. var _this = this;
  15227. this._delegate.loadItemElement(0, function (item) {
  15228. if (!_this._unknownItemHeight) {
  15229. util$1.throw('Invalid state');
  15230. }
  15231. _this._wrapperElement.appendChild(item.element);
  15232. var done = function done() {
  15233. _this._delegate.destroyItem(0, item);
  15234. item.element && item.element.remove();
  15235. delete _this._unknownItemHeight;
  15236. callback();
  15237. };
  15238. _this._itemHeight = item.element.offsetHeight;
  15239. if (_this._itemHeight > 0) {
  15240. done();
  15241. return;
  15242. }
  15243. // retry to measure offset height
  15244. // dirty fix for angular2 directive
  15245. _this._wrapperElement.style.visibility = 'hidden';
  15246. item.element.style.visibility = 'hidden';
  15247. setImmediate(function () {
  15248. _this._itemHeight = item.element.offsetHeight;
  15249. if (_this._itemHeight == 0) {
  15250. util$1.throw('Invalid state: "itemHeight" must be greater than zero');
  15251. }
  15252. _this._wrapperElement.style.visibility = '';
  15253. done();
  15254. });
  15255. });
  15256. }
  15257. }, {
  15258. key: '_countItems',
  15259. value: function _countItems() {
  15260. return this._delegate.countItems();
  15261. }
  15262. }, {
  15263. key: '_getItemHeight',
  15264. value: function _getItemHeight(i) {
  15265. // Item is rendered
  15266. if (this._renderedItems.hasOwnProperty(i)) {
  15267. if (!this._renderedItems[i].hasOwnProperty('height')) {
  15268. this._renderedItems[i].height = this._renderedItems[i].element.offsetHeight;
  15269. }
  15270. return this._renderedItems[i].height;
  15271. }
  15272. // Item is not rendered, scroll up
  15273. if (this._topPositions[i + 1] && this._topPositions[i]) {
  15274. return this._topPositions[i + 1] - this._topPositions[i];
  15275. }
  15276. // Item is not rendered, scroll down
  15277. return this.staticItemHeight || this._delegate.calculateItemHeight(i);
  15278. }
  15279. }, {
  15280. key: '_calculateRenderedHeight',
  15281. value: function _calculateRenderedHeight() {
  15282. var _this2 = this;
  15283. return Object.keys(this._renderedItems).reduce(function (a, b) {
  15284. return a + _this2._getItemHeight(+b);
  15285. }, 0);
  15286. }
  15287. }, {
  15288. key: '_onChange',
  15289. value: function _onChange() {
  15290. this._render();
  15291. }
  15292. }, {
  15293. key: '_lastItemRendered',
  15294. value: function _lastItemRendered() {
  15295. return Math.max.apply(Math, toConsumableArray(Object.keys(this._renderedItems)));
  15296. }
  15297. }, {
  15298. key: '_firstItemRendered',
  15299. value: function _firstItemRendered() {
  15300. return Math.min.apply(Math, toConsumableArray(Object.keys(this._renderedItems)));
  15301. }
  15302. }, {
  15303. key: 'refresh',
  15304. value: function refresh() {
  15305. var forceRender = { forceScrollDown: true };
  15306. var firstItemIndex = this._firstItemRendered();
  15307. if (util$1.isInteger(firstItemIndex)) {
  15308. this._wrapperElement.style.height = this._topPositions[firstItemIndex] + this._calculateRenderedHeight() + 'px';
  15309. this.padding = this._topPositions[firstItemIndex];
  15310. forceRender.forceFirstIndex = firstItemIndex;
  15311. }
  15312. this._removeAllElements();
  15313. this._render(forceRender);
  15314. this._wrapperElement.style.height = 'inherit';
  15315. }
  15316. }, {
  15317. key: '_render',
  15318. value: function _render() {
  15319. var _this3 = this;
  15320. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15321. _ref$forceScrollDown = _ref.forceScrollDown,
  15322. forceScrollDown = _ref$forceScrollDown === undefined ? false : _ref$forceScrollDown,
  15323. forceFirstIndex = _ref.forceFirstIndex,
  15324. forceLastIndex = _ref.forceLastIndex;
  15325. if (this._unknownItemHeight) {
  15326. return this._checkItemHeight(this._render.bind(this, arguments[0]));
  15327. }
  15328. var isScrollUp = !forceScrollDown && this.lastScrollTop > this._pageContent.scrollTop;
  15329. this.lastScrollTop = this._pageContent.scrollTop;
  15330. var keep = {};
  15331. var offset = this._wrapperElement.getBoundingClientRect().top;
  15332. var limit = 4 * window.innerHeight - offset;
  15333. var count = this._countItems();
  15334. var start = forceFirstIndex || Math.max(0, this._calculateStartIndex(offset) - 30); // Recalculate for 0 or undefined
  15335. var i = start;
  15336. for (var top = this._topPositions[i]; i < count && top < limit; i++) {
  15337. if (i >= this._topPositions.length) {
  15338. // perf optimization
  15339. this._topPositions.length += 100;
  15340. }
  15341. this._topPositions[i] = top;
  15342. top += this._getItemHeight(i);
  15343. }
  15344. if (this._delegate.hasRenderFunction && this._delegate.hasRenderFunction()) {
  15345. return this._delegate._render(start, i, function () {
  15346. _this3.padding = _this3._topPositions[start];
  15347. });
  15348. }
  15349. if (isScrollUp) {
  15350. for (var j = i - 1; j >= start; j--) {
  15351. keep[j] = true;
  15352. this._renderElement(j, isScrollUp);
  15353. }
  15354. } else {
  15355. var lastIndex = forceLastIndex || Math.max.apply(Math, [i - 1].concat(toConsumableArray(Object.keys(this._renderedItems)))); // Recalculate for 0 or undefined
  15356. for (var _j = start; _j <= lastIndex; _j++) {
  15357. keep[_j] = true;
  15358. this._renderElement(_j, isScrollUp);
  15359. }
  15360. }
  15361. Object.keys(this._renderedItems).forEach(function (key) {
  15362. return keep[key] || _this3._removeElement(key, isScrollUp);
  15363. });
  15364. }
  15365. /**
  15366. * @param {Number} index
  15367. * @param {Boolean} isScrollUp
  15368. */
  15369. }, {
  15370. key: '_renderElement',
  15371. value: function _renderElement(index, isScrollUp) {
  15372. var _this4 = this;
  15373. var item = this._renderedItems[index];
  15374. if (item) {
  15375. this._delegate.updateItem(index, item); // update if it exists
  15376. return;
  15377. }
  15378. this._delegate.loadItemElement(index, function (item) {
  15379. if (isScrollUp) {
  15380. _this4._wrapperElement.insertBefore(item.element, _this4._wrapperElement.children[_this4._insertIndex]);
  15381. _this4.padding = _this4._topPositions[index];
  15382. item.height = _this4._topPositions[index + 1] - _this4._topPositions[index];
  15383. } else {
  15384. _this4._wrapperElement.appendChild(item.element);
  15385. }
  15386. _this4._renderedItems[index] = item;
  15387. });
  15388. }
  15389. /**
  15390. * @param {Number} index
  15391. * @param {Boolean} isScrollUp
  15392. */
  15393. }, {
  15394. key: '_removeElement',
  15395. value: function _removeElement(index) {
  15396. var isScrollUp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  15397. index = +index;
  15398. var item = this._renderedItems[index];
  15399. this._delegate.destroyItem(index, item);
  15400. if (isScrollUp) {
  15401. this._topPositions[index + 1] = undefined;
  15402. } else {
  15403. this.padding = this.padding + this._getItemHeight(index);
  15404. }
  15405. if (item.element.parentElement) {
  15406. item.element.parentElement.removeChild(item.element);
  15407. }
  15408. delete this._renderedItems[index];
  15409. }
  15410. }, {
  15411. key: '_removeAllElements',
  15412. value: function _removeAllElements() {
  15413. var _this5 = this;
  15414. Object.keys(this._renderedItems).forEach(function (key) {
  15415. return _this5._removeElement(key);
  15416. });
  15417. }
  15418. }, {
  15419. key: '_recalculateTopPositions',
  15420. value: function _recalculateTopPositions(start, end) {
  15421. for (var i = start; i <= end; i++) {
  15422. this._topPositions[i + 1] = this._topPositions[i] + this._getItemHeight(i);
  15423. }
  15424. }
  15425. }, {
  15426. key: '_calculateStartIndex',
  15427. value: function _calculateStartIndex(current) {
  15428. var firstItemIndex = this._firstItemRendered();
  15429. var lastItemIndex = this._lastItemRendered();
  15430. // Fix for Safari scroll and Angular 2
  15431. this._recalculateTopPositions(firstItemIndex, lastItemIndex);
  15432. var start = 0;
  15433. var end = this._countItems() - 1;
  15434. // Binary search for index at top of screen so we can speed up rendering.
  15435. for (;;) {
  15436. var middle = Math.floor((start + end) / 2);
  15437. var value = current + this._topPositions[middle];
  15438. if (end < start) {
  15439. return 0;
  15440. } else if (value <= 0 && value + this._getItemHeight(middle) > 0) {
  15441. return middle;
  15442. } else if (isNaN(value) || value >= 0) {
  15443. end = middle - 1;
  15444. } else {
  15445. start = middle + 1;
  15446. }
  15447. }
  15448. }
  15449. }, {
  15450. key: '_debounce',
  15451. value: function _debounce(func, wait, immediate) {
  15452. var timeout = void 0;
  15453. return function () {
  15454. var _this6 = this,
  15455. _arguments = arguments;
  15456. var callNow = immediate && !timeout;
  15457. clearTimeout(timeout);
  15458. if (callNow) {
  15459. func.apply(this, arguments);
  15460. } else {
  15461. timeout = setTimeout(function () {
  15462. timeout = null;
  15463. func.apply(_this6, _arguments);
  15464. }, wait);
  15465. }
  15466. };
  15467. }
  15468. }, {
  15469. key: '_doubleFireOnTouchend',
  15470. value: function _doubleFireOnTouchend() {
  15471. this._render();
  15472. this._debounce(this._render.bind(this), 100);
  15473. }
  15474. }, {
  15475. key: '_addEventListeners',
  15476. value: function _addEventListeners() {
  15477. util$1.bindListeners(this, ['_onChange', '_doubleFireOnTouchend']);
  15478. if (platform.isIOS()) {
  15479. this._boundOnChange = this._debounce(this._boundOnChange, 30);
  15480. }
  15481. this._pageContent.addEventListener('scroll', this._boundOnChange, true);
  15482. if (platform.isIOS()) {
  15483. util$1.addEventListener(this._pageContent, 'touchmove', this._boundOnChange, { capture: true, passive: true });
  15484. this._pageContent.addEventListener('touchend', this._boundDoubleFireOnTouchend, true);
  15485. }
  15486. window.document.addEventListener('resize', this._boundOnChange, true);
  15487. }
  15488. }, {
  15489. key: '_removeEventListeners',
  15490. value: function _removeEventListeners() {
  15491. this._pageContent.removeEventListener('scroll', this._boundOnChange, true);
  15492. if (platform.isIOS()) {
  15493. util$1.removeEventListener(this._pageContent, 'touchmove', this._boundOnChange, { capture: true, passive: true });
  15494. this._pageContent.removeEventListener('touchend', this._boundDoubleFireOnTouchend, true);
  15495. }
  15496. window.document.removeEventListener('resize', this._boundOnChange, true);
  15497. }
  15498. }, {
  15499. key: 'destroy',
  15500. value: function destroy() {
  15501. this._removeAllElements();
  15502. this._delegate.destroy();
  15503. this._parentElement = this._delegate = this._renderedItems = null;
  15504. this._removeEventListeners();
  15505. }
  15506. }, {
  15507. key: 'padding',
  15508. get: function get$$1() {
  15509. return parseInt(this._wrapperElement.style.paddingTop, 10);
  15510. },
  15511. set: function set$$1(newValue) {
  15512. this._wrapperElement.style.paddingTop = newValue + 'px';
  15513. }
  15514. }, {
  15515. key: 'staticItemHeight',
  15516. get: function get$$1() {
  15517. return this._delegate.itemHeight || this._itemHeight;
  15518. }
  15519. }]);
  15520. return LazyRepeatProvider;
  15521. }();
  15522. /*
  15523. Copyright 2013-2015 ASIAL CORPORATION
  15524. Licensed under the Apache License, Version 2.0 (the "License");
  15525. you may not use this file except in compliance with the License.
  15526. You may obtain a copy of the License at
  15527. http://www.apache.org/licenses/LICENSE-2.0
  15528. Unless required by applicable law or agreed to in writing, software
  15529. distributed under the License is distributed on an "AS IS" BASIS,
  15530. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15531. See the License for the specific language governing permissions and
  15532. limitations under the License.
  15533. */
  15534. /**
  15535. * @element ons-lazy-repeat
  15536. * @category list
  15537. * @description
  15538. * [en]
  15539. * Using this component a list with millions of items can be rendered without a drop in performance.
  15540. * It does that by "lazily" loading elements into the DOM when they come into view and
  15541. * removing items from the DOM when they are not visible.
  15542. * [/en]
  15543. * [ja]
  15544. * このコンポーネント内で描画されるアイテムのDOM要素の読み込みは、画面に見えそうになった時まで自動的に遅延され、
  15545. * 画面から見えなくなった場合にはその要素は動的にアンロードされます。
  15546. * このコンポーネントを使うことで、パフォーマンスを劣化させること無しに巨大な数の要素を描画できます。
  15547. * [/ja]
  15548. * @codepen QwrGBm
  15549. * @tutorial vanilla/Reference/lazy-repeat
  15550. * @seealso ons-list
  15551. * [en]The `<ons-list>` element is used to render a list.[/en]
  15552. * [ja]`<ons-list>`要素はリストを描画するのに使われます。[/ja]
  15553. * @example
  15554. * <script>
  15555. * window.addEventListener('load', function() {
  15556. * var lazyRepeat = document.querySelector('#list');
  15557. * lazyRepeat.delegate = {
  15558. * createItemContent: function(i, template) {
  15559. * var dom = template.cloneNode(true);
  15560. * dom.innerText = i;
  15561. *
  15562. * return dom;
  15563. * },
  15564. * countItems: function() {
  15565. * return 10000000;
  15566. * },
  15567. * destroyItem: function(index, item) {
  15568. * console.log('Destroyed item with index: ' + index);
  15569. * }
  15570. * };
  15571. * });
  15572. * </script>
  15573. *
  15574. * <ons-list id="list">
  15575. * <ons-lazy-repeat>
  15576. * <ons-list-item></ons-list-item>
  15577. * </ons-lazy-repeat>
  15578. * </ons-list>
  15579. */
  15580. var LazyRepeatElement = function (_BaseElement) {
  15581. inherits(LazyRepeatElement, _BaseElement);
  15582. function LazyRepeatElement() {
  15583. classCallCheck(this, LazyRepeatElement);
  15584. return possibleConstructorReturn(this, (LazyRepeatElement.__proto__ || Object.getPrototypeOf(LazyRepeatElement)).apply(this, arguments));
  15585. }
  15586. createClass(LazyRepeatElement, [{
  15587. key: 'connectedCallback',
  15588. value: function connectedCallback() {
  15589. // not very good idea and also not documented
  15590. if (this.hasAttribute('delegate')) {
  15591. this.delegate = window[this.getAttribute('delegate')];
  15592. }
  15593. }
  15594. /**
  15595. * @property delegate
  15596. * @type {Object}
  15597. * @description
  15598. * [en]Specify a delegate object to load and unload item elements.[/en]
  15599. * [ja]要素のロード、アンロードなどの処理を委譲するオブジェクトを指定します。[/ja]
  15600. */
  15601. /**
  15602. * @property delegate.createItemContent
  15603. * @type {Function}
  15604. * @description
  15605. * [en]
  15606. * This function should return a `HTMLElement`.
  15607. *
  15608. * To help rendering the element, the current index and a template is supplied as arguments. The template is the initial content of the `<ons-lazy-repeat>` element.
  15609. * [/en]
  15610. * [ja]
  15611. * この関数は`HTMLElement`を返してください。
  15612. * 要素を生成しやすくするために、現在のアイテムのインデックスとテンプレートが引数に渡されます。
  15613. * このテンプレートは、`<ons-lazy-repeat>`要素のコンテンツが渡されます。
  15614. * [/ja]
  15615. */
  15616. /**
  15617. * @property delegate.countItems
  15618. * @type {Function}
  15619. * @description
  15620. * [en]Should return the number of items in the list.[/en]
  15621. * [ja]リスト内のアイテム数を返してください。[/ja]
  15622. */
  15623. /**
  15624. * @property delegate.calculateItemHeight
  15625. * @type {Function}
  15626. * @description
  15627. * [en]
  15628. * Should return the height of an item. The index is provided as an argument.
  15629. *
  15630. * This is important when rendering lists where the items have different height.
  15631. *
  15632. * The function is optional and if it isn't present the height of the first item will be automatically calculated and used for all other items.
  15633. * [/en]
  15634. * [ja]
  15635. * アイテムの高さ(ピクセル)を返してください。アイテムのインデックス値は引数で渡されます。
  15636. * この関数は、それぞれのアイムが違った高さを持つリストをレンダリングする際に重要です。
  15637. * この関数はオプショナルです。もしこの関数が無い場合には、
  15638. * 最初のアイテムの高さが他のすべてのアイテムの高さとして利用されます。
  15639. * [/ja]
  15640. */
  15641. /**
  15642. * @property delegate.destroyItem
  15643. * @type {Function}
  15644. * @description
  15645. * [en]
  15646. * This function is used called when an item is removed from the DOM. The index and DOM element is provided as arguments.
  15647. *
  15648. * The function is optional but may be important in order to avoid memory leaks.
  15649. * [/en]
  15650. * [ja]
  15651. * この関数は、あるアイテムがDOMツリーから除かれた時に呼び出されます。
  15652. * アイテムのインデックス値とDOM要素が引数として渡されます。
  15653. * この関数はオプショナルですが、各アイテムの後処理が必要な場合にはメモリーリークを避けるために重要です。
  15654. * [/ja]
  15655. */
  15656. }, {
  15657. key: 'refresh',
  15658. /**
  15659. * @method refresh
  15660. * @signature refresh()
  15661. * @description
  15662. * [en]Refresh the list. Use this method when the data has changed.[/en]
  15663. * [ja]リストを更新します。もしデータが変わった場合にはこのメソッドを使ってください。[/ja]
  15664. */
  15665. value: function refresh() {
  15666. this._lazyRepeatProvider && this._lazyRepeatProvider.refresh();
  15667. }
  15668. }, {
  15669. key: 'attributeChangedCallback',
  15670. value: function attributeChangedCallback(name, last, current) {}
  15671. }, {
  15672. key: 'disconnectedCallback',
  15673. value: function disconnectedCallback() {
  15674. if (this._lazyRepeatProvider) {
  15675. this._lazyRepeatProvider.destroy();
  15676. this._lazyRepeatProvider = null;
  15677. }
  15678. }
  15679. }, {
  15680. key: 'delegate',
  15681. set: function set$$1(userDelegate) {
  15682. this._lazyRepeatProvider && this._lazyRepeatProvider.destroy();
  15683. if (!this._templateElement && this.children[0]) {
  15684. this._templateElement = this.removeChild(this.children[0]);
  15685. }
  15686. var delegate = new LazyRepeatDelegate(userDelegate, this._templateElement || null);
  15687. this._lazyRepeatProvider = new LazyRepeatProvider(this.parentElement, delegate);
  15688. },
  15689. get: function get$$1() {
  15690. util$1.throw('No delegate getter');
  15691. }
  15692. }]);
  15693. return LazyRepeatElement;
  15694. }(BaseElement);
  15695. internal$1.LazyRepeatDelegate = LazyRepeatDelegate;
  15696. internal$1.LazyRepeatProvider = LazyRepeatProvider;
  15697. onsElements.LazyRepeat = LazyRepeatElement;
  15698. customElements.define('ons-lazy-repeat', LazyRepeatElement);
  15699. /*
  15700. Copyright 2013-2015 ASIAL CORPORATION
  15701. Licensed under the Apache License, Version 2.0 (the "License");
  15702. you may not use this file except in compliance with the License.
  15703. You may obtain a copy of the License at
  15704. http://www.apache.org/licenses/LICENSE-2.0
  15705. Unless required by applicable law or agreed to in writing, software
  15706. distributed under the License is distributed on an "AS IS" BASIS,
  15707. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15708. See the License for the specific language governing permissions and
  15709. limitations under the License.
  15710. */
  15711. var defaultClassName$4 = 'list-header';
  15712. var scheme$8 = { '': 'list-header--*' };
  15713. /**
  15714. * @element ons-list-header
  15715. * @category list
  15716. * @description
  15717. * [en]Header element for list items. Must be put inside the `<ons-list>` component.[/en]
  15718. * [ja]リスト要素に使用するヘッダー用コンポーネント。ons-listと共に使用します。[/ja]
  15719. * @seealso ons-list
  15720. * [en]The `<ons-list>` component[/en]
  15721. * [ja]ons-listコンポーネント[/ja]
  15722. * @seealso ons-list-item
  15723. * [en]The `<ons-list-item>` component[/en]
  15724. * [ja]ons-list-itemコンポーネント[/ja]
  15725. * @codepen yxcCt
  15726. * @tutorial vanilla/Reference/list
  15727. * @modifier material
  15728. * [en]Display a Material Design list header.[/en]
  15729. * [ja][/ja]
  15730. * @example
  15731. * <ons-list>
  15732. * <ons-list-header>Header Text</ons-list-header>
  15733. * <ons-list-item>Item</ons-list-item>
  15734. * <ons-list-item>Item</ons-list-item>
  15735. * </ons-list>
  15736. */
  15737. var ListHeaderElement = function (_BaseElement) {
  15738. inherits(ListHeaderElement, _BaseElement);
  15739. /**
  15740. * @attribute modifier
  15741. * @type {String}
  15742. * @description
  15743. * [en]The appearance of the list header.[/en]
  15744. * [ja]ヘッダーの表現を指定します。[/ja]
  15745. */
  15746. function ListHeaderElement() {
  15747. classCallCheck(this, ListHeaderElement);
  15748. var _this = possibleConstructorReturn(this, (ListHeaderElement.__proto__ || Object.getPrototypeOf(ListHeaderElement)).call(this));
  15749. _this._compile();
  15750. return _this;
  15751. }
  15752. createClass(ListHeaderElement, [{
  15753. key: '_compile',
  15754. value: function _compile() {
  15755. autoStyle.prepare(this);
  15756. this.classList.add(defaultClassName$4);
  15757. ModifierUtil.initModifier(this, scheme$8);
  15758. }
  15759. }, {
  15760. key: 'attributeChangedCallback',
  15761. value: function attributeChangedCallback(name, last, current) {
  15762. switch (name) {
  15763. case 'class':
  15764. util$1.restoreClass(this, defaultClassName$4, scheme$8);
  15765. break;
  15766. case 'modifier':
  15767. ModifierUtil.onModifierChanged(last, current, this, scheme$8);
  15768. break;
  15769. }
  15770. }
  15771. }], [{
  15772. key: 'observedAttributes',
  15773. get: function get$$1() {
  15774. return ['modifier', 'class'];
  15775. }
  15776. }]);
  15777. return ListHeaderElement;
  15778. }(BaseElement);
  15779. onsElements.ListHeader = ListHeaderElement;
  15780. customElements.define('ons-list-header', ListHeaderElement);
  15781. /*
  15782. Copyright 2013-2015 ASIAL CORPORATION
  15783. Licensed under the Apache License, Version 2.0 (the "License");
  15784. you may not use this file except in compliance with the License.
  15785. You may obtain a copy of the License at
  15786. http://www.apache.org/licenses/LICENSE-2.0
  15787. Unless required by applicable law or agreed to in writing, software
  15788. distributed under the License is distributed on an "AS IS" BASIS,
  15789. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15790. See the License for the specific language governing permissions and
  15791. limitations under the License.
  15792. */
  15793. var defaultClassName$5 = 'list-title';
  15794. var scheme$9 = { '': 'list-title--*' };
  15795. /**
  15796. * @element ons-list-title
  15797. * @category list
  15798. * @description
  15799. * [en]Represents a list title.[/en]
  15800. * [ja]リストのタイトルを表現します。[/ja]
  15801. * @example
  15802. * <ons-list-title>List Title</ons-list-title>
  15803. * <ons-list>
  15804. * <ons-list-item>Item</ons-list-item>
  15805. * </ons-list>
  15806. * @modifier material
  15807. * [en]Display a Material Design list title.[/en]
  15808. * [ja][/ja]
  15809. */
  15810. var ListTitleElement = function (_BaseElement) {
  15811. inherits(ListTitleElement, _BaseElement);
  15812. function ListTitleElement() {
  15813. classCallCheck(this, ListTitleElement);
  15814. var _this = possibleConstructorReturn(this, (ListTitleElement.__proto__ || Object.getPrototypeOf(ListTitleElement)).call(this));
  15815. _this._compile();
  15816. return _this;
  15817. }
  15818. createClass(ListTitleElement, [{
  15819. key: '_compile',
  15820. value: function _compile() {
  15821. autoStyle.prepare(this);
  15822. this.classList.add(defaultClassName$5);
  15823. ModifierUtil.initModifier(this, scheme$9);
  15824. }
  15825. }, {
  15826. key: 'attributeChangedCallback',
  15827. value: function attributeChangedCallback(name, last, current) {
  15828. switch (name) {
  15829. case 'class':
  15830. util$1.restoreClass(this, defaultClassName$5, scheme$9);
  15831. break;
  15832. case 'modifier':
  15833. ModifierUtil.onModifierChanged(last, current, this, scheme$9);
  15834. break;
  15835. }
  15836. }
  15837. }], [{
  15838. key: 'observedAttributes',
  15839. get: function get$$1() {
  15840. return ['modifier', 'class'];
  15841. }
  15842. }]);
  15843. return ListTitleElement;
  15844. }(BaseElement);
  15845. onsElements.ListTitle = ListTitleElement;
  15846. customElements.define('ons-list-title', ListTitleElement);
  15847. /*
  15848. Copyright 2013-2018 ASIAL CORPORATION
  15849. Licensed under the Apache License, Version 2.0 (the "License");
  15850. you may not use this file except in compliance with the License.
  15851. You may obtain a copy of the License at
  15852. http://www.apache.org/licenses/LICENSE-2.0
  15853. Unless required by applicable law or agreed to in writing, software
  15854. distributed under the License is distributed on an "AS IS" BASIS,
  15855. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15856. See the License for the specific language governing permissions and
  15857. limitations under the License.
  15858. */
  15859. var ListItemAnimator = function (_BaseAnimator) {
  15860. inherits(ListItemAnimator, _BaseAnimator);
  15861. function ListItemAnimator() {
  15862. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15863. _ref$timing = _ref.timing,
  15864. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  15865. _ref$delay = _ref.delay,
  15866. delay = _ref$delay === undefined ? 0 : _ref$delay,
  15867. _ref$duration = _ref.duration,
  15868. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  15869. classCallCheck(this, ListItemAnimator);
  15870. return possibleConstructorReturn(this, (ListItemAnimator.__proto__ || Object.getPrototypeOf(ListItemAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  15871. }
  15872. createClass(ListItemAnimator, [{
  15873. key: 'showExpansion',
  15874. value: function showExpansion(listItem, callback) {
  15875. callback();
  15876. }
  15877. }, {
  15878. key: 'hideExpansion',
  15879. value: function hideExpansion(listItem, callback) {
  15880. callback();
  15881. }
  15882. }]);
  15883. return ListItemAnimator;
  15884. }(BaseAnimator);
  15885. var SlideListItemAnimator = function (_ListItemAnimator) {
  15886. inherits(SlideListItemAnimator, _ListItemAnimator);
  15887. function SlideListItemAnimator() {
  15888. classCallCheck(this, SlideListItemAnimator);
  15889. return possibleConstructorReturn(this, (SlideListItemAnimator.__proto__ || Object.getPrototypeOf(SlideListItemAnimator)).apply(this, arguments));
  15890. }
  15891. createClass(SlideListItemAnimator, [{
  15892. key: 'showExpansion',
  15893. value: function showExpansion(listItem, callback) {
  15894. this._animateExpansion(listItem, true, callback);
  15895. }
  15896. }, {
  15897. key: 'hideExpansion',
  15898. value: function hideExpansion(listItem, callback) {
  15899. this._animateExpansion(listItem, false, callback);
  15900. }
  15901. }, {
  15902. key: '_animateExpansion',
  15903. value: function _animateExpansion(listItem, shouldOpen, callback) {
  15904. var _animit;
  15905. // To animate the opening of the expansion panel correctly, we need to know its
  15906. // height. To calculate this, we set its height to auto, and then get the computed
  15907. // height and padding. Once this is done, we set the height back to its original value.
  15908. var oldHeight = listItem.expandableContent.style.height;
  15909. var oldDisplay = listItem.expandableContent.style.display;
  15910. listItem.expandableContent.style.height = 'auto';
  15911. listItem.expandableContent.style.display = 'block';
  15912. var computedStyle = window.getComputedStyle(listItem.expandableContent);
  15913. var expansionOpenTransition = [{ height: 0, paddingTop: 0, paddingBottom: 0 }, {
  15914. height: computedStyle.height,
  15915. paddingTop: computedStyle.paddingTop,
  15916. paddingBottom: computedStyle.paddingBottom
  15917. }];
  15918. var iconOpenTransition = [{ transform: 'rotate(45deg)' }, { transform: 'rotate(225deg)' }];
  15919. // Now that we have the values we need, reset the height back to its original state
  15920. listItem.expandableContent.style.height = oldHeight;
  15921. (_animit = Animit(listItem.expandableContent, { duration: this.duration, property: 'height padding-top padding-bottom' })).default.apply(_animit, toConsumableArray(shouldOpen ? expansionOpenTransition : expansionOpenTransition.reverse())).play(function () {
  15922. listItem.expandableContent.style.display = oldDisplay;
  15923. callback && callback();
  15924. });
  15925. if (listItem.expandChevron) {
  15926. var _animit2;
  15927. (_animit2 = Animit(listItem.expandChevron, { duration: this.duration, property: 'transform' })).default.apply(_animit2, toConsumableArray(shouldOpen ? iconOpenTransition : iconOpenTransition.reverse())).play();
  15928. }
  15929. }
  15930. }]);
  15931. return SlideListItemAnimator;
  15932. }(ListItemAnimator);
  15933. /*
  15934. Copyright 2013-2015 ASIAL CORPORATION
  15935. Licensed under the Apache License, Version 2.0 (the "License");
  15936. you may not use this file except in compliance with the License.
  15937. You may obtain a copy of the License at
  15938. http://www.apache.org/licenses/LICENSE-2.0
  15939. Unless required by applicable law or agreed to in writing, software
  15940. distributed under the License is distributed on an "AS IS" BASIS,
  15941. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15942. See the License for the specific language governing permissions and
  15943. limitations under the License.
  15944. */
  15945. var defaultClassName$6 = 'list-item';
  15946. var scheme$10 = {
  15947. '.list-item': 'list-item--*',
  15948. '.list-item__left': 'list-item--*__left',
  15949. '.list-item__center': 'list-item--*__center',
  15950. '.list-item__right': 'list-item--*__right',
  15951. '.list-item__label': 'list-item--*__label',
  15952. '.list-item__title': 'list-item--*__title',
  15953. '.list-item__subtitle': 'list-item--*__subtitle',
  15954. '.list-item__thumbnail': 'list-item--*__thumbnail',
  15955. '.list-item__icon': 'list-item--*__icon'
  15956. };
  15957. var _animatorDict$3 = {
  15958. 'default': SlideListItemAnimator,
  15959. 'none': ListItemAnimator
  15960. };
  15961. /**
  15962. * @element ons-list-item
  15963. * @category list
  15964. * @modifier tappable
  15965. * [en]Make the list item change appearance when it's tapped. On iOS it is better to use the "tappable" and "tap-background-color" attribute for better behavior when scrolling.[/en]
  15966. * [ja]タップやクリックした時に効果が表示されるようになります。[/ja]
  15967. * @modifier chevron
  15968. * [en]Display a chevron at the right end of the list item and make it change appearance when tapped.[/en]
  15969. * [ja][/ja]
  15970. * @modifier longdivider
  15971. * [en]Displays a long horizontal divider between items.[/en]
  15972. * [ja][/ja]
  15973. * @modifier nodivider
  15974. * [en]Removes the divider between list items.[/en]
  15975. * [ja][/ja]
  15976. * @modifier material
  15977. * [en]Display a Material Design list item.[/en]
  15978. * [ja][/ja]
  15979. * @description
  15980. * [en]
  15981. * Component that represents each item in a list. The list item is composed of four parts that are represented with the `left`, `center`, `right` and `expandable-content` classes. These classes can be used to ensure that the content of the list items is properly aligned.
  15982. *
  15983. * ```
  15984. * <ons-list-item>
  15985. * <div class="left">Left</div>
  15986. * <div class="center">Center</div>
  15987. * <div class="right">Right</div>
  15988. * <div class="expandable-content">Expandable content</div>
  15989. * </ons-list-item>
  15990. * ```
  15991. *
  15992. * There are also a number of classes (prefixed with `list-item__*`) that help when putting things like icons and thumbnails into the list items.
  15993. * [/en]
  15994. * [ja][/ja]
  15995. * @seealso ons-list
  15996. * [en]ons-list component[/en]
  15997. * [ja]ons-listコンポーネント[/ja]
  15998. * @seealso ons-list-header
  15999. * [en]ons-list-header component[/en]
  16000. * [ja]ons-list-headerコンポーネント[/ja]
  16001. * @codepen yxcCt
  16002. * @tutorial vanilla/Reference/list
  16003. * @example
  16004. * <ons-list-item>
  16005. * <div class="left">
  16006. * <ons-icon icon="md-face" class="list-item__icon"></ons-icon>
  16007. * </div>
  16008. * <div class="center">
  16009. * <div class="list-item__title">Title</div>
  16010. * <div class="list-item__subtitle">Subtitle</div>
  16011. * </div>
  16012. * <div class="right">
  16013. * <ons-switch></ons-switch>
  16014. * </div>
  16015. * </ons-list-item>
  16016. */
  16017. var ListItemElement = function (_BaseElement) {
  16018. inherits(ListItemElement, _BaseElement);
  16019. /**
  16020. * @attribute modifier
  16021. * @type {String}
  16022. * @description
  16023. * [en]The appearance of the list item.[/en]
  16024. * [ja]各要素の表現を指定します。[/ja]
  16025. */
  16026. /**
  16027. * @attribute lock-on-drag
  16028. * @type {String}
  16029. * @description
  16030. * [en]Prevent vertical scrolling when the user drags horizontally.[/en]
  16031. * [ja]この属性があると、ユーザーがこの要素を横方向にドラッグしている時に、縦方向のスクロールが起きないようになります。[/ja]
  16032. */
  16033. /**
  16034. * @attribute tappable
  16035. * @type {Boolean}
  16036. * @description
  16037. * [en]Makes the element react to taps. `prevent-tap` attribute can be added to child elements like buttons or inputs to prevent this effect. `ons-*` elements are ignored by default.[/en]
  16038. * [ja][/ja]
  16039. */
  16040. /**
  16041. * @attribute tap-background-color
  16042. * @type {Color}
  16043. * @description
  16044. * [en] Changes the background color when tapped. For this to work, the attribute "tappable" needs to be set. The default color is "#d9d9d9". It will display as a ripple effect on Android.[/en]
  16045. * [ja][/ja]
  16046. */
  16047. /**
  16048. * @attribute expandable
  16049. * @type {Boolean}
  16050. * @description
  16051. * [en]Makes the element able to be expanded to reveal extra content. For this to work, the expandable content must be defined in `div.expandable-content`.[/en]
  16052. * [ja][/ja]
  16053. */
  16054. /**
  16055. * @attribute animation
  16056. * @type {String}
  16057. * @default default
  16058. * @description
  16059. * [en]The animation used when showing and hiding the expandable content. Can be either `"default"` or `"none"`.[/en]
  16060. * [ja][/ja]
  16061. */
  16062. function ListItemElement() {
  16063. classCallCheck(this, ListItemElement);
  16064. var _this = possibleConstructorReturn(this, (ListItemElement.__proto__ || Object.getPrototypeOf(ListItemElement)).call(this));
  16065. _this._animatorFactory = _this._updateAnimatorFactory();
  16066. _this.toggleExpansion = _this.toggleExpansion.bind(_this);
  16067. // Elements ignored when tapping
  16068. var re = /^ons-(?!col$|row$|if$)/i;
  16069. _this._shouldIgnoreTap = function (e) {
  16070. return e.hasAttribute('prevent-tap') || re.test(e.tagName);
  16071. };
  16072. // show and hide functions for Vue hidable mixin
  16073. _this.show = _this.showExpansion;
  16074. _this.hide = _this.hideExpansion;
  16075. contentReady(_this, function () {
  16076. _this._compile();
  16077. });
  16078. return _this;
  16079. }
  16080. /**
  16081. * Compiles the list item.
  16082. *
  16083. * Various elements are allowed in the body of a list item:
  16084. *
  16085. * - div.left, div.right, and div.center are allowed as direct children
  16086. * - if div.center is not defined, anything that isn't div.left, div.right or div.expandable-content will be put in a div.center
  16087. * - if div.center is defined, anything that isn't div.left, div.right or div.expandable-content will be ignored
  16088. * - if list item has expandable attribute:
  16089. * - div.expandable-content is allowed as a direct child
  16090. * - div.top is allowed as direct child
  16091. * - if div.top is defined, anything that isn't div.expandable-content should be inside div.top - anything else will be ignored
  16092. * - if div.right is not defined, a div.right will be created with a drop-down chevron
  16093. *
  16094. * See the tests for examples.
  16095. */
  16096. createClass(ListItemElement, [{
  16097. key: '_compile',
  16098. value: function _compile() {
  16099. autoStyle.prepare(this);
  16100. this.classList.add(defaultClassName$6);
  16101. var top = void 0,
  16102. expandableContent = void 0;
  16103. var topContent = [];
  16104. Array.from(this.childNodes).forEach(function (node) {
  16105. if (node.nodeType !== Node.ELEMENT_NODE) {
  16106. topContent.push(node);
  16107. } else if (node.classList.contains('top')) {
  16108. top = node;
  16109. } else if (node.classList.contains('expandable-content')) {
  16110. expandableContent = node;
  16111. } else {
  16112. topContent.push(node);
  16113. }
  16114. if (node.nodeName !== 'ONS-RIPPLE') {
  16115. node.remove();
  16116. }
  16117. });
  16118. topContent = top ? Array.from(top.childNodes) : topContent;
  16119. var left = void 0,
  16120. right = void 0,
  16121. center = void 0;
  16122. var centerContent = [];
  16123. topContent.forEach(function (node) {
  16124. if (node.nodeType !== Node.ELEMENT_NODE) {
  16125. centerContent.push(node);
  16126. } else if (node.classList.contains('left')) {
  16127. left = node;
  16128. } else if (node.classList.contains('right')) {
  16129. right = node;
  16130. } else if (node.classList.contains('center')) {
  16131. center = node;
  16132. } else {
  16133. centerContent.push(node);
  16134. }
  16135. });
  16136. if (this.hasAttribute('expandable')) {
  16137. this.classList.add('list-item--expandable');
  16138. if (!top) {
  16139. top = document.createElement('div');
  16140. top.classList.add('top');
  16141. }
  16142. top.classList.add('list-item__top');
  16143. this.appendChild(top);
  16144. this._top = top;
  16145. if (expandableContent) {
  16146. expandableContent.classList.add('list-item__expandable-content');
  16147. this.appendChild(expandableContent);
  16148. }
  16149. if (!right) {
  16150. right = document.createElement('div');
  16151. right.classList.add('list-item__right', 'right');
  16152. // We cannot use a pseudo-element for this chevron, as we cannot animate it using
  16153. // JS. So, we make a chevron span instead.
  16154. var chevron = document.createElement('span');
  16155. chevron.classList.add('list-item__expand-chevron');
  16156. right.appendChild(chevron);
  16157. }
  16158. } else {
  16159. top = this;
  16160. }
  16161. if (!center) {
  16162. center = document.createElement('div');
  16163. center.classList.add('center');
  16164. centerContent.forEach(function (node) {
  16165. return center.appendChild(node);
  16166. });
  16167. }
  16168. center.classList.add('list-item__center');
  16169. top.appendChild(center);
  16170. if (left) {
  16171. left.classList.add('list-item__left');
  16172. top.appendChild(left);
  16173. }
  16174. if (right) {
  16175. right.classList.add('list-item__right');
  16176. top.appendChild(right);
  16177. }
  16178. util$1.updateRipple(this);
  16179. ModifierUtil.initModifier(this, scheme$10);
  16180. }
  16181. /**
  16182. * @method showExpansion
  16183. * @signature showExpansion()
  16184. * @description
  16185. * [en]Show the expandable content if the element is expandable.[/en]
  16186. * [ja][/ja]
  16187. */
  16188. }, {
  16189. key: 'showExpansion',
  16190. value: function showExpansion() {
  16191. var _this2 = this;
  16192. if (this.hasAttribute('expandable') && !this._expanding) {
  16193. this.expanded = true;
  16194. this._expanding = true;
  16195. var animator = this._animatorFactory.newAnimator();
  16196. animator.showExpansion(this, function () {
  16197. _this2.classList.add('expanded');
  16198. _this2._expanding = false;
  16199. });
  16200. }
  16201. }
  16202. /**
  16203. * @method hideExpansion
  16204. * @signature hideExpansion()
  16205. * @description
  16206. * [en]Hide the expandable content if the element expandable.[/en]
  16207. * [ja][/ja]
  16208. */
  16209. }, {
  16210. key: 'hideExpansion',
  16211. value: function hideExpansion() {
  16212. var _this3 = this;
  16213. if (this.hasAttribute('expandable') && !this._expanding) {
  16214. this.expanded = false;
  16215. this._expanding = true;
  16216. var animator = this._animatorFactory.newAnimator();
  16217. animator.hideExpansion(this, function () {
  16218. _this3.classList.remove('expanded');
  16219. _this3._expanding = false;
  16220. });
  16221. }
  16222. }
  16223. }, {
  16224. key: 'toggleExpansion',
  16225. value: function toggleExpansion() {
  16226. this.classList.contains('expanded') ? this.hideExpansion() : this.showExpansion();
  16227. this.dispatchEvent(new Event('expansion'));
  16228. }
  16229. }, {
  16230. key: '_updateAnimatorFactory',
  16231. value: function _updateAnimatorFactory() {
  16232. return new AnimatorFactory({
  16233. animators: _animatorDict$3,
  16234. baseClass: ListItemAnimator,
  16235. baseClassName: 'ListItemAnimator',
  16236. defaultAnimation: this.getAttribute('animation') || 'default'
  16237. });
  16238. }
  16239. }, {
  16240. key: 'attributeChangedCallback',
  16241. value: function attributeChangedCallback(name, last, current) {
  16242. switch (name) {
  16243. case 'class':
  16244. util$1.restoreClass(this, defaultClassName$6, scheme$10);
  16245. break;
  16246. case 'modifier':
  16247. ModifierUtil.onModifierChanged(last, current, this, scheme$10);
  16248. break;
  16249. case 'ripple':
  16250. util$1.updateRipple(this);
  16251. break;
  16252. case 'animation':
  16253. this._animatorFactory = this._updateAnimatorFactory();
  16254. break;
  16255. }
  16256. }
  16257. }, {
  16258. key: 'connectedCallback',
  16259. value: function connectedCallback() {
  16260. var _this4 = this;
  16261. contentReady(this, function () {
  16262. _this4._setupListeners(true);
  16263. _this4._originalBackgroundColor = _this4.style.backgroundColor;
  16264. _this4.tapped = false;
  16265. });
  16266. }
  16267. }, {
  16268. key: 'disconnectedCallback',
  16269. value: function disconnectedCallback() {
  16270. this._setupListeners(false);
  16271. }
  16272. }, {
  16273. key: '_setupListeners',
  16274. value: function _setupListeners(add) {
  16275. var action = (add ? 'add' : 'remove') + 'EventListener';
  16276. util$1[action](this, 'touchstart', this._onTouch, { passive: true });
  16277. util$1[action](this, 'touchmove', this._onRelease, { passive: true });
  16278. this[action]('touchcancel', this._onRelease);
  16279. this[action]('touchend', this._onRelease);
  16280. this[action]('touchleave', this._onRelease);
  16281. this[action]('drag', this._onDrag);
  16282. this[action]('mousedown', this._onTouch);
  16283. this[action]('mouseup', this._onRelease);
  16284. this[action]('mouseout', this._onRelease);
  16285. if (this._top) {
  16286. this._top[action]('click', this.toggleExpansion);
  16287. }
  16288. }
  16289. }, {
  16290. key: '_onDrag',
  16291. value: function _onDrag(event) {
  16292. var gesture = event.gesture;
  16293. // Prevent vertical scrolling if the users pans left or right.
  16294. if (this.hasAttribute('lock-on-drag') && ['left', 'right'].indexOf(gesture.direction) > -1) {
  16295. gesture.preventDefault();
  16296. }
  16297. }
  16298. }, {
  16299. key: '_onTouch',
  16300. value: function _onTouch(e) {
  16301. var _this5 = this;
  16302. if (this.tapped || this !== e.target && (this._shouldIgnoreTap(e.target) || util$1.findParent(e.target, this._shouldIgnoreTap, function (p) {
  16303. return p === _this5;
  16304. }))) {
  16305. return; // Ignore tap
  16306. }
  16307. this.tapped = true;
  16308. var touchStyle = { transition: 'background-color 0.0s linear 0.02s, box-shadow 0.0s linear 0.02s' };
  16309. if (this.hasAttribute('tappable')) {
  16310. if (this.style.backgroundColor) {
  16311. this._originalBackgroundColor = this.style.backgroundColor;
  16312. }
  16313. touchStyle.backgroundColor = this.getAttribute('tap-background-color') || '#d9d9d9';
  16314. touchStyle.boxShadow = '0px -1px 0px 0px ' + touchStyle.backgroundColor;
  16315. }
  16316. styler(this, touchStyle);
  16317. }
  16318. }, {
  16319. key: '_onRelease',
  16320. value: function _onRelease() {
  16321. this.tapped = false;
  16322. this.style.backgroundColor = this._originalBackgroundColor || '';
  16323. styler.clear(this, 'transition boxShadow');
  16324. }
  16325. }, {
  16326. key: 'expandableContent',
  16327. get: function get$$1() {
  16328. return this.querySelector('.list-item__expandable-content');
  16329. }
  16330. }, {
  16331. key: 'expandChevron',
  16332. get: function get$$1() {
  16333. return this.querySelector('.list-item__expand-chevron');
  16334. }
  16335. }], [{
  16336. key: 'observedAttributes',
  16337. get: function get$$1() {
  16338. return ['modifier', 'class', 'ripple', 'animation'];
  16339. }
  16340. }]);
  16341. return ListItemElement;
  16342. }(BaseElement);
  16343. onsElements.ListItem = ListItemElement;
  16344. customElements.define('ons-list-item', ListItemElement);
  16345. /*
  16346. Copyright 2013-2015 ASIAL CORPORATION
  16347. Licensed under the Apache License, Version 2.0 (the "License");
  16348. you may not use this file except in compliance with the License.
  16349. You may obtain a copy of the License at
  16350. http://www.apache.org/licenses/LICENSE-2.0
  16351. Unless required by applicable law or agreed to in writing, software
  16352. distributed under the License is distributed on an "AS IS" BASIS,
  16353. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16354. See the License for the specific language governing permissions and
  16355. limitations under the License.
  16356. */
  16357. var defaultClassName$7 = 'list';
  16358. var scheme$11 = { '': 'list--*' };
  16359. /**
  16360. * @element ons-list
  16361. * @category list
  16362. * @modifier inset
  16363. * [en]Inset list that doesn't cover the whole width of the parent.[/en]
  16364. * [ja]親要素の画面いっぱいに広がらないリストを表示します。[/ja]
  16365. * @modifier noborder
  16366. * [en]A list with no borders at the top and bottom.[/en]
  16367. * [ja]リストの上下のボーダーが無いリストを表示します。[/ja]
  16368. * @description
  16369. * [en]Component to define a list, and the container for ons-list-item(s).[/en]
  16370. * [ja]リストを表現するためのコンポーネント。ons-list-itemのコンテナとして使用します。[/ja]
  16371. * @seealso ons-list-item
  16372. * [en]ons-list-item component[/en]
  16373. * [ja]ons-list-itemコンポーネント[/ja]
  16374. * @seealso ons-list-header
  16375. * [en]ons-list-header component[/en]
  16376. * [ja]ons-list-headerコンポーネント[/ja]
  16377. * @seealso ons-lazy-repeat
  16378. * [en]ons-lazy-repeat component[/en]
  16379. * [ja]ons-lazy-repeatコンポーネント[/ja]
  16380. * @codepen yxcCt
  16381. * @tutorial vanilla/Reference/list
  16382. * @example
  16383. * <ons-list>
  16384. * <ons-list-header>Header Text</ons-list-header>
  16385. * <ons-list-item>Item</ons-list-item>
  16386. * <ons-list-item>Item</ons-list-item>
  16387. * </ons-list>
  16388. */
  16389. var ListElement = function (_BaseElement) {
  16390. inherits(ListElement, _BaseElement);
  16391. /**
  16392. * @attribute modifier
  16393. * @type {String}
  16394. * @description
  16395. * [en]The appearance of the list.[/en]
  16396. * [ja]リストの表現を指定します。[/ja]
  16397. */
  16398. function ListElement() {
  16399. classCallCheck(this, ListElement);
  16400. var _this = possibleConstructorReturn(this, (ListElement.__proto__ || Object.getPrototypeOf(ListElement)).call(this));
  16401. _this._compile();
  16402. return _this;
  16403. }
  16404. createClass(ListElement, [{
  16405. key: '_compile',
  16406. value: function _compile() {
  16407. autoStyle.prepare(this);
  16408. this.classList.add(defaultClassName$7);
  16409. ModifierUtil.initModifier(this, scheme$11);
  16410. }
  16411. }, {
  16412. key: 'attributeChangedCallback',
  16413. value: function attributeChangedCallback(name, last, current) {
  16414. switch (name) {
  16415. case 'class':
  16416. util$1.restoreClass(this, defaultClassName$7, scheme$11);
  16417. break;
  16418. case 'modifier':
  16419. ModifierUtil.onModifierChanged(last, current, this, scheme$11);
  16420. break;
  16421. }
  16422. }
  16423. }], [{
  16424. key: 'observedAttributes',
  16425. get: function get$$1() {
  16426. return ['modifier', 'class'];
  16427. }
  16428. }]);
  16429. return ListElement;
  16430. }(BaseElement);
  16431. onsElements.List = ListElement;
  16432. customElements.define('ons-list', ListElement);
  16433. /*
  16434. Copyright 2013-2015 ASIAL CORPORATION
  16435. Licensed under the Apache License, Version 2.0 (the "License");
  16436. you may not use this file except in compliance with the License.
  16437. You may obtain a copy of the License at
  16438. http://www.apache.org/licenses/LICENSE-2.0
  16439. Unless required by applicable law or agreed to in writing, software
  16440. distributed under the License is distributed on an "AS IS" BASIS,
  16441. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16442. See the License for the specific language governing permissions and
  16443. limitations under the License.
  16444. */
  16445. var INPUT_ATTRIBUTES = ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'inputmode', 'max', 'maxlength', 'min', 'minlength', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'size', 'step', 'validator', 'value'];
  16446. var BaseInputElement = function (_BaseElement) {
  16447. inherits(BaseInputElement, _BaseElement);
  16448. createClass(BaseInputElement, [{
  16449. key: '_update',
  16450. value: function _update() {} // Optionally implemented
  16451. }, {
  16452. key: '_scheme',
  16453. get: function get$$1() {
  16454. util$1.throwMember();
  16455. }
  16456. }, {
  16457. key: '_template',
  16458. get: function get$$1() {
  16459. util$1.throwMember();
  16460. }
  16461. }, {
  16462. key: 'type',
  16463. get: function get$$1() {
  16464. util$1.throwMember();
  16465. }
  16466. }]);
  16467. function BaseInputElement() {
  16468. classCallCheck(this, BaseInputElement);
  16469. var _this = possibleConstructorReturn(this, (BaseInputElement.__proto__ || Object.getPrototypeOf(BaseInputElement)).call(this));
  16470. if (_this.constructor === BaseInputElement) {
  16471. util$1.throwAbstract();
  16472. }
  16473. contentReady(_this, function () {
  16474. return _this._compile();
  16475. });
  16476. _this._boundDelegateEvent = _this._delegateEvent.bind(_this);
  16477. return _this;
  16478. }
  16479. createClass(BaseInputElement, [{
  16480. key: '_compile',
  16481. value: function _compile() {
  16482. autoStyle.prepare(this);
  16483. this._defaultClassName && this.classList.add(this._defaultClassName);
  16484. if (this.children.length !== 0) {
  16485. return;
  16486. }
  16487. this.appendChild(util$1.createFragment(this._template));
  16488. this._setInputId();
  16489. this._updateBoundAttributes();
  16490. ModifierUtil.initModifier(this, this._scheme);
  16491. }
  16492. }, {
  16493. key: '_updateBoundAttributes',
  16494. value: function _updateBoundAttributes() {
  16495. var _this2 = this;
  16496. INPUT_ATTRIBUTES.forEach(function (attr) {
  16497. if (_this2.hasAttribute(attr)) {
  16498. _this2._input.setAttribute(attr, _this2.getAttribute(attr));
  16499. } else {
  16500. _this2._input.removeAttribute(attr);
  16501. }
  16502. });
  16503. this._update();
  16504. }
  16505. }, {
  16506. key: '_delegateEvent',
  16507. value: function _delegateEvent(event) {
  16508. var e = new CustomEvent(event.type, {
  16509. bubbles: false,
  16510. cancelable: true
  16511. });
  16512. return this.dispatchEvent(e);
  16513. }
  16514. }, {
  16515. key: '_setInputId',
  16516. value: function _setInputId() {
  16517. if (this.hasAttribute('input-id')) {
  16518. this._input.id = this.getAttribute('input-id');
  16519. }
  16520. }
  16521. }, {
  16522. key: 'connectedCallback',
  16523. value: function connectedCallback() {
  16524. var _this3 = this;
  16525. contentReady(this, function () {
  16526. _this3._input.addEventListener('focus', _this3._boundDelegateEvent);
  16527. _this3._input.addEventListener('blur', _this3._boundDelegateEvent);
  16528. });
  16529. }
  16530. }, {
  16531. key: 'disconnectedCallback',
  16532. value: function disconnectedCallback() {
  16533. var _this4 = this;
  16534. contentReady(this, function () {
  16535. _this4._input.removeEventListener('focus', _this4._boundDelegateEvent);
  16536. _this4._input.removeEventListener('blur', _this4._boundDelegateEvent);
  16537. });
  16538. }
  16539. }, {
  16540. key: 'attributeChangedCallback',
  16541. value: function attributeChangedCallback(name, last, current) {
  16542. var _this5 = this;
  16543. switch (name) {
  16544. case 'modifier':
  16545. contentReady(this, function () {
  16546. return ModifierUtil.onModifierChanged(last, current, _this5, _this5._scheme);
  16547. });
  16548. break;
  16549. case 'input-id':
  16550. contentReady(this, function () {
  16551. return _this5._setInputId();
  16552. });
  16553. break;
  16554. case 'class':
  16555. util$1.restoreClass(this, this._defaultClassName, this._scheme);
  16556. break;
  16557. }
  16558. if (INPUT_ATTRIBUTES.indexOf(name) >= 0) {
  16559. contentReady(this, function () {
  16560. return _this5._updateBoundAttributes();
  16561. });
  16562. }
  16563. }
  16564. }, {
  16565. key: '_defaultClassName',
  16566. get: function get$$1() {
  16567. return '';
  16568. }
  16569. }, {
  16570. key: '_input',
  16571. get: function get$$1() {
  16572. return this.querySelector('input');
  16573. }
  16574. }, {
  16575. key: 'value',
  16576. get: function get$$1() {
  16577. return this._input === null ? this.getAttribute('value') : this._input.value;
  16578. },
  16579. set: function set$$1(val) {
  16580. var _this6 = this;
  16581. contentReady(this, function () {
  16582. if (val instanceof Date) {
  16583. val = val.toISOString().substring(0, 10);
  16584. }
  16585. _this6._input.value = val;
  16586. _this6._update();
  16587. });
  16588. }
  16589. }, {
  16590. key: 'disabled',
  16591. set: function set$$1(value) {
  16592. return util$1.toggleAttribute(this, 'disabled', value);
  16593. },
  16594. get: function get$$1() {
  16595. return this.hasAttribute('disabled');
  16596. }
  16597. }], [{
  16598. key: 'observedAttributes',
  16599. get: function get$$1() {
  16600. return ['modifier', 'input-id', 'class'].concat(INPUT_ATTRIBUTES);
  16601. }
  16602. }]);
  16603. return BaseInputElement;
  16604. }(BaseElement);
  16605. /*
  16606. Copyright 2013-2015 ASIAL CORPORATION
  16607. Licensed under the Apache License, Version 2.0 (the "License");
  16608. you may not use this file except in compliance with the License.
  16609. You may obtain a copy of the License at
  16610. http://www.apache.org/licenses/LICENSE-2.0
  16611. Unless required by applicable law or agreed to in writing, software
  16612. distributed under the License is distributed on an "AS IS" BASIS,
  16613. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16614. See the License for the specific language governing permissions and
  16615. limitations under the License.
  16616. */
  16617. var scheme$12 = {
  16618. '.text-input': 'text-input--*',
  16619. '.text-input__label': 'text-input--*__label'
  16620. };
  16621. /**
  16622. * @element ons-input
  16623. * @category form
  16624. * @modifier material
  16625. * [en]Displays a Material Design input.[/en]
  16626. * [ja][/ja]
  16627. * @modifier underbar
  16628. * [en]Displays a horizontal line underneath a text input.[/en]
  16629. * [ja][/ja]
  16630. * @modifier transparent
  16631. * [en]Displays a transparent input. Works for Material Design.[/en]
  16632. * [ja][/ja]
  16633. * @description
  16634. * [en]
  16635. * An input element. The `type` attribute can be used to change the input type. All text input types are supported.
  16636. *
  16637. * The component will automatically render as a Material Design input on Android devices.
  16638. *
  16639. * Most attributes that can be used for a normal `<input>` element can also be used on the `<ons-input>` element.
  16640. * [/en]
  16641. * [ja][/ja]
  16642. * @tutorial vanilla/Reference/input
  16643. * @seealso ons-checkbox
  16644. * [en]The `<ons-checkbox>` element is used to display a checkbox.[/en]
  16645. * [ja][/ja]
  16646. * @seealso ons-radio
  16647. * [en]The `<ons-radio>` element is used to display a radio button.[/en]
  16648. * [ja][/ja]
  16649. * @seealso ons-range
  16650. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  16651. * [ja][/ja]
  16652. * @seealso ons-switch
  16653. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  16654. * [ja][/ja]
  16655. * @seealso ons-select
  16656. * [en]The `<ons-select>` element is used to display a select box.[/en]
  16657. * [ja][/ja]
  16658. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  16659. * @example
  16660. * <ons-input placeholder="Username" float></ons-input>
  16661. */
  16662. var InputElement = function (_BaseInputElement) {
  16663. inherits(InputElement, _BaseInputElement);
  16664. function InputElement() {
  16665. classCallCheck(this, InputElement);
  16666. var _this = possibleConstructorReturn(this, (InputElement.__proto__ || Object.getPrototypeOf(InputElement)).call(this));
  16667. _this._boundOnInput = _this._update.bind(_this);
  16668. _this._boundOnFocusin = _this._update.bind(_this);
  16669. return _this;
  16670. }
  16671. /* Inherited props */
  16672. createClass(InputElement, [{
  16673. key: '_update',
  16674. value: function _update() {
  16675. this._updateLabel();
  16676. this._updateLabelClass();
  16677. }
  16678. }, {
  16679. key: '_updateLabel',
  16680. /* Own props */
  16681. value: function _updateLabel() {
  16682. var label = this.getAttribute('placeholder') || '';
  16683. if (typeof this._helper.textContent !== 'undefined') {
  16684. this._helper.textContent = label;
  16685. } else {
  16686. this._helper.innerText = label;
  16687. }
  16688. }
  16689. }, {
  16690. key: '_updateLabelClass',
  16691. value: function _updateLabelClass() {
  16692. if (this.value === '') {
  16693. this._helper.classList.remove('text-input--material__label--active');
  16694. } else {
  16695. this._helper.classList.add('text-input--material__label--active');
  16696. }
  16697. }
  16698. }, {
  16699. key: 'connectedCallback',
  16700. value: function connectedCallback() {
  16701. var _this2 = this;
  16702. get(InputElement.prototype.__proto__ || Object.getPrototypeOf(InputElement.prototype), 'connectedCallback', this).call(this);
  16703. contentReady(this, function () {
  16704. _this2._input.addEventListener('input', _this2._boundOnInput);
  16705. _this2._input.addEventListener('focusin', _this2._boundOnFocusin);
  16706. });
  16707. var type = this.getAttribute('type');
  16708. if (['checkbox', 'radio'].indexOf(type) >= 0) {
  16709. util$1.warn('Warn: <ons-input type="' + type + '"> is deprecated since v2.4.0. Use <ons-' + type + '> instead.');
  16710. }
  16711. }
  16712. }, {
  16713. key: 'disconnectedCallback',
  16714. value: function disconnectedCallback() {
  16715. var _this3 = this;
  16716. get(InputElement.prototype.__proto__ || Object.getPrototypeOf(InputElement.prototype), 'disconnectedCallback', this).call(this);
  16717. contentReady(this, function () {
  16718. _this3._input.removeEventListener('input', _this3._boundOnInput);
  16719. _this3._input.removeEventListener('focusin', _this3._boundOnFocusin);
  16720. });
  16721. }
  16722. }, {
  16723. key: 'attributeChangedCallback',
  16724. value: function attributeChangedCallback(name, last, current) {
  16725. var _this4 = this;
  16726. switch (name) {
  16727. case 'type':
  16728. contentReady(this, function () {
  16729. return _this4._input.setAttribute('type', _this4.type);
  16730. });
  16731. break;
  16732. default:
  16733. get(InputElement.prototype.__proto__ || Object.getPrototypeOf(InputElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  16734. }
  16735. }
  16736. /**
  16737. * @attribute placeholder
  16738. * @type {String}
  16739. * @description
  16740. * [en]Placeholder text. In Material Design, this placeholder will be a floating label.[/en]
  16741. * [ja][/ja]
  16742. */
  16743. /**
  16744. * @attribute float
  16745. * @description
  16746. * [en]If this attribute is present, the placeholder will be animated in Material Design.[/en]
  16747. * [ja]この属性が設定された時、ラベルはアニメーションするようになります。[/ja]
  16748. */
  16749. /**
  16750. * @attribute type
  16751. * @type {String}
  16752. * @description
  16753. * [en]
  16754. * Specify the input type. This is the same as the "type" attribute for normal inputs. It expects strict text types such as `text`, `password`, etc. For checkbox, radio button, select or range, please have a look at the corresponding elements.
  16755. *
  16756. * Please take a look at [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) for an exhaustive list of possible values. Depending on the platform and browser version some of these might not work.
  16757. * [/en]
  16758. * [ja][/ja]
  16759. */
  16760. /**
  16761. * @attribute input-id
  16762. * @type {String}
  16763. * @description
  16764. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  16765. * [ja][/ja]
  16766. */
  16767. /**
  16768. * @property value
  16769. * @type {String}
  16770. * @description
  16771. * [en]The current value of the input.[/en]
  16772. * [ja][/ja]
  16773. */
  16774. /**
  16775. * @property disabled
  16776. * @type {Boolean}
  16777. * @description
  16778. * [en]Whether the input is disabled or not.[/en]
  16779. * [ja]無効化されている場合に`true`。[/ja]
  16780. */
  16781. }, {
  16782. key: '_scheme',
  16783. get: function get$$1() {
  16784. return scheme$12;
  16785. }
  16786. }, {
  16787. key: '_template',
  16788. get: function get$$1() {
  16789. return '\n <input type="' + this.type + '" class="text-input">\n <span class="text-input__label"></span>\n ';
  16790. }
  16791. }, {
  16792. key: 'type',
  16793. get: function get$$1() {
  16794. var type = this.getAttribute('type');
  16795. return ['checkbox', 'radio'].indexOf(type) < 0 && type || 'text';
  16796. }
  16797. }, {
  16798. key: '_helper',
  16799. get: function get$$1() {
  16800. return this.querySelector('span');
  16801. }
  16802. }], [{
  16803. key: 'observedAttributes',
  16804. get: function get$$1() {
  16805. return [].concat(toConsumableArray(get(InputElement.__proto__ || Object.getPrototypeOf(InputElement), 'observedAttributes', this)), ['type']);
  16806. }
  16807. }]);
  16808. return InputElement;
  16809. }(BaseInputElement);
  16810. onsElements.Input = InputElement;
  16811. customElements.define('ons-input', InputElement);
  16812. /*
  16813. Copyright 2013-2015 ASIAL CORPORATION
  16814. Licensed under the Apache License, Version 2.0 (the "License");
  16815. you may not use this file except in compliance with the License.
  16816. You may obtain a copy of the License at
  16817. http://www.apache.org/licenses/LICENSE-2.0
  16818. Unless required by applicable law or agreed to in writing, software
  16819. distributed under the License is distributed on an "AS IS" BASIS,
  16820. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16821. See the License for the specific language governing permissions and
  16822. limitations under the License.
  16823. */
  16824. var BaseCheckboxElement = function (_BaseInputElement) {
  16825. inherits(BaseCheckboxElement, _BaseInputElement);
  16826. function BaseCheckboxElement() {
  16827. classCallCheck(this, BaseCheckboxElement);
  16828. var _this = possibleConstructorReturn(this, (BaseCheckboxElement.__proto__ || Object.getPrototypeOf(BaseCheckboxElement)).call(this));
  16829. if (_this.constructor === BaseCheckboxElement) {
  16830. util.throwAbstract();
  16831. }
  16832. contentReady(_this, function () {
  16833. _this.attributeChangedCallback('checked', null, _this.getAttribute('checked'));
  16834. });
  16835. return _this;
  16836. }
  16837. /* Inherited props */
  16838. createClass(BaseCheckboxElement, [{
  16839. key: 'attributeChangedCallback',
  16840. value: function attributeChangedCallback(name, last, current) {
  16841. switch (name) {
  16842. case 'checked':
  16843. this.checked = current !== null;
  16844. break;
  16845. default:
  16846. get(BaseCheckboxElement.prototype.__proto__ || Object.getPrototypeOf(BaseCheckboxElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  16847. }
  16848. }
  16849. }, {
  16850. key: '_template',
  16851. get: function get$$1() {
  16852. return '\n <input type="' + this.type + '" class="' + this._defaultClassName + '__input">\n <span class="' + this._defaultClassName + '__checkmark"></span>\n ';
  16853. }
  16854. /* Own props */
  16855. }, {
  16856. key: '_helper',
  16857. get: function get$$1() {
  16858. return this.querySelector('span');
  16859. }
  16860. }, {
  16861. key: 'checked',
  16862. get: function get$$1() {
  16863. return this._input.checked;
  16864. },
  16865. set: function set$$1(val) {
  16866. var _this2 = this;
  16867. contentReady(this, function () {
  16868. _this2._input.checked = val;
  16869. });
  16870. }
  16871. }], [{
  16872. key: 'observedAttributes',
  16873. get: function get$$1() {
  16874. return [].concat(toConsumableArray(get(BaseCheckboxElement.__proto__ || Object.getPrototypeOf(BaseCheckboxElement), 'observedAttributes', this)), ['checked']);
  16875. }
  16876. }]);
  16877. return BaseCheckboxElement;
  16878. }(BaseInputElement);
  16879. /*
  16880. Copyright 2013-2015 ASIAL CORPORATION
  16881. Licensed under the Apache License, Version 2.0 (the "License");
  16882. you may not use this file except in compliance with the License.
  16883. You may obtain a copy of the License at
  16884. http://www.apache.org/licenses/LICENSE-2.0
  16885. Unless required by applicable law or agreed to in writing, software
  16886. distributed under the License is distributed on an "AS IS" BASIS,
  16887. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16888. See the License for the specific language governing permissions and
  16889. limitations under the License.
  16890. */
  16891. var scheme$13 = {
  16892. '.checkbox': 'checkbox--*',
  16893. '.checkbox__input': 'checkbox--*__input',
  16894. '.checkbox__checkmark': 'checkbox--*__checkmark'
  16895. };
  16896. /**
  16897. * @element ons-checkbox
  16898. * @category form
  16899. * @modifier material
  16900. * [en]Displays a Material Design checkbox.[/en]
  16901. * [ja][/ja]
  16902. * @modifier noborder
  16903. * [en]iOS borderless checkbox.[/en]
  16904. * [ja][/ja]
  16905. * @description
  16906. * [en]
  16907. * A checkbox element. The component will automatically render as a Material Design checkbox on Android devices.
  16908. *
  16909. * Most attributes that can be used for a normal `<input type="checkbox">` element can also be used on the `<ons-checkbox>` element.
  16910. * [/en]
  16911. * [ja][/ja]
  16912. * @tutorial vanilla/Reference/checkbox
  16913. * @seealso ons-switch
  16914. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  16915. * [ja][/ja]
  16916. * @seealso ons-radio
  16917. * [en]The `<ons-radio>` element is used to display a radio button.[/en]
  16918. * [ja][/ja]
  16919. * @seealso ons-input
  16920. * [en]The `<ons-input>` element is used to display a text input.[/en]
  16921. * [ja][/ja]
  16922. * @seealso ons-search-input
  16923. * [en]The `<ons-search-input>` element is used to display a search input.[/en]
  16924. * [ja][/ja]
  16925. * @seealso ons-range
  16926. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  16927. * [ja][/ja]
  16928. * @seealso ons-select
  16929. * [en]The `<ons-select>` element is used to display a select box.[/en]
  16930. * [ja][/ja]
  16931. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  16932. * @example
  16933. * <ons-checkbox checked></ons-checkbox>
  16934. */
  16935. var CheckboxElement = function (_BaseCheckboxElement) {
  16936. inherits(CheckboxElement, _BaseCheckboxElement);
  16937. function CheckboxElement() {
  16938. classCallCheck(this, CheckboxElement);
  16939. return possibleConstructorReturn(this, (CheckboxElement.__proto__ || Object.getPrototypeOf(CheckboxElement)).apply(this, arguments));
  16940. }
  16941. createClass(CheckboxElement, [{
  16942. key: '_scheme',
  16943. get: function get$$1() {
  16944. return scheme$13;
  16945. }
  16946. }, {
  16947. key: '_defaultClassName',
  16948. get: function get$$1() {
  16949. return 'checkbox';
  16950. }
  16951. }, {
  16952. key: 'type',
  16953. get: function get$$1() {
  16954. return 'checkbox';
  16955. }
  16956. /**
  16957. * @attribute input-id
  16958. * @type {String}
  16959. * @description
  16960. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  16961. * [ja][/ja]
  16962. */
  16963. /**
  16964. * @property value
  16965. * @type {String}
  16966. * @description
  16967. * [en]The current value of the checkbox.[/en]
  16968. * [ja][/ja]
  16969. */
  16970. /**
  16971. * @property checked
  16972. * @type {Boolean}
  16973. * @description
  16974. * [en]Whether the checkbox is checked or not.[/en]
  16975. * [ja][/ja]
  16976. */
  16977. /**
  16978. * @property disabled
  16979. * @type {Boolean}
  16980. * @description
  16981. * [en]Whether the checkbox is disabled or not.[/en]
  16982. * [ja]無効化されている場合に`true`。[/ja]
  16983. */
  16984. }]);
  16985. return CheckboxElement;
  16986. }(BaseCheckboxElement);
  16987. onsElements.Checkbox = CheckboxElement;
  16988. customElements.define('ons-checkbox', CheckboxElement);
  16989. /*
  16990. Copyright 2013-2015 ASIAL CORPORATION
  16991. Licensed under the Apache License, Version 2.0 (the "License");
  16992. you may not use this file except in compliance with the License.
  16993. You may obtain a copy of the License at
  16994. http://www.apache.org/licenses/LICENSE-2.0
  16995. Unless required by applicable law or agreed to in writing, software
  16996. distributed under the License is distributed on an "AS IS" BASIS,
  16997. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16998. See the License for the specific language governing permissions and
  16999. limitations under the License.
  17000. */
  17001. var scheme$14 = {
  17002. '.radio-button': 'radio-button--*',
  17003. '.radio-button__input': 'radio-button--*__input',
  17004. '.radio-button__checkmark': 'radio-button--*__checkmark'
  17005. };
  17006. /**
  17007. * @element ons-radio
  17008. * @category form
  17009. * @modifier material
  17010. * [en]Displays a Material Design radio button.[/en]
  17011. * [ja][/ja]
  17012. * @description
  17013. * [en]
  17014. * A radio button element. The component will automatically render as a Material Design radio button on Android devices.
  17015. *
  17016. * Most attributes that can be used for a normal `<input type="radio">` element can also be used on the `<ons-radio>` element.
  17017. * [/en]
  17018. * [ja][/ja]
  17019. * @tutorial vanilla/Reference/radio
  17020. * @seealso ons-select
  17021. * [en]The `<ons-select>` element is used to display a select box.[/en]
  17022. * [ja][/ja]
  17023. * @seealso ons-checkbox
  17024. * [en]The `<ons-checkbox>` element is used to display a checkbox.[/en]
  17025. * [ja][/ja]
  17026. * @seealso ons-switch
  17027. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  17028. * [ja][/ja]
  17029. * @seealso ons-input
  17030. * [en]The `<ons-input>` element is used to display a text input.[/en]
  17031. * [ja][/ja]
  17032. * @seealso ons-search-input
  17033. * [en]The `<ons-search-input>` element is used to display a search input.[/en]
  17034. * [ja][/ja]
  17035. * @seealso ons-range
  17036. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  17037. * [ja][/ja]
  17038. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  17039. * @example
  17040. * <ons-radio checked></ons-radio>
  17041. */
  17042. var RadioElement = function (_BaseCheckboxElement) {
  17043. inherits(RadioElement, _BaseCheckboxElement);
  17044. function RadioElement() {
  17045. classCallCheck(this, RadioElement);
  17046. return possibleConstructorReturn(this, (RadioElement.__proto__ || Object.getPrototypeOf(RadioElement)).apply(this, arguments));
  17047. }
  17048. createClass(RadioElement, [{
  17049. key: '_scheme',
  17050. get: function get$$1() {
  17051. return scheme$14;
  17052. }
  17053. }, {
  17054. key: '_defaultClassName',
  17055. get: function get$$1() {
  17056. return 'radio-button';
  17057. }
  17058. }, {
  17059. key: 'type',
  17060. get: function get$$1() {
  17061. return 'radio';
  17062. }
  17063. /**
  17064. * @attribute input-id
  17065. * @type {String}
  17066. * @description
  17067. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  17068. * [ja][/ja]
  17069. */
  17070. /**
  17071. * @property value
  17072. * @type {String}
  17073. * @description
  17074. * [en]The current value of the radio button.[/en]
  17075. * [ja][/ja]
  17076. */
  17077. /**
  17078. * @property checked
  17079. * @type {Boolean}
  17080. * @description
  17081. * [en]Whether the radio button is checked or not.[/en]
  17082. * [ja][/ja]
  17083. */
  17084. /**
  17085. * @property disabled
  17086. * @type {Boolean}
  17087. * @description
  17088. * [en]Whether the radio button is disabled or not.[/en]
  17089. * [ja]無効化されている場合に`true`。[/ja]
  17090. */
  17091. }]);
  17092. return RadioElement;
  17093. }(BaseCheckboxElement);
  17094. onsElements.Radio = RadioElement;
  17095. customElements.define('ons-radio', RadioElement);
  17096. /*
  17097. Copyright 2013-2015 ASIAL CORPORATION
  17098. Licensed under the Apache License, Version 2.0 (the "License");
  17099. you may not use this file except in compliance with the License.
  17100. You may obtain a copy of the License at
  17101. http://www.apache.org/licenses/LICENSE-2.0
  17102. Unless required by applicable law or agreed to in writing, software
  17103. distributed under the License is distributed on an "AS IS" BASIS,
  17104. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17105. See the License for the specific language governing permissions and
  17106. limitations under the License.
  17107. */
  17108. var scheme$15 = {
  17109. '.search-input': 'search-input--*'
  17110. };
  17111. /**
  17112. * @element ons-search-input
  17113. * @category form
  17114. * @modifier material
  17115. * [en]Displays a Material Design search input.[/en]
  17116. * [ja][/ja]
  17117. * @description
  17118. * [en]
  17119. * A search input element. The component will automatically render as a Material Design search input on Android devices.
  17120. *
  17121. * Most attributes that can be used for a normal `<input>` element can also be used on the `<ons-search-input>` element.
  17122. * [/en]
  17123. * [ja][/ja]
  17124. * @tutorial vanilla/Reference/search-input
  17125. * @seealso ons-input
  17126. * [en]The `<ons-input>` element is used to display a text input.[/en]
  17127. * [ja][/ja]
  17128. * @seealso ons-range
  17129. * [en]The `<ons-range>` element is used to display a range slider.[/en]
  17130. * [ja][/ja]
  17131. * @seealso ons-switch
  17132. * [en]The `<ons-switch>` element is used to display a draggable toggle switch.[/en]
  17133. * [ja][/ja]
  17134. * @seealso ons-select
  17135. * [en]The `<ons-select>` element is used to display a select box.[/en]
  17136. * [ja][/ja]
  17137. * @seealso ons-checkbox
  17138. * [en]The `<ons-checkbox>` element is used to display a checkbox.[/en]
  17139. * [ja][/ja]
  17140. * @seealso ons-radio
  17141. * [en]The `<ons-radio>` element is used to display a radio button.[/en]
  17142. * [ja][/ja]
  17143. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  17144. * @example
  17145. * <ons-search-input placeholder="Search"></ons-search-input>
  17146. */
  17147. var SearchInputElement = function (_BaseInputElement) {
  17148. inherits(SearchInputElement, _BaseInputElement);
  17149. function SearchInputElement() {
  17150. classCallCheck(this, SearchInputElement);
  17151. return possibleConstructorReturn(this, (SearchInputElement.__proto__ || Object.getPrototypeOf(SearchInputElement)).apply(this, arguments));
  17152. }
  17153. createClass(SearchInputElement, [{
  17154. key: '_scheme',
  17155. get: function get$$1() {
  17156. return scheme$15;
  17157. }
  17158. }, {
  17159. key: '_template',
  17160. get: function get$$1() {
  17161. return '\n <input type="' + this.type + '" class="search-input">\n ';
  17162. }
  17163. }, {
  17164. key: 'type',
  17165. get: function get$$1() {
  17166. return 'search';
  17167. }
  17168. /**
  17169. * @attribute input-id
  17170. * @type {String}
  17171. * @description
  17172. * [en]Specify the "id" attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  17173. * [ja][/ja]
  17174. */
  17175. /**
  17176. * @property value
  17177. * @type {String}
  17178. * @description
  17179. * [en]The current value of the input.[/en]
  17180. * [ja][/ja]
  17181. */
  17182. /**
  17183. * @property disabled
  17184. * @type {Boolean}
  17185. * @description
  17186. * [en]Whether the input is disabled or not.[/en]
  17187. * [ja]無効化されている場合に`true`。[/ja]
  17188. */
  17189. }]);
  17190. return SearchInputElement;
  17191. }(BaseInputElement);
  17192. onsElements.SearchInput = SearchInputElement;
  17193. customElements.define('ons-search-input', SearchInputElement);
  17194. /*
  17195. Copyright 2013-2015 ASIAL CORPORATION
  17196. Licensed under the Apache License, Version 2.0 (the "License");
  17197. you may not use this file except in compliance with the License.
  17198. You may obtain a copy of the License at
  17199. http://www.apache.org/licenses/LICENSE-2.0
  17200. Unless required by applicable law or agreed to in writing, software
  17201. distributed under the License is distributed on an "AS IS" BASIS,
  17202. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17203. See the License for the specific language governing permissions and
  17204. limitations under the License.
  17205. */
  17206. var ModalAnimator = function (_BaseAnimator) {
  17207. inherits(ModalAnimator, _BaseAnimator);
  17208. /**
  17209. * @param {Object} options
  17210. * @param {String} options.timing
  17211. * @param {Number} options.duration
  17212. * @param {Number} options.delay
  17213. */
  17214. function ModalAnimator() {
  17215. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17216. _ref$timing = _ref.timing,
  17217. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  17218. _ref$delay = _ref.delay,
  17219. delay = _ref$delay === undefined ? 0 : _ref$delay,
  17220. _ref$duration = _ref.duration,
  17221. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  17222. classCallCheck(this, ModalAnimator);
  17223. return possibleConstructorReturn(this, (ModalAnimator.__proto__ || Object.getPrototypeOf(ModalAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  17224. }
  17225. /**
  17226. * @param {HTMLElement} modal
  17227. * @param {Function} callback
  17228. */
  17229. createClass(ModalAnimator, [{
  17230. key: 'show',
  17231. value: function show(modal, callback) {
  17232. callback();
  17233. }
  17234. /**
  17235. * @param {HTMLElement} modal
  17236. * @param {Function} callback
  17237. */
  17238. }, {
  17239. key: 'hide',
  17240. value: function hide(modal, callback) {
  17241. callback();
  17242. }
  17243. }]);
  17244. return ModalAnimator;
  17245. }(BaseAnimator);
  17246. /*
  17247. Copyright 2013-2015 ASIAL CORPORATION
  17248. Licensed under the Apache License, Version 2.0 (the "License");
  17249. you may not use this file except in compliance with the License.
  17250. You may obtain a copy of the License at
  17251. http://www.apache.org/licenses/LICENSE-2.0
  17252. Unless required by applicable law or agreed to in writing, software
  17253. distributed under the License is distributed on an "AS IS" BASIS,
  17254. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17255. See the License for the specific language governing permissions and
  17256. limitations under the License.
  17257. */
  17258. /**
  17259. * iOS style animator for dialog.
  17260. */
  17261. var FadeModalAnimator = function (_ModalAnimator) {
  17262. inherits(FadeModalAnimator, _ModalAnimator);
  17263. function FadeModalAnimator() {
  17264. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17265. _ref$timing = _ref.timing,
  17266. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  17267. _ref$delay = _ref.delay,
  17268. delay = _ref$delay === undefined ? 0 : _ref$delay,
  17269. _ref$duration = _ref.duration,
  17270. duration = _ref$duration === undefined ? 0.3 : _ref$duration;
  17271. classCallCheck(this, FadeModalAnimator);
  17272. return possibleConstructorReturn(this, (FadeModalAnimator.__proto__ || Object.getPrototypeOf(FadeModalAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  17273. }
  17274. /**
  17275. * @param {HTMLElement} modal
  17276. * @param {Function} callback
  17277. */
  17278. createClass(FadeModalAnimator, [{
  17279. key: 'show',
  17280. value: function show(modal, callback) {
  17281. callback = callback ? callback : function () {};
  17282. Animit(modal, this.def).default({ opacity: 0 }, { opacity: 1 }).queue(function (done) {
  17283. callback();
  17284. done();
  17285. }).play();
  17286. }
  17287. /**
  17288. * @param {HTMLElement} modal
  17289. * @param {Function} callback
  17290. */
  17291. }, {
  17292. key: 'hide',
  17293. value: function hide(modal, callback) {
  17294. callback = callback ? callback : function () {};
  17295. Animit(modal, this.def).default({ opacity: 1 }, { opacity: 0 }).queue(function (done) {
  17296. callback();
  17297. done();
  17298. }).play();
  17299. }
  17300. }]);
  17301. return FadeModalAnimator;
  17302. }(ModalAnimator);
  17303. /*
  17304. Copyright 2013-2015 ASIAL CORPORATION
  17305. Licensed under the Apache License, Version 2.0 (the "License");
  17306. you may not use this file except in compliance with the License.
  17307. You may obtain a copy of the License at
  17308. http://www.apache.org/licenses/LICENSE-2.0
  17309. Unless required by applicable law or agreed to in writing, software
  17310. distributed under the License is distributed on an "AS IS" BASIS,
  17311. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17312. See the License for the specific language governing permissions and
  17313. limitations under the License.
  17314. */
  17315. /**
  17316. * iOS style animator for modal.
  17317. */
  17318. var LiftModalAnimator = function (_ModalAnimator) {
  17319. inherits(LiftModalAnimator, _ModalAnimator);
  17320. function LiftModalAnimator() {
  17321. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17322. _ref$timing = _ref.timing,
  17323. timing = _ref$timing === undefined ? 'cubic-bezier( .1, .7, .1, 1)' : _ref$timing,
  17324. _ref$delay = _ref.delay,
  17325. delay = _ref$delay === undefined ? 0 : _ref$delay,
  17326. _ref$duration = _ref.duration,
  17327. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  17328. classCallCheck(this, LiftModalAnimator);
  17329. return possibleConstructorReturn(this, (LiftModalAnimator.__proto__ || Object.getPrototypeOf(LiftModalAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  17330. }
  17331. /**
  17332. * @param {HTMLElement} modal
  17333. * @param {Function} callback
  17334. */
  17335. createClass(LiftModalAnimator, [{
  17336. key: 'show',
  17337. value: function show(modal, callback) {
  17338. callback = callback ? callback : function () {};
  17339. Animit(modal, this.def).default({ transform: 'translate3d(0, 100%, 0)' }, { transform: 'translate3d(0, 0, 0)' }).queue(function (done) {
  17340. callback();
  17341. done();
  17342. }).play();
  17343. }
  17344. /**
  17345. * @param {HTMLElement} modal
  17346. * @param {Function} callback
  17347. */
  17348. }, {
  17349. key: 'hide',
  17350. value: function hide(modal, callback) {
  17351. callback = callback ? callback : function () {};
  17352. Animit(modal, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, 100%, 0)' }).queue(function (done) {
  17353. callback();
  17354. done();
  17355. }).play();
  17356. }
  17357. }]);
  17358. return LiftModalAnimator;
  17359. }(ModalAnimator);
  17360. /*
  17361. Copyright 2013-2015 ASIAL CORPORATION
  17362. Licensed under the Apache License, Version 2.0 (the "License");
  17363. you may not use this file except in compliance with the License.
  17364. You may obtain a copy of the License at
  17365. http://www.apache.org/licenses/LICENSE-2.0
  17366. Unless required by applicable law or agreed to in writing, software
  17367. distributed under the License is distributed on an "AS IS" BASIS,
  17368. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17369. See the License for the specific language governing permissions and
  17370. limitations under the License.
  17371. */
  17372. var scheme$16 = {
  17373. '': 'modal--*',
  17374. 'modal__content': 'modal--*__content'
  17375. };
  17376. var defaultClassName$8 = 'modal';
  17377. var _animatorDict$4 = {
  17378. 'default': ModalAnimator,
  17379. 'fade': FadeModalAnimator,
  17380. 'lift': LiftModalAnimator,
  17381. 'none': ModalAnimator
  17382. };
  17383. /**
  17384. * @element ons-modal
  17385. * @category dialog
  17386. * @description
  17387. * [en]
  17388. * Modal component that masks current screen. Underlying components are not subject to any events while the modal component is shown.
  17389. *
  17390. * This component can be used to block user input while some operation is running or to show some information to the user.
  17391. * [/en]
  17392. * [ja]
  17393. * 画面全体をマスクするモーダル用コンポーネントです。下側にあるコンポーネントは、
  17394. * モーダルが表示されている間はイベント通知が行われません。
  17395. * [/ja]
  17396. * @seealso ons-dialog
  17397. * [en]The `<ons-dialog>` component can be used to create a modal dialog.[/en]
  17398. * [ja][/ja]
  17399. * @codepen devIg
  17400. * @tutorial vanilla/reference/modal
  17401. * @example
  17402. * <ons-modal id="modal">
  17403. * Modal content
  17404. * </ons-modal>
  17405. * <script>
  17406. * var modal = document.getElementById('modal');
  17407. * modal.show();
  17408. * </script>
  17409. */
  17410. var ModalElement = function (_BaseDialogElement) {
  17411. inherits(ModalElement, _BaseDialogElement);
  17412. /**
  17413. * @event preshow
  17414. * @description
  17415. * [en]Fired just before the modal is displayed.[/en]
  17416. * [ja]モーダルが表示される直前に発火します。[/ja]
  17417. * @param {Object} event [en]Event object.[/en]
  17418. * @param {Object} event.modal
  17419. * [en]Component object.[/en]
  17420. * [ja]コンポーネントのオブジェクト。[/ja]
  17421. * @param {Function} event.cancel
  17422. * [en]Execute this function to stop the modal from being shown.[/en]
  17423. * [ja]この関数を実行すると、ダイアログの表示がキャンセルされます。[/ja]
  17424. */
  17425. /**
  17426. * @event postshow
  17427. * @description
  17428. * [en]Fired just after the modal is displayed.[/en]
  17429. * [ja]モーダルが表示された直後に発火します。[/ja]
  17430. * @param {Object} event [en]Event object.[/en]
  17431. * @param {Object} event.modal
  17432. * [en]Component object.[/en]
  17433. * [ja]コンポーネントのオブジェクト。[/ja]
  17434. */
  17435. /**
  17436. * @event prehide
  17437. * @description
  17438. * [en]Fired just before the modal is hidden.[/en]
  17439. * [ja]モーダルが隠れる直前に発火します。[/ja]
  17440. * @param {Object} event [en]Event object.[/en]
  17441. * @param {Object} event.modal
  17442. * [en]Component object.[/en]
  17443. * [ja]コンポーネントのオブジェクト。[/ja]
  17444. * @param {Function} event.cancel
  17445. * [en]Execute this function to stop the modal from being hidden.[/en]
  17446. * [ja]この関数を実行すると、ダイアログの非表示がキャンセルされます。[/ja]
  17447. */
  17448. /**
  17449. * @event posthide
  17450. * @description
  17451. * [en]Fired just after the modal is hidden.[/en]
  17452. * [ja]モーダルが隠れた後に発火します。[/ja]
  17453. * @param {Object} event [en]Event object.[/en]
  17454. * @param {Object} event.modal
  17455. * [en]Component object.[/en]
  17456. * [ja]コンポーネントのオブジェクト。[/ja]
  17457. */
  17458. /**
  17459. * @attribute animation
  17460. * @type {String}
  17461. * @default default
  17462. * @description
  17463. * [en]The animation used when showing and hiding the modal. Can be either `"none"`, `"fade"` or `"lift"`.[/en]
  17464. * [ja]モーダルを表示する際のアニメーション名を指定します。"none"もしくは"fade","lift"を指定できます。[/ja]
  17465. */
  17466. /**
  17467. * @attribute animation-options
  17468. * @type {Expression}
  17469. * @description
  17470. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  17471. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. <code>{duration: 0.2, delay: 1, timing: 'ease-in'}</code>[/ja]
  17472. */
  17473. function ModalElement() {
  17474. classCallCheck(this, ModalElement);
  17475. var _this = possibleConstructorReturn(this, (ModalElement.__proto__ || Object.getPrototypeOf(ModalElement)).call(this));
  17476. _this._defaultDBB = function () {
  17477. return undefined;
  17478. };
  17479. contentReady(_this, function () {
  17480. return _this._compile();
  17481. });
  17482. return _this;
  17483. }
  17484. createClass(ModalElement, [{
  17485. key: '_updateAnimatorFactory',
  17486. value: function _updateAnimatorFactory() {
  17487. return new AnimatorFactory({
  17488. animators: _animatorDict$4,
  17489. baseClass: ModalAnimator,
  17490. baseClassName: 'ModalAnimator',
  17491. defaultAnimation: this.getAttribute('animation')
  17492. });
  17493. }
  17494. /**
  17495. * @property onDeviceBackButton
  17496. * @type {Object}
  17497. * @description
  17498. * [en]Back-button handler.[/en]
  17499. * [ja]バックボタンハンドラ。[/ja]
  17500. */
  17501. }, {
  17502. key: '_compile',
  17503. value: function _compile() {
  17504. this.style.display = 'none';
  17505. this.style.zIndex = 10001;
  17506. this.classList.add(defaultClassName$8);
  17507. if (!util$1.findChild(this, '.modal__content')) {
  17508. var content = document.createElement('div');
  17509. content.classList.add('modal__content');
  17510. while (this.childNodes[0]) {
  17511. var node = this.childNodes[0];
  17512. this.removeChild(node);
  17513. content.insertBefore(node, null);
  17514. }
  17515. this.appendChild(content);
  17516. }
  17517. ModifierUtil.initModifier(this, this._scheme);
  17518. }
  17519. }, {
  17520. key: '_toggleStyle',
  17521. value: function _toggleStyle(shouldShow) {
  17522. this.style.display = shouldShow ? 'table' : 'none';
  17523. }
  17524. }, {
  17525. key: 'connectedCallback',
  17526. value: function connectedCallback() {
  17527. get(ModalElement.prototype.__proto__ || Object.getPrototypeOf(ModalElement.prototype), 'connectedCallback', this).call(this);
  17528. }
  17529. }, {
  17530. key: 'disconnectedCallback',
  17531. value: function disconnectedCallback() {
  17532. get(ModalElement.prototype.__proto__ || Object.getPrototypeOf(ModalElement.prototype), 'disconnectedCallback', this).call(this);
  17533. }
  17534. /**
  17535. * @property visible
  17536. * @readonly
  17537. * @type {Boolean}
  17538. * @description
  17539. * [en]Whether the element is visible or not.[/en]
  17540. * [ja]要素が見える場合に`true`。[/ja]
  17541. */
  17542. /**
  17543. * @method show
  17544. * @signature show([options])
  17545. * @param {Object} [options]
  17546. * [en]Parameter object.[/en]
  17547. * [ja]オプションを指定するオブジェクト。[/ja]
  17548. * @param {String} [options.animation]
  17549. * [en]Animation name. Available animations are `"none"` and `"fade"`.[/en]
  17550. * [ja]アニメーション名を指定します。"none", "fade"のいずれかを指定します。[/ja]
  17551. * @param {String} [options.animationOptions]
  17552. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  17553. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  17554. * @param {Function} [options.callback]
  17555. * [en]This function is called after the modal has been revealed.[/en]
  17556. * [ja]モーダルが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  17557. * @description
  17558. * [en]Show modal.[/en]
  17559. * [ja]モーダルを表示します。[/ja]
  17560. * @return {Promise}
  17561. * [en]Resolves to the displayed element[/en]
  17562. * [ja][/ja]
  17563. */
  17564. /**
  17565. * @method toggle
  17566. * @signature toggle([options])
  17567. * @param {Object} [options]
  17568. * [en]Parameter object.[/en]
  17569. * [ja]オプションを指定するオブジェクト。[/ja]
  17570. * @param {String} [options.animation]
  17571. * [en]Animation name. Available animations are `"none"` and `"fade"`.[/en]
  17572. * [ja]アニメーション名を指定します。"none", "fade"のいずれかを指定します。[/ja]
  17573. * @param {String} [options.animationOptions]
  17574. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  17575. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  17576. * @param {Function} [options.callback]
  17577. * [en]This function is called after the modal has been revealed.[/en]
  17578. * [ja]モーダルが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  17579. * @description
  17580. * [en]Toggle modal visibility.[/en]
  17581. * [ja]モーダルの表示を切り替えます。[/ja]
  17582. */
  17583. /**
  17584. * @method hide
  17585. * @signature hide([options])
  17586. * @param {Object} [options]
  17587. * [en]Parameter object.[/en]
  17588. * [ja]オプションを指定するオブジェクト。[/ja]
  17589. * @param {String} [options.animation]
  17590. * [en]Animation name. Available animations are `"none"` and `"fade"`.[/en]
  17591. * [ja]アニメーション名を指定します。"none", "fade"のいずれかを指定します。[/ja]
  17592. * @param {String} [options.animationOptions]
  17593. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  17594. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  17595. * @param {Function} [options.callback]
  17596. * [en]This function is called after the modal has been revealed.[/en]
  17597. * [ja]モーダルが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  17598. * @description
  17599. * [en]Hide modal.[/en]
  17600. * [ja]モーダルを非表示にします。[/ja]
  17601. * @return {Promise}
  17602. * [en]Resolves to the hidden element[/en]
  17603. * [ja][/ja]
  17604. */
  17605. }, {
  17606. key: 'attributeChangedCallback',
  17607. value: function attributeChangedCallback(name, last, current) {
  17608. if (name === 'class') {
  17609. util$1.restoreClass(this, defaultClassName$8, scheme$16);
  17610. } else {
  17611. get(ModalElement.prototype.__proto__ || Object.getPrototypeOf(ModalElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  17612. }
  17613. }
  17614. /**
  17615. * @param {String} name
  17616. * @param {Function} Animator
  17617. */
  17618. }, {
  17619. key: '_scheme',
  17620. get: function get$$1() {
  17621. return scheme$16;
  17622. }
  17623. }], [{
  17624. key: 'registerAnimator',
  17625. value: function registerAnimator(name, Animator) {
  17626. if (!(Animator.prototype instanceof ModalAnimator)) {
  17627. util$1.throwAnimator('Modal');
  17628. }
  17629. _animatorDict$4[name] = Animator;
  17630. }
  17631. }, {
  17632. key: 'observedAttributes',
  17633. get: function get$$1() {
  17634. return [].concat(toConsumableArray(get(ModalElement.__proto__ || Object.getPrototypeOf(ModalElement), 'observedAttributes', this)), ['class']);
  17635. }
  17636. }, {
  17637. key: 'animators',
  17638. get: function get$$1() {
  17639. return _animatorDict$4;
  17640. }
  17641. }, {
  17642. key: 'ModalAnimator',
  17643. get: function get$$1() {
  17644. return ModalAnimator;
  17645. }
  17646. }]);
  17647. return ModalElement;
  17648. }(BaseDialogElement);
  17649. onsElements.Modal = ModalElement;
  17650. customElements.define('ons-modal', ModalElement);
  17651. /*
  17652. Copyright 2013-2015 ASIAL CORPORATION
  17653. Licensed under the Apache License, Version 2.0 (the "License");
  17654. you may not use this file except in compliance with the License.
  17655. You may obtain a copy of the License at
  17656. http://www.apache.org/licenses/LICENSE-2.0
  17657. Unless required by applicable law or agreed to in writing, software
  17658. distributed under the License is distributed on an "AS IS" BASIS,
  17659. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17660. See the License for the specific language governing permissions and
  17661. limitations under the License.
  17662. */
  17663. var widthToPx = function widthToPx(width) {
  17664. var _ref = [parseInt(width, 10), /px/.test(width)],
  17665. value = _ref[0],
  17666. px = _ref[1];
  17667. return px ? value : Math.round(document.body.offsetWidth * value / 100);
  17668. };
  17669. var SwipeReveal = function () {
  17670. function SwipeReveal(params) {
  17671. var _this = this;
  17672. classCallCheck(this, SwipeReveal);
  17673. 'element ignoreSwipe isInitialState onDragCallback swipeMax swipeMin swipeMid'.split(/\s+/).forEach(function (key) {
  17674. return _this[key] = params[key];
  17675. });
  17676. this.elementHandler = params.elementHandler || params.element;
  17677. this.getThreshold = params.getThreshold || function () {
  17678. return .5;
  17679. };
  17680. this.getSide = params.getSide || function () {
  17681. return 'left';
  17682. };
  17683. this.handleGesture = this.handleGesture.bind(this);
  17684. this._shouldFixScroll = util$1.globals.actualMobileOS === 'ios';
  17685. }
  17686. createClass(SwipeReveal, [{
  17687. key: 'update',
  17688. value: function update() {
  17689. var swipeable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element.hasAttribute('swipeable');
  17690. if (!this.gestureDetector) {
  17691. this.gestureDetector = new GestureDetector(this.elementHandler, { dragMinDistance: 1, passive: !this._shouldFixScroll });
  17692. }
  17693. var action = swipeable ? 'on' : 'off';
  17694. this.gestureDetector[action]('drag dragstart dragend', this.handleGesture);
  17695. }
  17696. }, {
  17697. key: 'handleGesture',
  17698. value: function handleGesture(e) {
  17699. if (e.gesture) {
  17700. if (e.type === 'dragstart') {
  17701. this.onDragStart(e);
  17702. } else if (!this._ignoreDrag) {
  17703. e.type === 'dragend' ? this.onDragEnd(e) : this.onDrag(e);
  17704. }
  17705. }
  17706. }
  17707. }, {
  17708. key: 'onDragStart',
  17709. value: function onDragStart(event) {
  17710. var _this2 = this;
  17711. var getDistance = function getDistance() {
  17712. return _this2.getSide() === 'left' ? event.gesture.center.clientX : window.innerWidth - event.gesture.center.clientX;
  17713. };
  17714. this._ignoreDrag = event.consumed || !util$1.isValidGesture(event) || this.ignoreSwipe(event, getDistance());
  17715. if (!this._ignoreDrag) {
  17716. event.consume && event.consume();
  17717. event.consumed = true;
  17718. this._width = widthToPx(this.element.style.width || '100%');
  17719. this._startDistance = this._distance = !(this.isInitialState instanceof Function) || this.isInitialState() ? 0 : this._width;
  17720. util$1.iosPreventScroll(this.gestureDetector);
  17721. }
  17722. }
  17723. }, {
  17724. key: 'onDrag',
  17725. value: function onDrag(event) {
  17726. event.stopPropagation();
  17727. var delta = this.getSide() === 'left' ? event.gesture.deltaX : -event.gesture.deltaX;
  17728. var distance = Math.max(0, Math.min(this._width, this._startDistance + delta));
  17729. if (distance !== this._distance) {
  17730. this._distance = distance;
  17731. this.swipeMid(this._distance, this._width);
  17732. }
  17733. }
  17734. }, {
  17735. key: 'onDragEnd',
  17736. value: function onDragEnd(event) {
  17737. event.stopPropagation();
  17738. var direction = event.gesture.interimDirection;
  17739. var isSwipeMax = this.getSide() !== direction && this._distance > this._width * this.getThreshold();
  17740. isSwipeMax ? this.swipeMax() : this.swipeMin();
  17741. }
  17742. }, {
  17743. key: 'dispose',
  17744. value: function dispose() {
  17745. this.gestureDetector && this.gestureDetector.dispose();
  17746. this.gestureDetector = this.element = this.elementHandler = null;
  17747. }
  17748. }]);
  17749. return SwipeReveal;
  17750. }();
  17751. /*
  17752. Copyright 2013-2015 ASIAL CORPORATION
  17753. Licensed under the Apache License, Version 2.0 (the "License");
  17754. you may not use this file except in compliance with the License.
  17755. You may obtain a copy of the License at
  17756. http://www.apache.org/licenses/LICENSE-2.0
  17757. Unless required by applicable law or agreed to in writing, software
  17758. distributed under the License is distributed on an "AS IS" BASIS,
  17759. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17760. See the License for the specific language governing permissions and
  17761. limitations under the License.
  17762. */
  17763. var NavigatorAnimator = function (_BaseAnimator) {
  17764. inherits(NavigatorAnimator, _BaseAnimator);
  17765. /**
  17766. * @param {Object} options
  17767. * @param {String} options.timing
  17768. * @param {Number} options.duration
  17769. * @param {Number} options.delay
  17770. */
  17771. function NavigatorAnimator(options) {
  17772. classCallCheck(this, NavigatorAnimator);
  17773. options = util$1.extend({
  17774. timing: 'linear',
  17775. duration: '0.4',
  17776. delay: '0'
  17777. }, options || {});
  17778. return possibleConstructorReturn(this, (NavigatorAnimator.__proto__ || Object.getPrototypeOf(NavigatorAnimator)).call(this, options));
  17779. }
  17780. createClass(NavigatorAnimator, [{
  17781. key: 'push',
  17782. value: function push(enterPage, leavePage, callback) {
  17783. callback();
  17784. }
  17785. }, {
  17786. key: 'pop',
  17787. value: function pop(enterPage, leavePage, callback) {
  17788. callback();
  17789. }
  17790. }, {
  17791. key: 'block',
  17792. value: function block(page) {
  17793. var blocker = util$1.createElement('\n <div style="position: absolute; background-color: transparent; width: 100%; height: 100%; z-index: 100000"></div>\n ');
  17794. page.parentNode.appendChild(blocker);
  17795. return function () {
  17796. return blocker.remove();
  17797. };
  17798. }
  17799. }]);
  17800. return NavigatorAnimator;
  17801. }(BaseAnimator);
  17802. /*
  17803. Copyright 2013-2015 ASIAL CORPORATION
  17804. Licensed under the Apache License, Version 2.0 (the "License");
  17805. you may not use this file except in compliance with the License.
  17806. You may obtain a copy of the License at
  17807. http://www.apache.org/licenses/LICENSE-2.0
  17808. Unless required by applicable law or agreed to in writing, software
  17809. distributed under the License is distributed on an "AS IS" BASIS,
  17810. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17811. See the License for the specific language governing permissions and
  17812. limitations under the License.
  17813. */
  17814. /**
  17815. * Abstract swipe animator for iOS navigator transition.
  17816. */
  17817. var IOSSwipeNavigatorAnimator = function (_NavigatorAnimator) {
  17818. inherits(IOSSwipeNavigatorAnimator, _NavigatorAnimator);
  17819. createClass(IOSSwipeNavigatorAnimator, null, [{
  17820. key: 'swipeable',
  17821. get: function get$$1() {
  17822. return true;
  17823. }
  17824. }]);
  17825. function IOSSwipeNavigatorAnimator() {
  17826. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17827. var _ref$durationRestore = _ref.durationRestore,
  17828. durationRestore = _ref$durationRestore === undefined ? 0.1 : _ref$durationRestore,
  17829. _ref$durationSwipe = _ref.durationSwipe,
  17830. durationSwipe = _ref$durationSwipe === undefined ? 0.15 : _ref$durationSwipe,
  17831. _ref$timingSwipe = _ref.timingSwipe,
  17832. timingSwipe = _ref$timingSwipe === undefined ? 'linear' : _ref$timingSwipe,
  17833. rest = objectWithoutProperties(_ref, ['durationRestore', 'durationSwipe', 'timingSwipe']);
  17834. classCallCheck(this, IOSSwipeNavigatorAnimator);
  17835. var _this = possibleConstructorReturn(this, (IOSSwipeNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSSwipeNavigatorAnimator)).call(this, _extends({}, rest)));
  17836. if (_this.constructor === IOSSwipeNavigatorAnimator) {
  17837. util$1.throwAbstract();
  17838. }
  17839. _this.durationRestore = durationRestore;
  17840. _this.durationSwipe = durationSwipe;
  17841. _this.timingSwipe = timingSwipe;
  17842. _this.optSwipe = { timing: timingSwipe, duration: durationSwipe };
  17843. _this.optRestore = { timing: timingSwipe, duration: durationRestore };
  17844. _this.swipeShadow = util$1.createElement('<div style="position: absolute; height: 100%; width: 12px; right: 100%; top: 0; bottom: 0; z-index: -1;' + 'background: linear-gradient(to right, transparent 0, rgba(0,0,0,.04) 40%, rgba(0,0,0,.12) 80%, rgba(0,0,0,.16) 100%);"></div>');
  17845. _this.isDragStart = true;
  17846. return _this;
  17847. }
  17848. createClass(IOSSwipeNavigatorAnimator, [{
  17849. key: '_decompose',
  17850. value: function _decompose() {
  17851. util$1.throwMember();
  17852. }
  17853. }, {
  17854. key: '_shouldAnimateToolbar',
  17855. value: function _shouldAnimateToolbar() {
  17856. util$1.throwMember();
  17857. }
  17858. }, {
  17859. key: '_calculateDelta',
  17860. value: function _calculateDelta() {
  17861. util$1.throwMember();
  17862. }
  17863. }, {
  17864. key: '_dragStartSetup',
  17865. value: function _dragStartSetup(enterPage, leavePage) {
  17866. this.isDragStart = false;
  17867. // Avoid content clicks
  17868. this.unblock = get(IOSSwipeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSSwipeNavigatorAnimator.prototype), 'block', this).call(this, leavePage);
  17869. // Mask
  17870. enterPage.parentElement.insertBefore(this.backgroundMask, enterPage);
  17871. // Decomposition
  17872. this.target = {
  17873. enter: util$1.findToolbarPage(enterPage) || enterPage,
  17874. leave: util$1.findToolbarPage(leavePage) || leavePage
  17875. };
  17876. this.decomp = {
  17877. enter: this._decompose(this.target.enter),
  17878. leave: this._decompose(this.target.leave)
  17879. };
  17880. // Animation values
  17881. this.delta = this._calculateDelta(leavePage, this.decomp.leave);
  17882. this.shouldAnimateToolbar = this._shouldAnimateToolbar(this.target.enter, this.target.leave);
  17883. // Shadow && styles
  17884. if (this.shouldAnimateToolbar) {
  17885. this.swipeShadow.style.top = this.decomp.leave.toolbar.offsetHeight + 'px';
  17886. this.target.leave.appendChild(this.swipeShadow);
  17887. this._saveStyle(this.target.enter, this.target.leave);
  17888. } else {
  17889. leavePage.appendChild(this.swipeShadow);
  17890. this._saveStyle(enterPage, leavePage);
  17891. }
  17892. leavePage.classList.add('overflow-visible');
  17893. this.overflowElement = leavePage;
  17894. this.decomp.leave.content.classList.add('content-swiping');
  17895. }
  17896. }, {
  17897. key: 'translate',
  17898. value: function translate(distance, maxWidth, enterPage, leavePage) {
  17899. this.isSwiping = true;
  17900. if (enterPage.style.display === 'none') {
  17901. enterPage.style.display = '';
  17902. }
  17903. if (this.isDragStart) {
  17904. this.maxWidth = maxWidth;
  17905. this._dragStartSetup(enterPage, leavePage);
  17906. }
  17907. var swipeRatio = (distance - maxWidth) / maxWidth;
  17908. if (this.shouldAnimateToolbar) {
  17909. Animit.runAll(
  17910. /* Enter page */
  17911. Animit([this.decomp.enter.content, this.decomp.enter.bottomToolbar, this.decomp.enter.background]).queue({
  17912. transform: 'translate3d(' + swipeRatio * 25 + '%, 0, 0)',
  17913. opacity: 1 + swipeRatio * 10 / 100 // 0.9 -> 1
  17914. }), Animit(this.decomp.enter.toolbarCenter).queue({
  17915. transform: 'translate3d(' + this.delta.title * swipeRatio + 'px, 0, 0)',
  17916. opacity: 1 + swipeRatio // 0 -> 1
  17917. }), Animit(this.decomp.enter.backButtonLabel).queue({
  17918. opacity: 1 + swipeRatio * 10 / 100, // 0.9 -> 1
  17919. transform: 'translate3d(' + this.delta.label * swipeRatio + 'px, 0, 0)'
  17920. }), Animit(this.decomp.enter.other).queue({
  17921. opacity: 1 + swipeRatio // 0 -> 1
  17922. }),
  17923. /* Leave page */
  17924. Animit([this.decomp.leave.content, this.decomp.leave.bottomToolbar, this.decomp.leave.background, this.swipeShadow]).queue({
  17925. transform: 'translate3d(' + distance + 'px, 0, 0)'
  17926. }), Animit(this.decomp.leave.toolbar).queue({
  17927. opacity: -1 * swipeRatio // 1 -> 0
  17928. }), Animit(this.decomp.leave.toolbarCenter).queue({
  17929. transform: 'translate3d(' + (1 + swipeRatio) * 125 + '%, 0, 0)'
  17930. }), Animit(this.decomp.leave.backButtonLabel).queue({
  17931. opacity: -1 * swipeRatio, // 1 -> 0
  17932. transform: 'translate3d(' + this.delta.title * (1 + swipeRatio) + 'px, 0, 0)'
  17933. }),
  17934. /* Other */
  17935. Animit(this.swipeShadow).queue({
  17936. opacity: -1 * swipeRatio // 1 -> 0
  17937. }));
  17938. } else {
  17939. Animit.runAll(Animit(leavePage).queue({
  17940. transform: 'translate3d(' + distance + 'px, 0, 0)'
  17941. }), Animit(enterPage).queue({
  17942. transform: 'translate3d(' + swipeRatio * 25 + '%, 0, 0)',
  17943. opacity: 1 + swipeRatio * 10 / 100 // 0.9 -> 1
  17944. }), Animit(this.swipeShadow).queue({
  17945. opacity: -1 * swipeRatio // 1 -> 0
  17946. }));
  17947. }
  17948. }
  17949. }, {
  17950. key: 'restore',
  17951. value: function restore(enterPage, leavePage, callback) {
  17952. var _this2 = this;
  17953. if (this.isDragStart) {
  17954. return;
  17955. }
  17956. if (this.shouldAnimateToolbar) {
  17957. Animit.runAll(
  17958. /* Enter page */
  17959. Animit([this.decomp.enter.content, this.decomp.enter.bottomToolbar, this.decomp.enter.background]).queue({
  17960. transform: 'translate3d(-25%, 0, 0)',
  17961. opacity: 0.9
  17962. }, this.optRestore), Animit(this.decomp.enter.toolbarCenter).queue({
  17963. transform: 'translate3d(-' + this.delta.title + 'px, 0, 0)',
  17964. transition: 'opacity ' + this.durationRestore + 's linear, transform ' + this.durationRestore + 's ' + this.timingSwipe,
  17965. opacity: 0
  17966. }), Animit(this.decomp.enter.backButtonLabel).queue({
  17967. transform: 'translate3d(-' + this.delta.label + 'px, 0, 0)'
  17968. }, this.optRestore), Animit(this.decomp.enter.other).queue({
  17969. opacity: 0
  17970. }, this.optRestore),
  17971. /* Leave page */
  17972. Animit([this.decomp.leave.content, this.decomp.leave.bottomToolbar, this.decomp.leave.background, this.swipeShadow]).queue({
  17973. transform: 'translate3d(0, 0, 0)'
  17974. }, this.optRestore), Animit(this.decomp.leave.toolbar).queue({
  17975. opacity: 1
  17976. }, this.optRestore), Animit(this.decomp.leave.toolbarCenter).queue({
  17977. transform: 'translate3d(0, 0, 0)'
  17978. }, this.optRestore), Animit(this.decomp.leave.backButtonLabel).queue({
  17979. opacity: 1,
  17980. transform: 'translate3d(0, 0, 0)',
  17981. transition: 'opacity ' + this.durationRestore + 's linear, transform ' + this.durationRestore + 's ' + this.timingSwipe
  17982. }),
  17983. /* Other */
  17984. Animit(this.swipeShadow).queue({
  17985. opacity: 0
  17986. }, this.optRestore).queue(function (done) {
  17987. _this2._reset(_this2.target.enter, _this2.target.leave);
  17988. enterPage.style.display = 'none';
  17989. callback && callback();
  17990. done();
  17991. }));
  17992. } else {
  17993. Animit.runAll(Animit(enterPage).queue({
  17994. transform: 'translate3D(-25%, 0, 0)',
  17995. opacity: 0.9
  17996. }, this.optRestore), Animit(leavePage).queue({
  17997. transform: 'translate3D(0, 0, 0)'
  17998. }, this.optRestore).queue(function (done) {
  17999. _this2._reset(enterPage, leavePage);
  18000. enterPage.style.display = 'none';
  18001. callback && callback();
  18002. done();
  18003. }));
  18004. }
  18005. }
  18006. }, {
  18007. key: 'popSwipe',
  18008. value: function popSwipe(enterPage, leavePage, callback) {
  18009. var _this3 = this;
  18010. if (this.isDragStart) {
  18011. return;
  18012. }
  18013. if (this.shouldAnimateToolbar) {
  18014. Animit.runAll(
  18015. /* Enter page */
  18016. Animit([this.decomp.enter.content, this.decomp.enter.bottomToolbar, this.decomp.enter.background]).queue({
  18017. transform: 'translate3d(0, 0, 0)',
  18018. opacity: 1
  18019. }, this.optSwipe), Animit(this.decomp.enter.toolbarCenter).queue({
  18020. transform: 'translate3d(0, 0, 0)',
  18021. transition: 'opacity ' + this.durationSwipe + 's linear, transform ' + this.durationSwipe + 's ' + this.timingSwipe,
  18022. opacity: 1
  18023. }), Animit(this.decomp.enter.backButtonLabel).queue({
  18024. transform: 'translate3d(0, 0, 0)'
  18025. }, this.optSwipe), Animit(this.decomp.enter.other).queue({
  18026. opacity: 1
  18027. }, this.optSwipe),
  18028. /* Leave page */
  18029. Animit([this.decomp.leave.content, this.decomp.leave.bottomToolbar, this.decomp.leave.background]).queue({
  18030. transform: 'translate3d(100%, 0, 0)'
  18031. }, this.optSwipe), Animit(this.decomp.leave.toolbar).queue({
  18032. opacity: 0
  18033. }, this.optSwipe), Animit(this.decomp.leave.toolbarCenter).queue({
  18034. transform: 'translate3d(125%, 0, 0)'
  18035. }, this.optSwipe), Animit(this.decomp.leave.backButtonLabel).queue({
  18036. opacity: 0,
  18037. transform: 'translate3d(' + this.delta.title + 'px, 0, 0)',
  18038. transition: 'opacity ' + this.durationSwipe + 's linear, transform ' + this.durationSwipe + 's ' + this.timingSwipe
  18039. }),
  18040. /* Other */
  18041. Animit(this.swipeShadow).queue({
  18042. opacity: 0,
  18043. transform: 'translate3d(' + this.maxWidth + 'px, 0, 0)'
  18044. }, this.optSwipe).queue(function (done) {
  18045. _this3._reset(_this3.target.enter, _this3.target.leave);
  18046. callback && callback();
  18047. done();
  18048. }));
  18049. } else {
  18050. Animit.runAll(Animit(enterPage).queue({
  18051. transform: 'translate3D(0, 0, 0)',
  18052. opacity: 1.0
  18053. }, this.optSwipe), Animit(leavePage).queue({
  18054. transform: 'translate3D(100%, 0, 0)'
  18055. }, this.optSwipe).queue(function (done) {
  18056. _this3._reset(enterPage, leavePage);
  18057. callback && callback();
  18058. done();
  18059. }));
  18060. }
  18061. }
  18062. }, {
  18063. key: '_saveStyle',
  18064. value: function _saveStyle() {
  18065. var _this4 = this;
  18066. this._savedStyle = new WeakMap();
  18067. var save = function save(el) {
  18068. return _this4._savedStyle.set(el, el.getAttribute('style'));
  18069. };
  18070. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  18071. args[_key] = arguments[_key];
  18072. }
  18073. args.forEach(save);
  18074. Object.keys(this.decomp).forEach(function (p) {
  18075. Object.keys(_this4.decomp[p]).forEach(function (k) {
  18076. (_this4.decomp[p][k] instanceof Array ? _this4.decomp[p][k] : [_this4.decomp[p][k]]).forEach(save);
  18077. });
  18078. });
  18079. }
  18080. }, {
  18081. key: '_restoreStyle',
  18082. value: function _restoreStyle() {
  18083. var _this5 = this;
  18084. var restore = function restore(el) {
  18085. _this5._savedStyle.get(el) === null ? el.removeAttribute('style') : el.setAttribute('style', _this5._savedStyle.get(el));
  18086. _this5._savedStyle.delete(el);
  18087. };
  18088. for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  18089. args[_key2] = arguments[_key2];
  18090. }
  18091. args.forEach(restore);
  18092. Object.keys(this.decomp).forEach(function (p) {
  18093. Object.keys(_this5.decomp[p]).forEach(function (k) {
  18094. (_this5.decomp[p][k] instanceof Array ? _this5.decomp[p][k] : [_this5.decomp[p][k]]).forEach(restore);
  18095. });
  18096. });
  18097. }
  18098. }, {
  18099. key: '_reset',
  18100. value: function _reset() {
  18101. this.isSwiping = false;
  18102. this._savedStyle && this._restoreStyle.apply(this, arguments);
  18103. this.unblock && this.unblock();
  18104. this.swipeShadow.remove();
  18105. this.backgroundMask.remove();
  18106. this.overflowElement.classList.remove('overflow-visible');
  18107. this.decomp.leave.content.classList.remove('content-swiping');
  18108. this.decomp = this.target = this.overflowElement = this._savedStyle = null;
  18109. this.isDragStart = true;
  18110. }
  18111. }]);
  18112. return IOSSwipeNavigatorAnimator;
  18113. }(NavigatorAnimator);
  18114. /*
  18115. Copyright 2013-2015 ASIAL CORPORATION
  18116. Licensed under the Apache License, Version 2.0 (the "License");
  18117. you may not use this file except in compliance with the License.
  18118. You may obtain a copy of the License at
  18119. http://www.apache.org/licenses/LICENSE-2.0
  18120. Unless required by applicable law or agreed to in writing, software
  18121. distributed under the License is distributed on an "AS IS" BASIS,
  18122. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18123. See the License for the specific language governing permissions and
  18124. limitations under the License.
  18125. */
  18126. var translate3d = function translate3d() {
  18127. var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  18128. var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  18129. var z = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  18130. return 'translate3d(' + x + ', ' + y + ', ' + z + ')';
  18131. };
  18132. /**
  18133. * Slide animator for navigator transition like iOS's screen slide transition.
  18134. */
  18135. var IOSSlideNavigatorAnimator = function (_IOSSwipeNavigatorAni) {
  18136. inherits(IOSSlideNavigatorAnimator, _IOSSwipeNavigatorAni);
  18137. function IOSSlideNavigatorAnimator() {
  18138. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18139. var _ref$timing = _ref.timing,
  18140. timing = _ref$timing === undefined ? 'cubic-bezier(0.3, .4, 0, .9)' : _ref$timing,
  18141. _ref$delay = _ref.delay,
  18142. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18143. _ref$duration = _ref.duration,
  18144. duration = _ref$duration === undefined ? 0.4 : _ref$duration,
  18145. rest = objectWithoutProperties(_ref, ['timing', 'delay', 'duration']);
  18146. classCallCheck(this, IOSSlideNavigatorAnimator);
  18147. var _this = possibleConstructorReturn(this, (IOSSlideNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSSlideNavigatorAnimator)).call(this, _extends({ timing: timing, delay: delay, duration: duration }, rest)));
  18148. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%;' + 'background-color: black; z-index: 2"></div>');
  18149. return _this;
  18150. }
  18151. createClass(IOSSlideNavigatorAnimator, [{
  18152. key: '_decompose',
  18153. value: function _decompose(page) {
  18154. var toolbar = page._getToolbarElement();
  18155. var left = toolbar._getToolbarLeftItemsElement();
  18156. var right = toolbar._getToolbarRightItemsElement();
  18157. var excludeBackButton = function excludeBackButton(elements) {
  18158. var result = [];
  18159. for (var i = 0; i < elements.length; i++) {
  18160. if (elements[i].nodeName.toLowerCase() !== 'ons-back-button') {
  18161. result.push(elements[i]);
  18162. }
  18163. }
  18164. return result;
  18165. };
  18166. var other = [].concat(left.children.length === 0 ? left : excludeBackButton(left.children)).concat(right.children.length === 0 ? right : excludeBackButton(right.children));
  18167. return {
  18168. toolbarCenter: toolbar._getToolbarCenterItemsElement(),
  18169. backButtonIcon: toolbar._getToolbarBackButtonIconElement(),
  18170. backButtonLabel: toolbar._getToolbarBackButtonLabelElement(),
  18171. other: other,
  18172. content: page._getContentElement(),
  18173. background: page._getBackgroundElement(),
  18174. toolbar: toolbar,
  18175. bottomToolbar: page._getBottomToolbarElement()
  18176. };
  18177. }
  18178. }, {
  18179. key: '_shouldAnimateToolbar',
  18180. value: function _shouldAnimateToolbar(enterPage, leavePage) {
  18181. var toolbars = enterPage._canAnimateToolbar() && leavePage._canAnimateToolbar();
  18182. var enterToolbar = enterPage._getToolbarElement();
  18183. var leaveToolbar = leavePage._getToolbarElement();
  18184. var isStatic = enterToolbar.hasAttribute('static') || leaveToolbar.hasAttribute('static');
  18185. var isMaterial = util$1.hasModifier(enterToolbar, 'material') || util$1.hasModifier(leaveToolbar, 'material');
  18186. var isTransparent = util$1.hasModifier(enterToolbar, 'transparent') || util$1.hasModifier(leaveToolbar, 'transparent');
  18187. return toolbars && !isStatic && !isMaterial && !isTransparent;
  18188. }
  18189. }, {
  18190. key: '_calculateDelta',
  18191. value: function _calculateDelta(element, decomposition) {
  18192. var title = void 0,
  18193. label = void 0;
  18194. var pageRect = element.getBoundingClientRect();
  18195. if (decomposition.backButtonLabel.classList.contains('back-button__label')) {
  18196. var labelRect = decomposition.backButtonLabel.getBoundingClientRect();
  18197. title = Math.round(pageRect.width / 2 - labelRect.width / 2 - labelRect.left);
  18198. } else {
  18199. title = Math.round(pageRect.width / 2 * 0.6);
  18200. }
  18201. if (decomposition.backButtonIcon.classList.contains('back-button__icon')) {
  18202. label = decomposition.backButtonIcon.getBoundingClientRect().right - 2;
  18203. }
  18204. return { title: title, label: label };
  18205. }
  18206. /**
  18207. * @param {Object} enterPage
  18208. * @param {Object} leavePage
  18209. * @param {Function} callback
  18210. */
  18211. }, {
  18212. key: 'push',
  18213. value: function push(enterPage, leavePage, callback) {
  18214. var _this2 = this;
  18215. this.backgroundMask.remove();
  18216. leavePage.parentNode.insertBefore(this.backgroundMask, leavePage);
  18217. var unblock = get(IOSSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18218. contentReady(enterPage, function () {
  18219. var enterPageTarget = util$1.findToolbarPage(enterPage) || enterPage;
  18220. var leavePageTarget = util$1.findToolbarPage(leavePage) || leavePage;
  18221. var enterPageDecomposition = _this2._decompose(enterPageTarget);
  18222. var leavePageDecomposition = _this2._decompose(leavePageTarget);
  18223. var delta = _this2._calculateDelta(leavePage, enterPageDecomposition);
  18224. var shouldAnimateToolbar = _this2._shouldAnimateToolbar(enterPageTarget, leavePageTarget);
  18225. if (shouldAnimateToolbar) {
  18226. Animit.runAll(Animit([enterPageDecomposition.content, enterPageDecomposition.bottomToolbar, enterPageDecomposition.background], _this2.def).default({ transform: translate3d('100%') }, { transform: translate3d() }), Animit(enterPageDecomposition.toolbar, _this2.def).default({ opacity: 0 }, { opacity: 1 }), Animit(enterPageDecomposition.toolbarCenter, _this2.def).default({ transform: translate3d('125%'), opacity: 1 }, { transform: translate3d(), opacity: 1 }), Animit(enterPageDecomposition.backButtonLabel, _this2.def).default({ transform: translate3d(delta.title + 'px'), opacity: 0 }, {
  18227. transform: translate3d(),
  18228. opacity: 1,
  18229. transition: 'opacity ' + _this2.duration + 's linear, transform ' + _this2.duration + 's ' + _this2.timing
  18230. }), Animit(enterPageDecomposition.other, _this2.def).default({ opacity: 0 }, { css: { opacity: 1 }, timing: 'linear' }), Animit([leavePageDecomposition.content, leavePageDecomposition.bottomToolbar, leavePageDecomposition.background], _this2.def).default({ transform: translate3d(), opacity: 1 }, { transform: translate3d('-25%'), opacity: 0.9 }).queue(function (done) {
  18231. _this2.backgroundMask.remove();
  18232. unblock();
  18233. callback();
  18234. done();
  18235. }), Animit(leavePageDecomposition.toolbarCenter, _this2.def).default({ transform: translate3d(), opacity: 1 }, {
  18236. transform: translate3d('-' + delta.title + 'px'),
  18237. opacity: 0,
  18238. transition: 'opacity ' + _this2.duration + 's linear, transform ' + _this2.duration + 's ' + _this2.timing
  18239. }), Animit(leavePageDecomposition.backButtonLabel, _this2.def).default({ transform: translate3d(), opacity: 1 }, { transform: translate3d('-' + delta.label + 'px'), opacity: 0 }), Animit(leavePageDecomposition.other, _this2.def).default({ opacity: 1 }, { css: { opacity: 0 }, timing: 'linear' }));
  18240. } else {
  18241. Animit.runAll(Animit(enterPage, _this2.def).default({ transform: translate3d('100%') }, { transform: translate3d() }), Animit(leavePage, _this2.def).default({ transform: translate3d(), opacity: 1 }, { transform: translate3d('-25%'), opacity: .9 }).queue(function (done) {
  18242. _this2.backgroundMask.remove();
  18243. unblock();
  18244. callback();
  18245. done();
  18246. }));
  18247. }
  18248. });
  18249. }
  18250. /**
  18251. * @param {Object} enterPage
  18252. * @param {Object} leavePage
  18253. * @param {Function} callback
  18254. */
  18255. }, {
  18256. key: 'pop',
  18257. value: function pop(enterPage, leavePage, callback) {
  18258. var _this3 = this;
  18259. if (this.isSwiping) {
  18260. return this.popSwipe(enterPage, leavePage, callback);
  18261. }
  18262. this.backgroundMask.remove();
  18263. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage);
  18264. var unblock = get(IOSSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18265. var enterPageTarget = util$1.findToolbarPage(enterPage) || enterPage;
  18266. var leavePageTarget = util$1.findToolbarPage(leavePage) || leavePage;
  18267. var enterPageDecomposition = this._decompose(enterPageTarget);
  18268. var leavePageDecomposition = this._decompose(leavePageTarget);
  18269. var delta = this._calculateDelta(leavePage, leavePageDecomposition);
  18270. var shouldAnimateToolbar = this._shouldAnimateToolbar(enterPageTarget, leavePageTarget);
  18271. if (shouldAnimateToolbar) {
  18272. Animit.runAll(Animit([enterPageDecomposition.content, enterPageDecomposition.bottomToolbar, enterPageDecomposition.background], this.def).default({ transform: translate3d('-25%'), opacity: .9 }, { transform: translate3d(), opacity: 1 }), Animit(enterPageDecomposition.toolbarCenter, this.def).default({ transform: translate3d('-' + delta.title + 'px'), opacity: 0 }, {
  18273. transform: translate3d(),
  18274. opacity: 1,
  18275. transition: 'opacity ' + this.duration + 's linear, transform ' + this.duration + 's ' + this.timing
  18276. }), Animit(enterPageDecomposition.backButtonLabel, this.def).default({ transform: translate3d('-' + delta.label + 'px') }, { transform: translate3d() }), Animit(enterPageDecomposition.other, this.def).default({ opacity: 0 }, { css: { opacity: 1 }, timing: 'linear' }), Animit([leavePageDecomposition.content, leavePageDecomposition.bottomToolbar, leavePageDecomposition.background], this.def).default({ transform: translate3d() }, { transform: translate3d('100%') }).wait(0).queue(function (done) {
  18277. _this3.backgroundMask.remove();
  18278. unblock();
  18279. callback();
  18280. done();
  18281. }), Animit(leavePageDecomposition.toolbar, this.def).default({ opacity: 1 }, { opacity: 0 }), Animit(leavePageDecomposition.toolbarCenter, this.def).default({ transform: translate3d() }, { transform: translate3d('125%') }), Animit(leavePageDecomposition.backButtonLabel, this.def).default({ transform: translate3d(), opacity: 1 }, {
  18282. transform: translate3d(delta.title + 'px'),
  18283. opacity: 0,
  18284. transition: 'opacity ' + this.duration + 's linear, transform ' + this.duration + 's ' + this.timing
  18285. }));
  18286. } else {
  18287. Animit.runAll(Animit(enterPage, this.def).default({ transform: translate3d('-25%'), opacity: .9 }, { transform: translate3d(), opacity: 1 }), Animit(leavePage, this.def).default({ transform: translate3d() }, { transform: translate3d('100%') }).queue(function (done) {
  18288. _this3.backgroundMask.remove();
  18289. unblock();
  18290. callback();
  18291. done();
  18292. }));
  18293. }
  18294. }
  18295. }]);
  18296. return IOSSlideNavigatorAnimator;
  18297. }(IOSSwipeNavigatorAnimator);
  18298. /*
  18299. Copyright 2013-2015 ASIAL CORPORATION
  18300. Licensed under the Apache License, Version 2.0 (the "License");
  18301. you may not use this file except in compliance with the License.
  18302. You may obtain a copy of the License at
  18303. http://www.apache.org/licenses/LICENSE-2.0
  18304. Unless required by applicable law or agreed to in writing, software
  18305. distributed under the License is distributed on an "AS IS" BASIS,
  18306. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18307. See the License for the specific language governing permissions and
  18308. limitations under the License.
  18309. */
  18310. /**
  18311. * Lift screen transition.
  18312. */
  18313. var IOSLiftNavigatorAnimator = function (_NavigatorAnimator) {
  18314. inherits(IOSLiftNavigatorAnimator, _NavigatorAnimator);
  18315. function IOSLiftNavigatorAnimator() {
  18316. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18317. _ref$timing = _ref.timing,
  18318. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .1, 1)' : _ref$timing,
  18319. _ref$delay = _ref.delay,
  18320. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18321. _ref$duration = _ref.duration,
  18322. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  18323. classCallCheck(this, IOSLiftNavigatorAnimator);
  18324. var _this = possibleConstructorReturn(this, (IOSLiftNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSLiftNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18325. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%;' + 'background: linear-gradient(black, white);"></div>');
  18326. return _this;
  18327. }
  18328. /**
  18329. * @param {Object} enterPage
  18330. * @param {Object} leavePage
  18331. * @param {Function} callback
  18332. */
  18333. createClass(IOSLiftNavigatorAnimator, [{
  18334. key: 'push',
  18335. value: function push(enterPage, leavePage, callback) {
  18336. var _this2 = this;
  18337. this.backgroundMask.remove();
  18338. leavePage.parentNode.insertBefore(this.backgroundMask, leavePage);
  18339. var unblock = get(IOSLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18340. Animit.runAll(Animit(enterPage, this.def).default({ transform: 'translate3D(0, 100%, 0)' }, { transform: 'translate3D(0, 0, 0)' }), Animit(leavePage, this.def).default({ transform: 'translate3D(0, 0, 0)', opacity: 1 }, { transform: 'translate3D(0, -10%, 0)', opacity: .9 }).queue(function (done) {
  18341. _this2.backgroundMask.remove();
  18342. unblock();
  18343. callback();
  18344. done();
  18345. }));
  18346. }
  18347. /**
  18348. * @param {Object} enterPage
  18349. * @param {Object} leavePage
  18350. * @param {Function} callback
  18351. */
  18352. }, {
  18353. key: 'pop',
  18354. value: function pop(enterPage, leavePage, callback) {
  18355. var _this3 = this;
  18356. this.backgroundMask.remove();
  18357. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage);
  18358. var unblock = get(IOSLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18359. Animit.runAll(Animit(enterPage, this.def).default({ transform: 'translate3D(0, -43px, 0)', opacity: .9 }, { transform: 'translate3D(0, 0, 0)', opacity: 1 }).queue(function (done) {
  18360. _this3.backgroundMask.remove();
  18361. unblock();
  18362. callback();
  18363. done();
  18364. }), Animit(leavePage, this.def).default({ transform: 'translate3D(0, 0, 0)' }, { transform: 'translate3D(0, 100%, 0)' }));
  18365. }
  18366. }]);
  18367. return IOSLiftNavigatorAnimator;
  18368. }(NavigatorAnimator);
  18369. /*
  18370. Copyright 2013-2015 ASIAL CORPORATION
  18371. Licensed under the Apache License, Version 2.0 (the "License");
  18372. you may not use this file except in compliance with the License.
  18373. You may obtain a copy of the License at
  18374. http://www.apache.org/licenses/LICENSE-2.0
  18375. Unless required by applicable law or agreed to in writing, software
  18376. distributed under the License is distributed on an "AS IS" BASIS,
  18377. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18378. See the License for the specific language governing permissions and
  18379. limitations under the License.
  18380. */
  18381. var transform = 'translate3d(0, 0, 0)';
  18382. /**
  18383. * Fade-in screen transition.
  18384. */
  18385. var IOSFadeNavigatorAnimator = function (_NavigatorAnimator) {
  18386. inherits(IOSFadeNavigatorAnimator, _NavigatorAnimator);
  18387. function IOSFadeNavigatorAnimator() {
  18388. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18389. _ref$timing = _ref.timing,
  18390. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  18391. _ref$delay = _ref.delay,
  18392. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18393. _ref$duration = _ref.duration,
  18394. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  18395. classCallCheck(this, IOSFadeNavigatorAnimator);
  18396. return possibleConstructorReturn(this, (IOSFadeNavigatorAnimator.__proto__ || Object.getPrototypeOf(IOSFadeNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18397. }
  18398. /**
  18399. * @param {Object} enterPage
  18400. * @param {Object} leavePage
  18401. * @param {Function} callback
  18402. */
  18403. createClass(IOSFadeNavigatorAnimator, [{
  18404. key: 'push',
  18405. value: function push(enterPage, leavePage, callback) {
  18406. var unblock = get(IOSFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18407. Animit.runAll(Animit(enterPage, this.def).default({ transform: transform, opacity: 0 }, { transform: transform, opacity: 1 }).queue(function (done) {
  18408. unblock();
  18409. callback();
  18410. done();
  18411. }));
  18412. }
  18413. /**
  18414. * @param {Object} enterPage
  18415. * @param {Object} leavePage
  18416. * @param {Function} done
  18417. */
  18418. }, {
  18419. key: 'pop',
  18420. value: function pop(enterPage, leavePage, callback) {
  18421. var unblock = get(IOSFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(IOSFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18422. Animit.runAll(Animit(leavePage, this.def).default({ transform: transform, opacity: 1 }, { transform: transform, opacity: 0 }).queue(function (done) {
  18423. unblock();
  18424. callback();
  18425. done();
  18426. }));
  18427. }
  18428. }]);
  18429. return IOSFadeNavigatorAnimator;
  18430. }(NavigatorAnimator);
  18431. /*
  18432. Copyright 2013-2015 ASIAL CORPORATION
  18433. Licensed under the Apache License, Version 2.0 (the "License");
  18434. you may not use this file except in compliance with the License.
  18435. You may obtain a copy of the License at
  18436. http://www.apache.org/licenses/LICENSE-2.0
  18437. Unless required by applicable law or agreed to in writing, software
  18438. distributed under the License is distributed on an "AS IS" BASIS,
  18439. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18440. See the License for the specific language governing permissions and
  18441. limitations under the License.
  18442. */
  18443. /**
  18444. * Slide animator for navigator transition.
  18445. */
  18446. var MDSlideNavigatorAnimator = function (_NavigatorAnimator) {
  18447. inherits(MDSlideNavigatorAnimator, _NavigatorAnimator);
  18448. function MDSlideNavigatorAnimator() {
  18449. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18450. _ref$timing = _ref.timing,
  18451. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref$timing,
  18452. _ref$delay = _ref.delay,
  18453. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18454. _ref$duration = _ref.duration,
  18455. duration = _ref$duration === undefined ? 0.3 : _ref$duration;
  18456. classCallCheck(this, MDSlideNavigatorAnimator);
  18457. var _this = possibleConstructorReturn(this, (MDSlideNavigatorAnimator.__proto__ || Object.getPrototypeOf(MDSlideNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18458. _this.blackMaskOpacity = 0.4;
  18459. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%; z-index: 2;' + 'background-color: black; opacity: 0;"></div>');
  18460. return _this;
  18461. }
  18462. /**
  18463. * @param {Object} enterPage
  18464. * @param {Object} leavePage
  18465. * @param {Function} callback
  18466. */
  18467. createClass(MDSlideNavigatorAnimator, [{
  18468. key: 'push',
  18469. value: function push(enterPage, leavePage, callback) {
  18470. var _this2 = this;
  18471. this.backgroundMask.remove();
  18472. leavePage.parentElement.insertBefore(this.backgroundMask, leavePage.nextSibling);
  18473. var unblock = get(MDSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18474. Animit.runAll(Animit(this.backgroundMask, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 0 }, { opacity: this.blackMaskOpacity }).queue(function (done) {
  18475. _this2.backgroundMask.remove();
  18476. done();
  18477. }), Animit(enterPage, this.def).default({ transform: 'translate3d(100%, 0, 0)' }, { transform: 'translate3d(0, 0, 0)' }), Animit(leavePage, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(-45%, 0, 0)' }).queue(function (done) {
  18478. unblock();
  18479. callback();
  18480. done();
  18481. }));
  18482. }
  18483. /**
  18484. * @param {Object} enterPage
  18485. * @param {Object} leavePage
  18486. * @param {Function} callback
  18487. */
  18488. }, {
  18489. key: 'pop',
  18490. value: function pop(enterPage, leavePage, callback) {
  18491. var _this3 = this;
  18492. this.backgroundMask.remove();
  18493. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage.nextSibling);
  18494. var unblock = get(MDSlideNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDSlideNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18495. Animit.runAll(Animit(this.backgroundMask, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: this.blackMaskOpacity }, { opacity: 0 }).queue(function (done) {
  18496. _this3.backgroundMask.remove();
  18497. done();
  18498. }), Animit(enterPage, this.def).default({ transform: 'translate3d(-45%, 0, 0)', opacity: .9 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }), Animit(leavePage, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(100%, 0, 0)' }).queue(function (done) {
  18499. unblock();
  18500. callback();
  18501. done();
  18502. }));
  18503. }
  18504. }]);
  18505. return MDSlideNavigatorAnimator;
  18506. }(NavigatorAnimator);
  18507. /*
  18508. Copyright 2013-2015 ASIAL CORPORATION
  18509. Licensed under the Apache License, Version 2.0 (the "License");
  18510. you may not use this file except in compliance with the License.
  18511. You may obtain a copy of the License at
  18512. http://www.apache.org/licenses/LICENSE-2.0
  18513. Unless required by applicable law or agreed to in writing, software
  18514. distributed under the License is distributed on an "AS IS" BASIS,
  18515. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18516. See the License for the specific language governing permissions and
  18517. limitations under the License.
  18518. */
  18519. /**
  18520. * Lift screen transition.
  18521. */
  18522. var MDLiftNavigatorAnimator = function (_NavigatorAnimator) {
  18523. inherits(MDLiftNavigatorAnimator, _NavigatorAnimator);
  18524. function MDLiftNavigatorAnimator() {
  18525. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18526. _ref$timing = _ref.timing,
  18527. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .1, 1)' : _ref$timing,
  18528. _ref$delay = _ref.delay,
  18529. delay = _ref$delay === undefined ? 0.05 : _ref$delay,
  18530. _ref$duration = _ref.duration,
  18531. duration = _ref$duration === undefined ? 0.4 : _ref$duration;
  18532. classCallCheck(this, MDLiftNavigatorAnimator);
  18533. var _this = possibleConstructorReturn(this, (MDLiftNavigatorAnimator.__proto__ || Object.getPrototypeOf(MDLiftNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18534. _this.backgroundMask = util$1.createElement('<div style="position: absolute; width: 100%; height: 100%;' + 'background-color: black;"></div>');
  18535. return _this;
  18536. }
  18537. /**
  18538. * @param {Object} enterPage
  18539. * @param {Object} leavePage
  18540. * @param {Function} callback
  18541. */
  18542. createClass(MDLiftNavigatorAnimator, [{
  18543. key: 'push',
  18544. value: function push(enterPage, leavePage, callback) {
  18545. var _this2 = this;
  18546. this.backgroundMask.remove();
  18547. leavePage.parentNode.insertBefore(this.backgroundMask, leavePage);
  18548. var unblock = get(MDLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18549. var maskClear = Animit(this.backgroundMask).wait(this.delay + this.duration).queue(function (done) {
  18550. _this2.backgroundMask.remove();
  18551. done();
  18552. });
  18553. Animit.runAll(maskClear, Animit(enterPage, this.def).default({ transform: 'translate3d(0, 100%, 0)' }, { transform: 'translate3d(0, 0, 0)' }), Animit(leavePage, this.def).default({ opacity: 1 }, { opacity: .4 }).queue(function (done) {
  18554. unblock();
  18555. callback();
  18556. done();
  18557. }));
  18558. }
  18559. /**
  18560. * @param {Object} enterPage
  18561. * @param {Object} leavePage
  18562. * @param {Function} callback
  18563. */
  18564. }, {
  18565. key: 'pop',
  18566. value: function pop(enterPage, leavePage, callback) {
  18567. var _this3 = this;
  18568. this.backgroundMask.remove();
  18569. enterPage.parentNode.insertBefore(this.backgroundMask, enterPage);
  18570. var unblock = get(MDLiftNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDLiftNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18571. Animit.runAll(Animit(this.backgroundMask).wait(this.delay + this.duration).queue(function (done) {
  18572. _this3.backgroundMask.remove();
  18573. done();
  18574. }), Animit(enterPage, this.def).default({ opacity: .4 }, { opacity: 1 }).queue(function (done) {
  18575. unblock();
  18576. callback();
  18577. done();
  18578. }), Animit(leavePage, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, 100%, 0)' }));
  18579. }
  18580. }]);
  18581. return MDLiftNavigatorAnimator;
  18582. }(NavigatorAnimator);
  18583. /*
  18584. Copyright 2013-2015 ASIAL CORPORATION
  18585. Licensed under the Apache License, Version 2.0 (the "License");
  18586. you may not use this file except in compliance with the License.
  18587. You may obtain a copy of the License at
  18588. http://www.apache.org/licenses/LICENSE-2.0
  18589. Unless required by applicable law or agreed to in writing, software
  18590. distributed under the License is distributed on an "AS IS" BASIS,
  18591. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18592. See the License for the specific language governing permissions and
  18593. limitations under the License.
  18594. */
  18595. /**
  18596. * Fade-in + Lift screen transition.
  18597. */
  18598. var MDFadeNavigatorAnimator = function (_NavigatorAnimator) {
  18599. inherits(MDFadeNavigatorAnimator, _NavigatorAnimator);
  18600. function MDFadeNavigatorAnimator() {
  18601. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18602. _ref$timing = _ref.timing,
  18603. timing = _ref$timing === undefined ? 'cubic-bezier(0.4, 0, 0.2, 1)' : _ref$timing,
  18604. _ref$timingPop = _ref.timingPop,
  18605. timingPop = _ref$timingPop === undefined ? 'cubic-bezier(0.4, 0, 1, 1)' : _ref$timingPop,
  18606. _ref$delay = _ref.delay,
  18607. delay = _ref$delay === undefined ? 0 : _ref$delay,
  18608. _ref$duration = _ref.duration,
  18609. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  18610. classCallCheck(this, MDFadeNavigatorAnimator);
  18611. var _this = possibleConstructorReturn(this, (MDFadeNavigatorAnimator.__proto__ || Object.getPrototypeOf(MDFadeNavigatorAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  18612. _this.timingPop = timingPop;
  18613. return _this;
  18614. }
  18615. /**
  18616. * @param {Object} enterPage
  18617. * @param {Object} leavePage
  18618. * @param {Function} callback
  18619. */
  18620. createClass(MDFadeNavigatorAnimator, [{
  18621. key: 'push',
  18622. value: function push(enterPage, leavePage, callback) {
  18623. var unblock = get(MDFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18624. Animit.runAll(Animit(enterPage, this.def).default({ transform: 'translate3D(0, 42px, 0)', opacity: 0 }, { transform: 'translate3D(0, 0, 0)', opacity: 1 }).queue(function (done) {
  18625. unblock();
  18626. callback();
  18627. done();
  18628. }));
  18629. }
  18630. /**
  18631. * @param {Object} enterPage
  18632. * @param {Object} leavePage
  18633. * @param {Function} done
  18634. */
  18635. }, {
  18636. key: 'pop',
  18637. value: function pop(enterPage, leavePage, callback) {
  18638. var unblock = get(MDFadeNavigatorAnimator.prototype.__proto__ || Object.getPrototypeOf(MDFadeNavigatorAnimator.prototype), 'block', this).call(this, enterPage);
  18639. Animit.runAll(Animit(leavePage, this.def).default({ transform: 'translate3D(0, 0, 0)', opacity: 1 }, { css: { transform: 'translate3D(0, 38px, 0)', opacity: 0 }, timing: this.timingPop }).queue(function (done) {
  18640. unblock();
  18641. callback();
  18642. done();
  18643. }));
  18644. }
  18645. }]);
  18646. return MDFadeNavigatorAnimator;
  18647. }(NavigatorAnimator);
  18648. /*
  18649. Copyright 2013-2015 ASIAL CORPORATION
  18650. Licensed under the Apache License, Version 2.0 (the "License");
  18651. you may not use this file except in compliance with the License.
  18652. You may obtain a copy of the License at
  18653. http://www.apache.org/licenses/LICENSE-2.0
  18654. Unless required by applicable law or agreed to in writing, software
  18655. distributed under the License is distributed on an "AS IS" BASIS,
  18656. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18657. See the License for the specific language governing permissions and
  18658. limitations under the License.
  18659. */
  18660. var NoneNavigatorAnimator = function (_NavigatorAnimator) {
  18661. inherits(NoneNavigatorAnimator, _NavigatorAnimator);
  18662. function NoneNavigatorAnimator(options) {
  18663. classCallCheck(this, NoneNavigatorAnimator);
  18664. return possibleConstructorReturn(this, (NoneNavigatorAnimator.__proto__ || Object.getPrototypeOf(NoneNavigatorAnimator)).call(this, options));
  18665. }
  18666. createClass(NoneNavigatorAnimator, [{
  18667. key: 'push',
  18668. value: function push(enterPage, leavePage, callback) {
  18669. callback();
  18670. }
  18671. }, {
  18672. key: 'pop',
  18673. value: function pop(enterPage, leavePage, callback) {
  18674. callback();
  18675. }
  18676. }]);
  18677. return NoneNavigatorAnimator;
  18678. }(NavigatorAnimator);
  18679. /*
  18680. Copyright 2013-2015 ASIAL CORPORATION
  18681. Licensed under the Apache License, Version 2.0 (the "License");
  18682. you may not use this file except in compliance with the License.
  18683. You may obtain a copy of the License at
  18684. http://www.apache.org/licenses/LICENSE-2.0
  18685. Unless required by applicable law or agreed to in writing, software
  18686. distributed under the License is distributed on an "AS IS" BASIS,
  18687. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18688. See the License for the specific language governing permissions and
  18689. limitations under the License.
  18690. */
  18691. var _animatorDict$5 = {
  18692. 'default': function _default() {
  18693. return platform.isAndroid() ? MDFadeNavigatorAnimator : IOSSlideNavigatorAnimator;
  18694. },
  18695. 'slide': function slide() {
  18696. return platform.isAndroid() ? MDSlideNavigatorAnimator : IOSSlideNavigatorAnimator;
  18697. },
  18698. 'lift': function lift() {
  18699. return platform.isAndroid() ? MDLiftNavigatorAnimator : IOSLiftNavigatorAnimator;
  18700. },
  18701. 'fade': function fade() {
  18702. return platform.isAndroid() ? MDFadeNavigatorAnimator : IOSFadeNavigatorAnimator;
  18703. },
  18704. 'slide-ios': IOSSlideNavigatorAnimator,
  18705. 'slide-md': MDSlideNavigatorAnimator,
  18706. 'lift-ios': IOSLiftNavigatorAnimator,
  18707. 'lift-md': MDLiftNavigatorAnimator,
  18708. 'fade-ios': IOSFadeNavigatorAnimator,
  18709. 'fade-md': MDFadeNavigatorAnimator,
  18710. 'none': NoneNavigatorAnimator
  18711. };
  18712. var rewritables = {
  18713. /**
  18714. * @param {Element} navigatorSideElement
  18715. * @param {Function} callback
  18716. */
  18717. ready: function ready(navigatorElement, callback) {
  18718. callback();
  18719. }
  18720. };
  18721. var verifyPageElement = function verifyPageElement(el) {
  18722. return el.nodeName !== 'ONS-PAGE' && util$1.throw('Only page elements can be children of navigator');
  18723. };
  18724. /**
  18725. * @element ons-navigator
  18726. * @category navigation
  18727. * @description
  18728. * [en]
  18729. * A component that provides page stack management and navigation. Stack navigation is the most common navigation pattern for mobile apps.
  18730. *
  18731. * When a page is pushed on top of the stack it is displayed with a transition animation. When the user returns to the previous page the top page will be popped from the top of the stack and hidden with an opposite transition animation.
  18732. * [/en]
  18733. * [ja][/ja]
  18734. * @codepen yrhtv
  18735. * @tutorial vanilla/Reference/navigator
  18736. * @guide lifecycle.html#events
  18737. * [en]Overview of page events[/en]
  18738. * [ja]Overview of page events[/ja]
  18739. * @seealso ons-toolbar
  18740. * [en]The `<ons-toolbar>` component is used to display a toolbar on the top of a page.[/en]
  18741. * [ja][/ja]
  18742. * @seealso ons-back-button
  18743. * [en]The `<ons-back-button>` component lets the user return to the previous page.[/en]
  18744. * [ja][/ja]
  18745. * @example
  18746. * <ons-navigator id="navigator">
  18747. * <ons-page>
  18748. * <ons-toolbar>
  18749. * <div class="center">
  18750. * Title
  18751. * </div>
  18752. * </ons-toolbar>
  18753. * <p>
  18754. * <ons-button
  18755. * onclick="document.getElementById('navigator').pushPage('page.html')">
  18756. * Push page
  18757. * </ons-button>
  18758. * </p>
  18759. * </ons-page>
  18760. * </ons-navigator>
  18761. *
  18762. * <template id="page.html">
  18763. * <ons-page>
  18764. * <ons-toolbar>
  18765. * <div class="left">
  18766. * <ons-back-button>Back</ons-back-button>
  18767. * </div>
  18768. * <div class="center">
  18769. * Another page
  18770. * </div>
  18771. * </ons-toolbar>
  18772. * </ons-page>
  18773. * </template>
  18774. */
  18775. var NavigatorElement = function (_BaseElement) {
  18776. inherits(NavigatorElement, _BaseElement);
  18777. createClass(NavigatorElement, [{
  18778. key: 'animatorFactory',
  18779. /**
  18780. * @attribute page
  18781. * @initonly
  18782. * @type {String}
  18783. * @description
  18784. * [en]First page to show when navigator is initialized.[/en]
  18785. * [ja]ナビゲーターが初期化された時に表示するページを指定します。[/ja]
  18786. */
  18787. /**
  18788. * @attribute swipeable
  18789. * @type {Boolean}
  18790. * @description
  18791. * [en]Enable iOS "swipe to pop" feature.[/en]
  18792. * [ja][/ja]
  18793. */
  18794. /**
  18795. * @attribute swipe-target-width
  18796. * @type {String}
  18797. * @default 20px
  18798. * @description
  18799. * [en]The width of swipeable area calculated from the edge (in pixels). Use this to enable swipe only when the finger touch on the screen edge.[/en]
  18800. * [ja]スワイプの判定領域をピクセル単位で指定します。画面の端から指定した距離に達するとページが表示されます。[/ja]
  18801. */
  18802. /**
  18803. * @attribute swipe-threshold
  18804. * @type {Number}
  18805. * @default 0.2
  18806. * @description
  18807. * [en]Specify how much the page needs to be swiped before popping. A value between `0` and `1`.[/en]
  18808. * [ja][/ja]
  18809. */
  18810. /**
  18811. * @attribute animation
  18812. * @type {String}
  18813. * @default default
  18814. * @description
  18815. * [en]
  18816. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  18817. *
  18818. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"` depending on the platform.
  18819. * [/en]
  18820. * [ja][/ja]
  18821. */
  18822. /**
  18823. * @attribute animation-options
  18824. * @type {Expression}
  18825. * @description
  18826. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/en]
  18827. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`[/ja]
  18828. */
  18829. /**
  18830. * @event prepush
  18831. * @description
  18832. * [en]Fired just before a page is pushed.[/en]
  18833. * [ja]pageがpushされる直前に発火されます。[/ja]
  18834. * @param {Object} event [en]Event object.[/en]
  18835. * @param {Object} event.navigator
  18836. * [en]Component object.[/en]
  18837. * [ja]コンポーネントのオブジェクト。[/ja]
  18838. * @param {Object} event.currentPage
  18839. * [en]Current page object.[/en]
  18840. * [ja]現在のpageオブジェクト。[/ja]
  18841. * @param {Function} event.cancel
  18842. * [en]Call this function to cancel the push.[/en]
  18843. * [ja]この関数を呼び出すと、push処理がキャンセルされます。[/ja]
  18844. */
  18845. /**
  18846. * @event prepop
  18847. * @description
  18848. * [en]Fired just before a page is popped.[/en]
  18849. * [ja]pageがpopされる直前に発火されます。[/ja]
  18850. * @param {Object} event [en]Event object.[/en]
  18851. * @param {Object} event.navigator
  18852. * [en]Component object.[/en]
  18853. * [ja]コンポーネントのオブジェクト。[/ja]
  18854. * @param {Object} event.currentPage
  18855. * [en]Current page object.[/en]
  18856. * [ja]現在のpageオブジェクト。[/ja]
  18857. * @param {Function} event.cancel
  18858. * [en]Call this function to cancel the pop.[/en]
  18859. * [ja]この関数を呼び出すと、pageのpopがキャンセルされます。[/ja]
  18860. */
  18861. /**
  18862. * @event postpush
  18863. * @description
  18864. * [en]Fired just after a page is pushed.[/en]
  18865. * [ja]pageがpushされてアニメーションが終了してから発火されます。[/ja]
  18866. * @param {Object} event [en]Event object.[/en]
  18867. * @param {Object} event.navigator
  18868. * [en]Component object.[/en]
  18869. * [ja]コンポーネントのオブジェクト。[/ja]
  18870. * @param {Object} event.enterPage
  18871. * [en]Object of the next page.[/en]
  18872. * [ja]pushされたpageオブジェクト。[/ja]
  18873. * @param {Object} event.leavePage
  18874. * [en]Object of the previous page.[/en]
  18875. * [ja]以前のpageオブジェクト。[/ja]
  18876. */
  18877. /**
  18878. * @event postpop
  18879. * @description
  18880. * [en]Fired just after a page is popped.[/en]
  18881. * [ja]pageがpopされてアニメーションが終わった後に発火されます。[/ja]
  18882. * @param {Object} event [en]Event object.[/en]
  18883. * @param {Object} event.navigator
  18884. * [en]Component object.[/en]
  18885. * [ja]コンポーネントのオブジェクト。[/ja]
  18886. * @param {Object} event.enterPage
  18887. * [en]Object of the next page.[/en]
  18888. * [ja]popされて表示されるページのオブジェクト。[/ja]
  18889. * @param {Object} event.leavePage
  18890. * [en]Object of the previous page.[/en]
  18891. * [ja]popされて消えるページのオブジェクト。[/ja]
  18892. */
  18893. get: function get$$1() {
  18894. return this._animatorFactory;
  18895. }
  18896. }]);
  18897. function NavigatorElement() {
  18898. classCallCheck(this, NavigatorElement);
  18899. var _this = possibleConstructorReturn(this, (NavigatorElement.__proto__ || Object.getPrototypeOf(NavigatorElement)).call(this));
  18900. _this._isRunning = false;
  18901. _this._initialized = false;
  18902. _this._pageLoader = defaultPageLoader;
  18903. _this._pageMap = new WeakMap();
  18904. _this._updateAnimatorFactory();
  18905. return _this;
  18906. }
  18907. /**
  18908. * @property pageLoader
  18909. * @type {PageLoader}
  18910. * @description
  18911. * [en]PageLoader instance. It can be overriden to change the way pages are loaded by this element. Useful for lib developers.[/en]
  18912. * [ja]PageLoaderインスタンスを格納しています。[/ja]
  18913. */
  18914. createClass(NavigatorElement, [{
  18915. key: '_getPageTarget',
  18916. value: function _getPageTarget() {
  18917. return this._page || this.getAttribute('page');
  18918. }
  18919. /**
  18920. * @property page
  18921. * @type {*}
  18922. * @description
  18923. * [en]Specify the page to be loaded during initialization. This value takes precedence over the `page` attribute. Useful for lib developers.[/en]
  18924. * [ja]初期化時に読み込むページを指定します。`page`属性で指定した値よりも`page`プロパティに指定した値を優先します。[/ja]
  18925. */
  18926. }, {
  18927. key: 'connectedCallback',
  18928. value: function connectedCallback() {
  18929. var _this2 = this;
  18930. this.onDeviceBackButton = this._onDeviceBackButton.bind(this);
  18931. if (!platform.isAndroid() || this.getAttribute('swipeable') === 'force') {
  18932. var swipeAnimator = void 0;
  18933. this._swipe = new SwipeReveal({
  18934. element: this,
  18935. getThreshold: function getThreshold() {
  18936. return Math.max(0.2, parseFloat(_this2.getAttribute('swipe-threshold')) || 0);
  18937. },
  18938. swipeMax: function swipeMax() {
  18939. _this2._onSwipe && _this2._onSwipe(1, { duration: swipeAnimator.durationSwipe, timing: swipeAnimator.timingSwipe });
  18940. _this2[_this2.swipeMax ? 'swipeMax' : 'popPage']({ animator: swipeAnimator });
  18941. swipeAnimator = null;
  18942. },
  18943. swipeMid: function swipeMid(distance, width) {
  18944. _this2._onSwipe && _this2._onSwipe(distance / width);
  18945. swipeAnimator.translate(distance, width, _this2.topPage.previousElementSibling, _this2.topPage);
  18946. },
  18947. swipeMin: function swipeMin() {
  18948. _this2._onSwipe && _this2._onSwipe(0, { duration: swipeAnimator.durationRestore, timing: swipeAnimator.timingSwipe });
  18949. swipeAnimator.restore(_this2.topPage.previousElementSibling, _this2.topPage);
  18950. swipeAnimator = null;
  18951. },
  18952. ignoreSwipe: function ignoreSwipe(event, distance) {
  18953. // Basic conditions
  18954. if (!_this2._isRunning && _this2.children.length > 1) {
  18955. // Area or directional issues
  18956. var area = parseInt(_this2.getAttribute('swipe-target-width') || 25, 10);
  18957. if (event.gesture.direction === 'right' && area > distance) {
  18958. // Swipes on ons-back-button and its children
  18959. var isBB = function isBB(el) {
  18960. return (/ons-back-button/i.test(el.tagName)
  18961. );
  18962. };
  18963. if (!isBB(event.target) && !util$1.findParent(event.target, isBB, function (p) {
  18964. return (/ons-page/i.test(p.tagName)
  18965. );
  18966. })) {
  18967. // Animator is swipeable
  18968. var animation = (_this2.topPage.pushedOptions || {}).animation || _this2.animatorFactory._animation;
  18969. var Animator = _animatorDict$5[animation] instanceof Function ? _animatorDict$5[animation].call() : _animatorDict$5[animation];
  18970. if (typeof Animator !== 'undefined' && Animator.swipeable) {
  18971. swipeAnimator = new Animator(); // Prepare for the swipe
  18972. return false;
  18973. }
  18974. }
  18975. }
  18976. }
  18977. return true; // Ignore swipe
  18978. }
  18979. });
  18980. this.attributeChangedCallback('swipeable');
  18981. }
  18982. if (this._initialized) {
  18983. return;
  18984. }
  18985. this._initialized = true;
  18986. var deferred = util$1.defer();
  18987. this.loaded = deferred.promise;
  18988. rewritables.ready(this, function () {
  18989. var show = !util$1.hasAnyComponentAsParent(_this2);
  18990. var options = { animation: 'none', show: show };
  18991. if (_this2.pages.length === 0 && _this2._getPageTarget()) {
  18992. _this2.pushPage(_this2._getPageTarget(), options).then(function () {
  18993. return deferred.resolve();
  18994. });
  18995. } else if (_this2.pages.length > 0) {
  18996. for (var i = 0; i < _this2.pages.length; i++) {
  18997. verifyPageElement(_this2.pages[i]);
  18998. }
  18999. if (_this2.topPage) {
  19000. contentReady(_this2.topPage, function () {
  19001. return setTimeout(function () {
  19002. deferred.resolve();
  19003. show && _this2.topPage._show();
  19004. _this2._updateLastPageBackButton();
  19005. }, 0);
  19006. });
  19007. }
  19008. } else {
  19009. contentReady(_this2, function () {
  19010. if (_this2.pages.length === 0 && _this2._getPageTarget()) {
  19011. _this2.pushPage(_this2._getPageTarget(), options).then(function () {
  19012. return deferred.resolve();
  19013. });
  19014. } else {
  19015. deferred.resolve();
  19016. }
  19017. });
  19018. }
  19019. });
  19020. }
  19021. }, {
  19022. key: '_updateAnimatorFactory',
  19023. value: function _updateAnimatorFactory() {
  19024. this._animatorFactory = new AnimatorFactory({
  19025. animators: _animatorDict$5,
  19026. baseClass: NavigatorAnimator,
  19027. baseClassName: 'NavigatorAnimator',
  19028. defaultAnimation: this.getAttribute('animation')
  19029. });
  19030. }
  19031. }, {
  19032. key: 'disconnectedCallback',
  19033. value: function disconnectedCallback() {
  19034. this._backButtonHandler.destroy();
  19035. this._backButtonHandler = null;
  19036. this._swipe && this._swipe.dispose();
  19037. this._swipe = null;
  19038. }
  19039. }, {
  19040. key: 'attributeChangedCallback',
  19041. value: function attributeChangedCallback(name, last, current) {
  19042. switch (name) {
  19043. case 'animation':
  19044. this._updateAnimatorFactory();
  19045. break;
  19046. case 'swipeable':
  19047. this._swipe && this._swipe.update();
  19048. break;
  19049. }
  19050. }
  19051. /**
  19052. * @method popPage
  19053. * @signature popPage([options])
  19054. * @param {Object} [options]
  19055. * [en]Parameter object.[/en]
  19056. * [ja]オプションを指定するオブジェクト。[/ja]
  19057. * @param {String} [options.animation]
  19058. * [en]
  19059. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  19060. *
  19061. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"`.
  19062. * [/en]
  19063. * [ja][/ja]
  19064. * @param {String} [options.animationOptions]
  19065. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  19066. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  19067. * @param {Function} [options.callback]
  19068. * [en]Function that is called when the transition has ended.[/en]
  19069. * [ja]このメソッドによる画面遷移が終了した際に呼び出される関数オブジェクトを指定します。[/ja]
  19070. * @param {Object} [options.data]
  19071. * [en]Custom data that will be stored in the new page element.[/en]
  19072. * [ja][/ja]
  19073. * @param {Number} [options.times]
  19074. * [en]Number of pages to be popped. Only one animation will be shown.[/en]
  19075. * [ja][/ja]
  19076. * @return {Promise}
  19077. * [en]Promise which resolves to the revealed page.[/en]
  19078. * [ja]明らかにしたページを解決するPromiseを返します。[/ja]
  19079. * @description
  19080. * [en]Pops the current page from the page stack. The previous page will be displayed.[/en]
  19081. * [ja]現在表示中のページをページスタックから取り除きます。一つ前のページに戻ります。[/ja]
  19082. */
  19083. }, {
  19084. key: 'popPage',
  19085. value: function popPage() {
  19086. var _this3 = this;
  19087. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19088. var _preparePageAndOption = this._preparePageAndOptions(null, options);
  19089. options = _preparePageAndOption.options;
  19090. if (util$1.isInteger(options.times) && options.times > 1) {
  19091. this._removePages(options.times);
  19092. }
  19093. var popUpdate = function popUpdate() {
  19094. return new Promise(function (resolve) {
  19095. _this3._pageLoader.unload(_this3.pages[_this3.pages.length - 1]);
  19096. resolve();
  19097. });
  19098. };
  19099. return this._popPage(options, popUpdate);
  19100. }
  19101. }, {
  19102. key: '_popPage',
  19103. value: function _popPage(options) {
  19104. var _this4 = this;
  19105. var update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
  19106. return Promise.resolve();
  19107. };
  19108. if (this._isRunning) {
  19109. return Promise.reject('popPage is already running.');
  19110. }
  19111. if (this.pages.length <= 1) {
  19112. return Promise.reject('ons-navigator\'s page stack is empty.');
  19113. }
  19114. if (this._emitPrePopEvent()) {
  19115. return Promise.reject('Canceled in prepop event.');
  19116. }
  19117. var length = this.pages.length;
  19118. this._isRunning = true;
  19119. this.pages[length - 2].updateBackButton(length - 2 > 0);
  19120. return new Promise(function (resolve) {
  19121. var leavePage = _this4.pages[length - 1];
  19122. var enterPage = _this4.pages[length - 2];
  19123. options = util$1.extend({}, _this4.options || {}, leavePage.pushedOptions || {}, options);
  19124. if (options.data) {
  19125. enterPage.data = util$1.extend({}, enterPage.data || {}, options.data || {});
  19126. }
  19127. var done = function done() {
  19128. update().then(function () {
  19129. _this4._isRunning = false;
  19130. enterPage._show();
  19131. util$1.triggerElementEvent(_this4, 'postpop', { leavePage: leavePage, enterPage: enterPage, navigator: _this4 });
  19132. options.callback && options.callback(enterPage);
  19133. resolve(enterPage);
  19134. });
  19135. };
  19136. leavePage._hide();
  19137. enterPage.style.display = '';
  19138. var animator = options.animator || _this4._animatorFactory.newAnimator(options);
  19139. animator.pop(_this4.pages[length - 2], _this4.pages[length - 1], done);
  19140. }).catch(function () {
  19141. return _this4._isRunning = false;
  19142. });
  19143. }
  19144. /**
  19145. * @method pushPage
  19146. * @signature pushPage(page, [options])
  19147. * @param {String} page
  19148. * [en]Page URL. Can be either a HTML document or a template defined with the `<template>` tag.[/en]
  19149. * [ja]pageのURLか、もしくは`<template>`で宣言したテンプレートのid属性の値を指定できます。[/ja]
  19150. * @param {Object} [options]
  19151. * [en]Parameter object.[/en]
  19152. * [ja]オプションを指定するオブジェクト。[/ja]
  19153. * @param {String} [options.page]
  19154. * [en]Page URL. Only necessary if `page` parameter is null or undefined.[/en]
  19155. * [ja][/ja]
  19156. * @param {String} [options.pageHTML]
  19157. * [en]HTML code that will be computed as a new page. Overwrites `page` parameter.[/en]
  19158. * [ja][/ja]
  19159. * @param {String} [options.animation]
  19160. * [en]
  19161. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  19162. *
  19163. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"`.
  19164. * [/en]
  19165. * [ja][/ja]
  19166. * @param {String} [options.animationOptions]
  19167. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`[/en]
  19168. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  19169. * @param {Function} [options.callback]
  19170. * [en]Function that is called when the transition has ended.[/en]
  19171. * [ja]pushPage()による画面遷移が終了した時に呼び出される関数オブジェクトを指定します。[/ja]
  19172. * @param {Object} [options.data]
  19173. * [en]Custom data that will be stored in the new page element.[/en]
  19174. * [ja][/ja]
  19175. * @return {Promise}
  19176. * [en]Promise which resolves to the pushed page.[/en]
  19177. * [ja]追加したページを解決するPromiseを返します。[/ja]
  19178. * @description
  19179. * [en]Pushes the specified page into the stack.[/en]
  19180. * [ja]指定したpageを新しいページスタックに追加します。新しいページが表示されます。[/ja]
  19181. */
  19182. }, {
  19183. key: 'pushPage',
  19184. value: function pushPage(page) {
  19185. var _this5 = this;
  19186. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19187. var _preparePageAndOption2 = this._preparePageAndOptions(page, options);
  19188. page = _preparePageAndOption2.page;
  19189. options = _preparePageAndOption2.options;
  19190. var prepare = function prepare(pageElement) {
  19191. verifyPageElement(pageElement);
  19192. _this5._pageMap.set(pageElement, page);
  19193. pageElement = util$1.extend(pageElement, {
  19194. data: options.data
  19195. });
  19196. pageElement.style.visibility = 'hidden';
  19197. };
  19198. if (options.pageHTML) {
  19199. return this._pushPage(options, function () {
  19200. return new Promise(function (resolve) {
  19201. instantPageLoader.load({ page: options.pageHTML, parent: _this5, params: options.data }, function (pageElement) {
  19202. prepare(pageElement);
  19203. resolve();
  19204. });
  19205. });
  19206. });
  19207. }
  19208. return this._pushPage(options, function () {
  19209. return new Promise(function (resolve) {
  19210. _this5._pageLoader.load({ page: page, parent: _this5, params: options.data }, function (pageElement) {
  19211. prepare(pageElement);
  19212. resolve();
  19213. });
  19214. });
  19215. });
  19216. }
  19217. }, {
  19218. key: '_pushPage',
  19219. value: function _pushPage() {
  19220. var _this6 = this;
  19221. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19222. var update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
  19223. return Promise.resolve();
  19224. };
  19225. if (this._isRunning) {
  19226. return Promise.reject('pushPage is already running.');
  19227. }
  19228. if (this._emitPrePushEvent()) {
  19229. return Promise.reject('Canceled in prepush event.');
  19230. }
  19231. this._isRunning = true;
  19232. var animationOptions = AnimatorFactory.parseAnimationOptionsString(this.getAttribute('animation-options'));
  19233. options = util$1.extend({}, this.options || {}, { animationOptions: animationOptions }, options);
  19234. var animator = this._animatorFactory.newAnimator(options);
  19235. return update().then(function () {
  19236. var pageLength = _this6.pages.length;
  19237. var enterPage = _this6.pages[pageLength - 1];
  19238. var leavePage = options.leavePage || _this6.pages[pageLength - 2];
  19239. verifyPageElement(enterPage);
  19240. enterPage.updateBackButton(pageLength > (options._replacePage ? 2 : 1));
  19241. enterPage.pushedOptions = util$1.extend({}, enterPage.pushedOptions || {}, options || {});
  19242. enterPage.data = util$1.extend({}, enterPage.data || {}, options.data || {});
  19243. enterPage.unload = enterPage.unload || options.unload;
  19244. return new Promise(function (resolve) {
  19245. var done = function done() {
  19246. _this6._isRunning = false;
  19247. options.show !== false && setImmediate(function () {
  19248. return enterPage._show();
  19249. });
  19250. util$1.triggerElementEvent(_this6, 'postpush', { leavePage: leavePage, enterPage: enterPage, navigator: _this6 });
  19251. if (leavePage) {
  19252. leavePage.style.display = 'none';
  19253. }
  19254. options.callback && options.callback(enterPage);
  19255. resolve(enterPage);
  19256. };
  19257. enterPage.style.visibility = '';
  19258. if (leavePage) {
  19259. leavePage._hide();
  19260. animator.push(enterPage, leavePage, done);
  19261. } else {
  19262. done();
  19263. }
  19264. });
  19265. }).catch(function (error) {
  19266. _this6._isRunning = false;
  19267. throw error;
  19268. });
  19269. }
  19270. /**
  19271. * @method replacePage
  19272. * @signature replacePage(page, [options])
  19273. * @return {Promise}
  19274. * [en]Promise which resolves to the new page.[/en]
  19275. * [ja]新しいページを解決するPromiseを返します。[/ja]
  19276. * @description
  19277. * [en]Replaces the current top page with the specified one. Extends `pushPage()` parameters.[/en]
  19278. * [ja]現在表示中のページをを指定したページに置き換えます。[/ja]
  19279. */
  19280. }, {
  19281. key: 'replacePage',
  19282. value: function replacePage(page) {
  19283. var _this7 = this;
  19284. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19285. return this.pushPage(page, options).then(function (resolvedValue) {
  19286. if (_this7.pages.length > 1) {
  19287. _this7._pageLoader.unload(_this7.pages[_this7.pages.length - 2]);
  19288. }
  19289. _this7._updateLastPageBackButton();
  19290. return Promise.resolve(resolvedValue);
  19291. });
  19292. }
  19293. /**
  19294. * @method insertPage
  19295. * @signature insertPage(index, page, [options])
  19296. * @param {Number} index
  19297. * [en]The index where it should be inserted.[/en]
  19298. * [ja]スタックに挿入する位置のインデックスを指定します。[/ja]
  19299. * @return {Promise}
  19300. * [en]Promise which resolves to the inserted page.[/en]
  19301. * [ja]指定したページを解決するPromiseを返します。[/ja]
  19302. * @description
  19303. * [en]Insert the specified page into the stack with at a position defined by the `index` argument. Extends `pushPage()` parameters.[/en]
  19304. * [ja]指定したpageをページスタックのindexで指定した位置に追加します。[/ja]
  19305. */
  19306. }, {
  19307. key: 'insertPage',
  19308. value: function insertPage(index, page) {
  19309. var _this8 = this;
  19310. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  19311. var _preparePageAndOption3 = this._preparePageAndOptions(page, options);
  19312. page = _preparePageAndOption3.page;
  19313. options = _preparePageAndOption3.options;
  19314. index = this._normalizeIndex(index);
  19315. if (index >= this.pages.length) {
  19316. return this.pushPage(page, options);
  19317. }
  19318. page = typeof options.pageHTML === 'string' ? options.pageHTML : page;
  19319. var loader = typeof options.pageHTML === 'string' ? instantPageLoader : this._pageLoader;
  19320. return new Promise(function (resolve) {
  19321. loader.load({ page: page, parent: _this8 }, function (pageElement) {
  19322. verifyPageElement(pageElement);
  19323. _this8._pageMap.set(pageElement, page);
  19324. pageElement = util$1.extend(pageElement, {
  19325. data: options.data,
  19326. pushedOptions: options
  19327. });
  19328. options.animationOptions = util$1.extend({}, AnimatorFactory.parseAnimationOptionsString(_this8.getAttribute('animation-options')), options.animationOptions || {});
  19329. pageElement.style.display = 'none';
  19330. _this8.insertBefore(pageElement, _this8.pages[index]);
  19331. _this8.topPage.updateBackButton(true);
  19332. setTimeout(function () {
  19333. pageElement = null;
  19334. resolve(_this8.pages[index]);
  19335. }, 1000 / 60);
  19336. });
  19337. });
  19338. }
  19339. /**
  19340. * @method removePage
  19341. * @signature removePage(index, [options])
  19342. * @param {Number} index
  19343. * [en]The index where it should be removed.[/en]
  19344. * [ja]スタックから削除するページのインデックスを指定します。[/ja]
  19345. * @return {Promise}
  19346. * [en]Promise which resolves to the revealed page.[/en]
  19347. * [ja]削除によって表示されたページを解決するPromiseを返します。[/ja]
  19348. * @description
  19349. * [en]Remove the specified page at a position in the stack defined by the `index` argument. Extends `popPage()` parameters.[/en]
  19350. * [ja]指定したインデックスにあるページを削除します。[/ja]
  19351. */
  19352. }, {
  19353. key: 'removePage',
  19354. value: function removePage(index) {
  19355. var _this9 = this;
  19356. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19357. index = this._normalizeIndex(index);
  19358. if (index < this.pages.length - 1) {
  19359. return new Promise(function (resolve) {
  19360. var leavePage = _this9.pages[index];
  19361. var enterPage = _this9.topPage;
  19362. _this9._pageMap.delete(leavePage);
  19363. _this9._pageLoader.unload(leavePage);
  19364. if (_this9.pages.length === 1) {
  19365. // edge case
  19366. _this9.topPage.updateBackButton(false);
  19367. }
  19368. resolve(enterPage);
  19369. });
  19370. } else {
  19371. return this.popPage(options);
  19372. }
  19373. }
  19374. /**
  19375. * @method resetToPage
  19376. * @signature resetToPage(page, [options])
  19377. * @return {Promise}
  19378. * [en]Promise which resolves to the new top page.[/en]
  19379. * [ja]新しいトップページを解決するPromiseを返します。[/ja]
  19380. * @param {Boolean} [options.pop]
  19381. * [en]Performs 'pop' effect if `true` instead of 'push' or none. This also sets `options.animation` value to `default` instead of `none`.[/en]
  19382. * [ja][/ja]
  19383. * @description
  19384. * [en]Clears page stack and adds the specified page to the stack. Extends `pushPage()` parameters.[/en]
  19385. * [ja]ページスタックをリセットし、指定したページを表示します。[/ja]
  19386. */
  19387. }, {
  19388. key: 'resetToPage',
  19389. value: function resetToPage(page) {
  19390. var _this10 = this;
  19391. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19392. var _preparePageAndOption4 = this._preparePageAndOptions(page, options);
  19393. page = _preparePageAndOption4.page;
  19394. options = _preparePageAndOption4.options;
  19395. if (!options.animator && !options.animation && !options.pop) {
  19396. options.animation = 'none';
  19397. }
  19398. if (!options.page && !options.pageHTML && this._getPageTarget()) {
  19399. page = options.page = this._getPageTarget();
  19400. }
  19401. if (options.pop) {
  19402. this._removePages();
  19403. return this.insertPage(0, page, { data: options.data }).then(function () {
  19404. return _this10.popPage(options);
  19405. });
  19406. }
  19407. // Tip: callback runs before resolved promise
  19408. var callback = options.callback;
  19409. options.callback = function (newPage) {
  19410. _this10._removePages();
  19411. newPage.updateBackButton(false);
  19412. callback && callback(newPage);
  19413. };
  19414. return this.pushPage(page, options);
  19415. }
  19416. /**
  19417. * @method bringPageTop
  19418. * @signature bringPageTop(item, [options])
  19419. * @param {String|Number} item
  19420. * [en]Page URL or index of an existing page in navigator's stack.[/en]
  19421. * [ja]ページのURLかもしくはons-navigatorのページスタックのインデックス値を指定します。[/ja]
  19422. * @return {Promise}
  19423. * [en]Promise which resolves to the new top page.[/en]
  19424. * [ja]新しいトップページを解決するPromiseを返します。[/ja]
  19425. * @description
  19426. * [en]Brings the given page to the top of the page stack if it already exists or pushes it into the stack if doesn't. Extends `pushPage()` parameters.[/en]
  19427. * [ja]指定したページをページスタックの一番上に移動します。もし指定したページが無かった場合新しくpushされます。[/ja]
  19428. */
  19429. }, {
  19430. key: 'bringPageTop',
  19431. value: function bringPageTop(item) {
  19432. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19433. if (['number', 'string'].indexOf(typeof item === 'undefined' ? 'undefined' : _typeof(item)) === -1) {
  19434. util$1.throw('First argument must be a page name or the index of an existing page. You supplied ' + item);
  19435. }
  19436. var index = typeof item === 'number' ? this._normalizeIndex(item) : this._lastIndexOfPage(item);
  19437. var page = this.pages[index];
  19438. if (index < 0) {
  19439. return this.pushPage(item, options);
  19440. }
  19441. var _preparePageAndOption5 = this._preparePageAndOptions(page, options);
  19442. options = _preparePageAndOption5.options;
  19443. if (index === this.pages.length - 1) {
  19444. return Promise.resolve(page);
  19445. }
  19446. if (!page) {
  19447. util$1.throw('Failed to find item ' + item);
  19448. }
  19449. if (this._isRunning) {
  19450. return Promise.reject('pushPage is already running.');
  19451. }
  19452. if (this._emitPrePushEvent()) {
  19453. return Promise.reject('Canceled in prepush event.');
  19454. }
  19455. page.style.display = '';
  19456. page.style.visibility = 'hidden';
  19457. page.parentNode.appendChild(page);
  19458. return this._pushPage(options);
  19459. }
  19460. }, {
  19461. key: '_preparePageAndOptions',
  19462. value: function _preparePageAndOptions(page) {
  19463. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19464. if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) != 'object') {
  19465. util$1.throw('options must be an object. You supplied ' + options);
  19466. }
  19467. if ((page === null || page === undefined) && options.page) {
  19468. page = options.page;
  19469. }
  19470. options = util$1.extend({}, this.options || {}, options, { page: page });
  19471. return { page: page, options: options };
  19472. }
  19473. }, {
  19474. key: '_removePages',
  19475. value: function _removePages(times) {
  19476. var pages = this.pages;
  19477. var until = times === undefined ? 0 : pages.length - times;
  19478. until = until < 0 ? 1 : until;
  19479. for (var i = pages.length - 2; i >= until; i--) {
  19480. this._pageMap.delete(pages[i]);
  19481. this._pageLoader.unload(pages[i]);
  19482. }
  19483. }
  19484. }, {
  19485. key: '_updateLastPageBackButton',
  19486. value: function _updateLastPageBackButton() {
  19487. var index = this.pages.length - 1;
  19488. if (index >= 0) {
  19489. this.pages[index].updateBackButton(index > 0);
  19490. }
  19491. }
  19492. }, {
  19493. key: '_normalizeIndex',
  19494. value: function _normalizeIndex(index) {
  19495. return index >= 0 ? index : Math.abs(this.pages.length + index) % this.pages.length;
  19496. }
  19497. }, {
  19498. key: '_onDeviceBackButton',
  19499. value: function _onDeviceBackButton(event) {
  19500. if (this.pages.length > 1) {
  19501. this.popPage();
  19502. } else {
  19503. event.callParentHandler();
  19504. }
  19505. }
  19506. }, {
  19507. key: '_lastIndexOfPage',
  19508. value: function _lastIndexOfPage(pageName) {
  19509. var index = void 0;
  19510. for (index = this.pages.length - 1; index >= 0; index--) {
  19511. if (pageName === this._pageMap.get(this.pages[index])) {
  19512. break;
  19513. }
  19514. }
  19515. return index;
  19516. }
  19517. }, {
  19518. key: '_emitPreEvent',
  19519. value: function _emitPreEvent(name) {
  19520. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19521. var isCanceled = false;
  19522. util$1.triggerElementEvent(this, 'pre' + name, util$1.extend({
  19523. navigator: this,
  19524. currentPage: this.pages[this.pages.length - 1],
  19525. cancel: function cancel() {
  19526. return isCanceled = true;
  19527. }
  19528. }, data));
  19529. return isCanceled;
  19530. }
  19531. }, {
  19532. key: '_emitPrePushEvent',
  19533. value: function _emitPrePushEvent() {
  19534. return this._emitPreEvent('push');
  19535. }
  19536. }, {
  19537. key: '_emitPrePopEvent',
  19538. value: function _emitPrePopEvent() {
  19539. var l = this.pages.length;
  19540. return this._emitPreEvent('pop', {
  19541. leavePage: this.pages[l - 1],
  19542. enterPage: this.pages[l - 2]
  19543. });
  19544. }
  19545. // TODO: 書き直す
  19546. }, {
  19547. key: '_createPageElement',
  19548. value: function _createPageElement(templateHTML) {
  19549. var pageElement = util$1.createElement(internal$1.normalizePageHTML(templateHTML));
  19550. verifyPageElement(pageElement);
  19551. return pageElement;
  19552. }
  19553. /**
  19554. * @property onDeviceBackButton
  19555. * @type {Object}
  19556. * @description
  19557. * [en]Back-button handler.[/en]
  19558. * [ja]バックボタンハンドラ。[/ja]
  19559. */
  19560. }, {
  19561. key: '_show',
  19562. value: function _show() {
  19563. var _this11 = this;
  19564. this.loaded.then(function () {
  19565. return _this11.topPage && _this11.topPage._show();
  19566. });
  19567. }
  19568. }, {
  19569. key: '_hide',
  19570. value: function _hide() {
  19571. this.topPage && this.topPage._hide();
  19572. }
  19573. }, {
  19574. key: '_destroy',
  19575. value: function _destroy() {
  19576. for (var i = this.pages.length - 1; i >= 0; i--) {
  19577. this._pageLoader.unload(this.pages[i]);
  19578. }
  19579. this.remove();
  19580. }
  19581. /**
  19582. * @param {String} name
  19583. * @param {Function} Animator
  19584. */
  19585. }, {
  19586. key: 'pageLoader',
  19587. get: function get$$1() {
  19588. return this._pageLoader;
  19589. },
  19590. set: function set$$1(pageLoader) {
  19591. if (!(pageLoader instanceof PageLoader)) {
  19592. util$1.throwPageLoader();
  19593. }
  19594. this._pageLoader = pageLoader;
  19595. }
  19596. }, {
  19597. key: 'page',
  19598. get: function get$$1() {
  19599. return this._page;
  19600. },
  19601. set: function set$$1(page) {
  19602. this._page = page;
  19603. }
  19604. }, {
  19605. key: 'onDeviceBackButton',
  19606. get: function get$$1() {
  19607. return this._backButtonHandler;
  19608. },
  19609. set: function set$$1(callback) {
  19610. if (this._backButtonHandler) {
  19611. this._backButtonHandler.destroy();
  19612. }
  19613. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  19614. }
  19615. /**
  19616. * @property topPage
  19617. * @readonly
  19618. * @type {HTMLElement}
  19619. * @description
  19620. * [en]Current top page element. Use this method to access options passed by `pushPage()`-like methods.[/en]
  19621. * [ja]現在のページを取得します。pushPage()やresetToPage()メソッドの引数を取得できます。[/ja]
  19622. */
  19623. }, {
  19624. key: 'topPage',
  19625. get: function get$$1() {
  19626. var last = this.lastElementChild;
  19627. while (last && last.tagName !== 'ONS-PAGE') {
  19628. last = last.previousElementSibling;
  19629. }
  19630. return last;
  19631. }
  19632. /**
  19633. * @property pages
  19634. * @readonly
  19635. * @type {Array}
  19636. * @description
  19637. * [en]Copy of the navigator's page stack.[/en]
  19638. * [ja][/ja]
  19639. */
  19640. }, {
  19641. key: 'pages',
  19642. get: function get$$1() {
  19643. return util$1.arrayFrom(this.children).filter(function (element) {
  19644. return element.tagName === 'ONS-PAGE';
  19645. });
  19646. }
  19647. /**
  19648. * @property onSwipe
  19649. * @type {Function}
  19650. * @description
  19651. * [en]Hook called whenever the user slides the navigator (swipe-to-pop). It gets a decimal ratio (0-1) and an animationOptions object as arguments.[/en]
  19652. * [ja][/ja]
  19653. */
  19654. }, {
  19655. key: 'onSwipe',
  19656. get: function get$$1() {
  19657. return this._onSwipe;
  19658. },
  19659. set: function set$$1(value) {
  19660. if (value && !(value instanceof Function)) {
  19661. util$1.throw('"onSwipe" must be a function');
  19662. }
  19663. this._onSwipe = value;
  19664. }
  19665. /**
  19666. * @property options
  19667. * @type {Object}
  19668. * @description
  19669. * [en]Default options object. Attributes have priority over this property.[/en]
  19670. * [ja][/ja]
  19671. */
  19672. /**
  19673. * @property options.animation
  19674. * @type {String}
  19675. * @description
  19676. * [en]
  19677. * Animation name. Available animations are `"slide"`, `"lift"`, `"fade"` and `"none"`.
  19678. * These are platform based animations. For fixed animations, add `"-ios"` or `"-md"` suffix to the animation name. E.g. `"lift-ios"`, `"lift-md"`. Defaults values are `"slide-ios"` and `"fade-md"`.
  19679. * [/en]
  19680. * [ja][/ja]
  19681. */
  19682. /**
  19683. * @property options.animationOptions
  19684. * @type {String}
  19685. * @description
  19686. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  19687. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}` [/ja]
  19688. */
  19689. /**
  19690. * @property options.callback
  19691. * @type {String}
  19692. * @description
  19693. * [en]Function that is called when the transition has ended.[/en]
  19694. * [ja]このメソッドによる画面遷移が終了した際に呼び出される関数オブジェクトを指定します。[/ja]
  19695. */
  19696. }, {
  19697. key: 'options',
  19698. get: function get$$1() {
  19699. return this._options;
  19700. },
  19701. set: function set$$1(object) {
  19702. this._options = object;
  19703. }
  19704. }, {
  19705. key: '_isRunning',
  19706. set: function set$$1(value) {
  19707. this.setAttribute('_is-running', value ? 'true' : 'false');
  19708. },
  19709. get: function get$$1() {
  19710. return JSON.parse(this.getAttribute('_is-running'));
  19711. }
  19712. }], [{
  19713. key: 'registerAnimator',
  19714. value: function registerAnimator(name, Animator) {
  19715. if (!(Animator.prototype instanceof NavigatorAnimator)) {
  19716. util$1.throwAnimator('Navigator');
  19717. }
  19718. _animatorDict$5[name] = Animator;
  19719. }
  19720. }, {
  19721. key: 'observedAttributes',
  19722. get: function get$$1() {
  19723. return ['animation', 'swipeable'];
  19724. }
  19725. }, {
  19726. key: 'animators',
  19727. get: function get$$1() {
  19728. return _animatorDict$5;
  19729. }
  19730. }, {
  19731. key: 'NavigatorAnimator',
  19732. get: function get$$1() {
  19733. return NavigatorAnimator;
  19734. }
  19735. }, {
  19736. key: 'events',
  19737. get: function get$$1() {
  19738. return ['prepush', 'postpush', 'prepop', 'postpop'];
  19739. }
  19740. }, {
  19741. key: 'rewritables',
  19742. get: function get$$1() {
  19743. return rewritables;
  19744. }
  19745. }]);
  19746. return NavigatorElement;
  19747. }(BaseElement);
  19748. onsElements.Navigator = NavigatorElement;
  19749. customElements.define('ons-navigator', NavigatorElement);
  19750. /*
  19751. Copyright 2013-2015 ASIAL CORPORATION
  19752. Licensed under the Apache License, Version 2.0 (the "License");
  19753. you may not use this file except in compliance with the License.
  19754. You may obtain a copy of the License at
  19755. http://www.apache.org/licenses/LICENSE-2.0
  19756. Unless required by applicable law or agreed to in writing, software
  19757. distributed under the License is distributed on an "AS IS" BASIS,
  19758. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19759. See the License for the specific language governing permissions and
  19760. limitations under the License.
  19761. */
  19762. var defaultClassName$10 = 'toolbar';
  19763. var scheme$18 = {
  19764. '': 'toolbar--*',
  19765. '.toolbar__left': 'toolbar--*__left',
  19766. '.toolbar__center': 'toolbar--*__center',
  19767. '.toolbar__right': 'toolbar--*__right'
  19768. };
  19769. /**
  19770. * @element ons-toolbar
  19771. * @category page
  19772. * @modifier material
  19773. * [en]Material Design toolbar.[/en]
  19774. * [ja][/ja]
  19775. * @modifier transparent
  19776. * [en]Transparent toolbar.[/en]
  19777. * [ja]透明な背景を持つツールバーを表示します。[/ja]
  19778. * @modifier cover-content
  19779. * [en]Displays the toolbar on top of the page's content. Should be combined with `transparent` modifier.[/en]
  19780. * [ja][/ja]
  19781. * @modifier noshadow
  19782. * [en]Toolbar without shadow.[/en]
  19783. * [ja]ツールバーに影を付けずに表示します。[/ja]
  19784. * @description
  19785. * [en]
  19786. * Toolbar component that can be used with navigation.
  19787. *
  19788. * Left, center and right containers can be specified by class names.
  19789. *
  19790. * This component will automatically display as a Material Design toolbar when running on Android devices.
  19791. * [/en]
  19792. * [ja]ナビゲーションで使用するツールバー用コンポーネントです。クラス名により、左、中央、右のコンテナを指定できます。[/ja]
  19793. * @codepen aHmGL
  19794. * @tutorial vanilla/Reference/toolbar
  19795. * @guide compilation.html#toolbar-compilation [en]Adding a toolbar[/en][ja]ツールバーの追加[/ja]
  19796. * @seealso ons-bottom-toolbar
  19797. * [en]The `<ons-bottom-toolbar>` displays a toolbar on the bottom of the page.[/en]
  19798. * [ja]ons-bottom-toolbarコンポーネント[/ja]
  19799. * @seealso ons-back-button
  19800. * [en]The `<ons-back-button>` component displays a back button inside the toolbar.[/en]
  19801. * [ja]ons-back-buttonコンポーネント[/ja]
  19802. * @seealso ons-toolbar-button
  19803. * [en]The `<ons-toolbar-button>` component displays a toolbar button inside the toolbar.[/en]
  19804. * [ja]ons-toolbar-buttonコンポーネント[/ja]
  19805. * @example
  19806. * <ons-page>
  19807. * <ons-toolbar>
  19808. * <div class="left">
  19809. * <ons-back-button>
  19810. * Back
  19811. * </ons-back-button>
  19812. * </div>
  19813. * <div class="center">
  19814. * Title
  19815. * </div>
  19816. * <div class="right">
  19817. * <ons-toolbar-button>
  19818. * <ons-icon icon="md-menu"></ons-icon>
  19819. * </ons-toolbar-button>
  19820. * </div>
  19821. * </ons-toolbar>
  19822. * </ons-page>
  19823. */
  19824. var ToolbarElement = function (_BaseElement) {
  19825. inherits(ToolbarElement, _BaseElement);
  19826. /**
  19827. * @attribute inline
  19828. * @initonly
  19829. * @description
  19830. * [en]Display the toolbar as an inline element.[/en]
  19831. * [ja]ツールバーをインラインに置きます。スクロール領域内にそのまま表示されます。[/ja]
  19832. */
  19833. /**
  19834. * @attribute static
  19835. * @description
  19836. * [en]Static toolbars are not animated by `ons-navigator` when pushing or popping pages. This can be useful to improve performance in some situations.[/en]
  19837. * [ja][/ja]
  19838. */
  19839. /**
  19840. * @attribute modifier
  19841. * @description
  19842. * [en]The appearance of the toolbar.[/en]
  19843. * [ja]ツールバーの表現を指定します。[/ja]
  19844. */
  19845. function ToolbarElement() {
  19846. classCallCheck(this, ToolbarElement);
  19847. var _this = possibleConstructorReturn(this, (ToolbarElement.__proto__ || Object.getPrototypeOf(ToolbarElement)).call(this));
  19848. contentReady(_this, function () {
  19849. _this._compile();
  19850. });
  19851. return _this;
  19852. }
  19853. createClass(ToolbarElement, [{
  19854. key: 'attributeChangedCallback',
  19855. value: function attributeChangedCallback(name, last, current) {
  19856. switch (name) {
  19857. case 'class':
  19858. util$1.restoreClass(this, defaultClassName$10, scheme$18);
  19859. break;
  19860. case 'modifier':
  19861. ModifierUtil.onModifierChanged(last, current, this, scheme$18);
  19862. break;
  19863. }
  19864. }
  19865. /**
  19866. * @method setVisibility
  19867. * @signature setVisibility(visible)
  19868. * @param {Boolean} visible
  19869. * [en]Set to true to show the toolbar, false to hide it[/en]
  19870. * [ja][/ja]
  19871. * @description
  19872. * [en]Shows the toolbar if visible is true, otherwise hides it.[/en]
  19873. * [ja][/ja]
  19874. */
  19875. }, {
  19876. key: 'setVisibility',
  19877. value: function setVisibility(visible) {
  19878. var _this2 = this;
  19879. contentReady(this, function () {
  19880. _this2.style.display = visible ? '' : 'none';
  19881. if (_this2.parentNode) {
  19882. var siblingBackground = util$1.findChild(_this2.parentNode, '.page__background');
  19883. if (siblingBackground) {
  19884. siblingBackground.style.top = visible ? null : 0;
  19885. }
  19886. var siblingContent = util$1.findChild(_this2.parentNode, '.page__content');
  19887. if (siblingContent) {
  19888. siblingContent.style.top = visible ? null : 0;
  19889. }
  19890. }
  19891. });
  19892. }
  19893. /**
  19894. * @method show
  19895. * @signature show()
  19896. * @description
  19897. * [en]Show the toolbar.[/en]
  19898. * [ja][/ja]
  19899. */
  19900. }, {
  19901. key: 'show',
  19902. value: function show() {
  19903. this.setVisibility(true);
  19904. }
  19905. /**
  19906. * @method hide
  19907. * @signature hide()
  19908. * @description
  19909. * [en]Hide the toolbar.[/en]
  19910. * [ja][/ja]
  19911. */
  19912. }, {
  19913. key: 'hide',
  19914. value: function hide() {
  19915. this.setVisibility(false);
  19916. }
  19917. /**
  19918. * @return {HTMLElement}
  19919. */
  19920. }, {
  19921. key: '_getToolbarLeftItemsElement',
  19922. value: function _getToolbarLeftItemsElement() {
  19923. return this.querySelector('.left') || internal$1.nullElement;
  19924. }
  19925. /**
  19926. * @return {HTMLElement}
  19927. */
  19928. }, {
  19929. key: '_getToolbarCenterItemsElement',
  19930. value: function _getToolbarCenterItemsElement() {
  19931. return this.querySelector('.center') || internal$1.nullElement;
  19932. }
  19933. /**
  19934. * @return {HTMLElement}
  19935. */
  19936. }, {
  19937. key: '_getToolbarRightItemsElement',
  19938. value: function _getToolbarRightItemsElement() {
  19939. return this.querySelector('.right') || internal$1.nullElement;
  19940. }
  19941. /**
  19942. * @return {HTMLElement}
  19943. */
  19944. }, {
  19945. key: '_getToolbarBackButtonLabelElement',
  19946. value: function _getToolbarBackButtonLabelElement() {
  19947. return this.querySelector('ons-back-button .back-button__label') || internal$1.nullElement;
  19948. }
  19949. /**
  19950. * @return {HTMLElement}
  19951. */
  19952. }, {
  19953. key: '_getToolbarBackButtonIconElement',
  19954. value: function _getToolbarBackButtonIconElement() {
  19955. return this.querySelector('ons-back-button .back-button__icon') || internal$1.nullElement;
  19956. }
  19957. }, {
  19958. key: '_compile',
  19959. value: function _compile() {
  19960. autoStyle.prepare(this);
  19961. this.classList.add(defaultClassName$10);
  19962. this._ensureToolbarItemElements();
  19963. ModifierUtil.initModifier(this, scheme$18);
  19964. }
  19965. }, {
  19966. key: '_ensureToolbarItemElements',
  19967. value: function _ensureToolbarItemElements() {
  19968. for (var i = this.childNodes.length - 1; i >= 0; i--) {
  19969. // case of not element
  19970. if (this.childNodes[i].nodeType != 1) {
  19971. this.removeChild(this.childNodes[i]);
  19972. }
  19973. }
  19974. var center = this._ensureToolbarElement('center');
  19975. center.classList.add('toolbar__title');
  19976. if (this.children.length !== 1 || !this.children[0].classList.contains('center')) {
  19977. var left = this._ensureToolbarElement('left');
  19978. var right = this._ensureToolbarElement('right');
  19979. if (this.children[0] !== left || this.children[1] !== center || this.children[2] !== right) {
  19980. this.appendChild(left);
  19981. this.appendChild(center);
  19982. this.appendChild(right);
  19983. }
  19984. }
  19985. }
  19986. }, {
  19987. key: '_ensureToolbarElement',
  19988. value: function _ensureToolbarElement(name) {
  19989. if (util$1.findChild(this, '.toolbar__' + name)) {
  19990. var _element = util$1.findChild(this, '.toolbar__' + name);
  19991. _element.classList.add(name);
  19992. return _element;
  19993. }
  19994. var element = util$1.findChild(this, '.' + name) || util$1.create('.' + name);
  19995. element.classList.add('toolbar__' + name);
  19996. return element;
  19997. }
  19998. }], [{
  19999. key: 'observedAttributes',
  20000. get: function get$$1() {
  20001. return ['modifier', 'class'];
  20002. }
  20003. }]);
  20004. return ToolbarElement;
  20005. }(BaseElement);
  20006. onsElements.Toolbar = ToolbarElement;
  20007. customElements.define('ons-toolbar', ToolbarElement);
  20008. /*
  20009. Copyright 2013-2015 ASIAL CORPORATION
  20010. Licensed under the Apache License, Version 2.0 (the "License");
  20011. you may not use this file except in compliance with the License.
  20012. You may obtain a copy of the License at
  20013. http://www.apache.org/licenses/LICENSE-2.0
  20014. Unless required by applicable law or agreed to in writing, software
  20015. distributed under the License is distributed on an "AS IS" BASIS,
  20016. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20017. See the License for the specific language governing permissions and
  20018. limitations under the License.
  20019. */
  20020. var defaultClassName$9 = 'page';
  20021. var scheme$17 = {
  20022. '': 'page--*',
  20023. '.page__content': 'page--*__content',
  20024. '.page__background': 'page--*__background'
  20025. };
  20026. /**
  20027. * @element ons-page
  20028. * @category page
  20029. * @modifier material
  20030. * [en]Material Design style[/en]
  20031. * [ja][/ja]
  20032. * @description
  20033. * [en]
  20034. * This component defines the root of each page. If the content is large it will become scrollable.
  20035. *
  20036. * A navigation bar can be added to the top of the page using the `<ons-toolbar>` element.
  20037. * [/en]
  20038. * [ja]ページ定義のためのコンポーネントです。このコンポーネントの内容はスクロールが許可されます。[/ja]
  20039. * @tutorial vanilla/Reference/page
  20040. * @guide lifecycle.html#events
  20041. * [en]Overview of page events[/en]
  20042. * [ja]Overview of page events[/ja]
  20043. * @guide fundamentals.html#managing-pages
  20044. * [en]Managing multiple pages[/en]
  20045. * [ja]複数のページを管理する[/ja]
  20046. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  20047. * @seealso ons-toolbar
  20048. * [en]Use the `<ons-toolbar>` element to add a navigation bar to the top of the page.[/en]
  20049. * [ja][/ja]
  20050. * @example
  20051. * <ons-page>
  20052. * <ons-toolbar>
  20053. * <div class="left">
  20054. * <ons-back-button>Back</ons-back-button>
  20055. * </div>
  20056. * <div class="center">Title</div>
  20057. * <div class="right">
  20058. * <ons-toolbar-button>
  20059. * <ons-icon icon="md-menu"></ons-icon>
  20060. * </ons-toolbar-button>
  20061. * </div>
  20062. * </ons-toolbar>
  20063. *
  20064. * <p>Page content</p>
  20065. * </ons-page>
  20066. *
  20067. * @example
  20068. * <script>
  20069. * myApp.handler = function(done) {
  20070. * loadMore().then(done);
  20071. * }
  20072. * </script>
  20073. *
  20074. * <ons-page on-infinite-scroll="myApp.handler">
  20075. * <ons-toolbar>
  20076. * <div class="center">List</div>
  20077. * </ons-toolbar>
  20078. *
  20079. * <ons-list>
  20080. * <ons-list-item>#1</ons-list-item>
  20081. * <ons-list-item>#2</ons-list-item>
  20082. * <ons-list-item>#3</ons-list-item>
  20083. * ...
  20084. * </ons-list>
  20085. * </ons-page>
  20086. */
  20087. var PageElement = function (_BaseElement) {
  20088. inherits(PageElement, _BaseElement);
  20089. /**
  20090. * @event init
  20091. * @description
  20092. * [en]Fired right after the page is attached.[/en]
  20093. * [ja]ページがアタッチされた後に発火します。[/ja]
  20094. * @param {Object} event [en]Event object.[/en]
  20095. */
  20096. /**
  20097. * @event show
  20098. * @description
  20099. * [en]Fired right after the page is shown.[/en]
  20100. * [ja]ページが表示された後に発火します。[/ja]
  20101. * @param {Object} event [en]Event object.[/en]
  20102. */
  20103. /**
  20104. * @event hide
  20105. * @description
  20106. * [en]Fired right after the page is hidden.[/en]
  20107. * [ja]ページが隠れた後に発火します。[/ja]
  20108. * @param {Object} event [en]Event object.[/en]
  20109. */
  20110. /**
  20111. * @event destroy
  20112. * @description
  20113. * [en]Fired right before the page is destroyed.[/en]
  20114. * [ja]ページが破棄される前に発火します。[/ja]
  20115. * @param {Object} event [en]Event object.[/en]
  20116. */
  20117. /**
  20118. * @attribute modifier
  20119. * @type {String}
  20120. * @description
  20121. * [en]Specify modifier name to specify custom styles.[/en]
  20122. * [ja]スタイル定義をカスタマイズするための名前を指定します。[/ja]
  20123. */
  20124. /**
  20125. * @attribute on-infinite-scroll
  20126. * @type {String}
  20127. * @description
  20128. * [en]Path of the function to be executed on infinite scrolling. Example: `app.loadData`. The function receives a done callback that must be called when it's finished.[/en]
  20129. * [ja][/ja]
  20130. */
  20131. function PageElement() {
  20132. classCallCheck(this, PageElement);
  20133. var _this = possibleConstructorReturn(this, (PageElement.__proto__ || Object.getPrototypeOf(PageElement)).call(this));
  20134. _this._deriveHooks();
  20135. _this._defaultClassName = defaultClassName$9;
  20136. _this.classList.add(defaultClassName$9);
  20137. _this._initialized = false;
  20138. contentReady(_this, function () {
  20139. _this._compile();
  20140. _this._isShown = false;
  20141. _this._contentElement = _this._getContentElement();
  20142. _this._backgroundElement = _this._getBackgroundElement();
  20143. });
  20144. return _this;
  20145. }
  20146. createClass(PageElement, [{
  20147. key: '_compile',
  20148. value: function _compile() {
  20149. var _this2 = this;
  20150. autoStyle.prepare(this);
  20151. var toolbar = util$1.findChild(this, 'ons-toolbar');
  20152. var background = util$1.findChild(this, '.page__background') || util$1.findChild(this, '.background') || document.createElement('div');
  20153. background.classList.add('page__background');
  20154. this.insertBefore(background, !toolbar && this.firstChild || toolbar && toolbar.nextSibling);
  20155. var content = util$1.findChild(this, '.page__content') || util$1.findChild(this, '.content') || document.createElement('div');
  20156. content.classList.add('page__content');
  20157. if (!content.parentElement) {
  20158. util$1.arrayFrom(this.childNodes).forEach(function (node) {
  20159. if (node.nodeType !== 1 || _this2._elementShouldBeMoved(node)) {
  20160. content.appendChild(node); // Can trigger detached connectedCallbacks
  20161. }
  20162. });
  20163. }
  20164. this._tryToFillStatusBar(content); // Must run before child pages try to fill status bar.
  20165. this.insertBefore(content, background.nextSibling); // Can trigger attached connectedCallbacks
  20166. if ((!toolbar || !util$1.hasModifier(toolbar, 'transparent')) && content.children.length === 1 && util$1.isPageControl(content.children[0])) {
  20167. this._defaultClassName += ' page--wrapper';
  20168. this.attributeChangedCallback('class');
  20169. }
  20170. var bottomToolbar = util$1.findChild(this, 'ons-bottom-toolbar');
  20171. if (bottomToolbar) {
  20172. this._defaultClassName += ' page-with-bottom-toolbar';
  20173. this.attributeChangedCallback('class');
  20174. }
  20175. ModifierUtil.initModifier(this, scheme$17);
  20176. }
  20177. }, {
  20178. key: '_elementShouldBeMoved',
  20179. value: function _elementShouldBeMoved(el) {
  20180. if (el.classList.contains('page__background')) {
  20181. return false;
  20182. }
  20183. var tagName = el.tagName.toLowerCase();
  20184. if (tagName === 'ons-fab') {
  20185. return !el.hasAttribute('position');
  20186. }
  20187. var fixedElements = ['script', 'ons-toolbar', 'ons-bottom-toolbar', 'ons-modal', 'ons-speed-dial', 'ons-dialog', 'ons-alert-dialog', 'ons-popover', 'ons-action-sheet'];
  20188. return el.hasAttribute('inline') || fixedElements.indexOf(tagName) === -1;
  20189. }
  20190. }, {
  20191. key: '_tryToFillStatusBar',
  20192. value: function _tryToFillStatusBar() {
  20193. var _this3 = this;
  20194. var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._contentElement;
  20195. internal$1.autoStatusBarFill(function () {
  20196. util$1.toggleAttribute(_this3, 'status-bar-fill', !util$1.findParent(_this3, function (e) {
  20197. return e.hasAttribute('status-bar-fill');
  20198. }) // Not already filled
  20199. && (_this3._canAnimateToolbar(content) || !util$1.findChild(content, util$1.isPageControl)) // Has toolbar or cannot delegate
  20200. );
  20201. });
  20202. }
  20203. }, {
  20204. key: '_canAnimateToolbar',
  20205. value: function _canAnimateToolbar() {
  20206. var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._contentElement;
  20207. if (util$1.findChild(this, 'ons-toolbar')) {
  20208. return true;
  20209. }
  20210. return !!util$1.findChild(content, function (el) {
  20211. return util$1.match(el, 'ons-toolbar') && !el.hasAttribute('inline');
  20212. });
  20213. }
  20214. }, {
  20215. key: 'connectedCallback',
  20216. value: function connectedCallback() {
  20217. var _this4 = this;
  20218. if (!util$1.isAttached(this)) {
  20219. // Avoid detached calls
  20220. return;
  20221. }
  20222. contentReady(this, function () {
  20223. _this4._tryToFillStatusBar(); // Ensure status bar when the element was compiled before connected
  20224. if (_this4.hasAttribute('on-infinite-scroll')) {
  20225. _this4.attributeChangedCallback('on-infinite-scroll', null, _this4.getAttribute('on-infinite-scroll'));
  20226. }
  20227. if (!_this4._initialized) {
  20228. _this4._initialized = true;
  20229. setImmediate(function () {
  20230. _this4.onInit && _this4.onInit();
  20231. util$1.triggerElementEvent(_this4, 'init');
  20232. });
  20233. if (!util$1.hasAnyComponentAsParent(_this4)) {
  20234. setImmediate(function () {
  20235. return _this4._show();
  20236. });
  20237. }
  20238. }
  20239. });
  20240. }
  20241. }, {
  20242. key: 'updateBackButton',
  20243. value: function updateBackButton(show) {
  20244. if (this.backButton) {
  20245. show ? this.backButton.show() : this.backButton.hide();
  20246. }
  20247. }
  20248. }, {
  20249. key: '_onScroll',
  20250. value: function _onScroll() {
  20251. var _this5 = this;
  20252. var c = this._contentElement,
  20253. overLimit = (c.scrollTop + c.clientHeight) / c.scrollHeight >= this._infiniteScrollLimit;
  20254. if (this._onInfiniteScroll && !this._loadingContent && overLimit) {
  20255. this._loadingContent = true;
  20256. this._onInfiniteScroll(function () {
  20257. return _this5._loadingContent = false;
  20258. });
  20259. }
  20260. }
  20261. /**
  20262. * @property onDeviceBackButton
  20263. * @type {Object}
  20264. * @description
  20265. * [en]Back-button handler.[/en]
  20266. * [ja]バックボタンハンドラ。[/ja]
  20267. */
  20268. }, {
  20269. key: '_getContentElement',
  20270. value: function _getContentElement() {
  20271. var result = util$1.findChild(this, '.page__content');
  20272. if (result) {
  20273. return result;
  20274. }
  20275. util$1.throw('Fail to get ".page__content" element');
  20276. }
  20277. }, {
  20278. key: '_getBackgroundElement',
  20279. value: function _getBackgroundElement() {
  20280. var result = util$1.findChild(this, '.page__background');
  20281. if (result) {
  20282. return result;
  20283. }
  20284. util$1.throw('Fail to get ".page__background" element');
  20285. }
  20286. }, {
  20287. key: '_getBottomToolbarElement',
  20288. value: function _getBottomToolbarElement() {
  20289. return util$1.findChild(this, 'ons-bottom-toolbar') || internal$1.nullElement;
  20290. }
  20291. }, {
  20292. key: '_getToolbarElement',
  20293. value: function _getToolbarElement() {
  20294. return util$1.findChild(this, 'ons-toolbar') || document.createElement('ons-toolbar');
  20295. }
  20296. }, {
  20297. key: 'attributeChangedCallback',
  20298. value: function attributeChangedCallback(name, last, current) {
  20299. var _this6 = this;
  20300. switch (name) {
  20301. case 'class':
  20302. util$1.restoreClass(this, this._defaultClassName, scheme$17);
  20303. break;
  20304. case 'modifier':
  20305. ModifierUtil.onModifierChanged(last, current, this, scheme$17);
  20306. break;
  20307. case 'on-infinite-scroll':
  20308. if (current === null) {
  20309. this.onInfiniteScroll = null;
  20310. } else {
  20311. this.onInfiniteScroll = function (done) {
  20312. var f = util$1.findFromPath(current);
  20313. _this6.onInfiniteScroll = f;
  20314. f(done);
  20315. };
  20316. }
  20317. break;
  20318. }
  20319. }
  20320. }, {
  20321. key: '_show',
  20322. value: function _show() {
  20323. if (!this._isShown && util$1.isAttached(this)) {
  20324. this._isShown = true;
  20325. this.setAttribute('shown', '');
  20326. this.onShow && this.onShow();
  20327. util$1.triggerElementEvent(this, 'show');
  20328. util$1.propagateAction(this, '_show');
  20329. }
  20330. }
  20331. }, {
  20332. key: '_hide',
  20333. value: function _hide() {
  20334. if (this._isShown) {
  20335. this._isShown = false;
  20336. this.removeAttribute('shown');
  20337. this.onHide && this.onHide();
  20338. util$1.triggerElementEvent(this, 'hide');
  20339. util$1.propagateAction(this, '_hide');
  20340. }
  20341. }
  20342. }, {
  20343. key: '_destroy',
  20344. value: function _destroy() {
  20345. this._hide();
  20346. this.onDestroy && this.onDestroy();
  20347. util$1.triggerElementEvent(this, 'destroy');
  20348. if (this.onDeviceBackButton) {
  20349. this.onDeviceBackButton.destroy();
  20350. }
  20351. util$1.propagateAction(this, '_destroy');
  20352. this.remove();
  20353. }
  20354. }, {
  20355. key: '_deriveHooks',
  20356. value: function _deriveHooks() {
  20357. var _this7 = this;
  20358. this.constructor.events.forEach(function (event) {
  20359. var key = 'on' + event.charAt(0).toUpperCase() + event.slice(1);
  20360. Object.defineProperty(_this7, key, {
  20361. configurable: true,
  20362. enumerable: true,
  20363. get: function get$$1() {
  20364. return _this7['_' + key];
  20365. },
  20366. set: function set$$1(value) {
  20367. if (!(value instanceof Function)) {
  20368. util$1.throw('"' + key + '" hook must be a function');
  20369. }
  20370. _this7['_' + key] = value.bind(_this7);
  20371. }
  20372. });
  20373. });
  20374. }
  20375. }, {
  20376. key: 'name',
  20377. set: function set$$1(str) {
  20378. this.setAttribute('name', str);
  20379. },
  20380. get: function get$$1() {
  20381. return this.getAttribute('name');
  20382. }
  20383. }, {
  20384. key: 'backButton',
  20385. get: function get$$1() {
  20386. return this.querySelector('ons-back-button');
  20387. }
  20388. /**
  20389. * @property onInfiniteScroll
  20390. * @description
  20391. * [en]Function to be executed when scrolling to the bottom of the page. The function receives a done callback as an argument that must be called when it's finished.[/en]
  20392. * [ja][/ja]
  20393. */
  20394. }, {
  20395. key: 'onInfiniteScroll',
  20396. set: function set$$1(value) {
  20397. var _this8 = this;
  20398. if (value && !(value instanceof Function)) {
  20399. util$1.throw('"onInfiniteScroll" must be function or null');
  20400. }
  20401. contentReady(this, function () {
  20402. if (!value) {
  20403. _this8._contentElement.removeEventListener('scroll', _this8._boundOnScroll);
  20404. } else if (!_this8._onInfiniteScroll) {
  20405. _this8._infiniteScrollLimit = 0.9;
  20406. _this8._boundOnScroll = _this8._onScroll.bind(_this8);
  20407. setImmediate(function () {
  20408. return _this8._contentElement.addEventListener('scroll', _this8._boundOnScroll);
  20409. });
  20410. }
  20411. _this8._onInfiniteScroll = value;
  20412. });
  20413. },
  20414. get: function get$$1() {
  20415. return this._onInfiniteScroll;
  20416. }
  20417. }, {
  20418. key: 'onDeviceBackButton',
  20419. get: function get$$1() {
  20420. return this._backButtonHandler;
  20421. },
  20422. set: function set$$1(callback) {
  20423. if (this._backButtonHandler) {
  20424. this._backButtonHandler.destroy();
  20425. }
  20426. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  20427. }
  20428. }, {
  20429. key: 'scrollTop',
  20430. get: function get$$1() {
  20431. return this._contentElement.scrollTop;
  20432. },
  20433. set: function set$$1(newValue) {
  20434. this._contentElement.scrollTop = newValue;
  20435. }
  20436. }], [{
  20437. key: 'observedAttributes',
  20438. get: function get$$1() {
  20439. return ['modifier', 'on-infinite-scroll', 'class'];
  20440. }
  20441. }, {
  20442. key: 'events',
  20443. get: function get$$1() {
  20444. return ['init', 'show', 'hide', 'destroy'];
  20445. }
  20446. /**
  20447. * @property data
  20448. * @type {*}
  20449. * @description
  20450. * [en]User's custom data passed to `pushPage()`-like methods.[/en]
  20451. * [ja][/ja]
  20452. */
  20453. }]);
  20454. return PageElement;
  20455. }(BaseElement);
  20456. onsElements.Page = PageElement;
  20457. customElements.define('ons-page', PageElement);
  20458. /*
  20459. Copyright 2013-2015 ASIAL CORPORATION
  20460. Licensed under the Apache License, Version 2.0 (the "License");
  20461. you may not use this file except in compliance with the License.
  20462. You may obtain a copy of the License at
  20463. http://www.apache.org/licenses/LICENSE-2.0
  20464. Unless required by applicable law or agreed to in writing, software
  20465. distributed under the License is distributed on an "AS IS" BASIS,
  20466. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20467. See the License for the specific language governing permissions and
  20468. limitations under the License.
  20469. */
  20470. var PopoverAnimator = function (_BaseAnimator) {
  20471. inherits(PopoverAnimator, _BaseAnimator);
  20472. /**
  20473. * @param {Object} options
  20474. * @param {String} options.timing
  20475. * @param {Number} options.duration
  20476. * @param {Number} options.delay
  20477. */
  20478. function PopoverAnimator() {
  20479. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  20480. _ref$timing = _ref.timing,
  20481. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .4, 1)' : _ref$timing,
  20482. _ref$delay = _ref.delay,
  20483. delay = _ref$delay === undefined ? 0 : _ref$delay,
  20484. _ref$duration = _ref.duration,
  20485. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  20486. classCallCheck(this, PopoverAnimator);
  20487. return possibleConstructorReturn(this, (PopoverAnimator.__proto__ || Object.getPrototypeOf(PopoverAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  20488. }
  20489. createClass(PopoverAnimator, [{
  20490. key: 'show',
  20491. value: function show(popover, callback) {
  20492. callback();
  20493. }
  20494. }, {
  20495. key: 'hide',
  20496. value: function hide(popover, callback) {
  20497. callback();
  20498. }
  20499. }, {
  20500. key: '_animate',
  20501. value: function _animate(element, _ref2) {
  20502. var from = _ref2.from,
  20503. to = _ref2.to,
  20504. options = _ref2.options,
  20505. callback = _ref2.callback,
  20506. _ref2$restore = _ref2.restore,
  20507. restore = _ref2$restore === undefined ? false : _ref2$restore,
  20508. animation = _ref2.animation;
  20509. options = util$1.extend({}, this.options, options);
  20510. if (animation) {
  20511. from = animation.from;
  20512. to = animation.to;
  20513. }
  20514. animation = Animit(element);
  20515. if (restore) {
  20516. animation = animation.saveStyle();
  20517. }
  20518. animation = animation.queue(from).wait(this.delay).queue({
  20519. css: to,
  20520. duration: this.duration,
  20521. timing: this.timing
  20522. });
  20523. if (restore) {
  20524. animation = animation.restoreStyle();
  20525. }
  20526. if (callback) {
  20527. animation = animation.queue(function (done) {
  20528. callback();
  20529. done();
  20530. });
  20531. }
  20532. return animation;
  20533. }
  20534. }, {
  20535. key: '_animateAll',
  20536. value: function _animateAll(element, animations) {
  20537. var _this2 = this;
  20538. Object.keys(animations).forEach(function (key) {
  20539. return _this2._animate(element[key], animations[key]).play();
  20540. });
  20541. }
  20542. }]);
  20543. return PopoverAnimator;
  20544. }(BaseAnimator);
  20545. var fade = {
  20546. out: {
  20547. from: { opacity: 1.0 },
  20548. to: { opacity: 0 }
  20549. },
  20550. in: {
  20551. from: { opacity: 0 },
  20552. to: { opacity: 1.0 }
  20553. }
  20554. };
  20555. var MDFadePopoverAnimator = function (_PopoverAnimator) {
  20556. inherits(MDFadePopoverAnimator, _PopoverAnimator);
  20557. function MDFadePopoverAnimator() {
  20558. classCallCheck(this, MDFadePopoverAnimator);
  20559. return possibleConstructorReturn(this, (MDFadePopoverAnimator.__proto__ || Object.getPrototypeOf(MDFadePopoverAnimator)).apply(this, arguments));
  20560. }
  20561. createClass(MDFadePopoverAnimator, [{
  20562. key: 'show',
  20563. value: function show(popover, callback) {
  20564. this._animateAll(popover, {
  20565. _mask: fade.in,
  20566. _popover: { animation: fade.in, restore: true, callback: callback }
  20567. });
  20568. }
  20569. }, {
  20570. key: 'hide',
  20571. value: function hide(popover, callback) {
  20572. this._animateAll(popover, {
  20573. _mask: fade.out,
  20574. _popover: { animation: fade.out, restore: true, callback: callback }
  20575. });
  20576. }
  20577. }]);
  20578. return MDFadePopoverAnimator;
  20579. }(PopoverAnimator);
  20580. var IOSFadePopoverAnimator = function (_MDFadePopoverAnimato) {
  20581. inherits(IOSFadePopoverAnimator, _MDFadePopoverAnimato);
  20582. function IOSFadePopoverAnimator() {
  20583. classCallCheck(this, IOSFadePopoverAnimator);
  20584. return possibleConstructorReturn(this, (IOSFadePopoverAnimator.__proto__ || Object.getPrototypeOf(IOSFadePopoverAnimator)).apply(this, arguments));
  20585. }
  20586. createClass(IOSFadePopoverAnimator, [{
  20587. key: 'show',
  20588. value: function show(popover, callback) {
  20589. this._animateAll(popover, {
  20590. _mask: fade.in,
  20591. _popover: {
  20592. from: {
  20593. transform: 'scale3d(1.3, 1.3, 1.0)',
  20594. opacity: 0
  20595. },
  20596. to: {
  20597. transform: 'scale3d(1.0, 1.0, 1.0)',
  20598. opacity: 1.0
  20599. },
  20600. restore: true,
  20601. callback: callback
  20602. }
  20603. });
  20604. }
  20605. }]);
  20606. return IOSFadePopoverAnimator;
  20607. }(MDFadePopoverAnimator);
  20608. /*
  20609. Copyright 2013-2015 ASIAL CORPORATION
  20610. Licensed under the Apache License, Version 2.0 (the "License");
  20611. you may not use this file except in compliance with the License.
  20612. You may obtain a copy of the License at
  20613. http://www.apache.org/licenses/LICENSE-2.0
  20614. Unless required by applicable law or agreed to in writing, software
  20615. distributed under the License is distributed on an "AS IS" BASIS,
  20616. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20617. See the License for the specific language governing permissions and
  20618. limitations under the License.
  20619. */
  20620. var scheme$19 = {
  20621. '.popover': 'popover--*',
  20622. '.popover-mask': 'popover-mask--*',
  20623. '.popover__content': 'popover--*__content',
  20624. '.popover__arrow': 'popover--*__arrow'
  20625. };
  20626. var _animatorDict$6 = {
  20627. 'default': function _default() {
  20628. return platform.isAndroid() ? MDFadePopoverAnimator : IOSFadePopoverAnimator;
  20629. },
  20630. 'none': PopoverAnimator,
  20631. 'fade-ios': IOSFadePopoverAnimator,
  20632. 'fade-md': MDFadePopoverAnimator
  20633. };
  20634. var positions = {
  20635. up: 'bottom',
  20636. left: 'right',
  20637. down: 'top',
  20638. right: 'left'
  20639. };
  20640. /**
  20641. * @element ons-popover
  20642. * @category dialog
  20643. * @description
  20644. * [en]
  20645. * A component that displays a popover next to an element. The popover can be used to display extra information about a component or a tooltip.
  20646. *
  20647. * To use the element it can either be attached directly to the `<body>` element or dynamically created from a template using the `ons.createPopover(template)` utility function and the `<template>` tag.
  20648. *
  20649. * Another common way to use the popover is to display a menu when a button on the screen is tapped. For Material Design, popover looks exactly as a dropdown menu.
  20650. * [/en]
  20651. * [ja]ある要素を対象とするポップオーバーを表示するコンポーネントです。[/ja]
  20652. * @codepen ZYYRKo
  20653. * @tutorial vanilla/Reference/popover
  20654. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  20655. * @example
  20656. * <ons-button onclick="showPopover(this)">
  20657. * Click me!
  20658. * </ons-button>
  20659. *
  20660. * <ons-popover direction="down" id="popover">
  20661. * <p>This is a popover!</p>
  20662. * </ons-popover>
  20663. *
  20664. * <script>
  20665. * var showPopover = function(element) {
  20666. * var popover = document.getElementById('popover');
  20667. * popover.show(element);
  20668. * };
  20669. * </script>
  20670. */
  20671. var PopoverElement = function (_BaseDialogElement) {
  20672. inherits(PopoverElement, _BaseDialogElement);
  20673. /**
  20674. * @event preshow
  20675. * @description
  20676. * [en]Fired just before the popover is displayed.[/en]
  20677. * [ja]ポップオーバーが表示される直前に発火します。[/ja]
  20678. * @param {Object} event [en]Event object.[/en]
  20679. * @param {Object} event.popover
  20680. * [en]Component object.[/en]
  20681. * [ja]コンポーネントのオブジェクト。[/ja]
  20682. * @param {Function} event.cancel
  20683. * [en]Call this function to stop the popover from being shown.[/en]
  20684. * [ja]この関数を呼び出すと、ポップオーバーの表示がキャンセルされます。[/ja]
  20685. */
  20686. /**
  20687. * @event postshow
  20688. * @description
  20689. * [en]Fired just after the popover is displayed.[/en]
  20690. * [ja]ポップオーバーが表示された直後に発火します。[/ja]
  20691. * @param {Object} event [en]Event object.[/en]
  20692. * @param {Object} event.popover
  20693. * [en]Component object.[/en]
  20694. * [ja]コンポーネントのオブジェクト。[/ja]
  20695. */
  20696. /**
  20697. * @event prehide
  20698. * @description
  20699. * [en]Fired just before the popover is hidden.[/en]
  20700. * [ja]ポップオーバーが隠れる直前に発火します。[/ja]
  20701. * @param {Object} event [en]Event object.[/en]
  20702. * @param {Object} event.popover
  20703. * [en]Component object.[/en]
  20704. * [ja]コンポーネントのオブジェクト。[/ja]
  20705. * @param {Function} event.cancel
  20706. * [en]Call this function to stop the popover from being hidden.[/en]
  20707. * [ja]この関数を呼び出すと、ポップオーバーが隠れる処理をキャンセルします。[/ja]
  20708. */
  20709. /**
  20710. * @event posthide
  20711. * @description
  20712. * [en]Fired just after the popover is hidden.[/en]
  20713. * [ja]ポップオーバーが隠れた後に発火します。[/ja]
  20714. * @param {Object} event [en]Event object.[/en]
  20715. * @param {Object} event.popover
  20716. * [en]Component object.[/en]
  20717. * [ja]コンポーネントのオブジェクト。[/ja]
  20718. */
  20719. /**
  20720. * @attribute modifier
  20721. * @type {String}
  20722. * @description
  20723. * [en]The appearance of the popover.[/en]
  20724. * [ja]ポップオーバーの表現を指定します。[/ja]
  20725. */
  20726. /**
  20727. * @attribute direction
  20728. * @type {String}
  20729. * @description
  20730. * [en]
  20731. * A space separated list of directions. If more than one direction is specified,
  20732. * it will be chosen automatically. Valid directions are `"up"`, `"down"`, `"left"` and `"right"`.
  20733. * [/en]
  20734. * [ja]
  20735. * ポップオーバーを表示する方向を空白区切りで複数指定できます。
  20736. * 指定できる方向は、"up", "down", "left", "right"の4つです。空白区切りで複数指定することもできます。
  20737. * 複数指定された場合、対象とする要素に合わせて指定した値から自動的に選択されます。
  20738. * [/ja]
  20739. */
  20740. /**
  20741. * @attribute cancelable
  20742. * @description
  20743. * [en]If this attribute is set the popover can be closed by tapping the background or by pressing the back button.[/en]
  20744. * [ja]この属性があると、ポップオーバーが表示された時に、背景やバックボタンをタップした時にをポップオーバー閉じます。[/ja]
  20745. */
  20746. /**
  20747. * @attribute cover-target
  20748. * @description
  20749. * [en]If set the popover will cover the target on the screen.[/en]
  20750. * [ja][/ja]
  20751. */
  20752. /**
  20753. * @attribute animation
  20754. * @type {String}
  20755. * @description
  20756. * [en]The animation used when showing an hiding the popover. Can be either `"none"`, `"default"`, `"fade-ios"` or `"fade-md"`.[/en]
  20757. * [ja]ポップオーバーを表示する際のアニメーション名を指定します。[/ja]
  20758. */
  20759. /**
  20760. * @attribute animation-options
  20761. * @type {Expression}
  20762. * @description
  20763. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  20764. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. {duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  20765. */
  20766. /**
  20767. * @attribute mask-color
  20768. * @type {Color}
  20769. * @description
  20770. * [en]Color of the background mask. Default is `"rgba(0, 0, 0, 0.2)"`.[/en]
  20771. * [ja]背景のマスクの色を指定します。デフォルトは"rgba(0, 0, 0, 0.2)"です。[/ja]
  20772. */
  20773. function PopoverElement() {
  20774. classCallCheck(this, PopoverElement);
  20775. var _this = possibleConstructorReturn(this, (PopoverElement.__proto__ || Object.getPrototypeOf(PopoverElement)).call(this));
  20776. _this._boundOnChange = _this._onChange.bind(_this);
  20777. contentReady(_this, function () {
  20778. _this._compile();
  20779. _this.style.display = 'none';
  20780. });
  20781. return _this;
  20782. }
  20783. createClass(PopoverElement, [{
  20784. key: '_updateAnimatorFactory',
  20785. value: function _updateAnimatorFactory() {
  20786. return new AnimatorFactory({
  20787. animators: _animatorDict$6,
  20788. baseClass: PopoverAnimator,
  20789. baseClassName: 'PopoverAnimator',
  20790. defaultAnimation: this.getAttribute('animation') || 'default'
  20791. });
  20792. }
  20793. }, {
  20794. key: '_toggleStyle',
  20795. value: function _toggleStyle(shouldShow) {
  20796. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20797. if (shouldShow) {
  20798. this.style.display = 'block';
  20799. this._currentTarget = options.target;
  20800. this._positionPopover(options.target);
  20801. } else {
  20802. this.style.display = 'none';
  20803. this._clearStyles();
  20804. }
  20805. }
  20806. }, {
  20807. key: '_positionPopover',
  20808. value: function _positionPopover(target) {
  20809. var radius = this._radius,
  20810. contentElement = this._content,
  20811. margin = this._margin;
  20812. var safeAreaLengths = iPhoneXPatch.getSafeAreaLengths();
  20813. var safeAreaRect = iPhoneXPatch.getSafeAreaDOMRect();
  20814. var targetRect = target.getBoundingClientRect();
  20815. var isMD = util$1.hasModifier(this, 'material');
  20816. var cover = isMD && this.hasAttribute('cover-target');
  20817. var parent = util$1.findParent(this, 'ons-page') || document.body;
  20818. var parentDimensions = parent.getBoundingClientRect();
  20819. var maxPositions = {
  20820. top: Math.max(parentDimensions.top, safeAreaRect.top),
  20821. left: Math.max(parentDimensions.left, safeAreaRect.left),
  20822. bottom: Math.min(parentDimensions.bottom, safeAreaRect.bottom),
  20823. right: Math.min(parentDimensions.right, safeAreaRect.right)
  20824. };
  20825. // Distance from each side of the safe area (with margin) to the target element
  20826. var targetDistance = {
  20827. top: targetRect.top - (maxPositions.top + margin),
  20828. left: targetRect.left - (maxPositions.left + margin),
  20829. bottom: maxPositions.bottom - margin - targetRect.bottom,
  20830. right: maxPositions.right - margin - targetRect.right
  20831. };
  20832. // Distance from each side of the safe area (with margin) to the geometric center of the target element
  20833. var targetCenterDistanceFrom = {
  20834. top: targetRect.top + Math.round(targetRect.height / 2) - (maxPositions.top + margin),
  20835. left: targetRect.left + Math.round(targetRect.width / 2) - (maxPositions.left + margin),
  20836. bottom: maxPositions.bottom - margin - targetRect.bottom + Math.round(targetRect.height / 2),
  20837. right: maxPositions.right - margin - targetRect.right + Math.round(targetRect.width / 2)
  20838. };
  20839. var _calculateDirections2 = this._calculateDirections(targetDistance),
  20840. vertical = _calculateDirections2.vertical,
  20841. primaryDirection = _calculateDirections2.primary,
  20842. secondaryDirection = _calculateDirections2.secondary;
  20843. this._currentDirection = primaryDirection;
  20844. util$1.addModifier(this, primaryDirection);
  20845. var sizeName = vertical ? 'width' : 'height';
  20846. // Get .popover__content size
  20847. var contentSize = function (style) {
  20848. return {
  20849. width: parseInt(style.getPropertyValue('width'), 10),
  20850. height: parseInt(style.getPropertyValue('height'), 10)
  20851. };
  20852. }(window.getComputedStyle(contentElement));
  20853. // Setting .popover position.
  20854. var targetAndArrowLength = cover ? 0 : (vertical ? targetRect.height : targetRect.width) + (isMD ? 0 : 14);
  20855. var primaryOffset = Math.max(safeAreaLengths[primaryDirection] + margin, safeAreaLengths[primaryDirection] + margin + targetDistance[primaryDirection] + targetAndArrowLength);
  20856. var secondaryOffset = Math.max(safeAreaLengths[secondaryDirection] + margin, safeAreaLengths[secondaryDirection] + margin + targetCenterDistanceFrom[secondaryDirection] - contentSize[sizeName] / 2);
  20857. this._popover.style[primaryDirection] = primaryOffset + 'px';
  20858. this._popover.style[secondaryDirection] = secondaryOffset + 'px';
  20859. // Setting .popover__arrow position.
  20860. this._arrow.style[secondaryDirection] = Math.max(radius, safeAreaLengths[secondaryDirection] + margin + targetCenterDistanceFrom[secondaryDirection] - secondaryOffset) + 'px';
  20861. }
  20862. }, {
  20863. key: '_calculateDirections',
  20864. value: function _calculateDirections(distance) {
  20865. var options = (this.getAttribute('direction') || 'up down left right').split(/\s+/).map(function (e) {
  20866. return positions[e];
  20867. });
  20868. var primary = options.sort(function (a, b) {
  20869. return distance[a] - distance[b];
  20870. })[0];
  20871. var vertical = 'top' == primary || 'bottom' == primary;
  20872. var secondary = void 0;
  20873. if (vertical) {
  20874. secondary = distance.left < distance.right ? 'left' : 'right';
  20875. } else {
  20876. secondary = distance.top < distance.bottom ? 'top' : 'bottom';
  20877. }
  20878. return { vertical: vertical, primary: primary, secondary: secondary };
  20879. }
  20880. }, {
  20881. key: '_clearStyles',
  20882. value: function _clearStyles() {
  20883. var _this2 = this;
  20884. this._currentDirection = null;
  20885. ['top', 'bottom', 'left', 'right'].forEach(function (e) {
  20886. _this2._arrow.style[e] = _this2._content.style[e] = _this2._popover.style[e] = '';
  20887. util$1.removeModifier(_this2, e);
  20888. });
  20889. }
  20890. }, {
  20891. key: '_onChange',
  20892. value: function _onChange() {
  20893. var _this3 = this;
  20894. setImmediate(function () {
  20895. if (_this3._currentTarget) {
  20896. _this3._positionPopover(_this3._currentTarget);
  20897. }
  20898. });
  20899. }
  20900. }, {
  20901. key: '_compile',
  20902. value: function _compile() {
  20903. autoStyle.prepare(this);
  20904. if (this._popover && this._mask) {
  20905. return;
  20906. }
  20907. var hasDefaultContainer = this._popover && this._content;
  20908. if (hasDefaultContainer) {
  20909. if (!this._mask) {
  20910. var mask = document.createElement('div');
  20911. mask.classList.add('popover-mask');
  20912. this.insertBefore(mask, this.firstChild);
  20913. }
  20914. if (!this._arrow) {
  20915. var arrow = document.createElement('div');
  20916. arrow.classList.add('popover__arrow');
  20917. this._popover.appendChild(arrow);
  20918. }
  20919. } else {
  20920. var template = util$1.createFragment('\n <div class="popover-mask"></div>\n <div class="popover">\n <div class="popover__content"></div>\n <div class="popover__arrow"></div>\n </div>\n ');
  20921. var content = template.querySelector('.popover__content');
  20922. while (this.childNodes[0]) {
  20923. content.appendChild(this.childNodes[0]);
  20924. }
  20925. this.appendChild(template);
  20926. }
  20927. // FIXME!
  20928. if (this.hasAttribute('style')) {
  20929. this._popover.setAttribute('style', this.getAttribute('style'));
  20930. this.removeAttribute('style');
  20931. }
  20932. ModifierUtil.initModifier(this, this._scheme);
  20933. }
  20934. /**
  20935. * @method show
  20936. * @signature show(target, [options])
  20937. * @param {String|Event|HTMLElement} target
  20938. * [en]Target element. Can be either a CSS selector, an event object or a DOM element. It can be also provided as 'options.target' instead. [/en]
  20939. * [ja]ポップオーバーのターゲットとなる要素を指定します。CSSセレクタかeventオブジェクトかDOM要素のいずれかを渡せます。[/ja]
  20940. * @param {Object} [options]
  20941. * [en]Parameter object.[/en]
  20942. * [ja]オプションを指定するオブジェクト。[/ja]
  20943. * @param {String} [options.animation]
  20944. * [en]Animation name. Use one of `"fade-ios"`, `"fade-md"`, `"none"` and `"default"`.[/en]
  20945. * [ja]アニメーション名を指定します。"fade-ios", "fade-md", "none", "default"のいずれかを指定できます。[/ja]
  20946. * @param {String} [options.animationOptions]
  20947. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  20948. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  20949. * @param {Function} [options.callback]
  20950. * [en]This function is called after the popover has been revealed.[/en]
  20951. * [ja]ポップオーバーが表示され終わった後に呼び出される関数オブジェクトを指定します。[/ja]
  20952. * @description
  20953. * [en]Open the popover and point it at a target. The target can be either an event, a CSS selector or a DOM element..[/en]
  20954. * [ja]対象とする要素にポップオーバーを表示します。target引数には、$eventオブジェクトやDOMエレメントやCSSセレクタを渡すことが出来ます。[/ja]
  20955. * @return {Promise}
  20956. * [en]Resolves to the displayed element[/en]
  20957. * [ja][/ja]
  20958. */
  20959. }, {
  20960. key: 'show',
  20961. value: function show(target) {
  20962. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20963. // Copy options and include options.target
  20964. if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && !(target instanceof Event) && !(target instanceof HTMLElement)) {
  20965. options = _extends({}, target);
  20966. } else {
  20967. options = _extends({}, options, { target: target });
  20968. }
  20969. if (typeof options.target === 'string') {
  20970. options.target = document.querySelector(options.target);
  20971. } else if (options.target instanceof Event) {
  20972. options.target = options.target.target;
  20973. }
  20974. if (!(options.target instanceof HTMLElement)) {
  20975. util$1.throw('Invalid target type or undefined');
  20976. }
  20977. return get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'show', this).call(this, options);
  20978. }
  20979. /**
  20980. * @method hide
  20981. * @signature hide([options])
  20982. * @param {Object} [options]
  20983. * [en]Parameter object.[/en]
  20984. * [ja]オプションを指定するオブジェクト。[/ja]
  20985. * @param {String} [options.animation]
  20986. * [en]Animation name. Use one of `"fade-ios"`, `"fade-md"`, `"none"` and `"default"`.[/en]
  20987. * [ja]アニメーション名を指定します。"fade-ios", "fade-md", "none", "default"のいずれかを指定できます。[/ja]
  20988. * @param {String} [options.animationOptions]
  20989. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  20990. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  20991. * @param {Function} [options.callback]
  20992. * [en]This functions is called after the popover has been hidden.[/en]
  20993. * [ja]ポップオーバーが隠れた後に呼び出される関数オブジェクトを指定します。[/ja]
  20994. * @description
  20995. * [en]Close the popover.[/en]
  20996. * [ja]ポップオーバーを閉じます。[/ja]
  20997. * @return {Promise}
  20998. * [en]Resolves to the hidden element[/en]
  20999. * [ja][/ja]
  21000. */
  21001. /**
  21002. * @property visible
  21003. * @readonly
  21004. * @type {Boolean}
  21005. * @description
  21006. * [en]Whether the element is visible or not.[/en]
  21007. * [ja]要素が見える場合に`true`。[/ja]
  21008. */
  21009. /**
  21010. * @property cancelable
  21011. * @type {Boolean}
  21012. * @description
  21013. * [en]
  21014. * A boolean value that specifies whether the popover is cancelable or not.
  21015. *
  21016. * When the popover is cancelable it can be closed by tapping the background or by pressing the back button on Android devices.
  21017. * [/en]
  21018. * [ja][/ja]
  21019. */
  21020. /**
  21021. * @property onDeviceBackButton
  21022. * @type {Object}
  21023. * @description
  21024. * [en]Back-button handler.[/en]
  21025. * [ja]バックボタンハンドラ。[/ja]
  21026. */
  21027. }, {
  21028. key: 'connectedCallback',
  21029. value: function connectedCallback() {
  21030. var _this4 = this;
  21031. get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'connectedCallback', this).call(this);
  21032. window.addEventListener('resize', this._boundOnChange, false);
  21033. this._margin = this._margin || parseInt(window.getComputedStyle(this).getPropertyValue('top'));
  21034. this._margin = this._margin || 6; // Fix for iframes
  21035. contentReady(this, function () {
  21036. _this4._radius = parseInt(window.getComputedStyle(_this4._content).getPropertyValue('border-top-left-radius'));
  21037. });
  21038. }
  21039. }, {
  21040. key: 'disconnectedCallback',
  21041. value: function disconnectedCallback() {
  21042. get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'disconnectedCallback', this).call(this);
  21043. window.removeEventListener('resize', this._boundOnChange, false);
  21044. }
  21045. }, {
  21046. key: 'attributeChangedCallback',
  21047. value: function attributeChangedCallback(name, last, current) {
  21048. if (name === 'direction') {
  21049. return this._boundOnChange();
  21050. } else if (name === 'modifier') {
  21051. this._currentDirection && util$1.addModifier(this, this._currentDirection);
  21052. }
  21053. get(PopoverElement.prototype.__proto__ || Object.getPrototypeOf(PopoverElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  21054. }
  21055. /**
  21056. * @param {String} name
  21057. * @param {PopoverAnimator} Animator
  21058. */
  21059. }, {
  21060. key: '_scheme',
  21061. get: function get$$1() {
  21062. return scheme$19;
  21063. }
  21064. }, {
  21065. key: '_mask',
  21066. get: function get$$1() {
  21067. return util$1.findChild(this, '.popover-mask');
  21068. }
  21069. }, {
  21070. key: '_popover',
  21071. get: function get$$1() {
  21072. return util$1.findChild(this, '.popover');
  21073. }
  21074. }, {
  21075. key: '_content',
  21076. get: function get$$1() {
  21077. return util$1.findChild(this._popover, '.popover__content');
  21078. }
  21079. }, {
  21080. key: '_arrow',
  21081. get: function get$$1() {
  21082. return util$1.findChild(this._popover, '.popover__arrow');
  21083. }
  21084. }], [{
  21085. key: 'registerAnimator',
  21086. value: function registerAnimator(name, Animator) {
  21087. if (!(Animator.prototype instanceof PopoverAnimator)) {
  21088. util$1.throwAnimator('Popover');
  21089. }
  21090. _animatorDict$6[name] = Animator;
  21091. }
  21092. }, {
  21093. key: 'observedAttributes',
  21094. get: function get$$1() {
  21095. return [].concat(toConsumableArray(get(PopoverElement.__proto__ || Object.getPrototypeOf(PopoverElement), 'observedAttributes', this)), ['direction']);
  21096. }
  21097. }, {
  21098. key: 'animators',
  21099. get: function get$$1() {
  21100. return _animatorDict$6;
  21101. }
  21102. }, {
  21103. key: 'PopoverAnimator',
  21104. get: function get$$1() {
  21105. return PopoverAnimator;
  21106. }
  21107. }]);
  21108. return PopoverElement;
  21109. }(BaseDialogElement);
  21110. onsElements.Popover = PopoverElement;
  21111. customElements.define('ons-popover', PopoverElement);
  21112. /*
  21113. Copyright 2013-2015 ASIAL CORPORATION
  21114. Licensed under the Apache License, Version 2.0 (the "License");
  21115. you may not use this file except in compliance with the License.
  21116. You may obtain a copy of the License at
  21117. http://www.apache.org/licenses/LICENSE-2.0
  21118. Unless required by applicable law or agreed to in writing, software
  21119. distributed under the License is distributed on an "AS IS" BASIS,
  21120. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21121. See the License for the specific language governing permissions and
  21122. limitations under the License.
  21123. */
  21124. var scheme$20 = {
  21125. '.progress-bar': 'progress-bar--*',
  21126. '.progress-bar__primary': 'progress-bar--*__primary',
  21127. '.progress-bar__secondary': 'progress-bar--*__secondary'
  21128. };
  21129. var template = util$1.createElement('\n <div class="progress-bar">\n <div class="progress-bar__secondary"></div>\n <div class="progress-bar__primary"></div>\n </div>\n');
  21130. var INDET = 'indeterminate';
  21131. /**
  21132. * @element ons-progress-bar
  21133. * @category visual
  21134. * @modifier material
  21135. * [en]Display a Material Design progress bar.[/en]
  21136. * [ja]マテリアルデザインのスタイルでプログレスバーを表示します。[/ja]
  21137. * @description
  21138. * [en]
  21139. * The component is used to display a linear progress bar. It can either display a progress bar that shows the user how much of a task has been completed. In the case where the percentage is not known it can be used to display an animated progress bar so the user can see that an operation is in progress.
  21140. * [/en]
  21141. * [ja][/ja]
  21142. * @codepen zvQbGj
  21143. * @tutorial vanilla/Reference/progress
  21144. * @seealso ons-progress-circular
  21145. * [en]The `<ons-progress-circular>` component displays a circular progress indicator.[/en]
  21146. * [ja][/ja]
  21147. * @example
  21148. * <ons-progress-bar
  21149. * value="55"
  21150. * secondary-value="87">
  21151. * </ons-progress-bar>
  21152. *
  21153. * <ons-progress-bar
  21154. * indeterminate>
  21155. * </ons-progress-bar>
  21156. */
  21157. var ProgressBarElement = function (_BaseElement) {
  21158. inherits(ProgressBarElement, _BaseElement);
  21159. /**
  21160. * @attribute modifier
  21161. * @type {String}
  21162. * @description
  21163. * [en]Change the appearance of the progress indicator.[/en]
  21164. * [ja]プログレスインジケータの見た目を変更します。[/ja]
  21165. */
  21166. /**
  21167. * @attribute value
  21168. * @type {Number}
  21169. * @description
  21170. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21171. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21172. */
  21173. /**
  21174. * @attribute secondary-value
  21175. * @type {Number}
  21176. * @description
  21177. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21178. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21179. */
  21180. /**
  21181. * @attribute indeterminate
  21182. * @description
  21183. * [en]If this attribute is set, an infinite looping animation will be shown.[/en]
  21184. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21185. */
  21186. function ProgressBarElement() {
  21187. classCallCheck(this, ProgressBarElement);
  21188. var _this = possibleConstructorReturn(this, (ProgressBarElement.__proto__ || Object.getPrototypeOf(ProgressBarElement)).call(this));
  21189. contentReady(_this, function () {
  21190. return _this._compile();
  21191. });
  21192. return _this;
  21193. }
  21194. createClass(ProgressBarElement, [{
  21195. key: '_compile',
  21196. value: function _compile() {
  21197. if (!this._isCompiled()) {
  21198. this._template = template.cloneNode(true);
  21199. } else {
  21200. this._template = util$1.findChild(this, '.progress-bar');
  21201. }
  21202. this._primary = util$1.findChild(this._template, '.progress-bar__primary');
  21203. this._secondary = util$1.findChild(this._template, '.progress-bar__secondary');
  21204. this._updateDeterminate();
  21205. this._updateValue();
  21206. this.appendChild(this._template);
  21207. autoStyle.prepare(this);
  21208. ModifierUtil.initModifier(this, scheme$20);
  21209. }
  21210. }, {
  21211. key: '_isCompiled',
  21212. value: function _isCompiled() {
  21213. if (!util$1.findChild(this, '.progress-bar')) {
  21214. return false;
  21215. }
  21216. var barElement = util$1.findChild(this, '.progress-bar');
  21217. if (!util$1.findChild(barElement, '.progress-bar__secondary')) {
  21218. return false;
  21219. }
  21220. if (!util$1.findChild(barElement, '.progress-bar__primary')) {
  21221. return false;
  21222. }
  21223. return true;
  21224. }
  21225. }, {
  21226. key: 'attributeChangedCallback',
  21227. value: function attributeChangedCallback(name, last, current) {
  21228. if (name === 'modifier') {
  21229. ModifierUtil.onModifierChanged(last, current, this, scheme$20);
  21230. this.hasAttribute(INDET) && this._updateDeterminate();
  21231. } else if (name === 'value' || name === 'secondary-value') {
  21232. this._updateValue();
  21233. } else if (name === INDET) {
  21234. this._updateDeterminate();
  21235. }
  21236. }
  21237. }, {
  21238. key: '_updateDeterminate',
  21239. value: function _updateDeterminate() {
  21240. var _this2 = this;
  21241. contentReady(this, function () {
  21242. return util$1.toggleModifier(_this2, INDET, { force: _this2.hasAttribute(INDET) });
  21243. });
  21244. }
  21245. }, {
  21246. key: '_updateValue',
  21247. value: function _updateValue() {
  21248. var _this3 = this;
  21249. contentReady(this, function () {
  21250. _this3._primary.style.width = _this3.hasAttribute('value') ? _this3.getAttribute('value') + '%' : '0%';
  21251. _this3._secondary.style.width = _this3.hasAttribute('secondary-value') ? _this3.getAttribute('secondary-value') + '%' : '0%';
  21252. });
  21253. }
  21254. /**
  21255. * @property value
  21256. * @type {Number}
  21257. * @description
  21258. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21259. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21260. */
  21261. }, {
  21262. key: 'value',
  21263. set: function set$$1(value) {
  21264. if (typeof value !== 'number' || value < 0 || value > 100) {
  21265. util$1.throw('Invalid value');
  21266. }
  21267. this.setAttribute('value', Math.floor(value));
  21268. },
  21269. get: function get$$1() {
  21270. return parseInt(this.getAttribute('value') || '0');
  21271. }
  21272. /**
  21273. * @property secondaryValue
  21274. * @type {Number}
  21275. * @description
  21276. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21277. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21278. */
  21279. }, {
  21280. key: 'secondaryValue',
  21281. set: function set$$1(value) {
  21282. if (typeof value !== 'number' || value < 0 || value > 100) {
  21283. util$1.throw('Invalid value');
  21284. }
  21285. this.setAttribute('secondary-value', Math.floor(value));
  21286. },
  21287. get: function get$$1() {
  21288. return parseInt(this.getAttribute('secondary-value') || '0');
  21289. }
  21290. /**
  21291. * @property indeterminate
  21292. * @type {Boolean}
  21293. * @description
  21294. * [en]If this property is `true`, an infinite looping animation will be shown.[/en]
  21295. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21296. */
  21297. }, {
  21298. key: 'indeterminate',
  21299. set: function set$$1(value) {
  21300. if (value) {
  21301. this.setAttribute(INDET, '');
  21302. } else {
  21303. this.removeAttribute(INDET);
  21304. }
  21305. },
  21306. get: function get$$1() {
  21307. return this.hasAttribute(INDET);
  21308. }
  21309. }], [{
  21310. key: 'observedAttributes',
  21311. get: function get$$1() {
  21312. return ['modifier', 'value', 'secondary-value', INDET];
  21313. }
  21314. }]);
  21315. return ProgressBarElement;
  21316. }(BaseElement);
  21317. onsElements.ProgressBar = ProgressBarElement;
  21318. customElements.define('ons-progress-bar', ProgressBarElement);
  21319. /*
  21320. Copyright 2013-2015 ASIAL CORPORATION
  21321. Licensed under the Apache License, Version 2.0 (the "License");
  21322. you may not use this file except in compliance with the License.
  21323. You may obtain a copy of the License at
  21324. http://www.apache.org/licenses/LICENSE-2.0
  21325. Unless required by applicable law or agreed to in writing, software
  21326. distributed under the License is distributed on an "AS IS" BASIS,
  21327. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21328. See the License for the specific language governing permissions and
  21329. limitations under the License.
  21330. */
  21331. var scheme$21 = {
  21332. '.progress-circular': 'progress-circular--*',
  21333. '.progress-circular__background': 'progress-circular--*__background',
  21334. '.progress-circular__primary': 'progress-circular--*__primary',
  21335. '.progress-circular__secondary': 'progress-circular--*__secondary'
  21336. };
  21337. var template$1 = util$1.createElement('\n <svg class="progress-circular">\n <circle class="progress-circular__background" />\n <circle class="progress-circular__secondary" cx="50%" cy="50%" r="40%" />\n <circle class="progress-circular__primary" cx="50%" cy="50%" r="40%" />\n </svg>\n');
  21338. var INDET$1 = 'indeterminate';
  21339. /**
  21340. * @element ons-progress-circular
  21341. * @category visual
  21342. * @description
  21343. * [en]
  21344. * This component displays a circular progress indicator. It can either be used to show how much of a task has been completed or to show a looping animation to indicate that an operation is currently running.
  21345. * [/en]
  21346. * [ja][/ja]
  21347. * @codepen EVzMjR
  21348. * @tutorial vanilla/Reference/progress-circular
  21349. * @seealso ons-progress-bar
  21350. * [en]The `<ons-progress-bar>` component displays a bar progress indicator.[/en]
  21351. * [ja][/ja]
  21352. * @example
  21353. * <ons-progress-circular
  21354. * value="55"
  21355. * secondary-value="87">
  21356. * </ons-progress-circular>
  21357. *
  21358. * <ons-progress-circular
  21359. * indeterminate>
  21360. * </ons-progress-circular>
  21361. */
  21362. var ProgressCircularElement = function (_BaseElement) {
  21363. inherits(ProgressCircularElement, _BaseElement);
  21364. /**
  21365. * @attribute modifier
  21366. * @type {String}
  21367. * @description
  21368. * [en]Change the appearance of the progress indicator.[/en]
  21369. * [ja]プログレスインジケータの見た目を変更します。[/ja]
  21370. */
  21371. /**
  21372. * @attribute value
  21373. * @type {Number}
  21374. * @description
  21375. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21376. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21377. */
  21378. /**
  21379. * @attribute secondary-value
  21380. * @type {Number}
  21381. * @description
  21382. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21383. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21384. */
  21385. /**
  21386. * @attribute indeterminate
  21387. * @description
  21388. * [en]If this attribute is set, an infinite looping animation will be shown.[/en]
  21389. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21390. */
  21391. function ProgressCircularElement() {
  21392. classCallCheck(this, ProgressCircularElement);
  21393. var _this = possibleConstructorReturn(this, (ProgressCircularElement.__proto__ || Object.getPrototypeOf(ProgressCircularElement)).call(this));
  21394. contentReady(_this, function () {
  21395. return _this._compile();
  21396. });
  21397. return _this;
  21398. }
  21399. createClass(ProgressCircularElement, [{
  21400. key: 'attributeChangedCallback',
  21401. value: function attributeChangedCallback(name, last, current) {
  21402. if (name === 'modifier') {
  21403. ModifierUtil.onModifierChanged(last, current, this, scheme$21);
  21404. this.hasAttribute(INDET$1) && this._updateDeterminate();
  21405. } else if (name === 'value' || name === 'secondary-value') {
  21406. this._updateValue();
  21407. } else if (name === INDET$1) {
  21408. this._updateDeterminate();
  21409. }
  21410. }
  21411. }, {
  21412. key: '_updateDeterminate',
  21413. value: function _updateDeterminate() {
  21414. var _this2 = this;
  21415. contentReady(this, function () {
  21416. return util$1.toggleModifier(_this2, INDET$1, { force: _this2.hasAttribute(INDET$1) });
  21417. });
  21418. }
  21419. }, {
  21420. key: '_updateValue',
  21421. value: function _updateValue() {
  21422. var _this3 = this;
  21423. if (this.hasAttribute('value')) {
  21424. contentReady(this, function () {
  21425. var per = Math.ceil(_this3.getAttribute('value') * 251.32 * 0.01);
  21426. _this3._primary.style['stroke-dasharray'] = per + '%, 251.32%';
  21427. });
  21428. }
  21429. if (this.hasAttribute('secondary-value')) {
  21430. contentReady(this, function () {
  21431. var per = Math.ceil(_this3.getAttribute('secondary-value') * 251.32 * 0.01);
  21432. _this3._secondary.style.display = null;
  21433. _this3._secondary.style['stroke-dasharray'] = per + '%, 251.32%';
  21434. });
  21435. } else {
  21436. contentReady(this, function () {
  21437. _this3._secondary.style.display = 'none';
  21438. });
  21439. }
  21440. }
  21441. /**
  21442. * @property value
  21443. * @type {Number}
  21444. * @description
  21445. * [en]Current progress. Should be a value between 0 and 100.[/en]
  21446. * [ja]現在の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21447. */
  21448. }, {
  21449. key: '_compile',
  21450. value: function _compile() {
  21451. if (this._isCompiled()) {
  21452. this._template = util$1.findChild(this, '.progress-circular');
  21453. } else {
  21454. this._template = template$1.cloneNode(true);
  21455. }
  21456. this._primary = util$1.findChild(this._template, '.progress-circular__primary');
  21457. this._secondary = util$1.findChild(this._template, '.progress-circular__secondary');
  21458. this._updateDeterminate();
  21459. this._updateValue();
  21460. this.appendChild(this._template);
  21461. autoStyle.prepare(this);
  21462. ModifierUtil.initModifier(this, scheme$21);
  21463. }
  21464. }, {
  21465. key: '_isCompiled',
  21466. value: function _isCompiled() {
  21467. if (!util$1.findChild(this, '.progress-circular')) {
  21468. return false;
  21469. }
  21470. var svg = util$1.findChild(this, '.progress-circular');
  21471. if (!util$1.findChild(svg, '.progress-circular__secondary')) {
  21472. return false;
  21473. }
  21474. if (!util$1.findChild(svg, '.progress-circular__primary')) {
  21475. return false;
  21476. }
  21477. return true;
  21478. }
  21479. }, {
  21480. key: 'value',
  21481. set: function set$$1(value) {
  21482. if (typeof value !== 'number' || value < 0 || value > 100) {
  21483. util$1.throw('Invalid value');
  21484. }
  21485. this.setAttribute('value', Math.floor(value));
  21486. },
  21487. get: function get$$1() {
  21488. return parseInt(this.getAttribute('value') || '0');
  21489. }
  21490. /**
  21491. * @property secondaryValue
  21492. * @type {Number}
  21493. * @description
  21494. * [en]Current secondary progress. Should be a value between 0 and 100.[/en]
  21495. * [ja]現在の2番目の進行状況の値を指定します。0から100の間の値を指定して下さい。[/ja]
  21496. */
  21497. }, {
  21498. key: 'secondaryValue',
  21499. set: function set$$1(value) {
  21500. if (typeof value !== 'number' || value < 0 || value > 100) {
  21501. util$1.throw('Invalid value');
  21502. }
  21503. this.setAttribute('secondary-value', Math.floor(value));
  21504. },
  21505. get: function get$$1() {
  21506. return parseInt(this.getAttribute('secondary-value') || '0');
  21507. }
  21508. /**
  21509. * @property indeterminate
  21510. * @type {Boolean}
  21511. * @description
  21512. * [en]If this property is `true`, an infinite looping animation will be shown.[/en]
  21513. * [ja]この属性が設定された場合、ループするアニメーションが表示されます。[/ja]
  21514. */
  21515. }, {
  21516. key: 'indeterminate',
  21517. set: function set$$1(value) {
  21518. if (value) {
  21519. this.setAttribute(INDET$1, '');
  21520. } else {
  21521. this.removeAttribute(INDET$1);
  21522. }
  21523. },
  21524. get: function get$$1() {
  21525. return this.hasAttribute(INDET$1);
  21526. }
  21527. }], [{
  21528. key: 'observedAttributes',
  21529. get: function get$$1() {
  21530. return ['modifier', 'value', 'secondary-value', INDET$1];
  21531. }
  21532. }]);
  21533. return ProgressCircularElement;
  21534. }(BaseElement);
  21535. onsElements.ProgressCircular = ProgressCircularElement;
  21536. customElements.define('ons-progress-circular', ProgressCircularElement);
  21537. /*
  21538. Copyright 2013-2015 ASIAL CORPORATION
  21539. Licensed under the Apache License, Version 2.0 (the "License");
  21540. you may not use this file except in compliance with the License.
  21541. You may obtain a copy of the License at
  21542. http://www.apache.org/licenses/LICENSE-2.0
  21543. Unless required by applicable law or agreed to in writing, software
  21544. distributed under the License is distributed on an "AS IS" BASIS,
  21545. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21546. See the License for the specific language governing permissions and
  21547. limitations under the License.
  21548. */
  21549. var STATE_INITIAL = 'initial';
  21550. var STATE_PREACTION = 'preaction';
  21551. var STATE_ACTION = 'action';
  21552. var throwType = function throwType(el, type) {
  21553. return util$1.throw('"' + el + '" must be ' + type);
  21554. };
  21555. /**
  21556. * @element ons-pull-hook
  21557. * @category control
  21558. * @description
  21559. * [en]
  21560. * Component that adds **Pull to refresh** functionality to an `<ons-page>` element.
  21561. *
  21562. * It can be used to perform a task when the user pulls down at the top of the page. A common usage is to refresh the data displayed in a page.
  21563. * [/en]
  21564. * [ja][/ja]
  21565. * @codepen WbJogM
  21566. * @tutorial vanilla/Reference/pull-hook
  21567. * @example
  21568. * <ons-page>
  21569. * <ons-pull-hook>
  21570. * Release to refresh
  21571. * </ons-pull-hook>
  21572. * </ons-page>
  21573. *
  21574. * <script>
  21575. * document.querySelector('ons-pull-hook').onAction = function(done) {
  21576. * setTimeout(done, 1000);
  21577. * };
  21578. * </script>
  21579. */
  21580. var PullHookElement = function (_BaseElement) {
  21581. inherits(PullHookElement, _BaseElement);
  21582. /**
  21583. * @event changestate
  21584. * @description
  21585. * [en]Fired when the state is changed. The state can be either "initial", "preaction" or "action".[/en]
  21586. * [ja]コンポーネントの状態が変わった場合に発火します。状態は、"initial", "preaction", "action"のいずれかです。[/ja]
  21587. * @param {Object} event
  21588. * [en]Event object.[/en]
  21589. * [ja]イベントオブジェクト。[/ja]
  21590. * @param {Object} event.pullHook
  21591. * [en]Component object.[/en]
  21592. * [ja]コンポーネントのオブジェクト。[/ja]
  21593. * @param {String} event.state
  21594. * [en]Current state.[/en]
  21595. * [ja]現在の状態名を参照できます。[/ja]
  21596. */
  21597. /**
  21598. * @attribute disabled
  21599. * @description
  21600. * [en]If this attribute is set the "pull-to-refresh" functionality is disabled.[/en]
  21601. * [ja]この属性がある時、disabled状態になりアクションが実行されなくなります[/ja]
  21602. */
  21603. /**
  21604. * @attribute height
  21605. * @type {String}
  21606. * @description
  21607. * [en]Specify the height of the component. When pulled down further than this value it will switch to the "preaction" state. The default value is "64px".[/en]
  21608. * [ja]コンポーネントの高さを指定します。この高さ以上にpull downすると"preaction"状態に移行します。デフォルトの値は"64px"です。[/ja]
  21609. */
  21610. /**
  21611. * @attribute threshold-height
  21612. * @type {String}
  21613. * @description
  21614. * [en]Specify the threshold height. The component automatically switches to the "action" state when pulled further than this value. The default value is "96px". A negative value will disable this property. If this value is lower than the height, it will skip "preaction" state.[/en]
  21615. * [ja]閾値となる高さを指定します。この値で指定した高さよりもpull downすると、このコンポーネントは自動的に"action"状態に移行します。[/ja]
  21616. */
  21617. /**
  21618. * @attribute fixed-content
  21619. * @description
  21620. * [en]If this attribute is set the content of the page will not move when pulling.[/en]
  21621. * [ja]この属性がある時、プルフックが引き出されている時にもコンテンツは動きません。[/ja]
  21622. */
  21623. function PullHookElement() {
  21624. classCallCheck(this, PullHookElement);
  21625. var _this = possibleConstructorReturn(this, (PullHookElement.__proto__ || Object.getPrototypeOf(PullHookElement)).call(this));
  21626. _this._shouldFixScroll = util$1.globals.isUIWebView;
  21627. _this._onDrag = _this._onDrag.bind(_this);
  21628. _this._onDragStart = _this._onDragStart.bind(_this);
  21629. _this._onDragEnd = _this._onDragEnd.bind(_this);
  21630. _this._onScroll = _this._onScroll.bind(_this);
  21631. _this._setState(STATE_INITIAL, true);
  21632. _this._hide(); // Fix for transparent toolbar transitions
  21633. return _this;
  21634. }
  21635. createClass(PullHookElement, [{
  21636. key: '_setStyle',
  21637. value: function _setStyle() {
  21638. var height = this.height + 'px';
  21639. styler(this, { height: height, lineHeight: height });
  21640. this.style.display === '' && this._show();
  21641. }
  21642. }, {
  21643. key: '_onScroll',
  21644. value: function _onScroll(event) {
  21645. var element = this._pageElement;
  21646. if (element.scrollTop < 0) {
  21647. element.scrollTop = 0;
  21648. }
  21649. }
  21650. }, {
  21651. key: '_canConsumeGesture',
  21652. value: function _canConsumeGesture(gesture) {
  21653. return gesture.direction === 'up' || gesture.direction === 'down';
  21654. }
  21655. }, {
  21656. key: '_onDragStart',
  21657. value: function _onDragStart(event) {
  21658. var _this2 = this;
  21659. if (!event.gesture || this.disabled) {
  21660. return;
  21661. }
  21662. var tapY = event.gesture.center.clientY + this._pageElement.scrollTop;
  21663. var maxY = window.innerHeight;
  21664. // Only use drags that start near the pullHook to reduce flickerings
  21665. var draggableAreaRatio = this._shouldFixScroll ? .8 : 1;
  21666. this._ignoreDrag = event.consumed || tapY > maxY * draggableAreaRatio;
  21667. if (!this._ignoreDrag) {
  21668. var consume = event.consume;
  21669. event.consume = function () {
  21670. consume && consume();
  21671. _this2._ignoreDrag = true;
  21672. // This elements resizes .page__content so it is safer
  21673. // to hide it when other components are dragged.
  21674. _this2._hide();
  21675. };
  21676. if (this._canConsumeGesture(event.gesture)) {
  21677. consume && consume();
  21678. event.consumed = true;
  21679. this._show(); // Not enough due to 'dragLockAxis'
  21680. }
  21681. }
  21682. this._startScroll = this._pageElement.scrollTop;
  21683. }
  21684. }, {
  21685. key: '_onDrag',
  21686. value: function _onDrag(event) {
  21687. var _this3 = this;
  21688. if (!event.gesture || this.disabled || this._ignoreDrag || !this._canConsumeGesture(event.gesture)) {
  21689. return;
  21690. }
  21691. // Necessary due to 'dragLockAxis' (25px)
  21692. if (this.style.display === 'none') {
  21693. this._show();
  21694. }
  21695. event.stopPropagation();
  21696. var tapY = event.gesture.center.clientY + this._pageElement.scrollTop;
  21697. var maxY = window.innerHeight;
  21698. // Hack to make it work on Android 4.4 WebView and iOS UIWebView. Scrolls manually
  21699. // near the top of the page so there will be no inertial scroll when scrolling down.
  21700. // Allowing default scrolling will kill all 'touchmove' events.
  21701. if (this._shouldFixScroll) {
  21702. this._pageElement.scrollTop = this._startScroll - event.gesture.deltaY;
  21703. // Allow inertia when scrolling down below 50% of the view to reduce flickerings
  21704. if (event.gesture.interimDirection !== 'up' || tapY <= maxY * .5) {
  21705. event.gesture.preventDefault();
  21706. }
  21707. }
  21708. var scroll = Math.max(event.gesture.deltaY - this._startScroll, 0);
  21709. if (scroll !== this._currentTranslation) {
  21710. var th = this.thresholdHeight;
  21711. if (th > 0 && scroll >= th) {
  21712. event.gesture.stopDetect();
  21713. setImmediate(function () {
  21714. return _this3._finish();
  21715. });
  21716. } else if (scroll >= this.height) {
  21717. this._setState(STATE_PREACTION);
  21718. } else {
  21719. this._setState(STATE_INITIAL);
  21720. }
  21721. this._translateTo(scroll);
  21722. }
  21723. }
  21724. }, {
  21725. key: '_onDragEnd',
  21726. value: function _onDragEnd(event) {
  21727. if (!event.gesture || this.disabled || this._ignoreDrag) {
  21728. return;
  21729. }
  21730. event.stopPropagation();
  21731. if (this._currentTranslation > 0) {
  21732. var scroll = this._currentTranslation;
  21733. if (scroll > this.height) {
  21734. this._finish();
  21735. } else {
  21736. this._translateTo(0, { animate: true });
  21737. }
  21738. }
  21739. }
  21740. /**
  21741. * @property onAction
  21742. * @type {Function}
  21743. * @description
  21744. * [en]This will be called in the `action` state if it exists. The function will be given a `done` callback as it's first argument.[/en]
  21745. * [ja][/ja]
  21746. */
  21747. }, {
  21748. key: '_finish',
  21749. value: function _finish() {
  21750. var _this4 = this;
  21751. this._setState(STATE_ACTION);
  21752. this._translateTo(this.height, { animate: true });
  21753. var action = this.onAction || function (done) {
  21754. return done();
  21755. };
  21756. action(function () {
  21757. _this4._translateTo(0, { animate: true });
  21758. _this4._setState(STATE_INITIAL);
  21759. });
  21760. }
  21761. /**
  21762. * @property height
  21763. * @type {Number}
  21764. * @description
  21765. * [en]The height of the pull hook in pixels. The default value is `64px`.[/en]
  21766. * [ja][/ja]
  21767. */
  21768. }, {
  21769. key: '_setState',
  21770. value: function _setState(state, noEvent) {
  21771. var lastState = this.state;
  21772. this.setAttribute('state', state);
  21773. if (!noEvent && lastState !== this.state) {
  21774. util$1.triggerElementEvent(this, 'changestate', {
  21775. pullHook: this,
  21776. state: state,
  21777. lastState: lastState
  21778. });
  21779. }
  21780. }
  21781. /**
  21782. * @property state
  21783. * @readonly
  21784. * @type {String}
  21785. * @description
  21786. * [en]Current state of the element.[/en]
  21787. * [ja][/ja]
  21788. */
  21789. }, {
  21790. key: '_show',
  21791. value: function _show() {
  21792. var _this5 = this;
  21793. // Run asyncrhonously to avoid conflicts with Animit's style clean
  21794. setImmediate(function () {
  21795. _this5.style.display = '';
  21796. if (_this5._pageElement) {
  21797. _this5._pageElement.style.marginTop = '-' + _this5.height + 'px';
  21798. }
  21799. });
  21800. }
  21801. }, {
  21802. key: '_hide',
  21803. value: function _hide() {
  21804. this.style.display = 'none';
  21805. if (this._pageElement) {
  21806. this._pageElement.style.marginTop = '';
  21807. }
  21808. }
  21809. /**
  21810. * @param {Number} scroll
  21811. * @param {Object} options
  21812. * @param {Function} [options.callback]
  21813. */
  21814. }, {
  21815. key: '_translateTo',
  21816. value: function _translateTo(scroll) {
  21817. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21818. if (this._currentTranslation == 0 && scroll == 0) {
  21819. return;
  21820. }
  21821. this._currentTranslation = scroll;
  21822. var opt = options.animate ? { duration: .3, timing: 'cubic-bezier(.1, .7, .1, 1)' } : {};
  21823. this._onPull && this._onPull((scroll / this.height).toFixed(2), opt);
  21824. var scrollElement = this.hasAttribute('fixed-content') ? this : this._pageElement;
  21825. Animit(scrollElement).queue({ transform: 'translate3d(0px, ' + scroll + 'px, 0px)' }, opt).play(function () {
  21826. scroll === 0 && styler.clear(scrollElement, 'transition transform');
  21827. options.callback instanceof Function && options.callback();
  21828. });
  21829. }
  21830. }, {
  21831. key: '_disableDragLock',
  21832. value: function _disableDragLock() {
  21833. // e2e tests need it
  21834. this._dragLockDisabled = true;
  21835. this._setupListeners(true);
  21836. }
  21837. }, {
  21838. key: '_setupListeners',
  21839. value: function _setupListeners(add) {
  21840. var _this6 = this;
  21841. var scrollToggle = function scrollToggle(action) {
  21842. return _this6._pageElement[action + 'EventListener']('scroll', _this6._onScroll, false);
  21843. };
  21844. var gdToggle = function gdToggle(action) {
  21845. var passive = { passive: true };
  21846. _this6._gestureDetector[action]('drag', _this6._onDrag, passive);
  21847. _this6._gestureDetector[action]('dragstart', _this6._onDragStart, passive);
  21848. _this6._gestureDetector[action]('dragend', _this6._onDragEnd, passive);
  21849. };
  21850. if (this._gestureDetector) {
  21851. gdToggle('off');
  21852. this._gestureDetector.dispose();
  21853. this._gestureDetector = null;
  21854. }
  21855. scrollToggle('remove');
  21856. if (add) {
  21857. this._gestureDetector = new GestureDetector(this._pageElement, {
  21858. dragMinDistance: 1,
  21859. dragDistanceCorrection: false,
  21860. dragLockToAxis: !this._dragLockDisabled,
  21861. passive: !this._shouldFixScroll
  21862. });
  21863. gdToggle('on');
  21864. scrollToggle('add');
  21865. }
  21866. }
  21867. }, {
  21868. key: 'connectedCallback',
  21869. value: function connectedCallback() {
  21870. this._currentTranslation = 0;
  21871. this._pageElement = this.parentNode;
  21872. this._setupListeners(true);
  21873. this._setStyle();
  21874. }
  21875. }, {
  21876. key: 'disconnectedCallback',
  21877. value: function disconnectedCallback() {
  21878. this._hide();
  21879. this._setupListeners(false);
  21880. }
  21881. }, {
  21882. key: 'attributeChangedCallback',
  21883. value: function attributeChangedCallback(name, last, current) {
  21884. if (name === 'height' && this._pageElement) {
  21885. this._setStyle();
  21886. }
  21887. }
  21888. }, {
  21889. key: 'onAction',
  21890. get: function get$$1() {
  21891. return this._onAction;
  21892. },
  21893. set: function set$$1(value) {
  21894. if (value && !(value instanceof Function)) {
  21895. throwType('onAction', 'function or null');
  21896. }
  21897. this._onAction = value;
  21898. }
  21899. /**
  21900. * @property onPull
  21901. * @type {Function}
  21902. * @description
  21903. * [en]Hook called whenever the user pulls the element. It gets the pulled distance ratio (scroll / height) and an animationOptions object as arguments.[/en]
  21904. * [ja][/ja]
  21905. */
  21906. }, {
  21907. key: 'onPull',
  21908. get: function get$$1() {
  21909. return this._onPull;
  21910. },
  21911. set: function set$$1(value) {
  21912. if (value && !(value instanceof Function)) {
  21913. throwType('onPull', 'function or null');
  21914. }
  21915. this._onPull = value;
  21916. }
  21917. }, {
  21918. key: 'height',
  21919. set: function set$$1(value) {
  21920. if (!util$1.isInteger(value)) {
  21921. throwType('height', 'integer');
  21922. }
  21923. this.setAttribute('height', value + 'px');
  21924. },
  21925. get: function get$$1() {
  21926. return parseInt(this.getAttribute('height') || '64', 10);
  21927. }
  21928. /**
  21929. * @property thresholdHeight
  21930. * @type {Number}
  21931. * @description
  21932. * [en]The thresholdHeight of the pull hook in pixels. The default value is `96px`.[/en]
  21933. * [ja][/ja]
  21934. */
  21935. }, {
  21936. key: 'thresholdHeight',
  21937. set: function set$$1(value) {
  21938. if (!util$1.isInteger(value)) {
  21939. throwType('thresholdHeight', 'integer');
  21940. }
  21941. this.setAttribute('threshold-height', value + 'px');
  21942. },
  21943. get: function get$$1() {
  21944. return parseInt(this.getAttribute('threshold-height') || '96', 10);
  21945. }
  21946. }, {
  21947. key: 'state',
  21948. get: function get$$1() {
  21949. return this.getAttribute('state');
  21950. }
  21951. /**
  21952. * @property pullDistance
  21953. * @readonly
  21954. * @type {Number}
  21955. * @description
  21956. * [en]The current number of pixels the pull hook has moved.[/en]
  21957. * [ja]現在のプルフックが引き出された距離をピクセル数。[/ja]
  21958. */
  21959. }, {
  21960. key: 'pullDistance',
  21961. get: function get$$1() {
  21962. return this._currentTranslation;
  21963. }
  21964. /**
  21965. * @property disabled
  21966. * @type {Boolean}
  21967. * @description
  21968. * [en]Whether the element is disabled or not.[/en]
  21969. * [ja]無効化されている場合に`true`。[/ja]
  21970. */
  21971. }, {
  21972. key: 'disabled',
  21973. set: function set$$1(value) {
  21974. return util$1.toggleAttribute(this, 'disabled', value);
  21975. },
  21976. get: function get$$1() {
  21977. return this.hasAttribute('disabled');
  21978. }
  21979. }], [{
  21980. key: 'observedAttributes',
  21981. get: function get$$1() {
  21982. return ['height'];
  21983. }
  21984. }, {
  21985. key: 'events',
  21986. get: function get$$1() {
  21987. return ['changestate'];
  21988. }
  21989. }]);
  21990. return PullHookElement;
  21991. }(BaseElement);
  21992. onsElements.PullHook = PullHookElement;
  21993. customElements.define('ons-pull-hook', PullHookElement);
  21994. /*
  21995. Copyright 2013-2015 ASIAL CORPORATION
  21996. Licensed under the Apache License, Version 2.0 (the "License");
  21997. you may not use this file except in compliance with the License.
  21998. You may obtain a copy of the License at
  21999. http://www.apache.org/licenses/LICENSE-2.0
  22000. Unless required by applicable law or agreed to in writing, software
  22001. distributed under the License is distributed on an "AS IS" BASIS,
  22002. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22003. See the License for the specific language governing permissions and
  22004. limitations under the License.
  22005. */
  22006. var scheme$22 = {
  22007. '': 'range--*',
  22008. '.range__input': 'range--*__input',
  22009. '.range__focus-ring': 'range--*__focus-ring'
  22010. };
  22011. var activeClassToken = 'range__input--active';
  22012. /**
  22013. * @element ons-range
  22014. * @category form
  22015. * @modifier material
  22016. * [en]Material Design slider[/en]
  22017. * [ja][/ja]
  22018. * @description
  22019. * [en]
  22020. * Range input component. Used to display a draggable slider.
  22021. *
  22022. * Works very similar to the `<input type="range">` element.
  22023. * [/en]
  22024. * [ja][/ja]
  22025. * @codepen xZQomM
  22026. * @tutorial vanilla/Reference/range
  22027. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  22028. * @seealso ons-input
  22029. * [en]The `<ons-input>` component is used to display text inputs, radio buttons and checkboxes.[/en]
  22030. * [ja][/ja]
  22031. * @example
  22032. * <ons-range value="20"></ons-range>
  22033. * <ons-range modifier="material" value="10"></range>
  22034. */
  22035. var RangeElement = function (_BaseInputElement) {
  22036. inherits(RangeElement, _BaseInputElement);
  22037. function RangeElement() {
  22038. classCallCheck(this, RangeElement);
  22039. var _this = possibleConstructorReturn(this, (RangeElement.__proto__ || Object.getPrototypeOf(RangeElement)).call(this));
  22040. _this._onMouseDown = _this._onMouseDown.bind(_this);
  22041. _this._onMouseUp = _this._onMouseUp.bind(_this);
  22042. _this._onTouchStart = _this._onTouchStart.bind(_this);
  22043. _this._onTouchEnd = _this._onTouchEnd.bind(_this);
  22044. _this._onInput = _this._update.bind(_this);
  22045. _this._onDragstart = _this._onDragstart.bind(_this);
  22046. _this._onDragend = _this._onDragend.bind(_this);
  22047. return _this;
  22048. }
  22049. createClass(RangeElement, [{
  22050. key: '_compile',
  22051. value: function _compile() {
  22052. get(RangeElement.prototype.__proto__ || Object.getPrototypeOf(RangeElement.prototype), '_compile', this).call(this);
  22053. this._updateDisabled(this.hasAttribute('disabled'));
  22054. }
  22055. /* Inherited props */
  22056. }, {
  22057. key: '_update',
  22058. value: function _update() {
  22059. var input = this._input;
  22060. var focusRing = this._focusRing;
  22061. input.style.backgroundSize = 100 * this._ratio + '% 2px';
  22062. focusRing.value = this.value;
  22063. // NOTE: "_zero" attribute is used for CSS styling.
  22064. if (input.min === '' && input.value === '0' || input.min === input.value) {
  22065. input.setAttribute('_zero', '');
  22066. } else {
  22067. input.removeAttribute('_zero');
  22068. }
  22069. ['min', 'max'].forEach(function (attr) {
  22070. return focusRing[attr] = input[attr];
  22071. });
  22072. }
  22073. }, {
  22074. key: '_onMouseDown',
  22075. /* Own props */
  22076. value: function _onMouseDown(e) {
  22077. var _this2 = this;
  22078. this._input.classList.add(activeClassToken);
  22079. setImmediate(function () {
  22080. return _this2._input.focus();
  22081. });
  22082. }
  22083. }, {
  22084. key: '_onTouchStart',
  22085. value: function _onTouchStart(e) {
  22086. this._onMouseDown();
  22087. }
  22088. }, {
  22089. key: '_onMouseUp',
  22090. value: function _onMouseUp(e) {
  22091. this._input.classList.remove(activeClassToken);
  22092. }
  22093. }, {
  22094. key: '_onTouchEnd',
  22095. value: function _onTouchEnd(e) {
  22096. this._onMouseUp(e);
  22097. }
  22098. }, {
  22099. key: '_onDragstart',
  22100. value: function _onDragstart(e) {
  22101. e.consumed = true;
  22102. e.gesture.stopPropagation();
  22103. this._input.classList.add(activeClassToken);
  22104. this.addEventListener('drag', this._onDrag);
  22105. }
  22106. }, {
  22107. key: '_onDrag',
  22108. value: function _onDrag(e) {
  22109. e.stopPropagation();
  22110. }
  22111. }, {
  22112. key: '_onDragend',
  22113. value: function _onDragend(e) {
  22114. this._input.classList.remove(activeClassToken);
  22115. this.removeEventListener('drag', this._onDrag);
  22116. }
  22117. }, {
  22118. key: 'attributeChangedCallback',
  22119. value: function attributeChangedCallback(name, last, current) {
  22120. if (name === 'disabled') {
  22121. this._updateDisabled(current);
  22122. }
  22123. get(RangeElement.prototype.__proto__ || Object.getPrototypeOf(RangeElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  22124. }
  22125. /**
  22126. * @param {boolean} disabled
  22127. */
  22128. }, {
  22129. key: '_updateDisabled',
  22130. value: function _updateDisabled(disabled) {
  22131. if (disabled) {
  22132. this.classList.add('range--disabled');
  22133. } else {
  22134. this.classList.remove('range--disabled');
  22135. }
  22136. }
  22137. }, {
  22138. key: 'connectedCallback',
  22139. value: function connectedCallback() {
  22140. this._setupListeners(true);
  22141. }
  22142. }, {
  22143. key: 'disconnectedCallback',
  22144. value: function disconnectedCallback() {
  22145. this._setupListeners(false);
  22146. }
  22147. }, {
  22148. key: '_setupListeners',
  22149. value: function _setupListeners(add) {
  22150. var action = (add ? 'add' : 'remove') + 'EventListener';
  22151. util$1[action](this, 'touchstart', this._onTouchStart, { passive: true });
  22152. this[action]('mousedown', this._onMouseDown);
  22153. this[action]('mouseup', this._onMouseUp);
  22154. this[action]('touchend', this._onTouchEnd);
  22155. this[action]('dragstart', this._onDragstart);
  22156. this[action]('dragend', this._onDragend);
  22157. this[action]('input', this._onInput);
  22158. }
  22159. /**
  22160. * @attribute disabled
  22161. * @description
  22162. * [en]Whether the element is disabled or not.[/en]
  22163. * [ja]無効化されている場合に`true`。[/ja]
  22164. */
  22165. /**
  22166. * @property disabled
  22167. * @type {Boolean}
  22168. * @description
  22169. * [en]Whether the element is disabled or not.[/en]
  22170. * [ja]無効化されている場合に`true`。[/ja]
  22171. */
  22172. /**
  22173. * @property value
  22174. * @type {Number}
  22175. * @description
  22176. * [en]Current value.[/en]
  22177. * [ja][/ja]
  22178. */
  22179. }, {
  22180. key: '_scheme',
  22181. get: function get$$1() {
  22182. return scheme$22;
  22183. }
  22184. }, {
  22185. key: '_template',
  22186. get: function get$$1() {
  22187. return '\n <input type="' + this.type + '" class="' + this._defaultClassName + '__input">\n <input type="range" class="range__focus-ring" tabIndex="-1">\n ';
  22188. }
  22189. }, {
  22190. key: '_defaultClassName',
  22191. get: function get$$1() {
  22192. return 'range';
  22193. }
  22194. }, {
  22195. key: 'type',
  22196. get: function get$$1() {
  22197. return 'range';
  22198. }
  22199. }, {
  22200. key: '_focusRing',
  22201. get: function get$$1() {
  22202. return this.children[1];
  22203. }
  22204. }, {
  22205. key: '_ratio',
  22206. get: function get$$1() {
  22207. // Returns the current ratio.
  22208. var min = this._input.min === '' ? 0 : parseInt(this._input.min);
  22209. var max = this._input.max === '' ? 100 : parseInt(this._input.max);
  22210. return (this.value - min) / (max - min);
  22211. }
  22212. }], [{
  22213. key: 'observedAttributes',
  22214. get: function get$$1() {
  22215. return ['disabled'].concat(toConsumableArray(BaseInputElement.observedAttributes));
  22216. }
  22217. }]);
  22218. return RangeElement;
  22219. }(BaseInputElement);
  22220. onsElements.Range = RangeElement;
  22221. customElements.define('ons-range', RangeElement);
  22222. /*
  22223. Copyright 2013-2016 ASIAL CORPORATION
  22224. Licensed under the Apache License, Version 2.0 (the "License");
  22225. you may not use this file except in compliance with the License.
  22226. You may obtain a copy of the License at
  22227. http://www.apache.org/licenses/LICENSE-2.0
  22228. Unless required by applicable law or agreed to in writing, software
  22229. distributed under the License is distributed on an "AS IS" BASIS,
  22230. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22231. See the License for the specific language governing permissions and
  22232. limitations under the License.
  22233. */
  22234. /**
  22235. * @class AnimatorCSS - implementation of Animator class using css transitions
  22236. */
  22237. var AnimatorCSS = function () {
  22238. createClass(AnimatorCSS, [{
  22239. key: 'animate',
  22240. /**
  22241. * @method animate
  22242. * @desc main animation function
  22243. * @param {Element} element
  22244. * @param {Object} finalCSS
  22245. * @param {number} [duration=200] - duration in milliseconds
  22246. * @return {Object} result
  22247. * @return {Function} result.then(callback) - sets a callback to be executed after the animation has stopped
  22248. * @return {Function} result.stop(options) - stops the animation; if options.stopNext is true then it doesn't call the callback
  22249. * @return {Function} result.finish(ms) - finishes the animation in the specified time in milliseconds
  22250. * @return {Function} result.speed(ms) - sets the animation speed so that it finishes as if the original duration was the one specified here
  22251. * @example
  22252. * ````
  22253. * var result = animator.animate(el, {opacity: 0.5}, 1000);
  22254. *
  22255. * el.addEventListener('click', function(e){
  22256. * result.speed(200).then(function(){
  22257. * console.log('done');
  22258. * });
  22259. * }, 300);
  22260. * ````
  22261. */
  22262. value: function animate(el, final) {
  22263. var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
  22264. var start = new Date().getTime(),
  22265. initial = {},
  22266. stopped = false,
  22267. next = false,
  22268. timeout = false,
  22269. properties = Object.keys(final);
  22270. var updateStyles = function updateStyles() {
  22271. var s = window.getComputedStyle(el);
  22272. properties.forEach(s.getPropertyValue.bind(s));
  22273. s = el.offsetHeight;
  22274. };
  22275. var result = {
  22276. stop: function stop() {
  22277. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  22278. timeout && clearTimeout(timeout);
  22279. var k = Math.min(1, (new Date().getTime() - start) / duration);
  22280. properties.forEach(function (i) {
  22281. el.style[i] = (1 - k) * initial[i] + k * final[i] + (i == 'opacity' ? '' : 'px');
  22282. });
  22283. el.style.transitionDuration = '0s';
  22284. if (options.stopNext) {
  22285. next = false;
  22286. } else if (!stopped) {
  22287. stopped = true;
  22288. next && next();
  22289. }
  22290. return result;
  22291. },
  22292. then: function then(cb) {
  22293. next = cb;
  22294. if (stopped) {
  22295. next && next();
  22296. }
  22297. return result;
  22298. },
  22299. speed: function speed(newDuration) {
  22300. if (internal$1.config.animationsDisabled) {
  22301. newDuration = 0;
  22302. }
  22303. if (!stopped) {
  22304. timeout && clearTimeout(timeout);
  22305. var passed = new Date().getTime() - start;
  22306. var k = passed / duration;
  22307. var remaining = newDuration * (1 - k);
  22308. properties.forEach(function (i) {
  22309. el.style[i] = (1 - k) * initial[i] + k * final[i] + (i == 'opacity' ? '' : 'px');
  22310. });
  22311. updateStyles();
  22312. start = el.speedUpTime;
  22313. duration = remaining;
  22314. el.style.transitionDuration = duration / 1000 + 's';
  22315. properties.forEach(function (i) {
  22316. el.style[i] = final[i] + (i == 'opacity' ? '' : 'px');
  22317. });
  22318. timeout = setTimeout(result.stop, remaining);
  22319. }
  22320. return result;
  22321. },
  22322. finish: function finish() {
  22323. var milliseconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 50;
  22324. var k = (new Date().getTime() - start) / duration;
  22325. result.speed(milliseconds / (1 - k));
  22326. return result;
  22327. }
  22328. };
  22329. if (el.hasAttribute('disabled') || stopped || internal$1.config.animationsDisabled) {
  22330. return result;
  22331. }
  22332. var style = window.getComputedStyle(el);
  22333. properties.forEach(function (e) {
  22334. var v = parseFloat(style.getPropertyValue(e));
  22335. initial[e] = isNaN(v) ? 0 : v;
  22336. });
  22337. if (!stopped) {
  22338. el.style.transitionProperty = properties.join(',');
  22339. el.style.transitionDuration = duration / 1000 + 's';
  22340. properties.forEach(function (e) {
  22341. el.style[e] = final[e] + (e == 'opacity' ? '' : 'px');
  22342. });
  22343. }
  22344. timeout = setTimeout(result.stop, duration);
  22345. this._onStopAnimations(el, result.stop);
  22346. return result;
  22347. }
  22348. }]);
  22349. function AnimatorCSS() {
  22350. classCallCheck(this, AnimatorCSS);
  22351. this._queue = [];
  22352. this._index = 0;
  22353. }
  22354. createClass(AnimatorCSS, [{
  22355. key: '_onStopAnimations',
  22356. value: function _onStopAnimations(el, listener) {
  22357. var queue = this._queue;
  22358. var i = this._index++;
  22359. queue[el] = queue[el] || [];
  22360. queue[el][i] = function (options) {
  22361. delete queue[el][i];
  22362. if (queue[el] && queue[el].length == 0) {
  22363. delete queue[el];
  22364. }
  22365. return listener(options);
  22366. };
  22367. }
  22368. /**
  22369. * @method stopAnimations
  22370. * @desc stops active animations on a specified element
  22371. * @param {Element|Array} element - element or array of elements
  22372. * @param {Object} [options={}]
  22373. * @param {Boolean} [options.stopNext] - the callbacks after the animations won't be called if this option is true
  22374. */
  22375. }, {
  22376. key: 'stopAnimations',
  22377. value: function stopAnimations(el) {
  22378. var _this = this;
  22379. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  22380. if (Array.isArray(el)) {
  22381. return el.forEach(function (el) {
  22382. _this.stopAnimations(el, options);
  22383. });
  22384. }
  22385. (this._queue[el] || []).forEach(function (e) {
  22386. e(options || {});
  22387. });
  22388. }
  22389. /**
  22390. * @method stopAll
  22391. * @desc stops all active animations
  22392. * @param {Object} [options={}]
  22393. * @param {Boolean} [options.stopNext] - the callbacks after the animations won't be called if this option is true
  22394. */
  22395. }, {
  22396. key: 'stopAll',
  22397. value: function stopAll() {
  22398. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  22399. this.stopAnimations(Object.keys(this._queue), options);
  22400. }
  22401. /**
  22402. * @method fade
  22403. * @desc fades the element (short version for animate(el, {opacity: 0}))
  22404. * @param {Element} element
  22405. * @param {number} [duration=200]
  22406. */
  22407. }, {
  22408. key: 'fade',
  22409. value: function fade(el) {
  22410. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
  22411. return this.animate(el, { opacity: 0 }, duration);
  22412. }
  22413. }]);
  22414. return AnimatorCSS;
  22415. }();
  22416. /*
  22417. Copyright 2013-2015 ASIAL CORPORATION
  22418. Licensed under the Apache License, Version 2.0 (the "License");
  22419. you may not use this file except in compliance with the License.
  22420. You may obtain a copy of the License at
  22421. http://www.apache.org/licenses/LICENSE-2.0
  22422. Unless required by applicable law or agreed to in writing, software
  22423. distributed under the License is distributed on an "AS IS" BASIS,
  22424. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22425. See the License for the specific language governing permissions and
  22426. limitations under the License.
  22427. */
  22428. var defaultClassName$11 = 'ripple';
  22429. var scheme$23 = {
  22430. '': 'ripple--*',
  22431. '.ripple__wave': 'ripple--*__wave',
  22432. '.ripple__background': 'ripple--*__background'
  22433. };
  22434. /**
  22435. * @element ons-ripple
  22436. * @category visual
  22437. * @description
  22438. * [en]
  22439. * Adds a Material Design "ripple" effect to an element. The ripple effect will spread from the position where the user taps.
  22440. *
  22441. * Some elements such as `<ons-button>` and `<ons-fab>` support a `ripple` attribute.
  22442. * [/en]
  22443. * [ja]マテリアルデザインのリップル効果をDOM要素に追加します。[/ja]
  22444. * @codepen wKQWdZ
  22445. * @tutorial vanilla/Reference/ripple
  22446. * @modifier light-gray
  22447. * [en]Change the color of effects to light gray.[/en]
  22448. * [ja]エフェクトの色が明るい灰色になります。[/ja]
  22449. * @guide theming.html#cross-platform-styling-autostyling
  22450. * [en]Cross platform styling[/en]
  22451. * [ja]Cross platform styling[/ja]
  22452. * @example
  22453. * <div class="my-div">
  22454. * <ons-ripple></ons-ripple>
  22455. * </div>
  22456. *
  22457. * @example
  22458. * <ons-button ripple>Click me!</ons-button>
  22459. */
  22460. var RippleElement = function (_BaseElement) {
  22461. inherits(RippleElement, _BaseElement);
  22462. /**
  22463. * @attribute color
  22464. * @type {String}
  22465. * @description
  22466. * [en]Color of the ripple effect.[/en]
  22467. * [ja]リップルエフェクトの色を指定します。[/ja]
  22468. */
  22469. /**
  22470. * @attribute modifier
  22471. * @type {String}
  22472. * @description
  22473. * [en]The appearance of the ripple effect.[/en]
  22474. * [ja]エフェクトの表現を指定します。[/ja]
  22475. */
  22476. /**
  22477. * @attribute background
  22478. * @type {String}
  22479. * @description
  22480. * [en]Color of the background.[/en]
  22481. * [ja]背景の色を設定します。[/ja]
  22482. */
  22483. /**
  22484. * @attribute size
  22485. * @type {String}
  22486. * @description
  22487. * [en]Sizing of the wave on ripple effect. Set "cover" or "contain". Default is "cover".[/en]
  22488. * [ja]エフェクトのサイズを指定します。"cover"もしくは"contain"を指定します。デフォルトは"cover"です。[/ja]
  22489. */
  22490. /**
  22491. * @attribute center
  22492. * @type {Boolean}
  22493. * @description
  22494. * [en]If this attribute presents, change the position of wave effect to center of the target element.[/en]
  22495. * [ja]この要素を設定すると、エフェクトの位置が要素の真ん中から始まります。[/ja]
  22496. */
  22497. /**
  22498. * @attribute disabled
  22499. * @description
  22500. * [en]If this attribute is set, the ripple effect will be disabled.[/en]
  22501. * [ja]この属性が設定された場合、リップルエフェクトは無効になります。[/ja]
  22502. */
  22503. function RippleElement() {
  22504. classCallCheck(this, RippleElement);
  22505. var _this = possibleConstructorReturn(this, (RippleElement.__proto__ || Object.getPrototypeOf(RippleElement)).call(this));
  22506. _this._onTap = _this._onTap.bind(_this);
  22507. _this._onHold = _this._onHold.bind(_this);
  22508. _this._onDragStart = _this._onDragStart.bind(_this);
  22509. _this._onRelease = _this._onRelease.bind(_this);
  22510. contentReady(_this, function () {
  22511. return _this._compile();
  22512. });
  22513. _this._animator = new AnimatorCSS();
  22514. ['color', 'center', 'start-radius', 'background', 'modifier'].forEach(function (e) {
  22515. _this.attributeChangedCallback(e, null, _this.getAttribute(e));
  22516. });
  22517. return _this;
  22518. }
  22519. createClass(RippleElement, [{
  22520. key: '_compile',
  22521. value: function _compile() {
  22522. this.classList.add(defaultClassName$11);
  22523. this._wave = this.getElementsByClassName('ripple__wave')[0];
  22524. this._background = this.getElementsByClassName('ripple__background')[0];
  22525. if (!(this._background && this._wave)) {
  22526. this._wave = util$1.create('.ripple__wave');
  22527. this._background = util$1.create('.ripple__background');
  22528. this.appendChild(this._wave);
  22529. this.appendChild(this._background);
  22530. }
  22531. ModifierUtil.initModifier(this, scheme$23);
  22532. }
  22533. }, {
  22534. key: '_getEffectSize',
  22535. value: function _getEffectSize() {
  22536. var sizes = ['cover', 'contain'];
  22537. if (this.hasAttribute('size')) {
  22538. var size = this.getAttribute('size');
  22539. if (sizes.indexOf(size) !== -1) {
  22540. return size;
  22541. }
  22542. }
  22543. return 'cover';
  22544. }
  22545. }, {
  22546. key: '_calculateCoords',
  22547. value: function _calculateCoords(e) {
  22548. var x = void 0,
  22549. y = void 0,
  22550. h = void 0,
  22551. w = void 0,
  22552. r = void 0;
  22553. var b = this.getBoundingClientRect();
  22554. var size = this._getEffectSize();
  22555. var error = function error() {
  22556. return util$1.throw('Ripple invalid state');
  22557. };
  22558. if (this._center) {
  22559. x = b.width / 2;
  22560. y = b.height / 2;
  22561. if (size === 'cover') {
  22562. r = Math.sqrt(x * x + y * y);
  22563. } else if (size === 'contain') {
  22564. r = Math.min(x, y);
  22565. } else {
  22566. error();
  22567. }
  22568. } else {
  22569. x = (typeof e.clientX === 'number' ? e.clientX : e.changedTouches[0].clientX) - b.left;
  22570. y = (typeof e.clientY === 'number' ? e.clientY : e.changedTouches[0].clientY) - b.top;
  22571. h = Math.max(y, b.height - y);
  22572. w = Math.max(x, b.width - x);
  22573. if (size === 'cover') {
  22574. r = Math.sqrt(h * h + w * w);
  22575. } else if (size === 'contain') {
  22576. r = Math.min(Math.round(h / 2), Math.round(w / 2));
  22577. } else {
  22578. error();
  22579. }
  22580. }
  22581. return { x: x, y: y, r: r };
  22582. }
  22583. }, {
  22584. key: '_rippleAnimation',
  22585. value: function _rippleAnimation(e) {
  22586. var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
  22587. var _animator = this._animator,
  22588. _wave = this._wave,
  22589. _background = this._background,
  22590. _minR = this._minR;
  22591. var _calculateCoords2 = this._calculateCoords(e),
  22592. x = _calculateCoords2.x,
  22593. y = _calculateCoords2.y,
  22594. r = _calculateCoords2.r;
  22595. _animator.stopAll({ stopNext: 1 });
  22596. _animator.animate(_background, { opacity: 1 }, duration);
  22597. util$1.extend(_wave.style, {
  22598. opacity: 1,
  22599. top: y - _minR + 'px',
  22600. left: x - _minR + 'px',
  22601. width: 2 * _minR + 'px',
  22602. height: 2 * _minR + 'px'
  22603. });
  22604. return _animator.animate(_wave, {
  22605. top: y - r,
  22606. left: x - r,
  22607. height: 2 * r,
  22608. width: 2 * r
  22609. }, duration);
  22610. }
  22611. }, {
  22612. key: '_updateParent',
  22613. value: function _updateParent() {
  22614. if (!this._parentUpdated && this.parentNode) {
  22615. var computedStyle = window.getComputedStyle(this.parentNode);
  22616. if (computedStyle.getPropertyValue('position') === 'static') {
  22617. this.parentNode.style.position = 'relative';
  22618. }
  22619. this._parentUpdated = true;
  22620. }
  22621. }
  22622. }, {
  22623. key: '_onTap',
  22624. value: function _onTap(e) {
  22625. var _this2 = this;
  22626. if (!this.disabled && !e.ripple) {
  22627. e.ripple = true;
  22628. this._updateParent();
  22629. this._rippleAnimation(e.gesture.srcEvent).then(function () {
  22630. _this2._animator.fade(_this2._wave);
  22631. _this2._animator.fade(_this2._background);
  22632. });
  22633. }
  22634. }
  22635. }, {
  22636. key: '_onHold',
  22637. value: function _onHold(e) {
  22638. if (!this.disabled && !e.ripple) {
  22639. e.ripple = true;
  22640. this._updateParent();
  22641. this._holding = this._rippleAnimation(e.gesture.srcEvent, 2000);
  22642. document.addEventListener('release', this._onRelease);
  22643. }
  22644. }
  22645. }, {
  22646. key: '_onRelease',
  22647. value: function _onRelease(e) {
  22648. var _this3 = this;
  22649. if (this._holding && !e.ripple) {
  22650. e.ripple = true;
  22651. this._holding.speed(300).then(function () {
  22652. _this3._animator.stopAll({ stopNext: true });
  22653. _this3._animator.fade(_this3._wave);
  22654. _this3._animator.fade(_this3._background);
  22655. });
  22656. this._holding = false;
  22657. }
  22658. document.removeEventListener('release', this._onRelease);
  22659. }
  22660. }, {
  22661. key: '_onDragStart',
  22662. value: function _onDragStart(e) {
  22663. if (this._holding) {
  22664. return this._onRelease(e);
  22665. }
  22666. if (['left', 'right'].indexOf(e.gesture.direction) != -1) {
  22667. this._onTap(e);
  22668. }
  22669. }
  22670. }, {
  22671. key: 'connectedCallback',
  22672. value: function connectedCallback() {
  22673. this._parentNode = this.parentNode;
  22674. if (internal$1.config.animationsDisabled) {
  22675. this.disabled = true;
  22676. } else {
  22677. this._parentNode.addEventListener('tap', this._onTap);
  22678. this._parentNode.addEventListener('hold', this._onHold);
  22679. this._parentNode.addEventListener('dragstart', this._onDragStart);
  22680. }
  22681. }
  22682. }, {
  22683. key: 'disconnectedCallback',
  22684. value: function disconnectedCallback() {
  22685. var pn = this._parentNode || this.parentNode;
  22686. pn.removeEventListener('tap', this._onTap);
  22687. pn.removeEventListener('hold', this._onHold);
  22688. pn.removeEventListener('dragstart', this._onDragStart);
  22689. }
  22690. }, {
  22691. key: 'attributeChangedCallback',
  22692. value: function attributeChangedCallback(name, last, current) {
  22693. var _this4 = this;
  22694. switch (name) {
  22695. case 'class':
  22696. util$1.restoreClass(this, defaultClassName$11, scheme$23);
  22697. break;
  22698. case 'modifier':
  22699. ModifierUtil.onModifierChanged(last, current, this, scheme$23);
  22700. break;
  22701. case 'start-radius':
  22702. this._minR = Math.max(0, parseFloat(current) || 0);
  22703. break;
  22704. case 'color':
  22705. if (current) {
  22706. contentReady(this, function () {
  22707. _this4._wave.style.background = current;
  22708. if (!_this4.hasAttribute('background')) {
  22709. _this4._background.style.background = current;
  22710. }
  22711. });
  22712. }
  22713. break;
  22714. case 'background':
  22715. if (current || last) {
  22716. if (current === 'none') {
  22717. contentReady(this, function () {
  22718. _this4._background.setAttribute('disabled', 'disabled');
  22719. _this4._background.style.background = 'transparent';
  22720. });
  22721. } else {
  22722. contentReady(this, function () {
  22723. if (_this4._background.hasAttribute('disabled')) {
  22724. _this4._background.removeAttribute('disabled');
  22725. }
  22726. _this4._background.style.background = current;
  22727. });
  22728. }
  22729. }
  22730. break;
  22731. case 'center':
  22732. if (name === 'center') {
  22733. this._center = current != null && current != 'false';
  22734. }
  22735. break;
  22736. }
  22737. }
  22738. /**
  22739. * @property disabled
  22740. * @type {Boolean}
  22741. * @description
  22742. * [en]Whether the element is disabled or not.[/en]
  22743. * [ja]無効化されている場合に`true`。[/ja]
  22744. */
  22745. }, {
  22746. key: 'disabled',
  22747. set: function set$$1(value) {
  22748. return util$1.toggleAttribute(this, 'disabled', value);
  22749. },
  22750. get: function get$$1() {
  22751. return this.hasAttribute('disabled');
  22752. }
  22753. }], [{
  22754. key: 'observedAttributes',
  22755. get: function get$$1() {
  22756. return ['start-radius', 'color', 'background', 'center', 'class', 'modifier'];
  22757. }
  22758. }]);
  22759. return RippleElement;
  22760. }(BaseElement);
  22761. onsElements.Ripple = RippleElement;
  22762. customElements.define('ons-ripple', RippleElement);
  22763. /*
  22764. Copyright 2013-2015 ASIAL CORPORATION
  22765. Licensed under the Apache License, Version 2.0 (the "License");
  22766. you may not use this file except in compliance with the License.
  22767. You may obtain a copy of the License at
  22768. http://www.apache.org/licenses/LICENSE-2.0
  22769. Unless required by applicable law or agreed to in writing, software
  22770. distributed under the License is distributed on an "AS IS" BASIS,
  22771. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22772. See the License for the specific language governing permissions and
  22773. limitations under the License.
  22774. */
  22775. /**
  22776. * @element ons-row
  22777. * @category grid
  22778. * @description
  22779. * [en]Represents a row in the grid system. Use with `<ons-col>` to layout components.[/en]
  22780. * [ja]グリッドシステムにて行を定義します。ons-colとともに使用し、コンポーネントの配置に使用します。[/ja]
  22781. * @codepen GgujC {wide}
  22782. * @guide features.html
  22783. * [en]Layouting guide[/en]
  22784. * [ja]レイアウト調整[/ja]
  22785. * @seealso ons-col
  22786. * [en]The `<ons-col>` component is used as children of `<ons-row>`.[/en]
  22787. * [ja]ons-colコンポーネント[/ja]
  22788. * @note
  22789. * [en]For Android 4.3 and earlier, and iOS6 and earlier, when using mixed alignment with ons-row and ons-col, they may not be displayed correctly. You can use only one vertical-align.[/en]
  22790. * [ja]Android 4.3以前、もしくはiOS 6以前のOSの場合、ons-rowとons-colを組み合わせてそれぞれのons-col要素のvertical-align属性の値に別々の値を指定すると、描画が崩れる場合があります。vertical-align属性の値には一つの値だけを指定できます。[/ja]
  22791. * @example
  22792. * <ons-row>
  22793. * <ons-col width="50px"><ons-icon icon="fa-twitter"></ons-icon></ons-col>
  22794. * <ons-col>Text</ons-col>
  22795. * </ons-row>
  22796. */
  22797. /**
  22798. * @attribute vertical-align
  22799. * @type {String}
  22800. * @description
  22801. * [en]Short hand attribute for aligning vertically. Valid values are top, bottom, and center.[/en]
  22802. * [ja]縦に整列するために指定します。top、bottom、centerのいずれかを指定できます。[/ja]
  22803. */
  22804. var RowElement = function (_BaseElement) {
  22805. inherits(RowElement, _BaseElement);
  22806. function RowElement() {
  22807. classCallCheck(this, RowElement);
  22808. return possibleConstructorReturn(this, (RowElement.__proto__ || Object.getPrototypeOf(RowElement)).apply(this, arguments));
  22809. }
  22810. return RowElement;
  22811. }(BaseElement);
  22812. onsElements.Row = RowElement;
  22813. customElements.define('ons-row', RowElement);
  22814. /*
  22815. Copyright 2013-2015 ASIAL CORPORATION
  22816. Licensed under the Apache License, Version 2.0 (the "License");
  22817. you may not use this file except in compliance with the License.
  22818. You may obtain a copy of the License at
  22819. http://www.apache.org/licenses/LICENSE-2.0
  22820. Unless required by applicable law or agreed to in writing, software
  22821. distributed under the License is distributed on an "AS IS" BASIS,
  22822. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22823. See the License for the specific language governing permissions and
  22824. limitations under the License.
  22825. */
  22826. var defaultClassName$12 = 'segment';
  22827. var scheme$24 = {
  22828. '': 'segment--*',
  22829. '.segment__item': 'segment--*__item',
  22830. '.segment__input': 'segment--*__input',
  22831. '.segment__button': 'segment--*__button'
  22832. };
  22833. var generateId$1 = function () {
  22834. var i = 0;
  22835. return function () {
  22836. return 'ons-segment-gen-' + i++;
  22837. };
  22838. }();
  22839. /**
  22840. * @element ons-segment
  22841. * @category control
  22842. * @modifier material
  22843. * [en]Material Design segment[/en]
  22844. * [ja][/ja]
  22845. * @description
  22846. * [en]
  22847. * Segment component. Use this component to have a button bar with automatic styles that switch on click of another button.
  22848. *
  22849. * Will automatically display as a Material Design segment on Android.
  22850. * [/en]
  22851. * [ja][/ja]
  22852. * @codepen hLayx
  22853. * @tutorial vanilla/Reference/segment
  22854. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  22855. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  22856. * @example
  22857. * <ons-segment>
  22858. * <ons-button>Label 1</ons-button>
  22859. * <ons-button>Label 2</ons-button>
  22860. * <ons-button>Label 3</ons-button>
  22861. * </ons-segment>
  22862. */
  22863. var SegmentElement = function (_BaseElement) {
  22864. inherits(SegmentElement, _BaseElement);
  22865. /**
  22866. * @event postchange
  22867. * @description
  22868. * [en]Fires after the active button is changed.[/en]
  22869. * [ja][/ja]
  22870. * @param {Object} event
  22871. * [en]Event object.[/en]
  22872. * [ja][/ja]
  22873. * @param {Number} event.index
  22874. * [en]Tapped button index.[/en]
  22875. * [ja][/ja]
  22876. * @param {Object} event.segmentItem
  22877. * [en]Segment item object.[/en]
  22878. * [ja][/ja]
  22879. */
  22880. /**
  22881. * @attribute modifier
  22882. * @type {String}
  22883. * @description
  22884. * [en]The appearance of the segment.[/en]
  22885. * [ja][/ja]
  22886. */
  22887. /**
  22888. * @attribute tabbar-id
  22889. * @initonly
  22890. * @type {String}
  22891. * @description
  22892. * [en]ID of the tabbar element to "connect" to the segment. Must be inside the same page.[/en]
  22893. * [ja][/ja]
  22894. */
  22895. /**
  22896. * @attribute active-index
  22897. * @initonly
  22898. * @default 0
  22899. * @type {Number}
  22900. * @description
  22901. * [en]Index of the first active button, only works if there is no connected tabbar (in which case the active tab sets the active button).[/en]
  22902. * [ja][/ja]
  22903. */
  22904. /**
  22905. * @attribute disabled
  22906. * @description
  22907. * [en]Specify if segment should be disabled.[/en]
  22908. * [ja]ボタンを無効化する場合は指定します。[/ja]
  22909. */
  22910. function SegmentElement() {
  22911. classCallCheck(this, SegmentElement);
  22912. var _this = possibleConstructorReturn(this, (SegmentElement.__proto__ || Object.getPrototypeOf(SegmentElement)).call(this));
  22913. _this._segmentId = generateId$1();
  22914. _this._tabbar = null;
  22915. _this._onChange = _this._onChange.bind(_this);
  22916. _this._onTabbarPreChange = _this._onTabbarPreChange.bind(_this);
  22917. contentReady(_this, function () {
  22918. _this._compile();
  22919. setImmediate(function () {
  22920. return _this._lastActiveIndex = _this._tabbar ? _this._tabbar.getActiveTabIndex() : _this.getActiveButtonIndex();
  22921. });
  22922. });
  22923. return _this;
  22924. }
  22925. createClass(SegmentElement, [{
  22926. key: '_compile',
  22927. value: function _compile() {
  22928. autoStyle.prepare(this);
  22929. this.classList.add(defaultClassName$12);
  22930. for (var index = this.children.length - 1; index >= 0; index--) {
  22931. var item = this.children[index];
  22932. item.classList.add('segment__item');
  22933. var input = util$1.findChild(item, '.segment__input') || util$1.create('input.segment__input');
  22934. input.type = 'radio';
  22935. input.value = index;
  22936. input.name = input.name || this._segmentId;
  22937. input.checked = !this.hasAttribute('tabbar-id') && index === (parseInt(this.getAttribute('active-index')) || 0);
  22938. var button = util$1.findChild(item, '.segment__button') || util$1.create('.segment__button');
  22939. if (button.parentElement !== item) {
  22940. while (item.firstChild) {
  22941. button.appendChild(item.firstChild);
  22942. }
  22943. }
  22944. item.appendChild(input);
  22945. item.appendChild(button);
  22946. }
  22947. ModifierUtil.initModifier(this, scheme$24);
  22948. }
  22949. }, {
  22950. key: 'connectedCallback',
  22951. value: function connectedCallback() {
  22952. var _this2 = this;
  22953. contentReady(this, function () {
  22954. if (_this2.hasAttribute('tabbar-id')) {
  22955. var page = util$1.findParent(_this2, 'ons-page');
  22956. _this2._tabbar = page && page.querySelector('#' + _this2.getAttribute('tabbar-id'));
  22957. if (!_this2._tabbar || _this2._tabbar.tagName !== 'ONS-TABBAR') {
  22958. util$1.throw('No tabbar with id ' + _this2.getAttribute('tabbar-id') + ' was found.');
  22959. }
  22960. _this2._tabbar.setAttribute('hide-tabs', '');
  22961. setImmediate(function () {
  22962. return _this2._setChecked(_this2._tabbar.getActiveTabIndex());
  22963. });
  22964. _this2._tabbar.addEventListener('prechange', _this2._onTabbarPreChange);
  22965. }
  22966. });
  22967. this.addEventListener('change', this._onChange);
  22968. }
  22969. }, {
  22970. key: 'disconnectedCallback',
  22971. value: function disconnectedCallback() {
  22972. var _this3 = this;
  22973. contentReady(this, function () {
  22974. if (_this3._tabbar) {
  22975. _this3._tabbar.removeEventListener('prechange', _this3._onTabbarPreChange);
  22976. _this3._tabbar = null;
  22977. }
  22978. });
  22979. this.removeEventListener('change', this._onChange);
  22980. }
  22981. }, {
  22982. key: '_setChecked',
  22983. value: function _setChecked(index) {
  22984. this.children[index].firstElementChild.checked = true;
  22985. }
  22986. /**
  22987. * @method setActiveButton
  22988. * @signature setActiveButton(index, [options])
  22989. * @param {Number} index
  22990. * [en]Button index.[/en]
  22991. * [ja][/ja]
  22992. * @param {Object} [options]
  22993. * [en]Parameter object, works only if there is a connected tabbar. Supports the same options as `ons-tabbar`'s `setActiveTab` method.[/en]
  22994. * [ja][/ja]
  22995. * @description
  22996. * [en]Make button with the specified index active. If there is a connected tabbar it shows the corresponding tab page. In this case animations and their options can be specified by the second parameter.[/en]
  22997. * [ja][/ja]
  22998. * @return {Promise}
  22999. * [en]Resolves to the selected index or to the new page element if there is a connected tabbar.[/en]
  23000. * [ja][/ja]
  23001. */
  23002. }, {
  23003. key: 'setActiveButton',
  23004. value: function setActiveButton(index, options) {
  23005. if (this._tabbar) {
  23006. return this._tabbar.setActiveTab(index, options);
  23007. }
  23008. this._setChecked(index);
  23009. this._postChange(index);
  23010. return Promise.resolve(index);
  23011. }
  23012. /**
  23013. * @method getActiveButtonIndex
  23014. * @signature getActiveButtonIndex()
  23015. * @return {Number}
  23016. * [en]The index of the currently active button.[/en]
  23017. * [ja][/ja]
  23018. * @description
  23019. * [en]Returns button index of current active button. If active button is not found, returns -1.[/en]
  23020. * [ja][/ja]
  23021. */
  23022. }, {
  23023. key: 'getActiveButtonIndex',
  23024. value: function getActiveButtonIndex() {
  23025. for (var i = this.children.length - 1; i >= 0; i--) {
  23026. // Array.findIndex
  23027. if (this.children[i].firstElementChild.checked) {
  23028. return i;
  23029. }
  23030. }
  23031. return -1;
  23032. }
  23033. }, {
  23034. key: '_onChange',
  23035. value: function _onChange(event) {
  23036. event.stopPropagation();
  23037. this._tabbar ? this._tabbar.setActiveTab(this.getActiveButtonIndex(), { reject: false }) : this._postChange(this.getActiveButtonIndex());
  23038. }
  23039. }, {
  23040. key: '_onTabbarPreChange',
  23041. value: function _onTabbarPreChange(event) {
  23042. var _this4 = this;
  23043. setImmediate(function () {
  23044. if (!event.detail.canceled) {
  23045. _this4._setChecked(event.index);
  23046. _this4._postChange(event.index);
  23047. }
  23048. });
  23049. }
  23050. }, {
  23051. key: '_postChange',
  23052. value: function _postChange(index) {
  23053. util$1.triggerElementEvent(this, 'postchange', {
  23054. index: index,
  23055. activeIndex: index,
  23056. lastActiveIndex: this._lastActiveIndex,
  23057. segmentItem: this.children[index]
  23058. });
  23059. this._lastActiveIndex = index;
  23060. }
  23061. /**
  23062. * @property disabled
  23063. * @type {Boolean}
  23064. * @description
  23065. * [en]Whether the segment is disabled or not.[/en]
  23066. * [ja]無効化されている場合に`true`。[/ja]
  23067. */
  23068. }, {
  23069. key: 'attributeChangedCallback',
  23070. value: function attributeChangedCallback(name, last, current) {
  23071. switch (name) {
  23072. case 'class':
  23073. util$1.restoreClass(this, defaultClassName$12, scheme$24);
  23074. break;
  23075. case 'modifier':
  23076. ModifierUtil.onModifierChanged(last, current, this, scheme$24);
  23077. break;
  23078. }
  23079. }
  23080. }, {
  23081. key: 'disabled',
  23082. set: function set$$1(value) {
  23083. return util$1.toggleAttribute(this, 'disabled', value);
  23084. },
  23085. get: function get$$1() {
  23086. return this.hasAttribute('disabled');
  23087. }
  23088. }], [{
  23089. key: 'observedAttributes',
  23090. get: function get$$1() {
  23091. return ['class', 'modifier'];
  23092. }
  23093. }, {
  23094. key: 'events',
  23095. get: function get$$1() {
  23096. return ['postchange'];
  23097. }
  23098. }]);
  23099. return SegmentElement;
  23100. }(BaseElement);
  23101. onsElements.Segment = SegmentElement;
  23102. customElements.define('ons-segment', SegmentElement);
  23103. /*
  23104. Copyright 2013-2015 ASIAL CORPORATION
  23105. Licensed under the Apache License, Version 2.0 (the "License");
  23106. you may not use this file except in compliance with the License.
  23107. You may obtain a copy of the License at
  23108. http://www.apache.org/licenses/LICENSE-2.0
  23109. Unless required by applicable law or agreed to in writing, software
  23110. distributed under the License is distributed on an "AS IS" BASIS,
  23111. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23112. See the License for the specific language governing permissions and
  23113. limitations under the License.
  23114. */
  23115. var scheme$25 = {
  23116. '': 'select-* select--*',
  23117. '.select-input': 'select-input--*'
  23118. };
  23119. var defaultClassName$13 = 'select';
  23120. var INPUT_ATTRIBUTES$1 = ['autofocus', 'disabled', 'form', 'multiple', 'name', 'required', 'size'];
  23121. /**
  23122. * @element ons-select
  23123. * @category form
  23124. * @modifier material
  23125. * [en]Displays a Material Design select input.[/en]
  23126. * [ja][/ja]
  23127. * @modifier underbar
  23128. * [en]Displays a horizontal line underneath a select input.[/en]
  23129. * [ja][/ja]
  23130. * @description
  23131. * [en]
  23132. * Select component. If you want to place a select with an ID of `my-id` on a page, use `<ons-select select-id="my-id">`.
  23133. *
  23134. * The component will automatically display as a Material Design select on Android.
  23135. *
  23136. * Most attributes that can be used for a normal `<select>` element can also be used on the `<ons-select>` element.
  23137. * [/en]
  23138. * [ja]セレクトボックスを表示するコンポーネントです。`select` 要素に使用できる属性の多くが `ons-select` 要素でも利用できます。[/ja]
  23139. * @codepen hLayx
  23140. * @tutorial vanilla/Reference/select
  23141. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  23142. * @guide theming.html#cross-platform-styling-autostyling [en]Information about cross platform styling[/en][ja]Information about cross platform styling[/ja]
  23143. * @example
  23144. * <ons-select>
  23145. * <option value="1">1</option>
  23146. * <option value="2">2nd</option>
  23147. * <option value="3">3rd option</option>
  23148. * </ons-select>
  23149. */
  23150. var SelectElement = function (_BaseElement) {
  23151. inherits(SelectElement, _BaseElement);
  23152. /**
  23153. * @attribute autofocus
  23154. * @type {Boolean}
  23155. * @default false
  23156. * @description
  23157. * [en]Element automatically gains focus on page load.[/en]
  23158. * [ja]ページロード時にこのセレクトボックスにフォーカスが移るようにします。[/ja]
  23159. */
  23160. /**
  23161. * @attribute disabled
  23162. * @type {Boolean}
  23163. * @default false
  23164. * @description
  23165. * [en]Specify if select input should be disabled.[/en]
  23166. * [ja]このセレクトボックスを無効化する場合に指定します。[/ja]
  23167. */
  23168. /**
  23169. * @attribute form
  23170. * @type {String}
  23171. * @description
  23172. * [en]Associate a select element to an existing form on the page, even if not nested.[/en]
  23173. * [ja]このセレクトボックスを、指定した `form` 要素に紐付けます。セレクトボックスを `form` 要素の外側に配置する際に使用します。[/ja]
  23174. */
  23175. /**
  23176. * @attribute multiple
  23177. * @type {Boolean}
  23178. * @default false
  23179. * @description
  23180. * [en]If this attribute is defined, multiple options can be selected at once.[/en]
  23181. * [ja]選択肢の複数選択を有効にします。[/ja]
  23182. */
  23183. /**
  23184. * @attribute name
  23185. * @type {String}
  23186. * @description
  23187. * [en]Name the select element, useful for instance if it is part of a form.[/en]
  23188. * [ja]このセレクトボックスの名前を指定します。通常 `form` 要素と共に使用します。[/ja]
  23189. */
  23190. /**
  23191. * @attribute required
  23192. * @type {Boolean}
  23193. * @description
  23194. * [en]Make the select input required for submitting the form it is part of.[/en]
  23195. * [ja]このセレクトボックスを入力必須にする場合に指定します。通常 `form` 要素と共に使用します。[/ja]
  23196. */
  23197. /**
  23198. * @attribute select-id
  23199. * @type {String}
  23200. * @description
  23201. * [en]ID given to the inner select, useful for dynamic manipulation.[/en]
  23202. * [ja]このセレクトボックスが内部に持つ select 要素に与える ID を指定します。セレクトボックスの内容を動的に変更する必要がある場合に使用します。[/ja]
  23203. */
  23204. /**
  23205. * @attribute size
  23206. * @type {Number}
  23207. * @default 1
  23208. * @description
  23209. * [en]How many options are displayed; if there are more than the size then a scroll appears to navigate them.[/en]
  23210. * [ja]一度に表示する選択肢の個数を指定します。選択肢がこの属性で指定した個数よりも多い場合、スクロールが有効になります。[/ja]
  23211. */
  23212. function SelectElement() {
  23213. classCallCheck(this, SelectElement);
  23214. var _this = possibleConstructorReturn(this, (SelectElement.__proto__ || Object.getPrototypeOf(SelectElement)).call(this));
  23215. contentReady(_this, function () {
  23216. return _this._compile();
  23217. });
  23218. _this._deriveGetters();
  23219. return _this;
  23220. }
  23221. createClass(SelectElement, [{
  23222. key: 'attributeChangedCallback',
  23223. value: function attributeChangedCallback(name, last, current) {
  23224. var _this2 = this;
  23225. switch (name) {
  23226. case 'class':
  23227. util$1.restoreClass(this, defaultClassName$13, scheme$25);
  23228. break;
  23229. case 'modifier':
  23230. ModifierUtil.onModifierChanged(last, current, this, scheme$25);
  23231. break;
  23232. }
  23233. if (INPUT_ATTRIBUTES$1.indexOf(name) >= 0) {
  23234. contentReady(this, function () {
  23235. return _this2._updateBoundAttributes();
  23236. });
  23237. }
  23238. }
  23239. }, {
  23240. key: '_updateBoundAttributes',
  23241. value: function _updateBoundAttributes() {
  23242. var _this3 = this;
  23243. INPUT_ATTRIBUTES$1.forEach(function (attr) {
  23244. if (_this3.hasAttribute(attr)) {
  23245. _this3._select.setAttribute(attr, _this3.getAttribute(attr));
  23246. } else {
  23247. _this3._select.removeAttribute(attr);
  23248. }
  23249. });
  23250. }
  23251. /**
  23252. * @property length
  23253. * @description
  23254. * [en]Number of options in the select box.[/en]
  23255. * [ja]このセレクトボックスに含まれる選択肢の個数を返します。 `select` 要素[/ja]
  23256. */
  23257. /**
  23258. * @property options
  23259. * @description
  23260. * [en]Several options for handling the select DOM object.[/en]
  23261. * [ja]このセレクトボックスに含まれる `option` 要素の配列を返します。[/ja]
  23262. */
  23263. /**
  23264. * @property selectedIndex
  23265. * @description
  23266. * [en]Index of the currently selected option.[/en]
  23267. * [ja]現在選択されている選択肢のインデックスを返します。[/ja]
  23268. */
  23269. /**
  23270. * @property value
  23271. * @description
  23272. * [en]Value of the currently selected option.[/en]
  23273. * [ja]現在選択されている選択肢の値を返します。[/ja]
  23274. */
  23275. }, {
  23276. key: '_compile',
  23277. value: function _compile() {
  23278. autoStyle.prepare(this);
  23279. this.classList.add(defaultClassName$13);
  23280. var sel = this._select || document.createElement('select');
  23281. if (!sel.id && this.hasAttribute('select-id')) {
  23282. sel.id = this.getAttribute('select-id');
  23283. }
  23284. sel.classList.add('select-input');
  23285. if (!this._select) {
  23286. util$1.arrayFrom(this.childNodes).forEach(function (element) {
  23287. return sel.appendChild(element);
  23288. });
  23289. this.appendChild(sel);
  23290. }
  23291. ModifierUtil.initModifier(this, scheme$25);
  23292. }
  23293. }, {
  23294. key: '_deriveGetters',
  23295. value: function _deriveGetters() {
  23296. var _this4 = this;
  23297. ['disabled', 'length', 'multiple', 'name', 'options', 'selectedIndex', 'size', 'value', 'form', 'type'].forEach(function (key) {
  23298. Object.defineProperty(_this4, key, {
  23299. configurable: true,
  23300. enumerable: true,
  23301. get: function get$$1() {
  23302. return _this4._select[key];
  23303. },
  23304. set: ['form', 'type'].indexOf(key) === -1 ? function (value) {
  23305. return contentReady(_this4, function () {
  23306. return _this4._select[key] = value;
  23307. });
  23308. } : undefined
  23309. });
  23310. });
  23311. }
  23312. }, {
  23313. key: 'add',
  23314. value: function add(option) {
  23315. var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  23316. this._select.add(option, index);
  23317. }
  23318. }, {
  23319. key: 'remove',
  23320. value: function remove(index) {
  23321. this._select.remove(index);
  23322. }
  23323. }, {
  23324. key: '_select',
  23325. get: function get$$1() {
  23326. return this.querySelector('select');
  23327. }
  23328. }], [{
  23329. key: 'observedAttributes',
  23330. get: function get$$1() {
  23331. return ['modifier', 'class'].concat(INPUT_ATTRIBUTES$1);
  23332. }
  23333. }]);
  23334. return SelectElement;
  23335. }(BaseElement);
  23336. onsElements.Select = SelectElement;
  23337. customElements.define('ons-select', SelectElement);
  23338. /*
  23339. Copyright 2013-2015 ASIAL CORPORATION
  23340. Licensed under the Apache License, Version 2.0 (the "License");
  23341. you may not use this file except in compliance with the License.
  23342. You may obtain a copy of the License at
  23343. http://www.apache.org/licenses/LICENSE-2.0
  23344. Unless required by applicable law or agreed to in writing, software
  23345. distributed under the License is distributed on an "AS IS" BASIS,
  23346. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23347. See the License for the specific language governing permissions and
  23348. limitations under the License.
  23349. */
  23350. var defaultClassName$14 = 'fab fab--mini speed-dial__item';
  23351. var scheme$26 = {
  23352. '': 'fab--* speed-dial__item--*'
  23353. };
  23354. /**
  23355. * @element ons-speed-dial-item
  23356. * @category control
  23357. * @description
  23358. * [en]
  23359. * This component displays the child elements of the Material Design Speed dial component.
  23360. * [/en]
  23361. * [ja]
  23362. * Material DesignのSpeed dialの子要素を表現する要素です。
  23363. * [/ja]
  23364. * @codepen dYQYLg
  23365. * @tutorial vanilla/Reference/speed-dial
  23366. * @seealso ons-speed-dial
  23367. * [en]The `<ons-speed-dial>` component.[/en]
  23368. * [ja]ons-speed-dialコンポーネント[/ja]
  23369. * @seealso ons-fab
  23370. * [en]ons-fab component[/en]
  23371. * [ja]ons-fabコンポーネント[/ja]
  23372. * @example
  23373. * <ons-speed-dial position="left bottom">
  23374. * <ons-fab>
  23375. * <ons-icon icon="fa-twitter"></ons-icon>
  23376. * </ons-fab>
  23377. * <ons-speed-dial-item>A</ons-speed-dial-item>
  23378. * <ons-speed-dial-item>B</ons-speed-dial-item>
  23379. * <ons-speed-dial-item>C</ons-speed-dial-item>
  23380. * </ons-speed-dial>
  23381. */
  23382. var SpeedDialItemElement = function (_BaseElement) {
  23383. inherits(SpeedDialItemElement, _BaseElement);
  23384. /**
  23385. * @attribute modifier
  23386. * @type {String}
  23387. * @description
  23388. * [en]The appearance of the component.[/en]
  23389. * [ja]このコンポーネントの表現を指定します。[/ja]
  23390. */
  23391. /**
  23392. * @attribute ripple
  23393. * @description
  23394. * [en]If this attribute is defined, the button will have a ripple effect when tapped.[/en]
  23395. * [ja][/ja]
  23396. */
  23397. function SpeedDialItemElement() {
  23398. classCallCheck(this, SpeedDialItemElement);
  23399. var _this = possibleConstructorReturn(this, (SpeedDialItemElement.__proto__ || Object.getPrototypeOf(SpeedDialItemElement)).call(this));
  23400. _this._compile();
  23401. _this._boundOnClick = _this._onClick.bind(_this);
  23402. return _this;
  23403. }
  23404. createClass(SpeedDialItemElement, [{
  23405. key: 'attributeChangedCallback',
  23406. value: function attributeChangedCallback(name, last, current) {
  23407. switch (name) {
  23408. case 'class':
  23409. util$1.restoreClass(this, defaultClassName$14, scheme$26);
  23410. break;
  23411. case 'modifier':
  23412. ModifierUtil.onModifierChanged(last, current, this, scheme$26);
  23413. util$1.addModifier(this, 'mini');
  23414. break;
  23415. case 'ripple':
  23416. this._updateRipple();
  23417. }
  23418. }
  23419. }, {
  23420. key: 'connectedCallback',
  23421. value: function connectedCallback() {
  23422. this.addEventListener('click', this._boundOnClick, false);
  23423. }
  23424. }, {
  23425. key: 'disconnectedCallback',
  23426. value: function disconnectedCallback() {
  23427. this.removeEventListener('click', this._boundOnClick, false);
  23428. }
  23429. }, {
  23430. key: '_updateRipple',
  23431. value: function _updateRipple() {
  23432. util$1.updateRipple(this);
  23433. }
  23434. }, {
  23435. key: '_onClick',
  23436. value: function _onClick(e) {
  23437. e.stopPropagation();
  23438. }
  23439. }, {
  23440. key: '_compile',
  23441. value: function _compile() {
  23442. var _this2 = this;
  23443. autoStyle.prepare(this);
  23444. defaultClassName$14.split(/\s+/).forEach(function (token) {
  23445. return _this2.classList.add(token);
  23446. });
  23447. util$1.addModifier(this, 'mini');
  23448. this._updateRipple();
  23449. ModifierUtil.initModifier(this, scheme$26);
  23450. }
  23451. }], [{
  23452. key: 'observedAttributes',
  23453. get: function get$$1() {
  23454. return ['modifier', 'ripple', 'class'];
  23455. }
  23456. }]);
  23457. return SpeedDialItemElement;
  23458. }(BaseElement);
  23459. onsElements.SpeedDialItem = SpeedDialItemElement;
  23460. customElements.define('ons-speed-dial-item', SpeedDialItemElement);
  23461. /*
  23462. Copyright 2013-2015 ASIAL CORPORATION
  23463. Licensed under the Apache License, Version 2.0 (the "License");
  23464. you may not use this file except in compliance with the License.
  23465. You may obtain a copy of the License at
  23466. http://www.apache.org/licenses/LICENSE-2.0
  23467. Unless required by applicable law or agreed to in writing, software
  23468. distributed under the License is distributed on an "AS IS" BASIS,
  23469. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23470. See the License for the specific language governing permissions and
  23471. limitations under the License.
  23472. */
  23473. var defaultClassName$15 = 'speed-dial';
  23474. var scheme$27 = {
  23475. '': 'speed-dial--*'
  23476. };
  23477. /**
  23478. * @element ons-speed-dial
  23479. * @category control
  23480. * @description
  23481. * [en]
  23482. * Element that displays a Material Design Speed Dialog component. It is useful when there are more than one primary action that can be performed in a page.
  23483. *
  23484. * The Speed dial looks like a `<ons-fab>` element but will expand a menu when tapped.
  23485. * [/en]
  23486. * [ja][/ja]
  23487. * @codepen dYQYLg
  23488. * @tutorial vanilla/Reference/speed-dial
  23489. * @seealso ons-speed-dial-item
  23490. * [en]The `<ons-speed-dial-item>` represents a menu item.[/en]
  23491. * [ja]ons-speed-dial-itemコンポーネント[/ja]
  23492. * @seealso ons-fab
  23493. * [en]ons-fab component[/en]
  23494. * [ja]ons-fabコンポーネント[/ja]
  23495. * @example
  23496. * <ons-speed-dial position="left bottom">
  23497. * <ons-fab>
  23498. * <ons-icon icon="fa-twitter"></ons-icon>
  23499. * </ons-fab>
  23500. * <ons-speed-dial-item>A</ons-speed-dial-item>
  23501. * <ons-speed-dial-item>B</ons-speed-dial-item>
  23502. * <ons-speed-dial-item>C</ons-speed-dial-item>
  23503. * </ons-speed-dial>
  23504. */
  23505. var SpeedDialElement = function (_BaseElement) {
  23506. inherits(SpeedDialElement, _BaseElement);
  23507. /**
  23508. * @event open
  23509. * @description
  23510. * [en]Fired when the menu items are shown.[/en]
  23511. * [ja][/ja]
  23512. */
  23513. /**
  23514. * @event close
  23515. * @description
  23516. * [en]Fired when the menu items are hidden.[/en]
  23517. * [ja][/ja]
  23518. */
  23519. /**
  23520. * @attribute modifier
  23521. * @type {String}
  23522. * @description
  23523. * [en]The appearance of the component.[/en]
  23524. * [ja]このコンポーネントの表現を指定します。[/ja]
  23525. */
  23526. /**
  23527. * @attribute ripple
  23528. * @description
  23529. * [en]If this attribute is defined, the button will have a ripple effect when tapped.[/en]
  23530. * [ja][/ja]
  23531. */
  23532. /**
  23533. * @attribute position
  23534. * @type {String}
  23535. * @description
  23536. * [en]
  23537. * Specify the vertical and horizontal position of the component.
  23538. * I.e. to display it in the top right corner specify "right top".
  23539. * Choose from "right", "left", "top" and "bottom".
  23540. * [/en]
  23541. * [ja]
  23542. * この要素を表示する左右と上下の位置を指定します。
  23543. * 例えば、右上に表示する場合には"right top"を指定します。
  23544. * 左右と上下の位置の指定には、rightとleft、topとbottomがそれぞれ指定できます。
  23545. * [/ja]
  23546. */
  23547. /**
  23548. * @attribute direction
  23549. * @type {String}
  23550. * @description
  23551. * [en]Specify the direction the items are displayed. Possible values are "up", "down", "left" and "right".[/en]
  23552. * [ja]
  23553. * 要素が表示する方向を指定します。up, down, left, rightが指定できます。
  23554. * [/ja]
  23555. */
  23556. /**
  23557. * @attribute disabled
  23558. * @description
  23559. * [en]Specify if button should be disabled.[/en]
  23560. * [ja]無効化する場合に指定します。[/ja]
  23561. */
  23562. function SpeedDialElement() {
  23563. classCallCheck(this, SpeedDialElement);
  23564. var _this = possibleConstructorReturn(this, (SpeedDialElement.__proto__ || Object.getPrototypeOf(SpeedDialElement)).call(this));
  23565. contentReady(_this, function () {
  23566. _this._compile();
  23567. });
  23568. _this._itemShown = false;
  23569. _this._boundOnClick = _this._onClick.bind(_this);
  23570. return _this;
  23571. }
  23572. createClass(SpeedDialElement, [{
  23573. key: '_compile',
  23574. value: function _compile() {
  23575. this.classList.add(defaultClassName$15);
  23576. autoStyle.prepare(this);
  23577. this._updateRipple();
  23578. ModifierUtil.initModifier(this, scheme$27);
  23579. if (this.hasAttribute('direction')) {
  23580. this._updateDirection(this.getAttribute('direction'));
  23581. } else {
  23582. this._updateDirection('up');
  23583. }
  23584. this._updatePosition();
  23585. }
  23586. }, {
  23587. key: 'attributeChangedCallback',
  23588. value: function attributeChangedCallback(name, last, current) {
  23589. var _this2 = this;
  23590. switch (name) {
  23591. case 'class':
  23592. util$1.restoreClass(this, defaultClassName$15, scheme$27);
  23593. break;
  23594. case 'modifier':
  23595. ModifierUtil.onModifierChanged(last, current, this, scheme$27);
  23596. break;
  23597. case 'ripple':
  23598. contentReady(this, function () {
  23599. return _this2._updateRipple();
  23600. });
  23601. break;
  23602. case 'direction':
  23603. contentReady(this, function () {
  23604. return _this2._updateDirection(current);
  23605. });
  23606. break;
  23607. case 'position':
  23608. contentReady(this, function () {
  23609. return _this2._updatePosition();
  23610. });
  23611. break;
  23612. }
  23613. }
  23614. }, {
  23615. key: 'connectedCallback',
  23616. value: function connectedCallback() {
  23617. this.addEventListener('click', this._boundOnClick, false);
  23618. }
  23619. }, {
  23620. key: 'disconnectedCallback',
  23621. value: function disconnectedCallback() {
  23622. this.removeEventListener('click', this._boundOnClick, false);
  23623. }
  23624. }, {
  23625. key: '_onClick',
  23626. value: function _onClick(e) {
  23627. if (this.onClick) {
  23628. this.onClick.apply(this);
  23629. return Promise.resolve();
  23630. } else if (!this.disabled && this.visible) {
  23631. return this.toggleItems();
  23632. }
  23633. }
  23634. }, {
  23635. key: '_show',
  23636. value: function _show() {
  23637. if (!this.inline) {
  23638. return this.show();
  23639. }
  23640. return Promise.resolve();
  23641. }
  23642. }, {
  23643. key: '_hide',
  23644. value: function _hide() {
  23645. var _this3 = this;
  23646. return new Promise(function (resolve) {
  23647. if (!_this3.inline) {
  23648. setImmediate(function () {
  23649. return _this3.hide().then(resolve);
  23650. });
  23651. } else {
  23652. resolve();
  23653. }
  23654. });
  23655. }
  23656. }, {
  23657. key: '_updateRipple',
  23658. value: function _updateRipple() {
  23659. if (this._fab) {
  23660. this.hasAttribute('ripple') ? this._fab.setAttribute('ripple', '') : this._fab.removeAttribute('ripple');
  23661. }
  23662. }
  23663. }, {
  23664. key: '_updateDirection',
  23665. value: function _updateDirection(direction) {
  23666. var children = this.items;
  23667. for (var i = 0; i < children.length; i++) {
  23668. styler(children[i], {
  23669. transitionDelay: 25 * i + 'ms',
  23670. bottom: 'auto',
  23671. right: 'auto',
  23672. top: 'auto',
  23673. left: 'auto'
  23674. });
  23675. }
  23676. switch (direction) {
  23677. case 'up':
  23678. for (var _i = 0; _i < children.length; _i++) {
  23679. children[_i].style.bottom = 72 + 56 * _i + 'px';
  23680. children[_i].style.right = '8px';
  23681. }
  23682. break;
  23683. case 'down':
  23684. for (var _i2 = 0; _i2 < children.length; _i2++) {
  23685. children[_i2].style.top = 72 + 56 * _i2 + 'px';
  23686. children[_i2].style.left = '8px';
  23687. }
  23688. break;
  23689. case 'left':
  23690. for (var _i3 = 0; _i3 < children.length; _i3++) {
  23691. children[_i3].style.top = '8px';
  23692. children[_i3].style.right = 72 + 56 * _i3 + 'px';
  23693. }
  23694. break;
  23695. case 'right':
  23696. for (var _i4 = 0; _i4 < children.length; _i4++) {
  23697. children[_i4].style.top = '8px';
  23698. children[_i4].style.left = 72 + 56 * _i4 + 'px';
  23699. }
  23700. break;
  23701. default:
  23702. util$1.throw('Argument must be one of up, down, left or right.');
  23703. }
  23704. }
  23705. }, {
  23706. key: '_updatePosition',
  23707. value: function _updatePosition() {
  23708. var position = this.getAttribute('position');
  23709. this.classList.remove('fab--top__left', 'fab--bottom__right', 'fab--bottom__left', 'fab--top__right', 'fab--top__center', 'fab--bottom__center');
  23710. switch (position) {
  23711. case 'top right':
  23712. case 'right top':
  23713. this.classList.add('fab--top__right');
  23714. break;
  23715. case 'top left':
  23716. case 'left top':
  23717. this.classList.add('fab--top__left');
  23718. break;
  23719. case 'bottom right':
  23720. case 'right bottom':
  23721. this.classList.add('fab--bottom__right');
  23722. break;
  23723. case 'bottom left':
  23724. case 'left bottom':
  23725. this.classList.add('fab--bottom__left');
  23726. break;
  23727. case 'center top':
  23728. case 'top center':
  23729. this.classList.add('fab--top__center');
  23730. break;
  23731. case 'center bottom':
  23732. case 'bottom center':
  23733. this.classList.add('fab--bottom__center');
  23734. break;
  23735. default:
  23736. break;
  23737. }
  23738. }
  23739. }, {
  23740. key: '_getTranslate',
  23741. value: function _getTranslate() {
  23742. var isBottom = (this.getAttribute('position') || '').indexOf('bottom') >= 0;
  23743. var translate = isBottom ? 'translate3d(0px, -' + (util$1.globals.fabOffset || 0) + 'px, 0px) ' : '';
  23744. return translate;
  23745. }
  23746. /**
  23747. * @method show
  23748. * @signature show()
  23749. * @description
  23750. * [en]Show the speed dial.[/en]
  23751. * [ja]Speed dialを表示します。[/ja]
  23752. */
  23753. }, {
  23754. key: 'show',
  23755. value: function show() {
  23756. this._fab.show();
  23757. styler(this, { transform: this._getTranslate });
  23758. return Promise.resolve();
  23759. }
  23760. /**
  23761. * @method hide
  23762. * @signature hide()
  23763. * @description
  23764. * [en]Hide the speed dial.[/en]
  23765. * [ja]Speed dialを非表示にします。[/ja]
  23766. */
  23767. }, {
  23768. key: 'hide',
  23769. value: function hide() {
  23770. var _this4 = this;
  23771. return this.hideItems().then(function () {
  23772. return _this4._fab.hide();
  23773. });
  23774. }
  23775. /**
  23776. * @method showItems
  23777. * @signature showItems()
  23778. * @description
  23779. * [en]Show the speed dial items.[/en]
  23780. * [ja]Speed dialの子要素を表示します。[/ja]
  23781. */
  23782. }, {
  23783. key: 'showItems',
  23784. value: function showItems() {
  23785. if (this.hasAttribute('direction')) {
  23786. this._updateDirection(this.getAttribute('direction'));
  23787. } else {
  23788. this._updateDirection('up');
  23789. }
  23790. var totalDelay = 0;
  23791. if (!this._itemShown) {
  23792. var children = this.items;
  23793. for (var i = 0; i < children.length; i++) {
  23794. var delay = 25 * i;
  23795. totalDelay += delay;
  23796. styler(children[i], {
  23797. transform: 'scale(1)',
  23798. transitionDelay: delay + 'ms'
  23799. });
  23800. }
  23801. totalDelay += 50;
  23802. this._itemShown = true;
  23803. util$1.triggerElementEvent(this, 'open');
  23804. }
  23805. var deferred = util$1.defer();
  23806. setTimeout(deferred.resolve, totalDelay);
  23807. return deferred.promise;
  23808. }
  23809. /**
  23810. * @method hideItems
  23811. * @signature hideItems()
  23812. * @description
  23813. * [en]Hide the speed dial items.[/en]
  23814. * [ja]Speed dialの子要素を非表示にします。[/ja]
  23815. */
  23816. }, {
  23817. key: 'hideItems',
  23818. value: function hideItems() {
  23819. var totalDelay = 0;
  23820. if (this._itemShown) {
  23821. var children = this.items;
  23822. for (var i = 0; i < children.length; i++) {
  23823. var delay = 25 * (children.length - i);
  23824. totalDelay += delay;
  23825. styler(children[i], {
  23826. transform: 'scale(0)',
  23827. transitionDelay: delay + 'ms'
  23828. });
  23829. }
  23830. totalDelay += 50;
  23831. this._itemShown = false;
  23832. util$1.triggerElementEvent(this, 'close');
  23833. }
  23834. var deferred = util$1.defer();
  23835. setTimeout(deferred.resolve, totalDelay);
  23836. return deferred.promise;
  23837. }
  23838. /**
  23839. * @property disabled
  23840. * @type {Boolean}
  23841. * @description
  23842. * [en]Whether the element is disabled or not.[/en]
  23843. * [ja]無効化されている場合に`true`。[/ja]
  23844. */
  23845. }, {
  23846. key: 'isOpen',
  23847. /**
  23848. * @method isOpen
  23849. * @signature isOpen()
  23850. * @description
  23851. * [en]Returns whether the menu is open or not.[/en]
  23852. * [ja][/ja]
  23853. */
  23854. value: function isOpen() {
  23855. return this._itemShown;
  23856. }
  23857. /**
  23858. * @method toggle
  23859. * @signature toggle()
  23860. * @description
  23861. * [en]Toggle visibility.[/en]
  23862. * [ja]Speed dialの表示非表示を切り替えます。[/ja]
  23863. */
  23864. }, {
  23865. key: 'toggle',
  23866. value: function toggle() {
  23867. return this.visible ? this.hide() : this.show();
  23868. }
  23869. /**
  23870. * @method toggleItems
  23871. * @signature toggleItems()
  23872. * @description
  23873. * [en]Toggle item visibility.[/en]
  23874. * [ja]Speed dialの子要素の表示非表示を切り替えます。[/ja]
  23875. */
  23876. }, {
  23877. key: 'toggleItems',
  23878. value: function toggleItems() {
  23879. return this.isOpen() ? this.hideItems() : this.showItems();
  23880. }
  23881. }, {
  23882. key: 'items',
  23883. get: function get$$1() {
  23884. return util$1.arrayFrom(this.querySelectorAll('ons-speed-dial-item'));
  23885. }
  23886. }, {
  23887. key: '_fab',
  23888. get: function get$$1() {
  23889. return util$1.findChild(this, 'ons-fab');
  23890. }
  23891. }, {
  23892. key: 'disabled',
  23893. set: function set$$1(value) {
  23894. if (value) {
  23895. this.hideItems();
  23896. }
  23897. util$1.arrayFrom(this.children).forEach(function (e) {
  23898. util$1.match(e, '.fab') && util$1.toggleAttribute(e, 'disabled', value);
  23899. });
  23900. return util$1.toggleAttribute(this, 'disabled', value);
  23901. },
  23902. get: function get$$1() {
  23903. return this.hasAttribute('disabled');
  23904. }
  23905. /**
  23906. * @property inline
  23907. * @readonly
  23908. * @type {Boolean}
  23909. * @description
  23910. * [en]Whether the element is inline or not.[/en]
  23911. * [ja]インライン要素の場合に`true`。[/ja]
  23912. */
  23913. }, {
  23914. key: 'inline',
  23915. get: function get$$1() {
  23916. return this.hasAttribute('inline');
  23917. }
  23918. /**
  23919. * @property visible
  23920. * @readonly
  23921. * @type {Boolean}
  23922. * @description
  23923. * [en]Whether the element is visible or not.[/en]
  23924. * [ja]要素が見える場合に`true`。[/ja]
  23925. */
  23926. }, {
  23927. key: 'visible',
  23928. get: function get$$1() {
  23929. return this._fab.visible && this.style.display !== 'none';
  23930. }
  23931. }], [{
  23932. key: 'observedAttributes',
  23933. get: function get$$1() {
  23934. return ['class', 'modifier', 'ripple', 'direction', 'position'];
  23935. }
  23936. }, {
  23937. key: 'events',
  23938. get: function get$$1() {
  23939. return ['open', 'close'];
  23940. }
  23941. }]);
  23942. return SpeedDialElement;
  23943. }(BaseElement);
  23944. onsElements.SpeedDial = SpeedDialElement;
  23945. customElements.define('ons-speed-dial', SpeedDialElement);
  23946. /*
  23947. Copyright 2013-2015 ASIAL CORPORATION
  23948. Licensed under the Apache License, Version 2.0 (the "License");
  23949. you may not use this file except in compliance with the License.
  23950. You may obtain a copy of the License at
  23951. http://www.apache.org/licenses/LICENSE-2.0
  23952. Unless required by applicable law or agreed to in writing, software
  23953. distributed under the License is distributed on an "AS IS" BASIS,
  23954. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23955. See the License for the specific language governing permissions and
  23956. limitations under the License.
  23957. */
  23958. var rewritables$1 = {
  23959. /**
  23960. * @param {Element} element
  23961. * @param {Function} callback
  23962. */
  23963. ready: function ready(element, callback) {
  23964. setImmediate(callback);
  23965. }
  23966. };
  23967. /**
  23968. * @element ons-splitter-content
  23969. * @category menu
  23970. * @description
  23971. * [en]
  23972. * The `<ons-splitter-content>` element is used as a child element of `<ons-splitter>`.
  23973. *
  23974. * It contains the main content of the page while `<ons-splitter-side>` contains the list.
  23975. * [/en]
  23976. * [ja]ons-splitter-content要素は、ons-splitter要素の子要素として利用します。[/ja]
  23977. * @codepen rOQOML
  23978. * @tutorial vanilla/Reference/splitter
  23979. * @guide fundamentals.html#managing-pages
  23980. * [en]Managing multiple pages.[/en]
  23981. * [ja]複数のページを管理する[/ja]
  23982. * @seealso ons-splitter
  23983. * [en]The `<ons-splitter>` component is the parent element.[/en]
  23984. * [ja]ons-splitterコンポーネント[/ja]
  23985. * @seealso ons-splitter-side
  23986. * [en]The `<ons-splitter-side>` component contains the menu.[/en]
  23987. * [ja]ons-splitter-sideコンポーネント[/ja]
  23988. * @example
  23989. * <ons-splitter>
  23990. * <ons-splitter-content>
  23991. * ...
  23992. * </ons-splitter-content>
  23993. *
  23994. * <ons-splitter-side side="left" width="80%" collapse>
  23995. * ...
  23996. * </ons-splitter-side>
  23997. * </ons-splitter>
  23998. */
  23999. var SplitterContentElement = function (_BaseElement) {
  24000. inherits(SplitterContentElement, _BaseElement);
  24001. /**
  24002. * @attribute page
  24003. * @type {String}
  24004. * @description
  24005. * [en]
  24006. * The url of the content page. If this attribute is used the content will be loaded from a `<template>` tag or a remote file.
  24007. *
  24008. * It is also possible to put `<ons-page>` element as a child of the element.
  24009. * [/en]
  24010. * [ja]ons-splitter-content要素に表示するページのURLを指定します。[/ja]
  24011. */
  24012. function SplitterContentElement() {
  24013. classCallCheck(this, SplitterContentElement);
  24014. var _this = possibleConstructorReturn(this, (SplitterContentElement.__proto__ || Object.getPrototypeOf(SplitterContentElement)).call(this));
  24015. _this._page = null;
  24016. _this._pageLoader = defaultPageLoader;
  24017. contentReady(_this, function () {
  24018. rewritables$1.ready(_this, function () {
  24019. var page = _this._getPageTarget();
  24020. if (page) {
  24021. _this.load(page);
  24022. }
  24023. });
  24024. });
  24025. return _this;
  24026. }
  24027. createClass(SplitterContentElement, [{
  24028. key: 'connectedCallback',
  24029. value: function connectedCallback() {
  24030. if (!util$1.match(this.parentNode, 'ons-splitter')) {
  24031. util$1.throw('"ons-splitter-content" must have "ons-splitter" as parent');
  24032. }
  24033. }
  24034. }, {
  24035. key: '_getPageTarget',
  24036. value: function _getPageTarget() {
  24037. return this._page || this.getAttribute('page');
  24038. }
  24039. }, {
  24040. key: 'disconnectedCallback',
  24041. value: function disconnectedCallback() {}
  24042. }, {
  24043. key: 'attributeChangedCallback',
  24044. value: function attributeChangedCallback(name, last, current) {}
  24045. /**
  24046. * @property page
  24047. * @type {HTMLElement}
  24048. * @description
  24049. * [en]The page to load in the splitter content.[/en]
  24050. * [ja]この要素内に表示するページを指定します。[/ja]
  24051. */
  24052. }, {
  24053. key: 'load',
  24054. /**
  24055. * @method load
  24056. * @signature load(page, [options])
  24057. * @param {String} page, [options]
  24058. * [en]Page URL. Can be either an HTML document or an `<template>` id.[/en]
  24059. * [ja]pageのURLか、`<template>`で宣言したテンプレートのid属性の値を指定します。[/ja]
  24060. * @param {Object} [options]
  24061. * @param {Function} [options.callback]
  24062. * @description
  24063. * [en]Show the page specified in `page` in the content.[/en]
  24064. * [ja]指定したURLをメインページを読み込みます。[/ja]
  24065. * @return {Promise}
  24066. * [en]Resolves to the new `<ons-page>` element[/en]
  24067. * [ja]`<ons-page>`要素を解決するPromiseオブジェクトを返します。[/ja]
  24068. */
  24069. value: function load(page) {
  24070. var _this2 = this;
  24071. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  24072. this._page = page;
  24073. var callback = options.callback || function () {};
  24074. return new Promise(function (resolve) {
  24075. var oldContent = _this2._content || null;
  24076. _this2._pageLoader.load({ page: page, parent: _this2 }, function (pageElement) {
  24077. if (oldContent) {
  24078. _this2._pageLoader.unload(oldContent);
  24079. oldContent = null;
  24080. }
  24081. setImmediate(function () {
  24082. return _this2._show();
  24083. });
  24084. callback(pageElement);
  24085. resolve(pageElement);
  24086. });
  24087. });
  24088. }
  24089. }, {
  24090. key: '_show',
  24091. value: function _show() {
  24092. if (this._content) {
  24093. this._content._show();
  24094. }
  24095. }
  24096. }, {
  24097. key: '_hide',
  24098. value: function _hide() {
  24099. if (this._content) {
  24100. this._content._hide();
  24101. }
  24102. }
  24103. }, {
  24104. key: '_destroy',
  24105. value: function _destroy() {
  24106. if (this._content) {
  24107. this._pageLoader.unload(this._content);
  24108. }
  24109. this.remove();
  24110. }
  24111. }, {
  24112. key: 'page',
  24113. get: function get$$1() {
  24114. return this._page;
  24115. }
  24116. /**
  24117. * @param {*} page
  24118. */
  24119. ,
  24120. set: function set$$1(page) {
  24121. this._page = page;
  24122. }
  24123. }, {
  24124. key: '_content',
  24125. get: function get$$1() {
  24126. return this.children[0];
  24127. }
  24128. /**
  24129. * @property pageLoader
  24130. * @type {Function}
  24131. * @description
  24132. * [en]Page element loaded in the splitter content.[/en]
  24133. * [ja]この要素内に表示するページを指定します。[/ja]
  24134. */
  24135. }, {
  24136. key: 'pageLoader',
  24137. get: function get$$1() {
  24138. return this._pageLoader;
  24139. },
  24140. set: function set$$1(loader) {
  24141. if (!(loader instanceof PageLoader)) {
  24142. util$1.throwPageLoader();
  24143. }
  24144. this._pageLoader = loader;
  24145. }
  24146. }], [{
  24147. key: 'observedAttributes',
  24148. get: function get$$1() {
  24149. return [];
  24150. }
  24151. }, {
  24152. key: 'rewritables',
  24153. get: function get$$1() {
  24154. return rewritables$1;
  24155. }
  24156. }]);
  24157. return SplitterContentElement;
  24158. }(BaseElement);
  24159. onsElements.SplitterContent = SplitterContentElement;
  24160. customElements.define('ons-splitter-content', SplitterContentElement);
  24161. /*
  24162. Copyright 2013-2015 ASIAL CORPORATION
  24163. Licensed under the Apache License, Version 2.0 (the "License");
  24164. you may not use this file except in compliance with the License.
  24165. You may obtain a copy of the License at
  24166. http://www.apache.org/licenses/LICENSE-2.0
  24167. Unless required by applicable law or agreed to in writing, software
  24168. distributed under the License is distributed on an "AS IS" BASIS,
  24169. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24170. See the License for the specific language governing permissions and
  24171. limitations under the License.
  24172. */
  24173. var SplitterMaskElement = function (_BaseElement) {
  24174. inherits(SplitterMaskElement, _BaseElement);
  24175. function SplitterMaskElement() {
  24176. classCallCheck(this, SplitterMaskElement);
  24177. var _this = possibleConstructorReturn(this, (SplitterMaskElement.__proto__ || Object.getPrototypeOf(SplitterMaskElement)).call(this));
  24178. _this._boundOnClick = _this._onClick.bind(_this);
  24179. contentReady(_this, function () {
  24180. if (_this.parentNode._sides.every(function (side) {
  24181. return side.mode === 'split';
  24182. })) {
  24183. _this.setAttribute('style', 'display: none !important');
  24184. }
  24185. });
  24186. return _this;
  24187. }
  24188. createClass(SplitterMaskElement, [{
  24189. key: '_onClick',
  24190. value: function _onClick(event) {
  24191. if (this.onClick instanceof Function) {
  24192. this.onClick();
  24193. } else if (util$1.match(this.parentNode, 'ons-splitter')) {
  24194. this.parentNode._sides.forEach(function (side) {
  24195. return side.close('left').catch(function () {});
  24196. });
  24197. }
  24198. event.stopPropagation();
  24199. }
  24200. }, {
  24201. key: 'attributeChangedCallback',
  24202. value: function attributeChangedCallback(name, last, current) {}
  24203. }, {
  24204. key: 'connectedCallback',
  24205. value: function connectedCallback() {
  24206. this.addEventListener('click', this._boundOnClick);
  24207. util$1.iosMaskScrollFix(this, true);
  24208. }
  24209. }, {
  24210. key: 'disconnectedCallback',
  24211. value: function disconnectedCallback() {
  24212. this.removeEventListener('click', this._boundOnClick);
  24213. util$1.iosMaskScrollFix(this, false);
  24214. }
  24215. }], [{
  24216. key: 'observedAttributes',
  24217. get: function get$$1() {
  24218. return [];
  24219. }
  24220. }]);
  24221. return SplitterMaskElement;
  24222. }(BaseElement);
  24223. onsElements.SplitterMask = SplitterMaskElement;
  24224. customElements.define('ons-splitter-mask', SplitterMaskElement);
  24225. /*
  24226. Copyright 2013-2015 ASIAL CORPORATION
  24227. Licensed under the Apache License, Version 2.0 (the "License");
  24228. you may not use this file except in compliance with the License.
  24229. You may obtain a copy of the License at
  24230. http://www.apache.org/licenses/LICENSE-2.0
  24231. Unless required by applicable law or agreed to in writing, software
  24232. distributed under the License is distributed on an "AS IS" BASIS,
  24233. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24234. See the License for the specific language governing permissions and
  24235. limitations under the License.
  24236. */
  24237. var SplitterAnimator$1 = function (_BaseAnimator) {
  24238. inherits(SplitterAnimator, _BaseAnimator);
  24239. function SplitterAnimator() {
  24240. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  24241. _ref$timing = _ref.timing,
  24242. timing = _ref$timing === undefined ? 'cubic-bezier(.1, .7, .1, 1)' : _ref$timing,
  24243. _ref$duration = _ref.duration,
  24244. duration = _ref$duration === undefined ? 0.3 : _ref$duration,
  24245. _ref$delay = _ref.delay,
  24246. delay = _ref$delay === undefined ? 0 : _ref$delay;
  24247. classCallCheck(this, SplitterAnimator);
  24248. return possibleConstructorReturn(this, (SplitterAnimator.__proto__ || Object.getPrototypeOf(SplitterAnimator)).call(this, { timing: timing, duration: duration, delay: delay }));
  24249. }
  24250. createClass(SplitterAnimator, [{
  24251. key: 'updateOptions',
  24252. value: function updateOptions() {
  24253. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  24254. util$1.extend(this, {
  24255. timing: this.timing, duration: this.duration, delay: this.delay
  24256. }, options);
  24257. }
  24258. /**
  24259. * @param {Element} sideElement
  24260. */
  24261. }, {
  24262. key: 'activate',
  24263. value: function activate(sideElement) {
  24264. var _this2 = this;
  24265. var splitter = sideElement.parentNode;
  24266. contentReady(splitter, function () {
  24267. _this2._side = sideElement;
  24268. _this2._oppositeSide = splitter.right !== sideElement && splitter.right || splitter.left !== sideElement && splitter.left;
  24269. _this2._content = splitter.content;
  24270. _this2._mask = splitter.mask;
  24271. });
  24272. }
  24273. }, {
  24274. key: 'deactivate',
  24275. value: function deactivate() {
  24276. this.clearTransition();
  24277. this._mask && this.clearMask();
  24278. this._content = this._side = this._oppositeSide = this._mask = null;
  24279. }
  24280. }, {
  24281. key: 'clearTransition',
  24282. value: function clearTransition() {
  24283. var _this3 = this;
  24284. 'side mask content'.split(/\s+/).forEach(function (e) {
  24285. return _this3['_' + e] && styler.clear(_this3['_' + e], 'transform transition');
  24286. });
  24287. }
  24288. }, {
  24289. key: 'clearMask',
  24290. value: function clearMask() {
  24291. // Check if the other side needs the mask before clearing
  24292. if (!this._oppositeSide || this._oppositeSide.mode === 'split' || !this._oppositeSide.isOpen) {
  24293. this._mask.style.opacity = '';
  24294. this._mask.style.display = 'none';
  24295. }
  24296. }
  24297. /**
  24298. * @param {Number} distance
  24299. */
  24300. }, {
  24301. key: 'translate',
  24302. value: function translate(distance) {}
  24303. /**
  24304. * @param {Function} done
  24305. */
  24306. }, {
  24307. key: 'open',
  24308. value: function open(done) {
  24309. done();
  24310. }
  24311. /**
  24312. * @param {Function} done
  24313. */
  24314. }, {
  24315. key: 'close',
  24316. value: function close(done) {
  24317. done();
  24318. }
  24319. }, {
  24320. key: 'minus',
  24321. get: function get$$1() {
  24322. return this._side.side === 'right' ? '-' : '';
  24323. }
  24324. }]);
  24325. return SplitterAnimator;
  24326. }(BaseAnimator);
  24327. /*
  24328. Copyright 2013-2015 ASIAL CORPORATION
  24329. Licensed under the Apache License, Version 2.0 (the "License");
  24330. you may not use this file except in compliance with the License.
  24331. You may obtain a copy of the License at
  24332. http://www.apache.org/licenses/LICENSE-2.0
  24333. Unless required by applicable law or agreed to in writing, software
  24334. distributed under the License is distributed on an "AS IS" BASIS,
  24335. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24336. See the License for the specific language governing permissions and
  24337. limitations under the License.
  24338. */
  24339. var OverlaySplitterAnimator = function (_SplitterAnimator) {
  24340. inherits(OverlaySplitterAnimator, _SplitterAnimator);
  24341. function OverlaySplitterAnimator() {
  24342. classCallCheck(this, OverlaySplitterAnimator);
  24343. return possibleConstructorReturn(this, (OverlaySplitterAnimator.__proto__ || Object.getPrototypeOf(OverlaySplitterAnimator)).apply(this, arguments));
  24344. }
  24345. createClass(OverlaySplitterAnimator, [{
  24346. key: 'translate',
  24347. value: function translate(distance) {
  24348. this._mask.style.display = 'block'; // Avoid content clicks
  24349. Animit(this._side).queue({
  24350. transform: 'translate3d(' + (this.minus + distance) + 'px, 0, 0)'
  24351. }).play();
  24352. }
  24353. /**
  24354. * @param {Function} done
  24355. */
  24356. }, {
  24357. key: 'open',
  24358. value: function open(done) {
  24359. Animit.runAll(Animit(this._side).wait(this.delay).queue({
  24360. transform: 'translate3d(' + this.minus + '100%, 0, 0)'
  24361. }, this.def).queue(function (callback) {
  24362. callback();
  24363. done && done();
  24364. }), Animit(this._mask).wait(this.delay).queue({
  24365. display: 'block'
  24366. }).queue({
  24367. opacity: '1'
  24368. }, {
  24369. duration: this.duration,
  24370. timing: 'linear'
  24371. }));
  24372. }
  24373. /**
  24374. * @param {Function} done
  24375. */
  24376. }, {
  24377. key: 'close',
  24378. value: function close(done) {
  24379. Animit.runAll(Animit(this._side).wait(this.delay).queue({
  24380. transform: 'translate3d(0, 0, 0)'
  24381. }, this.def).queue(function (callback) {
  24382. done && done();
  24383. callback();
  24384. }), Animit(this._mask).wait(this.delay).queue({
  24385. opacity: '0'
  24386. }, {
  24387. duration: this.duration,
  24388. timing: 'linear'
  24389. }).queue({
  24390. display: 'none'
  24391. }));
  24392. }
  24393. }]);
  24394. return OverlaySplitterAnimator;
  24395. }(SplitterAnimator$1);
  24396. /*
  24397. Copyright 2013-2015 ASIAL CORPORATION
  24398. Licensed under the Apache License, Version 2.0 (the "License");
  24399. you may not use this file except in compliance with the License.
  24400. You may obtain a copy of the License at
  24401. http://www.apache.org/licenses/LICENSE-2.0
  24402. Unless required by applicable law or agreed to in writing, software
  24403. distributed under the License is distributed on an "AS IS" BASIS,
  24404. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24405. See the License for the specific language governing permissions and
  24406. limitations under the License.
  24407. */
  24408. var PushSplitterAnimator = function (_SplitterAnimator) {
  24409. inherits(PushSplitterAnimator, _SplitterAnimator);
  24410. function PushSplitterAnimator() {
  24411. classCallCheck(this, PushSplitterAnimator);
  24412. return possibleConstructorReturn(this, (PushSplitterAnimator.__proto__ || Object.getPrototypeOf(PushSplitterAnimator)).apply(this, arguments));
  24413. }
  24414. createClass(PushSplitterAnimator, [{
  24415. key: '_getSlidingElements',
  24416. value: function _getSlidingElements() {
  24417. var slidingElements = [this._side, this._content];
  24418. if (this._oppositeSide && this._oppositeSide.mode === 'split') {
  24419. slidingElements.push(this._oppositeSide);
  24420. }
  24421. return slidingElements;
  24422. }
  24423. }, {
  24424. key: 'translate',
  24425. value: function translate(distance) {
  24426. if (!this._slidingElements) {
  24427. this._slidingElements = this._getSlidingElements();
  24428. }
  24429. this._mask.style.display = 'block'; // Avoid content clicks
  24430. Animit(this._slidingElements).queue({
  24431. transform: 'translate3d(' + (this.minus + distance) + 'px, 0, 0)'
  24432. }).play();
  24433. }
  24434. /**
  24435. * @param {Function} done
  24436. */
  24437. }, {
  24438. key: 'open',
  24439. value: function open(done) {
  24440. var _this2 = this;
  24441. var max = this._side.offsetWidth;
  24442. this._slidingElements = this._getSlidingElements();
  24443. Animit.runAll(Animit(this._slidingElements).wait(this.delay).queue({
  24444. transform: 'translate3d(' + (this.minus + max) + 'px, 0, 0)'
  24445. }, this.def).queue(function (callback) {
  24446. _this2._slidingElements = null;
  24447. callback();
  24448. done && done();
  24449. }), Animit(this._mask).wait(this.delay).queue({
  24450. display: 'block'
  24451. }));
  24452. }
  24453. /**
  24454. * @param {Function} done
  24455. */
  24456. }, {
  24457. key: 'close',
  24458. value: function close(done) {
  24459. var _this3 = this;
  24460. this._slidingElements = this._getSlidingElements();
  24461. Animit.runAll(Animit(this._slidingElements).wait(this.delay).queue({
  24462. transform: 'translate3d(0, 0, 0)'
  24463. }, this.def).queue(function (callback) {
  24464. _this3._slidingElements = null;
  24465. get(PushSplitterAnimator.prototype.__proto__ || Object.getPrototypeOf(PushSplitterAnimator.prototype), 'clearTransition', _this3).call(_this3);
  24466. done && done();
  24467. callback();
  24468. }), Animit(this._mask).wait(this.delay).queue({
  24469. display: 'none'
  24470. }));
  24471. }
  24472. }]);
  24473. return PushSplitterAnimator;
  24474. }(SplitterAnimator$1);
  24475. /*
  24476. Copyright 2013-2015 ASIAL CORPORATION
  24477. Licensed under the Apache License, Version 2.0 (the "License");
  24478. you may not use this file except in compliance with the License.
  24479. You may obtain a copy of the License at
  24480. http://www.apache.org/licenses/LICENSE-2.0
  24481. Unless required by applicable law or agreed to in writing, software
  24482. distributed under the License is distributed on an "AS IS" BASIS,
  24483. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24484. See the License for the specific language governing permissions and
  24485. limitations under the License.
  24486. */
  24487. var RevealSplitterAnimator = function (_SplitterAnimator) {
  24488. inherits(RevealSplitterAnimator, _SplitterAnimator);
  24489. function RevealSplitterAnimator() {
  24490. classCallCheck(this, RevealSplitterAnimator);
  24491. return possibleConstructorReturn(this, (RevealSplitterAnimator.__proto__ || Object.getPrototypeOf(RevealSplitterAnimator)).apply(this, arguments));
  24492. }
  24493. createClass(RevealSplitterAnimator, [{
  24494. key: '_getSlidingElements',
  24495. value: function _getSlidingElements() {
  24496. var slidingElements = [this._content, this._mask];
  24497. if (this._oppositeSide && this._oppositeSide.mode === 'split') {
  24498. slidingElements.push(this._oppositeSide);
  24499. }
  24500. return slidingElements;
  24501. }
  24502. }, {
  24503. key: 'activate',
  24504. value: function activate(sideElement) {
  24505. get(RevealSplitterAnimator.prototype.__proto__ || Object.getPrototypeOf(RevealSplitterAnimator.prototype), 'activate', this).call(this, sideElement);
  24506. if (sideElement.mode === 'collapse') {
  24507. this._setStyles(sideElement);
  24508. }
  24509. }
  24510. }, {
  24511. key: 'deactivate',
  24512. value: function deactivate() {
  24513. this._side && this._unsetStyles(this._side);
  24514. get(RevealSplitterAnimator.prototype.__proto__ || Object.getPrototypeOf(RevealSplitterAnimator.prototype), 'deactivate', this).call(this);
  24515. }
  24516. }, {
  24517. key: '_setStyles',
  24518. value: function _setStyles(sideElement) {
  24519. styler(sideElement, {
  24520. left: sideElement.side === 'right' ? 'auto' : 0,
  24521. right: sideElement.side === 'right' ? 0 : 'auto',
  24522. zIndex: 0,
  24523. backgroundColor: 'black',
  24524. transform: this._generateBehindPageStyle(0).container.transform,
  24525. display: 'none'
  24526. });
  24527. var splitter = sideElement.parentElement;
  24528. contentReady(splitter, function () {
  24529. return splitter.content && styler(splitter.content, { boxShadow: '0 0 12px 0 rgba(0, 0, 0, 0.2)' });
  24530. });
  24531. }
  24532. }, {
  24533. key: '_unsetStyles',
  24534. value: function _unsetStyles(sideElement) {
  24535. styler.clear(sideElement, 'left right zIndex backgroundColor display');
  24536. if (sideElement._content) {
  24537. sideElement._content.style.opacity = '';
  24538. }
  24539. // Check if the other side needs the common styles
  24540. if (!this._oppositeSide || this._oppositeSide.mode === 'split') {
  24541. sideElement.parentElement.content && styler.clear(sideElement.parentElement.content, 'boxShadow');
  24542. }
  24543. }
  24544. }, {
  24545. key: '_generateBehindPageStyle',
  24546. value: function _generateBehindPageStyle(distance) {
  24547. var max = this.maxWidth;
  24548. var behindDistance = (distance - max) / max * 10;
  24549. behindDistance = isNaN(behindDistance) ? 0 : Math.max(Math.min(behindDistance, 0), -10);
  24550. var behindTransform = 'translate3d(' + (this.minus ? -1 : 1) * behindDistance + '%, 0, 0)';
  24551. var opacity = 1 + behindDistance / 100;
  24552. return {
  24553. content: {
  24554. opacity: opacity
  24555. },
  24556. container: {
  24557. transform: behindTransform
  24558. }
  24559. };
  24560. }
  24561. }, {
  24562. key: 'translate',
  24563. value: function translate(distance) {
  24564. this._side.style.display = '';
  24565. this._side.style.zIndex = 1;
  24566. this.maxWidth = this.maxWidth || this._getMaxWidth();
  24567. var menuStyle = this._generateBehindPageStyle(Math.min(distance, this.maxWidth));
  24568. if (!this._slidingElements) {
  24569. this._slidingElements = this._getSlidingElements();
  24570. }
  24571. this._mask.style.display = 'block'; // Avoid content clicks
  24572. Animit.runAll(Animit(this._slidingElements).queue({
  24573. transform: 'translate3d(' + (this.minus + distance) + 'px, 0, 0)'
  24574. }), Animit(this._side._content).queue(menuStyle.content), Animit(this._side).queue(menuStyle.container));
  24575. }
  24576. /**
  24577. * @param {Function} done
  24578. */
  24579. }, {
  24580. key: 'open',
  24581. value: function open(done) {
  24582. var _this2 = this;
  24583. this._side.style.display = '';
  24584. this._side.style.zIndex = 1;
  24585. this.maxWidth = this.maxWidth || this._getMaxWidth();
  24586. var menuStyle = this._generateBehindPageStyle(this.maxWidth);
  24587. this._slidingElements = this._getSlidingElements();
  24588. setTimeout(function () {
  24589. // Fix: Time to update previous translate3d after changing style.display
  24590. Animit.runAll(Animit(_this2._slidingElements).wait(_this2.delay).queue({
  24591. transform: 'translate3d(' + (_this2.minus + _this2.maxWidth) + 'px, 0, 0)'
  24592. }, _this2.def), Animit(_this2._mask).wait(_this2.delay).queue({
  24593. display: 'block'
  24594. }), Animit(_this2._side._content).wait(_this2.delay).queue(menuStyle.content, _this2.def), Animit(_this2._side).wait(_this2.delay).queue(menuStyle.container, _this2.def).queue(function (callback) {
  24595. _this2._slidingElements = null;
  24596. callback();
  24597. done && done();
  24598. }));
  24599. }, 1000 / 60);
  24600. }
  24601. /**
  24602. * @param {Function} done
  24603. */
  24604. }, {
  24605. key: 'close',
  24606. value: function close(done) {
  24607. var _this3 = this;
  24608. var menuStyle = this._generateBehindPageStyle(0);
  24609. this._slidingElements = this._getSlidingElements();
  24610. Animit.runAll(Animit(this._slidingElements).wait(this.delay).queue({
  24611. transform: 'translate3d(0, 0, 0)'
  24612. }, this.def), Animit(this._mask).wait(this.delay).queue({
  24613. display: 'none'
  24614. }), Animit(this._side._content).wait(this.delay).queue(menuStyle.content, this.def), Animit(this._side).wait(this.delay).queue(menuStyle.container, this.def).queue(function (callback) {
  24615. _this3._slidingElements = null;
  24616. _this3._side.style.zIndex = 0;
  24617. _this3._side.style.display = 'none';
  24618. _this3._side._content.style.opacity = '';
  24619. done && done();
  24620. callback();
  24621. }));
  24622. }
  24623. }, {
  24624. key: '_getMaxWidth',
  24625. value: function _getMaxWidth() {
  24626. return this._side.offsetWidth;
  24627. }
  24628. }]);
  24629. return RevealSplitterAnimator;
  24630. }(SplitterAnimator$1);
  24631. /*
  24632. Copyright 2013-2015 ASIAL CORPORATION
  24633. Licensed under the Apache License, Version 2.0 (the "License");
  24634. you may not use this file except in compliance with the License.
  24635. You may obtain a copy of the License at
  24636. http://www.apache.org/licenses/LICENSE-2.0
  24637. Unless required by applicable law or agreed to in writing, software
  24638. distributed under the License is distributed on an "AS IS" BASIS,
  24639. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24640. See the License for the specific language governing permissions and
  24641. limitations under the License.
  24642. */
  24643. var _animatorDict$7 = {
  24644. default: OverlaySplitterAnimator,
  24645. overlay: OverlaySplitterAnimator,
  24646. push: PushSplitterAnimator,
  24647. reveal: RevealSplitterAnimator
  24648. };
  24649. /**
  24650. * @element ons-splitter
  24651. * @category menu
  24652. * @description
  24653. * [en]
  24654. * A component that enables responsive layout by implementing both a two-column layout and a sliding menu layout.
  24655. *
  24656. * It can be configured to automatically expand into a column layout on large screens and collapse the menu on smaller screens. When the menu is collapsed the user can open it by swiping.
  24657. * [/en]
  24658. * [ja][/ja]
  24659. * @codepen rOQOML
  24660. * @tutorial vanilla/Reference/splitter
  24661. * @guide fundamentals.html#managing-pages
  24662. * [en]Managing multiple pages.[/en]
  24663. * [ja]複数のページを管理する[/ja]
  24664. * @seealso ons-splitter-content
  24665. * [en]The `<ons-splitter-content>` component contains the main content of the page.[/en]
  24666. * [ja]ons-splitter-contentコンポーネント[/ja]
  24667. * @seealso ons-splitter-side
  24668. * [en]The `<ons-splitter-side>` component contains the menu.[/en]
  24669. * [ja]ons-splitter-sideコンポーネント[/ja]
  24670. * @example
  24671. * <ons-splitter id="splitter">
  24672. * <ons-splitter-content>
  24673. * ...
  24674. * </ons-splitter-content>
  24675. *
  24676. * <ons-splitter-side side="left" width="80%" collapse swipeable>
  24677. * ...
  24678. * </ons-splitter-side>
  24679. * </ons-splitter>
  24680. *
  24681. * <script>
  24682. * var splitter = document.getElementById('splitter');
  24683. * splitter.left.open();
  24684. * </script>
  24685. */
  24686. var SplitterElement = function (_BaseElement) {
  24687. inherits(SplitterElement, _BaseElement);
  24688. createClass(SplitterElement, [{
  24689. key: '_getSide',
  24690. value: function _getSide(side) {
  24691. var element = util$1.findChild(this, function (e) {
  24692. return util$1.match(e, 'ons-splitter-side') && e.getAttribute('side') === side;
  24693. });
  24694. return element;
  24695. }
  24696. /**
  24697. * @property left
  24698. * @readonly
  24699. * @type {HTMLElement}
  24700. * @description
  24701. * [en]Left `<ons-splitter-side>` element.[/en]
  24702. * [ja][/ja]
  24703. */
  24704. }, {
  24705. key: '_onDeviceBackButton',
  24706. value: function _onDeviceBackButton(event) {
  24707. this._sides.some(function (s) {
  24708. return s.isOpen ? s.close() : false;
  24709. }) || event.callParentHandler();
  24710. }
  24711. }, {
  24712. key: '_onModeChange',
  24713. value: function _onModeChange(e) {
  24714. var _this2 = this;
  24715. if (e.target.parentNode) {
  24716. contentReady(this, function () {
  24717. _this2._layout();
  24718. });
  24719. }
  24720. }
  24721. }, {
  24722. key: '_layout',
  24723. value: function _layout() {
  24724. var _this3 = this;
  24725. this._sides.forEach(function (side) {
  24726. if (_this3.content) {
  24727. _this3.content.style[side.side] = side.mode === 'split' ? side.style.width : 0;
  24728. }
  24729. });
  24730. }
  24731. }, {
  24732. key: 'left',
  24733. get: function get$$1() {
  24734. return this._getSide('left');
  24735. }
  24736. /**
  24737. * @property right
  24738. * @readonly
  24739. * @type {HTMLElement}
  24740. * @description
  24741. * [en]Right `<ons-splitter-side>` element.[/en]
  24742. * [ja][/ja]
  24743. */
  24744. }, {
  24745. key: 'right',
  24746. get: function get$$1() {
  24747. return this._getSide('right');
  24748. }
  24749. /**
  24750. * @property side
  24751. * @readonly
  24752. * @type {HTMLElement}
  24753. * @description
  24754. * [en]First `<ons-splitter-side>` element regardless the actual side.[/en]
  24755. * [ja][/ja]
  24756. */
  24757. }, {
  24758. key: 'side',
  24759. get: function get$$1() {
  24760. return util$1.findChild(this, 'ons-splitter-side');
  24761. }
  24762. }, {
  24763. key: '_sides',
  24764. get: function get$$1() {
  24765. return [this.left, this.right].filter(function (e) {
  24766. return e;
  24767. });
  24768. }
  24769. /**
  24770. * @property content
  24771. * @readonly
  24772. * @type {HTMLElement}
  24773. * @description
  24774. * [en]The `<ons-splitter-content>` element.[/en]
  24775. * [ja][/ja]
  24776. */
  24777. }, {
  24778. key: 'content',
  24779. get: function get$$1() {
  24780. return util$1.findChild(this, 'ons-splitter-content');
  24781. }
  24782. }, {
  24783. key: 'topPage',
  24784. get: function get$$1() {
  24785. return this.content._content;
  24786. }
  24787. }, {
  24788. key: 'mask',
  24789. get: function get$$1() {
  24790. return util$1.findChild(this, 'ons-splitter-mask');
  24791. }
  24792. /**
  24793. * @property onDeviceBackButton
  24794. * @type {Object}
  24795. * @description
  24796. * [en]Back-button handler.[/en]
  24797. * [ja]バックボタンハンドラ。[/ja]
  24798. */
  24799. }, {
  24800. key: 'onDeviceBackButton',
  24801. get: function get$$1() {
  24802. return this._backButtonHandler;
  24803. },
  24804. set: function set$$1(callback) {
  24805. if (this._backButtonHandler) {
  24806. this._backButtonHandler.destroy();
  24807. }
  24808. this._backButtonHandler = deviceBackButtonDispatcher.createHandler(this, callback);
  24809. }
  24810. }]);
  24811. function SplitterElement() {
  24812. classCallCheck(this, SplitterElement);
  24813. var _this = possibleConstructorReturn(this, (SplitterElement.__proto__ || Object.getPrototypeOf(SplitterElement)).call(this));
  24814. _this._onModeChange = _this._onModeChange.bind(_this);
  24815. contentReady(_this, function () {
  24816. !_this.mask && _this.appendChild(document.createElement('ons-splitter-mask'));
  24817. _this._layout();
  24818. });
  24819. return _this;
  24820. }
  24821. createClass(SplitterElement, [{
  24822. key: 'connectedCallback',
  24823. value: function connectedCallback() {
  24824. this.onDeviceBackButton = this._onDeviceBackButton.bind(this);
  24825. this.addEventListener('modechange', this._onModeChange, false);
  24826. }
  24827. }, {
  24828. key: 'disconnectedCallback',
  24829. value: function disconnectedCallback() {
  24830. this._backButtonHandler.destroy();
  24831. this._backButtonHandler = null;
  24832. this.removeEventListener('modechange', this._onModeChange, false);
  24833. }
  24834. }, {
  24835. key: 'attributeChangedCallback',
  24836. value: function attributeChangedCallback(name, last, current) {}
  24837. }, {
  24838. key: '_show',
  24839. value: function _show() {
  24840. util$1.propagateAction(this, '_show');
  24841. }
  24842. }, {
  24843. key: '_hide',
  24844. value: function _hide() {
  24845. util$1.propagateAction(this, '_hide');
  24846. }
  24847. }, {
  24848. key: '_destroy',
  24849. value: function _destroy() {
  24850. util$1.propagateAction(this, '_destroy');
  24851. this.remove();
  24852. }
  24853. }], [{
  24854. key: 'registerAnimator',
  24855. value: function registerAnimator(name, Animator) {
  24856. if (!(Animator instanceof SplitterAnimator)) {
  24857. util$1.throwAnimator('Splitter');
  24858. }
  24859. _animatorDict$7[name] = Animator;
  24860. }
  24861. }, {
  24862. key: 'SplitterAnimator',
  24863. get: function get$$1() {
  24864. return SplitterAnimator;
  24865. }
  24866. }, {
  24867. key: 'animators',
  24868. get: function get$$1() {
  24869. return _animatorDict$7;
  24870. }
  24871. }]);
  24872. return SplitterElement;
  24873. }(BaseElement);
  24874. onsElements.Splitter = SplitterElement;
  24875. customElements.define('ons-splitter', SplitterElement);
  24876. /*
  24877. Copyright 2013-2015 ASIAL CORPORATION
  24878. Licensed under the Apache License, Version 2.0 (the "License");
  24879. you may not use this file except in compliance with the License.
  24880. You may obtain a copy of the License at
  24881. http://www.apache.org/licenses/LICENSE-2.0
  24882. Unless required by applicable law or agreed to in writing, software
  24883. distributed under the License is distributed on an "AS IS" BASIS,
  24884. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24885. See the License for the specific language governing permissions and
  24886. limitations under the License.
  24887. */
  24888. var SPLIT_MODE = 'split';
  24889. var COLLAPSE_MODE = 'collapse';
  24890. var CLOSED_STATE = 'closed';
  24891. var OPEN_STATE = 'open';
  24892. var CHANGING_STATE = 'changing';
  24893. var rewritables$2 = {
  24894. /**
  24895. * @param {Element} splitterSideElement
  24896. * @param {Function} callback
  24897. */
  24898. ready: function ready(splitterSideElement, callback) {
  24899. setImmediate(callback);
  24900. }
  24901. };
  24902. var CollapseDetection = function () {
  24903. function CollapseDetection(element, target) {
  24904. classCallCheck(this, CollapseDetection);
  24905. this._element = element;
  24906. this._onChange = this._onChange.bind(this);
  24907. target && this.changeTarget(target);
  24908. }
  24909. createClass(CollapseDetection, [{
  24910. key: 'changeTarget',
  24911. value: function changeTarget(target) {
  24912. this.disable();
  24913. this._target = target;
  24914. if (target) {
  24915. this._orientation = ['portrait', 'landscape'].indexOf(target) !== -1;
  24916. this.activate();
  24917. }
  24918. }
  24919. }, {
  24920. key: '_match',
  24921. value: function _match(value) {
  24922. if (this._orientation) {
  24923. return this._target === (value.isPortrait ? 'portrait' : 'landscape');
  24924. }
  24925. return value.matches;
  24926. }
  24927. }, {
  24928. key: '_onChange',
  24929. value: function _onChange(value) {
  24930. this._element._updateMode(this._match(value) ? COLLAPSE_MODE : SPLIT_MODE);
  24931. }
  24932. }, {
  24933. key: 'activate',
  24934. value: function activate() {
  24935. if (this._orientation) {
  24936. orientation.on('change', this._onChange);
  24937. this._onChange({ isPortrait: orientation.isPortrait() });
  24938. } else {
  24939. this._queryResult = window.matchMedia(this._target);
  24940. this._queryResult.addListener(this._onChange);
  24941. this._onChange(this._queryResult);
  24942. }
  24943. }
  24944. }, {
  24945. key: 'disable',
  24946. value: function disable() {
  24947. if (this._orientation) {
  24948. orientation.off('change', this._onChange);
  24949. } else if (this._queryResult) {
  24950. this._queryResult.removeListener(this._onChange);
  24951. this._queryResult = null;
  24952. }
  24953. }
  24954. }]);
  24955. return CollapseDetection;
  24956. }();
  24957. /**
  24958. * @element ons-splitter-side
  24959. * @category menu
  24960. * @description
  24961. * [en]
  24962. * The `<ons-splitter-side>` element is used as a child element of `<ons-splitter>`.
  24963. *
  24964. * It will be displayed on either the left or right side of the `<ons-splitter-content>` element.
  24965. *
  24966. * It supports two modes: collapsed and split. When it's in collapsed mode it will be hidden from view and can be displayed when the user swipes the screen or taps a button. In split mode the element is always shown. It can be configured to automatically switch between the two modes depending on the screen size.
  24967. * [/en]
  24968. * [ja]ons-splitter-side要素は、ons-splitter要素の子要素として利用します。[/ja]
  24969. * @codepen rOQOML
  24970. * @tutorial vanilla/Reference/splitter
  24971. * @guide fundamentals.html#managing-pages
  24972. * [en]Managing multiple pages.[/en]
  24973. * [ja]複数のページを管理する[/ja]
  24974. * @seealso ons-splitter
  24975. * [en]The `<ons-splitter>` is the parent component.[/en]
  24976. * [ja]ons-splitterコンポーネント[/ja]
  24977. * @seealso ons-splitter-content
  24978. * [en]The `<ons-splitter-content>` component contains the main content of the page.[/en]
  24979. * [ja]ons-splitter-contentコンポーネント[/ja]
  24980. * @example
  24981. * <ons-splitter>
  24982. * <ons-splitter-content>
  24983. * ...
  24984. * </ons-splitter-content>
  24985. *
  24986. * <ons-splitter-side side="left" width="80%" collapse>
  24987. * ...
  24988. * </ons-splitter-side>
  24989. * </ons-splitter>
  24990. */
  24991. var SplitterSideElement = function (_BaseElement) {
  24992. inherits(SplitterSideElement, _BaseElement);
  24993. /**
  24994. * @event modechange
  24995. * @description
  24996. * [en]Fired just after the component's mode changes.[/en]
  24997. * [ja]この要素のモードが変化した際に発火します。[/ja]
  24998. * @param {Object} event
  24999. * [en]Event object.[/en]
  25000. * [ja]イベントオブジェクトです。[/ja]
  25001. * @param {Object} event.side
  25002. * [en]Component object.[/en]
  25003. * [ja]コンポーネントのオブジェクト。[/ja]
  25004. * @param {String} event.mode
  25005. * [en]Returns the current mode. Can be either `"collapse"` or `"split"`.[/en]
  25006. * [ja]現在のモードを返します。[/ja]
  25007. */
  25008. /**
  25009. * @event preopen
  25010. * @description
  25011. * [en]Fired just before the sliding menu is opened.[/en]
  25012. * [ja]スライディングメニューが開く前に発火します。[/ja]
  25013. * @param {Object} event
  25014. * [en]Event object.[/en]
  25015. * [ja]イベントオブジェクトです。[/ja]
  25016. * @param {Function} event.cancel
  25017. * [en]Call to cancel opening sliding menu.[/en]
  25018. * [ja]スライディングメニューが開くのをキャンセルします。[/ja]
  25019. * @param {Object} event.side
  25020. * [en]Component object.[/en]
  25021. * [ja]コンポーネントのオブジェクト。[/ja]
  25022. */
  25023. /**
  25024. * @event postopen
  25025. * @description
  25026. * [en]Fired just after the sliding menu is opened.[/en]
  25027. * [ja]スライディングメニューが開いた後に発火します。[/ja]
  25028. * @param {Object} event
  25029. * [en]Event object.[/en]
  25030. * [ja]イベントオブジェクトです。[/ja]
  25031. * @param {Object} event.side
  25032. * [en]Component object.[/en]
  25033. * [ja]コンポーネントのオブジェクト。[/ja]
  25034. */
  25035. /**
  25036. * @event preclose
  25037. * @description
  25038. * [en]Fired just before the sliding menu is closed.[/en]
  25039. * [ja]スライディングメニューが閉じる前に発火します。[/ja]
  25040. * @param {Object} event
  25041. * [en]Event object.[/en]
  25042. * [ja]イベントオブジェクトです。[/ja]
  25043. * @param {Object} event.side
  25044. * [en]Component object.[/en]
  25045. * [ja]コンポーネントのオブジェクト。[/ja]
  25046. * @param {Function} event.cancel
  25047. * [en]Call to cancel opening sliding-menu.[/en]
  25048. * [ja]スライディングメニューが閉じるのをキャンセルします。[/ja]
  25049. */
  25050. /**
  25051. * @event postclose
  25052. * @description
  25053. * [en]Fired just after the sliding menu is closed.[/en]
  25054. * [ja]スライディングメニューが閉じた後に発火します。[/ja]
  25055. * @param {Object} event
  25056. * [en]Event object.[/en]
  25057. * [ja]イベントオブジェクトです。[/ja]
  25058. * @param {Object} event.side
  25059. * [en]Component object.[/en]
  25060. * [ja]コンポーネントのオブジェクト。[/ja]
  25061. */
  25062. /**
  25063. * @attribute animation
  25064. * @type {String}
  25065. * @default default
  25066. * @description
  25067. * [en]Specify the animation. Use one of `overlay`, `push`, `reveal` or `default`.[/en]
  25068. * [ja]アニメーションを指定します。"overlay", "push", "reveal", "default"のいずれかを指定できます。[/ja]
  25069. */
  25070. /**
  25071. * @attribute animation-options
  25072. * @type {Expression}
  25073. * @description
  25074. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  25075. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. {duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  25076. */
  25077. /**
  25078. * @attribute open-threshold
  25079. * @type {Number}
  25080. * @default 0.3
  25081. * @description
  25082. * [en]Specify how much the menu needs to be swiped before opening. A value between `0` and `1`.[/en]
  25083. * [ja]どのくらいスワイプすればスライディングメニューを開くかどうかの割合を指定します。0から1の間の数値を指定します。スワイプの距離がここで指定した数値掛けるこの要素の幅よりも大きければ、スワイプが終わった時にこの要素を開きます。デフォルトは0.3です。[/ja]
  25084. */
  25085. /**
  25086. * @attribute collapse
  25087. * @type {String}
  25088. * @description
  25089. * [en]
  25090. * Specify the collapse behavior. Valid values are `"portrait"`, `"landscape"` or a media query.
  25091. * The strings `"portrait"` and `"landscape"` means the view will collapse when device is in landscape or portrait orientation.
  25092. * If the value is a media query, the view will collapse when the media query resolves to `true`.
  25093. * If the value is not defined, the view always be in `"collapse"` mode.
  25094. * [/en]
  25095. * [ja]
  25096. * 左側のページを非表示にする条件を指定します。portrait, landscape、width #pxもしくはメディアクエリの指定が可能です。
  25097. * portraitもしくはlandscapeを指定すると、デバイスの画面が縦向きもしくは横向きになった時に適用されます。
  25098. * メディアクエリを指定すると、指定したクエリに適合している場合に適用されます。
  25099. * 値に何も指定しない場合には、常にcollapseモードになります。
  25100. * [/ja]
  25101. */
  25102. /**
  25103. * @attribute swipe-target-width
  25104. * @type {String}
  25105. * @description
  25106. * [en]The width of swipeable area calculated from the edge (in pixels). Use this to enable swipe only when the finger touch on the screen edge.[/en]
  25107. * [ja]スワイプの判定領域をピクセル単位で指定します。画面の端から指定した距離に達するとページが表示されます。[/ja]
  25108. */
  25109. /**
  25110. * @attribute width
  25111. * @type {String}
  25112. * @description
  25113. * [en]Can be specified in either pixels or as a percentage, e.g. `90%` or `200px`.[/en]
  25114. * [ja]この要素の横幅を指定します。pxと%での指定が可能です。eg. 90%, 200px[/ja]
  25115. */
  25116. /**
  25117. * @attribute side
  25118. * @type {String}
  25119. * @default left
  25120. * @description
  25121. * [en]Specify which side of the screen the `<ons-splitter-side>` element is located. Possible values are `"left"` and `"right"`.[/en]
  25122. * [ja]この要素が左か右かを指定します。指定できる値は"left"か"right"のみです。[/ja]
  25123. */
  25124. /**
  25125. * @attribute mode
  25126. * @type {String}
  25127. * @description
  25128. * [en]Current mode. Possible values are `"collapse"` or `"split"`. This attribute is read only.[/en]
  25129. * [ja]現在のモードが設定されます。"collapse"もしくは"split"が指定されます。この属性は読み込み専用です。[/ja]
  25130. */
  25131. /**
  25132. * @attribute page
  25133. * @initonly
  25134. * @type {String}
  25135. * @description
  25136. * [en]The URL of the menu page.[/en]
  25137. * [ja]ons-splitter-side要素に表示するページのURLを指定します。[/ja]
  25138. */
  25139. /**
  25140. * @attribute swipeable
  25141. * @type {Boolean}
  25142. * @description
  25143. * [en]Whether to enable swipe interaction on collapse mode.[/en]
  25144. * [ja]collapseモード時にスワイプ操作を有効にする場合に指定します。[/ja]
  25145. */
  25146. function SplitterSideElement() {
  25147. classCallCheck(this, SplitterSideElement);
  25148. var _this = possibleConstructorReturn(this, (SplitterSideElement.__proto__ || Object.getPrototypeOf(SplitterSideElement)).call(this));
  25149. _this._page = null;
  25150. _this._state = CLOSED_STATE;
  25151. _this._lock = new DoorLock();
  25152. _this._pageLoader = defaultPageLoader;
  25153. _this._collapseDetection = new CollapseDetection(_this);
  25154. _this._animatorFactory = new AnimatorFactory({
  25155. animators: SplitterElement.animators,
  25156. baseClass: SplitterAnimator$1,
  25157. baseClassName: 'SplitterAnimator',
  25158. defaultAnimation: _this.getAttribute('animation')
  25159. });
  25160. contentReady(_this, function () {
  25161. // These attributes are used early by the parent element
  25162. _this.attributeChangedCallback('width');
  25163. if (!_this.hasAttribute('side')) {
  25164. _this.setAttribute('side', 'left');
  25165. }
  25166. rewritables$2.ready(_this, function () {
  25167. var page = _this._page || _this.getAttribute('page');
  25168. page && _this.load(page);
  25169. });
  25170. });
  25171. return _this;
  25172. }
  25173. createClass(SplitterSideElement, [{
  25174. key: 'connectedCallback',
  25175. value: function connectedCallback() {
  25176. var _this2 = this;
  25177. if (!util$1.match(this.parentNode, 'ons-splitter')) {
  25178. util$1.throw('Parent must be an ons-splitter element');
  25179. }
  25180. this._swipe = new SwipeReveal({
  25181. element: this,
  25182. elementHandler: this.parentElement,
  25183. swipeMax: function swipeMax() {
  25184. _this2._onSwipe && _this2._onSwipe(1, _this2._animationOpt);
  25185. _this2.open();
  25186. },
  25187. swipeMid: function swipeMid(distance, width) {
  25188. _this2._onSwipe && _this2._onSwipe(distance / width);
  25189. _this2._animator.translate(distance);
  25190. },
  25191. swipeMin: function swipeMin() {
  25192. _this2._onSwipe && _this2._onSwipe(0, _this2._animationOpt);
  25193. _this2.close();
  25194. },
  25195. getThreshold: function getThreshold() {
  25196. return Math.max(0, Math.min(1, parseFloat(_this2.getAttribute('open-threshold')) || 0.3));
  25197. },
  25198. getSide: function getSide() {
  25199. return _this2.side;
  25200. },
  25201. isInitialState: function isInitialState() {
  25202. var closed = _this2._state === CLOSED_STATE;
  25203. _this2._state = CHANGING_STATE;
  25204. return closed;
  25205. },
  25206. ignoreSwipe: function ignoreSwipe(event, distance) {
  25207. var isOpen = _this2.isOpen;
  25208. var validDrag = function validDrag(d) {
  25209. return _this2.side === 'left' ? d === 'left' && isOpen || d === 'right' && !isOpen : d === 'left' && !isOpen || d === 'right' && isOpen;
  25210. };
  25211. var area = Math.max(0, parseInt(_this2.getAttribute('swipe-target-width'), 10) || 0);
  25212. return _this2._mode === SPLIT_MODE || _this2._lock.isLocked() || _this2._isOtherSideOpen() || !validDrag(event.gesture.direction) || !isOpen && area !== 0 && distance > area;
  25213. }
  25214. });
  25215. this.attributeChangedCallback('swipeable');
  25216. contentReady(this, function () {
  25217. _this2.constructor.observedAttributes.forEach(function (attr) {
  25218. return _this2.attributeChangedCallback(attr, null, _this2.getAttribute(attr));
  25219. });
  25220. });
  25221. }
  25222. }, {
  25223. key: 'disconnectedCallback',
  25224. value: function disconnectedCallback() {
  25225. this._swipe && this._swipe.dispose();
  25226. this._animator = this._animationOpt = this._swipe = null;
  25227. }
  25228. }, {
  25229. key: 'attributeChangedCallback',
  25230. value: function attributeChangedCallback(name, last, current) {
  25231. switch (name) {
  25232. case 'swipeable':
  25233. this._swipe && this._swipe.update();
  25234. break;
  25235. case 'width':
  25236. current = this.getAttribute('width'); // Sometimes undefined. CE bug?
  25237. this.style.width = /^\d+(px|%)$/.test(current) ? current : '80%';
  25238. break;
  25239. default:
  25240. this[util$1.camelize('_update-' + name)](current);
  25241. }
  25242. }
  25243. }, {
  25244. key: '_emitEvent',
  25245. value: function _emitEvent(name) {
  25246. if (name.slice(0, 3) !== 'pre') {
  25247. return util$1.triggerElementEvent(this, name, { side: this });
  25248. }
  25249. var isCanceled = false;
  25250. util$1.triggerElementEvent(this, name, {
  25251. side: this,
  25252. cancel: function cancel() {
  25253. return isCanceled = true;
  25254. }
  25255. });
  25256. return isCanceled;
  25257. }
  25258. }, {
  25259. key: '_isOtherSideOpen',
  25260. value: function _isOtherSideOpen() {
  25261. var _this3 = this;
  25262. return !!util$1.findChild(this.parentElement, function (el) {
  25263. return el instanceof _this3.constructor && el !== _this3 && el._mode === COLLAPSE_MODE && el.isOpen;
  25264. });
  25265. }
  25266. }, {
  25267. key: '_updateCollapse',
  25268. value: function _updateCollapse() {
  25269. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('collapse');
  25270. if (value === null || value === 'split') {
  25271. this._collapseDetection.disable();
  25272. return this._updateMode(SPLIT_MODE);
  25273. }
  25274. if (value === '' || value === 'collapse') {
  25275. this._collapseDetection.disable();
  25276. return this._updateMode(COLLAPSE_MODE);
  25277. }
  25278. this._collapseDetection.changeTarget(value);
  25279. }
  25280. }, {
  25281. key: '_updateMode',
  25282. value: function _updateMode(mode) {
  25283. if (mode !== this._mode) {
  25284. this._mode = mode;
  25285. this.setAttribute('mode', mode); // readonly attribute for the users
  25286. if (mode === SPLIT_MODE) {
  25287. this._animator && this._animator.deactivate();
  25288. this._state = CLOSED_STATE;
  25289. } else {
  25290. this._animator && this._animator.activate(this);
  25291. this._state === OPEN_STATE && this._animator.open();
  25292. }
  25293. util$1.triggerElementEvent(this, 'modechange', { side: this, mode: mode });
  25294. }
  25295. }
  25296. }, {
  25297. key: '_updateAnimation',
  25298. value: function _updateAnimation() {
  25299. var animation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('animation');
  25300. if (this.parentNode) {
  25301. this._animator && this._animator.deactivate();
  25302. this._animator = this._animatorFactory.newAnimator({ animation: animation });
  25303. this._animator.activate(this);
  25304. this._animationOpt = {
  25305. timing: this._animator.duration,
  25306. duration: this._animator.duration
  25307. };
  25308. }
  25309. }
  25310. }, {
  25311. key: '_updateAnimationOptions',
  25312. value: function _updateAnimationOptions() {
  25313. var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('animation-options');
  25314. this._animator.updateOptions(AnimatorFactory.parseAnimationOptionsString(value));
  25315. }
  25316. /**
  25317. * @property page
  25318. * @type {*}
  25319. * @description
  25320. * [en]Page location to load in the splitter side.[/en]
  25321. * [ja]この要素内に表示するページを指定します。[/ja]
  25322. */
  25323. }, {
  25324. key: 'open',
  25325. /**
  25326. * @method open
  25327. * @signature open([options])
  25328. * @param {Object} [options]
  25329. * [en]Parameter object.[/en]
  25330. * [ja]オプションを指定するオブジェクト。[/ja]
  25331. * @param {Function} [options.callback]
  25332. * [en]This function will be called after the menu has been opened.[/en]
  25333. * [ja]メニューが開いた後に呼び出される関数オブジェクトを指定します。[/ja]
  25334. * @description
  25335. * [en]Open menu in collapse mode.[/en]
  25336. * [ja]collapseモードになっているons-splitter-side要素を開きます。[/ja]
  25337. * @return {Promise}
  25338. * [en]Resolves to the splitter side element or false if not in collapse mode[/en]
  25339. * [ja][/ja]
  25340. */
  25341. value: function open(options) {
  25342. return this.toggle(options, true);
  25343. }
  25344. /**
  25345. * @method close
  25346. * @signature close([options])
  25347. * @param {Object} [options]
  25348. * [en]Parameter object.[/en]
  25349. * [ja]オプションを指定するオブジェクト。[/ja]
  25350. * @param {Function} [options.callback]
  25351. * [en]This function will be called after the menu has been closed.[/en]
  25352. * [ja]メニューが閉じた後に呼び出される関数オブジェクトを指定します。[/ja]
  25353. * @description
  25354. * [en]Close menu in collapse mode.[/en]
  25355. * [ja]collapseモードになっているons-splitter-side要素を閉じます。[/ja]
  25356. * @return {Promise}
  25357. * [en]Resolves to the splitter side element or false if not in collapse mode[/en]
  25358. * [ja][/ja]
  25359. */
  25360. }, {
  25361. key: 'close',
  25362. value: function close(options) {
  25363. return this.toggle(options, false);
  25364. }
  25365. /**
  25366. * @method toggle
  25367. * @signature toggle([options])
  25368. * @param {Object} [options]
  25369. * @description
  25370. * [en]Opens if it's closed. Closes if it's open.[/en]
  25371. * [ja]開けている場合は要素を閉じますそして開けている場合は要素を開きます。[/ja]
  25372. * @return {Promise}
  25373. * [en]Resolves to the splitter side element or false if not in collapse mode[/en]
  25374. * [ja][/ja]
  25375. */
  25376. }, {
  25377. key: 'toggle',
  25378. value: function toggle() {
  25379. var _this4 = this;
  25380. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25381. var force = arguments[1];
  25382. var shouldOpen = typeof force === 'boolean' ? force : !this.isOpen;
  25383. var action = shouldOpen ? 'open' : 'close';
  25384. var FINAL_STATE = shouldOpen ? OPEN_STATE : CLOSED_STATE;
  25385. if (this._mode === SPLIT_MODE) {
  25386. return Promise.resolve(false);
  25387. }
  25388. if (this._state === FINAL_STATE) {
  25389. return Promise.resolve(this);
  25390. }
  25391. if (this._lock.isLocked()) {
  25392. return Promise.reject('Another splitter-side action is already running.');
  25393. }
  25394. if (shouldOpen && this._isOtherSideOpen()) {
  25395. return Promise.reject('Another menu is already open.');
  25396. }
  25397. if (this._emitEvent('pre' + action)) {
  25398. return Promise.reject('Canceled in pre' + action + ' event.');
  25399. }
  25400. var unlock = this._lock.lock();
  25401. this._state = CHANGING_STATE;
  25402. if (options.animation) {
  25403. this._updateAnimation(options.animation);
  25404. }
  25405. return new Promise(function (resolve) {
  25406. _this4._animator[action](function () {
  25407. util$1.iosPageScrollFix(shouldOpen);
  25408. _this4._state = FINAL_STATE;
  25409. unlock();
  25410. _this4._emitEvent('post' + action);
  25411. options.callback instanceof Function && options.callback(_this4);
  25412. resolve(_this4);
  25413. });
  25414. });
  25415. }
  25416. /**
  25417. * @method load
  25418. * @signature load(page, [options])
  25419. * @param {String} page
  25420. * [en]Page URL. Can be either an HTML document or a `<template>`.[/en]
  25421. * [ja]pageのURLか、`<template>`で宣言したテンプレートのid属性の値を指定します。[/ja]
  25422. * @param {Object} [options]
  25423. * @param {Function} [options.callback]
  25424. * @description
  25425. * [en]Show the page specified in pageUrl in the right section[/en]
  25426. * [ja]指定したURLをメインページを読み込みます。[/ja]
  25427. * @return {Promise}
  25428. * [en]Resolves to the new page element[/en]
  25429. * [ja][/ja]
  25430. */
  25431. }, {
  25432. key: 'load',
  25433. value: function load(page) {
  25434. var _this5 = this;
  25435. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  25436. this._page = page;
  25437. var callback = options.callback || function () {};
  25438. return new Promise(function (resolve) {
  25439. var oldContent = _this5._content || null;
  25440. _this5._pageLoader.load({ page: page, parent: _this5 }, function (pageElement) {
  25441. if (oldContent) {
  25442. _this5._pageLoader.unload(oldContent);
  25443. oldContent = null;
  25444. }
  25445. setImmediate(function () {
  25446. return _this5._show();
  25447. });
  25448. callback(pageElement);
  25449. resolve(pageElement);
  25450. });
  25451. });
  25452. }
  25453. }, {
  25454. key: '_show',
  25455. value: function _show() {
  25456. if (this._content) {
  25457. this._content._show();
  25458. }
  25459. }
  25460. }, {
  25461. key: '_hide',
  25462. value: function _hide() {
  25463. if (this._content) {
  25464. this._content._hide();
  25465. }
  25466. }
  25467. }, {
  25468. key: '_destroy',
  25469. value: function _destroy() {
  25470. if (this._content) {
  25471. this._pageLoader.unload(this._content);
  25472. }
  25473. this.remove();
  25474. }
  25475. }, {
  25476. key: 'side',
  25477. get: function get$$1() {
  25478. return this.getAttribute('side') === 'right' ? 'right' : 'left';
  25479. }
  25480. }, {
  25481. key: 'page',
  25482. get: function get$$1() {
  25483. return this._page;
  25484. }
  25485. /**
  25486. * @param {*} page
  25487. */
  25488. ,
  25489. set: function set$$1(page) {
  25490. this._page = page;
  25491. }
  25492. }, {
  25493. key: '_content',
  25494. get: function get$$1() {
  25495. return this.children[0];
  25496. }
  25497. /**
  25498. * @property pageLoader
  25499. * @description
  25500. * [en][/en]
  25501. * [ja][/ja]
  25502. */
  25503. }, {
  25504. key: 'pageLoader',
  25505. get: function get$$1() {
  25506. return this._pageLoader;
  25507. },
  25508. set: function set$$1(loader) {
  25509. if (!(loader instanceof PageLoader)) {
  25510. util$1.throwPageLoader();
  25511. }
  25512. this._pageLoader = loader;
  25513. }
  25514. /**
  25515. * @property mode
  25516. * @readonly
  25517. * @type {String}
  25518. * @description
  25519. * [en]Current mode. Possible values are "split", "collapse", "closed", "open" or "changing".[/en]
  25520. * [ja][/ja]
  25521. */
  25522. }, {
  25523. key: 'mode',
  25524. get: function get$$1() {
  25525. return this._mode;
  25526. }
  25527. /**
  25528. * @property onSwipe
  25529. * @type {Function}
  25530. * @description
  25531. * [en]Hook called whenever the user slides the splitter. It gets a decimal ratio (0-1) and an animationOptions object as arguments.[/en]
  25532. * [ja][/ja]
  25533. */
  25534. }, {
  25535. key: 'onSwipe',
  25536. get: function get$$1() {
  25537. return this._onSwipe;
  25538. },
  25539. set: function set$$1(value) {
  25540. if (value && !(value instanceof Function)) {
  25541. util$1.throw('"onSwipe" must be a function');
  25542. }
  25543. this._onSwipe = value;
  25544. }
  25545. /**
  25546. * @property isOpen
  25547. * @type {Boolean}
  25548. * @readonly
  25549. * @description
  25550. * [en]This value is `true` when the menu is open.[/en]
  25551. * [ja][/ja]
  25552. */
  25553. }, {
  25554. key: 'isOpen',
  25555. get: function get$$1() {
  25556. return this._mode === COLLAPSE_MODE && this._state !== CLOSED_STATE;
  25557. }
  25558. }], [{
  25559. key: 'observedAttributes',
  25560. get: function get$$1() {
  25561. return ['animation', 'width', 'collapse', 'swipeable', 'animation-options'];
  25562. }
  25563. }, {
  25564. key: 'events',
  25565. get: function get$$1() {
  25566. return ['preopen', 'postopen', 'preclose', 'postclose', 'modechange'];
  25567. }
  25568. }, {
  25569. key: 'rewritables',
  25570. get: function get$$1() {
  25571. return rewritables$2;
  25572. }
  25573. }]);
  25574. return SplitterSideElement;
  25575. }(BaseElement);
  25576. onsElements.SplitterSide = SplitterSideElement;
  25577. customElements.define('ons-splitter-side', SplitterSideElement);
  25578. /*
  25579. Copyright 2013-2015 ASIAL CORPORATION
  25580. Licensed under the Apache License, Version 2.0 (the "License");
  25581. you may not use this file except in compliance with the License.
  25582. You may obtain a copy of the License at
  25583. http://www.apache.org/licenses/LICENSE-2.0
  25584. Unless required by applicable law or agreed to in writing, software
  25585. distributed under the License is distributed on an "AS IS" BASIS,
  25586. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  25587. See the License for the specific language governing permissions and
  25588. limitations under the License.
  25589. */
  25590. var scheme$28 = {
  25591. '': 'switch--*',
  25592. '.switch__input': 'switch--*__input',
  25593. '.switch__handle': 'switch--*__handle',
  25594. '.switch__toggle': 'switch--*__toggle'
  25595. };
  25596. var locations = {
  25597. ios: [1, 21],
  25598. material: [0, 16]
  25599. };
  25600. /**
  25601. * @element ons-switch
  25602. * @category form
  25603. * @description
  25604. * [en]
  25605. * Switch component. The switch can be toggled both by dragging and tapping.
  25606. *
  25607. * Will automatically displays a Material Design switch on Android devices.
  25608. * [/en]
  25609. * [ja]スイッチを表示するコンポーネントです。[/ja]
  25610. * @modifier material
  25611. * [en]Material Design switch[/en]
  25612. * [ja][/ja]
  25613. * @codepen LpXZQQ
  25614. * @tutorial vanilla/Reference/switch
  25615. * @guide theming.html#modifiers [en]More details about the `modifier` attribute[/en][ja]modifier属性の使い方[/ja]
  25616. * @example
  25617. * <ons-switch checked></ons-switch>
  25618. * <ons-switch disabled></ons-switch>
  25619. * <ons-switch modifier="material"></ons-switch>
  25620. */
  25621. var SwitchElement = function (_BaseCheckboxElement) {
  25622. inherits(SwitchElement, _BaseCheckboxElement);
  25623. function SwitchElement() {
  25624. classCallCheck(this, SwitchElement);
  25625. var _this = possibleConstructorReturn(this, (SwitchElement.__proto__ || Object.getPrototypeOf(SwitchElement)).call(this));
  25626. contentReady(_this, function () {
  25627. _this.attributeChangedCallback('modifier', null, _this.getAttribute('modifier'));
  25628. });
  25629. _this._onChange = _this._onChange.bind(_this);
  25630. _this._onRelease = _this._onRelease.bind(_this);
  25631. _this._lastTimeStamp = 0;
  25632. return _this;
  25633. }
  25634. createClass(SwitchElement, [{
  25635. key: '_getPosition',
  25636. /* Own props */
  25637. value: function _getPosition(e) {
  25638. var l = this._locations;
  25639. return Math.min(l[1], Math.max(l[0], this._startX + e.gesture.deltaX));
  25640. }
  25641. }, {
  25642. key: '_emitChangeEvent',
  25643. value: function _emitChangeEvent() {
  25644. util$1.triggerElementEvent(this, 'change', {
  25645. value: this.checked,
  25646. switch: this,
  25647. isInteractive: true
  25648. });
  25649. }
  25650. }, {
  25651. key: '_onChange',
  25652. value: function _onChange(event) {
  25653. if (event && event.stopPropagation) {
  25654. event.stopPropagation();
  25655. }
  25656. this._emitChangeEvent();
  25657. }
  25658. }, {
  25659. key: '_onClick',
  25660. value: function _onClick(ev) {
  25661. if (ev.target.classList.contains(this.defaultElementClass + '__touch') || ev.timeStamp - this._lastTimeStamp < 50 // Prevent second click triggered by <label>
  25662. ) {
  25663. ev.preventDefault();
  25664. }
  25665. this._lastTimeStamp = ev.timeStamp;
  25666. }
  25667. }, {
  25668. key: '_onHold',
  25669. value: function _onHold(e) {
  25670. if (!this.disabled) {
  25671. ModifierUtil.addModifier(this, 'active');
  25672. document.addEventListener('release', this._onRelease);
  25673. }
  25674. }
  25675. }, {
  25676. key: '_onDragStart',
  25677. value: function _onDragStart(e) {
  25678. if (this.disabled || ['left', 'right'].indexOf(e.gesture.direction) === -1) {
  25679. ModifierUtil.removeModifier(this, 'active');
  25680. return;
  25681. }
  25682. e.consumed = true;
  25683. ModifierUtil.addModifier(this, 'active');
  25684. this._startX = this._locations[this.checked ? 1 : 0]; // - e.gesture.deltaX;
  25685. this.addEventListener('drag', this._onDrag);
  25686. document.addEventListener('release', this._onRelease);
  25687. }
  25688. }, {
  25689. key: '_onDrag',
  25690. value: function _onDrag(e) {
  25691. e.stopPropagation();
  25692. this._handle.style.left = this._getPosition(e) + 'px';
  25693. }
  25694. }, {
  25695. key: '_onRelease',
  25696. value: function _onRelease(e) {
  25697. var l = this._locations;
  25698. var position = this._getPosition(e);
  25699. var previousValue = this.checked;
  25700. this.checked = position >= (l[0] + l[1]) / 2;
  25701. if (this.checked !== previousValue) {
  25702. this._emitChangeEvent();
  25703. }
  25704. this.removeEventListener('drag', this._onDrag);
  25705. document.removeEventListener('release', this._onRelease);
  25706. this._handle.style.left = '';
  25707. ModifierUtil.removeModifier(this, 'active');
  25708. }
  25709. }, {
  25710. key: 'click',
  25711. value: function click() {
  25712. var ev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  25713. if (!this.disabled) {
  25714. this.checked = !this.checked;
  25715. this._emitChangeEvent();
  25716. this._lastTimeStamp = ev.timeStamp || 0;
  25717. }
  25718. }
  25719. }, {
  25720. key: 'connectedCallback',
  25721. value: function connectedCallback() {
  25722. var _this2 = this;
  25723. contentReady(this, function () {
  25724. _this2._input.addEventListener('change', _this2._onChange);
  25725. });
  25726. this.addEventListener('dragstart', this._onDragStart);
  25727. this.addEventListener('hold', this._onHold);
  25728. this.addEventListener('tap', this.click);
  25729. this.addEventListener('click', this._onClick);
  25730. this._gestureDetector = new GestureDetector(this, { dragMinDistance: 1, holdTimeout: 251, passive: true });
  25731. }
  25732. }, {
  25733. key: 'disconnectedCallback',
  25734. value: function disconnectedCallback() {
  25735. var _this3 = this;
  25736. contentReady(this, function () {
  25737. _this3._input.removeEventListener('change', _this3._onChange);
  25738. });
  25739. this.removeEventListener('dragstart', this._onDragStart);
  25740. this.removeEventListener('hold', this._onHold);
  25741. this.removeEventListener('tap', this.click);
  25742. this.removeEventListener('click', this._onClick);
  25743. if (this._gestureDetector) {
  25744. this._gestureDetector.dispose();
  25745. }
  25746. }
  25747. }, {
  25748. key: 'attributeChangedCallback',
  25749. value: function attributeChangedCallback(name, last, current) {
  25750. if (name === 'modifier') {
  25751. var md = (current || '').indexOf('material') !== -1;
  25752. this._locations = locations[md ? 'material' : 'ios'];
  25753. }
  25754. get(SwitchElement.prototype.__proto__ || Object.getPrototypeOf(SwitchElement.prototype), 'attributeChangedCallback', this).call(this, name, last, current);
  25755. }
  25756. /**
  25757. * @event change
  25758. * @description
  25759. * [en]Fired when the switch is toggled.[/en]
  25760. * [ja]ON/OFFが変わった時に発火します。[/ja]
  25761. * @param {Object} event
  25762. * [en]Event object.[/en]
  25763. * [ja]イベントオブジェクト。[/ja]
  25764. * @param {Object} event.switch
  25765. * [en]Switch object.[/en]
  25766. * [ja]イベントが発火したSwitchオブジェクトを返します。[/ja]
  25767. * @param {Boolean} event.value
  25768. * [en]Current value.[/en]
  25769. * [ja]現在の値を返します。[/ja]
  25770. * @param {Boolean} event.isInteractive
  25771. * [en]True if the change was triggered by the user clicking on the switch.[/en]
  25772. * [ja]タップやクリックなどのユーザの操作によって変わった場合にはtrueを返します。[/ja]
  25773. */
  25774. /**
  25775. * @attribute modifier
  25776. * @type {String}
  25777. * @description
  25778. * [en]The appearance of the switch.[/en]
  25779. * [ja]スイッチの表現を指定します。[/ja]
  25780. */
  25781. /**
  25782. * @attribute disabled
  25783. * @description
  25784. * [en]Whether the switch is be disabled.[/en]
  25785. * [ja]スイッチを無効の状態にする場合に指定します。[/ja]
  25786. */
  25787. /**
  25788. * @attribute checked
  25789. * @description
  25790. * [en]Whether the switch is checked.[/en]
  25791. * [ja]スイッチがONの状態にするときに指定します。[/ja]
  25792. */
  25793. /**
  25794. * @attribute input-id
  25795. * @type {String}
  25796. * @description
  25797. * [en]Specify the `id` attribute of the inner `<input>` element. This is useful when using `<label for="...">` elements.[/en]
  25798. * [ja][/ja]
  25799. */
  25800. /**
  25801. * @property checked
  25802. * @type {Boolean}
  25803. * @description
  25804. * [en]This value is `true` if the switch is checked.[/en]
  25805. * [ja]スイッチがONの場合に`true`。[/ja]
  25806. */
  25807. /**
  25808. * @property value
  25809. * @type {String}
  25810. * @description
  25811. * [en]The current value of the input.[/en]
  25812. * [ja][/ja]
  25813. */
  25814. /**
  25815. * @property disabled
  25816. * @type {Boolean}
  25817. * @description
  25818. * [en]Whether the element is disabled or not.[/en]
  25819. * [ja]無効化されている場合に`true`。[/ja]
  25820. */
  25821. /**
  25822. * @property checkbox
  25823. * @readonly
  25824. * @type {HTMLElement}
  25825. * @description
  25826. * [en]The underlying checkbox element.[/en]
  25827. * [ja]コンポーネント内部のcheckbox要素になります。[/ja]
  25828. */
  25829. }, {
  25830. key: '_scheme',
  25831. get: function get$$1() {
  25832. return scheme$28;
  25833. }
  25834. }, {
  25835. key: '_defaultClassName',
  25836. get: function get$$1() {
  25837. return 'switch';
  25838. }
  25839. }, {
  25840. key: '_template',
  25841. get: function get$$1() {
  25842. return '\n <input type="' + this.type + '" class="' + this._defaultClassName + '__input">\n <div class="' + this._defaultClassName + '__toggle">\n <div class="' + this._defaultClassName + '__handle">\n <div class="' + this._defaultClassName + '__touch"></div>\n </div>\n </div>\n ';
  25843. }
  25844. }, {
  25845. key: 'type',
  25846. get: function get$$1() {
  25847. return 'checkbox';
  25848. }
  25849. }, {
  25850. key: '_handle',
  25851. get: function get$$1() {
  25852. return this.querySelector('.' + this._defaultClassName + '__handle');
  25853. }
  25854. }, {
  25855. key: 'checkbox',
  25856. get: function get$$1() {
  25857. return this._input;
  25858. }
  25859. }], [{
  25860. key: 'observedAttributes',
  25861. get: function get$$1() {
  25862. return [].concat(toConsumableArray(get(SwitchElement.__proto__ || Object.getPrototypeOf(SwitchElement), 'observedAttributes', this)), ['modifier']);
  25863. }
  25864. }]);
  25865. return SwitchElement;
  25866. }(BaseCheckboxElement);
  25867. onsElements.Switch = SwitchElement;
  25868. customElements.define('ons-switch', SwitchElement);
  25869. /*
  25870. Copyright 2013-2015 ASIAL CORPORATION
  25871. Licensed under the Apache License, Version 2.0 (the "License");
  25872. you may not use this file except in compliance with the License.
  25873. You may obtain a copy of the License at
  25874. http://www.apache.org/licenses/LICENSE-2.0
  25875. Unless required by applicable law or agreed to in writing, software
  25876. distributed under the License is distributed on an "AS IS" BASIS,
  25877. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  25878. See the License for the specific language governing permissions and
  25879. limitations under the License.
  25880. */
  25881. var scheme$30 = {
  25882. '.tabbar__content': 'tabbar--*__content',
  25883. '.tabbar__border': 'tabbar--*__border',
  25884. '.tabbar': 'tabbar--*'
  25885. };
  25886. var rewritables$3 = {
  25887. /**
  25888. * @param {Element} tabbarElement
  25889. * @param {Function} callback
  25890. */
  25891. ready: function ready(tabbarElement, callback) {
  25892. callback();
  25893. }
  25894. };
  25895. var lerp = function lerp(x0, x1, t) {
  25896. return (1 - t) * x0 + t * x1;
  25897. };
  25898. /**
  25899. * @element ons-tabbar
  25900. * @category tabbar
  25901. * @description
  25902. * [en]A component to display a tab bar on the bottom of a page. Used with `<ons-tab>` to manage pages using tabs.[/en]
  25903. * [ja]タブバーをページ下部に表示するためのコンポーネントです。ons-tabと組み合わせて使うことで、ページを管理できます。[/ja]
  25904. * @codepen pGuDL
  25905. * @tutorial vanilla/Reference/tabbar
  25906. * @modifier material
  25907. * [en]A tabbar in Material Design.[/en]
  25908. * [ja][/ja]
  25909. * @modifier autogrow
  25910. * [en]Tabs automatically grow depending on their content instead of having a fixed width.[/en]
  25911. * [ja][/ja]
  25912. * @modifier top-border
  25913. * [en]Shows a static border-bottom in tabs for iOS top tabbars.[/en]
  25914. * [ja][/ja]
  25915. * @guide fundamentals.html#managing-pages
  25916. * [en]Managing multiple pages.[/en]
  25917. * [ja]複数のページを管理する[/ja]
  25918. * @seealso ons-tab
  25919. * [en]The `<ons-tab>` component.[/en]
  25920. * [ja]ons-tabコンポーネント[/ja]
  25921. * @seealso ons-page
  25922. * [en]The `<ons-page>` component.[/en]
  25923. * [ja]ons-pageコンポーネント[/ja]
  25924. * @example
  25925. * <ons-tabbar>
  25926. * <ons-tab
  25927. * page="home.html"
  25928. * label="Home"
  25929. * active>
  25930. * </ons-tab>
  25931. * <ons-tab
  25932. * page="settings.html"
  25933. * label="Settings"
  25934. * active>
  25935. * </ons-tab>
  25936. * </ons-tabbar>
  25937. *
  25938. * <template id="home.html">
  25939. * ...
  25940. * </template>
  25941. *
  25942. * <template id="settings.html">
  25943. * ...
  25944. * </template>
  25945. */
  25946. var TabbarElement = function (_BaseElement) {
  25947. inherits(TabbarElement, _BaseElement);
  25948. /**
  25949. * @event prechange
  25950. * @description
  25951. * [en]Fires just before the tab is changed.[/en]
  25952. * [ja]アクティブなタブが変わる前に発火します。[/ja]
  25953. * @param {Object} event
  25954. * [en]Event object.[/en]
  25955. * [ja]イベントオブジェクト。[/ja]
  25956. * @param {Number} event.index
  25957. * [en]Current index.[/en]
  25958. * [ja]現在アクティブになっているons-tabのインデックスを返します。[/ja]
  25959. * @param {Object} event.tabItem
  25960. * [en]Tab item object.[/en]
  25961. * [ja]tabItemオブジェクト。[/ja]
  25962. * @param {Function} event.cancel
  25963. * [en]Call this function to cancel the change event.[/en]
  25964. * [ja]この関数を呼び出すと、アクティブなタブの変更がキャンセルされます。[/ja]
  25965. */
  25966. /**
  25967. * @event postchange
  25968. * @description
  25969. * [en]Fires just after the tab is changed.[/en]
  25970. * [ja]アクティブなタブが変わった後に発火します。[/ja]
  25971. * @param {Object} event
  25972. * [en]Event object.[/en]
  25973. * [ja]イベントオブジェクト。[/ja]
  25974. * @param {Number} event.index
  25975. * [en]Current index.[/en]
  25976. * [ja]現在アクティブになっているons-tabのインデックスを返します。[/ja]
  25977. * @param {Object} event.tabItem
  25978. * [en]Tab item object.[/en]
  25979. * [ja]tabItemオブジェクト。[/ja]
  25980. */
  25981. /**
  25982. * @event reactive
  25983. * @description
  25984. * [en]Fires if the already open tab is tapped again.[/en]
  25985. * [ja]すでにアクティブになっているタブがもう一度タップやクリックされた場合に発火します。[/ja]
  25986. * @param {Object} event
  25987. * [en]Event object.[/en]
  25988. * [ja]イベントオブジェクト。[/ja]
  25989. * @param {Number} event.index
  25990. * [en]Current index.[/en]
  25991. * [ja]現在アクティブになっているons-tabのインデックスを返します。[/ja]
  25992. * @param {Object} event.tabItem
  25993. * [en]Tab item object.[/en]
  25994. * [ja]tabItemオブジェクト。[/ja]
  25995. */
  25996. /**
  25997. * @attribute animation
  25998. * @type {String}
  25999. * @default none
  26000. * @description
  26001. * [en]If this attribute is set to `"none"` the transitions will not be animated.[/en]
  26002. * [ja][/ja]
  26003. */
  26004. /**
  26005. * @attribute animation-options
  26006. * @type {Expression}
  26007. * @description
  26008. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  26009. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. {duration: 0.2, delay: 1, timing: 'ease-in'}[/ja]
  26010. */
  26011. /**
  26012. * @attribute position
  26013. * @initonly
  26014. * @type {String}
  26015. * @default bottom
  26016. * @description
  26017. * [en]Tabbar's position. Available values are `"bottom"` and `"top"`. Use `"auto"` to choose position depending on platform (bottom for iOS flat design, top for Material Design).[/en]
  26018. * [ja]タブバーの位置を指定します。"bottom"もしくは"top"を選択できます。デフォルトは"bottom"です。[/ja]
  26019. */
  26020. /**
  26021. * @attribute swipeable
  26022. * @description
  26023. * [en]If this attribute is set the tab bar can be scrolled by drag or swipe.[/en]
  26024. * [ja]この属性がある時、タブバーをスワイプやドラッグで移動できるようになります。[/ja]
  26025. */
  26026. /**
  26027. * @attribute ignore-edge-width
  26028. * @type {Number}
  26029. * @default 20
  26030. * @description
  26031. * [en]Distance in pixels from both edges. Swiping on these areas will prioritize parent components such as `ons-splitter` or `ons-navigator`.[/en]
  26032. * [ja][/ja]
  26033. */
  26034. /**
  26035. * @attribute hide-tabs
  26036. * @description
  26037. * [en]Whether to hide the tabs.[/en]
  26038. * [ja]タブを非表示にする場合に指定します。[/ja]
  26039. */
  26040. /**
  26041. * @attribute tab-border
  26042. * @description
  26043. * [en]If this attribute is set the tabs show a dynamic bottom border. Only works for iOS flat design since the border is always visible in Material Design.[/en]
  26044. * [ja][/ja]
  26045. */
  26046. /**
  26047. * @attribute modifier
  26048. * @type {String}
  26049. * @description
  26050. * [en]The appearance of the tabbar.[/en]
  26051. * [ja]タブバーの表現を指定します。[/ja]
  26052. */
  26053. function TabbarElement() {
  26054. classCallCheck(this, TabbarElement);
  26055. var _this = possibleConstructorReturn(this, (TabbarElement.__proto__ || Object.getPrototypeOf(TabbarElement)).call(this));
  26056. _this._loadInactive = util$1.defer(); // Improves #2324
  26057. contentReady(_this, function () {
  26058. return _this._compile();
  26059. });
  26060. return _this;
  26061. }
  26062. createClass(TabbarElement, [{
  26063. key: 'connectedCallback',
  26064. value: function connectedCallback() {
  26065. var _this2 = this;
  26066. if (!this._swiper) {
  26067. this._swiper = new Swiper({
  26068. getElement: function getElement() {
  26069. return _this2._contentElement;
  26070. },
  26071. getInitialIndex: function getInitialIndex() {
  26072. return _this2.getAttribute('activeIndex') || _this2.getAttribute('active-index');
  26073. },
  26074. getAutoScrollRatio: this._getAutoScrollRatio.bind(this),
  26075. getBubbleWidth: function getBubbleWidth() {
  26076. return parseInt(_this2.getAttribute('ignore-edge-width') || 25, 10);
  26077. },
  26078. isAutoScrollable: function isAutoScrollable() {
  26079. return true;
  26080. },
  26081. preChangeHook: this._onPreChange.bind(this),
  26082. postChangeHook: this._onPostChange.bind(this),
  26083. refreshHook: this._onRefresh.bind(this),
  26084. scrollHook: this._onScroll.bind(this)
  26085. });
  26086. contentReady(this, function () {
  26087. _this2._tabbarBorder = util$1.findChild(_this2._tabbarElement, '.tabbar__border');
  26088. _this2._swiper.init({ swipeable: _this2.hasAttribute('swipeable') });
  26089. });
  26090. }
  26091. contentReady(this, function () {
  26092. _this2._updatePosition();
  26093. if (!util$1.findParent(_this2, 'ons-page', function (p) {
  26094. return p === document.body;
  26095. })) {
  26096. _this2._show(); // This tabbar is the top component
  26097. }
  26098. });
  26099. }
  26100. }, {
  26101. key: 'disconnectedCallback',
  26102. value: function disconnectedCallback() {
  26103. if (this._swiper && this._swiper.initialized) {
  26104. this._swiper.dispose();
  26105. this._swiper = null;
  26106. this._tabbarBorder = null;
  26107. this._tabsRect = null;
  26108. }
  26109. }
  26110. }, {
  26111. key: '_normalizeEvent',
  26112. value: function _normalizeEvent(event) {
  26113. return _extends({}, event, { index: event.activeIndex, tabItem: this.tabs[event.activeIndex] });
  26114. }
  26115. }, {
  26116. key: '_onPostChange',
  26117. value: function _onPostChange(event) {
  26118. event = this._normalizeEvent(event);
  26119. util$1.triggerElementEvent(this, 'postchange', event);
  26120. var page = event.tabItem.pageElement;
  26121. page && page._show();
  26122. }
  26123. }, {
  26124. key: '_onPreChange',
  26125. value: function _onPreChange(event) {
  26126. event = this._normalizeEvent(event);
  26127. event.cancel = function () {
  26128. return event.canceled = true;
  26129. };
  26130. util$1.triggerElementEvent(this, 'prechange', event);
  26131. if (!event.canceled) {
  26132. var _event = event,
  26133. activeIndex = _event.activeIndex,
  26134. lastActiveIndex = _event.lastActiveIndex;
  26135. var tabs = this.tabs;
  26136. tabs[activeIndex].setActive(true);
  26137. if (lastActiveIndex >= 0) {
  26138. var prevTab = tabs[lastActiveIndex];
  26139. prevTab.setActive(false);
  26140. prevTab.pageElement && prevTab.pageElement._hide();
  26141. }
  26142. }
  26143. return event.canceled;
  26144. }
  26145. }, {
  26146. key: '_onScroll',
  26147. value: function _onScroll(index) {
  26148. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  26149. if (this._tabbarBorder) {
  26150. this._tabbarBorder.style.transition = 'all ' + (options.duration || 0) + 's ' + (options.timing || '');
  26151. if (this._autogrow && this._tabsRect.length > 0) {
  26152. var a = Math.floor(index),
  26153. b = Math.ceil(index),
  26154. r = index % 1;
  26155. this._tabbarBorder.style.width = lerp(this._tabsRect[a].width, this._tabsRect[b].width, r) + 'px';
  26156. this._tabbarBorder.style.transform = 'translate3d(' + lerp(this._tabsRect[a].left, this._tabsRect[b].left, r) + 'px, 0, 0)';
  26157. } else {
  26158. this._tabbarBorder.style.transform = 'translate3d(' + index * 100 + '%, 0, 0)';
  26159. }
  26160. }
  26161. this._onSwipe && this._onSwipe(index, options);
  26162. }
  26163. }, {
  26164. key: '_onRefresh',
  26165. value: function _onRefresh() {
  26166. this._autogrow = util$1.hasModifier(this, 'autogrow');
  26167. this._tabsRect = this.tabs.map(function (tab) {
  26168. return tab.getBoundingClientRect();
  26169. });
  26170. if (this._tabbarBorder) {
  26171. this._tabbarBorder.style.display = this.hasAttribute('tab-border') || util$1.hasModifier(this, 'material') ? 'block' : 'none';
  26172. var index = this.getActiveTabIndex();
  26173. if (this._tabsRect.length > 0 && index >= 0) {
  26174. this._tabbarBorder.style.width = this._tabsRect[index].width + 'px';
  26175. }
  26176. }
  26177. }
  26178. }, {
  26179. key: '_getAutoScrollRatio',
  26180. value: function _getAutoScrollRatio(matches, velocity, size) {
  26181. var ratio = .6; // Base ratio
  26182. var modifier = size / 300 * (matches ? -1 : 1); // Based on screen size
  26183. return Math.min(1, Math.max(0, ratio + velocity * modifier));
  26184. }
  26185. }, {
  26186. key: '_compile',
  26187. value: function _compile() {
  26188. autoStyle.prepare(this);
  26189. var content = this._contentElement || util$1.create('.tabbar__content');
  26190. content.classList.add('ons-tabbar__content');
  26191. var tabbar = this._tabbarElement || util$1.create('.tabbar');
  26192. tabbar.classList.add('ons-tabbar__footer');
  26193. if (!tabbar.parentNode) {
  26194. while (this.firstChild) {
  26195. tabbar.appendChild(this.firstChild);
  26196. }
  26197. }
  26198. var activeIndex = Number(this.getAttribute('activeIndex')); // 0 by default
  26199. if (tabbar.children.length > activeIndex && !util$1.findChild(tabbar, '[active]')) {
  26200. tabbar.children[activeIndex].setAttribute('active', '');
  26201. }
  26202. this._tabbarBorder = util$1.findChild(tabbar, '.tabbar__border') || util$1.create('.tabbar__border');
  26203. tabbar.appendChild(this._tabbarBorder);
  26204. tabbar.classList.add('ons-swiper-tabbar'); // Hides material border
  26205. !content.children[0] && content.appendChild(document.createElement('div'));
  26206. !content.children[1] && content.appendChild(document.createElement('div'));
  26207. content.appendChild = content.appendChild.bind(content.children[0]);
  26208. content.insertBefore = content.insertBefore.bind(content.children[0]);
  26209. this.appendChild(content);
  26210. this.appendChild(tabbar); // Triggers ons-tab connectedCallback
  26211. ModifierUtil.initModifier(this, scheme$30);
  26212. }
  26213. }, {
  26214. key: '_updatePosition',
  26215. value: function _updatePosition() {
  26216. var _this3 = this;
  26217. var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getAttribute('position');
  26218. var top = this._top = position === 'top' || position === 'auto' && util$1.hasModifier(this, 'material');
  26219. var action = top ? util$1.addModifier : util$1.removeModifier;
  26220. action(this, 'top');
  26221. var page = util$1.findParent(this, 'ons-page');
  26222. if (page) {
  26223. contentReady(page, function () {
  26224. var p = 0;
  26225. if (page.children[0] && util$1.match(page.children[0], 'ons-toolbar')) {
  26226. action(page.children[0], 'noshadow');
  26227. p = 1; // Visual fix for some devices
  26228. }
  26229. var content = page._getContentElement();
  26230. var cs = window.getComputedStyle(page._getContentElement(), null);
  26231. _this3.style.top = top ? parseInt(cs.getPropertyValue('padding-top'), 10) - p + 'px' : '';
  26232. // Refresh content top - Fix for iOS 8
  26233. content.style.top = cs.top;
  26234. content.style.top = '';
  26235. });
  26236. }
  26237. internal$1.autoStatusBarFill(function () {
  26238. var filled = util$1.findParent(_this3, function (e) {
  26239. return e.hasAttribute('status-bar-fill');
  26240. });
  26241. util$1.toggleAttribute(_this3, 'status-bar-fill', top && !filled);
  26242. });
  26243. }
  26244. }, {
  26245. key: 'setActiveTab',
  26246. /**
  26247. * @method setActiveTab
  26248. * @signature setActiveTab(index, [options])
  26249. * @param {Number} index
  26250. * [en]Tab index.[/en]
  26251. * [ja]タブのインデックスを指定します。[/ja]
  26252. * @param {Object} [options]
  26253. * [en]Parameter object.[/en]
  26254. * [ja]オプションを指定するオブジェクト。[/ja]
  26255. * @param {Function} [options.callback]
  26256. * [en]Function that runs when the new page has loaded.[/en]
  26257. * [ja][/ja]
  26258. * @param {String} [options.animation]
  26259. * [en]If this option is "none", the transition won't slide.[/en]
  26260. * [ja][/ja]
  26261. * @param {String} [options.animationOptions]
  26262. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  26263. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  26264. * @description
  26265. * [en]Show specified tab page. Animations and their options can be specified by the second parameter.[/en]
  26266. * [ja]指定したインデックスのタブを表示します。アニメーションなどのオプションを指定できます。[/ja]
  26267. * @return {Promise}
  26268. * [en]A promise that resolves to the new page element.[/en]
  26269. * [ja][/ja]
  26270. */
  26271. value: function setActiveTab(nextIndex) {
  26272. var _this4 = this;
  26273. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  26274. var prevIndex = this.getActiveTabIndex();
  26275. var prevTab = this.tabs[prevIndex],
  26276. nextTab = this.tabs[nextIndex];
  26277. if (!nextTab) {
  26278. return Promise.reject('Specified index does not match any tab.');
  26279. }
  26280. if (nextIndex === prevIndex) {
  26281. util$1.triggerElementEvent(this, 'reactive', { index: nextIndex, activeIndex: nextIndex, tabItem: nextTab });
  26282. return Promise.resolve(nextTab.pageElement);
  26283. }
  26284. // FIXME: nextTab.loaded is broken in Zone.js promises (Angular2)
  26285. var nextPage = nextTab.pageElement;
  26286. return (nextPage ? Promise.resolve(nextPage) : nextTab.loaded).then(function (nextPage) {
  26287. return _this4._swiper.setActiveIndex(nextIndex, _extends({
  26288. reject: true
  26289. }, options, {
  26290. animation: prevTab && nextPage ? options.animation || _this4.getAttribute('animation') : 'none',
  26291. animationOptions: util$1.extend({ duration: .3, timing: 'cubic-bezier(.4, .7, .5, 1)' }, _this4.hasAttribute('animation-options') ? util$1.animationOptionsParse(_this4.getAttribute('animation-options')) : {}, options.animationOptions || {})
  26292. })).then(function () {
  26293. options.callback instanceof Function && options.callback(nextPage);
  26294. return nextPage;
  26295. });
  26296. });
  26297. }
  26298. /**
  26299. * @method setTabbarVisibility
  26300. * @signature setTabbarVisibility(visible)
  26301. * @param {Boolean} visible
  26302. * @description
  26303. * [en]Used to hide or show the tab bar.[/en]
  26304. * [ja][/ja]
  26305. */
  26306. }, {
  26307. key: 'setTabbarVisibility',
  26308. value: function setTabbarVisibility(visible) {
  26309. var _this5 = this;
  26310. contentReady(this, function () {
  26311. _this5._contentElement.style[_this5._top ? 'top' : 'bottom'] = visible ? '' : '0px';
  26312. _this5._tabbarElement.style.display = visible ? '' : 'none';
  26313. visible && _this5._onRefresh();
  26314. });
  26315. }
  26316. }, {
  26317. key: 'show',
  26318. value: function show() {
  26319. this.setTabbarVisibility(true);
  26320. }
  26321. }, {
  26322. key: 'hide',
  26323. value: function hide() {
  26324. this.setTabbarVisibility(false);
  26325. }
  26326. /**
  26327. * @property visible
  26328. * @readonly
  26329. * @type {Boolean}
  26330. * @description
  26331. * [en]Whether the tabbar is visible or not.[/en]
  26332. * [ja]タブバーが見える場合に`true`。[/ja]
  26333. */
  26334. }, {
  26335. key: 'getActiveTabIndex',
  26336. /**
  26337. * @method getActiveTabIndex
  26338. * @signature getActiveTabIndex()
  26339. * @return {Number}
  26340. * [en]The index of the currently active tab.[/en]
  26341. * [ja]現在アクティブになっているタブのインデックスを返します。[/ja]
  26342. * @description
  26343. * [en]Returns tab index on current active tab. If active tab is not found, returns -1.[/en]
  26344. * [ja]現在アクティブになっているタブのインデックスを返します。現在アクティブなタブがない場合には-1を返します。[/ja]
  26345. */
  26346. value: function getActiveTabIndex() {
  26347. var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.tabs;
  26348. for (var i = 0; i < tabs.length; i++) {
  26349. if (tabs[i] && tabs[i].tagName === 'ONS-TAB' && tabs[i].isActive()) {
  26350. return i;
  26351. }
  26352. }
  26353. return -1;
  26354. }
  26355. }, {
  26356. key: '_show',
  26357. value: function _show() {
  26358. var _this6 = this;
  26359. this._swiper.show();
  26360. setImmediate(function () {
  26361. var tabs = _this6.tabs;
  26362. var activeIndex = _this6.getActiveTabIndex(tabs);
  26363. _this6._loadInactive.resolve();
  26364. if (tabs.length > 0 && activeIndex >= 0) {
  26365. tabs[activeIndex].loaded.then(function (el) {
  26366. return el && setImmediate(function () {
  26367. return el._show();
  26368. });
  26369. });
  26370. }
  26371. });
  26372. }
  26373. }, {
  26374. key: '_hide',
  26375. value: function _hide() {
  26376. this._swiper.hide();
  26377. var topPage = this.topPage;
  26378. topPage && topPage._hide();
  26379. }
  26380. }, {
  26381. key: '_destroy',
  26382. value: function _destroy() {
  26383. this.tabs.forEach(function (tab) {
  26384. return tab.remove();
  26385. });
  26386. this.remove();
  26387. }
  26388. }, {
  26389. key: 'attributeChangedCallback',
  26390. value: function attributeChangedCallback(name, last, current) {
  26391. if (name === 'modifier') {
  26392. ModifierUtil.onModifierChanged(last, current, this, scheme$30);
  26393. var isTop = function isTop(m) {
  26394. return (/(^|\s+)top($|\s+)/i.test(m)
  26395. );
  26396. };
  26397. isTop(last) !== isTop(current) && this._updatePosition();
  26398. } else if (name === 'position') {
  26399. util$1.isAttached(this) && this._updatePosition();
  26400. } else if (name === 'swipeable') {
  26401. this._swiper && this._swiper.updateSwipeable(this.hasAttribute('swipeable'));
  26402. } else if (name === 'hide-tabs') {
  26403. this.setTabbarVisibility(!this.hasAttribute('hide-tabs') || current === 'false');
  26404. }
  26405. }
  26406. }, {
  26407. key: '_tabbarElement',
  26408. get: function get$$1() {
  26409. return util$1.findChild(this, '.tabbar');
  26410. }
  26411. }, {
  26412. key: '_contentElement',
  26413. get: function get$$1() {
  26414. return util$1.findChild(this, '.tabbar__content');
  26415. }
  26416. }, {
  26417. key: '_targetElement',
  26418. get: function get$$1() {
  26419. var content = this._contentElement;
  26420. return content && content.children[0] || null;
  26421. }
  26422. }, {
  26423. key: 'topPage',
  26424. get: function get$$1() {
  26425. var tabs = this.tabs,
  26426. index = this.getActiveTabIndex();
  26427. return tabs[index] ? tabs[index].pageElement || this.pages[0] || null : null;
  26428. }
  26429. }, {
  26430. key: 'pages',
  26431. get: function get$$1() {
  26432. return util$1.arrayFrom(this._targetElement.children);
  26433. }
  26434. }, {
  26435. key: 'tabs',
  26436. get: function get$$1() {
  26437. return Array.prototype.filter.call(this._tabbarElement.children, function (e) {
  26438. return e.tagName === 'ONS-TAB';
  26439. });
  26440. }
  26441. }, {
  26442. key: 'visible',
  26443. get: function get$$1() {
  26444. return this._tabbarElement.style.display !== 'none';
  26445. }
  26446. /**
  26447. * @property swipeable
  26448. * @type {Boolean}
  26449. * @description
  26450. * [en]Enable swipe interaction.[/en]
  26451. * [ja]swipeableであればtrueを返します。[/ja]
  26452. */
  26453. }, {
  26454. key: 'swipeable',
  26455. get: function get$$1() {
  26456. return this.hasAttribute('swipeable');
  26457. },
  26458. set: function set$$1(value) {
  26459. return util$1.toggleAttribute(this, 'swipeable', value);
  26460. }
  26461. /**
  26462. * @property onSwipe
  26463. * @type {Function}
  26464. * @description
  26465. * [en]Hook called whenever the user slides the tabbar. It gets a decimal index and an animationOptions object as arguments.[/en]
  26466. * [ja][/ja]
  26467. */
  26468. }, {
  26469. key: 'onSwipe',
  26470. get: function get$$1() {
  26471. return this._onSwipe;
  26472. },
  26473. set: function set$$1(value) {
  26474. if (value && !(value instanceof Function)) {
  26475. util$1.throw('"onSwipe" must be a function');
  26476. }
  26477. this._onSwipe = value;
  26478. }
  26479. }], [{
  26480. key: 'observedAttributes',
  26481. get: function get$$1() {
  26482. return ['modifier', 'position', 'swipeable', 'tab-border', 'hide-tabs'];
  26483. }
  26484. }, {
  26485. key: 'rewritables',
  26486. get: function get$$1() {
  26487. return rewritables$3;
  26488. }
  26489. }, {
  26490. key: 'events',
  26491. get: function get$$1() {
  26492. return ['prechange', 'postchange', 'reactive'];
  26493. }
  26494. }]);
  26495. return TabbarElement;
  26496. }(BaseElement);
  26497. onsElements.Tabbar = TabbarElement;
  26498. customElements.define('ons-tabbar', TabbarElement);
  26499. /*
  26500. Copyright 2013-2015 ASIAL CORPORATION
  26501. Licensed under the Apache License, Version 2.0 (the "License");
  26502. you may not use this file except in compliance with the License.
  26503. You may obtain a copy of the License at
  26504. http://www.apache.org/licenses/LICENSE-2.0
  26505. Unless required by applicable law or agreed to in writing, software
  26506. distributed under the License is distributed on an "AS IS" BASIS,
  26507. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26508. See the License for the specific language governing permissions and
  26509. limitations under the License.
  26510. */
  26511. var defaultClassName$16 = 'tabbar__item';
  26512. var scheme$29 = {
  26513. '': 'tabbar--*__item',
  26514. '.tabbar__button': 'tabbar--*__button'
  26515. };
  26516. /**
  26517. * @element ons-tab
  26518. * @category tabbar
  26519. * @description
  26520. * [en]Represents a tab inside tab bar. Each `<ons-tab>` represents a page.[/en]
  26521. * [ja]
  26522. * タブバーに配置される各アイテムのコンポーネントです。それぞれのons-tabはページを表します。
  26523. * ons-tab要素の中には、タブに表示されるコンテンツを直接記述することが出来ます。
  26524. * [/ja]
  26525. * @codepen pGuDL
  26526. * @tutorial vanilla/Reference/tabbar
  26527. * @guide fundamentals.html#managing-pages
  26528. * [en]Managing multiple pages.[/en]
  26529. * [ja]複数のページを管理する[/ja]]
  26530. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  26531. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  26532. * @seealso ons-tabbar
  26533. * [en]ons-tabbar component[/en]
  26534. * [ja]ons-tabbarコンポーネント[/ja]
  26535. * @seealso ons-page
  26536. * [en]ons-page component[/en]
  26537. * [ja]ons-pageコンポーネント[/ja]
  26538. * @seealso ons-icon
  26539. * [en]ons-icon component[/en]
  26540. * [ja]ons-iconコンポーネント[/ja]
  26541. * @example
  26542. * <ons-tabbar>
  26543. * <ons-tab
  26544. * page="home.html"
  26545. * label="Home"
  26546. * active>
  26547. * </ons-tab>
  26548. * <ons-tab
  26549. * page="settings.html"
  26550. * label="Settings"
  26551. * active>
  26552. * </ons-tab>
  26553. * </ons-tabbar>
  26554. *
  26555. * <template id="home.html">
  26556. * ...
  26557. * </template>
  26558. *
  26559. * <template id="settings.html">
  26560. * ...
  26561. * </template>
  26562. */
  26563. var TabElement = function (_BaseElement) {
  26564. inherits(TabElement, _BaseElement);
  26565. /**
  26566. * @attribute page
  26567. * @initonly
  26568. * @type {String}
  26569. * @description
  26570. * [en]The page that is displayed when the tab is tapped.[/en]
  26571. * [ja]ons-tabが参照するページへのURLを指定します。[/ja]
  26572. */
  26573. /**
  26574. * @attribute icon
  26575. * @type {String}
  26576. * @description
  26577. * [en]
  26578. * The icon name for the tab. Can specify the same icon name as `<ons-icon>`. Check [See also](#seealso) section for more information.
  26579. * [/en]
  26580. * [ja]
  26581. * アイコン名を指定します。ons-iconと同じアイコン名を指定できます。
  26582. * 個別にアイコンをカスタマイズする場合は、background-imageなどのCSSスタイルを用いて指定できます。
  26583. * [/ja]
  26584. */
  26585. /**
  26586. * @attribute active-icon
  26587. * @type {String}
  26588. * @description
  26589. * [en]The name of the icon when the tab is active.[/en]
  26590. * [ja]アクティブの際のアイコン名を指定します。[/ja]
  26591. */
  26592. /**
  26593. * @attribute label
  26594. * @type {String}
  26595. * @description
  26596. * [en]The label of the tab item.[/en]
  26597. * [ja]アイコン下に表示されるラベルを指定します。[/ja]
  26598. */
  26599. /**
  26600. * @attribute badge
  26601. * @type {String}
  26602. * @description
  26603. * [en]Display a notification badge on top of the tab.[/en]
  26604. * [ja]バッジに表示する内容を指定します。[/ja]
  26605. */
  26606. /**
  26607. * @attribute active
  26608. * @description
  26609. * [en]This attribute should be set to the tab that is active by default.[/en]
  26610. * [ja][/ja]
  26611. */
  26612. function TabElement() {
  26613. classCallCheck(this, TabElement);
  26614. var _this = possibleConstructorReturn(this, (TabElement.__proto__ || Object.getPrototypeOf(TabElement)).call(this));
  26615. if (['label', 'icon', 'badge'].some(_this.hasAttribute.bind(_this))) {
  26616. _this._compile();
  26617. } else {
  26618. contentReady(_this, function () {
  26619. return _this._compile();
  26620. });
  26621. }
  26622. _this._pageLoader = defaultPageLoader;
  26623. _this._onClick = _this._onClick.bind(_this);
  26624. return _this;
  26625. }
  26626. createClass(TabElement, [{
  26627. key: '_compile',
  26628. value: function _compile() {
  26629. autoStyle.prepare(this);
  26630. this.classList.add(defaultClassName$16);
  26631. if (this._button) {
  26632. return;
  26633. }
  26634. var button = util$1.create('button.tabbar__button');
  26635. while (this.childNodes[0]) {
  26636. button.appendChild(this.childNodes[0]);
  26637. }
  26638. var input = util$1.create('input', { display: 'none' });
  26639. input.type = 'radio';
  26640. this.appendChild(input);
  26641. this.appendChild(button);
  26642. this._updateButtonContent();
  26643. ModifierUtil.initModifier(this, scheme$29);
  26644. this._updateRipple();
  26645. }
  26646. }, {
  26647. key: '_updateRipple',
  26648. value: function _updateRipple() {
  26649. this._button && util$1.updateRipple(this._button, this.hasAttribute('ripple'));
  26650. }
  26651. }, {
  26652. key: '_updateButtonContent',
  26653. value: function _updateButtonContent() {
  26654. var _this2 = this;
  26655. var button = this._button;
  26656. var iconWrapper = this._icon;
  26657. if (this.hasAttribute('icon')) {
  26658. iconWrapper = iconWrapper || util$1.createElement('<div class="tabbar__icon"><ons-icon></ons-icon></div>');
  26659. var icon = iconWrapper.children[0];
  26660. var fix = function (last) {
  26661. return function () {
  26662. return icon.attributeChangedCallback('icon', last, _this2.getAttribute('icon'));
  26663. };
  26664. }(icon.getAttribute('icon'));
  26665. icon.setAttribute('icon', this.getAttribute(this.isActive() ? 'active-icon' : 'icon'));
  26666. iconWrapper.parentElement !== button && button.insertBefore(iconWrapper, button.firstChild);
  26667. // dirty fix for https://github.com/OnsenUI/OnsenUI/issues/1654
  26668. icon.attributeChangedCallback instanceof Function ? fix() : setImmediate(function () {
  26669. return icon.attributeChangedCallback instanceof Function && fix();
  26670. });
  26671. } else {
  26672. iconWrapper && iconWrapper.remove();
  26673. }
  26674. ['label', 'badge'].forEach(function (attr, index) {
  26675. var prop = _this2.querySelector('.tabbar__' + attr);
  26676. if (_this2.hasAttribute(attr)) {
  26677. prop = prop || util$1.create('.tabbar__' + attr + (attr === 'badge' ? ' notification' : ''));
  26678. prop.textContent = _this2.getAttribute(attr);
  26679. prop.parentElement !== button && button.appendChild(prop);
  26680. } else {
  26681. prop && prop.remove();
  26682. }
  26683. });
  26684. }
  26685. }, {
  26686. key: '_onClick',
  26687. value: function _onClick() {
  26688. if (this.onClick instanceof Function) {
  26689. this.onClick();
  26690. } else {
  26691. this._tabbar.setActiveTab(this.index, { reject: false });
  26692. }
  26693. }
  26694. }, {
  26695. key: 'setActive',
  26696. value: function setActive() {
  26697. var active = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  26698. this._input.checked = active;
  26699. this.classList.toggle('active', active);
  26700. util$1.toggleAttribute(this, 'active', active);
  26701. if (this.hasAttribute('icon') && this.hasAttribute('active-icon')) {
  26702. this._icon.children[0].setAttribute('icon', this.getAttribute(active ? 'active-icon' : 'icon'));
  26703. }
  26704. }
  26705. }, {
  26706. key: '_loadPageElement',
  26707. value: function _loadPageElement(parent, page) {
  26708. var _this3 = this;
  26709. this._hasLoaded = true;
  26710. return new Promise(function (resolve) {
  26711. _this3._pageLoader.load({ parent: parent, page: page }, function (pageElement) {
  26712. parent.replaceChild(pageElement, parent.children[_this3.index]); // Ensure position
  26713. _this3._loadedPage = pageElement;
  26714. resolve(pageElement);
  26715. });
  26716. });
  26717. }
  26718. }, {
  26719. key: 'isActive',
  26720. /**
  26721. * @return {Boolean}
  26722. */
  26723. value: function isActive() {
  26724. return this.classList.contains('active');
  26725. }
  26726. }, {
  26727. key: 'disconnectedCallback',
  26728. value: function disconnectedCallback() {
  26729. this.removeEventListener('click', this._onClick, false);
  26730. if (this._loadedPage) {
  26731. this._hasLoaded = false;
  26732. this.loaded = null;
  26733. }
  26734. }
  26735. }, {
  26736. key: 'connectedCallback',
  26737. value: function connectedCallback() {
  26738. var _this4 = this;
  26739. this.addEventListener('click', this._onClick, false);
  26740. if (!util$1.isAttached(this) || this.loaded) {
  26741. return; // ons-tabbar compilation may trigger this
  26742. }
  26743. var deferred = util$1.defer();
  26744. this.loaded = deferred.promise;
  26745. contentReady(this, function () {
  26746. var index = _this4.index;
  26747. var tabbar = _this4._tabbar;
  26748. if (!tabbar) {
  26749. util$1.throw('Tab elements must be children of Tabbar');
  26750. }
  26751. if (tabbar.hasAttribute('modifier')) {
  26752. util$1.addModifier(_this4, tabbar.getAttribute('modifier'));
  26753. }
  26754. if (!_this4._hasLoaded) {
  26755. if (_this4.hasAttribute('active')) {
  26756. _this4.setActive(true);
  26757. tabbar.setAttribute('activeIndex', index);
  26758. }
  26759. if (index === tabbar.tabs.length - 1) {
  26760. tabbar._onRefresh();
  26761. setImmediate(function () {
  26762. return tabbar._onRefresh();
  26763. });
  26764. }
  26765. TabbarElement.rewritables.ready(tabbar, function () {
  26766. var pageTarget = _this4.page || _this4.getAttribute('page');
  26767. if (!_this4.pageElement && pageTarget) {
  26768. var parentTarget = tabbar._targetElement;
  26769. var dummyPage = util$1.create('div', { height: '100%', width: '100%', visibility: 'hidden' });
  26770. parentTarget.insertBefore(dummyPage, parentTarget.children[index]); // Ensure position
  26771. var load = function load() {
  26772. return _this4._loadPageElement(parentTarget, pageTarget).then(deferred.resolve);
  26773. };
  26774. return _this4.isActive() ? load() : tabbar._loadInactive.promise.then(load);
  26775. }
  26776. return deferred.resolve(_this4.pageElement);
  26777. });
  26778. }
  26779. });
  26780. }
  26781. }, {
  26782. key: 'attributeChangedCallback',
  26783. value: function attributeChangedCallback(name, last, current) {
  26784. var _this5 = this;
  26785. switch (name) {
  26786. case 'class':
  26787. util$1.restoreClass(this, defaultClassName$16, scheme$29);
  26788. break;
  26789. case 'modifier':
  26790. contentReady(this, function () {
  26791. return ModifierUtil.onModifierChanged(last, current, _this5, scheme$29);
  26792. });
  26793. break;
  26794. case 'ripple':
  26795. contentReady(this, function () {
  26796. return _this5._updateRipple();
  26797. });
  26798. break;
  26799. case 'icon':
  26800. case 'label':
  26801. case 'badge':
  26802. contentReady(this, function () {
  26803. return _this5._updateButtonContent();
  26804. });
  26805. break;
  26806. case 'page':
  26807. this.page = current || '';
  26808. break;
  26809. }
  26810. }
  26811. }, {
  26812. key: 'pageLoader',
  26813. set: function set$$1(loader) {
  26814. if (!(loader instanceof PageLoader)) {
  26815. util$1.throwPageLoader();
  26816. }
  26817. this._pageLoader = loader;
  26818. },
  26819. get: function get$$1() {
  26820. return this._pageLoader;
  26821. }
  26822. }, {
  26823. key: '_input',
  26824. get: function get$$1() {
  26825. return util$1.findChild(this, 'input');
  26826. }
  26827. }, {
  26828. key: '_button',
  26829. get: function get$$1() {
  26830. return util$1.findChild(this, '.tabbar__button');
  26831. }
  26832. }, {
  26833. key: '_icon',
  26834. get: function get$$1() {
  26835. return this.querySelector('.tabbar__icon');
  26836. }
  26837. }, {
  26838. key: '_tabbar',
  26839. get: function get$$1() {
  26840. return util$1.findParent(this, 'ons-tabbar');
  26841. }
  26842. }, {
  26843. key: 'index',
  26844. get: function get$$1() {
  26845. return Array.prototype.indexOf.call(this.parentElement.children, this);
  26846. }
  26847. }, {
  26848. key: 'pageElement',
  26849. get: function get$$1() {
  26850. // It has been loaded by ons-tab
  26851. if (this._loadedPage) {
  26852. return this._loadedPage;
  26853. }
  26854. // Manually attached to DOM, 1 per tab
  26855. var tabbar = this._tabbar;
  26856. if (tabbar.pages.length === tabbar.tabs.length) {
  26857. return tabbar.pages[this.index];
  26858. }
  26859. // Loaded in another way
  26860. return null;
  26861. }
  26862. }], [{
  26863. key: 'observedAttributes',
  26864. get: function get$$1() {
  26865. return ['modifier', 'ripple', 'icon', 'label', 'page', 'badge', 'class'];
  26866. }
  26867. }]);
  26868. return TabElement;
  26869. }(BaseElement);
  26870. onsElements.Tab = TabElement;
  26871. customElements.define('ons-tab', TabElement);
  26872. /*
  26873. Copyright 2013-2015 ASIAL CORPORATION
  26874. Licensed under the Apache License, Version 2.0 (the "License");
  26875. you may not use this file except in compliance with the License.
  26876. You may obtain a copy of the License at
  26877. http://www.apache.org/licenses/LICENSE-2.0
  26878. Unless required by applicable law or agreed to in writing, software
  26879. distributed under the License is distributed on an "AS IS" BASIS,
  26880. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26881. See the License for the specific language governing permissions and
  26882. limitations under the License.
  26883. */
  26884. var ToastAnimator = function (_BaseAnimator) {
  26885. inherits(ToastAnimator, _BaseAnimator);
  26886. /**
  26887. * @param {Object} options
  26888. * @param {String} options.timing
  26889. * @param {Number} options.duration
  26890. * @param {Number} options.delay
  26891. */
  26892. function ToastAnimator() {
  26893. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26894. _ref$timing = _ref.timing,
  26895. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  26896. _ref$delay = _ref.delay,
  26897. delay = _ref$delay === undefined ? 0 : _ref$delay,
  26898. _ref$duration = _ref.duration,
  26899. duration = _ref$duration === undefined ? 0.2 : _ref$duration;
  26900. classCallCheck(this, ToastAnimator);
  26901. return possibleConstructorReturn(this, (ToastAnimator.__proto__ || Object.getPrototypeOf(ToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  26902. }
  26903. /**
  26904. * @param {HTMLElement} modal
  26905. * @param {Function} callback
  26906. */
  26907. createClass(ToastAnimator, [{
  26908. key: 'show',
  26909. value: function show(modal, callback) {
  26910. callback();
  26911. }
  26912. /**
  26913. * @param {HTMLElement} modal
  26914. * @param {Function} callback
  26915. */
  26916. }, {
  26917. key: 'hide',
  26918. value: function hide(modal, callback) {
  26919. callback();
  26920. }
  26921. }]);
  26922. return ToastAnimator;
  26923. }(BaseAnimator);
  26924. /*
  26925. Copyright 2013-2015 ASIAL CORPORATION
  26926. Licensed under the Apache License, Version 2.0 (the "License");
  26927. you may not use this file except in compliance with the License.
  26928. You may obtain a copy of the License at
  26929. http://www.apache.org/licenses/LICENSE-2.0
  26930. Unless required by applicable law or agreed to in writing, software
  26931. distributed under the License is distributed on an "AS IS" BASIS,
  26932. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26933. See the License for the specific language governing permissions and
  26934. limitations under the License.
  26935. */
  26936. /**
  26937. * iOS style animator for dialog.
  26938. */
  26939. var FadeToastAnimator = function (_ToastAnimator) {
  26940. inherits(FadeToastAnimator, _ToastAnimator);
  26941. function FadeToastAnimator() {
  26942. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  26943. _ref$timing = _ref.timing,
  26944. timing = _ref$timing === undefined ? 'linear' : _ref$timing,
  26945. _ref$delay = _ref.delay,
  26946. delay = _ref$delay === undefined ? 0 : _ref$delay,
  26947. _ref$duration = _ref.duration,
  26948. duration = _ref$duration === undefined ? 0.3 : _ref$duration;
  26949. classCallCheck(this, FadeToastAnimator);
  26950. return possibleConstructorReturn(this, (FadeToastAnimator.__proto__ || Object.getPrototypeOf(FadeToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  26951. }
  26952. /**
  26953. * @param {HTMLElement} toast
  26954. * @param {Function} callback
  26955. */
  26956. createClass(FadeToastAnimator, [{
  26957. key: 'show',
  26958. value: function show(toast, callback) {
  26959. callback = callback ? callback : function () {};
  26960. Animit(toast, this.def).default({ opacity: 0 }, { opacity: 1 }).queue(function (done) {
  26961. callback();
  26962. done();
  26963. }).play();
  26964. }
  26965. /**
  26966. * @param {HTMLElement} toast
  26967. * @param {Function} callback
  26968. */
  26969. }, {
  26970. key: 'hide',
  26971. value: function hide(toast, callback) {
  26972. callback = callback ? callback : function () {};
  26973. Animit(toast, this.def).default({ opacity: 1 }, { opacity: 0 }).queue(function (done) {
  26974. callback();
  26975. done();
  26976. }).play();
  26977. }
  26978. }]);
  26979. return FadeToastAnimator;
  26980. }(ToastAnimator);
  26981. /*
  26982. Copyright 2013-2015 ASIAL CORPORATION
  26983. Licensed under the Apache License, Version 2.0 (the "License");
  26984. you may not use this file except in compliance with the License.
  26985. You may obtain a copy of the License at
  26986. http://www.apache.org/licenses/LICENSE-2.0
  26987. Unless required by applicable law or agreed to in writing, software
  26988. distributed under the License is distributed on an "AS IS" BASIS,
  26989. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  26990. See the License for the specific language governing permissions and
  26991. limitations under the License.
  26992. */
  26993. /**
  26994. * Ascend Toast Animator.
  26995. */
  26996. var AscendToastAnimator = function (_ToastAnimator) {
  26997. inherits(AscendToastAnimator, _ToastAnimator);
  26998. function AscendToastAnimator() {
  26999. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27000. _ref$timing = _ref.timing,
  27001. timing = _ref$timing === undefined ? 'ease' : _ref$timing,
  27002. _ref$delay = _ref.delay,
  27003. delay = _ref$delay === undefined ? 0 : _ref$delay,
  27004. _ref$duration = _ref.duration,
  27005. duration = _ref$duration === undefined ? 0.25 : _ref$duration;
  27006. classCallCheck(this, AscendToastAnimator);
  27007. var _this = possibleConstructorReturn(this, (AscendToastAnimator.__proto__ || Object.getPrototypeOf(AscendToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  27008. _this.messageDelay = _this.duration * 0.4 + _this.delay; // Delay message opacity change
  27009. if (platform.isAndroid()) {
  27010. _this.ascension = 48; // Toasts are always 1 line
  27011. } else {
  27012. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27013. _this.ascension = 98; // 64 + 34
  27014. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  27015. _this.ascension = 85; // 64 + 21
  27016. } else {
  27017. _this.ascension = 64;
  27018. }
  27019. }
  27020. return _this;
  27021. }
  27022. /**
  27023. * @param {HTMLElement} toast
  27024. * @param {Function} callback
  27025. */
  27026. createClass(AscendToastAnimator, [{
  27027. key: 'show',
  27028. value: function show(toast, callback) {
  27029. toast = toast._toast;
  27030. util$1.globals.fabOffset = this.ascension;
  27031. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, ' + this.ascension + 'px, 0)' }, { transform: 'translate3d(0, 0, 0)' }).queue(function (done) {
  27032. callback && callback();
  27033. done();
  27034. }), Animit(this._getFabs()).wait(this.delay).queue({ transform: 'translate3d(0, -' + this.ascension + 'px, 0) scale(1)' }, this.def), Animit(util$1.arrayFrom(toast.children), this.def).default({ opacity: 0 }, { opacity: 1 }));
  27035. }
  27036. /**
  27037. * @param {HTMLElement} toast
  27038. * @param {Function} callback
  27039. */
  27040. }, {
  27041. key: 'hide',
  27042. value: function hide(toast, callback) {
  27043. toast = toast._toast;
  27044. util$1.globals.fabOffset = 0;
  27045. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, 0, 0)' }, { transform: 'translate3d(0, ' + this.ascension + 'px, 0)' }).queue(function (done) {
  27046. callback && callback();
  27047. done();
  27048. }), Animit(this._getFabs(), this.def).wait(this.delay).queue({ transform: 'translate3d(0, 0, 0) scale(1)' }, this.def), Animit(util$1.arrayFrom(toast.children), this.def).default({ opacity: 1 }, { opacity: 0 }));
  27049. }
  27050. }, {
  27051. key: '_getFabs',
  27052. value: function _getFabs() {
  27053. return util$1.arrayFrom(document.querySelectorAll('ons-fab[position~=bottom], ons-speed-dial[position~=bottom]')).filter(function (fab) {
  27054. return fab.visible;
  27055. });
  27056. }
  27057. }]);
  27058. return AscendToastAnimator;
  27059. }(ToastAnimator);
  27060. /*
  27061. Copyright 2013-2015 ASIAL CORPORATION
  27062. Licensed under the Apache License, Version 2.0 (the "License");
  27063. you may not use this file except in compliance with the License.
  27064. You may obtain a copy of the License at
  27065. http://www.apache.org/licenses/LICENSE-2.0
  27066. Unless required by applicable law or agreed to in writing, software
  27067. distributed under the License is distributed on an "AS IS" BASIS,
  27068. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27069. See the License for the specific language governing permissions and
  27070. limitations under the License.
  27071. */
  27072. /**
  27073. * Lift-fade Toast Animator
  27074. */
  27075. var LiftToastAnimator = function (_ToastAnimator) {
  27076. inherits(LiftToastAnimator, _ToastAnimator);
  27077. function LiftToastAnimator() {
  27078. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27079. _ref$timing = _ref.timing,
  27080. timing = _ref$timing === undefined ? 'ease' : _ref$timing,
  27081. _ref$delay = _ref.delay,
  27082. delay = _ref$delay === undefined ? 0 : _ref$delay,
  27083. _ref$duration = _ref.duration,
  27084. duration = _ref$duration === undefined ? 0.35 : _ref$duration;
  27085. classCallCheck(this, LiftToastAnimator);
  27086. var _this = possibleConstructorReturn(this, (LiftToastAnimator.__proto__ || Object.getPrototypeOf(LiftToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  27087. _this.bodyHeight = document.body.clientHeight; // avoid Forced Synchronous Layout
  27088. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27089. _this.liftAmount = 'calc(100% + 34px)';
  27090. } else if (iPhoneXPatch.isIPhoneXLandscapePatchActive()) {
  27091. _this.liftAmount = 'calc(100% + 21px)';
  27092. } else {
  27093. _this.liftAmount = '100%';
  27094. }
  27095. return _this;
  27096. }
  27097. /**
  27098. * @param {HTMLElement} toast
  27099. * @param {Function} callback
  27100. */
  27101. createClass(LiftToastAnimator, [{
  27102. key: 'show',
  27103. value: function show(toast, callback) {
  27104. toast = toast._toast;
  27105. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, ' + this.liftAmount + ', 0)', opacity: 0 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }).queue(function (done) {
  27106. callback && callback();
  27107. done();
  27108. }));
  27109. }
  27110. /**
  27111. * @param {HTMLElement} toast
  27112. * @param {Function} callback
  27113. */
  27114. }, {
  27115. key: 'hide',
  27116. value: function hide(toast, callback) {
  27117. toast = toast._toast;
  27118. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 1 }, { transform: 'translate3d(0, ' + this.liftAmount + ', 0)', opacity: 0 }).queue(function (done) {
  27119. callback && callback();
  27120. done();
  27121. }));
  27122. }
  27123. }, {
  27124. key: '_updatePosition',
  27125. value: function _updatePosition(toast) {
  27126. if (parseInt(toast.style.top, 10) === 0) {
  27127. toast.style.top = toast.style.bottom = '';
  27128. }
  27129. }
  27130. }]);
  27131. return LiftToastAnimator;
  27132. }(ToastAnimator);
  27133. /*
  27134. Copyright 2013-2015 ASIAL CORPORATION
  27135. Licensed under the Apache License, Version 2.0 (the "License");
  27136. you may not use this file except in compliance with the License.
  27137. You may obtain a copy of the License at
  27138. http://www.apache.org/licenses/LICENSE-2.0
  27139. Unless required by applicable law or agreed to in writing, software
  27140. distributed under the License is distributed on an "AS IS" BASIS,
  27141. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27142. See the License for the specific language governing permissions and
  27143. limitations under the License.
  27144. */
  27145. /**
  27146. * Fall-fade Toast Animator
  27147. */
  27148. var FallToastAnimator = function (_ToastAnimator) {
  27149. inherits(FallToastAnimator, _ToastAnimator);
  27150. function FallToastAnimator() {
  27151. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  27152. _ref$timing = _ref.timing,
  27153. timing = _ref$timing === undefined ? 'ease' : _ref$timing,
  27154. _ref$delay = _ref.delay,
  27155. delay = _ref$delay === undefined ? 0 : _ref$delay,
  27156. _ref$duration = _ref.duration,
  27157. duration = _ref$duration === undefined ? 0.35 : _ref$duration;
  27158. classCallCheck(this, FallToastAnimator);
  27159. var _this = possibleConstructorReturn(this, (FallToastAnimator.__proto__ || Object.getPrototypeOf(FallToastAnimator)).call(this, { timing: timing, delay: delay, duration: duration }));
  27160. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27161. _this.fallAmount = 'calc(-100% - 44px)';
  27162. } else {
  27163. _this.fallAmount = '-100%';
  27164. }
  27165. return _this;
  27166. }
  27167. /**
  27168. * @param {HTMLElement} toast
  27169. * @param {Function} callback
  27170. */
  27171. createClass(FallToastAnimator, [{
  27172. key: 'show',
  27173. value: function show(toast, callback) {
  27174. toast = toast._toast;
  27175. this._updatePosition(toast);
  27176. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, ' + this.fallAmount + ', 0)', opacity: 0 }, { transform: 'translate3d(0, 0, 0)', opacity: 1 }).queue(function (done) {
  27177. callback && callback();
  27178. done();
  27179. }));
  27180. }
  27181. /**
  27182. * @param {HTMLElement} toast
  27183. * @param {Function} callback
  27184. */
  27185. }, {
  27186. key: 'hide',
  27187. value: function hide(toast, callback) {
  27188. var _this2 = this;
  27189. toast = toast._toast;
  27190. this._updatePosition(toast);
  27191. Animit.runAll(Animit(toast, this.def).default({ transform: 'translate3d(0, 0, 0)', opacity: 1 }, { transform: 'translate3d(0, ' + this.fallAmount + ', 0)', opacity: 0 }).queue(function (done) {
  27192. _this2._updatePosition(toast, true);
  27193. callback && callback();
  27194. done();
  27195. }));
  27196. }
  27197. }, {
  27198. key: '_updatePosition',
  27199. value: function _updatePosition(toast, cleanUp) {
  27200. var correctTop = void 0;
  27201. if (iPhoneXPatch.isIPhoneXPortraitPatchActive()) {
  27202. correctTop = '44px';
  27203. } else {
  27204. correctTop = '0';
  27205. }
  27206. if (toast.style.top !== correctTop) {
  27207. toast.style.top = correctTop;
  27208. toast.style.bottom = 'initial';
  27209. }
  27210. }
  27211. }]);
  27212. return FallToastAnimator;
  27213. }(ToastAnimator);
  27214. /*
  27215. Copyright 2013-2015 ASIAL CORPORATION
  27216. Licensed under the Apache License, Version 2.0 (the "License");
  27217. you may not use this file except in compliance with the License.
  27218. You may obtain a copy of the License at
  27219. http://www.apache.org/licenses/LICENSE-2.0
  27220. Unless required by applicable law or agreed to in writing, software
  27221. distributed under the License is distributed on an "AS IS" BASIS,
  27222. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27223. See the License for the specific language governing permissions and
  27224. limitations under the License.
  27225. */
  27226. var scheme$31 = {
  27227. '.toast': 'toast--*',
  27228. '.toast__message': 'toast--*__message',
  27229. '.toast__button': 'toast--*__button'
  27230. };
  27231. var defaultClassName$17 = 'toast';
  27232. var _animatorDict$8 = {
  27233. 'default': platform.isAndroid() ? AscendToastAnimator : LiftToastAnimator,
  27234. 'fade': FadeToastAnimator,
  27235. 'ascend': AscendToastAnimator,
  27236. 'lift': LiftToastAnimator,
  27237. 'fall': FallToastAnimator,
  27238. 'none': ToastAnimator
  27239. };
  27240. /**
  27241. * @element ons-toast
  27242. * @category dialog
  27243. * @description
  27244. * [en]
  27245. * The Toast or Snackbar component is useful for displaying dismissable information or simple actions at (normally) the bottom of the page.
  27246. *
  27247. * This component does not block user input, allowing the app to continue its flow. For simple toasts, consider `ons.notification.toast` instead.
  27248. * [/en]
  27249. * [ja][/ja]
  27250. * @tutorial vanilla/Reference/toast
  27251. * @seealso ons-alert-dialog
  27252. * [en]The `<ons-alert-dialog>` component is preferred for displaying undismissable information.[/en]
  27253. * [ja][/ja]
  27254. */
  27255. var ToastElement = function (_BaseDialogElement) {
  27256. inherits(ToastElement, _BaseDialogElement);
  27257. /**
  27258. * @attribute animation
  27259. * @type {String}
  27260. * @default default
  27261. * @description
  27262. * [en]The animation used when showing and hiding the toast. Can be either `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27263. * [ja][/ja]
  27264. */
  27265. /**
  27266. * @attribute animation-options
  27267. * @type {Expression}
  27268. * @description
  27269. * [en]Specify the animation's duration, timing and delay with an object literal. E.g. `{duration: 0.2, delay: 1, timing: 'ease-in'}`.[/en]
  27270. * [ja]アニメーション時のduration, timing, delayをオブジェクトリテラルで指定します。e.g. <code>{duration: 0.2, delay: 1, timing: 'ease-in'}</code>[/ja]
  27271. */
  27272. function ToastElement() {
  27273. classCallCheck(this, ToastElement);
  27274. var _this = possibleConstructorReturn(this, (ToastElement.__proto__ || Object.getPrototypeOf(ToastElement)).call(this));
  27275. _this._defaultDBB = null;
  27276. contentReady(_this, function () {
  27277. return _this._compile();
  27278. });
  27279. return _this;
  27280. }
  27281. createClass(ToastElement, [{
  27282. key: '_updateAnimatorFactory',
  27283. value: function _updateAnimatorFactory() {
  27284. // Reset position style
  27285. this._toast && (this._toast.style.top = this._toast.style.bottom = '');
  27286. return new AnimatorFactory({
  27287. animators: _animatorDict$8,
  27288. baseClass: ToastAnimator,
  27289. baseClassName: 'ToastAnimator',
  27290. defaultAnimation: this.getAttribute('animation')
  27291. });
  27292. }
  27293. /**
  27294. * @property onDeviceBackButton
  27295. * @type {Object}
  27296. * @description
  27297. * [en]Back-button handler.[/en]
  27298. * [ja]バックボタンハンドラ。[/ja]
  27299. */
  27300. }, {
  27301. key: '_compile',
  27302. value: function _compile() {
  27303. autoStyle.prepare(this);
  27304. this.style.display = 'none';
  27305. this.style.zIndex = 10000; // Lower than dialogs
  27306. var messageClassName = 'toast__message';
  27307. var buttonClassName = 'toast__button';
  27308. var toast = util$1.findChild(this, '.' + defaultClassName$17);
  27309. if (!toast) {
  27310. toast = document.createElement('div');
  27311. toast.classList.add(defaultClassName$17);
  27312. while (this.childNodes[0]) {
  27313. toast.appendChild(this.childNodes[0]);
  27314. }
  27315. }
  27316. var button = util$1.findChild(toast, '.' + buttonClassName);
  27317. if (!button) {
  27318. button = util$1.findChild(toast, function (e) {
  27319. return util$1.match(e, '.button') || util$1.match(e, 'button');
  27320. });
  27321. if (button) {
  27322. button.classList.remove('button');
  27323. button.classList.add(buttonClassName);
  27324. toast.appendChild(button);
  27325. }
  27326. }
  27327. if (!util$1.findChild(toast, '.' + messageClassName)) {
  27328. var message = util$1.findChild(toast, '.message');
  27329. if (!message) {
  27330. message = document.createElement('div');
  27331. for (var i = toast.childNodes.length - 1; i >= 0; i--) {
  27332. if (toast.childNodes[i] !== button) {
  27333. message.insertBefore(toast.childNodes[i], message.firstChild);
  27334. }
  27335. }
  27336. }
  27337. message.classList.add(messageClassName);
  27338. toast.insertBefore(message, toast.firstChild);
  27339. }
  27340. if (toast.parentNode !== this) {
  27341. this.appendChild(toast);
  27342. }
  27343. ModifierUtil.initModifier(this, this._scheme);
  27344. }
  27345. /**
  27346. * @property visible
  27347. * @readonly
  27348. * @type {Boolean}
  27349. * @description
  27350. * [en]Whether the element is visible or not.[/en]
  27351. * [ja]要素が見える場合に`true`。[/ja]
  27352. */
  27353. /**
  27354. * @method show
  27355. * @signature show([options])
  27356. * @param {Object} [options]
  27357. * [en]Parameter object.[/en]
  27358. * [ja]オプションを指定するオブジェクト。[/ja]
  27359. * @param {String} [options.animation]
  27360. * [en]Animation name. Available animations are `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27361. * [ja][/ja]
  27362. * @param {String} [options.animationOptions]
  27363. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  27364. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  27365. * @description
  27366. * [en]Show the element.[/en]
  27367. * [ja][/ja]
  27368. * @return {Promise}
  27369. * [en]Resolves to the displayed element[/en]
  27370. * [ja][/ja]
  27371. */
  27372. /**
  27373. * @method toggle
  27374. * @signature toggle([options])
  27375. * @param {Object} [options]
  27376. * [en]Parameter object.[/en]
  27377. * [ja]オプションを指定するオブジェクト。[/ja]
  27378. * @param {String} [options.animation]
  27379. * [en]Animation name. Available animations are `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27380. * [ja][/ja]
  27381. * @param {String} [options.animationOptions]
  27382. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  27383. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  27384. * @description
  27385. * [en]Toggle toast visibility.[/en]
  27386. * [ja][/ja]
  27387. */
  27388. /**
  27389. * @method hide
  27390. * @signature hide([options])
  27391. * @param {Object} [options]
  27392. * [en]Parameter object.[/en]
  27393. * [ja]オプションを指定するオブジェクト。[/ja]
  27394. * @param {String} [options.animation]
  27395. * [en]Animation name. Available animations are `"default"`, `"ascend"` (Android), `"lift"` (iOS), `"fall"`, `"fade"` or `"none"`.[/en]
  27396. * [ja][/ja]
  27397. * @param {String} [options.animationOptions]
  27398. * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]
  27399. * [ja]アニメーション時のduration, delay, timingを指定します。e.g. {duration: 0.2, delay: 0.4, timing: 'ease-in'}[/ja]
  27400. * @description
  27401. * [en]Hide toast.[/en]
  27402. * [ja][/ja]
  27403. * @return {Promise}
  27404. * [en]Resolves to the hidden element[/en]
  27405. * [ja][/ja]
  27406. */
  27407. /**
  27408. * @param {String} name
  27409. * @param {Function} Animator
  27410. */
  27411. }, {
  27412. key: '_scheme',
  27413. get: function get$$1() {
  27414. return scheme$31;
  27415. }
  27416. }, {
  27417. key: '_toast',
  27418. get: function get$$1() {
  27419. return util$1.findChild(this, '.' + defaultClassName$17);
  27420. }
  27421. }], [{
  27422. key: 'registerAnimator',
  27423. value: function registerAnimator(name, Animator) {
  27424. if (!(Animator.prototype instanceof ToastAnimator)) {
  27425. util$1.throw('"Animator" param must inherit OnsToastElement.ToastAnimator');
  27426. }
  27427. _animatorDict$8[name] = Animator;
  27428. }
  27429. }, {
  27430. key: 'animators',
  27431. get: function get$$1() {
  27432. return _animatorDict$8;
  27433. }
  27434. }, {
  27435. key: 'ToastAnimator',
  27436. get: function get$$1() {
  27437. return ToastAnimator;
  27438. }
  27439. }]);
  27440. return ToastElement;
  27441. }(BaseDialogElement);
  27442. onsElements.Toast = ToastElement;
  27443. customElements.define('ons-toast', ToastElement);
  27444. /*
  27445. Copyright 2013-2015 ASIAL CORPORATION
  27446. Licensed under the Apache License, Version 2.0 (the "License");
  27447. you may not use this file except in compliance with the License.
  27448. You may obtain a copy of the License at
  27449. http://www.apache.org/licenses/LICENSE-2.0
  27450. Unless required by applicable law or agreed to in writing, software
  27451. distributed under the License is distributed on an "AS IS" BASIS,
  27452. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  27453. See the License for the specific language governing permissions and
  27454. limitations under the License.
  27455. */
  27456. /**
  27457. * @element ons-toolbar-button
  27458. * @category page
  27459. * @modifier material
  27460. * [en]Material Design toolbar button.[/en]
  27461. * [ja][/ja]
  27462. * @modifier outline
  27463. * [en]A button with an outline.[/en]
  27464. * [ja]アウトラインをもったボタンを表示します。[/ja]
  27465. * @description
  27466. * [en]Button component for ons-toolbar and ons-bottom-toolbar.[/en]
  27467. * [ja]ons-toolbarあるいはons-bottom-toolbarに設置できるボタン用コンポーネントです。[/ja]
  27468. * @codepen aHmGL
  27469. * @tutorial vanilla/Reference/page
  27470. * @guide compilation.html#toolbar-compilation
  27471. * [en]Adding a toolbar[/en]
  27472. * [ja]ツールバーの追加[/ja]
  27473. * @seealso ons-toolbar
  27474. * [en]The `<ons-toolbar>` component displays a navigation bar at the top of a page.[/en]
  27475. * [ja]ons-toolbarコンポーネント[/ja]
  27476. * @seealso ons-back-button
  27477. * [en]The `<ons-back-button>` displays a back button in the navigation bar.[/en]
  27478. * [ja]ons-back-buttonコンポーネント[/ja]
  27479. * @example
  27480. * <ons-toolbar>
  27481. * <div class="left">
  27482. * <ons-toolbar-button>
  27483. * Button
  27484. * </ons-toolbar-button>
  27485. * </div>
  27486. * <div class="center">
  27487. * Title
  27488. * </div>
  27489. * <div class="right">
  27490. * <ons-toolbar-button>
  27491. * <ons-icon icon="ion-navicon" size="28px"></ons-icon>
  27492. * </ons-toolbar-button>
  27493. * </div>
  27494. * </ons-toolbar>
  27495. */
  27496. var ToolbarButtonElement = function (_BaseButtonElement) {
  27497. inherits(ToolbarButtonElement, _BaseButtonElement);
  27498. function ToolbarButtonElement() {
  27499. classCallCheck(this, ToolbarButtonElement);
  27500. return possibleConstructorReturn(this, (ToolbarButtonElement.__proto__ || Object.getPrototypeOf(ToolbarButtonElement)).apply(this, arguments));
  27501. }
  27502. createClass(ToolbarButtonElement, [{
  27503. key: '_scheme',
  27504. /**
  27505. * @attribute modifier
  27506. * @type {String}
  27507. * @description
  27508. * [en]The appearance of the button.[/en]
  27509. * [ja]ボタンの表現を指定します。[/ja]
  27510. */
  27511. /**
  27512. * @attribute icon
  27513. * @type {String}
  27514. * @description
  27515. * [en]Creates an `ons-icon` component with this string.[/en]
  27516. * [ja]`ons-icon`コンポーネントを悪性します。[/ja]
  27517. */
  27518. /**
  27519. * @attribute disabled
  27520. * @description
  27521. * [en]Specify if button should be disabled.[/en]
  27522. * [ja]ボタンを無効化する場合は指定してください。[/ja]
  27523. */
  27524. /**
  27525. * @property disabled
  27526. * @type {Boolean}
  27527. * @description
  27528. * [en]Whether the element is disabled or not.[/en]
  27529. * [ja]無効化されている場合に`true`。[/ja]
  27530. */
  27531. get: function get$$1() {
  27532. return { '': 'toolbar-button--*' };
  27533. }
  27534. }, {
  27535. key: '_defaultClassName',
  27536. get: function get$$1() {
  27537. return 'toolbar-button';
  27538. }
  27539. }, {
  27540. key: '_rippleOpt',
  27541. get: function get$$1() {
  27542. return [this, undefined, { center: '', 'size': 'contain', 'background': 'transparent' }];
  27543. }
  27544. }]);
  27545. return ToolbarButtonElement;
  27546. }(BaseButtonElement);
  27547. onsElements.ToolbarButton = ToolbarButtonElement;
  27548. customElements.define('ons-toolbar-button', ToolbarButtonElement);
  27549. // Add and register Custom Elements
  27550. setup$1(ons$1); // Setup initial listeners
  27551. window._superSecretOns = ons$1;
  27552. return ons$1;
  27553. })));
  27554. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25zZW51aS5qcyIsInNvdXJjZXMiOlsiLi4vLi4vY29yZS9zcmMvb25zL2VsZW1lbnRzLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL3N0eWxlci5qcyIsIi4uLy4uL2NvcmUvc3JjL29ucy9wbGF0Zm9ybS5qcyIsIi4uLy4uL2NvcmUvc3JjL29ucy9wYWdlLWF0dHJpYnV0ZS1leHByZXNzaW9uLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL2ludGVybmFsL2ludGVybmFsLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL2ludGVybmFsL2FuaW1hdG9yLWZhY3RvcnkuanMiLCIuLi8uLi9jb3JlL3NyYy9vbnMvYXV0b3N0eWxlLmpzIiwiLi4vLi4vY29yZS9zcmMvb25zL2ludGVybmFsL21vZGlmaWVyLXV0aWwuanMiLCIuLi8uLi9jb3JlL3NyYy9v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mN0aW9uKHBhcnQpIHtcbiAgICBsZXQgYyxcbiAgICAgIGluSW50ZXJwb2xhdGlvbiA9IGZhbHNlLFxuICAgICAgY3VycmVudEluZGV4ID0gMDtcblxuICAgIGNvbnN0IHRva2VucyA9IFtdO1xuXG4gICAgaWYgKHBhcnQubGVuZ3RoID09PSAwKSB7XG4gICAgICBlcnJvcignVW5hYmxlIHRvIHBhcnNlIGVtcHR5IHN0cmluZycpO1xuICAgIH1cblxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFydC5sZW5ndGg7IGkrKykge1xuICAgICAgYyA9IHBhcnQuY2hhckF0KGkpO1xuXG4gICAgICBpZiAoYyA9PT0gJyQnICYmIHBhcnQuY2hhckF0KGkgKyAxKSA9PT0gJ3snKSB7XG4gICAgICAgIGlmIChpbkludGVycG9sYXRpb24pIHtcbiAgICAgICAgICBlcnJvcignTmVzdGVkIGludGVycG9sYXRpb24gbm90IHN1cHBvcnRlZCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdG9rZW4gPSBwYXJ0LnN1YnN0cmluZyhjdXJyZW50SW5kZXgsIGkpO1xuICAgICAgICBpZiAodG9rZW4ubGVuZ3RoID4gMCkge1xuICAgICAgICAgIHRva2Vucy5wdXNoKHBhcnQuc3Vic3RyaW5nKGN1cnJlbnRJbmRleCwgaSkpO1xuICAgICAgICB9XG5cbiAgICAgICAgY3VycmVudEluZGV4ID0gaTtcbiAgICAgICAgaW5JbnRlcnBvbGF0aW9uID0gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGVsc2UgaWYgKGMgPT09ICd9Jykge1xuICAgICAgICBpZiAoIWluSW50ZXJwb2xhdGlvbikge1xuICAgICAgICAgIGVycm9yKCd9IG11c3QgYmUgcHJlY2VlZGVkIGJ5ICR7Jyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0b2tlbiA9IHBhcnQuc3Vic3RyaW5nKGN1cnJlbnRJbmRleCwgaSArIDEpO1xuICAgICAgICBpZ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ICAgICAgICAgICAgIHJldHVybiBoYW5kbGVyLl9jYWxsYmFjayhjcmVhdGVFdmVudChwYXJlbnQpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBhcmVudCA9IHBhcmVudC5wYXJlbnROb2RlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG4gIH1cblxuICAvKipcbiAgICogQHJldHVybiB7T2JqZWN0fVxuICAgKi9cbiAgX2NhcHR1cmVUcmVlKCkge1xuICAgIHJldHVybiBjcmVhdGVUcmVlKGRvY3VtZW50LmJvZHkpO1xuXG4gICAgZnVuY3Rpb24gY3JlYXRlVHJlZShlbGVtZW50KSB7XG4gICAgICBjb25zdCB0cmVlID0ge1xuICAgICAgICBlbGVtZW50OiBlbGVtZW50LFxuICAgICAgICBjaGlsZHJlbjogQXJyYXkucHJvdG90eXBlLmNvbmNhdC5hcHBseShbXSwgYXJyYXlPZihlbGVtZW50LmNoaWxkcmVuKS5tYXAoZnVuY3Rpb24oY2hpbGRFbGVtZW50KSB7XG5cbiAgICAgICAgICBpZiAoY2hpbGRFbGVtZW50LnN0eWxlLmRpc3BsYXkgPT09ICdub25lJyB8fCBjaGlsZEVsZW1lbnQuX2lzU2hvd24gPT09IGZhbHNlKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGNoaWxkRWxlbWVudC5jaGlsZHJlbi5sZW5ndGggPT09IDAgJiYgIUhhbmRsZXJSZXBvc2l0b3J5LmhhcyhjaGlsZEVsZW1lbnQpKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlVHJlZShjaGlsZEVsZW1lbnQpO1xuXG4gICAgICAgICAgaWYgKHJlc3VsdC5jaGlsZHJlbi5sZW5ndGggPT09IDAgJiYgIUhhbmRsZXJSZXBvc2l0b3J5LmhhcyhyZXN1bHQ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uYW1lID0gZWxlbWVudC5zdHlsZVtpXTtcbiAgICAgICAgICAgIGlmIChjc3NbbmFtZV0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICBjc3NbbmFtZV0gPSAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBlbGVtZW50LnN0eWxlW3RyYW5zaXRpb25OYW1lXSA9IHRyYW5zaXRpb25WYWx1ZTtcblxuICAgICAgICAgIE9iamVjdC5rZXlzKGNzcykuZm9yRWFjaChmdW5jdGlvbihrZXkpIHtcbiAgICAgICAgICAgIGlmIChrZXkgIT09IHRyYW5zaXRpb25OYW1lKSB7XG4gICAgICAgICAgICAgIGVsZW1lbnQuc3R5bGVba2V5XSA9IGNzc1trZXldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgZWxlbWVudC5zdHlsZVt0cmFuc2l0aW9uTmFtZV0gPSB0cmFuc2l0aW9uVmFsdWU7XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMudHJhbnNpdGlvblF1ZXVlLnB1c2goZnVuY3Rpb24oZG9uZSkge1xuICAgICAgICByZXNldCgpO1xuICAgICAgICBkb25lKCk7XG4gICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcztcblxuICAgIGZ1bmN0aW9uIHJlc2V0KCkge1xuICAgICAgLy8gQ2xlYXIgdHJhbnNpdGlvbiBhbmltYXRpb24gc2V0dGluZ3MuXG4gICAgICBzZWxmLmVsZW1lbnRzLmZvckVhY2goZnVuY3Rpb24oZWxlbWVudCwgaW5kZXgpIHtcbiAgICAgICAgZWxlbWVudC5zdHlsZVt0cmFuc2l0aW9uTmFtZV0gPSAnbm9uZSc7XG5cbiAgICAgICAgdmFyIGNzcyA9IHNlbGYubGFzdFN0eWxlQXR0cmlidXRlRGljdFtpbmRleF07XG5cbiAgICAgICAgaWYgKCFjc3MpIHtcbi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lvbnMuZHVyYXRpb24gKiAxMDAwICogVElNRU9VVF9SQVRJTztcbiAgICAgICAgdmFyIHRpbWVvdXRJZDtcblxuICAgICAgICB2YXIgcmVtb3ZlTGlzdGVuZXJzID0gdXRpbC5vbmNlT25UcmFuc2l0aW9uRW5kKGVsZW1lbnRzWzBdLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICBjbGVhclRpbWVvdXQodGltZW91dElkKTtcbiAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aW1lb3V0SWQgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgIHJlbW92ZUxpc3RlbmVycygpO1xuICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgIH0sIHRpbWVvdXQpO1xuXG4gICAgICAgIGVsZW1lbnRzLmZvckVhY2goZnVuY3Rpb24oZWxlbWVudCkge1xuICAgICAgICAgIGVsZW1lbnQuc3R5bGVbdXRpbC50cmFuc2l0aW9uUHJvcGVydHlOYW1lXSA9IHRyYW5zaXRpb25WYWx1ZTtcblxuICAgICAgICAgIE9iamVjdC5rZXlzKGNzcykuZm9yRWFjaChmdW5jdGlvbihuYW1lKSB7XG4gICAgICAgICAgICBlbGVtZW50LnN0eWxlW25hbWVdID0gY3NzW25hbWVdO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgfTtcbiAgICB9XG5cbiAgICBpZiAodGhpcy5vcHRpb25zLmR1cmF0aW9uIDw9IDApIHtcbiAgICAgIHJldHVybiBmdW5jdGlvbihjYWxsYmFjaykge1xuICAgICAgICB2YXIgZWxlbWVudHMgPSB0aGlzLmVsZW1lbnRzO1xuXG4gICAgICAgIGVsZW1lbnRzLmZvckVhY2goZnVuY3Rpb24oZWxlbWVudCkge1xuICAgICAgICAgIGVsZW1lbnQuc3R5bGVbdXRpbC50cmFuc2l0aW9uUHJvcGVydHlOYW1lXSA9ICcnO1xuXG4gICAgICAgICAgT2JqZ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BbXSxcbiAgICAgICAgcGFnZVkgPSBbXSxcbiAgICAgICAgY2xpZW50WCA9IFtdLFxuICAgICAgICBjbGllbnRZID0gW10sXG4gICAgICAgIG1pbiA9IE1hdGgubWluLFxuICAgICAgICBtYXggPSBNYXRoLm1heDtcblxuICAgIC8vIG5vIG5lZWQgdG8gbG9vcCB3aGVuIG9ubHkgb25lIHRvdWNoXG4gICAgaWYgKHRvdWNoZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBwYWdlWDogdG91Y2hlc1swXS5wYWdlWCxcbiAgICAgICAgcGFnZVk6IHRvdWNoZXNbMF0ucGFnZVksXG4gICAgICAgIGNsaWVudFg6IHRvdWNoZXNbMF0uY2xpZW50WCxcbiAgICAgICAgY2xpZW50WTogdG91Y2hlc1swXS5jbGllbnRZXG4gICAgICB9O1xuICAgIH1cblxuICAgIFV0aWxzLmVhY2godG91Y2hlcywgZnVuY3Rpb24odG91Y2gpIHtcbiAgICAgIHBhZ2VYLnB1c2godG91Y2gucGFnZVgpO1xuICAgICAgcGFnZVkucHVzaCh0b3VjaC5wYWdlWSk7XG4gICAgICBjbGllbnRYLnB1c2godG91Y2guY2xpZW50WCk7XG4gICAgICBjbGllbnRZLnB1c2godG91Y2guY2xpZW50WSk7XG4gICAgfSk7XG5cbiAgICByZXR1cm4ge1xuICAgICAgcGFnZVg6IChtaW4uYXBwbHkoTWF0aCwgcGFnZVgpICsgbWF4LmFwcGx5KE1hdGgsIHBhZ2VYKSkgLyAyLFxuICAgICAgcGFnZVk6IChtaW4uYXBwbHkoTWF0aCwgcGFnZVkpICsgbWF4LmFwcGx5KE1hdGgsIHBhZ2VZKSkgLyAyLFxuICAgICAgY2xpZW50WDogKG1pbi5hcHBseShNYXRoLCBjbGllbnRYKSArIG1heC5hcHBseShNYXRoLCBjbGllbnRYKSkgLyAyLFxuICAgICAgY2xpZW50WTogKG1pbi5hcHBseShNYXRoLCBjbGllbnRZKSArIG1heC5hcHBse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hlIGhvbGQgZXZlbnRcbiAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgIGlmIChjdXJyZW50ICYmIGN1cnJlbnQubmFtZSA9PSBuYW1lKSB7XG4gICAgICAgICAgICBpbnN0LnRyaWdnZXIobmFtZSwgZXYpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSwgb3B0aW9ucy5ob2xkVGltZW91dCk7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIEVWRU5UX01PVkU6XG4gICAgICAgIGlmIChldi5kaXN0YW5jZSA+IG9wdGlvbnMuaG9sZFRocmVzaG9sZCkge1xuICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7XG4gICAgICAgIH1cbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgRVZFTlRfUkVMRUFTRTpcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgfVxuXG4gICAgR2VzdHVyZURldGVjdG9yLmdlc3R1cmVzLkhvbGQgPSB7XG4gICAgICBuYW1lOiBuYW1lLFxuICAgICAgaW5kZXg6IDEwLFxuICAgICAgZGVmYXVsdHM6IHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBwcm9wZXJ0eSBob2xkVGltZW91dFxuICAgICAgICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgICAgICAgKiBAZGVmYXVsdCA1MDBcbiAgICAgICAgICovXG4gICAgICAgIGhvbGRUaW1lb3V0OiA1MDAsXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIG1vdmVtZW50IGFsbG93ZWQgd2hpbGUgaG9sZGluZ1xuICAgICAgICAgKiBAcHJvcGVydHkgaG9sZFRocmVzaG9sZFxuICAgICAgICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgICAgICAgKiBAZGVmYXVsdCAyXG4gICAgICAgICAqL1xuICAgICAgICBob2xkVGhyZXNob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dlc3R1cmUucHJldmVudERlZmF1bHQoKTtcbiAgICogIH0pO1xuICAgKiBgYGBgXG4gICAqXG4gICAqIEBjbGFzcyBTd2lwZVxuICAgKiBAc3RhdGljXG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBlXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldlxuICAgKi9cbiAgLyoqXG4gICAqIEBldmVudCBzd2lwZWxlZnRcbiAgICogQHBhcmFtIHtPYmplY3R9IGV2XG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBlcmlnaHRcbiAgICogQHBhcmFtIHtPYmplY3R9IGV2XG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBldXBcbiAgICogQHBhcmFtIHtPYmplY3R9IGV2XG4gICAqL1xuICAvKipcbiAgICogQGV2ZW50IHN3aXBlZG93blxuICAgKiBAcGFyYW0ge09iamVjdH0gZXZcbiAgICovXG4gIEdlc3R1cmVEZXRlY3Rvci5nZXN0dXJlcy5Td2lwZSA9IHtcbiAgICBuYW1lOiAnc3dpcGUnLFxuICAgIGluZGV4OiA0MCxcbiAgICBkZWZhdWx0czoge1xuICAgICAgLyoqXG4gICAgICAgKiBAcHJvcGVydHkgc3dpcGVNaW5Ub3VjaGVzXG4gICAgICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgICAgICogQGRlZmF1bHQgMVxuICAgICAgICovXG4gICAgICBzd2lwZU1pblRvdWNoZXM6IDEsXG5cbiAgICAgIC8qKlxuICAgICAgICogQHByb3BlcnR5IHN3aXBlTWF4VG91Y2hlc1xuICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAqIEBkZWZhdWx0IDFcbiAgICAgICAqL1xuICAgICAgc3dpcGVNYXhUb3VjaGVzOiAxLFxuXG4gICAgICAvKipcbiAgICAgICAqIGhvcml6b250YWwgc3dpcGUgdmVsb2NpdHlcbiAgICAgICAqIEBwcm9wZXJ0eSBzd2lwZVZlbG9jaXR5WFxuICAgICAgICogQHR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ICBpbnN0LnRyaWdnZXIoY3VycmVudC5uYW1lLCBldik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH1cblxuICAgIEdlc3R1cmVEZXRlY3Rvci5nZXN0dXJlcy5UYXAgPSB7XG4gICAgICBuYW1lOiBuYW1lLFxuICAgICAgaW5kZXg6IDEwMCxcbiAgICAgIGhhbmRsZXI6IHRhcEdlc3R1cmUsXG4gICAgICBkZWZhdWx0czoge1xuICAgICAgICAvKipcbiAgICAgICAgICogbWF4IHRpbWUgb2YgYSB0YXAsIHRoaXMgaXMgZm9yIHRoZSBzbG93IHRhcHBlcnNcbiAgICAgICAgICogQHByb3BlcnR5IHRhcE1heFRpbWVcbiAgICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAgICogQGRlZmF1bHQgMjUwXG4gICAgICAgICAqL1xuICAgICAgICB0YXBNYXhUaW1lOiAyNTAsXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIG1heCBkaXN0YW5jZSBvZiBtb3ZlbWVudCBvZiBhIHRhcCwgdGhpcyBpcyBmb3IgdGhlIHNsb3cgdGFwcGVyc1xuICAgICAgICAgKiBAcHJvcGVydHkgdGFwTWF4RGlzdGFuY2VcbiAgICAgICAgICogQHR5cGUge051bWJlcn1cbiAgICAgICAgICogQGRlZmF1bHQgMTBcbiAgICAgICAgICovXG4gICAgICAgIHRhcE1heERpc3RhbmNlOiAxMCxcblxuICAgICAgICAvKipcbiAgICAgICAgICogYWx3YXlzIHRyaWdnZXIgdGhlIGB0YXBgIGV2ZW50LCBldmVuIHdoaWxlIGRvdWJsZS10YXBwaW5nXG4gICAgICAgICAqIEBwcm9wZXJ0eSB0YXBBbHdheXNcbiAgICAgICAgICogQHR5cGUge0Jvb2xlYW59XG4gICAgICAgICAqIEBkZWZhdWx0IHRydWVcbiAgICAgICAgICovXG4gICAgICAgIHRhcEFsd2F5czogdHJ1ZSxcblxuICAgICAgICAvKipcbi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44KL44Gf44KB44Gu44Om44O844OG44Kj44Oq44OG44Kj44Oh44K944OD44OJ44KS5Y+O44KB44Gf44Kq44OW44K444Kn44Kv44OI44Gn44GZ44CCWy9qYV1cbiAqIEBleGFtcGxlXG4gKiBvbnMubm90aWZpY2F0aW9uLmFsZXJ0KCdIZWxsbywgd29ybGQhJyk7XG4gKlxuICogb25zLm5vdGlmaWNhdGlvbi5jb25maXJtKCdBcmUgeW91IHJlYWR5PycpXG4gKiAgIC50aGVuKFxuICogICAgIGZ1bmN0aW9uKGFuc3dlcikge1xuICogICAgICAgaWYgKGFuc3dlciA9PT0gMSkge1xuICogICAgICAgICBvbnMubm90aWZpY2F0aW9uLmFsZXJ0KCdMZXRcXCdzIGdvIScpO1xuICogICAgICAgfVxuICogICAgIH1cbiAqICAgKTtcbiAqXG4gKiBvbnMubm90aWZpY2F0aW9uLnByb21wdCgnSG93IG9sZCBhcmUgPycpXG4gKiAgIC50aGVuKFxuICogICAgIGZ1bmN0aW9uKGFnZSkge1xuICogICAgICAgb25zLm5vdGlmaWNhdGlvbi5hbGVydCgnWW91IGFyZSAnICsgYWdlICsgJyB5ZWFycyBvbGQuJyk7XG4gKiAgICAgfVxuICogICApO1xuICovXG5jb25zdCBub3RpZmljYXRpb24gPSB7fTtcblxubm90aWZpY2F0aW9uLl9jcmVhdGVBbGVydERpYWxvZyA9ICguLi5wYXJhbXMpID0+IG5ldyBQcm9taXNlKHJlc29sdmUgPT4ge1xuICBjb25zdCBvcHRpb25zID0gX25vcm1hbGl6ZUFyZ3VtZW50cyguLi5wYXJhbXMpO1xuICB1dGlsLmNoZWNrTWlzc2luZ0ltcG9ydCgnQWxlcnREaWFsb2cnLCAnQWxlcnREaWFsb2dCdXR0b24nKTtcblxuICAvLyBQcm9tcHQgaW5wdXQgc3RyaW5nXG4gIGxldCBpbnB1dFN0cmluZyA9ICcnO1xuICBpZiAob3B0aW9ucy5pc1Byb21wdCkge1xuICAgIGlucHV0U3RyaW5nID0gYFxuICAg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iAoY3VycmVudGx5UnVubmluZ0FUYXNrKSB7XG4gICAgICAgICAgICAvLyBEZWxheSBieSBkb2luZyBhIHNldFRpbWVvdXQuIHNldEltbWVkaWF0ZSB3YXMgdHJpZWQgaW5zdGVhZCwgYnV0IGluIEZpcmVmb3ggNyBpdCBnZW5lcmF0ZWQgYVxuICAgICAgICAgICAgLy8gXCJ0b28gbXVjaCByZWN1cnNpb25cIiBlcnJvci5cbiAgICAgICAgICAgIHNldFRpbWVvdXQocGFydGlhbGx5QXBwbGllZChydW5JZlByZXNlbnQsIGhhbmRsZSksIDApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHRhc2sgPSB0YXNrc0J5SGFuZGxlW2hhbmRsZV07XG4gICAgICAgICAgICBpZiAodGFzaykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IHRydWU7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdGFzaygpO1xuICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFySW1tZWRpYXRlKGhhbmRsZSk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNsZWFySW1tZWRpYXRlKGhhbmRsZSkge1xuICAgICAgICBkZWxldGUgdGFza3NCeUhhbmRsZVtoYW5kbGVdO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIGluc3RhbGxOZXh0VGlja0ltcGxlbWVudGF0aW9uKCkge1xuICAgICAgICBzZXRJbW1lZGlhdGUgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBoYW5kbGUgPSBhZGRGcm9tU2V0SW1tZWRpYXRlQXJndW1lbnRzKGFyZ3VtZW50cyk7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5bqD44GM44KJ44Gq44GE44Oq44K544OI44KS6KGo56S644GX44G+44GZ44CCWy9qYV1cbiAqIEBtb2RpZmllciBub2JvcmRlclxuICogICBbZW5dQSBsaXN0IHdpdGggbm8gYm9yZGVycyBhdCB0aGUgdG9wIGFuZCBib3R0b20uWy9lbl1cbiAqICAgW2phXeODquOCueODiOOBruS4iuS4i+OBruODnOODvOODgOODvOOBjOeEoeOBhOODquOCueODiOOCkuihqOekuuOBl+OBvuOBmeOAglsvamFdXG4gKiBAZGVzY3JpcHRpb25cbiAqICAgW2VuXUNvbXBvbmVudCB0byBkZWZpbmUgYSBsaXN0LCBhbmQgdGhlIGNvbnRhaW5lciBmb3Igb25zLWxpc3QtaXRlbShzKS5bL2VuXVxuICogICBbamFd44Oq44K544OI44KS6KGo54++44GZ44KL44Gf44KB44Gu44Kz44Oz44Od44O844ON44Oz44OI44CCb25zLWxpc3QtaXRlbeOBruOCs+ODs+ODhuODiuOBqOOBl+OBpuS9v+eUqOOBl+OBvuOBmeOAglsvamFdXG4gKiBAc2VlYWxzbyBvbnMtbGlzdC1pdGVtXG4gKiAgIFtlbl1vbnMtbGlzdC1pdGVtIGNvbXBvbmVudFsvZW5dXG4gKiAgIFtqYV1vbnMtbGlzdC1pdGVt44Kz44Oz44Od44O844ON44Oz44OIWy9qYV1cbiAqIEBzZWVhbHNvIG9ucy1saXN0LWhlYWRlclxuICogICBbZW5db25zLWxpc3QtaGVhZGVyIGNvbXBvbmVudFsvZW5dXG4gKiAgIFtqYV1vbnMtbGlzdC1oZWFkZXLjgrPjg7Pjg53jg7zjg43jg7Pjg4hbL2phXVxuICogQHNlZWFsc28gb25zLWxhenktcmVwZWF0XG4gKiAgIFtlbl1vbnMtbGF6eS1yZXBlYXQgY29tcG9uZW50Wy9lbl1cbiAqICAgW2phXW9ucy1sYXp5LXJlcGVhdOOCs+ODs+ODneODvOODjeODs+ODiFsvamFdXG4gKiBAY29kZXBlbiB5eGNDdFxuICogQHR1dG9yaWFsIHZh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vbVRvb2xiYXIsIHRoaXMuZGVjb21wLmxlYXZlLmJhY2tncm91bmQsIHRoaXMuc3dpcGVTaGFkb3ddKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUzZCgke2Rpc3RhbmNlfXB4LCAwLCAwKWBcbiAgICAgICAgICB9KSxcblxuICAgICAgICBhbmltaXQodGhpcy5kZWNvbXAubGVhdmUudG9vbGJhcilcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogLTEgKiBzd2lwZVJhdGlvIC8vIDEgLT4gMFxuICAgICAgICAgIH0pLFxuXG4gICAgICAgIGFuaW1pdCh0aGlzLmRlY29tcC5sZWF2ZS50b29sYmFyQ2VudGVyKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUzZCgkeygxICsgc3dpcGVSYXRpbykgKiAxMjV9JSwgMCwgMClgXG4gICAgICAgICAgfSksXG5cbiAgICAgICAgYW5pbWl0KHRoaXMuZGVjb21wLmxlYXZlLmJhY2tCdXR0b25MYWJlbClcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogLTEgKiBzd2lwZVJhdGlvLCAvLyAxIC0+IDBcbiAgICAgICAgICAgIHRyYW5zZm9ybTogYHRyYW5zbGF0ZTNkKCR7dGhpcy5kZWx0YS50aXRsZSAqICgxICsgc3dpcGVSYXRpbyl9cHgsIDAsIDApYFxuICAgICAgICAgIH0pLFxuXG5cbiAgICAgICAgLyogT3RoZXIgKi9cblxuICAgICAgICBhbmltaXQodGhpcy5zd2lwZVNoYWRvdylcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogLTEgKiBzd2lwZVJhdGlvIC8vIDEgLT4gMFxuICAgICAgICAgIH0pXG4gICAgICApO1xuXG5cbiAgICB9IGVsc2Uge1xuICAgICAgYW5pbWl0L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ICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUzZCgwLCAwLCAwKWBcbiAgICAgICAgICB9LCB0aGlzLm9wdFJlc3RvcmUpLFxuXG4gICAgICAgIGFuaW1pdCh0aGlzLmRlY29tcC5sZWF2ZS50b29sYmFyKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICBvcGFjaXR5OiAxXG4gICAgICAgICAgfSwgdGhpcy5vcHRSZXN0b3JlKSxcblxuICAgICAgICBhbmltaXQodGhpcy5kZWNvbXAubGVhdmUudG9vbGJhckNlbnRlcilcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlM2QoMCwgMCwgMClgXG4gICAgICAgICAgfSwgdGhpcy5vcHRSZXN0b3JlKSxcblxuICAgICAgICBhbmltaXQodGhpcy5kZWNvbXAubGVhdmUuYmFja0J1dHRvbkxhYmVsKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICBvcGFjaXR5OiAxLFxuICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlM2QoMCwgMCwgMClgLFxuICAgICAgICAgICAgdHJhbnNpdGlvbjogYG9wYWNpdHkgJHt0aGlzLmR1cmF0aW9uUmVzdG9yZX1zIGxpbmVhciwgdHJhbnNmb3JtICR7dGhpcy5kdXJhdGlvblJlc3RvcmV9cyAke3RoaXMudGltaW5nU3dpcGV9YFxuICAgICAgICAgIH0pLFxuXG5cbiAgICAgICAgLyogT3RoZXIgKi9cblxuICAgICAgICBhbmltaXQodGhpcy5zd2lwZVNoYWRvdylcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgb3BhY2l0eTogMFxuICAgICAgICAgIH0sIHRoaXMub3B0UmVzdG9yZSlcbiAgICAgICAgICAucXVldWUoZG9uZSA9PiB7XG4gICAgICAgICAgICB0aGlzLl9yZXNldCh0aGlzLnRhcmdldC5lbnRlciwgdGhpcy50YXJnZXQubGVhdmUp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AgICAgYW5pbWl0KFt0aGlzLmRlY29tcC5lbnRlci5jb250ZW50LCB0aGlzLmRlY29tcC5lbnRlci5ib3R0b21Ub29sYmFyLCB0aGlzLmRlY29tcC5lbnRlci5iYWNrZ3JvdW5kXSlcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgdHJhbnNmb3JtOiAndHJhbnNsYXRlM2QoMCwgMCwgMCknLFxuICAgICAgICAgICAgb3BhY2l0eTogMVxuICAgICAgICAgIH0sIHRoaXMub3B0U3dpcGUpLFxuXG4gICAgICAgIGFuaW1pdCh0aGlzLmRlY29tcC5lbnRlci50b29sYmFyQ2VudGVyKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICB0cmFuc2Zvcm06IGB0cmFuc2xhdGUzZCgwLCAwLCAwKWAsXG4gICAgICAgICAgICB0cmFuc2l0aW9uOiBgb3BhY2l0eSAke3RoaXMuZHVyYXRpb25Td2lwZX1zIGxpbmVhciwgdHJhbnNmb3JtICR7dGhpcy5kdXJhdGlvblN3aXBlfXMgJHt0aGlzLnRpbWluZ1N3aXBlfWAsXG4gICAgICAgICAgICBvcGFjaXR5OiAxXG4gICAgICAgICAgfSksXG5cbiAgICAgICAgYW5pbWl0KHRoaXMuZGVjb21wLmVudGVyLmJhY2tCdXR0b25MYWJlbClcbiAgICAgICAgICAucXVldWUoe1xuICAgICAgICAgICAgdHJhbnNmb3JtOiBgdHJhbnNsYXRlM2QoMCwgMCwgMClgXG4gICAgICAgICAgfSwgdGhpcy5vcHRTd2lwZSksXG5cbiAgICAgICAgYW5pbWl0KHRoaXMuZGVjb21wLmVudGVyLm90aGVyKVxuICAgICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgICBvcGFjaXR5OiAxXG4gICAgICAgICAgfSwgdGhpcy5vcHRTd2lwZSksXG5cbiAgICAgICAgLyogTGVhdmUgcGFnZSAqL1xuXG4gICAgICAgIGFuaW1pdChbdGhpcy5kZWNvbXAubGVhdmUuY29udGVudCwgd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ZTNkKCksIG9wYWNpdHk6IDEgfSxcbiAgICAgICAgICAgICAgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCctMjUlJyksIG9wYWNpdHk6IDAuOSB9XG4gICAgICAgICAgICApXG4gICAgICAgICAgICAucXVldWUoZG9uZSA9PiB7XG4gICAgICAgICAgICAgIHRoaXMuYmFja2dyb3VuZE1hc2sucmVtb3ZlKCk7XG4gICAgICAgICAgICAgIHVuYmxvY2soKTtcbiAgICAgICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgfSksXG5cbiAgICAgICAgICBhbmltaXQobGVhdmVQYWdlRGVjb21wb3NpdGlvbi50b29sYmFyQ2VudGVyLCB0aGlzLmRlZilcbiAgICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSwgb3BhY2l0eTogMSB9LFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZChgLSR7ZGVsdGEudGl0bGV9cHhgKSxcbiAgICAgICAgICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGBvcGFjaXR5ICR7dGhpcy5kdXJhdGlvbn1zIGxpbmVhciwgdHJhbnNmb3JtICR7dGhpcy5kdXJhdGlvbn1zICR7dGhpcy50aW1pbmd9YFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgYW5pbWl0KGxlYXZlUGFnZURlY29tcG9zaXRpb24uYmFja0J1dHRvbkxhYmVsLCB0aGlzLmRlZilcbiAgICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSwgb3BhY2l0eTogMSB9LFxuICAgICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoYC0ke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AtJHtkZWx0YS5sYWJlbH1weGApIH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQoZW50ZXJQYWdlRGVjb21wb3NpdGlvbi5vdGhlciwgdGhpcy5kZWYpXG4gICAgICAgICAgLmRlZmF1bHQoXG4gICAgICAgICAgICB7IG9wYWNpdHk6IDAgfSxcbiAgICAgICAgICAgIHsgY3NzOiB7IG9wYWNpdHk6IDEgfSwgdGltaW5nOiAnbGluZWFyJyB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQoW2xlYXZlUGFnZURlY29tcG9zaXRpb24uY29udGVudCwgbGVhdmVQYWdlRGVjb21wb3NpdGlvbi5ib3R0b21Ub29sYmFyLCBsZWF2ZVBhZ2VEZWNvbXBvc2l0aW9uLmJhY2tncm91bmRdLCB0aGlzLmRlZilcbiAgICAgICAgICAuZGVmYXVsdChcbiAgICAgICAgICAgIHsgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgpIH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoJzEwMCUnKSB9XG4gICAgICAgICAgKVxuICAgICAgICAgIC53YWl0KDApXG4gICAgICAgICAgLnF1ZXVlKGRvbmUgPT4ge1xuICAgICAgICAgICAgdGhpcy5iYWNrZ3JvdW5kTWFzay5yZW1vdmUoKTtcbiAgICAgICAgICAgIHVuYmxvY2soKTtcbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgfSksXG5cbiAgICAgICAgYW5pbWl0KGxlYXZlUGFnZURlY29tcG9zaXRpb24udG9vbGJhciwgdGhpcy5kZWYpXG4gICAgICAgICAgLmRlZmF1bHQoXG4gICAgICAgICAgICB7IG9wYWNpdHk6IDEgfSxcbiAgICAgICAgICAgIHsgb3BhY2l0eTogMCB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlRGVjb21wb3NpdGlvbi50b29sYmFyQ2VudGVyLCB0aGlzLmRlZilcbiAgICAgICAgICAuZGVmYXVsdChcbiAgICAgICAgICAgIHsgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZCgpIH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoJzEyNSUnKSB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlRGVjb21wb3NpdGlvbi5iYWNrQnV0dG9uTGFiZWwsIHRoaXMuZGVmKVxuICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCksIG9wYWNpdHk6IDEgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGUzZChgJHtkZWx0YS50aXRsZX1weGApLFxuICAgICAgICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICAgICAgICB0cmFuc2l0aW9uOiBgb3BhY2l0eSAke3RoaXMuZHVyYXRpb259cyBsaW5lYXIsIHRyYW5zZm9ybSAke3RoaXMuZHVyYXRpb259cyAke3RoaXMudGltaW5nfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApXG4gICAgICApO1xuICAgIH0gZWxzZSB7XG4gICAgICBhbmltaXQucnVuQWxsKFxuXG4gICAgICAgIGFuaW1pdChlbnRlclBhZ2UsIHRoaXMuZGVmKVxuICAgICAgICAgIC5kZWZhdWx0KFxuICAgICAgICAgICAgeyB0cmFuc2Zvcm06IHRyYW5zbGF0ZTNkKCctMjUlJyksIG9wYWNpdHk6IC45IH0sXG4gICAgICAgICAgICB7IHRyYW5zZm9ybTogdHJhbnNsYXRlM2QoKSwgb3BhY2l0eTogMSB9XG4gICAgICAgICAgKSxcblxuICAgICAgICBhbmltaXQobGVhdmVQYWdlLCB0aGlzLmRlZilcbiAgICAgICAgICAuZG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ICAgW2phXeS7peWJjeOBrnBhZ2Xjgqrjg5bjgrjjgqfjgq/jg4jjgIJbL2phXVxuICAgKi9cblxuICAvKipcbiAgICogQGV2ZW50IHBvc3Rwb3BcbiAgICogQGRlc2NyaXB0aW9uXG4gICAqICAgW2VuXUZpcmVkIGp1c3QgYWZ0ZXIgYSBwYWdlIGlzIHBvcHBlZC5bL2VuXVxuICAgKiAgIFtqYV1wYWdl44GMcG9w44GV44KM44Gm44Ki44OL44Oh44O844K344On44Oz44GM57WC44KP44Gj44Gf5b6M44Gr55m654Gr44GV44KM44G+44GZ44CCWy9qYV1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IFtlbl1FdmVudCBvYmplY3QuWy9lbl1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50Lm5hdmlnYXRvclxuICAgKiAgIFtlbl1Db21wb25lbnQgb2JqZWN0LlsvZW5dXG4gICAqICAgW2phXeOCs+ODs+ODneODvOODjeODs+ODiOOBruOCquODluOCuOOCp+OCr+ODiOOAglsvamFdXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBldmVudC5lbnRlclBhZ2VcbiAgICogICBbZW5dT2JqZWN0IG9mIHRoZSBuZXh0IHBhZ2UuWy9lbl1cbiAgICogICBbamFdcG9w44GV44KM44Gm6KGo56S644GV44KM44KL44Oa44O844K444Gu44Kq44OW44K444Kn44Kv44OI44CCWy9qYV1cbiAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50LmxlYXZlUGFnZVxuICAgKiAgIFtlbl1PYmplY3Qgb2YgdGhlIHByZXZpb3VzIHBhZ2UuWy9lbl1cbiAgICogICBbamFdcG9w44GV44KM44Gm5raI44GI44KL44Oa44O844K444Gu44Kq44OW44K444Kn44Kv44OI44CCWy9qYV1cbiAgICovXG5cbiAgZ2V0IGFuaW1hdG9yRmFjdG9yeSgpIHtcbiAgICByZXR1cm4gdGhpcy5fYW5pbWF0b3JGYWN0b3J5O1xuICB9XG5cbiAgY29uc3RydWN0b3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ycmVudCBwcm9ncmVzcy4gU2hvdWxkIGJlIGEgdmFsdWUgYmV0d2VlbiAwIGFuZCAxMDAuWy9lbl1cbiAgICogICBbamFd54++5Zyo44Gu6YCy6KGM54q25rOB44Gu5YCk44KS5oyH5a6a44GX44G+44GZ44CCMOOBi+OCiTEwMOOBrumWk+OBruWApOOCkuaMh+WumuOBl+OBpuS4i+OBleOBhOOAglsvamFdXG4gICAqL1xuXG4gIC8qKlxuICAgKiBAYXR0cmlidXRlIHNlY29uZGFyeS12YWx1ZVxuICAgKiBAdHlwZSB7TnVtYmVyfVxuICAgKiBAZGVzY3JpcHRpb25cbiAgICogICBbZW5dQ3VycmVudCBzZWNvbmRhcnkgcHJvZ3Jlc3MuIFNob3VsZCBiZSBhIHZhbHVlIGJldHdlZW4gMCBhbmQgMTAwLlsvZW5dXG4gICAqICAgW2phXeePvuWcqOOBru+8kueVquebruOBrumAsuihjOeKtuazgeOBruWApOOCkuaMh+WumuOBl+OBvuOBmeOAgjDjgYvjgokxMDDjga7plpPjga7lgKTjgpLmjIflrprjgZfjgabkuIvjgZXjgYTjgIJbL2phXVxuICAgKi9cblxuICAvKipcbiAgICogQGF0dHJpYnV0ZSBpbmRldGVybWluYXRlXG4gICAqIEBkZXNjcmlwdGlvblxuICAgKiAgIFtlbl1JZiB0aGlzIGF0dHJpYnV0ZSBpcyBzZXQsIGFuIGluZmluaXRlIGxvb3BpbmcgYW5pbWF0aW9uIHdpbGwgYmUgc2hvd24uWy9lbl1cbiAgICogICBbamFd44GT44Gu5bGe5oCn44GM6Kit5a6a44GV44KM44Gf5aC05ZCI44CB44Or44O844OX44GZ44KL44Ki44OL44Oh44O844K344On44Oz44GM6KGo56S644GV44KM44G+44GZ44CCWy9qYV1cbiAgICovXG5cbiAgY29uc3RydWN0b3IoKSB7XG4gICAgc3VwZXIoKTtcblxuICAgIGNvbnRlbnRSZWFkeSh0aGlzLCAoKSA9PiB0aGlzLl9jb21waWxlKCkpO1xuICB9XG5cbiAgX2Nv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ChzaXplID09PSAnY292ZXInKSB7XG4gICAgICAgIHIgPSBNYXRoLnNxcnQoeCAqIHggKyB5ICogeSk7XG4gICAgICB9IGVsc2UgaWYgKHNpemUgPT09ICdjb250YWluJykge1xuICAgICAgICByID0gTWF0aC5taW4oeCwgeSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBlcnJvcigpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICB4ID0gKHR5cGVvZiBlLmNsaWVudFggPT09ICdudW1iZXInID8gZS5jbGllbnRYIDogZS5jaGFuZ2VkVG91Y2hlc1swXS5jbGllbnRYKSAtIGIubGVmdDtcbiAgICAgIHkgPSAodHlwZW9mIGUuY2xpZW50WSA9PT0gJ251bWJlcicgPyBlLmNsaWVudFkgOiBlLmNoYW5nZWRUb3VjaGVzWzBdLmNsaWVudFkpIC0gYi50b3A7XG4gICAgICBoID0gTWF0aC5tYXgoeSwgYi5oZWlnaHQgLSB5KTtcbiAgICAgIHcgPSBNYXRoLm1heCh4LCBiLndpZHRoIC0geCk7XG5cbiAgICAgIGlmIChzaXplID09PSAnY292ZXInKSB7XG4gICAgICAgIHIgPSBNYXRoLnNxcnQoaCAqIGggKyB3ICogdyk7XG4gICAgICB9IGVsc2UgaWYgKHNpemUgPT09ICdjb250YWluJykge1xuICAgICAgICByID0gTWF0aC5taW4oTWF0aC5yb3VuZChoIC8gMiksIE1hdGgucm91bmQodyAvIDIpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yKCk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHt4LCB5LCByfTtcbiAgfVxuXG4gIF9yaXBwbGVBbmltYXRpb24oZSwgZHVyYXRpb24gPSAzMDApIHtcbiAgICBjb25zdCB7X2FuaW1hdG9yLCBfd2F2ZSwgX2JhY2tncm91bmQsIF9taW5SfSA9IHRoaXM7XG4gICAgY29uc3Qge3gsIHksIHJ9ID0gdGhpcy5fY2FsY3VsYXRlQ29vcmRzKGUp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iAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAnYmFja2dyb3VuZCc6XG4gICAgICAgIGlmIChjdXJyZW50IHx8IGxhc3QpIHtcbiAgICAgICAgICBpZiAoY3VycmVudCA9PT0gJ25vbmUnKSB7XG4gICAgICAgICAgICBjb250ZW50UmVhZHkodGhpcywgKCkgPT4ge1xuICAgICAgICAgICAgICB0aGlzLl9iYWNrZ3JvdW5kLnNldEF0dHJpYnV0ZSgnZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgdGhpcy5fYmFja2dyb3VuZC5zdHlsZS5iYWNrZ3JvdW5kID0gJ3RyYW5zcGFyZW50JztcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb250ZW50UmVhZHkodGhpcywgKCkgPT4ge1xuICAgICAgICAgICAgICBpZiAodGhpcy5fYmFja2dyb3VuZC5oYXNBdHRyaWJ1dGUoJ2Rpc2FibGVkJykpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9iYWNrZ3JvdW5kLnJlbW92ZUF0dHJpYnV0ZSgnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB0aGlzLl9iYWNrZ3JvdW5kLnN0eWxlLmJhY2tncm91bmQgPSBjdXJyZW50O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlICdjZW50ZXInOlxuICAgICAgICBpZiAobmFtZSA9PT0gJ2NlbnRlcicpIHtcbiAgICAgICAgICB0aGlzLl9jZW50ZXIgPSBjdXJyZW50ICE9IG51bGwgJiYgY3VycmVudCAhPSAnZmFsc2UnO1xuICAgICAgICB9XG4gICAgICAgIGJyZWFrO1xuXG4gICAgfVxuICB9XG5cbiAgLyoqXG4gICAqIEBwcm9wZXJ0eSBkaXNhYmxlZF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hpcy5kZWxheSlcbiAgICAgICAgLnF1ZXVlKHtcbiAgICAgICAgICBkaXNwbGF5OiAnYmxvY2snXG4gICAgICAgIH0pXG4gICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgb3BhY2l0eTogJzEnXG4gICAgICAgIH0sIHtcbiAgICAgICAgICBkdXJhdGlvbjogdGhpcy5kdXJhdGlvbixcbiAgICAgICAgICB0aW1pbmc6ICdsaW5lYXInLFxuICAgICAgICB9KVxuICAgICk7XG4gIH1cblxuICAvKipcbiAgICogQHBhcmFtIHtGdW5jdGlvbn0gZG9uZVxuICAgKi9cbiAgY2xvc2UoZG9uZSkge1xuXG4gICAgYW5pbWl0LnJ1bkFsbChcbiAgICAgIGFuaW1pdCh0aGlzLl9zaWRlKVxuICAgICAgICAud2FpdCh0aGlzLmRlbGF5KVxuICAgICAgICAucXVldWUoe1xuICAgICAgICAgIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZTNkKDAsIDAsIDApJ1xuICAgICAgICB9LCB0aGlzLmRlZilcbiAgICAgICAgLnF1ZXVlKGNhbGxiYWNrID0+IHtcbiAgICAgICAgICBkb25lICYmIGRvbmUoKTtcbiAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICB9KSxcblxuICAgICAgYW5pbWl0KHRoaXMuX21hc2spXG4gICAgICAgIC53YWl0KHRoaXMuZGVsYXkpXG4gICAgICAgIC5xdWV1ZSh7XG4gICAgICAgICAgb3BhY2l0eTogJzAnXG4gICAgICAgIH0sIHtcbiAgICAgICAgICBkdXJhdGlvbjogdGhpcy5kdXJhdGlvbixcbiAgICAgICAgICB0aW1pbmc6ICdsaW5lYXInLFxuICAgICAgICB9KVxuICAgICAgICAucXVldWUoe1xuICAgICAgICAgIGRpc3BsYXk6ICdub25lJ1xuICAgICAgICB9KVxuICAgICk7XG4gIH1cbn1cbiIsIi8qXG5Db3B5cmlnaHQgMjAxMy0yMDE1IEFTSUFMIENPUlBPUkFUSU9OXG5cbkxpY2Vuc2VkIH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