jquery-ui.js 373 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229
  1. /*! jQuery UI - v1.10.3 - 2013-05-03
  2. * http://jqueryui.com
  3. * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
  4. * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
  5. (function (t, e) {
  6. function i(e, i) {
  7. var n, o, a, r = e.nodeName.toLowerCase();
  8. return "area" === r ? (n = e.parentNode, o = n.name, e.href && o && "map" === n.nodeName.toLowerCase() ? (a =
  9. t("img[usemap=#" + o + "]")[0], !!a && s(a)) : !1) : (/input|select|textarea|button|object/.test(r) ?
  10. !e.disabled : "a" === r ? e.href || i : i) && s(e)
  11. }
  12. function s(e) {
  13. return t.expr.filters.visible(e) && !t(e).parents().addBack().filter(function () {
  14. return "hidden" === t.css(this, "visibility")
  15. }).length
  16. }
  17. var n = 0,
  18. o = /^ui-id-\d+$/;
  19. t.ui = t.ui || {}, t.extend(t.ui, {
  20. version: "1.10.3",
  21. keyCode: {
  22. BACKSPACE: 8,
  23. COMMA: 188,
  24. DELETE: 46,
  25. DOWN: 40,
  26. END: 35,
  27. ENTER: 13,
  28. ESCAPE: 27,
  29. HOME: 36,
  30. LEFT: 37,
  31. NUMPAD_ADD: 107,
  32. NUMPAD_DECIMAL: 110,
  33. NUMPAD_DIVIDE: 111,
  34. NUMPAD_ENTER: 108,
  35. NUMPAD_MULTIPLY: 106,
  36. NUMPAD_SUBTRACT: 109,
  37. PAGE_DOWN: 34,
  38. PAGE_UP: 33,
  39. PERIOD: 190,
  40. RIGHT: 39,
  41. SPACE: 32,
  42. TAB: 9,
  43. UP: 38
  44. }
  45. }), t.fn.extend({
  46. focus: function (e) {
  47. return function (i, s) {
  48. return "number" == typeof i ? this.each(function () {
  49. var e = this;
  50. setTimeout(function () {
  51. t(e).focus(), s && s.call(e)
  52. }, i)
  53. }) : e.apply(this, arguments)
  54. }
  55. }(t.fn.focus),
  56. scrollParent: function () {
  57. var e;
  58. return e = t.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(
  59. this.css("position")) ? this.parents().filter(function () {
  60. return /(relative|absolute|fixed)/.test(t.css(this, "position")) &&
  61. /(auto|scroll)/.test(t.css(this, "overflow") + t.css(this, "overflow-y") +
  62. t.css(this, "overflow-x"))
  63. }).eq(0) : this.parents().filter(function () {
  64. return /(auto|scroll)/.test(t.css(this, "overflow") + t.css(this, "overflow-y") +
  65. t.css(this, "overflow-x"))
  66. }).eq(0), /fixed/.test(this.css("position")) || !e.length ? t(document) : e
  67. },
  68. zIndex: function (i) {
  69. if (i !== e) return this.css("zIndex", i);
  70. if (this.length)
  71. for (var s, n, o = t(this[0]); o.length && o[0] !== document;) {
  72. if (s = o.css("position"), ("absolute" === s || "relative" === s || "fixed" === s) &&
  73. (n = parseInt(o.css("zIndex"), 10), !isNaN(n) && 0 !== n)) return n;
  74. o = o.parent()
  75. }
  76. return 0
  77. },
  78. uniqueId: function () {
  79. return this.each(function () {
  80. this.id || (this.id = "ui-id-" + ++n)
  81. })
  82. },
  83. removeUniqueId: function () {
  84. return this.each(function () {
  85. o.test(this.id) && t(this).removeAttr("id")
  86. })
  87. }
  88. }), t.extend(t.expr[":"], {
  89. data: t.expr.createPseudo ? t.expr.createPseudo(function (e) {
  90. return function (i) {
  91. return !!t.data(i, e)
  92. }
  93. }) : function (e, i, s) {
  94. return !!t.data(e, s[3])
  95. },
  96. focusable: function (e) {
  97. return i(e, !isNaN(t.attr(e, "tabindex")))
  98. },
  99. tabbable: function (e) {
  100. var s = t.attr(e, "tabindex"),
  101. n = isNaN(s);
  102. return (n || s >= 0) && i(e, !n)
  103. }
  104. }), t("<a>").outerWidth(1).jquery || t.each(["Width", "Height"], function (i, s) {
  105. function n(e, i, s, n) {
  106. return t.each(o, function () {
  107. i -= parseFloat(t.css(e, "padding" + this)) || 0, s && (i -= parseFloat(t.css(e,
  108. "border" + this + "Width")) || 0), n && (i -= parseFloat(t.css(e, "margin" +
  109. this)) || 0)
  110. }), i
  111. }
  112. var o = "Width" === s ? ["Left", "Right"] : ["Top", "Bottom"],
  113. a = s.toLowerCase(),
  114. r = {
  115. innerWidth: t.fn.innerWidth,
  116. innerHeight: t.fn.innerHeight,
  117. outerWidth: t.fn.outerWidth,
  118. outerHeight: t.fn.outerHeight
  119. };
  120. t.fn["inner" + s] = function (i) {
  121. return i === e ? r["inner" + s].call(this) : this.each(function () {
  122. t(this).css(a, n(this, i) + "px")
  123. })
  124. }, t.fn["outer" + s] = function (e, i) {
  125. return "number" != typeof e ? r["outer" + s].call(this, e) : this.each(function () {
  126. t(this).css(a, n(this, e, !0, i) + "px")
  127. })
  128. }
  129. }), t.fn.addBack || (t.fn.addBack = function (t) {
  130. return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
  131. }), t("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (t.fn.removeData = function (e) {
  132. return function (i) {
  133. return arguments.length ? e.call(this, t.camelCase(i)) : e.call(this)
  134. }
  135. }(t.fn.removeData)), t.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), t.support.selectstart =
  136. "onselectstart" in document.createElement("div"), t.fn.extend({
  137. disableSelection: function () {
  138. return this.bind((t.support.selectstart ? "selectstart" : "mousedown") +
  139. ".ui-disableSelection",
  140. function (t) {
  141. t.preventDefault()
  142. })
  143. },
  144. enableSelection: function () {
  145. return this.unbind(".ui-disableSelection")
  146. }
  147. }), t.extend(t.ui, {
  148. plugin: {
  149. add: function (e, i, s) {
  150. var n, o = t.ui[e].prototype;
  151. for (n in s) o.plugins[n] = o.plugins[n] || [], o.plugins[n].push([i, s[n]])
  152. },
  153. call: function (t, e, i) {
  154. var s, n = t.plugins[e];
  155. if (n && t.element[0].parentNode && 11 !== t.element[0].parentNode.nodeType)
  156. for (s = 0; n.length > s; s++) t.options[n[s][0]] && n[s][1].apply(t.element, i)
  157. }
  158. },
  159. hasScroll: function (e, i) {
  160. if ("hidden" === t(e).css("overflow")) return !1;
  161. var s = i && "left" === i ? "scrollLeft" : "scrollTop",
  162. n = !1;
  163. return e[s] > 0 ? !0 : (e[s] = 1, n = e[s] > 0, e[s] = 0, n)
  164. }
  165. })
  166. })(jQuery),
  167. function (t, e) {
  168. var i = 0,
  169. s = Array.prototype.slice,
  170. n = t.cleanData;
  171. t.cleanData = function (e) {
  172. for (var i, s = 0; null != (i = e[s]); s++) try {
  173. t(i).triggerHandler("remove")
  174. } catch (o) {}
  175. n(e)
  176. }, t.widget = function (i, s, n) {
  177. var o, a, r, h, l = {},
  178. c = i.split(".")[0];
  179. i = i.split(".")[1], o = c + "-" + i, n || (n = s, s = t.Widget), t.expr[":"][o.toLowerCase()] = function (
  180. e) {
  181. return !!t.data(e, o)
  182. }, t[c] = t[c] || {}, a = t[c][i], r = t[c][i] = function (t, i) {
  183. return this._createWidget ? (arguments.length && this._createWidget(t, i), e) : new r(t, i)
  184. }, t.extend(r, a, {
  185. version: n.version,
  186. _proto: t.extend({}, n),
  187. _childConstructors: []
  188. }), h = new s, h.options = t.widget.extend({}, h.options), t.each(n, function (i, n) {
  189. return t.isFunction(n) ? (l[i] = function () {
  190. var t = function () {
  191. return s.prototype[i].apply(this, arguments)
  192. },
  193. e = function (t) {
  194. return s.prototype[i].apply(this, t)
  195. };
  196. return function () {
  197. var i, s = this._super,
  198. o = this._superApply;
  199. return this._super = t, this._superApply = e, i = n.apply(this, arguments),
  200. this._super = s, this._superApply = o, i
  201. }
  202. }(), e) : (l[i] = n, e)
  203. }), r.prototype = t.widget.extend(h, {
  204. widgetEventPrefix: a ? h.widgetEventPrefix : i
  205. }, l, {
  206. constructor: r,
  207. namespace: c,
  208. widgetName: i,
  209. widgetFullName: o
  210. }), a ? (t.each(a._childConstructors, function (e, i) {
  211. var s = i.prototype;
  212. t.widget(s.namespace + "." + s.widgetName, r, i._proto)
  213. }), delete a._childConstructors) : s._childConstructors.push(r), t.widget.bridge(i, r)
  214. }, t.widget.extend = function (i) {
  215. for (var n, o, a = s.call(arguments, 1), r = 0, h = a.length; h > r; r++)
  216. for (n in a[r]) o = a[r][n], a[r].hasOwnProperty(n) && o !== e && (i[n] = t.isPlainObject(o) ? t.isPlainObject(
  217. i[n]) ? t.widget.extend({}, i[n], o) : t.widget.extend({}, o) : o);
  218. return i
  219. }, t.widget.bridge = function (i, n) {
  220. var o = n.prototype.widgetFullName || i;
  221. t.fn[i] = function (a) {
  222. var r = "string" == typeof a,
  223. h = s.call(arguments, 1),
  224. l = this;
  225. return a = !r && h.length ? t.widget.extend.apply(null, [a].concat(h)) : a, r ? this.each(function () {
  226. var s, n = t.data(this, o);
  227. return n ? t.isFunction(n[a]) && "_" !== a.charAt(0) ? (s = n[a].apply(n, h), s !== n &&
  228. s !== e ? (l = s && s.jquery ? l.pushStack(s.get()) : s, !1) : e) : t.error(
  229. "no such method '" + a + "' for " + i + " widget instance") : t.error(
  230. "cannot call methods on " + i + " prior to initialization; " +
  231. "attempted to call method '" + a + "'")
  232. }) : this.each(function () {
  233. var e = t.data(this, o);
  234. e ? e.option(a || {})._init() : t.data(this, o, new n(a, this))
  235. }), l
  236. }
  237. }, t.Widget = function () {}, t.Widget._childConstructors = [], t.Widget.prototype = {
  238. widgetName: "widget",
  239. widgetEventPrefix: "",
  240. defaultElement: "<div>",
  241. options: {
  242. disabled: !1,
  243. create: null
  244. },
  245. _createWidget: function (e, s) {
  246. s = t(s || this.defaultElement || this)[0], this.element = t(s), this.uuid = i++, this.eventNamespace =
  247. "." + this.widgetName + this.uuid, this.options = t.widget.extend({}, this.options, this._getCreateOptions(),
  248. e), this.bindings = t(), this.hoverable = t(), this.focusable = t(), s !== this && (t.data(
  249. s, this.widgetFullName, this), this._on(!0, this.element, {
  250. remove: function (t) {
  251. t.target === s && this.destroy()
  252. }
  253. }), this.document = t(s.style ? s.ownerDocument : s.document || s), this.window = t(this.document[
  254. 0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create",
  255. null, this._getCreateEventData()), this._init()
  256. },
  257. _getCreateOptions: t.noop,
  258. _getCreateEventData: t.noop,
  259. _create: t.noop,
  260. _init: t.noop,
  261. destroy: function () {
  262. this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(
  263. this.widgetFullName).removeData(t.camelCase(this.widgetFullName)), this.widget().unbind(
  264. this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName +
  265. "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable
  266. .removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
  267. },
  268. _destroy: t.noop,
  269. widget: function () {
  270. return this.element
  271. },
  272. option: function (i, s) {
  273. var n, o, a, r = i;
  274. if (0 === arguments.length) return t.widget.extend({}, this.options);
  275. if ("string" == typeof i)
  276. if (r = {}, n = i.split("."), i = n.shift(), n.length) {
  277. for (o = r[i] = t.widget.extend({}, this.options[i]), a = 0; n.length - 1 > a; a++) o[n[a]] =
  278. o[n[a]] || {}, o = o[n[a]];
  279. if (i = n.pop(), s === e) return o[i] === e ? null : o[i];
  280. o[i] = s
  281. } else {
  282. if (s === e) return this.options[i] === e ? null : this.options[i];
  283. r[i] = s
  284. } return this._setOptions(r), this
  285. },
  286. _setOptions: function (t) {
  287. var e;
  288. for (e in t) this._setOption(e, t[e]);
  289. return this
  290. },
  291. _setOption: function (t, e) {
  292. return this.options[t] = e, "disabled" === t && (this.widget().toggleClass(this.widgetFullName +
  293. "-disabled ui-state-disabled", !!e).attr("aria-disabled", e), this.hoverable.removeClass(
  294. "ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
  295. },
  296. enable: function () {
  297. return this._setOption("disabled", !1)
  298. },
  299. disable: function () {
  300. return this._setOption("disabled", !0)
  301. },
  302. _on: function (i, s, n) {
  303. var o, a = this;
  304. "boolean" != typeof i && (n = s, s = i, i = !1), n ? (s = o = t(s), this.bindings = this.bindings.add(
  305. s)) : (n = s, s = this.element, o = this.widget()), t.each(n, function (n, r) {
  306. function h() {
  307. return i || a.options.disabled !== !0 && !t(this).hasClass("ui-state-disabled") ? (
  308. "string" == typeof r ? a[r] : r).apply(a, arguments) : e
  309. }
  310. "string" != typeof r && (h.guid = r.guid = r.guid || h.guid || t.guid++);
  311. var l = n.match(/^(\w+)\s*(.*)$/),
  312. c = l[1] + a.eventNamespace,
  313. u = l[2];
  314. u ? o.delegate(u, c, h) : s.bind(c, h)
  315. })
  316. },
  317. _off: function (t, e) {
  318. e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.unbind(e).undelegate(
  319. e)
  320. },
  321. _delay: function (t, e) {
  322. function i() {
  323. return ("string" == typeof t ? s[t] : t).apply(s, arguments)
  324. }
  325. var s = this;
  326. return setTimeout(i, e || 0)
  327. },
  328. _hoverable: function (e) {
  329. this.hoverable = this.hoverable.add(e), this._on(e, {
  330. mouseenter: function (e) {
  331. t(e.currentTarget).addClass("ui-state-hover")
  332. },
  333. mouseleave: function (e) {
  334. t(e.currentTarget).removeClass("ui-state-hover")
  335. }
  336. })
  337. },
  338. _focusable: function (e) {
  339. this.focusable = this.focusable.add(e), this._on(e, {
  340. focusin: function (e) {
  341. t(e.currentTarget).addClass("ui-state-focus")
  342. },
  343. focusout: function (e) {
  344. t(e.currentTarget).removeClass("ui-state-focus")
  345. }
  346. })
  347. },
  348. _trigger: function (e, i, s) {
  349. var n, o, a = this.options[e];
  350. if (s = s || {}, i = t.Event(i), i.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix +
  351. e).toLowerCase(), i.target = this.element[0], o = i.originalEvent)
  352. for (n in o) n in i || (i[n] = o[n]);
  353. return this.element.trigger(i, s), !(t.isFunction(a) && a.apply(this.element[0], [i].concat(s)) ===
  354. !1 || i.isDefaultPrevented())
  355. }
  356. }, t.each({
  357. show: "fadeIn",
  358. hide: "fadeOut"
  359. }, function (e, i) {
  360. t.Widget.prototype["_" + e] = function (s, n, o) {
  361. "string" == typeof n && (n = {
  362. effect: n
  363. });
  364. var a, r = n ? n === !0 || "number" == typeof n ? i : n.effect || i : e;
  365. n = n || {}, "number" == typeof n && (n = {
  366. duration: n
  367. }), a = !t.isEmptyObject(n), n.complete = o, n.delay && s.delay(n.delay), a && t.effects &&
  368. t.effects.effect[r] ? s[e](n) : r !== e && s[r] ? s[r](n.duration, n.easing, o) : s.queue(
  369. function (i) {
  370. t(this)[e](), o && o.call(s[0]), i()
  371. })
  372. }
  373. })
  374. }(jQuery),
  375. function (t) {
  376. var e = !1;
  377. t(document).mouseup(function () {
  378. e = !1
  379. }), t.widget("ui.mouse", {
  380. version: "1.10.3",
  381. options: {
  382. cancel: "input,textarea,button,select,option",
  383. distance: 1,
  384. delay: 0
  385. },
  386. _mouseInit: function () {
  387. var e = this;
  388. this.element.bind("mousedown." + this.widgetName, function (t) {
  389. return e._mouseDown(t)
  390. }).bind("click." + this.widgetName, function (i) {
  391. return !0 === t.data(i.target, e.widgetName + ".preventClickEvent") ? (t.removeData(
  392. i.target, e.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(),
  393. !1) : undefined
  394. }), this.started = !1
  395. },
  396. _mouseDestroy: function () {
  397. this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && t(document).unbind(
  398. "mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName,
  399. this._mouseUpDelegate)
  400. },
  401. _mouseDown: function (i) {
  402. if (!e) {
  403. this._mouseStarted && this._mouseUp(i), this._mouseDownEvent = i;
  404. var s = this,
  405. n = 1 === i.which,
  406. o = "string" == typeof this.options.cancel && i.target.nodeName ? t(i.target).closest(
  407. this.options.cancel).length : !1;
  408. return n && !o && this._mouseCapture(i) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet ||
  409. (this._mouseDelayTimer = setTimeout(function () {
  410. s.mouseDelayMet = !0
  411. }, this.options.delay)), this._mouseDistanceMet(i) && this._mouseDelayMet(i) && (
  412. this._mouseStarted = this._mouseStart(i) !== !1, !this._mouseStarted) ? (i.preventDefault(),
  413. !0) : (!0 === t.data(i.target, this.widgetName + ".preventClickEvent") && t.removeData(
  414. i.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate =
  415. function (t) {
  416. return s._mouseMove(t)
  417. }, this._mouseUpDelegate = function (t) {
  418. return s._mouseUp(t)
  419. }, t(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind(
  420. "mouseup." + this.widgetName, this._mouseUpDelegate), i.preventDefault(), e = !
  421. 0, !0)) : !0
  422. }
  423. },
  424. _mouseMove: function (e) {
  425. return t.ui.ie && (!document.documentMode || 9 > document.documentMode) && !e.button ? this._mouseUp(
  426. e) : this._mouseStarted ? (this._mouseDrag(e), e.preventDefault()) : (this._mouseDistanceMet(
  427. e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent,
  428. e) !== !1, this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), !this._mouseStarted)
  429. },
  430. _mouseUp: function (e) {
  431. return t(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind(
  432. "mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !
  433. 1, e.target === this._mouseDownEvent.target && t.data(e.target, this.widgetName +
  434. ".preventClickEvent", !0), this._mouseStop(e)), !1
  435. },
  436. _mouseDistanceMet: function (t) {
  437. return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY -
  438. t.pageY)) >= this.options.distance
  439. },
  440. _mouseDelayMet: function () {
  441. return this.mouseDelayMet
  442. },
  443. _mouseStart: function () {},
  444. _mouseDrag: function () {},
  445. _mouseStop: function () {},
  446. _mouseCapture: function () {
  447. return !0
  448. }
  449. })
  450. }(jQuery),
  451. function (t) {
  452. t.widget("ui.draggable", t.ui.mouse, {
  453. version: "1.10.3",
  454. widgetEventPrefix: "drag",
  455. options: {
  456. addClasses: !0,
  457. appendTo: "parent",
  458. axis: !1,
  459. connectToSortable: !1,
  460. containment: !1,
  461. cursor: "auto",
  462. cursorAt: !1,
  463. grid: !1,
  464. handle: !1,
  465. helper: "original",
  466. iframeFix: !1,
  467. opacity: !1,
  468. refreshPositions: !1,
  469. revert: !1,
  470. revertDuration: 500,
  471. scope: "default",
  472. scroll: !0,
  473. scrollSensitivity: 20,
  474. scrollSpeed: 20,
  475. snap: !1,
  476. snapMode: "both",
  477. snapTolerance: 20,
  478. stack: !1,
  479. zIndex: !1,
  480. drag: null,
  481. start: null,
  482. stop: null
  483. },
  484. _create: function () {
  485. "original" !== this.options.helper || /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[
  486. 0].style.position = "relative"), this.options.addClasses && this.element.addClass(
  487. "ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"),
  488. this._mouseInit()
  489. },
  490. _destroy: function () {
  491. this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy()
  492. },
  493. _mouseCapture: function (e) {
  494. var i = this.options;
  495. return this.helper || i.disabled || t(e.target).closest(".ui-resizable-handle").length > 0 ? !1 :
  496. (this.handle = this._getHandle(e), this.handle ? (t(i.iframeFix === !0 ? "iframe" : i.iframeFix)
  497. .each(function () {
  498. t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({
  499. width: this.offsetWidth + "px",
  500. height: this.offsetHeight + "px",
  501. position: "absolute",
  502. opacity: "0.001",
  503. zIndex: 1e3
  504. }).css(t(this).offset()).appendTo("body")
  505. }), !0) : !1)
  506. },
  507. _mouseStart: function (e) {
  508. var i = this.options;
  509. return this.helper = this._createHelper(e), this.helper.addClass("ui-draggable-dragging"), this
  510. ._cacheHelperProportions(), t.ui.ddmanager && (t.ui.ddmanager.current = this), this._cacheMargins(),
  511. this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(),
  512. this.offsetParent = this.helper.offsetParent(), this.offsetParentCssPosition = this.offsetParent
  513. .css("position"), this.offset = this.positionAbs = this.element.offset(), this.offset = {
  514. top: this.offset.top - this.margins.top,
  515. left: this.offset.left - this.margins.left
  516. }, this.offset.scroll = !1, t.extend(this.offset, {
  517. click: {
  518. left: e.pageX - this.offset.left,
  519. top: e.pageY - this.offset.top
  520. },
  521. parent: this._getParentOffset(),
  522. relative: this._getRelativeOffset()
  523. }), this.originalPosition = this.position = this._generatePosition(e), this.originalPageX =
  524. e.pageX, this.originalPageY = e.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt),
  525. this._setContainment(), this._trigger("start", e) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(),
  526. t.ui.ddmanager && !i.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this._mouseDrag(
  527. e, !0), t.ui.ddmanager && t.ui.ddmanager.dragStart(this, e), !0)
  528. },
  529. _mouseDrag: function (e, i) {
  530. if ("fixed" === this.offsetParentCssPosition && (this.offset.parent = this._getParentOffset()),
  531. this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo(
  532. "absolute"), !i) {
  533. var s = this._uiHash();
  534. if (this._trigger("drag", e, s) === !1) return this._mouseUp({}), !1;
  535. this.position = s.position
  536. }
  537. return this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position
  538. .left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top =
  539. this.position.top + "px"), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), !1
  540. },
  541. _mouseStop: function (e) {
  542. var i = this,
  543. s = !1;
  544. return t.ui.ddmanager && !this.options.dropBehaviour && (s = t.ui.ddmanager.drop(this, e)),
  545. this.dropped && (s = this.dropped, this.dropped = !1), "original" !== this.options.helper ||
  546. t.contains(this.element[0].ownerDocument, this.element[0]) ? ("invalid" === this.options.revert &&
  547. !s || "valid" === this.options.revert && s || this.options.revert === !0 || t.isFunction(
  548. this.options.revert) && this.options.revert.call(this.element, s) ? t(this.helper).animate(
  549. this.originalPosition, parseInt(this.options.revertDuration, 10),
  550. function () {
  551. i._trigger("stop", e) !== !1 && i._clear()
  552. }) : this._trigger("stop", e) !== !1 && this._clear(), !1) : !1
  553. },
  554. _mouseUp: function (e) {
  555. return t("div.ui-draggable-iframeFix").each(function () {
  556. this.parentNode.removeChild(this)
  557. }), t.ui.ddmanager && t.ui.ddmanager.dragStop(this, e), t.ui.mouse.prototype._mouseUp.call(
  558. this, e)
  559. },
  560. cancel: function () {
  561. return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this
  562. },
  563. _getHandle: function (e) {
  564. return this.options.handle ? !!t(e.target).closest(this.element.find(this.options.handle)).length :
  565. !0
  566. },
  567. _createHelper: function (e) {
  568. var i = this.options,
  569. s = t.isFunction(i.helper) ? t(i.helper.apply(this.element[0], [e])) : "clone" === i.helper ?
  570. this.element.clone().removeAttr("id") : this.element;
  571. return s.parents("body").length || s.appendTo("parent" === i.appendTo ? this.element[0].parentNode :
  572. i.appendTo), s[0] === this.element[0] || /(fixed|absolute)/.test(s.css("position")) ||
  573. s.css("position", "absolute"), s
  574. },
  575. _adjustOffsetFromHelper: function (e) {
  576. "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = {
  577. left: +e[0],
  578. top: +e[1] || 0
  579. }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (
  580. this.offset.click.left = this.helperProportions.width - e.right + this.margins.left),
  581. "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset
  582. .click.top = this.helperProportions.height - e.bottom + this.margins.top)
  583. },
  584. _getParentOffset: function () {
  585. var e = this.offsetParent.offset();
  586. return "absolute" === this.cssPosition && this.scrollParent[0] !== document && t.contains(this.scrollParent[
  587. 0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent
  588. .scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName &&
  589. "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = {
  590. top: 0,
  591. left: 0
  592. }), {
  593. top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  594. left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  595. }
  596. },
  597. _getRelativeOffset: function () {
  598. if ("relative" === this.cssPosition) {
  599. var t = this.element.position();
  600. return {
  601. top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
  602. left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
  603. }
  604. }
  605. return {
  606. top: 0,
  607. left: 0
  608. }
  609. },
  610. _cacheMargins: function () {
  611. this.margins = {
  612. left: parseInt(this.element.css("marginLeft"), 10) || 0,
  613. top: parseInt(this.element.css("marginTop"), 10) || 0,
  614. right: parseInt(this.element.css("marginRight"), 10) || 0,
  615. bottom: parseInt(this.element.css("marginBottom"), 10) || 0
  616. }
  617. },
  618. _cacheHelperProportions: function () {
  619. this.helperProportions = {
  620. width: this.helper.outerWidth(),
  621. height: this.helper.outerHeight()
  622. }
  623. },
  624. _setContainment: function () {
  625. var e, i, s, n = this.options;
  626. return n.containment ? "window" === n.containment ? (this.containment = [t(window).scrollLeft() -
  627. this.offset.relative.left - this.offset.parent.left, t(window).scrollTop() - this.offset
  628. .relative.top - this.offset.parent.top, t(window).scrollLeft() + t(window).width() -
  629. this.helperProportions.width - this.margins.left, t(window).scrollTop() + (t(window)
  630. .height() || document.body.parentNode.scrollHeight) - this.helperProportions.height -
  631. this.margins.top], undefined) : "document" === n.containment ? (this.containment = [0,
  632. 0, t(document).width() - this.helperProportions.width - this.margins.left, (t(
  633. document).height() || document.body.parentNode.scrollHeight) - this.helperProportions
  634. .height - this.margins.top], undefined) : n.containment.constructor === Array ? (this.containment =
  635. n.containment, undefined) : ("parent" === n.containment && (n.containment = this.helper[
  636. 0].parentNode), i = t(n.containment), s = i[0], s && (e = "hidden" !== i.css(
  637. "overflow"), this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) +
  638. (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"),
  639. 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (e ? Math.max(s.scrollWidth,
  640. s.offsetWidth) : s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) ||
  641. 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width -
  642. this.margins.left - this.margins.right, (e ? Math.max(s.scrollHeight, s.offsetHeight) :
  643. s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (
  644. parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height -
  645. this.margins.top - this.margins.bottom], this.relative_container = i), undefined) : (
  646. this.containment = null, undefined)
  647. },
  648. _convertPositionTo: function (e, i) {
  649. i || (i = this.position);
  650. var s = "absolute" === e ? 1 : -1,
  651. n = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this
  652. .scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent;
  653. return this.offset.scroll || (this.offset.scroll = {
  654. top: n.scrollTop(),
  655. left: n.scrollLeft()
  656. }), {
  657. top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" ===
  658. this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top) * s,
  659. left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" ===
  660. this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left) *
  661. s
  662. }
  663. },
  664. _generatePosition: function (e) {
  665. var i, s, n, o, a = this.options,
  666. r = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this
  667. .scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
  668. h = e.pageX,
  669. l = e.pageY;
  670. return this.offset.scroll || (this.offset.scroll = {
  671. top: r.scrollTop(),
  672. left: r.scrollLeft()
  673. }), this.originalPosition && (this.containment && (this.relative_container ? (s = this.relative_container
  674. .offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this
  675. .containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment,
  676. e.pageX - this.offset.click.left < i[0] && (h = i[0] + this.offset.click.left), e.pageY -
  677. this.offset.click.top < i[1] && (l = i[1] + this.offset.click.top), e.pageX - this.offset
  678. .click.left > i[2] && (h = i[2] + this.offset.click.left), e.pageY - this.offset.click
  679. .top > i[3] && (l = i[3] + this.offset.click.top)), a.grid && (n = a.grid[1] ? this
  680. .originalPageY + Math.round((l - this.originalPageY) / a.grid[1]) * a.grid[1] :
  681. this.originalPageY, l = i ? n - this.offset.click.top >= i[1] || n - this.offset.click
  682. .top > i[3] ? n : n - this.offset.click.top >= i[1] ? n - a.grid[1] : n + a.grid[1] :
  683. n, o = a.grid[0] ? this.originalPageX + Math.round((h - this.originalPageX) / a.grid[
  684. 0]) * a.grid[0] : this.originalPageX, h = i ? o - this.offset.click.left >= i[0] ||
  685. o - this.offset.click.left > i[2] ? o : o - this.offset.click.left >= i[0] ? o - a.grid[
  686. 0] : o + a.grid[0] : o)), {
  687. top: l - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (
  688. "fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll
  689. .top),
  690. left: h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left +
  691. ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll
  692. .left)
  693. }
  694. },
  695. _clear: function () {
  696. this.helper.removeClass("ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval ||
  697. this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1
  698. },
  699. _trigger: function (e, i, s) {
  700. return s = s || this._uiHash(), t.ui.plugin.call(this, e, [i, s]), "drag" === e && (this.positionAbs =
  701. this._convertPositionTo("absolute")), t.Widget.prototype._trigger.call(this, e, i, s)
  702. },
  703. plugins: {},
  704. _uiHash: function () {
  705. return {
  706. helper: this.helper,
  707. position: this.position,
  708. originalPosition: this.originalPosition,
  709. offset: this.positionAbs
  710. }
  711. }
  712. }), t.ui.plugin.add("draggable", "connectToSortable", {
  713. start: function (e, i) {
  714. var s = t(this).data("ui-draggable"),
  715. n = s.options,
  716. o = t.extend({}, i, {
  717. item: s.element
  718. });
  719. s.sortables = [], t(n.connectToSortable).each(function () {
  720. var i = t.data(this, "ui-sortable");
  721. i && !i.options.disabled && (s.sortables.push({
  722. instance: i,
  723. shouldRevert: i.options.revert
  724. }), i.refreshPositions(), i._trigger("activate", e, o))
  725. })
  726. },
  727. stop: function (e, i) {
  728. var s = t(this).data("ui-draggable"),
  729. n = t.extend({}, i, {
  730. item: s.element
  731. });
  732. t.each(s.sortables, function () {
  733. this.instance.isOver ? (this.instance.isOver = 0, s.cancelHelperRemoval = !0, this.instance
  734. .cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert =
  735. this.shouldRevert), this.instance._mouseStop(e), this.instance.options.helper =
  736. this.instance.options._helper, "original" === s.options.helper && this.instance
  737. .currentItem.css({
  738. top: "auto",
  739. left: "auto"
  740. })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger(
  741. "deactivate", e, n))
  742. })
  743. },
  744. drag: function (e, i) {
  745. var s = t(this).data("ui-draggable"),
  746. n = this;
  747. t.each(s.sortables, function () {
  748. var o = !1,
  749. a = this;
  750. this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions,
  751. this.instance.offset.click = s.offset.click, this.instance._intersectsWith(this
  752. .instance.containerCache) && (o = !0, t.each(s.sortables, function () {
  753. return this.instance.positionAbs = s.positionAbs, this.instance.helperProportions =
  754. s.helperProportions, this.instance.offset.click = s.offset.click,
  755. this !== a && this.instance._intersectsWith(this.instance.containerCache) &&
  756. t.contains(a.instance.element[0], this.instance.element[0]) &&
  757. (o = !1), o
  758. })), o ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem =
  759. t(n).clone().removeAttr("id").appendTo(this.instance.element).data(
  760. "ui-sortable-item", !0), this.instance.options._helper = this.instance
  761. .options.helper, this.instance.options.helper = function () {
  762. return i.helper[0]
  763. }, e.target = this.instance.currentItem[0], this.instance._mouseCapture(
  764. e, !0), this.instance._mouseStart(e, !0, !0), this.instance.offset.click
  765. .top = s.offset.click.top, this.instance.offset.click.left = s.offset.click
  766. .left, this.instance.offset.parent.left -= s.offset.parent.left - this.instance
  767. .offset.parent.left, this.instance.offset.parent.top -= s.offset.parent
  768. .top - this.instance.offset.parent.top, s._trigger("toSortable", e), s.dropped =
  769. this.instance.element, s.currentItem = s.element, this.instance.fromOutside =
  770. s), this.instance.currentItem && this.instance._mouseDrag(e)) : this.instance
  771. .isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0,
  772. this.instance.options.revert = !1, this.instance._trigger("out", e, this.instance
  773. ._uiHash(this.instance)), this.instance._mouseStop(e, !0), this.instance
  774. .options.helper = this.instance.options._helper, this.instance.currentItem.remove(),
  775. this.instance.placeholder && this.instance.placeholder.remove(), s._trigger(
  776. "fromSortable", e), s.dropped = !1)
  777. })
  778. }
  779. }), t.ui.plugin.add("draggable", "cursor", {
  780. start: function () {
  781. var e = t("body"),
  782. i = t(this).data("ui-draggable").options;
  783. e.css("cursor") && (i._cursor = e.css("cursor")), e.css("cursor", i.cursor)
  784. },
  785. stop: function () {
  786. var e = t(this).data("ui-draggable").options;
  787. e._cursor && t("body").css("cursor", e._cursor)
  788. }
  789. }), t.ui.plugin.add("draggable", "opacity", {
  790. start: function (e, i) {
  791. var s = t(i.helper),
  792. n = t(this).data("ui-draggable").options;
  793. s.css("opacity") && (n._opacity = s.css("opacity")), s.css("opacity", n.opacity)
  794. },
  795. stop: function (e, i) {
  796. var s = t(this).data("ui-draggable").options;
  797. s._opacity && t(i.helper).css("opacity", s._opacity)
  798. }
  799. }), t.ui.plugin.add("draggable", "scroll", {
  800. start: function () {
  801. var e = t(this).data("ui-draggable");
  802. e.scrollParent[0] !== document && "HTML" !== e.scrollParent[0].tagName && (e.overflowOffset = e
  803. .scrollParent.offset())
  804. },
  805. drag: function (e) {
  806. var i = t(this).data("ui-draggable"),
  807. s = i.options,
  808. n = !1;
  809. i.scrollParent[0] !== document && "HTML" !== i.scrollParent[0].tagName ? (s.axis && "x" === s.axis ||
  810. (i.overflowOffset.top + i.scrollParent[0].offsetHeight - e.pageY < s.scrollSensitivity ?
  811. i.scrollParent[0].scrollTop = n = i.scrollParent[0].scrollTop + s.scrollSpeed : e.pageY -
  812. i.overflowOffset.top < s.scrollSensitivity && (i.scrollParent[0].scrollTop = n = i.scrollParent[
  813. 0].scrollTop - s.scrollSpeed)), s.axis && "y" === s.axis || (i.overflowOffset.left +
  814. i.scrollParent[0].offsetWidth - e.pageX < s.scrollSensitivity ? i.scrollParent[0].scrollLeft =
  815. n = i.scrollParent[0].scrollLeft + s.scrollSpeed : e.pageX - i.overflowOffset.left <
  816. s.scrollSensitivity && (i.scrollParent[0].scrollLeft = n = i.scrollParent[0].scrollLeft -
  817. s.scrollSpeed))) : (s.axis && "x" === s.axis || (e.pageY - t(document).scrollTop() <
  818. s.scrollSensitivity ? n = t(document).scrollTop(t(document).scrollTop() - s.scrollSpeed) :
  819. t(window).height() - (e.pageY - t(document).scrollTop()) < s.scrollSensitivity && (
  820. n = t(document).scrollTop(t(document).scrollTop() + s.scrollSpeed))), s.axis &&
  821. "y" === s.axis || (e.pageX - t(document).scrollLeft() < s.scrollSensitivity ? n = t(
  822. document).scrollLeft(t(document).scrollLeft() - s.scrollSpeed) : t(window).width() -
  823. (e.pageX - t(document).scrollLeft()) < s.scrollSensitivity && (n = t(document).scrollLeft(
  824. t(document).scrollLeft() + s.scrollSpeed)))), n !== !1 && t.ui.ddmanager && !s.dropBehaviour &&
  825. t.ui.ddmanager.prepareOffsets(i, e)
  826. }
  827. }), t.ui.plugin.add("draggable", "snap", {
  828. start: function () {
  829. var e = t(this).data("ui-draggable"),
  830. i = e.options;
  831. e.snapElements = [], t(i.snap.constructor !== String ? i.snap.items || ":data(ui-draggable)" :
  832. i.snap).each(function () {
  833. var i = t(this),
  834. s = i.offset();
  835. this !== e.element[0] && e.snapElements.push({
  836. item: this,
  837. width: i.outerWidth(),
  838. height: i.outerHeight(),
  839. top: s.top,
  840. left: s.left
  841. })
  842. })
  843. },
  844. drag: function (e, i) {
  845. var s, n, o, a, r, h, l, c, u, d, p = t(this).data("ui-draggable"),
  846. f = p.options,
  847. g = f.snapTolerance,
  848. m = i.offset.left,
  849. v = m + p.helperProportions.width,
  850. _ = i.offset.top,
  851. b = _ + p.helperProportions.height;
  852. for (u = p.snapElements.length - 1; u >= 0; u--) r = p.snapElements[u].left, h = r + p.snapElements[
  853. u].width, l = p.snapElements[u].top, c = l + p.snapElements[u].height, r - g > v || m >
  854. h + g || l - g > b || _ > c + g || !t.contains(p.snapElements[u].item.ownerDocument, p.snapElements[
  855. u].item) ? (p.snapElements[u].snapping && p.options.snap.release && p.options.snap.release
  856. .call(p.element, e, t.extend(p._uiHash(), {
  857. snapItem: p.snapElements[u].item
  858. })), p.snapElements[u].snapping = !1) : ("inner" !== f.snapMode && (s = g >= Math.abs(l -
  859. b), n = g >= Math.abs(c - _), o = g >= Math.abs(r - v), a = g >= Math.abs(h - m),
  860. s && (i.position.top = p._convertPositionTo("relative", {
  861. top: l - p.helperProportions.height,
  862. left: 0
  863. }).top - p.margins.top), n && (i.position.top = p._convertPositionTo("relative", {
  864. top: c,
  865. left: 0
  866. }).top - p.margins.top), o && (i.position.left = p._convertPositionTo("relative", {
  867. top: 0,
  868. left: r - p.helperProportions.width
  869. }).left - p.margins.left), a && (i.position.left = p._convertPositionTo("relative", {
  870. top: 0,
  871. left: h
  872. }).left - p.margins.left)), d = s || n || o || a, "outer" !== f.snapMode && (s = g >=
  873. Math.abs(l - _), n = g >= Math.abs(c - b), o = g >= Math.abs(r - m), a = g >= Math.abs(
  874. h - v), s && (i.position.top = p._convertPositionTo("relative", {
  875. top: l,
  876. left: 0
  877. }).top - p.margins.top), n && (i.position.top = p._convertPositionTo("relative", {
  878. top: c - p.helperProportions.height,
  879. left: 0
  880. }).top - p.margins.top), o && (i.position.left = p._convertPositionTo("relative", {
  881. top: 0,
  882. left: r
  883. }).left - p.margins.left), a && (i.position.left = p._convertPositionTo("relative", {
  884. top: 0,
  885. left: h - p.helperProportions.width
  886. }).left - p.margins.left)), !p.snapElements[u].snapping && (s || n || o || a || d) &&
  887. p.options.snap.snap && p.options.snap.snap.call(p.element, e, t.extend(p._uiHash(), {
  888. snapItem: p.snapElements[u].item
  889. })), p.snapElements[u].snapping = s || n || o || a || d)
  890. }
  891. }), t.ui.plugin.add("draggable", "stack", {
  892. start: function () {
  893. var e, i = this.data("ui-draggable").options,
  894. s = t.makeArray(t(i.stack)).sort(function (e, i) {
  895. return (parseInt(t(e).css("zIndex"), 10) || 0) - (parseInt(t(i).css("zIndex"), 10) ||
  896. 0)
  897. });
  898. s.length && (e = parseInt(t(s[0]).css("zIndex"), 10) || 0, t(s).each(function (i) {
  899. t(this).css("zIndex", e + i)
  900. }), this.css("zIndex", e + s.length))
  901. }
  902. }), t.ui.plugin.add("draggable", "zIndex", {
  903. start: function (e, i) {
  904. var s = t(i.helper),
  905. n = t(this).data("ui-draggable").options;
  906. s.css("zIndex") && (n._zIndex = s.css("zIndex")), s.css("zIndex", n.zIndex)
  907. },
  908. stop: function (e, i) {
  909. var s = t(this).data("ui-draggable").options;
  910. s._zIndex && t(i.helper).css("zIndex", s._zIndex)
  911. }
  912. })
  913. }(jQuery),
  914. function (t) {
  915. function e(t, e, i) {
  916. return t > e && e + i > t
  917. }
  918. t.widget("ui.droppable", {
  919. version: "1.10.3",
  920. widgetEventPrefix: "drop",
  921. options: {
  922. accept: "*",
  923. activeClass: !1,
  924. addClasses: !0,
  925. greedy: !1,
  926. hoverClass: !1,
  927. scope: "default",
  928. tolerance: "intersect",
  929. activate: null,
  930. deactivate: null,
  931. drop: null,
  932. out: null,
  933. over: null
  934. },
  935. _create: function () {
  936. var e = this.options,
  937. i = e.accept;
  938. this.isover = !1, this.isout = !0, this.accept = t.isFunction(i) ? i : function (t) {
  939. return t.is(i)
  940. }, this.proportions = {
  941. width: this.element[0].offsetWidth,
  942. height: this.element[0].offsetHeight
  943. }, t.ui.ddmanager.droppables[e.scope] = t.ui.ddmanager.droppables[e.scope] || [], t.ui.ddmanager
  944. .droppables[e.scope].push(this), e.addClasses && this.element.addClass("ui-droppable")
  945. },
  946. _destroy: function () {
  947. for (var e = 0, i = t.ui.ddmanager.droppables[this.options.scope]; i.length > e; e++) i[e] ===
  948. this && i.splice(e, 1);
  949. this.element.removeClass("ui-droppable ui-droppable-disabled")
  950. },
  951. _setOption: function (e, i) {
  952. "accept" === e && (this.accept = t.isFunction(i) ? i : function (t) {
  953. return t.is(i)
  954. }), t.Widget.prototype._setOption.apply(this, arguments)
  955. },
  956. _activate: function (e) {
  957. var i = t.ui.ddmanager.current;
  958. this.options.activeClass && this.element.addClass(this.options.activeClass), i && this._trigger(
  959. "activate", e, this.ui(i))
  960. },
  961. _deactivate: function (e) {
  962. var i = t.ui.ddmanager.current;
  963. this.options.activeClass && this.element.removeClass(this.options.activeClass), i && this._trigger(
  964. "deactivate", e, this.ui(i))
  965. },
  966. _over: function (e) {
  967. var i = t.ui.ddmanager.current;
  968. i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i
  969. .currentItem || i.element) && (this.options.hoverClass && this.element.addClass(this.options
  970. .hoverClass), this._trigger("over", e, this.ui(i)))
  971. },
  972. _out: function (e) {
  973. var i = t.ui.ddmanager.current;
  974. i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i
  975. .currentItem || i.element) && (this.options.hoverClass && this.element.removeClass(this
  976. .options.hoverClass), this._trigger("out", e, this.ui(i)))
  977. },
  978. _drop: function (e, i) {
  979. var s = i || t.ui.ddmanager.current,
  980. n = !1;
  981. return s && (s.currentItem || s.element)[0] !== this.element[0] ? (this.element.find(
  982. ":data(ui-droppable)").not(".ui-draggable-dragging").each(function () {
  983. var e = t.data(this, "ui-droppable");
  984. return e.options.greedy && !e.options.disabled && e.options.scope === s.options
  985. .scope && e.accept.call(e.element[0], s.currentItem || s.element) && t.ui.intersect(
  986. s, t.extend(e, {
  987. offset: e.element.offset()
  988. }), e.options.tolerance) ? (n = !0, !1) : undefined
  989. }), n ? !1 : this.accept.call(this.element[0], s.currentItem || s.element) ? (this.options
  990. .activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass &&
  991. this.element.removeClass(this.options.hoverClass), this._trigger("drop", e, this.ui(
  992. s)), this.element) : !1) : !1
  993. },
  994. ui: function (t) {
  995. return {
  996. draggable: t.currentItem || t.element,
  997. helper: t.helper,
  998. position: t.position,
  999. offset: t.positionAbs
  1000. }
  1001. }
  1002. }), t.ui.intersect = function (t, i, s) {
  1003. if (!i.offset) return !1;
  1004. var n, o, a = (t.positionAbs || t.position.absolute).left,
  1005. r = a + t.helperProportions.width,
  1006. h = (t.positionAbs || t.position.absolute).top,
  1007. l = h + t.helperProportions.height,
  1008. c = i.offset.left,
  1009. u = c + i.proportions.width,
  1010. d = i.offset.top,
  1011. p = d + i.proportions.height;
  1012. switch (s) {
  1013. case "fit":
  1014. return a >= c && u >= r && h >= d && p >= l;
  1015. case "intersect":
  1016. return a + t.helperProportions.width / 2 > c && u > r - t.helperProportions.width / 2 && h + t.helperProportions
  1017. .height / 2 > d && p > l - t.helperProportions.height / 2;
  1018. case "pointer":
  1019. return n = (t.positionAbs || t.position.absolute).left + (t.clickOffset || t.offset.click).left, o =
  1020. (t.positionAbs || t.position.absolute).top + (t.clickOffset || t.offset.click).top, e(o, d, i.proportions
  1021. .height) && e(n, c, i.proportions.width);
  1022. case "touch":
  1023. return (h >= d && p >= h || l >= d && p >= l || d > h && l > p) && (a >= c && u >= a || r >= c && u >=
  1024. r || c > a && r > u);
  1025. default:
  1026. return !1
  1027. }
  1028. }, t.ui.ddmanager = {
  1029. current: null,
  1030. droppables: {
  1031. "default": []
  1032. },
  1033. prepareOffsets: function (e, i) {
  1034. var s, n, o = t.ui.ddmanager.droppables[e.options.scope] || [],
  1035. a = i ? i.type : null,
  1036. r = (e.currentItem || e.element).find(":data(ui-droppable)").addBack();
  1037. t: for (s = 0; o.length > s; s++)
  1038. if (!(o[s].options.disabled || e && !o[s].accept.call(o[s].element[0], e.currentItem || e.element))) {
  1039. for (n = 0; r.length > n; n++)
  1040. if (r[n] === o[s].element[0]) {
  1041. o[s].proportions.height = 0;
  1042. continue t
  1043. } o[s].visible = "none" !== o[s].element.css("display"), o[s].visible && (
  1044. "mousedown" === a && o[s]._activate.call(o[s], i), o[s].offset = o[s].element.offset(),
  1045. o[s].proportions = {
  1046. width: o[s].element[0].offsetWidth,
  1047. height: o[s].element[0].offsetHeight
  1048. })
  1049. }
  1050. },
  1051. drop: function (e, i) {
  1052. var s = !1;
  1053. return t.each((t.ui.ddmanager.droppables[e.options.scope] || []).slice(), function () {
  1054. this.options && (!this.options.disabled && this.visible && t.ui.intersect(e, this, this
  1055. .options.tolerance) && (s = this._drop.call(this, i) || s), !this.options.disabled &&
  1056. this.visible && this.accept.call(this.element[0], e.currentItem || e.element) &&
  1057. (this.isout = !0, this.isover = !1, this._deactivate.call(this, i)))
  1058. }), s
  1059. },
  1060. dragStart: function (e, i) {
  1061. e.element.parentsUntil("body").bind("scroll.droppable", function () {
  1062. e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i)
  1063. })
  1064. },
  1065. drag: function (e, i) {
  1066. e.options.refreshPositions && t.ui.ddmanager.prepareOffsets(e, i), t.each(t.ui.ddmanager.droppables[
  1067. e.options.scope] || [], function () {
  1068. if (!this.options.disabled && !this.greedyChild && this.visible) {
  1069. var s, n, o, a = t.ui.intersect(e, this, this.options.tolerance),
  1070. r = !a && this.isover ? "isout" : a && !this.isover ? "isover" : null;
  1071. r && (this.options.greedy && (n = this.options.scope, o = this.element.parents(
  1072. ":data(ui-droppable)").filter(function () {
  1073. return t.data(this, "ui-droppable").options.scope === n
  1074. }), o.length && (s = t.data(o[0], "ui-droppable"), s.greedyChild =
  1075. "isover" === r)), s && "isover" === r && (s.isover = !1, s.isout = !0,
  1076. s._out.call(s, i)), this[r] = !0, this["isout" === r ? "isover" :
  1077. "isout"] = !1, this["isover" === r ? "_over" : "_out"].call(this, i), s &&
  1078. "isout" === r && (s.isout = !1, s.isover = !0, s._over.call(s, i)))
  1079. }
  1080. })
  1081. },
  1082. dragStop: function (e, i) {
  1083. e.element.parentsUntil("body").unbind("scroll.droppable"), e.options.refreshPositions || t.ui.ddmanager
  1084. .prepareOffsets(e, i)
  1085. }
  1086. }
  1087. }(jQuery),
  1088. function (t) {
  1089. function e(t) {
  1090. return parseInt(t, 10) || 0
  1091. }
  1092. function i(t) {
  1093. return !isNaN(parseInt(t, 10))
  1094. }
  1095. t.widget("ui.resizable", t.ui.mouse, {
  1096. version: "1.10.3",
  1097. widgetEventPrefix: "resize",
  1098. options: {
  1099. alsoResize: !1,
  1100. animate: !1,
  1101. animateDuration: "slow",
  1102. animateEasing: "swing",
  1103. aspectRatio: !1,
  1104. autoHide: !1,
  1105. containment: !1,
  1106. ghost: !1,
  1107. grid: !1,
  1108. handles: "e,s,se",
  1109. helper: !1,
  1110. maxHeight: null,
  1111. maxWidth: null,
  1112. minHeight: 10,
  1113. minWidth: 10,
  1114. zIndex: 90,
  1115. resize: null,
  1116. start: null,
  1117. stop: null
  1118. },
  1119. _create: function () {
  1120. var e, i, s, n, o, a = this,
  1121. r = this.options;
  1122. if (this.element.addClass("ui-resizable"), t.extend(this, {
  1123. _aspectRatio: !!r.aspectRatio,
  1124. aspectRatio: r.aspectRatio,
  1125. originalElement: this.element,
  1126. _proportionallyResizeElements: [],
  1127. _helper: r.helper || r.ghost || r.animate ? r.helper || "ui-resizable-helper" : null
  1128. }), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element
  1129. .wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
  1130. position: this.element.css("position"),
  1131. width: this.element.outerWidth(),
  1132. height: this.element.outerHeight(),
  1133. top: this.element.css("top"),
  1134. left: this.element.css("left")
  1135. })), this.element = this.element.parent().data("ui-resizable", this.element.data(
  1136. "ui-resizable")), this.elementIsWrapper = !0, this.element.css({
  1137. marginLeft: this.originalElement.css("marginLeft"),
  1138. marginTop: this.originalElement.css("marginTop"),
  1139. marginRight: this.originalElement.css("marginRight"),
  1140. marginBottom: this.originalElement.css("marginBottom")
  1141. }), this.originalElement.css({
  1142. marginLeft: 0,
  1143. marginTop: 0,
  1144. marginRight: 0,
  1145. marginBottom: 0
  1146. }), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement
  1147. .css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({
  1148. position: "static",
  1149. zoom: 1,
  1150. display: "block"
  1151. })), this.originalElement.css({
  1152. margin: this.originalElement.css("margin")
  1153. }), this._proportionallyResize()), this.handles = r.handles || (t(
  1154. ".ui-resizable-handle", this.element).length ? {
  1155. n: ".ui-resizable-n",
  1156. e: ".ui-resizable-e",
  1157. s: ".ui-resizable-s",
  1158. w: ".ui-resizable-w",
  1159. se: ".ui-resizable-se",
  1160. sw: ".ui-resizable-sw",
  1161. ne: ".ui-resizable-ne",
  1162. nw: ".ui-resizable-nw"
  1163. } : "e,s,se"), this.handles.constructor === String)
  1164. for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), e = this.handles.split(
  1165. ","), this.handles = {}, i = 0; e.length > i; i++) s = t.trim(e[i]), o =
  1166. "ui-resizable-" + s, n = t("<div class='ui-resizable-handle " + o + "'></div>"), n.css({
  1167. zIndex: r.zIndex
  1168. }), "se" === s && n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] =
  1169. ".ui-resizable-" + s, this.element.append(n);
  1170. this._renderAxis = function (e) {
  1171. var i, s, n, o;
  1172. e = e || this.element;
  1173. for (i in this.handles) this.handles[i].constructor === String && (this.handles[i] = t(
  1174. this.handles[i], this.element).show()), this.elementIsWrapper && this.originalElement[
  1175. 0].nodeName.match(/textarea|input|select|button/i) && (s = t(this.handles[i],
  1176. this.element), o = /sw|ne|nw|se|n|s/.test(i) ? s.outerHeight() : s.outerWidth(),
  1177. n = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" :
  1178. /^e$/.test(i) ? "Right" : "Left"].join(""), e.css(n, o), this._proportionallyResize()
  1179. ), t(this.handles[i]).length
  1180. }, this._renderAxis(this.element), this._handles = t(".ui-resizable-handle", this.element).disableSelection(),
  1181. this._handles.mouseover(function () {
  1182. a.resizing || (this.className && (n = this.className.match(
  1183. /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), a.axis = n && n[1] ? n[1] :
  1184. "se")
  1185. }), r.autoHide && (this._handles.hide(), t(this.element).addClass("ui-resizable-autohide").mouseenter(
  1186. function () {
  1187. r.disabled || (t(this).removeClass("ui-resizable-autohide"), a._handles.show())
  1188. }).mouseleave(function () {
  1189. r.disabled || a.resizing || (t(this).addClass("ui-resizable-autohide"), a._handles
  1190. .hide())
  1191. })), this._mouseInit()
  1192. },
  1193. _destroy: function () {
  1194. this._mouseDestroy();
  1195. var e, i = function (e) {
  1196. t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData(
  1197. "resizable").removeData("ui-resizable").unbind(".resizable").find(
  1198. ".ui-resizable-handle").remove()
  1199. };
  1200. return this.elementIsWrapper && (i(this.element), e = this.element, this.originalElement.css({
  1201. position: e.css("position"),
  1202. width: e.outerWidth(),
  1203. height: e.outerHeight(),
  1204. top: e.css("top"),
  1205. left: e.css("left")
  1206. }).insertAfter(e), e.remove()), this.originalElement.css("resize", this.originalResizeStyle),
  1207. i(this.originalElement), this
  1208. },
  1209. _mouseCapture: function (e) {
  1210. var i, s, n = !1;
  1211. for (i in this.handles) s = t(this.handles[i])[0], (s === e.target || t.contains(s, e.target)) &&
  1212. (n = !0);
  1213. return !this.options.disabled && n
  1214. },
  1215. _mouseStart: function (i) {
  1216. var s, n, o, a = this.options,
  1217. r = this.element.position(),
  1218. h = this.element;
  1219. return this.resizing = !0, /absolute/.test(h.css("position")) ? h.css({
  1220. position: "absolute",
  1221. top: h.css("top"),
  1222. left: h.css("left")
  1223. }) : h.is(".ui-draggable") && h.css({
  1224. position: "absolute",
  1225. top: r.top,
  1226. left: r.left
  1227. }), this._renderProxy(), s = e(this.helper.css("left")), n = e(this.helper.css("top")), a.containment &&
  1228. (s += t(a.containment).scrollLeft() || 0, n += t(a.containment).scrollTop() || 0), this.offset =
  1229. this.helper.offset(), this.position = {
  1230. left: s,
  1231. top: n
  1232. }, this.size = this._helper ? {
  1233. width: h.outerWidth(),
  1234. height: h.outerHeight()
  1235. } : {
  1236. width: h.width(),
  1237. height: h.height()
  1238. }, this.originalSize = this._helper ? {
  1239. width: h.outerWidth(),
  1240. height: h.outerHeight()
  1241. } : {
  1242. width: h.width(),
  1243. height: h.height()
  1244. }, this.originalPosition = {
  1245. left: s,
  1246. top: n
  1247. }, this.sizeDiff = {
  1248. width: h.outerWidth() - h.width(),
  1249. height: h.outerHeight() - h.height()
  1250. }, this.originalMousePosition = {
  1251. left: i.pageX,
  1252. top: i.pageY
  1253. }, this.aspectRatio = "number" == typeof a.aspectRatio ? a.aspectRatio : this.originalSize.width /
  1254. this.originalSize.height || 1, o = t(".ui-resizable-" + this.axis).css("cursor"), t("body")
  1255. .css("cursor", "auto" === o ? this.axis + "-resize" : o), h.addClass(
  1256. "ui-resizable-resizing"), this._propagate("start", i), !0
  1257. },
  1258. _mouseDrag: function (e) {
  1259. var i, s = this.helper,
  1260. n = {},
  1261. o = this.originalMousePosition,
  1262. a = this.axis,
  1263. r = this.position.top,
  1264. h = this.position.left,
  1265. l = this.size.width,
  1266. c = this.size.height,
  1267. u = e.pageX - o.left || 0,
  1268. d = e.pageY - o.top || 0,
  1269. p = this._change[a];
  1270. return p ? (i = p.apply(this, [e, u, d]), this._updateVirtualBoundaries(e.shiftKey), (this._aspectRatio ||
  1271. e.shiftKey) && (i = this._updateRatio(i, e)), i = this._respectSize(i, e), this._updateCache(
  1272. i), this._propagate("resize", e), this.position.top !== r && (n.top = this.position
  1273. .top + "px"), this.position.left !== h && (n.left = this.position.left + "px"),
  1274. this.size.width !== l && (n.width = this.size.width + "px"), this.size.height !== c &&
  1275. (n.height = this.size.height + "px"), s.css(n), !this._helper && this._proportionallyResizeElements
  1276. .length && this._proportionallyResize(), t.isEmptyObject(n) || this._trigger("resize",
  1277. e, this.ui()), !1) : !1
  1278. },
  1279. _mouseStop: function (e) {
  1280. this.resizing = !1;
  1281. var i, s, n, o, a, r, h, l = this.options,
  1282. c = this;
  1283. return this._helper && (i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(
  1284. i[0].nodeName), n = s && t.ui.hasScroll(i[0], "left") ? 0 : c.sizeDiff.height, o =
  1285. s ? 0 : c.sizeDiff.width, a = {
  1286. width: c.helper.width() - o,
  1287. height: c.helper.height() - n
  1288. }, r = parseInt(c.element.css("left"), 10) + (c.position.left - c.originalPosition.left) ||
  1289. null, h = parseInt(c.element.css("top"), 10) + (c.position.top - c.originalPosition.top) ||
  1290. null, l.animate || this.element.css(t.extend(a, {
  1291. top: h,
  1292. left: r
  1293. })), c.helper.height(c.size.height), c.helper.width(c.size.width), this._helper && !l.animate &&
  1294. this._proportionallyResize()), t("body").css("cursor", "auto"), this.element.removeClass(
  1295. "ui-resizable-resizing"), this._propagate("stop", e), this._helper && this.helper.remove(),
  1296. !1
  1297. },
  1298. _updateVirtualBoundaries: function (t) {
  1299. var e, s, n, o, a, r = this.options;
  1300. a = {
  1301. minWidth: i(r.minWidth) ? r.minWidth : 0,
  1302. maxWidth: i(r.maxWidth) ? r.maxWidth : 1 / 0,
  1303. minHeight: i(r.minHeight) ? r.minHeight : 0,
  1304. maxHeight: i(r.maxHeight) ? r.maxHeight : 1 / 0
  1305. }, (this._aspectRatio || t) && (e = a.minHeight * this.aspectRatio, n = a.minWidth / this.aspectRatio,
  1306. s = a.maxHeight * this.aspectRatio, o = a.maxWidth / this.aspectRatio, e > a.minWidth &&
  1307. (a.minWidth = e), n > a.minHeight && (a.minHeight = n), a.maxWidth > s && (a.maxWidth =
  1308. s), a.maxHeight > o && (a.maxHeight = o)), this._vBoundaries = a
  1309. },
  1310. _updateCache: function (t) {
  1311. this.offset = this.helper.offset(), i(t.left) && (this.position.left = t.left), i(t.top) && (
  1312. this.position.top = t.top), i(t.height) && (this.size.height = t.height), i(t.width) &&
  1313. (this.size.width = t.width)
  1314. },
  1315. _updateRatio: function (t) {
  1316. var e = this.position,
  1317. s = this.size,
  1318. n = this.axis;
  1319. return i(t.height) ? t.width = t.height * this.aspectRatio : i(t.width) && (t.height = t.width /
  1320. this.aspectRatio), "sw" === n && (t.left = e.left + (s.width - t.width), t.top = null),
  1321. "nw" === n && (t.top = e.top + (s.height - t.height), t.left = e.left + (s.width - t.width)),
  1322. t
  1323. },
  1324. _respectSize: function (t) {
  1325. var e = this._vBoundaries,
  1326. s = this.axis,
  1327. n = i(t.width) && e.maxWidth && e.maxWidth < t.width,
  1328. o = i(t.height) && e.maxHeight && e.maxHeight < t.height,
  1329. a = i(t.width) && e.minWidth && e.minWidth > t.width,
  1330. r = i(t.height) && e.minHeight && e.minHeight > t.height,
  1331. h = this.originalPosition.left + this.originalSize.width,
  1332. l = this.position.top + this.size.height,
  1333. c = /sw|nw|w/.test(s),
  1334. u = /nw|ne|n/.test(s);
  1335. return a && (t.width = e.minWidth), r && (t.height = e.minHeight), n && (t.width = e.maxWidth),
  1336. o && (t.height = e.maxHeight), a && c && (t.left = h - e.minWidth), n && c && (t.left = h -
  1337. e.maxWidth), r && u && (t.top = l - e.minHeight), o && u && (t.top = l - e.maxHeight),
  1338. t.width || t.height || t.left || !t.top ? t.width || t.height || t.top || !t.left || (t.left =
  1339. null) : t.top = null, t
  1340. },
  1341. _proportionallyResize: function () {
  1342. if (this._proportionallyResizeElements.length) {
  1343. var t, e, i, s, n, o = this.helper || this.element;
  1344. for (t = 0; this._proportionallyResizeElements.length > t; t++) {
  1345. if (n = this._proportionallyResizeElements[t], !this.borderDif)
  1346. for (this.borderDif = [], i = [n.css("borderTopWidth"), n.css("borderRightWidth"),
  1347. n.css("borderBottomWidth"), n.css("borderLeftWidth")], s = [n.css(
  1348. "paddingTop"), n.css("paddingRight"), n.css("paddingBottom"), n.css(
  1349. "paddingLeft")], e = 0; i.length > e; e++) this.borderDif[e] = (parseInt(i[
  1350. e], 10) || 0) + (parseInt(s[e], 10) || 0);
  1351. n.css({
  1352. height: o.height() - this.borderDif[0] - this.borderDif[2] || 0,
  1353. width: o.width() - this.borderDif[1] - this.borderDif[3] || 0
  1354. })
  1355. }
  1356. }
  1357. },
  1358. _renderProxy: function () {
  1359. var e = this.element,
  1360. i = this.options;
  1361. this.elementOffset = e.offset(), this._helper ? (this.helper = this.helper || t(
  1362. "<div style='overflow:hidden;'></div>"), this.helper.addClass(this._helper).css({
  1363. width: this.element.outerWidth() - 1,
  1364. height: this.element.outerHeight() - 1,
  1365. position: "absolute",
  1366. left: this.elementOffset.left + "px",
  1367. top: this.elementOffset.top + "px",
  1368. zIndex: ++i.zIndex
  1369. }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element
  1370. },
  1371. _change: {
  1372. e: function (t, e) {
  1373. return {
  1374. width: this.originalSize.width + e
  1375. }
  1376. },
  1377. w: function (t, e) {
  1378. var i = this.originalSize,
  1379. s = this.originalPosition;
  1380. return {
  1381. left: s.left + e,
  1382. width: i.width - e
  1383. }
  1384. },
  1385. n: function (t, e, i) {
  1386. var s = this.originalSize,
  1387. n = this.originalPosition;
  1388. return {
  1389. top: n.top + i,
  1390. height: s.height - i
  1391. }
  1392. },
  1393. s: function (t, e, i) {
  1394. return {
  1395. height: this.originalSize.height + i
  1396. }
  1397. },
  1398. se: function (e, i, s) {
  1399. return t.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, i, s]))
  1400. },
  1401. sw: function (e, i, s) {
  1402. return t.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, i, s]))
  1403. },
  1404. ne: function (e, i, s) {
  1405. return t.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, i, s]))
  1406. },
  1407. nw: function (e, i, s) {
  1408. return t.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, i, s]))
  1409. }
  1410. },
  1411. _propagate: function (e, i) {
  1412. t.ui.plugin.call(this, e, [i, this.ui()]), "resize" !== e && this._trigger(e, i, this.ui())
  1413. },
  1414. plugins: {},
  1415. ui: function () {
  1416. return {
  1417. originalElement: this.originalElement,
  1418. element: this.element,
  1419. helper: this.helper,
  1420. position: this.position,
  1421. size: this.size,
  1422. originalSize: this.originalSize,
  1423. originalPosition: this.originalPosition
  1424. }
  1425. }
  1426. }), t.ui.plugin.add("resizable", "animate", {
  1427. stop: function (e) {
  1428. var i = t(this).data("ui-resizable"),
  1429. s = i.options,
  1430. n = i._proportionallyResizeElements,
  1431. o = n.length && /textarea/i.test(n[0].nodeName),
  1432. a = o && t.ui.hasScroll(n[0], "left") ? 0 : i.sizeDiff.height,
  1433. r = o ? 0 : i.sizeDiff.width,
  1434. h = {
  1435. width: i.size.width - r,
  1436. height: i.size.height - a
  1437. },
  1438. l = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) ||
  1439. null,
  1440. c = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null;
  1441. i.element.animate(t.extend(h, c && l ? {
  1442. top: c,
  1443. left: l
  1444. } : {}), {
  1445. duration: s.animateDuration,
  1446. easing: s.animateEasing,
  1447. step: function () {
  1448. var s = {
  1449. width: parseInt(i.element.css("width"), 10),
  1450. height: parseInt(i.element.css("height"), 10),
  1451. top: parseInt(i.element.css("top"), 10),
  1452. left: parseInt(i.element.css("left"), 10)
  1453. };
  1454. n && n.length && t(n[0]).css({
  1455. width: s.width,
  1456. height: s.height
  1457. }), i._updateCache(s), i._propagate("resize", e)
  1458. }
  1459. })
  1460. }
  1461. }), t.ui.plugin.add("resizable", "containment", {
  1462. start: function () {
  1463. var i, s, n, o, a, r, h, l = t(this).data("ui-resizable"),
  1464. c = l.options,
  1465. u = l.element,
  1466. d = c.containment,
  1467. p = d instanceof t ? d.get(0) : /parent/.test(d) ? u.parent().get(0) : d;
  1468. p && (l.containerElement = t(p), /document/.test(d) || d === document ? (l.containerOffset = {
  1469. left: 0,
  1470. top: 0
  1471. }, l.containerPosition = {
  1472. left: 0,
  1473. top: 0
  1474. }, l.parentData = {
  1475. element: t(document),
  1476. left: 0,
  1477. top: 0,
  1478. width: t(document).width(),
  1479. height: t(document).height() || document.body.parentNode.scrollHeight
  1480. }) : (i = t(p), s = [], t(["Top", "Right", "Left", "Bottom"]).each(function (t, n) {
  1481. s[t] = e(i.css("padding" + n))
  1482. }), l.containerOffset = i.offset(), l.containerPosition = i.position(), l.containerSize = {
  1483. height: i.innerHeight() - s[3],
  1484. width: i.innerWidth() - s[1]
  1485. }, n = l.containerOffset, o = l.containerSize.height, a = l.containerSize.width, r =
  1486. t.ui.hasScroll(p, "left") ? p.scrollWidth : a, h = t.ui.hasScroll(p) ? p.scrollHeight :
  1487. o, l.parentData = {
  1488. element: p,
  1489. left: n.left,
  1490. top: n.top,
  1491. width: r,
  1492. height: h
  1493. }))
  1494. },
  1495. resize: function (e) {
  1496. var i, s, n, o, a = t(this).data("ui-resizable"),
  1497. r = a.options,
  1498. h = a.containerOffset,
  1499. l = a.position,
  1500. c = a._aspectRatio || e.shiftKey,
  1501. u = {
  1502. top: 0,
  1503. left: 0
  1504. },
  1505. d = a.containerElement;
  1506. d[0] !== document && /static/.test(d.css("position")) && (u = h), l.left < (a._helper ? h.left :
  1507. 0) && (a.size.width = a.size.width + (a._helper ? a.position.left - h.left : a.position
  1508. .left - u.left), c && (a.size.height = a.size.width / a.aspectRatio), a.position.left =
  1509. r.helper ? h.left : 0), l.top < (a._helper ? h.top : 0) && (a.size.height = a.size.height +
  1510. (a._helper ? a.position.top - h.top : a.position.top), c && (a.size.width = a.size.height *
  1511. a.aspectRatio), a.position.top = a._helper ? h.top : 0), a.offset.left = a.parentData
  1512. .left + a.position.left, a.offset.top = a.parentData.top + a.position.top, i = Math.abs((a._helper ?
  1513. a.offset.left - u.left : a.offset.left - u.left) + a.sizeDiff.width), s = Math.abs((a._helper ?
  1514. a.offset.top - u.top : a.offset.top - h.top) + a.sizeDiff.height), n = a.containerElement
  1515. .get(0) === a.element.parent().get(0), o = /relative|absolute/.test(a.containerElement.css(
  1516. "position")), n && o && (i -= a.parentData.left), i + a.size.width >= a.parentData.width &&
  1517. (a.size.width = a.parentData.width - i, c && (a.size.height = a.size.width / a.aspectRatio)),
  1518. s + a.size.height >= a.parentData.height && (a.size.height = a.parentData.height - s, c &&
  1519. (a.size.width = a.size.height * a.aspectRatio))
  1520. },
  1521. stop: function () {
  1522. var e = t(this).data("ui-resizable"),
  1523. i = e.options,
  1524. s = e.containerOffset,
  1525. n = e.containerPosition,
  1526. o = e.containerElement,
  1527. a = t(e.helper),
  1528. r = a.offset(),
  1529. h = a.outerWidth() - e.sizeDiff.width,
  1530. l = a.outerHeight() - e.sizeDiff.height;
  1531. e._helper && !i.animate && /relative/.test(o.css("position")) && t(this).css({
  1532. left: r.left - n.left - s.left,
  1533. width: h,
  1534. height: l
  1535. }), e._helper && !i.animate && /static/.test(o.css("position")) && t(this).css({
  1536. left: r.left - n.left - s.left,
  1537. width: h,
  1538. height: l
  1539. })
  1540. }
  1541. }), t.ui.plugin.add("resizable", "alsoResize", {
  1542. start: function () {
  1543. var e = t(this).data("ui-resizable"),
  1544. i = e.options,
  1545. s = function (e) {
  1546. t(e).each(function () {
  1547. var e = t(this);
  1548. e.data("ui-resizable-alsoresize", {
  1549. width: parseInt(e.width(), 10),
  1550. height: parseInt(e.height(), 10),
  1551. left: parseInt(e.css("left"), 10),
  1552. top: parseInt(e.css("top"), 10)
  1553. })
  1554. })
  1555. };
  1556. "object" != typeof i.alsoResize || i.alsoResize.parentNode ? s(i.alsoResize) : i.alsoResize.length ?
  1557. (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : t.each(i.alsoResize, function (t) {
  1558. s(t)
  1559. })
  1560. },
  1561. resize: function (e, i) {
  1562. var s = t(this).data("ui-resizable"),
  1563. n = s.options,
  1564. o = s.originalSize,
  1565. a = s.originalPosition,
  1566. r = {
  1567. height: s.size.height - o.height || 0,
  1568. width: s.size.width - o.width || 0,
  1569. top: s.position.top - a.top || 0,
  1570. left: s.position.left - a.left || 0
  1571. },
  1572. h = function (e, s) {
  1573. t(e).each(function () {
  1574. var e = t(this),
  1575. n = t(this).data("ui-resizable-alsoresize"),
  1576. o = {},
  1577. a = s && s.length ? s : e.parents(i.originalElement[0]).length ? [
  1578. "width", "height"] : ["width", "height", "top", "left"];
  1579. t.each(a, function (t, e) {
  1580. var i = (n[e] || 0) + (r[e] || 0);
  1581. i && i >= 0 && (o[e] = i || null)
  1582. }), e.css(o)
  1583. })
  1584. };
  1585. "object" != typeof n.alsoResize || n.alsoResize.nodeType ? h(n.alsoResize) : t.each(n.alsoResize,
  1586. function (t, e) {
  1587. h(t, e)
  1588. })
  1589. },
  1590. stop: function () {
  1591. t(this).removeData("resizable-alsoresize")
  1592. }
  1593. }), t.ui.plugin.add("resizable", "ghost", {
  1594. start: function () {
  1595. var e = t(this).data("ui-resizable"),
  1596. i = e.options,
  1597. s = e.size;
  1598. e.ghost = e.originalElement.clone(), e.ghost.css({
  1599. opacity: .25,
  1600. display: "block",
  1601. position: "relative",
  1602. height: s.height,
  1603. width: s.width,
  1604. margin: 0,
  1605. left: 0,
  1606. top: 0
  1607. }).addClass("ui-resizable-ghost").addClass("string" == typeof i.ghost ? i.ghost : ""), e.ghost
  1608. .appendTo(e.helper)
  1609. },
  1610. resize: function () {
  1611. var e = t(this).data("ui-resizable");
  1612. e.ghost && e.ghost.css({
  1613. position: "relative",
  1614. height: e.size.height,
  1615. width: e.size.width
  1616. })
  1617. },
  1618. stop: function () {
  1619. var e = t(this).data("ui-resizable");
  1620. e.ghost && e.helper && e.helper.get(0).removeChild(e.ghost.get(0))
  1621. }
  1622. }), t.ui.plugin.add("resizable", "grid", {
  1623. resize: function () {
  1624. var e = t(this).data("ui-resizable"),
  1625. i = e.options,
  1626. s = e.size,
  1627. n = e.originalSize,
  1628. o = e.originalPosition,
  1629. a = e.axis,
  1630. r = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid,
  1631. h = r[0] || 1,
  1632. l = r[1] || 1,
  1633. c = Math.round((s.width - n.width) / h) * h,
  1634. u = Math.round((s.height - n.height) / l) * l,
  1635. d = n.width + c,
  1636. p = n.height + u,
  1637. f = i.maxWidth && d > i.maxWidth,
  1638. g = i.maxHeight && p > i.maxHeight,
  1639. m = i.minWidth && i.minWidth > d,
  1640. v = i.minHeight && i.minHeight > p;
  1641. i.grid = r, m && (d += h), v && (p += l), f && (d -= h), g && (p -= l), /^(se|s|e)$/.test(a) ?
  1642. (e.size.width = d, e.size.height = p) : /^(ne)$/.test(a) ? (e.size.width = d, e.size.height =
  1643. p, e.position.top = o.top - u) : /^(sw)$/.test(a) ? (e.size.width = d, e.size.height =
  1644. p, e.position.left = o.left - c) : (e.size.width = d, e.size.height = p, e.position.top =
  1645. o.top - u, e.position.left = o.left - c)
  1646. }
  1647. })
  1648. }(jQuery),
  1649. function (t) {
  1650. t.widget("ui.selectable", t.ui.mouse, {
  1651. version: "1.10.3",
  1652. options: {
  1653. appendTo: "body",
  1654. autoRefresh: !0,
  1655. distance: 0,
  1656. filter: "*",
  1657. tolerance: "touch",
  1658. selected: null,
  1659. selecting: null,
  1660. start: null,
  1661. stop: null,
  1662. unselected: null,
  1663. unselecting: null
  1664. },
  1665. _create: function () {
  1666. var e, i = this;
  1667. this.element.addClass("ui-selectable"), this.dragged = !1, this.refresh = function () {
  1668. e = t(i.options.filter, i.element[0]), e.addClass("ui-selectee"), e.each(function () {
  1669. var e = t(this),
  1670. i = e.offset();
  1671. t.data(this, "selectable-item", {
  1672. element: this,
  1673. $element: e,
  1674. left: i.left,
  1675. top: i.top,
  1676. right: i.left + e.outerWidth(),
  1677. bottom: i.top + e.outerHeight(),
  1678. startselected: !1,
  1679. selected: e.hasClass("ui-selected"),
  1680. selecting: e.hasClass("ui-selecting"),
  1681. unselecting: e.hasClass("ui-unselecting")
  1682. })
  1683. })
  1684. }, this.refresh(), this.selectees = e.addClass("ui-selectee"), this._mouseInit(), this.helper =
  1685. t("<div class='ui-selectable-helper'></div>")
  1686. },
  1687. _destroy: function () {
  1688. this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass(
  1689. "ui-selectable ui-selectable-disabled"), this._mouseDestroy()
  1690. },
  1691. _mouseStart: function (e) {
  1692. var i = this,
  1693. s = this.options;
  1694. this.opos = [e.pageX, e.pageY], this.options.disabled || (this.selectees = t(s.filter, this.element[
  1695. 0]), this._trigger("start", e), t(s.appendTo).append(this.helper), this.helper.css({
  1696. left: e.pageX,
  1697. top: e.pageY,
  1698. width: 0,
  1699. height: 0
  1700. }), s.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(
  1701. function () {
  1702. var s = t.data(this, "selectable-item");
  1703. s.startselected = !0, e.metaKey || e.ctrlKey || (s.$element.removeClass(
  1704. "ui-selected"), s.selected = !1, s.$element.addClass(
  1705. "ui-unselecting"), s.unselecting = !0, i._trigger("unselecting", e, {
  1706. unselecting: s.element
  1707. }))
  1708. }), t(e.target).parents().addBack().each(function () {
  1709. var s, n = t.data(this, "selectable-item");
  1710. return n ? (s = !e.metaKey && !e.ctrlKey || !n.$element.hasClass("ui-selected"),
  1711. n.$element.removeClass(s ? "ui-unselecting" : "ui-selected").addClass(s ?
  1712. "ui-selecting" : "ui-unselecting"), n.unselecting = !s, n.selecting =
  1713. s, n.selected = s, s ? i._trigger("selecting", e, {
  1714. selecting: n.element
  1715. }) : i._trigger("unselecting", e, {
  1716. unselecting: n.element
  1717. }), !1) : undefined
  1718. }))
  1719. },
  1720. _mouseDrag: function (e) {
  1721. if (this.dragged = !0, !this.options.disabled) {
  1722. var i, s = this,
  1723. n = this.options,
  1724. o = this.opos[0],
  1725. a = this.opos[1],
  1726. r = e.pageX,
  1727. h = e.pageY;
  1728. return o > r && (i = r, r = o, o = i), a > h && (i = h, h = a, a = i), this.helper.css({
  1729. left: o,
  1730. top: a,
  1731. width: r - o,
  1732. height: h - a
  1733. }), this.selectees.each(function () {
  1734. var i = t.data(this, "selectable-item"),
  1735. l = !1;
  1736. i && i.element !== s.element[0] && ("touch" === n.tolerance ? l = !(i.left > r ||
  1737. o > i.right || i.top > h || a > i.bottom) : "fit" === n.tolerance &&
  1738. (l = i.left > o && r > i.right && i.top > a && h > i.bottom), l ? (i.selected &&
  1739. (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting &&
  1740. (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting ||
  1741. (i.$element.addClass("ui-selecting"), i.selecting = !0, s._trigger(
  1742. "selecting", e, {
  1743. selecting: i.element
  1744. }))) : (i.selecting && ((e.metaKey || e.ctrlKey) && i.startselected ?
  1745. (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element
  1746. .addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass(
  1747. "ui-selecting"), i.selecting = !1, i.startselected && (
  1748. i.$element.addClass("ui-unselecting"), i.unselecting = !
  1749. 0), s._trigger("unselecting", e, {
  1750. unselecting: i.element
  1751. }))), i.selected && (e.metaKey || e.ctrlKey || i.startselected ||
  1752. (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element
  1753. .addClass("ui-unselecting"), i.unselecting = !0, s._trigger(
  1754. "unselecting", e, {
  1755. unselecting: i.element
  1756. })))))
  1757. }), !1
  1758. }
  1759. },
  1760. _mouseStop: function (e) {
  1761. var i = this;
  1762. return this.dragged = !1, t(".ui-unselecting", this.element[0]).each(function () {
  1763. var s = t.data(this, "selectable-item");
  1764. s.$element.removeClass("ui-unselecting"), s.unselecting = !1, s.startselected = !1,
  1765. i._trigger("unselected", e, {
  1766. unselected: s.element
  1767. })
  1768. }), t(".ui-selecting", this.element[0]).each(function () {
  1769. var s = t.data(this, "selectable-item");
  1770. s.$element.removeClass("ui-selecting").addClass("ui-selected"), s.selecting = !1, s
  1771. .selected = !0, s.startselected = !0, i._trigger("selected", e, {
  1772. selected: s.element
  1773. })
  1774. }), this._trigger("stop", e), this.helper.remove(), !1
  1775. }
  1776. })
  1777. }(jQuery),
  1778. function (t) {
  1779. function e(t, e, i) {
  1780. return t > e && e + i > t
  1781. }
  1782. function i(t) {
  1783. return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display"))
  1784. }
  1785. t.widget("ui.sortable", t.ui.mouse, {
  1786. version: "1.10.3",
  1787. widgetEventPrefix: "sort",
  1788. ready: !1,
  1789. options: {
  1790. appendTo: "parent",
  1791. axis: !1,
  1792. connectWith: !1,
  1793. containment: !1,
  1794. cursor: "auto",
  1795. cursorAt: !1,
  1796. dropOnEmpty: !0,
  1797. forcePlaceholderSize: !1,
  1798. forceHelperSize: !1,
  1799. grid: !1,
  1800. handle: !1,
  1801. helper: "original",
  1802. items: "> *",
  1803. opacity: !1,
  1804. placeholder: !1,
  1805. revert: !1,
  1806. scroll: !0,
  1807. scrollSensitivity: 20,
  1808. scrollSpeed: 20,
  1809. scope: "default",
  1810. tolerance: "intersect",
  1811. zIndex: 1e3,
  1812. activate: null,
  1813. beforeStop: null,
  1814. change: null,
  1815. deactivate: null,
  1816. out: null,
  1817. over: null,
  1818. receive: null,
  1819. remove: null,
  1820. sort: null,
  1821. start: null,
  1822. stop: null,
  1823. update: null
  1824. },
  1825. _create: function () {
  1826. var t = this.options;
  1827. this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.floating =
  1828. this.items.length ? "x" === t.axis || i(this.items[0].item) : !1, this.offset = this.element
  1829. .offset(), this._mouseInit(), this.ready = !0
  1830. },
  1831. _destroy: function () {
  1832. this.element.removeClass("ui-sortable ui-sortable-disabled"), this._mouseDestroy();
  1833. for (var t = this.items.length - 1; t >= 0; t--) this.items[t].item.removeData(this.widgetName +
  1834. "-item");
  1835. return this
  1836. },
  1837. _setOption: function (e, i) {
  1838. "disabled" === e ? (this.options[e] = i, this.widget().toggleClass("ui-sortable-disabled", !!i)) :
  1839. t.Widget.prototype._setOption.apply(this, arguments)
  1840. },
  1841. _mouseCapture: function (e, i) {
  1842. var s = null,
  1843. n = !1,
  1844. o = this;
  1845. return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (
  1846. this._refreshItems(e), t(e.target).parents().each(function () {
  1847. return t.data(this, o.widgetName + "-item") === o ? (s = t(this), !1) :
  1848. undefined
  1849. }), t.data(e.target, o.widgetName + "-item") === o && (s = t(e.target)), s ? !this.options
  1850. .handle || i || (t(this.options.handle, s).find("*").addBack().each(function () {
  1851. this === e.target && (n = !0)
  1852. }), n) ? (this.currentItem = s, this._removeCurrentsFromItems(), !0) : !1 : !1)
  1853. },
  1854. _mouseStart: function (e, i, s) {
  1855. var n, o, a = this.options;
  1856. if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e),
  1857. this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(),
  1858. this.offset = this.currentItem.offset(), this.offset = {
  1859. top: this.offset.top - this.margins.top,
  1860. left: this.offset.left - this.margins.left
  1861. }, t.extend(this.offset, {
  1862. click: {
  1863. left: e.pageX - this.offset.left,
  1864. top: e.pageY - this.offset.top
  1865. },
  1866. parent: this._getParentOffset(),
  1867. relative: this._getRelativeOffset()
  1868. }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"),
  1869. this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY =
  1870. e.pageY, a.cursorAt && this._adjustOffsetFromHelper(a.cursorAt), this.domPosition = {
  1871. prev: this.currentItem.prev()[0],
  1872. parent: this.currentItem.parent()[0]
  1873. }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(),
  1874. a.containment && this._setContainment(), a.cursor && "auto" !== a.cursor && (o = this.document
  1875. .find("body"), this.storedCursor = o.css("cursor"), o.css("cursor", a.cursor), this.storedStylesheet =
  1876. t("<style>*{ cursor: " + a.cursor + " !important; }</style>").appendTo(o)), a.opacity &&
  1877. (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper
  1878. .css("opacity", a.opacity)), a.zIndex && (this.helper.css("zIndex") && (this._storedZIndex =
  1879. this.helper.css("zIndex")), this.helper.css("zIndex", a.zIndex)), this.scrollParent[0] !==
  1880. document && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent
  1881. .offset()), this._trigger("start", e, this._uiHash()), this._preserveHelperProportions ||
  1882. this._cacheHelperProportions(), !s)
  1883. for (n = this.containers.length - 1; n >= 0; n--) this.containers[n]._trigger("activate", e,
  1884. this._uiHash(this));
  1885. return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !a.dropBehaviour &&
  1886. t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this.helper.addClass(
  1887. "ui-sortable-helper"), this._mouseDrag(e), !0
  1888. },
  1889. _mouseDrag: function (e) {
  1890. var i, s, n, o, a = this.options,
  1891. r = !1;
  1892. for (this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo(
  1893. "absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options
  1894. .scroll && (this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName ?
  1895. (this.overflowOffset.top + this.scrollParent[0].offsetHeight - e.pageY < a.scrollSensitivity ?
  1896. this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + a.scrollSpeed :
  1897. e.pageY - this.overflowOffset.top < a.scrollSensitivity && (this.scrollParent[0].scrollTop =
  1898. r = this.scrollParent[0].scrollTop - a.scrollSpeed), this.overflowOffset.left +
  1899. this.scrollParent[0].offsetWidth - e.pageX < a.scrollSensitivity ? this.scrollParent[
  1900. 0].scrollLeft = r = this.scrollParent[0].scrollLeft + a.scrollSpeed : e.pageX -
  1901. this.overflowOffset.left < a.scrollSensitivity && (this.scrollParent[0].scrollLeft =
  1902. r = this.scrollParent[0].scrollLeft - a.scrollSpeed)) : (e.pageY - t(document).scrollTop() <
  1903. a.scrollSensitivity ? r = t(document).scrollTop(t(document).scrollTop() - a.scrollSpeed) :
  1904. t(window).height() - (e.pageY - t(document).scrollTop()) < a.scrollSensitivity && (
  1905. r = t(document).scrollTop(t(document).scrollTop() + a.scrollSpeed)), e.pageX -
  1906. t(document).scrollLeft() < a.scrollSensitivity ? r = t(document).scrollLeft(t(
  1907. document).scrollLeft() - a.scrollSpeed) : t(window).width() - (e.pageX - t(
  1908. document).scrollLeft()) < a.scrollSensitivity && (r = t(document).scrollLeft(t(
  1909. document).scrollLeft() + a.scrollSpeed))), r !== !1 && t.ui.ddmanager && !a.dropBehaviour &&
  1910. t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo(
  1911. "absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left =
  1912. this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[
  1913. 0].style.top = this.position.top + "px"), i = this.items.length - 1; i >= 0; i--)
  1914. if (s = this.items[i], n = s.item[0], o = this._intersectsWithPointer(s), o && s.instance ===
  1915. this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === o ? "next" :
  1916. "prev"]()[0] !== n && !t.contains(this.placeholder[0], n) && ("semi-dynamic" ===
  1917. this.options.type ? !t.contains(this.element[0], n) : !0)) {
  1918. if (this.direction = 1 === o ? "down" : "up", "pointer" !== this.options.tolerance && !
  1919. this._intersectsWithSides(s)) break;
  1920. this._rearrange(e, s), this._trigger("change", e, this._uiHash());
  1921. break
  1922. } return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger(
  1923. "sort", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1
  1924. },
  1925. _mouseStop: function (e, i) {
  1926. if (e) {
  1927. if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options
  1928. .revert) {
  1929. var s = this,
  1930. n = this.placeholder.offset(),
  1931. o = this.options.axis,
  1932. a = {};
  1933. o && "x" !== o || (a.left = n.left - this.offset.parent.left - this.margins.left + (
  1934. this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft
  1935. )), o && "y" !== o || (a.top = n.top - this.offset.parent.top - this.margins.top +
  1936. (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)),
  1937. this.reverting = !0, t(this.helper).animate(a, parseInt(this.options.revert, 10) ||
  1938. 500,
  1939. function () {
  1940. s._clear(e)
  1941. })
  1942. } else this._clear(e, i);
  1943. return !1
  1944. }
  1945. },
  1946. cancel: function () {
  1947. if (this.dragging) {
  1948. this._mouseUp({
  1949. target: null
  1950. }), "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass(
  1951. "ui-sortable-helper") : this.currentItem.show();
  1952. for (var e = this.containers.length - 1; e >= 0; e--) this.containers[e]._trigger(
  1953. "deactivate", null, this._uiHash(this)), this.containers[e].containerCache.over &&
  1954. (this.containers[e]._trigger("out", null, this._uiHash(this)), this.containers[e].containerCache
  1955. .over = 0)
  1956. }
  1957. return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(
  1958. this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[
  1959. 0].parentNode && this.helper.remove(), t.extend(this, {
  1960. helper: null,
  1961. dragging: !1,
  1962. reverting: !1,
  1963. _noFinalSort: null
  1964. }), this.domPosition.prev ? t(this.domPosition.prev).after(this.currentItem) : t(this.domPosition
  1965. .parent).prepend(this.currentItem)), this
  1966. },
  1967. serialize: function (e) {
  1968. var i = this._getItemsAsjQuery(e && e.connected),
  1969. s = [];
  1970. return e = e || {}, t(i).each(function () {
  1971. var i = (t(e.item || this).attr(e.attribute || "id") || "").match(e.expression ||
  1972. /(.+)[\-=_](.+)/);
  1973. i && s.push((e.key || i[1] + "[]") + "=" + (e.key && e.expression ? i[1] : i[2]))
  1974. }), !s.length && e.key && s.push(e.key + "="), s.join("&")
  1975. },
  1976. toArray: function (e) {
  1977. var i = this._getItemsAsjQuery(e && e.connected),
  1978. s = [];
  1979. return e = e || {}, i.each(function () {
  1980. s.push(t(e.item || this).attr(e.attribute || "id") || "")
  1981. }), s
  1982. },
  1983. _intersectsWith: function (t) {
  1984. var e = this.positionAbs.left,
  1985. i = e + this.helperProportions.width,
  1986. s = this.positionAbs.top,
  1987. n = s + this.helperProportions.height,
  1988. o = t.left,
  1989. a = o + t.width,
  1990. r = t.top,
  1991. h = r + t.height,
  1992. l = this.offset.click.top,
  1993. c = this.offset.click.left,
  1994. u = "x" === this.options.axis || s + l > r && h > s + l,
  1995. d = "y" === this.options.axis || e + c > o && a > e + c,
  1996. p = u && d;
  1997. return "pointer" === this.options.tolerance || this.options.forcePointerForContainers ||
  1998. "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" :
  1999. "height"] > t[this.floating ? "width" : "height"] ? p : e + this.helperProportions.width /
  2000. 2 > o && a > i - this.helperProportions.width / 2 && s + this.helperProportions.height / 2 >
  2001. r && h > n - this.helperProportions.height / 2
  2002. },
  2003. _intersectsWithPointer: function (t) {
  2004. var i = "x" === this.options.axis || e(this.positionAbs.top + this.offset.click.top, t.top, t.height),
  2005. s = "y" === this.options.axis || e(this.positionAbs.left + this.offset.click.left, t.left,
  2006. t.width),
  2007. n = i && s,
  2008. o = this._getDragVerticalDirection(),
  2009. a = this._getDragHorizontalDirection();
  2010. return n ? this.floating ? a && "right" === a || "down" === o ? 2 : 1 : o && ("down" === o ? 2 :
  2011. 1) : !1
  2012. },
  2013. _intersectsWithSides: function (t) {
  2014. var i = e(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height),
  2015. s = e(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width),
  2016. n = this._getDragVerticalDirection(),
  2017. o = this._getDragHorizontalDirection();
  2018. return this.floating && o ? "right" === o && s || "left" === o && !s : n && ("down" === n && i ||
  2019. "up" === n && !i)
  2020. },
  2021. _getDragVerticalDirection: function () {
  2022. var t = this.positionAbs.top - this.lastPositionAbs.top;
  2023. return 0 !== t && (t > 0 ? "down" : "up")
  2024. },
  2025. _getDragHorizontalDirection: function () {
  2026. var t = this.positionAbs.left - this.lastPositionAbs.left;
  2027. return 0 !== t && (t > 0 ? "right" : "left")
  2028. },
  2029. refresh: function (t) {
  2030. return this._refreshItems(t), this.refreshPositions(), this
  2031. },
  2032. _connectWith: function () {
  2033. var t = this.options;
  2034. return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith
  2035. },
  2036. _getItemsAsjQuery: function (e) {
  2037. var i, s, n, o, a = [],
  2038. r = [],
  2039. h = this._connectWith();
  2040. if (h && e)
  2041. for (i = h.length - 1; i >= 0; i--)
  2042. for (n = t(h[i]), s = n.length - 1; s >= 0; s--) o = t.data(n[s], this.widgetFullName),
  2043. o && o !== this && !o.options.disabled && r.push([t.isFunction(o.options.items) ? o
  2044. .options.items.call(o.element) : t(o.options.items, o.element).not(
  2045. ".ui-sortable-helper").not(".ui-sortable-placeholder"), o]);
  2046. for (r.push([t.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
  2047. options: this.options,
  2048. item: this.currentItem
  2049. }) : t(this.options.items, this.element).not(".ui-sortable-helper").not(
  2050. ".ui-sortable-placeholder"), this]), i = r.length - 1; i >= 0; i--) r[i][0].each(
  2051. function () {
  2052. a.push(this)
  2053. });
  2054. return t(a)
  2055. },
  2056. _removeCurrentsFromItems: function () {
  2057. var e = this.currentItem.find(":data(" + this.widgetName + "-item)");
  2058. this.items = t.grep(this.items, function (t) {
  2059. for (var i = 0; e.length > i; i++)
  2060. if (e[i] === t.item[0]) return !1;
  2061. return !0
  2062. })
  2063. },
  2064. _refreshItems: function (e) {
  2065. this.items = [], this.containers = [this];
  2066. var i, s, n, o, a, r, h, l, c = this.items,
  2067. u = [[t.isFunction(this.options.items) ? this.options.items.call(this.element[0], e, {
  2068. item: this.currentItem
  2069. }) : t(this.options.items, this.element), this]],
  2070. d = this._connectWith();
  2071. if (d && this.ready)
  2072. for (i = d.length - 1; i >= 0; i--)
  2073. for (n = t(d[i]), s = n.length - 1; s >= 0; s--) o = t.data(n[s], this.widgetFullName),
  2074. o && o !== this && !o.options.disabled && (u.push([t.isFunction(o.options.items) ?
  2075. o.options.items.call(o.element[0], e, {
  2076. item: this.currentItem
  2077. }) : t(o.options.items, o.element), o]), this.containers.push(o));
  2078. for (i = u.length - 1; i >= 0; i--)
  2079. for (a = u[i][1], r = u[i][0], s = 0, l = r.length; l > s; s++) h = t(r[s]), h.data(this.widgetName +
  2080. "-item", a), c.push({
  2081. item: h,
  2082. instance: a,
  2083. width: 0,
  2084. height: 0,
  2085. left: 0,
  2086. top: 0
  2087. })
  2088. },
  2089. refreshPositions: function (e) {
  2090. this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
  2091. var i, s, n, o;
  2092. for (i = this.items.length - 1; i >= 0; i--) s = this.items[i], s.instance !== this.currentContainer &&
  2093. this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ?
  2094. t(this.options.toleranceElement, s.item) : s.item, e || (s.width = n.outerWidth(), s.height =
  2095. n.outerHeight()), o = n.offset(), s.left = o.left, s.top = o.top);
  2096. if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers
  2097. .call(this);
  2098. else
  2099. for (i = this.containers.length - 1; i >= 0; i--) o = this.containers[i].element.offset(),
  2100. this.containers[i].containerCache.left = o.left, this.containers[i].containerCache.top =
  2101. o.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(),
  2102. this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
  2103. return this
  2104. },
  2105. _createPlaceholder: function (e) {
  2106. e = e || this;
  2107. var i, s = e.options;
  2108. s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = {
  2109. element: function () {
  2110. var s = e.currentItem[0].nodeName.toLowerCase(),
  2111. n = t("<" + s + ">", e.document[0]).addClass(i || e.currentItem[0].className +
  2112. " ui-sortable-placeholder").removeClass("ui-sortable-helper");
  2113. return "tr" === s ? e.currentItem.children().each(function () {
  2114. t("<td>&#160;</td>", e.document[0]).attr("colspan", t(this).attr(
  2115. "colspan") || 1).appendTo(n)
  2116. }) : "img" === s && n.attr("src", e.currentItem.attr("src")), i || n.css(
  2117. "visibility", "hidden"), n
  2118. },
  2119. update: function (t, n) {
  2120. (!i || s.forcePlaceholderSize) && (n.height() || n.height(e.currentItem.innerHeight() -
  2121. parseInt(e.currentItem.css("paddingTop") || 0, 10) - parseInt(e.currentItem
  2122. .css("paddingBottom") || 0, 10)), n.width() || n.width(e.currentItem
  2123. .innerWidth() - parseInt(e.currentItem.css("paddingLeft") || 0, 10) -
  2124. parseInt(e.currentItem.css("paddingRight") || 0, 10)))
  2125. }
  2126. }), e.placeholder = t(s.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(
  2127. e.placeholder), s.placeholder.update(e, e.placeholder)
  2128. },
  2129. _contactContainers: function (s) {
  2130. var n, o, a, r, h, l, c, u, d, p, f = null,
  2131. g = null;
  2132. for (n = this.containers.length - 1; n >= 0; n--)
  2133. if (!t.contains(this.currentItem[0], this.containers[n].element[0]))
  2134. if (this._intersectsWith(this.containers[n].containerCache)) {
  2135. if (f && t.contains(this.containers[n].element[0], f.element[0])) continue;
  2136. f = this.containers[n], g = n
  2137. } else this.containers[n].containerCache.over && (this.containers[n]._trigger("out", s,
  2138. this._uiHash(this)), this.containers[n].containerCache.over = 0);
  2139. if (f)
  2140. if (1 === this.containers.length) this.containers[g].containerCache.over || (this.containers[
  2141. g]._trigger("over", s, this._uiHash(this)), this.containers[g].containerCache.over =
  2142. 1);
  2143. else {
  2144. for (a = 1e4, r = null, p = f.floating || i(this.currentItem), h = p ? "left" : "top",
  2145. l = p ? "width" : "height", c = this.positionAbs[h] + this.offset.click[h], o =
  2146. this.items.length - 1; o >= 0; o--) t.contains(this.containers[g].element[0], this.items[
  2147. o].item[0]) && this.items[o].item[0] !== this.currentItem[0] && (!p || e(this.positionAbs
  2148. .top + this.offset.click.top, this.items[o].top, this.items[o].height)) && (u =
  2149. this.items[o].item.offset()[h], d = !1, Math.abs(u - c) > Math.abs(u + this.items[
  2150. o][l] - c) && (d = !0, u += this.items[o][l]), a > Math.abs(u - c) && (a =
  2151. Math.abs(u - c), r = this.items[o], this.direction = d ? "up" : "down"));
  2152. if (!r && !this.options.dropOnEmpty) return;
  2153. if (this.currentContainer === this.containers[g]) return;
  2154. r ? this._rearrange(s, r, null, !0) : this._rearrange(s, null, this.containers[g].element,
  2155. !0), this._trigger("change", s, this._uiHash()), this.containers[g]._trigger(
  2156. "change", s, this._uiHash(this)), this.currentContainer = this.containers[g],
  2157. this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[
  2158. g]._trigger("over", s, this._uiHash(this)), this.containers[g].containerCache.over =
  2159. 1
  2160. }
  2161. },
  2162. _createHelper: function (e) {
  2163. var i = this.options,
  2164. s = t.isFunction(i.helper) ? t(i.helper.apply(this.element[0], [e, this.currentItem])) :
  2165. "clone" === i.helper ? this.currentItem.clone() : this.currentItem;
  2166. return s.parents("body").length || t("parent" !== i.appendTo ? i.appendTo : this.currentItem[0]
  2167. .parentNode)[0].appendChild(s[0]), s[0] === this.currentItem[0] && (this._storedCSS = {
  2168. width: this.currentItem[0].style.width,
  2169. height: this.currentItem[0].style.height,
  2170. position: this.currentItem.css("position"),
  2171. top: this.currentItem.css("top"),
  2172. left: this.currentItem.css("left")
  2173. }), (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()), (!s[0].style
  2174. .height || i.forceHelperSize) && s.height(this.currentItem.height()), s
  2175. },
  2176. _adjustOffsetFromHelper: function (e) {
  2177. "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = {
  2178. left: +e[0],
  2179. top: +e[1] || 0
  2180. }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (
  2181. this.offset.click.left = this.helperProportions.width - e.right + this.margins.left),
  2182. "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset
  2183. .click.top = this.helperProportions.height - e.bottom + this.margins.top)
  2184. },
  2185. _getParentOffset: function () {
  2186. this.offsetParent = this.helper.offsetParent();
  2187. var e = this.offsetParent.offset();
  2188. return "absolute" === this.cssPosition && this.scrollParent[0] !== document && t.contains(this.scrollParent[
  2189. 0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent
  2190. .scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName &&
  2191. "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = {
  2192. top: 0,
  2193. left: 0
  2194. }), {
  2195. top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  2196. left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  2197. }
  2198. },
  2199. _getRelativeOffset: function () {
  2200. if ("relative" === this.cssPosition) {
  2201. var t = this.currentItem.position();
  2202. return {
  2203. top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
  2204. left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
  2205. }
  2206. }
  2207. return {
  2208. top: 0,
  2209. left: 0
  2210. }
  2211. },
  2212. _cacheMargins: function () {
  2213. this.margins = {
  2214. left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
  2215. top: parseInt(this.currentItem.css("marginTop"), 10) || 0
  2216. }
  2217. },
  2218. _cacheHelperProportions: function () {
  2219. this.helperProportions = {
  2220. width: this.helper.outerWidth(),
  2221. height: this.helper.outerHeight()
  2222. }
  2223. },
  2224. _setContainment: function () {
  2225. var e, i, s, n = this.options;
  2226. "parent" === n.containment && (n.containment = this.helper[0].parentNode), ("document" === n.containment ||
  2227. "window" === n.containment) && (this.containment = [0 - this.offset.relative.left -
  2228. this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, t(
  2229. "document" === n.containment ? document : window).width() - this.helperProportions
  2230. .width - this.margins.left, (t("document" === n.containment ? document : window).height() ||
  2231. document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins
  2232. .top]), /^(document|window|parent)$/.test(n.containment) || (e = t(n.containment)[0], i =
  2233. t(n.containment).offset(), s = "hidden" !== t(e).css("overflow"), this.containment = [i
  2234. .left + (parseInt(t(e).css("borderLeftWidth"), 10) || 0) + (parseInt(t(e).css(
  2235. "paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(t(e).css(
  2236. "borderTopWidth"), 10) || 0) + (parseInt(t(e).css("paddingTop"), 10) || 0) -
  2237. this.margins.top, i.left + (s ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) -
  2238. (parseInt(t(e).css("borderLeftWidth"), 10) || 0) - (parseInt(t(e).css(
  2239. "paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left,
  2240. i.top + (s ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(
  2241. t(e).css("borderTopWidth"), 10) || 0) - (parseInt(t(e).css("paddingBottom"), 10) ||
  2242. 0) - this.helperProportions.height - this.margins.top])
  2243. },
  2244. _convertPositionTo: function (e, i) {
  2245. i || (i = this.position);
  2246. var s = "absolute" === e ? 1 : -1,
  2247. n = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this
  2248. .scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
  2249. o = /(html|body)/i.test(n[0].tagName);
  2250. return {
  2251. top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ?
  2252. -this.scrollParent.scrollTop() : o ? 0 : n.scrollTop()) * s,
  2253. left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" ===
  2254. this.cssPosition ? -this.scrollParent.scrollLeft() : o ? 0 : n.scrollLeft()) * s
  2255. }
  2256. },
  2257. _generatePosition: function (e) {
  2258. var i, s, n = this.options,
  2259. o = e.pageX,
  2260. a = e.pageY,
  2261. r = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this
  2262. .scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
  2263. h = /(html|body)/i.test(r[0].tagName);
  2264. return "relative" !== this.cssPosition || this.scrollParent[0] !== document && this.scrollParent[
  2265. 0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this
  2266. .originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[
  2267. 0] && (o = this.containment[0] + this.offset.click.left), e.pageY - this.offset
  2268. .click.top < this.containment[1] && (a = this.containment[1] + this.offset.click.top),
  2269. e.pageX - this.offset.click.left > this.containment[2] && (o = this.containment[2] +
  2270. this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] &&
  2271. (a = this.containment[3] + this.offset.click.top)), n.grid && (i = this.originalPageY +
  2272. Math.round((a - this.originalPageY) / n.grid[1]) * n.grid[1], a = this.containment ?
  2273. i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <=
  2274. this.containment[3] ? i : i - this.offset.click.top >= this.containment[1] ? i - n.grid[
  2275. 1] : i + n.grid[1] : i, s = this.originalPageX + Math.round((o - this.originalPageX) /
  2276. n.grid[0]) * n.grid[0], o = this.containment ? s - this.offset.click.left >=
  2277. this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s : s -
  2278. this.offset.click.left >= this.containment[0] ? s - n.grid[0] : s + n.grid[0] : s)), {
  2279. top: a - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (
  2280. "fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : h ? 0 : r.scrollTop()
  2281. ),
  2282. left: o - this.offset.click.left - this.offset.relative.left - this.offset.parent.left +
  2283. ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : h ? 0 : r.scrollLeft())
  2284. }
  2285. },
  2286. _rearrange: function (t, e, i, s) {
  2287. i ? i[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[
  2288. 0], "down" === this.direction ? e.item[0] : e.item[0].nextSibling), this.counter = this
  2289. .counter ? ++this.counter : 1;
  2290. var n = this.counter;
  2291. this._delay(function () {
  2292. n === this.counter && this.refreshPositions(!s)
  2293. })
  2294. },
  2295. _clear: function (t, e) {
  2296. this.reverting = !1;
  2297. var i, s = [];
  2298. if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem),
  2299. this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {
  2300. for (i in this._storedCSS)("auto" === this._storedCSS[i] || "static" === this._storedCSS[i]) &&
  2301. (this._storedCSS[i] = "");
  2302. this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
  2303. } else this.currentItem.show();
  2304. for (this.fromOutside && !e && s.push(function (t) {
  2305. this._trigger("receive", t, this._uiHash(this.fromOutside))
  2306. }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(
  2307. ".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] ||
  2308. e || s.push(function (t) {
  2309. this._trigger("update", t, this._uiHash())
  2310. }), this !== this.currentContainer && (e || (s.push(function (t) {
  2311. this._trigger("remove", t, this._uiHash())
  2312. }), s.push(function (t) {
  2313. return function (e) {
  2314. t._trigger("receive", e, this._uiHash(this))
  2315. }
  2316. }.call(this, this.currentContainer)), s.push(function (t) {
  2317. return function (e) {
  2318. t._trigger("update", e, this._uiHash(this))
  2319. }
  2320. }.call(this, this.currentContainer)))), i = this.containers.length - 1; i >= 0; i--) e || s
  2321. .push(function (t) {
  2322. return function (e) {
  2323. t._trigger("deactivate", e, this._uiHash(this))
  2324. }
  2325. }.call(this, this.containers[i])), this.containers[i].containerCache.over && (s.push(
  2326. function (t) {
  2327. return function (e) {
  2328. t._trigger("out", e, this._uiHash(this))
  2329. }
  2330. }.call(this, this.containers[i])), this.containers[i].containerCache.over = 0);
  2331. if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet
  2332. .remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity),
  2333. this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex),
  2334. this.dragging = !1, this.cancelHelperRemoval) {
  2335. if (!e) {
  2336. for (this._trigger("beforeStop", t, this._uiHash()), i = 0; s.length > i; i++) s[i].call(
  2337. this, t);
  2338. this._trigger("stop", t, this._uiHash())
  2339. }
  2340. return this.fromOutside = !1, !1
  2341. }
  2342. if (e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(
  2343. this.placeholder[0]), this.helper[0] !== this.currentItem[0] && this.helper.remove(),
  2344. this.helper = null, !e) {
  2345. for (i = 0; s.length > i; i++) s[i].call(this, t);
  2346. this._trigger("stop", t, this._uiHash())
  2347. }
  2348. return this.fromOutside = !1, !0
  2349. },
  2350. _trigger: function () {
  2351. t.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
  2352. },
  2353. _uiHash: function (e) {
  2354. var i = e || this;
  2355. return {
  2356. helper: i.helper,
  2357. placeholder: i.placeholder || t([]),
  2358. position: i.position,
  2359. originalPosition: i.originalPosition,
  2360. offset: i.positionAbs,
  2361. item: i.currentItem,
  2362. sender: e ? e.element : null
  2363. }
  2364. }
  2365. })
  2366. }(jQuery),
  2367. function (t, e) {
  2368. var i = "ui-effects-";
  2369. t.effects = {
  2370. effect: {}
  2371. },
  2372. function (t, e) {
  2373. function i(t, e, i) {
  2374. var s = u[e.type] || {};
  2375. return null == t ? i || !e.def ? null : e.def : (t = s.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def :
  2376. s.mod ? (t + s.mod) % s.mod : 0 > t ? 0 : t > s.max ? s.max : t)
  2377. }
  2378. function s(i) {
  2379. var s = l(),
  2380. n = s._rgba = [];
  2381. return i = i.toLowerCase(), f(h, function (t, o) {
  2382. var a, r = o.re.exec(i),
  2383. h = r && o.parse(r),
  2384. l = o.space || "rgba";
  2385. return h ? (a = s[l](h), s[c[l].cache] = a[c[l].cache], n = s._rgba = a._rgba, !1) : e
  2386. }), n.length ? ("0,0,0,0" === n.join() && t.extend(n, o.transparent), s) : o[i]
  2387. }
  2388. function n(t, e, i) {
  2389. return i = (i + 1) % 1, 1 > 6 * i ? t + 6 * (e - t) * i : 1 > 2 * i ? e : 2 > 3 * i ? t + 6 * (e - t) *
  2390. (2 / 3 - i) : t
  2391. }
  2392. var o, a =
  2393. "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
  2394. r = /^([\-+])=\s*(\d+\.?\d*)/,
  2395. h = [{
  2396. re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  2397. parse: function (t) {
  2398. return [t[1], t[2], t[3], t[4]]
  2399. }
  2400. }, {
  2401. re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  2402. parse: function (t) {
  2403. return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]]
  2404. }
  2405. }, {
  2406. re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
  2407. parse: function (t) {
  2408. return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)]
  2409. }
  2410. }, {
  2411. re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
  2412. parse: function (t) {
  2413. return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)]
  2414. }
  2415. }, {
  2416. re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  2417. space: "hsla",
  2418. parse: function (t) {
  2419. return [t[1], t[2] / 100, t[3] / 100, t[4]]
  2420. }
  2421. }],
  2422. l = t.Color = function (e, i, s, n) {
  2423. return new t.Color.fn.parse(e, i, s, n)
  2424. },
  2425. c = {
  2426. rgba: {
  2427. props: {
  2428. red: {
  2429. idx: 0,
  2430. type: "byte"
  2431. },
  2432. green: {
  2433. idx: 1,
  2434. type: "byte"
  2435. },
  2436. blue: {
  2437. idx: 2,
  2438. type: "byte"
  2439. }
  2440. }
  2441. },
  2442. hsla: {
  2443. props: {
  2444. hue: {
  2445. idx: 0,
  2446. type: "degrees"
  2447. },
  2448. saturation: {
  2449. idx: 1,
  2450. type: "percent"
  2451. },
  2452. lightness: {
  2453. idx: 2,
  2454. type: "percent"
  2455. }
  2456. }
  2457. }
  2458. },
  2459. u = {
  2460. "byte": {
  2461. floor: !0,
  2462. max: 255
  2463. },
  2464. percent: {
  2465. max: 1
  2466. },
  2467. degrees: {
  2468. mod: 360,
  2469. floor: !0
  2470. }
  2471. },
  2472. d = l.support = {},
  2473. p = t("<p>")[0],
  2474. f = t.each;
  2475. p.style.cssText = "background-color:rgba(1,1,1,.5)", d.rgba = p.style.backgroundColor.indexOf("rgba") > -1,
  2476. f(c, function (t, e) {
  2477. e.cache = "_" + t, e.props.alpha = {
  2478. idx: 3,
  2479. type: "percent",
  2480. def: 1
  2481. }
  2482. }), l.fn = t.extend(l.prototype, {
  2483. parse: function (n, a, r, h) {
  2484. if (n === e) return this._rgba = [null, null, null, null], this;
  2485. (n.jquery || n.nodeType) && (n = t(n).css(a), a = e);
  2486. var u = this,
  2487. d = t.type(n),
  2488. p = this._rgba = [];
  2489. return a !== e && (n = [n, a, r, h], d = "array"), "string" === d ? this.parse(s(n) ||
  2490. o._default) : "array" === d ? (f(c.rgba.props, function (t, e) {
  2491. p[e.idx] = i(n[e.idx], e)
  2492. }), this) : "object" === d ? (n instanceof l ? f(c, function (t, e) {
  2493. n[e.cache] && (u[e.cache] = n[e.cache].slice())
  2494. }) : f(c, function (e, s) {
  2495. var o = s.cache;
  2496. f(s.props, function (t, e) {
  2497. if (!u[o] && s.to) {
  2498. if ("alpha" === t || null == n[t]) return;
  2499. u[o] = s.to(u._rgba)
  2500. }
  2501. u[o][e.idx] = i(n[t], e, !0)
  2502. }), u[o] && 0 > t.inArray(null, u[o].slice(0, 3)) && (u[o][3] = 1,
  2503. s.from && (u._rgba = s.from(u[o])))
  2504. }), this) : e
  2505. },
  2506. is: function (t) {
  2507. var i = l(t),
  2508. s = !0,
  2509. n = this;
  2510. return f(c, function (t, o) {
  2511. var a, r = i[o.cache];
  2512. return r && (a = n[o.cache] || o.to && o.to(n._rgba) || [], f(o.props,
  2513. function (t, i) {
  2514. return null != r[i.idx] ? s = r[i.idx] === a[i.idx] : e
  2515. })), s
  2516. }), s
  2517. },
  2518. _space: function () {
  2519. var t = [],
  2520. e = this;
  2521. return f(c, function (i, s) {
  2522. e[s.cache] && t.push(i)
  2523. }), t.pop()
  2524. },
  2525. transition: function (t, e) {
  2526. var s = l(t),
  2527. n = s._space(),
  2528. o = c[n],
  2529. a = 0 === this.alpha() ? l("transparent") : this,
  2530. r = a[o.cache] || o.to(a._rgba),
  2531. h = r.slice();
  2532. return s = s[o.cache], f(o.props, function (t, n) {
  2533. var o = n.idx,
  2534. a = r[o],
  2535. l = s[o],
  2536. c = u[n.type] || {};
  2537. null !== l && (null === a ? h[o] = l : (c.mod && (l - a > c.mod / 2 ? a +=
  2538. c.mod : a - l > c.mod / 2 && (a -= c.mod)), h[o] = i((l - a) *
  2539. e + a, n)))
  2540. }), this[n](h)
  2541. },
  2542. blend: function (e) {
  2543. if (1 === this._rgba[3]) return this;
  2544. var i = this._rgba.slice(),
  2545. s = i.pop(),
  2546. n = l(e)._rgba;
  2547. return l(t.map(i, function (t, e) {
  2548. return (1 - s) * n[e] + s * t
  2549. }))
  2550. },
  2551. toRgbaString: function () {
  2552. var e = "rgba(",
  2553. i = t.map(this._rgba, function (t, e) {
  2554. return null == t ? e > 2 ? 1 : 0 : t
  2555. });
  2556. return 1 === i[3] && (i.pop(), e = "rgb("), e + i.join() + ")"
  2557. },
  2558. toHslaString: function () {
  2559. var e = "hsla(",
  2560. i = t.map(this.hsla(), function (t, e) {
  2561. return null == t && (t = e > 2 ? 1 : 0), e && 3 > e && (t = Math.round(100 *
  2562. t) + "%"), t
  2563. });
  2564. return 1 === i[3] && (i.pop(), e = "hsl("), e + i.join() + ")"
  2565. },
  2566. toHexString: function (e) {
  2567. var i = this._rgba.slice(),
  2568. s = i.pop();
  2569. return e && i.push(~~(255 * s)), "#" + t.map(i, function (t) {
  2570. return t = (t || 0).toString(16), 1 === t.length ? "0" + t : t
  2571. }).join("")
  2572. },
  2573. toString: function () {
  2574. return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
  2575. }
  2576. }), l.fn.parse.prototype = l.fn, c.hsla.to = function (t) {
  2577. if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
  2578. var e, i, s = t[0] / 255,
  2579. n = t[1] / 255,
  2580. o = t[2] / 255,
  2581. a = t[3],
  2582. r = Math.max(s, n, o),
  2583. h = Math.min(s, n, o),
  2584. l = r - h,
  2585. c = r + h,
  2586. u = .5 * c;
  2587. return e = h === r ? 0 : s === r ? 60 * (n - o) / l + 360 : n === r ? 60 * (o - s) / l + 120 : 60 *
  2588. (s - n) / l + 240, i = 0 === l ? 0 : .5 >= u ? l / c : l / (2 - c), [Math.round(e) % 360, i, u,
  2589. null == a ? 1 : a]
  2590. }, c.hsla.from = function (t) {
  2591. if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
  2592. var e = t[0] / 360,
  2593. i = t[1],
  2594. s = t[2],
  2595. o = t[3],
  2596. a = .5 >= s ? s * (1 + i) : s + i - s * i,
  2597. r = 2 * s - a;
  2598. return [Math.round(255 * n(r, a, e + 1 / 3)), Math.round(255 * n(r, a, e)), Math.round(255 * n(r, a,
  2599. e - 1 / 3)), o]
  2600. }, f(c, function (s, n) {
  2601. var o = n.props,
  2602. a = n.cache,
  2603. h = n.to,
  2604. c = n.from;
  2605. l.fn[s] = function (s) {
  2606. if (h && !this[a] && (this[a] = h(this._rgba)), s === e) return this[a].slice();
  2607. var n, r = t.type(s),
  2608. u = "array" === r || "object" === r ? s : arguments,
  2609. d = this[a].slice();
  2610. return f(o, function (t, e) {
  2611. var s = u["object" === r ? t : e.idx];
  2612. null == s && (s = d[e.idx]), d[e.idx] = i(s, e)
  2613. }), c ? (n = l(c(d)), n[a] = d, n) : l(d)
  2614. }, f(o, function (e, i) {
  2615. l.fn[e] || (l.fn[e] = function (n) {
  2616. var o, a = t.type(n),
  2617. h = "alpha" === e ? this._hsla ? "hsla" : "rgba" : s,
  2618. l = this[h](),
  2619. c = l[i.idx];
  2620. return "undefined" === a ? c : ("function" === a && (n = n.call(this, c),
  2621. a = t.type(n)), null == n && i.empty ? this : ("string" ===
  2622. a && (o = r.exec(n), o && (n = c + parseFloat(o[2]) * ("+" ===
  2623. o[1] ? 1 : -1))), l[i.idx] = n, this[h](l)))
  2624. })
  2625. })
  2626. }), l.hook = function (e) {
  2627. var i = e.split(" ");
  2628. f(i, function (e, i) {
  2629. t.cssHooks[i] = {
  2630. set: function (e, n) {
  2631. var o, a, r = "";
  2632. if ("transparent" !== n && ("string" !== t.type(n) || (o = s(n)))) {
  2633. if (n = l(o || n), !d.rgba && 1 !== n._rgba[3]) {
  2634. for (a = "backgroundColor" === i ? e.parentNode : e;
  2635. ("" === r || "transparent" === r) && a && a.style;) try {
  2636. r = t.css(a, "backgroundColor"), a = a.parentNode
  2637. } catch (h) {}
  2638. n = n.blend(r && "transparent" !== r ? r : "_default")
  2639. }
  2640. n = n.toRgbaString()
  2641. }
  2642. try {
  2643. e.style[i] = n
  2644. } catch (h) {}
  2645. }
  2646. }, t.fx.step[i] = function (e) {
  2647. e.colorInit || (e.start = l(e.elem, i), e.end = l(e.end), e.colorInit = !0), t.cssHooks[
  2648. i].set(e.elem, e.start.transition(e.end, e.pos))
  2649. }
  2650. })
  2651. }, l.hook(a), t.cssHooks.borderColor = {
  2652. expand: function (t) {
  2653. var e = {};
  2654. return f(["Top", "Right", "Bottom", "Left"], function (i, s) {
  2655. e["border" + s + "Color"] = t
  2656. }), e
  2657. }
  2658. }, o = t.Color.names = {
  2659. aqua: "#00ffff",
  2660. black: "#000000",
  2661. blue: "#0000ff",
  2662. fuchsia: "#ff00ff",
  2663. gray: "#808080",
  2664. green: "#008000",
  2665. lime: "#00ff00",
  2666. maroon: "#800000",
  2667. navy: "#000080",
  2668. olive: "#808000",
  2669. purple: "#800080",
  2670. red: "#ff0000",
  2671. silver: "#c0c0c0",
  2672. teal: "#008080",
  2673. white: "#ffffff",
  2674. yellow: "#ffff00",
  2675. transparent: [null, null, null, 0],
  2676. _default: "#ffffff"
  2677. }
  2678. }(jQuery),
  2679. function () {
  2680. function i(e) {
  2681. var i, s, n = e.ownerDocument.defaultView ? e.ownerDocument.defaultView.getComputedStyle(e, null) : e.currentStyle,
  2682. o = {};
  2683. if (n && n.length && n[0] && n[n[0]])
  2684. for (s = n.length; s--;) i = n[s], "string" == typeof n[i] && (o[t.camelCase(i)] = n[i]);
  2685. else
  2686. for (i in n) "string" == typeof n[i] && (o[i] = n[i]);
  2687. return o
  2688. }
  2689. function s(e, i) {
  2690. var s, n, a = {};
  2691. for (s in i) n = i[s], e[s] !== n && (o[s] || (t.fx.step[s] || !isNaN(parseFloat(n))) && (a[s] = n));
  2692. return a
  2693. }
  2694. var n = ["add", "remove", "toggle"],
  2695. o = {
  2696. border: 1,
  2697. borderBottom: 1,
  2698. borderColor: 1,
  2699. borderLeft: 1,
  2700. borderRight: 1,
  2701. borderTop: 1,
  2702. borderWidth: 1,
  2703. margin: 1,
  2704. padding: 1
  2705. };
  2706. t.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (e, i) {
  2707. t.fx.step[i] = function (t) {
  2708. ("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (jQuery.style(t.elem,
  2709. i, t.end), t.setAttr = !0)
  2710. }
  2711. }), t.fn.addBack || (t.fn.addBack = function (t) {
  2712. return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
  2713. }), t.effects.animateClass = function (e, o, a, r) {
  2714. var h = t.speed(o, a, r);
  2715. return this.queue(function () {
  2716. var o, a = t(this),
  2717. r = a.attr("class") || "",
  2718. l = h.children ? a.find("*").addBack() : a;
  2719. l = l.map(function () {
  2720. var e = t(this);
  2721. return {
  2722. el: e,
  2723. start: i(this)
  2724. }
  2725. }), o = function () {
  2726. t.each(n, function (t, i) {
  2727. e[i] && a[i + "Class"](e[i])
  2728. })
  2729. }, o(), l = l.map(function () {
  2730. return this.end = i(this.el[0]), this.diff = s(this.start, this.end), this
  2731. }), a.attr("class", r), l = l.map(function () {
  2732. var e = this,
  2733. i = t.Deferred(),
  2734. s = t.extend({}, h, {
  2735. queue: !1,
  2736. complete: function () {
  2737. i.resolve(e)
  2738. }
  2739. });
  2740. return this.el.animate(this.diff, s), i.promise()
  2741. }), t.when.apply(t, l.get()).done(function () {
  2742. o(), t.each(arguments, function () {
  2743. var e = this.el;
  2744. t.each(this.diff, function (t) {
  2745. e.css(t, "")
  2746. })
  2747. }), h.complete.call(a[0])
  2748. })
  2749. })
  2750. }, t.fn.extend({
  2751. addClass: function (e) {
  2752. return function (i, s, n, o) {
  2753. return s ? t.effects.animateClass.call(this, {
  2754. add: i
  2755. }, s, n, o) : e.apply(this, arguments)
  2756. }
  2757. }(t.fn.addClass),
  2758. removeClass: function (e) {
  2759. return function (i, s, n, o) {
  2760. return arguments.length > 1 ? t.effects.animateClass.call(this, {
  2761. remove: i
  2762. }, s, n, o) : e.apply(this, arguments)
  2763. }
  2764. }(t.fn.removeClass),
  2765. toggleClass: function (i) {
  2766. return function (s, n, o, a, r) {
  2767. return "boolean" == typeof n || n === e ? o ? t.effects.animateClass.call(this,
  2768. n ? {
  2769. add: s
  2770. } : {
  2771. remove: s
  2772. }, o, a, r) : i.apply(this, arguments) : t.effects.animateClass.call(
  2773. this, {
  2774. toggle: s
  2775. }, n, o, a)
  2776. }
  2777. }(t.fn.toggleClass),
  2778. switchClass: function (e, i, s, n, o) {
  2779. return t.effects.animateClass.call(this, {
  2780. add: i,
  2781. remove: e
  2782. }, s, n, o)
  2783. }
  2784. })
  2785. }(),
  2786. function () {
  2787. function s(e, i, s, n) {
  2788. return t.isPlainObject(e) && (i = e, e = e.effect), e = {
  2789. effect: e
  2790. }, null == i && (i = {}), t.isFunction(i) && (n = i, s = null, i = {}), ("number" == typeof i || t.fx
  2791. .speeds[i]) && (n = s, s = i, i = {}), t.isFunction(s) && (n = s, s = null), i && t.extend(e, i),
  2792. s = s || i.duration, e.duration = t.fx.off ? 0 : "number" == typeof s ? s : s in t.fx.speeds ? t.fx
  2793. .speeds[s] : t.fx.speeds._default, e.complete = n || i.complete, e
  2794. }
  2795. function n(e) {
  2796. return !e || "number" == typeof e || t.fx.speeds[e] ? !0 : "string" != typeof e || t.effects.effect[e] ?
  2797. t.isFunction(e) ? !0 : "object" != typeof e || e.effect ? !1 : !0 : !0
  2798. }
  2799. t.extend(t.effects, {
  2800. version: "1.10.3",
  2801. save: function (t, e) {
  2802. for (var s = 0; e.length > s; s++) null !== e[s] && t.data(i + e[s], t[0].style[e[s]])
  2803. },
  2804. restore: function (t, s) {
  2805. var n, o;
  2806. for (o = 0; s.length > o; o++) null !== s[o] && (n = t.data(i + s[o]), n === e && (n =
  2807. ""), t.css(s[o], n))
  2808. },
  2809. setMode: function (t, e) {
  2810. return "toggle" === e && (e = t.is(":hidden") ? "show" : "hide"), e
  2811. },
  2812. getBaseline: function (t, e) {
  2813. var i, s;
  2814. switch (t[0]) {
  2815. case "top":
  2816. i = 0;
  2817. break;
  2818. case "middle":
  2819. i = .5;
  2820. break;
  2821. case "bottom":
  2822. i = 1;
  2823. break;
  2824. default:
  2825. i = t[0] / e.height
  2826. }
  2827. switch (t[1]) {
  2828. case "left":
  2829. s = 0;
  2830. break;
  2831. case "center":
  2832. s = .5;
  2833. break;
  2834. case "right":
  2835. s = 1;
  2836. break;
  2837. default:
  2838. s = t[1] / e.width
  2839. }
  2840. return {
  2841. x: s,
  2842. y: i
  2843. }
  2844. },
  2845. createWrapper: function (e) {
  2846. if (e.parent().is(".ui-effects-wrapper")) return e.parent();
  2847. var i = {
  2848. width: e.outerWidth(!0),
  2849. height: e.outerHeight(!0),
  2850. "float": e.css("float")
  2851. },
  2852. s = t("<div></div>").addClass("ui-effects-wrapper").css({
  2853. fontSize: "100%",
  2854. background: "transparent",
  2855. border: "none",
  2856. margin: 0,
  2857. padding: 0
  2858. }),
  2859. n = {
  2860. width: e.width(),
  2861. height: e.height()
  2862. },
  2863. o = document.activeElement;
  2864. try {
  2865. o.id
  2866. } catch (a) {
  2867. o = document.body
  2868. }
  2869. return e.wrap(s), (e[0] === o || t.contains(e[0], o)) && t(o).focus(), s = e.parent(),
  2870. "static" === e.css("position") ? (s.css({
  2871. position: "relative"
  2872. }), e.css({
  2873. position: "relative"
  2874. })) : (t.extend(i, {
  2875. position: e.css("position"),
  2876. zIndex: e.css("z-index")
  2877. }), t.each(["top", "left", "bottom", "right"], function (t, s) {
  2878. i[s] = e.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto")
  2879. }), e.css({
  2880. position: "relative",
  2881. top: 0,
  2882. left: 0,
  2883. right: "auto",
  2884. bottom: "auto"
  2885. })), e.css(n), s.css(i).show()
  2886. },
  2887. removeWrapper: function (e) {
  2888. var i = document.activeElement;
  2889. return e.parent().is(".ui-effects-wrapper") && (e.parent().replaceWith(e), (e[0] === i ||
  2890. t.contains(e[0], i)) && t(i).focus()), e
  2891. },
  2892. setTransition: function (e, i, s, n) {
  2893. return n = n || {}, t.each(i, function (t, i) {
  2894. var o = e.cssUnit(i);
  2895. o[0] > 0 && (n[i] = o[0] * s + o[1])
  2896. }), n
  2897. }
  2898. }), t.fn.extend({
  2899. effect: function () {
  2900. function e(e) {
  2901. function s() {
  2902. t.isFunction(o) && o.call(n[0]), t.isFunction(e) && e()
  2903. }
  2904. var n = t(this),
  2905. o = i.complete,
  2906. r = i.mode;
  2907. (n.is(":hidden") ? "hide" === r : "show" === r) ? (n[r](), s()) : a.call(n[0], i, s)
  2908. }
  2909. var i = s.apply(this, arguments),
  2910. n = i.mode,
  2911. o = i.queue,
  2912. a = t.effects.effect[i.effect];
  2913. return t.fx.off || !a ? n ? this[n](i.duration, i.complete) : this.each(function () {
  2914. i.complete && i.complete.call(this)
  2915. }) : o === !1 ? this.each(e) : this.queue(o || "fx", e)
  2916. },
  2917. show: function (t) {
  2918. return function (e) {
  2919. if (n(e)) return t.apply(this, arguments);
  2920. var i = s.apply(this, arguments);
  2921. return i.mode = "show", this.effect.call(this, i)
  2922. }
  2923. }(t.fn.show),
  2924. hide: function (t) {
  2925. return function (e) {
  2926. if (n(e)) return t.apply(this, arguments);
  2927. var i = s.apply(this, arguments);
  2928. return i.mode = "hide", this.effect.call(this, i)
  2929. }
  2930. }(t.fn.hide),
  2931. toggle: function (t) {
  2932. return function (e) {
  2933. if (n(e) || "boolean" == typeof e) return t.apply(this, arguments);
  2934. var i = s.apply(this, arguments);
  2935. return i.mode = "toggle", this.effect.call(this, i)
  2936. }
  2937. }(t.fn.toggle),
  2938. cssUnit: function (e) {
  2939. var i = this.css(e),
  2940. s = [];
  2941. return t.each(["em", "px", "%", "pt"], function (t, e) {
  2942. i.indexOf(e) > 0 && (s = [parseFloat(i), e])
  2943. }), s
  2944. }
  2945. })
  2946. }(),
  2947. function () {
  2948. var e = {};
  2949. t.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (t, i) {
  2950. e[i] = function (e) {
  2951. return Math.pow(e, t + 2)
  2952. }
  2953. }), t.extend(e, {
  2954. Sine: function (t) {
  2955. return 1 - Math.cos(t * Math.PI / 2)
  2956. },
  2957. Circ: function (t) {
  2958. return 1 - Math.sqrt(1 - t * t)
  2959. },
  2960. Elastic: function (t) {
  2961. return 0 === t || 1 === t ? t : -Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) -
  2962. 7.5) * Math.PI / 15)
  2963. },
  2964. Back: function (t) {
  2965. return t * t * (3 * t - 2)
  2966. },
  2967. Bounce: function (t) {
  2968. for (var e, i = 4;
  2969. ((e = Math.pow(2, --i)) - 1) / 11 > t;);
  2970. return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
  2971. }
  2972. }), t.each(e, function (e, i) {
  2973. t.easing["easeIn" + e] = i, t.easing["easeOut" + e] = function (t) {
  2974. return 1 - i(1 - t)
  2975. }, t.easing["easeInOut" + e] = function (t) {
  2976. return .5 > t ? i(2 * t) / 2 : 1 - i(-2 * t + 2) / 2
  2977. }
  2978. })
  2979. }()
  2980. }(jQuery),
  2981. function (t) {
  2982. var e = 0,
  2983. i = {},
  2984. s = {};
  2985. i.height = i.paddingTop = i.paddingBottom = i.borderTopWidth = i.borderBottomWidth = "hide", s.height = s.paddingTop =
  2986. s.paddingBottom = s.borderTopWidth = s.borderBottomWidth = "show", t.widget("ui.accordion", {
  2987. version: "1.10.3",
  2988. options: {
  2989. active: 0,
  2990. animate: {},
  2991. collapsible: !1,
  2992. event: "click",
  2993. header: "> li > :first-child,> :not(li):even",
  2994. heightStyle: "auto",
  2995. icons: {
  2996. activeHeader: "ui-icon-triangle-1-s",
  2997. header: "ui-icon-triangle-1-e"
  2998. },
  2999. activate: null,
  3000. beforeActivate: null
  3001. },
  3002. _create: function () {
  3003. var e = this.options;
  3004. this.prevShow = this.prevHide = t(), this.element.addClass(
  3005. "ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"), e.collapsible || e.active !==
  3006. !1 && null != e.active || (e.active = 0), this._processPanels(), 0 > e.active && (e.active +=
  3007. this.headers.length), this._refresh()
  3008. },
  3009. _getCreateEventData: function () {
  3010. return {
  3011. header: this.active,
  3012. panel: this.active.length ? this.active.next() : t(),
  3013. content: this.active.length ? this.active.next() : t()
  3014. }
  3015. },
  3016. _createIcons: function () {
  3017. var e = this.options.icons;
  3018. e && (t("<span>").addClass("ui-accordion-header-icon ui-icon " + e.header).prependTo(this.headers),
  3019. this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),
  3020. this.headers.addClass("ui-accordion-icons"))
  3021. },
  3022. _destroyIcons: function () {
  3023. this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()
  3024. },
  3025. _destroy: function () {
  3026. var t;
  3027. this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"), this.headers
  3028. .removeClass(
  3029. "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top"
  3030. ).removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr(
  3031. "tabIndex").each(function () {
  3032. /^ui-accordion/.test(this.id) && this.removeAttribute("id")
  3033. }), this._destroyIcons(), t = this.headers.next().css("display", "").removeAttr("role").removeAttr(
  3034. "aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass(
  3035. "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled"
  3036. ).each(function () {
  3037. /^ui-accordion/.test(this.id) && this.removeAttribute("id")
  3038. }), "content" !== this.options.heightStyle && t.css("height", "")
  3039. },
  3040. _setOption: function (t, e) {
  3041. return "active" === t ? (this._activate(e), undefined) : ("event" === t && (this.options.event &&
  3042. this._off(this.headers, this.options.event), this._setupEvents(e)), this._super(t,
  3043. e), "collapsible" !== t || e || this.options.active !== !1 || this._activate(0),
  3044. "icons" === t && (this._destroyIcons(), e && this._createIcons()), "disabled" === t &&
  3045. this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!e), undefined)
  3046. },
  3047. _keydown: function (e) {
  3048. if (!e.altKey && !e.ctrlKey) {
  3049. var i = t.ui.keyCode,
  3050. s = this.headers.length,
  3051. n = this.headers.index(e.target),
  3052. o = !1;
  3053. switch (e.keyCode) {
  3054. case i.RIGHT:
  3055. case i.DOWN:
  3056. o = this.headers[(n + 1) % s];
  3057. break;
  3058. case i.LEFT:
  3059. case i.UP:
  3060. o = this.headers[(n - 1 + s) % s];
  3061. break;
  3062. case i.SPACE:
  3063. case i.ENTER:
  3064. this._eventHandler(e);
  3065. break;
  3066. case i.HOME:
  3067. o = this.headers[0];
  3068. break;
  3069. case i.END:
  3070. o = this.headers[s - 1]
  3071. }
  3072. o && (t(e.target).attr("tabIndex", -1), t(o).attr("tabIndex", 0), o.focus(), e.preventDefault())
  3073. }
  3074. },
  3075. _panelKeyDown: function (e) {
  3076. e.keyCode === t.ui.keyCode.UP && e.ctrlKey && t(e.currentTarget).prev().focus()
  3077. },
  3078. refresh: function () {
  3079. var e = this.options;
  3080. this._processPanels(), e.active === !1 && e.collapsible === !0 || !this.headers.length ? (e.active = !
  3081. 1, this.active = t()) : e.active === !1 ? this._activate(0) : this.active.length && !t.contains(
  3082. this.element[0], this.active[0]) ? this.headers.length === this.headers.find(
  3083. ".ui-state-disabled").length ? (e.active = !1, this.active = t()) : this._activate(Math
  3084. .max(0, e.active - 1)) : e.active = this.headers.index(this.active), this._destroyIcons(),
  3085. this._refresh()
  3086. },
  3087. _processPanels: function () {
  3088. this.headers = this.element.find(this.options.header).addClass(
  3089. "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"), this.headers.next()
  3090. .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(
  3091. ":not(.ui-accordion-content-active)").hide()
  3092. },
  3093. _refresh: function () {
  3094. var i, s = this.options,
  3095. n = s.heightStyle,
  3096. o = this.element.parent(),
  3097. a = this.accordionId = "ui-accordion-" + (this.element.attr("id") || ++e);
  3098. this.active = this._findActive(s.active).addClass(
  3099. "ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),
  3100. this.active.next().addClass("ui-accordion-content-active").show(), this.headers.attr("role",
  3101. "tab").each(function (e) {
  3102. var i = t(this),
  3103. s = i.attr("id"),
  3104. n = i.next(),
  3105. o = n.attr("id");
  3106. s || (s = a + "-header-" + e, i.attr("id", s)), o || (o = a + "-panel-" + e, n.attr(
  3107. "id", o)), i.attr("aria-controls", o), n.attr("aria-labelledby", s)
  3108. }).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({
  3109. "aria-selected": "false",
  3110. tabIndex: -1
  3111. }).next().attr({
  3112. "aria-expanded": "false",
  3113. "aria-hidden": "true"
  3114. }).hide(), this.active.length ? this.active.attr({
  3115. "aria-selected": "true",
  3116. tabIndex: 0
  3117. }).next().attr({
  3118. "aria-expanded": "true",
  3119. "aria-hidden": "false"
  3120. }) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(s.event),
  3121. "fill" === n ? (i = o.height(), this.element.siblings(":visible").each(function () {
  3122. var e = t(this),
  3123. s = e.css("position");
  3124. "absolute" !== s && "fixed" !== s && (i -= e.outerHeight(!0))
  3125. }), this.headers.each(function () {
  3126. i -= t(this).outerHeight(!0)
  3127. }), this.headers.next().each(function () {
  3128. t(this).height(Math.max(0, i - t(this).innerHeight() + t(this).height()))
  3129. }).css("overflow", "auto")) : "auto" === n && (i = 0, this.headers.next().each(function () {
  3130. i = Math.max(i, t(this).css("height", "").height())
  3131. }).height(i))
  3132. },
  3133. _activate: function (e) {
  3134. var i = this._findActive(e)[0];
  3135. i !== this.active[0] && (i = i || this.active[0], this._eventHandler({
  3136. target: i,
  3137. currentTarget: i,
  3138. preventDefault: t.noop
  3139. }))
  3140. },
  3141. _findActive: function (e) {
  3142. return "number" == typeof e ? this.headers.eq(e) : t()
  3143. },
  3144. _setupEvents: function (e) {
  3145. var i = {
  3146. keydown: "_keydown"
  3147. };
  3148. e && t.each(e.split(" "), function (t, e) {
  3149. i[e] = "_eventHandler"
  3150. }), this._off(this.headers.add(this.headers.next())), this._on(this.headers, i), this._on(
  3151. this.headers.next(), {
  3152. keydown: "_panelKeyDown"
  3153. }), this._hoverable(this.headers), this._focusable(this.headers)
  3154. },
  3155. _eventHandler: function (e) {
  3156. var i = this.options,
  3157. s = this.active,
  3158. n = t(e.currentTarget),
  3159. o = n[0] === s[0],
  3160. a = o && i.collapsible,
  3161. r = a ? t() : n.next(),
  3162. h = s.next(),
  3163. l = {
  3164. oldHeader: s,
  3165. oldPanel: h,
  3166. newHeader: a ? t() : n,
  3167. newPanel: r
  3168. };
  3169. e.preventDefault(), o && !i.collapsible || this._trigger("beforeActivate", e, l) === !1 || (i.active =
  3170. a ? !1 : this.headers.index(n), this.active = o ? t() : n, this._toggle(l), s.removeClass(
  3171. "ui-accordion-header-active ui-state-active"), i.icons && s.children(
  3172. ".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),
  3173. o || (n.removeClass("ui-corner-all").addClass(
  3174. "ui-accordion-header-active ui-state-active ui-corner-top"), i.icons && n.children(
  3175. ".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),
  3176. n.next().addClass("ui-accordion-content-active")))
  3177. },
  3178. _toggle: function (e) {
  3179. var i = e.newPanel,
  3180. s = this.prevShow.length ? this.prevShow : e.oldPanel;
  3181. this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = i, this.prevHide = s, this.options
  3182. .animate ? this._animate(i, s, e) : (s.hide(), i.show(), this._toggleComplete(e)), s.attr({
  3183. "aria-expanded": "false",
  3184. "aria-hidden": "true"
  3185. }), s.prev().attr("aria-selected", "false"), i.length && s.length ? s.prev().attr(
  3186. "tabIndex", -1) : i.length && this.headers.filter(function () {
  3187. return 0 === t(this).attr("tabIndex")
  3188. }).attr("tabIndex", -1), i.attr({
  3189. "aria-expanded": "true",
  3190. "aria-hidden": "false"
  3191. }).prev().attr({
  3192. "aria-selected": "true",
  3193. tabIndex: 0
  3194. })
  3195. },
  3196. _animate: function (t, e, n) {
  3197. var o, a, r, h = this,
  3198. l = 0,
  3199. c = t.length && (!e.length || t.index() < e.index()),
  3200. u = this.options.animate || {},
  3201. d = c && u.down || u,
  3202. p = function () {
  3203. h._toggleComplete(n)
  3204. };
  3205. return "number" == typeof d && (r = d), "string" == typeof d && (a = d), a = a || d.easing || u
  3206. .easing, r = r || d.duration || u.duration, e.length ? t.length ? (o = t.show().outerHeight(),
  3207. e.animate(i, {
  3208. duration: r,
  3209. easing: a,
  3210. step: function (t, e) {
  3211. e.now = Math.round(t)
  3212. }
  3213. }), t.hide().animate(s, {
  3214. duration: r,
  3215. easing: a,
  3216. complete: p,
  3217. step: function (t, i) {
  3218. i.now = Math.round(t), "height" !== i.prop ? l += i.now : "content" !==
  3219. h.options.heightStyle && (i.now = Math.round(o - e.outerHeight() -
  3220. l), l = 0)
  3221. }
  3222. }), undefined) : e.animate(i, r, a, p) : t.animate(s, r, a, p)
  3223. },
  3224. _toggleComplete: function (t) {
  3225. var e = t.oldPanel;
  3226. e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass(
  3227. "ui-corner-all"), e.length && (e.parent()[0].className = e.parent()[0].className), this
  3228. ._trigger("activate", null, t)
  3229. }
  3230. })
  3231. }(jQuery),
  3232. function (t) {
  3233. var e = 0;
  3234. t.widget("ui.autocomplete", {
  3235. version: "1.10.3",
  3236. defaultElement: "<input>",
  3237. options: {
  3238. appendTo: null,
  3239. autoFocus: !1,
  3240. delay: 300,
  3241. minLength: 1,
  3242. position: {
  3243. my: "left top",
  3244. at: "left bottom",
  3245. collision: "none"
  3246. },
  3247. source: null,
  3248. change: null,
  3249. close: null,
  3250. focus: null,
  3251. open: null,
  3252. response: null,
  3253. search: null,
  3254. select: null
  3255. },
  3256. pending: 0,
  3257. _create: function () {
  3258. var e, i, s, n = this.element[0].nodeName.toLowerCase(),
  3259. o = "textarea" === n,
  3260. a = "input" === n;
  3261. this.isMultiLine = o ? !0 : a ? !1 : this.element.prop("isContentEditable"), this.valueMethod =
  3262. this.element[o || a ? "val" : "text"], this.isNewMenu = !0, this.element.addClass(
  3263. "ui-autocomplete-input").attr("autocomplete", "off"), this._on(this.element, {
  3264. keydown: function (n) {
  3265. if (this.element.prop("readOnly")) return e = !0, s = !0, i = !0, undefined;
  3266. e = !1, s = !1, i = !1;
  3267. var o = t.ui.keyCode;
  3268. switch (n.keyCode) {
  3269. case o.PAGE_UP:
  3270. e = !0, this._move("previousPage", n);
  3271. break;
  3272. case o.PAGE_DOWN:
  3273. e = !0, this._move("nextPage", n);
  3274. break;
  3275. case o.UP:
  3276. e = !0, this._keyEvent("previous", n);
  3277. break;
  3278. case o.DOWN:
  3279. e = !0, this._keyEvent("next", n);
  3280. break;
  3281. case o.ENTER:
  3282. case o.NUMPAD_ENTER:
  3283. this.menu.active && (e = !0, n.preventDefault(), this.menu.select(n));
  3284. break;
  3285. case o.TAB:
  3286. this.menu.active && this.menu.select(n);
  3287. break;
  3288. case o.ESCAPE:
  3289. this.menu.element.is(":visible") && (this._value(this.term), this.close(
  3290. n), n.preventDefault());
  3291. break;
  3292. default:
  3293. i = !0, this._searchTimeout(n)
  3294. }
  3295. },
  3296. keypress: function (s) {
  3297. if (e) return e = !1, (!this.isMultiLine || this.menu.element.is(":visible")) &&
  3298. s.preventDefault(), undefined;
  3299. if (!i) {
  3300. var n = t.ui.keyCode;
  3301. switch (s.keyCode) {
  3302. case n.PAGE_UP:
  3303. this._move("previousPage", s);
  3304. break;
  3305. case n.PAGE_DOWN:
  3306. this._move("nextPage", s);
  3307. break;
  3308. case n.UP:
  3309. this._keyEvent("previous", s);
  3310. break;
  3311. case n.DOWN:
  3312. this._keyEvent("next", s)
  3313. }
  3314. }
  3315. },
  3316. input: function (t) {
  3317. return s ? (s = !1, t.preventDefault(), undefined) : (this._searchTimeout(t),
  3318. undefined)
  3319. },
  3320. focus: function () {
  3321. this.selectedItem = null, this.previous = this._value()
  3322. },
  3323. blur: function (t) {
  3324. return this.cancelBlur ? (delete this.cancelBlur, undefined) : (
  3325. clearTimeout(this.searching), this.close(t), this._change(t),
  3326. undefined)
  3327. }
  3328. }), this._initSource(), this.menu = t("<ul>").addClass("ui-autocomplete ui-front").appendTo(
  3329. this._appendTo()).menu({
  3330. role: null
  3331. }).hide().data("ui-menu"), this._on(this.menu.element, {
  3332. mousedown: function (e) {
  3333. e.preventDefault(), this.cancelBlur = !0, this._delay(function () {
  3334. delete this.cancelBlur
  3335. });
  3336. var i = this.menu.element[0];
  3337. t(e.target).closest(".ui-menu-item").length || this._delay(function () {
  3338. var e = this;
  3339. this.document.one("mousedown", function (s) {
  3340. s.target === e.element[0] || s.target === i || t.contains(
  3341. i, s.target) || e.close()
  3342. })
  3343. })
  3344. },
  3345. menufocus: function (e, i) {
  3346. if (this.isNewMenu && (this.isNewMenu = !1, e.originalEvent && /^mouse/.test(
  3347. e.originalEvent.type))) return this.menu.blur(), this.document.one(
  3348. "mousemove",
  3349. function () {
  3350. t(e.target).trigger(e.originalEvent)
  3351. }), undefined;
  3352. var s = i.item.data("ui-autocomplete-item");
  3353. !1 !== this._trigger("focus", e, {
  3354. item: s
  3355. }) ? e.originalEvent && /^key/.test(e.originalEvent.type) && this._value(
  3356. s.value) : this.liveRegion.text(s.value)
  3357. },
  3358. menuselect: function (t, e) {
  3359. var i = e.item.data("ui-autocomplete-item"),
  3360. s = this.previous;
  3361. this.element[0] !== this.document[0].activeElement && (this.element.focus(),
  3362. this.previous = s, this._delay(function () {
  3363. this.previous = s, this.selectedItem = i
  3364. })), !1 !== this._trigger("select", t, {
  3365. item: i
  3366. }) && this._value(i.value), this.term = this._value(), this.close(t),
  3367. this.selectedItem = i
  3368. }
  3369. }), this.liveRegion = t("<span>", {
  3370. role: "status",
  3371. "aria-live": "polite"
  3372. }).addClass("ui-helper-hidden-accessible").insertBefore(this.element), this._on(this.window, {
  3373. beforeunload: function () {
  3374. this.element.removeAttr("autocomplete")
  3375. }
  3376. })
  3377. },
  3378. _destroy: function () {
  3379. clearTimeout(this.searching), this.element.removeClass("ui-autocomplete-input").removeAttr(
  3380. "autocomplete"), this.menu.element.remove(), this.liveRegion.remove()
  3381. },
  3382. _setOption: function (t, e) {
  3383. this._super(t, e), "source" === t && this._initSource(), "appendTo" === t && this.menu.element.appendTo(
  3384. this._appendTo()), "disabled" === t && e && this.xhr && this.xhr.abort()
  3385. },
  3386. _appendTo: function () {
  3387. var e = this.options.appendTo;
  3388. return e && (e = e.jquery || e.nodeType ? t(e) : this.document.find(e).eq(0)), e || (e = this.element
  3389. .closest(".ui-front")), e.length || (e = this.document[0].body), e
  3390. },
  3391. _initSource: function () {
  3392. var e, i, s = this;
  3393. t.isArray(this.options.source) ? (e = this.options.source, this.source = function (i, s) {
  3394. s(t.ui.autocomplete.filter(e, i.term))
  3395. }) : "string" == typeof this.options.source ? (i = this.options.source, this.source =
  3396. function (e, n) {
  3397. s.xhr && s.xhr.abort(), s.xhr = t.ajax({
  3398. url: i,
  3399. data: e,
  3400. dataType: "json",
  3401. success: function (t) {
  3402. n(t)
  3403. },
  3404. error: function () {
  3405. n([])
  3406. }
  3407. })
  3408. }) : this.source = this.options.source
  3409. },
  3410. _searchTimeout: function (t) {
  3411. clearTimeout(this.searching), this.searching = this._delay(function () {
  3412. this.term !== this._value() && (this.selectedItem = null, this.search(null, t))
  3413. }, this.options.delay)
  3414. },
  3415. search: function (t, e) {
  3416. return t = null != t ? t : this._value(), this.term = this._value(), t.length < this.options.minLength ?
  3417. this.close(e) : this._trigger("search", e) !== !1 ? this._search(t) : undefined
  3418. },
  3419. _search: function (t) {
  3420. this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({
  3421. term: t
  3422. }, this._response())
  3423. },
  3424. _response: function () {
  3425. var t = this,
  3426. i = ++e;
  3427. return function (s) {
  3428. i === e && t.__response(s), t.pending--, t.pending || t.element.removeClass(
  3429. "ui-autocomplete-loading")
  3430. }
  3431. },
  3432. __response: function (t) {
  3433. t && (t = this._normalize(t)), this._trigger("response", null, {
  3434. content: t
  3435. }), !this.options.disabled && t && t.length && !this.cancelSearch ? (this._suggest(t), this
  3436. ._trigger("open")) : this._close()
  3437. },
  3438. close: function (t) {
  3439. this.cancelSearch = !0, this._close(t)
  3440. },
  3441. _close: function (t) {
  3442. this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !
  3443. 0, this._trigger("close", t))
  3444. },
  3445. _change: function (t) {
  3446. this.previous !== this._value() && this._trigger("change", t, {
  3447. item: this.selectedItem
  3448. })
  3449. },
  3450. _normalize: function (e) {
  3451. return e.length && e[0].label && e[0].value ? e : t.map(e, function (e) {
  3452. return "string" == typeof e ? {
  3453. label: e,
  3454. value: e
  3455. } : t.extend({
  3456. label: e.label || e.value,
  3457. value: e.value || e.label
  3458. }, e)
  3459. })
  3460. },
  3461. _suggest: function (e) {
  3462. var i = this.menu.element.empty();
  3463. this._renderMenu(i, e), this.isNewMenu = !0, this.menu.refresh(), i.show(), this._resizeMenu(),
  3464. i.position(t.extend({
  3465. of: this.element
  3466. }, this.options.position)), this.options.autoFocus && this.menu.next()
  3467. },
  3468. _resizeMenu: function () {
  3469. var t = this.menu.element;
  3470. t.outerWidth(Math.max(t.width("").outerWidth() + 1, this.element.outerWidth()))
  3471. },
  3472. _renderMenu: function (e, i) {
  3473. var s = this;
  3474. t.each(i, function (t, i) {
  3475. s._renderItemData(e, i)
  3476. })
  3477. },
  3478. _renderItemData: function (t, e) {
  3479. return this._renderItem(t, e).data("ui-autocomplete-item", e)
  3480. },
  3481. _renderItem: function (e, i) {
  3482. return t("<li>").append(t("<a>").text(i.label)).appendTo(e)
  3483. },
  3484. _move: function (t, e) {
  3485. return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(t) ||
  3486. this.menu.isLastItem() && /^next/.test(t) ? (this._value(this.term), this.menu.blur(),
  3487. undefined) : (this.menu[t](e), undefined) : (this.search(null, e), undefined)
  3488. },
  3489. widget: function () {
  3490. return this.menu.element
  3491. },
  3492. _value: function () {
  3493. return this.valueMethod.apply(this.element, arguments)
  3494. },
  3495. _keyEvent: function (t, e) {
  3496. (!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(t, e), e.preventDefault())
  3497. }
  3498. }), t.extend(t.ui.autocomplete, {
  3499. escapeRegex: function (t) {
  3500. return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
  3501. },
  3502. filter: function (e, i) {
  3503. var s = RegExp(t.ui.autocomplete.escapeRegex(i), "i");
  3504. return t.grep(e, function (t) {
  3505. return s.test(t.label || t.value || t)
  3506. })
  3507. }
  3508. }), t.widget("ui.autocomplete", t.ui.autocomplete, {
  3509. options: {
  3510. messages: {
  3511. noResults: "No search results.",
  3512. results: function (t) {
  3513. return t + (t > 1 ? " results are" : " result is") +
  3514. " available, use up and down arrow keys to navigate."
  3515. }
  3516. }
  3517. },
  3518. __response: function (t) {
  3519. var e;
  3520. this._superApply(arguments), this.options.disabled || this.cancelSearch || (e = t && t.length ?
  3521. this.options.messages.results(t.length) : this.options.messages.noResults, this.liveRegion
  3522. .text(e))
  3523. }
  3524. })
  3525. }(jQuery),
  3526. function (t) {
  3527. var e, i, s, n, o = "ui-button ui-widget ui-state-default ui-corner-all",
  3528. a = "ui-state-hover ui-state-active ",
  3529. r =
  3530. "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
  3531. h = function () {
  3532. var e = t(this);
  3533. setTimeout(function () {
  3534. e.find(":ui-button").button("refresh")
  3535. }, 1)
  3536. },
  3537. l = function (e) {
  3538. var i = e.name,
  3539. s = e.form,
  3540. n = t([]);
  3541. return i && (i = i.replace(/'/g, "\\'"), n = s ? t(s).find("[name='" + i + "']") : t("[name='" + i + "']",
  3542. e.ownerDocument).filter(function () {
  3543. return !this.form
  3544. })), n
  3545. };
  3546. t.widget("ui.button", {
  3547. version: "1.10.3",
  3548. defaultElement: "<button>",
  3549. options: {
  3550. disabled: null,
  3551. text: !0,
  3552. label: null,
  3553. icons: {
  3554. primary: null,
  3555. secondary: null
  3556. }
  3557. },
  3558. _create: function () {
  3559. this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace,
  3560. h), "boolean" != typeof this.options.disabled ? this.options.disabled = !!this.element.prop(
  3561. "disabled") : this.element.prop("disabled", this.options.disabled), this._determineButtonType(),
  3562. this.hasTitle = !!this.buttonElement.attr("title");
  3563. var a = this,
  3564. r = this.options,
  3565. c = "checkbox" === this.type || "radio" === this.type,
  3566. u = c ? "" : "ui-state-active",
  3567. d = "ui-state-focus";
  3568. null === r.label && (r.label = "input" === this.type ? this.buttonElement.val() : this.buttonElement
  3569. .html()), this._hoverable(this.buttonElement), this.buttonElement.addClass(o).attr(
  3570. "role", "button").bind("mouseenter" + this.eventNamespace, function () {
  3571. r.disabled || this === e && t(this).addClass("ui-state-active")
  3572. }).bind("mouseleave" + this.eventNamespace, function () {
  3573. r.disabled || t(this).removeClass(u)
  3574. }).bind("click" + this.eventNamespace, function (t) {
  3575. r.disabled && (t.preventDefault(), t.stopImmediatePropagation())
  3576. }), this.element.bind("focus" + this.eventNamespace, function () {
  3577. a.buttonElement.addClass(d)
  3578. }).bind("blur" + this.eventNamespace, function () {
  3579. a.buttonElement.removeClass(d)
  3580. }), c && (this.element.bind("change" + this.eventNamespace, function () {
  3581. n || a.refresh()
  3582. }), this.buttonElement.bind("mousedown" + this.eventNamespace, function (t) {
  3583. r.disabled || (n = !1, i = t.pageX, s = t.pageY)
  3584. }).bind("mouseup" + this.eventNamespace, function (t) {
  3585. r.disabled || (i !== t.pageX || s !== t.pageY) && (n = !0)
  3586. })), "checkbox" === this.type ? this.buttonElement.bind("click" + this.eventNamespace,
  3587. function () {
  3588. return r.disabled || n ? !1 : undefined
  3589. }) : "radio" === this.type ? this.buttonElement.bind("click" + this.eventNamespace,
  3590. function () {
  3591. if (r.disabled || n) return !1;
  3592. t(this).addClass("ui-state-active"), a.buttonElement.attr("aria-pressed", "true");
  3593. var e = a.element[0];
  3594. l(e).not(e).map(function () {
  3595. return t(this).button("widget")[0]
  3596. }).removeClass("ui-state-active").attr("aria-pressed", "false")
  3597. }) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function () {
  3598. return r.disabled ? !1 : (t(this).addClass("ui-state-active"), e = this, a.document
  3599. .one("mouseup", function () {
  3600. e = null
  3601. }), undefined)
  3602. }).bind("mouseup" + this.eventNamespace, function () {
  3603. return r.disabled ? !1 : (t(this).removeClass("ui-state-active"), undefined)
  3604. }).bind("keydown" + this.eventNamespace, function (e) {
  3605. return r.disabled ? !1 : ((e.keyCode === t.ui.keyCode.SPACE || e.keyCode === t.ui
  3606. .keyCode.ENTER) && t(this).addClass("ui-state-active"), undefined)
  3607. }).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function () {
  3608. t(this).removeClass("ui-state-active")
  3609. }), this.buttonElement.is("a") && this.buttonElement.keyup(function (e) {
  3610. e.keyCode === t.ui.keyCode.SPACE && t(this).click()
  3611. })), this._setOption("disabled", r.disabled), this._resetButton()
  3612. },
  3613. _determineButtonType: function () {
  3614. var t, e, i;
  3615. this.type = this.element.is("[type=checkbox]") ? "checkbox" : this.element.is("[type=radio]") ?
  3616. "radio" : this.element.is("input") ? "input" : "button", "checkbox" === this.type ||
  3617. "radio" === this.type ? (t = this.element.parents().last(), e = "label[for='" + this.element
  3618. .attr("id") + "']", this.buttonElement = t.find(e), this.buttonElement.length || (t = t
  3619. .length ? t.siblings() : this.element.siblings(), this.buttonElement = t.filter(e),
  3620. this.buttonElement.length || (this.buttonElement = t.find(e))), this.element.addClass(
  3621. "ui-helper-hidden-accessible"), i = this.element.is(":checked"), i && this.buttonElement
  3622. .addClass("ui-state-active"), this.buttonElement.prop("aria-pressed", i)) : this.buttonElement =
  3623. this.element
  3624. },
  3625. widget: function () {
  3626. return this.buttonElement
  3627. },
  3628. _destroy: function () {
  3629. this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(o + " " +
  3630. a + " " + r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(
  3631. ".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title")
  3632. },
  3633. _setOption: function (t, e) {
  3634. return this._super(t, e), "disabled" === t ? (e ? this.element.prop("disabled", !0) : this.element
  3635. .prop("disabled", !1), undefined) : (this._resetButton(), undefined)
  3636. },
  3637. refresh: function () {
  3638. var e = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass(
  3639. "ui-button-disabled");
  3640. e !== this.options.disabled && this._setOption("disabled", e), "radio" === this.type ? l(this.element[
  3641. 0]).each(function () {
  3642. t(this).is(":checked") ? t(this).button("widget").addClass("ui-state-active").attr(
  3643. "aria-pressed", "true") : t(this).button("widget").removeClass(
  3644. "ui-state-active").attr("aria-pressed", "false")
  3645. }) : "checkbox" === this.type && (this.element.is(":checked") ? this.buttonElement.addClass(
  3646. "ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass(
  3647. "ui-state-active").attr("aria-pressed", "false"))
  3648. },
  3649. _resetButton: function () {
  3650. if ("input" === this.type) return this.options.label && this.element.val(this.options.label),
  3651. undefined;
  3652. var e = this.buttonElement.removeClass(r),
  3653. i = t("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label)
  3654. .appendTo(e.empty()).text(),
  3655. s = this.options.icons,
  3656. n = s.primary && s.secondary,
  3657. o = [];
  3658. s.primary || s.secondary ? (this.options.text && o.push("ui-button-text-icon" + (n ? "s" : s.primary ?
  3659. "-primary" : "-secondary")), s.primary && e.prepend(
  3660. "<span class='ui-button-icon-primary ui-icon " + s.primary + "'></span>"), s.secondary &&
  3661. e.append("<span class='ui-button-icon-secondary ui-icon " + s.secondary + "'></span>"),
  3662. this.options.text || (o.push(n ? "ui-button-icons-only" : "ui-button-icon-only"), this.hasTitle ||
  3663. e.attr("title", t.trim(i)))) : o.push("ui-button-text-only"), e.addClass(o.join(" "))
  3664. }
  3665. }), t.widget("ui.buttonset", {
  3666. version: "1.10.3",
  3667. options: {
  3668. items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
  3669. },
  3670. _create: function () {
  3671. this.element.addClass("ui-buttonset")
  3672. },
  3673. _init: function () {
  3674. this.refresh()
  3675. },
  3676. _setOption: function (t, e) {
  3677. "disabled" === t && this.buttons.button("option", t, e), this._super(t, e)
  3678. },
  3679. refresh: function () {
  3680. var e = "rtl" === this.element.css("direction");
  3681. this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end()
  3682. .not(":ui-button").button().end().map(function () {
  3683. return t(this).button("widget")[0]
  3684. }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e ?
  3685. "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(e ?
  3686. "ui-corner-left" : "ui-corner-right").end().end()
  3687. },
  3688. _destroy: function () {
  3689. this.element.removeClass("ui-buttonset"), this.buttons.map(function () {
  3690. return t(this).button("widget")[0]
  3691. }).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
  3692. }
  3693. })
  3694. }(jQuery),
  3695. function (t, e) {
  3696. function i() {
  3697. this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !
  3698. 1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass =
  3699. "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass =
  3700. "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass =
  3701. "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass =
  3702. "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {
  3703. closeText: "Done",
  3704. prevText: "Prev",
  3705. nextText: "Next",
  3706. currentText: "Today",
  3707. monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September",
  3708. "October", "November", "December"],
  3709. monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  3710. dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  3711. dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  3712. dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  3713. weekHeader: "Wk",
  3714. dateFormat: "mm/dd/yy",
  3715. firstDay: 0,
  3716. isRTL: !1,
  3717. showMonthAfterYear: !1,
  3718. yearSuffix: ""
  3719. }, this._defaults = {
  3720. showOn: "focus",
  3721. showAnim: "fadeIn",
  3722. showOptions: {},
  3723. defaultDate: null,
  3724. appendText: "",
  3725. buttonText: "...",
  3726. buttonImage: "",
  3727. buttonImageOnly: !1,
  3728. hideIfNoPrevNext: !1,
  3729. navigationAsDateFormat: !1,
  3730. gotoCurrent: !1,
  3731. changeMonth: !1,
  3732. changeYear: !1,
  3733. yearRange: "c-10:c+10",
  3734. showOtherMonths: !1,
  3735. selectOtherMonths: !1,
  3736. showWeek: !1,
  3737. calculateWeek: this.iso8601Week,
  3738. shortYearCutoff: "+10",
  3739. minDate: null,
  3740. maxDate: null,
  3741. duration: "fast",
  3742. beforeShowDay: null,
  3743. beforeShow: null,
  3744. onSelect: null,
  3745. onChangeMonthYear: null,
  3746. onClose: null,
  3747. numberOfMonths: 1,
  3748. showCurrentAtPos: 0,
  3749. stepMonths: 1,
  3750. stepBigMonths: 12,
  3751. altField: "",
  3752. altFormat: "",
  3753. constrainInput: !0,
  3754. showButtonPanel: !1,
  3755. autoSize: !1,
  3756. disabled: !1
  3757. }, t.extend(this._defaults, this.regional[""]), this.dpDiv = s(t("<div id='" + this._mainDivId +
  3758. "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))
  3759. }
  3760. function s(e) {
  3761. var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
  3762. return e.delegate(i, "mouseout", function () {
  3763. t(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && t(
  3764. this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf(
  3765. "ui-datepicker-next") && t(this).removeClass("ui-datepicker-next-hover")
  3766. }).delegate(i, "mouseover", function () {
  3767. t.datepicker._isDisabledDatepicker(o.inline ? e.parent()[0] : o.input[0]) || (t(this).parents(
  3768. ".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), t(this).addClass(
  3769. "ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && t(this).addClass(
  3770. "ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && t(
  3771. this).addClass("ui-datepicker-next-hover"))
  3772. })
  3773. }
  3774. function n(e, i) {
  3775. t.extend(e, i);
  3776. for (var s in i) null == i[s] && (e[s] = i[s]);
  3777. return e
  3778. }
  3779. t.extend(t.ui, {
  3780. datepicker: {
  3781. version: "1.10.3"
  3782. }
  3783. });
  3784. var o, a = "datepicker";
  3785. t.extend(i.prototype, {
  3786. markerClassName: "hasDatepicker",
  3787. maxRows: 4,
  3788. _widgetDatepicker: function () {
  3789. return this.dpDiv
  3790. },
  3791. setDefaults: function (t) {
  3792. return n(this._defaults, t || {}), this
  3793. },
  3794. _attachDatepicker: function (e, i) {
  3795. var s, n, o;
  3796. s = e.nodeName.toLowerCase(), n = "div" === s || "span" === s, e.id || (this.uuid += 1, e.id =
  3797. "dp" + this.uuid), o = this._newInst(t(e), n), o.settings = t.extend({}, i || {}),
  3798. "input" === s ? this._connectDatepicker(e, o) : n && this._inlineDatepicker(e, o)
  3799. },
  3800. _newInst: function (e, i) {
  3801. var n = e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
  3802. return {
  3803. id: n,
  3804. input: e,
  3805. selectedDay: 0,
  3806. selectedMonth: 0,
  3807. selectedYear: 0,
  3808. drawMonth: 0,
  3809. drawYear: 0,
  3810. inline: i,
  3811. dpDiv: i ? s(t("<div class='" + this._inlineClass +
  3812. " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"
  3813. )) : this.dpDiv
  3814. }
  3815. },
  3816. _connectDatepicker: function (e, i) {
  3817. var s = t(e);
  3818. i.append = t([]), i.trigger = t([]), s.hasClass(this.markerClassName) || (this._attachments(s,
  3819. i), s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress)
  3820. .keyup(this._doKeyUp), this._autoSize(i), t.data(e, a, i), i.settings.disabled && this._disableDatepicker(
  3821. e))
  3822. },
  3823. _attachments: function (e, i) {
  3824. var s, n, o, a = this._get(i, "appendText"),
  3825. r = this._get(i, "isRTL");
  3826. i.append && i.append.remove(), a && (i.append = t("<span class='" + this._appendClass + "'>" +
  3827. a + "</span>"), e[r ? "before" : "after"](i.append)), e.unbind("focus", this._showDatepicker),
  3828. i.trigger && i.trigger.remove(), s = this._get(i, "showOn"), ("focus" === s || "both" ===
  3829. s) && e.focus(this._showDatepicker), ("button" === s || "both" === s) && (n = this._get(
  3830. i, "buttonText"), o = this._get(i, "buttonImage"), i.trigger = t(this._get(i,
  3831. "buttonImageOnly") ? t("<img/>").addClass(this._triggerClass).attr({
  3832. src: o,
  3833. alt: n,
  3834. title: n
  3835. }) : t("<button type='button'></button>").addClass(this._triggerClass).html(o ? t(
  3836. "<img/>").attr({
  3837. src: o,
  3838. alt: n,
  3839. title: n
  3840. }) : n)), e[r ? "before" : "after"](i.trigger), i.trigger.click(function () {
  3841. return t.datepicker._datepickerShowing && t.datepicker._lastInput === e[0] ? t.datepicker
  3842. ._hideDatepicker() : t.datepicker._datepickerShowing && t.datepicker._lastInput !==
  3843. e[0] ? (t.datepicker._hideDatepicker(), t.datepicker._showDatepicker(e[0])) :
  3844. t.datepicker._showDatepicker(e[0]), !1
  3845. }))
  3846. },
  3847. _autoSize: function (t) {
  3848. if (this._get(t, "autoSize") && !t.inline) {
  3849. var e, i, s, n, o = new Date(2009, 11, 20),
  3850. a = this._get(t, "dateFormat");
  3851. a.match(/[DM]/) && (e = function (t) {
  3852. for (i = 0, s = 0, n = 0; t.length > n; n++) t[n].length > i && (i = t[n].length,
  3853. s = n);
  3854. return s
  3855. }, o.setMonth(e(this._get(t, a.match(/MM/) ? "monthNames" : "monthNamesShort"))), o
  3856. .setDate(e(this._get(t, a.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - o.getDay())
  3857. ), t.input.attr("size", this._formatDate(t, o).length)
  3858. }
  3859. },
  3860. _inlineDatepicker: function (e, i) {
  3861. var s = t(e);
  3862. s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), t.data(e,
  3863. a, i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i),
  3864. this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(e), i.dpDiv.css(
  3865. "display", "block"))
  3866. },
  3867. _dialogDatepicker: function (e, i, s, o, r) {
  3868. var h, l, c, u, d, p = this._dialogInst;
  3869. return p || (this.uuid += 1, h = "dp" + this.uuid, this._dialogInput = t(
  3870. "<input type='text' id='" + h +
  3871. "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.keydown(
  3872. this._doKeyDown), t("body").append(this._dialogInput), p = this._dialogInst = this._newInst(
  3873. this._dialogInput, !1), p.settings = {}, t.data(this._dialogInput[0], a, p)), n(p.settings,
  3874. o || {}), i = i && i.constructor === Date ? this._formatDate(p, i) : i, this._dialogInput
  3875. .val(i), this._pos = r ? r.length ? r : [r.pageX, r.pageY] : null, this._pos || (l =
  3876. document.documentElement.clientWidth, c = document.documentElement.clientHeight, u =
  3877. document.documentElement.scrollLeft || document.body.scrollLeft, d = document.documentElement
  3878. .scrollTop || document.body.scrollTop, this._pos = [l / 2 - 100 + u, c / 2 - 150 + d]),
  3879. this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), p.settings
  3880. .onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(
  3881. this._dialogInput[0]), t.blockUI && t.blockUI(this.dpDiv), t.data(this._dialogInput[0],
  3882. a, p), this
  3883. },
  3884. _destroyDatepicker: function (e) {
  3885. var i, s = t(e),
  3886. n = t.data(e, a);
  3887. s.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), t.removeData(e, a), "input" ===
  3888. i ? (n.append.remove(), n.trigger.remove(), s.removeClass(this.markerClassName).unbind(
  3889. "focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind(
  3890. "keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : ("div" === i ||
  3891. "span" === i) && s.removeClass(this.markerClassName).empty())
  3892. },
  3893. _enableDatepicker: function (e) {
  3894. var i, s, n = t(e),
  3895. o = t.data(e, a);
  3896. n.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), "input" === i ? (e.disabled = !
  3897. 1, o.trigger.filter("button").each(function () {
  3898. this.disabled = !1
  3899. }).end().filter("img").css({
  3900. opacity: "1.0",
  3901. cursor: ""
  3902. })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass), s.children()
  3903. .removeClass("ui-state-disabled"), s.find(
  3904. "select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)),
  3905. this._disabledInputs = t.map(this._disabledInputs, function (t) {
  3906. return t === e ? null : t
  3907. }))
  3908. },
  3909. _disableDatepicker: function (e) {
  3910. var i, s, n = t(e),
  3911. o = t.data(e, a);
  3912. n.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), "input" === i ? (e.disabled = !
  3913. 0, o.trigger.filter("button").each(function () {
  3914. this.disabled = !0
  3915. }).end().filter("img").css({
  3916. opacity: "0.5",
  3917. cursor: "default"
  3918. })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass), s.children()
  3919. .addClass("ui-state-disabled"), s.find(
  3920. "select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)),
  3921. this._disabledInputs = t.map(this._disabledInputs, function (t) {
  3922. return t === e ? null : t
  3923. }), this._disabledInputs[this._disabledInputs.length] = e)
  3924. },
  3925. _isDisabledDatepicker: function (t) {
  3926. if (!t) return !1;
  3927. for (var e = 0; this._disabledInputs.length > e; e++)
  3928. if (this._disabledInputs[e] === t) return !0;
  3929. return !1
  3930. },
  3931. _getInst: function (e) {
  3932. try {
  3933. return t.data(e, a)
  3934. } catch (i) {
  3935. throw "Missing instance data for this datepicker"
  3936. }
  3937. },
  3938. _optionDatepicker: function (i, s, o) {
  3939. var a, r, h, l, c = this._getInst(i);
  3940. return 2 === arguments.length && "string" == typeof s ? "defaults" === s ? t.extend({}, t.datepicker
  3941. ._defaults) : c ? "all" === s ? t.extend({}, c.settings) : this._get(c, s) : null : (a =
  3942. s || {}, "string" == typeof s && (a = {}, a[s] = o), c && (this._curInst === c && this._hideDatepicker(),
  3943. r = this._getDateDatepicker(i, !0), h = this._getMinMaxDate(c, "min"), l = this._getMinMaxDate(
  3944. c, "max"), n(c.settings, a), null !== h && a.dateFormat !== e && a.minDate ===
  3945. e && (c.settings.minDate = this._formatDate(c, h)), null !== l && a.dateFormat !==
  3946. e && a.maxDate === e && (c.settings.maxDate = this._formatDate(c, l)), "disabled" in
  3947. a && (a.disabled ? this._disableDatepicker(i) : this._enableDatepicker(i)), this._attachments(
  3948. t(i), c), this._autoSize(c), this._setDate(c, r), this._updateAlternate(c),
  3949. this._updateDatepicker(c)), e)
  3950. },
  3951. _changeDatepicker: function (t, e, i) {
  3952. this._optionDatepicker(t, e, i)
  3953. },
  3954. _refreshDatepicker: function (t) {
  3955. var e = this._getInst(t);
  3956. e && this._updateDatepicker(e)
  3957. },
  3958. _setDateDatepicker: function (t, e) {
  3959. var i = this._getInst(t);
  3960. i && (this._setDate(i, e), this._updateDatepicker(i), this._updateAlternate(i))
  3961. },
  3962. _getDateDatepicker: function (t, e) {
  3963. var i = this._getInst(t);
  3964. return i && !i.inline && this._setDateFromField(i, e), i ? this._getDate(i) : null
  3965. },
  3966. _doKeyDown: function (e) {
  3967. var i, s, n, o = t.datepicker._getInst(e.target),
  3968. a = !0,
  3969. r = o.dpDiv.is(".ui-datepicker-rtl");
  3970. if (o._keyEvent = !0, t.datepicker._datepickerShowing) switch (e.keyCode) {
  3971. case 9:
  3972. t.datepicker._hideDatepicker(), a = !1;
  3973. break;
  3974. case 13:
  3975. return n = t("td." + t.datepicker._dayOverClass + ":not(." + t.datepicker._currentClass +
  3976. ")", o.dpDiv), n[0] && t.datepicker._selectDay(e.target, o.selectedMonth, o
  3977. .selectedYear, n[0]), i = t.datepicker._get(o, "onSelect"), i ? (s = t.datepicker
  3978. ._formatDate(o), i.apply(o.input ? o.input[0] : null, [s, o])) : t.datepicker
  3979. ._hideDatepicker(), !1;
  3980. case 27:
  3981. t.datepicker._hideDatepicker();
  3982. break;
  3983. case 33:
  3984. t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o,
  3985. "stepBigMonths") : -t.datepicker._get(o, "stepMonths"), "M");
  3986. break;
  3987. case 34:
  3988. t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o,
  3989. "stepBigMonths") : +t.datepicker._get(o, "stepMonths"), "M");
  3990. break;
  3991. case 35:
  3992. (e.ctrlKey || e.metaKey) && t.datepicker._clearDate(e.target), a = e.ctrlKey || e.metaKey;
  3993. break;
  3994. case 36:
  3995. (e.ctrlKey || e.metaKey) && t.datepicker._gotoToday(e.target), a = e.ctrlKey || e.metaKey;
  3996. break;
  3997. case 37:
  3998. (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? 1 : -1, "D"), a =
  3999. e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target,
  4000. e.ctrlKey ? -t.datepicker._get(o, "stepBigMonths") : -t.datepicker._get(o,
  4001. "stepMonths"), "M");
  4002. break;
  4003. case 38:
  4004. (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, -7, "D"), a = e.ctrlKey ||
  4005. e.metaKey;
  4006. break;
  4007. case 39:
  4008. (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? -1 : 1, "D"), a =
  4009. e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target,
  4010. e.ctrlKey ? +t.datepicker._get(o, "stepBigMonths") : +t.datepicker._get(o,
  4011. "stepMonths"), "M");
  4012. break;
  4013. case 40:
  4014. (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, 7, "D"), a = e.ctrlKey ||
  4015. e.metaKey;
  4016. break;
  4017. default:
  4018. a = !1
  4019. } else 36 === e.keyCode && e.ctrlKey ? t.datepicker._showDatepicker(this) : a = !1;
  4020. a && (e.preventDefault(), e.stopPropagation())
  4021. },
  4022. _doKeyPress: function (i) {
  4023. var s, n, o = t.datepicker._getInst(i.target);
  4024. return t.datepicker._get(o, "constrainInput") ? (s = t.datepicker._possibleChars(t.datepicker._get(
  4025. o, "dateFormat")), n = String.fromCharCode(null == i.charCode ? i.keyCode : i.charCode),
  4026. i.ctrlKey || i.metaKey || " " > n || !s || s.indexOf(n) > -1) : e
  4027. },
  4028. _doKeyUp: function (e) {
  4029. var i, s = t.datepicker._getInst(e.target);
  4030. if (s.input.val() !== s.lastVal) try {
  4031. i = t.datepicker.parseDate(t.datepicker._get(s, "dateFormat"), s.input ? s.input.val() :
  4032. null, t.datepicker._getFormatConfig(s)), i && (t.datepicker._setDateFromField(s),
  4033. t.datepicker._updateAlternate(s), t.datepicker._updateDatepicker(s))
  4034. } catch (n) {}
  4035. return !0
  4036. },
  4037. _showDatepicker: function (e) {
  4038. if (e = e.target || e, "input" !== e.nodeName.toLowerCase() && (e = t("input", e.parentNode)[0]),
  4039. !t.datepicker._isDisabledDatepicker(e) && t.datepicker._lastInput !== e) {
  4040. var i, s, o, a, r, h, l;
  4041. i = t.datepicker._getInst(e), t.datepicker._curInst && t.datepicker._curInst !== i && (t.datepicker
  4042. ._curInst.dpDiv.stop(!0, !0), i && t.datepicker._datepickerShowing && t.datepicker._hideDatepicker(
  4043. t.datepicker._curInst.input[0])), s = t.datepicker._get(i, "beforeShow"), o = s ?
  4044. s.apply(e, [e, i]) : {}, o !== !1 && (n(i.settings, o), i.lastVal = null, t.datepicker._lastInput =
  4045. e, t.datepicker._setDateFromField(i), t.datepicker._inDialog && (e.value = ""), t.datepicker
  4046. ._pos || (t.datepicker._pos = t.datepicker._findPos(e), t.datepicker._pos[1] += e.offsetHeight),
  4047. a = !1, t(e).parents().each(function () {
  4048. return a |= "fixed" === t(this).css("position"), !a
  4049. }), r = {
  4050. left: t.datepicker._pos[0],
  4051. top: t.datepicker._pos[1]
  4052. }, t.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({
  4053. position: "absolute",
  4054. display: "block",
  4055. top: "-1000px"
  4056. }), t.datepicker._updateDatepicker(i), r = t.datepicker._checkOffset(i, r, a), i.dpDiv
  4057. .css({
  4058. position: t.datepicker._inDialog && t.blockUI ? "static" : a ? "fixed" : "absolute",
  4059. display: "none",
  4060. left: r.left + "px",
  4061. top: r.top + "px"
  4062. }), i.inline || (h = t.datepicker._get(i, "showAnim"), l = t.datepicker._get(i,
  4063. "duration"), i.dpDiv.zIndex(t(e).zIndex() + 1), t.datepicker._datepickerShowing = !
  4064. 0, t.effects && t.effects.effect[h] ? i.dpDiv.show(h, t.datepicker._get(i,
  4065. "showOptions"), l) : i.dpDiv[h || "show"](h ? l : null), t.datepicker._shouldFocusInput(
  4066. i) && i.input.focus(), t.datepicker._curInst = i))
  4067. }
  4068. },
  4069. _updateDatepicker: function (e) {
  4070. this.maxRows = 4, o = e, e.dpDiv.empty().append(this._generateHTML(e)), this._attachHandlers(e),
  4071. e.dpDiv.find("." + this._dayOverClass + " a").mouseover();
  4072. var i, s = this._getNumberOfMonths(e),
  4073. n = s[1],
  4074. a = 17;
  4075. e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(
  4076. ""), n > 1 && e.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", a * n + "em"),
  4077. e.dpDiv[(1 !== s[0] || 1 !== s[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), e.dpDiv[
  4078. (this._get(e, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), e === t.datepicker
  4079. ._curInst && t.datepicker._datepickerShowing && t.datepicker._shouldFocusInput(e) && e.input
  4080. .focus(), e.yearshtml && (i = e.yearshtml, setTimeout(function () {
  4081. i === e.yearshtml && e.yearshtml && e.dpDiv.find(
  4082. "select.ui-datepicker-year:first").replaceWith(e.yearshtml), i = e.yearshtml =
  4083. null
  4084. }, 0))
  4085. },
  4086. _shouldFocusInput: function (t) {
  4087. return t.input && t.input.is(":visible") && !t.input.is(":disabled") && !t.input.is(":focus")
  4088. },
  4089. _checkOffset: function (e, i, s) {
  4090. var n = e.dpDiv.outerWidth(),
  4091. o = e.dpDiv.outerHeight(),
  4092. a = e.input ? e.input.outerWidth() : 0,
  4093. r = e.input ? e.input.outerHeight() : 0,
  4094. h = document.documentElement.clientWidth + (s ? 0 : t(document).scrollLeft()),
  4095. l = document.documentElement.clientHeight + (s ? 0 : t(document).scrollTop());
  4096. return i.left -= this._get(e, "isRTL") ? n - a : 0, i.left -= s && i.left === e.input.offset().left ?
  4097. t(document).scrollLeft() : 0, i.top -= s && i.top === e.input.offset().top + r ? t(document)
  4098. .scrollTop() : 0, i.left -= Math.min(i.left, i.left + n > h && h > n ? Math.abs(i.left + n -
  4099. h) : 0), i.top -= Math.min(i.top, i.top + o > l && l > o ? Math.abs(o + r) : 0), i
  4100. },
  4101. _findPos: function (e) {
  4102. for (var i, s = this._getInst(e), n = this._get(s, "isRTL"); e && ("hidden" === e.type || 1 !==
  4103. e.nodeType || t.expr.filters.hidden(e));) e = e[n ? "previousSibling" : "nextSibling"];
  4104. return i = t(e).offset(), [i.left, i.top]
  4105. },
  4106. _hideDatepicker: function (e) {
  4107. var i, s, n, o, r = this._curInst;
  4108. !r || e && r !== t.data(e, a) || this._datepickerShowing && (i = this._get(r, "showAnim"), s =
  4109. this._get(r, "duration"), n = function () {
  4110. t.datepicker._tidyDialog(r)
  4111. }, t.effects && (t.effects.effect[i] || t.effects[i]) ? r.dpDiv.hide(i, t.datepicker._get(
  4112. r, "showOptions"), s, n) : r.dpDiv["slideDown" === i ? "slideUp" : "fadeIn" === i ?
  4113. "fadeOut" : "hide"](i ? s : null, n), i || n(), this._datepickerShowing = !1, o =
  4114. this._get(r, "onClose"), o && o.apply(r.input ? r.input[0] : null, [r.input ? r.input.val() :
  4115. "", r]), this._lastInput = null, this._inDialog && (this._dialogInput.css({
  4116. position: "absolute",
  4117. left: "0",
  4118. top: "-100px"
  4119. }), t.blockUI && (t.unblockUI(), t("body").append(this.dpDiv))), this._inDialog = !1)
  4120. },
  4121. _tidyDialog: function (t) {
  4122. t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
  4123. },
  4124. _checkExternalClick: function (e) {
  4125. if (t.datepicker._curInst) {
  4126. var i = t(e.target),
  4127. s = t.datepicker._getInst(i[0]);
  4128. (i[0].id !== t.datepicker._mainDivId && 0 === i.parents("#" + t.datepicker._mainDivId).length &&
  4129. !i.hasClass(t.datepicker.markerClassName) && !i.closest("." + t.datepicker._triggerClass)
  4130. .length && t.datepicker._datepickerShowing && (!t.datepicker._inDialog || !t.blockUI) ||
  4131. i.hasClass(t.datepicker.markerClassName) && t.datepicker._curInst !== s) && t.datepicker
  4132. ._hideDatepicker()
  4133. }
  4134. },
  4135. _adjustDate: function (e, i, s) {
  4136. var n = t(e),
  4137. o = this._getInst(n[0]);
  4138. this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(o, i + ("M" === s ? this._get(o,
  4139. "showCurrentAtPos") : 0), s), this._updateDatepicker(o))
  4140. },
  4141. _gotoToday: function (e) {
  4142. var i, s = t(e),
  4143. n = this._getInst(s[0]);
  4144. this._get(n, "gotoCurrent") && n.currentDay ? (n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth =
  4145. n.currentMonth, n.drawYear = n.selectedYear = n.currentYear) : (i = new Date, n.selectedDay =
  4146. i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear =
  4147. i.getFullYear()), this._notifyChange(n), this._adjustDate(s)
  4148. },
  4149. _selectMonthYear: function (e, i, s) {
  4150. var n = t(e),
  4151. o = this._getInst(n[0]);
  4152. o["selected" + ("M" === s ? "Month" : "Year")] = o["draw" + ("M" === s ? "Month" : "Year")] =
  4153. parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(o), this._adjustDate(n)
  4154. },
  4155. _selectDay: function (e, i, s, n) {
  4156. var o, a = t(e);
  4157. t(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(a[0]) || (o = this._getInst(
  4158. a[0]), o.selectedDay = o.currentDay = t("a", n).html(), o.selectedMonth = o.currentMonth =
  4159. i, o.selectedYear = o.currentYear = s, this._selectDate(e, this._formatDate(o, o.currentDay,
  4160. o.currentMonth, o.currentYear)))
  4161. },
  4162. _clearDate: function (e) {
  4163. var i = t(e);
  4164. this._selectDate(i, "")
  4165. },
  4166. _selectDate: function (e, i) {
  4167. var s, n = t(e),
  4168. o = this._getInst(n[0]);
  4169. i = null != i ? i : this._formatDate(o), o.input && o.input.val(i), this._updateAlternate(o), s =
  4170. this._get(o, "onSelect"), s ? s.apply(o.input ? o.input[0] : null, [i, o]) : o.input && o.input
  4171. .trigger("change"), o.inline ? this._updateDatepicker(o) : (this._hideDatepicker(), this._lastInput =
  4172. o.input[0], "object" != typeof o.input[0] && o.input.focus(), this._lastInput = null)
  4173. },
  4174. _updateAlternate: function (e) {
  4175. var i, s, n, o = this._get(e, "altField");
  4176. o && (i = this._get(e, "altFormat") || this._get(e, "dateFormat"), s = this._getDate(e), n =
  4177. this.formatDate(i, s, this._getFormatConfig(e)), t(o).each(function () {
  4178. t(this).val(n)
  4179. }))
  4180. },
  4181. noWeekends: function (t) {
  4182. var e = t.getDay();
  4183. return [e > 0 && 6 > e, ""]
  4184. },
  4185. iso8601Week: function (t) {
  4186. var e, i = new Date(t.getTime());
  4187. return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), e = i.getTime(), i.setMonth(0), i.setDate(
  4188. 1), Math.floor(Math.round((e - i) / 864e5) / 7) + 1
  4189. },
  4190. parseDate: function (i, s, n) {
  4191. if (null == i || null == s) throw "Invalid arguments";
  4192. if (s = "object" == typeof s ? "" + s : s + "", "" === s) return null;
  4193. var o, a, r, h, l = 0,
  4194. c = (n ? n.shortYearCutoff : null) || this._defaults.shortYearCutoff,
  4195. u = "string" != typeof c ? c : (new Date).getFullYear() % 100 + parseInt(c, 10),
  4196. d = (n ? n.dayNamesShort : null) || this._defaults.dayNamesShort,
  4197. p = (n ? n.dayNames : null) || this._defaults.dayNames,
  4198. f = (n ? n.monthNamesShort : null) || this._defaults.monthNamesShort,
  4199. g = (n ? n.monthNames : null) || this._defaults.monthNames,
  4200. m = -1,
  4201. v = -1,
  4202. _ = -1,
  4203. b = -1,
  4204. y = !1,
  4205. w = function (t) {
  4206. var e = i.length > o + 1 && i.charAt(o + 1) === t;
  4207. return e && o++, e
  4208. },
  4209. k = function (t) {
  4210. var e = w(t),
  4211. i = "@" === t ? 14 : "!" === t ? 20 : "y" === t && e ? 4 : "o" === t ? 3 : 2,
  4212. n = RegExp("^\\d{1," + i + "}"),
  4213. o = s.substring(l).match(n);
  4214. if (!o) throw "Missing number at position " + l;
  4215. return l += o[0].length, parseInt(o[0], 10)
  4216. },
  4217. x = function (i, n, o) {
  4218. var a = -1,
  4219. r = t.map(w(i) ? o : n, function (t, e) {
  4220. return [[e, t]]
  4221. }).sort(function (t, e) {
  4222. return -(t[1].length - e[1].length)
  4223. });
  4224. if (t.each(r, function (t, i) {
  4225. var n = i[1];
  4226. return s.substr(l, n.length).toLowerCase() === n.toLowerCase() ? (a = i[0],
  4227. l += n.length, !1) : e
  4228. }), -1 !== a) return a + 1;
  4229. throw "Unknown name at position " + l
  4230. },
  4231. D = function () {
  4232. if (s.charAt(l) !== i.charAt(o)) throw "Unexpected literal at position " + l;
  4233. l++
  4234. };
  4235. for (o = 0; i.length > o; o++)
  4236. if (y) "'" !== i.charAt(o) || w("'") ? D() : y = !1;
  4237. else switch (i.charAt(o)) {
  4238. case "d":
  4239. _ = k("d");
  4240. break;
  4241. case "D":
  4242. x("D", d, p);
  4243. break;
  4244. case "o":
  4245. b = k("o");
  4246. break;
  4247. case "m":
  4248. v = k("m");
  4249. break;
  4250. case "M":
  4251. v = x("M", f, g);
  4252. break;
  4253. case "y":
  4254. m = k("y");
  4255. break;
  4256. case "@":
  4257. h = new Date(k("@")), m = h.getFullYear(), v = h.getMonth() + 1, _ = h.getDate();
  4258. break;
  4259. case "!":
  4260. h = new Date((k("!") - this._ticksTo1970) / 1e4), m = h.getFullYear(), v = h.getMonth() +
  4261. 1, _ = h.getDate();
  4262. break;
  4263. case "'":
  4264. w("'") ? D() : y = !0;
  4265. break;
  4266. default:
  4267. D()
  4268. }
  4269. if (s.length > l && (r = s.substr(l), !/^\s+/.test(r))) throw "Extra/unparsed characters found in date: " +
  4270. r;
  4271. if (-1 === m ? m = (new Date).getFullYear() : 100 > m && (m += (new Date).getFullYear() - (new Date)
  4272. .getFullYear() % 100 + (u >= m ? 0 : -100)), b > -1)
  4273. for (v = 1, _ = b;;) {
  4274. if (a = this._getDaysInMonth(m, v - 1), a >= _) break;
  4275. v++, _ -= a
  4276. }
  4277. if (h = this._daylightSavingAdjust(new Date(m, v - 1, _)), h.getFullYear() !== m || h.getMonth() +
  4278. 1 !== v || h.getDate() !== _) throw "Invalid date";
  4279. return h
  4280. },
  4281. ATOM: "yy-mm-dd",
  4282. COOKIE: "D, dd M yy",
  4283. ISO_8601: "yy-mm-dd",
  4284. RFC_822: "D, d M y",
  4285. RFC_850: "DD, dd-M-y",
  4286. RFC_1036: "D, d M y",
  4287. RFC_1123: "D, d M yy",
  4288. RFC_2822: "D, d M yy",
  4289. RSS: "D, d M y",
  4290. TICKS: "!",
  4291. TIMESTAMP: "@",
  4292. W3C: "yy-mm-dd",
  4293. _ticksTo1970: 1e7 * 60 * 60 * 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)),
  4294. formatDate: function (t, e, i) {
  4295. if (!e) return "";
  4296. var s, n = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort,
  4297. o = (i ? i.dayNames : null) || this._defaults.dayNames,
  4298. a = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort,
  4299. r = (i ? i.monthNames : null) || this._defaults.monthNames,
  4300. h = function (e) {
  4301. var i = t.length > s + 1 && t.charAt(s + 1) === e;
  4302. return i && s++, i
  4303. },
  4304. l = function (t, e, i) {
  4305. var s = "" + e;
  4306. if (h(t))
  4307. for (; i > s.length;) s = "0" + s;
  4308. return s
  4309. },
  4310. c = function (t, e, i, s) {
  4311. return h(t) ? s[e] : i[e]
  4312. },
  4313. u = "",
  4314. d = !1;
  4315. if (e)
  4316. for (s = 0; t.length > s; s++)
  4317. if (d) "'" !== t.charAt(s) || h("'") ? u += t.charAt(s) : d = !1;
  4318. else switch (t.charAt(s)) {
  4319. case "d":
  4320. u += l("d", e.getDate(), 2);
  4321. break;
  4322. case "D":
  4323. u += c("D", e.getDay(), n, o);
  4324. break;
  4325. case "o":
  4326. u += l("o", Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate())
  4327. .getTime() - new Date(e.getFullYear(), 0, 0).getTime()) /
  4328. 864e5), 3);
  4329. break;
  4330. case "m":
  4331. u += l("m", e.getMonth() + 1, 2);
  4332. break;
  4333. case "M":
  4334. u += c("M", e.getMonth(), a, r);
  4335. break;
  4336. case "y":
  4337. u += h("y") ? e.getFullYear() : (10 > e.getYear() % 100 ? "0" : "") + e.getYear() %
  4338. 100;
  4339. break;
  4340. case "@":
  4341. u += e.getTime();
  4342. break;
  4343. case "!":
  4344. u += 1e4 * e.getTime() + this._ticksTo1970;
  4345. break;
  4346. case "'":
  4347. h("'") ? u += "'" : d = !0;
  4348. break;
  4349. default:
  4350. u += t.charAt(s)
  4351. }
  4352. return u
  4353. },
  4354. _possibleChars: function (t) {
  4355. var e, i = "",
  4356. s = !1,
  4357. n = function (i) {
  4358. var s = t.length > e + 1 && t.charAt(e + 1) === i;
  4359. return s && e++, s
  4360. };
  4361. for (e = 0; t.length > e; e++)
  4362. if (s) "'" !== t.charAt(e) || n("'") ? i += t.charAt(e) : s = !1;
  4363. else switch (t.charAt(e)) {
  4364. case "d":
  4365. case "m":
  4366. case "y":
  4367. case "@":
  4368. i += "0123456789";
  4369. break;
  4370. case "D":
  4371. case "M":
  4372. return null;
  4373. case "'":
  4374. n("'") ? i += "'" : s = !0;
  4375. break;
  4376. default:
  4377. i += t.charAt(e)
  4378. }
  4379. return i
  4380. },
  4381. _get: function (t, i) {
  4382. return t.settings[i] !== e ? t.settings[i] : this._defaults[i]
  4383. },
  4384. _setDateFromField: function (t, e) {
  4385. if (t.input.val() !== t.lastVal) {
  4386. var i = this._get(t, "dateFormat"),
  4387. s = t.lastVal = t.input ? t.input.val() : null,
  4388. n = this._getDefaultDate(t),
  4389. o = n,
  4390. a = this._getFormatConfig(t);
  4391. try {
  4392. o = this.parseDate(i, s, a) || n
  4393. } catch (r) {
  4394. s = e ? "" : s
  4395. }
  4396. t.selectedDay = o.getDate(), t.drawMonth = t.selectedMonth = o.getMonth(), t.drawYear = t.selectedYear =
  4397. o.getFullYear(), t.currentDay = s ? o.getDate() : 0, t.currentMonth = s ? o.getMonth() :
  4398. 0, t.currentYear = s ? o.getFullYear() : 0, this._adjustInstDate(t)
  4399. }
  4400. },
  4401. _getDefaultDate: function (t) {
  4402. return this._restrictMinMax(t, this._determineDate(t, this._get(t, "defaultDate"), new Date))
  4403. },
  4404. _determineDate: function (e, i, s) {
  4405. var n = function (t) {
  4406. var e = new Date;
  4407. return e.setDate(e.getDate() + t), e
  4408. },
  4409. o = function (i) {
  4410. try {
  4411. return t.datepicker.parseDate(t.datepicker._get(e, "dateFormat"), i, t.datepicker._getFormatConfig(
  4412. e))
  4413. } catch (s) {}
  4414. for (var n = (i.toLowerCase().match(/^c/) ? t.datepicker._getDate(e) : null) || new Date,
  4415. o = n.getFullYear(), a = n.getMonth(), r = n.getDate(), h =
  4416. /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, l = h.exec(i); l;) {
  4417. switch (l[2] || "d") {
  4418. case "d":
  4419. case "D":
  4420. r += parseInt(l[1], 10);
  4421. break;
  4422. case "w":
  4423. case "W":
  4424. r += 7 * parseInt(l[1], 10);
  4425. break;
  4426. case "m":
  4427. case "M":
  4428. a += parseInt(l[1], 10), r = Math.min(r, t.datepicker._getDaysInMonth(o, a));
  4429. break;
  4430. case "y":
  4431. case "Y":
  4432. o += parseInt(l[1], 10), r = Math.min(r, t.datepicker._getDaysInMonth(o, a))
  4433. }
  4434. l = h.exec(i)
  4435. }
  4436. return new Date(o, a, r)
  4437. },
  4438. a = null == i || "" === i ? s : "string" == typeof i ? o(i) : "number" == typeof i ? isNaN(
  4439. i) ? s : n(i) : new Date(i.getTime());
  4440. return a = a && "Invalid Date" == "" + a ? s : a, a && (a.setHours(0), a.setMinutes(0), a.setSeconds(
  4441. 0), a.setMilliseconds(0)), this._daylightSavingAdjust(a)
  4442. },
  4443. _daylightSavingAdjust: function (t) {
  4444. return t ? (t.setHours(t.getHours() > 12 ? t.getHours() + 2 : 0), t) : null
  4445. },
  4446. _setDate: function (t, e, i) {
  4447. var s = !e,
  4448. n = t.selectedMonth,
  4449. o = t.selectedYear,
  4450. a = this._restrictMinMax(t, this._determineDate(t, e, new Date));
  4451. t.selectedDay = t.currentDay = a.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = a.getMonth(),
  4452. t.drawYear = t.selectedYear = t.currentYear = a.getFullYear(), n === t.selectedMonth && o ===
  4453. t.selectedYear || i || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(
  4454. s ? "" : this._formatDate(t))
  4455. },
  4456. _getDate: function (t) {
  4457. var e = !t.currentYear || t.input && "" === t.input.val() ? null : this._daylightSavingAdjust(
  4458. new Date(t.currentYear, t.currentMonth, t.currentDay));
  4459. return e
  4460. },
  4461. _attachHandlers: function (e) {
  4462. var i = this._get(e, "stepMonths"),
  4463. s = "#" + e.id.replace(/\\\\/g, "\\");
  4464. e.dpDiv.find("[data-handler]").map(function () {
  4465. var e = {
  4466. prev: function () {
  4467. t.datepicker._adjustDate(s, -i, "M")
  4468. },
  4469. next: function () {
  4470. t.datepicker._adjustDate(s, +i, "M")
  4471. },
  4472. hide: function () {
  4473. t.datepicker._hideDatepicker()
  4474. },
  4475. today: function () {
  4476. t.datepicker._gotoToday(s)
  4477. },
  4478. selectDay: function () {
  4479. return t.datepicker._selectDay(s, +this.getAttribute("data-month"),
  4480. +this.getAttribute("data-year"), this), !1
  4481. },
  4482. selectMonth: function () {
  4483. return t.datepicker._selectMonthYear(s, this, "M"), !1
  4484. },
  4485. selectYear: function () {
  4486. return t.datepicker._selectMonthYear(s, this, "Y"), !1
  4487. }
  4488. };
  4489. t(this).bind(this.getAttribute("data-event"), e[this.getAttribute("data-handler")])
  4490. })
  4491. },
  4492. _generateHTML: function (t) {
  4493. var e, i, s, n, o, a, r, h, l, c, u, d, p, f, g, m, v, _, b, y, w, k, x, D, C, I, P, T, M, S, z,
  4494. A, H, E, N, W, O, F, R, L = new Date,
  4495. j = this._daylightSavingAdjust(new Date(L.getFullYear(), L.getMonth(), L.getDate())),
  4496. Y = this._get(t, "isRTL"),
  4497. B = this._get(t, "showButtonPanel"),
  4498. V = this._get(t, "hideIfNoPrevNext"),
  4499. K = this._get(t, "navigationAsDateFormat"),
  4500. U = this._getNumberOfMonths(t),
  4501. q = this._get(t, "showCurrentAtPos"),
  4502. Q = this._get(t, "stepMonths"),
  4503. X = 1 !== U[0] || 1 !== U[1],
  4504. $ = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) :
  4505. new Date(9999, 9, 9)),
  4506. G = this._getMinMaxDate(t, "min"),
  4507. J = this._getMinMaxDate(t, "max"),
  4508. Z = t.drawMonth - q,
  4509. te = t.drawYear;
  4510. if (0 > Z && (Z += 12, te--), J)
  4511. for (e = this._daylightSavingAdjust(new Date(J.getFullYear(), J.getMonth() - U[0] * U[1] +
  4512. 1, J.getDate())), e = G && G > e ? G : e; this._daylightSavingAdjust(new Date(te, Z,
  4513. 1)) > e;) Z--, 0 > Z && (Z = 11, te--);
  4514. for (t.drawMonth = Z, t.drawYear = te, i = this._get(t, "prevText"), i = K ? this.formatDate(i,
  4515. this._daylightSavingAdjust(new Date(te, Z - Q, 1)), this._getFormatConfig(t)) : i, s =
  4516. this._canAdjustMonth(t, -1, te, Z) ?
  4517. "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" +
  4518. i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i +
  4519. "</span></a>" : V ? "" :
  4520. "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i +
  4521. "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i +
  4522. "</span></a>", n = this._get(t, "nextText"), n = K ? this.formatDate(n, this._daylightSavingAdjust(
  4523. new Date(te, Z + Q, 1)), this._getFormatConfig(t)) : n, o = this._canAdjustMonth(t, 1,
  4524. te, Z) ?
  4525. "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" +
  4526. n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n +
  4527. "</span></a>" : V ? "" :
  4528. "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + n +
  4529. "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n +
  4530. "</span></a>", a = this._get(t, "currentText"), r = this._get(t, "gotoCurrent") && t.currentDay ?
  4531. $ : j, a = K ? this.formatDate(a, r, this._getFormatConfig(t)) : a, h = t.inline ? "" :
  4532. "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
  4533. this._get(t, "closeText") + "</button>", l = B ?
  4534. "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Y ? h : "") + (this._isInRange(
  4535. t, r) ?
  4536. "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" +
  4537. a + "</button>" : "") + (Y ? "" : h) + "</div>" : "", c = parseInt(this._get(t,
  4538. "firstDay"), 10), c = isNaN(c) ? 0 : c, u = this._get(t, "showWeek"), d = this._get(t,
  4539. "dayNames"), p = this._get(t, "dayNamesMin"), f = this._get(t, "monthNames"), g = this._get(
  4540. t, "monthNamesShort"), m = this._get(t, "beforeShowDay"), v = this._get(t,
  4541. "showOtherMonths"), _ = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t),
  4542. y = "", k = 0; U[0] > k; k++) {
  4543. for (x = "", this.maxRows = 4, D = 0; U[1] > D; D++) {
  4544. if (C = this._daylightSavingAdjust(new Date(te, Z, t.selectedDay)), I =
  4545. " ui-corner-all", P = "", X) {
  4546. if (P += "<div class='ui-datepicker-group", U[1] > 1) switch (D) {
  4547. case 0:
  4548. P += " ui-datepicker-group-first", I = " ui-corner-" + (Y ? "right" :
  4549. "left");
  4550. break;
  4551. case U[1] - 1:
  4552. P += " ui-datepicker-group-last", I = " ui-corner-" + (Y ? "left" :
  4553. "right");
  4554. break;
  4555. default:
  4556. P += " ui-datepicker-group-middle", I = ""
  4557. }
  4558. P += "'>"
  4559. }
  4560. for (P += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + I +
  4561. "'>" + (/all|left/.test(I) && 0 === k ? Y ? o : s : "") + (/all|right/.test(I) && 0 ===
  4562. k ? Y ? s : o : "") + this._generateMonthYearHeader(t, Z, te, G, J, k > 0 || D >
  4563. 0, f, g) + "</div><table class='ui-datepicker-calendar'><thead>" + "<tr>", T =
  4564. u ? "<th class='ui-datepicker-week-col'>" + this._get(t, "weekHeader") + "</th>" :
  4565. "", w = 0; 7 > w; w++) M = (w + c) % 7, T += "<th" + ((w + c + 6) % 7 >= 5 ?
  4566. " class='ui-datepicker-week-end'" : "") + ">" + "<span title='" + d[M] + "'>" +
  4567. p[M] + "</span></th>";
  4568. for (P += T + "</tr></thead><tbody>", S = this._getDaysInMonth(te, Z), te === t.selectedYear &&
  4569. Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, S)), z = (this._getFirstDayOfMonth(
  4570. te, Z) - c + 7) % 7, A = Math.ceil((z + S) / 7), H = X ? this.maxRows > A ?
  4571. this.maxRows : A : A, this.maxRows = H, E = this._daylightSavingAdjust(new Date(te,
  4572. Z, 1 - z)), N = 0; H > N; N++) {
  4573. for (P += "<tr>", W = u ? "<td class='ui-datepicker-week-col'>" + this._get(t,
  4574. "calculateWeek")(E) + "</td>" : "", w = 0; 7 > w; w++) O = m ? m.apply(t.input ?
  4575. t.input[0] : null, [E]) : [!0, ""], F = E.getMonth() !== Z, R = F && !_ ||
  4576. !O[0] || G && G > E || J && E > J, W += "<td class='" + ((w + c + 6) % 7 >= 5 ?
  4577. " ui-datepicker-week-end" : "") + (F ? " ui-datepicker-other-month" : "") +
  4578. (E.getTime() === C.getTime() && Z === t.selectedMonth && t._keyEvent || b.getTime() ===
  4579. E.getTime() && b.getTime() === C.getTime() ? " " + this._dayOverClass : "") +
  4580. (R ? " " + this._unselectableClass + " ui-state-disabled" : "") + (F && !v ? "" :
  4581. " " + O[1] + (E.getTime() === $.getTime() ? " " + this._currentClass : "") +
  4582. (E.getTime() === j.getTime() ? " ui-datepicker-today" : "")) + "'" + (F &&
  4583. !v || !O[2] ? "" : " title='" + O[2].replace(/'/g, "&#39;") + "'") + (R ?
  4584. "" : " data-handler='selectDay' data-event='click' data-month='" + E.getMonth() +
  4585. "' data-year='" + E.getFullYear() + "'") + ">" + (F && !v ? "&#xa0;" : R ?
  4586. "<span class='ui-state-default'>" + E.getDate() + "</span>" :
  4587. "<a class='ui-state-default" + (E.getTime() === j.getTime() ?
  4588. " ui-state-highlight" : "") + (E.getTime() === $.getTime() ?
  4589. " ui-state-active" : "") + (F ? " ui-priority-secondary" : "") +
  4590. "' href='#'>" + E.getDate() + "</a>") + "</td>", E.setDate(E.getDate() + 1),
  4591. E = this._daylightSavingAdjust(E);
  4592. P += W + "</tr>"
  4593. }
  4594. Z++, Z > 11 && (Z = 0, te++), P += "</tbody></table>" + (X ? "</div>" + (U[0] > 0 && D ===
  4595. U[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""), x += P
  4596. }
  4597. y += x
  4598. }
  4599. return y += l, t._keyEvent = !1, y
  4600. },
  4601. _generateMonthYearHeader: function (t, e, i, s, n, o, a, r) {
  4602. var h, l, c, u, d, p, f, g, m = this._get(t, "changeMonth"),
  4603. v = this._get(t, "changeYear"),
  4604. _ = this._get(t, "showMonthAfterYear"),
  4605. b = "<div class='ui-datepicker-title'>",
  4606. y = "";
  4607. if (o || !m) y += "<span class='ui-datepicker-month'>" + a[e] + "</span>";
  4608. else {
  4609. for (h = s && s.getFullYear() === i, l = n && n.getFullYear() === i, y +=
  4610. "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",
  4611. c = 0; 12 > c; c++)(!h || c >= s.getMonth()) && (!l || n.getMonth() >= c) && (y +=
  4612. "<option value='" + c + "'" + (c === e ? " selected='selected'" : "") + ">" + r[c] +
  4613. "</option>");
  4614. y += "</select>"
  4615. }
  4616. if (_ || (b += y + (!o && m && v ? "" : "&#xa0;")), !t.yearshtml)
  4617. if (t.yearshtml = "", o || !v) b += "<span class='ui-datepicker-year'>" + i + "</span>";
  4618. else {
  4619. for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), p =
  4620. function (t) {
  4621. var e = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(
  4622. /[+\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10);
  4623. return isNaN(e) ? d : e
  4624. }, f = p(u[0]), g = Math.max(f, p(u[1] || "")), f = s ? Math.max(f, s.getFullYear()) :
  4625. f, g = n ? Math.min(g, n.getFullYear()) : g, t.yearshtml +=
  4626. "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; g >=
  4627. f; f++) t.yearshtml += "<option value='" + f + "'" + (f === i ?
  4628. " selected='selected'" : "") + ">" + f + "</option>";
  4629. t.yearshtml += "</select>", b += t.yearshtml, t.yearshtml = null
  4630. } return b += this._get(t, "yearSuffix"), _ && (b += (!o && m && v ? "" : "&#xa0;") + y), b +=
  4631. "</div>"
  4632. },
  4633. _adjustInstDate: function (t, e, i) {
  4634. var s = t.drawYear + ("Y" === i ? e : 0),
  4635. n = t.drawMonth + ("M" === i ? e : 0),
  4636. o = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? e : 0),
  4637. a = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, o)));
  4638. t.selectedDay = a.getDate(), t.drawMonth = t.selectedMonth = a.getMonth(), t.drawYear = t.selectedYear =
  4639. a.getFullYear(), ("M" === i || "Y" === i) && this._notifyChange(t)
  4640. },
  4641. _restrictMinMax: function (t, e) {
  4642. var i = this._getMinMaxDate(t, "min"),
  4643. s = this._getMinMaxDate(t, "max"),
  4644. n = i && i > e ? i : e;
  4645. return s && n > s ? s : n
  4646. },
  4647. _notifyChange: function (t) {
  4648. var e = this._get(t, "onChangeMonthYear");
  4649. e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t])
  4650. },
  4651. _getNumberOfMonths: function (t) {
  4652. var e = this._get(t, "numberOfMonths");
  4653. return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e
  4654. },
  4655. _getMinMaxDate: function (t, e) {
  4656. return this._determineDate(t, this._get(t, e + "Date"), null)
  4657. },
  4658. _getDaysInMonth: function (t, e) {
  4659. return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate()
  4660. },
  4661. _getFirstDayOfMonth: function (t, e) {
  4662. return new Date(t, e, 1).getDay()
  4663. },
  4664. _canAdjustMonth: function (t, e, i, s) {
  4665. var n = this._getNumberOfMonths(t),
  4666. o = this._daylightSavingAdjust(new Date(i, s + (0 > e ? e : n[0] * n[1]), 1));
  4667. return 0 > e && o.setDate(this._getDaysInMonth(o.getFullYear(), o.getMonth())), this._isInRange(
  4668. t, o)
  4669. },
  4670. _isInRange: function (t, e) {
  4671. var i, s, n = this._getMinMaxDate(t, "min"),
  4672. o = this._getMinMaxDate(t, "max"),
  4673. a = null,
  4674. r = null,
  4675. h = this._get(t, "yearRange");
  4676. return h && (i = h.split(":"), s = (new Date).getFullYear(), a = parseInt(i[0], 10), r =
  4677. parseInt(i[1], 10), i[0].match(/[+\-].*/) && (a += s), i[1].match(/[+\-].*/) && (r += s)
  4678. ), (!n || e.getTime() >= n.getTime()) && (!o || e.getTime() <= o.getTime()) && (!a || e.getFullYear() >=
  4679. a) && (!r || r >= e.getFullYear())
  4680. },
  4681. _getFormatConfig: function (t) {
  4682. var e = this._get(t, "shortYearCutoff");
  4683. return e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10), {
  4684. shortYearCutoff: e,
  4685. dayNamesShort: this._get(t, "dayNamesShort"),
  4686. dayNames: this._get(t, "dayNames"),
  4687. monthNamesShort: this._get(t, "monthNamesShort"),
  4688. monthNames: this._get(t, "monthNames")
  4689. }
  4690. },
  4691. _formatDate: function (t, e, i, s) {
  4692. e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear);
  4693. var n = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(s, i, e)) : this._daylightSavingAdjust(
  4694. new Date(t.currentYear, t.currentMonth, t.currentDay));
  4695. return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t))
  4696. }
  4697. }), t.fn.datepicker = function (e) {
  4698. if (!this.length) return this;
  4699. t.datepicker.initialized || (t(document).mousedown(t.datepicker._checkExternalClick), t.datepicker.initialized = !
  4700. 0), 0 === t("#" + t.datepicker._mainDivId).length && t("body").append(t.datepicker.dpDiv);
  4701. var i = Array.prototype.slice.call(arguments, 1);
  4702. return "string" != typeof e || "isDisabled" !== e && "getDate" !== e && "widget" !== e ? "option" === e &&
  4703. 2 === arguments.length && "string" == typeof arguments[1] ? t.datepicker["_" + e + "Datepicker"].apply(
  4704. t.datepicker, [this[0]].concat(i)) : this.each(function () {
  4705. "string" == typeof e ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this].concat(i)) :
  4706. t.datepicker._attachDatepicker(this, e)
  4707. }) : t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i))
  4708. }, t.datepicker = new i, t.datepicker.initialized = !1, t.datepicker.uuid = (new Date).getTime(), t.datepicker.version =
  4709. "1.10.3"
  4710. }(jQuery),
  4711. function (t) {
  4712. var e = {
  4713. buttons: !0,
  4714. height: !0,
  4715. maxHeight: !0,
  4716. maxWidth: !0,
  4717. minHeight: !0,
  4718. minWidth: !0,
  4719. width: !0
  4720. },
  4721. i = {
  4722. maxHeight: !0,
  4723. maxWidth: !0,
  4724. minHeight: !0,
  4725. minWidth: !0
  4726. };
  4727. t.widget("ui.dialog", {
  4728. version: "1.10.3",
  4729. options: {
  4730. appendTo: "body",
  4731. autoOpen: !0,
  4732. buttons: [],
  4733. closeOnEscape: !0,
  4734. closeText: "close",
  4735. dialogClass: "",
  4736. draggable: !0,
  4737. hide: null,
  4738. height: "auto",
  4739. maxHeight: null,
  4740. maxWidth: null,
  4741. minHeight: 150,
  4742. minWidth: 150,
  4743. modal: !1,
  4744. position: {
  4745. my: "center",
  4746. at: "center",
  4747. of: window,
  4748. collision: "fit",
  4749. using: function (e) {
  4750. var i = t(this).css(e).offset().top;
  4751. 0 > i && t(this).css("top", e.top - i)
  4752. }
  4753. },
  4754. resizable: !0,
  4755. show: null,
  4756. title: null,
  4757. width: 300,
  4758. beforeClose: null,
  4759. close: null,
  4760. drag: null,
  4761. dragStart: null,
  4762. dragStop: null,
  4763. focus: null,
  4764. open: null,
  4765. resize: null,
  4766. resizeStart: null,
  4767. resizeStop: null
  4768. },
  4769. _create: function () {
  4770. this.originalCss = {
  4771. display: this.element[0].style.display,
  4772. width: this.element[0].style.width,
  4773. minHeight: this.element[0].style.minHeight,
  4774. maxHeight: this.element[0].style.maxHeight,
  4775. height: this.element[0].style.height
  4776. }, this.originalPosition = {
  4777. parent: this.element.parent(),
  4778. index: this.element.parent().children().index(this.element)
  4779. }, this.originalTitle = this.element.attr("title"), this.options.title = this.options.title ||
  4780. this.originalTitle, this._createWrapper(), this.element.show().removeAttr("title").addClass(
  4781. "ui-dialog-content ui-widget-content").appendTo(this.uiDialog), this._createTitlebar(),
  4782. this._createButtonPane(), this.options.draggable && t.fn.draggable && this._makeDraggable(),
  4783. this.options.resizable && t.fn.resizable && this._makeResizable(), this._isOpen = !1
  4784. },
  4785. _init: function () {
  4786. this.options.autoOpen && this.open()
  4787. },
  4788. _appendTo: function () {
  4789. var e = this.options.appendTo;
  4790. return e && (e.jquery || e.nodeType) ? t(e) : this.document.find(e || "body").eq(0)
  4791. },
  4792. _destroy: function () {
  4793. var t, e = this.originalPosition;
  4794. this._destroyOverlay(), this.element.removeUniqueId().removeClass(
  4795. "ui-dialog-content ui-widget-content").css(this.originalCss).detach(), this.uiDialog.stop(
  4796. !0, !0).remove(), this.originalTitle && this.element.attr("title", this.originalTitle),
  4797. t = e.parent.children().eq(e.index), t.length && t[0] !== this.element[0] ? t.before(this.element) :
  4798. e.parent.append(this.element)
  4799. },
  4800. widget: function () {
  4801. return this.uiDialog
  4802. },
  4803. disable: t.noop,
  4804. enable: t.noop,
  4805. close: function (e) {
  4806. var i = this;
  4807. this._isOpen && this._trigger("beforeClose", e) !== !1 && (this._isOpen = !1, this._destroyOverlay(),
  4808. this.opener.filter(":focusable").focus().length || t(this.document[0].activeElement).blur(),
  4809. this._hide(this.uiDialog, this.options.hide, function () {
  4810. i._trigger("close", e)
  4811. }))
  4812. },
  4813. isOpen: function () {
  4814. return this._isOpen
  4815. },
  4816. moveToTop: function () {
  4817. this._moveToTop()
  4818. },
  4819. _moveToTop: function (t, e) {
  4820. var i = !!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;
  4821. return i && !e && this._trigger("focus", t), i
  4822. },
  4823. open: function () {
  4824. var e = this;
  4825. return this._isOpen ? (this._moveToTop() && this._focusTabbable(), undefined) : (this._isOpen = !
  4826. 0, this.opener = t(this.document[0].activeElement), this._size(), this._position(),
  4827. this._createOverlay(), this._moveToTop(null, !0), this._show(this.uiDialog, this.options
  4828. .show,
  4829. function () {
  4830. e._focusTabbable(), e._trigger("focus")
  4831. }), this._trigger("open"), undefined)
  4832. },
  4833. _focusTabbable: function () {
  4834. var t = this.element.find("[autofocus]");
  4835. t.length || (t = this.element.find(":tabbable")), t.length || (t = this.uiDialogButtonPane.find(
  4836. ":tabbable")), t.length || (t = this.uiDialogTitlebarClose.filter(":tabbable")), t.length ||
  4837. (t = this.uiDialog), t.eq(0).focus()
  4838. },
  4839. _keepFocus: function (e) {
  4840. function i() {
  4841. var e = this.document[0].activeElement,
  4842. i = this.uiDialog[0] === e || t.contains(this.uiDialog[0], e);
  4843. i || this._focusTabbable()
  4844. }
  4845. e.preventDefault(), i.call(this), this._delay(i)
  4846. },
  4847. _createWrapper: function () {
  4848. this.uiDialog = t("<div>").addClass(
  4849. "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass
  4850. ).hide().attr({
  4851. tabIndex: -1,
  4852. role: "dialog"
  4853. }).appendTo(this._appendTo()), this._on(this.uiDialog, {
  4854. keydown: function (e) {
  4855. if (this.options.closeOnEscape && !e.isDefaultPrevented() && e.keyCode && e
  4856. .keyCode === t.ui.keyCode.ESCAPE) return e.preventDefault(), this.close(
  4857. e), undefined;
  4858. if (e.keyCode === t.ui.keyCode.TAB) {
  4859. var i = this.uiDialog.find(":tabbable"),
  4860. s = i.filter(":first"),
  4861. n = i.filter(":last");
  4862. e.target !== n[0] && e.target !== this.uiDialog[0] || e.shiftKey ? e.target !==
  4863. s[0] && e.target !== this.uiDialog[0] || !e.shiftKey || (n.focus(1),
  4864. e.preventDefault()) : (s.focus(1), e.preventDefault())
  4865. }
  4866. },
  4867. mousedown: function (t) {
  4868. this._moveToTop(t) && this._focusTabbable()
  4869. }
  4870. }), this.element.find("[aria-describedby]").length || this.uiDialog.attr({
  4871. "aria-describedby": this.element.uniqueId().attr("id")
  4872. })
  4873. },
  4874. _createTitlebar: function () {
  4875. var e;
  4876. this.uiDialogTitlebar = t("<div>").addClass(
  4877. "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),
  4878. this._on(this.uiDialogTitlebar, {
  4879. mousedown: function (e) {
  4880. t(e.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.focus()
  4881. }
  4882. }), this.uiDialogTitlebarClose = t("<button></button>").button({
  4883. label: this.options.closeText,
  4884. icons: {
  4885. primary: "ui-icon-closethick"
  4886. },
  4887. text: !1
  4888. }).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar), this._on(this.uiDialogTitlebarClose, {
  4889. click: function (t) {
  4890. t.preventDefault(), this.close(t)
  4891. }
  4892. }), e = t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),
  4893. this._title(e), this.uiDialog.attr({
  4894. "aria-labelledby": e.attr("id")
  4895. })
  4896. },
  4897. _title: function (t) {
  4898. this.options.title || t.html("&#160;"), t.text(this.options.title)
  4899. },
  4900. _createButtonPane: function () {
  4901. this.uiDialogButtonPane = t("<div>").addClass(
  4902. "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), this.uiButtonSet = t(
  4903. "<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane), this._createButtons()
  4904. },
  4905. _createButtons: function () {
  4906. var e = this,
  4907. i = this.options.buttons;
  4908. return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), t.isEmptyObject(i) || t.isArray(
  4909. i) && !i.length ? (this.uiDialog.removeClass("ui-dialog-buttons"), undefined) : (t.each(
  4910. i,
  4911. function (i, s) {
  4912. var n, o;
  4913. s = t.isFunction(s) ? {
  4914. click: s,
  4915. text: i
  4916. } : s, s = t.extend({
  4917. type: "button"
  4918. }, s), n = s.click, s.click = function () {
  4919. n.apply(e.element[0], arguments)
  4920. }, o = {
  4921. icons: s.icons,
  4922. text: s.showText
  4923. }, delete s.icons, delete s.showText, t("<button></button>", s).button(o).appendTo(
  4924. e.uiButtonSet)
  4925. }), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(
  4926. this.uiDialog), undefined)
  4927. },
  4928. _makeDraggable: function () {
  4929. function e(t) {
  4930. return {
  4931. position: t.position,
  4932. offset: t.offset
  4933. }
  4934. }
  4935. var i = this,
  4936. s = this.options;
  4937. this.uiDialog.draggable({
  4938. cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
  4939. handle: ".ui-dialog-titlebar",
  4940. containment: "document",
  4941. start: function (s, n) {
  4942. t(this).addClass("ui-dialog-dragging"), i._blockFrames(), i._trigger(
  4943. "dragStart", s, e(n))
  4944. },
  4945. drag: function (t, s) {
  4946. i._trigger("drag", t, e(s))
  4947. },
  4948. stop: function (n, o) {
  4949. s.position = [o.position.left - i.document.scrollLeft(), o.position.top - i
  4950. .document.scrollTop()], t(this).removeClass("ui-dialog-dragging"),
  4951. i._unblockFrames(), i._trigger("dragStop", n, e(o))
  4952. }
  4953. })
  4954. },
  4955. _makeResizable: function () {
  4956. function e(t) {
  4957. return {
  4958. originalPosition: t.originalPosition,
  4959. originalSize: t.originalSize,
  4960. position: t.position,
  4961. size: t.size
  4962. }
  4963. }
  4964. var i = this,
  4965. s = this.options,
  4966. n = s.resizable,
  4967. o = this.uiDialog.css("position"),
  4968. a = "string" == typeof n ? n : "n,e,s,w,se,sw,ne,nw";
  4969. this.uiDialog.resizable({
  4970. cancel: ".ui-dialog-content",
  4971. containment: "document",
  4972. alsoResize: this.element,
  4973. maxWidth: s.maxWidth,
  4974. maxHeight: s.maxHeight,
  4975. minWidth: s.minWidth,
  4976. minHeight: this._minHeight(),
  4977. handles: a,
  4978. start: function (s, n) {
  4979. t(this).addClass("ui-dialog-resizing"), i._blockFrames(), i._trigger(
  4980. "resizeStart", s, e(n))
  4981. },
  4982. resize: function (t, s) {
  4983. i._trigger("resize", t, e(s))
  4984. },
  4985. stop: function (n, o) {
  4986. s.height = t(this).height(), s.width = t(this).width(), t(this).removeClass(
  4987. "ui-dialog-resizing"), i._unblockFrames(), i._trigger("resizeStop",
  4988. n, e(o))
  4989. }
  4990. }).css("position", o)
  4991. },
  4992. _minHeight: function () {
  4993. var t = this.options;
  4994. return "auto" === t.height ? t.minHeight : Math.min(t.minHeight, t.height)
  4995. },
  4996. _position: function () {
  4997. var t = this.uiDialog.is(":visible");
  4998. t || this.uiDialog.show(), this.uiDialog.position(this.options.position), t || this.uiDialog.hide()
  4999. },
  5000. _setOptions: function (s) {
  5001. var n = this,
  5002. o = !1,
  5003. a = {};
  5004. t.each(s, function (t, s) {
  5005. n._setOption(t, s), t in e && (o = !0), t in i && (a[t] = s)
  5006. }), o && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog
  5007. .resizable("option", a)
  5008. },
  5009. _setOption: function (t, e) {
  5010. var i, s, n = this.uiDialog;
  5011. "dialogClass" === t && n.removeClass(this.options.dialogClass).addClass(e), "disabled" !== t &&
  5012. (this._super(t, e), "appendTo" === t && this.uiDialog.appendTo(this._appendTo()), "buttons" ===
  5013. t && this._createButtons(), "closeText" === t && this.uiDialogTitlebarClose.button({
  5014. label: "" + e
  5015. }), "draggable" === t && (i = n.is(":data(ui-draggable)"), i && !e && n.draggable(
  5016. "destroy"), !i && e && this._makeDraggable()), "position" === t && this._position(),
  5017. "resizable" === t && (s = n.is(":data(ui-resizable)"), s && !e && n.resizable("destroy"),
  5018. s && "string" == typeof e && n.resizable("option", "handles", e), s || e === !1 ||
  5019. this._makeResizable()), "title" === t && this._title(this.uiDialogTitlebar.find(
  5020. ".ui-dialog-title")))
  5021. },
  5022. _size: function () {
  5023. var t, e, i, s = this.options;
  5024. this.element.show().css({
  5025. width: "auto",
  5026. minHeight: 0,
  5027. maxHeight: "none",
  5028. height: 0
  5029. }), s.minWidth > s.width && (s.width = s.minWidth), t = this.uiDialog.css({
  5030. height: "auto",
  5031. width: s.width
  5032. }).outerHeight(), e = Math.max(0, s.minHeight - t), i = "number" == typeof s.maxHeight ?
  5033. Math.max(0, s.maxHeight - t) : "none", "auto" === s.height ? this.element.css({
  5034. minHeight: e,
  5035. maxHeight: i,
  5036. height: "auto"
  5037. }) : this.element.height(Math.max(0, s.height - t)), this.uiDialog.is(":data(ui-resizable)") &&
  5038. this.uiDialog.resizable("option", "minHeight", this._minHeight())
  5039. },
  5040. _blockFrames: function () {
  5041. this.iframeBlocks = this.document.find("iframe").map(function () {
  5042. var e = t(this);
  5043. return t("<div>").css({
  5044. position: "absolute",
  5045. width: e.outerWidth(),
  5046. height: e.outerHeight()
  5047. }).appendTo(e.parent()).offset(e.offset())[0]
  5048. })
  5049. },
  5050. _unblockFrames: function () {
  5051. this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
  5052. },
  5053. _allowInteraction: function (e) {
  5054. return t(e.target).closest(".ui-dialog").length ? !0 : !!t(e.target).closest(".ui-datepicker").length
  5055. },
  5056. _createOverlay: function () {
  5057. if (this.options.modal) {
  5058. var e = this,
  5059. i = this.widgetFullName;
  5060. t.ui.dialog.overlayInstances || this._delay(function () {
  5061. t.ui.dialog.overlayInstances && this.document.bind("focusin.dialog", function (
  5062. s) {
  5063. e._allowInteraction(s) || (s.preventDefault(), t(
  5064. ".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())
  5065. })
  5066. }), this.overlay = t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),
  5067. this._on(this.overlay, {
  5068. mousedown: "_keepFocus"
  5069. }), t.ui.dialog.overlayInstances++
  5070. }
  5071. },
  5072. _destroyOverlay: function () {
  5073. this.options.modal && this.overlay && (t.ui.dialog.overlayInstances--, t.ui.dialog.overlayInstances ||
  5074. this.document.unbind("focusin.dialog"), this.overlay.remove(), this.overlay = null)
  5075. }
  5076. }), t.ui.dialog.overlayInstances = 0, t.uiBackCompat !== !1 && t.widget("ui.dialog", t.ui.dialog, {
  5077. _position: function () {
  5078. var e, i = this.options.position,
  5079. s = [],
  5080. n = [0, 0];
  5081. i ? (("string" == typeof i || "object" == typeof i && "0" in i) && (s = i.split ? i.split(" ") :
  5082. [i[0], i[1]], 1 === s.length && (s[1] = s[0]), t.each(["left", "top"], function (t,
  5083. e) {
  5084. +s[t] === s[t] && (n[t] = s[t], s[t] = e)
  5085. }), i = {
  5086. my: s[0] + (0 > n[0] ? n[0] : "+" + n[0]) + " " + s[1] + (0 > n[1] ? n[1] : "+" +
  5087. n[1]),
  5088. at: s.join(" ")
  5089. }), i = t.extend({}, t.ui.dialog.prototype.options.position, i)) : i = t.ui.dialog.prototype
  5090. .options.position, e = this.uiDialog.is(":visible"), e || this.uiDialog.show(), this.uiDialog
  5091. .position(i), e || this.uiDialog.hide()
  5092. }
  5093. })
  5094. }(jQuery),
  5095. function (t) {
  5096. var e = /up|down|vertical/,
  5097. i = /up|left|vertical|horizontal/;
  5098. t.effects.effect.blind = function (s, n) {
  5099. var o, a, r, h = t(this),
  5100. l = ["position", "top", "bottom", "left", "right", "height", "width"],
  5101. c = t.effects.setMode(h, s.mode || "hide"),
  5102. u = s.direction || "up",
  5103. d = e.test(u),
  5104. p = d ? "height" : "width",
  5105. f = d ? "top" : "left",
  5106. g = i.test(u),
  5107. m = {},
  5108. v = "show" === c;
  5109. h.parent().is(".ui-effects-wrapper") ? t.effects.save(h.parent(), l) : t.effects.save(h, l), h.show(), o =
  5110. t.effects.createWrapper(h).css({
  5111. overflow: "hidden"
  5112. }), a = o[p](), r = parseFloat(o.css(f)) || 0, m[p] = v ? a : 0, g || (h.css(d ? "bottom" : "right", 0)
  5113. .css(d ? "top" : "left", "auto").css({
  5114. position: "absolute"
  5115. }), m[f] = v ? r : a + r), v && (o.css(p, 0), g || o.css(f, r + a)), o.animate(m, {
  5116. duration: s.duration,
  5117. easing: s.easing,
  5118. queue: !1,
  5119. complete: function () {
  5120. "hide" === c && h.hide(), t.effects.restore(h, l), t.effects.removeWrapper(h), n()
  5121. }
  5122. })
  5123. }
  5124. }(jQuery),
  5125. function (t) {
  5126. t.effects.effect.bounce = function (e, i) {
  5127. var s, n, o, a = t(this),
  5128. r = ["position", "top", "bottom", "left", "right", "height", "width"],
  5129. h = t.effects.setMode(a, e.mode || "effect"),
  5130. l = "hide" === h,
  5131. c = "show" === h,
  5132. u = e.direction || "up",
  5133. d = e.distance,
  5134. p = e.times || 5,
  5135. f = 2 * p + (c || l ? 1 : 0),
  5136. g = e.duration / f,
  5137. m = e.easing,
  5138. v = "up" === u || "down" === u ? "top" : "left",
  5139. _ = "up" === u || "left" === u,
  5140. b = a.queue(),
  5141. y = b.length;
  5142. for ((c || l) && r.push("opacity"), t.effects.save(a, r), a.show(), t.effects.createWrapper(a), d || (d = a[
  5143. "top" === v ? "outerHeight" : "outerWidth"]() / 3), c && (o = {
  5144. opacity: 1
  5145. }, o[v] = 0, a.css("opacity", 0).css(v, _ ? 2 * -d : 2 * d).animate(o, g, m)), l && (d /= Math.pow(2, p -
  5146. 1)), o = {}, o[v] = 0, s = 0; p > s; s++) n = {}, n[v] = (_ ? "-=" : "+=") + d, a.animate(n, g, m).animate(
  5147. o, g, m), d = l ? 2 * d : d / 2;
  5148. l && (n = {
  5149. opacity: 0
  5150. }, n[v] = (_ ? "-=" : "+=") + d, a.animate(n, g, m)), a.queue(function () {
  5151. l && a.hide(), t.effects.restore(a, r), t.effects.removeWrapper(a), i()
  5152. }), y > 1 && b.splice.apply(b, [1, 0].concat(b.splice(y, f + 1))), a.dequeue()
  5153. }
  5154. }(jQuery),
  5155. function (t) {
  5156. t.effects.effect.clip = function (e, i) {
  5157. var s, n, o, a = t(this),
  5158. r = ["position", "top", "bottom", "left", "right", "height", "width"],
  5159. h = t.effects.setMode(a, e.mode || "hide"),
  5160. l = "show" === h,
  5161. c = e.direction || "vertical",
  5162. u = "vertical" === c,
  5163. d = u ? "height" : "width",
  5164. p = u ? "top" : "left",
  5165. f = {};
  5166. t.effects.save(a, r), a.show(), s = t.effects.createWrapper(a).css({
  5167. overflow: "hidden"
  5168. }), n = "IMG" === a[0].tagName ? s : a, o = n[d](), l && (n.css(d, 0), n.css(p, o / 2)), f[d] = l ? o :
  5169. 0, f[p] = l ? 0 : o / 2, n.animate(f, {
  5170. queue: !1,
  5171. duration: e.duration,
  5172. easing: e.easing,
  5173. complete: function () {
  5174. l || a.hide(), t.effects.restore(a, r), t.effects.removeWrapper(a), i()
  5175. }
  5176. })
  5177. }
  5178. }(jQuery),
  5179. function (t) {
  5180. t.effects.effect.drop = function (e, i) {
  5181. var s, n = t(this),
  5182. o = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
  5183. a = t.effects.setMode(n, e.mode || "hide"),
  5184. r = "show" === a,
  5185. h = e.direction || "left",
  5186. l = "up" === h || "down" === h ? "top" : "left",
  5187. c = "up" === h || "left" === h ? "pos" : "neg",
  5188. u = {
  5189. opacity: r ? 1 : 0
  5190. };
  5191. t.effects.save(n, o), n.show(), t.effects.createWrapper(n), s = e.distance || n["top" === l ? "outerHeight" :
  5192. "outerWidth"](!0) / 2, r && n.css("opacity", 0).css(l, "pos" === c ? -s : s), u[l] = (r ? "pos" ===
  5193. c ? "+=" : "-=" : "pos" === c ? "-=" : "+=") + s, n.animate(u, {
  5194. queue: !1,
  5195. duration: e.duration,
  5196. easing: e.easing,
  5197. complete: function () {
  5198. "hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()
  5199. }
  5200. })
  5201. }
  5202. }(jQuery),
  5203. function (t) {
  5204. t.effects.effect.explode = function (e, i) {
  5205. function s() {
  5206. b.push(this), b.length === u * d && n()
  5207. }
  5208. function n() {
  5209. p.css({
  5210. visibility: "visible"
  5211. }), t(b).remove(), g || p.hide(), i()
  5212. }
  5213. var o, a, r, h, l, c, u = e.pieces ? Math.round(Math.sqrt(e.pieces)) : 3,
  5214. d = u,
  5215. p = t(this),
  5216. f = t.effects.setMode(p, e.mode || "hide"),
  5217. g = "show" === f,
  5218. m = p.show().css("visibility", "hidden").offset(),
  5219. v = Math.ceil(p.outerWidth() / d),
  5220. _ = Math.ceil(p.outerHeight() / u),
  5221. b = [];
  5222. for (o = 0; u > o; o++)
  5223. for (h = m.top + o * _, c = o - (u - 1) / 2, a = 0; d > a; a++) r = m.left + a * v, l = a - (d - 1) / 2,
  5224. p.clone().appendTo("body").wrap("<div></div>").css({
  5225. position: "absolute",
  5226. visibility: "visible",
  5227. left: -a * v,
  5228. top: -o * _
  5229. }).parent().addClass("ui-effects-explode").css({
  5230. position: "absolute",
  5231. overflow: "hidden",
  5232. width: v,
  5233. height: _,
  5234. left: r + (g ? l * v : 0),
  5235. top: h + (g ? c * _ : 0),
  5236. opacity: g ? 0 : 1
  5237. }).animate({
  5238. left: r + (g ? 0 : l * v),
  5239. top: h + (g ? 0 : c * _),
  5240. opacity: g ? 1 : 0
  5241. }, e.duration || 500, e.easing, s)
  5242. }
  5243. }(jQuery),
  5244. function (t) {
  5245. t.effects.effect.fade = function (e, i) {
  5246. var s = t(this),
  5247. n = t.effects.setMode(s, e.mode || "toggle");
  5248. s.animate({
  5249. opacity: n
  5250. }, {
  5251. queue: !1,
  5252. duration: e.duration,
  5253. easing: e.easing,
  5254. complete: i
  5255. })
  5256. }
  5257. }(jQuery),
  5258. function (t) {
  5259. t.effects.effect.fold = function (e, i) {
  5260. var s, n, o = t(this),
  5261. a = ["position", "top", "bottom", "left", "right", "height", "width"],
  5262. r = t.effects.setMode(o, e.mode || "hide"),
  5263. h = "show" === r,
  5264. l = "hide" === r,
  5265. c = e.size || 15,
  5266. u = /([0-9]+)%/.exec(c),
  5267. d = !!e.horizFirst,
  5268. p = h !== d,
  5269. f = p ? ["width", "height"] : ["height", "width"],
  5270. g = e.duration / 2,
  5271. m = {},
  5272. v = {};
  5273. t.effects.save(o, a), o.show(), s = t.effects.createWrapper(o).css({
  5274. overflow: "hidden"
  5275. }), n = p ? [s.width(), s.height()] : [s.height(), s.width()], u && (c = parseInt(u[1], 10) / 100 * n[l ?
  5276. 0 : 1]), h && s.css(d ? {
  5277. height: 0,
  5278. width: c
  5279. } : {
  5280. height: c,
  5281. width: 0
  5282. }), m[f[0]] = h ? n[0] : c, v[f[1]] = h ? n[1] : 0, s.animate(m, g, e.easing).animate(v, g, e.easing,
  5283. function () {
  5284. l && o.hide(), t.effects.restore(o, a), t.effects.removeWrapper(o), i()
  5285. })
  5286. }
  5287. }(jQuery),
  5288. function (t) {
  5289. t.effects.effect.highlight = function (e, i) {
  5290. var s = t(this),
  5291. n = ["backgroundImage", "backgroundColor", "opacity"],
  5292. o = t.effects.setMode(s, e.mode || "show"),
  5293. a = {
  5294. backgroundColor: s.css("backgroundColor")
  5295. };
  5296. "hide" === o && (a.opacity = 0), t.effects.save(s, n), s.show().css({
  5297. backgroundImage: "none",
  5298. backgroundColor: e.color || "#ffff99"
  5299. }).animate(a, {
  5300. queue: !1,
  5301. duration: e.duration,
  5302. easing: e.easing,
  5303. complete: function () {
  5304. "hide" === o && s.hide(), t.effects.restore(s, n), i()
  5305. }
  5306. })
  5307. }
  5308. }(jQuery),
  5309. function (t) {
  5310. t.effects.effect.pulsate = function (e, i) {
  5311. var s, n = t(this),
  5312. o = t.effects.setMode(n, e.mode || "show"),
  5313. a = "show" === o,
  5314. r = "hide" === o,
  5315. h = a || "hide" === o,
  5316. l = 2 * (e.times || 5) + (h ? 1 : 0),
  5317. c = e.duration / l,
  5318. u = 0,
  5319. d = n.queue(),
  5320. p = d.length;
  5321. for ((a || !n.is(":visible")) && (n.css("opacity", 0).show(), u = 1), s = 1; l > s; s++) n.animate({
  5322. opacity: u
  5323. }, c, e.easing), u = 1 - u;
  5324. n.animate({
  5325. opacity: u
  5326. }, c, e.easing), n.queue(function () {
  5327. r && n.hide(), i()
  5328. }), p > 1 && d.splice.apply(d, [1, 0].concat(d.splice(p, l + 1))), n.dequeue()
  5329. }
  5330. }(jQuery),
  5331. function (t) {
  5332. t.effects.effect.puff = function (e, i) {
  5333. var s = t(this),
  5334. n = t.effects.setMode(s, e.mode || "hide"),
  5335. o = "hide" === n,
  5336. a = parseInt(e.percent, 10) || 150,
  5337. r = a / 100,
  5338. h = {
  5339. height: s.height(),
  5340. width: s.width(),
  5341. outerHeight: s.outerHeight(),
  5342. outerWidth: s.outerWidth()
  5343. };
  5344. t.extend(e, {
  5345. effect: "scale",
  5346. queue: !1,
  5347. fade: !0,
  5348. mode: n,
  5349. complete: i,
  5350. percent: o ? a : 100,
  5351. from: o ? h : {
  5352. height: h.height * r,
  5353. width: h.width * r,
  5354. outerHeight: h.outerHeight * r,
  5355. outerWidth: h.outerWidth * r
  5356. }
  5357. }), s.effect(e)
  5358. }, t.effects.effect.scale = function (e, i) {
  5359. var s = t(this),
  5360. n = t.extend(!0, {}, e),
  5361. o = t.effects.setMode(s, e.mode || "effect"),
  5362. a = parseInt(e.percent, 10) || (0 === parseInt(e.percent, 10) ? 0 : "hide" === o ? 0 : 100),
  5363. r = e.direction || "both",
  5364. h = e.origin,
  5365. l = {
  5366. height: s.height(),
  5367. width: s.width(),
  5368. outerHeight: s.outerHeight(),
  5369. outerWidth: s.outerWidth()
  5370. },
  5371. c = {
  5372. y: "horizontal" !== r ? a / 100 : 1,
  5373. x: "vertical" !== r ? a / 100 : 1
  5374. };
  5375. n.effect = "size", n.queue = !1, n.complete = i, "effect" !== o && (n.origin = h || ["middle", "center"], n
  5376. .restore = !0), n.from = e.from || ("show" === o ? {
  5377. height: 0,
  5378. width: 0,
  5379. outerHeight: 0,
  5380. outerWidth: 0
  5381. } : l), n.to = {
  5382. height: l.height * c.y,
  5383. width: l.width * c.x,
  5384. outerHeight: l.outerHeight * c.y,
  5385. outerWidth: l.outerWidth * c.x
  5386. }, n.fade && ("show" === o && (n.from.opacity = 0, n.to.opacity = 1), "hide" === o && (n.from.opacity =
  5387. 1, n.to.opacity = 0)), s.effect(n)
  5388. }, t.effects.effect.size = function (e, i) {
  5389. var s, n, o, a = t(this),
  5390. r = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
  5391. h = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
  5392. l = ["width", "height", "overflow"],
  5393. c = ["fontSize"],
  5394. u = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
  5395. d = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
  5396. p = t.effects.setMode(a, e.mode || "effect"),
  5397. f = e.restore || "effect" !== p,
  5398. g = e.scale || "both",
  5399. m = e.origin || ["middle", "center"],
  5400. v = a.css("position"),
  5401. _ = f ? r : h,
  5402. b = {
  5403. height: 0,
  5404. width: 0,
  5405. outerHeight: 0,
  5406. outerWidth: 0
  5407. };
  5408. "show" === p && a.show(), s = {
  5409. height: a.height(),
  5410. width: a.width(),
  5411. outerHeight: a.outerHeight(),
  5412. outerWidth: a.outerWidth()
  5413. }, "toggle" === e.mode && "show" === p ? (a.from = e.to || b, a.to = e.from || s) : (a.from = e.from ||
  5414. ("show" === p ? b : s), a.to = e.to || ("hide" === p ? b : s)), o = {
  5415. from: {
  5416. y: a.from.height / s.height,
  5417. x: a.from.width / s.width
  5418. },
  5419. to: {
  5420. y: a.to.height / s.height,
  5421. x: a.to.width / s.width
  5422. }
  5423. }, ("box" === g || "both" === g) && (o.from.y !== o.to.y && (_ = _.concat(u), a.from = t.effects.setTransition(
  5424. a, u, o.from.y, a.from), a.to = t.effects.setTransition(a, u, o.to.y, a.to)), o.from.x !== o.to
  5425. .x && (_ = _.concat(d), a.from = t.effects.setTransition(a, d, o.from.x, a.from), a.to = t.effects.setTransition(
  5426. a, d, o.to.x, a.to))), ("content" === g || "both" === g) && o.from.y !== o.to.y && (_ = _.concat(
  5427. c).concat(l), a.from = t.effects.setTransition(a, c, o.from.y, a.from), a.to = t.effects.setTransition(
  5428. a, c, o.to.y, a.to)), t.effects.save(a, _), a.show(), t.effects.createWrapper(a), a.css("overflow",
  5429. "hidden").css(a.from), m && (n = t.effects.getBaseline(m, s), a.from.top = (s.outerHeight - a.outerHeight()) *
  5430. n.y, a.from.left = (s.outerWidth - a.outerWidth()) * n.x, a.to.top = (s.outerHeight - a.to.outerHeight) *
  5431. n.y, a.to.left = (s.outerWidth - a.to.outerWidth) * n.x), a.css(a.from), ("content" === g || "both" ===
  5432. g) && (u = u.concat(["marginTop", "marginBottom"]).concat(c), d = d.concat(["marginLeft",
  5433. "marginRight"]), l = r.concat(u).concat(d), a.find("*[width]").each(function () {
  5434. var i = t(this),
  5435. s = {
  5436. height: i.height(),
  5437. width: i.width(),
  5438. outerHeight: i.outerHeight(),
  5439. outerWidth: i.outerWidth()
  5440. };
  5441. f && t.effects.save(i, l), i.from = {
  5442. height: s.height * o.from.y,
  5443. width: s.width * o.from.x,
  5444. outerHeight: s.outerHeight * o.from.y,
  5445. outerWidth: s.outerWidth * o.from.x
  5446. }, i.to = {
  5447. height: s.height * o.to.y,
  5448. width: s.width * o.to.x,
  5449. outerHeight: s.height * o.to.y,
  5450. outerWidth: s.width * o.to.x
  5451. }, o.from.y !== o.to.y && (i.from = t.effects.setTransition(i, u, o.from.y, i.from), i.to =
  5452. t.effects.setTransition(i, u, o.to.y, i.to)), o.from.x !== o.to.x && (i.from = t.effects
  5453. .setTransition(i, d, o.from.x, i.from), i.to = t.effects.setTransition(i, d, o.to.x,
  5454. i.to)), i.css(i.from), i.animate(i.to, e.duration, e.easing, function () {
  5455. f && t.effects.restore(i, l)
  5456. })
  5457. })), a.animate(a.to, {
  5458. queue: !1,
  5459. duration: e.duration,
  5460. easing: e.easing,
  5461. complete: function () {
  5462. 0 === a.to.opacity && a.css("opacity", a.from.opacity), "hide" === p && a.hide(), t.effects
  5463. .restore(a, _), f || ("static" === v ? a.css({
  5464. position: "relative",
  5465. top: a.to.top,
  5466. left: a.to.left
  5467. }) : t.each(["top", "left"], function (t, e) {
  5468. a.css(e, function (e, i) {
  5469. var s = parseInt(i, 10),
  5470. n = t ? a.to.left : a.to.top;
  5471. return "auto" === i ? n + "px" : s + n + "px"
  5472. })
  5473. })), t.effects.removeWrapper(a), i()
  5474. }
  5475. })
  5476. }
  5477. }(jQuery),
  5478. function (t) {
  5479. t.effects.effect.shake = function (e, i) {
  5480. var s, n = t(this),
  5481. o = ["position", "top", "bottom", "left", "right", "height", "width"],
  5482. a = t.effects.setMode(n, e.mode || "effect"),
  5483. r = e.direction || "left",
  5484. h = e.distance || 20,
  5485. l = e.times || 3,
  5486. c = 2 * l + 1,
  5487. u = Math.round(e.duration / c),
  5488. d = "up" === r || "down" === r ? "top" : "left",
  5489. p = "up" === r || "left" === r,
  5490. f = {},
  5491. g = {},
  5492. m = {},
  5493. v = n.queue(),
  5494. _ = v.length;
  5495. for (t.effects.save(n, o), n.show(), t.effects.createWrapper(n), f[d] = (p ? "-=" : "+=") + h, g[d] = (p ?
  5496. "+=" : "-=") + 2 * h, m[d] = (p ? "-=" : "+=") + 2 * h, n.animate(f, u, e.easing), s = 1; l > s; s++)
  5497. n.animate(g, u, e.easing).animate(m, u, e.easing);
  5498. n.animate(g, u, e.easing).animate(f, u / 2, e.easing).queue(function () {
  5499. "hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()
  5500. }), _ > 1 && v.splice.apply(v, [1, 0].concat(v.splice(_, c + 1))), n.dequeue()
  5501. }
  5502. }(jQuery),
  5503. function (t) {
  5504. t.effects.effect.slide = function (e, i) {
  5505. var s, n = t(this),
  5506. o = ["position", "top", "bottom", "left", "right", "width", "height"],
  5507. a = t.effects.setMode(n, e.mode || "show"),
  5508. r = "show" === a,
  5509. h = e.direction || "left",
  5510. l = "up" === h || "down" === h ? "top" : "left",
  5511. c = "up" === h || "left" === h,
  5512. u = {};
  5513. t.effects.save(n, o), n.show(), s = e.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0), t.effects
  5514. .createWrapper(n).css({
  5515. overflow: "hidden"
  5516. }), r && n.css(l, c ? isNaN(s) ? "-" + s : -s : s), u[l] = (r ? c ? "+=" : "-=" : c ? "-=" : "+=") + s,
  5517. n.animate(u, {
  5518. queue: !1,
  5519. duration: e.duration,
  5520. easing: e.easing,
  5521. complete: function () {
  5522. "hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()
  5523. }
  5524. })
  5525. }
  5526. }(jQuery),
  5527. function (t) {
  5528. t.effects.effect.transfer = function (e, i) {
  5529. var s = t(this),
  5530. n = t(e.to),
  5531. o = "fixed" === n.css("position"),
  5532. a = t("body"),
  5533. r = o ? a.scrollTop() : 0,
  5534. h = o ? a.scrollLeft() : 0,
  5535. l = n.offset(),
  5536. c = {
  5537. top: l.top - r,
  5538. left: l.left - h,
  5539. height: n.innerHeight(),
  5540. width: n.innerWidth()
  5541. },
  5542. u = s.offset(),
  5543. d = t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({
  5544. top: u.top - r,
  5545. left: u.left - h,
  5546. height: s.innerHeight(),
  5547. width: s.innerWidth(),
  5548. position: o ? "fixed" : "absolute"
  5549. }).animate(c, e.duration, e.easing, function () {
  5550. d.remove(), i()
  5551. })
  5552. }
  5553. }(jQuery),
  5554. function (t) {
  5555. t.widget("ui.menu", {
  5556. version: "1.10.3",
  5557. defaultElement: "<ul>",
  5558. delay: 300,
  5559. options: {
  5560. icons: {
  5561. submenu: "ui-icon-carat-1-e"
  5562. },
  5563. menus: "ul",
  5564. position: {
  5565. my: "left top",
  5566. at: "right top"
  5567. },
  5568. role: "menu",
  5569. blur: null,
  5570. focus: null,
  5571. select: null
  5572. },
  5573. _create: function () {
  5574. this.activeMenu = this.element, this.mouseHandled = !1, this.element.uniqueId().addClass(
  5575. "ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons", !!
  5576. this.element.find(".ui-icon").length).attr({
  5577. role: this.options.role,
  5578. tabIndex: 0
  5579. }).bind("click" + this.eventNamespace, t.proxy(function (t) {
  5580. this.options.disabled && t.preventDefault()
  5581. }, this)), this.options.disabled && this.element.addClass("ui-state-disabled").attr(
  5582. "aria-disabled", "true"), this._on({
  5583. "mousedown .ui-menu-item > a": function (t) {
  5584. t.preventDefault()
  5585. },
  5586. "click .ui-state-disabled > a": function (t) {
  5587. t.preventDefault()
  5588. },
  5589. "click .ui-menu-item:has(a)": function (e) {
  5590. var i = t(e.target).closest(".ui-menu-item");
  5591. !this.mouseHandled && i.not(".ui-state-disabled").length && (this.mouseHandled = !
  5592. 0, this.select(e), i.has(".ui-menu").length ? this.expand(e) : this
  5593. .element.is(":focus") || (this.element.trigger("focus", [!0]), this
  5594. .active && 1 === this.active.parents(".ui-menu").length &&
  5595. clearTimeout(this.timer)))
  5596. },
  5597. "mouseenter .ui-menu-item": function (e) {
  5598. var i = t(e.currentTarget);
  5599. i.siblings().children(".ui-state-active").removeClass("ui-state-active"),
  5600. this.focus(e, i)
  5601. },
  5602. mouseleave: "collapseAll",
  5603. "mouseleave .ui-menu": "collapseAll",
  5604. focus: function (t, e) {
  5605. var i = this.active || this.element.children(".ui-menu-item").eq(0);
  5606. e || this.focus(t, i)
  5607. },
  5608. blur: function (e) {
  5609. this._delay(function () {
  5610. t.contains(this.element[0], this.document[0].activeElement) ||
  5611. this.collapseAll(e)
  5612. })
  5613. },
  5614. keydown: "_keydown"
  5615. }), this.refresh(), this._on(this.document, {
  5616. click: function (e) {
  5617. t(e.target).closest(".ui-menu").length || this.collapseAll(e), this.mouseHandled = !
  5618. 1
  5619. }
  5620. })
  5621. },
  5622. _destroy: function () {
  5623. this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass(
  5624. "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr(
  5625. "tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr(
  5626. "aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(), this.element.find(
  5627. ".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr(
  5628. "aria-disabled").children("a").removeUniqueId().removeClass(
  5629. "ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr(
  5630. "aria-haspopup").children().each(function () {
  5631. var e = t(this);
  5632. e.data("ui-menu-submenu-carat") && e.remove()
  5633. }), this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
  5634. },
  5635. _keydown: function (e) {
  5636. function i(t) {
  5637. return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
  5638. }
  5639. var s, n, o, a, r, h = !0;
  5640. switch (e.keyCode) {
  5641. case t.ui.keyCode.PAGE_UP:
  5642. this.previousPage(e);
  5643. break;
  5644. case t.ui.keyCode.PAGE_DOWN:
  5645. this.nextPage(e);
  5646. break;
  5647. case t.ui.keyCode.HOME:
  5648. this._move("first", "first", e);
  5649. break;
  5650. case t.ui.keyCode.END:
  5651. this._move("last", "last", e);
  5652. break;
  5653. case t.ui.keyCode.UP:
  5654. this.previous(e);
  5655. break;
  5656. case t.ui.keyCode.DOWN:
  5657. this.next(e);
  5658. break;
  5659. case t.ui.keyCode.LEFT:
  5660. this.collapse(e);
  5661. break;
  5662. case t.ui.keyCode.RIGHT:
  5663. this.active && !this.active.is(".ui-state-disabled") && this.expand(e);
  5664. break;
  5665. case t.ui.keyCode.ENTER:
  5666. case t.ui.keyCode.SPACE:
  5667. this._activate(e);
  5668. break;
  5669. case t.ui.keyCode.ESCAPE:
  5670. this.collapse(e);
  5671. break;
  5672. default:
  5673. h = !1, n = this.previousFilter || "", o = String.fromCharCode(e.keyCode), a = !1,
  5674. clearTimeout(this.filterTimer), o === n ? a = !0 : o = n + o, r = RegExp("^" + i(o),
  5675. "i"), s = this.activeMenu.children(".ui-menu-item").filter(function () {
  5676. return r.test(t(this).children("a").text())
  5677. }), s = a && -1 !== s.index(this.active.next()) ? this.active.nextAll(
  5678. ".ui-menu-item") : s, s.length || (o = String.fromCharCode(e.keyCode), r =
  5679. RegExp("^" + i(o), "i"), s = this.activeMenu.children(".ui-menu-item").filter(
  5680. function () {
  5681. return r.test(t(this).children("a").text())
  5682. })), s.length ? (this.focus(e, s), s.length > 1 ? (this.previousFilter = o,
  5683. this.filterTimer = this._delay(function () {
  5684. delete this.previousFilter
  5685. }, 1e3)) : delete this.previousFilter) : delete this.previousFilter
  5686. }
  5687. h && e.preventDefault()
  5688. },
  5689. _activate: function (t) {
  5690. this.active.is(".ui-state-disabled") || (this.active.children("a[aria-haspopup='true']").length ?
  5691. this.expand(t) : this.select(t))
  5692. },
  5693. refresh: function () {
  5694. var e, i = this.options.icons.submenu,
  5695. s = this.element.find(this.options.menus);
  5696. s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide()
  5697. .attr({
  5698. role: this.options.role,
  5699. "aria-hidden": "true",
  5700. "aria-expanded": "false"
  5701. }).each(function () {
  5702. var e = t(this),
  5703. s = e.prev("a"),
  5704. n = t("<span>").addClass("ui-menu-icon ui-icon " + i).data(
  5705. "ui-menu-submenu-carat", !0);
  5706. s.attr("aria-haspopup", "true").prepend(n), e.attr("aria-labelledby", s.attr("id"))
  5707. }), e = s.add(this.element), e.children(":not(.ui-menu-item):has(a)").addClass(
  5708. "ui-menu-item").attr("role", "presentation").children("a").uniqueId().addClass(
  5709. "ui-corner-all").attr({
  5710. tabIndex: -1,
  5711. role: this._itemRole()
  5712. }), e.children(":not(.ui-menu-item)").each(function () {
  5713. var e = t(this);
  5714. /[^\-\u2014\u2013\s]/.test(e.text()) || e.addClass(
  5715. "ui-widget-content ui-menu-divider")
  5716. }), e.children(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !t.contains(
  5717. this.element[0], this.active[0]) && this.blur()
  5718. },
  5719. _itemRole: function () {
  5720. return {
  5721. menu: "menuitem",
  5722. listbox: "option"
  5723. } [this.options.role]
  5724. },
  5725. _setOption: function (t, e) {
  5726. "icons" === t && this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(
  5727. e.submenu), this._super(t, e)
  5728. },
  5729. focus: function (t, e) {
  5730. var i, s;
  5731. this.blur(t, t && "focus" === t.type), this._scrollIntoView(e), this.active = e.first(), s =
  5732. this.active.children("a").addClass("ui-state-focus"), this.options.role && this.element.attr(
  5733. "aria-activedescendant", s.attr("id")), this.active.parent().closest(".ui-menu-item").children(
  5734. "a:first").addClass("ui-state-active"), t && "keydown" === t.type ? this._close() :
  5735. this.timer = this._delay(function () {
  5736. this._close()
  5737. }, this.delay), i = e.children(".ui-menu"), i.length && /^mouse/.test(t.type) && this._startOpening(
  5738. i), this.activeMenu = e.parent(), this._trigger("focus", t, {
  5739. item: e
  5740. })
  5741. },
  5742. _scrollIntoView: function (e) {
  5743. var i, s, n, o, a, r;
  5744. this._hasScroll() && (i = parseFloat(t.css(this.activeMenu[0], "borderTopWidth")) || 0, s =
  5745. parseFloat(t.css(this.activeMenu[0], "paddingTop")) || 0, n = e.offset().top - this.activeMenu
  5746. .offset().top - i - s, o = this.activeMenu.scrollTop(), a = this.activeMenu.height(), r =
  5747. e.height(), 0 > n ? this.activeMenu.scrollTop(o + n) : n + r > a && this.activeMenu.scrollTop(
  5748. o + n - a + r))
  5749. },
  5750. blur: function (t, e) {
  5751. e || clearTimeout(this.timer), this.active && (this.active.children("a").removeClass(
  5752. "ui-state-focus"), this.active = null, this._trigger("blur", t, {
  5753. item: this.active
  5754. }))
  5755. },
  5756. _startOpening: function (t) {
  5757. clearTimeout(this.timer), "true" === t.attr("aria-hidden") && (this.timer = this._delay(
  5758. function () {
  5759. this._close(), this._open(t)
  5760. }, this.delay))
  5761. },
  5762. _open: function (e) {
  5763. var i = t.extend({
  5764. of: this.active
  5765. }, this.options.position);
  5766. clearTimeout(this.timer), this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr(
  5767. "aria-hidden", "true"), e.show().removeAttr("aria-hidden").attr("aria-expanded", "true")
  5768. .position(i)
  5769. },
  5770. collapseAll: function (e, i) {
  5771. clearTimeout(this.timer), this.timer = this._delay(function () {
  5772. var s = i ? this.element : t(e && e.target).closest(this.element.find(".ui-menu"));
  5773. s.length || (s = this.element), this._close(s), this.blur(e), this.activeMenu = s
  5774. }, this.delay)
  5775. },
  5776. _close: function (t) {
  5777. t || (t = this.active ? this.active.parent() : this.element), t.find(".ui-menu").hide().attr(
  5778. "aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass(
  5779. "ui-state-active")
  5780. },
  5781. collapse: function (t) {
  5782. var e = this.active && this.active.parent().closest(".ui-menu-item", this.element);
  5783. e && e.length && (this._close(), this.focus(t, e))
  5784. },
  5785. expand: function (t) {
  5786. var e = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first();
  5787. e && e.length && (this._open(e.parent()), this._delay(function () {
  5788. this.focus(t, e)
  5789. }))
  5790. },
  5791. next: function (t) {
  5792. this._move("next", "first", t)
  5793. },
  5794. previous: function (t) {
  5795. this._move("prev", "last", t)
  5796. },
  5797. isFirstItem: function () {
  5798. return this.active && !this.active.prevAll(".ui-menu-item").length
  5799. },
  5800. isLastItem: function () {
  5801. return this.active && !this.active.nextAll(".ui-menu-item").length
  5802. },
  5803. _move: function (t, e, i) {
  5804. var s;
  5805. this.active && (s = "first" === t || "last" === t ? this.active["first" === t ? "prevAll" :
  5806. "nextAll"](".ui-menu-item").eq(-1) : this.active[t + "All"](".ui-menu-item").eq(0)), s &&
  5807. s.length && this.active || (s = this.activeMenu.children(".ui-menu-item")[e]()), this.focus(
  5808. i, s)
  5809. },
  5810. nextPage: function (e) {
  5811. var i, s, n;
  5812. return this.active ? (this.isLastItem() || (this._hasScroll() ? (s = this.active.offset().top,
  5813. n = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () {
  5814. return i = t(this), 0 > i.offset().top - s - n
  5815. }), this.focus(e, i)) : this.focus(e, this.activeMenu.children(".ui-menu-item")[
  5816. this.active ? "last" : "first"]())), undefined) : (this.next(e), undefined)
  5817. },
  5818. previousPage: function (e) {
  5819. var i, s, n;
  5820. return this.active ? (this.isFirstItem() || (this._hasScroll() ? (s = this.active.offset().top,
  5821. n = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () {
  5822. return i = t(this), i.offset().top - s + n > 0
  5823. }), this.focus(e, i)) : this.focus(e, this.activeMenu.children(".ui-menu-item")
  5824. .first())), undefined) : (this.next(e), undefined)
  5825. },
  5826. _hasScroll: function () {
  5827. return this.element.outerHeight() < this.element.prop("scrollHeight")
  5828. },
  5829. select: function (e) {
  5830. this.active = this.active || t(e.target).closest(".ui-menu-item");
  5831. var i = {
  5832. item: this.active
  5833. };
  5834. this.active.has(".ui-menu").length || this.collapseAll(e, !0), this._trigger("select", e, i)
  5835. }
  5836. })
  5837. }(jQuery),
  5838. function (t, e) {
  5839. function i(t, e, i) {
  5840. return [parseFloat(t[0]) * (p.test(t[0]) ? e / 100 : 1), parseFloat(t[1]) * (p.test(t[1]) ? i / 100 : 1)]
  5841. }
  5842. function s(e, i) {
  5843. return parseInt(t.css(e, i), 10) || 0
  5844. }
  5845. function n(e) {
  5846. var i = e[0];
  5847. return 9 === i.nodeType ? {
  5848. width: e.width(),
  5849. height: e.height(),
  5850. offset: {
  5851. top: 0,
  5852. left: 0
  5853. }
  5854. } : t.isWindow(i) ? {
  5855. width: e.width(),
  5856. height: e.height(),
  5857. offset: {
  5858. top: e.scrollTop(),
  5859. left: e.scrollLeft()
  5860. }
  5861. } : i.preventDefault ? {
  5862. width: 0,
  5863. height: 0,
  5864. offset: {
  5865. top: i.pageY,
  5866. left: i.pageX
  5867. }
  5868. } : {
  5869. width: e.outerWidth(),
  5870. height: e.outerHeight(),
  5871. offset: e.offset()
  5872. }
  5873. }
  5874. t.ui = t.ui || {};
  5875. var o, a = Math.max,
  5876. r = Math.abs,
  5877. h = Math.round,
  5878. l = /left|center|right/,
  5879. c = /top|center|bottom/,
  5880. u = /[\+\-]\d+(\.[\d]+)?%?/,
  5881. d = /^\w+/,
  5882. p = /%$/,
  5883. f = t.fn.position;
  5884. t.position = {
  5885. scrollbarWidth: function () {
  5886. if (o !== e) return o;
  5887. var i, s, n = t(
  5888. "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"
  5889. ),
  5890. a = n.children()[0];
  5891. return t("body").append(n), i = a.offsetWidth, n.css("overflow", "scroll"), s = a.offsetWidth, i ===
  5892. s && (s = n[0].clientWidth), n.remove(), o = i - s
  5893. },
  5894. getScrollInfo: function (e) {
  5895. var i = e.isWindow ? "" : e.element.css("overflow-x"),
  5896. s = e.isWindow ? "" : e.element.css("overflow-y"),
  5897. n = "scroll" === i || "auto" === i && e.width < e.element[0].scrollWidth,
  5898. o = "scroll" === s || "auto" === s && e.height < e.element[0].scrollHeight;
  5899. return {
  5900. width: o ? t.position.scrollbarWidth() : 0,
  5901. height: n ? t.position.scrollbarWidth() : 0
  5902. }
  5903. },
  5904. getWithinInfo: function (e) {
  5905. var i = t(e || window),
  5906. s = t.isWindow(i[0]);
  5907. return {
  5908. element: i,
  5909. isWindow: s,
  5910. offset: i.offset() || {
  5911. left: 0,
  5912. top: 0
  5913. },
  5914. scrollLeft: i.scrollLeft(),
  5915. scrollTop: i.scrollTop(),
  5916. width: s ? i.width() : i.outerWidth(),
  5917. height: s ? i.height() : i.outerHeight()
  5918. }
  5919. }
  5920. }, t.fn.position = function (e) {
  5921. if (!e || !e.of) return f.apply(this, arguments);
  5922. e = t.extend({}, e);
  5923. var o, p, g, m, v, _, b = t(e.of),
  5924. y = t.position.getWithinInfo(e.within),
  5925. w = t.position.getScrollInfo(y),
  5926. k = (e.collision || "flip").split(" "),
  5927. x = {};
  5928. return _ = n(b), b[0].preventDefault && (e.at = "left top"), p = _.width, g = _.height, m = _.offset, v = t
  5929. .extend({}, m), t.each(["my", "at"], function () {
  5930. var t, i, s = (e[this] || "").split(" ");
  5931. 1 === s.length && (s = l.test(s[0]) ? s.concat(["center"]) : c.test(s[0]) ? ["center"].concat(s) :
  5932. ["center", "center"]), s[0] = l.test(s[0]) ? s[0] : "center", s[1] = c.test(s[1]) ? s[1] :
  5933. "center", t = u.exec(s[0]), i = u.exec(s[1]), x[this] = [t ? t[0] : 0, i ? i[0] : 0], e[
  5934. this] = [d.exec(s[0])[0], d.exec(s[1])[0]]
  5935. }), 1 === k.length && (k[1] = k[0]), "right" === e.at[0] ? v.left += p : "center" === e.at[0] && (v.left +=
  5936. p / 2), "bottom" === e.at[1] ? v.top += g : "center" === e.at[1] && (v.top += g / 2), o = i(x.at, p,
  5937. g), v.left += o[0], v.top += o[1], this.each(function () {
  5938. var n, l, c = t(this),
  5939. u = c.outerWidth(),
  5940. d = c.outerHeight(),
  5941. f = s(this, "marginLeft"),
  5942. _ = s(this, "marginTop"),
  5943. D = u + f + s(this, "marginRight") + w.width,
  5944. C = d + _ + s(this, "marginBottom") + w.height,
  5945. I = t.extend({}, v),
  5946. P = i(x.my, c.outerWidth(), c.outerHeight());
  5947. "right" === e.my[0] ? I.left -= u : "center" === e.my[0] && (I.left -= u / 2), "bottom" === e.my[
  5948. 1] ? I.top -= d : "center" === e.my[1] && (I.top -= d / 2), I.left += P[0], I.top += P[
  5949. 1], t.support.offsetFractions || (I.left = h(I.left), I.top = h(I.top)), n = {
  5950. marginLeft: f,
  5951. marginTop: _
  5952. }, t.each(["left", "top"], function (i, s) {
  5953. t.ui.position[k[i]] && t.ui.position[k[i]][s](I, {
  5954. targetWidth: p,
  5955. targetHeight: g,
  5956. elemWidth: u,
  5957. elemHeight: d,
  5958. collisionPosition: n,
  5959. collisionWidth: D,
  5960. collisionHeight: C,
  5961. offset: [o[0] + P[0], o[1] + P[1]],
  5962. my: e.my,
  5963. at: e.at,
  5964. within: y,
  5965. elem: c
  5966. })
  5967. }), e.using && (l = function (t) {
  5968. var i = m.left - I.left,
  5969. s = i + p - u,
  5970. n = m.top - I.top,
  5971. o = n + g - d,
  5972. h = {
  5973. target: {
  5974. element: b,
  5975. left: m.left,
  5976. top: m.top,
  5977. width: p,
  5978. height: g
  5979. },
  5980. element: {
  5981. element: c,
  5982. left: I.left,
  5983. top: I.top,
  5984. width: u,
  5985. height: d
  5986. },
  5987. horizontal: 0 > s ? "left" : i > 0 ? "right" : "center",
  5988. vertical: 0 > o ? "top" : n > 0 ? "bottom" : "middle"
  5989. };
  5990. u > p && p > r(i + s) && (h.horizontal = "center"), d > g && g > r(n + o) && (h.vertical =
  5991. "middle"), h.important = a(r(i), r(s)) > a(r(n), r(o)) ? "horizontal" :
  5992. "vertical", e.using.call(this, t, h)
  5993. }), c.offset(t.extend(I, {
  5994. using: l
  5995. }))
  5996. })
  5997. }, t.ui.position = {
  5998. fit: {
  5999. left: function (t, e) {
  6000. var i, s = e.within,
  6001. n = s.isWindow ? s.scrollLeft : s.offset.left,
  6002. o = s.width,
  6003. r = t.left - e.collisionPosition.marginLeft,
  6004. h = n - r,
  6005. l = r + e.collisionWidth - o - n;
  6006. e.collisionWidth > o ? h > 0 && 0 >= l ? (i = t.left + h + e.collisionWidth - o - n, t.left +=
  6007. h - i) : t.left = l > 0 && 0 >= h ? n : h > l ? n + o - e.collisionWidth : n : h > 0 ?
  6008. t.left += h : l > 0 ? t.left -= l : t.left = a(t.left - r, t.left)
  6009. },
  6010. top: function (t, e) {
  6011. var i, s = e.within,
  6012. n = s.isWindow ? s.scrollTop : s.offset.top,
  6013. o = e.within.height,
  6014. r = t.top - e.collisionPosition.marginTop,
  6015. h = n - r,
  6016. l = r + e.collisionHeight - o - n;
  6017. e.collisionHeight > o ? h > 0 && 0 >= l ? (i = t.top + h + e.collisionHeight - o - n, t.top +=
  6018. h - i) : t.top = l > 0 && 0 >= h ? n : h > l ? n + o - e.collisionHeight : n : h > 0 ?
  6019. t.top += h : l > 0 ? t.top -= l : t.top = a(t.top - r, t.top)
  6020. }
  6021. },
  6022. flip: {
  6023. left: function (t, e) {
  6024. var i, s, n = e.within,
  6025. o = n.offset.left + n.scrollLeft,
  6026. a = n.width,
  6027. h = n.isWindow ? n.scrollLeft : n.offset.left,
  6028. l = t.left - e.collisionPosition.marginLeft,
  6029. c = l - h,
  6030. u = l + e.collisionWidth - a - h,
  6031. d = "left" === e.my[0] ? -e.elemWidth : "right" === e.my[0] ? e.elemWidth : 0,
  6032. p = "left" === e.at[0] ? e.targetWidth : "right" === e.at[0] ? -e.targetWidth : 0,
  6033. f = -2 * e.offset[0];
  6034. 0 > c ? (i = t.left + d + p + f + e.collisionWidth - a - o, (0 > i || r(c) > i) && (t.left += d +
  6035. p + f)) : u > 0 && (s = t.left - e.collisionPosition.marginLeft + d + p + f - h, (s > 0 ||
  6036. u > r(s)) && (t.left += d + p + f))
  6037. },
  6038. top: function (t, e) {
  6039. var i, s, n = e.within,
  6040. o = n.offset.top + n.scrollTop,
  6041. a = n.height,
  6042. h = n.isWindow ? n.scrollTop : n.offset.top,
  6043. l = t.top - e.collisionPosition.marginTop,
  6044. c = l - h,
  6045. u = l + e.collisionHeight - a - h,
  6046. d = "top" === e.my[1],
  6047. p = d ? -e.elemHeight : "bottom" === e.my[1] ? e.elemHeight : 0,
  6048. f = "top" === e.at[1] ? e.targetHeight : "bottom" === e.at[1] ? -e.targetHeight : 0,
  6049. g = -2 * e.offset[1];
  6050. 0 > c ? (s = t.top + p + f + g + e.collisionHeight - a - o, t.top + p + f + g > c && (0 > s ||
  6051. r(c) > s) && (t.top += p + f + g)) : u > 0 && (i = t.top - e.collisionPosition.marginTop +
  6052. p + f + g - h, t.top + p + f + g > u && (i > 0 || u > r(i)) && (t.top += p + f + g))
  6053. }
  6054. },
  6055. flipfit: {
  6056. left: function () {
  6057. t.ui.position.flip.left.apply(this, arguments), t.ui.position.fit.left.apply(this, arguments)
  6058. },
  6059. top: function () {
  6060. t.ui.position.flip.top.apply(this, arguments), t.ui.position.fit.top.apply(this, arguments)
  6061. }
  6062. }
  6063. },
  6064. function () {
  6065. var e, i, s, n, o, a = document.getElementsByTagName("body")[0],
  6066. r = document.createElement("div");
  6067. e = document.createElement(a ? "div" : "body"), s = {
  6068. visibility: "hidden",
  6069. width: 0,
  6070. height: 0,
  6071. border: 0,
  6072. margin: 0,
  6073. background: "none"
  6074. }, a && t.extend(s, {
  6075. position: "absolute",
  6076. left: "-1000px",
  6077. top: "-1000px"
  6078. });
  6079. for (o in s) e.style[o] = s[o];
  6080. e.appendChild(r), i = a || document.documentElement, i.insertBefore(e, i.firstChild), r.style.cssText =
  6081. "position: absolute; left: 10.7432222px;", n = t(r).offset().left, t.support.offsetFractions = n > 10 &&
  6082. 11 > n, e.innerHTML = "", i.removeChild(e)
  6083. }()
  6084. }(jQuery),
  6085. function (t, e) {
  6086. t.widget("ui.progressbar", {
  6087. version: "1.10.3",
  6088. options: {
  6089. max: 100,
  6090. value: 0,
  6091. change: null,
  6092. complete: null
  6093. },
  6094. min: 0,
  6095. _create: function () {
  6096. this.oldValue = this.options.value = this._constrainedValue(), this.element.addClass(
  6097. "ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({
  6098. role: "progressbar",
  6099. "aria-valuemin": this.min
  6100. }), this.valueDiv = t(
  6101. "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(
  6102. this.element), this._refreshValue()
  6103. },
  6104. _destroy: function () {
  6105. this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr(
  6106. "role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr(
  6107. "aria-valuenow"), this.valueDiv.remove()
  6108. },
  6109. value: function (t) {
  6110. return t === e ? this.options.value : (this.options.value = this._constrainedValue(t), this._refreshValue(),
  6111. e)
  6112. },
  6113. _constrainedValue: function (t) {
  6114. return t === e && (t = this.options.value), this.indeterminate = t === !1, "number" != typeof t &&
  6115. (t = 0), this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, t))
  6116. },
  6117. _setOptions: function (t) {
  6118. var e = t.value;
  6119. delete t.value, this._super(t), this.options.value = this._constrainedValue(e), this._refreshValue()
  6120. },
  6121. _setOption: function (t, e) {
  6122. "max" === t && (e = Math.max(this.min, e)), this._super(t, e)
  6123. },
  6124. _percentage: function () {
  6125. return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max -
  6126. this.min)
  6127. },
  6128. _refreshValue: function () {
  6129. var e = this.options.value,
  6130. i = this._percentage();
  6131. this.valueDiv.toggle(this.indeterminate || e > this.min).toggleClass("ui-corner-right", e ===
  6132. this.options.max).width(i.toFixed(0) + "%"), this.element.toggleClass(
  6133. "ui-progressbar-indeterminate", this.indeterminate), this.indeterminate ? (this.element
  6134. .removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = t(
  6135. "<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))) : (this.element
  6136. .attr({
  6137. "aria-valuemax": this.options.max,
  6138. "aria-valuenow": e
  6139. }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !==
  6140. e && (this.oldValue = e, this._trigger("change")), e === this.options.max && this._trigger(
  6141. "complete")
  6142. }
  6143. })
  6144. }(jQuery),
  6145. function (t) {
  6146. var e = 5;
  6147. t.widget("ui.slider", t.ui.mouse, {
  6148. version: "1.10.3",
  6149. widgetEventPrefix: "slide",
  6150. options: {
  6151. animate: !1,
  6152. distance: 0,
  6153. max: 100,
  6154. min: 0,
  6155. orientation: "horizontal",
  6156. range: !1,
  6157. step: 1,
  6158. value: 0,
  6159. values: null,
  6160. change: null,
  6161. slide: null,
  6162. start: null,
  6163. stop: null
  6164. },
  6165. _create: function () {
  6166. this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null,
  6167. this._detectOrientation(), this._mouseInit(), this.element.addClass("ui-slider ui-slider-" +
  6168. this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all"), this._refresh(),
  6169. this._setOption("disabled", this.options.disabled), this._animateOff = !1
  6170. },
  6171. _refresh: function () {
  6172. this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()
  6173. },
  6174. _createHandles: function () {
  6175. var e, i, s = this.options,
  6176. n = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
  6177. o = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
  6178. a = [];
  6179. for (i = s.values && s.values.length || 1, n.length > i && (n.slice(i).remove(), n = n.slice(0,
  6180. i)), e = n.length; i > e; e++) a.push(o);
  6181. this.handles = n.add(t(a.join("")).appendTo(this.element)), this.handle = this.handles.eq(0),
  6182. this.handles.each(function (e) {
  6183. t(this).data("ui-slider-handle-index", e)
  6184. })
  6185. },
  6186. _createRange: function () {
  6187. var e = this.options,
  6188. i = "";
  6189. e.range ? (e.range === !0 && (e.values ? e.values.length && 2 !== e.values.length ? e.values = [
  6190. e.values[0], e.values[0]] : t.isArray(e.values) && (e.values = e.values.slice(0)) :
  6191. e.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ?
  6192. this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({
  6193. left: "",
  6194. bottom: ""
  6195. }) : (this.range = t("<div></div>").appendTo(this.element), i =
  6196. "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(i + ("min" ===
  6197. e.range || "max" === e.range ? " ui-slider-range-" + e.range : ""))) : this.range =
  6198. t([])
  6199. },
  6200. _setupEvents: function () {
  6201. var t = this.handles.add(this.range).filter("a");
  6202. this._off(t), this._on(t, this._handleEvents), this._hoverable(t), this._focusable(t)
  6203. },
  6204. _destroy: function () {
  6205. this.handles.remove(), this.range.remove(), this.element.removeClass(
  6206. "ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"
  6207. ), this._mouseDestroy()
  6208. },
  6209. _mouseCapture: function (e) {
  6210. var i, s, n, o, a, r, h, l, c = this,
  6211. u = this.options;
  6212. return u.disabled ? !1 : (this.elementSize = {
  6213. width: this.element.outerWidth(),
  6214. height: this.element.outerHeight()
  6215. }, this.elementOffset = this.element.offset(), i = {
  6216. x: e.pageX,
  6217. y: e.pageY
  6218. }, s = this._normValueFromMouse(i), n = this._valueMax() - this._valueMin() + 1, this.handles
  6219. .each(function (e) {
  6220. var i = Math.abs(s - c.values(e));
  6221. (n > i || n === i && (e === c._lastChangedValue || c.values(e) === u.min)) && (
  6222. n = i, o = t(this), a = e)
  6223. }), r = this._start(e, a), r === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex =
  6224. a, o.addClass("ui-state-active").focus(), h = o.offset(), l = !t(e.target).parents()
  6225. .addBack().is(".ui-slider-handle"), this._clickOffset = l ? {
  6226. left: 0,
  6227. top: 0
  6228. } : {
  6229. left: e.pageX - h.left - o.width() / 2,
  6230. top: e.pageY - h.top - o.height() / 2 - (parseInt(o.css("borderTopWidth"), 10) ||
  6231. 0) - (parseInt(o.css("borderBottomWidth"), 10) || 0) + (parseInt(o.css(
  6232. "marginTop"), 10) || 0)
  6233. }, this.handles.hasClass("ui-state-hover") || this._slide(e, a, s), this._animateOff = !
  6234. 0, !0))
  6235. },
  6236. _mouseStart: function () {
  6237. return !0
  6238. },
  6239. _mouseDrag: function (t) {
  6240. var e = {
  6241. x: t.pageX,
  6242. y: t.pageY
  6243. },
  6244. i = this._normValueFromMouse(e);
  6245. return this._slide(t, this._handleIndex, i), !1
  6246. },
  6247. _mouseStop: function (t) {
  6248. return this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(t, this
  6249. ._handleIndex), this._change(t, this._handleIndex), this._handleIndex = null, this._clickOffset =
  6250. null, this._animateOff = !1, !1
  6251. },
  6252. _detectOrientation: function () {
  6253. this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
  6254. },
  6255. _normValueFromMouse: function (t) {
  6256. var e, i, s, n, o;
  6257. return "horizontal" === this.orientation ? (e = this.elementSize.width, i = t.x - this.elementOffset
  6258. .left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height,
  6259. i = t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), s =
  6260. i / e, s > 1 && (s = 1), 0 > s && (s = 0), "vertical" === this.orientation && (s = 1 - s),
  6261. n = this._valueMax() - this._valueMin(), o = this._valueMin() + s * n, this._trimAlignValue(
  6262. o)
  6263. },
  6264. _start: function (t, e) {
  6265. var i = {
  6266. handle: this.handles[e],
  6267. value: this.value()
  6268. };
  6269. return this.options.values && this.options.values.length && (i.value = this.values(e), i.values =
  6270. this.values()), this._trigger("start", t, i)
  6271. },
  6272. _slide: function (t, e, i) {
  6273. var s, n, o;
  6274. this.options.values && this.options.values.length ? (s = this.values(e ? 0 : 1), 2 === this.options
  6275. .values.length && this.options.range === !0 && (0 === e && i > s || 1 === e && s > i) &&
  6276. (i = s), i !== this.values(e) && (n = this.values(), n[e] = i, o = this._trigger(
  6277. "slide", t, {
  6278. handle: this.handles[e],
  6279. value: i,
  6280. values: n
  6281. }), s = this.values(e ? 0 : 1), o !== !1 && this.values(e, i, !0))) : i !== this.value() &&
  6282. (o = this._trigger("slide", t, {
  6283. handle: this.handles[e],
  6284. value: i
  6285. }), o !== !1 && this.value(i))
  6286. },
  6287. _stop: function (t, e) {
  6288. var i = {
  6289. handle: this.handles[e],
  6290. value: this.value()
  6291. };
  6292. this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this
  6293. .values()), this._trigger("stop", t, i)
  6294. },
  6295. _change: function (t, e) {
  6296. if (!this._keySliding && !this._mouseSliding) {
  6297. var i = {
  6298. handle: this.handles[e],
  6299. value: this.value()
  6300. };
  6301. this.options.values && this.options.values.length && (i.value = this.values(e), i.values =
  6302. this.values()), this._lastChangedValue = e, this._trigger("change", t, i)
  6303. }
  6304. },
  6305. value: function (t) {
  6306. return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(),
  6307. this._change(null, 0), undefined) : this._value()
  6308. },
  6309. values: function (e, i) {
  6310. var s, n, o;
  6311. if (arguments.length > 1) return this.options.values[e] = this._trimAlignValue(i), this._refreshValue(),
  6312. this._change(null, e), undefined;
  6313. if (!arguments.length) return this._values();
  6314. if (!t.isArray(arguments[0])) return this.options.values && this.options.values.length ? this._values(
  6315. e) : this.value();
  6316. for (s = this.options.values, n = arguments[0], o = 0; s.length > o; o += 1) s[o] = this._trimAlignValue(
  6317. n[o]), this._change(null, o);
  6318. this._refreshValue()
  6319. },
  6320. _setOption: function (e, i) {
  6321. var s, n = 0;
  6322. switch ("range" === e && this.options.range === !0 && ("min" === i ? (this.options.value = this
  6323. ._values(0), this.options.values = null) : "max" === i && (this.options.value =
  6324. this._values(this.options.values.length - 1), this.options.values = null)), t.isArray(
  6325. this.options.values) && (n = this.options.values.length), t.Widget.prototype._setOption
  6326. .apply(this, arguments), e) {
  6327. case "orientation":
  6328. this._detectOrientation(), this.element.removeClass(
  6329. "ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation),
  6330. this._refreshValue();
  6331. break;
  6332. case "value":
  6333. this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !
  6334. 1;
  6335. break;
  6336. case "values":
  6337. for (this._animateOff = !0, this._refreshValue(), s = 0; n > s; s += 1) this._change(
  6338. null, s);
  6339. this._animateOff = !1;
  6340. break;
  6341. case "min":
  6342. case "max":
  6343. this._animateOff = !0, this._refreshValue(), this._animateOff = !1;
  6344. break;
  6345. case "range":
  6346. this._animateOff = !0, this._refresh(), this._animateOff = !1
  6347. }
  6348. },
  6349. _value: function () {
  6350. var t = this.options.value;
  6351. return t = this._trimAlignValue(t)
  6352. },
  6353. _values: function (t) {
  6354. var e, i, s;
  6355. if (arguments.length) return e = this.options.values[t], e = this._trimAlignValue(e);
  6356. if (this.options.values && this.options.values.length) {
  6357. for (i = this.options.values.slice(), s = 0; i.length > s; s += 1) i[s] = this._trimAlignValue(
  6358. i[s]);
  6359. return i
  6360. }
  6361. return []
  6362. },
  6363. _trimAlignValue: function (t) {
  6364. if (this._valueMin() >= t) return this._valueMin();
  6365. if (t >= this._valueMax()) return this._valueMax();
  6366. var e = this.options.step > 0 ? this.options.step : 1,
  6367. i = (t - this._valueMin()) % e,
  6368. s = t - i;
  6369. return 2 * Math.abs(i) >= e && (s += i > 0 ? e : -e), parseFloat(s.toFixed(5))
  6370. },
  6371. _valueMin: function () {
  6372. return this.options.min
  6373. },
  6374. _valueMax: function () {
  6375. return this.options.max
  6376. },
  6377. _refreshValue: function () {
  6378. var e, i, s, n, o, a = this.options.range,
  6379. r = this.options,
  6380. h = this,
  6381. l = this._animateOff ? !1 : r.animate,
  6382. c = {};
  6383. this.options.values && this.options.values.length ? this.handles.each(function (s) {
  6384. i = 100 * ((h.values(s) - h._valueMin()) / (h._valueMax() - h._valueMin())), c[
  6385. "horizontal" === h.orientation ? "left" : "bottom"] = i + "%", t(this).stop(
  6386. 1, 1)[l ? "animate" : "css"](c, r.animate), h.options.range === !0 && (
  6387. "horizontal" === h.orientation ? (0 === s && h.range.stop(1, 1)[l ?
  6388. "animate" : "css"]({
  6389. left: i + "%"
  6390. }, r.animate), 1 === s && h.range[l ? "animate" : "css"]({
  6391. width: i - e + "%"
  6392. }, {
  6393. queue: !1,
  6394. duration: r.animate
  6395. })) : (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({
  6396. bottom: i + "%"
  6397. }, r.animate), 1 === s && h.range[l ? "animate" : "css"]({
  6398. height: i - e + "%"
  6399. }, {
  6400. queue: !1,
  6401. duration: r.animate
  6402. }))), e = i
  6403. }) : (s = this.value(), n = this._valueMin(), o = this._valueMax(), i = o !== n ? 100 * ((s -
  6404. n) / (o - n)) : 0, c["horizontal" === this.orientation ? "left" : "bottom"] = i +
  6405. "%", this.handle.stop(1, 1)[l ? "animate" : "css"](c, r.animate), "min" === a &&
  6406. "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({
  6407. width: i + "%"
  6408. }, r.animate), "max" === a && "horizontal" === this.orientation && this.range[l ?
  6409. "animate" : "css"]({
  6410. width: 100 - i + "%"
  6411. }, {
  6412. queue: !1,
  6413. duration: r.animate
  6414. }), "min" === a && "vertical" === this.orientation && this.range.stop(1, 1)[l ?
  6415. "animate" : "css"]({
  6416. height: i + "%"
  6417. }, r.animate), "max" === a && "vertical" === this.orientation && this.range[l ?
  6418. "animate" : "css"]({
  6419. height: 100 - i + "%"
  6420. }, {
  6421. queue: !1,
  6422. duration: r.animate
  6423. }))
  6424. },
  6425. _handleEvents: {
  6426. keydown: function (i) {
  6427. var s, n, o, a, r = t(i.target).data("ui-slider-handle-index");
  6428. switch (i.keyCode) {
  6429. case t.ui.keyCode.HOME:
  6430. case t.ui.keyCode.END:
  6431. case t.ui.keyCode.PAGE_UP:
  6432. case t.ui.keyCode.PAGE_DOWN:
  6433. case t.ui.keyCode.UP:
  6434. case t.ui.keyCode.RIGHT:
  6435. case t.ui.keyCode.DOWN:
  6436. case t.ui.keyCode.LEFT:
  6437. if (i.preventDefault(), !this._keySliding && (this._keySliding = !0, t(i.target).addClass(
  6438. "ui-state-active"), s = this._start(i, r), s === !1)) return
  6439. }
  6440. switch (a = this.options.step, n = o = this.options.values && this.options.values.length ?
  6441. this.values(r) : this.value(), i.keyCode) {
  6442. case t.ui.keyCode.HOME:
  6443. o = this._valueMin();
  6444. break;
  6445. case t.ui.keyCode.END:
  6446. o = this._valueMax();
  6447. break;
  6448. case t.ui.keyCode.PAGE_UP:
  6449. o = this._trimAlignValue(n + (this._valueMax() - this._valueMin()) / e);
  6450. break;
  6451. case t.ui.keyCode.PAGE_DOWN:
  6452. o = this._trimAlignValue(n - (this._valueMax() - this._valueMin()) / e);
  6453. break;
  6454. case t.ui.keyCode.UP:
  6455. case t.ui.keyCode.RIGHT:
  6456. if (n === this._valueMax()) return;
  6457. o = this._trimAlignValue(n + a);
  6458. break;
  6459. case t.ui.keyCode.DOWN:
  6460. case t.ui.keyCode.LEFT:
  6461. if (n === this._valueMin()) return;
  6462. o = this._trimAlignValue(n - a)
  6463. }
  6464. this._slide(i, r, o)
  6465. },
  6466. click: function (t) {
  6467. t.preventDefault()
  6468. },
  6469. keyup: function (e) {
  6470. var i = t(e.target).data("ui-slider-handle-index");
  6471. this._keySliding && (this._keySliding = !1, this._stop(e, i), this._change(e, i), t(e.target)
  6472. .removeClass("ui-state-active"))
  6473. }
  6474. }
  6475. })
  6476. }(jQuery),
  6477. function (t) {
  6478. function e(t) {
  6479. return function () {
  6480. var e = this.element.val();
  6481. t.apply(this, arguments), this._refresh(), e !== this.element.val() && this._trigger("change")
  6482. }
  6483. }
  6484. t.widget("ui.spinner", {
  6485. version: "1.10.3",
  6486. defaultElement: "<input>",
  6487. widgetEventPrefix: "spin",
  6488. options: {
  6489. culture: null,
  6490. icons: {
  6491. down: "ui-icon-triangle-1-s",
  6492. up: "ui-icon-triangle-1-n"
  6493. },
  6494. incremental: !0,
  6495. max: null,
  6496. min: null,
  6497. numberFormat: null,
  6498. page: 10,
  6499. step: 1,
  6500. change: null,
  6501. spin: null,
  6502. start: null,
  6503. stop: null
  6504. },
  6505. _create: function () {
  6506. this._setOption("max", this.options.max), this._setOption("min", this.options.min), this._setOption(
  6507. "step", this.options.step), this._value(this.element.val(), !0), this._draw(), this._on(
  6508. this._events), this._refresh(), this._on(this.window, {
  6509. beforeunload: function () {
  6510. this.element.removeAttr("autocomplete")
  6511. }
  6512. })
  6513. },
  6514. _getCreateOptions: function () {
  6515. var e = {},
  6516. i = this.element;
  6517. return t.each(["min", "max", "step"], function (t, s) {
  6518. var n = i.attr(s);
  6519. void 0 !== n && n.length && (e[s] = n)
  6520. }), e
  6521. },
  6522. _events: {
  6523. keydown: function (t) {
  6524. this._start(t) && this._keydown(t) && t.preventDefault()
  6525. },
  6526. keyup: "_stop",
  6527. focus: function () {
  6528. this.previous = this.element.val()
  6529. },
  6530. blur: function (t) {
  6531. return this.cancelBlur ? (delete this.cancelBlur, void 0) : (this._stop(), this._refresh(),
  6532. this.previous !== this.element.val() && this._trigger("change", t), void 0)
  6533. },
  6534. mousewheel: function (t, e) {
  6535. if (e) {
  6536. if (!this.spinning && !this._start(t)) return !1;
  6537. this._spin((e > 0 ? 1 : -1) * this.options.step, t), clearTimeout(this.mousewheelTimer),
  6538. this.mousewheelTimer = this._delay(function () {
  6539. this.spinning && this._stop(t)
  6540. }, 100), t.preventDefault()
  6541. }
  6542. },
  6543. "mousedown .ui-spinner-button": function (e) {
  6544. function i() {
  6545. var t = this.element[0] === this.document[0].activeElement;
  6546. t || (this.element.focus(), this.previous = s, this._delay(function () {
  6547. this.previous = s
  6548. }))
  6549. }
  6550. var s;
  6551. s = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val(),
  6552. e.preventDefault(), i.call(this), this.cancelBlur = !0, this._delay(function () {
  6553. delete this.cancelBlur, i.call(this)
  6554. }), this._start(e) !== !1 && this._repeat(null, t(e.currentTarget).hasClass(
  6555. "ui-spinner-up") ? 1 : -1, e)
  6556. },
  6557. "mouseup .ui-spinner-button": "_stop",
  6558. "mouseenter .ui-spinner-button": function (e) {
  6559. return t(e.currentTarget).hasClass("ui-state-active") ? this._start(e) === !1 ? !1 : (this._repeat(
  6560. null, t(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, e), void 0) : void 0
  6561. },
  6562. "mouseleave .ui-spinner-button": "_stop"
  6563. },
  6564. _draw: function () {
  6565. var t = this.uiSpinner = this.element.addClass("ui-spinner-input").attr("autocomplete", "off").wrap(
  6566. this._uiSpinnerHtml()).parent().append(this._buttonHtml());
  6567. this.element.attr("role", "spinbutton"), this.buttons = t.find(".ui-spinner-button").attr(
  6568. "tabIndex", -1).button().removeClass("ui-corner-all"), this.buttons.height() > Math.ceil(
  6569. .5 * t.height()) && t.height() > 0 && t.height(t.height()), this.options.disabled &&
  6570. this.disable()
  6571. },
  6572. _keydown: function (e) {
  6573. var i = this.options,
  6574. s = t.ui.keyCode;
  6575. switch (e.keyCode) {
  6576. case s.UP:
  6577. return this._repeat(null, 1, e), !0;
  6578. case s.DOWN:
  6579. return this._repeat(null, -1, e), !0;
  6580. case s.PAGE_UP:
  6581. return this._repeat(null, i.page, e), !0;
  6582. case s.PAGE_DOWN:
  6583. return this._repeat(null, -i.page, e), !0
  6584. }
  6585. return !1
  6586. },
  6587. _uiSpinnerHtml: function () {
  6588. return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"
  6589. },
  6590. _buttonHtml: function () {
  6591. return "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon " + this.options
  6592. .icons.up + "'>&#9650;</span>" + "</a>" +
  6593. "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + "<span class='ui-icon " +
  6594. this.options.icons.down + "'>&#9660;</span>" + "</a>"
  6595. },
  6596. _start: function (t) {
  6597. return this.spinning || this._trigger("start", t) !== !1 ? (this.counter || (this.counter = 1),
  6598. this.spinning = !0, !0) : !1
  6599. },
  6600. _repeat: function (t, e, i) {
  6601. t = t || 500, clearTimeout(this.timer), this.timer = this._delay(function () {
  6602. this._repeat(40, e, i)
  6603. }, t), this._spin(e * this.options.step, i)
  6604. },
  6605. _spin: function (t, e) {
  6606. var i = this.value() || 0;
  6607. this.counter || (this.counter = 1), i = this._adjustValue(i + t * this._increment(this.counter)),
  6608. this.spinning && this._trigger("spin", e, {
  6609. value: i
  6610. }) === !1 || (this._value(i), this.counter++)
  6611. },
  6612. _increment: function (e) {
  6613. var i = this.options.incremental;
  6614. return i ? t.isFunction(i) ? i(e) : Math.floor(e * e * e / 5e4 - e * e / 500 + 17 * e / 200 + 1) :
  6615. 1
  6616. },
  6617. _precision: function () {
  6618. var t = this._precisionOf(this.options.step);
  6619. return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t
  6620. },
  6621. _precisionOf: function (t) {
  6622. var e = "" + t,
  6623. i = e.indexOf(".");
  6624. return -1 === i ? 0 : e.length - i - 1
  6625. },
  6626. _adjustValue: function (t) {
  6627. var e, i, s = this.options;
  6628. return e = null !== s.min ? s.min : 0, i = t - e, i = Math.round(i / s.step) * s.step, t = e +
  6629. i, t = parseFloat(t.toFixed(this._precision())), null !== s.max && t > s.max ? s.max : null !==
  6630. s.min && s.min > t ? s.min : t
  6631. },
  6632. _stop: function (t) {
  6633. this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter =
  6634. 0, this.spinning = !1, this._trigger("stop", t))
  6635. },
  6636. _setOption: function (t, e) {
  6637. if ("culture" === t || "numberFormat" === t) {
  6638. var i = this._parse(this.element.val());
  6639. return this.options[t] = e, this.element.val(this._format(i)), void 0
  6640. }("max" === t || "min" === t || "step" === t) && "string" == typeof e && (e = this._parse(e)),
  6641. "icons" === t && (this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(
  6642. e.up), this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(
  6643. e.down)), this._super(t, e), "disabled" === t && (e ? (this.element.prop("disabled", !0),
  6644. this.buttons.button("disable")) : (this.element.prop("disabled", !1), this.buttons.button(
  6645. "enable")))
  6646. },
  6647. _setOptions: e(function (t) {
  6648. this._super(t), this._value(this.element.val())
  6649. }),
  6650. _parse: function (t) {
  6651. return "string" == typeof t && "" !== t && (t = window.Globalize && this.options.numberFormat ?
  6652. Globalize.parseFloat(t, 10, this.options.culture) : +t), "" === t || isNaN(t) ? null :
  6653. t
  6654. },
  6655. _format: function (t) {
  6656. return "" === t ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(t, this
  6657. .options.numberFormat, this.options.culture) : t
  6658. },
  6659. _refresh: function () {
  6660. this.element.attr({
  6661. "aria-valuemin": this.options.min,
  6662. "aria-valuemax": this.options.max,
  6663. "aria-valuenow": this._parse(this.element.val())
  6664. })
  6665. },
  6666. _value: function (t, e) {
  6667. var i;
  6668. "" !== t && (i = this._parse(t), null !== i && (e || (i = this._adjustValue(i)), t = this._format(
  6669. i))), this.element.val(t), this._refresh()
  6670. },
  6671. _destroy: function () {
  6672. this.element.removeClass("ui-spinner-input").prop("disabled", !1).removeAttr("autocomplete").removeAttr(
  6673. "role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr(
  6674. "aria-valuenow"), this.uiSpinner.replaceWith(this.element)
  6675. },
  6676. stepUp: e(function (t) {
  6677. this._stepUp(t)
  6678. }),
  6679. _stepUp: function (t) {
  6680. this._start() && (this._spin((t || 1) * this.options.step), this._stop())
  6681. },
  6682. stepDown: e(function (t) {
  6683. this._stepDown(t)
  6684. }),
  6685. _stepDown: function (t) {
  6686. this._start() && (this._spin((t || 1) * -this.options.step), this._stop())
  6687. },
  6688. pageUp: e(function (t) {
  6689. this._stepUp((t || 1) * this.options.page)
  6690. }),
  6691. pageDown: e(function (t) {
  6692. this._stepDown((t || 1) * this.options.page)
  6693. }),
  6694. value: function (t) {
  6695. return arguments.length ? (e(this._value).call(this, t), void 0) : this._parse(this.element.val())
  6696. },
  6697. widget: function () {
  6698. return this.uiSpinner
  6699. }
  6700. })
  6701. }(jQuery),
  6702. function (t, e) {
  6703. function i() {
  6704. return ++n
  6705. }
  6706. function s(t) {
  6707. return t.hash.length > 1 && decodeURIComponent(t.href.replace(o, "")) === decodeURIComponent(location.href.replace(
  6708. o, ""))
  6709. }
  6710. var n = 0,
  6711. o = /#.*$/;
  6712. t.widget("ui.tabs", {
  6713. version: "1.10.3",
  6714. delay: 300,
  6715. options: {
  6716. active: null,
  6717. collapsible: !1,
  6718. event: "click",
  6719. heightStyle: "content",
  6720. hide: null,
  6721. show: null,
  6722. activate: null,
  6723. beforeActivate: null,
  6724. beforeLoad: null,
  6725. load: null
  6726. },
  6727. _create: function () {
  6728. var e = this,
  6729. i = this.options;
  6730. this.running = !1, this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass(
  6731. "ui-tabs-collapsible", i.collapsible).delegate(".ui-tabs-nav > li", "mousedown" + this.eventNamespace,
  6732. function (e) {
  6733. t(this).is(".ui-state-disabled") && e.preventDefault()
  6734. }).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function () {
  6735. t(this).closest("li").is(".ui-state-disabled") && this.blur()
  6736. }), this._processTabs(), i.active = this._initialActive(), t.isArray(i.disabled) && (i.disabled =
  6737. t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"), function (t) {
  6738. return e.tabs.index(t)
  6739. }))).sort()), this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(
  6740. i.active) : t(), this._refresh(), this.active.length && this.load(i.active)
  6741. },
  6742. _initialActive: function () {
  6743. var i = this.options.active,
  6744. s = this.options.collapsible,
  6745. n = location.hash.substring(1);
  6746. return null === i && (n && this.tabs.each(function (s, o) {
  6747. return t(o).attr("aria-controls") === n ? (i = s, !1) : e
  6748. }), null === i && (i = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (null ===
  6749. i || -1 === i) && (i = this.tabs.length ? 0 : !1)), i !== !1 && (i = this.tabs.index(
  6750. this.tabs.eq(i)), -1 === i && (i = s ? !1 : 0)), !s && i === !1 && this.anchors.length &&
  6751. (i = 0), i
  6752. },
  6753. _getCreateEventData: function () {
  6754. return {
  6755. tab: this.active,
  6756. panel: this.active.length ? this._getPanelForTab(this.active) : t()
  6757. }
  6758. },
  6759. _tabKeydown: function (i) {
  6760. var s = t(this.document[0].activeElement).closest("li"),
  6761. n = this.tabs.index(s),
  6762. o = !0;
  6763. if (!this._handlePageNav(i)) {
  6764. switch (i.keyCode) {
  6765. case t.ui.keyCode.RIGHT:
  6766. case t.ui.keyCode.DOWN:
  6767. n++;
  6768. break;
  6769. case t.ui.keyCode.UP:
  6770. case t.ui.keyCode.LEFT:
  6771. o = !1, n--;
  6772. break;
  6773. case t.ui.keyCode.END:
  6774. n = this.anchors.length - 1;
  6775. break;
  6776. case t.ui.keyCode.HOME:
  6777. n = 0;
  6778. break;
  6779. case t.ui.keyCode.SPACE:
  6780. return i.preventDefault(), clearTimeout(this.activating), this._activate(n), e;
  6781. case t.ui.keyCode.ENTER:
  6782. return i.preventDefault(), clearTimeout(this.activating), this._activate(n === this
  6783. .options.active ? !1 : n), e;
  6784. default:
  6785. return
  6786. }
  6787. i.preventDefault(), clearTimeout(this.activating), n = this._focusNextTab(n, o), i.ctrlKey ||
  6788. (s.attr("aria-selected", "false"), this.tabs.eq(n).attr("aria-selected", "true"), this.activating =
  6789. this._delay(function () {
  6790. this.option("active", n)
  6791. }, this.delay))
  6792. }
  6793. },
  6794. _panelKeydown: function (e) {
  6795. this._handlePageNav(e) || e.ctrlKey && e.keyCode === t.ui.keyCode.UP && (e.preventDefault(),
  6796. this.active.focus())
  6797. },
  6798. _handlePageNav: function (i) {
  6799. return i.altKey && i.keyCode === t.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this
  6800. .options.active - 1, !1)), !0) : i.altKey && i.keyCode === t.ui.keyCode.PAGE_DOWN ? (
  6801. this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : e
  6802. },
  6803. _findNextTab: function (e, i) {
  6804. function s() {
  6805. return e > n && (e = 0), 0 > e && (e = n), e
  6806. }
  6807. for (var n = this.tabs.length - 1; - 1 !== t.inArray(s(), this.options.disabled);) e = i ? e +
  6808. 1 : e - 1;
  6809. return e
  6810. },
  6811. _focusNextTab: function (t, e) {
  6812. return t = this._findNextTab(t, e), this.tabs.eq(t).focus(), t
  6813. },
  6814. _setOption: function (t, i) {
  6815. return "active" === t ? (this._activate(i), e) : "disabled" === t ? (this._setupDisabled(i), e) :
  6816. (this._super(t, i), "collapsible" === t && (this.element.toggleClass("ui-tabs-collapsible",
  6817. i), i || this.options.active !== !1 || this._activate(0)), "event" === t && this._setupEvents(
  6818. i), "heightStyle" === t && this._setupHeightStyle(i), e)
  6819. },
  6820. _tabId: function (t) {
  6821. return t.attr("aria-controls") || "ui-tabs-" + i()
  6822. },
  6823. _sanitizeSelector: function (t) {
  6824. return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
  6825. },
  6826. refresh: function () {
  6827. var e = this.options,
  6828. i = this.tablist.children(":has(a[href])");
  6829. e.disabled = t.map(i.filter(".ui-state-disabled"), function (t) {
  6830. return i.index(t)
  6831. }), this._processTabs(), e.active !== !1 && this.anchors.length ? this.active.length && !t.contains(
  6832. this.tablist[0], this.active[0]) ? this.tabs.length === e.disabled.length ? (e.active = !
  6833. 1, this.active = t()) : this._activate(this._findNextTab(Math.max(0, e.active - 1), !1)) :
  6834. e.active = this.tabs.index(this.active) : (e.active = !1, this.active = t()), this._refresh()
  6835. },
  6836. _refresh: function () {
  6837. this._setupDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(
  6838. this.options.heightStyle), this.tabs.not(this.active).attr({
  6839. "aria-selected": "false",
  6840. tabIndex: -1
  6841. }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({
  6842. "aria-expanded": "false",
  6843. "aria-hidden": "true"
  6844. }), this.active.length ? (this.active.addClass("ui-tabs-active ui-state-active").attr({
  6845. "aria-selected": "true",
  6846. tabIndex: 0
  6847. }), this._getPanelForTab(this.active).show().attr({
  6848. "aria-expanded": "true",
  6849. "aria-hidden": "false"
  6850. })) : this.tabs.eq(0).attr("tabIndex", 0)
  6851. },
  6852. _processTabs: function () {
  6853. var e = this;
  6854. this.tablist = this._getList().addClass(
  6855. "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr(
  6856. "role", "tablist"), this.tabs = this.tablist.find("> li:has(a[href])").addClass(
  6857. "ui-state-default ui-corner-top").attr({
  6858. role: "tab",
  6859. tabIndex: -1
  6860. }), this.anchors = this.tabs.map(function () {
  6861. return t("a", this)[0]
  6862. }).addClass("ui-tabs-anchor").attr({
  6863. role: "presentation",
  6864. tabIndex: -1
  6865. }), this.panels = t(), this.anchors.each(function (i, n) {
  6866. var o, a, r, h = t(n).uniqueId().attr("id"),
  6867. l = t(n).closest("li"),
  6868. c = l.attr("aria-controls");
  6869. s(n) ? (o = n.hash, a = e.element.find(e._sanitizeSelector(o))) : (r = e._tabId(l),
  6870. o = "#" + r, a = e.element.find(o), a.length || (a = e._createPanel(r), a.insertAfter(
  6871. e.panels[i - 1] || e.tablist)), a.attr("aria-live", "polite")), a.length &&
  6872. (e.panels = e.panels.add(a)), c && l.data("ui-tabs-aria-controls", c), l.attr({
  6873. "aria-controls": o.substring(1),
  6874. "aria-labelledby": h
  6875. }), a.attr("aria-labelledby", h)
  6876. }), this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role",
  6877. "tabpanel")
  6878. },
  6879. _getList: function () {
  6880. return this.element.find("ol,ul").eq(0)
  6881. },
  6882. _createPanel: function (e) {
  6883. return t("<div>").attr("id", e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data(
  6884. "ui-tabs-destroy", !0)
  6885. },
  6886. _setupDisabled: function (e) {
  6887. t.isArray(e) && (e.length ? e.length === this.anchors.length && (e = !0) : e = !1);
  6888. for (var i, s = 0; i = this.tabs[s]; s++) e === !0 || -1 !== t.inArray(s, e) ? t(i).addClass(
  6889. "ui-state-disabled").attr("aria-disabled", "true") : t(i).removeClass(
  6890. "ui-state-disabled").removeAttr("aria-disabled");
  6891. this.options.disabled = e
  6892. },
  6893. _setupEvents: function (e) {
  6894. var i = {
  6895. click: function (t) {
  6896. t.preventDefault()
  6897. }
  6898. };
  6899. e && t.each(e.split(" "), function (t, e) {
  6900. i[e] = "_eventHandler"
  6901. }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(this.anchors, i),
  6902. this._on(this.tabs, {
  6903. keydown: "_tabKeydown"
  6904. }), this._on(this.panels, {
  6905. keydown: "_panelKeydown"
  6906. }), this._focusable(this.tabs), this._hoverable(this.tabs)
  6907. },
  6908. _setupHeightStyle: function (e) {
  6909. var i, s = this.element.parent();
  6910. "fill" === e ? (i = s.height(), i -= this.element.outerHeight() - this.element.height(), this.element
  6911. .siblings(":visible").each(function () {
  6912. var e = t(this),
  6913. s = e.css("position");
  6914. "absolute" !== s && "fixed" !== s && (i -= e.outerHeight(!0))
  6915. }), this.element.children().not(this.panels).each(function () {
  6916. i -= t(this).outerHeight(!0)
  6917. }), this.panels.each(function () {
  6918. t(this).height(Math.max(0, i - t(this).innerHeight() + t(this).height()))
  6919. }).css("overflow", "auto")) : "auto" === e && (i = 0, this.panels.each(function () {
  6920. i = Math.max(i, t(this).height("").height())
  6921. }).height(i))
  6922. },
  6923. _eventHandler: function (e) {
  6924. var i = this.options,
  6925. s = this.active,
  6926. n = t(e.currentTarget),
  6927. o = n.closest("li"),
  6928. a = o[0] === s[0],
  6929. r = a && i.collapsible,
  6930. h = r ? t() : this._getPanelForTab(o),
  6931. l = s.length ? this._getPanelForTab(s) : t(),
  6932. c = {
  6933. oldTab: s,
  6934. oldPanel: l,
  6935. newTab: r ? t() : o,
  6936. newPanel: h
  6937. };
  6938. e.preventDefault(), o.hasClass("ui-state-disabled") || o.hasClass("ui-tabs-loading") || this.running ||
  6939. a && !i.collapsible || this._trigger("beforeActivate", e, c) === !1 || (i.active = r ? !1 :
  6940. this.tabs.index(o), this.active = a ? t() : o, this.xhr && this.xhr.abort(), l.length ||
  6941. h.length || t.error("jQuery UI Tabs: Mismatching fragment identifier."), h.length &&
  6942. this.load(this.tabs.index(o), e), this._toggle(e, c))
  6943. },
  6944. _toggle: function (e, i) {
  6945. function s() {
  6946. o.running = !1, o._trigger("activate", e, i)
  6947. }
  6948. function n() {
  6949. i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), a.length && o.options.show ?
  6950. o._show(a, o.options.show, s) : (a.show(), s())
  6951. }
  6952. var o = this,
  6953. a = i.newPanel,
  6954. r = i.oldPanel;
  6955. this.running = !0, r.length && this.options.hide ? this._hide(r, this.options.hide, function () {
  6956. i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), n()
  6957. }) : (i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), r.hide(), n()),
  6958. r.attr({
  6959. "aria-expanded": "false",
  6960. "aria-hidden": "true"
  6961. }), i.oldTab.attr("aria-selected", "false"), a.length && r.length ? i.oldTab.attr(
  6962. "tabIndex", -1) : a.length && this.tabs.filter(function () {
  6963. return 0 === t(this).attr("tabIndex")
  6964. }).attr("tabIndex", -1), a.attr({
  6965. "aria-expanded": "true",
  6966. "aria-hidden": "false"
  6967. }), i.newTab.attr({
  6968. "aria-selected": "true",
  6969. tabIndex: 0
  6970. })
  6971. },
  6972. _activate: function (e) {
  6973. var i, s = this._findActive(e);
  6974. s[0] !== this.active[0] && (s.length || (s = this.active), i = s.find(".ui-tabs-anchor")[0],
  6975. this._eventHandler({
  6976. target: i,
  6977. currentTarget: i,
  6978. preventDefault: t.noop
  6979. }))
  6980. },
  6981. _findActive: function (e) {
  6982. return e === !1 ? t() : this.tabs.eq(e)
  6983. },
  6984. _getIndex: function (t) {
  6985. return "string" == typeof t && (t = this.anchors.index(this.anchors.filter("[href$='" + t +
  6986. "']"))), t
  6987. },
  6988. _destroy: function () {
  6989. this.xhr && this.xhr.abort(), this.element.removeClass(
  6990. "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"), this.tablist.removeClass(
  6991. "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr(
  6992. "role"), this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr(
  6993. "tabIndex").removeUniqueId(), this.tabs.add(this.panels).each(function () {
  6994. t.data(this, "ui-tabs-destroy") ? t(this).remove() : t(this).removeClass(
  6995. "ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel"
  6996. ).removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr(
  6997. "aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr(
  6998. "aria-expanded").removeAttr("role")
  6999. }), this.tabs.each(function () {
  7000. var e = t(this),
  7001. i = e.data("ui-tabs-aria-controls");
  7002. i ? e.attr("aria-controls", i).removeData("ui-tabs-aria-controls") : e.removeAttr(
  7003. "aria-controls")
  7004. }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height",
  7005. "")
  7006. },
  7007. enable: function (i) {
  7008. var s = this.options.disabled;
  7009. s !== !1 && (i === e ? s = !1 : (i = this._getIndex(i), s = t.isArray(s) ? t.map(s, function (t) {
  7010. return t !== i ? t : null
  7011. }) : t.map(this.tabs, function (t, e) {
  7012. return e !== i ? e : null
  7013. })), this._setupDisabled(s))
  7014. },
  7015. disable: function (i) {
  7016. var s = this.options.disabled;
  7017. if (s !== !0) {
  7018. if (i === e) s = !0;
  7019. else {
  7020. if (i = this._getIndex(i), -1 !== t.inArray(i, s)) return;
  7021. s = t.isArray(s) ? t.merge([i], s).sort() : [i]
  7022. }
  7023. this._setupDisabled(s)
  7024. }
  7025. },
  7026. load: function (e, i) {
  7027. e = this._getIndex(e);
  7028. var n = this,
  7029. o = this.tabs.eq(e),
  7030. a = o.find(".ui-tabs-anchor"),
  7031. r = this._getPanelForTab(o),
  7032. h = {
  7033. tab: o,
  7034. panel: r
  7035. };
  7036. s(a[0]) || (this.xhr = t.ajax(this._ajaxSettings(a, i, h)), this.xhr && "canceled" !== this.xhr
  7037. .statusText && (o.addClass("ui-tabs-loading"), r.attr("aria-busy", "true"), this.xhr.success(
  7038. function (t) {
  7039. setTimeout(function () {
  7040. r.html(t), n._trigger("load", i, h)
  7041. }, 1)
  7042. }).complete(function (t, e) {
  7043. setTimeout(function () {
  7044. "abort" === e && n.panels.stop(!1, !0), o.removeClass(
  7045. "ui-tabs-loading"), r.removeAttr("aria-busy"), t === n.xhr &&
  7046. delete n.xhr
  7047. }, 1)
  7048. })))
  7049. },
  7050. _ajaxSettings: function (e, i, s) {
  7051. var n = this;
  7052. return {
  7053. url: e.attr("href"),
  7054. beforeSend: function (e, o) {
  7055. return n._trigger("beforeLoad", i, t.extend({
  7056. jqXHR: e,
  7057. ajaxSettings: o
  7058. }, s))
  7059. }
  7060. }
  7061. },
  7062. _getPanelForTab: function (e) {
  7063. var i = t(e).attr("aria-controls");
  7064. return this.element.find(this._sanitizeSelector("#" + i))
  7065. }
  7066. })
  7067. }(jQuery),
  7068. function (t) {
  7069. function e(e, i) {
  7070. var s = (e.attr("aria-describedby") || "").split(/\s+/);
  7071. s.push(i), e.data("ui-tooltip-id", i).attr("aria-describedby", t.trim(s.join(" ")))
  7072. }
  7073. function i(e) {
  7074. var i = e.data("ui-tooltip-id"),
  7075. s = (e.attr("aria-describedby") || "").split(/\s+/),
  7076. n = t.inArray(i, s); - 1 !== n && s.splice(n, 1), e.removeData("ui-tooltip-id"), s = t.trim(s.join(" ")), s ?
  7077. e.attr("aria-describedby", s) : e.removeAttr("aria-describedby")
  7078. }
  7079. var s = 0;
  7080. t.widget("ui.tooltip", {
  7081. version: "1.10.3",
  7082. options: {
  7083. content: function () {
  7084. var e = t(this).attr("title") || "";
  7085. return t("<a>").text(e).html()
  7086. },
  7087. hide: !0,
  7088. items: "[title]:not([disabled])",
  7089. position: {
  7090. my: "left top+15",
  7091. at: "left bottom",
  7092. collision: "flipfit flip"
  7093. },
  7094. show: !0,
  7095. tooltipClass: null,
  7096. track: !1,
  7097. close: null,
  7098. open: null
  7099. },
  7100. _create: function () {
  7101. this._on({
  7102. mouseover: "open",
  7103. focusin: "open"
  7104. }), this.tooltips = {}, this.parents = {}, this.options.disabled && this._disable()
  7105. },
  7106. _setOption: function (e, i) {
  7107. var s = this;
  7108. return "disabled" === e ? (this[i ? "_disable" : "_enable"](), this.options[e] = i, void 0) : (
  7109. this._super(e, i), "content" === e && t.each(this.tooltips, function (t, e) {
  7110. s._updateContent(e)
  7111. }), void 0)
  7112. },
  7113. _disable: function () {
  7114. var e = this;
  7115. t.each(this.tooltips, function (i, s) {
  7116. var n = t.Event("blur");
  7117. n.target = n.currentTarget = s[0], e.close(n, !0)
  7118. }), this.element.find(this.options.items).addBack().each(function () {
  7119. var e = t(this);
  7120. e.is("[title]") && e.data("ui-tooltip-title", e.attr("title")).attr("title", "")
  7121. })
  7122. },
  7123. _enable: function () {
  7124. this.element.find(this.options.items).addBack().each(function () {
  7125. var e = t(this);
  7126. e.data("ui-tooltip-title") && e.attr("title", e.data("ui-tooltip-title"))
  7127. })
  7128. },
  7129. open: function (e) {
  7130. var i = this,
  7131. s = t(e ? e.target : this.element).closest(this.options.items);
  7132. s.length && !s.data("ui-tooltip-id") && (s.attr("title") && s.data("ui-tooltip-title", s.attr(
  7133. "title")), s.data("ui-tooltip-open", !0), e && "mouseover" === e.type && s.parents()
  7134. .each(function () {
  7135. var e, s = t(this);
  7136. s.data("ui-tooltip-open") && (e = t.Event("blur"), e.target = e.currentTarget =
  7137. this, i.close(e, !0)), s.attr("title") && (s.uniqueId(), i.parents[this
  7138. .id] = {
  7139. element: this,
  7140. title: s.attr("title")
  7141. }, s.attr("title", ""))
  7142. }), this._updateContent(s, e))
  7143. },
  7144. _updateContent: function (t, e) {
  7145. var i, s = this.options.content,
  7146. n = this,
  7147. o = e ? e.type : null;
  7148. return "string" == typeof s ? this._open(e, t, s) : (i = s.call(t[0], function (i) {
  7149. t.data("ui-tooltip-open") && n._delay(function () {
  7150. e && (e.type = o), this._open(e, t, i)
  7151. })
  7152. }), i && this._open(e, t, i), void 0)
  7153. },
  7154. _open: function (i, s, n) {
  7155. function o(t) {
  7156. l.of = t, a.is(":hidden") || a.position(l)
  7157. }
  7158. var a, r, h, l = t.extend({}, this.options.position);
  7159. if (n) {
  7160. if (a = this._find(s), a.length) return a.find(".ui-tooltip-content").html(n), void 0;
  7161. s.is("[title]") && (i && "mouseover" === i.type ? s.attr("title", "") : s.removeAttr(
  7162. "title")), a = this._tooltip(s), e(s, a.attr("id")), a.find(".ui-tooltip-content").html(
  7163. n), this.options.track && i && /^mouse/.test(i.type) ? (this._on(this.document, {
  7164. mousemove: o
  7165. }), o(i)) : a.position(t.extend({
  7166. of: s
  7167. }, this.options.position)), a.hide(), this._show(a, this.options.show), this.options.show &&
  7168. this.options.show.delay && (h = this.delayedShow = setInterval(function () {
  7169. a.is(":visible") && (o(l.of), clearInterval(h))
  7170. }, t.fx.interval)), this._trigger("open", i, {
  7171. tooltip: a
  7172. }), r = {
  7173. keyup: function (e) {
  7174. if (e.keyCode === t.ui.keyCode.ESCAPE) {
  7175. var i = t.Event(e);
  7176. i.currentTarget = s[0], this.close(i, !0)
  7177. }
  7178. },
  7179. remove: function () {
  7180. this._removeTooltip(a)
  7181. }
  7182. }, i && "mouseover" !== i.type || (r.mouseleave = "close"), i && "focusin" !== i.type ||
  7183. (r.focusout = "close"), this._on(!0, s, r)
  7184. }
  7185. },
  7186. close: function (e) {
  7187. var s = this,
  7188. n = t(e ? e.currentTarget : this.element),
  7189. o = this._find(n);
  7190. this.closing || (clearInterval(this.delayedShow), n.data("ui-tooltip-title") && n.attr("title",
  7191. n.data("ui-tooltip-title")), i(n), o.stop(!0), this._hide(o, this.options.hide,
  7192. function () {
  7193. s._removeTooltip(t(this))
  7194. }), n.removeData("ui-tooltip-open"), this._off(n, "mouseleave focusout keyup"), n[0] !==
  7195. this.element[0] && this._off(n, "remove"), this._off(this.document, "mousemove"), e &&
  7196. "mouseleave" === e.type && t.each(this.parents, function (e, i) {
  7197. t(i.element).attr("title", i.title), delete s.parents[e]
  7198. }), this.closing = !0, this._trigger("close", e, {
  7199. tooltip: o
  7200. }), this.closing = !1)
  7201. },
  7202. _tooltip: function (e) {
  7203. var i = "ui-tooltip-" + s++,
  7204. n = t("<div>").attr({
  7205. id: i,
  7206. role: "tooltip"
  7207. }).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass ||
  7208. ""));
  7209. return t("<div>").addClass("ui-tooltip-content").appendTo(n), n.appendTo(this.document[0].body),
  7210. this.tooltips[i] = e, n
  7211. },
  7212. _find: function (e) {
  7213. var i = e.data("ui-tooltip-id");
  7214. return i ? t("#" + i) : t()
  7215. },
  7216. _removeTooltip: function (t) {
  7217. t.remove(), delete this.tooltips[t.attr("id")]
  7218. },
  7219. _destroy: function () {
  7220. var e = this;
  7221. t.each(this.tooltips, function (i, s) {
  7222. var n = t.Event("blur");
  7223. n.target = n.currentTarget = s[0], e.close(n, !0), t("#" + i).remove(), s.data(
  7224. "ui-tooltip-title") && (s.attr("title", s.data("ui-tooltip-title")), s.removeData(
  7225. "ui-tooltip-title"))
  7226. })
  7227. }
  7228. })
  7229. }(jQuery);