layui.js 482 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413
  1. /** v2.8.15 | MIT Licensed */
  2. ;!function (d) {
  3. "use strict";
  4. var t, h = d.document, m = {modules: {}, status: {}, timeout: 10, event: {}}, o = function () {
  5. this.v = "2.8.15"
  6. }, e = d.LAYUI_GLOBAL || {}, v = (t = h.currentScript ? h.currentScript.src : function () {
  7. for (var t, e = h.scripts, n = e.length - 1, o = n; 0 < o; o--) if ("interactive" === e[o].readyState) {
  8. t = e[o].src;
  9. break
  10. }
  11. return t || e[n].src
  12. }(), m.dir = e.dir || t.substring(0, t.lastIndexOf("/") + 1)), g = function (t, e) {
  13. e = e || "log", d.console && console[e] && console[e]("layui error hint: " + t)
  14. }, b = "undefined" != typeof opera && "[object Opera]" === opera.toString(), N = m.builtin = {
  15. lay: "lay",
  16. layer: "layer",
  17. laydate: "laydate",
  18. laypage: "laypage",
  19. laytpl: "laytpl",
  20. form: "form",
  21. upload: "upload",
  22. dropdown: "dropdown",
  23. transfer: "transfer",
  24. tree: "tree",
  25. table: "table",
  26. treeTable: "treeTable",
  27. element: "element",
  28. rate: "rate",
  29. colorpicker: "colorpicker",
  30. slider: "slider",
  31. carousel: "carousel",
  32. flow: "flow",
  33. util: "util",
  34. code: "code",
  35. jquery: "jquery",
  36. all: "all",
  37. "layui.all": "layui.all"
  38. }, s = (o.prototype.cache = m, o.prototype.define = function (t, o) {
  39. return "function" == typeof t && (o = t, t = []), this.use(t, function () {
  40. var n = function (t, e) {
  41. layui[t] = e, m.status[t] = !0
  42. };
  43. return "function" == typeof o && o(function (t, e) {
  44. n(t, e), m.callback[t] = function () {
  45. o(n)
  46. }
  47. }), this
  48. }, null, "define"), this
  49. }, o.prototype.use = function (n, t, e, o) {
  50. var r = this, i = m.dir = m.dir || v, a = h.getElementsByTagName("head")[0],
  51. u = (n = "string" == typeof n ? [n] : "function" == typeof n ? (t = n, ["all"]) : n, d.jQuery && jQuery.fn.on && (r.each(n, function (t, e) {
  52. "jquery" === e && n.splice(t, 1)
  53. }), layui.jquery = layui.$ = jQuery), n[0]), l = 0;
  54. function s(t, e) {
  55. var n = "PLaySTATION 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/;
  56. "load" !== t.type && !n.test((t.currentTarget || t.srcElement).readyState) || (m.modules[u] = e, a.removeChild(p), function o() {
  57. return ++l > 1e3 * m.timeout / 4 ? g(u + " is not a valid module", "error") : void (m.status[u] ? c() : setTimeout(o, 4))
  58. }())
  59. }
  60. function c() {
  61. e.push(layui[u]), 1 < n.length ? r.use(n.slice(1), t, e, o) : "function" == typeof t && (layui.jquery && "function" == typeof layui.jquery && "define" !== o ? layui.jquery(function () {
  62. t.apply(layui, e)
  63. }) : t.apply(layui, e))
  64. }
  65. if (e = e || [], m.host = m.host || (i.match(/\/\/([\s\S]+?)\//) || ["//" + location.host + "/"])[0], 0 === n.length || layui["layui.all"] && N[u]) return c(), r;
  66. var p,
  67. y = (y = (N[u] ? i + "modules/" : !/^\{\/\}/.test(r.modules[u]) && m.base || "") + (r.modules[u] || u) + ".js").replace(/^\{\/\}/, "");
  68. return !m.modules[u] && layui[u] && (m.modules[u] = y), m.modules[u] ? function f() {
  69. return ++l > 1e3 * m.timeout / 4 ? g(u + " is not a valid module", "error") : void ("string" == typeof m.modules[u] && m.status[u] ? c() : setTimeout(f, 4))
  70. }() : ((p = h.createElement("script"))["async"] = !0, p.charset = "utf-8", p.src = y + ((i = !0 === m.version ? m.v || (new Date).getTime() : m.version || "") ? "?v=" + i : ""), a.appendChild(p), !p.attachEvent || p.attachEvent.toString && p.attachEvent.toString().indexOf("[native code") < 0 || b ? p.addEventListener("load", function (t) {
  71. s(t, y)
  72. }, !1) : p.attachEvent("onreadystatechange", function (t) {
  73. s(t, y)
  74. }), m.modules[u] = y), r
  75. }, o.prototype.disuse = function (t) {
  76. var n = this;
  77. return t = n.isArray(t) ? t : [t], n.each(t, function (t, e) {
  78. m.status[e], delete n[e], delete N[e], delete n.modules[e], delete m.status[e], delete m.modules[e]
  79. }), n
  80. }, o.prototype.getStyle = function (t, e) {
  81. t = t.currentStyle || d.getComputedStyle(t, null);
  82. return t[t.getPropertyValue ? "getPropertyValue" : "getAttribute"](e)
  83. }, o.prototype.link = function (n, o, t) {
  84. var r = this, e = h.getElementsByTagName("head")[0], i = h.createElement("link"),
  85. a = "layuicss-" + ((t = "string" == typeof o ? o : t) || n).replace(/\.|\//g, ""), u = "creating", l = 0;
  86. return i.href = n + (m.debug ? "?v=" + (new Date).getTime() : ""), i.rel = "stylesheet", i.id = a, i.media = "all", h.getElementById(a) || e.appendChild(i), "function" != typeof o || function s(t) {
  87. var e = h.getElementById(a);
  88. return ++l > 1e3 * m.timeout / 100 ? g(n + " timeout") : void (1989 === parseInt(r.getStyle(e, "width")) ? (t === u && e.removeAttribute("lay-status"), e.getAttribute("lay-status") === u ? setTimeout(s, 100) : o()) : (e.setAttribute("lay-status", u), setTimeout(function () {
  89. s(u)
  90. }, 100)))
  91. }(), r
  92. }, o.prototype.addcss = function (t, e, n) {
  93. return layui.link(m.dir + "css/" + t, e, n)
  94. }, m.callback = {}, o.prototype.factory = function (t) {
  95. if (layui[t]) return "function" == typeof m.callback[t] ? m.callback[t] : null
  96. }, o.prototype.img = function (t, e, n) {
  97. var o = new Image;
  98. if (o.src = t, o.complete) return e(o);
  99. o.onload = function () {
  100. o.onload = null, "function" == typeof e && e(o)
  101. }, o.onerror = function (t) {
  102. o.onerror = null, "function" == typeof n && n(t)
  103. }
  104. }, o.prototype.config = function (t) {
  105. for (var e in t = t || {}) m[e] = t[e];
  106. return this
  107. }, o.prototype.modules = function () {
  108. var t, e = {};
  109. for (t in N) e[t] = N[t];
  110. return e
  111. }(), o.prototype.extend = function (t) {
  112. for (var e in t = t || {}) this[e] || this.modules[e] ? g(e + " Module already exists", "error") : this.modules[e] = t[e];
  113. return this
  114. }, o.prototype.router = o.prototype.hash = function (t) {
  115. var n = {path: [], search: {}, hash: ((t = t || location.hash).match(/[^#](#.*$)/) || [])[1] || ""};
  116. return /^#\//.test(t) && (t = t.replace(/^#\//, ""), n.href = "/" + t, t = t.replace(/([^#])(#.*$)/, "$1").split("/") || [], this.each(t, function (t, e) {
  117. /^\w+=/.test(e) ? (e = e.split("="), n.search[e[0]] = e[1]) : n.path.push(e)
  118. })), n
  119. }, o.prototype.url = function (t) {
  120. var r, e, n = this;
  121. return {
  122. pathname: (t ? ((t.match(/\.[^.]+?\/.+/) || [])[0] || "").replace(/^[^\/]+/, "").replace(/\?.+/, "") : location.pathname).replace(/^\//, "").split("/"),
  123. search: (r = {}, e = (t ? ((t.match(/\?.+/) || [])[0] || "").replace(/\#.+/, "") : location.search).replace(/^\?+/, "").split("&"), n.each(e, function (t, e) {
  124. var n = e.indexOf("="), o = n < 0 ? e.substr(0, e.length) : 0 !== n && e.substr(0, n);
  125. o && (r[o] = 0 < n ? e.substr(n + 1) : null)
  126. }), r),
  127. hash: n.router(t ? (t.match(/#.+/) || [])[0] || "/" : location.hash)
  128. }
  129. }, o.prototype.data = function (t, e, n) {
  130. if (t = t || "layui", n = n || localStorage, d.JSON && d.JSON.parse) {
  131. if (null === e) return delete n[t];
  132. e = "object" == typeof e ? e : {key: e};
  133. try {
  134. var o = JSON.parse(n[t])
  135. } catch (r) {
  136. o = {}
  137. }
  138. return "value" in e && (o[e.key] = e.value), e.remove && delete o[e.key], n[t] = JSON.stringify(o), e.key ? o[e.key] : o
  139. }
  140. }, o.prototype.sessionData = function (t, e) {
  141. return this.data(t, e, sessionStorage)
  142. }, o.prototype.device = function (t) {
  143. var n = navigator.userAgent.toLowerCase(), e = function (t) {
  144. var e = new RegExp(t + "/([^\\s\\_\\-]+)");
  145. return (t = (n.match(e) || [])[1]) || !1
  146. }, o = {
  147. os: /windows/.test(n) ? "windows" : /linux/.test(n) ? "linux" : /iphone|ipod|ipad|ios/.test(n) ? "ios" : /mac/.test(n) ? "mac" : void 0,
  148. ie: !!(d.ActiveXObject || "ActiveXObject" in d) && ((n.match(/msie\s(\d+)/) || [])[1] || "11"),
  149. weixin: e("micromessenger")
  150. };
  151. return t && !o[t] && (o[t] = e(t)), o.android = /android/.test(n), o.ios = "ios" === o.os, o.mobile = o.android || o.ios, o
  152. }, o.prototype.hint = function () {
  153. return {error: g}
  154. }, o.prototype._typeof = o.prototype.type = function (t) {
  155. return null === t ? String(t) : "object" == typeof t || "function" == typeof t ? (e = (e = Object.prototype.toString.call(t).match(/\s(.+)\]$/) || [])[1] || "Object", new RegExp("\\b(Function|Array|Date|RegExp|Object|Error|Symbol)\\b").test(e) ? e.toLowerCase() : "object") : typeof t;
  156. var e
  157. }, o.prototype._isArray = o.prototype.isArray = function (t) {
  158. var e, n = this.type(t);
  159. return !(!t || "object" != typeof t || t === d) && (e = "length" in t && t.length, "array" === n || 0 === e || "number" == typeof e && 0 < e && e - 1 in t)
  160. }, o.prototype.each = function (t, n) {
  161. var e, o = function (t, e) {
  162. return n.call(e[t], t, e[t])
  163. };
  164. if ("function" != typeof n) return this;
  165. if (this.isArray(t = t || [])) for (e = 0; e < t.length && !o(e, t); e++) ; else for (e in t) if (o(e, t)) break;
  166. return this
  167. }, o.prototype.sort = function (t, r, e, n) {
  168. n = n ? t || [] : JSON.parse(JSON.stringify(t || []));
  169. return "object" !== this.type(t) || r ? "object" != typeof t ? [n] : (n.sort(function (t, e) {
  170. var n = t[r], o = e[r];
  171. if (!isNaN(t) && !isNaN(e)) return t - e;
  172. if (!isNaN(t) && isNaN(e)) {
  173. if (!r || "object" != typeof e) return -1;
  174. n = t
  175. } else if (isNaN(t) && !isNaN(e)) {
  176. if (!r || "object" != typeof t) return 1;
  177. o = e
  178. }
  179. t = [!isNaN(n), !isNaN(o)];
  180. return t[0] && t[1] ? n && !o && 0 !== o ? 1 : !n && 0 !== n && o ? -1 : n - o : t[0] || t[1] ? t[0] || !t[1] ? -1 : !t[0] || t[1] ? 1 : void 0 : o < n ? 1 : n < o ? -1 : 0
  181. }), e && n.reverse(), n) : n
  182. }, o.prototype.stope = function (t) {
  183. t = t || d.event;
  184. try {
  185. t.stopPropagation()
  186. } catch (e) {
  187. t.cancelBubble = !0
  188. }
  189. }, "LAYUI-EVENT-REMOVE");
  190. o.prototype.onevent = function (t, e, n) {
  191. return "string" != typeof t || "function" != typeof n ? this : o.event(t, e, null, n)
  192. }, o.prototype.event = o.event = function (t, e, n, o) {
  193. var r = this, i = null, a = (e || "").match(/\((.*)\)$/) || [], t = (t + "." + e).replace(a[0], ""),
  194. u = a[1] || "", l = function (t, e) {
  195. !1 === (e && e.call(r, n)) && null === i && (i = !1)
  196. };
  197. return n === s ? (delete (r.cache.event[t] || {})[u], r) : o ? (m.event[t] = m.event[t] || {}, u ? m.event[t][u] = [o] : (m.event[t][u] = m.event[t][u] || [], m.event[t][u].push(o)), this) : (layui.each(m.event[t], function (t, e) {
  198. "{*}" === u ? layui.each(e, l) : ("" === t && layui.each(e, l), u && t === u && layui.each(e, l))
  199. }), i)
  200. }, o.prototype.on = function (t, e, n) {
  201. return this.onevent.call(this, e, t, n)
  202. }, o.prototype.off = function (t, e) {
  203. return this.event.call(this, e, t, s)
  204. }, o.prototype.debounce = function (n, o) {
  205. var r;
  206. return function () {
  207. var t = this, e = arguments;
  208. clearTimeout(r), r = setTimeout(function () {
  209. n.apply(t, e)
  210. }, o)
  211. }
  212. }, o.prototype.throttle = function (t, e) {
  213. var n = !1;
  214. return function () {
  215. n || (t.apply(this, arguments), n = !0, setTimeout(function () {
  216. n = !1
  217. }, e))
  218. }
  219. }, d.layui = new o
  220. }(window);
  221. layui.define(function (a) {
  222. var i = layui.cache;
  223. layui.config({dir: i.dir.replace(/lay\/dest\/$/, "")}), a("layui.all", layui.v)
  224. });
  225. !function (l) {
  226. "use strict";
  227. var t, h = l.document, d = function (t) {
  228. return new r(t)
  229. }, r = function (t) {
  230. var n = this,
  231. i = "object" == typeof t ? layui.isArray(t) ? t : [t] : (this.selector = t, h.querySelectorAll(t || null));
  232. d.each(i, function (t, e) {
  233. n.push(i[t])
  234. })
  235. };
  236. r.fn = r.prototype = [], r.fn.constructor = r, d.extend = function () {
  237. var t, e = 1, n = arguments, i = function (t, e) {
  238. for (var n in t = t || ("array" === layui.type(e) ? [] : {}), e) t[n] = e[n] && e[n].constructor === Object ? i(t[n], e[n]) : e[n];
  239. return t
  240. };
  241. for (n[0] = "object" == typeof n[0] ? n[0] : {}, t = n.length; e < t; e++) "object" == typeof n[e] && i(n[0], n[e]);
  242. return n[0]
  243. }, d.ie = (t = navigator.userAgent.toLowerCase(), !!(l.ActiveXObject || "ActiveXObject" in l) && ((t.match(/msie\s(\d+)/) || [])[1] || "11")), d.layui = layui || {}, d.getPath = layui.cache.dir, d.stope = layui.stope, d.each = function () {
  244. return layui.each.apply(layui, arguments), this
  245. }, d.digit = function (t, e) {
  246. if ("string" != typeof t && "number" != typeof t) return "";
  247. var n = "";
  248. e = e || 2;
  249. for (var i = (t = String(t)).length; i < e; i++) n += "0";
  250. return t < Math.pow(10, e) ? n + t : t
  251. }, d.elem = function (t, e) {
  252. var n = h.createElement(t);
  253. return d.each(e || {}, function (t, e) {
  254. n.setAttribute(t, e)
  255. }), n
  256. }, d.hasScrollbar = function () {
  257. return h.body.scrollHeight > (l.innerHeight || h.documentElement.clientHeight)
  258. }, d.style = function (t) {
  259. t = t || {};
  260. var e = d.elem("style"), n = t.text || "", i = t.target || d("body")[0];
  261. n && ("styleSheet" in e ? (e.setAttribute("type", "text/css"), e.styleSheet.cssText = n) : e.innerHTML = n, d.style.index = d.style.index || 0, d.style.index++, n = e.id = "LAY-STYLE-" + (t.id || "DF-" + d.style.index), (t = d(i).find("#" + n))[0] && t.remove(), d(i).append(e))
  262. }, d.position = function (t, e, n) {
  263. var i, r, o, c, u, a, f, s;
  264. e && (n = n || {}, t !== h && t !== d("body")[0] || (n.clickType = "right"), i = "right" === n.clickType ? {
  265. left: (i = n.e || l.event || {}).clientX,
  266. top: i.clientY,
  267. right: i.clientX,
  268. bottom: i.clientY
  269. } : t.getBoundingClientRect(), f = e.offsetWidth, s = e.offsetHeight, r = function (t) {
  270. return h.body[t = t ? "scrollLeft" : "scrollTop"] | h.documentElement[t]
  271. }, o = function (t) {
  272. return h.documentElement[t ? "clientWidth" : "clientHeight"]
  273. }, c = "margin" in n ? n.margin : 5, u = i.left, a = i.bottom, "center" === n.align ? u -= (f - t.offsetWidth) / 2 : "right" === n.align && (u = u - f + t.offsetWidth), (u = u + f + c > o("width") ? o("width") - f - c : u) < c && (u = c), i.bottom + s + c > o() && (i.top > s + c && i.top <= o() ? a = i.top - s - 2 * c : n.allowBottomOut || (a = o() - s - 2 * c) < 0 && (a = 0)), (f = n.position) && (e.style.position = f), e.style.left = u + ("fixed" === f ? 0 : r(1)) + "px", e.style.top = a + ("fixed" === f ? 0 : r()) + "px", d.hasScrollbar() || (s = e.getBoundingClientRect(), !n.SYSTEM_RELOAD && s.bottom + c > o() && (n.SYSTEM_RELOAD = !0, setTimeout(function () {
  274. d.position(t, e, n)
  275. }, 50))))
  276. }, d.options = function (t, e) {
  277. if (e = "object" == typeof e ? e : {attr: e}, t === h) return {};
  278. var t = d(t), n = e.attr || "lay-options", t = t.attr(n);
  279. try {
  280. return new Function("return " + (t || "{}"))()
  281. } catch (i) {
  282. return layui.hint().error(e.errorText || [n + '="' + t + '"', "\n parseerror: " + i].join("\n"), "error"), {}
  283. }
  284. }, d.isTopElem = function (n) {
  285. var t = [h, d("body")[0]], i = !1;
  286. return d.each(t, function (t, e) {
  287. if (e === n) return i = !0
  288. }), i
  289. }, r.addStr = function (n, t) {
  290. return n = n.replace(/\s+/, " "), t = t.replace(/\s+/, " ").split(" "), d.each(t, function (t, e) {
  291. new RegExp("\\b" + e + "\\b").test(n) || (n = n + " " + e)
  292. }), n.replace(/^\s|\s$/, "")
  293. }, r.removeStr = function (n, t) {
  294. return n = n.replace(/\s+/, " "), t = t.replace(/\s+/, " ").split(" "), d.each(t, function (t, e) {
  295. e = new RegExp("\\b" + e + "\\b");
  296. e.test(n) && (n = n.replace(e, ""))
  297. }), n.replace(/\s+/, " ").replace(/^\s|\s$/, "")
  298. }, r.fn.find = function (n) {
  299. var i = [], r = "object" == typeof n;
  300. return this.each(function (t, e) {
  301. e = r && e.contains(n) ? n : e.querySelectorAll(n || null);
  302. d.each(e, function (t, e) {
  303. i.push(e)
  304. })
  305. }), d(i)
  306. }, r.fn.each = function (t) {
  307. return d.each.call(this, this, t)
  308. }, r.fn.addClass = function (n, i) {
  309. return this.each(function (t, e) {
  310. e.className = r[i ? "removeStr" : "addStr"](e.className, n)
  311. })
  312. }, r.fn.removeClass = function (t) {
  313. return this.addClass(t, !0)
  314. }, r.fn.hasClass = function (n) {
  315. var i = !1;
  316. return this.each(function (t, e) {
  317. new RegExp("\\b" + n + "\\b").test(e.className) && (i = !0)
  318. }), i
  319. }, r.fn.css = function (e, i) {
  320. var t = this, r = function (t) {
  321. return isNaN(t) ? t : t + "px"
  322. };
  323. return "string" != typeof e || i !== undefined ? t.each(function (t, n) {
  324. "object" == typeof e ? d.each(e, function (t, e) {
  325. n.style[t] = r(e)
  326. }) : n.style[e] = r(i)
  327. }) : 0 < t.length ? t[0].style[e] : void 0
  328. }, r.fn.width = function (n) {
  329. var i = this;
  330. return n !== undefined ? i.each(function (t, e) {
  331. i.css("width", n)
  332. }) : 0 < i.length ? i[0].offsetWidth : void 0
  333. }, r.fn.height = function (n) {
  334. var i = this;
  335. return n !== undefined ? i.each(function (t, e) {
  336. i.css("height", n)
  337. }) : 0 < i.length ? i[0].offsetHeight : void 0
  338. }, r.fn.attr = function (n, i) {
  339. var t = this;
  340. return i !== undefined ? t.each(function (t, e) {
  341. e.setAttribute(n, i)
  342. }) : 0 < t.length ? t[0].getAttribute(n) : void 0
  343. }, r.fn.removeAttr = function (n) {
  344. return this.each(function (t, e) {
  345. e.removeAttribute(n)
  346. })
  347. }, r.fn.html = function (n) {
  348. var t = this;
  349. return n !== undefined ? this.each(function (t, e) {
  350. e.innerHTML = n
  351. }) : 0 < t.length ? t[0].innerHTML : void 0
  352. }, r.fn.val = function (n) {
  353. var t = this;
  354. return n !== undefined ? this.each(function (t, e) {
  355. e.value = n
  356. }) : 0 < t.length ? t[0].value : void 0
  357. }, r.fn.append = function (n) {
  358. return this.each(function (t, e) {
  359. "object" == typeof n ? e.appendChild(n) : e.innerHTML = e.innerHTML + n
  360. })
  361. }, r.fn.remove = function (n) {
  362. return this.each(function (t, e) {
  363. n ? e.removeChild(n) : e.parentNode.removeChild(e)
  364. })
  365. }, r.fn.on = function (n, i) {
  366. return this.each(function (t, e) {
  367. e.attachEvent ? e.attachEvent("on" + n, function (t) {
  368. t.target = t.srcElement, i.call(e, t)
  369. }) : e.addEventListener(n, i, !1)
  370. })
  371. }, r.fn.off = function (n, i) {
  372. return this.each(function (t, e) {
  373. e.detachEvent ? e.detachEvent("on" + n, i) : e.removeEventListener(n, i, !1)
  374. })
  375. }, l.lay = d, l.layui && layui.define && layui.define(function (t) {
  376. t("lay", d)
  377. })
  378. }(window, window.document);
  379. layui.define(function (e) {
  380. "use strict";
  381. var c = {open: "{{", close: "}}"}, l = {
  382. escape: function (e) {
  383. return e === undefined || null === e ? "" : /[<"'>]|&(?=#[a-zA-Z0-9]+)/g.test(e += "") ? e.replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&#39;").replace(/"/g, "&quot;") : e
  384. }
  385. }, i = function (e) {
  386. return new RegExp(e, "g")
  387. }, u = function (e, r) {
  388. var n = "Laytpl Error: ";
  389. return "object" == typeof console && console.error(n + e + "\n" + (r || "")), n + e
  390. }, n = function (e, r) {
  391. var n = this, e = (n.config = n.config || {}, n.template = e, function (e) {
  392. for (var r in e) n.config[r] = e[r]
  393. });
  394. e(c), e(r)
  395. }, r = (n.prototype.tagExp = function (e, r, n) {
  396. var c = this.config;
  397. return i((r || "") + c.open + ["#([\\s\\S])+?", "([^{#}])*?"][e || 0] + c.close + (n || ""))
  398. }, n.prototype.parse = function (e, r) {
  399. var n = this, c = n.config, t = e, o = i("^" + c.open + "#", ""), p = i(c.close + "$", "");
  400. if ("string" != typeof e) return e;
  401. e = '"use strict";var view = "' + (e = e.replace(/\s+|\r|\t|\n/g, " ").replace(i(c.open + "#"), c.open + "# ").replace(i(c.close + "}"), "} " + c.close).replace(/\\/g, "\\\\").replace(i(c.open + "!(.+?)!" + c.close), function (e) {
  402. return e = e.replace(i("^" + c.open + "!"), "").replace(i("!" + c.close), "").replace(i(c.open + "|" + c.close), function (e) {
  403. return e.replace(/(.)/g, "\\$1")
  404. })
  405. }).replace(/(?="|')/g, "\\").replace(n.tagExp(), function (e) {
  406. return '";' + (e = e.replace(o, "").replace(p, "")).replace(/\\(.)/g, "$1") + ';view+="'
  407. }).replace(n.tagExp(1), function (e) {
  408. var r = '"+laytpl.escape(';
  409. return e.replace(/\s/g, "") === c.open + c.close ? "" : (e = e.replace(i(c.open + "|" + c.close), ""), /^=/.test(e) ? e = e.replace(/^=/, "") : /^-/.test(e) && (e = e.replace(/^-/, ""), r = '"+('), r + e.replace(/\\(.)/g, "$1") + ')+"')
  410. })) + '";return view;';
  411. try {
  412. return n.cache = e = new Function("d, laytpl", e), e(r, l)
  413. } catch (a) {
  414. return delete n.cache, u(a, t)
  415. }
  416. }, n.prototype.render = function (e, r) {
  417. e = e || {};
  418. var n = this, e = n.cache ? n.cache(e, l) : n.parse(n.template, e);
  419. return "function" == typeof r && r(e), e
  420. }, function (e, r) {
  421. return new n(e, r)
  422. });
  423. r.config = function (e) {
  424. for (var r in e = e || {}) c[r] = e[r]
  425. }, r.v = "2.0.0", e("laytpl", r)
  426. });
  427. layui.define(function (e) {
  428. "use strict";
  429. var r = document, u = "getElementById", c = "getElementsByTagName", a = "layui-disabled", t = function (e) {
  430. var a = this;
  431. a.config = e || {}, a.config.index = ++o.index, a.render(!0)
  432. }, o = (t.prototype.type = function () {
  433. var e = this.config;
  434. if ("object" == typeof e.elem) return e.elem.length === undefined ? 2 : 3
  435. }, t.prototype.view = function () {
  436. var t, i, n = this.config, r = n.groups = "groups" in n ? Number(n.groups) || 0 : 5,
  437. u = (n.layout = "object" == typeof n.layout ? n.layout : ["prev", "page", "next"], n.count = Number(n.count) || 0, n.curr = Number(n.curr) || 1, n.limits = "object" == typeof n.limits ? n.limits : [10, 20, 30, 40, 50], n.limit = Number(n.limit) || 10, n.pages = Math.ceil(n.count / n.limit) || 1, n.curr > n.pages ? n.curr = n.pages : n.curr < 1 && (n.curr = 1), r < 0 ? r = 1 : r > n.pages && (r = n.pages), n.prev = "prev" in n ? n.prev : "&#x4E0A;&#x4E00;&#x9875;", n.next = "next" in n ? n.next : "&#x4E0B;&#x4E00;&#x9875;", n.pages > r ? Math.ceil((n.curr + (1 < r ? 1 : 0)) / (0 < r ? r : 1)) : 1),
  438. l = {
  439. prev: n.prev ? '<a class="layui-laypage-prev' + (1 == n.curr ? " " + a : "") + '" data-page="' + (n.curr - 1) + '">' + n.prev + "</a>" : "",
  440. page: function () {
  441. var e = [];
  442. if (n.count < 1) return "";
  443. 1 < u && !1 !== n.first && 0 !== r && e.push('<a class="layui-laypage-first" data-page="1" title="&#x9996;&#x9875;">' + (n.first || 1) + "</a>");
  444. var a = Math.floor((r - 1) / 2), t = 1 < u ? n.curr - a : 1,
  445. i = 1 < u ? (a = n.curr + (r - a - 1)) > n.pages ? n.pages : a : r;
  446. for (i - t < r - 1 && (t = i - r + 1), !1 !== n.first && 2 < t && e.push('<span class="layui-laypage-spr">&#x2026;</span>'); t <= i; t++) t === n.curr ? e.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" ' + (/^#/.test(n.theme) ? 'style="background-color:' + n.theme + ';"' : "") + "></em><em>" + t + "</em></span>") : e.push('<a data-page="' + t + '">' + t + "</a>");
  447. return n.pages > r && n.pages > i && !1 !== n.last && (i + 1 < n.pages && e.push('<span class="layui-laypage-spr">&#x2026;</span>'), 0 !== r && e.push('<a class="layui-laypage-last" title="&#x5C3E;&#x9875;" data-page="' + n.pages + '">' + (n.last || n.pages) + "</a>")), e.join("")
  448. }(),
  449. next: n.next ? '<a class="layui-laypage-next' + (n.curr == n.pages ? " " + a : "") + '" data-page="' + (n.curr + 1) + '">' + n.next + "</a>" : "",
  450. count: '<span class="layui-laypage-count">\u5171 ' + n.count + " \u6761</span>",
  451. limit: (t = ['<span class="layui-laypage-limits"><select lay-ignore>'], layui.each(n.limits, function (e, a) {
  452. t.push('<option value="' + a + '"' + (a === n.limit ? "selected" : "") + ">" + a + " \u6761/\u9875</option>")
  453. }), t.join("") + "</select></span>"),
  454. refresh: ['<a data-page="' + n.curr + '" class="layui-laypage-refresh">', '<i class="layui-icon layui-icon-refresh"></i>', "</a>"].join(""),
  455. skip: ['<span class="layui-laypage-skip">&#x5230;&#x7B2C;', '<input type="text" min="1" value="' + n.curr + '" class="layui-input">', '&#x9875;<button type="button" class="layui-laypage-btn">&#x786e;&#x5b9a;</button>', "</span>"].join("")
  456. };
  457. return ['<div class="layui-box layui-laypage layui-laypage-' + (n.theme ? /^#/.test(n.theme) ? "molv" : n.theme : "default") + '" id="layui-laypage-' + n.index + '">', (i = [], layui.each(n.layout, function (e, a) {
  458. l[a] && i.push(l[a])
  459. }), i.join("")), "</div>"].join("")
  460. }, t.prototype.jump = function (e, a) {
  461. if (e) {
  462. var t = this, i = t.config, n = e.children, r = e[c]("button")[0], u = e[c]("input")[0],
  463. e = e[c]("select")[0], l = function () {
  464. var e = Number(u.value.replace(/\s|\D/g, ""));
  465. e && (i.curr = e, t.render())
  466. };
  467. if (a) return l();
  468. for (var s = 0, p = n.length; s < p; s++) "a" === n[s].nodeName.toLowerCase() && o.on(n[s], "click", function () {
  469. var e = Number(this.getAttribute("data-page"));
  470. e < 1 || e > i.pages || (i.curr = e, t.render())
  471. });
  472. e && o.on(e, "change", function () {
  473. var e = this.value;
  474. i.curr * e > i.count && (i.curr = Math.ceil(i.count / e)), i.limit = e, t.render()
  475. }), r && o.on(r, "click", function () {
  476. l()
  477. })
  478. }
  479. }, t.prototype.skip = function (t) {
  480. var i, e;
  481. t && (i = this, (e = t[c]("input")[0]) && o.on(e, "keyup", function (e) {
  482. var a = this.value, e = e.keyCode;
  483. /^(37|38|39|40)$/.test(e) || (/\D/.test(a) && (this.value = a.replace(/\D/, "")), 13 === e && i.jump(t, !0))
  484. }))
  485. }, t.prototype.render = function (e) {
  486. var a = this, t = a.config, i = a.type(), n = a.view(),
  487. i = (2 === i ? t.elem && (t.elem.innerHTML = n) : 3 === i ? t.elem.html(n) : r[u](t.elem) && (r[u](t.elem).innerHTML = n), t.jump && t.jump(t, e), r[u]("layui-laypage-" + t.index));
  488. a.jump(i), t.hash && !e && (location.hash = "!" + t.hash + "=" + t.curr), a.skip(i)
  489. }, {
  490. render: function (e) {
  491. return new t(e).index
  492. }, index: layui.laypage ? layui.laypage.index + 1e4 : 0, on: function (a, e, t) {
  493. return a.attachEvent ? a.attachEvent("on" + e, function (e) {
  494. e.target = e.srcElement, t.call(a, e)
  495. }) : a.addEventListener(e, t, !1), this
  496. }
  497. });
  498. e("laypage", o)
  499. });
  500. !function (i, v) {
  501. "use strict";
  502. var n = i.layui && layui.define, l = {
  503. getPath: i.lay && lay.getPath ? lay.getPath : "", link: function (e, t, a) {
  504. D.path && i.lay && lay.layui && lay.layui.link(D.path + e, t, a)
  505. }
  506. }, e = i.LAYUI_GLOBAL || {}, d = "layui-laydate-id", D = {
  507. v: "5.5.0",
  508. config: {weekStart: 0},
  509. index: i.laydate && i.laydate.v ? 1e5 : 0,
  510. path: e.laydate_dir || l.getPath,
  511. set: function (e) {
  512. var t = this;
  513. return t.config = lay.extend({}, t.config, e), t
  514. },
  515. ready: function (e) {
  516. var t = "laydate", a = (n ? "modules/" : "") + "laydate.css?v=" + D.v;
  517. return n ? layui["layui.all"] ? "function" == typeof e && e() : layui.addcss(a, e, t) : l.link(a, e, t), this
  518. }
  519. }, s = function () {
  520. var t = this, e = t.config.id;
  521. return (s.that[e] = t).inst = {
  522. hint: function (e) {
  523. t.hint.call(t, e)
  524. }, reload: function (e) {
  525. t.reload.call(t, e)
  526. }, config: t.config
  527. }
  528. }, a = "laydate", x = "layui-this", k = "laydate-disabled", h = [100, 2e5], T = "layui-laydate-static",
  529. w = "layui-laydate-list", o = "laydate-selected", r = "layui-laydate-hint", y = "laydate-day-prev",
  530. m = "laydate-day-next", C = ".laydate-btns-confirm", M = "laydate-time-text", L = "laydate-btns-time",
  531. E = "layui-laydate-preview", S = "layui-laydate-shade", I = function (e) {
  532. var t, a = this,
  533. n = (a.index = ++D.index, a.config = lay.extend({}, a.config, D.config, e), lay(e.elem || a.config.elem));
  534. return 1 < n.length ? (lay.each(n, function () {
  535. D.render(lay.extend({}, a.config, {elem: this}))
  536. }), a) : (e = lay.extend(a.config, lay.options(n[0])), n[0] && n.attr(d) ? (t = s.getThis(n.attr(d))) ? t.reload(e) : void 0 : (e.id = "id" in e ? e.id : n.attr("id") || a.index, e.index = a.index, void D.ready(function () {
  537. a.init()
  538. })))
  539. }, c = "yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s";
  540. s.formatArr = function (e) {
  541. return (e || "").match(new RegExp(c + "|.", "g")) || []
  542. }, I.isLeapYear = function (e) {
  543. return e % 4 == 0 && e % 100 != 0 || e % 400 == 0
  544. }, I.prototype.config = {
  545. type: "date",
  546. range: !1,
  547. format: "yyyy-MM-dd",
  548. value: null,
  549. isInitValue: !0,
  550. min: "1900-1-1",
  551. max: "2099-12-31",
  552. trigger: "click",
  553. show: !1,
  554. showBottom: !0,
  555. isPreview: !0,
  556. btns: ["clear", "now", "confirm"],
  557. lang: "cn",
  558. theme: "default",
  559. position: null,
  560. calendar: !1,
  561. mark: {},
  562. holidays: null,
  563. zIndex: null,
  564. done: null,
  565. change: null,
  566. autoConfirm: !0,
  567. shade: 0
  568. }, I.prototype.lang = function () {
  569. var e = {
  570. cn: {
  571. weeks: ["\u65e5", "\u4e00", "\u4e8c", "\u4e09", "\u56db", "\u4e94", "\u516d"],
  572. time: ["\u65f6", "\u5206", "\u79d2"],
  573. timeTips: "\u9009\u62e9\u65f6\u95f4",
  574. startTime: "\u5f00\u59cb\u65f6\u95f4",
  575. endTime: "\u7ed3\u675f\u65f6\u95f4",
  576. dateTips: "\u8fd4\u56de\u65e5\u671f",
  577. month: ["\u4e00", "\u4e8c", "\u4e09", "\u56db", "\u4e94", "\u516d", "\u4e03", "\u516b", "\u4e5d", "\u5341", "\u5341\u4e00", "\u5341\u4e8c"],
  578. tools: {confirm: "\u786e\u5b9a", clear: "\u6e05\u7a7a", now: "\u73b0\u5728"},
  579. timeout: "\u7ed3\u675f\u65f6\u95f4\u4e0d\u80fd\u65e9\u4e8e\u5f00\u59cb\u65f6\u95f4<br>\u8bf7\u91cd\u65b0\u9009\u62e9",
  580. invalidDate: "\u4e0d\u5728\u6709\u6548\u65e5\u671f\u6216\u65f6\u95f4\u8303\u56f4\u5185",
  581. formatError: ["\u65e5\u671f\u683c\u5f0f\u4e0d\u5408\u6cd5<br>\u5fc5\u987b\u9075\u5faa\u4e0b\u8ff0\u683c\u5f0f\uff1a<br>", "<br>\u5df2\u4e3a\u4f60\u91cd\u7f6e"],
  582. preview: "\u5f53\u524d\u9009\u4e2d\u7684\u7ed3\u679c"
  583. },
  584. en: {
  585. weeks: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  586. time: ["Hours", "Minutes", "Seconds"],
  587. timeTips: "Select Time",
  588. startTime: "Start Time",
  589. endTime: "End Time",
  590. dateTips: "Select Date",
  591. month: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  592. tools: {confirm: "Confirm", clear: "Clear", now: "Now"},
  593. timeout: "End time cannot be less than start Time<br>Please re-select",
  594. invalidDate: "Invalid date",
  595. formatError: ["The date format error<br>Must be followed\uff1a<br>", "<br>It has been reset"],
  596. preview: "The selected result"
  597. }
  598. };
  599. return e[this.config.lang] || e.cn
  600. }, I.prototype.reload = function (e) {
  601. this.config = lay.extend({}, this.config, e), this.init()
  602. }, I.prototype.init = function () {
  603. var r = this, o = r.config, e = "static" === o.position,
  604. t = {year: "yyyy", month: "yyyy-MM", date: "yyyy-MM-dd", time: "HH:mm:ss", datetime: "yyyy-MM-dd HH:mm:ss"};
  605. o.elem = lay(o.elem), o.eventElem = lay(o.eventElem), o.elem[0] && ("array" !== layui.type(o.theme) && (o.theme = [o.theme]), o.fullPanel && ("datetime" !== o.type || o.range) && delete o.fullPanel, r.rangeStr = o.range ? "string" == typeof o.range ? o.range : "-" : "", r.rangeLinked = !(!o.range || !o.rangeLinked || "date" !== o.type && "datetime" !== o.type), r.autoCalendarModel = function () {
  606. var e = r.rangeLinked;
  607. return r.rangeLinked = o.range && ("date" === o.type || "datetime" === o.type) && (!r.startDate || !r.endDate || r.startDate && r.endDate && r.startDate.year === r.endDate.year && r.startDate.month === r.endDate.month), lay(r.elem)[r.rangeLinked ? "addClass" : "removeClass"]("layui-laydate-linkage"), r.rangeLinked != e
  608. }, r.autoCalendarModel.auto = r.rangeLinked && "auto" === o.rangeLinked, "array" === layui.type(o.range) && (r.rangeElem = [lay(o.range[0]), lay(o.range[1])]), t[o.type] || (i.console && console.error && console.error("laydate type error:'" + o.type + "' is not supported"), o.type = "date"), o.format === t.date && (o.format = t[o.type] || t.date), r.format = s.formatArr(o.format), o.weekStart && !/^[0-6]$/.test(o.weekStart) && (t = r.lang(), o.weekStart = t.weeks.indexOf(o.weekStart), -1 === o.weekStart && (o.weekStart = 0)), r.EXP_IF = "", r.EXP_SPLIT = "", lay.each(r.format, function (e, t) {
  609. e = new RegExp(c).test(t) ? "\\d{" + (new RegExp(c).test(r.format[0 === e ? e + 1 : e - 1] || "") ? /^yyyy|y$/.test(t) ? 4 : t.length : /^yyyy$/.test(t) ? "1,4" : /^y$/.test(t) ? "1,308" : "1,2") + "}" : "\\" + t;
  610. r.EXP_IF = r.EXP_IF + e, r.EXP_SPLIT = r.EXP_SPLIT + "(" + e + ")"
  611. }), r.EXP_IF_ONE = new RegExp("^" + r.EXP_IF + "$"), r.EXP_IF = new RegExp("^" + (o.range ? r.EXP_IF + "\\s\\" + r.rangeStr + "\\s" + r.EXP_IF : r.EXP_IF) + "$"), r.EXP_SPLIT = new RegExp("^" + r.EXP_SPLIT + "$", ""), r.isInput(o.elem[0]) || "focus" === o.trigger && (o.trigger = "click"), o.elem.attr("lay-key", r.index), o.eventElem.attr("lay-key", r.index), o.elem.attr(d, o.id), o.mark = lay.extend({}, o.calendar && "cn" === o.lang ? {
  612. "0-1-1": "\u5143\u65e6",
  613. "0-2-14": "\u60c5\u4eba",
  614. "0-3-8": "\u5987\u5973",
  615. "0-3-12": "\u690d\u6811",
  616. "0-4-1": "\u611a\u4eba",
  617. "0-5-1": "\u52b3\u52a8",
  618. "0-5-4": "\u9752\u5e74",
  619. "0-6-1": "\u513f\u7ae5",
  620. "0-9-10": "\u6559\u5e08",
  621. "0-10-1": "\u56fd\u5e86",
  622. "0-12-25": "\u5723\u8bde"
  623. } : {}, o.mark), lay.each(["min", "max"], function (e, t) {
  624. var a = [], n = [];
  625. if ("number" == typeof o[t]) var i = o[t], l = new Date, l = r.newDate({
  626. year: l.getFullYear(),
  627. month: l.getMonth(),
  628. date: l.getDate(),
  629. hours: e ? 23 : 0,
  630. minutes: e ? 59 : 0,
  631. seconds: e ? 59 : 0
  632. }).getTime(), e = new Date(i ? i < 864e5 ? l + 864e5 * i : i : l),
  633. a = [e.getFullYear(), e.getMonth() + 1, e.getDate()],
  634. n = [e.getHours(), e.getMinutes(), e.getSeconds()]; else if ("string" == typeof o[t]) a = (o[t].match(/\d+-\d+-\d+/) || [""])[0].split("-"), n = (o[t].match(/\d+:\d+:\d+/) || [""])[0].split(":"); else if ("object" == typeof o[t]) return o[t];
  635. o[t] = {
  636. year: 0 | a[0] || (new Date).getFullYear(),
  637. month: a[1] ? (0 | a[1]) - 1 : (new Date).getMonth(),
  638. date: 0 | a[2] || (new Date).getDate(),
  639. hours: 0 | n[0],
  640. minutes: 0 | n[1],
  641. seconds: 0 | n[2]
  642. }
  643. }), r.elemID = "layui-laydate" + o.elem.attr("lay-key"), (o.show || e) && r.render(), e || r.events(), o.value && o.isInitValue && ("date" === layui.type(o.value) ? r.setValue(r.parse(0, r.systemDate(o.value))) : r.setValue(o.value)))
  644. }, I.prototype.render = function () {
  645. var a, n, i, l, r = this, o = r.config, d = r.lang(), s = "static" === o.position,
  646. y = r.elem = lay.elem("div", {
  647. id: r.elemID,
  648. "class": ["layui-laydate", o.range ? " layui-laydate-range" : "", r.rangeLinked ? " layui-laydate-linkage" : "", s ? " " + T : "", o.fullPanel ? " laydate-theme-fullpanel" : "", (a = "", lay.each(o.theme, function (e, t) {
  649. "default" === t || /^#/.test(t) || (a += " laydate-theme-" + t)
  650. }), a)].join("")
  651. }), m = r.elemMain = [], c = r.elemHeader = [], u = r.elemCont = [], h = r.table = [],
  652. e = r.footer = lay.elem("div", {"class": "layui-laydate-footer"}),
  653. t = r.shortcut = lay.elem("ul", {"class": "layui-laydate-shortcut"}),
  654. f = (o.zIndex && (y.style.zIndex = o.zIndex), lay.each(new Array(2), function (e) {
  655. if (!o.range && 0 < e) return !0;
  656. var a = lay.elem("div", {"class": "layui-laydate-header"}),
  657. t = [((t = lay.elem("i", {"class": "layui-icon laydate-icon laydate-prev-y"})).innerHTML = "&#xe65a;", t), ((t = lay.elem("i", {"class": "layui-icon laydate-icon laydate-prev-m"})).innerHTML = "&#xe603;", t), (t = lay.elem("div", {"class": "laydate-set-ym"}), n = lay.elem("span"), l = lay.elem("span"), t.appendChild(n), t.appendChild(l), t), ((n = lay.elem("i", {"class": "layui-icon laydate-icon laydate-next-m"})).innerHTML = "&#xe602;", n), ((l = lay.elem("i", {"class": "layui-icon laydate-icon laydate-next-y"})).innerHTML = "&#xe65b;", l)],
  658. n = lay.elem("div", {"class": "layui-laydate-content"}), i = lay.elem("table"),
  659. l = lay.elem("thead"), r = lay.elem("tr");
  660. lay.each(t, function (e, t) {
  661. a.appendChild(t)
  662. }), l.appendChild(r), lay.each(new Array(6), function (a) {
  663. var n = i.insertRow(0);
  664. lay.each(new Array(7), function (e) {
  665. var t;
  666. 0 === a && ((t = lay.elem("th")).innerHTML = d.weeks[(e + o.weekStart) % 7], r.appendChild(t)), n.insertCell(e)
  667. })
  668. }), i.insertBefore(l, i.children[0]), n.appendChild(i), m[e] = lay.elem("div", {"class": "layui-laydate-main laydate-main-list-" + e}), m[e].appendChild(a), m[e].appendChild(n), c.push(t), u.push(n), h.push(i)
  669. }), lay(e).html((f = [], n = [], "datetime" === o.type && f.push('<span lay-type="datetime" class="' + L + '">' + d.timeTips + "</span>"), (o.range || "datetime" !== o.type || o.fullPanel) && f.push('<span class="' + E + '" title="' + d.preview + '"></span>'), lay.each(o.btns, function (e, t) {
  670. var a = d.tools[t] || "btn";
  671. o.range && "now" === t || (s && "clear" === t && (a = "cn" === o.lang ? "\u91cd\u7f6e" : "Reset"), n.push('<span lay-type="' + t + '" class="laydate-btns-' + t + '">' + a + "</span>"))
  672. }), f.push('<div class="laydate-footer-btns">' + n.join("") + "</div>"), f.join(""))), o.shortcuts && (y.appendChild(t), lay(t).html((i = [], lay.each(o.shortcuts, function (e, t) {
  673. i.push('<li data-index="' + e + '">' + t.text + "</li>")
  674. }), i.join(""))).find("li").on("click", function (e) {
  675. var t = (o.shortcuts[this.dataset.index] || {}).value || [],
  676. n = (layui.isArray(t) || (t = [t]), o.type), t = (lay.each(t, function (e, t) {
  677. var a = [o.dateTime, r.endDate][e];
  678. "time" === n && "date" !== layui.type(t) ? r.EXP_IF.test(t) && (t = (t.match(r.EXP_SPLIT) || []).slice(1), lay.extend(a, {
  679. hours: 0 | t[0],
  680. minutes: 0 | t[2],
  681. seconds: 0 | t[4]
  682. })) : lay.extend(a, r.systemDate("date" === layui.type(t) ? t : new Date(t))), "time" !== n && "datetime" !== n || (r[["startTime", "endTime"][e]] = {
  683. hours: a.hours,
  684. minutes: a.minutes,
  685. seconds: a.seconds
  686. }), 0 === e ? r.startDate = lay.extend({}, a) : r.endState = !0, "year" === n || "month" === n || "time" === n ? r.listYM[e] = [a.year, a.month + 1] : e && r.autoCalendarModel.auto && r.autoCalendarModel()
  687. }), r.checkDate("limit").calendar(null, null, "init"), lay(r.footer).find("." + L).removeClass(k));
  688. t && "date" === t.attr("lay-type") && t[0].click(), r.done(null, "change"), lay(this).addClass(x), "static" !== o.position && r.setValue(r.parse()).done().remove()
  689. })), lay.each(m, function (e, t) {
  690. y.appendChild(t)
  691. }), o.showBottom && y.appendChild(e), lay.elem("style")), p = [], g = !0,
  692. t = (lay.each(o.theme, function (e, t) {
  693. if (g && /^#/.test(t)) return g = !(l = !0), void p.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}", "#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}", -1 !== o.theme.indexOf("circle") ? "" : "#{{id}} .layui-this{background-color:{{theme}} !important;}", "#{{id}} .laydate-day-now{color:{{theme}} !important;}", "#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g, r.elemID).replace(/{{theme}}/g, t));
  694. !g && /^#/.test(t) && p.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}", "#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g, r.elemID).replace(/{{theme}}/g, t))
  695. }), o.shortcuts && o.range && p.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g, r.elemID)), p.length && (p = p.join(""), "styleSheet" in f ? (f.setAttribute("type", "text/css"), f.styleSheet.cssText = p) : f.innerHTML = p, l && lay(y).addClass("laydate-theme-molv"), y.appendChild(f)), r.remove(I.thisElemDate), D.thisId = o.id, s ? o.elem.append(y) : (v.body.appendChild(y), r.position()), o.shade ? '<div class="' + S + '" style="z-index:' + (parseInt(layui.getStyle(y, "z-index")) - 1) + "; background-color: " + (o.shade[1] || "#000") + "; opacity: " + (o.shade[0] || o.shade) + '"></div>' : "");
  696. y.insertAdjacentHTML("beforebegin", t), r.checkDate().calendar(null, 0, "init"), r.changeEvent(), I.thisElemDate = r.elemID, r.renderAdditional(), "function" == typeof o.ready && o.ready(lay.extend({}, o.dateTime, {month: o.dateTime.month + 1})), r.preview()
  697. }, I.prototype.remove = function (e) {
  698. var t = this, a = t.config, n = lay("#" + (e || t.elemID));
  699. return n[0] && (n.hasClass(T) || t.checkDate(function () {
  700. n.remove(), delete t.startDate, delete t.endDate, delete t.endState, delete t.startTime, delete t.endTime, delete D.thisId, "function" == typeof a.close && a.close(t)
  701. }), lay("." + S).remove()), t
  702. }, I.prototype.position = function () {
  703. var e = this.config;
  704. return lay.position(e.elem[0], this.elem, {position: e.position}), this
  705. }, I.prototype.hint = function (e) {
  706. var t = this, a = (t.config, lay.elem("div", {"class": r}));
  707. t.elem && (a.innerHTML = (e = "object" == typeof e ? e || {} : {content: e}).content || "", lay(t.elem).find("." + r).remove(), t.elem.appendChild(a), clearTimeout(t.hinTimer), t.hinTimer = setTimeout(function () {
  708. lay(t.elem).find("." + r).remove()
  709. }, "ms" in e ? e.ms : 3e3))
  710. }, I.prototype.getAsYM = function (e, t, a) {
  711. return a ? t-- : t++, t < 0 && (t = 11, e--), 11 < t && (t = 0, e++), [e, t]
  712. }, I.prototype.systemDate = function (e) {
  713. var t = e || new Date;
  714. return {
  715. year: t.getFullYear(),
  716. month: t.getMonth(),
  717. date: t.getDate(),
  718. hours: e ? e.getHours() : 0,
  719. minutes: e ? e.getMinutes() : 0,
  720. seconds: e ? e.getSeconds() : 0
  721. }
  722. }, I.prototype.checkDate = function (e) {
  723. var t, o, d = this, s = (new Date, d.config), a = d.lang(), n = s.dateTime = s.dateTime || d.systemDate(),
  724. i = s.elem[0], l = (d.isInput(i), function () {
  725. if (d.rangeElem) {
  726. var e = [d.rangeElem[0].val(), d.rangeElem[1].val()];
  727. if (e[0] && e[1]) return e.join(" " + d.rangeStr + " ")
  728. }
  729. return d.isInput(i) ? i.value : "static" === s.position ? "" : lay(i).attr("lay-date")
  730. }()), y = function (e) {
  731. e && (e.year > h[1] && (e.year = h[1], o = !0), 11 < e.month && (e.month = 11, o = !0), 59 < e.seconds && (e.seconds = 0, e.minutes++, o = !0), 59 < e.minutes && (e.minutes = 0, e.hours++, o = !0), 23 < e.hours && (e.hours = 0, o = !0), t = D.getEndDate(e.month + 1, e.year), e.date > t && (e.date = t, o = !0))
  732. }, r = function (n, i, l) {
  733. var r = ["startTime", "endTime"];
  734. i = (i.match(d.EXP_SPLIT) || []).slice(1), l = l || 0, s.range && (d[r[l]] = d[r[l]] || {}), lay.each(d.format, function (e, t) {
  735. var a = parseFloat(i[e]);
  736. i[e].length < t.length && (o = !0), /yyyy|y/.test(t) ? (a < h[0] && (a = h[0], o = !0), n.year = a) : /MM|M/.test(t) ? (a < 1 && (a = 1, o = !0), n.month = a - 1) : /dd|d/.test(t) ? (a < 1 && (a = 1, o = !0), n.date = a) : /HH|H/.test(t) ? (a < 0 && (o = !(a = 0)), 23 < a && (a = 23, o = !0), n.hours = a, s.range && (d[r[l]].hours = a)) : /mm|m/.test(t) ? (a < 0 && (o = !(a = 0)), 59 < a && (a = 59, o = !0), n.minutes = a, s.range && (d[r[l]].minutes = a)) : /ss|s/.test(t) && (a < 0 && (o = !(a = 0)), 59 < a && (a = 59, o = !0), n.seconds = a, s.range && (d[r[l]].seconds = a))
  737. }), y(n)
  738. };
  739. if ("limit" === e) return s.range ? (y(d.rangeLinked ? d.startDate : n), d.endDate && y(d.endDate)) : y(n), d;
  740. "string" == typeof (l = l || s.value) && (l = l.replace(/\s+/g, " ").replace(/^\s|\s$/g, ""));
  741. var m, c, u = function () {
  742. var e, t, a;
  743. s.range && (d.endDate = d.endDate || lay.extend({}, s.dateTime, (e = {}, t = s.dateTime, a = d.getAsYM(t.year, t.month), "year" === s.type ? e.year = t.year + 1 : "time" !== s.type && (e.year = a[0], e.month = a[1]), "datetime" !== s.type && "time" !== s.type || (e.hours = 23, e.minutes = e.seconds = 59), e)))
  744. };
  745. return u(), "string" == typeof l && l ? d.EXP_IF.test(l) ? s.range ? (l = l.split(" " + d.rangeStr + " "), lay.each([s.dateTime, d.endDate], function (e, t) {
  746. r(t, l[e], e)
  747. })) : r(n, l) : (d.hint(a.formatError[0] + (s.range ? s.format + " " + d.rangeStr + " " + s.format : s.format) + a.formatError[1]), o = !0) : l && "date" === layui.type(l) ? s.dateTime = d.systemDate(l) : (s.dateTime = d.systemDate(), delete d.startTime, delete d.endDate, u(), delete d.endTime), d.rangeElem && (u = [d.rangeElem[0].val(), d.rangeElem[1].val()], m = [s.dateTime, d.endDate], lay.each(u, function (e, t) {
  748. d.EXP_IF_ONE.test(t) && r(m[e], t, e)
  749. })), y(n), s.range && y(d.endDate), o && l && d.setValue(!s.range || d.endDate ? d.parse() : ""), d.getDateTime(n) > d.getDateTime(s.max) ? (n = s.dateTime = lay.extend({}, s.max), c = !0) : d.getDateTime(n) < d.getDateTime(s.min) && (n = s.dateTime = lay.extend({}, s.min), c = !0), s.range && ((d.getDateTime(d.endDate) < d.getDateTime(s.min) || d.getDateTime(d.endDate) > d.getDateTime(s.max)) && (d.endDate = lay.extend({}, s.max), c = !0), d.startTime = {
  750. hours: s.dateTime.hours,
  751. minutes: s.dateTime.minutes,
  752. seconds: s.dateTime.seconds
  753. }, d.endTime = {
  754. hours: d.endDate.hours,
  755. minutes: d.endDate.minutes,
  756. seconds: d.endDate.seconds
  757. }, "month" === s.type && (s.dateTime.date = 1, d.endDate.date = 1)), c && l && (d.setValue(d.parse()), d.hint("value " + a.invalidDate + a.formatError[1])), d.startDate = d.startDate || l && lay.extend({}, s.dateTime), d.autoCalendarModel.auto && d.autoCalendarModel(), d.endState = !s.range || !d.rangeLinked || !(!d.startDate || !d.endDate), e && e(), d
  758. }, I.prototype.mark = function (e, a) {
  759. var n, t = this.config;
  760. return lay.each(t.mark, function (e, t) {
  761. e = e.split("-");
  762. e[0] != a[0] && 0 != e[0] || e[1] != a[1] && 0 != e[1] || e[2] != a[2] || (n = t || a[2])
  763. }), n && e.find("div").html('<span class="laydate-day-mark">' + n + "</span>"), this
  764. }, I.prototype.holidays = function (n, i) {
  765. var e = this.config, l = ["", "work"];
  766. return "array" !== layui.type(e.holidays) || lay.each(e.holidays, function (a, e) {
  767. lay.each(e, function (e, t) {
  768. t === n.attr("lay-ymd") && n.find("div").html('<span class="laydate-day-holidays"' + (l[a] ? 'type="' + l[a] + '"' : "") + ">" + i[2] + "</span>")
  769. })
  770. }), this
  771. }, I.prototype.limit = function (t) {
  772. t = t || {};
  773. var i = this, e = i.config, l = {}, a = t.index > (t.time ? 0 : 41) ? i.endDate : e.dateTime;
  774. return lay.each({now: lay.extend({}, a, t.date || {}), min: e.min, max: e.max}, function (e, a) {
  775. var n;
  776. l[e] = i.newDate(lay.extend({
  777. year: a.year,
  778. month: "year" === t.type ? 0 : a.month,
  779. date: "year" === t.type || "month" === t.type ? 1 : a.date
  780. }, (n = {}, lay.each(t.time, function (e, t) {
  781. n[t] = a[t]
  782. }), n))).getTime()
  783. }), a = l.now < l.min || l.now > l.max, t.elem && t.elem[a ? "addClass" : "removeClass"](k), a
  784. }, I.prototype.thisDateTime = function (e) {
  785. var t = this.config;
  786. return e ? this.endDate : t.dateTime
  787. }, I.prototype.calendar = function (e, t, a) {
  788. t = t ? 1 : 0;
  789. var i, l, r, o = this, n = o.config, d = e || o.thisDateTime(t), s = new Date, y = o.lang(),
  790. m = "date" !== n.type && "datetime" !== n.type, c = lay(o.table[t]).find("td"),
  791. u = lay(o.elemHeader[t][2]).find("span");
  792. return d.year < h[0] && (d.year = h[0], o.hint(y.invalidDate)), d.year > h[1] && (d.year = h[1], o.hint(y.invalidDate)), o.firstDate || (o.firstDate = lay.extend({}, d)), s.setFullYear(d.year, d.month, 1), i = (s.getDay() + (7 - n.weekStart)) % 7, l = D.getEndDate(d.month || 12, d.year), r = D.getEndDate(d.month + 1, d.year), lay.each(c, function (e, t) {
  793. var a, n = [d.year, d.month];
  794. (t = lay(t)).removeAttr("class"), e < i ? (a = l - i + e, t.addClass("laydate-day-prev"), n = o.getAsYM(d.year, d.month, "sub")) : i <= e && e < r + i ? (a = e - i, o.rangeLinked || a + 1 === d.date && t.addClass(x)) : (a = e - r - i, t.addClass("laydate-day-next"), n = o.getAsYM(d.year, d.month)), n[1]++, n[2] = a + 1, t.attr("lay-ymd", n.join("-")).html("<div>" + n[2] + "</div>"), o.mark(t, n).holidays(t, n).limit({
  795. elem: t,
  796. date: {year: n[0], month: n[1] - 1, date: n[2]},
  797. index: e
  798. })
  799. }), lay(u[0]).attr("lay-ym", d.year + "-" + (d.month + 1)), lay(u[1]).attr("lay-ym", d.year + "-" + (d.month + 1)), "cn" === n.lang ? (lay(u[0]).attr("lay-type", "year").html(d.year + " \u5e74"), lay(u[1]).attr("lay-type", "month").html(d.month + 1 + " \u6708")) : (lay(u[0]).attr("lay-type", "month").html(y.month[d.month]), lay(u[1]).attr("lay-type", "year").html(d.year)), m && (n.range ? !e && "init" === a || (o.listYM = [[(o.startDate || n.dateTime).year, (o.startDate || n.dateTime).month + 1], [o.endDate.year, o.endDate.month + 1]], o.list(n.type, 0).list(n.type, 1), "time" === n.type ? o.setBtnStatus("\u65f6\u95f4", lay.extend({}, o.systemDate(), o.startTime), lay.extend({}, o.systemDate(), o.endTime)) : o.setBtnStatus(!0)) : (o.listYM = [[d.year, d.month + 1]], o.list(n.type, 0))), n.range && "init" === a && (o.rangeLinked ? (s = o.getAsYM(d.year, d.month, t ? "sub" : null), o.calendar(lay.extend({}, d, {
  800. year: s[0],
  801. month: s[1]
  802. }), 1 - t)) : o.calendar(null, 1 - t)), n.range || (c = ["hours", "minutes", "seconds"], o.limit({
  803. elem: lay(o.footer).find(".laydate-btns-now"),
  804. date: o.systemDate(),
  805. index: 0,
  806. time: c
  807. }), o.limit({
  808. elem: lay(o.footer).find(C),
  809. index: 0,
  810. time: c
  811. })), o.setBtnStatus(), lay(o.shortcut).find("li." + x).removeClass(x), n.range && !m && "init" !== a && o.stampRange(), o
  812. }, I.prototype.list = function (n, i) {
  813. var l, r, e, o, d = this, s = d.config, y = d.rangeLinked ? s.dateTime : [s.dateTime, d.endDate][i],
  814. m = d.lang(), t = s.range && "date" !== s.type && "datetime" !== s.type, c = lay.elem("ul", {
  815. "class": w + " " + {
  816. year: "laydate-year-list",
  817. month: "laydate-month-list",
  818. time: "laydate-time-list"
  819. }[n]
  820. }), a = d.elemHeader[i], u = lay(a[2]).find("span"), h = d.elemCont[i || 0], f = lay(h).find("." + w)[0],
  821. p = "cn" === s.lang, g = p ? "\u5e74" : "", v = d.listYM[i] || {}, D = ["hours", "minutes", "seconds"],
  822. T = ["startTime", "endTime"][i];
  823. return v[0] < 1 && (v[0] = 1), "year" === n ? (e = l = v[0] - 7, l < 1 && (e = l = 1), lay.each(new Array(15), function (e) {
  824. var t = lay.elem("li", {"lay-ym": l}), a = {year: l, month: 0, date: 1};
  825. l == v[0] && lay(t).addClass(x), t.innerHTML = l + g, c.appendChild(t), d.limit({
  826. elem: lay(t),
  827. date: a,
  828. index: i,
  829. type: n
  830. }), l++
  831. }), lay(u[p ? 0 : 1]).attr("lay-ym", l - 8 + "-" + v[1]).html(e + g + " - " + (l - 1) + g)) : "month" === n ? (lay.each(new Array(12), function (e) {
  832. var t = lay.elem("li", {"lay-ym": e}), a = {year: v[0], month: e, date: 1};
  833. e + 1 == v[1] && lay(t).addClass(x), t.innerHTML = m.month[e] + (p ? "\u6708" : ""), c.appendChild(t), d.limit({
  834. elem: lay(t),
  835. date: a,
  836. index: i,
  837. type: n
  838. })
  839. }), lay(u[p ? 0 : 1]).attr("lay-ym", v[0] + "-" + v[1]).html(v[0] + g)) : "time" === n && (r = function () {
  840. lay(c).find("ol").each(function (a, e) {
  841. lay(e).find("li").each(function (e, t) {
  842. d.limit({
  843. elem: lay(t),
  844. date: [{hours: e}, {hours: d[T].hours, minutes: e}, {
  845. hours: d[T].hours,
  846. minutes: d[T].minutes,
  847. seconds: e
  848. }][a],
  849. index: i,
  850. time: [["hours"], ["hours", "minutes"], ["hours", "minutes", "seconds"]][a]
  851. })
  852. })
  853. }), s.range || d.limit({
  854. elem: lay(d.footer).find(C),
  855. date: d[T],
  856. inedx: 0,
  857. time: ["hours", "minutes", "seconds"]
  858. })
  859. }, s.range ? d[T] || (d[T] = "startTime" === T ? y : d.endDate) : d[T] = y, lay.each([24, 60, 60], function (t, e) {
  860. var a = lay.elem("li"), n = ["<p>" + m.time[t] + "</p><ol>"];
  861. lay.each(new Array(e), function (e) {
  862. n.push("<li" + (d[T][D[t]] === e ? ' class="' + x + '"' : "") + ">" + lay.digit(e, 2) + "</li>")
  863. }), a.innerHTML = n.join("") + "</ol>", c.appendChild(a)
  864. }), r()), f && h.removeChild(f), h.appendChild(c), "year" === n || "month" === n ? (lay(d.elemMain[i]).addClass("laydate-ym-show"), lay(c).find("li").on("click", function () {
  865. var e = 0 | lay(this).attr("lay-ym");
  866. lay(this).hasClass(k) || (d.rangeLinked ? lay.extend(y, {
  867. year: "year" === n ? e : v[0],
  868. month: "year" === n ? v[1] - 1 : e
  869. }) : y[n] = e, "year" === s.type || "month" === s.type ? (lay(c).find("." + x).removeClass(x), lay(this).addClass(x), "month" === s.type && "year" === n && (d.listYM[i][0] = e, t && ((i ? d.endDate : y).year = e), d.list("month", i))) : (d.checkDate("limit").calendar(y, i, "init"), d.closeList()), d.setBtnStatus(), !s.range && s.autoConfirm && ("month" === s.type && "month" === n || "year" === s.type && "year" === n) && d.setValue(d.parse()).done().remove(), d.autoCalendarModel.auto && !d.rangeLinked ? d.choose(lay(h).find("td.layui-this"), i) : d.endState && d.done(null, "change"), lay(d.footer).find("." + L).removeClass(k))
  870. })) : (e = lay.elem("span", {"class": M}), o = function () {
  871. lay(c).find("ol").each(function (e) {
  872. var a = this, t = lay(a).find("li");
  873. a.scrollTop = 30 * (d[T][D[e]] - 2), a.scrollTop <= 0 && t.each(function (e, t) {
  874. if (!lay(this).hasClass(k)) return a.scrollTop = 30 * (e - 2), !0
  875. })
  876. })
  877. }, u = lay(a[2]).find("." + M), o(), e.innerHTML = s.range ? [m.startTime, m.endTime][i] : m.timeTips, lay(d.elemMain[i]).addClass("laydate-time-show"), u[0] && u.remove(), a[2].appendChild(e), lay(c).find("ol").each(function (t) {
  878. var a = this;
  879. lay(a).find("li").on("click", function () {
  880. var e = 0 | this.innerHTML;
  881. lay(this).hasClass(k) || (s.range ? d[T][D[t]] = e : y[D[t]] = e, lay(a).find("." + x).removeClass(x), lay(this).addClass(x), r(), o(), (d.endDate || "time" === s.type || "datetime" === s.type && s.fullPanel) && d.done(null, "change"), d.setBtnStatus())
  882. })
  883. })), d
  884. }, I.prototype.listYM = [], I.prototype.closeList = function () {
  885. var a = this;
  886. a.config;
  887. lay.each(a.elemCont, function (e, t) {
  888. lay(this).find("." + w).remove(), lay(a.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")
  889. }), lay(a.elem).find("." + M).remove()
  890. }, I.prototype.setBtnStatus = function (e, t, a) {
  891. var n = this, i = n.config, l = n.lang(), r = lay(n.footer).find(C);
  892. i.range && "time" !== i.type && (t = t || (n.rangeLinked ? n.startDate : i.dateTime), a = a || n.endDate, i = !n.endState || n.newDate(t).getTime() > n.newDate(a).getTime(), n.limit({date: t}) || n.limit({date: a}) ? r.addClass(k) : r[i ? "addClass" : "removeClass"](k), e && i && n.hint("string" == typeof e ? l.timeout.replace(/\u65e5\u671f/g, e) : l.timeout))
  893. }, I.prototype.parse = function (e, t) {
  894. var a = this, n = a.config,
  895. t = t || ("end" == e ? lay.extend({}, a.endDate, a.endTime) : n.range ? lay.extend({}, a.rangeLinked ? a.startDate : n.dateTime, a.startTime) : n.dateTime),
  896. t = D.parse(t, a.format, 1);
  897. return n.range && e === undefined ? t + " " + a.rangeStr + " " + a.parse("end") : t
  898. }, I.prototype.newDate = function (e) {
  899. return e = e || {}, new Date(e.year || 1, e.month || 0, e.date || 1, e.hours || 0, e.minutes || 0, e.seconds || 0)
  900. }, I.prototype.getDateTime = function (e) {
  901. return this.newDate(e).getTime()
  902. }, I.prototype.setValue = function (e) {
  903. var t = this, a = t.config, n = a.elem[0];
  904. return "static" === a.position || (e = e || "", t.isInput(n) ? lay(n).val(e) : (a = t.rangeElem) ? ("array" !== layui.type(e) && (e = e.split(" " + t.rangeStr + " ")), a[0].val(e[0] || ""), a[1].val(e[1] || "")) : (0 === lay(n).find("*").length && lay(n).html(e), lay(n).attr("lay-date", e))), t
  905. }, I.prototype.preview = function () {
  906. var e, t = this, a = t.config;
  907. a.isPreview && (e = lay(t.elem).find("." + E), a = !a.range || (t.rangeLinked ? t.endState : t.endDate) ? t.parse() : "", e.html(a), e.html() && (e.css({color: "#16b777"}), setTimeout(function () {
  908. e.css({color: "#777"})
  909. }, 300)))
  910. }, I.prototype.renderAdditional = function () {
  911. this.config.fullPanel && this.list("time", 0)
  912. }, I.prototype.stampRange = function () {
  913. var n, i = this, l = i.config, r = i.rangeLinked ? i.startDate : l.dateTime, e = lay(i.elem).find("td");
  914. l.range && !i.endState && lay(i.footer).find(C).addClass(k), r = r && i.newDate({
  915. year: r.year,
  916. month: r.month,
  917. date: r.date
  918. }).getTime(), n = i.endState && i.endDate && i.newDate({
  919. year: i.endDate.year,
  920. month: i.endDate.month,
  921. date: i.endDate.date
  922. }).getTime(), lay.each(e, function (e, t) {
  923. var a = lay(t).attr("lay-ymd").split("-"),
  924. a = i.newDate({year: a[0], month: a[1] - 1, date: a[2]}).getTime();
  925. l.rangeLinked && !i.startDate && a === i.newDate(i.systemDate()).getTime() && lay(t).addClass(lay(t).hasClass(y) || lay(t).hasClass(m) ? "" : "laydate-day-now"), lay(t).removeClass(o + " " + x), a !== r && a !== n || (i.rangeLinked || !i.rangeLinked && (e < 42 ? a === r : a === n)) && lay(t).addClass(lay(t).hasClass(y) || lay(t).hasClass(m) ? o : x), r < a && a < n && lay(t).addClass(o)
  926. })
  927. }, I.prototype.done = function (e, t) {
  928. var a = this, n = a.config, i = lay.extend({}, lay.extend(n.dateTime, a.startTime)),
  929. l = lay.extend({}, lay.extend(a.endDate, a.endTime));
  930. return lay.each([i, l], function (e, t) {
  931. "month" in t && lay.extend(t, {month: t.month + 1})
  932. }), a.preview(), e = e || [a.parse(), i, l], "change" === t && a.renderAdditional(), "function" == typeof n[t || "done"] && n[t || "done"].apply(n, e), a
  933. }, I.prototype.choose = function (e, a) {
  934. var n, i, t, l, r, o;
  935. e.hasClass(k) || (i = (n = this).config, t = a, n.rangeLinked && (n.endState || !n.startDate ? (a = 0, n.endState = !1, n.endDate = {}) : (a = 1, n.endState = !0)), l = n.thisDateTime(a), lay(n.elem).find("td"), e = {
  936. year: 0 | (e = e.attr("lay-ymd").split("-"))[0],
  937. month: (0 | e[1]) - 1,
  938. date: 0 | e[2]
  939. }, lay.extend(l, e), i.range ? (lay.each(["startTime", "endTime"], function (e, t) {
  940. n[t] = n[t] || {
  941. hours: e ? 23 : 0,
  942. minutes: e ? 59 : 0,
  943. seconds: e ? 59 : 0
  944. }, a === e && (n.getDateTime(lay.extend({}, l, n[t])) < n.getDateTime(i.min) ? (n[t] = {
  945. hours: i.min.hours,
  946. minutes: i.min.minutes,
  947. seconds: i.min.seconds
  948. }, lay.extend(l, n[t])) : n.getDateTime(lay.extend({}, l, n[t])) > n.getDateTime(i.max) && (n[t] = {
  949. hours: i.max.hours,
  950. minutes: i.max.minutes,
  951. seconds: i.max.seconds
  952. }, lay.extend(l, n[t])))
  953. }), a || (n.startDate = lay.extend({}, l)), n.endState && !n.limit({date: n.thisDateTime(1 - a)}) && (((r = n.endState && n.autoCalendarModel.auto ? n.autoCalendarModel() : r) || n.rangeLinked && n.endState) && n.newDate(n.startDate) > n.newDate(n.endDate) && (e = n.startDate.year === n.endDate.year && n.startDate.month === n.endDate.month && n.startDate.date === n.endDate.date, o = n.startDate, n.startDate = lay.extend({}, n.endDate, e ? {} : n.startTime), i.dateTime = lay.extend({}, n.startDate), n.endDate = lay.extend({}, o, e ? {} : n.endTime), e && (o = n.startTime, n.startTime = n.endTime, n.endTime = o)), r && (i.dateTime = lay.extend({}, n.startDate))), n.rangeLinked ? (e = lay.extend({}, l), !t || a || r || (o = n.getAsYM(l.year, l.month, "sub"), lay.extend(i.dateTime, {
  954. year: o[0],
  955. month: o[1]
  956. })), n.calendar(e, t, r ? "init" : null)) : n.calendar(null, a, r ? "init" : null), n.endState && n.done(null, "change")) : "static" === i.position ? n.calendar().done().done(null, "change") : "date" === i.type ? i.autoConfirm ? n.setValue(n.parse()).done().remove() : n.calendar().done(null, "change") : "datetime" === i.type && n.calendar().done(null, "change"))
  957. }, I.prototype.tool = function (t, e) {
  958. var a = this, n = a.config, i = a.lang(), l = n.dateTime, r = "static" === n.position, o = {
  959. datetime: function () {
  960. lay(t).hasClass(k) || (a.list("time", 0), n.range && a.list("time", 1), lay(t).attr("lay-type", "date").html(a.lang().dateTips))
  961. }, date: function () {
  962. a.closeList(), lay(t).attr("lay-type", "datetime").html(a.lang().timeTips)
  963. }, clear: function () {
  964. r && (lay.extend(l, a.firstDate), a.calendar()), n.range && (delete n.dateTime, delete a.endDate, delete a.startTime, delete a.endTime), a.setValue(""), a.done(null, "onClear").done(["", {}, {}]).remove()
  965. }, now: function () {
  966. var e = new Date;
  967. if (lay(t).hasClass(k)) return a.hint(i.tools.now + ", " + i.invalidDate);
  968. lay.extend(l, a.systemDate(), {
  969. hours: e.getHours(),
  970. minutes: e.getMinutes(),
  971. seconds: e.getSeconds()
  972. }), a.setValue(a.parse()), r && a.calendar(), a.done(null, "onNow").done().remove()
  973. }, confirm: function () {
  974. if (n.range) {
  975. if (lay(t).hasClass(k)) return a.hint("time" === n.type ? i.timeout.replace(/\u65e5\u671f/g, "\u65f6\u95f4") : i.timeout)
  976. } else if (lay(t).hasClass(k)) return a.hint(i.invalidDate);
  977. a.setValue(a.parse()), a.done(null, "onConfirm").done().remove()
  978. }
  979. };
  980. o[e] && o[e]()
  981. }, I.prototype.change = function (n) {
  982. var i = this, l = i.config, r = i.thisDateTime(n), o = l.range && ("year" === l.type || "month" === l.type),
  983. d = i.elemCont[n || 0], s = i.listYM[n], e = function (e) {
  984. var t = lay(d).find(".laydate-year-list")[0], a = lay(d).find(".laydate-month-list")[0];
  985. return t && (s[0] = e ? s[0] - 15 : s[0] + 15, i.list("year", n)), a && (e ? s[0]-- : s[0]++, i.list("month", n)), (t || a) && (lay.extend(r, {year: s[0]}), o && (r.year = s[0]), l.range || i.done(null, "change"), l.range || i.limit({
  986. elem: lay(i.footer).find(C),
  987. date: {year: s[0]}
  988. })), i.setBtnStatus(), t || a
  989. };
  990. return {
  991. prevYear: function () {
  992. e("sub") || (i.rangeLinked ? (l.dateTime.year--, i.checkDate("limit").calendar(null, null, "init")) : (r.year--, i.checkDate("limit").calendar(null, n), i.autoCalendarModel.auto ? i.choose(lay(d).find("td.layui-this"), n) : i.done(null, "change")))
  993. }, prevMonth: function () {
  994. i.rangeLinked && (r = l.dateTime);
  995. var e = i.getAsYM(r.year, r.month, "sub");
  996. lay.extend(r, {
  997. year: e[0],
  998. month: e[1]
  999. }), i.checkDate("limit").calendar(null, null, "init"), i.rangeLinked || (i.autoCalendarModel.auto ? i.choose(lay(d).find("td.layui-this"), n) : i.done(null, "change"))
  1000. }, nextMonth: function () {
  1001. i.rangeLinked && (r = l.dateTime);
  1002. var e = i.getAsYM(r.year, r.month);
  1003. lay.extend(r, {
  1004. year: e[0],
  1005. month: e[1]
  1006. }), i.checkDate("limit").calendar(null, null, "init"), i.rangeLinked || (i.autoCalendarModel.auto ? i.choose(lay(d).find("td.layui-this"), n) : i.done(null, "change"))
  1007. }, nextYear: function () {
  1008. e() || (i.rangeLinked ? (l.dateTime.year++, i.checkDate("limit").calendar(null, 0, "init")) : (r.year++, i.checkDate("limit").calendar(null, n), i.autoCalendarModel.auto ? i.choose(lay(d).find("td.layui-this"), n) : i.done(null, "change")))
  1009. }
  1010. }
  1011. }, I.prototype.changeEvent = function () {
  1012. var i = this;
  1013. i.config;
  1014. lay(i.elem).on("click", function (e) {
  1015. lay.stope(e)
  1016. }).on("mousedown", function (e) {
  1017. lay.stope(e)
  1018. }), lay.each(i.elemHeader, function (n, e) {
  1019. lay(e[0]).on("click", function (e) {
  1020. i.change(n).prevYear()
  1021. }), lay(e[1]).on("click", function (e) {
  1022. i.change(n).prevMonth()
  1023. }), lay(e[2]).find("span").on("click", function (e) {
  1024. var t = lay(this), a = t.attr("lay-ym"), t = t.attr("lay-type");
  1025. a && (a = a.split("-"), i.listYM[n] = [0 | a[0], 0 | a[1]], i.list(t, n), lay(i.footer).find("." + L).addClass(k))
  1026. }), lay(e[3]).on("click", function (e) {
  1027. i.change(n).nextMonth()
  1028. }), lay(e[4]).on("click", function (e) {
  1029. i.change(n).nextYear()
  1030. })
  1031. }), lay.each(i.table, function (e, t) {
  1032. lay(t).find("td").on("click", function () {
  1033. i.choose(lay(this), e)
  1034. })
  1035. }), lay(i.footer).find("span").on("click", function () {
  1036. var e = lay(this).attr("lay-type");
  1037. i.tool(this, e)
  1038. })
  1039. }, I.prototype.isInput = function (e) {
  1040. return /input|textarea/.test(e.tagName.toLocaleLowerCase()) || /INPUT|TEXTAREA/.test(e.tagName)
  1041. }, I.prototype.events = function () {
  1042. var e, t = this, a = t.config;
  1043. a.elem[0] && !a.elem[0].eventHandler && (a.elem.on(a.trigger, e = function () {
  1044. D.thisId !== a.id && t.render()
  1045. }), a.elem[0].eventHandler = !0, a.eventElem.on(a.trigger, e), t.unbind = function () {
  1046. t.remove(), a.elem.off(a.trigger, e), a.elem.removeAttr("lay-key"), a.elem.removeAttr(d), a.elem[0].eventHandler = !1, a.eventElem.off(a.trigger, e), a.eventElem.removeAttr("lay-key"), delete s.that[a.id]
  1047. })
  1048. }, s.that = {}, s.getThis = function (e) {
  1049. var t = s.that[e];
  1050. return !t && n && layui.hint().error(e ? a + " instance with ID '" + e + "' not found" : "ID argument required"), t
  1051. }, l.run = function (n) {
  1052. n(v).on("mousedown", function (e) {
  1053. var t, a;
  1054. !D.thisId || (t = s.getThis(D.thisId)) && (a = t.config, e.target !== a.elem[0] && e.target !== a.eventElem[0] && e.target !== n(a.closeStop)[0] && t.remove())
  1055. }).on("keydown", function (e) {
  1056. var t;
  1057. !D.thisId || (t = s.getThis(D.thisId)) && "static" !== t.config.position && 13 === e.keyCode && n("#" + t.elemID)[0] && t.elemID === I.thisElemDate && (e.preventDefault(), n(t.footer).find(C)[0].click())
  1058. }), n(i).on("resize", function () {
  1059. if (D.thisId) {
  1060. var e = s.getThis(D.thisId);
  1061. if (e) return !(!e.elem || !n(".layui-laydate")[0]) && void e.position()
  1062. }
  1063. })
  1064. }, D.render = function (e) {
  1065. e = new I(e);
  1066. return s.call(e)
  1067. }, D.reload = function (e, t) {
  1068. e = s.getThis(e);
  1069. if (e) return e.reload(t)
  1070. }, D.getInst = function (e) {
  1071. e = s.getThis(e);
  1072. if (e) return e.inst
  1073. }, D.hint = function (e, t) {
  1074. e = s.getThis(e);
  1075. if (e) return e.hint(t)
  1076. }, D.unbind = function (e) {
  1077. e = s.getThis(e);
  1078. if (e) return e.unbind()
  1079. }, D.close = function (e) {
  1080. e = s.getThis(e || D.thisId);
  1081. if (e) return e.remove()
  1082. }, D.parse = function (a, n, i) {
  1083. return a = a || {}, n = ((n = "string" == typeof n ? s.formatArr(n) : n) || []).concat(), lay.each(n, function (e, t) {
  1084. /yyyy|y/.test(t) ? n[e] = lay.digit(a.year, t.length) : /MM|M/.test(t) ? n[e] = lay.digit(a.month + (i || 0), t.length) : /dd|d/.test(t) ? n[e] = lay.digit(a.date, t.length) : /HH|H/.test(t) ? n[e] = lay.digit(a.hours, t.length) : /mm|m/.test(t) ? n[e] = lay.digit(a.minutes, t.length) : /ss|s/.test(t) && (n[e] = lay.digit(a.seconds, t.length))
  1085. }), n.join("")
  1086. }, D.getEndDate = function (e, t) {
  1087. var a = new Date;
  1088. return a.setFullYear(t || a.getFullYear(), e || a.getMonth() + 1, 1), new Date(a.getTime() - 864e5).getDate()
  1089. }, n ? (D.ready(), layui.define("lay", function (e) {
  1090. D.path = layui.cache.dir, l.run(lay), e(a, D)
  1091. })) : "function" == typeof define && define.amd ? define(function () {
  1092. return l.run(lay), D
  1093. }) : (D.ready(), l.run(i.lay), i.laydate = D)
  1094. }(window, window.document);
  1095. !function (e, t) {
  1096. "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e) : function (e) {
  1097. if (e.document) return t(e);
  1098. throw new Error("jQuery requires a window with a document")
  1099. } : t(e)
  1100. }("undefined" != typeof window ? window : this, function (T, M) {
  1101. var f = [], g = T.document, c = f.slice, O = f.concat, R = f.push, P = f.indexOf, B = {}, W = B.toString,
  1102. m = B.hasOwnProperty, y = {}, e = "1.12.4", C = function (e, t) {
  1103. return new C.fn.init(e, t)
  1104. }, I = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, $ = /^-ms-/, z = /-([\da-z])/gi, X = function (e, t) {
  1105. return t.toUpperCase()
  1106. };
  1107. function U(e) {
  1108. var t = !!e && "length" in e && e.length, n = C.type(e);
  1109. return "function" !== n && !C.isWindow(e) && ("array" === n || 0 === t || "number" == typeof t && 0 < t && t - 1 in e)
  1110. }
  1111. C.fn = C.prototype = {
  1112. jquery: e, constructor: C, selector: "", length: 0, toArray: function () {
  1113. return c.call(this)
  1114. }, get: function (e) {
  1115. return null != e ? e < 0 ? this[e + this.length] : this[e] : c.call(this)
  1116. }, pushStack: function (e) {
  1117. e = C.merge(this.constructor(), e);
  1118. return e.prevObject = this, e.context = this.context, e
  1119. }, each: function (e) {
  1120. return C.each(this, e)
  1121. }, map: function (n) {
  1122. return this.pushStack(C.map(this, function (e, t) {
  1123. return n.call(e, t, e)
  1124. }))
  1125. }, slice: function () {
  1126. return this.pushStack(c.apply(this, arguments))
  1127. }, first: function () {
  1128. return this.eq(0)
  1129. }, last: function () {
  1130. return this.eq(-1)
  1131. }, eq: function (e) {
  1132. var t = this.length, e = +e + (e < 0 ? t : 0);
  1133. return this.pushStack(0 <= e && e < t ? [this[e]] : [])
  1134. }, end: function () {
  1135. return this.prevObject || this.constructor()
  1136. }, push: R, sort: f.sort, splice: f.splice
  1137. }, C.extend = C.fn.extend = function () {
  1138. var e, t, n, r, i, o = arguments[0] || {}, a = 1, s = arguments.length, u = !1;
  1139. for ("boolean" == typeof o && (u = o, o = arguments[a] || {}, a++), "object" == typeof o || C.isFunction(o) || (o = {}), a === s && (o = this, a--); a < s; a++) if (null != (r = arguments[a])) for (n in r) i = o[n], o !== (t = r[n]) && (u && t && (C.isPlainObject(t) || (e = C.isArray(t))) ? (i = e ? (e = !1, i && C.isArray(i) ? i : []) : i && C.isPlainObject(i) ? i : {}, o[n] = C.extend(u, i, t)) : t !== undefined && (o[n] = t));
  1140. return o
  1141. }, C.extend({
  1142. expando: "jQuery" + (e + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (e) {
  1143. throw new Error(e)
  1144. }, noop: function () {
  1145. }, isFunction: function (e) {
  1146. return "function" === C.type(e)
  1147. }, isArray: Array.isArray || function (e) {
  1148. return "array" === C.type(e)
  1149. }, isWindow: function (e) {
  1150. return null != e && e == e.window
  1151. }, isNumeric: function (e) {
  1152. var t = e && e.toString();
  1153. return !C.isArray(e) && 0 <= t - parseFloat(t) + 1
  1154. }, isEmptyObject: function (e) {
  1155. for (var t in e) return !1;
  1156. return !0
  1157. }, isPlainObject: function (e) {
  1158. if (!e || "object" !== C.type(e) || e.nodeType || C.isWindow(e)) return !1;
  1159. try {
  1160. if (e.constructor && !m.call(e, "constructor") && !m.call(e.constructor.prototype, "isPrototypeOf")) return !1
  1161. } catch (n) {
  1162. return !1
  1163. }
  1164. if (!y.ownFirst) for (var t in e) return m.call(e, t);
  1165. for (t in e) ;
  1166. return t === undefined || m.call(e, t)
  1167. }, type: function (e) {
  1168. return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? B[W.call(e)] || "object" : typeof e
  1169. }, globalEval: function (e) {
  1170. e && C.trim(e) && (T.execScript || function (e) {
  1171. T.eval.call(T, e)
  1172. })(e)
  1173. }, camelCase: function (e) {
  1174. return e.replace($, "ms-").replace(z, X)
  1175. }, nodeName: function (e, t) {
  1176. return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()
  1177. }, each: function (e, t) {
  1178. var n, r = 0;
  1179. if (U(e)) for (n = e.length; r < n && !1 !== t.call(e[r], r, e[r]); r++) ; else for (r in e) if (!1 === t.call(e[r], r, e[r])) break;
  1180. return e
  1181. }, trim: function (e) {
  1182. return null == e ? "" : (e + "").replace(I, "")
  1183. }, makeArray: function (e, t) {
  1184. t = t || [];
  1185. return null != e && (U(Object(e)) ? C.merge(t, "string" == typeof e ? [e] : e) : R.call(t, e)), t
  1186. }, inArray: function (e, t, n) {
  1187. var r;
  1188. if (t) {
  1189. if (P) return P.call(t, e, n);
  1190. for (r = t.length, n = n ? n < 0 ? Math.max(0, r + n) : n : 0; n < r; n++) if (n in t && t[n] === e) return n
  1191. }
  1192. return -1
  1193. }, merge: function (e, t) {
  1194. for (var n = +t.length, r = 0, i = e.length; r < n;) e[i++] = t[r++];
  1195. if (n != n) for (; t[r] !== undefined;) e[i++] = t[r++];
  1196. return e.length = i, e
  1197. }, grep: function (e, t, n) {
  1198. for (var r = [], i = 0, o = e.length, a = !n; i < o; i++) !t(e[i], i) != a && r.push(e[i]);
  1199. return r
  1200. }, map: function (e, t, n) {
  1201. var r, i, o = 0, a = [];
  1202. if (U(e)) for (r = e.length; o < r; o++) null != (i = t(e[o], o, n)) && a.push(i); else for (o in e) null != (i = t(e[o], o, n)) && a.push(i);
  1203. return O.apply([], a)
  1204. }, guid: 1, proxy: function (e, t) {
  1205. var n, r;
  1206. return "string" == typeof t && (r = e[t], t = e, e = r), C.isFunction(e) ? (n = c.call(arguments, 2), (r = function () {
  1207. return e.apply(t || this, n.concat(c.call(arguments)))
  1208. }).guid = e.guid = e.guid || C.guid++, r) : undefined
  1209. }, now: function () {
  1210. return +new Date
  1211. }, support: y
  1212. }), "function" == typeof Symbol && (C.fn[Symbol.iterator] = f[Symbol.iterator]), C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) {
  1213. B["[object " + t + "]"] = t.toLowerCase()
  1214. });
  1215. var e = function (M) {
  1216. var e, g, b, o, O, w, R, P, T, u, l, C, E, t, N, m, r, i, y, k = "sizzle" + +new Date, v = M.document, S = 0,
  1217. B = 0, W = le(), I = le(), A = le(), $ = function (e, t) {
  1218. return e === t && (l = !0), 0
  1219. }, z = {}.hasOwnProperty, n = [], X = n.pop, U = n.push, D = n.push, V = n.slice, j = function (e, t) {
  1220. for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
  1221. return -1
  1222. },
  1223. Y = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  1224. a = "[\\x20\\t\\r\\n\\f]", s = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  1225. J = "\\[" + a + "*(" + s + ")(?:" + a + "*([*^$|!~]?=)" + a + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + s + "))|)" + a + "*\\]",
  1226. G = ":(" + s + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + J + ")*)|.*)\\)|)",
  1227. K = new RegExp(a + "+", "g"), L = new RegExp("^" + a + "+|((?:^|[^\\\\])(?:\\\\.)*)" + a + "+$", "g"),
  1228. Q = new RegExp("^" + a + "*," + a + "*"), Z = new RegExp("^" + a + "*([>+~]|" + a + ")" + a + "*"),
  1229. ee = new RegExp("=" + a + "*([^\\]'\"]*?)" + a + "*\\]", "g"), te = new RegExp(G),
  1230. ne = new RegExp("^" + s + "$"), f = {
  1231. ID: new RegExp("^#(" + s + ")"),
  1232. CLASS: new RegExp("^\\.(" + s + ")"),
  1233. TAG: new RegExp("^(" + s + "|[*])"),
  1234. ATTR: new RegExp("^" + J),
  1235. PSEUDO: new RegExp("^" + G),
  1236. CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + a + "*(even|odd|(([+-]|)(\\d*)n|)" + a + "*(?:([+-]|)" + a + "*(\\d+)|))" + a + "*\\)|)", "i"),
  1237. bool: new RegExp("^(?:" + Y + ")$", "i"),
  1238. needsContext: new RegExp("^" + a + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + a + "*((?:-\\d)?\\d*)" + a + "*\\)|)(?=[^-]|$)", "i")
  1239. }, re = /^(?:input|select|textarea|button)$/i, ie = /^h\d$/i, c = /^[^{]+\{\s*\[native \w/,
  1240. oe = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ae = /[+~]/, se = /'|\\/g,
  1241. d = new RegExp("\\\\([\\da-f]{1,6}" + a + "?|(" + a + ")|.)", "ig"), p = function (e, t, n) {
  1242. var r = "0x" + t - 65536;
  1243. return r != r || n ? t : r < 0 ? String.fromCharCode(65536 + r) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  1244. }, ue = function () {
  1245. C()
  1246. };
  1247. try {
  1248. D.apply(n = V.call(v.childNodes), v.childNodes), n[v.childNodes.length].nodeType
  1249. } catch (F) {
  1250. D = {
  1251. apply: n.length ? function (e, t) {
  1252. U.apply(e, V.call(t))
  1253. } : function (e, t) {
  1254. for (var n = e.length, r = 0; e[n++] = t[r++];) ;
  1255. e.length = n - 1
  1256. }
  1257. }
  1258. }
  1259. function H(e, t, n, r) {
  1260. var i, o, a, s, u, l, c, f, d = t && t.ownerDocument, p = t ? t.nodeType : 9;
  1261. if (n = n || [], "string" != typeof e || !e || 1 !== p && 9 !== p && 11 !== p) return n;
  1262. if (!r && ((t ? t.ownerDocument || t : v) !== E && C(t), t = t || E, N)) {
  1263. if (11 !== p && (l = oe.exec(e))) if (i = l[1]) {
  1264. if (9 === p) {
  1265. if (!(a = t.getElementById(i))) return n;
  1266. if (a.id === i) return n.push(a), n
  1267. } else if (d && (a = d.getElementById(i)) && y(t, a) && a.id === i) return n.push(a), n
  1268. } else {
  1269. if (l[2]) return D.apply(n, t.getElementsByTagName(e)), n;
  1270. if ((i = l[3]) && g.getElementsByClassName && t.getElementsByClassName) return D.apply(n, t.getElementsByClassName(i)), n
  1271. }
  1272. if (g.qsa && !A[e + " "] && (!m || !m.test(e))) {
  1273. if (1 !== p) d = t, f = e; else if ("object" !== t.nodeName.toLowerCase()) {
  1274. for ((s = t.getAttribute("id")) ? s = s.replace(se, "\\$&") : t.setAttribute("id", s = k), o = (c = w(e)).length, u = ne.test(s) ? "#" + s : "[id='" + s + "']"; o--;) c[o] = u + " " + _(c[o]);
  1275. f = c.join(","), d = ae.test(e) && de(t.parentNode) || t
  1276. }
  1277. if (f) try {
  1278. return D.apply(n, d.querySelectorAll(f)), n
  1279. } catch (h) {
  1280. } finally {
  1281. s === k && t.removeAttribute("id")
  1282. }
  1283. }
  1284. }
  1285. return P(e.replace(L, "$1"), t, n, r)
  1286. }
  1287. function le() {
  1288. var n = [];
  1289. function r(e, t) {
  1290. return n.push(e + " ") > b.cacheLength && delete r[n.shift()], r[e + " "] = t
  1291. }
  1292. return r
  1293. }
  1294. function q(e) {
  1295. return e[k] = !0, e
  1296. }
  1297. function h(e) {
  1298. var t = E.createElement("div");
  1299. try {
  1300. return !!e(t)
  1301. } catch (F) {
  1302. return !1
  1303. } finally {
  1304. t.parentNode && t.parentNode.removeChild(t)
  1305. }
  1306. }
  1307. function ce(e, t) {
  1308. for (var n = e.split("|"), r = n.length; r--;) b.attrHandle[n[r]] = t
  1309. }
  1310. function fe(e, t) {
  1311. var n = t && e,
  1312. r = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || 1 << 31) - (~e.sourceIndex || 1 << 31);
  1313. if (r) return r;
  1314. if (n) for (; n = n.nextSibling;) if (n === t) return -1;
  1315. return e ? 1 : -1
  1316. }
  1317. function x(a) {
  1318. return q(function (o) {
  1319. return o = +o, q(function (e, t) {
  1320. for (var n, r = a([], e.length, o), i = r.length; i--;) e[n = r[i]] && (e[n] = !(t[n] = e[n]))
  1321. })
  1322. })
  1323. }
  1324. function de(e) {
  1325. return e && "undefined" != typeof e.getElementsByTagName && e
  1326. }
  1327. for (e in g = H.support = {}, O = H.isXML = function (e) {
  1328. e = e && (e.ownerDocument || e).documentElement;
  1329. return !!e && "HTML" !== e.nodeName
  1330. }, C = H.setDocument = function (e) {
  1331. var e = e ? e.ownerDocument || e : v;
  1332. return e !== E && 9 === e.nodeType && e.documentElement && (t = (E = e).documentElement, N = !O(E), (e = E.defaultView) && e.top !== e && (e.addEventListener ? e.addEventListener("unload", ue, !1) : e.attachEvent && e.attachEvent("onunload", ue)), g.attributes = h(function (e) {
  1333. return e.className = "i", !e.getAttribute("className")
  1334. }), g.getElementsByTagName = h(function (e) {
  1335. return e.appendChild(E.createComment("")), !e.getElementsByTagName("*").length
  1336. }), g.getElementsByClassName = c.test(E.getElementsByClassName), g.getById = h(function (e) {
  1337. return t.appendChild(e).id = k, !E.getElementsByName || !E.getElementsByName(k).length
  1338. }), g.getById ? (b.find.ID = function (e, t) {
  1339. if ("undefined" != typeof t.getElementById && N) return (e = t.getElementById(e)) ? [e] : []
  1340. }, b.filter.ID = function (e) {
  1341. var t = e.replace(d, p);
  1342. return function (e) {
  1343. return e.getAttribute("id") === t
  1344. }
  1345. }) : (delete b.find.ID, b.filter.ID = function (e) {
  1346. var t = e.replace(d, p);
  1347. return function (e) {
  1348. e = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id");
  1349. return e && e.value === t
  1350. }
  1351. }), b.find.TAG = g.getElementsByTagName ? function (e, t) {
  1352. return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : g.qsa ? t.querySelectorAll(e) : void 0
  1353. } : function (e, t) {
  1354. var n, r = [], i = 0, o = t.getElementsByTagName(e);
  1355. if ("*" !== e) return o;
  1356. for (; n = o[i++];) 1 === n.nodeType && r.push(n);
  1357. return r
  1358. }, b.find.CLASS = g.getElementsByClassName && function (e, t) {
  1359. if ("undefined" != typeof t.getElementsByClassName && N) return t.getElementsByClassName(e)
  1360. }, r = [], m = [], (g.qsa = c.test(E.querySelectorAll)) && (h(function (e) {
  1361. t.appendChild(e).innerHTML = "<a id='" + k + "'></a><select id='" + k + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && m.push("[*^$]=" + a + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || m.push("\\[" + a + "*(?:value|" + Y + ")"), e.querySelectorAll("[id~=" + k + "-]").length || m.push("~="), e.querySelectorAll(":checked").length || m.push(":checked"), e.querySelectorAll("a#" + k + "+*").length || m.push(".#.+[+~]")
  1362. }), h(function (e) {
  1363. var t = E.createElement("input");
  1364. t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && m.push("name" + a + "*[*^$|!~]?="), e.querySelectorAll(":enabled").length || m.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), m.push(",.*:")
  1365. })), (g.matchesSelector = c.test(i = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.oMatchesSelector || t.msMatchesSelector)) && h(function (e) {
  1366. g.disconnectedMatch = i.call(e, "div"), i.call(e, "[s!='']:x"), r.push("!=", G)
  1367. }), m = m.length && new RegExp(m.join("|")), r = r.length && new RegExp(r.join("|")), e = c.test(t.compareDocumentPosition), y = e || c.test(t.contains) ? function (e, t) {
  1368. var n = 9 === e.nodeType ? e.documentElement : e, t = t && t.parentNode;
  1369. return e === t || !(!t || 1 !== t.nodeType || !(n.contains ? n.contains(t) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(t)))
  1370. } : function (e, t) {
  1371. if (t) for (; t = t.parentNode;) if (t === e) return !0;
  1372. return !1
  1373. }, $ = e ? function (e, t) {
  1374. if (e === t) return l = !0, 0;
  1375. var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
  1376. return n || (1 & (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !g.sortDetached && t.compareDocumentPosition(e) === n ? e === E || e.ownerDocument === v && y(v, e) ? -1 : t === E || t.ownerDocument === v && y(v, t) ? 1 : u ? j(u, e) - j(u, t) : 0 : 4 & n ? -1 : 1)
  1377. } : function (e, t) {
  1378. if (e === t) return l = !0, 0;
  1379. var n, r = 0, i = e.parentNode, o = t.parentNode, a = [e], s = [t];
  1380. if (!i || !o) return e === E ? -1 : t === E ? 1 : i ? -1 : o ? 1 : u ? j(u, e) - j(u, t) : 0;
  1381. if (i === o) return fe(e, t);
  1382. for (n = e; n = n.parentNode;) a.unshift(n);
  1383. for (n = t; n = n.parentNode;) s.unshift(n);
  1384. for (; a[r] === s[r];) r++;
  1385. return r ? fe(a[r], s[r]) : a[r] === v ? -1 : s[r] === v ? 1 : 0
  1386. }), E
  1387. }, H.matches = function (e, t) {
  1388. return H(e, null, null, t)
  1389. }, H.matchesSelector = function (e, t) {
  1390. if ((e.ownerDocument || e) !== E && C(e), t = t.replace(ee, "='$1']"), g.matchesSelector && N && !A[t + " "] && (!r || !r.test(t)) && (!m || !m.test(t))) try {
  1391. var n = i.call(e, t);
  1392. if (n || g.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n
  1393. } catch (F) {
  1394. }
  1395. return 0 < H(t, E, null, [e]).length
  1396. }, H.contains = function (e, t) {
  1397. return (e.ownerDocument || e) !== E && C(e), y(e, t)
  1398. }, H.attr = function (e, t) {
  1399. (e.ownerDocument || e) !== E && C(e);
  1400. var n = b.attrHandle[t.toLowerCase()],
  1401. n = n && z.call(b.attrHandle, t.toLowerCase()) ? n(e, t, !N) : undefined;
  1402. return n !== undefined ? n : g.attributes || !N ? e.getAttribute(t) : (n = e.getAttributeNode(t)) && n.specified ? n.value : null
  1403. }, H.error = function (e) {
  1404. throw new Error("Syntax error, unrecognized expression: " + e)
  1405. }, H.uniqueSort = function (e) {
  1406. var t, n = [], r = 0, i = 0;
  1407. if (l = !g.detectDuplicates, u = !g.sortStable && e.slice(0), e.sort($), l) {
  1408. for (; t = e[i++];) t === e[i] && (r = n.push(i));
  1409. for (; r--;) e.splice(n[r], 1)
  1410. }
  1411. return u = null, e
  1412. }, o = H.getText = function (e) {
  1413. var t, n = "", r = 0, i = e.nodeType;
  1414. if (i) {
  1415. if (1 === i || 9 === i || 11 === i) {
  1416. if ("string" == typeof e.textContent) return e.textContent;
  1417. for (e = e.firstChild; e; e = e.nextSibling) n += o(e)
  1418. } else if (3 === i || 4 === i) return e.nodeValue
  1419. } else for (; t = e[r++];) n += o(t);
  1420. return n
  1421. }, (b = H.selectors = {
  1422. cacheLength: 50,
  1423. createPseudo: q,
  1424. match: f,
  1425. attrHandle: {},
  1426. find: {},
  1427. relative: {
  1428. ">": {dir: "parentNode", first: !0},
  1429. " ": {dir: "parentNode"},
  1430. "+": {dir: "previousSibling", first: !0},
  1431. "~": {dir: "previousSibling"}
  1432. },
  1433. preFilter: {
  1434. ATTR: function (e) {
  1435. return e[1] = e[1].replace(d, p), e[3] = (e[3] || e[4] || e[5] || "").replace(d, p), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)
  1436. }, CHILD: function (e) {
  1437. return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || H.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && H.error(e[0]), e
  1438. }, PSEUDO: function (e) {
  1439. var t, n = !e[6] && e[2];
  1440. return f.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && te.test(n) && (t = w(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3))
  1441. }
  1442. },
  1443. filter: {
  1444. TAG: function (e) {
  1445. var t = e.replace(d, p).toLowerCase();
  1446. return "*" === e ? function () {
  1447. return !0
  1448. } : function (e) {
  1449. return e.nodeName && e.nodeName.toLowerCase() === t
  1450. }
  1451. }, CLASS: function (e) {
  1452. var t = W[e + " "];
  1453. return t || (t = new RegExp("(^|" + a + ")" + e + "(" + a + "|$)")) && W(e, function (e) {
  1454. return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "")
  1455. })
  1456. }, ATTR: function (t, n, r) {
  1457. return function (e) {
  1458. e = H.attr(e, t);
  1459. return null == e ? "!=" === n : !n || (e += "", "=" === n ? e === r : "!=" === n ? e !== r : "^=" === n ? r && 0 === e.indexOf(r) : "*=" === n ? r && -1 < e.indexOf(r) : "$=" === n ? r && e.slice(-r.length) === r : "~=" === n ? -1 < (" " + e.replace(K, " ") + " ").indexOf(r) : "|=" === n && (e === r || e.slice(0, r.length + 1) === r + "-"))
  1460. }
  1461. }, CHILD: function (h, e, t, g, m) {
  1462. var y = "nth" !== h.slice(0, 3), v = "last" !== h.slice(-4), x = "of-type" === e;
  1463. return 1 === g && 0 === m ? function (e) {
  1464. return !!e.parentNode
  1465. } : function (e, t, n) {
  1466. var r, i, o, a, s, u, l = y != v ? "nextSibling" : "previousSibling", c = e.parentNode,
  1467. f = x && e.nodeName.toLowerCase(), d = !n && !x, p = !1;
  1468. if (c) {
  1469. if (y) {
  1470. for (; l;) {
  1471. for (a = e; a = a[l];) if (x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) return !1;
  1472. u = l = "only" === h && !u && "nextSibling"
  1473. }
  1474. return !0
  1475. }
  1476. if (u = [v ? c.firstChild : c.lastChild], v && d) {
  1477. for (p = (s = (r = (i = (o = (a = c)[k] || (a[k] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] || [])[0] === S && r[1]) && r[2], a = s && c.childNodes[s]; a = ++s && a && a[l] || (p = s = 0) || u.pop();) if (1 === a.nodeType && ++p && a === e) {
  1478. i[h] = [S, s, p];
  1479. break
  1480. }
  1481. } else if (!1 === (p = d ? s = (r = (i = (o = (a = e)[k] || (a[k] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] || [])[0] === S && r[1] : p)) for (; (a = ++s && a && a[l] || (p = s = 0) || u.pop()) && ((x ? a.nodeName.toLowerCase() !== f : 1 !== a.nodeType) || !++p || (d && ((i = (o = a[k] || (a[k] = {}))[a.uniqueID] || (o[a.uniqueID] = {}))[h] = [S, p]), a !== e));) ;
  1482. return (p -= m) === g || p % g == 0 && 0 <= p / g
  1483. }
  1484. }
  1485. }, PSEUDO: function (e, o) {
  1486. var t, a = b.pseudos[e] || b.setFilters[e.toLowerCase()] || H.error("unsupported pseudo: " + e);
  1487. return a[k] ? a(o) : 1 < a.length ? (t = [e, e, "", o], b.setFilters.hasOwnProperty(e.toLowerCase()) ? q(function (e, t) {
  1488. for (var n, r = a(e, o), i = r.length; i--;) e[n = j(e, r[i])] = !(t[n] = r[i])
  1489. }) : function (e) {
  1490. return a(e, 0, t)
  1491. }) : a
  1492. }
  1493. },
  1494. pseudos: {
  1495. not: q(function (e) {
  1496. var r = [], i = [], s = R(e.replace(L, "$1"));
  1497. return s[k] ? q(function (e, t, n, r) {
  1498. for (var i, o = s(e, null, r, []), a = e.length; a--;) (i = o[a]) && (e[a] = !(t[a] = i))
  1499. }) : function (e, t, n) {
  1500. return r[0] = e, s(r, null, n, i), r[0] = null, !i.pop()
  1501. }
  1502. }), has: q(function (t) {
  1503. return function (e) {
  1504. return 0 < H(t, e).length
  1505. }
  1506. }), contains: q(function (t) {
  1507. return t = t.replace(d, p), function (e) {
  1508. return -1 < (e.textContent || e.innerText || o(e)).indexOf(t)
  1509. }
  1510. }), lang: q(function (n) {
  1511. return ne.test(n || "") || H.error("unsupported lang: " + n), n = n.replace(d, p).toLowerCase(), function (e) {
  1512. var t;
  1513. do {
  1514. if (t = N ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-")
  1515. } while ((e = e.parentNode) && 1 === e.nodeType);
  1516. return !1
  1517. }
  1518. }), target: function (e) {
  1519. var t = M.location && M.location.hash;
  1520. return t && t.slice(1) === e.id
  1521. }, root: function (e) {
  1522. return e === t
  1523. }, focus: function (e) {
  1524. return e === E.activeElement && (!E.hasFocus || E.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
  1525. }, enabled: function (e) {
  1526. return !1 === e.disabled
  1527. }, disabled: function (e) {
  1528. return !0 === e.disabled
  1529. }, checked: function (e) {
  1530. var t = e.nodeName.toLowerCase();
  1531. return "input" === t && !!e.checked || "option" === t && !!e.selected
  1532. }, selected: function (e) {
  1533. return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected
  1534. }, empty: function (e) {
  1535. for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeType < 6) return !1;
  1536. return !0
  1537. }, parent: function (e) {
  1538. return !b.pseudos.empty(e)
  1539. }, header: function (e) {
  1540. return ie.test(e.nodeName)
  1541. }, input: function (e) {
  1542. return re.test(e.nodeName)
  1543. }, button: function (e) {
  1544. var t = e.nodeName.toLowerCase();
  1545. return "input" === t && "button" === e.type || "button" === t
  1546. }, text: function (e) {
  1547. return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (e = e.getAttribute("type")) || "text" === e.toLowerCase())
  1548. }, first: x(function () {
  1549. return [0]
  1550. }), last: x(function (e, t) {
  1551. return [t - 1]
  1552. }), eq: x(function (e, t, n) {
  1553. return [n < 0 ? n + t : n]
  1554. }), even: x(function (e, t) {
  1555. for (var n = 0; n < t; n += 2) e.push(n);
  1556. return e
  1557. }), odd: x(function (e, t) {
  1558. for (var n = 1; n < t; n += 2) e.push(n);
  1559. return e
  1560. }), lt: x(function (e, t, n) {
  1561. for (var r = n < 0 ? n + t : n; 0 <= --r;) e.push(r);
  1562. return e
  1563. }), gt: x(function (e, t, n) {
  1564. for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r);
  1565. return e
  1566. })
  1567. }
  1568. }).pseudos.nth = b.pseudos.eq, {
  1569. radio: !0,
  1570. checkbox: !0,
  1571. file: !0,
  1572. password: !0,
  1573. image: !0
  1574. }) b.pseudos[e] = function (t) {
  1575. return function (e) {
  1576. return "input" === e.nodeName.toLowerCase() && e.type === t
  1577. }
  1578. }(e);
  1579. for (e in {submit: !0, reset: !0}) b.pseudos[e] = function (n) {
  1580. return function (e) {
  1581. var t = e.nodeName.toLowerCase();
  1582. return ("input" === t || "button" === t) && e.type === n
  1583. }
  1584. }(e);
  1585. function pe() {
  1586. }
  1587. function _(e) {
  1588. for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value;
  1589. return r
  1590. }
  1591. function he(a, e, t) {
  1592. var s = e.dir, u = t && "parentNode" === s, l = B++;
  1593. return e.first ? function (e, t, n) {
  1594. for (; e = e[s];) if (1 === e.nodeType || u) return a(e, t, n)
  1595. } : function (e, t, n) {
  1596. var r, i, o = [S, l];
  1597. if (n) {
  1598. for (; e = e[s];) if ((1 === e.nodeType || u) && a(e, t, n)) return !0
  1599. } else for (; e = e[s];) if (1 === e.nodeType || u) {
  1600. if ((r = (i = (i = e[k] || (e[k] = {}))[e.uniqueID] || (i[e.uniqueID] = {}))[s]) && r[0] === S && r[1] === l) return o[2] = r[2];
  1601. if ((i[s] = o)[2] = a(e, t, n)) return !0
  1602. }
  1603. }
  1604. }
  1605. function ge(i) {
  1606. return 1 < i.length ? function (e, t, n) {
  1607. for (var r = i.length; r--;) if (!i[r](e, t, n)) return !1;
  1608. return !0
  1609. } : i[0]
  1610. }
  1611. function me(e, t, n, r, i) {
  1612. for (var o, a = [], s = 0, u = e.length, l = null != t; s < u; s++) !(o = e[s]) || n && !n(o, r, i) || (a.push(o), l && t.push(s));
  1613. return a
  1614. }
  1615. function ye(p, h, g, m, y, e) {
  1616. return m && !m[k] && (m = ye(m)), y && !y[k] && (y = ye(y, e)), q(function (e, t, n, r) {
  1617. var i, o, a, s = [], u = [], l = t.length, c = e || function (e, t, n) {
  1618. for (var r = 0, i = t.length; r < i; r++) H(e, t[r], n);
  1619. return n
  1620. }(h || "*", n.nodeType ? [n] : n, []), f = !p || !e && h ? c : me(c, s, p, n, r),
  1621. d = g ? y || (e ? p : l || m) ? [] : t : f;
  1622. if (g && g(f, d, n, r), m) for (i = me(d, u), m(i, [], n, r), o = i.length; o--;) (a = i[o]) && (d[u[o]] = !(f[u[o]] = a));
  1623. if (e) {
  1624. if (y || p) {
  1625. if (y) {
  1626. for (i = [], o = d.length; o--;) (a = d[o]) && i.push(f[o] = a);
  1627. y(null, d = [], i, r)
  1628. }
  1629. for (o = d.length; o--;) (a = d[o]) && -1 < (i = y ? j(e, a) : s[o]) && (e[i] = !(t[i] = a))
  1630. }
  1631. } else d = me(d === t ? d.splice(l, d.length) : d), y ? y(null, t, d, r) : D.apply(t, d)
  1632. })
  1633. }
  1634. return pe.prototype = b.filters = b.pseudos, b.setFilters = new pe, w = H.tokenize = function (e, t) {
  1635. var n, r, i, o, a, s, u, l = I[e + " "];
  1636. if (l) return t ? 0 : l.slice(0);
  1637. for (a = e, s = [], u = b.preFilter; a;) {
  1638. for (o in n && !(r = Q.exec(a)) || (r && (a = a.slice(r[0].length) || a), s.push(i = [])), n = !1, (r = Z.exec(a)) && (n = r.shift(), i.push({
  1639. value: n,
  1640. type: r[0].replace(L, " ")
  1641. }), a = a.slice(n.length)), b.filter) !(r = f[o].exec(a)) || u[o] && !(r = u[o](r)) || (n = r.shift(), i.push({
  1642. value: n,
  1643. type: o,
  1644. matches: r
  1645. }), a = a.slice(n.length));
  1646. if (!n) break
  1647. }
  1648. return t ? a.length : a ? H.error(e) : I(e, s).slice(0)
  1649. }, R = H.compile = function (e, t) {
  1650. var n, m, y, v, x, r, i = [], o = [], a = A[e + " "];
  1651. if (!a) {
  1652. for (n = (t = t || w(e)).length; n--;) ((a = function f(e) {
  1653. for (var r, t, n, i = e.length, o = b.relative[e[0].type], a = o || b.relative[" "], s = o ? 1 : 0, u = he(function (e) {
  1654. return e === r
  1655. }, a, !0), l = he(function (e) {
  1656. return -1 < j(r, e)
  1657. }, a, !0), c = [function (e, t, n) {
  1658. return e = !o && (n || t !== T) || ((r = t).nodeType ? u : l)(e, t, n), r = null, e
  1659. }]; s < i; s++) if (t = b.relative[e[s].type]) c = [he(ge(c), t)]; else {
  1660. if ((t = b.filter[e[s].type].apply(null, e[s].matches))[k]) {
  1661. for (n = ++s; n < i && !b.relative[e[n].type]; n++) ;
  1662. return ye(1 < s && ge(c), 1 < s && _(e.slice(0, s - 1).concat({value: " " === e[s - 2].type ? "*" : ""})).replace(L, "$1"), t, s < n && f(e.slice(s, n)), n < i && f(e = e.slice(n)), n < i && _(e))
  1663. }
  1664. c.push(t)
  1665. }
  1666. return ge(c)
  1667. }(t[n]))[k] ? i : o).push(a);
  1668. (a = A(e, (m = o, v = 0 < (y = i).length, x = 0 < m.length, r = function (e, t, n, r, i) {
  1669. var o, a, s, u = 0, l = "0", c = e && [], f = [], d = T, p = e || x && b.find.TAG("*", i),
  1670. h = S += null == d ? 1 : Math.random() || .1, g = p.length;
  1671. for (i && (T = t === E || t || i); l !== g && null != (o = p[l]); l++) {
  1672. if (x && o) {
  1673. for (a = 0, t || o.ownerDocument === E || (C(o), n = !N); s = m[a++];) if (s(o, t || E, n)) {
  1674. r.push(o);
  1675. break
  1676. }
  1677. i && (S = h)
  1678. }
  1679. v && ((o = !s && o) && u--, e && c.push(o))
  1680. }
  1681. if (u += l, v && l !== u) {
  1682. for (a = 0; s = y[a++];) s(c, f, t, n);
  1683. if (e) {
  1684. if (0 < u) for (; l--;) c[l] || f[l] || (f[l] = X.call(r));
  1685. f = me(f)
  1686. }
  1687. D.apply(r, f), i && !e && 0 < f.length && 1 < u + y.length && H.uniqueSort(r)
  1688. }
  1689. return i && (S = h, T = d), c
  1690. }, v ? q(r) : r))).selector = e
  1691. }
  1692. return a
  1693. }, P = H.select = function (e, t, n, r) {
  1694. var i, o, a, s, u, l = "function" == typeof e && e, c = !r && w(e = l.selector || e);
  1695. if (n = n || [], 1 === c.length) {
  1696. if (2 < (o = c[0] = c[0].slice(0)).length && "ID" === (a = o[0]).type && g.getById && 9 === t.nodeType && N && b.relative[o[1].type]) {
  1697. if (!(t = (b.find.ID(a.matches[0].replace(d, p), t) || [])[0])) return n;
  1698. l && (t = t.parentNode), e = e.slice(o.shift().value.length)
  1699. }
  1700. for (i = f.needsContext.test(e) ? 0 : o.length; i-- && (a = o[i], !b.relative[s = a.type]);) if ((u = b.find[s]) && (r = u(a.matches[0].replace(d, p), ae.test(o[0].type) && de(t.parentNode) || t))) {
  1701. if (o.splice(i, 1), e = r.length && _(o)) break;
  1702. return D.apply(n, r), n
  1703. }
  1704. }
  1705. return (l || R(e, c))(r, t, !N, n, !t || ae.test(e) && de(t.parentNode) || t), n
  1706. }, g.sortStable = k.split("").sort($).join("") === k, g.detectDuplicates = !!l, C(), g.sortDetached = h(function (e) {
  1707. return 1 & e.compareDocumentPosition(E.createElement("div"))
  1708. }), h(function (e) {
  1709. return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
  1710. }) || ce("type|href|height|width", function (e, t, n) {
  1711. if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
  1712. }), g.attributes && h(function (e) {
  1713. return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
  1714. }) || ce("value", function (e, t, n) {
  1715. if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue
  1716. }), h(function (e) {
  1717. return null == e.getAttribute("disabled")
  1718. }) || ce(Y, function (e, t, n) {
  1719. if (!n) return !0 === e[t] ? t.toLowerCase() : (n = e.getAttributeNode(t)) && n.specified ? n.value : null
  1720. }), H
  1721. }(T),
  1722. r = (C.find = e, C.expr = e.selectors, C.expr[":"] = C.expr.pseudos, C.uniqueSort = C.unique = e.uniqueSort, C.text = e.getText, C.isXMLDoc = e.isXML, C.contains = e.contains, function (e, t, n) {
  1723. for (var r = [], i = n !== undefined; (e = e[t]) && 9 !== e.nodeType;) if (1 === e.nodeType) {
  1724. if (i && C(e).is(n)) break;
  1725. r.push(e)
  1726. }
  1727. return r
  1728. }), V = function (e, t) {
  1729. for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
  1730. return n
  1731. }, Y = C.expr.match.needsContext, J = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, G = /^.[^:#\[\.,]*$/;
  1732. function K(e, n, r) {
  1733. if (C.isFunction(n)) return C.grep(e, function (e, t) {
  1734. return !!n.call(e, t, e) !== r
  1735. });
  1736. if (n.nodeType) return C.grep(e, function (e) {
  1737. return e === n !== r
  1738. });
  1739. if ("string" == typeof n) {
  1740. if (G.test(n)) return C.filter(n, e, r);
  1741. n = C.filter(n, e)
  1742. }
  1743. return C.grep(e, function (e) {
  1744. return -1 < C.inArray(e, n) !== r
  1745. })
  1746. }
  1747. C.filter = function (e, t, n) {
  1748. var r = t[0];
  1749. return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? C.find.matchesSelector(r, e) ? [r] : [] : C.find.matches(e, C.grep(t, function (e) {
  1750. return 1 === e.nodeType
  1751. }))
  1752. }, C.fn.extend({
  1753. find: function (e) {
  1754. var t, n = [], r = this, i = r.length;
  1755. if ("string" != typeof e) return this.pushStack(C(e).filter(function () {
  1756. for (t = 0; t < i; t++) if (C.contains(r[t], this)) return !0
  1757. }));
  1758. for (t = 0; t < i; t++) C.find(e, r[t], n);
  1759. return (n = this.pushStack(1 < i ? C.unique(n) : n)).selector = this.selector ? this.selector + " " + e : e, n
  1760. }, filter: function (e) {
  1761. return this.pushStack(K(this, e || [], !1))
  1762. }, not: function (e) {
  1763. return this.pushStack(K(this, e || [], !0))
  1764. }, is: function (e) {
  1765. return !!K(this, "string" == typeof e && Y.test(e) ? C(e) : e || [], !1).length
  1766. }
  1767. });
  1768. var Q, Z = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, ee = ((C.fn.init = function (e, t, n) {
  1769. if (!e) return this;
  1770. if (n = n || Q, "string" != typeof e) return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : C.isFunction(e) ? "undefined" != typeof n.ready ? n.ready(e) : e(C) : (e.selector !== undefined && (this.selector = e.selector, this.context = e.context), C.makeArray(e, this));
  1771. if (!(r = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && 3 <= e.length ? [null, e, null] : Z.exec(e)) || !r[1] && t) return (!t || t.jquery ? t || n : this.constructor(t)).find(e);
  1772. if (r[1]) {
  1773. if (t = t instanceof C ? t[0] : t, C.merge(this, C.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : g, !0)), J.test(r[1]) && C.isPlainObject(t)) for (var r in t) C.isFunction(this[r]) ? this[r](t[r]) : this.attr(r, t[r]);
  1774. return this
  1775. }
  1776. if ((n = g.getElementById(r[2])) && n.parentNode) {
  1777. if (n.id !== r[2]) return Q.find(e);
  1778. this.length = 1, this[0] = n
  1779. }
  1780. return this.context = g, this.selector = e, this
  1781. }).prototype = C.fn, Q = C(g), /^(?:parents|prev(?:Until|All))/),
  1782. te = {children: !0, contents: !0, next: !0, prev: !0};
  1783. function ne(e, t) {
  1784. for (; (e = e[t]) && 1 !== e.nodeType;) ;
  1785. return e
  1786. }
  1787. C.fn.extend({
  1788. has: function (e) {
  1789. var t, n = C(e, this), r = n.length;
  1790. return this.filter(function () {
  1791. for (t = 0; t < r; t++) if (C.contains(this, n[t])) return !0
  1792. })
  1793. }, closest: function (e, t) {
  1794. for (var n, r = 0, i = this.length, o = [], a = Y.test(e) || "string" != typeof e ? C(e, t || this.context) : 0; r < i; r++) for (n = this[r]; n && n !== t; n = n.parentNode) if (n.nodeType < 11 && (a ? -1 < a.index(n) : 1 === n.nodeType && C.find.matchesSelector(n, e))) {
  1795. o.push(n);
  1796. break
  1797. }
  1798. return this.pushStack(1 < o.length ? C.uniqueSort(o) : o)
  1799. }, index: function (e) {
  1800. return e ? "string" == typeof e ? C.inArray(this[0], C(e)) : C.inArray(e.jquery ? e[0] : e, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
  1801. }, add: function (e, t) {
  1802. return this.pushStack(C.uniqueSort(C.merge(this.get(), C(e, t))))
  1803. }, addBack: function (e) {
  1804. return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
  1805. }
  1806. }), C.each({
  1807. parent: function (e) {
  1808. e = e.parentNode;
  1809. return e && 11 !== e.nodeType ? e : null
  1810. }, parents: function (e) {
  1811. return r(e, "parentNode")
  1812. }, parentsUntil: function (e, t, n) {
  1813. return r(e, "parentNode", n)
  1814. }, next: function (e) {
  1815. return ne(e, "nextSibling")
  1816. }, prev: function (e) {
  1817. return ne(e, "previousSibling")
  1818. }, nextAll: function (e) {
  1819. return r(e, "nextSibling")
  1820. }, prevAll: function (e) {
  1821. return r(e, "previousSibling")
  1822. }, nextUntil: function (e, t, n) {
  1823. return r(e, "nextSibling", n)
  1824. }, prevUntil: function (e, t, n) {
  1825. return r(e, "previousSibling", n)
  1826. }, siblings: function (e) {
  1827. return V((e.parentNode || {}).firstChild, e)
  1828. }, children: function (e) {
  1829. return V(e.firstChild)
  1830. }, contents: function (e) {
  1831. return C.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : C.merge([], e.childNodes)
  1832. }
  1833. }, function (r, i) {
  1834. C.fn[r] = function (e, t) {
  1835. var n = C.map(this, i, e);
  1836. return (t = "Until" !== r.slice(-5) ? e : t) && "string" == typeof t && (n = C.filter(t, n)), 1 < this.length && (te[r] || (n = C.uniqueSort(n)), ee.test(r) && (n = n.reverse())), this.pushStack(n)
  1837. }
  1838. });
  1839. var re, ie, E = /\S+/g;
  1840. function oe() {
  1841. g.addEventListener ? (g.removeEventListener("DOMContentLoaded", i), T.removeEventListener("load", i)) : (g.detachEvent("onreadystatechange", i), T.detachEvent("onload", i))
  1842. }
  1843. function i() {
  1844. !g.addEventListener && "load" !== T.event.type && "complete" !== g.readyState || (oe(), C.ready())
  1845. }
  1846. for (ie in C.Callbacks = function (r) {
  1847. var e, n;
  1848. r = "string" == typeof r ? (e = r, n = {}, C.each(e.match(E) || [], function (e, t) {
  1849. n[t] = !0
  1850. }), n) : C.extend({}, r);
  1851. var i, t, o, a, s = [], u = [], l = -1, c = function () {
  1852. for (a = r.once, o = i = !0; u.length; l = -1) for (t = u.shift(); ++l < s.length;) !1 === s[l].apply(t[0], t[1]) && r.stopOnFalse && (l = s.length, t = !1);
  1853. r.memory || (t = !1), i = !1, a && (s = t ? [] : "")
  1854. }, f = {
  1855. add: function () {
  1856. return s && (t && !i && (l = s.length - 1, u.push(t)), function n(e) {
  1857. C.each(e, function (e, t) {
  1858. C.isFunction(t) ? r.unique && f.has(t) || s.push(t) : t && t.length && "string" !== C.type(t) && n(t)
  1859. })
  1860. }(arguments), t && !i && c()), this
  1861. }, remove: function () {
  1862. return C.each(arguments, function (e, t) {
  1863. for (var n; -1 < (n = C.inArray(t, s, n));) s.splice(n, 1), n <= l && l--
  1864. }), this
  1865. }, has: function (e) {
  1866. return e ? -1 < C.inArray(e, s) : 0 < s.length
  1867. }, empty: function () {
  1868. return s = s && [], this
  1869. }, disable: function () {
  1870. return a = u = [], s = t = "", this
  1871. }, disabled: function () {
  1872. return !s
  1873. }, lock: function () {
  1874. return a = !0, t || f.disable(), this
  1875. }, locked: function () {
  1876. return !!a
  1877. }, fireWith: function (e, t) {
  1878. return a || (t = [e, (t = t || []).slice ? t.slice() : t], u.push(t), i || c()), this
  1879. }, fire: function () {
  1880. return f.fireWith(this, arguments), this
  1881. }, fired: function () {
  1882. return !!o
  1883. }
  1884. };
  1885. return f
  1886. }, C.extend({
  1887. Deferred: function (e) {
  1888. var o = [["resolve", "done", C.Callbacks("once memory"), "resolved"], ["reject", "fail", C.Callbacks("once memory"), "rejected"], ["notify", "progress", C.Callbacks("memory")]],
  1889. i = "pending", a = {
  1890. state: function () {
  1891. return i
  1892. }, always: function () {
  1893. return s.done(arguments).fail(arguments), this
  1894. }, then: function () {
  1895. var i = arguments;
  1896. return C.Deferred(function (r) {
  1897. C.each(o, function (e, t) {
  1898. var n = C.isFunction(i[e]) && i[e];
  1899. s[t[1]](function () {
  1900. var e = n && n.apply(this, arguments);
  1901. e && C.isFunction(e.promise) ? e.promise().progress(r.notify).done(r.resolve).fail(r.reject) : r[t[0] + "With"](this === a ? r.promise() : this, n ? [e] : arguments)
  1902. })
  1903. }), i = null
  1904. }).promise()
  1905. }, promise: function (e) {
  1906. return null != e ? C.extend(e, a) : a
  1907. }
  1908. }, s = {};
  1909. return a.pipe = a.then, C.each(o, function (e, t) {
  1910. var n = t[2], r = t[3];
  1911. a[t[1]] = n.add, r && n.add(function () {
  1912. i = r
  1913. }, o[1 ^ e][2].disable, o[2][2].lock), s[t[0]] = function () {
  1914. return s[t[0] + "With"](this === s ? a : this, arguments), this
  1915. }, s[t[0] + "With"] = n.fireWith
  1916. }), a.promise(s), e && e.call(s, s), s
  1917. }, when: function (e) {
  1918. var i, t, n, r = 0, o = c.call(arguments), a = o.length,
  1919. s = 1 !== a || e && C.isFunction(e.promise) ? a : 0, u = 1 === s ? e : C.Deferred(),
  1920. l = function (t, n, r) {
  1921. return function (e) {
  1922. n[t] = this, r[t] = 1 < arguments.length ? c.call(arguments) : e, r === i ? u.notifyWith(n, r) : --s || u.resolveWith(n, r)
  1923. }
  1924. };
  1925. if (1 < a) for (i = new Array(a), t = new Array(a), n = new Array(a); r < a; r++) o[r] && C.isFunction(o[r].promise) ? o[r].promise().progress(l(r, t, i)).done(l(r, n, o)).fail(u.reject) : --s;
  1926. return s || u.resolveWith(n, o), u.promise()
  1927. }
  1928. }), C.fn.ready = function (e) {
  1929. return C.ready.promise().done(e), this
  1930. }, C.extend({
  1931. isReady: !1, readyWait: 1, holdReady: function (e) {
  1932. e ? C.readyWait++ : C.ready(!0)
  1933. }, ready: function (e) {
  1934. (!0 === e ? --C.readyWait : C.isReady) || (C.isReady = !0) !== e && 0 < --C.readyWait || (re.resolveWith(g, [C]), C.fn.triggerHandler && (C(g).triggerHandler("ready"), C(g).off("ready")))
  1935. }
  1936. }), C.ready.promise = function (e) {
  1937. if (!re) if (re = C.Deferred(), "complete" === g.readyState || "loading" !== g.readyState && !g.documentElement.doScroll) T.setTimeout(C.ready); else if (g.addEventListener) g.addEventListener("DOMContentLoaded", i), T.addEventListener("load", i); else {
  1938. g.attachEvent("onreadystatechange", i), T.attachEvent("onload", i);
  1939. var t = !1;
  1940. try {
  1941. t = null == T.frameElement && g.documentElement
  1942. } catch (n) {
  1943. }
  1944. t && t.doScroll && !function r() {
  1945. if (!C.isReady) {
  1946. try {
  1947. t.doScroll("left")
  1948. } catch (n) {
  1949. return T.setTimeout(r, 50)
  1950. }
  1951. oe(), C.ready()
  1952. }
  1953. }()
  1954. }
  1955. return re.promise(e)
  1956. }, C.ready.promise(), C(y)) break;
  1957. y.ownFirst = "0" === ie, y.inlineBlockNeedsLayout = !1, C(function () {
  1958. var e, t, n = g.getElementsByTagName("body")[0];
  1959. n && n.style && (e = g.createElement("div"), (t = g.createElement("div")).style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(t).appendChild(e), "undefined" != typeof e.style.zoom && (e.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1", y.inlineBlockNeedsLayout = e = 3 === e.offsetWidth, e && (n.style.zoom = 1)), n.removeChild(t))
  1960. });
  1961. e = g.createElement("div");
  1962. y.deleteExpando = !0;
  1963. try {
  1964. delete e.test
  1965. } catch (yn) {
  1966. y.deleteExpando = !1
  1967. }
  1968. var o, v = function (e) {
  1969. var t = C.noData[(e.nodeName + " ").toLowerCase()], n = +e.nodeType || 1;
  1970. return (1 === n || 9 === n) && (!t || !0 !== t && e.getAttribute("classid") === t)
  1971. }, ae = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, se = /([A-Z])/g;
  1972. function ue(e, t, n) {
  1973. if (n === undefined && 1 === e.nodeType) {
  1974. var r = "data-" + t.replace(se, "-$1").toLowerCase();
  1975. if ("string" == typeof (n = e.getAttribute(r))) {
  1976. try {
  1977. n = "true" === n || "false" !== n && ("null" === n ? null : +n + "" === n ? +n : ae.test(n) ? C.parseJSON(n) : n)
  1978. } catch (i) {
  1979. }
  1980. C.data(e, t, n)
  1981. } else n = undefined
  1982. }
  1983. return n
  1984. }
  1985. function le(e) {
  1986. for (var t in e) if (("data" !== t || !C.isEmptyObject(e[t])) && "toJSON" !== t) return;
  1987. return 1
  1988. }
  1989. function ce(e, t, n, r) {
  1990. if (v(e)) {
  1991. var i, o = C.expando, a = e.nodeType, s = a ? C.cache : e, u = a ? e[o] : e[o] && o;
  1992. if (u && s[u] && (r || s[u].data) || n !== undefined || "string" != typeof t) return s[u = u || (a ? e[o] = f.pop() || C.guid++ : o)] || (s[u] = a ? {} : {toJSON: C.noop}), "object" != typeof t && "function" != typeof t || (r ? s[u] = C.extend(s[u], t) : s[u].data = C.extend(s[u].data, t)), e = s[u], r || (e.data || (e.data = {}), e = e.data), n !== undefined && (e[C.camelCase(t)] = n), "string" == typeof t ? null == (i = e[t]) && (i = e[C.camelCase(t)]) : i = e, i
  1993. }
  1994. }
  1995. function fe(e, t, n) {
  1996. if (v(e)) {
  1997. var r, i, o = e.nodeType, a = o ? C.cache : e, s = o ? e[C.expando] : C.expando;
  1998. if (a[s]) {
  1999. if (t && (r = n ? a[s] : a[s].data)) {
  2000. i = (t = C.isArray(t) ? t.concat(C.map(t, C.camelCase)) : t in r || (t = C.camelCase(t)) in r ? [t] : t.split(" ")).length;
  2001. for (; i--;) delete r[t[i]];
  2002. if (n ? !le(r) : !C.isEmptyObject(r)) return
  2003. }
  2004. (n || (delete a[s].data, le(a[s]))) && (o ? C.cleanData([e], !0) : y.deleteExpando || a != a.window ? delete a[s] : a[s] = undefined)
  2005. }
  2006. }
  2007. }
  2008. C.extend({
  2009. cache: {},
  2010. noData: {"applet ": !0, "embed ": !0, "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},
  2011. hasData: function (e) {
  2012. return !!(e = e.nodeType ? C.cache[e[C.expando]] : e[C.expando]) && !le(e)
  2013. },
  2014. data: function (e, t, n) {
  2015. return ce(e, t, n)
  2016. },
  2017. removeData: function (e, t) {
  2018. return fe(e, t)
  2019. },
  2020. _data: function (e, t, n) {
  2021. return ce(e, t, n, !0)
  2022. },
  2023. _removeData: function (e, t) {
  2024. return fe(e, t, !0)
  2025. }
  2026. }), C.fn.extend({
  2027. data: function (e, t) {
  2028. var n, r, i, o = this[0], a = o && o.attributes;
  2029. if (e !== undefined) return "object" == typeof e ? this.each(function () {
  2030. C.data(this, e)
  2031. }) : 1 < arguments.length ? this.each(function () {
  2032. C.data(this, e, t)
  2033. }) : o ? ue(o, e, C.data(o, e)) : undefined;
  2034. if (this.length && (i = C.data(o), 1 === o.nodeType && !C._data(o, "parsedAttrs"))) {
  2035. for (n = a.length; n--;) a[n] && 0 === (r = a[n].name).indexOf("data-") && ue(o, r = C.camelCase(r.slice(5)), i[r]);
  2036. C._data(o, "parsedAttrs", !0)
  2037. }
  2038. return i
  2039. }, removeData: function (e) {
  2040. return this.each(function () {
  2041. C.removeData(this, e)
  2042. })
  2043. }
  2044. }), C.extend({
  2045. queue: function (e, t, n) {
  2046. var r;
  2047. if (e) return r = C._data(e, t = (t || "fx") + "queue"), n && (!r || C.isArray(n) ? r = C._data(e, t, C.makeArray(n)) : r.push(n)), r || []
  2048. }, dequeue: function (e, t) {
  2049. t = t || "fx";
  2050. var n = C.queue(e, t), r = n.length, i = n.shift(), o = C._queueHooks(e, t);
  2051. "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, function () {
  2052. C.dequeue(e, t)
  2053. }, o)), !r && o && o.empty.fire()
  2054. }, _queueHooks: function (e, t) {
  2055. var n = t + "queueHooks";
  2056. return C._data(e, n) || C._data(e, n, {
  2057. empty: C.Callbacks("once memory").add(function () {
  2058. C._removeData(e, t + "queue"), C._removeData(e, n)
  2059. })
  2060. })
  2061. }
  2062. }), C.fn.extend({
  2063. queue: function (t, n) {
  2064. var e = 2;
  2065. return "string" != typeof t && (n = t, t = "fx", e--), arguments.length < e ? C.queue(this[0], t) : n === undefined ? this : this.each(function () {
  2066. var e = C.queue(this, t, n);
  2067. C._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && C.dequeue(this, t)
  2068. })
  2069. }, dequeue: function (e) {
  2070. return this.each(function () {
  2071. C.dequeue(this, e)
  2072. })
  2073. }, clearQueue: function (e) {
  2074. return this.queue(e || "fx", [])
  2075. }, promise: function (e, t) {
  2076. var n, r = 1, i = C.Deferred(), o = this, a = this.length, s = function () {
  2077. --r || i.resolveWith(o, [o])
  2078. };
  2079. for ("string" != typeof e && (t = e, e = undefined), e = e || "fx"; a--;) (n = C._data(o[a], e + "queueHooks")) && n.empty && (r++, n.empty.add(s));
  2080. return s(), i.promise(t)
  2081. }
  2082. }), y.shrinkWrapBlocks = function () {
  2083. return null != o ? o : (o = !1, (t = g.getElementsByTagName("body")[0]) && t.style ? (e = g.createElement("div"), (n = g.createElement("div")).style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", t.appendChild(n).appendChild(e), "undefined" != typeof e.style.zoom && (e.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1", e.appendChild(g.createElement("div")).style.width = "5px", o = 3 !== e.offsetWidth), t.removeChild(n), o) : void 0);
  2084. var e, t, n
  2085. };
  2086. var e = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, de = new RegExp("^(?:([+-])=|)(" + e + ")([a-z%]*)$", "i"),
  2087. s = ["Top", "Right", "Bottom", "Left"], pe = function (e, t) {
  2088. return "none" === C.css(e = t || e, "display") || !C.contains(e.ownerDocument, e)
  2089. };
  2090. function he(e, t, n, r) {
  2091. var i, o = 1, a = 20, s = r ? function () {
  2092. return r.cur()
  2093. } : function () {
  2094. return C.css(e, t, "")
  2095. }, u = s(), l = n && n[3] || (C.cssNumber[t] ? "" : "px"),
  2096. c = (C.cssNumber[t] || "px" !== l && +u) && de.exec(C.css(e, t));
  2097. if (c && c[3] !== l) for (l = l || c[3], n = n || [], c = +u || 1; c /= o = o || ".5", C.style(e, t, c + l), o !== (o = s() / u) && 1 !== o && --a;) ;
  2098. return n && (c = +c || +u || 0, i = n[1] ? c + (n[1] + 1) * n[2] : +n[2], r && (r.unit = l, r.start = c, r.end = i)), i
  2099. }
  2100. var d = function (e, t, n, r, i, o, a) {
  2101. var s = 0, u = e.length, l = null == n;
  2102. if ("object" === C.type(n)) for (s in i = !0, n) d(e, t, s, n[s], !0, o, a); else if (r !== undefined && (i = !0, C.isFunction(r) || (a = !0), t = l ? a ? (t.call(e, r), null) : (l = t, function (e, t, n) {
  2103. return l.call(C(e), n)
  2104. }) : t)) for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n)));
  2105. return i ? e : l ? t.call(e) : u ? t(e[0], n) : o
  2106. }, ge = /^(?:checkbox|radio)$/i, me = /<([\w:-]+)/, ye = /^$|\/(?:java|ecma)script/i, ve = /^\s+/,
  2107. xe = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";
  2108. function be(e) {
  2109. var t = xe.split("|"), n = e.createDocumentFragment();
  2110. if (n.createElement) for (; t.length;) n.createElement(t.pop());
  2111. return n
  2112. }
  2113. S = g.createElement("div"), k = g.createDocumentFragment(), q = g.createElement("input"), S.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", y.leadingWhitespace = 3 === S.firstChild.nodeType, y.tbody = !S.getElementsByTagName("tbody").length, y.htmlSerialize = !!S.getElementsByTagName("link").length, y.html5Clone = "<:nav></:nav>" !== g.createElement("nav").cloneNode(!0).outerHTML, q.type = "checkbox", q.checked = !0, k.appendChild(q), y.appendChecked = q.checked, S.innerHTML = "<textarea>x</textarea>", y.noCloneChecked = !!S.cloneNode(!0).lastChild.defaultValue, k.appendChild(S), (q = g.createElement("input")).setAttribute("type", "radio"), q.setAttribute("checked", "checked"), q.setAttribute("name", "t"), S.appendChild(q), y.checkClone = S.cloneNode(!0).cloneNode(!0).lastChild.checked, y.noCloneEvent = !!S.addEventListener, S[C.expando] = 1, y.attributes = !S.getAttribute(C.expando);
  2114. var x = {
  2115. option: [1, "<select multiple='multiple'>", "</select>"],
  2116. legend: [1, "<fieldset>", "</fieldset>"],
  2117. area: [1, "<map>", "</map>"],
  2118. param: [1, "<object>", "</object>"],
  2119. thead: [1, "<table>", "</table>"],
  2120. tr: [2, "<table><tbody>", "</tbody></table>"],
  2121. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  2122. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  2123. _default: y.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
  2124. };
  2125. function b(e, t) {
  2126. var n, r, i = 0,
  2127. o = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : undefined;
  2128. if (!o) for (o = [], n = e.childNodes || e; null != (r = n[i]); i++) !t || C.nodeName(r, t) ? o.push(r) : C.merge(o, b(r, t));
  2129. return t === undefined || t && C.nodeName(e, t) ? C.merge([e], o) : o
  2130. }
  2131. function we(e, t) {
  2132. for (var n, r = 0; null != (n = e[r]); r++) C._data(n, "globalEval", !t || C._data(t[r], "globalEval"))
  2133. }
  2134. x.optgroup = x.option, x.tbody = x.tfoot = x.colgroup = x.caption = x.thead, x.th = x.td;
  2135. var Te = /<|&#?\w+;/, Ce = /<tbody/i;
  2136. function Ee(e) {
  2137. ge.test(e.type) && (e.defaultChecked = e.checked)
  2138. }
  2139. function Ne(e, t, n, r, i) {
  2140. for (var o, a, s, u, l, c, f, d = e.length, p = be(t), h = [], g = 0; g < d; g++) if ((a = e[g]) || 0 === a) if ("object" === C.type(a)) C.merge(h, a.nodeType ? [a] : a); else if (Te.test(a)) {
  2141. for (u = u || p.appendChild(t.createElement("div")), l = (me.exec(a) || ["", ""])[1].toLowerCase(), f = x[l] || x._default, u.innerHTML = f[1] + C.htmlPrefilter(a) + f[2], o = f[0]; o--;) u = u.lastChild;
  2142. if (!y.leadingWhitespace && ve.test(a) && h.push(t.createTextNode(ve.exec(a)[0])), !y.tbody) for (o = (a = "table" !== l || Ce.test(a) ? "<table>" !== f[1] || Ce.test(a) ? 0 : u : u.firstChild) && a.childNodes.length; o--;) C.nodeName(c = a.childNodes[o], "tbody") && !c.childNodes.length && a.removeChild(c);
  2143. for (C.merge(h, u.childNodes), u.textContent = ""; u.firstChild;) u.removeChild(u.firstChild);
  2144. u = p.lastChild
  2145. } else h.push(t.createTextNode(a));
  2146. for (u && p.removeChild(u), y.appendChecked || C.grep(b(h, "input"), Ee), g = 0; a = h[g++];) if (r && -1 < C.inArray(a, r)) i && i.push(a); else if (s = C.contains(a.ownerDocument, a), u = b(p.appendChild(a), "script"), s && we(u), n) for (o = 0; a = u[o++];) ye.test(a.type || "") && n.push(a);
  2147. return u = null, p
  2148. }
  2149. var ke, Se, Ae = g.createElement("div");
  2150. for (ke in {
  2151. submit: !0,
  2152. change: !0,
  2153. focusin: !0
  2154. }) (y[ke] = (Se = "on" + ke) in T) || (Ae.setAttribute(Se, "t"), y[ke] = !1 === Ae.attributes[Se].expando);
  2155. var De = /^(?:input|select|textarea)$/i, je = /^key/, Le = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
  2156. He = /^(?:focusinfocus|focusoutblur)$/, qe = /^([^.]*)(?:\.(.+)|)/;
  2157. function _e() {
  2158. return !0
  2159. }
  2160. function u() {
  2161. return !1
  2162. }
  2163. function Fe() {
  2164. try {
  2165. return g.activeElement
  2166. } catch (e) {
  2167. }
  2168. }
  2169. function Me(e, t, n, r, i, o) {
  2170. var a, s;
  2171. if ("object" == typeof t) {
  2172. for (s in "string" != typeof n && (r = r || n, n = undefined), t) Me(e, s, n, r, t[s], o);
  2173. return e
  2174. }
  2175. if (null == r && null == i ? (i = n, r = n = undefined) : null == i && ("string" == typeof n ? (i = r, r = undefined) : (i = r, r = n, n = undefined)), !1 === i) i = u; else if (!i) return e;
  2176. return 1 === o && (a = i, (i = function (e) {
  2177. return C().off(e), a.apply(this, arguments)
  2178. }).guid = a.guid || (a.guid = C.guid++)), e.each(function () {
  2179. C.event.add(this, t, i, r, n)
  2180. })
  2181. }
  2182. C.event = {
  2183. global: {},
  2184. add: function (e, t, n, r, i) {
  2185. var o, a, s, u, l, c, f, d, p, h = C._data(e);
  2186. if (h) for (n.handler && (n = (s = n).handler, i = s.selector), n.guid || (n.guid = C.guid++), (o = h.events) || (o = h.events = {}), (l = h.handle) || ((l = h.handle = function (e) {
  2187. return void 0 === C || e && C.event.triggered === e.type ? undefined : C.event.dispatch.apply(l.elem, arguments)
  2188. }).elem = e), a = (t = (t || "").match(E) || [""]).length; a--;) f = p = (d = qe.exec(t[a]) || [])[1], d = (d[2] || "").split(".").sort(), f && (u = C.event.special[f] || {}, f = (i ? u.delegateType : u.bindType) || f, u = C.event.special[f] || {}, p = C.extend({
  2189. type: f,
  2190. origType: p,
  2191. data: r,
  2192. handler: n,
  2193. guid: n.guid,
  2194. selector: i,
  2195. needsContext: i && C.expr.match.needsContext.test(i),
  2196. namespace: d.join(".")
  2197. }, s), (c = o[f]) || ((c = o[f] = []).delegateCount = 0, u.setup && !1 !== u.setup.call(e, r, d, l) || (e.addEventListener ? e.addEventListener(f, l, !1) : e.attachEvent && e.attachEvent("on" + f, l))), u.add && (u.add.call(e, p), p.handler.guid || (p.handler.guid = n.guid)), i ? c.splice(c.delegateCount++, 0, p) : c.push(p), C.event.global[f] = !0)
  2198. },
  2199. remove: function (e, t, n, r, i) {
  2200. var o, a, s, u, l, c, f, d, p, h, g, m = C.hasData(e) && C._data(e);
  2201. if (m && (c = m.events)) {
  2202. for (l = (t = (t || "").match(E) || [""]).length; l--;) if (p = g = (s = qe.exec(t[l]) || [])[1], h = (s[2] || "").split(".").sort(), p) {
  2203. for (f = C.event.special[p] || {}, d = c[p = (r ? f.delegateType : f.bindType) || p] || [], s = s[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), u = o = d.length; o--;) a = d[o], !i && g !== a.origType || n && n.guid !== a.guid || s && !s.test(a.namespace) || r && r !== a.selector && ("**" !== r || !a.selector) || (d.splice(o, 1), a.selector && d.delegateCount--, f.remove && f.remove.call(e, a));
  2204. u && !d.length && (f.teardown && !1 !== f.teardown.call(e, h, m.handle) || C.removeEvent(e, p, m.handle), delete c[p])
  2205. } else for (p in c) C.event.remove(e, p + t[l], n, r, !0);
  2206. C.isEmptyObject(c) && (delete m.handle, C._removeData(e, "events"))
  2207. }
  2208. },
  2209. trigger: function (e, t, n, r) {
  2210. var i, o, a, s, u, l, c = [n || g], f = m.call(e, "type") ? e.type : e,
  2211. d = m.call(e, "namespace") ? e.namespace.split(".") : [], p = u = n = n || g;
  2212. if (3 !== n.nodeType && 8 !== n.nodeType && !He.test(f + C.event.triggered) && (-1 < f.indexOf(".") && (f = (d = f.split(".")).shift(), d.sort()), o = f.indexOf(":") < 0 && "on" + f, (e = e[C.expando] ? e : new C.Event(f, "object" == typeof e && e)).isTrigger = r ? 2 : 3, e.namespace = d.join("."), e.rnamespace = e.namespace ? new RegExp("(^|\\.)" + d.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = undefined, e.target || (e.target = n), t = null == t ? [e] : C.makeArray(t, [e]), s = C.event.special[f] || {}, r || !s.trigger || !1 !== s.trigger.apply(n, t))) {
  2213. if (!r && !s.noBubble && !C.isWindow(n)) {
  2214. for (a = s.delegateType || f, He.test(a + f) || (p = p.parentNode); p; p = p.parentNode) c.push(p), u = p;
  2215. u === (n.ownerDocument || g) && c.push(u.defaultView || u.parentWindow || T)
  2216. }
  2217. for (l = 0; (p = c[l++]) && !e.isPropagationStopped();) e.type = 1 < l ? a : s.bindType || f, (i = (C._data(p, "events") || {})[e.type] && C._data(p, "handle")) && i.apply(p, t), (i = o && p[o]) && i.apply && v(p) && (e.result = i.apply(p, t), !1 === e.result && e.preventDefault());
  2218. if (e.type = f, !r && !e.isDefaultPrevented() && (!s._default || !1 === s._default.apply(c.pop(), t)) && v(n) && o && n[f] && !C.isWindow(n)) {
  2219. (u = n[o]) && (n[o] = null), C.event.triggered = f;
  2220. try {
  2221. n[f]()
  2222. } catch (h) {
  2223. }
  2224. C.event.triggered = undefined, u && (n[o] = u)
  2225. }
  2226. return e.result
  2227. }
  2228. },
  2229. dispatch: function (e) {
  2230. e = C.event.fix(e);
  2231. var t, n, r, i, o, a = c.call(arguments), s = (C._data(this, "events") || {})[e.type] || [],
  2232. u = C.event.special[e.type] || {};
  2233. if ((a[0] = e).delegateTarget = this, !u.preDispatch || !1 !== u.preDispatch.call(this, e)) {
  2234. for (o = C.event.handlers.call(this, e, s), t = 0; (r = o[t++]) && !e.isPropagationStopped();) for (e.currentTarget = r.elem, n = 0; (i = r.handlers[n++]) && !e.isImmediatePropagationStopped();) e.rnamespace && !e.rnamespace.test(i.namespace) || (e.handleObj = i, e.data = i.data, (i = ((C.event.special[i.origType] || {}).handle || i.handler).apply(r.elem, a)) !== undefined && !1 === (e.result = i) && (e.preventDefault(), e.stopPropagation()));
  2235. return u.postDispatch && u.postDispatch.call(this, e), e.result
  2236. }
  2237. },
  2238. handlers: function (e, t) {
  2239. var n, r, i, o, a = [], s = t.delegateCount, u = e.target;
  2240. if (s && u.nodeType && ("click" !== e.type || isNaN(e.button) || e.button < 1)) for (; u != this; u = u.parentNode || this) if (1 === u.nodeType && (!0 !== u.disabled || "click" !== e.type)) {
  2241. for (r = [], n = 0; n < s; n++) r[i = (o = t[n]).selector + " "] === undefined && (r[i] = o.needsContext ? -1 < C(i, this).index(u) : C.find(i, this, null, [u]).length), r[i] && r.push(o);
  2242. r.length && a.push({elem: u, handlers: r})
  2243. }
  2244. return s < t.length && a.push({elem: this, handlers: t.slice(s)}), a
  2245. },
  2246. fix: function (e) {
  2247. if (e[C.expando]) return e;
  2248. var t, n, r, i = e.type, o = e, a = this.fixHooks[i];
  2249. for (a || (this.fixHooks[i] = a = Le.test(i) ? this.mouseHooks : je.test(i) ? this.keyHooks : {}), r = a.props ? this.props.concat(a.props) : this.props, e = new C.Event(o), t = r.length; t--;) e[n = r[t]] = o[n];
  2250. return e.target || (e.target = o.srcElement || g), 3 === e.target.nodeType && (e.target = e.target.parentNode), e.metaKey = !!e.metaKey, a.filter ? a.filter(e, o) : e
  2251. },
  2252. props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  2253. fixHooks: {},
  2254. keyHooks: {
  2255. props: "char charCode key keyCode".split(" "), filter: function (e, t) {
  2256. return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e
  2257. }
  2258. },
  2259. mouseHooks: {
  2260. props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
  2261. filter: function (e, t) {
  2262. var n, r, i = t.button, o = t.fromElement;
  2263. return null == e.pageX && null != t.clientX && (r = (n = e.target.ownerDocument || g).documentElement, n = n.body, e.pageX = t.clientX + (r && r.scrollLeft || n && n.scrollLeft || 0) - (r && r.clientLeft || n && n.clientLeft || 0), e.pageY = t.clientY + (r && r.scrollTop || n && n.scrollTop || 0) - (r && r.clientTop || n && n.clientTop || 0)), !e.relatedTarget && o && (e.relatedTarget = o === e.target ? t.toElement : o), e.which || i === undefined || (e.which = 1 & i ? 1 : 2 & i ? 3 : 4 & i ? 2 : 0), e
  2264. }
  2265. },
  2266. special: {
  2267. load: {noBubble: !0}, focus: {
  2268. trigger: function () {
  2269. if (this !== Fe() && this.focus) try {
  2270. return this.focus(), !1
  2271. } catch (e) {
  2272. }
  2273. }, delegateType: "focusin"
  2274. }, blur: {
  2275. trigger: function () {
  2276. if (this === Fe() && this.blur) return this.blur(), !1
  2277. }, delegateType: "focusout"
  2278. }, click: {
  2279. trigger: function () {
  2280. if (C.nodeName(this, "input") && "checkbox" === this.type && this.click) return this.click(), !1
  2281. }, _default: function (e) {
  2282. return C.nodeName(e.target, "a")
  2283. }
  2284. }, beforeunload: {
  2285. postDispatch: function (e) {
  2286. e.result !== undefined && e.originalEvent && (e.originalEvent.returnValue = e.result)
  2287. }
  2288. }
  2289. },
  2290. simulate: function (e, t, n) {
  2291. e = C.extend(new C.Event, n, {type: e, isSimulated: !0});
  2292. C.event.trigger(e, null, t), e.isDefaultPrevented() && n.preventDefault()
  2293. }
  2294. }, C.removeEvent = g.removeEventListener ? function (e, t, n) {
  2295. e.removeEventListener && e.removeEventListener(t, n)
  2296. } : function (e, t, n) {
  2297. t = "on" + t;
  2298. e.detachEvent && ("undefined" == typeof e[t] && (e[t] = null), e.detachEvent(t, n))
  2299. }, C.Event = function (e, t) {
  2300. if (!(this instanceof C.Event)) return new C.Event(e, t);
  2301. e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.defaultPrevented === undefined && !1 === e.returnValue ? _e : u) : this.type = e, t && C.extend(this, t), this.timeStamp = e && e.timeStamp || C.now(), this[C.expando] = !0
  2302. }, C.Event.prototype = {
  2303. constructor: C.Event,
  2304. isDefaultPrevented: u,
  2305. isPropagationStopped: u,
  2306. isImmediatePropagationStopped: u,
  2307. preventDefault: function () {
  2308. var e = this.originalEvent;
  2309. this.isDefaultPrevented = _e, e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
  2310. },
  2311. stopPropagation: function () {
  2312. var e = this.originalEvent;
  2313. this.isPropagationStopped = _e, e && !this.isSimulated && (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0)
  2314. },
  2315. stopImmediatePropagation: function () {
  2316. var e = this.originalEvent;
  2317. this.isImmediatePropagationStopped = _e, e && e.stopImmediatePropagation && e.stopImmediatePropagation(), this.stopPropagation()
  2318. }
  2319. }, C.each({
  2320. mouseenter: "mouseover",
  2321. mouseleave: "mouseout",
  2322. pointerenter: "pointerover",
  2323. pointerleave: "pointerout"
  2324. }, function (e, i) {
  2325. C.event.special[e] = {
  2326. delegateType: i, bindType: i, handle: function (e) {
  2327. var t, n = e.relatedTarget, r = e.handleObj;
  2328. return n && (n === this || C.contains(this, n)) || (e.type = r.origType, t = r.handler.apply(this, arguments), e.type = i), t
  2329. }
  2330. }
  2331. }), y.submit || (C.event.special.submit = {
  2332. setup: function () {
  2333. if (C.nodeName(this, "form")) return !1;
  2334. C.event.add(this, "click._submit keypress._submit", function (e) {
  2335. e = e.target, e = C.nodeName(e, "input") || C.nodeName(e, "button") ? C.prop(e, "form") : undefined;
  2336. e && !C._data(e, "submit") && (C.event.add(e, "submit._submit", function (e) {
  2337. e._submitBubble = !0
  2338. }), C._data(e, "submit", !0))
  2339. })
  2340. }, postDispatch: function (e) {
  2341. e._submitBubble && (delete e._submitBubble, this.parentNode && !e.isTrigger && C.event.simulate("submit", this.parentNode, e))
  2342. }, teardown: function () {
  2343. if (C.nodeName(this, "form")) return !1;
  2344. C.event.remove(this, "._submit")
  2345. }
  2346. }), y.change || (C.event.special.change = {
  2347. setup: function () {
  2348. if (De.test(this.nodeName)) return "checkbox" !== this.type && "radio" !== this.type || (C.event.add(this, "propertychange._change", function (e) {
  2349. "checked" === e.originalEvent.propertyName && (this._justChanged = !0)
  2350. }), C.event.add(this, "click._change", function (e) {
  2351. this._justChanged && !e.isTrigger && (this._justChanged = !1), C.event.simulate("change", this, e)
  2352. })), !1;
  2353. C.event.add(this, "beforeactivate._change", function (e) {
  2354. e = e.target;
  2355. De.test(e.nodeName) && !C._data(e, "change") && (C.event.add(e, "change._change", function (e) {
  2356. !this.parentNode || e.isSimulated || e.isTrigger || C.event.simulate("change", this.parentNode, e)
  2357. }), C._data(e, "change", !0))
  2358. })
  2359. }, handle: function (e) {
  2360. var t = e.target;
  2361. if (this !== t || e.isSimulated || e.isTrigger || "radio" !== t.type && "checkbox" !== t.type) return e.handleObj.handler.apply(this, arguments)
  2362. }, teardown: function () {
  2363. return C.event.remove(this, "._change"), !De.test(this.nodeName)
  2364. }
  2365. }), y.focusin || C.each({focus: "focusin", blur: "focusout"}, function (n, r) {
  2366. var i = function (e) {
  2367. C.event.simulate(r, e.target, C.event.fix(e))
  2368. };
  2369. C.event.special[r] = {
  2370. setup: function () {
  2371. var e = this.ownerDocument || this, t = C._data(e, r);
  2372. t || e.addEventListener(n, i, !0), C._data(e, r, (t || 0) + 1)
  2373. }, teardown: function () {
  2374. var e = this.ownerDocument || this, t = C._data(e, r) - 1;
  2375. t ? C._data(e, r, t) : (e.removeEventListener(n, i, !0), C._removeData(e, r))
  2376. }
  2377. }
  2378. }), C.fn.extend({
  2379. on: function (e, t, n, r) {
  2380. return Me(this, e, t, n, r)
  2381. }, one: function (e, t, n, r) {
  2382. return Me(this, e, t, n, r, 1)
  2383. }, off: function (e, t, n) {
  2384. var r, i;
  2385. if (e && e.preventDefault && e.handleObj) return r = e.handleObj, C(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this;
  2386. if ("object" != typeof e) return !1 !== t && "function" != typeof t || (n = t, t = undefined), !1 === n && (n = u), this.each(function () {
  2387. C.event.remove(this, e, n, t)
  2388. });
  2389. for (i in e) this.off(i, t, e[i]);
  2390. return this
  2391. }, trigger: function (e, t) {
  2392. return this.each(function () {
  2393. C.event.trigger(e, t, this)
  2394. })
  2395. }, triggerHandler: function (e, t) {
  2396. var n = this[0];
  2397. if (n) return C.event.trigger(e, t, n, !0)
  2398. }
  2399. });
  2400. var Oe = / jQuery\d+="(?:null|\d+)"/g, Re = new RegExp("<(?:" + xe + ")[\\s/>]", "i"),
  2401. Pe = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, Be = /<script|<style|<link/i,
  2402. We = /checked\s*(?:[^=]|=\s*.checked.)/i, Ie = /^true\/(.*)/, $e = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
  2403. ze = be(g).appendChild(g.createElement("div"));
  2404. function Xe(e, t) {
  2405. return C.nodeName(e, "table") && C.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e
  2406. }
  2407. function Ue(e) {
  2408. return e.type = (null !== C.find.attr(e, "type")) + "/" + e.type, e
  2409. }
  2410. function Ve(e) {
  2411. var t = Ie.exec(e.type);
  2412. return t ? e.type = t[1] : e.removeAttribute("type"), e
  2413. }
  2414. function Ye(e, t) {
  2415. if (1 === t.nodeType && C.hasData(e)) {
  2416. var n, r, i, e = C._data(e), o = C._data(t, e), a = e.events;
  2417. if (a) for (n in delete o.handle, o.events = {}, a) for (r = 0, i = a[n].length; r < i; r++) C.event.add(t, n, a[n][r]);
  2418. o.data && (o.data = C.extend({}, o.data))
  2419. }
  2420. }
  2421. function w(n, r, i, o) {
  2422. r = O.apply([], r);
  2423. var e, t, a, s, u, l, c = 0, f = n.length, d = f - 1, p = r[0], h = C.isFunction(p);
  2424. if (h || 1 < f && "string" == typeof p && !y.checkClone && We.test(p)) return n.each(function (e) {
  2425. var t = n.eq(e);
  2426. h && (r[0] = p.call(this, e, t.html())), w(t, r, i, o)
  2427. });
  2428. if (f && (e = (l = Ne(r, n[0].ownerDocument, !1, n, o)).firstChild, 1 === l.childNodes.length && (l = e), e || o)) {
  2429. for (a = (s = C.map(b(l, "script"), Ue)).length; c < f; c++) t = l, c !== d && (t = C.clone(t, !0, !0), a && C.merge(s, b(t, "script"))), i.call(n[c], t, c);
  2430. if (a) for (u = s[s.length - 1].ownerDocument, C.map(s, Ve), c = 0; c < a; c++) t = s[c], ye.test(t.type || "") && !C._data(t, "globalEval") && C.contains(u, t) && (t.src ? C._evalUrl && C._evalUrl(t.src) : C.globalEval((t.text || t.textContent || t.innerHTML || "").replace($e, "")));
  2431. l = e = null
  2432. }
  2433. return n
  2434. }
  2435. function Je(e, t, n) {
  2436. for (var r, i = t ? C.filter(t, e) : e, o = 0; null != (r = i[o]); o++) n || 1 !== r.nodeType || C.cleanData(b(r)), r.parentNode && (n && C.contains(r.ownerDocument, r) && we(b(r, "script")), r.parentNode.removeChild(r));
  2437. return e
  2438. }
  2439. C.extend({
  2440. htmlPrefilter: function (e) {
  2441. return e.replace(Pe, "<$1></$2>")
  2442. }, clone: function (e, t, n) {
  2443. var r, i, o, a, s, u = C.contains(e.ownerDocument, e);
  2444. if (y.html5Clone || C.isXMLDoc(e) || !Re.test("<" + e.nodeName + ">") ? o = e.cloneNode(!0) : (ze.innerHTML = e.outerHTML, ze.removeChild(o = ze.firstChild)), !(y.noCloneEvent && y.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || C.isXMLDoc(e))) for (r = b(o), s = b(e), a = 0; null != (i = s[a]); ++a) if (r[a]) {
  2445. f = c = l = p = d = void 0;
  2446. var l, c, f, d = i, p = r[a];
  2447. if (1 === p.nodeType) {
  2448. if (l = p.nodeName.toLowerCase(), !y.noCloneEvent && p[C.expando]) {
  2449. for (c in (f = C._data(p)).events) C.removeEvent(p, c, f.handle);
  2450. p.removeAttribute(C.expando)
  2451. }
  2452. "script" === l && p.text !== d.text ? (Ue(p).text = d.text, Ve(p)) : "object" === l ? (p.parentNode && (p.outerHTML = d.outerHTML), y.html5Clone && d.innerHTML && !C.trim(p.innerHTML) && (p.innerHTML = d.innerHTML)) : "input" === l && ge.test(d.type) ? (p.defaultChecked = p.checked = d.checked, p.value !== d.value && (p.value = d.value)) : "option" === l ? p.defaultSelected = p.selected = d.defaultSelected : "input" !== l && "textarea" !== l || (p.defaultValue = d.defaultValue)
  2453. }
  2454. }
  2455. if (t) if (n) for (s = s || b(e), r = r || b(o), a = 0; null != (i = s[a]); a++) Ye(i, r[a]); else Ye(e, o);
  2456. return 0 < (r = b(o, "script")).length && we(r, !u && b(e, "script")), r = s = i = null, o
  2457. }, cleanData: function (e, t) {
  2458. for (var n, r, i, o, a = 0, s = C.expando, u = C.cache, l = y.attributes, c = C.event.special; null != (n = e[a]); a++) if ((t || v(n)) && (o = (i = n[s]) && u[i])) {
  2459. if (o.events) for (r in o.events) c[r] ? C.event.remove(n, r) : C.removeEvent(n, r, o.handle);
  2460. u[i] && (delete u[i], l || "undefined" == typeof n.removeAttribute ? n[s] = undefined : n.removeAttribute(s), f.push(i))
  2461. }
  2462. }
  2463. }), C.fn.extend({
  2464. domManip: w, detach: function (e) {
  2465. return Je(this, e, !0)
  2466. }, remove: function (e) {
  2467. return Je(this, e)
  2468. }, text: function (e) {
  2469. return d(this, function (e) {
  2470. return e === undefined ? C.text(this) : this.empty().append((this[0] && this[0].ownerDocument || g).createTextNode(e))
  2471. }, null, e, arguments.length)
  2472. }, append: function () {
  2473. return w(this, arguments, function (e) {
  2474. 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || Xe(this, e).appendChild(e)
  2475. })
  2476. }, prepend: function () {
  2477. return w(this, arguments, function (e) {
  2478. var t;
  2479. 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (t = Xe(this, e)).insertBefore(e, t.firstChild)
  2480. })
  2481. }, before: function () {
  2482. return w(this, arguments, function (e) {
  2483. this.parentNode && this.parentNode.insertBefore(e, this)
  2484. })
  2485. }, after: function () {
  2486. return w(this, arguments, function (e) {
  2487. this.parentNode && this.parentNode.insertBefore(e, this.nextSibling)
  2488. })
  2489. }, empty: function () {
  2490. for (var e, t = 0; null != (e = this[t]); t++) {
  2491. for (1 === e.nodeType && C.cleanData(b(e, !1)); e.firstChild;) e.removeChild(e.firstChild);
  2492. e.options && C.nodeName(e, "select") && (e.options.length = 0)
  2493. }
  2494. return this
  2495. }, clone: function (e, t) {
  2496. return e = null != e && e, t = null == t ? e : t, this.map(function () {
  2497. return C.clone(this, e, t)
  2498. })
  2499. }, html: function (e) {
  2500. return d(this, function (e) {
  2501. var t = this[0] || {}, n = 0, r = this.length;
  2502. if (e === undefined) return 1 === t.nodeType ? t.innerHTML.replace(Oe, "") : undefined;
  2503. if ("string" == typeof e && !Be.test(e) && (y.htmlSerialize || !Re.test(e)) && (y.leadingWhitespace || !ve.test(e)) && !x[(me.exec(e) || ["", ""])[1].toLowerCase()]) {
  2504. e = C.htmlPrefilter(e);
  2505. try {
  2506. for (; n < r; n++) 1 === (t = this[n] || {}).nodeType && (C.cleanData(b(t, !1)), t.innerHTML = e);
  2507. t = 0
  2508. } catch (i) {
  2509. }
  2510. }
  2511. t && this.empty().append(e)
  2512. }, null, e, arguments.length)
  2513. }, replaceWith: function () {
  2514. var n = [];
  2515. return w(this, arguments, function (e) {
  2516. var t = this.parentNode;
  2517. C.inArray(this, n) < 0 && (C.cleanData(b(this)), t && t.replaceChild(e, this))
  2518. }, n)
  2519. }
  2520. }), C.each({
  2521. appendTo: "append",
  2522. prependTo: "prepend",
  2523. insertBefore: "before",
  2524. insertAfter: "after",
  2525. replaceAll: "replaceWith"
  2526. }, function (e, a) {
  2527. C.fn[e] = function (e) {
  2528. for (var t, n = 0, r = [], i = C(e), o = i.length - 1; n <= o; n++) t = n === o ? this : this.clone(!0), C(i[n])[a](t), R.apply(r, t.get());
  2529. return this.pushStack(r)
  2530. }
  2531. });
  2532. var Ge, Ke = {HTML: "block", BODY: "block"};
  2533. function Qe(e, t) {
  2534. e = C(t.createElement(e)).appendTo(t.body), t = C.css(e[0], "display");
  2535. return e.detach(), t
  2536. }
  2537. function Ze(e) {
  2538. var t = g, n = Ke[e];
  2539. return n || ("none" !== (n = Qe(e, t)) && n || ((t = ((Ge = (Ge || C("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentWindow || Ge[0].contentDocument).document).write(), t.close(), n = Qe(e, t), Ge.detach()), Ke[e] = n), n
  2540. }
  2541. var n, et, tt, nt, rt, it, ot, a, at = /^margin/, st = new RegExp("^(" + e + ")(?!px)[a-z%]+$", "i"),
  2542. ut = function (e, t, n, r) {
  2543. var i, o = {};
  2544. for (i in t) o[i] = e.style[i], e.style[i] = t[i];
  2545. for (i in r = n.apply(e, r || []), t) e.style[i] = o[i];
  2546. return r
  2547. }, lt = g.documentElement;
  2548. function t() {
  2549. var e, t = g.documentElement;
  2550. t.appendChild(ot), a.style.cssText = "-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", n = tt = it = !1, et = rt = !0, T.getComputedStyle && (e = T.getComputedStyle(a), n = "1%" !== (e || {}).top, it = "2px" === (e || {}).marginLeft, tt = "4px" === (e || {width: "4px"}).width, a.style.marginRight = "50%", et = "4px" === (e || {marginRight: "4px"}).marginRight, (e = a.appendChild(g.createElement("div"))).style.cssText = a.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", e.style.marginRight = e.style.width = "0", a.style.width = "1px", rt = !parseFloat((T.getComputedStyle(e) || {}).marginRight), a.removeChild(e)), a.style.display = "none", (nt = 0 === a.getClientRects().length) && (a.style.display = "", a.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", a.childNodes[0].style.borderCollapse = "separate", (e = a.getElementsByTagName("td"))[0].style.cssText = "margin:0;border:0;padding:0;display:none", (nt = 0 === e[0].offsetHeight) && (e[0].style.display = "", e[1].style.display = "none", nt = 0 === e[0].offsetHeight)), t.removeChild(ot)
  2551. }
  2552. ot = g.createElement("div"), (a = g.createElement("div")).style && (a.style.cssText = "float:left;opacity:.5", y.opacity = "0.5" === a.style.opacity, y.cssFloat = !!a.style.cssFloat, a.style.backgroundClip = "content-box", a.cloneNode(!0).style.backgroundClip = "", y.clearCloneStyle = "content-box" === a.style.backgroundClip, (ot = g.createElement("div")).style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", a.innerHTML = "", ot.appendChild(a), y.boxSizing = "" === a.style.boxSizing || "" === a.style.MozBoxSizing || "" === a.style.WebkitBoxSizing, C.extend(y, {
  2553. reliableHiddenOffsets: function () {
  2554. return null == n && t(), nt
  2555. }, boxSizingReliable: function () {
  2556. return null == n && t(), tt
  2557. }, pixelMarginRight: function () {
  2558. return null == n && t(), et
  2559. }, pixelPosition: function () {
  2560. return null == n && t(), n
  2561. }, reliableMarginRight: function () {
  2562. return null == n && t(), rt
  2563. }, reliableMarginLeft: function () {
  2564. return null == n && t(), it
  2565. }
  2566. }));
  2567. var l, p, ct = /^(top|right|bottom|left)$/;
  2568. function ft(e, t) {
  2569. return {
  2570. get: function () {
  2571. if (!e()) return (this.get = t).apply(this, arguments);
  2572. delete this.get
  2573. }
  2574. }
  2575. }
  2576. T.getComputedStyle ? (l = function (e) {
  2577. var t = e.ownerDocument.defaultView;
  2578. return (t = t && t.opener ? t : T).getComputedStyle(e)
  2579. }, p = function (e, t, n) {
  2580. var r, i, o = e.style;
  2581. return "" !== (i = (n = n || l(e)) ? n.getPropertyValue(t) || n[t] : undefined) && i !== undefined || C.contains(e.ownerDocument, e) || (i = C.style(e, t)), n && !y.pixelMarginRight() && st.test(i) && at.test(t) && (e = o.width, t = o.minWidth, r = o.maxWidth, o.minWidth = o.maxWidth = o.width = i, i = n.width, o.width = e, o.minWidth = t, o.maxWidth = r), i === undefined ? i : i + ""
  2582. }) : lt.currentStyle && (l = function (e) {
  2583. return e.currentStyle
  2584. }, p = function (e, t, n) {
  2585. var r, i, o, a = e.style;
  2586. return null == (n = (n = n || l(e)) ? n[t] : undefined) && a && a[t] && (n = a[t]), st.test(n) && !ct.test(t) && (r = a.left, (o = (i = e.runtimeStyle) && i.left) && (i.left = e.currentStyle.left), a.left = "fontSize" === t ? "1em" : n, n = a.pixelLeft + "px", a.left = r, o && (i.left = o)), n === undefined ? n : n + "" || "auto"
  2587. });
  2588. var dt = /alpha\([^)]*\)/i, pt = /opacity\s*=\s*([^)]*)/i, ht = /^(none|table(?!-c[ea]).+)/,
  2589. gt = new RegExp("^(" + e + ")(.*)$", "i"), mt = {position: "absolute", visibility: "hidden", display: "block"},
  2590. yt = {letterSpacing: "0", fontWeight: "400"}, vt = ["Webkit", "O", "Moz", "ms"],
  2591. xt = g.createElement("div").style;
  2592. function bt(e) {
  2593. if (e in xt) return e;
  2594. for (var t = e.charAt(0).toUpperCase() + e.slice(1), n = vt.length; n--;) if ((e = vt[n] + t) in xt) return e
  2595. }
  2596. function wt(e, t) {
  2597. for (var n, r, i, o = [], a = 0, s = e.length; a < s; a++) (r = e[a]).style && (o[a] = C._data(r, "olddisplay"), n = r.style.display, t ? (o[a] || "none" !== n || (r.style.display = ""), "" === r.style.display && pe(r) && (o[a] = C._data(r, "olddisplay", Ze(r.nodeName)))) : (i = pe(r), (n && "none" !== n || !i) && C._data(r, "olddisplay", i ? n : C.css(r, "display"))));
  2598. for (a = 0; a < s; a++) !(r = e[a]).style || t && "none" !== r.style.display && "" !== r.style.display || (r.style.display = t ? o[a] || "" : "none");
  2599. return e
  2600. }
  2601. function Tt(e, t, n) {
  2602. var r = gt.exec(t);
  2603. return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t
  2604. }
  2605. function Ct(e, t, n, r, i) {
  2606. for (var o = n === (r ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0; o < 4; o += 2) "margin" === n && (a += C.css(e, n + s[o], !0, i)), r ? ("content" === n && (a -= C.css(e, "padding" + s[o], !0, i)), "margin" !== n && (a -= C.css(e, "border" + s[o] + "Width", !0, i))) : (a += C.css(e, "padding" + s[o], !0, i), "padding" !== n && (a += C.css(e, "border" + s[o] + "Width", !0, i)));
  2607. return a
  2608. }
  2609. function Et(e, t, n) {
  2610. var r = !0, i = "width" === t ? e.offsetWidth : e.offsetHeight, o = l(e),
  2611. a = y.boxSizing && "border-box" === C.css(e, "boxSizing", !1, o);
  2612. if (i <= 0 || null == i) {
  2613. if (((i = p(e, t, o)) < 0 || null == i) && (i = e.style[t]), st.test(i)) return i;
  2614. r = a && (y.boxSizingReliable() || i === e.style[t]), i = parseFloat(i) || 0
  2615. }
  2616. return i + Ct(e, t, n || (a ? "border" : "content"), r, o) + "px"
  2617. }
  2618. function h(e, t, n, r, i) {
  2619. return new h.prototype.init(e, t, n, r, i)
  2620. }
  2621. C.extend({
  2622. cssHooks: {
  2623. opacity: {
  2624. get: function (e, t) {
  2625. if (t) return "" === (t = p(e, "opacity")) ? "1" : t
  2626. }
  2627. }
  2628. },
  2629. cssNumber: {
  2630. animationIterationCount: !0,
  2631. columnCount: !0,
  2632. fillOpacity: !0,
  2633. flexGrow: !0,
  2634. flexShrink: !0,
  2635. fontWeight: !0,
  2636. lineHeight: !0,
  2637. opacity: !0,
  2638. order: !0,
  2639. orphans: !0,
  2640. widows: !0,
  2641. zIndex: !0,
  2642. zoom: !0
  2643. },
  2644. cssProps: {"float": y.cssFloat ? "cssFloat" : "styleFloat"},
  2645. style: function (e, t, n, r) {
  2646. if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
  2647. var i, o, a, s = C.camelCase(t), u = e.style;
  2648. if (t = C.cssProps[s] || (C.cssProps[s] = bt(s) || s), a = C.cssHooks[t] || C.cssHooks[s], n === undefined) return a && "get" in a && (i = a.get(e, !1, r)) !== undefined ? i : u[t];
  2649. if ("string" === (o = typeof n) && (i = de.exec(n)) && i[1] && (n = he(e, t, i), o = "number"), null != n && n == n && ("number" === o && (n += i && i[3] || (C.cssNumber[s] ? "" : "px")), y.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (u[t] = "inherit"), !(a && "set" in a && (n = a.set(e, n, r)) === undefined))) try {
  2650. u[t] = n
  2651. } catch (l) {
  2652. }
  2653. }
  2654. },
  2655. css: function (e, t, n, r) {
  2656. var i, o = C.camelCase(t);
  2657. return t = C.cssProps[o] || (C.cssProps[o] = bt(o) || o), "normal" === (i = (i = (o = C.cssHooks[t] || C.cssHooks[o]) && "get" in o ? o.get(e, !0, n) : i) === undefined ? p(e, t, r) : i) && t in yt && (i = yt[t]), "" === n || n ? (o = parseFloat(i), !0 === n || isFinite(o) ? o || 0 : i) : i
  2658. }
  2659. }), C.each(["height", "width"], function (e, i) {
  2660. C.cssHooks[i] = {
  2661. get: function (e, t, n) {
  2662. if (t) return ht.test(C.css(e, "display")) && 0 === e.offsetWidth ? ut(e, mt, function () {
  2663. return Et(e, i, n)
  2664. }) : Et(e, i, n)
  2665. }, set: function (e, t, n) {
  2666. var r = n && l(e);
  2667. return Tt(0, t, n ? Ct(e, i, n, y.boxSizing && "border-box" === C.css(e, "boxSizing", !1, r), r) : 0)
  2668. }
  2669. }
  2670. }), y.opacity || (C.cssHooks.opacity = {
  2671. get: function (e, t) {
  2672. return pt.test((t && e.currentStyle ? e.currentStyle : e.style).filter || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : ""
  2673. }, set: function (e, t) {
  2674. var n = e.style, e = e.currentStyle, r = C.isNumeric(t) ? "alpha(opacity=" + 100 * t + ")" : "",
  2675. i = e && e.filter || n.filter || "";
  2676. ((n.zoom = 1) <= t || "" === t) && "" === C.trim(i.replace(dt, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === t || e && !e.filter) || (n.filter = dt.test(i) ? i.replace(dt, r) : i + " " + r)
  2677. }
  2678. }), C.cssHooks.marginRight = ft(y.reliableMarginRight, function (e, t) {
  2679. if (t) return ut(e, {display: "inline-block"}, p, [e, "marginRight"])
  2680. }), C.cssHooks.marginLeft = ft(y.reliableMarginLeft, function (e, t) {
  2681. if (t) return (parseFloat(p(e, "marginLeft")) || (C.contains(e.ownerDocument, e) ? e.getBoundingClientRect().left - ut(e, {marginLeft: 0}, function () {
  2682. return e.getBoundingClientRect().left
  2683. }) : 0)) + "px"
  2684. }), C.each({margin: "", padding: "", border: "Width"}, function (i, o) {
  2685. C.cssHooks[i + o] = {
  2686. expand: function (e) {
  2687. for (var t = 0, n = {}, r = "string" == typeof e ? e.split(" ") : [e]; t < 4; t++) n[i + s[t] + o] = r[t] || r[t - 2] || r[0];
  2688. return n
  2689. }
  2690. }, at.test(i) || (C.cssHooks[i + o].set = Tt)
  2691. }), C.fn.extend({
  2692. css: function (e, t) {
  2693. return d(this, function (e, t, n) {
  2694. var r, i, o = {}, a = 0;
  2695. if (C.isArray(t)) {
  2696. for (r = l(e), i = t.length; a < i; a++) o[t[a]] = C.css(e, t[a], !1, r);
  2697. return o
  2698. }
  2699. return n !== undefined ? C.style(e, t, n) : C.css(e, t)
  2700. }, e, t, 1 < arguments.length)
  2701. }, show: function () {
  2702. return wt(this, !0)
  2703. }, hide: function () {
  2704. return wt(this)
  2705. }, toggle: function (e) {
  2706. return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function () {
  2707. pe(this) ? C(this).show() : C(this).hide()
  2708. })
  2709. }
  2710. }), ((C.Tween = h).prototype = {
  2711. constructor: h, init: function (e, t, n, r, i, o) {
  2712. this.elem = e, this.prop = n, this.easing = i || C.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (C.cssNumber[n] ? "" : "px")
  2713. }, cur: function () {
  2714. var e = h.propHooks[this.prop];
  2715. return (e && e.get ? e : h.propHooks._default).get(this)
  2716. }, run: function (e) {
  2717. var t, n = h.propHooks[this.prop];
  2718. return this.options.duration ? this.pos = t = C.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), (n && n.set ? n : h.propHooks._default).set(this), this
  2719. }
  2720. }).init.prototype = h.prototype, (h.propHooks = {
  2721. _default: {
  2722. get: function (e) {
  2723. return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (e = C.css(e.elem, e.prop, "")) && "auto" !== e ? e : 0
  2724. }, set: function (e) {
  2725. C.fx.step[e.prop] ? C.fx.step[e.prop](e) : 1 !== e.elem.nodeType || null == e.elem.style[C.cssProps[e.prop]] && !C.cssHooks[e.prop] ? e.elem[e.prop] = e.now : C.style(e.elem, e.prop, e.now + e.unit)
  2726. }
  2727. }
  2728. }).scrollTop = h.propHooks.scrollLeft = {
  2729. set: function (e) {
  2730. e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)
  2731. }
  2732. }, C.easing = {
  2733. linear: function (e) {
  2734. return e
  2735. }, swing: function (e) {
  2736. return .5 - Math.cos(e * Math.PI) / 2
  2737. }, _default: "swing"
  2738. }, C.fx = h.prototype.init, C.fx.step = {};
  2739. var N, Nt, k, S, kt = /^(?:toggle|show|hide)$/, St = /queueHooks$/;
  2740. function At() {
  2741. return T.setTimeout(function () {
  2742. N = undefined
  2743. }), N = C.now()
  2744. }
  2745. function Dt(e, t) {
  2746. var n, r = {height: e}, i = 0;
  2747. for (t = t ? 1 : 0; i < 4; i += 2 - t) r["margin" + (n = s[i])] = r["padding" + n] = e;
  2748. return t && (r.opacity = r.width = e), r
  2749. }
  2750. function jt(e, t, n) {
  2751. for (var r, i = (A.tweeners[t] || []).concat(A.tweeners["*"]), o = 0, a = i.length; o < a; o++) if (r = i[o].call(n, t, e)) return r
  2752. }
  2753. function A(i, e, t) {
  2754. var n, o, r, a, s, u, l, c = 0, f = A.prefilters.length, d = C.Deferred().always(function () {
  2755. delete p.elem
  2756. }), p = function () {
  2757. if (o) return !1;
  2758. for (var e = N || At(), e = Math.max(0, h.startTime + h.duration - e), t = 1 - (e / h.duration || 0), n = 0, r = h.tweens.length; n < r; n++) h.tweens[n].run(t);
  2759. return d.notifyWith(i, [h, t, e]), t < 1 && r ? e : (d.resolveWith(i, [h]), !1)
  2760. }, h = d.promise({
  2761. elem: i,
  2762. props: C.extend({}, e),
  2763. opts: C.extend(!0, {specialEasing: {}, easing: C.easing._default}, t),
  2764. originalProperties: e,
  2765. originalOptions: t,
  2766. startTime: N || At(),
  2767. duration: t.duration,
  2768. tweens: [],
  2769. createTween: function (e, t) {
  2770. t = C.Tween(i, h.opts, e, t, h.opts.specialEasing[e] || h.opts.easing);
  2771. return h.tweens.push(t), t
  2772. },
  2773. stop: function (e) {
  2774. var t = 0, n = e ? h.tweens.length : 0;
  2775. if (o) return this;
  2776. for (o = !0; t < n; t++) h.tweens[t].run(1);
  2777. return e ? (d.notifyWith(i, [h, 1, 0]), d.resolveWith(i, [h, e])) : d.rejectWith(i, [h, e]), this
  2778. }
  2779. }), g = h.props, m = g, y = h.opts.specialEasing;
  2780. for (r in m) if (s = y[a = C.camelCase(r)], u = m[r], C.isArray(u) && (s = u[1], u = m[r] = u[0]), r !== a && (m[a] = u, delete m[r]), (l = C.cssHooks[a]) && "expand" in l) for (r in u = l.expand(u), delete m[a], u) r in m || (m[r] = u[r], y[r] = s); else y[a] = s;
  2781. for (; c < f; c++) if (n = A.prefilters[c].call(h, i, g, h.opts)) return C.isFunction(n.stop) && (C._queueHooks(h.elem, h.opts.queue).stop = C.proxy(n.stop, n)), n;
  2782. return C.map(g, jt, h), C.isFunction(h.opts.start) && h.opts.start.call(i, h), C.fx.timer(C.extend(p, {
  2783. elem: i,
  2784. anim: h,
  2785. queue: h.opts.queue
  2786. })), h.progress(h.opts.progress).done(h.opts.done, h.opts.complete).fail(h.opts.fail).always(h.opts.always)
  2787. }
  2788. C.Animation = C.extend(A, {
  2789. tweeners: {
  2790. "*": [function (e, t) {
  2791. var n = this.createTween(e, t);
  2792. return he(n.elem, e, de.exec(t), n), n
  2793. }]
  2794. }, tweener: function (e, t) {
  2795. for (var n, r = 0, i = (e = C.isFunction(e) ? (t = e, ["*"]) : e.match(E)).length; r < i; r++) n = e[r], A.tweeners[n] = A.tweeners[n] || [], A.tweeners[n].unshift(t)
  2796. }, prefilters: [function (t, e, n) {
  2797. var r, i, o, a, s, u, l, c = this, f = {}, d = t.style, p = t.nodeType && pe(t), h = C._data(t, "fxshow");
  2798. for (r in n.queue || (null == (s = C._queueHooks(t, "fx")).unqueued && (s.unqueued = 0, u = s.empty.fire, s.empty.fire = function () {
  2799. s.unqueued || u()
  2800. }), s.unqueued++, c.always(function () {
  2801. c.always(function () {
  2802. s.unqueued--, C.queue(t, "fx").length || s.empty.fire()
  2803. })
  2804. })), 1 === t.nodeType && ("height" in e || "width" in e) && (n.overflow = [d.overflow, d.overflowX, d.overflowY], "inline" === ("none" === (l = C.css(t, "display")) ? C._data(t, "olddisplay") || Ze(t.nodeName) : l) && "none" === C.css(t, "float") && (y.inlineBlockNeedsLayout && "inline" !== Ze(t.nodeName) ? d.zoom = 1 : d.display = "inline-block")), n.overflow && (d.overflow = "hidden", y.shrinkWrapBlocks() || c.always(function () {
  2805. d.overflow = n.overflow[0], d.overflowX = n.overflow[1], d.overflowY = n.overflow[2]
  2806. })), e) if (i = e[r], kt.exec(i)) {
  2807. if (delete e[r], o = o || "toggle" === i, i === (p ? "hide" : "show")) {
  2808. if ("show" !== i || !h || h[r] === undefined) continue;
  2809. p = !0
  2810. }
  2811. f[r] = h && h[r] || C.style(t, r)
  2812. } else l = undefined;
  2813. if (C.isEmptyObject(f)) "inline" === ("none" === l ? Ze(t.nodeName) : l) && (d.display = l); else for (r in h ? "hidden" in h && (p = h.hidden) : h = C._data(t, "fxshow", {}), o && (h.hidden = !p), p ? C(t).show() : c.done(function () {
  2814. C(t).hide()
  2815. }), c.done(function () {
  2816. for (var e in C._removeData(t, "fxshow"), f) C.style(t, e, f[e])
  2817. }), f) a = jt(p ? h[r] : 0, r, c), r in h || (h[r] = a.start, p && (a.end = a.start, a.start = "width" === r || "height" === r ? 1 : 0))
  2818. }], prefilter: function (e, t) {
  2819. t ? A.prefilters.unshift(e) : A.prefilters.push(e)
  2820. }
  2821. }), C.speed = function (e, t, n) {
  2822. var r = e && "object" == typeof e ? C.extend({}, e) : {
  2823. complete: n || !n && t || C.isFunction(e) && e,
  2824. duration: e,
  2825. easing: n && t || t && !C.isFunction(t) && t
  2826. };
  2827. return r.duration = C.fx.off ? 0 : "number" == typeof r.duration ? r.duration : r.duration in C.fx.speeds ? C.fx.speeds[r.duration] : C.fx.speeds._default, null != r.queue && !0 !== r.queue || (r.queue = "fx"), r.old = r.complete, r.complete = function () {
  2828. C.isFunction(r.old) && r.old.call(this), r.queue && C.dequeue(this, r.queue)
  2829. }, r
  2830. }, C.fn.extend({
  2831. fadeTo: function (e, t, n, r) {
  2832. return this.filter(pe).css("opacity", 0).show().end().animate({opacity: t}, e, n, r)
  2833. }, animate: function (t, e, n, r) {
  2834. var i = C.isEmptyObject(t), o = C.speed(e, n, r), e = function () {
  2835. var e = A(this, C.extend({}, t), o);
  2836. (i || C._data(this, "finish")) && e.stop(!0)
  2837. };
  2838. return e.finish = e, i || !1 === o.queue ? this.each(e) : this.queue(o.queue, e)
  2839. }, stop: function (i, e, o) {
  2840. var a = function (e) {
  2841. var t = e.stop;
  2842. delete e.stop, t(o)
  2843. };
  2844. return "string" != typeof i && (o = e, e = i, i = undefined), e && !1 !== i && this.queue(i || "fx", []), this.each(function () {
  2845. var e = !0, t = null != i && i + "queueHooks", n = C.timers, r = C._data(this);
  2846. if (t) r[t] && r[t].stop && a(r[t]); else for (t in r) r[t] && r[t].stop && St.test(t) && a(r[t]);
  2847. for (t = n.length; t--;) n[t].elem !== this || null != i && n[t].queue !== i || (n[t].anim.stop(o), e = !1, n.splice(t, 1));
  2848. !e && o || C.dequeue(this, i)
  2849. })
  2850. }, finish: function (a) {
  2851. return !1 !== a && (a = a || "fx"), this.each(function () {
  2852. var e, t = C._data(this), n = t[a + "queue"], r = t[a + "queueHooks"], i = C.timers,
  2853. o = n ? n.length : 0;
  2854. for (t.finish = !0, C.queue(this, a, []), r && r.stop && r.stop.call(this, !0), e = i.length; e--;) i[e].elem === this && i[e].queue === a && (i[e].anim.stop(!0), i.splice(e, 1));
  2855. for (e = 0; e < o; e++) n[e] && n[e].finish && n[e].finish.call(this);
  2856. delete t.finish
  2857. })
  2858. }
  2859. }), C.each(["toggle", "show", "hide"], function (e, r) {
  2860. var i = C.fn[r];
  2861. C.fn[r] = function (e, t, n) {
  2862. return null == e || "boolean" == typeof e ? i.apply(this, arguments) : this.animate(Dt(r, !0), e, t, n)
  2863. }
  2864. }), C.each({
  2865. slideDown: Dt("show"),
  2866. slideUp: Dt("hide"),
  2867. slideToggle: Dt("toggle"),
  2868. fadeIn: {opacity: "show"},
  2869. fadeOut: {opacity: "hide"},
  2870. fadeToggle: {opacity: "toggle"}
  2871. }, function (e, r) {
  2872. C.fn[e] = function (e, t, n) {
  2873. return this.animate(r, e, t, n)
  2874. }
  2875. }), C.timers = [], C.fx.tick = function () {
  2876. var e, t = C.timers, n = 0;
  2877. for (N = C.now(); n < t.length; n++) (e = t[n])() || t[n] !== e || t.splice(n--, 1);
  2878. t.length || C.fx.stop(), N = undefined
  2879. }, C.fx.timer = function (e) {
  2880. C.timers.push(e), e() ? C.fx.start() : C.timers.pop()
  2881. }, C.fx.interval = 13, C.fx.start = function () {
  2882. Nt = Nt || T.setInterval(C.fx.tick, C.fx.interval)
  2883. }, C.fx.stop = function () {
  2884. T.clearInterval(Nt), Nt = null
  2885. }, C.fx.speeds = {slow: 600, fast: 200, _default: 400}, C.fn.delay = function (r, e) {
  2886. return r = C.fx && C.fx.speeds[r] || r, this.queue(e = e || "fx", function (e, t) {
  2887. var n = T.setTimeout(e, r);
  2888. t.stop = function () {
  2889. T.clearTimeout(n)
  2890. }
  2891. })
  2892. }, k = g.createElement("input"), q = g.createElement("div"), S = g.createElement("select"), e = S.appendChild(g.createElement("option")), (q = g.createElement("div")).setAttribute("className", "t"), q.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", F = q.getElementsByTagName("a")[0], k.setAttribute("type", "checkbox"), q.appendChild(k), (F = q.getElementsByTagName("a")[0]).style.cssText = "top:1px", y.getSetAttribute = "t" !== q.className, y.style = /top/.test(F.getAttribute("style")), y.hrefNormalized = "/a" === F.getAttribute("href"), y.checkOn = !!k.value, y.optSelected = e.selected, y.enctype = !!g.createElement("form").enctype, S.disabled = !0, y.optDisabled = !e.disabled, (k = g.createElement("input")).setAttribute("value", ""), y.input = "" === k.getAttribute("value"), k.value = "t", k.setAttribute("type", "radio"), y.radioValue = "t" === k.value;
  2893. var Lt = /\r/g, Ht = /[\x20\t\r\n\f]+/g;
  2894. C.fn.extend({
  2895. val: function (t) {
  2896. var n, e, r, i = this[0];
  2897. return arguments.length ? (r = C.isFunction(t), this.each(function (e) {
  2898. 1 === this.nodeType && (null == (e = r ? t.call(this, e, C(this).val()) : t) ? e = "" : "number" == typeof e ? e += "" : C.isArray(e) && (e = C.map(e, function (e) {
  2899. return null == e ? "" : e + ""
  2900. })), (n = C.valHooks[this.type] || C.valHooks[this.nodeName.toLowerCase()]) && "set" in n && n.set(this, e, "value") !== undefined || (this.value = e))
  2901. })) : i ? (n = C.valHooks[i.type] || C.valHooks[i.nodeName.toLowerCase()]) && "get" in n && (e = n.get(i, "value")) !== undefined ? e : "string" == typeof (e = i.value) ? e.replace(Lt, "") : null == e ? "" : e : void 0
  2902. }
  2903. }), C.extend({
  2904. valHooks: {
  2905. option: {
  2906. get: function (e) {
  2907. var t = C.find.attr(e, "value");
  2908. return null != t ? t : C.trim(C.text(e)).replace(Ht, " ")
  2909. }
  2910. }, select: {
  2911. get: function (e) {
  2912. for (var t, n = e.options, r = e.selectedIndex, i = "select-one" === e.type || r < 0, o = i ? null : [], a = i ? r + 1 : n.length, s = r < 0 ? a : i ? r : 0; s < a; s++) if (((t = n[s]).selected || s === r) && (y.optDisabled ? !t.disabled : null === t.getAttribute("disabled")) && (!t.parentNode.disabled || !C.nodeName(t.parentNode, "optgroup"))) {
  2913. if (t = C(t).val(), i) return t;
  2914. o.push(t)
  2915. }
  2916. return o
  2917. }, set: function (e, t) {
  2918. for (var n, r, i = e.options, o = C.makeArray(t), a = i.length; a--;) if (r = i[a], -1 < C.inArray(C.valHooks.option.get(r), o)) try {
  2919. r.selected = n = !0
  2920. } catch (s) {
  2921. r.scrollHeight
  2922. } else r.selected = !1;
  2923. return n || (e.selectedIndex = -1), i
  2924. }
  2925. }
  2926. }
  2927. }), C.each(["radio", "checkbox"], function () {
  2928. C.valHooks[this] = {
  2929. set: function (e, t) {
  2930. if (C.isArray(t)) return e.checked = -1 < C.inArray(C(e).val(), t)
  2931. }
  2932. }, y.checkOn || (C.valHooks[this].get = function (e) {
  2933. return null === e.getAttribute("value") ? "on" : e.value
  2934. })
  2935. });
  2936. var D, qt, j = C.expr.attrHandle, _t = /^(?:checked|selected)$/i, L = y.getSetAttribute, Ft = y.input,
  2937. Mt = (C.fn.extend({
  2938. attr: function (e, t) {
  2939. return d(this, C.attr, e, t, 1 < arguments.length)
  2940. }, removeAttr: function (e) {
  2941. return this.each(function () {
  2942. C.removeAttr(this, e)
  2943. })
  2944. }
  2945. }), C.extend({
  2946. attr: function (e, t, n) {
  2947. var r, i, o = e.nodeType;
  2948. if (3 !== o && 8 !== o && 2 !== o) return "undefined" == typeof e.getAttribute ? C.prop(e, t, n) : (1 === o && C.isXMLDoc(e) || (t = t.toLowerCase(), i = C.attrHooks[t] || (C.expr.match.bool.test(t) ? qt : D)), n !== undefined ? null === n ? void C.removeAttr(e, t) : i && "set" in i && (r = i.set(e, n, t)) !== undefined ? r : (e.setAttribute(t, n + ""), n) : !(i && "get" in i && null !== (r = i.get(e, t))) && null == (r = C.find.attr(e, t)) ? undefined : r)
  2949. }, attrHooks: {
  2950. type: {
  2951. set: function (e, t) {
  2952. var n;
  2953. if (!y.radioValue && "radio" === t && C.nodeName(e, "input")) return n = e.value, e.setAttribute("type", t), n && (e.value = n), t
  2954. }
  2955. }
  2956. }, removeAttr: function (e, t) {
  2957. var n, r, i = 0, o = t && t.match(E);
  2958. if (o && 1 === e.nodeType) for (; n = o[i++];) r = C.propFix[n] || n, C.expr.match.bool.test(n) ? Ft && L || !_t.test(n) ? e[r] = !1 : e[C.camelCase("default-" + n)] = e[r] = !1 : C.attr(e, n, ""), e.removeAttribute(L ? n : r)
  2959. }
  2960. }), qt = {
  2961. set: function (e, t, n) {
  2962. return !1 === t ? C.removeAttr(e, n) : Ft && L || !_t.test(n) ? e.setAttribute(!L && C.propFix[n] || n, n) : e[C.camelCase("default-" + n)] = e[n] = !0, n
  2963. }
  2964. }, C.each(C.expr.match.bool.source.match(/\w+/g), function (e, t) {
  2965. var o = j[t] || C.find.attr;
  2966. Ft && L || !_t.test(t) ? j[t] = function (e, t, n) {
  2967. var r, i;
  2968. return n || (i = j[t], j[t] = r, r = null != o(e, t, n) ? t.toLowerCase() : null, j[t] = i), r
  2969. } : j[t] = function (e, t, n) {
  2970. if (!n) return e[C.camelCase("default-" + t)] ? t.toLowerCase() : null
  2971. }
  2972. }), Ft && L || (C.attrHooks.value = {
  2973. set: function (e, t, n) {
  2974. if (!C.nodeName(e, "input")) return D && D.set(e, t, n);
  2975. e.defaultValue = t
  2976. }
  2977. }), L || (D = {
  2978. set: function (e, t, n) {
  2979. var r = e.getAttributeNode(n);
  2980. if (r || e.setAttributeNode(r = e.ownerDocument.createAttribute(n)), r.value = t += "", "value" === n || t === e.getAttribute(n)) return t
  2981. }
  2982. }, j.id = j.name = j.coords = function (e, t, n) {
  2983. if (!n) return (n = e.getAttributeNode(t)) && "" !== n.value ? n.value : null
  2984. }, C.valHooks.button = {
  2985. get: function (e, t) {
  2986. t = e.getAttributeNode(t);
  2987. if (t && t.specified) return t.value
  2988. }, set: D.set
  2989. }, C.attrHooks.contenteditable = {
  2990. set: function (e, t, n) {
  2991. D.set(e, "" !== t && t, n)
  2992. }
  2993. }, C.each(["width", "height"], function (e, n) {
  2994. C.attrHooks[n] = {
  2995. set: function (e, t) {
  2996. if ("" === t) return e.setAttribute(n, "auto"), t
  2997. }
  2998. }
  2999. })), y.style || (C.attrHooks.style = {
  3000. get: function (e) {
  3001. return e.style.cssText || undefined
  3002. }, set: function (e, t) {
  3003. return e.style.cssText = t + ""
  3004. }
  3005. }), /^(?:input|select|textarea|button|object)$/i), Ot = /^(?:a|area)$/i, Rt = (C.fn.extend({
  3006. prop: function (e, t) {
  3007. return d(this, C.prop, e, t, 1 < arguments.length)
  3008. }, removeProp: function (t) {
  3009. return t = C.propFix[t] || t, this.each(function () {
  3010. try {
  3011. this[t] = undefined, delete this[t]
  3012. } catch (e) {
  3013. }
  3014. })
  3015. }
  3016. }), C.extend({
  3017. prop: function (e, t, n) {
  3018. var r, i, o = e.nodeType;
  3019. if (3 !== o && 8 !== o && 2 !== o) return 1 === o && C.isXMLDoc(e) || (t = C.propFix[t] || t, i = C.propHooks[t]), n !== undefined ? i && "set" in i && (r = i.set(e, n, t)) !== undefined ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t]
  3020. }, propHooks: {
  3021. tabIndex: {
  3022. get: function (e) {
  3023. var t = C.find.attr(e, "tabindex");
  3024. return t ? parseInt(t, 10) : Mt.test(e.nodeName) || Ot.test(e.nodeName) && e.href ? 0 : -1
  3025. }
  3026. }
  3027. }, propFix: {"for": "htmlFor", "class": "className"}
  3028. }), y.hrefNormalized || C.each(["href", "src"], function (e, t) {
  3029. C.propHooks[t] = {
  3030. get: function (e) {
  3031. return e.getAttribute(t, 4)
  3032. }
  3033. }
  3034. }), y.optSelected || (C.propHooks.selected = {
  3035. get: function (e) {
  3036. e = e.parentNode;
  3037. return e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex), null
  3038. }, set: function (e) {
  3039. e = e.parentNode;
  3040. e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex)
  3041. }
  3042. }), C.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
  3043. C.propFix[this.toLowerCase()] = this
  3044. }), y.enctype || (C.propFix.enctype = "encoding"), /[\t\r\n\f]/g);
  3045. function H(e) {
  3046. return C.attr(e, "class") || ""
  3047. }
  3048. C.fn.extend({
  3049. addClass: function (t) {
  3050. var e, n, r, i, o, a, s = 0;
  3051. if (C.isFunction(t)) return this.each(function (e) {
  3052. C(this).addClass(t.call(this, e, H(this)))
  3053. });
  3054. if ("string" == typeof t && t) for (e = t.match(E) || []; n = this[s++];) if (a = H(n), r = 1 === n.nodeType && (" " + a + " ").replace(Rt, " ")) {
  3055. for (o = 0; i = e[o++];) r.indexOf(" " + i + " ") < 0 && (r += i + " ");
  3056. a !== (a = C.trim(r)) && C.attr(n, "class", a)
  3057. }
  3058. return this
  3059. }, removeClass: function (t) {
  3060. var e, n, r, i, o, a, s = 0;
  3061. if (C.isFunction(t)) return this.each(function (e) {
  3062. C(this).removeClass(t.call(this, e, H(this)))
  3063. });
  3064. if (!arguments.length) return this.attr("class", "");
  3065. if ("string" == typeof t && t) for (e = t.match(E) || []; n = this[s++];) if (a = H(n), r = 1 === n.nodeType && (" " + a + " ").replace(Rt, " ")) {
  3066. for (o = 0; i = e[o++];) for (; -1 < r.indexOf(" " + i + " ");) r = r.replace(" " + i + " ", " ");
  3067. a !== (a = C.trim(r)) && C.attr(n, "class", a)
  3068. }
  3069. return this
  3070. }, toggleClass: function (i, t) {
  3071. var o = typeof i;
  3072. return "boolean" == typeof t && "string" == o ? t ? this.addClass(i) : this.removeClass(i) : C.isFunction(i) ? this.each(function (e) {
  3073. C(this).toggleClass(i.call(this, e, H(this), t), t)
  3074. }) : this.each(function () {
  3075. var e, t, n, r;
  3076. if ("string" == o) for (t = 0, n = C(this), r = i.match(E) || []; e = r[t++];) n.hasClass(e) ? n.removeClass(e) : n.addClass(e); else i !== undefined && "boolean" != o || ((e = H(this)) && C._data(this, "__className__", e), C.attr(this, "class", !e && !1 !== i && C._data(this, "__className__") || ""))
  3077. })
  3078. }, hasClass: function (e) {
  3079. for (var t, n = 0, r = " " + e + " "; t = this[n++];) if (1 === t.nodeType && -1 < (" " + H(t) + " ").replace(Rt, " ").indexOf(r)) return !0;
  3080. return !1
  3081. }
  3082. }), C.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (e, n) {
  3083. C.fn[n] = function (e, t) {
  3084. return 0 < arguments.length ? this.on(n, null, e, t) : this.trigger(n)
  3085. }
  3086. }), C.fn.extend({
  3087. hover: function (e, t) {
  3088. return this.mouseenter(e).mouseleave(t || e)
  3089. }
  3090. });
  3091. var q = T.location, Pt = C.now(), Bt = /\?/,
  3092. Wt = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,
  3093. It = (C.parseJSON = function (e) {
  3094. if (T.JSON && T.JSON.parse) return T.JSON.parse(e + "");
  3095. var i, o = null, t = C.trim(e + "");
  3096. return t && !C.trim(t.replace(Wt, function (e, t, n, r) {
  3097. return 0 === (o = i && t ? 0 : o) ? e : (i = n || t, o += !r - !n, "")
  3098. })) ? Function("return " + t)() : C.error("Invalid JSON: " + e)
  3099. }, C.parseXML = function (e) {
  3100. var t;
  3101. if (!e || "string" != typeof e) return null;
  3102. try {
  3103. T.DOMParser ? t = (new T.DOMParser).parseFromString(e, "text/xml") : ((t = new T.ActiveXObject("Microsoft.XMLDOM"))["async"] = "false", t.loadXML(e))
  3104. } catch (n) {
  3105. t = undefined
  3106. }
  3107. return t && t.documentElement && !t.getElementsByTagName("parsererror").length || C.error("Invalid XML: " + e), t
  3108. }, /#.*$/), $t = /([?&])_=[^&]*/, zt = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm, Xt = /^(?:GET|HEAD)$/, Ut = /^\/\//,
  3109. Vt = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, Yt = {}, Jt = {}, Gt = "*/".concat("*"),
  3110. Kt = q.href, _ = Vt.exec(Kt.toLowerCase()) || [];
  3111. function Qt(o) {
  3112. return function (e, t) {
  3113. "string" != typeof e && (t = e, e = "*");
  3114. var n, r = 0, i = e.toLowerCase().match(E) || [];
  3115. if (C.isFunction(t)) for (; n = i[r++];) "+" === n.charAt(0) ? (n = n.slice(1) || "*", (o[n] = o[n] || []).unshift(t)) : (o[n] = o[n] || []).push(t)
  3116. }
  3117. }
  3118. function Zt(t, r, i, o) {
  3119. var a = {}, s = t === Jt;
  3120. function u(e) {
  3121. var n;
  3122. return a[e] = !0, C.each(t[e] || [], function (e, t) {
  3123. t = t(r, i, o);
  3124. return "string" != typeof t || s || a[t] ? s ? !(n = t) : void 0 : (r.dataTypes.unshift(t), u(t), !1)
  3125. }), n
  3126. }
  3127. return u(r.dataTypes[0]) || !a["*"] && u("*")
  3128. }
  3129. function en(e, t) {
  3130. var n, r, i = C.ajaxSettings.flatOptions || {};
  3131. for (r in t) t[r] !== undefined && ((i[r] ? e : n = n || {})[r] = t[r]);
  3132. return n && C.extend(!0, e, n), e
  3133. }
  3134. function tn(e, t, n, r) {
  3135. var i, o, a, s, u, l = {}, c = e.dataTypes.slice();
  3136. if (c[1]) for (a in e.converters) l[a.toLowerCase()] = e.converters[a];
  3137. for (o = c.shift(); o;) if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = c.shift()) if ("*" === o) o = u; else if ("*" !== u && u !== o) {
  3138. if (!(a = l[u + " " + o] || l["* " + o])) for (i in l) if ((s = i.split(" "))[1] === o && (a = l[u + " " + s[0]] || l["* " + s[0]])) {
  3139. !0 === a ? a = l[i] : !0 !== l[i] && (o = s[0], c.unshift(s[1]));
  3140. break
  3141. }
  3142. if (!0 !== a) if (a && e["throws"]) t = a(t); else try {
  3143. t = a(t)
  3144. } catch (f) {
  3145. return {state: "parsererror", error: a ? f : "No conversion from " + u + " to " + o}
  3146. }
  3147. }
  3148. return {state: "success", data: t}
  3149. }
  3150. function nn(e) {
  3151. if (!C.contains(e.ownerDocument || g, e)) return !0;
  3152. for (; e && 1 === e.nodeType;) {
  3153. if ("none" === ((t = e).style && t.style.display || C.css(t, "display")) || "hidden" === e.type) return !0;
  3154. e = e.parentNode
  3155. }
  3156. var t;
  3157. return !1
  3158. }
  3159. C.extend({
  3160. active: 0,
  3161. lastModified: {},
  3162. etag: {},
  3163. ajaxSettings: {
  3164. url: Kt,
  3165. type: "GET",
  3166. isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_[1]),
  3167. global: !0,
  3168. processData: !0,
  3169. "async": !0,
  3170. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  3171. accepts: {
  3172. "*": Gt,
  3173. text: "text/plain",
  3174. html: "text/html",
  3175. xml: "application/xml, text/xml",
  3176. json: "application/json, text/javascript"
  3177. },
  3178. contents: {xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/},
  3179. responseFields: {xml: "responseXML", text: "responseText", json: "responseJSON"},
  3180. converters: {"* text": String, "text html": !0, "text json": C.parseJSON, "text xml": C.parseXML},
  3181. flatOptions: {url: !0, context: !0}
  3182. },
  3183. ajaxSetup: function (e, t) {
  3184. return t ? en(en(e, C.ajaxSettings), t) : en(C.ajaxSettings, e)
  3185. },
  3186. ajaxPrefilter: Qt(Yt),
  3187. ajaxTransport: Qt(Jt),
  3188. ajax: function (e, t) {
  3189. "object" == typeof e && (t = e, e = undefined);
  3190. var n, u, l, c, f, d, r, p = C.ajaxSetup({}, t = t || {}), h = p.context || p,
  3191. g = p.context && (h.nodeType || h.jquery) ? C(h) : C.event, m = C.Deferred(),
  3192. y = C.Callbacks("once memory"), v = p.statusCode || {}, i = {}, o = {}, x = 0, a = "canceled", b = {
  3193. readyState: 0, getResponseHeader: function (e) {
  3194. var t;
  3195. if (2 === x) {
  3196. if (!r) for (r = {}; t = zt.exec(l);) r[t[1].toLowerCase()] = t[2];
  3197. t = r[e.toLowerCase()]
  3198. }
  3199. return null == t ? null : t
  3200. }, getAllResponseHeaders: function () {
  3201. return 2 === x ? l : null
  3202. }, setRequestHeader: function (e, t) {
  3203. var n = e.toLowerCase();
  3204. return x || (e = o[n] = o[n] || e, i[e] = t), this
  3205. }, overrideMimeType: function (e) {
  3206. return x || (p.mimeType = e), this
  3207. }, statusCode: function (e) {
  3208. if (e) if (x < 2) for (var t in e) v[t] = [v[t], e[t]]; else b.always(e[b.status]);
  3209. return this
  3210. }, abort: function (e) {
  3211. e = e || a;
  3212. return d && d.abort(e), s(0, e), this
  3213. }
  3214. };
  3215. if (m.promise(b).complete = y.add, b.success = b.done, b.error = b.fail, p.url = ((e || p.url || Kt) + "").replace(It, "").replace(Ut, _[1] + "//"), p.type = t.method || t.type || p.method || p.type, p.dataTypes = C.trim(p.dataType || "*").toLowerCase().match(E) || [""], null == p.crossDomain && (e = Vt.exec(p.url.toLowerCase()), p.crossDomain = !(!e || e[1] === _[1] && e[2] === _[2] && (e[3] || ("http:" === e[1] ? "80" : "443")) === (_[3] || ("http:" === _[1] ? "80" : "443")))), p.data && p.processData && "string" != typeof p.data && (p.data = C.param(p.data, p.traditional)), Zt(Yt, p, t, b), 2 === x) return b;
  3216. for (n in (f = C.event && p.global) && 0 == C.active++ && C.event.trigger("ajaxStart"), p.type = p.type.toUpperCase(), p.hasContent = !Xt.test(p.type), u = p.url, p.hasContent || (p.data && (u = p.url += (Bt.test(u) ? "&" : "?") + p.data, delete p.data), !1 === p.cache && (p.url = $t.test(u) ? u.replace($t, "$1_=" + Pt++) : u + (Bt.test(u) ? "&" : "?") + "_=" + Pt++)), p.ifModified && (C.lastModified[u] && b.setRequestHeader("If-Modified-Since", C.lastModified[u]), C.etag[u] && b.setRequestHeader("If-None-Match", C.etag[u])), (p.data && p.hasContent && !1 !== p.contentType || t.contentType) && b.setRequestHeader("Content-Type", p.contentType), b.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]] ? p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0] ? ", " + Gt + "; q=0.01" : "") : p.accepts["*"]), p.headers) b.setRequestHeader(n, p.headers[n]);
  3217. if (p.beforeSend && (!1 === p.beforeSend.call(h, b, p) || 2 === x)) return b.abort();
  3218. for (n in a = "abort", {success: 1, error: 1, complete: 1}) b[n](p[n]);
  3219. if (d = Zt(Jt, p, t, b)) {
  3220. if (b.readyState = 1, f && g.trigger("ajaxSend", [b, p]), 2 === x) return b;
  3221. p["async"] && 0 < p.timeout && (c = T.setTimeout(function () {
  3222. b.abort("timeout")
  3223. }, p.timeout));
  3224. try {
  3225. x = 1, d.send(i, s)
  3226. } catch (w) {
  3227. if (!(x < 2)) throw w;
  3228. s(-1, w)
  3229. }
  3230. } else s(-1, "No Transport");
  3231. function s(e, t, n, r) {
  3232. var i, o, a, s = t;
  3233. 2 !== x && (x = 2, c && T.clearTimeout(c), d = undefined, l = r || "", b.readyState = 0 < e ? 4 : 0, r = 200 <= e && e < 300 || 304 === e, n && (a = function (e, t, n) {
  3234. for (var r, i, o, a, s = e.contents, u = e.dataTypes; "*" === u[0];) u.shift(), i === undefined && (i = e.mimeType || t.getResponseHeader("Content-Type"));
  3235. if (i) for (a in s) if (s[a] && s[a].test(i)) {
  3236. u.unshift(a);
  3237. break
  3238. }
  3239. if (u[0] in n) o = u[0]; else {
  3240. for (a in n) {
  3241. if (!u[0] || e.converters[a + " " + u[0]]) {
  3242. o = a;
  3243. break
  3244. }
  3245. r = r || a
  3246. }
  3247. o = o || r
  3248. }
  3249. if (o) return o !== u[0] && u.unshift(o), n[o]
  3250. }(p, b, n)), a = tn(p, a, b, r), r ? (p.ifModified && ((n = b.getResponseHeader("Last-Modified")) && (C.lastModified[u] = n), (n = b.getResponseHeader("etag")) && (C.etag[u] = n)), 204 === e || "HEAD" === p.type ? s = "nocontent" : 304 === e ? s = "notmodified" : (s = a.state, i = a.data, r = !(o = a.error))) : (o = s, !e && s || (s = "error", e < 0 && (e = 0))), b.status = e, b.statusText = (t || s) + "", r ? m.resolveWith(h, [i, s, b]) : m.rejectWith(h, [b, s, o]), b.statusCode(v), v = undefined, f && g.trigger(r ? "ajaxSuccess" : "ajaxError", [b, p, r ? i : o]), y.fireWith(h, [b, s]), f && (g.trigger("ajaxComplete", [b, p]), --C.active || C.event.trigger("ajaxStop")))
  3251. }
  3252. return b
  3253. },
  3254. getJSON: function (e, t, n) {
  3255. return C.get(e, t, n, "json")
  3256. },
  3257. getScript: function (e, t) {
  3258. return C.get(e, undefined, t, "script")
  3259. }
  3260. }), C.each(["get", "post"], function (e, i) {
  3261. C[i] = function (e, t, n, r) {
  3262. return C.isFunction(t) && (r = r || n, n = t, t = undefined), C.ajax(C.extend({
  3263. url: e,
  3264. type: i,
  3265. dataType: r,
  3266. data: t,
  3267. success: n
  3268. }, C.isPlainObject(e) && e))
  3269. }
  3270. }), C._evalUrl = function (e) {
  3271. return C.ajax({url: e, type: "GET", dataType: "script", cache: !0, "async": !1, global: !1, "throws": !0})
  3272. }, C.fn.extend({
  3273. wrapAll: function (t) {
  3274. return C.isFunction(t) ? this.each(function (e) {
  3275. C(this).wrapAll(t.call(this, e))
  3276. }) : (this[0] && (e = C(t, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && e.insertBefore(this[0]), e.map(function () {
  3277. for (var e = this; e.firstChild && 1 === e.firstChild.nodeType;) e = e.firstChild;
  3278. return e
  3279. }).append(this)), this);
  3280. var e
  3281. }, wrapInner: function (n) {
  3282. return C.isFunction(n) ? this.each(function (e) {
  3283. C(this).wrapInner(n.call(this, e))
  3284. }) : this.each(function () {
  3285. var e = C(this), t = e.contents();
  3286. t.length ? t.wrapAll(n) : e.append(n)
  3287. })
  3288. }, wrap: function (t) {
  3289. var n = C.isFunction(t);
  3290. return this.each(function (e) {
  3291. C(this).wrapAll(n ? t.call(this, e) : t)
  3292. })
  3293. }, unwrap: function () {
  3294. return this.parent().each(function () {
  3295. C.nodeName(this, "body") || C(this).replaceWith(this.childNodes)
  3296. }).end()
  3297. }
  3298. }), C.expr.filters.hidden = function (e) {
  3299. return y.reliableHiddenOffsets() ? e.offsetWidth <= 0 && e.offsetHeight <= 0 && !e.getClientRects().length : nn(e)
  3300. }, C.expr.filters.visible = function (e) {
  3301. return !C.expr.filters.hidden(e)
  3302. };
  3303. var rn = /%20/g, on = /\[\]$/, an = /\r?\n/g, sn = /^(?:submit|button|image|reset|file)$/i,
  3304. un = /^(?:input|select|textarea|keygen)/i;
  3305. C.param = function (e, t) {
  3306. var n, r = [], i = function (e, t) {
  3307. t = C.isFunction(t) ? t() : null == t ? "" : t, r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t)
  3308. };
  3309. if (t === undefined && (t = C.ajaxSettings && C.ajaxSettings.traditional), C.isArray(e) || e.jquery && !C.isPlainObject(e)) C.each(e, function () {
  3310. i(this.name, this.value)
  3311. }); else for (n in e) !function o(n, e, r, i) {
  3312. if (C.isArray(e)) C.each(e, function (e, t) {
  3313. r || on.test(n) ? i(n, t) : o(n + "[" + ("object" == typeof t && null != t ? e : "") + "]", t, r, i)
  3314. }); else if (r || "object" !== C.type(e)) i(n, e); else for (var t in e) o(n + "[" + t + "]", e[t], r, i)
  3315. }(n, e[n], t, i);
  3316. return r.join("&").replace(rn, "+")
  3317. }, C.fn.extend({
  3318. serialize: function () {
  3319. return C.param(this.serializeArray())
  3320. }, serializeArray: function () {
  3321. return this.map(function () {
  3322. var e = C.prop(this, "elements");
  3323. return e ? C.makeArray(e) : this
  3324. }).filter(function () {
  3325. var e = this.type;
  3326. return this.name && !C(this).is(":disabled") && un.test(this.nodeName) && !sn.test(e) && (this.checked || !ge.test(e))
  3327. }).map(function (e, t) {
  3328. var n = C(this).val();
  3329. return null == n ? null : C.isArray(n) ? C.map(n, function (e) {
  3330. return {name: t.name, value: e.replace(an, "\r\n")}
  3331. }) : {name: t.name, value: n.replace(an, "\r\n")}
  3332. }).get()
  3333. }
  3334. }), C.ajaxSettings.xhr = T.ActiveXObject !== undefined ? function () {
  3335. return this.isLocal ? dn() : 8 < g.documentMode ? fn() : /^(get|post|head|put|delete|options)$/i.test(this.type) && fn() || dn()
  3336. } : fn;
  3337. var ln = 0, cn = {}, F = C.ajaxSettings.xhr();
  3338. function fn() {
  3339. try {
  3340. return new T.XMLHttpRequest
  3341. } catch (e) {
  3342. }
  3343. }
  3344. function dn() {
  3345. try {
  3346. return new T.ActiveXObject("Microsoft.XMLHTTP")
  3347. } catch (e) {
  3348. }
  3349. }
  3350. T.attachEvent && T.attachEvent("onunload", function () {
  3351. for (var e in cn) cn[e](undefined, !0)
  3352. }), y.cors = !!F && "withCredentials" in F, (F = y.ajax = !!F) && C.ajaxTransport(function (l) {
  3353. var c;
  3354. if (!l.crossDomain || y.cors) return {
  3355. send: function (e, a) {
  3356. var t, s = l.xhr(), u = ++ln;
  3357. if (s.open(l.type, l.url, l["async"], l.username, l.password), l.xhrFields) for (t in l.xhrFields) s[t] = l.xhrFields[t];
  3358. for (t in l.mimeType && s.overrideMimeType && s.overrideMimeType(l.mimeType), l.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest"), e) e[t] !== undefined && s.setRequestHeader(t, e[t] + "");
  3359. s.send(l.hasContent && l.data || null), c = function (e, t) {
  3360. var n, r, i;
  3361. if (c && (t || 4 === s.readyState)) if (delete cn[u], c = undefined, s.onreadystatechange = C.noop, t) 4 !== s.readyState && s.abort(); else {
  3362. i = {}, n = s.status, "string" == typeof s.responseText && (i.text = s.responseText);
  3363. try {
  3364. r = s.statusText
  3365. } catch (o) {
  3366. r = ""
  3367. }
  3368. n || !l.isLocal || l.crossDomain ? 1223 === n && (n = 204) : n = i.text ? 200 : 404
  3369. }
  3370. i && a(n, r, i, s.getAllResponseHeaders())
  3371. }, l["async"] ? 4 === s.readyState ? T.setTimeout(c) : s.onreadystatechange = cn[u] = c : c()
  3372. }, abort: function () {
  3373. c && c(undefined, !0)
  3374. }
  3375. }
  3376. }), C.ajaxSetup({
  3377. accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
  3378. contents: {script: /\b(?:java|ecma)script\b/},
  3379. converters: {
  3380. "text script": function (e) {
  3381. return C.globalEval(e), e
  3382. }
  3383. }
  3384. }), C.ajaxPrefilter("script", function (e) {
  3385. e.cache === undefined && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1)
  3386. }), C.ajaxTransport("script", function (t) {
  3387. var r, i;
  3388. if (t.crossDomain) return i = g.head || C("head")[0] || g.documentElement, {
  3389. send: function (e, n) {
  3390. (r = g.createElement("script"))["async"] = !0, t.scriptCharset && (r.charset = t.scriptCharset), r.src = t.url, r.onload = r.onreadystatechange = function (e, t) {
  3391. !t && r.readyState && !/loaded|complete/.test(r.readyState) || (r.onload = r.onreadystatechange = null, r.parentNode && r.parentNode.removeChild(r), r = null, t || n(200, "success"))
  3392. }, i.insertBefore(r, i.firstChild)
  3393. }, abort: function () {
  3394. r && r.onload(undefined, !0)
  3395. }
  3396. }
  3397. });
  3398. var pn = [], hn = /(=)\?(?=&|$)|\?\?/, gn = (C.ajaxSetup({
  3399. jsonp: "callback", jsonpCallback: function () {
  3400. var e = pn.pop() || C.expando + "_" + Pt++;
  3401. return this[e] = !0, e
  3402. }
  3403. }), C.ajaxPrefilter("json jsonp", function (e, t, n) {
  3404. var r, i, o,
  3405. a = !1 !== e.jsonp && (hn.test(e.url) ? "url" : "string" == typeof e.data && 0 === (e.contentType || "").indexOf("application/x-www-form-urlencoded") && hn.test(e.data) && "data");
  3406. if (a || "jsonp" === e.dataTypes[0]) return r = e.jsonpCallback = C.isFunction(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, a ? e[a] = e[a].replace(hn, "$1" + r) : !1 !== e.jsonp && (e.url += (Bt.test(e.url) ? "&" : "?") + e.jsonp + "=" + r), e.converters["script json"] = function () {
  3407. return o || C.error(r + " was not called"), o[0]
  3408. }, e.dataTypes[0] = "json", i = T[r], T[r] = function () {
  3409. o = arguments
  3410. }, n.always(function () {
  3411. i === undefined ? C(T).removeProp(r) : T[r] = i, e[r] && (e.jsonpCallback = t.jsonpCallback, pn.push(r)), o && C.isFunction(i) && i(o[0]), o = i = undefined
  3412. }), "script"
  3413. }), C.parseHTML = function (e, t, n) {
  3414. if (!e || "string" != typeof e) return null;
  3415. "boolean" == typeof t && (n = t, t = !1), t = t || g;
  3416. var r = J.exec(e), n = !n && [];
  3417. return r ? [t.createElement(r[1])] : (r = Ne([e], t, n), n && n.length && C(n).remove(), C.merge([], r.childNodes))
  3418. }, C.fn.load);
  3419. function mn(e) {
  3420. return C.isWindow(e) ? e : 9 === e.nodeType && (e.defaultView || e.parentWindow)
  3421. }
  3422. return C.fn.load = function (e, t, n) {
  3423. if ("string" != typeof e && gn) return gn.apply(this, arguments);
  3424. var r, i, o, a = this, s = e.indexOf(" ");
  3425. return -1 < s && (r = C.trim(e.slice(s, e.length)), e = e.slice(0, s)), C.isFunction(t) ? (n = t, t = undefined) : t && "object" == typeof t && (i = "POST"), 0 < a.length && C.ajax({
  3426. url: e,
  3427. type: i || "GET",
  3428. dataType: "html",
  3429. data: t
  3430. }).done(function (e) {
  3431. o = arguments, a.html(r ? C("<div>").append(C.parseHTML(e)).find(r) : e)
  3432. }).always(n && function (e, t) {
  3433. a.each(function () {
  3434. n.apply(this, o || [e.responseText, t, e])
  3435. })
  3436. }), this
  3437. }, C.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) {
  3438. C.fn[t] = function (e) {
  3439. return this.on(t, e)
  3440. }
  3441. }), C.expr.filters.animated = function (t) {
  3442. return C.grep(C.timers, function (e) {
  3443. return t === e.elem
  3444. }).length
  3445. }, C.offset = {
  3446. setOffset: function (e, t, n) {
  3447. var r, i, o, a, s = C.css(e, "position"), u = C(e), l = {};
  3448. "static" === s && (e.style.position = "relative"), o = u.offset(), r = C.css(e, "top"), a = C.css(e, "left"), s = ("absolute" === s || "fixed" === s) && -1 < C.inArray("auto", [r, a]) ? (i = (s = u.position()).top, s.left) : (i = parseFloat(r) || 0, parseFloat(a) || 0), null != (t = C.isFunction(t) ? t.call(e, n, C.extend({}, o)) : t).top && (l.top = t.top - o.top + i), null != t.left && (l.left = t.left - o.left + s), "using" in t ? t.using.call(e, l) : u.css(l)
  3449. }
  3450. }, C.fn.extend({
  3451. offset: function (t) {
  3452. if (arguments.length) return t === undefined ? this : this.each(function (e) {
  3453. C.offset.setOffset(this, t, e)
  3454. });
  3455. var e, n = {top: 0, left: 0}, r = this[0], i = r && r.ownerDocument;
  3456. return i ? (e = i.documentElement, C.contains(e, r) ? ("undefined" != typeof r.getBoundingClientRect && (n = r.getBoundingClientRect()), r = mn(i), {
  3457. top: n.top + (r.pageYOffset || e.scrollTop) - (e.clientTop || 0),
  3458. left: n.left + (r.pageXOffset || e.scrollLeft) - (e.clientLeft || 0)
  3459. }) : n) : void 0
  3460. }, position: function () {
  3461. var e, t, n, r;
  3462. if (this[0]) return n = {
  3463. top: 0,
  3464. left: 0
  3465. }, r = this[0], "fixed" === C.css(r, "position") ? t = r.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), (n = C.nodeName(e[0], "html") ? n : e.offset()).top += C.css(e[0], "borderTopWidth", !0), n.left += C.css(e[0], "borderLeftWidth", !0)), {
  3466. top: t.top - n.top - C.css(r, "marginTop", !0),
  3467. left: t.left - n.left - C.css(r, "marginLeft", !0)
  3468. }
  3469. }, offsetParent: function () {
  3470. return this.map(function () {
  3471. for (var e = this.offsetParent; e && !C.nodeName(e, "html") && "static" === C.css(e, "position");) e = e.offsetParent;
  3472. return e || lt
  3473. })
  3474. }
  3475. }), C.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (t, i) {
  3476. var o = /Y/.test(i);
  3477. C.fn[t] = function (e) {
  3478. return d(this, function (e, t, n) {
  3479. var r = mn(e);
  3480. if (n === undefined) return r ? i in r ? r[i] : r.document.documentElement[t] : e[t];
  3481. r ? r.scrollTo(o ? C(r).scrollLeft() : n, o ? n : C(r).scrollTop()) : e[t] = n
  3482. }, t, e, arguments.length, null)
  3483. }
  3484. }), C.each(["top", "left"], function (e, n) {
  3485. C.cssHooks[n] = ft(y.pixelPosition, function (e, t) {
  3486. if (t) return t = p(e, n), st.test(t) ? C(e).position()[n] + "px" : t
  3487. })
  3488. }), C.each({Height: "height", Width: "width"}, function (o, a) {
  3489. C.each({padding: "inner" + o, content: a, "": "outer" + o}, function (r, e) {
  3490. C.fn[e] = function (e, t) {
  3491. var n = arguments.length && (r || "boolean" != typeof e),
  3492. i = r || (!0 === e || !0 === t ? "margin" : "border");
  3493. return d(this, function (e, t, n) {
  3494. var r;
  3495. return C.isWindow(e) ? e.document.documentElement["client" + o] : 9 === e.nodeType ? (r = e.documentElement, Math.max(e.body["scroll" + o], r["scroll" + o], e.body["offset" + o], r["offset" + o], r["client" + o])) : n === undefined ? C.css(e, t, i) : C.style(e, t, n, i)
  3496. }, a, n ? e : undefined, n, null)
  3497. }
  3498. })
  3499. }), C.fn.extend({
  3500. bind: function (e, t, n) {
  3501. return this.on(e, null, t, n)
  3502. }, unbind: function (e, t) {
  3503. return this.off(e, null, t)
  3504. }, delegate: function (e, t, n, r) {
  3505. return this.on(t, e, n, r)
  3506. }, undelegate: function (e, t, n) {
  3507. return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n)
  3508. }
  3509. }), C.fn.size = function () {
  3510. return this.length
  3511. }, C.fn.andSelf = C.fn.addBack, layui.define(function (e) {
  3512. e("jquery", layui.$ = C)
  3513. }), C
  3514. });
  3515. !function (p) {
  3516. "use strict";
  3517. var m, d, e, n = p.layui && layui.define, u = {
  3518. getPath: (e = document.currentScript ? document.currentScript.src : function () {
  3519. for (var e, t = document.scripts, i = t.length - 1, n = i; 0 < n; n--) if ("interactive" === t[n].readyState) {
  3520. e = t[n].src;
  3521. break
  3522. }
  3523. return e || t[i].src
  3524. }(), (p.LAYUI_GLOBAL || {}).layer_dir || e.substring(0, e.lastIndexOf("/") + 1)),
  3525. config: {removeFocus: !0},
  3526. end: {},
  3527. events: {resize: {}},
  3528. minStackIndex: 0,
  3529. minStackArr: [],
  3530. btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
  3531. type: ["dialog", "page", "iframe", "loading", "tips"],
  3532. getStyle: function (e, t) {
  3533. e = e.currentStyle || p.getComputedStyle(e, null);
  3534. return e[e.getPropertyValue ? "getPropertyValue" : "getAttribute"](t)
  3535. },
  3536. link: function (e, i, t) {
  3537. var n, a, o, s, l, r;
  3538. h.path && (n = document.getElementsByTagName("head")[0], a = document.createElement("link"), o = ((t = "string" == typeof i ? i : t) || e).replace(/\.|\//g, ""), s = "layuicss-" + o, l = "creating", r = 0, a.rel = "stylesheet", a.href = h.path + e, a.id = s, document.getElementById(s) || n.appendChild(a), "function" == typeof i && function c(e) {
  3539. var t = document.getElementById(s);
  3540. return 100 < ++r ? p.console && console.error(o + ".css: Invalid") : void (1989 === parseInt(u.getStyle(t, "width")) ? (e === l && t.removeAttribute("lay-status"), t.getAttribute("lay-status") === l ? setTimeout(c, 100) : i()) : (t.setAttribute("lay-status", l), setTimeout(function () {
  3541. c(l)
  3542. }, 100)))
  3543. }())
  3544. }
  3545. }, h = {
  3546. v: "3.7.0",
  3547. ie: (e = navigator.userAgent.toLowerCase(), !!(p.ActiveXObject || "ActiveXObject" in p) && ((e.match(/msie\s(\d+)/) || [])[1] || "11")),
  3548. index: p.layer && p.layer.v ? 1e5 : 0,
  3549. path: u.getPath,
  3550. config: function (e, t) {
  3551. return h.cache = u.config = m.extend({}, u.config, e = e || {}), h.path = u.config.path || h.path, "string" == typeof e.extend && (e.extend = [e.extend]), u.config.path && h.ready(), e.extend && (n ? layui.addcss("modules/layer/" + e.extend) : u.link("css/" + e.extend)), this
  3552. },
  3553. ready: function (e) {
  3554. var t = "layer", i = (n ? "modules/" : "css/") + "layer.css?v=" + h.v;
  3555. return n ? layui["layui.all"] ? "function" == typeof e && e() : layui.addcss(i, e, t) : u.link(i, e, t), this
  3556. },
  3557. alert: function (e, t, i) {
  3558. var n = "function" == typeof t;
  3559. return h.open(m.extend({content: e, yes: i = n ? t : i}, n ? {} : t))
  3560. },
  3561. confirm: function (e, t, i, n) {
  3562. var a = "function" == typeof t;
  3563. return a && (n = i, i = t), h.open(m.extend({content: e, btn: u.btn, yes: i, btn2: n}, a ? {} : t))
  3564. },
  3565. msg: function (e, t, i) {
  3566. var n = "function" == typeof t, a = u.config.skin, a = (a ? a + " " + a + "-msg" : "") || "layui-layer-msg",
  3567. o = y.anim.length - 1;
  3568. return n && (i = t), h.open(m.extend({
  3569. content: e,
  3570. time: 3e3,
  3571. shade: !1,
  3572. skin: a,
  3573. title: !1,
  3574. closeBtn: !1,
  3575. btn: !1,
  3576. resize: !1,
  3577. end: i,
  3578. removeFocus: !1
  3579. }, n && !u.config.skin ? {
  3580. skin: a + " layui-layer-hui",
  3581. anim: o
  3582. } : (-1 !== (t = t || {}).icon && (void 0 !== t.icon || u.config.skin) || (t.skin = a + " " + (t.skin || "layui-layer-hui")), t)))
  3583. },
  3584. load: function (e, t) {
  3585. return h.open(m.extend({type: 3, icon: e || 0, resize: !1, shade: .01, removeFocus: !1}, t))
  3586. },
  3587. tips: function (e, t, i) {
  3588. return h.open(m.extend({
  3589. type: 4,
  3590. content: [e, t],
  3591. closeBtn: !1,
  3592. time: 3e3,
  3593. shade: !1,
  3594. resize: !1,
  3595. fixed: !1,
  3596. maxWidth: 260,
  3597. removeFocus: !1
  3598. }, i))
  3599. }
  3600. }, t = function (e) {
  3601. var t = this, i = function () {
  3602. t.creat()
  3603. };
  3604. t.index = ++h.index, t.config.maxWidth = m(d).width() - 30, t.config = m.extend({}, t.config, u.config, e), document.body ? i() : setTimeout(function () {
  3605. i()
  3606. }, 30)
  3607. },
  3608. y = (t.pt = t.prototype, ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"]),
  3609. i = (y.anim = {
  3610. 0: "layer-anim-00",
  3611. 1: "layer-anim-01",
  3612. 2: "layer-anim-02",
  3613. 3: "layer-anim-03",
  3614. 4: "layer-anim-04",
  3615. 5: "layer-anim-05",
  3616. 6: "layer-anim-06",
  3617. slideDown: "layer-anim-slide-down",
  3618. slideLeft: "layer-anim-slide-left",
  3619. slideUp: "layer-anim-slide-up",
  3620. slideRight: "layer-anim-slide-right"
  3621. }, y.SHADE = "layui-layer-shade", y.MOVE = "layui-layer-move", t.pt.config = {
  3622. type: 0,
  3623. shade: .3,
  3624. fixed: !0,
  3625. move: y[1],
  3626. title: "&#x4FE1;&#x606F;",
  3627. offset: "auto",
  3628. area: "auto",
  3629. closeBtn: 1,
  3630. icon: -1,
  3631. time: 0,
  3632. zIndex: 19891014,
  3633. maxWidth: 360,
  3634. anim: 0,
  3635. isOutAnim: !0,
  3636. minStack: !0,
  3637. moveType: 1,
  3638. resize: !0,
  3639. scrollbar: !0,
  3640. tips: 2
  3641. }, t.pt.vessel = function (e, t) {
  3642. var i, n = this.index, a = this.config, o = a.zIndex + n, s = "object" == typeof a.title,
  3643. l = a.maxmin && (1 === a.type || 2 === a.type),
  3644. s = a.title ? '<div class="layui-layer-title" style="' + (s ? a.title[1] : "") + '">' + (s ? a.title[0] : a.title) + "</div>" : "";
  3645. return a.zIndex = o, t([a.shade ? '<div class="' + y.SHADE + '" id="' + y.SHADE + n + '" times="' + n + '" style="z-index:' + (o - 1) + '; "></div>' : "", '<div class="' + y[0] + " layui-layer-" + u.type[a.type] + (0 != a.type && 2 != a.type || a.shade ? "" : " layui-layer-border") + " " + (a.skin || "") + '" id="' + y[0] + n + '" type="' + u.type[a.type] + '" times="' + n + '" showtime="' + a.time + '" conType="' + (e ? "object" : "string") + '" style="z-index: ' + o + "; width:" + a.area[0] + ";height:" + a.area[1] + ";position:" + (a.fixed ? "fixed;" : "absolute;") + '">' + (e && 2 != a.type ? "" : s) + "<div" + (a.id ? ' id="' + a.id + '"' : "") + ' class="layui-layer-content' + (0 == a.type && -1 !== a.icon ? " layui-layer-padding" : "") + (3 == a.type ? " layui-layer-loading" + a.icon : "") + '">' + (n = ["layui-icon-tips", "layui-icon-success", "layui-icon-error", "layui-icon-question", "layui-icon-lock", "layui-icon-face-cry", "layui-icon-face-smile"], o = "layui-anim layui-anim-rotate layui-anim-loop", 0 == a.type && -1 !== a.icon ? '<i class="layui-layer-face layui-icon ' + ((i = 16 == a.icon ? "layui-icon layui-icon-loading " + o : i) || n[a.icon] || n[0]) + '"></i>' : 3 == a.type ? (i = ["layui-icon-loading", "layui-icon-loading-1"], 2 == a.icon ? '<div class="layui-layer-loading-2 ' + o + '"></div>' : '<i class="layui-layer-loading-icon layui-icon ' + (i[a.icon] || i[0]) + " " + o + '"></i>') : "") + ((1 != a.type || !e) && a.content || "") + '</div><div class="layui-layer-setwin">' + (n = [], l && (n.push('<span class="layui-layer-min"></span>'), n.push('<span class="layui-layer-max"></span>')), a.closeBtn && n.push('<span class="layui-icon layui-icon-close ' + [y[7], y[7] + (a.title ? a.closeBtn : 4 == a.type ? "1" : "2")].join(" ") + '"></span>'), n.join("")) + "</div>" + (a.btn ? function () {
  3646. var e = "";
  3647. "string" == typeof a.btn && (a.btn = [a.btn]);
  3648. for (var t, i = 0, n = a.btn.length; i < n; i++) e += '<a class="' + y[6] + i + '">' + a.btn[i] + "</a>";
  3649. return '<div class="' + (t = [y[6]], a.btnAlign && t.push(y[6] + "-" + a.btnAlign), t.join(" ")) + '">' + e + "</div>"
  3650. }() : "") + (a.resize ? '<span class="layui-layer-resize"></span>' : "") + "</div>"], s, m('<div class="' + y.MOVE + '" id="' + y.MOVE + '"></div>')), this
  3651. }, t.pt.creat = function () {
  3652. var e, t, i, n, a, o = this, s = o.config, l = o.index, r = "object" == typeof (f = s.content),
  3653. c = m("body");
  3654. if (s.id && m("." + y[0]).find("#" + s.id)[0]) return e = m("#" + s.id).closest("." + y[0]), t = e.attr("times"), i = e.data("config"), n = m("#" + y.SHADE + t), void ("min" === (e.data("maxminStatus") || {}) ? h.restore(t) : i.hideOnClose && (n.show(), e.show()));
  3655. switch (s.removeFocus && document.activeElement.blur(), "string" == typeof s.area && (s.area = "auto" === s.area ? ["", ""] : [s.area, ""]), s.shift && (s.anim = s.shift), 6 == h.ie && (s.fixed = !1), s.type) {
  3656. case 0:
  3657. s.btn = "btn" in s ? s.btn : u.btn[0], h.closeAll("dialog");
  3658. break;
  3659. case 2:
  3660. var f = s.content = r ? s.content : [s.content || "", "auto"];
  3661. s.content = '<iframe scrolling="' + (s.content[1] || "auto") + '" allowtransparency="true" id="' + y[4] + l + '" name="' + y[4] + l + '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + s.content[0] + '"></iframe>';
  3662. break;
  3663. case 3:
  3664. delete s.title, delete s.closeBtn, -1 === s.icon && s.icon, h.closeAll("loading");
  3665. break;
  3666. case 4:
  3667. r || (s.content = [s.content, "body"]), s.follow = s.content[1], s.content = s.content[0] + '<i class="layui-layer-TipsG"></i>', delete s.title, s.tips = "object" == typeof s.tips ? s.tips : [s.tips, !0], s.tipsMore || h.closeAll("tips")
  3668. }
  3669. o.vessel(r, function (e, t, i) {
  3670. c.append(e[0]), r ? 2 == s.type || 4 == s.type ? m("body").append(e[1]) : f.parents("." + y[0])[0] || (f.data("display", f.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]), m("#" + y[0] + l).find("." + y[5]).before(t)) : c.append(e[1]), m("#" + y.MOVE)[0] || c.append(u.moveElem = i), o.layero = m("#" + y[0] + l), o.shadeo = m("#" + y.SHADE + l), s.scrollbar || u.setScrollbar(l)
  3671. }).auto(l), o.shadeo.css({
  3672. "background-color": s.shade[1] || "#000",
  3673. opacity: s.shade[0] || s.shade
  3674. }), 2 == s.type && 6 == h.ie && o.layero.find("iframe").attr("src", f[0]), 4 == s.type ? o.tips() : (o.offset(), parseInt(u.getStyle(document.getElementById(y.MOVE), "z-index")) || (o.layero.css("visibility", "hidden"), h.ready(function () {
  3675. o.offset(), o.layero.css("visibility", "visible")
  3676. }))), s.fixed && !u.events.resize[o.index] && (u.events.resize[o.index] = function () {
  3677. o.resize()
  3678. }, d.on("resize", u.events.resize[o.index])), s.time <= 0 || setTimeout(function () {
  3679. h.close(o.index)
  3680. }, s.time), o.move().callback(), y.anim[s.anim] && (a = "layer-anim " + y.anim[s.anim], o.layero.addClass(a).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function () {
  3681. m(this).removeClass(a)
  3682. })), o.layero.data("config", s)
  3683. }, t.pt.resize = function () {
  3684. var e = this, t = e.config;
  3685. e.offset(), (/^\d+%$/.test(t.area[0]) || /^\d+%$/.test(t.area[1])) && e.auto(e.index), 4 == t.type && e.tips()
  3686. }, t.pt.auto = function (e) {
  3687. var t = this.config, i = m("#" + y[0] + e),
  3688. n = ("" === t.area[0] && 0 < t.maxWidth && (h.ie && h.ie < 8 && t.btn && i.width(i.innerWidth()), i.outerWidth() > t.maxWidth && i.width(t.maxWidth)), [i.innerWidth(), i.innerHeight()]),
  3689. a = i.find(y[1]).outerHeight() || 0, o = i.find("." + y[6]).outerHeight() || 0, e = function (e) {
  3690. (e = i.find(e)).height(n[1] - a - o - 2 * (0 | parseFloat(e.css("padding-top"))))
  3691. };
  3692. return 2 === t.type ? e("iframe") : "" === t.area[1] ? 0 < t.maxHeight && i.outerHeight() > t.maxHeight ? (n[1] = t.maxHeight, e("." + y[5])) : t.fixed && n[1] >= d.height() && (n[1] = d.height(), e("." + y[5])) : e("." + y[5]), this
  3693. }, t.pt.offset = function () {
  3694. var e = this, t = e.config, i = e.layero, n = [i.outerWidth(), i.outerHeight()],
  3695. a = "object" == typeof t.offset;
  3696. e.offsetTop = (d.height() - n[1]) / 2, e.offsetLeft = (d.width() - n[0]) / 2, a ? (e.offsetTop = t.offset[0], e.offsetLeft = t.offset[1] || e.offsetLeft) : "auto" !== t.offset && ("t" === t.offset ? e.offsetTop = 0 : "r" === t.offset ? e.offsetLeft = d.width() - n[0] : "b" === t.offset ? e.offsetTop = d.height() - n[1] : "l" === t.offset ? e.offsetLeft = 0 : "lt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = 0) : "lb" === t.offset ? (e.offsetTop = d.height() - n[1], e.offsetLeft = 0) : "rt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = d.width() - n[0]) : "rb" === t.offset ? (e.offsetTop = d.height() - n[1], e.offsetLeft = d.width() - n[0]) : e.offsetTop = t.offset), t.fixed || (e.offsetTop = /%$/.test(e.offsetTop) ? d.height() * parseFloat(e.offsetTop) / 100 : parseFloat(e.offsetTop), e.offsetLeft = /%$/.test(e.offsetLeft) ? d.width() * parseFloat(e.offsetLeft) / 100 : parseFloat(e.offsetLeft), e.offsetTop += d.scrollTop(), e.offsetLeft += d.scrollLeft()), "min" === i.data("maxminStatus") && (e.offsetTop = d.height() - (i.find(y[1]).outerHeight() || 0), e.offsetLeft = i.css("left")), i.css({
  3697. top: e.offsetTop,
  3698. left: e.offsetLeft
  3699. })
  3700. }, t.pt.tips = function () {
  3701. var e = this.config, t = this.layero, i = [t.outerWidth(), t.outerHeight()], n = m(e.follow), a = {
  3702. width: (n = n[0] ? n : m("body")).outerWidth(),
  3703. height: n.outerHeight(),
  3704. top: n.offset().top,
  3705. left: n.offset().left
  3706. }, o = t.find(".layui-layer-TipsG"), n = e.tips[0];
  3707. e.tips[1] || o.remove(), a.autoLeft = function () {
  3708. 0 < a.left + i[0] - d.width() ? (a.tipLeft = a.left + a.width - i[0], o.css({
  3709. right: 12,
  3710. left: "auto"
  3711. })) : a.tipLeft = a.left
  3712. }, a.where = [function () {
  3713. a.autoLeft(), a.tipTop = a.top - i[1] - 10, o.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", e.tips[1])
  3714. }, function () {
  3715. a.tipLeft = a.left + a.width + 10, a.tipTop = a.top, o.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", e.tips[1])
  3716. }, function () {
  3717. a.autoLeft(), a.tipTop = a.top + a.height + 10, o.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", e.tips[1])
  3718. }, function () {
  3719. a.tipLeft = a.left - i[0] - 10, a.tipTop = a.top, o.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", e.tips[1])
  3720. }], a.where[n - 1](), 1 === n ? a.top - (d.scrollTop() + i[1] + 16) < 0 && a.where[2]() : 2 === n ? 0 < d.width() - (a.left + a.width + i[0] + 16) || a.where[3]() : 3 === n ? 0 < a.top - d.scrollTop() + a.height + i[1] + 16 - d.height() && a.where[0]() : 4 === n && 0 < i[0] + 16 - a.left && a.where[1](), t.find("." + y[5]).css({
  3721. "background-color": e.tips[1],
  3722. "padding-right": e.closeBtn ? "30px" : ""
  3723. }), t.css({left: a.tipLeft - (e.fixed ? d.scrollLeft() : 0), top: a.tipTop - (e.fixed ? d.scrollTop() : 0)})
  3724. }, t.pt.move = function () {
  3725. var n = this, a = n.config, e = m(document), o = n.layero, r = ["LAY_MOVE_DICT", "LAY_RESIZE_DICT"],
  3726. t = o.find(a.move), i = o.find(".layui-layer-resize");
  3727. return a.move && t.css("cursor", "move"), t.on("mousedown", function (e) {
  3728. var t, i;
  3729. e.button || (t = m(this), i = {}, a.move && (i.layero = o, i.config = a, i.offset = [e.clientX - parseFloat(o.css("left")), e.clientY - parseFloat(o.css("top"))], t.data(r[0], i), u.eventMoveElem = t, u.moveElem.css("cursor", "move").show()), e.preventDefault())
  3730. }), i.on("mousedown", function (e) {
  3731. var t = m(this), i = {};
  3732. a.resize && (i.layero = o, i.config = a, i.offset = [e.clientX, e.clientY], i.index = n.index, i.area = [o.outerWidth(), o.outerHeight()], t.data(r[1], i), u.eventResizeElem = t, u.moveElem.css("cursor", "se-resize").show()), e.preventDefault()
  3733. }), u.docEvent || (e.on("mousemove", function (e) {
  3734. var t, i, n, a, o, s, l;
  3735. u.eventMoveElem && (t = (a = u.eventMoveElem.data(r[0]) || {}).layero, o = a.config, s = e.clientX - a.offset[0], l = e.clientY - a.offset[1], i = "fixed" === t.css("position"), e.preventDefault(), a.stX = i ? 0 : d.scrollLeft(), a.stY = i ? 0 : d.scrollTop(), o.moveOut || (i = d.width() - t.outerWidth() + a.stX, n = d.height() - t.outerHeight() + a.stY, i < (s = s < a.stX ? a.stX : s) && (s = i), n < (l = l < a.stY ? a.stY : l) && (l = n)), t.css({
  3736. left: s,
  3737. top: l
  3738. })), u.eventResizeElem && (o = (a = u.eventResizeElem.data(r[1]) || {}).config, s = e.clientX - a.offset[0], l = e.clientY - a.offset[1], e.preventDefault(), h.style(a.index, {
  3739. width: a.area[0] + s,
  3740. height: a.area[1] + l
  3741. }), o.resizing && o.resizing(a.layero))
  3742. }).on("mouseup", function (e) {
  3743. var t, i;
  3744. u.eventMoveElem && (i = (t = u.eventMoveElem.data(r[0]) || {}).config, u.eventMoveElem.removeData(r[0]), delete u.eventMoveElem, u.moveElem.hide(), i.moveEnd && i.moveEnd(t.layero)), u.eventResizeElem && (u.eventResizeElem.removeData(r[1]), delete u.eventResizeElem, u.moveElem.hide())
  3745. }), u.docEvent = !0), n
  3746. }, t.pt.callback = function () {
  3747. var t = this, i = t.layero, n = t.config;
  3748. t.openLayer(), n.success && (2 == n.type ? i.find("iframe").on("load", function () {
  3749. n.success(i, t.index, t)
  3750. }) : n.success(i, t.index, t)), 6 == h.ie && t.IE6(i), i.find("." + y[6]).children("a").on("click", function () {
  3751. var e = m(this).index();
  3752. 0 === e ? n.yes ? n.yes(t.index, i, t) : n.btn1 ? n.btn1(t.index, i, t) : h.close(t.index) : !1 !== (n["btn" + (e + 1)] && n["btn" + (e + 1)](t.index, i, t)) && h.close(t.index)
  3753. }), i.find("." + y[7]).on("click", function () {
  3754. !1 !== (n.cancel && n.cancel(t.index, i, t)) && h.close(t.index)
  3755. }), n.shadeClose && t.shadeo.on("click", function () {
  3756. h.close(t.index)
  3757. }), i.find(".layui-layer-min").on("click", function () {
  3758. !1 !== (n.min && n.min(i, t.index, t)) && h.min(t.index, n)
  3759. }), i.find(".layui-layer-max").on("click", function () {
  3760. m(this).hasClass("layui-layer-maxmin") ? (h.restore(t.index), n.restore && n.restore(i, t.index, t)) : (h.full(t.index, n), setTimeout(function () {
  3761. n.full && n.full(i, t.index, t)
  3762. }, 100))
  3763. }), n.end && (u.end[t.index] = n.end)
  3764. }, u.reselect = function () {
  3765. m.each(m("select"), function (e, t) {
  3766. var i = m(this);
  3767. i.parents("." + y[0])[0] || 1 == i.attr("layer") && m("." + y[0]).length < 1 && i.removeAttr("layer").show()
  3768. })
  3769. }, t.pt.IE6 = function (e) {
  3770. m("select").each(function (e, t) {
  3771. var i = m(this);
  3772. i.parents("." + y[0])[0] || "none" !== i.css("display") && i.attr({layer: "1"}).hide()
  3773. })
  3774. }, t.pt.openLayer = function () {
  3775. h.zIndex = this.config.zIndex, h.setTop = function (e) {
  3776. return h.zIndex = parseInt(e[0].style.zIndex), e.on("mousedown", function () {
  3777. h.zIndex++, e.css("z-index", h.zIndex + 1)
  3778. }), h.zIndex
  3779. }
  3780. }, u.record = function (e) {
  3781. if (!e[0]) return p.console && console.error("index error");
  3782. var t = [e[0].style.width || e.width(), e[0].style.height || e.height(), e.position().top, e.position().left + parseFloat(e.css("margin-left"))];
  3783. e.find(".layui-layer-max").addClass("layui-layer-maxmin"), e.attr({area: t})
  3784. }, u.setScrollbar = function (e) {
  3785. y.html.css("overflow", "hidden").attr("layer-full", e)
  3786. }, u.restScrollbar = function (e) {
  3787. y.html.attr("layer-full") == e && (y.html[0].style[y.html[0].style.removeProperty ? "removeProperty" : "removeAttribute"]("overflow"), y.html.removeAttr("layer-full"))
  3788. }, (p.layer = h).getChildFrame = function (e, t) {
  3789. return t = t || m("." + y[4]).attr("times"), m("#" + y[0] + t).find("iframe").contents().find(e)
  3790. }, h.getFrameIndex = function (e) {
  3791. return m("#" + e).parents("." + y[4]).attr("times")
  3792. }, h.iframeAuto = function (e) {
  3793. var t, i, n;
  3794. e && (t = h.getChildFrame("html", e).outerHeight(), i = (e = m("#" + y[0] + e)).find(y[1]).outerHeight() || 0, n = e.find("." + y[6]).outerHeight() || 0, e.css({height: t + i + n}), e.find("iframe").css({height: t}))
  3795. }, h.iframeSrc = function (e, t) {
  3796. m("#" + y[0] + e).find("iframe").attr("src", t)
  3797. }, h.style = function (e, t, i) {
  3798. var e = m("#" + y[0] + e), n = e.find(".layui-layer-content"), a = e.attr("type"),
  3799. o = e.find(y[1]).outerHeight() || 0, s = e.find("." + y[6]).outerHeight() || 0;
  3800. e.attr("minLeft");
  3801. a !== u.type[3] && a !== u.type[4] && (i || (parseFloat(t.width) <= 260 && (t.width = 260), parseFloat(t.height) - o - s <= 64 && (t.height = 64 + o + s)), e.css(t), s = e.find("." + y[6]).outerHeight() || 0, a === u.type[2] ? e.find("iframe").css({height: ("number" == typeof t.height ? t.height : e.height()) - o - s}) : n.css({height: ("number" == typeof t.height ? t.height : e.height()) - o - s - parseFloat(n.css("padding-top")) - parseFloat(n.css("padding-bottom"))}))
  3802. }, h.min = function (e, t) {
  3803. var i, n, a, o, s, l, r = m("#" + y[0] + e), c = r.data("maxminStatus");
  3804. "min" !== c && ("max" === c && h.restore(e), r.data("maxminStatus", "min"), t = t || r.data("config") || {}, c = m("#" + y.SHADE + e), i = r.find(".layui-layer-min"), n = r.find(y[1]).outerHeight() || 0, o = (a = "string" == typeof (o = r.attr("minLeft"))) ? o : 181 * u.minStackIndex + "px", s = r.css("position"), l = {
  3805. width: 180,
  3806. height: n,
  3807. position: "fixed",
  3808. overflow: "hidden"
  3809. }, u.record(r), 0 < u.minStackArr.length && (o = u.minStackArr[0], u.minStackArr.shift()), parseFloat(o) + 180 > d.width() && (o = d.width() - 180 - (u.minStackArr.edgeIndex = u.minStackArr.edgeIndex || 0, u.minStackArr.edgeIndex += 3)) < 0 && (o = 0), t.minStack && (l.left = o, l.top = d.height() - n, a || u.minStackIndex++, r.attr("minLeft", o)), r.attr("position", s), h.style(e, l, !0), i.hide(), "page" === r.attr("type") && r.find(y[4]).hide(), u.restScrollbar(e), c.hide())
  3810. }, h.restore = function (e) {
  3811. var t = m("#" + y[0] + e), i = m("#" + y.SHADE + e), n = t.attr("area").split(","), a = t.attr("type"),
  3812. o = t.data("config") || {};
  3813. t.removeData("maxminStatus"), h.style(e, {
  3814. width: n[0],
  3815. height: n[1],
  3816. top: parseFloat(n[2]),
  3817. left: parseFloat(n[3]),
  3818. position: t.attr("position"),
  3819. overflow: "visible"
  3820. }, !0), t.find(".layui-layer-max").removeClass("layui-layer-maxmin"), t.find(".layui-layer-min").show(), "page" === a && t.find(y[4]).show(), o.scrollbar ? u.restScrollbar(e) : u.setScrollbar(e), i.show()
  3821. }, h.full = function (t) {
  3822. var i = m("#" + y[0] + t), e = i.data("maxminStatus");
  3823. "max" !== e && ("min" === e && h.restore(t), i.data("maxminStatus", "max"), u.record(i), y.html.attr("layer-full") || u.setScrollbar(t), setTimeout(function () {
  3824. var e = "fixed" === i.css("position");
  3825. h.style(t, {
  3826. top: e ? 0 : d.scrollTop(),
  3827. left: e ? 0 : d.scrollLeft(),
  3828. width: "100%",
  3829. height: "100%"
  3830. }, !0), i.find(".layui-layer-min").hide()
  3831. }, 100))
  3832. }, h.title = function (e, t) {
  3833. m("#" + y[0] + (t || h.index)).find(y[1]).html(e)
  3834. }, h.close = function (o, s) {
  3835. var l, e,
  3836. r = (t = m("." + y[0]).children("#" + o).closest("." + y[0]))[0] ? (o = t.attr("times"), t) : m("#" + y[0] + o),
  3837. c = r.attr("type"), t = r.data("config") || {}, f = t.id && t.hideOnClose;
  3838. r[0] && (l = {
  3839. slideDown: "layer-anim-slide-down-out",
  3840. slideLeft: "layer-anim-slide-left-out",
  3841. slideUp: "layer-anim-slide-up-out",
  3842. slideRight: "layer-anim-slide-right-out"
  3843. }[t.anim] || "layer-anim-close", e = function () {
  3844. var e = "layui-layer-wrap";
  3845. if (f) return r.removeClass("layer-anim " + l), r.hide();
  3846. if (c === u.type[1] && "object" === r.attr("conType")) {
  3847. r.children(":not(." + y[5] + ")").remove();
  3848. for (var t = r.find("." + e), i = 0; i < 2; i++) t.unwrap();
  3849. t.css("display", t.data("display")).removeClass(e)
  3850. } else {
  3851. if (c === u.type[2]) try {
  3852. var n = m("#" + y[4] + o)[0];
  3853. n.contentWindow.document.write(""), n.contentWindow.close(), r.find("." + y[5])[0].removeChild(n)
  3854. } catch (a) {
  3855. }
  3856. r[0].innerHTML = "", r.remove()
  3857. }
  3858. "function" == typeof u.end[o] && u.end[o](), delete u.end[o], "function" == typeof s && s(), u.events.resize[o] && (d.off("resize", u.events.resize[o]), delete u.events.resize[o])
  3859. }, m("#" + y.SHADE + o)[f ? "hide" : "remove"](), t.isOutAnim && r.addClass("layer-anim " + l), 6 == h.ie && u.reselect(), u.restScrollbar(o), "string" == typeof r.attr("minLeft") && (u.minStackIndex--, u.minStackArr.push(r.attr("minLeft"))), h.ie && h.ie < 10 || !t.isOutAnim ? e() : setTimeout(function () {
  3860. e()
  3861. }, 200))
  3862. }, h.closeAll = function (n, a) {
  3863. "function" == typeof n && (a = n, n = null);
  3864. var o = m("." + y[0]);
  3865. m.each(o, function (e) {
  3866. var t = m(this), i = n ? t.attr("type") === n : 1;
  3867. i && h.close(t.attr("times"), e === o.length - 1 ? a : null)
  3868. }), 0 === o.length && "function" == typeof a && a()
  3869. }, h.closeLast = function (e) {
  3870. h.close(m(".layui-layer-" + (e = e || "page") + ":last").attr("times"))
  3871. }, h.cache || {}), g = function (e) {
  3872. return i.skin ? " " + i.skin + " " + i.skin + "-" + e : ""
  3873. };
  3874. h.prompt = function (i, n) {
  3875. var e = "", t = "";
  3876. "function" == typeof (i = i || {}) && (n = i), i.area && (e = 'style="width: ' + (o = i.area)[0] + "; height: " + o[1] + ';"', delete i.area), i.placeholder && (t = ' placeholder="' + i.placeholder + '"');
  3877. var a,
  3878. o = 2 == i.formType ? '<textarea class="layui-layer-input"' + e + t + "></textarea>" : '<input type="' + (1 == i.formType ? "password" : "text") + '" class="layui-layer-input"' + t + ">",
  3879. s = i.success;
  3880. return delete i.success, h.open(m.extend({
  3881. type: 1,
  3882. btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
  3883. content: o,
  3884. skin: "layui-layer-prompt" + g("prompt"),
  3885. maxWidth: d.width(),
  3886. success: function (e) {
  3887. (a = e.find(".layui-layer-input")).val(i.value || "").focus(), "function" == typeof s && s(e)
  3888. },
  3889. resize: !1,
  3890. yes: function (e) {
  3891. var t = a.val();
  3892. t.length > (i.maxlength || 500) ? h.tips("&#x6700;&#x591A;&#x8F93;&#x5165;" + (i.maxlength || 500) + "&#x4E2A;&#x5B57;&#x6570;", a, {tips: 1}) : n && n(t, e, a)
  3893. }
  3894. }, i))
  3895. }, h.tab = function (n) {
  3896. var a = (n = n || {}).tab || {}, o = "layui-this", s = n.success;
  3897. return delete n.success, h.open(m.extend({
  3898. type: 1,
  3899. skin: "layui-layer-tab" + g("tab"),
  3900. resize: !1,
  3901. title: function () {
  3902. var e = a.length, t = 1, i = "";
  3903. if (0 < e) for (i = '<span class="' + o + '">' + a[0].title + "</span>"; t < e; t++) i += "<span>" + a[t].title + "</span>";
  3904. return i
  3905. }(),
  3906. content: '<ul class="layui-layer-tabmain">' + function () {
  3907. var e = a.length, t = 1, i = "";
  3908. if (0 < e) for (i = '<li class="layui-layer-tabli ' + o + '">' + (a[0].content || "no content") + "</li>"; t < e; t++) i += '<li class="layui-layer-tabli">' + (a[t].content || "no content") + "</li>";
  3909. return i
  3910. }() + "</ul>",
  3911. success: function (e) {
  3912. var t = e.find(".layui-layer-title").children(), i = e.find(".layui-layer-tabmain").children();
  3913. t.on("mousedown", function (e) {
  3914. e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0;
  3915. var e = m(this), t = e.index();
  3916. e.addClass(o).siblings().removeClass(o), i.eq(t).show().siblings().hide(), "function" == typeof n.change && n.change(t)
  3917. }), "function" == typeof s && s(e)
  3918. }
  3919. }, n))
  3920. }, h.photos = function (n, e, a) {
  3921. var o = {};
  3922. if ((n = n || {}).photos) {
  3923. var t = !("string" == typeof n.photos || n.photos instanceof m), i = t ? n.photos : {}, s = i.data || [],
  3924. l = i.start || 0, r = (o.imgIndex = 1 + (0 | l), n.img = n.img || "img", n.success);
  3925. if (delete n.success, t) {
  3926. if (0 === s.length) return h.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")
  3927. } else {
  3928. var c = m(n.photos), f = function () {
  3929. s = [], c.find(n.img).each(function (e) {
  3930. var t = m(this);
  3931. t.attr("layer-index", e), s.push({
  3932. alt: t.attr("alt"),
  3933. pid: t.attr("layer-pid"),
  3934. src: t.attr("lay-src") || t.attr("layer-src") || t.attr("src"),
  3935. thumb: t.attr("src")
  3936. })
  3937. })
  3938. };
  3939. if (f(), 0 === s.length) return;
  3940. if (e || c.on("click", n.img, function () {
  3941. f();
  3942. var e = m(this).attr("layer-index");
  3943. h.photos(m.extend(n, {photos: {start: e, data: s, tab: n.tab}, full: n.full}), !0)
  3944. }), !e) return
  3945. }
  3946. o.imgprev = function (e) {
  3947. o.imgIndex--, o.imgIndex < 1 && (o.imgIndex = s.length), o.tabimg(e)
  3948. }, o.imgnext = function (e, t) {
  3949. o.imgIndex++, o.imgIndex > s.length && (o.imgIndex = 1, t) || o.tabimg(e)
  3950. }, o.keyup = function (e) {
  3951. var t;
  3952. o.end || (t = e.keyCode, e.preventDefault(), 37 === t ? o.imgprev(!0) : 39 === t ? o.imgnext(!0) : 27 === t && h.close(o.index))
  3953. }, o.tabimg = function (e) {
  3954. if (!(s.length <= 1)) return i.start = o.imgIndex - 1, h.close(o.index), h.photos(n, !0, e)
  3955. }, o.event = function () {
  3956. o.bigimg.find(".layui-layer-imgprev").on("click", function (e) {
  3957. e.preventDefault(), o.imgprev(!0)
  3958. }), o.bigimg.find(".layui-layer-imgnext").on("click", function (e) {
  3959. e.preventDefault(), o.imgnext(!0)
  3960. }), m(document).on("keyup", o.keyup)
  3961. }, o.loadi = h.load(1, {shade: !("shade" in n) && .9, scrollbar: !1});
  3962. var t = s[l].src, d = function (e) {
  3963. h.close(o.loadi);
  3964. var t, i = s[l].alt || "";
  3965. a && (n.anim = -1), o.index = h.open(m.extend({
  3966. type: 1,
  3967. id: "layui-layer-photos",
  3968. area: (e = [e.width, e.height], t = [m(p).width() - 100, m(p).height() - 100], !n.full && (e[0] > t[0] || e[1] > t[1]) && ((t = [e[0] / t[0], e[1] / t[1]])[1] < t[0] ? (e[0] = e[0] / t[0], e[1] = e[1] / t[0]) : t[0] < t[1] && (e[0] = e[0] / t[1], e[1] = e[1] / t[1])), [e[0] + "px", e[1] + "px"]),
  3969. title: !1,
  3970. shade: .9,
  3971. shadeClose: !0,
  3972. closeBtn: !1,
  3973. move: ".layui-layer-phimg img",
  3974. moveType: 1,
  3975. scrollbar: !1,
  3976. moveOut: !0,
  3977. anim: 5,
  3978. isOutAnim: !1,
  3979. skin: "layui-layer-photos" + g("photos"),
  3980. content: '<div class="layui-layer-phimg"><img src="' + s[l].src + '" alt="' + i + '" layer-pid="' + s[l].pid + '">' + (t = ['<div class="layui-layer-imgsee">'], 1 < s.length && t.push(['<div class="layui-layer-imguide">', '<span class="layui-icon layui-icon-left layui-layer-iconext layui-layer-imgprev"></span>', '<span class="layui-icon layui-icon-right layui-layer-iconext layui-layer-imgnext"></span>', "</div>"].join("")), n.hideFooter || t.push(['<div class="layui-layer-imgbar">', '<div class="layui-layer-imgtit">', "<h3>" + i + "</h3>", "<em>" + o.imgIndex + " / " + s.length + "</em>", '<a href="' + s[l].src + '" target="_blank">\u67e5\u770b\u539f\u56fe</a>', "</div>", "</div>"].join("")), t.push("</div>"), t.join("")) + "</div>",
  3981. success: function (e, t) {
  3982. o.bigimg = e.find(".layui-layer-phimg"), o.imgsee = e.find(".layui-layer-imgbar"), o.event(e), n.tab && n.tab(s[l], e), "function" == typeof r && r(e)
  3983. },
  3984. end: function () {
  3985. o.end = !0, m(document).off("keyup", o.keyup)
  3986. }
  3987. }, n))
  3988. }, u = function () {
  3989. h.close(o.loadi), h.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;", {
  3990. time: 3e4,
  3991. btn: ["&#x4E0B;&#x4E00;&#x5F20;", "&#x4E0D;&#x770B;&#x4E86;"],
  3992. yes: function () {
  3993. 1 < s.length && o.imgnext(!0, !0)
  3994. }
  3995. })
  3996. }, y = new Image;
  3997. (y.src = t, y.complete) ? d(y) : (y.onload = function () {
  3998. y.onload = null, d(y)
  3999. }, y.onerror = function (e) {
  4000. y.onerror = null, u(e)
  4001. })
  4002. }
  4003. }, u.run = function (e) {
  4004. d = (m = e)(p), y.html = m("html"), h.open = function (e) {
  4005. return new t(e).index
  4006. }
  4007. }, p.layui && layui.define ? (h.ready(), layui.define("jquery", function (e) {
  4008. h.path = layui.cache.dir, u.run(layui.$), e("layer", p.layer = h)
  4009. })) : "function" == typeof define && define.amd ? define(["jquery"], function () {
  4010. return u.run(p.jQuery), h
  4011. }) : (h.ready(), u.run(p.jQuery))
  4012. }(window);
  4013. layui.define("jquery", function (t) {
  4014. "use strict";
  4015. var s = layui.$, p = layui.hint(), r = {
  4016. fixbar: function (i) {
  4017. var r, t, e, n, o = "layui-fixbar", a = s(document), u = (i = s.extend(!0, {
  4018. target: "body",
  4019. bars: [],
  4020. "default": !0,
  4021. margin: 160,
  4022. duration: 320
  4023. }, i), s(i.target)), c = i.scroll ? s(i.scroll) : s("body" === i.target ? a : u),
  4024. l = (i["default"] && (i.bar1 && i.bars.push({
  4025. type: "bar1",
  4026. icon: "layui-icon-chat"
  4027. }), i.bar2 && i.bars.push({type: "bar2", icon: "layui-icon-help"}), i.bars.push({
  4028. type: "top",
  4029. icon: "layui-icon-top"
  4030. })), s("<ul>").addClass(o));
  4031. layui.each(i.bars, function (t, e) {
  4032. var n = s('<li class="layui-icon">');
  4033. n.addClass(e.icon).attr({
  4034. "lay-type": e.type,
  4035. style: e.style || (i.bgcolor ? "background-color: " + i.bgcolor : "")
  4036. }).html(e.content), n.on("click", function () {
  4037. var t = s(this).attr("lay-type");
  4038. "top" === t && ("body" === i.target ? s("html,body") : c).animate({scrollTop: 0}, i.duration), "function" == typeof i.click && i.click.call(this, t)
  4039. }), "object" === layui.type(i.on) && layui.each(i.on, function (t, e) {
  4040. n.on(t, function () {
  4041. var t = s(this).attr("lay-type");
  4042. "function" == typeof e && e.call(this, t)
  4043. })
  4044. }), "top" === e.type && (n.addClass("layui-fixbar-top"), r = n), l.append(n)
  4045. }), u.find("." + o).remove(), "object" == typeof i.css && l.css(i.css), u.append(l), r && (e = function e() {
  4046. return c.scrollTop() >= i.margin ? t || (r.show(), t = 1) : t && (r.hide(), t = 0), e
  4047. }()), c.on("scroll", function () {
  4048. e && (clearTimeout(n), n = setTimeout(function () {
  4049. e()
  4050. }, 100))
  4051. })
  4052. }, countdown: function (i) {
  4053. i = s.extend(!0, {date: new Date, now: new Date}, i);
  4054. var r = arguments, o = (1 < r.length && (i.date = new Date(r[0]), i.now = new Date(r[1]), i.clock = r[2]), {
  4055. options: i,
  4056. clear: function () {
  4057. clearTimeout(o.timer)
  4058. },
  4059. reload: function (t) {
  4060. this.clear(), s.extend(!0, this.options, {now: new Date}, t), a()
  4061. }
  4062. }), a = ("function" == typeof i.ready && i.ready(), function u() {
  4063. var t = new Date(i.date), e = new Date(i.now), t = 0 < (t = t.getTime() - e.getTime()) ? t : 0, n = {
  4064. d: Math.floor(t / 864e5),
  4065. h: Math.floor(t / 36e5) % 24,
  4066. m: Math.floor(t / 6e4) % 60,
  4067. s: Math.floor(t / 1e3) % 60
  4068. };
  4069. return 1 < r.length && (n = [n.d, n.h, n.m, n.s]), o.timer = setTimeout(function () {
  4070. e.setTime(e.getTime() + 1e3), i.now = e, a()
  4071. }, 1e3), "function" == typeof i.clock && i.clock(n, o), t <= 0 && (clearTimeout(o.timer), "function" == typeof i.done && i.done(n, o)), u
  4072. }());
  4073. return o
  4074. }, timeAgo: function (t, e) {
  4075. var n = this, i = [[], []], r = (new Date).getTime() - new Date(t).getTime();
  4076. return 26784e5 < r ? (r = new Date(t), i[0][0] = n.digit(r.getFullYear(), 4), i[0][1] = n.digit(r.getMonth() + 1), i[0][2] = n.digit(r.getDate()), e || (i[1][0] = n.digit(r.getHours()), i[1][1] = n.digit(r.getMinutes()), i[1][2] = n.digit(r.getSeconds())), i[0].join("-") + " " + i[1].join(":")) : 864e5 <= r ? (r / 1e3 / 60 / 60 / 24 | 0) + " \u5929\u524d" : 36e5 <= r ? (r / 1e3 / 60 / 60 | 0) + " \u5c0f\u65f6\u524d" : 18e4 <= r ? (r / 1e3 / 60 | 0) + " \u5206\u949f\u524d" : r < 0 ? "\u672a\u6765" : "\u521a\u521a"
  4077. }, digit: function (t, e) {
  4078. var n = "";
  4079. e = e || 2;
  4080. for (var i = (t = String(t)).length; i < e; i++) n += "0";
  4081. return t < Math.pow(10, e) ? n + (0 | t) : t
  4082. }, toDateString: function (t, e, n) {
  4083. if (null === t || "" === t) return "";
  4084. var i = this, r = new Date(function () {
  4085. if (t) return !isNaN(t) && "string" == typeof t ? parseInt(t) : t
  4086. }() || new Date);
  4087. if (!r.getDate()) return p.error('Invalid Msec for "util.toDateString(Msec)"'), "";
  4088. var o = r.getFullYear(), a = r.getMonth(), u = r.getDate(), c = r.getHours(), l = r.getMinutes(),
  4089. s = r.getSeconds(), f = r.getMilliseconds(), g = n && n.customMeridiem || function (t, e) {
  4090. t = 100 * t + e;
  4091. return t < 600 ? "\u51cc\u6668" : t < 900 ? "\u65e9\u4e0a" : t < 1100 ? "\u4e0a\u5348" : t < 1300 ? "\u4e2d\u5348" : t < 1800 ? "\u4e0b\u5348" : "\u665a\u4e0a"
  4092. }, d = {
  4093. yy: function () {
  4094. return String(o).slice(-2)
  4095. }, yyyy: function () {
  4096. return i.digit(o, 4)
  4097. }, M: function () {
  4098. return String(a + 1)
  4099. }, MM: function () {
  4100. return i.digit(a + 1)
  4101. }, d: function () {
  4102. return String(u)
  4103. }, dd: function () {
  4104. return i.digit(u)
  4105. }, H: function () {
  4106. return String(c)
  4107. }, HH: function () {
  4108. return i.digit(c)
  4109. }, h: function () {
  4110. return String(c % 12 || 12)
  4111. }, hh: function () {
  4112. return i.digit(c % 12 || 12)
  4113. }, A: function () {
  4114. return g(c, l)
  4115. }, m: function () {
  4116. return String(l)
  4117. }, mm: function () {
  4118. return i.digit(l)
  4119. }, s: function () {
  4120. return String(s)
  4121. }, ss: function () {
  4122. return i.digit(s)
  4123. }, SSS: function () {
  4124. return i.digit(f, 3)
  4125. }
  4126. };
  4127. return (e = e || "yyyy-MM-dd HH:mm:ss").replace(/\[([^\]]+)]|y{1,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|SSS/g, function (t, e) {
  4128. return e || d[t] && d[t]() || t
  4129. })
  4130. }, escape: function (t) {
  4131. return t === undefined || null === t ? "" : /[<"'>]|&(?=#[a-zA-Z0-9]+)/g.test(t += "") ? t.replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&#39;").replace(/"/g, "&quot;") : t
  4132. }, unescape: function (t) {
  4133. return t !== undefined && null !== t || (t = ""), (t += "").replace(/\&amp;/g, "&").replace(/\&lt;/g, "<").replace(/\&gt;/g, ">").replace(/\&#39;/g, "'").replace(/\&quot;/g, '"')
  4134. }, openWin: function (t) {
  4135. var e = (t = t || {}).window || window.open(t.url || "", t.target, t.specs);
  4136. t.url || (e.document.open("text/html", "replace"), e.document.write(t.content || ""), e.document.close())
  4137. }, toVisibleArea: function (t) {
  4138. var e, n, i, r, o, a, u, c;
  4139. (t = s.extend({
  4140. margin: 160,
  4141. duration: 200,
  4142. type: "y"
  4143. }, t)).scrollElem[0] && t.thisElem[0] && (e = t.scrollElem, u = t.thisElem, i = (o = "y" === t.type) ? "top" : "left", r = e[n = o ? "scrollTop" : "scrollLeft"](), o = e[o ? "height" : "width"](), a = e.offset()[i], c = {}, ((u = u.offset()[i] - a) > o - t.margin || u < t.margin) && (c[n] = u - o / 2 + r, e.animate(c, t.duration)))
  4144. }, event: function (n, i, t) {
  4145. var e = s("body");
  4146. return t = t || "click", i = r.event[n] = s.extend(!0, r.event[n], i) || {}, r.event.UTIL_EVENT_CALLBACK = r.event.UTIL_EVENT_CALLBACK || {}, e.off(t, "*[" + n + "]", r.event.UTIL_EVENT_CALLBACK[n]), r.event.UTIL_EVENT_CALLBACK[n] = function () {
  4147. var t = s(this), e = t.attr(n);
  4148. "function" == typeof i[e] && i[e].call(this, t)
  4149. }, e.on(t, "*[" + n + "]", r.event.UTIL_EVENT_CALLBACK[n]), i
  4150. }
  4151. };
  4152. r.on = r.event, t("util", r)
  4153. });
  4154. layui.define(["jquery", "laytpl", "lay", "util"], function (e) {
  4155. "use strict";
  4156. var n, i, t, c = layui.$, m = layui.laytpl, p = layui.util, a = layui.hint(),
  4157. o = layui.device().mobile ? "touchstart" : "mousedown", r = "dropdown", y = "layui_" + r + "_index", f = {
  4158. config: {customName: {id: "id", title: "title", children: "child"}},
  4159. index: layui[r] ? layui[r].index + 1e4 : 0,
  4160. set: function (e) {
  4161. var i = this;
  4162. return i.config = c.extend({}, i.config, e), i
  4163. },
  4164. on: function (e, i) {
  4165. return layui.onevent.call(this, r, e, i)
  4166. }
  4167. }, h = function () {
  4168. var i = this, e = i.config, t = e.id;
  4169. return h.that[t] = i, {
  4170. config: e, reload: function (e) {
  4171. i.reload.call(i, e)
  4172. }, reloadData: function (e) {
  4173. f.reloadData(t, e)
  4174. }, close: function () {
  4175. i.remove()
  4176. }
  4177. }
  4178. }, g = "layui-dropdown", l = "layui-menu-item-up", d = "layui-menu-item-down", v = "layui-menu-body-title",
  4179. u = "layui-menu-item-group", w = "layui-menu-item-parent", s = "layui-menu-item-checked",
  4180. C = "layui-menu-item-checked2", V = "layui-menu-body-panel", x = "layui-menu-body-panel-left",
  4181. b = "layui-dropdown-shade", k = "." + u + ">." + v, E = function (e) {
  4182. var i = this;
  4183. i.index = ++f.index, i.config = c.extend({}, i.config, f.config, e), i.init()
  4184. };
  4185. E.prototype.config = {
  4186. trigger: "click",
  4187. content: "",
  4188. className: "",
  4189. style: "",
  4190. show: !1,
  4191. isAllowSpread: !0,
  4192. isSpreadItem: !0,
  4193. data: [],
  4194. delay: 300,
  4195. shade: 0
  4196. }, E.prototype.reload = function (e, i) {
  4197. var t = this;
  4198. t.config = c.extend({}, t.config, e), t.init(!0, i)
  4199. }, E.prototype.init = function (e, i) {
  4200. var t, n = this, a = n.config, l = c(a.elem);
  4201. return 1 < l.length ? (layui.each(l, function () {
  4202. f.render(c.extend({}, a, {elem: this}))
  4203. }), n) : (c.extend(a, lay.options(l[0])), !e && l[0] && l.data(y) ? (t = h.getThis(l.data(y))) ? t.reload(a, i) : void 0 : (a.elem = c(a.elem), a.id = "id" in a ? a.id : l.attr("id") || n.index, a.customName = c.extend({}, f.config.customName, a.customName), (a.show || "reloadData" === i && n.elemView && c("body").find(n.elemView.get(0)).length) && n.render(e, i), void n.events()))
  4204. }, E.prototype.render = function (e, i) {
  4205. var l = this, d = l.config, u = d.customName, t = c("body"), n = function () {
  4206. var e = c('<ul class="layui-menu layui-dropdown-menu"></ul>');
  4207. return 0 < d.data.length ? s(e, d.data) : e.html('<li class="layui-menu-item-none">No data</li>'), e
  4208. }, s = function (r, e) {
  4209. return layui.each(e, function (e, i) {
  4210. var t, n = i[u.children] && 0 < i[u.children].length, a = ("isSpreadItem" in i ? i : d).isSpreadItem,
  4211. l = (o = p.escape(i[u.title]), l = i.templet || d.templet, o = l ? "function" == typeof l ? l(i) : m(l).render(i) : o),
  4212. o = (n && (i.type = i.type || "parent"), i.type ? {
  4213. group: "group",
  4214. parent: "parent",
  4215. "-": "-"
  4216. }[i.type] || "parent" : "");
  4217. ("-" === o || i[u.title] || i[u.id] || n) && ((l = c(["<li" + (t = {
  4218. group: "layui-menu-item-group" + (d.isAllowSpread ? a ? " layui-menu-item-down" : " layui-menu-item-up" : ""),
  4219. parent: w,
  4220. "-": "layui-menu-item-divider"
  4221. }, n || o ? ' class="' + t[o] + '"' : i.disabled ? ' class="layui-disabled"' : "") + ">", (t = "href" in i ? '<a href="' + i.href + '" target="' + (i.target || "_self") + '">' + l + "</a>" : l, n ? '<div class="' + v + '">' + t + ("parent" === o ? '<i class="layui-icon layui-icon-right"></i>' : "group" === o && d.isAllowSpread ? '<i class="layui-icon layui-icon-' + (a ? "up" : "down") + '"></i>' : "") + "</div>" : '<div class="' + v + '">' + t + "</div>"), "</li>"].join(""))).data("item", i), n && (a = c('<div class="layui-panel layui-menu-body-panel"></div>'), t = c("<ul></ul>"), "parent" === o ? (a.append(s(t, i[u.children])), l.append(a)) : l.append(s(t, i[u.children]))), r.append(l))
  4222. }), r
  4223. },
  4224. a = ['<div class="layui-dropdown layui-border-box layui-panel layui-anim layui-anim-downbit" lay-id="' + d.id + '">', "</div>"].join("");
  4225. !(e = "contextmenu" !== d.trigger && !lay.isTopElem(d.elem[0]) ? e : !0) && d.elem.data(y + "_opened") || (l.elemView = c("." + g + '[lay-id="' + d.id + '"]'), "reloadData" === i && l.elemView.length ? l.elemView.html(d.content || n()) : (l.elemView = c(a), l.elemView.append(d.content || n()), d.className && l.elemView.addClass(d.className), d.style && l.elemView.attr("style", d.style), f.thisId = d.id, l.remove(), t.append(l.elemView), d.elem.data(y + "_opened", !0), e = d.shade ? '<div class="' + b + '" style="z-index:' + (l.elemView.css("z-index") - 1) + "; background-color: " + (d.shade[1] || "#000") + "; opacity: " + (d.shade[0] || d.shade) + '"></div>' : "", l.elemView.before(e), "mouseenter" === d.trigger && l.elemView.on("mouseenter", function () {
  4226. clearTimeout(h.timer)
  4227. }).on("mouseleave", function () {
  4228. l.delayRemove()
  4229. })), l.position(), (h.prevElem = l.elemView).data("prevElem", d.elem), l.elemView.find(".layui-menu").on(o, function (e) {
  4230. layui.stope(e)
  4231. }), l.elemView.find(".layui-menu li").on("click", function (e) {
  4232. var i = c(this), t = i.data("item") || {}, n = t[u.children] && 0 < t[u.children].length,
  4233. a = "all" === d.clickScope;
  4234. t.disabled || n && !a || "-" === t.type || (!1 === ("function" == typeof d.click ? d.click(t, i) : null) || n || l.remove(), layui.stope(e))
  4235. }), l.elemView.find(k).on("click", function (e) {
  4236. var i = c(this).parent();
  4237. "group" === (i.data("item") || {}).type && d.isAllowSpread && h.spread(i)
  4238. }), "function" == typeof d.ready && d.ready(l.elemView, d.elem))
  4239. }, E.prototype.position = function (e) {
  4240. var i = this.config;
  4241. lay.position(i.elem[0], this.elemView[0], {
  4242. position: i.position,
  4243. e: this.e,
  4244. clickType: "contextmenu" === i.trigger ? "right" : null,
  4245. align: i.align || null
  4246. })
  4247. }, E.prototype.remove = function () {
  4248. this.config;
  4249. var e = h.prevElem;
  4250. e && (e.data("prevElem") && e.data("prevElem").data(y + "_opened", !1), e.remove()), lay("." + b).remove()
  4251. }, E.prototype.delayRemove = function () {
  4252. var e = this, i = e.config;
  4253. clearTimeout(h.timer), h.timer = setTimeout(function () {
  4254. e.remove()
  4255. }, i.delay)
  4256. }, E.prototype.events = function () {
  4257. var i = this, e = i.config;
  4258. "hover" === e.trigger && (e.trigger = "mouseenter"), i.prevElem && i.prevElem.off(e.trigger, i.prevElemCallback), i.prevElem = e.elem, i.prevElemCallback = function (e) {
  4259. clearTimeout(h.timer), i.e = e, i.render(), e.preventDefault()
  4260. }, e.elem.on(e.trigger, i.prevElemCallback), "mouseenter" === e.trigger && e.elem.on("mouseleave", function () {
  4261. i.delayRemove()
  4262. })
  4263. }, h.that = {}, h.getThis = function (e) {
  4264. var i = h.that[e];
  4265. return i || a.error(e ? r + " instance with ID '" + e + "' not found" : "ID argument required"), i
  4266. }, h.spread = function (e) {
  4267. var i = e.hasClass(l), t = e.children("." + v).find(".layui-icon-" + (i ? "down" : "up"));
  4268. i ? (e.removeClass(l).addClass(d), t.removeClass("layui-icon-down").addClass("layui-icon-up")) : (e.removeClass(d).addClass(l), t.removeClass("layui-icon-up").addClass("layui-icon-down"))
  4269. }, n = c(window), i = c(document), n.on("resize", function () {
  4270. if (f.thisId) {
  4271. var e = h.getThis(f.thisId);
  4272. if (e) {
  4273. if (e.elemView && !e.elemView[0] || !c("." + g)[0]) return !1;
  4274. "contextmenu" === e.config.trigger ? e.remove() : e.position()
  4275. }
  4276. }
  4277. }), i.on(o, function (e) {
  4278. var i, t;
  4279. !f.thisId || (i = h.getThis(f.thisId)) && (t = i.config, !lay.isTopElem(t.elem[0]) && "contextmenu" !== t.trigger && (e.target === t.elem[0] || t.elem.find(e.target)[0] || i.elemView && e.target === i.elemView[0] || i.elemView && i.elemView.find(e.target)[0]) || i.remove())
  4280. }), t = ".layui-menu:not(.layui-dropdown-menu) li", i.on("click", t, function (e) {
  4281. var i = c(this), t = i.parents(".layui-menu").eq(0), n = i.hasClass(u) || i.hasClass(w),
  4282. a = t.attr("lay-filter") || t.attr("id"), l = lay.options(this);
  4283. i.hasClass("layui-menu-item-divider") || n || (t.find("." + s).removeClass(s), t.find("." + C).removeClass(C), i.addClass(s), i.parents("." + w).addClass(C), l.title = l.title || c.trim(i.children("." + v).text()), layui.event.call(this, r, "click(" + a + ")", l))
  4284. }), i.on("click", t + k, function (e) {
  4285. var i = c(this).parents("." + u + ":eq(0)"), t = lay.options(i[0]);
  4286. "isAllowSpread" in t && !t.isAllowSpread || h.spread(i)
  4287. }), t = ".layui-menu ." + w, i.on("mouseenter", t, function (e) {
  4288. var i, t = c(this).find("." + V);
  4289. t[0] && ((i = t[0].getBoundingClientRect()).right > n.width() && (t.addClass(x), (i = t[0].getBoundingClientRect()).left < 0 && t.removeClass(x)), i.bottom > n.height() && t.eq(0).css("margin-top", -(i.bottom - n.height() + 5)))
  4290. }).on("mouseleave", t, function (e) {
  4291. var i = c(this).children("." + V);
  4292. i.removeClass(x), i.css("margin-top", 0)
  4293. }), f.close = function (e) {
  4294. e = h.getThis(e);
  4295. return e ? (e.remove(), h.call(e)) : this
  4296. }, f.reload = function (e, i, t) {
  4297. e = h.getThis(e);
  4298. return e ? (e.reload(i, t), h.call(e)) : this
  4299. }, f.reloadData = function () {
  4300. var t = c.extend([], arguments),
  4301. n = (t[2] = "reloadData", new RegExp("^(" + ["data", "templet", "content"].join("|") + ")$"));
  4302. return layui.each(t[1], function (e, i) {
  4303. n.test(e) || delete t[1][e]
  4304. }), f.reload.apply(null, t)
  4305. }, f.render = function (e) {
  4306. e = new E(e);
  4307. return h.call(e)
  4308. }, e(r, f)
  4309. });
  4310. layui.define(["jquery", "lay"], function (e) {
  4311. "use strict";
  4312. var g = layui.$, c = layui.lay, m = {
  4313. config: {}, index: layui.slider ? layui.slider.index + 1e4 : 0, set: function (e) {
  4314. var i = this;
  4315. return i.config = g.extend({}, i.config, e), i
  4316. }, on: function (e, i) {
  4317. return layui.onevent.call(this, t, e, i)
  4318. }
  4319. }, t = "slider", v = "layui-disabled", x = "layui-slider-bar", b = "layui-slider-wrap", T = "layui-slider-wrap-btn",
  4320. w = "layui-slider-tips", M = "layui-slider-input-txt", L = "layui-slider-hover", i = function (e) {
  4321. var i = this;
  4322. i.index = ++m.index, i.config = g.extend({}, i.config, m.config, e), i.render()
  4323. };
  4324. i.prototype.config = {
  4325. type: "default",
  4326. min: 0,
  4327. max: 100,
  4328. value: 0,
  4329. step: 1,
  4330. showstep: !1,
  4331. tips: !0,
  4332. input: !1,
  4333. range: !1,
  4334. height: 200,
  4335. disabled: !1,
  4336. theme: "#16baaa"
  4337. }, i.prototype.render = function () {
  4338. var a = this, n = a.config, e = g(n.elem);
  4339. if (1 < e.length) return layui.each(e, function () {
  4340. m.render(g.extend({}, n, {elem: this}))
  4341. }), a;
  4342. g.extend(n, c.options(e[0])), n.step < 1 && (n.step = 1), n.max < n.min && (n.max = n.min + n.step), n.range ? (n.value = "object" == typeof n.value ? n.value : [n.min, n.value], e = Math.min(n.value[0], n.value[1]), i = Math.max(n.value[0], n.value[1]), n.value[0] = e > n.min ? e : n.min, n.value[1] = i > n.min ? i : n.min, n.value[0] = n.value[0] > n.max ? n.max : n.value[0], n.value[1] = n.value[1] > n.max ? n.max : n.value[1], i = Math.floor((n.value[0] - n.min) / (n.max - n.min) * 100), t = (s = Math.floor((n.value[1] - n.min) / (n.max - n.min) * 100)) - i + "%", i += "%", s += "%") : ("object" == typeof n.value && (n.value = Math.min.apply(null, n.value)), n.value < n.min && (n.value = n.min), n.value > n.max && (n.value = n.max), t = Math.floor((n.value - n.min) / (n.max - n.min) * 100) + "%");
  4343. var l, e = n.disabled ? "#c2c2c2" : n.theme,
  4344. i = '<div class="layui-slider ' + ("vertical" === n.type ? "layui-slider-vertical" : "") + '">' + (n.tips ? '<div class="' + w + '"></div>' : "") + '<div class="layui-slider-bar" style="background:' + e + "; " + ("vertical" === n.type ? "height" : "width") + ":" + t + ";" + ("vertical" === n.type ? "bottom" : "left") + ":" + (i || 0) + ';"></div><div class="layui-slider-wrap" style="' + ("vertical" === n.type ? "bottom" : "left") + ":" + (i || t) + ';"><div class="layui-slider-wrap-btn" style="border: 2px solid ' + e + ';"></div></div>' + (n.range ? '<div class="layui-slider-wrap" style="' + ("vertical" === n.type ? "bottom" : "left") + ":" + s + ';"><div class="layui-slider-wrap-btn" style="border: 2px solid ' + e + ';"></div></div>' : "") + "</div>",
  4345. t = g(n.elem), s = t.next(".layui-slider");
  4346. if (s[0] && s.remove(), a.elemTemp = g(i), n.range ? (a.elemTemp.find("." + b).eq(0).data("value", n.value[0]), a.elemTemp.find("." + b).eq(1).data("value", n.value[1])) : a.elemTemp.find("." + b).data("value", n.value), t.html(a.elemTemp), "vertical" === n.type && a.elemTemp.height(n.height + "px"), n.showstep) {
  4347. for (var o = (n.max - n.min) / n.step, r = "", u = 1; u < 1 + o; u++) {
  4348. var d = 100 * u / o;
  4349. d < 100 && (r += '<div class="layui-slider-step" style="' + ("vertical" === n.type ? "bottom" : "left") + ":" + d + '%"></div>')
  4350. }
  4351. a.elemTemp.append(r)
  4352. }
  4353. n.input && !n.range && (e = g('<div class="layui-slider-input"><div class="layui-slider-input-txt"><input type="text" class="layui-input"></div><div class="layui-slider-input-btn"><i class="layui-icon layui-icon-up"></i><i class="layui-icon layui-icon-down"></i></div></div>'), t.css("position", "relative"), t.append(e), t.find("." + M).children("input").val(n.value), "vertical" === n.type ? e.css({
  4354. left: 0,
  4355. top: -48
  4356. }) : a.elemTemp.css("margin-right", e.outerWidth() + 15)), n.disabled ? (a.elemTemp.addClass(v), a.elemTemp.find("." + T).addClass(v)) : a.slide(), a.elemTemp.find("." + T).on("mouseover", function () {
  4357. var e = "vertical" === n.type ? n.height : a.elemTemp[0].offsetWidth, i = a.elemTemp.find("." + b),
  4358. t = ("vertical" === n.type ? e - g(this).parent()[0].offsetTop - i.height() : g(this).parent()[0].offsetLeft) / e * 100,
  4359. i = g(this).parent().data("value"), e = n.setTips ? n.setTips(i) : i;
  4360. a.elemTemp.find("." + w).html(e), clearTimeout(l), l = setTimeout(function () {
  4361. "vertical" === n.type ? a.elemTemp.find("." + w).css({
  4362. bottom: t + "%",
  4363. "margin-bottom": "20px",
  4364. display: "inline-block"
  4365. }) : a.elemTemp.find("." + w).css({left: t + "%", display: "inline-block"})
  4366. }, 300)
  4367. }).on("mouseout", function () {
  4368. clearTimeout(l), a.elemTemp.find("." + w).css("display", "none")
  4369. })
  4370. }, i.prototype.slide = function (e, i, t) {
  4371. var o = this, r = o.config, u = o.elemTemp, d = function () {
  4372. return "vertical" === r.type ? r.height : u[0].offsetWidth
  4373. }, c = u.find("." + b), m = u.next(".layui-slider-input"), v = m.children("." + M).children("input").val(),
  4374. p = 100 / ((r.max - r.min) / Math.ceil(r.step)), f = function (e, i, t) {
  4375. e = (e = 100 < (e = 100 < Math.ceil(e) * p ? Math.ceil(e) * p : Math.round(e) * p) ? 100 : e) < 0 ? 0 : e, c.eq(i).css("vertical" === r.type ? "bottom" : "left", e + "%");
  4376. var a, n = h(c[0].offsetLeft), l = r.range ? h(c[1].offsetLeft) : 0,
  4377. s = ("vertical" === r.type ? (u.find("." + w).css({
  4378. bottom: e + "%",
  4379. "margin-bottom": "20px"
  4380. }), n = h(d() - c[0].offsetTop - c.height()), l = r.range ? h(d() - c[1].offsetTop - c.height()) : 0) : u.find("." + w).css("left", e + "%"), n = 100 < n ? 100 : n, l = 100 < l ? 100 : l, Math.min(n, l)),
  4381. n = Math.abs(n - l), l = ("vertical" === r.type ? u.find("." + x).css({
  4382. height: n + "%",
  4383. bottom: s + "%"
  4384. }) : u.find("." + x).css({width: n + "%", left: s + "%"}), r.min + Math.round((r.max - r.min) * e / 100));
  4385. v = l, m.children("." + M).children("input").val(v), c.eq(i).data("value", l), u.find("." + w).html(r.setTips ? r.setTips(l) : l), r.range && (a = [c.eq(0).data("value"), c.eq(1).data("value")])[0] > a[1] && a.reverse(), o.value = r.range ? a : l, r.change && r.change(o.value), "done" === t && r.done && r.done(o.value)
  4386. }, h = function (e) {
  4387. var i = e / d() * 100 / p, t = Math.round(i) * p;
  4388. return t = e == d() ? Math.ceil(i) * p : t
  4389. }, y = g(['<div class="layui-auxiliar-moving" id="LAY-slider-moving"></div'].join(""));
  4390. if ("set" === e) return f(i - r.min, t, "done");
  4391. u.find("." + T).each(function (l) {
  4392. var s = g(this);
  4393. s.on("mousedown", function (e) {
  4394. e = e || window.event;
  4395. var i, t, a = s.parent()[0].offsetLeft, n = e.clientX;
  4396. "vertical" === r.type && (a = d() - s.parent()[0].offsetTop - c.height(), n = e.clientY);
  4397. e = function (e) {
  4398. e = e || window.event;
  4399. var i = a + ("vertical" === r.type ? n - e.clientY : e.clientX - n),
  4400. i = (i = (i = i < 0 ? 0 : i) > d() ? d() : i) / d() * 100 / p;
  4401. f(i, l), s.addClass(L), u.find("." + w).show(), e.preventDefault()
  4402. }, i = function () {
  4403. s.removeClass(L), u.find("." + w).hide()
  4404. }, t = function () {
  4405. i && i(), y.remove(), r.done && r.done(o.value)
  4406. }, g("#LAY-slider-moving")[0] || g("body").append(y), y.on("mousemove", e), y.on("mouseup", t).on("mouseleave", t)
  4407. })
  4408. }), u.on("click", function (e) {
  4409. var i = g("." + T), t = g(this);
  4410. !i.is(event.target) && 0 === i.has(event.target).length && i.length && (t = (i = (i = (i = "vertical" === r.type ? d() - e.clientY + t.offset().top - g(window).scrollTop() : e.clientX - t.offset().left - g(window).scrollLeft()) < 0 ? 0 : i) > d() ? d() : i) / d() * 100 / p, i = r.range ? "vertical" === r.type ? Math.abs(i - parseInt(g(c[0]).css("bottom"))) > Math.abs(i - parseInt(g(c[1]).css("bottom"))) ? 1 : 0 : Math.abs(i - c[0].offsetLeft) > Math.abs(i - c[1].offsetLeft) ? 1 : 0 : 0, f(t, i, "done"), e.preventDefault())
  4411. }), m.children(".layui-slider-input-btn").children("i").each(function (i) {
  4412. g(this).on("click", function () {
  4413. v = m.children("." + M).children("input").val();
  4414. var e = ((v = 1 == i ? v - r.step < r.min ? r.min : Number(v) - r.step : Number(v) + r.step > r.max ? r.max : Number(v) + r.step) - r.min) / (r.max - r.min) * 100 / p;
  4415. f(e, 0, "done")
  4416. })
  4417. });
  4418. var a = function () {
  4419. var e = this.value,
  4420. e = (e = (e = (e = isNaN(e) ? 0 : e) < r.min ? r.min : e) > r.max ? r.max : e, ((this.value = e) - r.min) / (r.max - r.min) * 100 / p);
  4421. f(e, 0, "done")
  4422. };
  4423. m.children("." + M).children("input").on("keydown", function (e) {
  4424. 13 === e.keyCode && (e.preventDefault(), a.call(this))
  4425. }).on("change", a)
  4426. }, i.prototype.events = function () {
  4427. this.config
  4428. }, m.render = function (e) {
  4429. e = new i(e);
  4430. return function () {
  4431. var t = this, a = t.config;
  4432. return {
  4433. setValue: function (e, i) {
  4434. return e = (e = e > a.max ? a.max : e) < a.min ? a.min : e, a.value = e, t.slide("set", e, i || 0)
  4435. }, config: a
  4436. }
  4437. }.call(e)
  4438. }, e(t, m)
  4439. });
  4440. layui.define(["jquery", "lay"], function (e) {
  4441. "use strict";
  4442. var m = layui.$, t = layui.lay, o = layui.hint(), i = layui.device().mobile ? "click" : "mousedown", n = {
  4443. config: {}, index: layui.colorpicker ? layui.colorpicker.index + 1e4 : 0, set: function (e) {
  4444. var i = this;
  4445. return i.config = m.extend({}, i.config, e), i
  4446. }, on: function (e, i) {
  4447. return layui.onevent.call(this, "colorpicker", e, i)
  4448. }
  4449. }, l = function () {
  4450. var e = this.config, i = e.id;
  4451. return l.that[i] = this, {config: e}
  4452. }, r = "colorpicker", c = "layui-colorpicker", a = ".layui-colorpicker-main", x = "layui-icon-down",
  4453. P = "layui-icon-close", C = "layui-colorpicker-trigger-span", w = "layui-colorpicker-trigger-i",
  4454. B = "layui-colorpicker-side-slider", I = "layui-colorpicker-basis", D = "layui-colorpicker-alpha-bgcolor",
  4455. T = "layui-colorpicker-alpha-slider", E = "layui-colorpicker-basis-cursor", M = "layui-colorpicker-main-input",
  4456. Y = function (e) {
  4457. var i = {h: 0, s: 0, b: 0}, o = Math.min(e.r, e.g, e.b), r = Math.max(e.r, e.g, e.b), t = r - o;
  4458. return i.b = r, i.s = 0 !== r ? 255 * t / r : 0, 0 !== i.s ? e.r == r ? i.h = (e.g - e.b) / t : e.g == r ? i.h = 2 + (e.b - e.r) / t : i.h = 4 + (e.r - e.g) / t : i.h = -1, r === o && (i.h = 0), i.h *= 60, i.h < 0 && (i.h += 360), i.s *= 100 / 255, i.b *= 100 / 255, i
  4459. }, j = function (e) {
  4460. var i, o = {}, r = e.h, t = 255 * e.s / 100, e = 255 * e.b / 100;
  4461. return 0 == t ? o.r = o.g = o.b = e : (e = r % 60 * ((i = e) - (t = (255 - t) * e / 255)) / 60, (r = 360 === r ? 0 : r) < 60 ? (o.r = i, o.b = t, o.g = t + e) : r < 120 ? (o.g = i, o.b = t, o.r = i - e) : r < 180 ? (o.g = i, o.r = t, o.b = t + e) : r < 240 ? (o.b = i, o.r = t, o.g = i - e) : r < 300 ? (o.b = i, o.g = t, o.r = t + e) : r < 360 ? (o.r = i, o.g = t, o.b = i - e) : (o.r = 0, o.g = 0, o.b = 0)), {
  4462. r: Math.round(o.r),
  4463. g: Math.round(o.g),
  4464. b: Math.round(o.b)
  4465. }
  4466. }, F = function (e) {
  4467. var e = j(e), o = [e.r.toString(16), e.g.toString(16), e.b.toString(16)];
  4468. return m.each(o, function (e, i) {
  4469. 1 === i.length && (o[e] = "0" + i)
  4470. }), o.join("")
  4471. }, L = function (e) {
  4472. e = e.match(/[0-9]{1,3}/g) || [];
  4473. return {r: e[0], g: e[1], b: e[2]}
  4474. }, H = m(window), s = m(document), d = function (e) {
  4475. this.index = ++n.index, this.config = m.extend({}, this.config, n.config, e), this.render()
  4476. };
  4477. d.prototype.config = {
  4478. color: "",
  4479. size: null,
  4480. alpha: !1,
  4481. format: "hex",
  4482. predefine: !1,
  4483. colors: ["#16baaa", "#16b777", "#1E9FFF", "#FF5722", "#FFB800", "#01AAED", "#999", "#c00", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "rgb(0, 186, 189)", "rgb(255, 120, 0)", "rgb(250, 212, 0)", "#393D49", "rgba(0,0,0,.5)", "rgba(255, 69, 0, 0.68)", "rgba(144, 240, 144, 0.5)", "rgba(31, 147, 255, 0.73)"]
  4484. }, d.prototype.render = function () {
  4485. var e = this, i = e.config;
  4486. if (1 < (r = m(i.elem)).length) return layui.each(r, function () {
  4487. n.render(m.extend({}, i, {elem: this}))
  4488. }), e;
  4489. m.extend(i, t.options(r[0]));
  4490. var o = m(['<div class="layui-unselect layui-colorpicker">', "<span " + ("rgb" == i.format && i.alpha ? 'class="layui-colorpicker-trigger-bgcolor"' : "") + ">", '<span class="layui-colorpicker-trigger-span" ', 'lay-type="' + ("rgb" == i.format ? i.alpha ? "rgba" : "torgb" : "") + '" ', 'style="' + (o = "", i.color ? (o = i.color, 3 < (i.color.match(/[0-9]{1,3}/g) || []).length && (i.alpha && "rgb" == i.format || (o = "#" + F(Y(L(i.color))))), "background: " + o) : o) + '">', '<i class="layui-icon layui-colorpicker-trigger-i ' + (i.color ? x : P) + '"></i>', "</span>", "</span>", "</div>"].join("")),
  4491. r = i.elem = m(i.elem);
  4492. i.size && o.addClass("layui-colorpicker-" + i.size), r.addClass("layui-inline").html(e.elemColorBox = o), i.id = "id" in i ? i.id : r.attr("id") || e.index, e.color = e.elemColorBox.find("." + C)[0].style.background, e.events()
  4493. }, d.prototype.renderPicker = function () {
  4494. var o, e = this, i = e.config, r = e.elemColorBox[0],
  4495. t = e.elemPicker = m(['<div id="layui-colorpicker' + e.index + '" data-index="' + e.index + '" class="layui-anim layui-anim-downbit layui-colorpicker-main">', '<div class="layui-colorpicker-main-wrapper">', '<div class="layui-colorpicker-basis">', '<div class="layui-colorpicker-basis-white"></div>', '<div class="layui-colorpicker-basis-black"></div>', '<div class="layui-colorpicker-basis-cursor"></div>', "</div>", '<div class="layui-colorpicker-side">', '<div class="layui-colorpicker-side-slider"></div>', "</div>", "</div>", '<div class="layui-colorpicker-main-alpha ' + (i.alpha ? "layui-show" : "") + '">', '<div class="layui-colorpicker-alpha-bgcolor">', '<div class="layui-colorpicker-alpha-slider"></div>', "</div>", "</div>", i.predefine ? (o = ['<div class="layui-colorpicker-main-pre">'], layui.each(i.colors, function (e, i) {
  4496. o.push(['<div class="layui-colorpicker-pre' + (3 < (i.match(/[0-9]{1,3}/g) || []).length ? " layui-colorpicker-pre-isalpha" : "") + '">', '<div style="background:' + i + '"></div>', "</div>"].join(""))
  4497. }), o.push("</div>"), o.join("")) : "", '<div class="layui-colorpicker-main-input">', '<div class="layui-inline">', '<input type="text" class="layui-input">', "</div>", '<div class="layui-btn-container">', '<button class="layui-btn layui-btn-primary layui-btn-sm" colorpicker-events="clear">\u6e05\u7a7a</button>', '<button class="layui-btn layui-btn-sm" colorpicker-events="confirm">\u786e\u5b9a</button>', "</div", "</div>", "</div>"].join(""));
  4498. e.elemColorBox.find("." + C)[0];
  4499. m(a)[0] && m(a).data("index") == e.index ? e.removePicker(d.thisElemInd) : (e.removePicker(d.thisElemInd), m("body").append(t)), n.thisId = i.id, d.thisElemInd = e.index, d.thisColor = r.style.background, e.position(), e.pickerEvents()
  4500. }, d.prototype.removePicker = function (e) {
  4501. var i = this.config, e = m("#layui-colorpicker" + (e || this.index));
  4502. return e[0] && (e.remove(), delete n.thisId, "function" == typeof i.close && i.close(this.color)), this
  4503. }, d.prototype.position = function () {
  4504. var e = this, i = e.config;
  4505. return t.position(e.bindElem || e.elemColorBox[0], e.elemPicker[0], {position: i.position, align: "center"}), e
  4506. }, d.prototype.val = function () {
  4507. var e, i = this, o = (i.config, i.elemColorBox.find("." + C)), r = i.elemPicker.find("." + M),
  4508. t = o[0].style.backgroundColor;
  4509. t ? (e = Y(L(t)), o = o.attr("lay-type"), i.select(e.h, e.s, e.b), "torgb" === o ? r.find("input").val(t) : "rgba" === o ? (o = L(t), 3 === (t.match(/[0-9]{1,3}/g) || []).length ? (r.find("input").val("rgba(" + o.r + ", " + o.g + ", " + o.b + ", 1)"), i.elemPicker.find("." + T).css("left", 280)) : (r.find("input").val(t), t = 280 * t.slice(t.lastIndexOf(",") + 1, t.length - 1), i.elemPicker.find("." + T).css("left", t)), i.elemPicker.find("." + D)[0].style.background = "linear-gradient(to right, rgba(" + o.r + ", " + o.g + ", " + o.b + ", 0), rgb(" + o.r + ", " + o.g + ", " + o.b + "))") : r.find("input").val("#" + F(e))) : (i.select(0, 100, 100), r.find("input").val(""), i.elemPicker.find("." + D)[0].style.background = "", i.elemPicker.find("." + T).css("left", 280))
  4510. }, d.prototype.side = function () {
  4511. var n = this, l = n.config, c = n.elemColorBox.find("." + C), a = c.attr("lay-type"),
  4512. s = n.elemPicker.find(".layui-colorpicker-side"), e = n.elemPicker.find("." + B),
  4513. d = n.elemPicker.find("." + I), r = n.elemPicker.find("." + E), f = n.elemPicker.find("." + D),
  4514. u = n.elemPicker.find("." + T), g = e[0].offsetTop / 180 * 360, p = 100 - (r[0].offsetTop + 3) / 180 * 100,
  4515. h = (r[0].offsetLeft + 3) / 260 * 100, v = Math.round(u[0].offsetLeft / 280 * 100) / 100,
  4516. b = n.elemColorBox.find("." + w), i = n.elemPicker.find(".layui-colorpicker-pre").children("div"),
  4517. y = function (e, i, o, r) {
  4518. n.select(e, i, o);
  4519. var t = j({h: e, s: i, b: o}), e = F({h: e, s: i, b: o}), i = n.elemPicker.find("." + M).find("input");
  4520. b.addClass(x).removeClass(P), c[0].style.background = "rgb(" + t.r + ", " + t.g + ", " + t.b + ")", "torgb" === a ? i.val("rgb(" + t.r + ", " + t.g + ", " + t.b + ")") : "rgba" === a ? (u.css("left", 280 * r), i.val("rgba(" + t.r + ", " + t.g + ", " + t.b + ", " + r + ")"), c[0].style.background = "rgba(" + t.r + ", " + t.g + ", " + t.b + ", " + r + ")", f[0].style.background = "linear-gradient(to right, rgba(" + t.r + ", " + t.g + ", " + t.b + ", 0), rgb(" + t.r + ", " + t.g + ", " + t.b + "))") : i.val("#" + e), l.change && l.change(n.elemPicker.find("." + M).find("input").val())
  4521. }, o = m(['<div class="layui-auxiliar-moving" id="LAY-colorpicker-moving"></div>'].join("")),
  4522. k = function (e) {
  4523. m("#LAY-colorpicker-moving")[0] || m("body").append(o), o.on("mousemove", e), o.on("mouseup", function () {
  4524. o.remove()
  4525. }).on("mouseleave", function () {
  4526. o.remove()
  4527. })
  4528. };
  4529. e.on("mousedown", function (e) {
  4530. var r = this.offsetTop, t = e.clientY;
  4531. k(function (e) {
  4532. var i = r + (e.clientY - t), o = s[0].offsetHeight,
  4533. o = (i = o < (i = i < 0 ? 0 : i) ? o : i) / 180 * 360;
  4534. y(g = o, h, p, v), e.preventDefault()
  4535. }), e.preventDefault()
  4536. }), s.on("click", function (e) {
  4537. var i = e.clientY - m(this).offset().top + H.scrollTop(),
  4538. i = (i = (i = i < 0 ? 0 : i) > this.offsetHeight ? this.offsetHeight : i) / 180 * 360;
  4539. y(g = i, h, p, v), e.preventDefault()
  4540. }), r.on("mousedown", function (e) {
  4541. var n = this.offsetTop, l = this.offsetLeft, c = e.clientY, a = e.clientX;
  4542. layui.stope(e), k(function (e) {
  4543. var i = n + (e.clientY - c), o = l + (e.clientX - a), r = d[0].offsetHeight - 3,
  4544. t = d[0].offsetWidth - 3, t = ((o = t < (o = o < -3 ? -3 : o) ? t : o) + 3) / 260 * 100,
  4545. o = 100 - ((i = r < (i = i < -3 ? -3 : i) ? r : i) + 3) / 180 * 100;
  4546. y(g, h = t, p = o, v), e.preventDefault()
  4547. }), e.preventDefault()
  4548. }), d.on("mousedown", function (e) {
  4549. var i = e.clientY - m(this).offset().top - 3 + H.scrollTop(),
  4550. o = e.clientX - m(this).offset().left - 3 + H.scrollLeft(),
  4551. o = ((i = i < -3 ? -3 : i) > this.offsetHeight - 3 && (i = this.offsetHeight - 3), ((o = (o = o < -3 ? -3 : o) > this.offsetWidth - 3 ? this.offsetWidth - 3 : o) + 3) / 260 * 100),
  4552. i = 100 - (i + 3) / 180 * 100;
  4553. y(g, h = o, p = i, v), layui.stope(e), e.preventDefault(), r.trigger(e, "mousedown")
  4554. }), u.on("mousedown", function (e) {
  4555. var r = this.offsetLeft, t = e.clientX;
  4556. k(function (e) {
  4557. var i = r + (e.clientX - t), o = f[0].offsetWidth,
  4558. o = (o < (i = i < 0 ? 0 : i) && (i = o), Math.round(i / 280 * 100) / 100);
  4559. y(g, h, p, v = o), e.preventDefault()
  4560. }), e.preventDefault()
  4561. }), f.on("click", function (e) {
  4562. var i = e.clientX - m(this).offset().left,
  4563. i = ((i = i < 0 ? 0 : i) > this.offsetWidth && (i = this.offsetWidth), Math.round(i / 280 * 100) / 100);
  4564. y(g, h, p, v = i), e.preventDefault()
  4565. }), i.each(function () {
  4566. m(this).on("click", function () {
  4567. m(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");
  4568. var e = this.style.backgroundColor, i = Y(L(e)), o = e.slice(e.lastIndexOf(",") + 1, e.length - 1);
  4569. g = i.h, h = i.s, p = i.b, 3 === (e.match(/[0-9]{1,3}/g) || []).length && (o = 1), v = o, y(i.h, i.s, i.b, o)
  4570. })
  4571. })
  4572. }, d.prototype.select = function (e, i, o, r) {
  4573. this.config;
  4574. var t = F({h: e, s: 100, b: 100}), e = (F({h: e, s: i, b: o}), e / 360 * 180), o = 180 - o / 100 * 180 - 3,
  4575. i = i / 100 * 260 - 3;
  4576. this.elemPicker.find("." + B).css("top", e), this.elemPicker.find("." + I)[0].style.background = "#" + t, this.elemPicker.find("." + E).css({
  4577. top: o,
  4578. left: i
  4579. })
  4580. }, d.prototype.pickerEvents = function () {
  4581. var c = this, a = c.config, s = c.elemColorBox.find("." + C), d = c.elemPicker.find("." + M + " input"), o = {
  4582. clear: function (e) {
  4583. s[0].style.background = "", c.elemColorBox.find("." + w).removeClass(x).addClass(P), c.color = "", a.done && a.done(""), c.removePicker()
  4584. }, confirm: function (e, i) {
  4585. var o, r, t, n, l = d.val();
  4586. if (-1 < l.indexOf(",") ? (r = Y(L(l)), c.select(r.h, r.s, r.b), s[0].style.background = o = "#" + F(r), 3 < (l.match(/[0-9]{1,3}/g) || []).length && "rgba" === s.attr("lay-type") && (t = 280 * l.slice(l.lastIndexOf(",") + 1, l.length - 1), c.elemPicker.find("." + T).css("left", t), o = s[0].style.background = l)) : (3 === (t = -1 < (t = l).indexOf("#") ? t.substring(1) : t).length && (t = (n = t.split(""))[0] + n[0] + n[1] + n[1] + n[2] + n[2]), n = {
  4587. r: (t = parseInt(t, 16)) >> 16,
  4588. g: (65280 & t) >> 8,
  4589. b: 255 & t
  4590. }, r = Y(n), s[0].style.background = o = "#" + F(r), c.elemColorBox.find("." + w).removeClass(P).addClass(x)), "change" === i) return c.select(r.h, r.s, r.b, i), void (a.change && a.change(o));
  4591. c.color = l, a.done && a.done(l), c.removePicker()
  4592. }
  4593. };
  4594. c.elemPicker.on("click", "*[colorpicker-events]", function () {
  4595. var e = m(this), i = e.attr("colorpicker-events");
  4596. o[i] && o[i].call(this, e)
  4597. }), d.on("keyup", function (e) {
  4598. var i = m(this);
  4599. o.confirm.call(this, i, 13 === e.keyCode ? null : "change")
  4600. })
  4601. }, d.prototype.events = function () {
  4602. var e = this;
  4603. e.config;
  4604. e.elemColorBox.on("click", function () {
  4605. e.renderPicker(), m(a)[0] && (e.val(), e.side())
  4606. })
  4607. }, s.on(i, function (e) {
  4608. var i, o, r;
  4609. !n.thisId || (i = l.getThis(n.thisId)) && (o = i.config, r = i.elemColorBox.find("." + C), m(e.target).hasClass(c) || m(e.target).parents("." + c)[0] || m(e.target).hasClass(a.replace(/\./g, "")) || m(e.target).parents(a)[0] || i.elemPicker && (i.color ? (e = Y(L(i.color)), i.select(e.h, e.s, e.b)) : i.elemColorBox.find("." + w).removeClass(x).addClass(P), r[0].style.background = i.color || "", "function" == typeof o.cancel && o.cancel(i.color), i.removePicker()))
  4610. }), H.on("resize", function () {
  4611. if (n.thisId) {
  4612. var e = l.getThis(n.thisId);
  4613. if (e) return !(!e.elemPicker || !m(a)[0]) && void e.position()
  4614. }
  4615. }), l.that = {}, l.getThis = function (e) {
  4616. var i = l.that[e];
  4617. return i || o.error(e ? r + " instance with ID '" + e + "' not found" : "ID argument required"), i
  4618. }, n.render = function (e) {
  4619. e = new d(e);
  4620. return l.call(e)
  4621. }, e(r, n)
  4622. });
  4623. layui.define("jquery", function (t) {
  4624. "use strict";
  4625. var u = layui.$, d = (layui.hint(), layui.device()), o = "element", c = "layui-this", h = "layui-show",
  4626. r = ".layui-tab-title", i = function () {
  4627. this.config = {}
  4628. }, y = (i.prototype.set = function (t) {
  4629. return u.extend(!0, this.config, t), this
  4630. }, i.prototype.on = function (t, i) {
  4631. return layui.onevent.call(this, o, t, i)
  4632. }, i.prototype.tabAdd = function (t, i) {
  4633. var a, e = u(".layui-tab[lay-filter=" + t + "]"), l = e.children(r), n = l.children(".layui-tab-bar"),
  4634. e = e.children(".layui-tab-content"), s = "<li" + (a = [], layui.each(i, function (t, i) {
  4635. /^(title|content)$/.test(t) || a.push("lay-" + t + '="' + i + '"')
  4636. }), 0 < a.length && a.unshift(""), a.join(" ")) + ">" + (i.title || "unnaming") + "</li>";
  4637. return n[0] ? n.before(s) : l.append(s), e.append('<div class="layui-tab-item">' + (i.content || "") + "</div>"), i.change && this.tabChange(t, i.id), l.data("LAY_TAB_CHANGE", i.change), g.tabAuto(i.change ? "change" : null), this
  4638. }, i.prototype.tabDelete = function (t, i) {
  4639. t = u(".layui-tab[lay-filter=" + t + "]").children(r).find('>li[lay-id="' + i + '"]');
  4640. return g.tabDelete(null, t), this
  4641. }, i.prototype.tabChange = function (t, i) {
  4642. t = u(".layui-tab[lay-filter=" + t + "]").children(r).find('>li[lay-id="' + i + '"]');
  4643. return g.tabClick.call(t[0], {liElem: t}), this
  4644. }, i.prototype.tab = function (a) {
  4645. a = a || {}, e.on("click", a.headerElem, function (t) {
  4646. var i = u(this).index();
  4647. g.tabClick.call(this, {index: i, options: a})
  4648. })
  4649. }, i.prototype.progress = function (t, i) {
  4650. var a = "layui-progress", t = u("." + a + "[lay-filter=" + t + "]").find("." + a + "-bar"),
  4651. a = t.find("." + a + "-text");
  4652. return t.css("width", function () {
  4653. return /^.+\/.+$/.test(i) ? 100 * new Function("return " + i)() + "%" : i
  4654. }).attr("lay-percent", i), a.text(i), this
  4655. }, ".layui-nav"), f = "layui-nav-item", l = "layui-nav-bar", p = "layui-nav-tree", b = "layui-nav-child",
  4656. v = "layui-nav-more", m = "layui-anim layui-anim-upbit", g = {
  4657. tabClick: function (t) {
  4658. var i = (t = t || {}).options || {}, a = t.liElem || u(this),
  4659. e = i.headerElem ? a.parent() : a.parents(".layui-tab").eq(0),
  4660. i = i.bodyElem ? u(i.bodyElem) : e.children(".layui-tab-content").children(".layui-tab-item"),
  4661. l = a.find("a"), l = "javascript:;" !== l.attr("href") && "_blank" === l.attr("target"),
  4662. n = "string" == typeof a.attr("lay-unselect"), s = e.attr("lay-filter"),
  4663. t = "index" in t ? t.index : a.parent().children("li").index(a);
  4664. l || n || (a.addClass(c).siblings().removeClass(c), i.eq(t).addClass(h).siblings().removeClass(h)), layui.event.call(this, o, "tab(" + s + ")", {
  4665. elem: e,
  4666. index: t
  4667. })
  4668. }, tabDelete: function (t, i) {
  4669. var i = i || u(this).parent(), a = i.parent().children("li").index(i), e = i.closest(".layui-tab"),
  4670. l = e.children(".layui-tab-content").children(".layui-tab-item"), n = e.attr("lay-filter");
  4671. i.hasClass(c) && (i.next()[0] && i.next().is("li") ? g.tabClick.call(i.next()[0], {index: a + 1}) : i.prev()[0] && i.prev().is("li") && g.tabClick.call(i.prev()[0], null, a - 1)), i.remove(), l.eq(a).remove(), setTimeout(function () {
  4672. g.tabAuto()
  4673. }, 50), layui.event.call(this, o, "tabDelete(" + n + ")", {elem: e, index: a})
  4674. }, tabAuto: function (l) {
  4675. var n = "layui-tab-more", s = "layui-tab-bar", o = "layui-tab-close", c = this;
  4676. u(".layui-tab").each(function () {
  4677. var t, i = u(this), a = i.children(".layui-tab-title"),
  4678. e = (i.children(".layui-tab-content").children(".layui-tab-item"), 'lay-stope="tabmore"'),
  4679. e = u('<span class="layui-unselect layui-tab-bar" ' + e + "><i " + e + ' class="layui-icon">&#xe61a;</i></span>');
  4680. c === window && d.ie, i.attr("lay-allowclose") && a.find("li").each(function () {
  4681. var t, i = u(this);
  4682. i.find("." + o)[0] || ((t = u('<i class="layui-icon layui-icon-close layui-unselect ' + o + '"></i>')).on("click", g.tabDelete), i.append(t))
  4683. }), "string" != typeof i.attr("lay-unauto") && (a.prop("scrollWidth") > a.outerWidth() + 1 || a.find("li").length && a.height() > (t = a.find("li").eq(0).height()) + t / 2 ? ("change" === l && a.data("LAY_TAB_CHANGE") && a.addClass(n), a.find("." + s)[0] || (a.append(e), i.attr("overflow", ""), e.on("click", function (t) {
  4684. var i = a.hasClass(n);
  4685. a[i ? "removeClass" : "addClass"](n)
  4686. }))) : (a.find("." + s).remove(), i.removeAttr("overflow")))
  4687. })
  4688. }, hideTabMore: function (t) {
  4689. var i = u(".layui-tab-title");
  4690. !0 !== t && "tabmore" === u(t.target).attr("lay-stope") || (i.removeClass("layui-tab-more"), i.find(".layui-tab-bar").attr("title", ""))
  4691. }, clickThis: function () {
  4692. var t = u(this), i = t.parents(y), a = i.attr("lay-filter"), e = t.parent(), l = t.siblings("." + b),
  4693. n = "string" == typeof e.attr("lay-unselect");
  4694. "javascript:;" !== t.attr("href") && "_blank" === t.attr("target") || n || l[0] || (i.find("." + c).removeClass(c), e.addClass(c)), i.hasClass(p) && (l.removeClass(m), l[0] && (e["none" === l.css("display") ? "addClass" : "removeClass"](f + "ed"), "all" === i.attr("lay-shrink") && e.siblings().removeClass(f + "ed"))), layui.event.call(this, o, "nav(" + a + ")", t)
  4695. }, collapse: function () {
  4696. var t = u(this), i = t.find(".layui-colla-icon"), a = t.siblings(".layui-colla-content"),
  4697. e = t.parents(".layui-collapse").eq(0), l = e.attr("lay-filter"), n = "none" === a.css("display");
  4698. "string" == typeof e.attr("lay-accordion") && ((e = e.children(".layui-colla-item").children("." + h)).siblings(".layui-colla-title").children(".layui-colla-icon").html("&#xe602;"), e.removeClass(h)), a[n ? "addClass" : "removeClass"](h), i.html(n ? "&#xe61a;" : "&#xe602;"), layui.event.call(this, o, "collapse(" + l + ")", {
  4699. title: t,
  4700. content: a,
  4701. show: n
  4702. })
  4703. }
  4704. }, a = (i.prototype.render = i.prototype.init = function (t, i) {
  4705. var a = i ? '[lay-filter="' + i + '"]' : "", i = {
  4706. tab: function () {
  4707. g.tabAuto.call({})
  4708. }, nav: function () {
  4709. var s = {}, o = {}, c = {}, r = "layui-nav-title";
  4710. u(y + a).each(function (t) {
  4711. var i = u(this), a = u('<span class="' + l + '"></span>'), e = i.find("." + f);
  4712. i.find("." + l)[0] || (i.append(a), (i.hasClass(p) ? e.find("dd,>." + r) : e).on("mouseenter", function () {
  4713. !function (t, i, a) {
  4714. var e, l = u(this), n = l.find("." + b);
  4715. i.hasClass(p) ? n[0] || (e = l.children("." + r), t.css({
  4716. top: l.offset().top - i.offset().top,
  4717. height: (e[0] ? e : l).outerHeight(),
  4718. opacity: 1
  4719. })) : (n.addClass(m), n.hasClass("layui-nav-child-c") && n.css({left: -(n.outerWidth() - l.width()) / 2}), n[0] ? t.css({
  4720. left: t.position().left + t.width() / 2,
  4721. width: 0,
  4722. opacity: 0
  4723. }) : t.css({
  4724. left: l.position().left + parseFloat(l.css("marginLeft")),
  4725. top: l.position().top + l.height() - t.height()
  4726. }), s[a] = setTimeout(function () {
  4727. t.css({width: n[0] ? 0 : l.width(), opacity: n[0] ? 0 : 1})
  4728. }, d.ie && d.ie < 10 ? 0 : 200), clearTimeout(c[a]), "block" === n.css("display") && clearTimeout(o[a]), o[a] = setTimeout(function () {
  4729. n.addClass(h), l.find("." + v).addClass(v + "d")
  4730. }, 300))
  4731. }.call(this, a, i, t)
  4732. }).on("mouseleave", function () {
  4733. i.hasClass(p) ? a.css({
  4734. height: 0,
  4735. opacity: 0
  4736. }) : (clearTimeout(o[t]), o[t] = setTimeout(function () {
  4737. i.find("." + b).removeClass(h), i.find("." + v).removeClass(v + "d")
  4738. }, 300))
  4739. }), i.on("mouseleave", function () {
  4740. clearTimeout(s[t]), c[t] = setTimeout(function () {
  4741. i.hasClass(p) || a.css({width: 0, left: a.position().left + a.width() / 2, opacity: 0})
  4742. }, 200)
  4743. })), e.find("a").each(function () {
  4744. var t = u(this);
  4745. t.parent();
  4746. t.siblings("." + b)[0] && !t.children("." + v)[0] && t.append('<i class="layui-icon layui-icon-down ' + v + '"></i>'), t.off("click", g.clickThis).on("click", g.clickThis)
  4747. })
  4748. })
  4749. }, breadcrumb: function () {
  4750. u(".layui-breadcrumb" + a).each(function () {
  4751. var t = u(this), i = "lay-separator", a = t.attr(i) || "/", e = t.find("a");
  4752. e.next("span[" + i + "]")[0] || (e.each(function (t) {
  4753. t !== e.length - 1 && u(this).after("<span " + i + ">" + a + "</span>")
  4754. }), t.css("visibility", "visible"))
  4755. })
  4756. }, progress: function () {
  4757. var e = "layui-progress";
  4758. u("." + e + a).each(function () {
  4759. var t = u(this), i = t.find(".layui-progress-bar"), a = i.attr("lay-percent");
  4760. i.css("width", function () {
  4761. return /^.+\/.+$/.test(a) ? 100 * new Function("return " + a)() + "%" : a
  4762. }), t.attr("lay-showpercent") && setTimeout(function () {
  4763. i.html('<span class="' + e + '-text">' + a + "</span>")
  4764. }, 350)
  4765. })
  4766. }, collapse: function () {
  4767. u(".layui-collapse" + a).each(function () {
  4768. u(this).find(".layui-colla-item").each(function () {
  4769. var t = u(this), i = t.find(".layui-colla-title"),
  4770. t = "none" === t.find(".layui-colla-content").css("display");
  4771. i.find(".layui-colla-icon").remove(), i.append('<i class="layui-icon layui-colla-icon">' + (t ? "&#xe602;" : "&#xe61a;") + "</i>"), i.off("click", g.collapse).on("click", g.collapse)
  4772. })
  4773. })
  4774. }
  4775. };
  4776. return i[t] ? i[t]() : layui.each(i, function (t, i) {
  4777. i()
  4778. })
  4779. }, new i), e = u(document);
  4780. u(function () {
  4781. a.render()
  4782. }), e.on("click", ".layui-tab-title li", g.tabClick), u(window).on("resize", g.tabAuto), t(o, a)
  4783. });
  4784. layui.define(["lay", "layer"], function (e) {
  4785. "use strict";
  4786. var x = layui.$, i = layui.layer, b = layui.device(), t = {
  4787. config: {}, set: function (e) {
  4788. var i = this;
  4789. return i.config = x.extend({}, i.config, e), i
  4790. }, on: function (e, i) {
  4791. return layui.onevent.call(this, n, e, i)
  4792. }
  4793. }, n = "upload", a = "layui-upload-file", o = "layui-upload-form", F = "layui-upload-iframe",
  4794. w = "layui-upload-choose", L = function (e) {
  4795. var i = this;
  4796. i.config = x.extend({}, i.config, t.config, e), i.render()
  4797. };
  4798. L.prototype.config = {
  4799. accept: "images",
  4800. exts: "",
  4801. auto: !0,
  4802. bindAction: "",
  4803. url: "",
  4804. force: "",
  4805. field: "file",
  4806. acceptMime: "",
  4807. method: "post",
  4808. data: {},
  4809. drag: !0,
  4810. size: 0,
  4811. number: 0,
  4812. multiple: !1,
  4813. text: {
  4814. "cross-domain": "Cross-domain requests are not supported",
  4815. "data-format-error": "Please return JSON data format",
  4816. "check-error": "",
  4817. error: "",
  4818. "limit-number": null,
  4819. "limit-size": null
  4820. }
  4821. }, L.prototype.render = function (e) {
  4822. var i = this;
  4823. (e = i.config).elem = x(e.elem), e.bindAction = x(e.bindAction), i.file(), i.events()
  4824. }, L.prototype.file = function () {
  4825. var e = this, i = e.config,
  4826. t = e.elemFile = x(['<input class="' + a + '" type="file" accept="' + i.acceptMime + '" name="' + i.field + '"', i.multiple ? " multiple" : "", ">"].join("")),
  4827. n = i.elem.next();
  4828. (n.hasClass(a) || n.hasClass(o)) && n.remove(), b.ie && b.ie < 10 && i.elem.wrap('<div class="layui-upload-wrap"></div>'), e.isFile() ? (e.elemFile = i.elem, i.field = i.elem[0].name) : i.elem.after(t), b.ie && b.ie < 10 && e.initIE()
  4829. }, L.prototype.initIE = function () {
  4830. var t, e = this.config,
  4831. i = x('<iframe id="' + F + '" class="' + F + '" name="' + F + '" frameborder="0"></iframe>'),
  4832. n = x(['<form target="' + F + '" class="' + o + '" method="post" key="set-mine" enctype="multipart/form-data" action="' + e.url + '">', "</form>"].join(""));
  4833. x("#" + F)[0] || x("body").append(i), e.elem.next().hasClass(o) || (this.elemFile.wrap(n), e.elem.next("." + o).append((t = [], layui.each(e.data, function (e, i) {
  4834. i = "function" == typeof i ? i() : i, t.push('<input type="hidden" name="' + e + '" value="' + i + '">')
  4835. }), t.join(""))))
  4836. }, L.prototype.msg = function (e) {
  4837. return i.msg(e, {icon: 2, shift: 6})
  4838. }, L.prototype.isFile = function () {
  4839. var e = this.config.elem[0];
  4840. if (e) return "input" === e.tagName.toLocaleLowerCase() && "file" === e.type
  4841. }, L.prototype.preview = function (n) {
  4842. window.FileReader && layui.each(this.chooseFiles, function (e, i) {
  4843. var t = new FileReader;
  4844. t.readAsDataURL(i), t.onload = function () {
  4845. n && n(e, i, this.result)
  4846. }
  4847. })
  4848. }, L.prototype.upload = function (e, i) {
  4849. var t, n, a, o, r = this, u = r.config, c = u.text || {}, l = r.elemFile[0], f = function () {
  4850. return e || r.files || r.chooseFiles || l.files
  4851. }, s = function () {
  4852. var i = 0, a = 0, o = f(), l = function () {
  4853. u.multiple && i + a === r.fileLength && "function" == typeof u.allDone && u.allDone({
  4854. total: r.fileLength,
  4855. successful: i,
  4856. failed: a
  4857. })
  4858. }, t = function (t) {
  4859. var n = new FormData, e = (layui.each(u.data, function (e, i) {
  4860. i = "function" == typeof i ? i() : i, n.append(e, i)
  4861. }), t.unified ? layui.each(o, function (e, i) {
  4862. n.append(u.field, i)
  4863. }) : n.append(u.field, t.file), {
  4864. url: u.url,
  4865. type: "post",
  4866. data: n,
  4867. contentType: !1,
  4868. processData: !1,
  4869. dataType: "json",
  4870. headers: u.headers || {},
  4871. success: function (e) {
  4872. u.unified ? i += r.fileLength : i++, d(t.index, e), l()
  4873. },
  4874. error: function (e) {
  4875. u.unified ? a += r.fileLength : a++, r.msg(c.error || ["Upload failed, please try again.", "status: " + (e.status || "") + " - " + (e.statusText || "error")].join("<br>")), m(t.index), l()
  4876. }
  4877. });
  4878. "function" == typeof u.progress && (e.xhr = function () {
  4879. var e = x.ajaxSettings.xhr();
  4880. return e.upload.addEventListener("progress", function (e) {
  4881. var i;
  4882. e.lengthComputable && (i = Math.floor(e.loaded / e.total * 100), u.progress(i, (u.item || u.elem)[0], e, t.index))
  4883. }), e
  4884. }), x.ajax(e)
  4885. };
  4886. u.unified ? t({unified: !0, index: 0}) : layui.each(o, function (e, i) {
  4887. t({index: e, file: i})
  4888. })
  4889. }, p = function () {
  4890. var n = x("#" + F);
  4891. r.elemFile.parent().submit(), clearInterval(L.timer), L.timer = setInterval(function () {
  4892. var e, i = n.contents().find("body");
  4893. try {
  4894. e = i.text()
  4895. } catch (t) {
  4896. r.msg(c["cross-domain"]), clearInterval(L.timer), m()
  4897. }
  4898. e && (clearInterval(L.timer), i.html(""), d(0, e))
  4899. }, 30)
  4900. }, d = function (e, i) {
  4901. if (r.elemFile.next("." + w).remove(), l.value = "", "json" === u.force && "object" != typeof i) try {
  4902. i = JSON.parse(i)
  4903. } catch (t) {
  4904. return i = {}, r.msg(c["data-format-error"])
  4905. }
  4906. "function" == typeof u.done && u.done(i, e || 0, function (e) {
  4907. r.upload(e)
  4908. })
  4909. }, m = function (e) {
  4910. u.auto && (l.value = ""), "function" == typeof u.error && u.error(e || 0, function (e) {
  4911. r.upload(e)
  4912. })
  4913. }, h = u.exts, g = (n = [], layui.each(e || r.chooseFiles, function (e, i) {
  4914. n.push(i.name)
  4915. }), n), v = {
  4916. preview: function (e) {
  4917. r.preview(e)
  4918. }, upload: function (e, i) {
  4919. var t = {};
  4920. t[e] = i, r.upload(t)
  4921. }, pushFile: function () {
  4922. return r.files = r.files || {}, layui.each(r.chooseFiles, function (e, i) {
  4923. r.files[e] = i
  4924. }), r.files
  4925. }, resetFile: function (e, i, t) {
  4926. i = new File([i], t);
  4927. r.files = r.files || {}, r.files[e] = i
  4928. }
  4929. }, y = {
  4930. file: "\u6587\u4ef6",
  4931. images: "\u56fe\u7247",
  4932. video: "\u89c6\u9891",
  4933. audio: "\u97f3\u9891"
  4934. }[u.accept] || "\u6587\u4ef6", g = 0 === g.length ? l.value.match(/[^\/\\]+\..+/g) || [] || "" : g;
  4935. if (0 !== g.length) {
  4936. switch (u.accept) {
  4937. case"file":
  4938. layui.each(g, function (e, i) {
  4939. if (h && !RegExp(".\\.(" + h + ")$", "i").test(escape(i))) return t = !0
  4940. });
  4941. break;
  4942. case"video":
  4943. layui.each(g, function (e, i) {
  4944. if (!RegExp(".\\.(" + (h || "avi|mp4|wma|rmvb|rm|flash|3gp|flv") + ")$", "i").test(escape(i))) return t = !0
  4945. });
  4946. break;
  4947. case"audio":
  4948. layui.each(g, function (e, i) {
  4949. if (!RegExp(".\\.(" + (h || "mp3|wav|mid") + ")$", "i").test(escape(i))) return t = !0
  4950. });
  4951. break;
  4952. default:
  4953. layui.each(g, function (e, i) {
  4954. if (!RegExp(".\\.(" + (h || "jpg|png|gif|bmp|jpeg|svg") + ")$", "i").test(escape(i))) return t = !0
  4955. })
  4956. }
  4957. if (t) return r.msg(c["check-error"] || "\u9009\u62e9\u7684" + y + "\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"), l.value = "";
  4958. if ("choose" !== i && !u.auto || (u.choose && u.choose(v), "choose" !== i)) {
  4959. if (r.fileLength = (a = 0, y = f(), layui.each(y, function () {
  4960. a++
  4961. }), a), u.number && r.fileLength > u.number) return r.msg("function" == typeof c["limit-number"] ? c["limit-number"](u, r.fileLength) : "\u540c\u65f6\u6700\u591a\u53ea\u80fd\u4e0a\u4f20: " + u.number + " \u4e2a\u6587\u4ef6<br>\u60a8\u5f53\u524d\u5df2\u7ecf\u9009\u62e9\u4e86: " + r.fileLength + " \u4e2a\u6587\u4ef6");
  4962. if (0 < u.size && !(b.ie && b.ie < 10)) if (layui.each(f(), function (e, i) {
  4963. i.size > 1024 * u.size && (i = 1 <= (i = u.size / 1024) ? i.toFixed(2) + "MB" : u.size + "KB", l.value = "", o = i)
  4964. }), o) return r.msg("function" == typeof c["limit-size"] ? c["limit-size"](u, o) : "\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 " + o);
  4965. if (!u.before || !1 !== u.before(v)) b.ie ? (9 < b.ie ? s : p)() : s()
  4966. }
  4967. }
  4968. }, L.prototype.reload = function (e) {
  4969. delete (e = e || {}).elem, delete e.bindAction;
  4970. (e = this.config = x.extend({}, this.config, t.config, e)).elem.next().attr({
  4971. name: e.name,
  4972. accept: e.acceptMime,
  4973. multiple: e.multiple
  4974. })
  4975. }, L.prototype.events = function () {
  4976. var n = this, a = n.config, o = function (e) {
  4977. n.chooseFiles = {}, layui.each(e, function (e, i) {
  4978. var t = (new Date).getTime();
  4979. n.chooseFiles[t + "-" + e] = i
  4980. })
  4981. }, l = function (e, i) {
  4982. var t = n.elemFile,
  4983. e = (a.item || a.elem, 1 < e.length ? e.length + "\u4e2a\u6587\u4ef6" : (e[0] || {}).name || t[0].value.match(/[^\/\\]+\..+/g) || [] || "");
  4984. t.next().hasClass(w) && t.next().remove(), n.upload(null, "choose"), n.isFile() || a.choose || t.after('<span class="layui-inline ' + w + '">' + e + "</span>")
  4985. }, r = function () {
  4986. var e = x(this);
  4987. (e.attr("lay-data") || e.attr("lay-options")) && (n.config = x.extend({}, a, lay.options(this, {attr: e.attr("lay-data") ? "lay-data" : null})))
  4988. };
  4989. a.elem.off("upload.start").on("upload.start", function () {
  4990. var e = x(this);
  4991. r.call(this), n.config.item = e, n.elemFile[0].click()
  4992. }), b.ie && b.ie < 10 || a.elem.off("upload.over").on("upload.over", function () {
  4993. x(this).attr("lay-over", "")
  4994. }).off("upload.leave").on("upload.leave", function () {
  4995. x(this).removeAttr("lay-over")
  4996. }).off("upload.drop").on("upload.drop", function (e, i) {
  4997. var t = x(this), i = i.originalEvent.dataTransfer.files || [];
  4998. t.removeAttr("lay-over"), r.call(this), o(i), a.auto ? n.upload() : l(i)
  4999. }), n.elemFile.off("upload.change").on("upload.change", function () {
  5000. var e = this.files || [];
  5001. 0 !== e.length && (r.call(this), o(e), a.auto ? n.upload() : l(e))
  5002. }), a.bindAction.off("upload.action").on("upload.action", function () {
  5003. n.upload()
  5004. }), a.elem.data("haveEvents") || (n.elemFile.on("change", function () {
  5005. x(this).trigger("upload.change")
  5006. }), a.elem.on("click", function () {
  5007. n.isFile() || x(this).trigger("upload.start")
  5008. }), a.drag && a.elem.on("dragover", function (e) {
  5009. e.preventDefault(), x(this).trigger("upload.over")
  5010. }).on("dragleave", function (e) {
  5011. x(this).trigger("upload.leave")
  5012. }).on("drop", function (e) {
  5013. e.preventDefault(), x(this).trigger("upload.drop", e)
  5014. }), a.bindAction.on("click", function () {
  5015. x(this).trigger("upload.action")
  5016. }), a.elem.data("haveEvents", !0))
  5017. }, t.render = function (e) {
  5018. e = new L(e);
  5019. return function () {
  5020. var i = this;
  5021. return {
  5022. upload: function (e) {
  5023. i.upload.call(i, e)
  5024. }, reload: function (e) {
  5025. i.reload.call(i, e)
  5026. }, config: i.config
  5027. }
  5028. }.call(e)
  5029. }, e(n, t)
  5030. });
  5031. layui.define(["lay", "layer", "util"], function (e) {
  5032. "use strict";
  5033. var C = layui.$, y = layui.layer, d = layui.util, n = layui.hint(), w = (layui.device(), "form"), o = ".layui-form",
  5034. T = "layui-this", N = "layui-hide", $ = "layui-disabled", t = function () {
  5035. this.config = {
  5036. verify: {
  5037. required: [/[\S]+/, "\u5fc5\u586b\u9879\u4e0d\u80fd\u4e3a\u7a7a"],
  5038. phone: [/^1\d{10}$/, "\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7"],
  5039. email: [/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, "\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"],
  5040. url: [/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/, "\u94fe\u63a5\u683c\u5f0f\u4e0d\u6b63\u786e"],
  5041. number: function (e) {
  5042. if (isNaN(e)) return "\u53ea\u80fd\u586b\u5199\u6570\u5b57"
  5043. },
  5044. date: [/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/, "\u65e5\u671f\u683c\u5f0f\u4e0d\u6b63\u786e"],
  5045. identity: [/(^\d{15}$)|(^\d{17}(x|X|\d)$)/, "\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u8eab\u4efd\u8bc1\u53f7"]
  5046. }, verIncludeRequired: !1, autocomplete: null
  5047. }
  5048. }, i = (t.prototype.set = function (e) {
  5049. return C.extend(!0, this.config, e), this
  5050. }, t.prototype.verify = function (e) {
  5051. return C.extend(!0, this.config.verify, e), this
  5052. }, t.prototype.getFormElem = function (e) {
  5053. return C(o + (e ? '[lay-filter="' + e + '"]' : ""))
  5054. }, t.prototype.on = function (e, t) {
  5055. return layui.onevent.call(this, w, e, t)
  5056. }, t.prototype.val = function (e, i) {
  5057. return this.getFormElem(e).each(function (e, t) {
  5058. var a = C(this);
  5059. layui.each(i, function (e, t) {
  5060. var i, e = a.find('[name="' + e + '"]');
  5061. e[0] && ("checkbox" === (i = e[0].type) ? e[0].checked = t : "radio" === i ? e.each(function () {
  5062. this.checked = this.value == t
  5063. }) : e.val(t))
  5064. })
  5065. }), r.render(null, e), this.getValue(e)
  5066. }, t.prototype.getValue = function (e, t) {
  5067. t = t || this.getFormElem(e);
  5068. var a = {}, l = {}, e = t.find("input,select,textarea");
  5069. return layui.each(e, function (e, t) {
  5070. var i;
  5071. C(this);
  5072. t.name = (t.name || "").replace(/^\s*|\s*&/, ""), t.name && (/^.*\[\]$/.test(t.name) && (i = t.name.match(/^(.*)\[\]$/g)[0], a[i] = 0 | a[i], i = t.name.replace(/^(.*)\[\]$/, "$1[" + a[i]++ + "]")), /^(checkbox|radio)$/.test(t.type) && !t.checked || (l[i || t.name] = t.value))
  5073. }), l
  5074. }, t.prototype.render = function (e, t) {
  5075. var i = this.config, a = C(o + (t ? '[lay-filter="' + t + '"]' : "")), l = {
  5076. input: function (e) {
  5077. e = e || a.find("input,textarea");
  5078. i.autocomplete && e.attr("autocomplete", i.autocomplete), a.find("input[lay-affix],textarea[lay-affix]").each(function () {
  5079. var r = C(this), s = r.attr("lay-affix"), o = "layui-input-wrap", c = "layui-input-suffix",
  5080. u = "layui-input-affix", e = r.is("[disabled]") || r.is("[readonly]"), d = function (e, t) {
  5081. (e = C(e))[0] && e[C.trim(t) ? "removeClass" : "addClass"](N)
  5082. }, l = function (i) {
  5083. i = C.extend({}, f[s] || {value: s}, i, lay.options(r[0]));
  5084. var a, t = C('<div class="' + u + '">'), e = layui.isArray(i.value) ? i.value : [i.value],
  5085. e = C((a = [], layui.each(e, function (e, t) {
  5086. a.push('<i class="layui-icon layui-icon-' + t + (i.disabled ? " " + $ : "") + '"></i>')
  5087. }), a.join(""))),
  5088. l = (t.append(e), i.split && t.addClass("layui-input-split"), i.className && t.addClass(i.className), r.next("." + u)),
  5089. n = (l[0] && l.remove(), r.parent().hasClass(o) || r.wrap('<div class="' + o + '"></div>'), r.next("." + c));
  5090. n[0] ? ((l = n.find("." + u))[0] && l.remove(), n.prepend(t), r.css("padding-right", function () {
  5091. return (r.closest(".layui-input-group")[0] ? 0 : n.outerWidth()) + t.outerWidth()
  5092. })) : (t.addClass(c), r.after(t)), "auto" === i.show && d(t, r.val()), r.on("input propertychange", function () {
  5093. var e = this.value;
  5094. "auto" === i.show && d(t, e)
  5095. }), e.on("click", function () {
  5096. var e = r.attr("lay-filter");
  5097. C(this).hasClass($) || ("function" == typeof i.click && i.click.call(this, r, i), layui.event.call(this, w, "input-affix(" + e + ")", {
  5098. elem: r[0],
  5099. affix: s,
  5100. options: i
  5101. }))
  5102. })
  5103. }, f = {
  5104. eye: {
  5105. value: "eye-invisible", click: function (e, t) {
  5106. var i = "LAY_FORM_INPUT_AFFIX_SHOW", a = e.data(i);
  5107. e.attr("type", a ? "password" : "text").data(i, !a), l({value: a ? "eye-invisible" : "eye"})
  5108. }
  5109. },
  5110. clear: {
  5111. value: "clear", click: function (e) {
  5112. e.val("").focus(), d(C(this).parent(), null)
  5113. }, show: "auto", disabled: e
  5114. },
  5115. number: {
  5116. value: ["up", "down"],
  5117. split: !0,
  5118. className: "layui-input-number",
  5119. disabled: r.is("[disabled]"),
  5120. click: function (e) {
  5121. var t = C(this).index(), i = e.val(), a = i, l = Number(e.attr("step")) || 1,
  5122. n = Number(e.attr("min")), r = Number(e.attr("max"));
  5123. isNaN(i) || (i = Number(i), r < (i = (i = t ? i - l : i + l) < n ? n : i) && (i = r), t = function (e) {
  5124. return ((e.toString().match(/\.(\d+$)/) || [])[1] || "").length
  5125. }, (n = Math.max(t(l), t(a))) && (i = i.toFixed(n)), e.val(i))
  5126. }
  5127. }
  5128. };
  5129. l()
  5130. })
  5131. }, select: function (e) {
  5132. var p, c = "\u8bf7\u9009\u62e9", m = "layui-form-select", g = "layui-select-title",
  5133. x = "layui-select-none", k = "", e = e || a.find("select"), b = function (e, t) {
  5134. C(e.target).parent().hasClass(g) && !t || (C("." + m).removeClass(m + "ed " + m + "up"), p && k && p.val(k)), p = null
  5135. }, u = function (a, e, t) {
  5136. var s, r, i, l, o, n, c = C(this), u = a.find("." + g), d = u.find("input"), f = a.find("dl"),
  5137. h = f.children("dd"), y = f.children("dt"), v = this.selectedIndex;
  5138. e || (r = c.attr("lay-search"), i = function () {
  5139. var e = a.offset().top + a.outerHeight() + 5 - q.scrollTop(), t = f.outerHeight();
  5140. v = c[0].selectedIndex, a.addClass(m + "ed"), h.removeClass(N), y.removeClass(N), s = null, h.removeClass(T), 0 <= v && h.eq(v).addClass(T), e + t > q.height() && t <= e && a.addClass(m + "up"), o()
  5141. }, l = function (e) {
  5142. a.removeClass(m + "ed " + m + "up"), d.blur(), s = null, e || n(d.val(), function (e) {
  5143. var t = c[0].selectedIndex;
  5144. e && (k = C(c[0].options[t]).html(), 0 === t && k === d.attr("placeholder") && (k = ""), d.val(k || ""))
  5145. })
  5146. }, o = function () {
  5147. var e, t, i = f.children("dd." + T);
  5148. i[0] && (e = i.position().top, t = f.height(), i = i.height(), t < e && f.scrollTop(e + f.scrollTop() - t + i - 5), e < 0 && f.scrollTop(e + f.scrollTop() - 5))
  5149. }, u.on("click", function (e) {
  5150. a.hasClass(m + "ed") ? l() : (b(e, !0), i()), f.find("." + x).remove()
  5151. }), u.find(".layui-edge").on("click", function () {
  5152. d.focus()
  5153. }), d.on("keyup", function (e) {
  5154. 9 === e.keyCode && i()
  5155. }).on("keydown", function (n) {
  5156. var e = n.keyCode, r = (9 === e && l(), function (a, l) {
  5157. n.preventDefault();
  5158. var e = function () {
  5159. var e = f.children("dd." + T);
  5160. if (f.children("dd." + N)[0] && "next" === a) {
  5161. var t = f.children("dd:not(." + N + ",." + $ + ")"), i = t.eq(0).index();
  5162. if (0 <= i && i < e.index() && !t.hasClass(T)) return t.eq(0).prev()[0] ? t.eq(0).prev() : f.children(":last")
  5163. }
  5164. return l && l[0] ? l : s && s[0] ? s : e
  5165. }(), t = e[a](), i = e[a]("dd:not(." + N + ")");
  5166. return t[0] ? (s = e[a](), i[0] && !i.hasClass($) || !s[0] ? (i.addClass(T).siblings().removeClass(T), void o()) : r(a, s)) : s = null
  5167. });
  5168. 38 === e && r("prev"), 40 === e && r("next"), 13 === e && (n.preventDefault(), f.children("dd." + T).trigger("click"))
  5169. }), n = function (a, e, l) {
  5170. var n = 0, t = (layui.each(h, function () {
  5171. var e = C(this), t = e.text(),
  5172. i = ("cs" !== r && (t = t.toLowerCase(), a = a.toLowerCase()), -1 === t.indexOf(a));
  5173. ("" === a || "blur" === l ? a !== t : i) && n++, "keyup" === l && e[i ? "addClass" : "removeClass"](N)
  5174. }), "keyup" === l && layui.each(y, function () {
  5175. var e = C(this), t = e.nextUntil("dt").filter("dd");
  5176. e[t.length == t.filter("." + N).length ? "addClass" : "removeClass"](N)
  5177. }), n === h.length);
  5178. return e(t), t
  5179. }, t && d.on("input propertychange", function (e) {
  5180. var t = this.value, e = e.keyCode;
  5181. if (9 === e || 13 === e || 37 === e || 38 === e || 39 === e || 40 === e) return !1;
  5182. n(t, function (e) {
  5183. e ? f.find("." + x)[0] || f.append('<p class="' + x + '">\u65e0\u5339\u914d\u9879</p>') : f.find("." + x).remove()
  5184. }, "keyup"), "" === t && (c.val(""), f.find("." + T).removeClass(T), (c[0].options[0] || {}).value || f.children("dd:eq(0)").addClass(T), f.find("." + x).remove()), o()
  5185. }).on("blur", function (e) {
  5186. var t = c[0].selectedIndex;
  5187. p = d, k = C(c[0].options[t]).text(), 0 === t && k === d.attr("placeholder") && (k = ""), setTimeout(function () {
  5188. n(d.val(), function (e) {
  5189. k || d.val("")
  5190. }, "blur")
  5191. }, 200)
  5192. }), h.on("click", function () {
  5193. var e = C(this), t = e.attr("lay-value"), i = c.attr("lay-filter");
  5194. return e.hasClass($) || (e.hasClass("layui-select-tips") ? d.val("") : (d.val(e.text()), e.addClass(T)), e.siblings().removeClass(T), c.val(t).removeClass("layui-form-danger"), layui.event.call(this, w, "select(" + i + ")", {
  5195. elem: c[0],
  5196. value: t,
  5197. othis: a
  5198. }), l(!0)), !1
  5199. }), a.find("dl>dt").on("click", function (e) {
  5200. return !1
  5201. }), C(document).off("click", b).on("click", b))
  5202. };
  5203. e.each(function (e, t) {
  5204. var i = C(this), a = i.next("." + m), l = this.disabled, n = t.value,
  5205. r = C(t.options[t.selectedIndex]), t = t.options[0];
  5206. if ("string" == typeof i.attr("lay-ignore")) return i.show();
  5207. var s, o = "string" == typeof i.attr("lay-search"), t = t && !t.value && t.innerHTML || c,
  5208. r = C(['<div class="' + (o ? "" : "layui-unselect ") + m, (l ? " layui-select-disabled" : "") + '">', '<div class="' + g + '">', '<input type="text" placeholder="' + d.escape(C.trim(t)) + '" value="' + d.escape(C.trim(n ? r.html() : "")) + '"' + (!l && o ? "" : " readonly") + ' class="layui-input' + (o ? "" : " layui-unselect") + (l ? " " + $ : "") + '">', '<i class="layui-edge"></i></div>', '<dl class="layui-anim layui-anim-upbit' + (i.find("optgroup")[0] ? " layui-select-group" : "") + '">', (t = i.find("*"), s = [], layui.each(t, function (e, t) {
  5209. var i = t.tagName.toLowerCase();
  5210. 0 !== e || t.value || "optgroup" === i ? "optgroup" === i ? s.push("<dt>" + t.label + "</dt>") : s.push('<dd lay-value="' + d.escape(t.value) + '" class="' + (n === t.value ? T : "") + (t.disabled ? " " + $ : "") + '">' + C.trim(t.innerHTML) + "</dd>") : s.push('<dd lay-value="" class="layui-select-tips">' + C.trim(t.innerHTML || c) + "</dd>")
  5211. }), 0 === s.length && s.push('<dd lay-value="" class="' + $ + '">\u6ca1\u6709\u9009\u9879</dd>'), s.join("") + "</dl>"), "</div>"].join(""));
  5212. a[0] && a.remove(), i.after(r), u.call(this, r, l, o)
  5213. })
  5214. }, checkbox: function (e) {
  5215. var o = {
  5216. checkbox: ["layui-form-checkbox", "layui-form-checked", "checkbox"],
  5217. "switch": ["layui-form-switch", "layui-form-onswitch", "switch"],
  5218. SUBTRA: "layui-icon-indeterminate"
  5219. }, e = e || a.find("input[type=checkbox]");
  5220. e.each(function (e, t) {
  5221. var i = C(this), a = i.attr("lay-skin") || "primary",
  5222. l = d.escape(C.trim(t.title || (t.title = i.attr("lay-text") || ""))), n = this.disabled,
  5223. r = o[a] || o.checkbox, s = i.next("." + r[0]);
  5224. if (s[0] && s.remove(), i.next("[lay-checkbox]")[0] && (l = i.next().html() || ""), l = "switch" === a ? l.split("|") : [l], "string" == typeof i.attr("lay-ignore")) return i.show();
  5225. n = C(['<div class="layui-unselect ' + r[0], t.checked ? " " + r[1] : "", n ? " layui-checkbox-disabled " + $ : "", '"', a ? ' lay-skin="' + a + '"' : "", ">", (s = {
  5226. checkbox: [l[0] ? "<div>" + l[0] + "</div>" : "primary" === a ? "" : "<div></div>", '<i class="layui-icon ' + ("primary" === a && !t.checked && i.get(0).indeterminate ? o.SUBTRA : "layui-icon-ok") + '"></i>'].join(""),
  5227. "switch": "<div>" + ((t.checked ? l[0] : l[1]) || "") + "</div><i></i>"
  5228. })[a] || s.checkbox, "</div>"].join(""));
  5229. i.after(n), function (a, l) {
  5230. var n = C(this);
  5231. a.on("click", function () {
  5232. var e = C(this), t = n.attr("lay-filter"),
  5233. e = e.next("*[lay-checkbox]")[0] ? e.next().html() : n.attr("title") || "",
  5234. i = n.attr("lay-skin") || "primary", e = "switch" === i ? e.split("|") : [e];
  5235. n[0].disabled || (n[0].indeterminate && (n[0].indeterminate = !1, a.find("." + o.SUBTRA).removeClass(o.SUBTRA).addClass("layui-icon-ok")), n[0].checked ? (n[0].checked = !1, a.removeClass(l[1]), "switch" === i && a.children("div").html(e[1])) : (n[0].checked = !0, a.addClass(l[1]), "switch" === i && a.children("div").html(e[0])), layui.event.call(n[0], w, l[2] + "(" + t + ")", {
  5236. elem: n[0],
  5237. value: n[0].value,
  5238. othis: a
  5239. }))
  5240. })
  5241. }.call(this, n, r)
  5242. })
  5243. }, radio: function (e) {
  5244. var r = "layui-form-radio", s = ["layui-icon-radio", "layui-icon-circle"],
  5245. e = e || a.find("input[type=radio]");
  5246. e.each(function (e, t) {
  5247. var i = C(this), a = i.next("." + r), l = this.disabled;
  5248. if ("string" == typeof i.attr("lay-ignore")) return i.show();
  5249. a[0] && a.remove();
  5250. l = C(['<div class="layui-unselect ' + r, t.checked ? " " + r + "ed" : "", (l ? " layui-radio-disabled " + $ : "") + '">', '<i class="layui-anim layui-icon ' + s[t.checked ? 0 : 1] + '"></i>', "<div>" + (a = d.escape(t.title || ""), a = i.next("[lay-radio]")[0] ? i.next().html() : a) + "</div>", "</div>"].join(""));
  5251. i.after(l), function (a) {
  5252. var l = C(this), n = "layui-anim-scaleSpring";
  5253. a.on("click", function () {
  5254. var e = l[0].name, t = l.parents(o), i = l.attr("lay-filter"),
  5255. e = t.find("input[name=" + e.replace(/(\.|#|\[|\])/g, "\\$1") + "]");
  5256. l[0].disabled || (layui.each(e, function () {
  5257. var e = C(this).next("." + r);
  5258. this.checked = !1, e.removeClass(r + "ed"), e.children(".layui-icon").removeClass(n + " " + s[0]).addClass(s[1])
  5259. }), l[0].checked = !0, a.addClass(r + "ed"), a.children(".layui-icon").addClass(n + " " + s[0]), layui.event.call(l[0], w, "radio(" + i + ")", {
  5260. elem: l[0],
  5261. value: l[0].value,
  5262. othis: a
  5263. }))
  5264. })
  5265. }.call(this, l)
  5266. })
  5267. }
  5268. }, t = function () {
  5269. layui.each(l, function (e, t) {
  5270. t()
  5271. })
  5272. };
  5273. return "object" === layui.type(e) ? C(e).is(o) ? (a = C(e), t()) : e.each(function (e, t) {
  5274. var i = C(t);
  5275. i.closest(o).length && ("SELECT" === t.tagName ? l.select(i) : "INPUT" === t.tagName && ("checkbox" === (t = t.type) || "radio" === t ? l[t](i) : l.input(i)))
  5276. }) : e ? l[e] ? l[e]() : n.error('\u4e0d\u652f\u6301\u7684 "' + e + '" \u8868\u5355\u6e32\u67d3') : t(), this
  5277. }, t.prototype.validate = function (e) {
  5278. var u = null, d = this.config, f = d.verify, h = "layui-form-danger";
  5279. return !(e = C(e))[0] || (e.attr("lay-verify") !== undefined || !1 !== this.validate(e.find("*[lay-verify]"))) && (layui.each(e, function (e, r) {
  5280. var s = C(this), t = (s.attr("lay-verify") || "").split("|"), o = s.attr("lay-vertype"),
  5281. c = C.trim(s.val());
  5282. if (s.removeClass(h), layui.each(t, function (e, t) {
  5283. var i = "", a = f[t];
  5284. if (a) {
  5285. var l = "function" == typeof a ? i = a(c, r) : !a[0].test(c),
  5286. n = "select" === r.tagName.toLowerCase() || /^(checkbox|radio)$/.test(r.type), i = i || a[1];
  5287. if ("required" === t && (i = s.attr("lay-reqtext") || i), l && (d.verIncludeRequired || "required" === t || c && "required" !== t)) return "tips" === o ? y.tips(i, "string" != typeof s.attr("lay-ignore") && n ? s.next() : s, {tips: 1}) : "alert" === o ? y.alert(i, {
  5288. title: "\u63d0\u793a",
  5289. shadeClose: !0
  5290. }) : /\b(string|number)\b/.test(typeof i) && y.msg(i, {icon: 5, shift: 6}), setTimeout(function () {
  5291. (n ? s.next().find("input") : r).focus()
  5292. }, 7), s.addClass(h), u = !0
  5293. }
  5294. }), u) return u
  5295. }), !u)
  5296. }, t.prototype.submit = function (e, t) {
  5297. var i = C(this), e = "string" == typeof e ? e : i.attr("lay-filter"),
  5298. a = this.getFormElem ? this.getFormElem(e) : i.parents(o).eq(0), l = a.find("*[lay-verify]");
  5299. if (!r.validate(l)) return !1;
  5300. l = r.getValue(null, a), a = {
  5301. elem: this.getFormElem ? window.event && window.event.target : this,
  5302. form: (this.getFormElem ? a : i.parents("form"))[0],
  5303. field: l
  5304. };
  5305. return "function" == typeof t && t(a), layui.event.call(this, w, "submit(" + e + ")", a)
  5306. }), r = new t, t = C(document), q = C(window);
  5307. C(function () {
  5308. r.render()
  5309. }), t.on("reset", o, function () {
  5310. var e = C(this).attr("lay-filter");
  5311. setTimeout(function () {
  5312. r.render(null, e)
  5313. }, 50)
  5314. }), t.on("submit", o, i).on("click", "*[lay-submit]", i), e(w, r)
  5315. });
  5316. layui.define(["lay", "laytpl", "laypage", "form", "util"], function (n) {
  5317. "use strict";
  5318. var p = layui.$, r = layui.lay, m = layui.laytpl, O = layui.laypage, f = layui.layer, v = layui.form,
  5319. g = layui.util, y = layui.hint(), b = layui.device(), x = {
  5320. config: {
  5321. checkName: "LAY_CHECKED",
  5322. indexName: "LAY_INDEX",
  5323. numbersName: "LAY_NUM",
  5324. disabledName: "LAY_DISABLED"
  5325. }, cache: {}, index: layui.table ? layui.table.index + 1e4 : 0, set: function (e) {
  5326. var t = this;
  5327. return t.config = p.extend({}, t.config, e), t
  5328. }, on: function (e, t) {
  5329. return layui.onevent.call(this, T, e, t)
  5330. }
  5331. }, k = function () {
  5332. var a = this, e = a.config, i = e.id || e.index;
  5333. return {
  5334. config: e, reload: function (e, t) {
  5335. a.reload.call(a, e, t)
  5336. }, reloadData: function (e, t) {
  5337. x.reloadData(i, e, t)
  5338. }, setColsWidth: function () {
  5339. a.setColsWidth.call(a)
  5340. }, resize: function () {
  5341. a.resize.call(a)
  5342. }
  5343. }
  5344. }, C = function (e) {
  5345. var t = k.that[e];
  5346. return t || y.error(e ? "The table instance with ID '" + e + "' not found" : "ID argument required"), t || null
  5347. }, l = function (e) {
  5348. var t = k.config[e];
  5349. return t || y.error(e ? "The table instance with ID '" + e + "' not found" : "ID argument required"), t || null
  5350. }, w = function (e) {
  5351. var t = this.config || {}, a = (e = e || {}).item3, i = e.content;
  5352. "numbers" === a.type && (i = e.tplData[x.config.numbersName]);
  5353. ("escape" in a ? a : t).escape && (i = g.escape(i));
  5354. t = e.text && a.exportTemplet || a.templet || a.toolbar;
  5355. return t && (i = "function" == typeof t ? t.call(a, e.tplData, e.obj) : m(p(t).html() || String(i)).render(p.extend({LAY_COL: a}, e.tplData))), e.text ? p("<div>" + i + "</div>").text() : i
  5356. }, T = "table", t = ".layui-table", N = "layui-hide", h = "layui-hide-v", R = "layui-none", L = "layui-table-view",
  5357. o = ".layui-table-header", A = ".layui-table-body", D = ".layui-table-pageview", _ = ".layui-table-sort",
  5358. E = "layui-table-checked", W = "layui-table-edit", j = "layui-table-hover", z = "laytable-cell-group",
  5359. H = "layui-table-col-special", M = "layui-table-tool-panel", S = "layui-table-expanded",
  5360. F = "LAY_TABLE_MOVE_DICT", e = function (e) {
  5361. return ['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ', '{{# if(d.data.skin){ }}lay-skin="{{=d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{=d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>', "<thead>", "{{# layui.each(d.data.cols, function(i1, item1){ }}", "<tr>", "{{# layui.each(item1, function(i2, item2){ }}", '{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}', '{{# if(item2.fixed === "right"){ right = true; } }}', (e = e || {}).fixed && "right" !== e.fixed ? '{{# if(item2.fixed && item2.fixed !== "right"){ }}' : "right" === e.fixed ? '{{# if(item2.fixed === "right"){ }}' : "", "{{# var isSort = !(item2.colGroup) && item2.sort; }}", '<th data-field="{{= item2.field||i2 }}" data-key="{{=d.index}}-{{=i1}}-{{=i2}}" {{# if( item2.parentKey){ }}data-parentkey="{{= item2.parentKey }}"{{# } }} {{# if(item2.minWidth){ }}data-minwidth="{{=item2.minWidth}}"{{# } }} {{# if(item2.maxWidth){ }}data-maxwidth="{{=item2.maxWidth}}"{{# } }} {{#var colspan = layui.type(item2.colspan2) === \'number\' ? item2.colspan2 : item2.colspan; if(colspan){}} colspan="{{=colspan}}"{{#} if(item2.rowspan){}} rowspan="{{=item2.rowspan}}"{{#}}} {{# if(item2.unresize || item2.colGroup){ }}data-unresize="true"{{# } }} class="{{# if(item2.hide){ }}layui-hide{{# } }}{{# if(isSort){ }} layui-unselect{{# } }}{{# if(!item2.field){ }} layui-table-col-special{{# } }}"{{# if(item2.title){ }} title="{{ layui.$(\'<div>\' + item2.title + \'</div>\').text() }}"{{# } }}>', '<div class="layui-table-cell laytable-cell-', "{{# if(item2.colGroup){ }}", "group", "{{# } else { }}", "{{=d.index}}-{{=i1}}-{{=i2}}", '{{# if(item2.type !== "normal"){ }}', " laytable-cell-{{= item2.type }}", "{{# } }}", "{{# } }}", '" {{#if(item2.align){}}align="{{=item2.align}}"{{#}}}>', '{{# if(item2.type === "checkbox"){ }}', '<input type="checkbox" name="layTableCheckbox" lay-skin="primary" lay-filter="layTableAllChoose" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}>', "{{# } else { }}", '<span>{{-item2.title||""}}</span>', "{{# if(isSort){ }}", '<span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc" title="\u5347\u5e8f"></i><i class="layui-edge layui-table-sort-desc" title="\u964d\u5e8f"></i></span>', "{{# } }}", "{{# } }}", "</div>", "</th>", e.fixed ? "{{# }; }}" : "", "{{# }); }}", "</tr>", "{{# }); }}", "</thead>", "</table>"].join("")
  5362. },
  5363. a = ['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ', '{{# if(d.data.skin){ }}lay-skin="{{=d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{=d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>', "<tbody></tbody>", "</table>"].join(""),
  5364. s = [, "{{# if(d.data.toolbar){ }}", '<div class="layui-table-tool">', '<div class="layui-table-tool-temp"></div>', '<div class="layui-table-tool-self"></div>', "</div>", "{{# } }}", '<div class="layui-table-box">', "{{# if(d.data.loading){ }}", '<div class="layui-table-init" style="background-color: #fff;">', '<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>', "</div>", "{{# } }}", "{{# var left, right; }}", '<div class="layui-table-header">', e(), "</div>", '<div class="layui-table-body layui-table-main">', a, "</div>", "{{# if(left){ }}", '<div class="layui-table-fixed layui-table-fixed-l">', '<div class="layui-table-header">', e({fixed: !0}), "</div>", '<div class="layui-table-body">', a, "</div>", "</div>", "{{# }; }}", "{{# if(right){ }}", '<div class="layui-table-fixed layui-table-fixed-r layui-hide">', '<div class="layui-table-header">', e({fixed: "right"}), '<div class="layui-table-mend"></div>', "</div>", '<div class="layui-table-body">', a, "</div>", "</div>", "{{# }; }}", "</div>", "{{# if(d.data.totalRow){ }}", '<div class="layui-table-total">', '<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ', '{{# if(d.data.skin){ }}lay-skin="{{=d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{=d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>', '<tbody><tr><td><div class="layui-table-cell" style="visibility: hidden;">Total</div></td></tr></tbody>', "</table>", "</div>", "{{# } }}", '<div class="layui-table-column layui-table-page layui-hide">', '<div class="layui-inline layui-table-pageview" id="layui-table-page{{=d.index}}"></div>', "</div>", "<style>", "{{# layui.each(d.data.cols, function(i1, item1){", "layui.each(item1, function(i2, item2){ }}", ".laytable-cell-{{=d.index}}-{{=i1}}-{{=i2}}{ ", "{{# if(item2.width){ }}", "width: {{=item2.width}}px;", "{{# } }}", " }", "{{# });", "}); }}", "{{# if(d.data.lineStyle){", 'var cellClassName = ".layui-table-view-"+ d.index +" .layui-table-body .layui-table .layui-table-cell";', "}}", "{{= cellClassName }}{", "display: -webkit-box; -webkit-box-align: center; -moz-box-align: start; white-space: normal; {{- d.data.lineStyle }} ", "}", "{{= cellClassName }}:hover{overflow: auto;}", "{{# } }}", "{{# if(d.data.css){ }}", "{{- d.data.css }}", "{{# } }}", "</style>"].join(""),
  5365. d = p(window), P = p(document), i = function (e) {
  5366. this.index = ++x.index, this.config = p.extend({}, this.config, x.config, e), this.render()
  5367. }, c = (i.prototype.config = {
  5368. limit: 10,
  5369. loading: !0,
  5370. escape: !0,
  5371. cellMinWidth: 60,
  5372. cellMaxWidth: Number.MAX_VALUE,
  5373. editTrigger: "click",
  5374. defaultToolbar: ["filter", "exports", "print"],
  5375. defaultContextmenu: !0,
  5376. autoSort: !0,
  5377. text: {none: "\u65e0\u6570\u636e"},
  5378. cols: []
  5379. }, i.prototype.render = function (e) {
  5380. var t = this, a = t.config,
  5381. i = (a.elem = p(a.elem), a.where = a.where || {}, a.id = "id" in a ? a.id : a.elem.attr("id") || t.index);
  5382. if (k.that[i] = t, (k.config[i] = a).request = p.extend({
  5383. pageName: "page",
  5384. limitName: "limit"
  5385. }, a.request), a.response = p.extend({
  5386. statusName: "code",
  5387. statusCode: 0,
  5388. msgName: "msg",
  5389. dataName: "data",
  5390. totalRowName: "totalRow",
  5391. countName: "count"
  5392. }, a.response), null !== a.page && "object" == typeof a.page && (a.limit = a.page.limit || a.limit, a.limits = a.page.limits || a.limits, t.page = a.page.curr = a.page.curr || 1, delete a.page.elem, delete a.page.jump), !a.elem[0]) return t;
  5393. if (a.elem.attr("lay-filter") || a.elem.attr("lay-filter", a.id), "reloadData" === e) return t.pullData(t.page, {type: "reloadData"});
  5394. a.index = t.index, t.key = a.id || a.index, t.setInit(), a.height && /^full-\d+$/.test(a.height) ? (t.fullHeightGap = a.height.split("-")[1], a.height = d.height() - t.fullHeightGap) : a.height && /^#\w+\S*-\d+$/.test(a.height) && (i = a.height.split("-"), t.parentHeightGap = i.pop(), t.parentDiv = i.join("-"), a.height = p(t.parentDiv).height() - t.parentHeightGap);
  5395. var l, e = a.elem, i = e.next("." + L), n = t.elem = p("<div></div>");
  5396. n.addClass((l = [L, L + "-" + t.index, "layui-form", "layui-border-box"], a.className && l.push(a.className), l.join(" "))).attr({
  5397. "lay-filter": "LAY-TABLE-FORM-DF-" + t.index,
  5398. "lay-id": a.id,
  5399. style: (l = [], a.width && l.push("width:" + a.width + "px;"), l.join(""))
  5400. }).html(m(s, {open: "{{", close: "}}"}).render({
  5401. data: a,
  5402. index: t.index
  5403. })), i[0] && i.remove(), e.after(n), t.layTool = n.find(".layui-table-tool"), t.layBox = n.find(".layui-table-box"), t.layHeader = n.find(o), t.layMain = n.find(".layui-table-main"), t.layBody = n.find(A), t.layFixed = n.find(".layui-table-fixed"), t.layFixLeft = n.find(".layui-table-fixed-l"), t.layFixRight = n.find(".layui-table-fixed-r"), t.layTotal = n.find(".layui-table-total"), t.layPage = n.find(".layui-table-page"), t.renderToolbar(), t.renderPagebar(), t.fullSize(), t.pullData(t.page), t.events()
  5404. }, i.prototype.initOpts = function (e) {
  5405. this.config;
  5406. e.checkbox && (e.type = "checkbox"), e.space && (e.type = "space"), e.type || (e.type = "normal"), "normal" !== e.type && (e.unresize = !0, e.width = e.width || {
  5407. checkbox: 50,
  5408. radio: 50,
  5409. space: 30,
  5410. numbers: 60
  5411. }[e.type])
  5412. }, i.prototype.setInit = function (e) {
  5413. var l, a, d = this, r = d.config;
  5414. if (r.clientWidth = r.width || (l = function (e) {
  5415. var t, a = (e = e || r.elem.parent()).width();
  5416. try {
  5417. t = "none" === e.css("display")
  5418. } catch (i) {
  5419. }
  5420. return !e[0] || a && !t ? a : l(e.parent())
  5421. })(), "width" === e) return r.clientWidth;
  5422. r.height = r.maxHeight || r.height, r.css && -1 === r.css.indexOf(L) && (a = r.css.split("}"), layui.each(a, function (e, t) {
  5423. t && (a[e] = "." + L + "-" + d.index + " " + t)
  5424. }), r.css = a.join("}"));
  5425. var c = function (a, e, i, l) {
  5426. var n, o;
  5427. l ? (l.key = [r.index, a, i].join("-"), l.colspan = l.colspan || 0, l.rowspan = l.rowspan || 0, d.initOpts(l), (n = a + (parseInt(l.rowspan) || 1)) < r.cols.length ? (l.colGroup = !0, o = 0, layui.each(r.cols[n], function (e, t) {
  5428. t.HAS_PARENT || 1 <= o && o == (l.colspan || 1) || (t.HAS_PARENT = !0, t.parentKey = [r.index, a, i].join("-"), o += parseInt(1 < t.colspan ? t.colspan : 1), c(n, r.cols[n], e, t))
  5429. })) : l.colGroup = !1, l.hide = l.hide && !l.colGroup || !1) : e.splice(i, 1)
  5430. };
  5431. layui.each(r.cols, function (a, i) {
  5432. layui.each(i, function (e, t) {
  5433. a ? delete t.HAS_PARENT : c(a, i, e, t)
  5434. })
  5435. })
  5436. }, i.prototype.renderToolbar = function () {
  5437. var e = this.config,
  5438. t = ['<div class="layui-inline" lay-event="add"><i class="layui-icon layui-icon-add-1"></i></div>', '<div class="layui-inline" lay-event="update"><i class="layui-icon layui-icon-edit"></i></div>', '<div class="layui-inline" lay-event="delete"><i class="layui-icon layui-icon-delete"></i></div>'].join(""),
  5439. a = this.layTool.find(".layui-table-tool-temp"),
  5440. i = ("default" === e.toolbar ? a.html(t) : "string" == typeof e.toolbar && (t = p(e.toolbar).html() || "") && a.html(m(t).render(e)), {
  5441. filter: {
  5442. title: "\u7b5b\u9009\u5217",
  5443. layEvent: "LAYTABLE_COLS",
  5444. icon: "layui-icon-cols"
  5445. },
  5446. exports: {title: "\u5bfc\u51fa", layEvent: "LAYTABLE_EXPORT", icon: "layui-icon-export"},
  5447. print: {title: "\u6253\u5370", layEvent: "LAYTABLE_PRINT", icon: "layui-icon-print"}
  5448. }), l = [];
  5449. "object" == typeof e.defaultToolbar && layui.each(e.defaultToolbar, function (e, t) {
  5450. t = "string" == typeof t ? i[t] : t;
  5451. t && l.push('<div class="layui-inline" title="' + t.title + '" lay-event="' + t.layEvent + '"><i class="layui-icon ' + t.icon + '"></i></div>')
  5452. }), this.layTool.find(".layui-table-tool-self").html(l.join(""))
  5453. }, i.prototype.renderPagebar = function () {
  5454. var e, t = this.config, a = this.layPagebar = p('<div class="layui-inline layui-table-pagebar"></div>');
  5455. t.pagebar && ((e = p(t.pagebar).html() || "") && a.append(m(e).render(t)), this.layPage.append(a))
  5456. }, i.prototype.setParentCol = function (e, t) {
  5457. var a = this.config, i = this.layHeader.find('th[data-key="' + t + '"]'), l = parseInt(i.attr("colspan")) || 0;
  5458. i[0] && (t = t.split("-"), t = a.cols[t[1]][t[2]], e ? l-- : l++, i.attr("colspan", l), i[l ? "removeClass" : "addClass"](N), t.colspan2 = l, t.hide = l < 1, (a = i.data("parentkey")) && this.setParentCol(e, a))
  5459. }, i.prototype.setColsPatch = function () {
  5460. var a = this, e = a.config;
  5461. layui.each(e.cols, function (e, t) {
  5462. layui.each(t, function (e, t) {
  5463. t.hide && a.setParentCol(t.hide, t.parentKey)
  5464. })
  5465. })
  5466. }, i.prototype.setGroupWidth = function (i) {
  5467. var e, l = this;
  5468. l.config.cols.length <= 1 || ((e = l.layHeader.find((i ? "th[data-key=" + i.data("parentkey") + "]>" : "") + "." + z)).css("width", 0), layui.each(e.get().reverse(), function () {
  5469. var e = p(this), t = e.parent().data("key"), a = 0;
  5470. l.layHeader.eq(0).find("th[data-parentkey=" + t + "]").width(function (e, t) {
  5471. p(this).hasClass(N) || 0 < t && (a += t)
  5472. }), a && e.css("max-width", a - 1), i && e.parent().data("parentkey") && l.setGroupWidth(e.parent())
  5473. }), e.css("width", "auto"))
  5474. }, i.prototype.setColsWidth = function () {
  5475. var t, a, n = this, d = n.config, i = 0, r = 0, c = 0, s = 0, u = n.setInit("width"),
  5476. e = (n.eachCols(function (e, t) {
  5477. t.hide || i++
  5478. }), u = u - ("line" === d.skin || "nob" === d.skin ? 2 : i + 1) - n.getScrollWidth(n.layMain[0]) - 1, function (o) {
  5479. layui.each(d.cols, function (e, n) {
  5480. layui.each(n, function (e, t) {
  5481. var a = 0, i = t.minWidth || d.cellMinWidth, l = t.maxWidth || d.cellMaxWidth;
  5482. t ? t.colGroup || t.hide || (o ? c && c < i ? (r--, a = i) : c && l < c && (r--, a = l) : (a = t.width || 0, /\d+%$/.test(a) ? l < (a = (a = Math.floor(parseFloat(a) / 100 * u)) < i ? i : a) && (a = l) : a ? "normal" === t.type && (a < i && (t.width = a = i), l < a && (t.width = a = l)) : (t.width = a = 0, r++)), t.hide && (a = 0), s += a) : n.splice(e, 1)
  5483. })
  5484. }), s < u && 0 < r && (c = (u - s) / r)
  5485. }), l = (e(), e(!0), n.autoColNums = r = 0 < r ? r : 0, n.eachCols(function (e, a) {
  5486. var i = a.minWidth || d.cellMinWidth, l = a.maxWidth || d.cellMaxWidth;
  5487. a.colGroup || a.hide || (0 === a.width ? n.getCssRule(a.key, function (e) {
  5488. e.style.width = Math.floor(c < i ? i : l < c ? l : c) + "px"
  5489. }) : /\d+%$/.test(a.width) ? n.getCssRule(a.key, function (e) {
  5490. var t = Math.floor(parseFloat(a.width) / 100 * u);
  5491. e.style.width = (t = l < (t = t < i ? i : t) ? l : t) + "px"
  5492. }) : n.getCssRule(a.key, function (e) {
  5493. e.style.width = a.width + "px"
  5494. }))
  5495. }), n.layMain.width() - n.getScrollWidth(n.layMain[0]) - n.layMain.children("table").outerWidth());
  5496. 0 < n.autoColNums && -i <= l && l <= i && (e = (a = (t = function (e) {
  5497. return !(e = e || n.layHeader.eq(0).find("thead > tr:first-child > th:last-child")).data("field") && e.prev()[0] ? t(e.prev()) : e
  5498. })()).data("key"), n.getCssRule(e, function (e) {
  5499. var t = e.style.width || a.outerWidth();
  5500. e.style.width = parseFloat(t) + l + "px", 0 < n.layMain.height() - n.layMain.prop("clientHeight") && (e.style.width = parseFloat(e.style.width) - 1 + "px")
  5501. })), n.setGroupWidth(), n.layMain.find("tbody").is(":empty") ? (e = n.layHeader.first().children("table").width(), n.layMain.find("table").width(e)) : n.layMain.find("table").width("auto"), n.loading(!0)
  5502. }, i.prototype.resize = function () {
  5503. this.fullSize(), this.setColsWidth(), this.scrollPatch()
  5504. }, i.prototype.reload = function (e, t, a) {
  5505. var i = this;
  5506. e = e || {}, delete i.haveInit, layui.each(e, function (e, t) {
  5507. "array" === layui.type(t) && delete i.config[e]
  5508. }), i.config = p.extend(t, {}, i.config, e), "reloadData" !== a && (layui.each(i.config.cols, function (e, t) {
  5509. layui.each(t, function (e, t) {
  5510. delete t.colspan2
  5511. })
  5512. }), delete i.config.HAS_SET_COLS_PATCH), i.render(a)
  5513. }, i.prototype.errorView = function (e) {
  5514. var t = this, a = t.layMain.find("." + R), e = p('<div class="' + R + '">' + (e || "Error") + "</div>");
  5515. a[0] && (t.layNone.remove(), a.remove()), t.layFixed.addClass(N), t.layMain.find("tbody").html(""), t.layMain.append(t.layNone = e), t.layTotal.addClass(h), t.layPage.find(D).addClass(h), x.cache[t.key] = [], t.syncCheckAll(), t.renderForm(), t.setColsWidth()
  5516. }, i.prototype.page = 1, i.prototype.pullData = function (a, t) {
  5517. var e, i, l = this, n = l.config,
  5518. o = (n.HAS_SET_COLS_PATCH || l.setColsPatch(), n.HAS_SET_COLS_PATCH = !0, n.request), d = n.response,
  5519. r = function () {
  5520. "object" == typeof n.initSort && l.sort({
  5521. field: n.initSort.field,
  5522. type: n.initSort.type,
  5523. reloadType: t.type
  5524. })
  5525. }, c = function (e, t) {
  5526. l.setColsWidth(), "function" == typeof n.done && n.done(e, a, e[d.countName], t)
  5527. };
  5528. t = t || {}, "function" == typeof n.before && n.before(n), l.startTime = (new Date).getTime(), t.renderData ? ((e = {})[d.dataName] = x.cache[l.key], e[d.countName] = n.url ? "object" === layui.type(n.page) ? n.page.count : e[d.dataName].length : n.data.length, "object" == typeof n.totalRow && (e[d.totalRowName] = p.extend({}, l.totalRow)), l.renderData({
  5529. res: e,
  5530. curr: a,
  5531. count: e[d.countName],
  5532. type: t.type
  5533. }), r(), c(e, "renderData")) : n.url ? (i = {}, n.page && (i[o.pageName] = a, i[o.limitName] = n.limit), o = p.extend(i, n.where), n.contentType && 0 == n.contentType.indexOf("application/json") && (o = JSON.stringify(o)), l.loading(), p.ajax({
  5534. type: n.method || "get",
  5535. url: n.url,
  5536. contentType: n.contentType,
  5537. data: o,
  5538. dataType: n.dataType || "json",
  5539. jsonpCallback: n.jsonpCallback,
  5540. headers: n.headers || {},
  5541. success: function (e) {
  5542. (e = "function" == typeof n.parseData ? n.parseData(e) || e : e)[d.statusName] != d.statusCode ? l.errorView(e[d.msgName] || '\u8fd4\u56de\u7684\u6570\u636e\u4e0d\u7b26\u5408\u89c4\u8303\uff0c\u6b63\u786e\u7684\u6210\u529f\u72b6\u6001\u7801\u5e94\u4e3a\uff1a"' + d.statusName + '": ' + d.statusCode) : (l.totalRow = e[d.totalRowName], l.renderData({
  5543. res: e,
  5544. curr: a,
  5545. count: e[d.countName],
  5546. type: t.type
  5547. }), r(), n.time = (new Date).getTime() - l.startTime + " ms"), c(e)
  5548. },
  5549. error: function (e, t) {
  5550. l.errorView("\u8bf7\u6c42\u5f02\u5e38\uff0c\u9519\u8bef\u63d0\u793a\uff1a" + t), "function" == typeof n.error && n.error(e, t)
  5551. }
  5552. })) : "array" === layui.type(n.data) && (e = {}, i = a * n.limit - n.limit, o = n.data.concat(), e[d.dataName] = n.page ? o.splice(i, n.limit) : o, e[d.countName] = n.data.length, "object" == typeof n.totalRow && (e[d.totalRowName] = p.extend({}, n.totalRow)), l.totalRow = e[d.totalRowName], l.renderData({
  5553. res: e,
  5554. curr: a,
  5555. count: e[d.countName],
  5556. type: t.type
  5557. }), r(), c(e))
  5558. }, i.prototype.eachCols = function (e) {
  5559. return x.eachCols(null, e, this.config.cols), this
  5560. }, i.prototype.col = function (e) {
  5561. try {
  5562. return e = e.split("-"), this.config.cols[e[1]][e[2]] || {}
  5563. } catch (t) {
  5564. return y.error(t), {}
  5565. }
  5566. }, i.prototype.getTrHtml = function (a, l, n, e) {
  5567. var s = this, u = s.config, y = e && e.trs || [], h = e && e.trs_fixed || [], f = e && e.trs_fixed_r || [];
  5568. return n = n || 1, layui.each(a, function (e, o) {
  5569. var i = [], d = [], r = [], c = e + u.limit * (n - 1) + 1;
  5570. if ("object" != typeof o) {
  5571. a[e] = o = {LAY_KEY: o};
  5572. try {
  5573. x.cache[s.key][e] = o
  5574. } catch (t) {
  5575. }
  5576. }
  5577. "array" === layui.type(o) && 0 === o.length || (o[x.config.numbersName] = c, l || (o[x.config.indexName] = e), s.eachCols(function (e, l) {
  5578. var t, e = l.field || e, a = l.key, n = o[e];
  5579. n !== undefined && null !== n || (n = ""), l.colGroup || (t = ['<td data-field="' + e + '" data-key="' + a + '" ' + (e = [], (t = "function" == typeof l.edit ? l.edit(o) : l.edit) && e.push('data-edit="' + t + '"'), l.templet && e.push('data-content="' + g.escape(n) + '"'), l.toolbar && e.push('data-off="true"'), l.event && e.push('lay-event="' + l.event + '"'), l.minWidth && e.push('data-minwidth="' + l.minWidth + '"'), l.maxWidth && e.push('data-maxwidth="' + l.maxWidth + '"'), e.join(" ")) + ' class="' + (t = [], l.hide && t.push(N), l.field || t.push(H), t.join(" ")) + '">', '<div class="layui-table-cell laytable-cell-' + ("normal" === l.type ? a : a + " laytable-cell-" + l.type) + '"' + (l.align ? ' align="' + l.align + '"' : "") + (e = [], l.style && e.push('style="' + l.style + '"'), e.join(" ")) + ">" + function () {
  5580. var e, t = p.extend(!0, {LAY_COL: l}, o), a = x.config.checkName, i = x.config.disabledName;
  5581. switch (l.type) {
  5582. case"checkbox":
  5583. return '<input type="checkbox" name="layTableCheckbox" lay-skin="primary" ' + (e = [], l[a] && (o[a] = l[a], l[a] && (e[0] = "checked")), t[a] && (e[0] = "checked"), t[i] && e.push("disabled"), e.join(" ")) + ' lay-type="layTableCheckbox">';
  5584. case"radio":
  5585. return '<input type="radio" name="layTableRadio_' + u.index + '" ' + (e = [], t[a] && (e[0] = "checked"), t[i] && e.push("disabled"), e.join(" ")) + ' lay-type="layTableRadio">';
  5586. case"numbers":
  5587. return c
  5588. }
  5589. return l.toolbar ? m(p(l.toolbar).html() || "").render(t) : w.call(s, {
  5590. item3: l,
  5591. content: n,
  5592. tplData: t
  5593. })
  5594. }(), "</div></td>"].join(""), i.push(t), l.fixed && "right" !== l.fixed && d.push(t), "right" === l.fixed && r.push(t))
  5595. }), e = ['data-index="' + e + '"'], o[x.config.checkName] && e.push('class="' + E + '"'), e = e.join(" "), y.push("<tr " + e + ">" + i.join("") + "</tr>"), h.push("<tr " + e + ">" + d.join("") + "</tr>"), f.push("<tr " + e + ">" + r.join("") + "</tr>"))
  5596. }), {trs: y, trs_fixed: h, trs_fixed_r: f}
  5597. }, x.getTrHtml = function (e, t) {
  5598. e = C(e);
  5599. return e.getTrHtml(t, null, e.page)
  5600. }, i.prototype.renderData = function (e) {
  5601. var a = this, i = a.config, t = e.res, l = e.curr, n = a.count = e.count, o = e.sort,
  5602. d = t[i.response.dataName] || [], t = t[i.response.totalRowName], r = [], c = [], s = [], u = function () {
  5603. if (!o && a.sortKey) return a.sort({
  5604. field: a.sortKey.field,
  5605. type: a.sortKey.sort,
  5606. pull: !0,
  5607. reloadType: e.type
  5608. });
  5609. a.getTrHtml(d, o, l, {
  5610. trs: r,
  5611. trs_fixed: c,
  5612. trs_fixed_r: s
  5613. }), "fixed" === i.scrollPos && "reloadData" === e.type || a.layBody.scrollTop(0), "reset" === i.scrollPos && a.layBody.scrollLeft(0), a.layMain.find("." + R).remove(), a.layMain.find("tbody").html(r.join("")), a.layFixLeft.find("tbody").html(c.join("")), a.layFixRight.find("tbody").html(s.join("")), a.syncCheckAll(), a.renderForm(), a.fullSize(), a.haveInit ? a.scrollPatch() : setTimeout(function () {
  5614. a.scrollPatch()
  5615. }, 50), a.haveInit = !0
  5616. };
  5617. return x.cache[a.key] = d, a.layTotal[0 == d.length ? "addClass" : "removeClass"](h), a.layPage[i.page || i.pagebar ? "removeClass" : "addClass"](N), a.layPage.find(D)[!i.page || 0 == n || 0 === d.length && 1 == l ? "addClass" : "removeClass"](h), 0 === d.length ? a.errorView(i.text.none) : (a.layFixLeft.removeClass(N), o ? u() : (u(), a.renderTotal(d, t), a.layTotal && a.layTotal.removeClass(N), void (i.page && (i.page = p.extend({
  5618. elem: "layui-table-page" + i.index,
  5619. count: n,
  5620. limit: i.limit,
  5621. limits: i.limits || [10, 20, 30, 40, 50, 60, 70, 80, 90],
  5622. groups: 3,
  5623. layout: ["prev", "page", "next", "skip", "count", "limit"],
  5624. prev: '<i class="layui-icon">&#xe603;</i>',
  5625. next: '<i class="layui-icon">&#xe602;</i>',
  5626. jump: function (e, t) {
  5627. t || (a.page = e.curr, i.limit = e.limit, a.pullData(e.curr))
  5628. }
  5629. }, i.page), i.page.count = n, O.render(i.page)))))
  5630. }, x.renderData = function (e) {
  5631. e = C(e);
  5632. e && e.pullData(e.page, {renderData: !0, type: "reloadData"})
  5633. }, i.prototype.renderTotal = function (e, o) {
  5634. var d, r = this, c = r.config, s = {};
  5635. c.totalRow && (layui.each(e, function (e, i) {
  5636. "array" === layui.type(i) && 0 === i.length || r.eachCols(function (e, t) {
  5637. var e = t.field || e, a = i[e];
  5638. t.totalRow && (s[e] = (s[e] || 0) + (parseFloat(a) || 0))
  5639. })
  5640. }), r.dataTotal = [], d = [], r.eachCols(function (e, t) {
  5641. var a, e = t.field || e, i = o && o[t.field], l = "totalRowDecimals" in t ? t.totalRowDecimals : 2,
  5642. l = s[e] ? parseFloat(s[e] || 0).toFixed(l) : "",
  5643. l = (a = t.totalRowText || "", (n = {LAY_COL: t})[e] = l, n = t.totalRow && w.call(r, {
  5644. item3: t,
  5645. content: l,
  5646. tplData: n
  5647. }) || a, i || n), n = (t.field && r.dataTotal.push({
  5648. field: t.field,
  5649. total: p("<div>" + l + "</div>").text()
  5650. }), ['<td data-field="' + e + '" data-key="' + t.key + '" ' + (a = [], t.minWidth && a.push('data-minwidth="' + t.minWidth + '"'), t.maxWidth && a.push('data-maxwidth="' + t.maxWidth + '"'), a.join(" ")) + ' class="' + (n = [], t.hide && n.push(N), t.field || n.push(H), n.join(" ")) + '">', '<div class="layui-table-cell laytable-cell-' + (a = t.key, "normal" === t.type ? a : a + " laytable-cell-" + t.type) + '"' + (n = [], t.align && n.push('align="' + t.align + '"'), t.style && n.push('style="' + t.style + '"'), n.join(" ")) + ">" + ("string" == typeof (a = t.totalRow || c.totalRow) ? m(a).render(p.extend({
  5651. TOTAL_NUMS: i || s[e],
  5652. TOTAL_ROW: o || {},
  5653. LAY_COL: t
  5654. }, t)) : l), "</div></td>"].join(""));
  5655. d.push(n)
  5656. }), e = r.layTotal.find(".layui-table-patch"), r.layTotal.find("tbody").html("<tr>" + d.join("") + (e.length ? e.get(0).outerHTML : "") + "</tr>"))
  5657. }, i.prototype.getColElem = function (e, t) {
  5658. this.config;
  5659. return e.eq(0).find(".laytable-cell-" + t + ":eq(0)")
  5660. }, i.prototype.renderForm = function (e) {
  5661. this.config;
  5662. var t = this.elem.attr("lay-filter");
  5663. v.render(e, t)
  5664. }, i.prototype.syncCheckAll = function () {
  5665. var a, e = this, i = e.config, t = e.layHeader.find('input[name="layTableCheckbox"]'), l = x.checkStatus(e.key);
  5666. t[0] && (a = l.isAll, e.eachCols(function (e, t) {
  5667. "checkbox" === t.type && (t[i.checkName] = a)
  5668. }), t.prop({checked: l.isAll, indeterminate: !l.isAll && l.data.length}), v.render(t))
  5669. }, i.prototype.setRowActive = function (e, t, a) {
  5670. this.config;
  5671. e = this.layBody.find('tr[data-index="' + e + '"]');
  5672. if (t = t || "layui-table-click", a) return e.removeClass(t);
  5673. e.addClass(t), e.siblings("tr").removeClass(t)
  5674. }, i.prototype.setRowChecked = function (a) {
  5675. var e = this, i = e.config,
  5676. l = e.layBody.find("tr" + ("all" === a.index ? "" : '[data-index="' + a.index + '"]')),
  5677. t = (a = p.extend({type: "checkbox"}, a), x.cache[e.key]), n = "checked" in a, o = function (e) {
  5678. return "radio" === a.type || (n ? a.checked : !e)
  5679. }, t = (layui.each(t, function (e, t) {
  5680. "array" !== layui.type(t) && (Number(a.index) === e || "all" === a.index ? (e = t[i.checkName] = o(t[i.checkName]), l[e ? "addClass" : "removeClass"](E), "radio" === a.type && l.siblings().removeClass(E)) : "radio" === a.type && delete t[i.checkName])
  5681. }), l.find('input[lay-type="' + ({
  5682. radio: "layTableRadio",
  5683. checkbox: "layTableCheckbox"
  5684. }[a.type] || "checkbox") + '"]'));
  5685. t.prop("checked", o(t.last().prop("checked"))), e.syncCheckAll(), e.renderForm(a.type)
  5686. }, i.prototype.sort = function (l) {
  5687. var e, t = this, a = {}, i = t.config, n = i.elem.attr("lay-filter"), o = x.cache[t.key];
  5688. "string" == typeof (l = l || {}).field && (d = l.field, t.layHeader.find("th").each(function (e, t) {
  5689. var a = p(this), i = a.data("field");
  5690. if (i === l.field) return l.field = a, d = i, !1
  5691. }));
  5692. try {
  5693. var d = d || l.field.data("field"), r = l.field.data("key");
  5694. if (t.sortKey && !l.pull && d === t.sortKey.field && l.type === t.sortKey.sort) return;
  5695. var c = t.layHeader.find("th .laytable-cell-" + r).find(_);
  5696. t.layHeader.find("th").find(_).removeAttr("lay-sort"), c.attr("lay-sort", l.type || null), t.layFixed.find("th")
  5697. } catch (s) {
  5698. y.error("Table modules: sort field '" + d + "' not matched")
  5699. }
  5700. t.sortKey = {
  5701. field: d,
  5702. sort: l.type
  5703. }, i.autoSort && ("asc" === l.type ? e = layui.sort(o, d, null, !0) : "desc" === l.type ? e = layui.sort(o, d, !0, !0) : (e = layui.sort(o, x.config.indexName, null, !0), delete t.sortKey, delete i.initSort)), a[i.response.dataName] = e || o, t.renderData({
  5704. res: a,
  5705. curr: t.page,
  5706. count: t.count,
  5707. sort: !0,
  5708. type: l.reloadType
  5709. }), l.fromEvent && (i.initSort = {
  5710. field: d,
  5711. type: l.type
  5712. }, layui.event.call(l.field, T, "sort(" + n + ")", p.extend({config: i}, i.initSort)))
  5713. }, i.prototype.loading = function (e) {
  5714. var t = this;
  5715. t.config.loading && (e ? (t.layInit && t.layInit.remove(), delete t.layInit, t.layBox.find(".layui-table-init").remove()) : (t.layInit = p(['<div class="layui-table-init">', '<i class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop"></i>', "</div>"].join("")), t.layBox.append(t.layInit)))
  5716. }, i.prototype.getCssRule = function (a, i) {
  5717. var e = this.elem.children("style")[0], e = e.sheet || e.styleSheet || {}, e = e.cssRules || e.rules;
  5718. layui.each(e, function (e, t) {
  5719. if (t.selectorText === ".laytable-cell-" + a) return i(t), !0
  5720. })
  5721. }, i.prototype.fullSize = function () {
  5722. var e, a, i = this, t = i.config, l = t.height;
  5723. i.fullHeightGap ? (l = d.height() - i.fullHeightGap) < 135 && (l = 135) : i.parentDiv && i.parentHeightGap && (l = p(i.parentDiv).height() - i.parentHeightGap) < 135 && (l = 135), 1 < t.cols.length && (e = i.layFixed.find(o).find("th"), a = i.layHeader.first(), layui.each(e, function (e, t) {
  5724. (t = p(t)).height(a.find('th[data-key="' + t.attr("data-key") + '"]').height() + "px")
  5725. })), l && (e = parseFloat(l) - (i.layHeader.outerHeight() || 39), t.toolbar && (e -= i.layTool.outerHeight() || 51), t.totalRow && (e -= i.layTotal.outerHeight() || 40), (t.page || t.pagebar) && (e -= i.layPage.outerHeight() || 43), t.maxHeight ? layui.each({
  5726. elem: l,
  5727. layMain: e
  5728. }, function (e, t) {
  5729. i[e].css({height: "auto", maxHeight: t + "px"})
  5730. }) : i.layMain.outerHeight(e))
  5731. }, i.prototype.getScrollWidth = function (e) {
  5732. var t = 0;
  5733. return e ? t = e.offsetWidth - e.clientWidth : ((e = document.createElement("div")).style.width = "100px", e.style.height = "100px", e.style.overflowY = "scroll", document.body.appendChild(e), t = e.offsetWidth - e.clientWidth, document.body.removeChild(e)), t
  5734. }, i.prototype.scrollPatch = function () {
  5735. var e = this, t = e.layMain.children("table"), a = e.layMain.width() - e.layMain.prop("clientWidth"),
  5736. i = e.layMain.height() - e.layMain.prop("clientHeight"),
  5737. l = (e.getScrollWidth(e.layMain[0]), t.outerWidth() - e.layMain.width()), n = function (e) {
  5738. var t;
  5739. a && i ? (e = e.eq(0)).find(".layui-table-patch")[0] || ((t = p('<th class="layui-table-patch"><div class="layui-table-cell"></div></th>')).find("div").css({width: a}), e.find("tr").append(t)) : e.find(".layui-table-patch").remove()
  5740. };
  5741. n(e.layHeader), n(e.layTotal);
  5742. n = e.layMain.height() - i;
  5743. e.layFixed.find(A).css("height", t.height() >= n ? n : "auto").scrollTop(e.layMain.scrollTop()), e.layFixRight[x.cache[e.key] && x.cache[e.key].length && 0 < l ? "removeClass" : "addClass"](N), e.layFixRight.css("right", a - 1)
  5744. }, i.prototype.events = function () {
  5745. var s = this, u = s.config, r = u.elem.attr("lay-filter"), e = s.layHeader.find("th"), y = ".layui-table-cell",
  5746. o = p("body"), d = {}, c = (s.layTool.on("click", "*[lay-event]", function (e) {
  5747. var a, i = p(this), t = i.attr("lay-event"), l = function (e) {
  5748. var t = p(e.list), a = p('<ul class="' + M + '"></ul>');
  5749. a.html(t), u.height && a.css("max-height", u.height - (s.layTool.outerHeight() || 50)), i.find("." + M)[0] || i.append(a), s.renderForm(), a.on("click", function (e) {
  5750. layui.stope(e)
  5751. }), e.done && e.done(a, t)
  5752. };
  5753. switch (layui.stope(e), P.trigger("table.tool.panel.remove"), t) {
  5754. case"LAYTABLE_COLS":
  5755. l({
  5756. list: (a = [], s.eachCols(function (e, t) {
  5757. t.field && "normal" == t.type && a.push('<li><input type="checkbox" name="' + t.field + '" data-key="' + t.key + '" data-parentkey="' + (t.parentKey || "") + '" lay-skin="primary" ' + (t.hide ? "" : "checked") + ' title="' + g.escape(p("<div>" + (t.fieldTitle || t.title || t.field) + "</div>").text()) + '" lay-filter="LAY_TABLE_TOOL_COLS"></li>')
  5758. }), a.join("")), done: function () {
  5759. v.on("checkbox(LAY_TABLE_TOOL_COLS)", function (e) {
  5760. var e = p(e.elem), t = this.checked, a = e.data("key"), i = s.col(a), l = i.hide,
  5761. e = e.data("parentkey");
  5762. i.key && (i.hide = !t, s.elem.find('*[data-key="' + a + '"]')[t ? "removeClass" : "addClass"](N), l != i.hide && s.setParentCol(!t, e), s.resize(), layui.event.call(this, T, "colToggled(" + r + ")", {
  5763. col: i,
  5764. config: u
  5765. }))
  5766. })
  5767. }
  5768. });
  5769. break;
  5770. case"LAYTABLE_EXPORT":
  5771. b.ie ? f.tips("\u5bfc\u51fa\u529f\u80fd\u4e0d\u652f\u6301 IE\uff0c\u8bf7\u7528 Chrome \u7b49\u9ad8\u7ea7\u6d4f\u89c8\u5668\u5bfc\u51fa", this, {tips: 3}) : l({
  5772. list: ['<li data-type="csv">\u5bfc\u51fa csv \u683c\u5f0f\u6587\u4ef6</li>', '<li data-type="xls">\u5bfc\u51fa xls \u683c\u5f0f\u6587\u4ef6</li>'].join(""),
  5773. done: function (e, t) {
  5774. t.on("click", function () {
  5775. var e = p(this).data("type");
  5776. x.exportFile.call(s, u.id, null, e)
  5777. })
  5778. }
  5779. });
  5780. break;
  5781. case"LAYTABLE_PRINT":
  5782. var n = window.open("about:blank", "_blank"),
  5783. o = ["<style>", "body{font-size: 12px; color: #5F5F5F;}", "table{width: 100%; border-collapse: collapse; border-spacing: 0;}", "th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #5F5F5F;}", "a{color: #5F5F5F; text-decoration:none;}", "img{max-height: 100%;}", "*.layui-hide{display: none}", "</style>"].join(""),
  5784. d = p(s.layHeader.html());
  5785. d.append(s.layMain.find("table").html()), d.append(s.layTotal.find("table").html()), d.find("th.layui-table-patch").remove(), d.find("thead>tr>th." + H).filter(function (e, t) {
  5786. return !p(t).children("." + z).length
  5787. }).remove(), d.find("tbody>tr>td." + H).remove(), n.document.write(o + d.prop("outerHTML")), n.document.close(), layui.device("edg").edg ? (n.onafterprint = n.close, n.print()) : (n.print(), n.close())
  5788. }
  5789. layui.event.call(this, T, "toolbar(" + r + ")", p.extend({event: t, config: u}, {}))
  5790. }), s.layHeader.on("click", "*[lay-event]", function (e) {
  5791. var t = p(this), a = t.attr("lay-event"), t = t.closest("th").data("key"), t = s.col(t);
  5792. layui.event.call(this, T, "colTool(" + r + ")", p.extend({event: a, config: u, col: t}, {}))
  5793. }), s.layPagebar.on("click", "*[lay-event]", function (e) {
  5794. var t = p(this).attr("lay-event");
  5795. layui.event.call(this, T, "pagebar(" + r + ")", p.extend({event: t, config: u}, {}))
  5796. }), e.on("mousemove", function (e) {
  5797. var t = p(this), a = t.offset().left, e = e.clientX - a;
  5798. t.data("unresize") || k.eventMoveElem || (d.allowResize = t.width() - e <= 10, o.css("cursor", d.allowResize ? "col-resize" : ""))
  5799. }).on("mouseleave", function () {
  5800. p(this);
  5801. k.eventMoveElem || o.css("cursor", "")
  5802. }).on("mousedown", function (e) {
  5803. var t, a = p(this);
  5804. d.allowResize && (t = a.data("key"), e.preventDefault(), d.offset = [e.clientX, e.clientY], s.getCssRule(t, function (e) {
  5805. var t = e.style.width || a.outerWidth();
  5806. d.rule = e, d.ruleWidth = parseFloat(t), d.minWidth = a.data("minwidth") || u.cellMinWidth, d.maxWidth = a.data("maxwidth") || u.cellMaxWidth
  5807. }), a.data(F, d), k.eventMoveElem = a)
  5808. }), k.docEvent || P.on("mousemove", function (e) {
  5809. var t, a;
  5810. k.eventMoveElem && (t = k.eventMoveElem.data(F) || {}, k.eventMoveElem.data("resizing", 1), e.preventDefault(), t.rule && (e = t.ruleWidth + e.clientX - t.offset[0], a = k.eventMoveElem.closest("." + L).attr("lay-id"), (a = C(a)) && ((e = e < t.minWidth ? t.minWidth : e) > t.maxWidth && (e = t.maxWidth), t.rule.style.width = e + "px", a.setGroupWidth(k.eventMoveElem))))
  5811. }).on("mouseup", function (e) {
  5812. var t, a, i, l, n;
  5813. k.eventMoveElem && (i = (t = k.eventMoveElem).closest("." + L).attr("lay-id"), (a = C(i)) && (i = t.data("key"), l = a.col(i), n = a.config.elem.attr("lay-filter"), d = {}, o.css("cursor", ""), a.scrollPatch(), t.removeData(F), delete k.eventMoveElem, a.getCssRule(i, function (e) {
  5814. l.width = parseFloat(e.style.width), layui.event.call(t[0], T, "colResized(" + n + ")", {
  5815. col: l,
  5816. config: a.config
  5817. })
  5818. })))
  5819. }), k.docEvent = !0, e.on("click", function (e) {
  5820. var t = p(this), a = t.find(_), i = a.attr("lay-sort");
  5821. if (!a[0] || 1 === t.data("resizing")) return t.removeData("resizing");
  5822. s.sort({field: t, type: "asc" === i ? "desc" : "desc" === i ? null : "asc", fromEvent: !0})
  5823. }).find(_ + " .layui-edge ").on("click", function (e) {
  5824. var t = p(this), a = t.index(), t = t.parents("th").eq(0).data("field");
  5825. layui.stope(e), 0 === a ? s.sort({field: t, type: "asc", fromEvent: !0}) : s.sort({
  5826. field: t,
  5827. type: "desc",
  5828. fromEvent: !0
  5829. })
  5830. }), s.commonMember = function (e) {
  5831. var t = p(this).parents("tr").eq(0).data("index"), r = s.layBody.find('tr[data-index="' + t + '"]'),
  5832. c = (c = x.cache[s.key] || [])[t] || {}, a = {
  5833. tr: r, config: u, data: x.clearCacheKey(c), dataCache: c, index: t, del: function () {
  5834. x.cache[s.key][t] = [], r.remove(), s.scrollPatch()
  5835. }, update: function (e, d) {
  5836. e = e || {}, layui.each(e, function (i, l) {
  5837. var n = r.children('td[data-field="' + i + '"]'), o = n.children(y);
  5838. c[i] = a.data[i] = l, s.eachCols(function (e, t) {
  5839. var a;
  5840. t.field == i ? (o.html(w.call(s, {
  5841. item3: t,
  5842. content: l,
  5843. tplData: p.extend({LAY_COL: t}, c)
  5844. })), n.data("content", l)) : d && (t.templet || t.toolbar) && (e = r.children('td[data-field="' + (t.field || e) + '"]'), a = c[t.field], e.children(y).html(w.call(s, {
  5845. item3: t,
  5846. content: a,
  5847. tplData: p.extend({LAY_COL: t}, c)
  5848. })), e.data("content", a))
  5849. })
  5850. }), s.renderForm()
  5851. }, setRowChecked: function (e) {
  5852. s.setRowChecked(p.extend({index: t}, e))
  5853. }
  5854. };
  5855. return p.extend(a, e)
  5856. }), a = (s.elem.on("click", 'input[name="layTableCheckbox"]+', function (e) {
  5857. var t = p(this), a = t.closest("td"), t = t.prev(),
  5858. i = (s.layBody.find('input[name="layTableCheckbox"]'), t.parents("tr").eq(0).data("index")),
  5859. l = t[0].checked, n = "layTableAllChoose" === t.attr("lay-filter");
  5860. t[0].disabled || (n ? s.setRowChecked({index: "all", checked: l}) : (s.setRowChecked({
  5861. index: i,
  5862. checked: l
  5863. }), layui.stope(e)), layui.event.call(t[0], T, "checkbox(" + r + ")", c.call(t[0], {
  5864. checked: l,
  5865. type: n ? "all" : "one",
  5866. getCol: function () {
  5867. return s.col(a.data("key"))
  5868. }
  5869. })))
  5870. }), s.elem.on("click", 'input[lay-type="layTableRadio"]+', function (e) {
  5871. var t = p(this), a = t.closest("td"), t = t.prev(), i = t[0].checked,
  5872. l = t.parents("tr").eq(0).data("index");
  5873. if (layui.stope(e), t[0].disabled) return !1;
  5874. s.setRowChecked({
  5875. type: "radio",
  5876. index: l
  5877. }), layui.event.call(t[0], T, "radio(" + r + ")", c.call(t[0], {
  5878. checked: i, getCol: function () {
  5879. return s.col(a.data("key"))
  5880. }
  5881. }))
  5882. }), s.layBody.on("mouseenter", "tr", function () {
  5883. var e = p(this), t = e.index();
  5884. e.data("off") || s.layBody.find("tr:eq(" + t + ")").addClass(j)
  5885. }).on("mouseleave", "tr", function () {
  5886. var e = p(this), t = e.index();
  5887. e.data("off") || s.layBody.find("tr:eq(" + t + ")").removeClass(j)
  5888. }).on("click", "tr", function (e) {
  5889. var t = [".layui-form-checkbox", ".layui-form-switch", ".layui-form-radio", "[lay-unrow]"].join(",");
  5890. p(e.target).is(t) || p(e.target).closest(t)[0] || a.call(this, "row")
  5891. }).on("dblclick", "tr", function () {
  5892. a.call(this, "rowDouble")
  5893. }).on("contextmenu", "tr", function (e) {
  5894. u.defaultContextmenu || e.preventDefault(), a.call(this, "rowContextmenu")
  5895. }), function (e) {
  5896. var t = p(this);
  5897. t.data("off") || layui.event.call(this, T, e + "(" + r + ")", c.call(t.children("td")[0]))
  5898. }), n = function (e, t) {
  5899. var a, i, l, n;
  5900. (e = p(e)).data("off") || (a = e.data("field"), n = e.data("key"), n = s.col(n), i = e.closest("tr").data("index"), i = x.cache[s.key][i], l = e.children(y), (n = "function" == typeof n.edit ? n.edit(i) : n.edit) && ((n = p("textarea" === n ? '<textarea class="layui-input ' + W + '" lay-unrow></textarea>' : '<input class="layui-input ' + W + '" lay-unrow>'))[0].value = e.data("content") || i[a] || l.text(), e.find("." + W)[0] || e.append(n), n.focus(), t && layui.stope(t)))
  5901. }, i = (s.layBody.on("change", "." + W, function () {
  5902. var e = p(this), t = e.parent(), a = this.value, i = e.parent().data("field"),
  5903. e = e.closest("tr").data("index"), e = x.cache[s.key][e], l = c.call(t[0], {
  5904. value: a, field: i, oldValue: e[i], td: t, reedit: function () {
  5905. setTimeout(function () {
  5906. n(l.td);
  5907. var e = {};
  5908. e[i] = l.oldValue, l.update(e)
  5909. })
  5910. }, getCol: function () {
  5911. return s.col(t.data("key"))
  5912. }
  5913. }), e = {};
  5914. e[i] = a, l.update(e), layui.event.call(t[0], T, "edit(" + r + ")", l)
  5915. }).on("blur", "." + W, function () {
  5916. p(this).remove()
  5917. }), s.layBody.on(u.editTrigger, "td", function (e) {
  5918. n(this, e)
  5919. }).on("mouseenter", "td", function () {
  5920. t.call(this)
  5921. }).on("mouseleave", "td", function () {
  5922. t.call(this, "hide")
  5923. }), s.layTotal.on("mouseenter", "td", function () {
  5924. t.call(this)
  5925. }).on("mouseleave", "td", function () {
  5926. t.call(this, "hide")
  5927. }), "layui-table-grid-down"), t = function (e) {
  5928. var t = p(this), a = t.children(y);
  5929. t.data("off") || t.parent().hasClass(S) || (e ? t.find(".layui-table-grid-down").remove() : !(a.prop("scrollWidth") > a.outerWidth() || 0 < a.find("br").length) || u.lineStyle || a.find("." + i)[0] || t.append('<div class="' + i + '"><i class="layui-icon layui-icon-down"></i></div>'))
  5930. }, l = function (e) {
  5931. var t = p(this), a = t.parent(), i = a.data("key"), l = s.col(i), n = a.parent().data("index"),
  5932. a = a.children(y), o = "layui-table-cell-c", d = p('<i class="layui-icon layui-icon-up ' + o + '">');
  5933. s.elem.find("." + o).trigger("click"), s.getCssRule(i, function (e) {
  5934. var t = e.style.width, a = l.expandedWidth || s.elem.width() / 3;
  5935. a < parseFloat(t) && (a = parseFloat(t)), d.data("cell-width", t), e.style.width = a + "px", s.scrollPatch()
  5936. }), s.setRowActive(n, S), a.next("." + o)[0] || a.after(d), d.on("click", function () {
  5937. var t = p(this);
  5938. s.setRowActive(n, S, !0), s.getCssRule(i, function (e) {
  5939. e.style.width = t.data("cell-width"), s.resize()
  5940. }), t.remove()
  5941. }), t.remove(), layui.stope(e)
  5942. }, h = (s.layBody.on("click", "." + i, function (e) {
  5943. l.call(this, e)
  5944. }), s.layTotal.on("click", "." + i, function (e) {
  5945. l.call(this, e)
  5946. }), function (e) {
  5947. var t = p(this), a = t.closest("td"), i = t.parents("tr").eq(0).data("index");
  5948. s.setRowActive(i), layui.event.call(this, T, (e || "tool") + "(" + r + ")", c.call(this, {
  5949. event: t.attr("lay-event"),
  5950. getCol: function () {
  5951. return s.col(a.data("key"))
  5952. }
  5953. }))
  5954. });
  5955. s.layBody.on("click", "*[lay-event]", function (e) {
  5956. h.call(this), layui.stope(e)
  5957. }).on("dblclick", "*[lay-event]", function (e) {
  5958. h.call(this, "toolDouble"), layui.stope(e)
  5959. }), s.layMain.on("scroll", function () {
  5960. var e = p(this), t = e.scrollLeft(), e = e.scrollTop();
  5961. s.layHeader.scrollLeft(t), s.layTotal.scrollLeft(t), s.layFixed.find(A).scrollTop(e), f.close(s.tipsIndex)
  5962. })
  5963. }, d.on("resize", function () {
  5964. layui.each(k.that, function () {
  5965. this.resize()
  5966. })
  5967. }), P.on("click", function () {
  5968. P.trigger("table.remove.tool.panel")
  5969. }), P.on("table.remove.tool.panel", function () {
  5970. p("." + M).remove()
  5971. }), x.init = function (i, o) {
  5972. o = o || {};
  5973. var e = "object" == typeof i ? i : p("string" == typeof i ? 'table[lay-filter="' + i + '"]' : t + "[lay-data], " + t + "[lay-options]"),
  5974. d = "Table element property lay-data configuration item has a syntax error: ";
  5975. return e.each(function () {
  5976. var l, e = p(this), t = e.attr("lay-data"),
  5977. t = r.options(this, {attr: t ? "lay-data" : null, errorText: d + (t || e.attr("lay-options"))}),
  5978. n = p.extend({
  5979. elem: this,
  5980. cols: [],
  5981. data: [],
  5982. skin: e.attr("lay-skin"),
  5983. size: e.attr("lay-size"),
  5984. even: "string" == typeof e.attr("lay-even")
  5985. }, x.config, o, t), a = (i && e.hide(), e.find("thead>tr").each(function (i) {
  5986. n.cols[i] = [], p(this).children().each(function (e) {
  5987. var t = p(this), a = t.attr("lay-data"),
  5988. a = r.options(this, {attr: a ? "lay-data" : null, errorText: d + (a || t.attr("lay-options"))}),
  5989. t = p.extend({
  5990. title: t.text(),
  5991. colspan: parseInt(t.attr("colspan")) || 1,
  5992. rowspan: parseInt(t.attr("rowspan")) || 1
  5993. }, a);
  5994. n.cols[i].push(t)
  5995. })
  5996. }), e.find("tbody>tr")), t = x.render(n);
  5997. !a.length || o.data || t.config.url || (l = 0, x.eachCols(t.config.id, function (e, i) {
  5998. a.each(function (e) {
  5999. n.data[e] = n.data[e] || {};
  6000. var t = p(this), a = i.field;
  6001. n.data[e][a] = t.children("td").eq(l).html()
  6002. }), l++
  6003. }), t.reloadData({data: n.data}))
  6004. }), this
  6005. }, k.that = {}, k.config = {}, function (a, i, e, l) {
  6006. var n, o;
  6007. l.colGroup && (n = 0, a++, l.CHILD_COLS = [], o = e + (parseInt(l.rowspan) || 1), layui.each(i[o], function (e, t) {
  6008. t.parentKey ? t.parentKey === l.key && (t.PARENT_COL_INDEX = a, l.CHILD_COLS.push(t), c(a, i, o, t)) : t.PARENT_COL_INDEX || 1 <= n && n == (l.colspan || 1) || (t.PARENT_COL_INDEX = a, l.CHILD_COLS.push(t), n += parseInt(1 < t.colspan ? t.colspan : 1), c(a, i, o, t))
  6009. }))
  6010. });
  6011. x.eachCols = function (e, a, i) {
  6012. var e = k.config[e] || {}, l = [], n = (i = p.extend(!0, [], i || e.cols), layui.each(i, function (a, e) {
  6013. if (a) return !0;
  6014. layui.each(e, function (e, t) {
  6015. c(0, i, a, t), t.PARENT_COL_INDEX || l.push(t)
  6016. })
  6017. }), function (e) {
  6018. layui.each(e || l, function (e, t) {
  6019. if (t.CHILD_COLS) return n(t.CHILD_COLS);
  6020. "function" == typeof a && a(e, t)
  6021. })
  6022. });
  6023. n()
  6024. }, x.checkStatus = function (e) {
  6025. var a = 0, i = 0, l = [], e = x.cache[e] || [];
  6026. return layui.each(e, function (e, t) {
  6027. "array" === layui.type(t) ? i++ : t[x.config.checkName] && (a++, t[x.config.disabledName] || l.push(x.clearCacheKey(t)))
  6028. }), {data: l, isAll: !!e.length && a === e.length - i}
  6029. }, x.setRowChecked = function (e, t) {
  6030. e = C(e);
  6031. e && e.setRowChecked(t)
  6032. }, x.getData = function (e) {
  6033. var a = [], e = x.cache[e] || [];
  6034. return layui.each(e, function (e, t) {
  6035. "array" !== layui.type(t) && a.push(x.clearCacheKey(t))
  6036. }), a
  6037. }, x.resize = function (e) {
  6038. e ? l(e) && C(e).resize() : layui.each(k.that, function () {
  6039. this.resize()
  6040. })
  6041. }, x.exportFile = function (e, t, a) {
  6042. t = t || x.clearCacheKey(x.cache[e]);
  6043. var o, d, i, r, l = (a = "object" == typeof a ? a : (l = {}, a && (l.type = a), l)).type || "csv",
  6044. c = k.that[e], n = k.config[e] || {}, s = {csv: "text/csv", xls: "application/vnd.ms-excel"}[l],
  6045. u = document.createElement("a");
  6046. if (b.ie) return y.error("IE_NOT_SUPPORT_EXPORTS");
  6047. u.href = "data:" + s + ";charset=utf-8,\ufeff" + encodeURIComponent((o = [], d = [], i = [], r = {}, layui.each(t, function (i, l) {
  6048. var n = [];
  6049. "object" == typeof e ? (layui.each(e, function (e, t) {
  6050. 0 == i && o.push(t || "")
  6051. }), layui.each(layui.isArray(l) ? p.extend([], l) : x.clearCacheKey(l), function (e, t) {
  6052. n.push('"' + (t || "") + '"')
  6053. })) : x.eachCols(e, function (e, t) {
  6054. var a;
  6055. (!1 === t.ignoreExport || t.field && "normal" == t.type) && (t.hide || t.ignoreExport ? 0 == i && (r[t.field] = !0) : ((a = l[t.field]) !== undefined && null !== a || (a = ""), 0 == i && o.push(t.fieldTitle || t.title || t.field || ""), a = (a = w.call(c, {
  6056. item3: t,
  6057. content: a,
  6058. tplData: l,
  6059. text: "text",
  6060. obj: {
  6061. td: function (e) {
  6062. return c.layBody.find('tr[data-index="' + i + '"]>td').filter('[data-field="' + e + '"]')
  6063. }
  6064. }
  6065. })).replace(/"/g, '""'), n.push(a = '"' + a + '"')))
  6066. }), d.push(n.join(","))
  6067. }), c && layui.each(c.dataTotal, function (e, t) {
  6068. r[t.field] || i.push('"' + (t.total || "") + '"')
  6069. }), o.join(",") + "\r\n" + d.join("\r\n") + "\r\n" + i.join(","))), u.download = (a.title || n.title || "table_" + (n.index || "")) + "." + l, document.body.appendChild(u), u.click(), document.body.removeChild(u)
  6070. }, x.getOptions = l, x.hideCol = function (e, l) {
  6071. var n = C(e);
  6072. n && ("boolean" === layui.type(l) ? n.eachCols(function (e, t) {
  6073. var a = t.key, i = n.col(a), t = t.parentKey;
  6074. i.hide != l && (i = i.hide = l, n.elem.find('*[data-key="' + a + '"]')[i ? "addClass" : "removeClass"](N), n.setParentCol(i, t))
  6075. }) : (l = layui.isArray(l) ? l : [l], layui.each(l, function (e, l) {
  6076. n.eachCols(function (e, t) {
  6077. var a, i;
  6078. l.field === t.field && (a = t.key, i = n.col(a), t = t.parentKey, "hide" in l && i.hide != l.hide && (i = i.hide = !!l.hide, n.elem.find('*[data-key="' + a + '"]')[i ? "addClass" : "removeClass"](N), n.setParentCol(i, t)))
  6079. })
  6080. })), p("." + M).remove(), n.resize())
  6081. }, x.reload = function (e, t, a, i) {
  6082. if (l(e)) return e = C(e), e.reload(t, a, i), k.call(e)
  6083. }, x.reloadData = function () {
  6084. var a = p.extend([], arguments),
  6085. i = (a[3] = "reloadData", new RegExp("^(" + ["elem", "id", "cols", "width", "height", "maxHeight", "toolbar", "defaultToolbar", "className", "css", "pagebar"].join("|") + ")$"));
  6086. return layui.each(a[1], function (e, t) {
  6087. i.test(e) && delete a[1][e]
  6088. }), x.reload.apply(null, a)
  6089. }, x.render = function (e) {
  6090. e = new i(e);
  6091. return k.call(e)
  6092. }, x.clearCacheKey = function (e) {
  6093. return delete (e = p.extend({}, e))[x.config.checkName], delete e[x.config.indexName], delete e[x.config.numbersName], delete e[x.config.disabledName], e
  6094. }, p(function () {
  6095. x.init()
  6096. }), n(T, x)
  6097. });
  6098. layui.define(["table"], function (e) {
  6099. "use strict";
  6100. var B = layui.$, x = layui.form, j = layui.table, y = layui.hint(), P = {
  6101. config: {}, on: j.on, eachCols: j.eachCols, index: j.index, set: function (e) {
  6102. var t = this;
  6103. return t.config = B.extend({}, t.config, e), t
  6104. }, resize: j.resize, getOptions: j.getOptions, hideCol: j.hideCol, renderData: j.renderData
  6105. }, i = function () {
  6106. var a = this, e = a.config, n = e.id || e.index;
  6107. return {
  6108. config: e, reload: function (e, t) {
  6109. a.reload.call(a, e, t)
  6110. }, reloadData: function (e, t) {
  6111. P.reloadData(n, e, t)
  6112. }
  6113. }
  6114. }, F = function (e) {
  6115. var t = i.that[e];
  6116. return t || y.error(e ? "The treeTable instance with ID '" + e + "' not found" : "ID argument required"), t || null
  6117. }, q = "layui-hide", L = ".layui-table-main", R = ".layui-table-fixed-l", Y = ".layui-table-fixed-r",
  6118. l = "layui-table-checked", h = "layui-table-tree", H = "LAY_DATA_INDEX", m = "LAY_DATA_INDEX_HISTORY",
  6119. s = "LAY_PARENT_INDEX", b = "LAY_CHECKBOX_HALF", z = "LAY_EXPAND", X = "LAY_HAS_EXPANDED",
  6120. V = "LAY_ASYNC_STATUS", t = function (e) {
  6121. var t = this;
  6122. t.index = ++P.index, t.config = B.extend(!0, {}, t.config, P.config, e), t.init(), t.render()
  6123. }, u = function (n, i, e) {
  6124. var l = j.cache[n];
  6125. layui.each(e || l, function (e, t) {
  6126. var a = t[H];
  6127. -1 !== a.indexOf("-") && (l[a] = t), t[i] && u(n, i, t[i])
  6128. })
  6129. }, r = function (i, a, e) {
  6130. var l = F(i), t = ("reloadData" !== e && (l.status = {expand: {}}), B.extend(!0, {}, l.getOptions(), a)),
  6131. n = t.tree, r = n.customName.children, d = n.customName.id,
  6132. o = (delete a.hasNumberCol, delete a.hasChecboxCol, delete a.hasRadioCol, j.eachCols(null, function (e, t) {
  6133. "numbers" === t.type ? a.hasNumberCol = !0 : "checkbox" === t.type ? a.hasChecboxCol = !0 : "radio" === t.type && (a.hasRadioCol = !0)
  6134. }, t.cols), a.parseData), c = a.done;
  6135. t.url ? e && (!o || o.mod) || (a.parseData = function () {
  6136. var e = this, t = arguments, a = t[0],
  6137. t = ("function" === layui.type(o) && (a = o.apply(e, t) || t[0]), e.response.dataName);
  6138. return n.data.isSimpleData && !n["async"].enable && (a[t] = l.flatToTree(a[t])), f(a[t], function (e) {
  6139. e[z] = z in e ? e[z] : e[d] !== undefined && l.status.expand[e[d]]
  6140. }, r), e.autoSort && e.initSort && e.initSort.type && layui.sort(a[t], e.initSort.field, "desc" === e.initSort.type, !0), l.initData(a[t]), a
  6141. }, a.parseData.mod = !0) : (a.data = a.data || [], n.data.isSimpleData && (a.data = l.flatToTree(a.data)), l.initData(a.data)), e && (!c || c.mod) || (a.done = function () {
  6142. var e, t = arguments, a = (t[3] || delete l.isExpandAll, this.elem.next()),
  6143. n = (l.updateStatus(null, {LAY_HAS_EXPANDED: !1}), u(i, r), a.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));
  6144. if (n.length && (e = P.checkStatus(i), n.prop({
  6145. checked: e.isAll && e.data.length,
  6146. indeterminate: !e.isAll && e.data.length
  6147. })), l.renderTreeTable(a), "function" === layui.type(c)) return c.apply(this, t)
  6148. }, a.done.mod = !0)
  6149. };
  6150. t.prototype.init = function () {
  6151. var e = this.config, t = e.tree.data.cascade,
  6152. t = ("parent" !== t && "children" !== t && (e.tree.data.cascade = "all"), j.render(B.extend({}, e, {
  6153. data: [],
  6154. url: "",
  6155. done: null
  6156. }))), a = t.config.id;
  6157. (i.that[a] = this).tableIns = t, r(a, e)
  6158. }, t.prototype.config = {
  6159. tree: {
  6160. customName: {
  6161. children: "children",
  6162. isParent: "isParent",
  6163. name: "name",
  6164. id: "id",
  6165. pid: "parentId",
  6166. icon: "icon"
  6167. },
  6168. view: {
  6169. indent: 14,
  6170. flexIconClose: '<i class="layui-icon layui-icon-triangle-r"></i>',
  6171. flexIconOpen: '<i class="layui-icon layui-icon-triangle-d"></i>',
  6172. showIcon: !0,
  6173. icon: "",
  6174. iconClose: '<i class="layui-icon layui-icon-folder"></i>',
  6175. iconOpen: '<i class="layui-icon layui-icon-folder-open"></i>',
  6176. iconLeaf: '<i class="layui-icon layui-icon-leaf"></i>',
  6177. showFlexIconIfNotParent: !1,
  6178. dblClickExpand: !0,
  6179. expandAllDefault: !1
  6180. },
  6181. data: {isSimpleData: !1, rootPid: null, cascade: "all"},
  6182. "async": {enable: !1, url: "", type: null, contentType: null, headers: null, where: null, autoParam: []},
  6183. callback: {beforeExpand: null, onExpand: null}
  6184. }
  6185. }, t.prototype.getOptions = function () {
  6186. return this.tableIns ? j.getOptions(this.tableIns.config.id) : this.config
  6187. }, t.prototype.flatToTree = function (e) {
  6188. var a, n, i, t, l, r, d, o = this.getOptions(), c = o.tree, u = c.customName, o = o.id;
  6189. return e = e || j.cache[o], o = e, a = u.id, n = u.pid, i = u.children, t = c.data.rootPid, a = a || "id", n = n || "parentId", i = i || "children", d = {}, layui.each(o, function (e, t) {
  6190. l = a + t[a], d[l] = B.extend({}, t), d[l][i] = []
  6191. }), layui.each(d, function (e, t) {
  6192. (r = a + t[n]) && d[r] && d[r][i].push(t)
  6193. }), Object.values(d).filter(function (e) {
  6194. return t ? e[n] === t : !e[n]
  6195. })
  6196. }, t.prototype.treeToFlat = function (e, n, i) {
  6197. var l = this, r = l.getOptions().tree.customName, d = r.children, o = r.pid, c = [];
  6198. return layui.each(e, function (e, t) {
  6199. var e = (i ? i + "-" : "") + e, a = B.extend({}, t);
  6200. a[o] = t[o] || n, c.push(a), c = c.concat(l.treeToFlat(t[d], t[r.id], e))
  6201. }), c
  6202. }, t.prototype.getTreeNode = function (e) {
  6203. var t = this;
  6204. if (!e) return y.error("\u627e\u4e0d\u5230\u8282\u70b9\u6570\u636e");
  6205. var a = t.getOptions(), n = a.tree;
  6206. a.id, n.customName;
  6207. return {
  6208. data: e, dataIndex: e[H], getParentNode: function () {
  6209. return t.getNodeByIndex(e[s])
  6210. }
  6211. }
  6212. }, t.prototype.getNodeByIndex = function (t) {
  6213. var e = this, a = e.getNodeDataByIndex(t);
  6214. if (!a) return y.error("\u627e\u4e0d\u5230\u8282\u70b9\u6570\u636e");
  6215. var n = e.getOptions(), i = (n.tree.customName.parent, n.id), n = {
  6216. data: a, dataIndex: a[H], getParentNode: function () {
  6217. return e.getNodeByIndex(a[s])
  6218. }, update: function (e) {
  6219. return P.updateNode(i, t, e)
  6220. }, remove: function () {
  6221. return P.removeNode(i, t)
  6222. }, expand: function (e) {
  6223. return P.expandNode(i, B.extend({}, e, {index: t}))
  6224. }, setChecked: function (e) {
  6225. return P.setRowChecked(i, B.extend({}, e, {index: t}))
  6226. }
  6227. };
  6228. return n.dataIndex = t, n
  6229. }, t.prototype.getNodeById = function (a) {
  6230. var e = this.getOptions(), n = e.tree.customName.id, i = "", e = P.getData(e.id, !0);
  6231. if (layui.each(e, function (e, t) {
  6232. if (t[n] === a) return i = t[H], !0
  6233. }), i) return this.getNodeByIndex(i)
  6234. }, t.prototype.getNodeDataByIndex = function (a, e, t) {
  6235. var n = this.getOptions(), i = n.tree, l = n.id, r = j.cache[l][a];
  6236. if ("delete" !== t && r) return B.extend(r, t), e ? B.extend({}, r) : r;
  6237. for (var r = this.getTableData(), d = (a += "").split("-"), o = r, c = n.url || 1 < d.length ? null : j.cache[l], u = 0, s = i.customName.children; u < d.length; u++) {
  6238. if (t && u === d.length - 1) {
  6239. if ("delete" === t) return c && layui.each(c, function (e, t) {
  6240. if (t[H] === a) return c.splice(e, 1), !0
  6241. }), (u ? o[s] : o).splice(d[u], 1)[0];
  6242. B.extend((u ? o[s] : o)[d[u]], t)
  6243. }
  6244. o = (u ? o[s] : o)[d[u]]
  6245. }
  6246. return e ? B.extend({}, o) : o
  6247. }, P.getNodeDataByIndex = function (e, t) {
  6248. e = F(e);
  6249. if (e) return e.getNodeDataByIndex(t, !0)
  6250. };
  6251. t.prototype.initData = function (e, a) {
  6252. var n = this, t = n.getOptions(), i = t.tree, t = t.id, i = (e = e || n.getTableData(), i.customName),
  6253. l = i.isParent, r = i.children;
  6254. return layui.each(e, function (e, t) {
  6255. l in t || (t[l] = !(!t[r] || !t[r].length)), t[m] = t[H], t[s] = a = a || "";
  6256. e = t[H] = (a ? a + "-" : "") + e;
  6257. n.initData(t[r] || [], e)
  6258. }), u(t, r, e), e
  6259. }, n = {};
  6260. var n, U = function (e, t, a) {
  6261. return n[e] || (n[e] = layui.debounce(t, a)), n[e]
  6262. }, J = function (t, a, n, i, l) {
  6263. var e = t.trElem, r = t.tableViewElem || e.closest(".layui-table-view"), d = t.tableId || r.attr("lay-id"),
  6264. o = t.options || j.getOptions(d), e = t.dataIndex || e.attr("lay-data-index"), c = F(d), u = o.tree || {},
  6265. s = u.customName || {}, f = s.isParent, y = c.getNodeDataByIndex(e), p = "boolean" !== layui.type(a),
  6266. x = p ? !y[z] : a, h = y[f] ? x : null;
  6267. if (l && x != y[z] && (!y[V] || "local" === y[V])) {
  6268. var m = u.callback.beforeExpand;
  6269. if ("function" === layui.type(m) && !1 === m(d, y, a)) return h
  6270. }
  6271. var m = y[X], b = r.find('tr[lay-data-index="' + e + '"]'), g = b.find(".layui-table-tree-flexIcon"),
  6272. v = (g.html(x ? u.view.flexIconOpen : u.view.flexIconClose), y[f] && g.css("visibility", "visible"), u.view.showIcon && b.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(x ? u.view.iconOpen : u.view.iconClose), y[z] = x, y[s.id]);
  6273. if (v !== undefined && (c.status.expand[v] = x), null === h) return h;
  6274. v = y[s.children] || [];
  6275. if (x) if (m) b.nextAll(v.map(function (e, t, a) {
  6276. return 'tr[lay-data-index="' + e[H] + '"]'
  6277. }).join(",")).removeClass(q), layui.each(v, function (e, t) {
  6278. t[f] && (!n || p || t[z] ? t[z] && J({
  6279. dataIndex: t[H],
  6280. trElem: r.find('tr[lay-data-index="' + t[H] + '"]').first(),
  6281. tableViewElem: r,
  6282. tableId: d,
  6283. options: o
  6284. }, !0) : J({
  6285. dataIndex: t[H],
  6286. trElem: r.find('tr[lay-data-index="' + t[H] + '"]').first(),
  6287. tableViewElem: r,
  6288. tableId: d,
  6289. options: o
  6290. }, a, n, i, l))
  6291. }); else {
  6292. var N, C, b = u["async"] || {}, I = b.url || o.url;
  6293. if (b.enable && y[f] && !y[V]) {
  6294. y[V] = "loading", g.html('<i class="layui-icon layui-icon-loading layui-anim layui-anim-loop layui-anim-rotate"></i>');
  6295. var D = function (e) {
  6296. y[V] = "success", y[s.children] = e, c.initData(y[s.children], y[H]), J(t, !0, !p && n, i, l)
  6297. }, T = b.format;
  6298. if ("function" === layui.type(T)) return T(y, o, D), h;
  6299. var k = B.extend({}, b.where || o.where), T = b.autoParam, T = (layui.each(T, function (e, t) {
  6300. t = t.split("=");
  6301. k[t[0].trim()] = y[(t[1] || t[0]).trim()]
  6302. }), b.contentType || o.contentType),
  6303. _ = (T && 0 == T.indexOf("application/json") && (k = JSON.stringify(k)), b.method || o.method),
  6304. w = b.dataType || o.dataType, O = b.jsonpCallback || o.jsonpCallback, S = b.headers || o.headers,
  6305. A = b.parseData || o.parseData, E = b.response || o.response;
  6306. return B.ajax({
  6307. type: _ || "get",
  6308. url: I,
  6309. contentType: T,
  6310. data: k,
  6311. dataType: w || "json",
  6312. jsonpCallback: O,
  6313. headers: S || {},
  6314. success: function (e) {
  6315. (e = "function" == typeof A ? A.call(o, e) || e : e)[E.statusName] != E.statusCode ? (y[V] = "error", g.html('<i class="layui-icon layui-icon-refresh"></i>')) : D(e[E.dataName])
  6316. },
  6317. error: function (e, t) {
  6318. y[V] = "error", "function" == typeof o.error && o.error(e, t)
  6319. }
  6320. }), h
  6321. }
  6322. m = y[X] = !0, v.length && (!o.initSort || o.url && !o.autoSort || ((b = o.initSort).type ? layui.sort(v, b.field, "desc" === b.type, !0) : layui.sort(v, j.config.indexName, null, !0)), c.initData(y[s.children], y[H]), _ = j.getTrHtml(d, v, null, null, e), N = {
  6323. trs: B(_.trs.join("")),
  6324. trs_fixed: B(_.trs_fixed.join("")),
  6325. trs_fixed_r: B(_.trs_fixed_r.join(""))
  6326. }, C = (e.split("-").length - 1 || 0) + 1, layui.each(v, function (e, t) {
  6327. N.trs.eq(e).attr({
  6328. "data-index": t[H],
  6329. "lay-data-index": t[H],
  6330. "data-level": C
  6331. }), N.trs_fixed.eq(e).attr({
  6332. "data-index": t[H],
  6333. "lay-data-index": t[H],
  6334. "data-level": C
  6335. }), N.trs_fixed_r.eq(e).attr({"data-index": t[H], "lay-data-index": t[H], "data-level": C})
  6336. }), r.find(L).find('tbody tr[lay-data-index="' + e + '"]').after(N.trs), r.find(R).find('tbody tr[lay-data-index="' + e + '"]').after(N.trs_fixed), r.find(Y).find('tbody tr[lay-data-index="' + e + '"]').after(N.trs_fixed_r), c.renderTreeTable(N.trs, C), n && !p && layui.each(v, function (e, t) {
  6337. J({
  6338. dataIndex: t[H],
  6339. trElem: r.find('tr[lay-data-index="' + t[H] + '"]').first(),
  6340. tableViewElem: r,
  6341. tableId: d,
  6342. options: o
  6343. }, a, n, i, l)
  6344. }))
  6345. } else c.isExpandAll = !1, n && !p ? (layui.each(v, function (e, t) {
  6346. J({
  6347. dataIndex: t[H],
  6348. trElem: r.find('tr[lay-data-index="' + t[H] + '"]').first(),
  6349. tableViewElem: r,
  6350. tableId: d,
  6351. options: o
  6352. }, a, n, i, l)
  6353. }), r.find(v.map(function (e, t, a) {
  6354. return 'tr[lay-data-index="' + e[H] + '"]'
  6355. }).join(",")).addClass(q)) : (I = c.treeToFlat(v, y[s.id], e), r.find(I.map(function (e, t, a) {
  6356. return 'tr[lay-data-index="' + e[H] + '"]'
  6357. }).join(",")).addClass(q));
  6358. return U("resize-" + d, function () {
  6359. P.resize(d)
  6360. }, 0)(), l && "loading" !== y[V] && (T = u.callback.onExpand, "function" === layui.type(T) && T(d, y, x)), h
  6361. }, g = (P.expandNode = function (e, t) {
  6362. var a, n, i, e = F(e);
  6363. if (e) return a = (t = t || {}).index, n = t.expandFlag, i = t.inherit, t = t.callbackFlag, e = e.getOptions().elem.next(), J({trElem: e.find('tr[lay-data-index="' + a + '"]').first()}, n, i, null, t)
  6364. }, P.expandAll = function (a, e) {
  6365. if ("boolean" !== layui.type(e)) return y.error("expandAll \u7684\u5c55\u5f00\u72b6\u6001\u53c2\u6570\u53ea\u63a5\u6536true/false");
  6366. var t = F(a);
  6367. if (t) {
  6368. t.isExpandAll = e;
  6369. var n = t.getOptions(), i = n.tree, l = n.elem.next(), r = i.customName.isParent, d = i.customName.id,
  6370. o = i.view.showFlexIconIfNotParent;
  6371. if (e) {
  6372. e = P.getData(a, !0);
  6373. if (i["async"].enable) {
  6374. var c = !0;
  6375. if (layui.each(e, function (e, t) {
  6376. if (t[r] && !t[V]) return !(c = !1)
  6377. }), !c) return void layui.each(P.getData(a), function (e, t) {
  6378. P.expandNode(a, {index: t[H], expandFlag: !0, inherit: !0})
  6379. })
  6380. }
  6381. var u = !0;
  6382. if (layui.each(e, function (e, t) {
  6383. if (t[r] && !t[X]) return !(u = !1)
  6384. }), u) t.updateStatus(null, function (e) {
  6385. (e[r] || o) && (e[z] = !0, e[d] !== undefined && (t.status.expand[e[d]] = !0))
  6386. }), l.find('tbody tr[data-level!="0"]').removeClass(q), l.find(".layui-table-tree-flexIcon").html(i.view.flexIconOpen), i.view.showIcon && l.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconOpen); else {
  6387. if (t.updateStatus(null, function (e) {
  6388. (e[r] || o) && (e[z] = !0, e[X] = !0, e[d] !== undefined && (t.status.expand[e[d]] = !0))
  6389. }), n.initSort && n.initSort.type && (!n.url || n.autoSort)) return P.sort(a);
  6390. var s, n = j.getTrHtml(a, e), f = {
  6391. trs: B(n.trs.join("")),
  6392. trs_fixed: B(n.trs_fixed.join("")),
  6393. trs_fixed_r: B(n.trs_fixed_r.join(""))
  6394. };
  6395. layui.each(e, function (e, t) {
  6396. var a = t[H].split("-").length - 1;
  6397. s = {
  6398. "data-index": t[H],
  6399. "lay-data-index": t[H],
  6400. "data-level": a
  6401. }, f.trs.eq(e).attr(s), f.trs_fixed.eq(e).attr(s), f.trs_fixed_r.eq(e).attr(s)
  6402. }), layui.each(["main", "fixed-l", "fixed-r"], function (e, t) {
  6403. l.find(".layui-table-" + t + " tbody").html(f[["trs", "trs_fixed", "trs_fixed_r"][e]])
  6404. }), t.renderTreeTable(l, 0, !1)
  6405. }
  6406. } else t.updateStatus(null, function (e) {
  6407. (e[r] || o) && (e[z] = !1, e[d] !== undefined && (t.status.expand[e[d]] = !1))
  6408. }), l.find('.layui-table-box tbody tr[data-level!="0"]').addClass(q), l.find(".layui-table-tree-flexIcon").html(i.view.flexIconClose), i.view.showIcon && l.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconClose);
  6409. P.resize(a)
  6410. }
  6411. }, t.prototype.renderTreeTable = function (e, t, a) {
  6412. var n = this, i = n.getOptions(), l = i.elem.next(), r = (l.hasClass(h) || l.addClass(h), i.id),
  6413. d = i.tree || {}, o = (d.data, d.view || {}), c = d.customName || {}, u = c.isParent,
  6414. s = (l.attr("lay-filter"), n),
  6415. f = ((t = t || 0) || (l.find(".layui-table-body tr:not([data-level])").attr("data-level", t), layui.each(j.cache[r], function (e, t) {
  6416. l.find('.layui-table-main tbody tr[data-level="0"]:eq(' + e + ")").attr("lay-data-index", t[H]), l.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq(' + e + ")").attr("lay-data-index", t[H]), l.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq(' + e + ")").attr("lay-data-index", t[H])
  6417. })), null), y = c.name, p = o.indent || 14;
  6418. if (layui.each(e.find('td[data-field="' + y + '"]'), function (e, t) {
  6419. var a, n, i = (t = B(t)).closest("tr"), t = t.children(".layui-table-cell");
  6420. t.hasClass("layui-table-tree-item") || (n = i.attr("lay-data-index")) && (i = l.find('tr[lay-data-index="' + n + '"]'), (a = s.getNodeDataByIndex(n))[z] && a[u] && ((f = f || {})[n] = !0), a[b] && i.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate", !0), n = t.html(), (t = i.find('td[data-field="' + y + '"]>div.layui-table-cell')).addClass("layui-table-tree-item"), t.html(['<div class="layui-inline layui-table-tree-flexIcon" ', 'style="', "margin-left: " + p * i.attr("data-level") + "px;", a[u] || o.showFlexIconIfNotParent ? "" : " visibility: hidden;", '">', a[z] ? o.flexIconOpen : o.flexIconClose, "</div>", o.showIcon ? '<div class="layui-inline layui-table-tree-nodeIcon' + (a[c.icon] || o.icon ? " layui-table-tree-iconCustom" : "") + (a[u] ? "" : " layui-table-tree-iconLeaf") + '">' + (a[c.icon] || o.icon || (a[u] ? a[z] ? o.iconOpen : o.iconClose : o.iconLeaf) || "") + "</div>" : "", n].join("")).find(".layui-table-tree-flexIcon").on("click", function (e) {
  6421. layui.stope(e), J({trElem: i}, null, null, null, !0)
  6422. }))
  6423. }), !t && d.view.expandAllDefault && n.isExpandAll === undefined) return P.expandAll(r, !0);
  6424. !1 !== a && f ? layui.each(f, function (e, t) {
  6425. e = l.find('tr[lay-data-index="' + e + '"]');
  6426. e.find(".layui-table-tree-flexIcon").html(o.flexIconOpen), J({trElem: e.first()}, !0)
  6427. }) : U("renderTreeTable-" + r, function () {
  6428. i.hasNumberCol && g(n), x.render(B('.layui-table-tree[lay-id="' + r + '"]'))
  6429. }, 0)()
  6430. }, function (a) {
  6431. var e = a.getOptions(), t = e.elem.next(), n = 0, i = t.find(".layui-table-main tbody tr"),
  6432. l = t.find(".layui-table-fixed-l tbody tr"), r = t.find(".layui-table-fixed-r tbody tr");
  6433. layui.each(a.treeToFlat(j.cache[e.id]), function (e, t) {
  6434. a.getNodeDataByIndex(t[H]).LAY_NUM = ++n, i.eq(e).find(".laytable-cell-numbers").html(n), l.eq(e).find(".laytable-cell-numbers").html(n), r.eq(e).find(".laytable-cell-numbers").html(n)
  6435. })
  6436. }), f = (t.prototype.render = function (e) {
  6437. var t = this;
  6438. t.tableIns = j["reloadData" === e ? "reloadData" : "reload"](t.tableIns.config.id, B.extend(!0, {}, t.config)), t.config = t.tableIns.config
  6439. }, t.prototype.reload = function (e, t, a) {
  6440. var n = this;
  6441. e = e || {}, delete n.haveInit, layui.each(e, function (e, t) {
  6442. "array" === layui.type(t) && delete n.config[e]
  6443. }), r(n.getOptions().id, e, a || !0), n.config = B.extend(t, {}, n.config, e), n.render(a)
  6444. }, P.reloadData = function () {
  6445. var e = B.extend(!0, [], arguments);
  6446. return e[3] = "reloadData", P.reload.apply(null, e)
  6447. }, function (e, a, n, i) {
  6448. var l = [];
  6449. return layui.each(e, function (e, t) {
  6450. "function" === layui.type(a) ? a(t) : B.extend(t, a), l.push(B.extend({}, t)), i || (l = l.concat(f(t[n], a, n, i)))
  6451. }), l
  6452. }), d = (t.prototype.updateStatus = function (e, t, a) {
  6453. var n = this.getOptions(), i = n.tree;
  6454. return e = e || j.cache[n.id], f(e, t, i.customName.children, a)
  6455. }, t.prototype.getTableData = function () {
  6456. var e = this.getOptions();
  6457. return e.url ? j.cache[e.id] : e.data
  6458. }, P.updateStatus = function (e, t, a) {
  6459. var e = F(e), n = e.getOptions();
  6460. return a = a || (n.url ? j.cache[n.id] : n.data), e.updateStatus(a, t)
  6461. }, P.sort = function (e) {
  6462. var t, a = F(e);
  6463. !a || (t = a.getOptions()).url && !t.autoSort || (a.initData(), P.renderData(e))
  6464. }, function (n) {
  6465. var t = n.config.id, i = F(t), a = n.data = P.getNodeDataByIndex(t, n.index), l = a[H],
  6466. r = (n.dataIndex = l, n.update);
  6467. n.update = function () {
  6468. var e = arguments, t = (B.extend(i.getNodeDataByIndex(l), e[0]), r.apply(this, e)),
  6469. a = n.config.tree.customName.name;
  6470. return a in e[0] && n.tr.find('td[data-field="' + a + '"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"), i.renderTreeTable(n.tr, n.tr.attr("data-level"), !1), t
  6471. }, n.del = function () {
  6472. P.removeNode(t, a)
  6473. }, n.setRowChecked = function (e) {
  6474. P.setRowChecked(t, {index: a, checked: e})
  6475. }
  6476. }), o = (P.updateNode = function (e, a, t) {
  6477. var n, i, l, r, d, o = F(e);
  6478. o && ((r = o.getOptions()).tree, r = (n = r.elem.next()).find('tr[lay-data-index="' + a + '"]'), i = r.attr("data-index"), l = r.attr("data-level"), t && (r = o.getNodeDataByIndex(a, !1, t), d = j.getTrHtml(e, [r]), layui.each(["main", "fixed-l", "fixed-r"], function (e, t) {
  6479. n.find(".layui-table-" + t + ' tbody tr[lay-data-index="' + a + '"]').replaceWith(B(d[["trs", "trs_fixed", "trs_fixed_r"][e]].join("")).attr({
  6480. "data-index": i,
  6481. "lay-data-index": a,
  6482. "data-level": l
  6483. }))
  6484. }), o.renderTreeTable(n.find('tr[lay-data-index="' + a + '"]'), l)))
  6485. }, P.removeNode = function (e, t) {
  6486. var a, n, i, l, r, d = F(e);
  6487. d && (r = (a = d.getOptions()).tree, n = a.elem.next(), i = [], t = d.getNodeDataByIndex("string" === layui.type(t) ? t : t[H], !1, "delete"), l = d.getNodeDataByIndex(t[s]), d.updateCheckStatus(l), l = d.treeToFlat([t], t[r.customName.pid], t[s]), layui.each(l, function (e, t) {
  6488. i.push('tr[lay-data-index="' + t[H] + '"]')
  6489. }), n.find(i.join(",")).remove(), r = d.initData(), layui.each(d.treeToFlat(r), function (e, t) {
  6490. t[m] && t[m] !== t[H] && n.find('tr[lay-data-index="' + t[m] + '"]').attr({
  6491. "data-index": t[H],
  6492. "lay-data-index": t[H]
  6493. })
  6494. }), layui.each(j.cache[e], function (e, t) {
  6495. n.find('tr[data-level="0"][lay-data-index="' + t[H] + '"]').attr("data-index", e)
  6496. }), a.hasNumberCol && g(d), P.resize(e))
  6497. }, P.addNodes = function (e, t) {
  6498. var a = F(e);
  6499. if (a) {
  6500. var n = a.getOptions(), i = n.tree, l = n.elem.next(), r = j.config.checkName,
  6501. d = (t = t || {}).parentIndex, o = t.index, c = t.data, t = t.focus,
  6502. u = (d = "number" === layui.type(d) ? d.toString() : d) ? a.getNodeDataByIndex(d) : null,
  6503. o = "number" === layui.type(o) ? o : -1, c = B.extend(!0, [], layui.isArray(c) ? c : [c]);
  6504. layui.each(c, function (e, t) {
  6505. r in t || (t[r] = u[r])
  6506. }), a.getTableData();
  6507. if (u) {
  6508. var s = i.customName.isParent, f = i.customName.children;
  6509. u[s] = !0;
  6510. var y = (y = u[f]) ? (p = y.splice(-1 === o ? y.length : o), u[f] = y.concat(c, p)) : u[f] = c,
  6511. f = (a.updateStatus(y, function (e) {
  6512. (e[s] || i.view.showFlexIconIfNotParent) && (e[X] = !1)
  6513. }), a.treeToFlat(y));
  6514. l.find(f.map(function (e) {
  6515. return 'tr[lay-data-index="' + e[H] + '"]'
  6516. }).join(",")).remove(), a.initData(), u[X] = !1, u[V] = "local", J({trElem: l.find('tr[lay-data-index="' + d + '"]')}, !0)
  6517. } else {
  6518. var p = j.cache[e].splice(-1 === o ? j.cache[e].length : o);
  6519. if (j.cache[e] = j.cache[e].concat(c, p), n.url || (n.page ? (y = n.page, n.data.splice.apply(n.data, [y.limit * (y.curr - 1), y.limit].concat(j.cache[e]))) : n.data = j.cache[e]), a.initData(), l.find(".layui-none").length) return j.renderData(e), c;
  6520. var x, f = j.getTrHtml(e, c), h = {
  6521. trs: B(f.trs.join("")),
  6522. trs_fixed: B(f.trs_fixed.join("")),
  6523. trs_fixed_r: B(f.trs_fixed_r.join(""))
  6524. }, d = (layui.each(c, function (e, t) {
  6525. x = {
  6526. "data-index": t[H],
  6527. "lay-data-index": t[H],
  6528. "data-level": "0"
  6529. }, h.trs.eq(e).attr(x), h.trs_fixed.eq(e).attr(x), h.trs_fixed_r.eq(e).attr(x)
  6530. }), parseInt(c[0][H]) - 1), y = l.find(L), n = l.find(R), f = l.find(Y);
  6531. -1 == d ? (y.find('tr[data-level="0"][data-index="0"]').before(h.trs), n.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed), f.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed_r)) : -1 === o ? (y.find("tbody").append(h.trs), n.find("tbody").append(h.trs_fixed), f.find("tbody").append(h.trs_fixed_r)) : (d = p[0][m], y.find('tr[data-level="0"][data-index="' + d + '"]').before(h.trs), n.find('tr[data-level="0"][data-index="' + d + '"]').before(h.trs_fixed), f.find('tr[data-level="0"][data-index="' + d + '"]').before(h.trs_fixed_r)), layui.each(j.cache[e], function (e, t) {
  6532. l.find('tr[data-level="0"][lay-data-index="' + t[H] + '"]').attr("data-index", e)
  6533. }), a.renderTreeTable(l.find(c.map(function (e, t, a) {
  6534. return 'tr[lay-data-index="' + e[H] + '"]'
  6535. }).join(",")))
  6536. }
  6537. return a.updateCheckStatus(u), P.resize(e), t && l.find(L).find('tr[lay-data-index="' + c[0][H] + '"]').get(0).scrollIntoViewIfNeeded(), c
  6538. }
  6539. }, P.checkStatus = function (e, n) {
  6540. var i, t, a, l = F(e);
  6541. if (l) return l = l.getOptions().tree, i = j.config.checkName, t = P.getData(e, !0).filter(function (e, t, a) {
  6542. return e[i] || n && e[b]
  6543. }), a = !0, layui.each("all" === l.data.cascade ? j.cache[e] : P.getData(e, !0), function (e, t) {
  6544. if (!t[i]) return !(a = !1)
  6545. }), {data: t, isAll: a}
  6546. }, P.on("sort", function (e) {
  6547. var e = e.config, t = e.elem.next(), e = e.id;
  6548. t.hasClass(h) && P.sort(e)
  6549. }), P.on("row", function (e) {
  6550. e.config.elem.next().hasClass(h) && d(e)
  6551. }), P.on("rowDouble", function (e) {
  6552. var t = e.config, a = t.elem.next();
  6553. t.id;
  6554. a.hasClass(h) && (d(e), (t.tree || {}).view.dblClickExpand && J({trElem: e.tr.first()}, null, null, null, !0))
  6555. }), P.on("rowContextmenu", function (e) {
  6556. var t = e.config, a = t.elem.next();
  6557. t.id;
  6558. a.hasClass(h) && d(e)
  6559. }), P.on("tool", function (e) {
  6560. var t = e.config, a = t.elem.next();
  6561. t.id;
  6562. a.hasClass(h) && d(e)
  6563. }), P.on("edit", function (e) {
  6564. var t = e.config, a = t.elem.next();
  6565. t.id;
  6566. a.hasClass(h) && (d(e), e.field === t.tree.customName.name && ((a = {})[e.field] = e.value, e.update(a)))
  6567. }), P.on("radio", function (e) {
  6568. var t = e.config, a = t.elem.next(), t = t.id;
  6569. a.hasClass(h) && (a = F(t), d(e), o.call(a, e.tr, e.checked))
  6570. }), t.prototype.setRowCheckedClass = function (e, t) {
  6571. var a = this.getOptions(), n = (e.data("index"), a.elem.next());
  6572. e[t ? "addClass" : "removeClass"](l), e.each(function () {
  6573. var e = B(this).data("index");
  6574. n.find('.layui-table-fixed-r tbody tr[data-index="' + e + '"]')[t ? "addClass" : "removeClass"](l)
  6575. })
  6576. }, t.prototype.updateCheckStatus = function (e, t) {
  6577. var i = this, a = i.getOptions(), n = a.tree, l = a.id, r = a.elem.next(), d = j.config.checkName,
  6578. a = n.data.cascade,
  6579. o = (("all" === a || "parent" === a) && e && (a = i.updateParentCheckStatus(e, "boolean" === layui.type(t) ? t : null), layui.each(a, function (e, t) {
  6580. var a = r.find('tr[lay-data-index="' + t[H] + '"] input[name="layTableCheckbox"]:not(:disabled)'),
  6581. n = t[d];
  6582. i.setRowCheckedClass(a.closest("tr"), n), x.render(a.prop({checked: n, indeterminate: t[b]}))
  6583. })), !0), c = !1;
  6584. return layui.each("all" === n.data.cascade ? j.cache[l] : P.getData(l, !0), function (e, t) {
  6585. if ((t[d] || t[b]) && (c = !0), t[d] || (o = !1), c && !o) return !0
  6586. }), c = c && !o, x.render(r.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({
  6587. checked: o,
  6588. indeterminate: c
  6589. })), o
  6590. }, t.prototype.updateParentCheckStatus = function (a, n) {
  6591. var i, e = this.getOptions(), t = e.tree, e = e.id, l = j.config.checkName, t = t.customName.children, r = [];
  6592. return !(a[b] = !1) === n ? a[t].length ? layui.each(a[t], function (e, t) {
  6593. if (!t[l]) return n = !1, a[b] = !0
  6594. }) : n = !1 : !1 === n ? layui.each(a[t], function (e, t) {
  6595. if (t[l] || t[b]) return a[b] = !0
  6596. }) : (n = !1, i = 0, layui.each(a[t], function (e, t) {
  6597. t[l] && i++
  6598. }), n = a[t].length ? a[t].length === i : a[l], a[b] = !n && 0 < i), a[l] = n, r.push(B.extend({}, a)), r = a[s] ? r.concat(this.updateParentCheckStatus(j.cache[e][a[s]], n)) : r
  6599. }, function (e, t, a) {
  6600. var n = this, i = n.getOptions(), l = i.tree, r = i.id, d = i.elem.next(),
  6601. o = (e.length ? e : d).find(".laytable-cell-radio, .laytable-cell-checkbox").children("input").last(),
  6602. i = "radio" === o.attr("type");
  6603. if (a) {
  6604. a = function () {
  6605. var e = function (e) {
  6606. layui.stope(e)
  6607. };
  6608. o.parent().on("click", e), o.next().click(), o.parent().off("click", e)
  6609. };
  6610. i ? t && !o.prop("checked") && a() : "boolean" === layui.type(t) && o.prop("checked") === t || a()
  6611. } else {
  6612. var c, a = n.getNodeDataByIndex(e.attr("data-index")), u = j.config.checkName;
  6613. if (!i) return t = "boolean" === layui.type(t) ? t : !a[u], i = n.updateStatus(a ? [a] : j.cache[r], function (e) {
  6614. e[j.config.disabledName] || (e[u] = t, e[b] = !1)
  6615. }, a && "parent" === l.data.cascade), r = d.find(i.map(function (e) {
  6616. return 'tr[lay-data-index="' + e[H] + '"] input[name="layTableCheckbox"]:not(:disabled)'
  6617. }).join(",")), n.setRowCheckedClass(r.closest("tr"), t), x.render(r.prop({
  6618. checked: t,
  6619. indeterminate: !1
  6620. })), a && a[s] && (c = n.getNodeDataByIndex(a[s])), n.updateCheckStatus(c, t);
  6621. a && (n.updateStatus(null, function (e) {
  6622. var t;
  6623. e[u] && (t = d.find('tr[lay-data-index="' + e[H] + '"] input[type="radio"][lay-type="layTableRadio"]'), e[u] = !1, n.setRowCheckedClass(t.closest("tr"), !1), x.render(t.prop("checked", !1)))
  6624. }), a[u] = t, n.setRowCheckedClass(e, t), n.setRowCheckedClass(e.siblings(), !1), x.render(e.find('input[type="radio"][lay-type="layTableRadio"]').prop("checked", t)))
  6625. }
  6626. });
  6627. P.on("checkbox", function (e) {
  6628. var t = e.config, a = t.elem.next(), t = t.id;
  6629. a.hasClass(h) && (a = F(t), t = e.checked, d(e), e.isAll = o.call(a, e.tr, t))
  6630. }), P.setRowChecked = function (e, t) {
  6631. var a, n, i, l, r, d = F(e);
  6632. d && (a = d.getOptions().elem.next(), i = (t = t || {}).index, n = t.checked, t = t.callbackFlag, i = "string" === layui.type(i) ? i : i[H], (l = d.getNodeDataByIndex(i)) && ((r = a.find('tr[lay-data-index="' + i + '"]')).length || (P.expandNode(e, {
  6633. index: l[s],
  6634. expandFlag: !0
  6635. }), r = a.find('tr[lay-data-index="' + i + '"]')), o.call(d, r, n, t)))
  6636. }, P.checkAllNodes = function (e, t) {
  6637. var a, e = F(e);
  6638. e && (a = e.getOptions().elem.next(), o.call(e, a.find('tr[data-index="NONE"]'), !!t))
  6639. }, P.getData = function (e, t) {
  6640. var a, n = F(e);
  6641. if (n) return a = [], layui.each(B.extend(!0, [], j.cache[e] || []), function (e, t) {
  6642. a.push(t)
  6643. }), t ? n.treeToFlat(a) : a
  6644. }, P.reloadAsyncNode = function (a, e) {
  6645. var t, n, i = F(a);
  6646. !i || (t = i.getOptions().tree)["async"] && t["async"].enable && ((n = i.getNodeDataByIndex(e)) && (n[X] = !1, n[z] = !1, n[V] = !1, layui.each(i.treeToFlat(n[t.customName.children]).reverse(), function (e, t) {
  6647. P.removeNode(a, t[H])
  6648. }), P.expandNode(a, {index: e, expandFlag: !0, callbackFlag: !0})))
  6649. }, P.getNodeById = function (e, t) {
  6650. e = F(e);
  6651. if (e) return e.getNodeById(t)
  6652. }, P.getNodesByFilter = function (e, t, a) {
  6653. var n, i, l, r = F(e);
  6654. if (r) return i = r.getOptions(), n = (a = a || {}).isSingle, a = a.parentNode, a = a && a.data, i = r.treeToFlat(a ? a[i.tree.customName.children] || [] : j.cache[e]).filter(t), l = [], layui.each(i, function (e, t) {
  6655. if (l.push(r.getNodeByIndex(t[H])), n) return !0
  6656. }), l
  6657. }, i.that = {}, P.reload = function (e, t, a, n) {
  6658. e = F(e);
  6659. if (e) return e.reload(t, a, n), i.call(e)
  6660. }, P.render = function (e) {
  6661. e = new t(e);
  6662. return i.call(e)
  6663. }, e("treeTable", P)
  6664. });
  6665. layui.define("form", function (e) {
  6666. "use strict";
  6667. var p = layui.$, i = layui.form, y = layui.layer, a = "tree", t = {
  6668. config: {customName: {id: "id", title: "title", children: "children"}},
  6669. index: layui[a] ? layui[a].index + 1e4 : 0,
  6670. set: function (e) {
  6671. var i = this;
  6672. return i.config = p.extend({}, i.config, e), i
  6673. },
  6674. on: function (e, i) {
  6675. return layui.onevent.call(this, a, e, i)
  6676. }
  6677. }, n = function () {
  6678. var i = this, e = i.config, a = e.id || i.index;
  6679. return n.that[a] = i, {
  6680. config: n.config[a] = e, reload: function (e) {
  6681. i.reload.call(i, e)
  6682. }, getChecked: function () {
  6683. return i.getChecked.call(i)
  6684. }, setChecked: function (e) {
  6685. return i.setChecked.call(i, e)
  6686. }
  6687. }
  6688. }, f = "layui-hide", o = "layui-disabled", m = "layui-tree-set", k = "layui-tree-iconClick",
  6689. C = "layui-icon-addition", v = "layui-icon-subtraction", x = "layui-tree-entry", b = "layui-tree-main",
  6690. g = "layui-tree-txt", w = "layui-tree-pack", N = "layui-tree-spread", F = "layui-tree-setLineShort",
  6691. T = "layui-tree-showLine", L = "layui-tree-lineExtend", l = function (e) {
  6692. var i = this;
  6693. i.index = ++t.index, i.config = p.extend({}, i.config, t.config, e), i.render()
  6694. };
  6695. l.prototype.config = {
  6696. data: [],
  6697. showCheckbox: !1,
  6698. showLine: !0,
  6699. accordion: !1,
  6700. onlyIconControl: !1,
  6701. isJump: !1,
  6702. edit: !1,
  6703. text: {defaultNodeName: "\u672a\u547d\u540d", none: "\u65e0\u6570\u636e"}
  6704. }, l.prototype.reload = function (e) {
  6705. var a = this;
  6706. layui.each(e, function (e, i) {
  6707. "array" === layui.type(i) && delete a.config[e]
  6708. }), a.config = p.extend(!0, {}, a.config, e), a.render()
  6709. }, l.prototype.render = function () {
  6710. var e = this, i = e.config,
  6711. a = (i.customName = p.extend({}, t.config.customName, i.customName), e.checkids = [], p('<div class="layui-tree layui-border-box' + (i.showCheckbox ? " layui-form" : "") + (i.showLine ? " layui-tree-line" : "") + '" lay-filter="LAY-tree-' + e.index + '"></div>')),
  6712. n = (e.tree(a), i.elem = p(i.elem));
  6713. if (n[0]) {
  6714. if (e.key = i.id || e.index, e.elem = a, e.elemNone = p('<div class="layui-tree-emptyText">' + i.text.none + "</div>"), n.html(e.elem), 0 == e.elem.find(".layui-tree-set").length) return e.elem.append(e.elemNone);
  6715. i.showCheckbox && e.renderForm("checkbox"), e.elem.find(".layui-tree-set").each(function () {
  6716. var e = p(this);
  6717. e.parent(".layui-tree-pack")[0] || e.addClass("layui-tree-setHide"), !e.next()[0] && e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend") && e.addClass(F), e.next()[0] || e.parents(".layui-tree-set").eq(0).next()[0] || e.addClass(F)
  6718. }), e.events()
  6719. }
  6720. }, l.prototype.renderForm = function (e) {
  6721. i.render(e, "LAY-tree-" + this.index)
  6722. }, l.prototype.tree = function (l, e) {
  6723. var c = this, r = c.config, d = r.customName, e = e || r.data;
  6724. layui.each(e, function (e, i) {
  6725. var a = i[d.children] && 0 < i[d.children].length,
  6726. n = p('<div class="layui-tree-pack" ' + (i.spread ? 'style="display: block;"' : "") + "></div>"),
  6727. t = p(['<div data-id="' + i[d.id] + '" class="layui-tree-set' + (i.spread ? " layui-tree-spread" : "") + (i.checked ? " layui-tree-checkedFirst" : "") + '">', '<div class="layui-tree-entry">', '<div class="layui-tree-main">', r.showLine ? a ? '<span class="layui-tree-iconClick layui-tree-icon"><i class="layui-icon ' + (i.spread ? "layui-icon-subtraction" : "layui-icon-addition") + '"></i></span>' : '<span class="layui-tree-iconClick"><i class="layui-icon layui-icon-file"></i></span>' : '<span class="layui-tree-iconClick"><i class="layui-tree-iconArrow ' + (a ? "" : f) + '"></i></span>', r.showCheckbox ? '<input type="checkbox" name="' + (i.field || "layuiTreeCheck_" + i[d.id]) + '" same="layuiTreeCheck" lay-skin="primary" ' + (i.disabled ? "disabled" : "") + ' value="' + i[d.id] + '">' : "", r.isJump && i.href ? '<a href="' + i.href + '" target="_blank" class="' + g + '">' + (i[d.title] || i.label || r.text.defaultNodeName) + "</a>" : '<span class="' + g + (i.disabled ? " " + o : "") + '">' + (i[d.title] || i.label || r.text.defaultNodeName) + "</span>", "</div>", function () {
  6728. if (!r.edit) return "";
  6729. var a = {
  6730. add: '<i class="layui-icon layui-icon-add-1" data-type="add"></i>',
  6731. update: '<i class="layui-icon layui-icon-edit" data-type="update"></i>',
  6732. del: '<i class="layui-icon layui-icon-delete" data-type="del"></i>'
  6733. }, n = ['<div class="layui-btn-group layui-tree-btnGroup">'];
  6734. return !0 === r.edit && (r.edit = ["update", "del"]), "object" == typeof r.edit ? (layui.each(r.edit, function (e, i) {
  6735. n.push(a[i] || "")
  6736. }), n.join("") + "</div>") : void 0
  6737. }(), "</div></div>"].join(""));
  6738. a && (t.append(n), c.tree(n, i[d.children])), l.append(t), t.prev("." + m)[0] && t.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"), a || t.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"), c.spread(t, i), r.showCheckbox && (i.checked && c.checkids.push(i[d.id]), c.checkClick(t, i)), r.edit && c.operate(t, i)
  6739. })
  6740. }, l.prototype.spread = function (n, t) {
  6741. var l = this, c = l.config, e = n.children("." + x), i = e.children("." + b),
  6742. a = i.find('input[same="layuiTreeCheck"]'), r = e.find("." + k), e = e.find("." + g),
  6743. d = c.onlyIconControl ? r : i, s = "";
  6744. d.on("click", function (e) {
  6745. var i = n.children("." + w),
  6746. a = (d.children(".layui-icon")[0] ? d : d.find(".layui-tree-icon")).children(".layui-icon");
  6747. i[0] ? n.hasClass(N) ? (n.removeClass(N), i.slideUp(200), a.removeClass(v).addClass(C), l.updateFieldValue(t, "spread", !1)) : (n.addClass(N), i.slideDown(200), a.addClass(v).removeClass(C), l.updateFieldValue(t, "spread", !0), c.accordion && ((i = n.siblings("." + m)).removeClass(N), i.children("." + w).slideUp(200), i.find(".layui-tree-icon").children(".layui-icon").removeClass(v).addClass(C))) : s = "normal"
  6748. }), e.on("click", function () {
  6749. p(this).hasClass(o) || (s = n.hasClass(N) ? c.onlyIconControl ? "open" : "close" : c.onlyIconControl ? "close" : "open", a[0] && l.updateFieldValue(t, "checked", a.prop("checked")), c.click && c.click({
  6750. elem: n,
  6751. state: s,
  6752. data: t
  6753. }))
  6754. })
  6755. }, l.prototype.updateFieldValue = function (e, i, a) {
  6756. i in e && (e[i] = a)
  6757. }, l.prototype.setCheckbox = function (e, i, a) {
  6758. var t, n = this, l = n.config.customName, c = a.prop("checked");
  6759. a.prop("disabled") || ("object" != typeof i[l.children] && !e.find("." + w)[0] || e.find("." + w).find('input[same="layuiTreeCheck"]').each(function (e) {
  6760. this.disabled || ((e = i[l.children][e]) && n.updateFieldValue(e, "checked", c), n.updateFieldValue(this, "checked", c))
  6761. }), (t = function (e) {
  6762. var i, a, n;
  6763. e.parents("." + m)[0] && (a = (e = e.parent("." + w)).parent(), n = e.prev().find('input[same="layuiTreeCheck"]'), c ? n.prop("checked", c) : (e.find('input[same="layuiTreeCheck"]').each(function () {
  6764. this.checked && (i = !0)
  6765. }), i || n.prop("checked", !1)), t(a))
  6766. })(e), n.renderForm("checkbox"))
  6767. }, l.prototype.checkClick = function (a, n) {
  6768. var t = this, l = t.config;
  6769. a.children("." + x).children("." + b).on("click", 'input[same="layuiTreeCheck"]+', function (e) {
  6770. layui.stope(e);
  6771. var e = p(this).prev(), i = e.prop("checked");
  6772. e.prop("disabled") || (t.setCheckbox(a, n, e), t.updateFieldValue(n, "checked", i), l.oncheck && l.oncheck({
  6773. elem: a,
  6774. checked: i,
  6775. data: n
  6776. }))
  6777. })
  6778. }, l.prototype.operate = function (r, d) {
  6779. var s = this, o = s.config, u = o.customName, e = r.children("." + x), h = e.children("." + b);
  6780. e.children(".layui-tree-btnGroup").on("click", ".layui-icon", function (e) {
  6781. layui.stope(e);
  6782. var i, e = p(this).data("type"), n = r.children("." + w), t = {data: d, type: e, elem: r};
  6783. if ("add" == e) {
  6784. n[0] || (o.showLine ? (h.find("." + k).addClass("layui-tree-icon"), h.find("." + k).children(".layui-icon").addClass(C).removeClass("layui-icon-file")) : h.find(".layui-tree-iconArrow").removeClass(f), r.append('<div class="layui-tree-pack"></div>'));
  6785. var a, l = o.operate && o.operate(t), c = {};
  6786. if (c[u.title] = o.text.defaultNodeName, c[u.id] = l, s.tree(r.children("." + w), [c]), o.showLine && (n[0] ? (n.hasClass(L) || n.addClass(L), r.find("." + w).each(function () {
  6787. p(this).children("." + m).last().addClass(F)
  6788. }), (n.children("." + m).last().prev().hasClass(F) ? n.children("." + m).last().prev() : n.children("." + m).last()).removeClass(F), !r.parent("." + w)[0] && r.next()[0] && n.children("." + m).last().removeClass(F)) : (l = r.siblings("." + m), a = 1, c = r.parent("." + w), layui.each(l, function (e, i) {
  6789. p(i).children("." + w)[0] || (a = 0)
  6790. }), 1 == a ? (l.children("." + w).addClass(T), l.children("." + w).children("." + m).removeClass(F), r.children("." + w).addClass(T), c.removeClass(L), c.children("." + m).last().children("." + w).children("." + m).last().addClass(F)) : r.children("." + w).children("." + m).addClass(F))), !o.showCheckbox) return;
  6791. h.find('input[same="layuiTreeCheck"]')[0].checked && (r.children("." + w).children("." + m).last().find('input[same="layuiTreeCheck"]')[0].checked = !0), s.renderForm("checkbox")
  6792. } else "update" == e ? (l = h.children("." + g).html(), h.children("." + g).html(""), h.append('<input type="text" class="layui-tree-editInput">'), h.children(".layui-tree-editInput").val(l).focus(), i = function (e) {
  6793. var i = (i = e.val().trim()) || o.text.defaultNodeName;
  6794. e.remove(), h.children("." + g).html(i), t.data[u.title] = i, o.operate && o.operate(t)
  6795. }, h.children(".layui-tree-editInput").blur(function () {
  6796. i(p(this))
  6797. }), h.children(".layui-tree-editInput").on("keydown", function (e) {
  6798. 13 === e.keyCode && (e.preventDefault(), i(p(this)))
  6799. })) : y.confirm('\u786e\u8ba4\u5220\u9664\u8be5\u8282\u70b9 "<span style="color: #999;">' + (d[u.title] || "") + '</span>" \u5417\uff1f', function (e) {
  6800. if (o.operate && o.operate(t), t.status = "remove", y.close(e), !r.prev("." + m)[0] && !r.next("." + m)[0] && !r.parent("." + w)[0]) return r.remove(), void s.elem.append(s.elemNone);
  6801. var l, a, i;
  6802. r.siblings("." + m).children("." + x)[0] ? (o.showCheckbox && (l = function (e) {
  6803. var i, a, n, t;
  6804. e.parents("." + m)[0] && (i = e.siblings("." + m).children("." + x), a = (e = e.parent("." + w).prev()).find('input[same="layuiTreeCheck"]')[0], n = 1, (t = 0) == a.checked && (i.each(function (e, i) {
  6805. i = p(i).find('input[same="layuiTreeCheck"]')[0];
  6806. 0 != i.checked || i.disabled || (n = 0), i.disabled || (t = 1)
  6807. }), 1 == n && 1 == t && (a.checked = !0, s.renderForm("checkbox"), l(e.parent("." + m)))))
  6808. })(r), o.showLine && (e = r.siblings("." + m), a = 1, i = r.parent("." + w), layui.each(e, function (e, i) {
  6809. p(i).children("." + w)[0] || (a = 0)
  6810. }), 1 == a ? (n[0] || (i.removeClass(L), e.children("." + w).addClass(T), e.children("." + w).children("." + m).removeClass(F)), (r.next()[0] ? i.children("." + m).last() : r.prev()).children("." + w).children("." + m).last().addClass(F), r.next()[0] || r.parents("." + m)[1] || r.parents("." + m).eq(0).next()[0] || r.prev("." + m).addClass(F)) : !r.next()[0] && r.hasClass(F) && r.prev().addClass(F))) : (e = r.parent("." + w).prev(), o.showLine ? (e.find("." + k).removeClass("layui-tree-icon"), e.find("." + k).children(".layui-icon").removeClass(v).addClass("layui-icon-file"), (i = e.parents("." + w).eq(0)).addClass(L), i.children("." + m).each(function () {
  6811. p(this).children("." + w).children("." + m).last().addClass(F)
  6812. })) : e.find(".layui-tree-iconArrow").addClass(f), r.parents("." + m).eq(0).removeClass(N), r.parent("." + w).remove()), r.remove()
  6813. })
  6814. })
  6815. }, l.prototype.events = function () {
  6816. var i = this, t = i.config;
  6817. i.elem.find(".layui-tree-checkedFirst");
  6818. i.setChecked(i.checkids), i.elem.find(".layui-tree-search").on("keyup", function () {
  6819. var e = p(this), a = e.val(), e = e.nextAll(), n = [];
  6820. e.find("." + g).each(function () {
  6821. var i, e = p(this).parents("." + x);
  6822. -1 != p(this).html().indexOf(a) && (n.push(p(this).parent()), (i = function (e) {
  6823. e.addClass("layui-tree-searchShow"), e.parent("." + w)[0] && i(e.parent("." + w).parent("." + m))
  6824. })(e.parent("." + m)))
  6825. }), e.find("." + x).each(function () {
  6826. var e = p(this).parent("." + m);
  6827. e.hasClass("layui-tree-searchShow") || e.addClass(f)
  6828. }), 0 == e.find(".layui-tree-searchShow").length && i.elem.append(i.elemNone), t.onsearch && t.onsearch({elem: n})
  6829. }), i.elem.find(".layui-tree-search").on("keydown", function () {
  6830. p(this).nextAll().find("." + x).each(function () {
  6831. p(this).parent("." + m).removeClass("layui-tree-searchShow " + f)
  6832. }), p(".layui-tree-emptyText")[0] && p(".layui-tree-emptyText").remove()
  6833. })
  6834. }, l.prototype.getChecked = function () {
  6835. var t = this, e = t.config, l = e.customName, i = [], a = [],
  6836. c = (t.elem.find(".layui-form-checked").each(function () {
  6837. i.push(p(this).prev()[0].value)
  6838. }), function (e, n) {
  6839. layui.each(e, function (e, a) {
  6840. layui.each(i, function (e, i) {
  6841. if (a[l.id] == i) return t.updateFieldValue(a, "checked", !0), delete (i = p.extend({}, a))[l.children], n.push(i), a[l.children] && (i[l.children] = [], c(a[l.children], i[l.children])), !0
  6842. })
  6843. })
  6844. });
  6845. return c(p.extend({}, e.data), a), a
  6846. }, l.prototype.setChecked = function (l) {
  6847. this.config;
  6848. this.elem.find("." + m).each(function (e, i) {
  6849. var a = p(this).data("id"), n = p(i).children("." + x).find('input[same="layuiTreeCheck"]'), t = n.next();
  6850. if ("number" == typeof l) {
  6851. if (a.toString() == l.toString()) return n[0].checked || t.click(), !1
  6852. } else "object" == typeof l && layui.each(l, function (e, i) {
  6853. if (i.toString() == a.toString() && !n[0].checked) return t.click(), !0
  6854. })
  6855. })
  6856. }, n.that = {}, n.config = {}, t.reload = function (e, i) {
  6857. e = n.that[e];
  6858. return e.reload(i), n.call(e)
  6859. }, t.getChecked = function (e) {
  6860. return n.that[e].getChecked()
  6861. }, t.setChecked = function (e, i) {
  6862. return n.that[e].setChecked(i)
  6863. }, t.render = function (e) {
  6864. e = new l(e);
  6865. return n.call(e)
  6866. }, e(a, t)
  6867. });
  6868. layui.define(["laytpl", "form"], function (e) {
  6869. "use strict";
  6870. var s = layui.$, n = layui.laytpl, t = layui.form, a = "transfer", i = {
  6871. config: {}, index: layui[a] ? layui[a].index + 1e4 : 0, set: function (e) {
  6872. var t = this;
  6873. return t.config = s.extend({}, t.config, e), t
  6874. }, on: function (e, t) {
  6875. return layui.onevent.call(this, a, e, t)
  6876. }
  6877. }, l = function () {
  6878. var t = this, e = t.config, a = e.id || t.index;
  6879. return l.that[a] = t, {
  6880. config: l.config[a] = e, reload: function (e) {
  6881. t.reload.call(t, e)
  6882. }, getData: function () {
  6883. return t.getData.call(t)
  6884. }
  6885. }
  6886. }, d = "layui-hide", h = "layui-btn-disabled", r = "layui-none", c = "layui-transfer-box",
  6887. u = "layui-transfer-header", o = "layui-transfer-search", f = "layui-transfer-data", y = function (e) {
  6888. return ['<div class="layui-transfer-box" data-index="' + (e = e || {}).index + '">', '<div class="layui-transfer-header">', '<input type="checkbox" name="' + e.checkAllName + '" lay-filter="layTransferCheckbox" lay-type="all" lay-skin="primary" title="{{= d.data.title[' + e.index + "] || 'list" + (e.index + 1) + "' }}\">", "</div>", "{{# if(d.data.showSearch){ }}", '<div class="layui-transfer-search">', '<i class="layui-icon layui-icon-search"></i>', '<input type="text" class="layui-input" placeholder="\u5173\u952e\u8bcd\u641c\u7d22">', "</div>", "{{# } }}", '<ul class="layui-transfer-data"></ul>', "</div>"].join("")
  6889. }, p = ['<div class="layui-transfer layui-form layui-border-box" lay-filter="LAY-transfer-{{= d.index }}">', y({
  6890. index: 0,
  6891. checkAllName: "layTransferLeftCheckAll"
  6892. }), '<div class="layui-transfer-active">', '<button type="button" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled" data-index="0">', '<i class="layui-icon layui-icon-next"></i>', "</button>", '<button type="button" class="layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled" data-index="1">', '<i class="layui-icon layui-icon-prev"></i>', "</button>", "</div>", y({
  6893. index: 1,
  6894. checkAllName: "layTransferRightCheckAll"
  6895. }), "</div>"].join(""), v = function (e) {
  6896. var t = this;
  6897. t.index = ++i.index, t.config = s.extend({}, t.config, i.config, e), t.render()
  6898. };
  6899. v.prototype.config = {
  6900. title: ["\u5217\u8868\u4e00", "\u5217\u8868\u4e8c"],
  6901. width: 200,
  6902. height: 360,
  6903. data: [],
  6904. value: [],
  6905. showSearch: !1,
  6906. id: "",
  6907. text: {none: "\u65e0\u6570\u636e", searchNone: "\u65e0\u5339\u914d\u6570\u636e"}
  6908. }, v.prototype.reload = function (e) {
  6909. var t = this;
  6910. t.config = s.extend({}, t.config, e), t.render()
  6911. }, v.prototype.render = function () {
  6912. var e = this, t = e.config, a = e.elem = s(n(p, {open: "{{", close: "}}"}).render({data: t, index: e.index})),
  6913. i = t.elem = s(t.elem);
  6914. i[0] && (t.data = t.data || [], t.value = t.value || [], t.id = "id" in t ? t.id : elem.attr("id") || e.index, e.key = t.id, i.html(e.elem), e.layBox = e.elem.find("." + c), e.layHeader = e.elem.find("." + u), e.laySearch = e.elem.find("." + o), e.layData = a.find("." + f), e.layBtn = a.find(".layui-transfer-active .layui-btn"), e.layBox.css({
  6915. width: t.width,
  6916. height: t.height
  6917. }), e.layData.css({height: (i = t.height - e.layHeader.outerHeight(), t.showSearch && (i -= e.laySearch.outerHeight()), i - 2)}), e.renderData(), e.events())
  6918. }, v.prototype.renderData = function () {
  6919. var e = this, t = e.config,
  6920. l = [{checkName: "layTransferLeftCheck", views: []}, {checkName: "layTransferRightCheck", views: []}];
  6921. e.parseData(function (a) {
  6922. var i = a.selected ? 1 : 0,
  6923. n = ["<li>", '<input type="checkbox" name="' + l[i].checkName + '" lay-skin="primary" lay-filter="layTransferCheckbox" title="' + a.title + '"' + (a.disabled ? " disabled" : "") + (a.checked ? " checked" : "") + ' value="' + a.value + '">', "</li>"].join("");
  6924. i ? layui.each(t.value, function (e, t) {
  6925. t == a.value && a.selected && (l[i].views[e] = n)
  6926. }) : l[i].views.push(n), delete a.selected
  6927. }), e.layData.eq(0).html(l[0].views.join("")), e.layData.eq(1).html(l[1].views.join("")), e.renderCheckBtn()
  6928. }, v.prototype.renderForm = function (e) {
  6929. t.render(e, "LAY-transfer-" + this.index)
  6930. }, v.prototype.renderCheckBtn = function (r) {
  6931. var c = this, o = c.config;
  6932. r = r || {}, c.layBox.each(function (e) {
  6933. var t = s(this), a = t.find("." + f), t = t.find("." + u).find('input[type="checkbox"]'),
  6934. i = a.find('input[type="checkbox"]'), n = 0, l = !1;
  6935. i.each(function () {
  6936. var e = s(this).data("hide");
  6937. (this.checked || this.disabled || e) && n++, this.checked && !e && (l = !0)
  6938. }), t.prop("checked", l && n === i.length), c.layBtn.eq(e)[l ? "removeClass" : "addClass"](h), r.stopNone || (i = a.children("li:not(." + d + ")").length, c.noneView(a, i ? "" : o.text.none))
  6939. }), c.renderForm("checkbox")
  6940. }, v.prototype.noneView = function (e, t) {
  6941. var a = s('<p class="layui-none">' + (t || "") + "</p>");
  6942. e.find("." + r)[0] && e.find("." + r).remove(), t.replace(/\s/g, "") && e.append(a)
  6943. }, v.prototype.setValue = function () {
  6944. var e = this.config, t = [];
  6945. return this.layBox.eq(1).find("." + f + ' input[type="checkbox"]').each(function () {
  6946. s(this).data("hide") || t.push(this.value)
  6947. }), e.value = t, this
  6948. }, v.prototype.parseData = function (t) {
  6949. var i = this.config, n = [];
  6950. return layui.each(i.data, function (e, a) {
  6951. a = ("function" == typeof i.parseData ? i.parseData(a) : a) || a, n.push(a = s.extend({}, a)), layui.each(i.value, function (e, t) {
  6952. t == a.value && (a.selected = !0)
  6953. }), t && t(a)
  6954. }), i.data = n, this
  6955. }, v.prototype.getData = function (e) {
  6956. var t = this.config, i = [];
  6957. return this.setValue(), layui.each(e || t.value, function (e, a) {
  6958. layui.each(t.data, function (e, t) {
  6959. delete t.selected, a == t.value && i.push(t)
  6960. })
  6961. }), i
  6962. }, v.prototype.transfer = function (e, t) {
  6963. var a, i = this, n = i.config, l = i.layBox.eq(e), r = [],
  6964. t = (t ? ((a = (t = t).find('input[type="checkbox"]'))[0].checked = !1, l.siblings("." + c).find("." + f).append(t.clone()), t.remove(), r.push(a[0].value), i.setValue()) : l.each(function (e) {
  6965. s(this).find("." + f).children("li").each(function () {
  6966. var e = s(this), t = e.find('input[type="checkbox"]'), a = t.data("hide");
  6967. t[0].checked && !a && (t[0].checked = !1, l.siblings("." + c).find("." + f).append(e.clone()), e.remove(), r.push(t[0].value)), i.setValue()
  6968. })
  6969. }), i.renderCheckBtn(), l.siblings("." + c).find("." + o + " input"));
  6970. "" !== t.val() && t.trigger("keyup"), n.onchange && n.onchange(i.getData(r), e)
  6971. }, v.prototype.events = function () {
  6972. var n = this, l = n.config;
  6973. n.elem.on("click", 'input[lay-filter="layTransferCheckbox"]+', function () {
  6974. var e = s(this).prev(), t = e[0].checked, a = e.parents("." + c).eq(0).find("." + f);
  6975. e[0].disabled || ("all" === e.attr("lay-type") && a.find('input[type="checkbox"]').each(function () {
  6976. this.disabled || (this.checked = t)
  6977. }), setTimeout(function () {
  6978. n.renderCheckBtn({stopNone: !0})
  6979. }, 0))
  6980. }), n.elem.on("dblclick", "." + f + ">li", function (e) {
  6981. var t = s(this), a = t.children('input[type="checkbox"]'), i = t.parent().parent();
  6982. a[0].disabled || n.transfer(i.data("index"), t)
  6983. }), n.layBtn.on("click", function () {
  6984. var e = s(this), t = e.data("index");
  6985. e.hasClass(h) || n.transfer(t)
  6986. }), n.laySearch.find("input").on("keyup", function () {
  6987. var i = this.value, e = s(this).parents("." + o).eq(0).siblings("." + f), t = e.children("li"),
  6988. t = (t.each(function () {
  6989. var e = s(this), t = e.find('input[type="checkbox"]'), a = t[0].title,
  6990. a = ("cs" !== l.showSearch && (a = a.toLowerCase(), i = i.toLowerCase()), -1 !== a.indexOf(i));
  6991. e[a ? "removeClass" : "addClass"](d), t.data("hide", !a)
  6992. }), n.renderCheckBtn(), t.length === e.children("li." + d).length);
  6993. n.noneView(e, t ? l.text.searchNone : "")
  6994. })
  6995. }, l.that = {}, l.config = {}, i.reload = function (e, t) {
  6996. e = l.that[e];
  6997. return e.reload(t), l.call(e)
  6998. }, i.getData = function (e) {
  6999. return l.that[e].getData()
  7000. }, i.render = function (e) {
  7001. e = new v(e);
  7002. return l.call(e)
  7003. }, e(a, i)
  7004. });
  7005. layui.define(["jquery", "lay"], function (e) {
  7006. "use strict";
  7007. var a = layui.$, t = layui.lay, o = (layui.hint(), layui.device(), {
  7008. config: {}, set: function (e) {
  7009. var i = this;
  7010. return i.config = a.extend({}, i.config, e), i
  7011. }, on: function (e, i) {
  7012. return layui.onevent.call(this, r, e, i)
  7013. }
  7014. }), r = "carousel", d = "layui-this", s = "layui-carousel-left", u = "layui-carousel-right",
  7015. c = "layui-carousel-prev", m = "layui-carousel-next", l = "layui-carousel-arrow", f = "layui-carousel-ind",
  7016. i = function (e) {
  7017. var i = this;
  7018. i.config = a.extend({}, i.config, o.config, e), i.render()
  7019. };
  7020. i.prototype.config = {
  7021. width: "600px",
  7022. height: "280px",
  7023. full: !1,
  7024. arrow: "hover",
  7025. indicator: "inside",
  7026. autoplay: !0,
  7027. interval: 3e3,
  7028. anim: "",
  7029. trigger: "click",
  7030. index: 0
  7031. }, i.prototype.render = function () {
  7032. var e = this, i = e.config, n = a(i.elem);
  7033. if (1 < n.length) return layui.each(n, function () {
  7034. o.render(a.extend({}, i, {elem: this}))
  7035. }), e;
  7036. a.extend(i, t.options(n[0])), i.elem = a(i.elem), i.elem[0] && (e.elemItem = i.elem.find(">*[carousel-item]>*"), i.index < 0 && (i.index = 0), i.index >= e.elemItem.length && (i.index = e.elemItem.length - 1), i.interval < 800 && (i.interval = 800), i.full ? i.elem.css({
  7037. position: "fixed",
  7038. width: "100%",
  7039. height: "100%",
  7040. zIndex: 9999
  7041. }) : i.elem.css({
  7042. width: i.width,
  7043. height: i.height
  7044. }), i.elem.attr("lay-anim", i.anim), e.elemItem.eq(i.index).addClass(d), e.elemItem.length <= 1 || (e.indicator(), e.arrow(), e.autoplay(), e.events()))
  7045. }, i.prototype.reload = function (e) {
  7046. var i = this;
  7047. clearInterval(i.timer), i.config = a.extend({}, i.config, e), i.render()
  7048. }, i.prototype.prevIndex = function () {
  7049. var e = this.config.index - 1;
  7050. return e = e < 0 ? this.elemItem.length - 1 : e
  7051. }, i.prototype.nextIndex = function () {
  7052. var e = this.config.index + 1;
  7053. return e = e >= this.elemItem.length ? 0 : e
  7054. }, i.prototype.addIndex = function (e) {
  7055. var i = this.config;
  7056. i.index = i.index + (e = e || 1), i.index >= this.elemItem.length && (i.index = 0)
  7057. }, i.prototype.subIndex = function (e) {
  7058. var i = this.config;
  7059. i.index = i.index - (e = e || 1), i.index < 0 && (i.index = this.elemItem.length - 1)
  7060. }, i.prototype.autoplay = function () {
  7061. var e = this, i = e.config;
  7062. i.autoplay && (clearInterval(e.timer), e.timer = setInterval(function () {
  7063. e.slide()
  7064. }, i.interval))
  7065. }, i.prototype.arrow = function () {
  7066. var i = this, e = i.config,
  7067. n = a(['<button class="layui-icon ' + l + '" lay-type="sub">' + ("updown" === e.anim ? "&#xe619;" : "&#xe603;") + "</button>", '<button class="layui-icon ' + l + '" lay-type="add">' + ("updown" === e.anim ? "&#xe61a;" : "&#xe602;") + "</button>"].join(""));
  7068. e.elem.attr("lay-arrow", e.arrow), e.elem.find("." + l)[0] && e.elem.find("." + l).remove(), e.elem.append(n), n.on("click", function () {
  7069. var e = a(this).attr("lay-type");
  7070. i.slide(e)
  7071. })
  7072. }, i.prototype["goto"] = function (e) {
  7073. var i = this, n = i.config;
  7074. e > n.index ? i.slide("add", e - n.index) : e < n.index && i.slide("sub", n.index - e)
  7075. }, i.prototype.indicator = function () {
  7076. var i, e = this, n = e.config,
  7077. t = e.elemInd = a(['<div class="' + f + '"><ul>', (i = [], layui.each(e.elemItem, function (e) {
  7078. i.push("<li" + (n.index === e ? ' class="layui-this"' : "") + "></li>")
  7079. }), i.join("")), "</ul></div>"].join(""));
  7080. n.elem.attr("lay-indicator", n.indicator), n.elem.find("." + f)[0] && n.elem.find("." + f).remove(), n.elem.append(t), "updown" === n.anim && t.css("margin-top", -t.height() / 2), t.find("li").on("hover" === n.trigger ? "mouseover" : n.trigger, function () {
  7081. e["goto"](a(this).index())
  7082. })
  7083. }, i.prototype.slide = function (e, i) {
  7084. var n = this, t = n.elemItem, a = n.config, o = a.index, l = a.elem.attr("lay-filter");
  7085. n.haveSlide || ("sub" === e ? (n.subIndex(i), t.eq(a.index).addClass(c), setTimeout(function () {
  7086. t.eq(o).addClass(u), t.eq(a.index).addClass(u)
  7087. }, 50)) : (n.addIndex(i), t.eq(a.index).addClass(m), setTimeout(function () {
  7088. t.eq(o).addClass(s), t.eq(a.index).addClass(s)
  7089. }, 50)), setTimeout(function () {
  7090. t.removeClass(d + " " + c + " " + m + " " + s + " " + u), t.eq(a.index).addClass(d), n.haveSlide = !1
  7091. }, 300), n.elemInd.find("li").eq(a.index).addClass(d).siblings().removeClass(d), n.haveSlide = !0, e = {
  7092. index: a.index,
  7093. prevIndex: o,
  7094. item: t.eq(a.index)
  7095. }, "function" == typeof a.change && a.change(e), layui.event.call(this, r, "change(" + l + ")", e))
  7096. }, i.prototype.events = function () {
  7097. var e = this, i = e.config;
  7098. i.elem.data("haveEvents") || (i.elem.on("mouseenter", function () {
  7099. "always" !== e.config.autoplay && clearInterval(e.timer)
  7100. }).on("mouseleave", function () {
  7101. "always" !== e.config.autoplay && e.autoplay()
  7102. }), i.elem.data("haveEvents", !0))
  7103. }, o.render = function (e) {
  7104. return new i(e)
  7105. }, e(r, o)
  7106. });
  7107. layui.define(["jquery", "lay"], function (e) {
  7108. "use strict";
  7109. var s = layui.jquery, r = layui.lay, c = {
  7110. config: {}, index: layui.rate ? layui.rate.index + 1e4 : 0, set: function (e) {
  7111. var a = this;
  7112. return a.config = s.extend({}, a.config, e), a
  7113. }, on: function (e, a) {
  7114. return layui.onevent.call(this, l, e, a)
  7115. }
  7116. }, l = "rate", f = "layui-icon-rate", h = "layui-icon-rate-solid", o = "layui-icon-rate-half",
  7117. u = "layui-icon-rate-solid layui-icon-rate-half", v = "layui-icon-rate layui-icon-rate-half", a = function (e) {
  7118. var a = this;
  7119. a.index = ++c.index, a.config = s.extend({}, a.config, c.config, e), a.render()
  7120. };
  7121. a.prototype.config = {
  7122. length: 5,
  7123. text: !1,
  7124. readonly: !1,
  7125. half: !1,
  7126. value: 0,
  7127. theme: ""
  7128. }, a.prototype.render = function () {
  7129. var e = this, a = e.config, l = s(a.elem);
  7130. if (1 < l.length) return layui.each(l, function () {
  7131. c.render(s.extend({}, a, {elem: this}))
  7132. }), e;
  7133. s.extend(a, r.options(l[0]));
  7134. for (var i = a.theme ? 'style="color: ' + a.theme + ';"' : "", n = (a.elem = s(a.elem), a.value > a.length && (a.value = a.length), parseInt(a.value) === a.value || a.half || (a.value = Math.ceil(a.value) - a.value < .5 ? Math.ceil(a.value) : Math.floor(a.value)), '<ul class="layui-rate" ' + (a.readonly ? "readonly" : "") + ">"), t = 1; t <= a.length; t++) {
  7135. var o = '<li class="layui-inline"><i class="layui-icon ' + (t > Math.floor(a.value) ? f : h) + '" ' + i + "></i></li>";
  7136. a.half && parseInt(a.value) !== a.value && t == Math.ceil(a.value) ? n = n + '<li><i class="layui-icon layui-icon-rate-half" ' + i + "></i></li>" : n += o
  7137. }
  7138. n += "</ul>" + (a.text ? '<span class="layui-inline">' + a.value + "\u661f" : "") + "</span>";
  7139. var l = a.elem, u = l.next(".layui-rate");
  7140. u[0] && u.remove(), e.elemTemp = s(n), a.span = e.elemTemp.next("span"), a.setText && a.setText(a.value), l.html(e.elemTemp), l.addClass("layui-inline"), a.readonly || e.action()
  7141. }, a.prototype.setvalue = function (e) {
  7142. this.config.value = e, this.render()
  7143. }, a.prototype.action = function () {
  7144. var i = this.config, n = this.elemTemp, t = n.find("i").width();
  7145. n.children("li").each(function (e) {
  7146. var a = e + 1, l = s(this);
  7147. l.on("click", function (e) {
  7148. i.value = a, i.half && e.pageX - s(this).offset().left <= t / 2 && (i.value = i.value - .5), i.text && n.next("span").text(i.value + "\u661f"), i.choose && i.choose(i.value), i.setText && i.setText(i.value)
  7149. }), l.on("mousemove", function (e) {
  7150. n.find("i").each(function () {
  7151. s(this).addClass(f).removeClass(u)
  7152. }), n.find("i:lt(" + a + ")").each(function () {
  7153. s(this).addClass(h).removeClass(v)
  7154. }), i.half && e.pageX - s(this).offset().left <= t / 2 && l.children("i").addClass(o).removeClass(h)
  7155. }), l.on("mouseleave", function () {
  7156. n.find("i").each(function () {
  7157. s(this).addClass(f).removeClass(u)
  7158. }), n.find("i:lt(" + Math.floor(i.value) + ")").each(function () {
  7159. s(this).addClass(h).removeClass(v)
  7160. }), i.half && parseInt(i.value) !== i.value && n.children("li:eq(" + Math.floor(i.value) + ")").children("i").addClass(o).removeClass("layui-icon-rate-solid layui-icon-rate")
  7161. })
  7162. })
  7163. }, a.prototype.events = function () {
  7164. this.config
  7165. }, c.render = function (e) {
  7166. e = new a(e);
  7167. return function () {
  7168. var a = this;
  7169. return {
  7170. setvalue: function (e) {
  7171. a.setvalue.call(a, e)
  7172. }, config: a.config
  7173. }
  7174. }.call(e)
  7175. }, e(l, c)
  7176. });
  7177. layui.define("jquery", function (l) {
  7178. "use strict";
  7179. var g = layui.$, e = function (l) {
  7180. };
  7181. e.prototype.load = function (l) {
  7182. var t, i, o, n, e, r, a, c, m, s, u, f, y, d = this, p = 0, h = g((l = l || {}).elem);
  7183. if (h[0]) return e = g(l.scrollElem || document), r = l.mb || 50, a = !("isAuto" in l) || l.isAuto, c = l.end || "\u6ca1\u6709\u66f4\u591a\u4e86", m = l.scrollElem && l.scrollElem !== document, s = "<cite>\u52a0\u8f7d\u66f4\u591a</cite>", u = g('<div class="layui-flow-more"><a href="javascript:;">' + s + "</a></div>"), h.find(".layui-flow-more")[0] || h.append(u), f = function (l, e) {
  7184. l = g(l), u.before(l), (e = 0 == e || null) ? u.html(c) : u.find("a").html(s), i = e, t = null, o && o()
  7185. }, y = function () {
  7186. t = !0, u.find("a").html('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>'), "function" == typeof l.done && l.done(++p, f)
  7187. }, y(), u.find("a").on("click", function () {
  7188. g(this);
  7189. i || t || y()
  7190. }), l.isLazyimg && (o = d.lazyimg({
  7191. elem: l.elem + " img",
  7192. scrollElem: l.scrollElem
  7193. })), a && e.on("scroll", function () {
  7194. var e = g(this), o = e.scrollTop();
  7195. n && clearTimeout(n), !i && h.width() && (n = setTimeout(function () {
  7196. var l = (m ? e : g(window)).height();
  7197. (m ? e.prop("scrollHeight") : document.documentElement.scrollHeight) - o - l <= r && (t || y())
  7198. }, 100))
  7199. }), d
  7200. }, e.prototype.lazyimg = function (l) {
  7201. var e, c = this, m = 0, s = g((l = l || {}).scrollElem || document), u = l.elem || "img",
  7202. f = l.scrollElem && l.scrollElem !== document, y = function (e, l) {
  7203. var o, t = s.scrollTop(), l = t + l, i = f ? e.offset().top - s.offset().top + t : e.offset().top;
  7204. t <= i && i <= l && e.attr("lay-src") && (o = e.attr("lay-src"), layui.img(o, function () {
  7205. var l = c.lazyimg.elem.eq(m);
  7206. e.attr("src", o).removeAttr("lay-src"), l[0] && n(l), m++
  7207. }, function () {
  7208. c.lazyimg.elem.eq(m);
  7209. e.removeAttr("lay-src")
  7210. }))
  7211. }, n = function (l, e) {
  7212. var o = (f ? e || s : g(window)).height(), t = s.scrollTop(), i = t + o;
  7213. if (c.lazyimg.elem = g(u), l) y(l, o); else for (var n = 0; n < c.lazyimg.elem.length; n++) {
  7214. var r = c.lazyimg.elem.eq(n), a = f ? r.offset().top - s.offset().top + t : r.offset().top;
  7215. if (y(r, o), m = n, i < a) break
  7216. }
  7217. };
  7218. return n(), s.on("scroll", function () {
  7219. var l = g(this);
  7220. e && clearTimeout(e), e = setTimeout(function () {
  7221. n(null, l)
  7222. }, 50)
  7223. }), n
  7224. }, l("flow", new e)
  7225. });
  7226. layui.define(["lay", "util", "element", "form"], function (e) {
  7227. "use strict";
  7228. var C = layui.$, w = layui.util, b = layui.element, g = layui.form, T = layui.layer, x = {
  7229. ELEM_VIEW: "layui-code-view",
  7230. ELEM_COPY: "layui-code-copy",
  7231. ELEM_TAB: "layui-tab",
  7232. ELEM_TITLE: "layui-code-title",
  7233. ELEM_FULL: "layui-code-full",
  7234. ELEM_PREVIEW: "layui-code-preview",
  7235. ELEM_ITEM: "layui-code-item",
  7236. ELEM_SHOW: "layui-show"
  7237. }, a = {
  7238. elem: ".layui-code",
  7239. about: "",
  7240. ln: !0,
  7241. header: !1,
  7242. encode: !0,
  7243. copy: !0,
  7244. text: {code: w.escape("</>"), preview: "Preview"}
  7245. }, I = function (e) {
  7246. return C.trim(e).replace(/^\n|\n$/, "")
  7247. };
  7248. e("code", function (e) {
  7249. var _ = e = C.extend(!0, {}, a, e);
  7250. e.elem = C(e.elem), e.elem[0] && layui.each(e.elem.get().reverse(), function (e, a) {
  7251. var t, l, i, o, n, s, c, d, r, u, y, E, p = C(a),
  7252. f = C.extend(!0, {}, _, lay.options(a), (t = {}, layui.each(["title", "height", "encode", "skin", "about"], function (e, a) {
  7253. var i = p.attr("lay-" + a);
  7254. "string" == typeof i && (t[a] = i)
  7255. }), t)), v = p.data("code") || (i = [], p.children("textarea").each(function () {
  7256. i.push(I(this.value))
  7257. }), 0 === i.length && i.push(I(p.html())), i), a = (p.data("code", v), l = v.join("")),
  7258. h = ("function" == typeof f.codeParse && (a = l = f.codeParse(a)), {
  7259. copy: {
  7260. className: "file-b",
  7261. title: ["\u590d\u5236\u4ee3\u7801"],
  7262. event: function (e, a) {
  7263. if ("function" == typeof f.onCopy) f.onCopy(l); else try {
  7264. navigator.clipboard.writeText(w.unescape(l)).then(function () {
  7265. T.msg("\u5df2\u590d\u5236", {icon: 1})
  7266. })
  7267. } catch (i) {
  7268. T.msg("\u590d\u5236\u5931\u8d25", {icon: 2})
  7269. }
  7270. }
  7271. }
  7272. }),
  7273. m = (f.preview && (o = "LAY-CODE-DF-" + e, E = f.layout || ["code", "preview"], n = "iframe" === f.preview, u = C('<div class="' + x.ELEM_PREVIEW + '">'), y = C('<div class="layui-tab layui-tab-brief">'), s = C('<div class="layui-tab-title">'), c = C('<div class="' + [x.ELEM_ITEM, x.ELEM_ITEM + "-preview", "layui-border"].join(" ") + '">'), d = C('<div class="layui-code-tools"></div>'), M = p.parent("." + x.ELEM_PREVIEW), m = p.prev("." + x.ELEM_TAB), L = p.next("." + x.ELEM_ITEM + "-preview"), f.id && u.attr("id", f.id), u.addClass(f.className), y.attr("lay-filter", o), f.encode = !0, layui.each(E, function (e, a) {
  7274. var i = C('<li lay-id="' + a + '">');
  7275. 0 === e && i.addClass("layui-this"), i.html(f.text[a]), s.append(i)
  7276. }), C.extend(h, {
  7277. full: {
  7278. className: "screen-full",
  7279. title: ["\u6700\u5927\u5316\u663e\u793a", "\u8fd8\u539f\u663e\u793a"],
  7280. event: function (e, a) {
  7281. var i = e.closest("." + x.ELEM_PREVIEW), t = "layui-icon-" + this.className,
  7282. l = "layui-icon-screen-restore", o = this.title, n = C("html,body"),
  7283. s = "layui-scrollbar-hide";
  7284. e.hasClass(t) ? (i.addClass(x.ELEM_FULL), e.removeClass(t).addClass(l), e.attr("title", o[1]), n.addClass(s)) : (i.removeClass(x.ELEM_FULL), e.removeClass(l).addClass(t), e.attr("title", o[0]), n.removeClass(s))
  7285. }
  7286. },
  7287. window: {
  7288. className: "release",
  7289. title: ["\u5728\u65b0\u7a97\u53e3\u9884\u89c8"],
  7290. event: function (e, a) {
  7291. w.openWin({content: l})
  7292. }
  7293. }
  7294. }), f.copy && ("array" === layui.type(f.tools) ? -1 === f.tools.indexOf("copy") && f.tools.unshift("copy") : f.tools = ["copy"]), d.on("click", ">i", function () {
  7295. var e = C(this), a = e.data("type");
  7296. "function" == typeof h[a].event && h[a].event(e, a), "function" == typeof f.toolsEvent && f.toolsEvent(e, a)
  7297. }), layui.each(f.tools, function (e, a) {
  7298. var i = h[a] && h[a].className || a, t = h[a].title || [""];
  7299. d.append('<i class="layui-icon layui-icon-' + i + '" data-type="' + a + '" title="' + t[0] + '"></i>')
  7300. }), m[0] && m.remove(), L[0] && L.remove(), M[0] && p.unwrap(), y.append(s), f.tools && y.append(d), p.wrap(u).addClass(x.ELEM_ITEM).before(y), n && c.html('<iframe allowtransparency="true" frameborder="0"></iframe>'), r = function (e) {
  7301. var a = e.children("iframe")[0], i = (n && a ? a.srcdoc = l : e.html(v.join("")), {
  7302. container: e, render: function () {
  7303. g.render(e.find(".layui-form")), b.render()
  7304. }
  7305. });
  7306. setTimeout(function () {
  7307. "function" == typeof f.done && f.done(i)
  7308. }, 3)
  7309. }, "preview" === E[0] ? (c.addClass(x.ELEM_SHOW), p.before(c), r(c)) : p.addClass(x.ELEM_SHOW).after(c), f.codeStyle = [f.style, f.codeStyle].join(""), f.previewStyle = [f.style, f.previewStyle].join(""), c.attr("style", f.previewStyle), b.on("tab(" + o + ")", function (e) {
  7310. var a = C(this), i = C(e.elem).closest("." + x.ELEM_PREVIEW).find("." + x.ELEM_ITEM),
  7311. e = i.eq(e.index);
  7312. i.removeClass(x.ELEM_SHOW), e.addClass(x.ELEM_SHOW), "preview" === a.attr("lay-id") && r(e)
  7313. })), f.ln ? "ol" : "ul"), L = C("<" + m + ' class="layui-code-' + m + '">'),
  7314. M = C('<div class="' + x.ELEM_TITLE + '">');
  7315. p.addClass("layui-code-view layui-box"), f.skin && ("notepad" === f.skin && (f.skin = "dark"), p.removeClass("layui-code-dark layui-code-light"), p.addClass("layui-code-" + f.skin)), a = (a = f.encode ? w.escape(a) : a).replace(/[\r\t\n]+/g, "</li><li>"), p.html(L.html("<li>" + a + "</li>")), f.header && !p.children("." + x.ELEM_TITLE)[0] && (M.html((f.title || f.text.code) + (f.about ? '<div class="layui-code-about">' + f.about + "</div>" : "")), p.prepend(M)), f.elem.length === e + 1 && "function" == typeof f.allDone && f.allDone(), 0 < (u = Math.floor(L.find("li").length / 100)) && L.css("margin-left", u + "px"), f.height && L.css("max-height", f.height), L.attr("style", f.codeStyle), f.copy && !f.preview && (y = C(['<span class="' + x.ELEM_COPY + '">', '<i class="layui-icon layui-icon-file-b" title="\u590d\u5236"></i>', "</span>"].join("")), E = p.children("." + x.ELEM_COPY), (L[0].style.height || L[0].style.maxHeight) && y.addClass(x.ELEM_COPY + "-offset"), E[0] && E.remove(), p.append(y), y.on("click", function () {
  7316. h.copy.event()
  7317. }))
  7318. })
  7319. })
  7320. }), layui["layui.all"] || layui.addcss("modules/code.css?v=3", "skincodecss");