1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595 |
- (function(
- userConfig,
- defaultConfig
- ){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var noop = function(){
- },
- isEmpty = function(it){
- for(var p in it){
- return 0;
- }
- return 1;
- },
- toString = {}.toString,
- isFunction = function(it){
- return toString.call(it) == "[object Function]";
- },
- isString = function(it){
- return toString.call(it) == "[object String]";
- },
- isArray = function(it){
- return toString.call(it) == "[object Array]";
- },
- forEach = function(vector, callback){
- if(vector){
- for(var i = 0; i < vector.length;){
- callback(vector[i++]);
- }
- }
- },
- mix = function(dest, src){
- for(var p in src){
- dest[p] = src[p];
- }
- return dest;
- },
- makeError = function(error, info){
- return mix(new Error(error), {src:"dojoLoader", info:info});
- },
- uidSeed = 1,
- uid = function(){
-
- return "_" + uidSeed++;
- },
-
-
- req = function(
- config, //(object, optional) hash of configuration properties
- dependencies, //(array of commonjs.moduleId, optional) list of modules to be loaded before applying callback
- callback //(function, optional) lamda expression to apply to module values implied by dependencies
- ){
- return contextRequire(config, dependencies, callback, 0, req);
- },
-
- global = this,
- doc = global.document,
- element = doc && doc.createElement("DiV"),
- has = req.has = function(name){
- return isFunction(hasCache[name]) ? (hasCache[name] = hasCache[name](global, doc, element)) : hasCache[name];
- },
- hasCache = has.cache = defaultConfig.hasCache;
- has.add = function(name, test, now, force){
- (hasCache[name]===undefined || force) && (hasCache[name] = test);
- return now && has(name);
- };
- false && has.add("host-node", userConfig.has && "host-node" in userConfig.has ?
- userConfig.has["host-node"] :
- (typeof process == "object" && process.versions && process.versions.node && process.versions.v8));
- if(0){
-
- require("./_base/configNode.js").config(defaultConfig);
-
- defaultConfig.loaderPatch.nodeRequire = require;
- }
- false && has.add("host-rhino", userConfig.has && "host-rhino" in userConfig.has ?
- userConfig.has["host-rhino"] :
- (typeof load == "function" && (typeof Packages == "function" || typeof Packages == "object")));
- if(0){
-
- for(var baseUrl = userConfig.baseUrl || ".", arg, rhinoArgs = this.arguments, i = 0; i < rhinoArgs.length;){
- arg = (rhinoArgs[i++] + "").split("=");
- if(arg[0] == "baseUrl"){
- baseUrl = arg[1];
- break;
- }
- }
- load(baseUrl + "/_base/configRhino.js");
- rhinoDojoConfig(defaultConfig, baseUrl, rhinoArgs);
- }
-
-
- for(var p in userConfig.has){
- has.add(p, userConfig.has[p], 0, 1);
- }
-
-
-
-
-
- var requested = 1,
- arrived = 2,
- nonmodule = 3,
- executing = 4,
- executed = 5;
- if(0){
-
- requested = "requested";
- arrived = "arrived";
- nonmodule = "not-a-module";
- executing = "executing";
- executed = "executed";
- }
- var legacyMode = 0,
- sync = "sync",
- xd = "xd",
- syncExecStack = [],
- dojoRequirePlugin = 0,
- checkDojoRequirePlugin = noop,
- transformToAmd = noop,
- getXhr;
- if(1){
- req.isXdUrl = noop;
- req.initSyncLoader = function(dojoRequirePlugin_, checkDojoRequirePlugin_, transformToAmd_){
- if(!dojoRequirePlugin){
- dojoRequirePlugin = dojoRequirePlugin_;
- checkDojoRequirePlugin = checkDojoRequirePlugin_;
- transformToAmd = transformToAmd_;
- }
- return {
- sync:sync,
- xd:xd,
- arrived:arrived,
- nonmodule:nonmodule,
- executing:executing,
- executed:executed,
- syncExecStack:syncExecStack,
- modules:modules,
- execQ:execQ,
- getModule:getModule,
- injectModule:injectModule,
- setArrived:setArrived,
- signal:signal,
- finishExec:finishExec,
- execModule:execModule,
- dojoRequirePlugin:dojoRequirePlugin,
- getLegacyMode:function(){return legacyMode;},
- holdIdle:function(){checkCompleteGuard++;},
- releaseIdle:function(){checkIdle();}
- };
- };
- if(1){
-
- var locationProtocol = location.protocol,
- locationHost = location.host,
- fileProtocol = !locationHost;
- req.isXdUrl = function(url){
- if(fileProtocol || /^\./.test(url)){
-
- return false;
- }
- if(/^\/\//.test(url)){
-
- return true;
- }
-
- var match = url.match(/^([^\/\:]+\:)\/\/([^\/]+)/);
- return match && (match[1] != locationProtocol || match[2] != locationHost);
- };
-
- true || has.add("dojo-xhr-factory", 1);
- has.add("dojo-force-activex-xhr", 1 && !doc.addEventListener && window.location.protocol == "file:");
- has.add("native-xhr", typeof XMLHttpRequest != "undefined");
- if(has("native-xhr") && !has("dojo-force-activex-xhr")){
- getXhr = function(){
- return new XMLHttpRequest();
- };
- }else{
-
- for(var XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], progid, i = 0; i < 3;){
- try{
- progid = XMLHTTP_PROGIDS[i++];
- if(new ActiveXObject(progid)){
-
- break;
- }
- }catch(e){
-
-
-
- }
- }
- getXhr = function(){
- return new ActiveXObject(progid);
- };
- }
- req.getXhr = getXhr;
- has.add("dojo-gettext-api", 1);
- req.getText = function(url, async, onLoad){
- var xhr = getXhr();
- xhr.open('GET', fixupUrl(url), false);
- xhr.send(null);
- if(xhr.status == 200 || (!location.host && !xhr.status)){
- if(onLoad){
- onLoad(xhr.responseText, async);
- }
- }else{
- throw makeError("xhrFailed", xhr.status);
- }
- return xhr.responseText;
- };
- }
- }else{
- req.async = 1;
- }
-
-
-
- var eval_ =
-
- new Function('return eval(arguments[0]);');
- req.eval =
- function(text, hint){
- return eval_(text + "\r\n//# sourceURL=" + hint);
- };
-
-
-
- var listenerQueues = {},
- error = "error",
- signal = req.signal = function(type, args){
- var queue = listenerQueues[type];
-
-
- forEach(queue && queue.slice(0), function(listener){
- listener.apply(null, isArray(args) ? args : [args]);
- });
- },
- on = req.on = function(type, listener){
-
- var queue = listenerQueues[type] || (listenerQueues[type] = []);
- queue.push(listener);
- return {
- remove:function(){
- for(var i = 0; i<queue.length; i++){
- if(queue[i]===listener){
- queue.splice(i, 1);
- return;
- }
- }
- }
- };
- };
-
-
-
- var
- aliases
-
- = [],
- paths
-
- = {},
- pathsMapProg
-
-
- = [],
- packs
-
- = {},
- packageMap
-
- = {},
- packageMapProg
-
-
- = [],
- modules
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- = {},
- cacheBust
-
- = "",
- cache
-
-
-
-
- = {},
- pendingCacheInsert
-
-
-
-
-
-
- = {},
- dojoSniffConfig
-
-
- = {};
- if(1){
- var consumePendingCacheInsert = function(referenceModule){
- var p, item, match, now;
- for(p in pendingCacheInsert){
- item = pendingCacheInsert[p];
- match = p.match(/^url\:(.+)/);
- if(match){
- cache[toUrl(match[1], referenceModule)] = item;
- }else if(p=="*now"){
- now = item;
- }else if(p!="*noref"){
- cache[getModuleInfo(p, referenceModule).mid] = item;
- }
- }
- if(now){
- now(createRequire(referenceModule));
- }
- pendingCacheInsert = {};
- },
- computeMapProg = function(map, dest, packName){
-
-
-
-
-
-
-
- dest.splice(0, dest.length);
- var p, i, item, reverseName = 0;
- for(p in map){
- dest.push([p, map[p]]);
- if(map[p]==packName){
- reverseName = p;
- }
- }
- dest.sort(function(lhs, rhs){
- return rhs[0].length - lhs[0].length;
- });
- for(i = 0; i < dest.length;){
- item = dest[i++];
- item[2] = new RegExp("^" + item[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(c){ return "\\" + c; }) + "(\/|$)");
- item[3] = item[0].length + 1;
- }
- return reverseName;
- },
- fixupPackageInfo = function(packageInfo, baseUrl){
-
- var name = packageInfo.name;
- if(!name){
-
- name = packageInfo;
- packageInfo = {name:name};
- }
- packageInfo = mix({main:"main", mapProg:[]}, packageInfo);
- packageInfo.location = (baseUrl || "") + (packageInfo.location ? packageInfo.location : name);
- packageInfo.reverseName = computeMapProg(packageInfo.packageMap, packageInfo.mapProg, name);
- if(!packageInfo.main.indexOf("./")){
- packageInfo.main = packageInfo.main.substring(2);
- }
-
-
- mix(paths, packageInfo.paths);
-
- packs[name] = packageInfo;
- packageMap[name] = name;
- },
- config = function(config, booting){
- for(var p in config){
- if(p=="waitSeconds"){
- req.waitms = (config[p] || 0) * 1000;
- }
- if(p=="cacheBust"){
- cacheBust = config[p] ? (isString(config[p]) ? config[p] : (new Date()).getTime() + "") : "";
- }
- if(p=="baseUrl" || p=="combo"){
- req[p] = config[p];
- }
- if(1 && p=="async"){
-
-
-
-
-
-
- var mode = config[p];
- req.legacyMode = legacyMode = (isString(mode) && /sync|legacyAsync/.test(mode) ? mode : (!mode ? "sync" : false));
- req.async = !legacyMode;
- }
- if(config[p]!==hasCache){
-
- req.rawConfig[p] = config[p];
- p!="has" && has.add("config-"+p, config[p], 0, booting);
- }
- }
-
- if(!req.baseUrl){
- req.baseUrl = "./";
- }
-
- if(!/\/$/.test(req.baseUrl)){
- req.baseUrl += "/";
- }
-
- for(p in config.has){
- has.add(p, config.has[p], 0, booting);
- }
-
- forEach(config.packages, fixupPackageInfo);
-
- for(var baseUrl in config.packagePaths){
- forEach(config.packagePaths[baseUrl], function(packageInfo){
- fixupPackageInfo(packageInfo, baseUrl + "/");
- });
- }
-
-
- computeMapProg(mix(paths, config.paths), pathsMapProg);
-
- forEach(config.aliases, function(pair){
- if(isString(pair[0])){
- pair[0] = new RegExp("^" + pair[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(c){return "\\" + c;}) + "$");
- }
- aliases.push(pair);
- });
-
- computeMapProg(mix(packageMap, config.packageMap), packageMapProg);
-
- if(config.cache){
- consumePendingCacheInsert();
- pendingCacheInsert = config.cache;
- if(config.cache["*noref"]){
- consumePendingCacheInsert();
- }
- }
- signal("config", [config, req.rawConfig]);
- };
-
-
-
- if(has("dojo-cdn") || 1){
- for(var dojoDir, src, match, scripts = doc.getElementsByTagName("script"), i = 0; i < scripts.length && !match; i++){
- if((src = scripts[i].getAttribute("src")) && (match = src.match(/(.*)\/?dojo\.js(\W|$)/i))){
-
- userConfig.baseUrl = dojoDir = userConfig.baseUrl || defaultConfig.baseUrl || match[1];
-
- src = (scripts[i].getAttribute("data-dojo-config") || scripts[i].getAttribute("djConfig"));
- if(src){
- dojoSniffConfig = req.eval("({ " + src + " })", "data-dojo-config");
- }
- if(0){
- var dataMain = scripts[i].getAttribute("data-main");
- if(dataMain){
- dojoSniffConfig.deps = dojoSniffConfig.deps || [dataMain];
- }
- }
- }
- }
- }
- if(0){
-
- try{
- if(window.parent != window && window.parent.require){
- var doh = window.parent.require("doh");
- doh && mix(dojoSniffConfig, doh.testConfig);
- }
- }catch(e){}
- }
-
- req.rawConfig = {};
- config(defaultConfig, 1);
- config(userConfig, 1);
- config(dojoSniffConfig, 1);
- if(has("dojo-cdn")){
- packs.dojo.location = dojoDir;
- packs.dijit.location = dojoDir + "../dijit/";
- packs.dojox.location = dojoDir + "../dojox/";
- }
- }else{
-
- paths = defaultConfig.paths;
- pathsMapProg = defaultConfig.pathsMapProg;
- packs = defaultConfig.packs;
- aliases = defaultConfig.aliases;
- packageMap = defaultConfig.packageMap;
- packageMapProg = defaultConfig.packageMapProg;
- modules = defaultConfig.modules;
- cache = defaultConfig.cache;
- cacheBust = defaultConfig.cacheBust;
-
- req.rawConfig = defaultConfig;
- }
- if(0){
- req.combo = req.combo || {add:noop};
- var comboPending = 0,
- combosPending = [],
- comboPendingTimer = null;
- }
-
- var injectDependencies = function(module){
-
- checkCompleteGuard++;
- forEach(module.deps, injectModule);
- if(0 && comboPending && !comboPendingTimer){
- comboPendingTimer = setTimeout(function() {
- comboPending = 0;
- comboPendingTimer = null;
- req.combo.done(function(mids, url) {
- var onLoadCallback= function(){
-
- runDefQ(0, mids);
- checkComplete();
- };
- combosPending.push(mids);
- injectingModule = mids;
- req.injectUrl(url, onLoadCallback, mids);
- injectingModule = 0;
- }, req);
- }, 0);
- }
- checkIdle();
- },
- contextRequire = function(a1, a2, a3, referenceModule, contextRequire){
- var module, syntheticMid;
- if(isString(a1)){
-
- module = getModule(a1, referenceModule, true);
- if(module && module.executed){
- return module.result;
- }
- throw makeError("undefinedModule", a1);
- }
- if(!isArray(a1)){
-
- config(a1);
-
- a1 = a2;
- a2 = a3;
- }
- if(isArray(a1)){
-
- if(!a1.length){
- a2 && a2();
- }else{
- syntheticMid = "require*" + uid();
-
- for(var mid, deps = [], i = 0; i < a1.length;){
- mid = a1[i++];
- if(mid in {exports:1, module:1}){
- throw makeError("illegalModuleId", mid);
- }
- deps.push(getModule(mid, referenceModule));
- }
-
- module = mix(makeModuleInfo("", syntheticMid, 0, ""), {
- injected: arrived,
- deps: deps,
- def: a2 || noop,
- require: referenceModule ? referenceModule.require : req
- });
- modules[module.mid] = module;
-
- injectDependencies(module);
-
-
-
-
- var strict = checkCompleteGuard && req.async;
- checkCompleteGuard++;
- execModule(module, strict);
- checkIdle();
- if(!module.executed){
-
- execQ.push(module);
- }
- checkComplete();
- }
- }
- return contextRequire;
- },
- createRequire = function(module){
- if(!module){
- return req;
- }
- var result = module.require;
- if(!result){
- result = function(a1, a2, a3){
- return contextRequire(a1, a2, a3, module, result);
- };
- module.require = mix(result, req);
- result.module = module;
- result.toUrl = function(name){
- return toUrl(name, module);
- };
- result.toAbsMid = function(mid){
- return toAbsMid(mid, module);
- };
- if(0){
- result.undef = function(mid){
- req.undef(mid, module);
- };
- }
- if(1){
- result.syncLoadNls = function(mid){
- var nlsModuleInfo = getModuleInfo(mid, module),
- nlsModule = modules[nlsModuleInfo.mid];
- if(!nlsModule || !nlsModule.executed){
- cached = cache[nlsModuleInfo.mid] || cache[nlsModuleInfo.cacheId];
- if(cached){
- evalModuleText(cached);
- nlsModule = modules[nlsModuleInfo.mid];
- }
- }
- return nlsModule && nlsModule.executed && nlsModule.result;
- };
- }
- }
- return result;
- },
- execQ =
-
- [],
- defQ =
-
- [],
- waiting =
-
- {},
- setRequested = function(module){
- module.injected = requested;
- waiting[module.mid] = 1;
- if(module.url){
- waiting[module.url] = module.pack || 1;
- }
- },
- setArrived = function(module){
- module.injected = arrived;
- delete waiting[module.mid];
- if(module.url){
- delete waiting[module.url];
- }
- if(isEmpty(waiting)){
- clearTimer();
- 1 && legacyMode==xd && (legacyMode = sync);
- }
- },
- execComplete = req.idle =
-
- function(){
- return !defQ.length && isEmpty(waiting) && !execQ.length && !checkCompleteGuard;
- },
- runMapProg = function(targetMid, map){
-
- for(var i = 0; i < map.length; i++){
- if(map[i][2].test(targetMid)){
- return map[i];
- }
- }
- return 0;
- },
- compactPath = function(path){
- var result = [],
- segment, lastSegment;
- path = path.replace(/\\/g, '/').split('/');
- while(path.length){
- segment = path.shift();
- if(segment==".." && result.length && lastSegment!=".."){
- result.pop();
- lastSegment = result[result.length - 1];
- }else if(segment!="."){
- result.push(lastSegment= segment);
- }
- }
- return result.join("/");
- },
- makeModuleInfo = function(pid, mid, pack, url, cacheId){
- if(1){
- var xd= req.isXdUrl(url);
- return {pid:pid, mid:mid, pack:pack, url:url, executed:0, def:0, isXd:xd, isAmd:!!(xd || (packs[pid] && packs[pid].isAmd)), cacheId:cacheId};
- }else{
- return {pid:pid, mid:mid, pack:pack, url:url, executed:0, def:0, cacheId:cacheId};
- }
- },
- getModuleInfo_ = function(mid, referenceModule, packs, modules, baseUrl, packageMapProg, pathsMapProg, alwaysCreate){
-
-
- var pid, pack, midInPackage, mapProg, mapItem, path, url, result, isRelative, requestedMid, cacheId=0;
- requestedMid = mid;
- isRelative = /^\./.test(mid);
- if(/(^\/)|(\:)|(\.js$)/.test(mid) || (isRelative && !referenceModule)){
-
-
- return makeModuleInfo(0, mid, 0, mid);
- }else{
-
- mid = compactPath(isRelative ? (referenceModule.mid + "/../" + mid) : mid);
- if(/^\./.test(mid)){
- throw makeError("irrationalPath", mid);
- }
-
- mapProg = referenceModule && referenceModule.pack && referenceModule.pack.mapProg;
- mapItem = (mapProg && runMapProg(mid, mapProg)) || runMapProg(mid, packageMapProg);
- if(mapItem){
-
-
- pid = mapItem[1];
- mid = mid.substring(mapItem[3]);
- pack = packs[pid];
- if(!mid){
- mid= pack.main;
- }
- midInPackage = mid;
- cacheId = pack.reverseName + "/" + mid;
- mid = pid + "/" + mid;
- }else{
- pid = "";
- }
-
- var candidateLength = 0,
- candidate = 0;
- forEach(aliases, function(pair){
- var match = mid.match(pair[0]);
- if(match && match.length>candidateLength){
- candidate = isFunction(pair[1]) ? mid.replace(pair[0], pair[1]) : pair[1];
- }
- });
- if(candidate){
- return getModuleInfo_(candidate, 0, packs, modules, baseUrl, packageMapProg, pathsMapProg, alwaysCreate);
- }
- result = modules[mid];
- if(result){
- return alwaysCreate ? makeModuleInfo(result.pid, result.mid, result.pack, result.url, cacheId) : modules[mid];
- }
- }
-
-
- mapItem = runMapProg(mid, pathsMapProg);
- if(mapItem){
- url = mapItem[1] + mid.substring(mapItem[3] - 1);
- }else if(pid){
- url = pack.location + "/" + midInPackage;
- }else if(has("config-tlmSiblingOfDojo")){
- url = "../" + mid;
- }else{
- url = mid;
- }
-
- if(!(/(^\/)|(\:)/.test(url))){
- url = baseUrl + url;
- }
- url += ".js";
- return makeModuleInfo(pid, mid, pack, compactPath(url), cacheId);
- },
- getModuleInfo = function(mid, referenceModule){
- return getModuleInfo_(mid, referenceModule, packs, modules, req.baseUrl, packageMapProg, pathsMapProg);
- },
- resolvePluginResourceId = function(plugin, prid, referenceModule){
- return plugin.normalize ? plugin.normalize(prid, function(mid){return toAbsMid(mid, referenceModule);}) : toAbsMid(prid, referenceModule);
- },
- dynamicPluginUidGenerator = 0,
- getModule = function(mid, referenceModule, immediate){
-
- var match, plugin, prid, result;
- match = mid.match(/^(.+?)\!(.*)$/);
- if(match){
-
- plugin = getModule(match[1], referenceModule, immediate);
- if(1 && legacyMode == sync && !plugin.executed){
- injectModule(plugin);
- if(plugin.injected===arrived && !plugin.executed){
- checkCompleteGuard++;
- execModule(plugin);
- checkIdle();
- }
- if(plugin.executed){
- promoteModuleToPlugin(plugin);
- }else{
-
- execQ.unshift(plugin);
- }
- }
- if(plugin.executed === executed && !plugin.load){
-
- promoteModuleToPlugin(plugin);
- }
-
- if(plugin.load){
- prid = resolvePluginResourceId(plugin, match[2], referenceModule);
- mid = (plugin.mid + "!" + (plugin.dynamic ? ++dynamicPluginUidGenerator + "!" : "") + prid);
- }else{
- prid = match[2];
- mid = plugin.mid + "!" + (++dynamicPluginUidGenerator) + "!waitingForPlugin";
- }
- result = {plugin:plugin, mid:mid, req:createRequire(referenceModule), prid:prid};
- }else{
- result = getModuleInfo(mid, referenceModule);
- }
- return modules[result.mid] || (!immediate && (modules[result.mid] = result));
- },
- toAbsMid = req.toAbsMid = function(mid, referenceModule){
- return getModuleInfo(mid, referenceModule).mid;
- },
- toUrl = req.toUrl = function(name, referenceModule){
- var moduleInfo = getModuleInfo(name+"/x", referenceModule),
- url = moduleInfo.url;
- return fixupUrl(moduleInfo.pid===0 ?
-
- name :
-
- url.substring(0, url.length-5)
- );
- },
- nonModuleProps = {
- injected: arrived,
- executed: executed,
- def: nonmodule,
- result: nonmodule
- },
- makeCjs = function(mid){
- return modules[mid] = mix({mid:mid}, nonModuleProps);
- },
- cjsRequireModule = makeCjs("require"),
- cjsExportsModule = makeCjs("exports"),
- cjsModuleModule = makeCjs("module"),
- runFactory = function(module, args){
- req.trace("loader-run-factory", [module.mid]);
- var factory = module.def,
- result;
- 1 && syncExecStack.unshift(module);
- if(has("config-dojo-loader-catches")){
- try{
- result= isFunction(factory) ? factory.apply(null, args) : factory;
- }catch(e){
- signal(error, module.result = makeError("factoryThrew", [module, e]));
- }
- }else{
- result= isFunction(factory) ? factory.apply(null, args) : factory;
- }
- module.result = result===undefined && module.cjs ? module.cjs.exports : result;
- 1 && syncExecStack.shift(module);
- },
- abortExec = {},
- defOrder = 0,
- promoteModuleToPlugin = function(pluginModule){
- var plugin = pluginModule.result;
- pluginModule.dynamic = plugin.dynamic;
- pluginModule.normalize = plugin.normalize;
- pluginModule.load = plugin.load;
- return pluginModule;
- },
- resolvePluginLoadQ = function(plugin){
-
-
-
-
- var map = {};
- forEach(plugin.loadQ, function(pseudoPluginResource){
-
- var pseudoMid = pseudoPluginResource.mid,
- prid = resolvePluginResourceId(plugin, pseudoPluginResource.prid, pseudoPluginResource.req.module),
- mid = plugin.dynamic ? pseudoPluginResource.mid.replace(/waitingForPlugin$/, prid) : (plugin.mid + "!" + prid),
- pluginResource = mix(mix({}, pseudoPluginResource), {mid:mid, prid:prid, injected:0});
- if(!modules[mid]){
-
- injectPlugin(modules[mid] = pluginResource);
- }
-
-
- map[pseudoPluginResource.mid] = modules[mid];
- setArrived(pseudoPluginResource);
- delete modules[pseudoPluginResource.mid];
- });
- plugin.loadQ = 0;
-
- var substituteModules = function(module){
- for(var replacement, deps = module.deps || [], i = 0; i<deps.length; i++){
- replacement = map[deps[i].mid];
- if(replacement){
- deps[i] = replacement;
- }
- }
- };
- for(var p in modules){
- substituteModules(modules[p]);
- }
- forEach(execQ, substituteModules);
- },
- finishExec = function(module){
- req.trace("loader-finish-exec", [module.mid]);
- module.executed = executed;
- module.defOrder = defOrder++;
- 1 && forEach(module.provides, function(cb){ cb(); });
- if(module.loadQ){
-
- promoteModuleToPlugin(module);
- resolvePluginLoadQ(module);
- }
-
- for(i = 0; i < execQ.length;){
- if(execQ[i] === module){
- execQ.splice(i, 1);
- }else{
- i++;
- }
- }
- },
- circleTrace = [],
- execModule = function(module, strict){
-
- if(module.executed === executing){
- req.trace("loader-circular-dependency", [circleTrace.concat(mid).join("->")]);
- return (!module.def || strict) ? abortExec : (module.cjs && module.cjs.exports);
- }
-
- if(!module.executed){
- if(!module.def){
- return abortExec;
- }
- var mid = module.mid,
- deps = module.deps || [],
- arg, argResult,
- args = [],
- i = 0;
- if(0){
- circleTrace.push(mid);
- req.trace("loader-exec-module", ["exec", circleTrace.length, mid]);
- }
-
-
-
-
-
-
- module.executed = executing;
- while(i < deps.length){
- arg = deps[i++];
- argResult = ((arg === cjsRequireModule) ? createRequire(module) :
- ((arg === cjsExportsModule) ? module.cjs.exports :
- ((arg === cjsModuleModule) ? module.cjs :
- execModule(arg, strict))));
- if(argResult === abortExec){
- module.executed = 0;
- req.trace("loader-exec-module", ["abort", mid]);
- 0 && circleTrace.pop();
- return abortExec;
- }
- args.push(argResult);
- }
- runFactory(module, args);
- finishExec(module);
- }
-
- 0 && circleTrace.pop();
- return module.result;
- },
- checkCompleteGuard = 0,
- checkComplete = function(){
-
-
- if(checkCompleteGuard){
- return;
- }
- checkCompleteGuard++;
- checkDojoRequirePlugin();
- for(var currentDefOrder, module, i = 0; i < execQ.length;){
- currentDefOrder = defOrder;
- module = execQ[i];
- execModule(module);
- if(currentDefOrder!=defOrder){
-
-
- checkDojoRequirePlugin();
- i = 0;
- }else{
-
- i++;
- }
- }
- checkIdle();
- },
- checkIdle = function(){
- checkCompleteGuard--;
- if(execComplete()){
- signal("idle", []);
- }
- };
- if(0){
- req.undef = function(moduleId, referenceModule){
-
-
- var module = getModule(moduleId, referenceModule);
- setArrived(module);
- delete modules[module.mid];
- };
- }
- if(1){
- if(has("dojo-loader-eval-hint-url")===undefined){
- has.add("dojo-loader-eval-hint-url", 1);
- }
- var fixupUrl= function(url){
- url += "";
- return url + (cacheBust ? ((/\?/.test(url) ? "&" : "?") + cacheBust) : "");
- },
- injectPlugin = function(
- module
- ){
-
- var plugin = module.plugin;
- if(plugin.executed === executed && !plugin.load){
-
- promoteModuleToPlugin(plugin);
- }
- var onLoad = function(def){
- module.result = def;
- setArrived(module);
- finishExec(module);
- checkComplete();
- };
- if(plugin.load){
- plugin.load(module.prid, module.req, onLoad);
- }else if(plugin.loadQ){
- plugin.loadQ.push(module);
- }else{
-
-
-
-
- plugin.loadQ = [module];
- execQ.unshift(plugin);
- injectModule(plugin);
- }
- },
-
- cached = 0,
- injectingModule = 0,
- injectingCachedModule = 0,
- evalModuleText = function(text, module){
-
- injectingCachedModule = 1;
- if(has("config-dojo-loader-catches")){
- try{
- if(text===cached){
- cached.call(null);
- }else{
- req.eval(text, has("dojo-loader-eval-hint-url") ? module.url : module.mid);
- }
- }catch(e){
- signal(error, makeError("evalModuleThrew", module));
- }
- }else{
- if(text===cached){
- cached.call(null);
- }else{
- req.eval(text, has("dojo-loader-eval-hint-url") ? module.url : module.mid);
- }
- }
- injectingCachedModule = 0;
- },
- injectModule = function(module){
-
-
-
-
- var mid = module.mid,
- url = module.url;
- if(module.executed || module.injected || waiting[mid] || (module.url && ((module.pack && waiting[module.url]===module.pack) || waiting[module.url]==1))){
- return;
- }
- setRequested(module);
- if(0){
- var viaCombo = 0;
- if(module.plugin && module.plugin.isCombo){
-
-
-
-
- req.combo.add(module.plugin.mid, module.prid, 0, req);
- viaCombo = 1;
- }else if(!module.plugin){
- viaCombo = req.combo.add(0, module.mid, module.url, req);
- }
- if(viaCombo){
- comboPending= 1;
- return;
- }
- }
- if(module.plugin){
- injectPlugin(module);
- return;
- }
- var onLoadCallback = function(){
- runDefQ(module);
- if(module.injected !== arrived){
-
-
-
-
- setArrived(module);
- mix(module, nonModuleProps);
- }
- if(1 && legacyMode){
-
-
-
- !syncExecStack.length && checkComplete();
- }else{
- checkComplete();
- }
- };
- cached = cache[mid] || cache[module.cacheId];
- if(cached){
- req.trace("loader-inject", ["cache", module.mid, url]);
- evalModuleText(cached, module);
- onLoadCallback();
- return;
- }
- if(1 && legacyMode){
- if(module.isXd){
-
- legacyMode==sync && (legacyMode = xd);
-
- }else if(module.isAmd && legacyMode!=sync){
-
- }else{
-
- var xhrCallback = function(text){
- if(legacyMode==sync){
-
-
-
-
- syncExecStack.unshift(module);
- evalModuleText(text, module);
- syncExecStack.shift();
-
- runDefQ(module);
-
- if(!module.cjs){
- setArrived(module);
- finishExec(module);
- }
- if(module.finish){
-
-
-
-
-
-
-
- var finishMid = mid + "*finish",
- finish = module.finish;
- delete module.finish;
- def(finishMid, ["dojo", ("dojo/require!" + finish.join(",")).replace(/\./g, "/")], function(dojo){
- forEach(finish, function(mid){ dojo.require(mid); });
- });
-
- execQ.unshift(getModule(finishMid));
- }
- onLoadCallback();
- }else{
- text = transformToAmd(module, text);
- if(text){
- evalModuleText(text, module);
- onLoadCallback();
- }else{
-
-
- injectingModule = module;
- req.injectUrl(fixupUrl(url), onLoadCallback, module);
- injectingModule = 0;
- }
- }
- };
- req.trace("loader-inject", ["xhr", module.mid, url, legacyMode!=sync]);
- if(has("config-dojo-loader-catches")){
- try{
- req.getText(url, legacyMode!=sync, xhrCallback);
- }catch(e){
- signal(error, makeError("xhrInjectFailed", [module, e]));
- }
- }else{
- req.getText(url, legacyMode!=sync, xhrCallback);
- }
- return;
- }
- }
- req.trace("loader-inject", ["script", module.mid, url]);
- injectingModule = module;
- req.injectUrl(fixupUrl(url), onLoadCallback, module);
- injectingModule = 0;
- },
- defineModule = function(module, deps, def){
- req.trace("loader-define-module", [module.mid, deps]);
- if(0 && module.plugin && module.plugin.isCombo){
-
-
-
- module.result = isFunction(def) ? def() : def;
- setArrived(module);
- finishExec(module);
- return module;
- };
- var mid = module.mid;
- if(module.injected === arrived){
- signal(error, makeError("multipleDefine", module));
- return module;
- }
- mix(module, {
- deps: deps,
- def: def,
- cjs: {
- id: module.mid,
- uri: module.url,
- exports: (module.result = {}),
- setExports: function(exports){
- module.cjs.exports = exports;
- }
- }
- });
-
- for(var i = 0; i < deps.length; i++){
- deps[i] = getModule(deps[i], module);
- }
- if(1 && legacyMode && !waiting[mid]){
-
- injectDependencies(module);
- execQ.push(module);
- checkComplete();
- }
- setArrived(module);
- if(!isFunction(def) && !deps.length){
- module.result = def;
- finishExec(module);
- }
- return module;
- },
- runDefQ = function(referenceModule, mids){
-
-
- var definedModules = [],
- module, args;
- while(defQ.length){
- args = defQ.shift();
- mids && (args[0]= mids.shift());
-
-
-
- module = (args[0] && getModule(args[0])) || referenceModule;
- definedModules.push([module, args[1], args[2]]);
- }
- consumePendingCacheInsert(referenceModule);
- forEach(definedModules, function(args){
- injectDependencies(defineModule.apply(null, args));
- });
- };
- }
- var timerId = 0,
- clearTimer = noop,
- startTimer = noop;
- if(1){
-
- clearTimer = function(){
- timerId && clearTimeout(timerId);
- timerId = 0;
- },
- startTimer = function(){
- clearTimer();
- req.waitms && (timerId = setTimeout(function(){
- clearTimer();
- signal(error, makeError("timeout", waiting));
- }, req.waitms));
- };
- }
- if(1){
- has.add("ie-event-behavior", doc.attachEvent && (typeof opera === "undefined" || opera.toString() != "[object Opera]"));
- }
- if(1 && (1 || 1)){
- var domOn = function(node, eventName, ieEventName, handler){
-
-
- if(!has("ie-event-behavior")){
- node.addEventListener(eventName, handler, false);
- return function(){
- node.removeEventListener(eventName, handler, false);
- };
- }else{
- node.attachEvent(ieEventName, handler);
- return function(){
- node.detachEvent(ieEventName, handler);
- };
- }
- },
- windowOnLoadListener = domOn(window, "load", "onload", function(){
- req.pageLoaded = 1;
- doc.readyState!="complete" && (doc.readyState = "complete");
- windowOnLoadListener();
- });
- if(1){
-
-
-
-
- var sibling = doc.getElementsByTagName("script")[0],
- insertPoint= sibling.parentNode;
- req.injectUrl = function(url, callback, owner){
-
-
- startTimer();
- var node = owner.node = doc.createElement("script"),
- onLoad = function(e){
- e = e || window.event;
- var node = e.target || e.srcElement;
- if(e.type === "load" || /complete|loaded/.test(node.readyState)){
- disconnector();
- callback && callback();
- }
- },
- disconnector = domOn(node, "load", "onreadystatechange", onLoad);
- node.type = "text/javascript";
- node.charset = "utf-8";
- node.src = url;
- insertPoint.insertBefore(node, sibling);
- return node;
- };
- }
- }
- if(1){
- req.log = function(){
- try{
- for(var i = 0; i < arguments.length; i++){
- console.log(arguments[i]);
- }
- }catch(e){}
- };
- }else{
- req.log = noop;
- }
- if(0){
- var trace = req.trace = function(
- group, // the trace group to which this application belongs
- args // the contents of the trace
- ){
-
-
-
-
- if(trace.on && trace.group[group]){
- signal("trace", [group, args]);
- for(var arg, dump = [], text= "trace:" + group + (args.length ? (":" + args[0]) : ""), i= 1; i<args.length;){
- arg = args[i++];
- if(isString(arg)){
- text += ", " + arg;
- }else{
- dump.push(arg);
- }
- }
- req.log(text);
- dump.length && dump.push(".");
- req.log.apply(req, dump);
- }
- };
- mix(trace, {
- on:1,
- group:{},
- set:function(group, value){
- if(isString(group)){
- trace.group[group]= value;
- }else{
- mix(trace.group, group);
- }
- }
- });
- trace.set(mix(mix(mix({}, defaultConfig.trace), userConfig.trace), dojoSniffConfig.trace));
- on("config", function(config){
- config.trace && trace.set(config.trace);
- });
- }else{
- req.trace = noop;
- }
- var def = function(
- mid, //(commonjs.moduleId, optional) list of modules to be loaded before running factory
- dependencies, //(array of commonjs.moduleId, optional)
- factory //(any)
- ){
-
-
-
-
-
- var arity = arguments.length,
- args = 0,
- defaultDeps = ["require", "exports", "module"];
- if(0){
- if(arity == 1 && isFunction(mid)){
- dependencies = [];
- mid.toString()
- .replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg, "")
- .replace(/require\(["']([\w\!\-_\.\/]+)["']\)/g, function (match, dep){
- dependencies.push(dep);
- });
- args = [0, defaultDeps.concat(dependencies), mid];
- }
- }
- if(!args){
- args = arity == 1 ? [0, defaultDeps, mid] :
- (arity == 2 ? (isArray(mid) ? [0, mid, dependencies] : (isFunction(dependencies) ? [mid, defaultDeps, dependencies] : [mid, [], dependencies])) :
- [mid, dependencies, factory]);
- }
- req.trace("loader-define", args.slice(0, 2));
- var targetModule = args[0] && getModule(args[0]),
- module;
- if(targetModule && !waiting[targetModule.mid]){
-
-
-
-
-
- injectDependencies(defineModule(targetModule, args[1], args[2]));
- }else if(!has("ie-event-behavior") || !1 || injectingCachedModule){
-
-
- defQ.push(args);
- }else{
-
-
- targetModule = targetModule || injectingModule;
- if(!targetModule){
- for(mid in waiting){
- module = modules[mid];
- if(module && module.node && module.node.readyState === 'interactive'){
- targetModule = module;
- break;
- }
- }
- if(0 && !targetModule){
- for(var i = 0; i<combosPending.length; i++){
- targetModule = combosPending[i];
- if(targetModule.node && targetModule.node.readyState === 'interactive'){
- break;
- }
- targetModule= 0;
- }
- }
- }
- if(0 && isArray(targetModule)){
- injectDependencies(defineModule(getModule(targetModule.shift()), args[1], args[2]));
- if(!targetModule.length){
- combosPending.splice(i, 1);
- }
- }else if(targetModule){
- consumePendingCacheInsert(targetModule);
- injectDependencies(defineModule(targetModule, args[1], args[2]));
- }else{
- signal(error, makeError("ieDefineFailed", args[0]));
- }
- checkComplete();
- }
- };
- def.amd = {
- vendor:"dojotoolkit.org"
- };
- if(0){
- req.def = def;
- }
-
-
-
- mix(mix(req, defaultConfig.loaderPatch), userConfig.loaderPatch);
-
- on(error, function(arg){
- try{
- console.error(arg);
- if(arg instanceof Error){
- for(var p in arg){
- console.log(p + ":", arg[p]);
- }
- console.log(".");
- }
- }catch(e){}
- });
-
- mix(req, {
- uid:uid,
- cache:cache,
- packs:packs
- });
- if(0){
- mix(req, {
-
- paths:paths,
- aliases:aliases,
- packageMap:packageMap,
- modules:modules,
- legacyMode:legacyMode,
- execQ:execQ,
- defQ:defQ,
- waiting:waiting,
-
-
- pathsMapProg:pathsMapProg,
- packageMapProg:packageMapProg,
- listenerQueues:listenerQueues,
-
- computeMapProg:computeMapProg,
- runMapProg:runMapProg,
- compactPath:compactPath,
- getModuleInfo:getModuleInfo_
- });
- }
-
-
- if(global.define){
- if(1){
- signal(error, makeError("defineAlreadyDefined", 0));
- }
- }else{
- global.define = def;
- global.require = req;
- }
- if(0 && req.combo && req.combo.plugins){
- var plugins = req.combo.plugins,
- pluginName;
- for(pluginName in plugins){
- mix(mix(getModule(pluginName), plugins[pluginName]), {isCombo:1, executed:"executed", load:1});
- }
- }
- if(1){
- var bootDeps = dojoSniffConfig.deps || userConfig.deps || defaultConfig.deps,
- bootCallback = dojoSniffConfig.callback || userConfig.callback || defaultConfig.callback;
- req.boot = (bootDeps || bootCallback) ? [bootDeps || [], bootCallback] : 0;
- }
- if(!1){
- !req.async && req(["dojo"]);
- req.boot && req.apply(null, req.boot);
- }
- })
- (this.dojoConfig || this.djConfig || this.require || {}, {
- async:0,
- hasCache:{
- 'config-selectorEngine':"acme",
- 'config-tlmSiblingOfDojo':1,
- 'dojo-built':1,
- 'dojo-loader':1,
- dom:1,
- 'host-browser':1
- },
- packages:[
- {
- location:"../dijit",
- name:"dijit"
- },
- {
- location:"../dojox",
- name:"dojox"
- },
- {
- location:".",
- name:"dojo"
- }
- ]
- });require({cache:{
- 'dojo/_base/fx':function(){
- define(["./kernel", "./lang", "../Evented", "./Color", "./connect", "./sniff", "../dom", "../dom-style"], function(dojo, lang, Evented, Color, connect, has, dom, style){
-
-
-
-
-
-
-
- var _mixin = lang.mixin;
- dojo._Line = function(/*int*/ start, /*int*/ end){
-
-
-
-
-
-
-
- this.start = start;
- this.end = end;
- };
- dojo._Line.prototype.getValue = function(/*float*/ n){
-
-
- return ((this.end - this.start) * n) + this.start;
- };
- dojo.Animation = function(args){
-
-
-
-
-
-
-
-
-
-
-
-
-
- _mixin(this, args);
- if(lang.isArray(this.curve)){
- this.curve = new dojo._Line(this.curve[0], this.curve[1]);
- }
- };
- dojo.Animation.prototype = new Evented();
-
- dojo._Animation = dojo.Animation;
- lang.extend(dojo.Animation, {
-
-
- duration: 350,
-
-
-
- repeat: 0,
-
-
-
- rate: 20 ,
-
- _percent: 0,
- _startRepeatCount: 0,
- _getStep: function(){
- var _p = this._percent,
- _e = this.easing
- ;
- return _e ? _e(_p) : _p;
- },
- _fire: function(/*Event*/ evt, /*Array?*/ args){
-
-
-
-
-
-
-
-
-
-
-
-
- var a = args||[];
- if(this[evt]){
- if(dojo.config.debugAtAllCosts){
- this[evt].apply(this, a);
- }else{
- try{
- this[evt].apply(this, a);
- }catch(e){
-
-
-
-
-
- console.error("exception in animation handler for:", evt);
- console.error(e);
- }
- }
- }
- return this;
- },
- play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
-
-
-
-
-
-
-
-
-
- var _t = this;
- if(_t._delayTimer){ _t._clearTimer(); }
- if(gotoStart){
- _t._stopTimer();
- _t._active = _t._paused = false;
- _t._percent = 0;
- }else if(_t._active && !_t._paused){
- return _t;
- }
- _t._fire("beforeBegin", [_t.node]);
- var de = delay || _t.delay,
- _p = lang.hitch(_t, "_play", gotoStart);
- if(de > 0){
- _t._delayTimer = setTimeout(_p, de);
- return _t;
- }
- _p();
- return _t;
- },
- _play: function(gotoStart){
- var _t = this;
- if(_t._delayTimer){ _t._clearTimer(); }
- _t._startTime = new Date().valueOf();
- if(_t._paused){
- _t._startTime -= _t.duration * _t._percent;
- }
- _t._active = true;
- _t._paused = false;
- var value = _t.curve.getValue(_t._getStep());
- if(!_t._percent){
- if(!_t._startRepeatCount){
- _t._startRepeatCount = _t.repeat;
- }
- _t._fire("onBegin", [value]);
- }
- _t._fire("onPlay", [value]);
- _t._cycle();
- return _t;
- },
- pause: function(){
-
- var _t = this;
- if(_t._delayTimer){ _t._clearTimer(); }
- _t._stopTimer();
- if(!_t._active){ return _t; }
- _t._paused = true;
- _t._fire("onPause", [_t.curve.getValue(_t._getStep())]);
- return _t;
- },
- gotoPercent: function(/*Decimal*/ percent, /*Boolean?*/ andPlay){
-
-
-
-
-
-
- var _t = this;
- _t._stopTimer();
- _t._active = _t._paused = true;
- _t._percent = percent;
- if(andPlay){ _t.play(); }
- return _t;
- },
- stop: function(/*boolean?*/ gotoEnd){
-
-
- var _t = this;
- if(_t._delayTimer){ _t._clearTimer(); }
- if(!_t._timer){ return _t; }
- _t._stopTimer();
- if(gotoEnd){
- _t._percent = 1;
- }
- _t._fire("onStop", [_t.curve.getValue(_t._getStep())]);
- _t._active = _t._paused = false;
- return _t;
- },
- status: function(){
-
-
-
- if(this._active){
- return this._paused ? "paused" : "playing";
- }
- return "stopped";
- },
- _cycle: function(){
- var _t = this;
- if(_t._active){
- var curr = new Date().valueOf();
- var step = (curr - _t._startTime) / (_t.duration);
- if(step >= 1){
- step = 1;
- }
- _t._percent = step;
-
- if(_t.easing){
- step = _t.easing(step);
- }
- _t._fire("onAnimate", [_t.curve.getValue(step)]);
- if(_t._percent < 1){
- _t._startTimer();
- }else{
- _t._active = false;
- if(_t.repeat > 0){
- _t.repeat--;
- _t.play(null, true);
- }else if(_t.repeat == -1){
- _t.play(null, true);
- }else{
- if(_t._startRepeatCount){
- _t.repeat = _t._startRepeatCount;
- _t._startRepeatCount = 0;
- }
- }
- _t._percent = 0;
- _t._fire("onEnd", [_t.node]);
- !_t.repeat && _t._stopTimer();
- }
- }
- return _t;
- },
- _clearTimer: function(){
-
- clearTimeout(this._delayTimer);
- delete this._delayTimer;
- }
- });
-
- var ctr = 0,
- timer = null,
- runner = {
- run: function(){}
- };
- lang.extend(dojo.Animation, {
- _startTimer: function(){
- if(!this._timer){
- this._timer = connect.connect(runner, "run", this, "_cycle");
- ctr++;
- }
- if(!timer){
- timer = setInterval(lang.hitch(runner, "run"), this.rate);
- }
- },
- _stopTimer: function(){
- if(this._timer){
- connect.disconnect(this._timer);
- this._timer = null;
- ctr--;
- }
- if(ctr <= 0){
- clearInterval(timer);
- timer = null;
- ctr = 0;
- }
- }
- });
- var _makeFadeable =
- has("ie") ? function(node){
-
-
- var ns = node.style;
-
-
- if(!ns.width.length && style.get(node, "width") == "auto"){
- ns.width = "auto";
- }
- } :
- function(){};
- dojo._fade = function(/*Object*/ args){
-
-
-
-
- args.node = dom.byId(args.node);
- var fArgs = _mixin({ properties: {} }, args),
- props = (fArgs.properties.opacity = {});
- props.start = !("start" in fArgs) ?
- function(){
- return +style.get(fArgs.node, "opacity")||0;
- } : fArgs.start;
- props.end = fArgs.end;
- var anim = dojo.animateProperty(fArgs);
- connect.connect(anim, "beforeBegin", lang.partial(_makeFadeable, fArgs.node));
- return anim;
- };
-
- dojo.fadeIn = function(/*dojo.__FadeArgs*/ args){
-
-
-
- return dojo._fade(_mixin({ end: 1 }, args));
- };
- dojo.fadeOut = function(/*dojo.__FadeArgs*/ args){
-
-
-
- return dojo._fade(_mixin({ end: 0 }, args));
- };
- dojo._defaultEasing = function(/*Decimal?*/ n){
-
- return 0.5 + ((Math.sin((n + 1.5) * Math.PI)) / 2);
- };
- var PropLine = function(properties){
-
-
-
-
- this._properties = properties;
- for(var p in properties){
- var prop = properties[p];
- if(prop.start instanceof Color){
-
- prop.tempColor = new Color();
- }
- }
- };
- PropLine.prototype.getValue = function(r){
- var ret = {};
- for(var p in this._properties){
- var prop = this._properties[p],
- start = prop.start;
- if(start instanceof Color){
- ret[p] = Color.blendColors(start, prop.end, r, prop.tempColor).toCss();
- }else if(!lang.isArray(start)){
- ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units || "px" : 0);
- }
- }
- return ret;
- };
-
- dojo.animateProperty = function(/*dojo.__AnimArgs*/ args){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var n = args.node = dom.byId(args.node);
- if(!args.easing){ args.easing = dojo._defaultEasing; }
- var anim = new dojo.Animation(args);
- connect.connect(anim, "beforeBegin", anim, function(){
- var pm = {};
- for(var p in this.properties){
-
-
-
-
- if(p == "width" || p == "height"){
- this.node.display = "block";
- }
- var prop = this.properties[p];
- if(lang.isFunction(prop)){
- prop = prop(n);
- }
- prop = pm[p] = _mixin({}, (lang.isObject(prop) ? prop: { end: prop }));
- if(lang.isFunction(prop.start)){
- prop.start = prop.start(n);
- }
- if(lang.isFunction(prop.end)){
- prop.end = prop.end(n);
- }
- var isColor = (p.toLowerCase().indexOf("color") >= 0);
- function getStyle(node, p){
-
- var v = { height: node.offsetHeight, width: node.offsetWidth }[p];
- if(v !== undefined){ return v; }
- v = style.get(node, p);
- return (p == "opacity") ? +v : (isColor ? v : parseFloat(v));
- }
- if(!("end" in prop)){
- prop.end = getStyle(n, p);
- }else if(!("start" in prop)){
- prop.start = getStyle(n, p);
- }
- if(isColor){
- prop.start = new Color(prop.start);
- prop.end = new Color(prop.end);
- }else{
- prop.start = (p == "opacity") ? +prop.start : parseFloat(prop.start);
- }
- }
- this.curve = new PropLine(pm);
- });
- connect.connect(anim, "onAnimate", lang.hitch(style, "set", anim.node));
- return anim;
- };
- dojo.anim = function( /*DOMNode|String*/ node,
- /*Object*/ properties,
- /*Integer?*/ duration,
- /*Function?*/ easing,
- /*Function?*/ onEnd,
- /*Integer?*/ delay){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return dojo.animateProperty({
- node: node,
- duration: duration || dojo.Animation.prototype.duration,
- properties: properties,
- easing: easing,
- onEnd: onEnd
- }).play(delay || 0);
- };
- return {
- _Line: dojo._Line,
- Animation: dojo.Animation,
- _fade: dojo._fade,
- fadeIn: dojo.fadeIn,
- fadeOut: dojo.fadeOut,
- _defaultEasing: dojo._defaultEasing,
- animateProperty: dojo.animateProperty,
- anim: dojo.anim
- };
- });
- },
- 'dojo/dom-form':function(){
- define(["./_base/lang", "./dom", "./io-query", "./json"], function(lang, dom, ioq, json){
-
-
-
-
-
-
-
-
- function setValue(/*Object*/obj, /*String*/name, /*String*/value){
-
-
-
-
-
- if(value === null){
- return;
- }
- var val = obj[name];
- if(typeof val == "string"){
- obj[name] = [val, value];
- }else if(lang.isArray(val)){
- val.push(value);
- }else{
- obj[name] = value;
- }
- }
- var exclude = "file|submit|image|reset|button";
- var form = {
- fieldToObject: function fieldToObject(/*DOMNode|String*/ inputNode){
- var ret = null;
- inputNode = dom.byId(inputNode);
- if(inputNode){
- var _in = inputNode.name, type = (inputNode.type || "").toLowerCase();
- if(_in && type && !inputNode.disabled){
- if(type == "radio" || type == "checkbox"){
- if(inputNode.checked){
- ret = inputNode.value;
- }
- }else if(inputNode.multiple){
- ret = [];
- var nodes = [inputNode.firstChild];
- while(nodes.length){
- for(var node = nodes.pop(); node; node = node.nextSibling){
- if(node.nodeType == 1 && node.tagName.toLowerCase() == "option"){
- if(node.selected){
- ret.push(node.value);
- }
- }else{
- if(node.nextSibling){
- nodes.push(node.nextSibling);
- }
- if(node.firstChild){
- nodes.push(node.firstChild);
- }
- break;
- }
- }
- }
- }else{
- ret = inputNode.value;
- }
- }
- }
- return ret;
- },
- toObject: function formToObject(/*DOMNode|String*/ formNode){
- var ret = {}, elems = dom.byId(formNode).elements;
- for(var i = 0, l = elems.length; i < l; ++i){
- var item = elems[i], _in = item.name, type = (item.type || "").toLowerCase();
- if(_in && type && exclude.indexOf(type) < 0 && !item.disabled){
- setValue(ret, _in, form.fieldToObject(item));
- if(type == "image"){
- ret[_in + ".x"] = ret[_in + ".y"] = ret[_in].x = ret[_in].y = 0;
- }
- }
- }
- return ret;
- },
- toQuery: function formToQuery(/*DOMNode|String*/ formNode){
- return ioq.objectToQuery(form.toObject(formNode));
- },
- toJson: function formToJson(/*DOMNode|String*/ formNode, /*Boolean?*/prettyPrint){
- return json.stringify(form.toObject(formNode), null, prettyPrint ? 4 : 0);
- }
- };
- return form;
- });
- },
- 'dojo/i18n':function(){
- define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config", "./_base/lang", "./_base/xhr", "./json"],
- function(dojo, require, has, array, config, lang, xhr, json) {
-
-
-
-
-
-
-
-
- has.add("dojo-preload-i18n-Api",
-
- 1
- );
- true || has.add("dojo-v1x-i18n-Api",
-
- 1
- );
- var
- thisModule= dojo.i18n=
-
- {},
- nlsRe=
-
-
-
-
-
-
-
- /(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,
- getAvailableLocales= function(
- root,
- locale,
- bundlePath,
- bundleName
- ){
-
-
-
-
-
-
-
-
-
-
-
-
- for(var result= [bundlePath + bundleName], localeParts= locale.split("-"), current= "", i= 0; i<localeParts.length; i++){
- current+= (current ? "-" : "") + localeParts[i];
- if(!root || root[current]){
- result.push(bundlePath + current + "/" + bundleName);
- }
- }
- return result;
- },
- cache= {},
- getL10nName= dojo.getL10nName = function(moduleName, bundleName, locale){
- locale = locale ? locale.toLowerCase() : dojo.locale;
- moduleName = "dojo/i18n!" + moduleName.replace(/\./g, "/");
- bundleName = bundleName.replace(/\./g, "/");
- return (/root/i.test(locale)) ?
- (moduleName + "/nls/" + bundleName) :
- (moduleName + "/nls/" + locale + "/" + bundleName);
- },
- doLoad = function(require, bundlePathAndName, bundlePath, bundleName, locale, load){
-
- require([bundlePathAndName], function(root){
- var current = lang.clone(root.root || root.ROOT),
- availableLocales= getAvailableLocales(!root._v1x && root, locale, bundlePath, bundleName);
- require(availableLocales, function(){
- for (var i= 1; i<availableLocales.length; i++){
- current= lang.mixin(lang.clone(current), arguments[i]);
- }
-
- var target= bundlePathAndName + "/" + locale;
- cache[target]= current;
- load();
- });
- });
- },
- normalize = function(id, toAbsMid){
-
-
-
- return /^\./.test(id) ? toAbsMid(id) : id;
- },
- getLocalesToLoad = function(targetLocale){
- var list = config.extraLocale || [];
- list = lang.isArray(list) ? list : [list];
- list.push(targetLocale);
- return list;
- },
- load = function(id, require, load){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(has("dojo-preload-i18n-Api")){
- var split = id.split("*"),
- preloadDemand = split[1]=="preload";
- if(preloadDemand){
- if(!cache[id]){
-
-
- cache[id] = 1;
- preloadL10n(split[2], json.parse(split[3]), 1);
- }
-
- load(1);
- }
- if(preloadDemand || waitForPreloads(id, require, load)){
- return;
- }
- }
- var match= nlsRe.exec(id),
- bundlePath= match[1] + "/",
- bundleName= match[5] || match[4],
- bundlePathAndName= bundlePath + bundleName,
- localeSpecified = (match[5] && match[4]),
- targetLocale= localeSpecified || dojo.locale,
- loadTarget= bundlePathAndName + "/" + targetLocale,
- loadList = localeSpecified ? [targetLocale] : getLocalesToLoad(targetLocale),
- remaining = loadList.length,
- finish = function(){
- if(!--remaining){
- load(lang.delegate(cache[loadTarget]));
- }
- };
- array.forEach(loadList, function(locale){
- var target = bundlePathAndName + "/" + locale;
- if(has("dojo-preload-i18n-Api")){
- checkForLegacyModules(target);
- }
- if(!cache[target]){
- doLoad(require, bundlePathAndName, bundlePath, bundleName, locale, finish);
- }else{
- finish();
- }
- });
- };
- if(has("dojo-unit-tests")){
- var unitTests = thisModule.unitTests = [];
- }
- if(has("dojo-preload-i18n-Api") || 1){
- var normalizeLocale = thisModule.normalizeLocale= function(locale){
- var result = locale ? locale.toLowerCase() : dojo.locale;
- return result == "root" ? "ROOT" : result;
- },
- isXd = function(mid){
- return (1 && 1) ?
- require.isXdUrl(require.toUrl(mid + ".js")) :
- true;
- },
- preloading = 0,
- preloadWaitQueue = [],
- preloadL10n = thisModule._preloadLocalizations = function(/*String*/bundlePrefix, /*Array*/localesGenerated, /*boolean*/ guaranteedAmdFormat){
-
-
-
-
-
-
-
-
-
-
-
- function forEachLocale(locale, func){
-
- var parts = locale.split("-");
- while(parts.length){
- if(func(parts.join("-"))){
- return true;
- }
- parts.pop();
- }
- return func("ROOT");
- }
- function preload(locale){
- locale = normalizeLocale(locale);
- forEachLocale(locale, function(loc){
- if(array.indexOf(localesGenerated, loc)>=0){
- var mid = bundlePrefix.replace(/\./g, "/")+"_"+loc;
- preloading++;
- (isXd(mid) || guaranteedAmdFormat ? require : syncRequire)([mid], function(rollup){
- for(var p in rollup){
- cache[p + "/" + loc] = rollup[p];
- }
- --preloading;
- while(!preloading && preloadWaitQueue.length){
- load.apply(null, preloadWaitQueue.shift());
- }
- });
- return true;
- }
- return false;
- });
- }
- preload();
- array.forEach(dojo.config.extraLocale, preload);
- },
- waitForPreloads = function(id, require, load){
- if(preloading){
- preloadWaitQueue.push([id, require, load]);
- }
- return preloading;
- };
- }
- if(1){
-
- var evalBundle=
-
- new Function(
- "__bundle",
- "__checkForLegacyModules",
- "__mid",
-
-
-
-
-
- "var define = function(){define.called = 1;},"
- + " require = function(){define.called = 1;};"
- + "try{"
- + "define.called = 0;"
- + "eval(__bundle);"
- + "if(define.called==1)"
-
- + "return 1;"
- + "if((__checkForLegacyModules = __checkForLegacyModules(__mid)))"
-
- + "return __checkForLegacyModules;"
- + "}catch(e){}"
-
-
- + "try{"
- + "return eval('('+__bundle+')');"
- + "}catch(e){"
- + "return e;"
- + "}"
- ),
- syncRequire= function(deps, callback){
- var results= [];
- array.forEach(deps, function(mid){
- var url= require.toUrl(mid + ".js");
- function load(text){
- var result = evalBundle(text, checkForLegacyModules, mid);
- if(result===1){
-
-
-
-
-
- require([mid], function(bundle){
- results.push(cache[url]= bundle);
- });
- }else{
- if(result instanceof Error){
- console.error("failed to evaluate i18n bundle; url=" + url, result);
- result = {};
- }
-
- results.push(cache[url] = (/nls\/[^\/]+\/[^\/]+$/.test(url) ? result : {root:result, _v1x:1}));
- }
- }
- if(cache[url]){
- results.push(cache[url]);
- }else{
- var bundle = require.syncLoadNls(mid);
-
-
-
-
-
-
- if(!bundle){
- bundle = checkForLegacyModules(mid.replace(/nls\/([^\/]*)\/([^\/]*)$/, "nls/$2/$1"));
- }
- if(bundle){
- results.push(bundle);
- }else{
- if(!xhr){
- try{
- require.getText(url, true, load);
- }catch(e){
- results.push(cache[url]= {});
- }
- }else{
- xhr.get({
- url:url,
- sync:true,
- load:load,
- error:function(){
- results.push(cache[url]= {});
- }
- });
- }
- }
- }
- });
- callback && callback.apply(null, results);
- },
- checkForLegacyModules = function(target){
-
- for(var result, names = target.split("/"), object = dojo.global[names[0]], i = 1; object && i<names.length-1; object = object[names[i++]]){}
- if(object){
- result = object[names[i]];
- if(!result){
-
- result = object[names[i].replace(/-/g,"_")];
- }
- if(result){
- cache[target] = result;
- }
- }
- return result;
- };
- thisModule.getLocalization= function(moduleName, bundleName, locale){
- var result,
- l10nName= getL10nName(moduleName, bundleName, locale).substring(10);
- load(l10nName, (!isXd(l10nName) ? syncRequire : require), function(result_){ result= result_; });
- return result;
- };
- if(has("dojo-unit-tests")){
- unitTests.push(function(doh){
- doh.register("tests.i18n.unit", function(t){
- var check;
- check = evalBundle("{prop:1}");
- t.is({prop:1}, check); t.is(undefined, check[1]);
- check = evalBundle("({prop:1})");
- t.is({prop:1}, check); t.is(undefined, check[1]);
- check = evalBundle("{'prop-x':1}");
- t.is({'prop-x':1}, check); t.is(undefined, check[1]);
- check = evalBundle("({'prop-x':1})");
- t.is({'prop-x':1}, check); t.is(undefined, check[1]);
- check = evalBundle("define({'prop-x':1})");
- t.is(1, check);
- check = evalBundle("this is total nonsense and should throw an error");
- t.is(check instanceof Error, true);
- });
- });
- }
- }
- return lang.mixin(thisModule, {
- dynamic:true,
- normalize:normalize,
- load:load,
- cache:cache
- });
- });
- },
- 'dojo/_base/html':function(){
- define("dojo/_base/html", ["./kernel", "../dom", "../dom-style", "../dom-attr", "../dom-prop", "../dom-class", "../dom-construct", "../dom-geometry"], function(dojo, dom, style, attr, prop, cls, ctr, geom){
-
-
-
-
-
- dojo.byId = dom.byId;
- dojo.isDescendant = dom.isDescendant;
- dojo.setSelectable = dom.setSelectable;
-
- dojo.getAttr = attr.get;
- dojo.setAttr = attr.set;
- dojo.hasAttr = attr.has;
- dojo.removeAttr = attr.remove;
- dojo.getNodeProp = attr.getNodeProp;
- dojo.attr = function(node, name, value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(arguments.length == 2){
- return attr[typeof name == "string" ? "get" : "set"](node, name);
- }
- return attr.set(node, name, value);
- };
-
- dojo.hasClass = cls.contains;
- dojo.addClass = cls.add;
- dojo.removeClass = cls.remove;
- dojo.toggleClass = cls.toggle;
- dojo.replaceClass = cls.replace;
-
- dojo._toDom = dojo.toDom = ctr.toDom;
- dojo.place = ctr.place;
- dojo.create = ctr.create;
- dojo.empty = function(node){ ctr.empty(node); };
- dojo._destroyElement = dojo.destroy = function(node){ ctr.destroy(node); };
-
- dojo._getPadExtents = dojo.getPadExtents = geom.getPadExtents;
- dojo._getBorderExtents = dojo.getBorderExtents = geom.getBorderExtents;
- dojo._getPadBorderExtents = dojo.getPadBorderExtents = geom.getPadBorderExtents;
- dojo._getMarginExtents = dojo.getMarginExtents = geom.getMarginExtents;
- dojo._getMarginSize = dojo.getMarginSize = geom.getMarginSize;
- dojo._getMarginBox = dojo.getMarginBox = geom.getMarginBox;
- dojo.setMarginBox = geom.setMarginBox;
- dojo._getContentBox = dojo.getContentBox = geom.getContentBox;
- dojo.setContentSize = geom.setContentSize;
- dojo._isBodyLtr = dojo.isBodyLtr = geom.isBodyLtr;
- dojo._docScroll = dojo.docScroll = geom.docScroll;
- dojo._getIeDocumentElementOffset = dojo.getIeDocumentElementOffset = geom.getIeDocumentElementOffset;
- dojo._fixIeBiDiScrollLeft = dojo.fixIeBiDiScrollLeft = geom.fixIeBiDiScrollLeft;
- dojo.position = geom.position;
- dojo.marginBox = function marginBox(/*DomNode|String*/node, /*Object?*/box){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return box ? geom.setMarginBox(node, box) : geom.getMarginBox(node);
- };
- dojo.contentBox = function contentBox(/*DomNode|String*/node, /*Object?*/box){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return box ? geom.setContentSize(node, box) : geom.getContentBox(node);
- };
- dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- dojo.deprecated("dojo.coords()", "Use dojo.position() or dojo.marginBox().");
- node = dom.byId(node);
- var s = style.getComputedStyle(node), mb = geom.getMarginBox(node, s);
- var abs = geom.position(node, includeScroll);
- mb.x = abs.x;
- mb.y = abs.y;
- return mb;
- };
-
- dojo.getProp = prop.get;
- dojo.setProp = prop.set;
- dojo.prop = function(/*DomNode|String*/node, /*String|Object*/name, /*String?*/value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(arguments.length == 2){
- return prop[typeof name == "string" ? "get" : "set"](node, name);
- }
-
- return prop.set(node, name, value);
- };
-
- dojo.getStyle = style.get;
- dojo.setStyle = style.set;
- dojo.getComputedStyle = style.getComputedStyle;
- dojo.__toPixelValue = dojo.toPixelValue = style.toPixelValue;
- dojo.style = function(node, name, value){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- switch(arguments.length){
- case 1:
- return style.get(node);
- case 2:
- return style[typeof name == "string" ? "get" : "set"](node, name);
- }
-
- return style.set(node, name, value);
- };
- return dojo;
- });
- },
- 'dojo/_base/kernel':function(){
- define(["../has", "./config", "require", "module"], function(has, config, require, module){
-
-
-
-
- var
-
- i, p,
-
-
- global = (function () { return this; })(),
- dijit = {},
- dojox = {},
- dojo = {
-
- config:config,
- global:global,
- dijit:dijit,
- dojox:dojox
- };
-
-
-
-
-
-
-
-
-
-
-
- var scopeMap =
-
-
- {
- dojo:["dojo", dojo],
- dijit:["dijit", dijit],
- dojox:["dojox", dojox]
- },
- packageMap =
-
- (require.packs && require.packs[module.id.match(/[^\/]+/)[0]].packageMap) || {},
- item;
-
- for(p in packageMap){
- if(scopeMap[p]){
-
- scopeMap[p][0] = packageMap[p];
- }else{
-
- scopeMap[p] = [packageMap[p], {}];
- }
- }
-
- for(p in scopeMap){
- item = scopeMap[p];
- item[1]._scopeName = item[0];
- if(!config.noGlobals){
- global[item[0]] = item[1];
- }
- }
- dojo.scopeMap = scopeMap;
-
- dojo.baseUrl = dojo.config.baseUrl = require.baseUrl;
- dojo.isAsync = !1 || require.async;
- dojo.locale = config.locale;
-
- var rev = "$Rev: f95cfee $".match(/[0-9a-f]{7,}/);
- dojo.version = {
- major: 1, minor: 7, patch: 9, flag: "-20220503-IBM",
- revision: rev ? rev[0] : NaN,
- toString: function(){
- var v = dojo.version;
- return v.major + "." + v.minor + "." + v.patch + v.flag + " (" + v.revision + ")";
- }
- };
-
-
-
-
- true || has.add("extend-dojo", 1);
- dojo.eval = function(scriptText){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- };
- (Function("d", "d.eval = function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}"))(dojo);
- if(0){
- dojo.exit = function(exitcode){
- quit(exitcode);
- };
- } else{
- dojo.exit = function(){
- };
- }
- true || has.add("dojo-guarantee-console",
-
- 1
- );
- if(1){
- typeof console != "undefined" || (console = {});
-
- var cn = [
- "assert", "count", "debug", "dir", "dirxml", "error", "group",
- "groupEnd", "info", "profile", "profileEnd", "time", "timeEnd",
- "trace", "warn", "log"
- ];
- var tn;
- i = 0;
- while((tn = cn[i++])){
- if(!console[tn]){
- (function(){
- var tcn = tn + "";
- console[tcn] = ('log' in console) ? function(){
- var a = Array.prototype.slice.call(arguments);
- a.unshift(tcn + ":");
- console["log"](a.join(" "));
- } : function(){};
- console[tcn]._fake = true;
- })();
- }
- }
- }
- has.add("dojo-debug-messages",
-
- !!config.isDebug
- );
- if(has("dojo-debug-messages")){
- dojo.deprecated = function(/*String*/ behaviour, /*String?*/ extra, /*String?*/ removal){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var message = "DEPRECATED: " + behaviour;
- if(extra){ message += " " + extra; }
- if(removal){ message += " -- will be removed in version: " + removal; }
- console.warn(message);
- };
- dojo.experimental = function(/* String */ moduleName, /* String? */ extra){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var message = "EXPERIMENTAL: " + moduleName + " -- APIs subject to change without notice.";
- if(extra){ message += " " + extra; }
- console.warn(message);
- };
- }else{
- dojo.deprecated = dojo.experimental = function(){};
- }
- true || has.add("dojo-modulePaths",
-
- 1
- );
- if(1){
-
-
- if(config.modulePaths){
- dojo.deprecated("dojo.modulePaths", "use paths configuration");
- var paths = {};
- for(p in config.modulePaths){
- paths[p.replace(/\./g, "/")] = config.modulePaths[p];
- }
- require({paths:paths});
- }
- }
- true || has.add("dojo-moduleUrl",
-
- 1
- );
- if(1){
- dojo.moduleUrl = function(/*String*/module, /*String?*/url){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- dojo.deprecated("dojo.moduleUrl()", "use require.toUrl", "2.0");
-
-
-
-
- var result = null;
- if(module){
- result = require.toUrl(module.replace(/\./g, "/") + (url ? ("/" + url) : "") + "/*.*").replace(/\/\*\.\*/, "") + (url ? "" : "/");
- }
- return result;
- };
- }
- dojo._hasResource = {};
- return dojo;
- });
- },
- 'dojo/io-query':function(){
- define(["./_base/lang"], function(lang){
-
-
-
-
- var backstop = {};
- function objectToQuery(/*Object*/ map){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var enc = encodeURIComponent, pairs = [];
- for(var name in map){
- var value = map[name];
- if(value != backstop[name]){
- var assign = enc(name) + "=";
- if(lang.isArray(value)){
- for(var i = 0, l = value.length; i < l; ++i){
- pairs.push(assign + enc(value[i]));
- }
- }else{
- pairs.push(assign + enc(value));
- }
- }
- }
- return pairs.join("&");
- }
- function queryToObject(/*String*/ str){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var dec = decodeURIComponent, qp = str.split("&"), ret = {}, name, val;
- for(var i = 0, l = qp.length, item; i < l; ++i){
- item = qp[i];
- if(item.length){
- var s = item.indexOf("=");
- if(s < 0){
- name = dec(item);
- val = "";
- }else{
- name = dec(item.slice(0, s));
- val = dec(item.slice(s + 1));
- }
- if(typeof ret[name] == "string"){
- ret[name] = [ret[name]];
- }
- if(lang.isArray(ret[name])){
- ret[name].push(val);
- }else{
- ret[name] = val;
- }
- }
- }
- return ret;
- }
- return {
- objectToQuery: objectToQuery,
- queryToObject: queryToObject
- };
- });
- },
- 'dojo/_base/Deferred':function(){
- define(["./kernel", "./lang"], function(dojo, lang){
-
-
-
-
- var mutator = function(){};
- var freeze = Object.freeze || function(){};
-
- dojo.Deferred = function(/*Function?*/ canceller){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var result, finished, isError, head, nextListener;
- var promise = (this.promise = {});
- function complete(value){
- if(finished){
- throw new Error("This deferred has already been resolved");
- }
- result = value;
- finished = true;
- notify();
- }
- function notify(){
- var mutated;
- while(!mutated && nextListener){
- var listener = nextListener;
- nextListener = nextListener.next;
- if((mutated = (listener.progress == mutator))){
- finished = false;
- }
- var func = (isError ? listener.error : listener.resolved);
- if(func){
- try{
- var newResult = func(result);
- if (newResult && typeof newResult.then === "function"){
- newResult.then(lang.hitch(listener.deferred, "resolve"), lang.hitch(listener.deferred, "reject"), lang.hitch(listener.deferred, "progress"));
- continue;
- }
- var unchanged = mutated && newResult === undefined;
- if(mutated && !unchanged){
- isError = newResult instanceof Error;
- }
- listener.deferred[unchanged && isError ? "reject" : "resolve"](unchanged ? result : newResult);
- }catch(e){
- listener.deferred.reject(e);
- }
- }else{
- if(isError){
- listener.deferred.reject(result);
- }else{
- listener.deferred.resolve(result);
- }
- }
- }
- }
-
- this.resolve = this.callback = function(value){
-
-
- this.fired = 0;
- this.results = [value, null];
- complete(value);
- };
-
- this.reject = this.errback = function(error){
-
-
- isError = true;
- this.fired = 1;
- complete(error);
- this.results = [null, error];
- if(!error || error.log !== false){
- (dojo.config.deferredOnError || function(x){ console.error(x); })(error);
- }
- };
-
- this.progress = function(update){
-
-
- var listener = nextListener;
- while(listener){
- var progress = listener.progress;
- progress && progress(update);
- listener = listener.next;
- }
- };
- this.addCallbacks = function(callback, errback){
-
-
-
-
-
-
-
-
- this.then(callback, errback, mutator);
- return this;
- };
-
- promise.then = this.then = function(/*Function?*/resolvedCallback, /*Function?*/errorCallback, /*Function?*/progressCallback){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var returnDeferred = progressCallback == mutator ? this : new dojo.Deferred(promise.cancel);
- var listener = {
- resolved: resolvedCallback,
- error: errorCallback,
- progress: progressCallback,
- deferred: returnDeferred
- };
- if(nextListener){
- head = head.next = listener;
- }
- else{
- nextListener = head = listener;
- }
- if(finished){
- notify();
- }
- return returnDeferred.promise;
- };
- var deferred = this;
- promise.cancel = this.cancel = function (){
-
-
- if(!finished){
- var error = canceller && canceller(deferred);
- if(!finished){
- if (!(error instanceof Error)){
- error = new Error(error);
- }
- error.log = false;
- deferred.reject(error);
- }
- }
- };
- freeze(promise);
- };
- lang.extend(dojo.Deferred, {
- addCallback: function (/*Function*/ callback){
-
-
-
-
- return this.addCallbacks(lang.hitch.apply(dojo, arguments));
- },
- addErrback: function (/*Function*/ errback){
-
-
-
-
- return this.addCallbacks(null, lang.hitch.apply(dojo, arguments));
- },
- addBoth: function (/*Function*/ callback){
-
-
-
-
- var enclosed = lang.hitch.apply(dojo, arguments);
- return this.addCallbacks(enclosed, enclosed);
- },
- fired: -1
- });
- dojo.Deferred.when = dojo.when = function(promiseOrValue, /*Function?*/ callback, /*Function?*/ errback, /*Function?*/ progressHandler){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(promiseOrValue && typeof promiseOrValue.then === "function"){
- return promiseOrValue.then(callback, errback, progressHandler);
- }
- return callback ? callback(promiseOrValue) : promiseOrValue;
- };
- return dojo.Deferred;
- });
- },
- 'dojo/NodeList-dom':function(){
- define(["./_base/kernel", "./query", "./_base/array", "./_base/lang", "./dom-class", "./dom-construct", "./dom-geometry", "./dom-attr", "./dom-style"], function(dojo, query, array, lang, domCls, domCtr, domGeom, domAttr, domStyle){
-
- var magicGuard = function(a){
-
-
- return a.length == 1 && (typeof a[0] == "string");
- };
- var orphan = function(node){
-
-
- var p = node.parentNode;
- if(p){
- p.removeChild(node);
- }
- };
-
- var NodeList = query.NodeList,
- awc = NodeList._adaptWithCondition,
- aafe = NodeList._adaptAsForEach,
- aam = NodeList._adaptAsMap;
- function getSet(module){
- return function(node, name, value){
- if(arguments.length == 2){
- return module[typeof name == "string" ? "get" : "set"](node, name);
- }
-
- return module.set(node, name, value);
- };
- }
- lang.extend(NodeList, {
- _normalize: function(/*String||Element||Object||NodeList*/content, /*DOMNode?*/refNode){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var parse = content.parse === true;
-
- if(typeof content.template == "string"){
- var templateFunc = content.templateFunc || (dojo.string && dojo.string.substitute);
- content = templateFunc ? templateFunc(content.template, content) : content;
- }
- var type = (typeof content);
- if(type == "string" || type == "number"){
- content = domCtr.toDom(content, (refNode && refNode.ownerDocument));
- if(content.nodeType == 11){
-
- content = lang._toArray(content.childNodes);
- }else{
- content = [content];
- }
- }else if(!lang.isArrayLike(content)){
- content = [content];
- }else if(!lang.isArray(content)){
-
-
- content = lang._toArray(content);
- }
-
- if(parse){
- content._runParse = true;
- }
- return content;
- },
- _cloneNode: function(/*DOMNode*/ node){
-
-
-
-
- return node.cloneNode(true);
- },
- _place: function(/*Array*/ary, /*DOMNode*/refNode, /*String*/position, /*Boolean*/useClone){
-
-
-
-
-
-
- if(refNode.nodeType != 1 && position == "only"){
- return;
- }
- var rNode = refNode, tempNode;
-
-
- var length = ary.length;
- for(var i = length - 1; i >= 0; i--){
- var node = (useClone ? this._cloneNode(ary[i]) : ary[i]);
-
-
-
- if(ary._runParse && dojo.parser && dojo.parser.parse){
- if(!tempNode){
- tempNode = rNode.ownerDocument.createElement("div");
- }
- tempNode.appendChild(node);
- dojo.parser.parse(tempNode);
- node = tempNode.firstChild;
- while(tempNode.firstChild){
- tempNode.removeChild(tempNode.firstChild);
- }
- }
- if(i == length - 1){
- domCtr.place(node, rNode, position);
- }else{
- rNode.parentNode.insertBefore(node, rNode);
- }
- rNode = node;
- }
- },
-
-
- attr: awc(getSet(domAttr), magicGuard),
- style: awc(getSet(domStyle), magicGuard),
- addClass: aafe(domCls.add),
- removeClass: aafe(domCls.remove),
- replaceClass: aafe(domCls.replace),
- toggleClass: aafe(domCls.toggle),
- empty: aafe(domCtr.empty),
- removeAttr: aafe(domAttr.remove),
- position: aam(domGeom.position),
- marginBox: aam(domGeom.getMarginBox),
-
-
- place: function(/*String||Node*/ queryOrNode, /*String*/ position){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var item = query(queryOrNode)[0];
- return this.forEach(function(node){ domCtr.place(node, item, position); });
- },
- orphan: function(/*String?*/ filter){
-
-
-
-
-
-
-
- return (filter ? query._filterResult(this, filter) : this).forEach(orphan);
- },
- adopt: function(/*String||Array||DomNode*/ queryOrListOrNode, /*String?*/ position){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return query(queryOrListOrNode).place(this[0], position)._stash(this);
- },
-
- query: function(/*String*/ queryStr){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(!queryStr){ return this; }
- var ret = new NodeList;
- this.map(function(node){
-
- query(queryStr, node).forEach(function(subNode){
- if(subNode !== undefined){
- ret.push(subNode);
- }
- });
- });
- return ret._stash(this);
- },
- filter: function(/*String|Function*/ filter){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var a = arguments, items = this, start = 0;
- if(typeof filter == "string"){
- items = query._filterResult(this, a[0]);
- if(a.length == 1){
-
- return items._stash(this);
- }
-
- start = 1;
- }
- return this._wrap(array.filter(items, a[start], a[start + 1]), this);
- },
-
- addContent: function(/*String||DomNode||Object||dojo.NodeList*/ content, /*String||Integer?*/ position){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- content = this._normalize(content, this[0]);
- for(var i = 0, node; (node = this[i]); i++){
- this._place(content, node, position, i > 0);
- }
- return this;
- }
- });
-
- return NodeList;
- });
- },
- 'dojo/query':function(){
- define(["./_base/kernel", "./has", "./dom", "./on", "./_base/array", "./_base/lang", "./selector/_loader", "./selector/_loader!default"],
- function(dojo, has, dom, on, array, lang, loader, defaultEngine){
- "use strict";
- has.add("array-extensible", function(){
-
- return lang.delegate([], {length: 1}).length == 1 && !has("bug-for-in-skips-shadowed");
- });
-
- var ap = Array.prototype, aps = ap.slice, apc = ap.concat, forEach = array.forEach;
- var tnl = function(/*Array*/ a, /*dojo.NodeList?*/ parent, /*Function?*/ NodeListCtor){
-
-
-
-
-
-
-
-
-
-
-
-
- var nodeList = new (NodeListCtor || this._NodeListCtor || nl)(a);
- return parent ? nodeList._stash(parent) : nodeList;
- };
- var loopBody = function(f, a, o){
- a = [0].concat(aps.call(a, 0));
- o = o || dojo.global;
- return function(node){
- a[0] = node;
- return f.apply(o, a);
- };
- };
-
- var adaptAsForEach = function(f, o){
-
-
-
-
-
-
-
-
- return function(){
- this.forEach(loopBody(f, arguments, o));
- return this;
- };
- };
- var adaptAsMap = function(f, o){
-
-
-
-
-
-
-
- return function(){
- return this.map(loopBody(f, arguments, o));
- };
- };
- var adaptAsFilter = function(f, o){
-
-
-
-
-
-
- return function(){
- return this.filter(loopBody(f, arguments, o));
- };
- };
- var adaptWithCondition = function(f, g, o){
-
-
-
-
-
-
-
-
-
- return function(){
- var a = arguments, body = loopBody(f, a, o);
- if(g.call(o || dojo.global, a)){
- return this.map(body);
- }
- this.forEach(body);
- return this;
- };
- };
- var NodeList = function(array){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var isNew = this instanceof nl && has("array-extensible");
- if(typeof array == "number"){
- array = Array(array);
- }
- var nodeArray = (array && "length" in array) ? array : arguments;
- if(isNew || !nodeArray.sort){
-
- var target = isNew ? this : [],
- l = target.length = nodeArray.length;
- for(var i = 0; i < l; i++){
- target[i] = nodeArray[i];
- }
- if(isNew){
-
-
-
- return target;
- }
- nodeArray = target;
- }
-
-
- lang._mixin(nodeArray, nlp);
- nodeArray._NodeListCtor = function(array){
-
- return nl(array);
- };
- return nodeArray;
- };
-
- var nl = NodeList, nlp = nl.prototype =
- has("array-extensible") ? [] : {};
-
- nl._wrap = nlp._wrap = tnl;
- nl._adaptAsMap = adaptAsMap;
- nl._adaptAsForEach = adaptAsForEach;
- nl._adaptAsFilter = adaptAsFilter;
- nl._adaptWithCondition = adaptWithCondition;
-
-
- forEach(["slice", "splice"], function(name){
- var f = ap[name];
-
-
-
-
- nlp[name] = function(){ return this._wrap(f.apply(this, arguments), name == "slice" ? this : null); };
- });
-
-
- forEach(["indexOf", "lastIndexOf", "every", "some"], function(name){
- var f = array[name];
- nlp[name] = function(){ return f.apply(dojo, [this].concat(aps.call(arguments, 0))); };
- });
-
- lang.extend(NodeList, {
-
- constructor: nl,
- _NodeListCtor: nl,
- toString: function(){
-
- return this.join(",");
- },
- _stash: function(parent){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this._parent = parent;
- return this;
- },
- on: function(eventName, listener){
-
-
-
-
-
-
-
-
-
- var handles = this.map(function(node){
- return on(node, eventName, listener);
- });
- handles.remove = function(){
- for(var i = 0; i < handles.length; i++){
- handles[i].remove();
- }
- };
- return handles;
- },
- end: function(){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(this._parent){
- return this._parent;
- }else{
-
- return new this._NodeListCtor(0);
- }
- },
-
-
-
-
-
-
-
-
-
- concat: function(item){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var t = lang.isArray(this) ? this : aps.call(this, 0),
- m = array.map(arguments, function(a){
- return a && !lang.isArray(a) &&
- (typeof NodeList != "undefined" && a.constructor === NodeList || a.constructor === this._NodeListCtor) ?
- aps.call(a, 0) : a;
- });
- return this._wrap(apc.apply(t, m), this);
- },
- map: function(/*Function*/ func, /*Function?*/ obj){
-
-
-
-
-
- return this._wrap(array.map(this, func, obj), this);
- },
- forEach: function(callback, thisObj){
-
-
-
-
- forEach(this, callback, thisObj);
-
- return this;
- },
- filter: function(/*String|Function*/ filter){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var a = arguments, items = this, start = 0;
- if(typeof filter == "string"){
- items = query._filterResult(this, a[0]);
- if(a.length == 1){
-
- return items._stash(this);
- }
-
- start = 1;
- }
- return this._wrap(array.filter(items, a[start], a[start + 1]), this);
- },
- instantiate: function(/*String|Object*/ declaredClass, /*Object?*/ properties){
-
-
-
-
-
-
-
- var c = lang.isFunction(declaredClass) ? declaredClass : lang.getObject(declaredClass);
- properties = properties || {};
- return this.forEach(function(node){
- new c(properties, node);
- });
- },
- at: function(/*===== index =====*/){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var t = new this._NodeListCtor(0);
- forEach(arguments, function(i){
- if(i < 0){ i = this.length + i; }
- if(this[i]){ t.push(this[i]); }
- }, this);
- return t._stash(this);
- }
- });
- function queryForEngine(engine, NodeList){
- var query = function(/*String*/ query, /*String|DOMNode?*/ root){
-
-
-
-
- if(typeof root == "string"){
- root = dom.byId(root);
- if(!root){
- return new NodeList([]);
- }
- }
- var results = typeof query == "string" ? engine(query, root) : query ? query.orphan ? query : [query] : [];
- if(results.orphan){
-
- return results;
- }
- return new NodeList(results);
- };
- query.matches = engine.match || function(node, selector, root){
-
-
- return query.filter([node], selector, root).length > 0;
- };
-
- query.filter = engine.filter || function(nodes, selector, root){
-
-
- return query(selector, root).filter(function(node){
- return array.indexOf(nodes, node) > -1;
- });
- };
- if(typeof engine != "function"){
- var search = engine.search;
- engine = function(selector, root){
-
- return search(root || document, selector);
- };
- }
- return query;
- }
- var query = queryForEngine(defaultEngine, NodeList);
- dojo.query = queryForEngine(defaultEngine, function(array){
-
- return NodeList(array);
- });
- query.load = function(id, parentRequire, loaded, config){
-
-
-
-
-
-
- loader.load(id, parentRequire, function(engine){
- loaded(queryForEngine(engine, NodeList));
- });
- };
- dojo._filterQueryResult = query._filterResult = function(nodes, selector, root){
- return new NodeList(query.filter(nodes, selector, root));
- };
- dojo.NodeList = query.NodeList = NodeList;
- return query;
- });
- },
- 'dojo/has':function(){
- define(["require"], function(require) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var has = require.has || function(){};
- if(!1){
-
-
-
- var
- isBrowser =
-
- typeof window != "undefined" &&
- typeof location != "undefined" &&
- typeof document != "undefined" &&
- window.location == location && window.document == document,
-
- global = (function () { return this; })(),
- doc = isBrowser && document,
- element = doc && doc.createElement("DiV"),
- cache = {};
- has = function(name){
-
-
-
-
-
-
-
-
-
- return typeof cache[name] == "function" ? (cache[name] = cache[name](global, doc, element)) : cache[name];
- };
- has.cache = cache;
- has.add = function(name, test, now, force){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (typeof cache[name]=="undefined" || force) && (cache[name]= test);
- return now && has(name);
- };
-
-
-
- true || has.add("host-browser", isBrowser);
- false && has.add("host-node", (typeof process == "object" && process.versions && process.versions.node && process.versions.v8));
- false && has.add("host-rhino", (typeof load == "function" && (typeof Packages == "function" || typeof Packages == "object")));
- true || has.add("dom", isBrowser);
- true || has.add("dojo-dom-ready-api", 1);
- true || has.add("dojo-sniff", 1);
- }
- if(1){
- var agent = navigator.userAgent;
-
- has.add("dom-addeventlistener", !!document.addEventListener);
- has.add("touch", "ontouchstart" in document);
-
- has.add("device-width", screen.availWidth || innerWidth);
- has.add("agent-ios", !!agent.match(/iPhone|iP[ao]d/));
- has.add("agent-android", agent.indexOf("android") > 1);
- }
- has.clearElement = function(element) {
-
-
- element.innerHTML= "";
- return element;
- };
- has.normalize = function(id, toAbsMid){
-
-
-
-
-
- var
- tokens = id.match(/[\?:]|[^:\?]*/g), i = 0,
- get = function(skip){
- var term = tokens[i++];
- if(term == ":"){
-
- return 0;
- }else{
-
- if(tokens[i++] == "?"){
- if(!skip && has(term)){
-
- return get();
- }else{
-
- get(true);
- return get(skip);
- }
- }
- // a module
- return term || 0;
- }
- };
- id = get();
- return id && toAbsMid(id);
- };
- has.load = /*===== dojo.has.load= ======*/ function(id, parentRequire, loaded){
-
-
-
-
-
-
-
-
-
-
-
-
- if(id){
- parentRequire([id], loaded);
- }else{
- loaded();
- }
- };
- return has;
- });
- },
- 'dojo/_base/loader':function(){
- define(["./kernel", "../has", "require", "module", "./json", "./lang", "./array"], function(dojo, has, require, thisModule, json, lang, array) {
-
-
-
-
-
-
- if (!1){
- console.error("cannot load the Dojo v1.x loader with a foreign loader");
- return 0;
- }
- var makeErrorToken = function(id){
- return {src:thisModule.id, id:id};
- },
- slashName = function(name){
- return name.replace(/\./g, "/");
- },
- buildDetectRe = /\/\/>>built/,
- dojoRequireCallbacks = [],
- dojoRequireModuleStack = [],
- dojoRequirePlugin = function(mid, require, loaded){
- dojoRequireCallbacks.push(loaded);
- array.forEach(mid.split(","), function(mid){
- var module = getModule(mid, require.module);
- dojoRequireModuleStack.push(module);
- injectModule(module);
- });
- checkDojoRequirePlugin();
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- touched,
- traverse = function(m){
- touched[m.mid] = 1;
- for(var t, module, deps = m.deps || [], i= 0; i<deps.length; i++){
- module = deps[i];
- if(!(t = touched[module.mid])){
- if(t===0 || !traverse(module)){
- touched[m.mid] = 0;
- return false;
- }
- }
- }
- return true;
- },
- checkDojoRequirePlugin = function(){
-
-
-
-
-
-
-
- var module, mid;
- touched = {};
- for(mid in modules){
- module = modules[mid];
-
- if(module.executed || module.noReqPluginCheck){
- touched[mid] = 1;
- }else{
- if(module.noReqPluginCheck!==0){
-
- module.noReqPluginCheck = /loadInit\!/.test(mid) || /require\!/.test(mid) ? 1 : 0;
- }
- if(module.noReqPluginCheck){
- touched[mid] = 1;
- }else if(module.injected!==arrived){
-
- touched[mid] = 0;
- }
- }
- }
- for(var t, i = 0, end = dojoRequireModuleStack.length; i<end; i++){
- module = dojoRequireModuleStack[i];
- if(!(t = touched[module.mid])){
- if(t===0 || !traverse(module)){
- return;
- }
- }
- }
- loaderVars.holdIdle();
- var oldCallbacks = dojoRequireCallbacks;
- dojoRequireCallbacks = [];
- array.forEach(oldCallbacks, function(cb){cb(1);});
- loaderVars.releaseIdle();
- },
- dojoLoadInitPlugin = function(mid, require, loaded){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- require([mid], function(bundle){
-
- require(bundle.names, function(){
-
- for(var scopeText = "", args= [], i = 0; i<arguments.length; i++){
- scopeText+= "var " + bundle.names[i] + "= arguments[" + i + "]; ";
- args.push(arguments[i]);
- }
- eval(scopeText);
- var callingModule = require.module,
- deps = [],
- hold = {},
- requireList = [],
- p,
- syncLoaderApi = {
- provide:function(moduleName){
-
- moduleName = slashName(moduleName);
- var providedModule = getModule(moduleName, callingModule);
- if(providedModule!==callingModule){
- setArrived(providedModule);
- }
- },
- require:function(moduleName, omitModuleCheck){
- moduleName = slashName(moduleName);
- omitModuleCheck && (getModule(moduleName, callingModule).result = nonmodule);
- requireList.push(moduleName);
- },
- requireLocalization:function(moduleName, bundleName, locale){
-
- deps.length || (deps = ["dojo/i18n"]);
-
- locale = (locale || dojo.locale).toLowerCase();
- moduleName = slashName(moduleName) + "/nls/" + (/root/i.test(locale) ? "" : locale + "/") + slashName(bundleName);
- if(getModule(moduleName, callingModule).isXd){
- deps.push("dojo/i18n!" + moduleName);
- }
- },
- loadInit:function(f){
- f();
- }
- };
-
- try{
- for(p in syncLoaderApi){
- hold[p] = dojo[p];
- dojo[p] = syncLoaderApi[p];
- }
- bundle.def.apply(null, args);
- }catch(e){
- signal("error", [makeErrorToken("failedDojoLoadInit"), e]);
- }finally{
- for(p in syncLoaderApi){
- dojo[p] = hold[p];
- }
- }
-
- requireList.length && deps.push("dojo/require!" + requireList.join(","));
- dojoRequireCallbacks.push(loaded);
- array.forEach(requireList, function(mid){
- var module = getModule(mid, require.module);
- dojoRequireModuleStack.push(module);
- injectModule(module);
- });
- checkDojoRequirePlugin();
- });
- });
- },
- extractApplication = function(
- text, // the text to search
- startSearch, // the position in text to start looking for the closing paren
- startApplication // the position in text where the function application expression starts
- ){
-
-
- var parenRe = /\(|\)/g,
- matchCount = 1,
- match;
- parenRe.lastIndex = startSearch;
- while((match = parenRe.exec(text))){
- if(match[0] == ")"){
- matchCount -= 1;
- }else{
- matchCount += 1;
- }
- if(matchCount == 0){
- break;
- }
- }
- if(matchCount != 0){
- throw "unmatched paren around character " + parenRe.lastIndex + " in: " + text;
- }
-
- return [dojo.trim(text.substring(startApplication, parenRe.lastIndex))+";\n", parenRe.lastIndex];
- },
-
-
-
-
-
-
-
-
-
-
-
-
- removeCommentRe = /(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,
- syncLoaderApiRe = /(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg,
- amdLoaderApiRe = /(^|\s)(require|define)\s*\(/m,
- extractLegacyApiApplications = function(text, noCommentText){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var match, startSearch, startApplication, application,
- loadInitApplications = [],
- otherApplications = [],
- allApplications = [];
-
- noCommentText = noCommentText || text.replace(removeCommentRe, function(match){
-
-
- syncLoaderApiRe.lastIndex = amdLoaderApiRe.lastIndex = 0;
- return (syncLoaderApiRe.test(match) || amdLoaderApiRe.test(match)) ? "" : match;
- });
-
- while((match = syncLoaderApiRe.exec(noCommentText))){
- startSearch = syncLoaderApiRe.lastIndex;
- startApplication = startSearch - match[0].length;
- application = extractApplication(noCommentText, startSearch, startApplication);
- if(match[2]=="loadInit"){
- loadInitApplications.push(application[0]);
- }else{
- otherApplications.push(application[0]);
- }
- syncLoaderApiRe.lastIndex = application[1];
- }
- allApplications = loadInitApplications.concat(otherApplications);
- if(allApplications.length || !amdLoaderApiRe.test(noCommentText)){
-
- return [text.replace(/(^|\s)dojo\.loadInit\s*\(/g, "\n0 && dojo.loadInit("), allApplications.join(""), allApplications];
- }else{
-
- return 0;
- }
- },
- transformToAmd = function(module, text){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var extractResult, id, names = [], namesAsStrings = [];
- if(buildDetectRe.test(text) || !(extractResult = extractLegacyApiApplications(text))){
-
-
- return 0;
- }
-
- id = module.mid + "-*loadInit";
-
-
- for(var p in getModule("dojo", module).result.scopeMap){
- names.push(p);
- namesAsStrings.push('"' + p + '"');
- }
-
- return "// xdomain rewrite of " + module.path + "\n" +
- "define('" + id + "',{\n" +
- "\tnames:" + dojo.toJson(names) + ",\n" +
- "\tdef:function(" + names.join(",") + "){" + extractResult[1] + "}" +
- "});\n\n" +
- "define(" + dojo.toJson(names.concat(["dojo/loadInit!"+id])) + ", function(" + names.join(",") + "){\n" + extractResult[0] + "});";
- },
- loaderVars = require.initSyncLoader(dojoRequirePlugin, checkDojoRequirePlugin, transformToAmd),
- sync =
- loaderVars.sync,
- xd =
- loaderVars.xd,
- arrived =
- loaderVars.arrived,
- nonmodule =
- loaderVars.nonmodule,
- executing =
- loaderVars.executing,
- executed =
- loaderVars.executed,
- syncExecStack =
- loaderVars.syncExecStack,
- modules =
- loaderVars.modules,
- execQ =
- loaderVars.execQ,
- getModule =
- loaderVars.getModule,
- injectModule =
- loaderVars.injectModule,
- setArrived =
- loaderVars.setArrived,
- signal =
- loaderVars.signal,
- finishExec =
- loaderVars.finishExec,
- execModule =
- loaderVars.execModule,
- getLegacyMode =
- loaderVars.getLegacyMode;
- dojo.provide = function(mid){
- var executingModule = syncExecStack[0],
- module = lang.mixin(getModule(slashName(mid), require.module), {
- executed:executing,
- result:lang.getObject(mid, true)
- });
- setArrived(module);
- if(executingModule){
- (executingModule.provides || (executingModule.provides = [])).push(function(){
- module.result = lang.getObject(mid);
- delete module.provides;
- module.executed!==executed && finishExec(module);
- });
- }
- return module.result;
- };
- has.add("config-publishRequireResult", 1, 0, 0);
- dojo.require = function(moduleName, omitModuleCheck) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function doRequire(mid, omitModuleCheck){
- var module = getModule(slashName(mid), require.module);
- if(syncExecStack.length && syncExecStack[0].finish){
-
-
- syncExecStack[0].finish.push(mid);
- return undefined;
- }
-
- if(module.executed){
- return module.result;
- }
- omitModuleCheck && (module.result = nonmodule);
- var currentMode = getLegacyMode();
-
-
-
- injectModule(module);
-
- currentMode = getLegacyMode();
-
- if(module.executed!==executed && module.injected===arrived){
-
-
- loaderVars.holdIdle();
- execModule(module);
- loaderVars.releaseIdle();
- }
- if(module.executed){
- return module.result;
- }
- if(currentMode==sync){
-
-
-
- if(module.cjs){
-
- execQ.unshift(module);
- }else{
-
- syncExecStack.length && (syncExecStack[0].finish= [mid]);
- }
- }else{
-
-
- execQ.push(module);
- }
- return undefined;
- }
- var result = doRequire(moduleName, omitModuleCheck);
- if(has("config-publishRequireResult") && !lang.exists(moduleName) && result!==undefined){
- lang.setObject(moduleName, result);
- }
- return result;
- };
- dojo.loadInit = function(f) {
- f();
- };
- dojo.registerModulePath = function(/*String*/moduleName, /*String*/prefix){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var paths = {};
- paths[moduleName.replace(/\./g, "/")] = prefix;
- require({paths:paths});
- };
- dojo.platformRequire = function(/*Object*/modMap){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var result = (modMap.common || []).concat(modMap[dojo._name] || modMap["default"] || []),
- temp;
- while(result.length){
- if(lang.isArray(temp = result.shift())){
- dojo.require.apply(dojo, temp);
- }else{
- dojo.require(temp);
- }
- }
- };
- dojo.requireIf = dojo.requireAfterIf = function(/*Boolean*/ condition, /*String*/ moduleName, /*Boolean?*/omitModuleCheck){
-
-
-
-
-
-
- if(condition){
- dojo.require(moduleName, omitModuleCheck);
- }
- };
- dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale){
- require(["../i18n"], function(i18n){
- i18n.getLocalization(moduleName, bundleName, locale);
- });
- };
- return {
- extractLegacyApiApplications:extractLegacyApiApplications,
- require:loaderVars.dojoRequirePlugin,
- loadInit:dojoLoadInitPlugin
- };
- });
- },
- 'dojo/json':function(){
- define(["./has"], function(has){
- "use strict";
- var hasJSON = typeof JSON != "undefined";
- has.add("json-parse", hasJSON);
-
- has.add("json-stringify", hasJSON && JSON.stringify({a:0}, function(k,v){return v||1;}) == '{"a":1}');
- if(has("json-stringify")){
- return JSON;
- }
- else{
- var escapeString = function(/*String*/str){
-
-
-
-
- return ('"' + str.replace(/(["\\])/g, '\\$1') + '"').
- replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").
- replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r");
- };
- return {
- parse: has("json-parse") ? JSON.parse : function(str, strict){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(strict && !/^([\s\[\{]*(?:"(?:\\.|[^"])+"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(str)){
- throw new SyntaxError("Invalid characters in JSON");
- }
- return eval('(' + str + ')');
- },
- stringify: function(value, replacer, spacer){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var undef;
- if(typeof replacer == "string"){
- spacer = replacer;
- replacer = null;
- }
- function stringify(it, indent, key){
- if(replacer){
- it = replacer(key, it);
- }
- var val, objtype = typeof it;
- if(objtype == "number"){
- return isFinite(it) ? it + "" : "null";
- }
- if(objtype == "boolean"){
- return it + "";
- }
- if(it === null){
- return "null";
- }
- if(typeof it == "string"){
- return escapeString(it);
- }
- if(objtype == "function" || objtype == "undefined"){
- return undef;
- }
-
-
- if(typeof it.toJSON == "function"){
- return stringify(it.toJSON(key), indent, key);
- }
- if(it instanceof Date){
- return '"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g, function(t, prop, plus){
- var num = it["getUTC" + prop]() + (plus ? 1 : 0);
- return num < 10 ? "0" + num : num;
- });
- }
- if(it.valueOf() !== it){
-
- return stringify(it.valueOf(), indent, key);
- }
- var nextIndent= spacer ? (indent + spacer) : "";
-
-
- var sep = spacer ? " " : "";
- var newLine = spacer ? "\n" : "";
-
-
- if(it instanceof Array){
- var itl = it.length, res = [];
- for(key = 0; key < itl; key++){
- var obj = it[key];
- val = stringify(obj, nextIndent, key);
- if(typeof val != "string"){
- val = "null";
- }
- res.push(newLine + nextIndent + val);
- }
- return "[" + res.join(",") + newLine + indent + "]";
- }
-
- var output = [];
- for(key in it){
- var keyStr;
- if(typeof key == "number"){
- keyStr = '"' + key + '"';
- }else if(typeof key == "string"){
- keyStr = escapeString(key);
- }else{
-
- continue;
- }
- val = stringify(it[key], nextIndent, key);
- if(typeof val != "string"){
-
- continue;
- }
-
-
- output.push(newLine + nextIndent + keyStr + ":" + sep + val);
- }
- return "{" + output.join(",") + newLine + indent + "}";
- }
- return stringify(value, "", "");
- }
- };
- }
- });
- },
- 'dojo/_base/declare':function(){
- define(["./kernel", "../has", "./lang"], function(dojo, has, lang){
-
-
-
-
- var mix = lang.mixin, op = Object.prototype, opts = op.toString,
- xtor = new Function, counter = 0, cname = "constructor";
- function err(msg, cls){ throw new Error("declare" + (cls ? " " + cls : "") + ": " + msg); }
-
- function c3mro(bases, className){
- var result = [], roots = [{cls: 0, refs: []}], nameMap = {}, clsCount = 1,
- l = bases.length, i = 0, j, lin, base, top, proto, rec, name, refs;
-
- for(; i < l; ++i){
- base = bases[i];
- if(!base){
- err("mixin #" + i + " is unknown. Did you use dojo.require to pull it in?", className);
- }else if(opts.call(base) != "[object Function]"){
- err("mixin #" + i + " is not a callable constructor.", className);
- }
- lin = base._meta ? base._meta.bases : [base];
- top = 0;
-
- for(j = lin.length - 1; j >= 0; --j){
- proto = lin[j].prototype;
- if(!proto.hasOwnProperty("declaredClass")){
- proto.declaredClass = "uniqName_" + (counter++);
- }
- name = proto.declaredClass;
- if(!nameMap.hasOwnProperty(name)){
- nameMap[name] = {count: 0, refs: [], cls: lin[j]};
- ++clsCount;
- }
- rec = nameMap[name];
- if(top && top !== rec){
- rec.refs.push(top);
- ++top.count;
- }
- top = rec;
- }
- ++top.count;
- roots[0].refs.push(top);
- }
-
- while(roots.length){
- top = roots.pop();
- result.push(top.cls);
- --clsCount;
-
- while(refs = top.refs, refs.length == 1){
- top = refs[0];
- if(!top || --top.count){
-
- top = 0;
- break;
- }
- result.push(top.cls);
- --clsCount;
- }
- if(top){
-
- for(i = 0, l = refs.length; i < l; ++i){
- top = refs[i];
- if(!--top.count){
- roots.push(top);
- }
- }
- }
- }
- if(clsCount){
- err("can't build consistent linearization", className);
- }
-
- base = bases[0];
- result[0] = base ?
- base._meta && base === result[result.length - base._meta.bases.length] ?
- base._meta.bases.length : 1 : 0;
- return result;
- }
- function inherited(args, a, f){
- var name, chains, bases, caller, meta, base, proto, opf, pos,
- cache = this._inherited = this._inherited || {};
-
- if(typeof args == "string"){
- name = args;
- args = a;
- a = f;
- }
- f = 0;
- caller = args.callee;
- name = name || caller.nom;
- if(!name){
- err("can't deduce a name to call inherited()", this.declaredClass);
- }
- meta = this.constructor._meta;
- bases = meta.bases;
- pos = cache.p;
- if(name != cname){
-
- if(cache.c !== caller){
-
- pos = 0;
- base = bases[0];
- meta = base._meta;
- if(meta.hidden[name] !== caller){
-
- chains = meta.chains;
- if(chains && typeof chains[name] == "string"){
- err("calling chained method with inherited: " + name, this.declaredClass);
- }
-
- do{
- meta = base._meta;
- proto = base.prototype;
- if(meta && (proto[name] === caller && proto.hasOwnProperty(name) || meta.hidden[name] === caller)){
- break;
- }
- }while(base = bases[++pos]);
- pos = base ? pos : -1;
- }
- }
-
- base = bases[++pos];
- if(base){
- proto = base.prototype;
- if(base._meta && proto.hasOwnProperty(name)){
- f = proto[name];
- }else{
- opf = op[name];
- do{
- proto = base.prototype;
- f = proto[name];
- if(f && (base._meta ? proto.hasOwnProperty(name) : f !== opf)){
- break;
- }
- }while(base = bases[++pos]);
- }
- }
- f = base && f || op[name];
- }else{
-
- if(cache.c !== caller){
-
- pos = 0;
- meta = bases[0]._meta;
- if(meta && meta.ctor !== caller){
-
- chains = meta.chains;
- if(!chains || chains.constructor !== "manual"){
- err("calling chained constructor with inherited", this.declaredClass);
- }
-
- while(base = bases[++pos]){
- meta = base._meta;
- if(meta && meta.ctor === caller){
- break;
- }
- }
- pos = base ? pos : -1;
- }
- }
-
- while(base = bases[++pos]){
- meta = base._meta;
- f = meta ? meta.ctor : base;
- if(f){
- break;
- }
- }
- f = base && f;
- }
-
- cache.c = f;
- cache.p = pos;
-
- if(f){
- return a === true ? f : f.apply(this, a || args);
- }
-
- }
- function getInherited(name, args){
- if(typeof name == "string"){
- return this.__inherited(name, args, true);
- }
- return this.__inherited(name, true);
- }
- function inherited__debug(args, a1, a2){
- var f = this.getInherited(args, a1);
- if(f){ return f.apply(this, a2 || a1 || args); }
-
- }
- var inheritedImpl = dojo.config.isDebug ? inherited__debug : inherited;
-
- function isInstanceOf(cls){
- var bases = this.constructor._meta.bases;
- for(var i = 0, l = bases.length; i < l; ++i){
- if(bases[i] === cls){
- return true;
- }
- }
- return this instanceof cls;
- }
- function mixOwn(target, source){
-
- for(var name in source){
- if(name != cname && source.hasOwnProperty(name)){
- target[name] = source[name];
- }
- }
- if(has("bug-for-in-skips-shadowed")){
- for(var extraNames= lang._extraNames, i= extraNames.length; i;){
- name = extraNames[--i];
- if(name != cname && source.hasOwnProperty(name)){
- target[name] = source[name];
- }
- }
- }
- }
-
- function safeMixin(target, source){
- var name, t;
-
- for(name in source){
- t = source[name];
- if((t !== op[name] || !(name in op)) && name != cname){
- if(opts.call(t) == "[object Function]"){
-
- t.nom = name;
- }
- target[name] = t;
- }
- }
- if(has("bug-for-in-skips-shadowed")){
- for(var extraNames= lang._extraNames, i= extraNames.length; i;){
- name = extraNames[--i];
- t = source[name];
- if((t !== op[name] || !(name in op)) && name != cname){
- if(opts.call(t) == "[object Function]"){
-
- t.nom = name;
- }
- target[name] = t;
- }
- }
- }
- return target;
- }
- function extend(source){
- declare.safeMixin(this.prototype, source);
- return this;
- }
- function createSubclass(mixins){
- return declare([this].concat(mixins));
- }
-
- function chainedConstructor(bases, ctorSpecial){
- return function(){
- var a = arguments, args = a, a0 = a[0], f, i, m,
- l = bases.length, preArgs;
- if(!(this instanceof a.callee)){
-
- return applyNew(a);
- }
-
-
-
- if(ctorSpecial && (a0 && a0.preamble || this.preamble)){
-
- preArgs = new Array(bases.length);
-
- preArgs[0] = a;
- for(i = 0;;){
-
- a0 = a[0];
- if(a0){
- f = a0.preamble;
- if(f){
- a = f.apply(this, a) || a;
- }
- }
-
- f = bases[i].prototype;
- f = f.hasOwnProperty("preamble") && f.preamble;
- if(f){
- a = f.apply(this, a) || a;
- }
-
-
-
-
-
- if(++i == l){
- break;
- }
- preArgs[i] = a;
- }
- }
-
- for(i = l - 1; i >= 0; --i){
- f = bases[i];
- m = f._meta;
- f = m ? m.ctor : f;
- if(f){
- f.apply(this, preArgs ? preArgs[i] : a);
- }
- }
-
- f = this.postscript;
- if(f){
- f.apply(this, args);
- }
- };
- }
-
- function singleConstructor(ctor, ctorSpecial){
- return function(){
- var a = arguments, t = a, a0 = a[0], f;
- if(!(this instanceof a.callee)){
-
- return applyNew(a);
- }
-
-
-
- if(ctorSpecial){
-
- if(a0){
-
- f = a0.preamble;
- if(f){
- t = f.apply(this, t) || t;
- }
- }
- f = this.preamble;
- if(f){
-
- f.apply(this, t);
-
-
-
-
-
- }
- }
-
- if(ctor){
- ctor.apply(this, a);
- }
-
- f = this.postscript;
- if(f){
- f.apply(this, a);
- }
- };
- }
-
- function simpleConstructor(bases){
- return function(){
- var a = arguments, i = 0, f, m;
- if(!(this instanceof a.callee)){
-
- return applyNew(a);
- }
-
-
-
-
- for(; f = bases[i]; ++i){
- m = f._meta;
- f = m ? m.ctor : f;
- if(f){
- f.apply(this, a);
- break;
- }
- }
-
- f = this.postscript;
- if(f){
- f.apply(this, a);
- }
- };
- }
- function chain(name, bases, reversed){
- return function(){
- var b, m, f, i = 0, step = 1;
- if(reversed){
- i = bases.length - 1;
- step = -1;
- }
- for(; b = bases[i]; i += step){
- m = b._meta;
- f = (m ? m.hidden : b.prototype)[name];
- if(f){
- f.apply(this, arguments);
- }
- }
- };
- }
-
-
-
- function forceNew(ctor){
-
-
- xtor.prototype = ctor.prototype;
- var t = new xtor;
- xtor.prototype = null;
- return t;
- }
-
-
-
- function applyNew(args){
-
-
- var ctor = args.callee, t = forceNew(ctor);
-
- ctor.apply(t, args);
- return t;
- }
- function declare(className, superclass, props){
-
- if(typeof className != "string"){
- props = superclass;
- superclass = className;
- className = "";
- }
- props = props || {};
- var proto, i, t, ctor, name, bases, chains, mixins = 1, parents = superclass;
-
- if(opts.call(superclass) == "[object Array]"){
-
- bases = c3mro(superclass, className);
- t = bases[0];
- mixins = bases.length - t;
- superclass = bases[mixins];
- }else{
- bases = [0];
- if(superclass){
- if(opts.call(superclass) == "[object Function]"){
- t = superclass._meta;
- bases = bases.concat(t ? t.bases : superclass);
- }else{
- err("base class is not a callable constructor.", className);
- }
- }else if(superclass !== null){
- err("unknown base class. Did you use dojo.require to pull it in?", className);
- }
- }
- if(superclass){
- for(i = mixins - 1;; --i){
- proto = forceNew(superclass);
- if(!i){
-
- break;
- }
-
- t = bases[i];
- (t._meta ? mixOwn : mix)(proto, t.prototype);
-
- ctor = new Function;
- ctor.superclass = superclass;
- ctor.prototype = proto;
- superclass = proto.constructor = ctor;
- }
- }else{
- proto = {};
- }
-
- declare.safeMixin(proto, props);
-
- t = props.constructor;
- if(t !== op.constructor){
- t.nom = cname;
- proto.constructor = t;
- }
-
- for(i = mixins - 1; i; --i){
- t = bases[i]._meta;
- if(t && t.chains){
- chains = mix(chains || {}, t.chains);
- }
- }
- if(proto["-chains-"]){
- chains = mix(chains || {}, proto["-chains-"]);
- }
-
- t = !chains || !chains.hasOwnProperty(cname);
- bases[0] = ctor = (chains && chains.constructor === "manual") ? simpleConstructor(bases) :
- (bases.length == 1 ? singleConstructor(props.constructor, t) : chainedConstructor(bases, t));
-
- ctor._meta = {bases: bases, hidden: props, chains: chains,
- parents: parents, ctor: props.constructor};
- ctor.superclass = superclass && superclass.prototype;
- ctor.extend = extend;
- ctor.createSubclass = createSubclass;
- ctor.prototype = proto;
- proto.constructor = ctor;
-
- proto.getInherited = getInherited;
- proto.isInstanceOf = isInstanceOf;
- proto.inherited = inheritedImpl;
- proto.__inherited = inherited;
-
- if(className){
- proto.declaredClass = className;
- lang.setObject(className, ctor);
- }
-
- if(chains){
- for(name in chains){
- if(proto[name] && typeof chains[name] == "string" && name != cname){
- t = proto[name] = chain(name, bases, chains[name] === "after");
- t.nom = name;
- }
- }
- }
-
-
- return ctor;
- }
-
-
-
-
-
-
- dojo.safeMixin = declare.safeMixin = safeMixin;
- dojo.declare = declare;
- return declare;
- });
- },
- 'dojo/dom':function(){
- define(["./_base/sniff", "./_base/lang", "./_base/window"],
- function(has, lang, win){
-
-
-
-
-
- try{
- document.execCommand("BackgroundImageCache", false, true);
- }catch(e){
-
- }
-
-
-
-
-
-
-
-
- var dom = {};
- if(has("ie")){
- dom.byId = function(id, doc){
- if(typeof id != "string"){
- return id;
- }
- var _d = doc || win.doc, te = id && _d.getElementById(id);
-
-
- if(te && (te.attributes.id.value == id || te.id == id)){
- return te;
- }else{
- var eles = _d.all[id];
- if(!eles || eles.nodeName){
- eles = [eles];
- }
-
- var i = 0;
- while((te = eles[i++])){
- if((te.attributes && te.attributes.id && te.attributes.id.value == id) || te.id == id){
- return te;
- }
- }
- }
- };
- }else{
- dom.byId = function(id, doc){
-
-
- return ((typeof id == "string") ? (doc || win.doc).getElementById(id) : id) || null;
- };
- }
-
- dom.isDescendant = function(/*DOMNode|String*/node, /*DOMNode|String*/ancestor){
- try{
- node = dom.byId(node);
- ancestor = dom.byId(ancestor);
- while(node){
- if(node == ancestor){
- return true;
- }
- node = node.parentNode;
- }
- }catch(e){ }
- return false;
- };
-
-
-
-
-
-
-
-
-
- has.add("css-user-select", function(global, doc, element){
-
- if(!element){ return false; }
- var style = element.style;
- var prefixes = ["Khtml", "O", "Moz", "Webkit"],
- i = prefixes.length,
- name = "userSelect",
- prefix;
-
- do{
- if(typeof style[name] !== "undefined"){
-
- return name;
- }
- }while(i-- && (name = prefixes[i] + "UserSelect"));
-
- return false;
- });
- var cssUserSelect = has("css-user-select");
- dom.setSelectable = cssUserSelect ? function(node, selectable){
-
- dom.byId(node).style[cssUserSelect] = selectable ? "" : "none";
- } : function(node, selectable){
- node = dom.byId(node);
-
-
- var nodes = node.getElementsByTagName("*"),
- i = nodes.length;
- if(selectable){
- node.removeAttribute("unselectable");
- while(i--){
- nodes[i].removeAttribute("unselectable");
- }
- }else{
- node.setAttribute("unselectable", "on");
- while(i--){
- nodes[i].setAttribute("unselectable", "on");
- }
- }
- };
-
-
- return dom;
- });
- },
- 'dojo/_base/browser':function(){
- if(require.has){
- require.has.add("config-selectorEngine", "acme");
- }
- define([
- "../ready",
- "./kernel",
- "./connect",
- "./unload",
- "./window",
- "./event",
- "./html",
- "./NodeList",
- "../query",
- "./xhr",
- "./fx"], function(dojo) {
-
-
-
-
- return dojo;
- });
- },
- 'dojo/selector/acme':function(){
- define(["../_base/kernel", "../has", "../dom", "../_base/sniff", "../_base/array", "../_base/lang", "../_base/window"], function(dojo, has, dom){
-
-
-
-
-
-
-
-
-
-
-
- var trim = dojo.trim;
- var each = dojo.forEach;
-
-
-
-
-
- var getDoc = function(){ return dojo.doc; };
-
- var cssCaseBug = (getDoc().compatMode) == "BackCompat";
-
-
-
- var specials = ">~+";
-
-
-
- var caseSensitive = false;
-
- var yesman = function(){ return true; };
-
-
-
- var getQueryParts = function(query){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(specials.indexOf(query.slice(-1)) >= 0){
-
-
- query += " * "
- }else{
-
-
- query += " ";
- }
- var ts = function(/*Integer*/ s, /*Integer*/ e){
-
-
-
- return trim(query.slice(s, e));
- };
-
- var queryParts = [];
-
- var inBrackets = -1, inParens = -1, inMatchFor = -1,
- inPseudo = -1, inClass = -1, inId = -1, inTag = -1, currentQuoteChar,
- lc = "", cc = "", pStart;
-
- var x = 0,
- ql = query.length,
- currentPart = null,
- _cp = null;
-
-
-
-
-
-
-
-
-
-
-
- var endTag = function(){
-
-
-
- if(inTag >= 0){
- var tv = (inTag == x) ? null : ts(inTag, x);
- currentPart[ (specials.indexOf(tv) < 0) ? "tag" : "oper" ] = tv;
- inTag = -1;
- }
- };
- var endId = function(){
-
- if(inId >= 0){
- currentPart.id = ts(inId, x).replace(/\\/g, "");
- inId = -1;
- }
- };
- var endClass = function(){
-
-
-
- if(inClass >= 0){
- currentPart.classes.push(ts(inClass + 1, x).replace(/\\/g, ""));
- inClass = -1;
- }
- };
- var endAll = function(){
-
- endId();
- endTag();
- endClass();
- };
- var endPart = function(){
- endAll();
- if(inPseudo >= 0){
- currentPart.pseudos.push({ name: ts(inPseudo + 1, x) });
- }
-
-
-
-
- currentPart.loops = (
- currentPart.pseudos.length ||
- currentPart.attrs.length ||
- currentPart.classes.length );
- currentPart.oquery = currentPart.query = ts(pStart, x);
-
-
-
-
-
-
- currentPart.otag = currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*");
- if(currentPart.tag){
-
-
-
-
- currentPart.tag = currentPart.tag.toUpperCase();
- }
-
- if(queryParts.length && (queryParts[queryParts.length-1].oper)){
-
-
-
- currentPart.infixOper = queryParts.pop();
- currentPart.query = currentPart.infixOper.query + " " + currentPart.query;
-
- }
- queryParts.push(currentPart);
- currentPart = null;
- };
-
-
- for(; lc=cc, cc=query.charAt(x), x < ql; x++){
-
-
-
-
- if(lc == "\\"){ continue; }
- if(!currentPart){
-
- pStart = x;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- currentPart = {
- query: null,
- pseudos: [],
- attrs: [],
- classes: [],
- tag: null,
- oper: null,
- id: null,
- getTag: function(){
- return caseSensitive ? this.otag : this.tag;
- }
- };
-
-
-
-
- inTag = x;
- }
-
-
-
- if(currentQuoteChar){
- if(cc == currentQuoteChar){
- currentQuoteChar = null;
- }
- continue;
- }else if (cc == "'" || cc == '"'){
- currentQuoteChar = cc;
- continue;
- }
- if(inBrackets >= 0){
-
- if(cc == "]"){
- if(!_cp.attr){
-
-
-
- _cp.attr = ts(inBrackets+1, x);
- }else{
-
-
- _cp.matchFor = ts((inMatchFor||inBrackets+1), x);
- }
- var cmf = _cp.matchFor;
- if(cmf){
-
-
-
- if( (cmf.charAt(0) == '"') || (cmf.charAt(0) == "'") ){
- _cp.matchFor = cmf.slice(1, -1);
- }
- }
-
-
- if(_cp.matchFor){
- _cp.matchFor = _cp.matchFor.replace(/\\/g, "");
- }
-
- currentPart.attrs.push(_cp);
- _cp = null;
- inBrackets = inMatchFor = -1;
- }else if(cc == "="){
-
-
- var addToCc = ("|~^$*".indexOf(lc) >=0 ) ? lc : "";
- _cp.type = addToCc+cc;
- _cp.attr = ts(inBrackets+1, x-addToCc.length);
- inMatchFor = x+1;
- }
-
- }else if(inParens >= 0){
-
-
-
- if(cc == ")"){
- if(inPseudo >= 0){
- _cp.value = ts(inParens+1, x);
- }
- inPseudo = inParens = -1;
- }
- }else if(cc == "#"){
-
- endAll();
- inId = x+1;
- }else if(cc == "."){
-
- endAll();
- inClass = x;
- }else if(cc == ":"){
-
- endAll();
- inPseudo = x;
- }else if(cc == "["){
-
- endAll();
- inBrackets = x;
-
- _cp = {
-
- };
- }else if(cc == "("){
-
-
- if(inPseudo >= 0){
-
- _cp = {
- name: ts(inPseudo+1, x),
- value: null
- };
- currentPart.pseudos.push(_cp);
- }
- inParens = x;
- }else if(
- (cc == " ") &&
-
-
- (lc != cc)
- ){
- endPart();
- }
- }
- return queryParts;
- };
-
-
-
- var agree = function(first, second){
-
-
-
-
- if(!first){ return second; }
- if(!second){ return first; }
- return function(){
- return first.apply(window, arguments) && second.apply(window, arguments);
- }
- };
- var getArr = function(i, arr){
-
- var r = arr||[];
- if(i){ r.push(i); }
- return r;
- };
- var _isElement = function(n){ return (1 == n.nodeType); };
-
- var blank = "";
- var _getAttr = function(elem, attr){
- if(!elem){ return blank; }
- if(attr == "class"){
- return elem.className || blank;
- }
- if(attr == "for"){
- return elem.htmlFor || blank;
- }
- if(attr == "style"){
- return elem.style.cssText || blank;
- }
- return (caseSensitive ? elem.getAttribute(attr) : elem.getAttribute(attr, 2)) || blank;
- };
- var attrs = {
- "*=": function(attr, value){
- return function(elem){
-
-
-
- return (_getAttr(elem, attr).indexOf(value)>=0);
- }
- },
- "^=": function(attr, value){
-
-
-
- return function(elem){
- return (_getAttr(elem, attr).indexOf(value)==0);
- }
- },
- "$=": function(attr, value){
-
-
-
- return function(elem){
- var ea = " "+_getAttr(elem, attr);
- var lastIndex = ea.lastIndexOf(value);
- return lastIndex > -1 && (lastIndex==(ea.length-value.length));
- }
- },
- "~=": function(attr, value){
-
-
-
-
-
- var tval = " "+value+" ";
- return function(elem){
- var ea = " "+_getAttr(elem, attr)+" ";
- return (ea.indexOf(tval)>=0);
- }
- },
- "|=": function(attr, value){
-
-
-
-
- var valueDash = value+"-";
- return function(elem){
- var ea = _getAttr(elem, attr);
- return (
- (ea == value) ||
- (ea.indexOf(valueDash)==0)
- );
- }
- },
- "=": function(attr, value){
- return function(elem){
- return (_getAttr(elem, attr) == value);
- }
- }
- };
-
-
- var _noNES = (typeof getDoc().firstChild.nextElementSibling == "undefined");
- var _ns = !_noNES ? "nextElementSibling" : "nextSibling";
- var _ps = !_noNES ? "previousElementSibling" : "previousSibling";
- var _simpleNodeTest = (_noNES ? _isElement : yesman);
- var _lookLeft = function(node){
-
- while(node = node[_ps]){
- if(_simpleNodeTest(node)){ return false; }
- }
- return true;
- };
- var _lookRight = function(node){
-
- while(node = node[_ns]){
- if(_simpleNodeTest(node)){ return false; }
- }
- return true;
- };
- var getNodeIndex = function(node){
- var root = node.parentNode;
- var i = 0,
- tret = root.children || root.childNodes,
- ci = (node["_i"]||-1),
- cl = (root["_l"]||-1);
- if(!tret){ return -1; }
- var l = tret.length;
-
-
-
- if( cl == l && ci >= 0 && cl >= 0 ){
-
- return ci;
- }
-
- root["_l"] = l;
- ci = -1;
- for(var te = root["firstElementChild"]||root["firstChild"]; te; te = te[_ns]){
- if(_simpleNodeTest(te)){
- te["_i"] = ++i;
- if(node === te){
-
-
-
-
-
-
-
-
- ci = i;
- }
- }
- }
- return ci;
- };
- var isEven = function(elem){
- return !((getNodeIndex(elem)) % 2);
- };
- var isOdd = function(elem){
- return ((getNodeIndex(elem)) % 2);
- };
- var pseudos = {
- "checked": function(name, condition){
- return function(elem){
- return !!("checked" in elem ? elem.checked : elem.selected);
- }
- },
- "first-child": function(){ return _lookLeft; },
- "last-child": function(){ return _lookRight; },
- "only-child": function(name, condition){
- return function(node){
- return _lookLeft(node) && _lookRight(node);
- };
- },
- "empty": function(name, condition){
- return function(elem){
-
-
- var cn = elem.childNodes;
- var cnl = elem.childNodes.length;
-
- for(var x=cnl-1; x >= 0; x--){
- var nt = cn[x].nodeType;
- if((nt === 1)||(nt == 3)){ return false; }
- }
- return true;
- };
- },
- "disabled": function(name, condition){
- return function(elem){
- return elem.disabled;
- };
- },
- "enabled": function(name, condition){
- return function(elem){
- return !elem.disabled;
- };
- },
- "contains": function(name, condition){
- var cz = condition.charAt(0);
- if( cz == '"' || cz == "'" ){
- condition = condition.slice(1, -1);
- }
- return function(elem){
- return (elem.innerHTML.indexOf(condition) >= 0);
- }
- },
- "not": function(name, condition){
- var p = getQueryParts(condition)[0];
- var ignores = { el: 1 };
- if(p.tag != "*"){
- ignores.tag = 1;
- }
- if(!p.classes.length){
- ignores.classes = 1;
- }
- var ntf = getSimpleFilterFunc(p, ignores);
- return function(elem){
- return (!ntf(elem));
- }
- },
- "nth-child": function(name, condition){
- var pi = parseInt;
-
- if(condition == "odd"){
- return isOdd;
- }else if(condition == "even"){
- return isEven;
- }
-
- if(condition.indexOf("n") != -1){
- var tparts = condition.split("n", 2);
- var pred = tparts[0] ? ((tparts[0] == '-') ? -1 : pi(tparts[0])) : 1;
- var idx = tparts[1] ? pi(tparts[1]) : 0;
- var lb = 0, ub = -1;
- if(pred > 0){
- if(idx < 0){
- idx = (idx % pred) && (pred + (idx % pred));
- }else if(idx>0){
- if(idx >= pred){
- lb = idx - idx % pred;
- }
- idx = idx % pred;
- }
- }else if(pred<0){
- pred *= -1;
-
-
- if(idx > 0){
- ub = idx;
- idx = idx % pred;
- }
- }
- if(pred > 0){
- return function(elem){
- var i = getNodeIndex(elem);
- return (i>=lb) && (ub<0 || i<=ub) && ((i % pred) == idx);
- }
- }else{
- condition = idx;
- }
- }
- var ncount = pi(condition);
- return function(elem){
- return (getNodeIndex(elem) == ncount);
- }
- }
- };
- var defaultGetter = (dojo.isIE < 9 || dojo.isIE == 9 && dojo.isQuirks) ? function(cond){
- var clc = cond.toLowerCase();
- if(clc == "class"){ cond = "className"; }
- return function(elem){
- return (caseSensitive ? elem.getAttribute(cond) : elem[cond]||elem[clc]);
- }
- } : function(cond){
- return function(elem){
- return (elem && elem.getAttribute && elem.hasAttribute(cond));
- }
- };
- var getSimpleFilterFunc = function(query, ignores){
-
-
-
-
-
-
-
- if(!query){ return yesman; }
- ignores = ignores||{};
- var ff = null;
- if(!("el" in ignores)){
- ff = agree(ff, _isElement);
- }
- if(!("tag" in ignores)){
- if(query.tag != "*"){
- ff = agree(ff, function(elem){
- return (elem && (elem.tagName == query.getTag()));
- });
- }
- }
- if(!("classes" in ignores)){
- each(query.classes, function(cname, idx, arr){
-
-
- var re = new RegExp("(?:^|\\s)" + cname + "(?:\\s|$)");
- ff = agree(ff, function(elem){
- return re.test(elem.className);
- });
- ff.count = idx;
- });
- }
- if(!("pseudos" in ignores)){
- each(query.pseudos, function(pseudo){
- var pn = pseudo.name;
- if(pseudos[pn]){
- ff = agree(ff, pseudos[pn](pn, pseudo.value));
- }
- });
- }
- if(!("attrs" in ignores)){
- each(query.attrs, function(attr){
- var matcher;
- var a = attr.attr;
-
- if(attr.type && attrs[attr.type]){
- matcher = attrs[attr.type](a, attr.matchFor);
- }else if(a.length){
- matcher = defaultGetter(a);
- }
- if(matcher){
- ff = agree(ff, matcher);
- }
- });
- }
- if(!("id" in ignores)){
- if(query.id){
- ff = agree(ff, function(elem){
- return (!!elem && (elem.id == query.id));
- });
- }
- }
- if(!ff){
- if(!("default" in ignores)){
- ff = yesman;
- }
- }
- return ff;
- };
- var _nextSibling = function(filterFunc){
- return function(node, ret, bag){
- while(node = node[_ns]){
- if(_noNES && (!_isElement(node))){ continue; }
- if(
- (!bag || _isUnique(node, bag)) &&
- filterFunc(node)
- ){
- ret.push(node);
- }
- break;
- }
- return ret;
- }
- };
- var _nextSiblings = function(filterFunc){
- return function(root, ret, bag){
- var te = root[_ns];
- while(te){
- if(_simpleNodeTest(te)){
- if(bag && !_isUnique(te, bag)){
- break;
- }
- if(filterFunc(te)){
- ret.push(te);
- }
- }
- te = te[_ns];
- }
- return ret;
- }
- };
-
- var _childElements = function(filterFunc){
- filterFunc = filterFunc||yesman;
- return function(root, ret, bag){
-
- var te, x = 0, tret = root.children || root.childNodes;
- while(te = tret[x++]){
- if(
- _simpleNodeTest(te) &&
- (!bag || _isUnique(te, bag)) &&
- (filterFunc(te, x))
- ){
- ret.push(te);
- }
- }
- return ret;
- };
- };
-
-
- var _isDescendant = function(node, root){
- var pn = node.parentNode;
- while(pn){
- if(pn == root){
- break;
- }
- pn = pn.parentNode;
- }
- return !!pn;
- };
- var _getElementsFuncCache = {};
- var getElementsFunc = function(query){
- var retFunc = _getElementsFuncCache[query.query];
-
- if(retFunc){ return retFunc; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var io = query.infixOper;
- var oper = (io ? io.oper : "");
-
-
-
- var filterFunc = getSimpleFilterFunc(query, { el: 1 });
- var qt = query.tag;
- var wildcardTag = ("*" == qt);
- var ecs = getDoc()["getElementsByClassName"];
- if(!oper){
-
-
-
- if(query.id){
-
-
-
- filterFunc = (!query.loops && wildcardTag) ?
- yesman :
- getSimpleFilterFunc(query, { el: 1, id: 1 });
- retFunc = function(root, arr){
- var te = dom.byId(query.id, (root.ownerDocument||root));
- if(!te || !filterFunc(te)){ return; }
- if(9 == root.nodeType){
- return getArr(te, arr);
- }else{
- if(_isDescendant(te, root)){
- return getArr(te, arr);
- }
- }
- }
- }else if(
- ecs &&
-
- /\{\s*\[native code\]\s*\}/.test(String(ecs)) &&
- query.classes.length &&
- !cssCaseBug
- ){
-
-
- filterFunc = getSimpleFilterFunc(query, { el: 1, classes: 1, id: 1 });
- var classesString = query.classes.join(" ");
- retFunc = function(root, arr, bag){
- var ret = getArr(0, arr), te, x=0;
- var tret = root.getElementsByClassName(classesString);
- while((te = tret[x++])){
- if(filterFunc(te, root) && _isUnique(te, bag)){
- ret.push(te);
- }
- }
- return ret;
- };
- }else if(!wildcardTag && !query.loops){
-
- retFunc = function(root, arr, bag){
- var ret = getArr(0, arr), te, x=0;
- var tret = root.getElementsByTagName(query.getTag());
- while((te = tret[x++])){
- if(_isUnique(te, bag)){
- ret.push(te);
- }
- }
- return ret;
- };
- }else{
-
-
-
-
- filterFunc = getSimpleFilterFunc(query, { el: 1, tag: 1, id: 1 });
- retFunc = function(root, arr, bag){
- var ret = getArr(0, arr), te, x=0;
-
- var tret = root.getElementsByTagName(query.getTag());
- while((te = tret[x++])){
- if(filterFunc(te, root) && _isUnique(te, bag)){
- ret.push(te);
- }
- }
- return ret;
- };
- }
- }else{
-
-
- var skipFilters = { el: 1 };
- if(wildcardTag){
- skipFilters.tag = 1;
- }
- filterFunc = getSimpleFilterFunc(query, skipFilters);
- if("+" == oper){
- retFunc = _nextSibling(filterFunc);
- }else if("~" == oper){
- retFunc = _nextSiblings(filterFunc);
- }else if(">" == oper){
- retFunc = _childElements(filterFunc);
- }
- }
-
- return _getElementsFuncCache[query.query] = retFunc;
- };
- var filterDown = function(root, queryParts){
-
-
-
-
- var candidates = getArr(root), qp, x, te, qpl = queryParts.length, bag, ret;
- for(var i = 0; i < qpl; i++){
- ret = [];
- qp = queryParts[i];
- x = candidates.length - 1;
- if(x > 0){
-
-
-
-
- bag = {};
- ret.nozip = true;
- }
- var gef = getElementsFunc(qp);
- for(var j = 0; (te = candidates[j]); j++){
-
-
-
-
-
- gef(te, ret, bag);
- }
- if(!ret.length){ break; }
- candidates = ret;
- }
- return ret;
- };
-
-
-
-
-
-
- var _queryFuncCacheDOM = {},
- _queryFuncCacheQSA = {};
-
-
-
- var getStepQueryFunc = function(query){
- var qparts = getQueryParts(trim(query));
-
- if(qparts.length == 1){
-
-
-
-
- var tef = getElementsFunc(qparts[0]);
- return function(root){
- var r = tef(root, []);
- if(r){ r.nozip = true; }
- return r;
- }
- }
-
- return function(root){
- return filterDown(root, qparts);
- }
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var nua = navigator.userAgent;
-
-
- var wk = "WebKit/";
- var is525 = (
- dojo.isWebKit &&
- (nua.indexOf(wk) > 0) &&
- (parseFloat(nua.split(wk)[1]) > 528)
- );
-
-
-
- var noZip = dojo.isIE ? "commentStrip" : "nozip";
- var qsa = "querySelectorAll";
- var qsaAvail = (
- !!getDoc()[qsa] &&
-
- (!dojo.isSafari || (dojo.isSafari > 3.1) || is525 )
- );
-
- var infixSpaceRe = /\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g;
- var infixSpaceFunc = function(match, pre, ch, post){
- return ch ? (pre ? pre + " " : "") + ch + (post ? " " + post : "") : match;
- };
-
-
- var attRe = /([^[]*)([^\]]*])?/g;
- var attFunc = function(match, nonAtt, att) {
- return nonAtt.replace(infixSpaceRe, infixSpaceFunc) + (att||"");
- };
- var getQueryFunc = function(query, forceDOM){
-
-
-
-
- query = query.replace(attRe, attFunc);
- if(qsaAvail){
-
- var qsaCached = _queryFuncCacheQSA[query];
- if(qsaCached && !forceDOM){ return qsaCached; }
- }
-
-
- var domCached = _queryFuncCacheDOM[query];
- if(domCached){ return domCached; }
-
-
-
-
- var qcz = query.charAt(0);
- var nospace = (-1 == query.indexOf(" "));
-
-
- if( (query.indexOf("#") >= 0) && (nospace) ){
- forceDOM = true;
- }
- var useQSA = (
- qsaAvail && (!forceDOM) &&
-
-
- (specials.indexOf(qcz) == -1) &&
-
- (!dojo.isIE || (query.indexOf(":") == -1)) &&
- (!(cssCaseBug && (query.indexOf(".") >= 0))) &&
-
-
-
-
-
-
-
- (query.indexOf(":contains") == -1) && (query.indexOf(":checked") == -1) &&
- (query.indexOf("|=") == -1)
- );
-
-
-
-
-
-
- if(useQSA){
- var tq = (specials.indexOf(query.charAt(query.length-1)) >= 0) ?
- (query + " *") : query;
- return _queryFuncCacheQSA[query] = function(root){
- try{
-
-
-
-
-
-
-
-
-
- if(!((9 == root.nodeType) || nospace)){ throw ""; }
- var r = root[qsa](tq);
-
- r[noZip] = true;
- return r;
- }catch(e){
-
-
- return getQueryFunc(query, true)(root);
- }
- }
- }else{
-
- var parts = query.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);
- return _queryFuncCacheDOM[query] = ((parts.length < 2) ?
-
- getStepQueryFunc(query) :
-
-
-
- function(root){
- var pindex = 0,
- ret = [],
- tp;
- while((tp = parts[pindex++])){
- ret = ret.concat(getStepQueryFunc(tp)(root));
- }
- return ret;
- }
- );
- }
- };
- var _zipIdx = 0;
-
-
-
- var _nodeUID = dojo.isIE ? function(node){
- if(caseSensitive){
-
- return (node.getAttribute("_uid") || node.setAttribute("_uid", ++_zipIdx) || _zipIdx);
- }else{
- return node.uniqueID;
- }
- } :
- function(node){
- return (node._uid || (node._uid = ++_zipIdx));
- };
-
-
-
-
-
- var _isUnique = function(node, bag){
- if(!bag){ return 1; }
- var id = _nodeUID(node);
- if(!bag[id]){ return bag[id] = 1; }
- return 0;
- };
-
-
- var _zipIdxName = "_zipIdx";
- var _zip = function(arr){
- if(arr && arr.nozip){
- return arr;
- }
- var ret = [];
- if(!arr || !arr.length){ return ret; }
- if(arr[0]){
- ret.push(arr[0]);
- }
- if(arr.length < 2){ return ret; }
- _zipIdx++;
-
-
- if(dojo.isIE && caseSensitive){
- var szidx = _zipIdx+"";
- arr[0].setAttribute(_zipIdxName, szidx);
- for(var x = 1, te; te = arr[x]; x++){
- if(arr[x].getAttribute(_zipIdxName) != szidx){
- ret.push(te);
- }
- te.setAttribute(_zipIdxName, szidx);
- }
- }else if(dojo.isIE && arr.commentStrip){
- try{
- for(var x = 1, te; te = arr[x]; x++){
- if(_isElement(te)){
- ret.push(te);
- }
- }
- }catch(e){ }
- }else{
- if(arr[0]){ arr[0][_zipIdxName] = _zipIdx; }
- for(var x = 1, te; te = arr[x]; x++){
- if(arr[x][_zipIdxName] != _zipIdx){
- ret.push(te);
- }
- te[_zipIdxName] = _zipIdx;
- }
- }
- return ret;
- };
-
- var query = function(/*String*/ query, /*String|DOMNode?*/ root){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- root = root || getDoc();
-
- var od = root.ownerDocument || root;
- caseSensitive = (od.createElement("div").tagName === "div");
-
-
-
-
- var r = getQueryFunc(query)(root);
-
-
- if(r && r.nozip){
- return r;
- }
- return _zip(r);
- };
- query.filter = function(/*Node[]*/ nodeList, /*String*/ filter, /*String|DOMNode?*/ root){
-
-
- var tmpNodeList = [],
- parts = getQueryParts(filter),
- filterFunc =
- (parts.length == 1 && !/[^\w#\.]/.test(filter)) ?
- getSimpleFilterFunc(parts[0]) :
- function(node){
- return dojo.query(filter, root).indexOf(node) != -1;
- };
- for(var x = 0, te; te = nodeList[x]; x++){
- if(filterFunc(te)){ tmpNodeList.push(te); }
- }
- return tmpNodeList;
- };
- return query;
- });
- },
- 'dojo/dom-style':function(){
- define("dojo/dom-style", ["./_base/sniff", "./dom"], function(has, dom){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var getComputedStyle, style = {};
- if(has("webkit")){
- getComputedStyle = function(/*DomNode*/node){
- var s;
- if(node.nodeType == 1){
- var dv = node.ownerDocument.defaultView;
- s = dv.getComputedStyle(node, null);
- if(!s && node.style){
- node.style.display = "";
- s = dv.getComputedStyle(node, null);
- }
- }
- return s || {};
- };
- }else if(has("ie") && (has("ie") < 9 || has("quirks"))){
- getComputedStyle = function(node){
-
- return node.nodeType == 1 ? node.currentStyle : {};
- };
- }else{
- getComputedStyle = function(node){
- return node.nodeType == 1 ?
- node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
- };
- }
- style.getComputedStyle = getComputedStyle;
- var toPixel;
- if(!has("ie")){
- toPixel = function(element, value){
-
-
- return parseFloat(value) || 0;
- };
- }else{
- toPixel = function(element, avalue){
- if(!avalue){ return 0; }
-
- if(avalue == "medium"){ return 4; }
-
-
- if(avalue.slice && avalue.slice(-2) == 'px'){ return parseFloat(avalue); }
- var s = element.style, rs = element.runtimeStyle, cs = element.currentStyle,
- sLeft = s.left, rsLeft = rs.left;
- rs.left = cs.left;
- try{
-
-
-
-
- s.left = avalue;
- avalue = s.pixelLeft;
- }catch(e){
- avalue = 0;
- }
- s.left = sLeft;
- rs.left = rsLeft;
- return avalue;
- }
- }
- style.toPixelValue = toPixel;
-
- var astr = "DXImageTransform.Microsoft.Alpha";
- var af = function(n, f){
- try{
- return n.filters.item(astr);
- }catch(e){
- return f ? {} : null;
- }
- };
- var _getOpacity =
- has("ie") < 9 || (has("ie") < 10 && has("quirks")) ? function(node){
- try{
- return af(node).Opacity / 100;
- }catch(e){
- return 1;
- }
- } :
- function(node){
- return getComputedStyle(node).opacity;
- };
- var _setOpacity =
- has("ie") < 9 || (has("ie") < 10 && has("quirks")) ? function(/*DomNode*/node, /*Number*/opacity){
- var ov = opacity * 100, opaque = opacity == 1;
- node.style.zoom = opaque ? "" : 1;
- if(!af(node)){
- if(opaque){
- return opacity;
- }
- node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")";
- }else{
- af(node, 1).Opacity = ov;
- }
-
-
- af(node, 1).Enabled = !opaque;
- if(node.tagName.toLowerCase() == "tr"){
- for(var td = node.firstChild; td; td = td.nextSibling){
- if(td.tagName.toLowerCase() == "td"){
- _setOpacity(td, opacity);
- }
- }
- }
- return opacity;
- } :
- function(node, opacity){
- return node.style.opacity = opacity;
- };
- var _pixelNamesCache = {
- left: true, top: true
- };
- var _pixelRegExp = /margin|padding|width|height|max|min|offset/;
- function _toStyleValue(node, type, value){
-
- type = type.toLowerCase();
- if(has("ie")){
- if(value == "auto"){
- if(type == "height"){ return node.offsetHeight; }
- if(type == "width"){ return node.offsetWidth; }
- }
- if(type == "fontweight"){
- switch(value){
- case 700: return "bold";
- case 400:
- default: return "normal";
- }
- }
- }
- if(!(type in _pixelNamesCache)){
- _pixelNamesCache[type] = _pixelRegExp.test(type);
- }
- return _pixelNamesCache[type] ? toPixel(node, value) : value;
- }
- var _floatAliases = {cssFloat: 1, styleFloat: 1, "float": 1};
-
- style.get = function getStyle(/*DOMNode|String*/ node, /*String?*/ name){
- var n = dom.byId(node), l = arguments.length, op = (name == "opacity");
- if(l == 2 && op){
- return _getOpacity(n);
- }
- name = _floatAliases[name] ? "cssFloat" in n.style ? "cssFloat" : "styleFloat" : name;
- var s = style.getComputedStyle(n);
- return (l == 1) ? s : _toStyleValue(n, name, s[name] || n.style[name]);
- };
- style.set = function setStyle(/*DOMNode|String*/ node, /*String|Object*/ name, /*String?*/ value){
- var n = dom.byId(node), l = arguments.length, op = (name == "opacity");
- name = _floatAliases[name] ? "cssFloat" in n.style ? "cssFloat" : "styleFloat" : name;
- if(l == 3){
- return op ? _setOpacity(n, value) : n.style[name] = value;
- }
- for(var x in name){
- style.set(node, x, name[x]);
- }
- return style.getComputedStyle(n);
- };
- return style;
- });
- },
- 'dojo/dom-geometry':function(){
- define(["./_base/sniff", "./_base/window","./dom", "./dom-style"],
- function(has, win, dom, style){
-
-
-
-
- var geom = {};
-
-
-
-
-
-
- geom.boxModel = "content-box";
-
-
-
-
-
-
-
- if(has("ie") ){
-
- geom.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box";
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- geom.getPadExtents = function getPadExtents(/*DomNode*/node, /*Object*/computedStyle){
- node = dom.byId(node);
- var s = computedStyle || style.getComputedStyle(node), px = style.toPixelValue,
- l = px(node, s.paddingLeft), t = px(node, s.paddingTop), r = px(node, s.paddingRight), b = px(node, s.paddingBottom);
- return {l: l, t: t, r: r, b: b, w: l + r, h: t + b};
- };
- var none = "none";
- geom.getBorderExtents = function getBorderExtents(/*DomNode*/node, /*Object*/computedStyle){
- node = dom.byId(node);
- var px = style.toPixelValue, s = computedStyle || style.getComputedStyle(node),
- l = s.borderLeftStyle != none ? px(node, s.borderLeftWidth) : 0,
- t = s.borderTopStyle != none ? px(node, s.borderTopWidth) : 0,
- r = s.borderRightStyle != none ? px(node, s.borderRightWidth) : 0,
- b = s.borderBottomStyle != none ? px(node, s.borderBottomWidth) : 0;
- return {l: l, t: t, r: r, b: b, w: l + r, h: t + b};
- };
- geom.getPadBorderExtents = function getPadBorderExtents(/*DomNode*/node, /*Object*/computedStyle){
- node = dom.byId(node);
- var s = computedStyle || style.getComputedStyle(node),
- p = geom.getPadExtents(node, s),
- b = geom.getBorderExtents(node, s);
- return {
- l: p.l + b.l,
- t: p.t + b.t,
- r: p.r + b.r,
- b: p.b + b.b,
- w: p.w + b.w,
- h: p.h + b.h
- };
- };
- geom.getMarginExtents = function getMarginExtents(node, computedStyle){
- node = dom.byId(node);
- var s = computedStyle || style.getComputedStyle(node), px = style.toPixelValue,
- l = px(node, s.marginLeft), t = px(node, s.marginTop), r = px(node, s.marginRight), b = px(node, s.marginBottom);
- if(has("webkit") && (s.position != "absolute")){
-
-
-
-
-
-
- r = l;
- }
- return {l: l, t: t, r: r, b: b, w: l + r, h: t + b};
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
- geom.getMarginBox = function getMarginBox(/*DomNode*/node, /*Object*/computedStyle){
-
-
-
- node = dom.byId(node);
- var s = computedStyle || style.getComputedStyle(node), me = geom.getMarginExtents(node, s),
- l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode, px = style.toPixelValue, pcs;
- if(has("mozilla")){
-
-
-
-
-
- var sl = parseFloat(s.left), st = parseFloat(s.top);
- if(!isNaN(sl) && !isNaN(st)){
- l = sl, t = st;
- }else{
-
-
- if(p && p.style){
- pcs = style.getComputedStyle(p);
- if(pcs.overflow != "visible"){
- l += pcs.borderLeftStyle != none ? px(node, pcs.borderLeftWidth) : 0;
- t += pcs.borderTopStyle != none ? px(node, pcs.borderTopWidth) : 0;
- }
- }
- }
- }else if(has("opera") || (has("ie") == 8 && !has("quirks"))){
-
- if(p){
- pcs = style.getComputedStyle(p);
- l -= pcs.borderLeftStyle != none ? px(node, pcs.borderLeftWidth) : 0;
- t -= pcs.borderTopStyle != none ? px(node, pcs.borderTopWidth) : 0;
- }
- }
- return {l: l, t: t, w: node.offsetWidth + me.w, h: node.offsetHeight + me.h};
- };
- geom.getContentBox = function getContentBox(node, computedStyle){
-
-
- node = dom.byId(node);
- var s = computedStyle || style.getComputedStyle(node), w = node.clientWidth, h,
- pe = geom.getPadExtents(node, s), be = geom.getBorderExtents(node, s);
- if(!w){
- w = node.offsetWidth;
- h = node.offsetHeight;
- }else{
- h = node.clientHeight;
- be.w = be.h = 0;
- }
-
- if(has("opera")){
- pe.l += be.l;
- pe.t += be.t;
- }
- return {l: pe.l, t: pe.t, w: w - pe.w - be.w, h: h - pe.h - be.h};
- };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function setBox(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- u = u || "px";
- var s = node.style;
- if(!isNaN(l)){
- s.left = l + u;
- }
- if(!isNaN(t)){
- s.top = t + u;
- }
- if(w >= 0){
- s.width = w + u;
- }
- if(h >= 0){
- s.height = h + u;
- }
- }
- function isButtonTag(/*DomNode*/node){
-
-
- return node.tagName.toLowerCase() == "button" ||
- node.tagName.toLowerCase() == "input" && (node.getAttribute("type") || "").toLowerCase() == "button";
- }
- function usesBorderBox(/*DomNode*/node){
-
-
-
-
-
-
-
- return geom.boxModel == "border-box" || node.tagName.toLowerCase() == "table" || isButtonTag(node);
- }
- geom.setContentSize = function setContentSize(/*DomNode*/node, /*Object*/box, /*Object*/computedStyle){
-
-
-
- node = dom.byId(node);
- var w = box.w, h = box.h;
- if(usesBorderBox(node)){
- var pb = geom.getPadBorderExtents(node, computedStyle);
- if(w >= 0){
- w += pb.w;
- }
- if(h >= 0){
- h += pb.h;
- }
- }
- setBox(node, NaN, NaN, w, h);
- };
- var nilExtents = {l: 0, t: 0, w: 0, h: 0};
- geom.setMarginBox = function setMarginBox(/*DomNode*/node, /*Object*/box, /*Object*/computedStyle){
- node = dom.byId(node);
- var s = computedStyle || style.getComputedStyle(node), w = box.w, h = box.h,
-
-
-
- pb = usesBorderBox(node) ? nilExtents : geom.getPadBorderExtents(node, s),
- mb = geom.getMarginExtents(node, s);
- if(has("webkit")){
-
-
-
- if(isButtonTag(node)){
- var ns = node.style;
- if(w >= 0 && !ns.width){
- ns.width = "4px";
- }
- if(h >= 0 && !ns.height){
- ns.height = "4px";
- }
- }
- }
- if(w >= 0){
- w = Math.max(w - pb.w - mb.w, 0);
- }
- if(h >= 0){
- h = Math.max(h - pb.h - mb.h, 0);
- }
- setBox(node, box.l, box.t, w, h);
- };
-
-
-
- geom.isBodyLtr = function isBodyLtr(){
- return (win.body().dir || win.doc.documentElement.dir || "ltr").toLowerCase() == "ltr";
- };
- geom.docScroll = function docScroll(){
- var node = win.doc.parentWindow || win.doc.defaultView;
- return "pageXOffset" in node ? {x: node.pageXOffset, y: node.pageYOffset } :
- (node = has("quirks") ? win.body() : win.doc.documentElement,
- {x: geom.fixIeBiDiScrollLeft(node.scrollLeft || 0), y: node.scrollTop || 0 });
- };
- geom.getIeDocumentElementOffset = function getIeDocumentElementOffset(){
-
- var de = win.doc.documentElement;
- if(has("ie") < 8){
- var r = de.getBoundingClientRect(),
- l = r.left, t = r.top;
- if(has("ie") < 7){
- l += de.clientLeft;
- t += de.clientTop;
- }
- return {
- x: l < 0 ? 0 : l,
- y: t < 0 ? 0 : t
- };
- }else{
- return {
- x: 0,
- y: 0
- };
- }
- };
-
- geom.fixIeBiDiScrollLeft = function fixIeBiDiScrollLeft(/*Integer*/ scrollLeft){
-
-
-
-
- var ie = has("ie");
- if(ie && !geom.isBodyLtr()){
- var qk = has("quirks"),
- de = qk ? win.body() : win.doc.documentElement;
- if(ie == 6 && !qk && win.global.frameElement && de.scrollHeight > de.clientHeight){
- scrollLeft += de.clientLeft;
- }
- return (ie < 8 || qk) ? (scrollLeft + de.clientWidth - de.scrollWidth) : -scrollLeft;
- }
- return scrollLeft;
- };
- geom.position = function(/*DomNode*/node, /*Boolean?*/includeScroll){
- node = dom.byId(node);
- var db = win.body(),
- dh = db.parentNode,
- ret = node.getBoundingClientRect();
- ret = {x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top};
- if(has("ie") < 9){
-
- var offset = geom.getIeDocumentElementOffset();
-
- ret.x -= offset.x + (has("quirks") ? db.clientLeft + db.offsetLeft : 0);
- ret.y -= offset.y + (has("quirks") ? db.clientTop + db.offsetTop : 0);
- }else if(has("ff") == 3){
-
-
- var cs = style.getComputedStyle(dh), px = style.toPixelValue;
- ret.x -= px(dh, cs.marginLeft) + px(dh, cs.borderLeftWidth);
- ret.y -= px(dh, cs.marginTop) + px(dh, cs.borderTopWidth);
- }
-
-
-
- if(includeScroll){
- var scroll = geom.docScroll();
- ret.x += scroll.x;
- ret.y += scroll.y;
- }
- return ret;
- };
-
- geom.getMarginSize = function getMarginSize(/*DomNode*/node, /*Object*/computedStyle){
- node = dom.byId(node);
- var me = geom.getMarginExtents(node, computedStyle || style.getComputedStyle(node));
- var size = node.getBoundingClientRect();
- return {
- w: (size.right - size.left) + me.w,
- h: (size.bottom - size.top) + me.h
- }
- };
- geom.normalizeEvent = function(event){
-
-
-
-
- if(!("layerX" in event)){
- event.layerX = event.offsetX;
- event.layerY = event.offsetY;
- }
- if(!has("dom-addeventlistener")){
-
-
-
-
- var se = event.target;
- var doc = (se && se.ownerDocument) || document;
-
-
- var docBody = has("quirks") ? doc.body : doc.documentElement;
- var offset = geom.getIeDocumentElementOffset();
- event.pageX = event.clientX + geom.fixIeBiDiScrollLeft(docBody.scrollLeft || 0) - offset.x;
- event.pageY = event.clientY + (docBody.scrollTop || 0) - offset.y;
- }
- };
-
- return geom;
- });
- },
- 'dojo/dom-prop':function(){
- define(["exports", "./_base/kernel", "./_base/sniff", "./_base/lang", "./dom", "./dom-style", "./dom-construct", "./_base/connect"],
- function(exports, dojo, has, lang, dom, style, ctr, conn){
-
-
-
-
-
-
-
-
-
-
-
- var _evtHdlrMap = {}, _ctr = 0, _attrId = dojo._scopeName + "attrid";
-
- var _roInnerHtml = {col: 1, colgroup: 1,
-
- table: 1, tbody: 1, tfoot: 1, thead: 1, tr: 1, title: 1};
-
- exports.names = {
-
- "class": "className",
- "for": "htmlFor",
-
- tabindex: "tabIndex",
- readonly: "readOnly",
- colspan: "colSpan",
- frameborder: "frameBorder",
- rowspan: "rowSpan",
- valuetype: "valueType"
- };
- exports.get = function getProp(/*DOMNode|String*/node, /*String*/name){
- node = dom.byId(node);
- var lc = name.toLowerCase(), propName = exports.names[lc] || name;
- return node[propName];
- };
- exports.set = function setProp(/*DOMNode|String*/node, /*String|Object*/name, /*String?*/value){
- node = dom.byId(node);
- var l = arguments.length;
- if(l == 2 && typeof name != "string"){
-
- for(var x in name){
- exports.set(node, x, name[x]);
- }
- return node;
- }
- var lc = name.toLowerCase(), propName = exports.names[lc] || name;
- if(propName == "style" && typeof value != "string"){
-
- style.style(node, value);
- return node;
- }
- if(propName == "innerHTML"){
-
- if(has("ie") && node.tagName.toLowerCase() in _roInnerHtml){
- ctr.empty(node);
- node.appendChild(ctr.toDom(value, node.ownerDocument));
- }else{
- node[propName] = value;
- }
- return node;
- }
- if(lang.isFunction(value)){
-
-
- var attrId = node[_attrId];
- if(!attrId){
- attrId = _ctr++;
- node[_attrId] = attrId;
- }
- if(!_evtHdlrMap[attrId]){
- _evtHdlrMap[attrId] = {};
- }
- var h = _evtHdlrMap[attrId][propName];
- if(h){
-
- conn.disconnect(h);
- }else{
- try{
- delete node[propName];
- }catch(e){}
- }
-
- if(value){
-
- _evtHdlrMap[attrId][propName] = conn.connect(node, propName, value);
- }else{
- node[propName] = null;
- }
- return node;
- }
- node[propName] = value;
- return node;
- };
- });
- },
- 'dojo/dom-attr':function(){
- define(["exports", "./_base/sniff", "./_base/lang", "./dom", "./dom-style", "./dom-prop"],
- function(exports, has, lang, dom, style, prop){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var forcePropNames = {
- innerHTML: 1,
- className: 1,
- htmlFor: has("ie"),
- value: 1
- },
- attrNames = {
-
- classname: "class",
- htmlfor: "for",
-
- tabindex: "tabIndex",
- readonly: "readOnly"
- };
- function _hasAttr(node, name){
- var attr = node.getAttributeNode && node.getAttributeNode(name);
- return attr && attr.specified;
- }
-
-
-
-
- exports.has = function hasAttr(/*DOMNode|String*/node, /*String*/name){
- var lc = name.toLowerCase();
- return forcePropNames[prop.names[lc] || name] || _hasAttr(dom.byId(node), attrNames[lc] || name);
- };
- exports.get = function getAttr(/*DOMNode|String*/node, /*String*/name){
- node = dom.byId(node);
- var lc = name.toLowerCase(),
- propName = prop.names[lc] || name,
- forceProp = forcePropNames[propName];
-
- value = node[propName];
- if(forceProp && typeof value != "undefined"){
-
- return value;
- }
- if(propName != "href" && (typeof value == "boolean" || lang.isFunction(value))){
-
- return value;
- }
-
-
- var attrName = attrNames[lc] || name;
- return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null;
- };
- exports.set = function setAttr(/*DOMNode|String*/node, /*String|Object*/name, /*String?*/value){
- node = dom.byId(node);
- if(arguments.length == 2){
-
- for(var x in name){
- exports.set(node, x, name[x]);
- }
- return node;
- }
- var lc = name.toLowerCase(),
- propName = prop.names[lc] || name,
- forceProp = forcePropNames[propName];
- if(propName == "style" && typeof value != "string"){
-
- style.set(node, value);
- return node;
- }
- if(forceProp || typeof value == "boolean" || lang.isFunction(value)){
- return prop.set(node, name, value)
- }
-
- node.setAttribute(attrNames[lc] || name, value);
- return node;
- };
- exports.remove = function removeAttr(/*DOMNode|String*/ node, /*String*/ name){
- dom.byId(node).removeAttribute(attrNames[name.toLowerCase()] || name);
- };
- exports.getNodeProp = function getNodeProp(/*DomNode|String*/ node, /*String*/ name){
- node = dom.byId(node);
- var lc = name.toLowerCase(), propName = prop.names[lc] || name;
- if((propName in node) && propName != "href"){
-
- return node[propName];
- }
-
- var attrName = attrNames[lc] || name;
- return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null;
- };
- });
- },
- 'dojo/dom-construct':function(){
- define(["exports", "./_base/kernel", "./_base/sniff", "./_base/window", "./dom", "./dom-attr", "./on"],
- function(exports, dojo, has, win, dom, attr, on){
-
-
-
-
-
-
-
-
-
-
-
-
- var tagWrap = {
- option: ["select"],
- tbody: ["table"],
- thead: ["table"],
- tfoot: ["table"],
- tr: ["table", "tbody"],
- td: ["table", "tbody", "tr"],
- th: ["table", "thead", "tr"],
- legend: ["fieldset"],
- caption: ["table"],
- colgroup: ["table"],
- col: ["table", "colgroup"],
- li: ["ul"]
- },
- reTag = /<\s*([\w\:]+)/,
- masterNode = {}, masterNum = 0,
- masterName = "__" + dojo._scopeName + "ToDomId";
-
-
- for(var param in tagWrap){
- if(tagWrap.hasOwnProperty(param)){
- var tw = tagWrap[param];
- tw.pre = param == "option" ? '<select multiple="multiple">' : "<" + tw.join("><") + ">";
- tw.post = "</" + tw.reverse().join("></") + ">";
-
-
- }
- }
- function _insertBefore(/*DomNode*/node, /*DomNode*/ref){
- var parent = ref.parentNode;
- if(parent){
- parent.insertBefore(node, ref);
- }
- }
- function _insertAfter(/*DomNode*/node, /*DomNode*/ref){
-
-
- var parent = ref.parentNode;
- if(parent){
- if(parent.lastChild == ref){
- parent.appendChild(node);
- }else{
- parent.insertBefore(node, ref.nextSibling);
- }
- }
- }
- exports.toDom = function toDom(frag, doc){
- doc = doc || win.doc;
- var masterId = doc[masterName];
- if(!masterId){
- doc[masterName] = masterId = ++masterNum + "";
- masterNode[masterId] = doc.createElement("div");
- }
-
- frag += "";
-
- var match = frag.match(reTag),
- tag = match ? match[1].toLowerCase() : "",
- master = masterNode[masterId],
- wrap, i, fc, df;
- if(match && tagWrap[tag]){
- wrap = tagWrap[tag];
- master.innerHTML = wrap.pre + frag + wrap.post;
- for(i = wrap.length; i; --i){
- master = master.firstChild;
- }
- }else{
- master.innerHTML = frag;
- }
-
- if(master.childNodes.length == 1){
- return master.removeChild(master.firstChild);
- }
-
- df = doc.createDocumentFragment();
- while((fc = master.firstChild)){
- df.appendChild(fc);
- }
- return df;
- };
- exports.place = function place(/*DOMNode|String*/node, /*DOMNode|String*/refNode, /*String|Number?*/position){
- refNode = dom.byId(refNode);
- if(typeof node == "string"){
- node = /^\s*</.test(node) ? exports.toDom(node, refNode.ownerDocument) : dom.byId(node);
- }
- if(typeof position == "number"){
- var cn = refNode.childNodes;
- if(!cn.length || cn.length <= position){
- refNode.appendChild(node);
- }else{
- _insertBefore(node, cn[position < 0 ? 0 : position]);
- }
- }else{
- switch(position){
- case "before":
- _insertBefore(node, refNode);
- break;
- case "after":
- _insertAfter(node, refNode);
- break;
- case "replace":
- refNode.parentNode.replaceChild(node, refNode);
- break;
- case "only":
- exports.empty(refNode);
- refNode.appendChild(node);
- break;
- case "first":
- if(refNode.firstChild){
- _insertBefore(node, refNode.firstChild);
- break;
- }
-
- default:
- refNode.appendChild(node);
- }
- }
- return node;
- };
- exports.create = function create(/*DOMNode|String*/tag, /*Object*/attrs, /*DOMNode?|String?*/refNode, /*String?*/pos){
- var doc = win.doc;
- if(refNode){
- refNode = dom.byId(refNode);
- doc = refNode.ownerDocument;
- }
- if(typeof tag == "string"){
- tag = doc.createElement(tag);
- }
- if(attrs){ attr.set(tag, attrs); }
- if(refNode){ exports.place(tag, refNode, pos); }
- return tag;
- };
- function _empty(/*DomNode*/ node){
- if(node.canHaveChildren){
- try{
-
- node.innerHTML = "";
- return;
- }catch(e){
-
-
- }
- }
-
- for(var c; c = node.lastChild;){
- _destroy(c, node);
- }
- }
- exports.empty = function empty(/*DOMNode|String*/ node){
- _empty(dom.byId(node));
- };
- function _destroy(/*DomNode*/ node, /*DomNode*/ parent){
- if(node.firstChild){
- _empty(node);
- }
- if(parent){
-
- has("ie") && parent.canHaveChildren && 'removeNode' in node ? node.removeNode(false) :
- parent.removeChild(node);
- }
- }
- exports.destroy = function destroy(/*DOMNode|String*/ node){
- node = dom.byId(node);
- if(!node){ return; }
- _destroy(node, node.parentNode);
- };
- });
- },
- 'dojo/text':function(){
- define(["./_base/kernel", "require", "./has", "./_base/xhr"], function(dojo, require, has, xhr){
-
-
-
-
-
-
-
-
-
-
-
- var getText;
- if(1){
- getText= function(url, sync, load){
- xhr("GET", {url:url, sync:!!sync, load:load});
- };
- }else{
-
- if(require.getText){
- getText= require.getText;
- }else{
- console.error("dojo/text plugin failed to load because loader does not support getText");
- }
- }
- var
- theCache= {},
- strip= function(text){
-
-
-
- if(text){
- text= text.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, "");
- var matches= text.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
- if(matches){
- text= matches[1];
- }
- }else{
- text = "";
- }
- return text;
- },
- notFound = {},
- pending = {},
- result= {
- dynamic:
-
- true,
- normalize:function(id, toAbsMid){
-
-
-
-
- var parts= id.split("!"),
- url= parts[0];
- return (/^\./.test(url) ? toAbsMid(url) : url) + (parts[1] ? "!" + parts[1] : "");
- },
- load:function(id, require, load){
-
-
-
-
- var
- parts= id.split("!"),
- stripFlag= parts.length>1,
- absMid= parts[0],
- url = require.toUrl(parts[0]),
- text = notFound,
- finish = function(text){
- load(stripFlag ? strip(text) : text);
- };
- if(absMid in theCache){
- text = theCache[absMid];
- }else if(url in require.cache){
- text = require.cache[url];
- }else if(url in theCache){
- text = theCache[url];
- }
- if(text===notFound){
- if(pending[url]){
- pending[url].push(finish);
- }else{
- var pendingList = pending[url] = [finish];
- getText(url, !require.async, function(text){
- theCache[absMid]= theCache[url]= text;
- for(var i = 0; i<pendingList.length;){
- pendingList[i++](text);
- }
- delete pending[url];
- });
- }
- }else{
- finish(text);
- }
- }
- };
- dojo.cache= function(/*String||Object*/module, /*String*/url, /*String||Object?*/value){
-
-
-
-
-
-
- var key;
- if(typeof module=="string"){
- if(/\//.test(module)){
-
- key = module;
- value = url;
- }else{
-
- key = require.toUrl(module.replace(/\./g, "/") + (url ? ("/" + url) : ""));
- }
- }else{
- key = module + "";
- value = url;
- }
- var
- val = (value != undefined && typeof value != "string") ? value.value : value,
- sanitize = value && value.sanitize;
- if(typeof val == "string"){
-
- theCache[key] = val;
- return sanitize ? strip(val) : val;
- }else if(val === null){
-
- delete theCache[key];
- return null;
- }else{
-
-
- if(!(key in theCache)){
- getText(key, true, function(text){
- theCache[key]= text;
- });
- }
- return sanitize ? strip(theCache[key]) : theCache[key];
- }
- };
- return result;
- });
- },
- 'dojo/keys':function(){
- define("dojo/keys", ["./_base/kernel", "./_base/sniff"], function(dojo, has) {
-
-
-
-
- return dojo.keys = {
-
-
- BACKSPACE: 8,
- TAB: 9,
- CLEAR: 12,
- ENTER: 13,
- SHIFT: 16,
- CTRL: 17,
- ALT: 18,
- META: has("safari") ? 91 : 224,
- PAUSE: 19,
- CAPS_LOCK: 20,
- ESCAPE: 27,
- SPACE: 32,
- PAGE_UP: 33,
- PAGE_DOWN: 34,
- END: 35,
- HOME: 36,
- LEFT_ARROW: 37,
- UP_ARROW: 38,
- RIGHT_ARROW: 39,
- DOWN_ARROW: 40,
- INSERT: 45,
- DELETE: 46,
- HELP: 47,
- LEFT_WINDOW: 91,
- RIGHT_WINDOW: 92,
- SELECT: 93,
- NUMPAD_0: 96,
- NUMPAD_1: 97,
- NUMPAD_2: 98,
- NUMPAD_3: 99,
- NUMPAD_4: 100,
- NUMPAD_5: 101,
- NUMPAD_6: 102,
- NUMPAD_7: 103,
- NUMPAD_8: 104,
- NUMPAD_9: 105,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_PLUS: 107,
- NUMPAD_ENTER: 108,
- NUMPAD_MINUS: 109,
- NUMPAD_PERIOD: 110,
- NUMPAD_DIVIDE: 111,
- F1: 112,
- F2: 113,
- F3: 114,
- F4: 115,
- F5: 116,
- F6: 117,
- F7: 118,
- F8: 119,
- F9: 120,
- F10: 121,
- F11: 122,
- F12: 123,
- F13: 124,
- F14: 125,
- F15: 126,
- NUM_LOCK: 144,
- SCROLL_LOCK: 145,
- UP_DPAD: 175,
- DOWN_DPAD: 176,
- LEFT_DPAD: 177,
- RIGHT_DPAD: 178,
-
- copyKey: has("mac") && !has("air") ? (has("safari") ? 91 : 224 ) : 17
- };
- });
- },
- 'dojo/domReady':function(){
- define(['./has'], function(has){
- var global = (function () { return this; })(),
- doc = document,
- readyStates = { 'loaded': 1, 'complete': 1 },
- fixReadyState = typeof doc.readyState != "string",
- ready = !!readyStates[doc.readyState],
- readyQ = [],
- recursiveGuard;
- function domReady(callback){
-
-
- readyQ.push(callback);
- if(ready){ processQ(); }
- }
- domReady.load = function(id, req, load){
- domReady(load);
- };
-
- domReady._Q = readyQ;
- domReady._onQEmpty = function(){
-
-
-
-
- };
-
- if(fixReadyState){ doc.readyState = "loading"; }
- function processQ(){
-
- if(recursiveGuard){ return; }
- recursiveGuard = true;
- while(readyQ.length){
- try{
- (readyQ.shift())(doc);
- }catch(err){
- console.log("Error on domReady callback: " + err);
- }
- }
- recursiveGuard = false;
-
-
- domReady._onQEmpty();
- }
- if(!ready){
- var tests = [],
- detectReady = function(evt){
- evt = evt || global.event;
- if(ready || (evt.type == "readystatechange" && !readyStates[doc.readyState])){ return; }
-
- if(fixReadyState){ doc.readyState = "complete"; }
- ready = 1;
- processQ();
- },
- on = function(node, event){
- node.addEventListener(event, detectReady, false);
- readyQ.push(function(){ node.removeEventListener(event, detectReady, false); });
- };
- if(!has("dom-addeventlistener")){
- on = function(node, event){
- event = "on" + event;
- node.attachEvent(event, detectReady);
- readyQ.push(function(){ node.detachEvent(event, detectReady); });
- };
- var div = doc.createElement("div");
- try{
- if(div.doScroll && global.frameElement === null){
-
- tests.push(function(){
-
-
- try{
- div.doScroll("left");
- return 1;
- }catch(e){}
- });
- }
- }catch(e){}
- }
- on(doc, "DOMContentLoaded");
- on(global, "load");
- if("onreadystatechange" in doc){
- on(doc, "readystatechange");
- }else if(!fixReadyState){
-
-
-
- tests.push(function(){
- return readyStates[doc.readyState];
- });
- }
- if(tests.length){
- var poller = function(){
- if(ready){ return; }
- var i = tests.length;
- while(i--){
- if(tests[i]()){
- detectReady("poller");
- return;
- }
- }
- setTimeout(poller, 30);
- };
- poller();
- }
- }
- return domReady;
- });
- },
- 'dojo/_base/lang':function(){
- define("dojo/_base/lang", ["./kernel", "../has", "./sniff"], function(dojo, has){
-
-
-
-
- has.add("bug-for-in-skips-shadowed", function(){
-
- for(var i in {toString: 1}){
- return 0;
- }
- return 1;
- });
- var _extraNames =
- has("bug-for-in-skips-shadowed") ?
- "hasOwnProperty.valueOf.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.constructor".split(".") : [],
- _extraLen = _extraNames.length,
- _mixin = function(dest, source, copyFunc){
- var name, s, i, empty = {};
- for(name in source){
-
-
-
- s = source[name];
- if(!(name in dest) || (dest[name] !== s && (!(name in empty) || empty[name] !== s))){
- dest[name] = copyFunc ? copyFunc(s) : s;
- }
- }
- if(has("bug-for-in-skips-shadowed")){
- if(source){
- for(i = 0; i < _extraLen; ++i){
- name = _extraNames[i];
- s = source[name];
- if(!(name in dest) || (dest[name] !== s && (!(name in empty) || empty[name] !== s))){
- dest[name] = copyFunc ? copyFunc(s) : s;
- }
- }
- }
- }
- return dest;
- },
- mixin = function(dest, sources){
- if(!dest){ dest = {}; }
- for(var i = 1, l = arguments.length; i < l; i++){
- lang._mixin(dest, arguments[i]);
- }
- return dest;
- },
- getProp = function(/*Array*/parts, /*Boolean*/create, /*Object*/context){
- if(!context){
- if(parts[0] && dojo.scopeMap[parts[0]]) {
-
-
- context = dojo.scopeMap[parts.shift()][1];
- }else{
- context = dojo.global;
- }
- }
- try{
- for(var i = 0; i < parts.length; i++){
- var p = parts[i];
-
- if (p === '__proto__' || p === 'constructor') {
- return;
- }
- if(!(p in context)){
- if(create){
- context[p] = {};
- }else{
- return;
- }
- }
- context = context[p];
- }
- return context;
- }catch(e){
-
-
- }
- },
- setObject = function(name, value, context){
- var parts = name.split("."), p = parts.pop(), obj = getProp(parts, true, context);
- return obj && p ? (obj[p] = value) : undefined;
- },
- getObject = function(name, create, context){
- return !name ? context : getProp(name.split("."), create, context);
- },
- exists = function(name, obj){
- return lang.getObject(name, false, obj) !== undefined;
- },
- opts = Object.prototype.toString,
-
- isString = function(it){
- return (typeof it == "string" || it instanceof String);
- },
- isArray = function(it){
- return it && (it instanceof Array || typeof it == "array");
- },
- isFunction = function(it){
- return opts.call(it) === "[object Function]";
- },
- isObject = function(it){
- return it !== undefined &&
- (it === null || typeof it == "object" || lang.isArray(it) || lang.isFunction(it));
- },
- isArrayLike = function(it){
- return it && it !== undefined &&
-
-
- !lang.isString(it) && !lang.isFunction(it) &&
- !(it.tagName && it.tagName.toLowerCase() == 'form') &&
- (lang.isArray(it) || isFinite(it.length));
- },
- isAlien = function(it){
- return it && !lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it));
- },
- extend = function(constructor, props){
- for(var i=1, l=arguments.length; i<l; i++){
- lang._mixin(constructor.prototype, arguments[i]);
- }
- return constructor; // Object
- },
- _hitchArgs = function(scope, method){
- var pre = _toArray(arguments, 2);
- var named = lang.isString(method);
- return function(){
-
- var args = _toArray(arguments);
-
- var f = named ? (scope||dojo.global)[method] : method;
-
- return f && f.apply(scope || this, pre.concat(args));
- };
- },
- hitch = function(scope, method){
- if(arguments.length > 2){
- return lang._hitchArgs.apply(dojo, arguments);
- }
- if(!method){
- method = scope;
- scope = null;
- }
- if(lang.isString(method)){
- scope = scope || dojo.global;
- if(!scope[method]){ throw(['dojo.hitch: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
- return function(){ return scope[method].apply(scope, arguments || []); };
- }
- return !scope ? method : function(){ return method.apply(scope, arguments || []); };
- },
- delegate = (function(){
-
- function TMP(){}
- return function(obj, props){
- TMP.prototype = obj;
- var tmp = new TMP();
- TMP.prototype = null;
- if(props){
- lang._mixin(tmp, props);
- }
- return tmp;
- };
- })(),
- efficient = function(obj, offset, startWith){
- return (startWith||[]).concat(Array.prototype.slice.call(obj, offset||0));
- },
- _toArray =
- has("ie") ?
- (function(){
- function slow(obj, offset, startWith){
- var arr = startWith||[];
- for(var x = offset || 0; x < obj.length; x++){
- arr.push(obj[x]);
- }
- return arr;
- }
- return function(obj){
- return ((obj.item) ? slow : efficient).apply(this, arguments);
- };
- })() : efficient,
- partial = function(/*Function|String*/method /*, ...*/){
- var arr = [ null ];
- return lang.hitch.apply(dojo, arr.concat(lang._toArray(arguments)));
- },
- clone = function(/*anything*/ src){
- if(!src || typeof src != "object" || lang.isFunction(src)){
-
- return src;
- }
- if(src.nodeType && "cloneNode" in src){
-
- return src.cloneNode(true);
- }
- if(src instanceof Date){
-
- return new Date(src.getTime());
- }
- if(src instanceof RegExp){
-
- return new RegExp(src);
- }
- var r, i, l;
- if(lang.isArray(src)){
-
- r = [];
- for(i = 0, l = src.length; i < l; ++i){
- if(i in src){
- r.push(clone(src[i]));
- }
- }
-
-
-
-
- }else{
-
- r = src.constructor ? new src.constructor() : {};
- }
- return lang._mixin(r, src, clone);
- },
- trim = String.prototype.trim ?
- function(str){ return str.trim(); } :
- function(str){ return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); },
- _pattern = /\{([^\}]+)\}/g,
- replace = function(tmpl, map, pattern){
- return tmpl.replace(pattern || _pattern, lang.isFunction(map) ?
- map : function(_, k){ return getObject(k, false, map); });
- },
- lang = {
- _extraNames:_extraNames,
- _mixin:_mixin,
- mixin:mixin,
- setObject:setObject,
- getObject:getObject,
- exists:exists,
- isString:isString,
- isArray:isArray,
- isFunction:isFunction,
- isObject:isObject,
- isArrayLike:isArrayLike,
- isAlien:isAlien,
- extend:extend,
- _hitchArgs:_hitchArgs,
- hitch:hitch,
- delegate:delegate,
- _toArray:_toArray,
- partial:partial,
- clone:clone,
- trim:trim,
- replace:replace
- };
- 1 && mixin(dojo, lang);
- return lang;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- });
- },
- 'dojo/Evented':function(){
- define("dojo/Evented", ["./aspect", "./on"], function(aspect, on){
-
-
-
-
-
-
-
-
-
-
-
-
- "use strict";
- var after = aspect.after;
- function Evented(){
- }
- Evented.prototype = {
- on: function(type, listener){
- return on.parse(this, type, listener, function(target, type){
- return after(target, 'on' + type, listener, true);
- });
- },
- emit: function(type, event){
- var args = [this];
- args.push.apply(args, arguments);
- return on.emit.apply(on, args);
- }
- };
- return Evented;
- });
- },
- 'dojo/mouse':function(){
- define("dojo/mouse", ["./_base/kernel", "./on", "./has", "./dom", "./_base/window"], function(dojo, on, has, dom, win){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- has.add("dom-quirks", win.doc && win.doc.compatMode == "BackCompat");
- has.add("events-mouseenter", win.doc && "onmouseenter" in win.doc.createElement("div"));
- var mouseButtons;
- if((has("dom-quirks") && has("ie")) || !has("dom-addeventlistener")){
- mouseButtons = {
- LEFT: 1,
- MIDDLE: 4,
- RIGHT: 2,
-
- isButton: function(e, button){ return e.button & button; },
- isLeft: function(e){ return e.button & 1; },
- isMiddle: function(e){ return e.button & 4; },
- isRight: function(e){ return e.button & 2; }
- };
- }else{
- mouseButtons = {
- LEFT: 0,
- MIDDLE: 1,
- RIGHT: 2,
-
- isButton: function(e, button){ return e.button == button; },
- isLeft: function(e){ return e.button == 0; },
- isMiddle: function(e){ return e.button == 1; },
- isRight: function(e){ return e.button == 2; }
- };
- }
- dojo.mouseButtons = mouseButtons;
- function eventHandler(type, mustBubble){
-
- var handler = function(node, listener){
- return on(node, type, function(evt){
- if(!dom.isDescendant(evt.relatedTarget, mustBubble ? evt.target : node)){
- return listener.call(this, evt);
- }
- });
- };
- if(!mustBubble){
- handler.bubble = eventHandler(type, true);
- }
- return handler;
- }
- return {
- _eventHandler: eventHandler,
-
-
-
- enter: eventHandler("mouseover"),
-
-
-
- leave: eventHandler("mouseout"),
- isLeft: mouseButtons.isLeft,
-
- isMiddle: mouseButtons.isMiddle,
-
- isRight: mouseButtons.isRight
-
- };
- });
- },
- 'dojo/topic':function(){
- define("dojo/topic", ["./Evented"], function(Evented){
-
-
-
-
-
-
-
- var hub = new Evented;
- return {
- publish: function(topic, event){
-
-
-
-
-
-
-
-
- return hub.emit.apply(hub, arguments);
- },
- subscribe: function(topic, listener){
-
-
-
-
-
-
- return hub.on.apply(hub, arguments);
- }
- }
- });
- },
- 'dojo/_base/xhr':function(){
- define("dojo/_base/xhr", [
- "./kernel", "./sniff", "require", "../io-query", "../dom", "../dom-form", "./Deferred", "./json", "./lang", "./array", "../on"
- ], function(dojo, has, require, ioq, dom, domForm, deferred, json, lang, array, on){
-
-
-
-
- has.add("native-xhr", function() {
-
- return typeof XMLHttpRequest !== 'undefined';
- });
- if(1 && require.getXhr){
- dojo._xhrObj = require.getXhr;
- }else if (has("native-xhr")){
- dojo._xhrObj = function(){
-
-
- try{
- return new XMLHttpRequest();
- }catch(e){
- throw new Error("XMLHTTP not available: "+e);
- }
- };
- }else{
-
- for(var XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], progid, i = 0; i < 3;){
- try{
- progid = XMLHTTP_PROGIDS[i++];
- if (new ActiveXObject(progid)) {
-
- break;
- }
- }catch(e){
-
-
-
- }
- }
- dojo._xhrObj= function() {
- return new ActiveXObject(progid);
- };
- }
- var cfg = dojo.config;
-
- dojo.objectToQuery = ioq.objectToQuery;
- dojo.queryToObject = ioq.queryToObject;
- dojo.fieldToObject = domForm.fieldToObject;
- dojo.formToObject = domForm.toObject;
- dojo.formToQuery = domForm.toQuery;
- dojo.formToJson = domForm.toJson;
-
-
-
- dojo._blockAsync = false;
-
- var handlers = dojo._contentHandlers = dojo.contentHandlers = {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "text": function(xhr){
-
- return xhr.responseText;
- },
- "json": function(xhr){
-
- return json.fromJson(xhr.responseText || null);
- },
- "json-comment-filtered": function(xhr){
-
-
-
-
-
-
-
-
-
-
-
-
- if(!dojo.config.useCommentedJson){
- console.warn("Consider using the standard mimetype:application/json."
- + " json-commenting can introduce security issues. To"
- + " decrease the chances of hijacking, use the standard the 'json' handler and"
- + " prefix your json with: {}&&\n"
- + "Use djConfig.useCommentedJson=true to turn off this message.");
- }
- var value = xhr.responseText;
- var cStartIdx = value.indexOf("\/*");
- var cEndIdx = value.lastIndexOf("*\/");
- if(cStartIdx == -1 || cEndIdx == -1){
- throw new Error("JSON was not comment filtered");
- }
- return json.fromJson(value.substring(cStartIdx+2, cEndIdx));
- },
- "javascript": function(xhr){
-
-
- return dojo.eval(xhr.responseText);
- },
- "xml": function(xhr){
-
- var result = xhr.responseXML;
- if(has("ie")){
- if((!result || !result.documentElement)){
-
-
- var ms = function(n){ return "MSXML" + n + ".DOMDocument"; };
- var dp = ["Microsoft.XMLDOM", ms(6), ms(4), ms(3), ms(2)];
- array.some(dp, function(p){
- try{
- var dom = new ActiveXObject(p);
- dom.async = false;
- dom.loadXML(xhr.responseText);
- result = dom;
- }catch(e){ return false; }
- return true;
- });
- }
- }
- return result;
- },
- "json-comment-optional": function(xhr){
-
-
- if(xhr.responseText && /^[^{\[]*\/\*/.test(xhr.responseText)){
- return handlers["json-comment-filtered"](xhr);
- }else{
- return handlers["json"](xhr);
- }
- }
- };
-
-
-
- dojo._ioSetArgs = function(/*dojo.__IoArgs*/args,
- /*Function*/canceller,
- /*Function*/okHandler,
- /*Function*/errHandler){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var ioArgs = {args: args, url: args.url};
-
- var formObject = null;
- if(args.form){
- var form = dom.byId(args.form);
-
-
- var actnNode = form.getAttributeNode("action");
- ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null);
- formObject = domForm.toObject(form);
- }
-
- var miArgs = [{}];
- if(formObject){
-
- miArgs.push(formObject);
- }
- if(args.content){
-
- miArgs.push(args.content);
- }
- if(args.preventCache){
- miArgs.push({"dojo.preventCache": new Date().valueOf()});
- }
- ioArgs.query = ioq.objectToQuery(lang.mixin.apply(null, miArgs));
-
- ioArgs.handleAs = args.handleAs || "text";
- var d = new deferred(canceller);
- d.addCallbacks(okHandler, function(error){
- return errHandler(error, d);
- });
-
-
-
-
- var ld = args.load;
- if(ld && lang.isFunction(ld)){
- d.addCallback(function(value){
- return ld.call(args, value, ioArgs);
- });
- }
- var err = args.error;
- if(err && lang.isFunction(err)){
- d.addErrback(function(value){
- return err.call(args, value, ioArgs);
- });
- }
- var handle = args.handle;
- if(handle && lang.isFunction(handle)){
- d.addBoth(function(value){
- return handle.call(args, value, ioArgs);
- });
- }
-
- if(cfg.ioPublish && dojo.publish && ioArgs.args.ioPublish !== false){
- d.addCallbacks(
- function(res){
- dojo.publish("/dojo/io/load", [d, res]);
- return res;
- },
- function(res){
- dojo.publish("/dojo/io/error", [d, res]);
- return res;
- }
- );
- d.addBoth(function(res){
- dojo.publish("/dojo/io/done", [d, res]);
- return res;
- });
- }
- d.ioArgs = ioArgs;
-
-
- return d;
- };
- var _deferredCancel = function(/*Deferred*/dfd){
-
- dfd.canceled = true;
- var xhr = dfd.ioArgs.xhr;
- var _at = typeof xhr.abort;
- if(_at == "function" || _at == "object" || _at == "unknown"){
- xhr.abort();
- }
- var err = dfd.ioArgs.error;
- if(!err){
- err = new Error("xhr cancelled");
- err.dojoType="cancel";
- }
- return err;
- };
- var _deferredOk = function(/*Deferred*/dfd){
-
- var ret = handlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
- return ret === undefined ? null : ret;
- };
- var _deferError = function(/*Error*/error, /*Deferred*/dfd){
-
- if(!dfd.ioArgs.args.failOk){
- console.error(error);
- }
- return error;
- };
-
-
- var _inFlightIntvl = null;
- var _inFlight = [];
-
-
-
-
-
- var _pubCount = 0;
- var _checkPubCount = function(dfd){
- if(_pubCount <= 0){
- _pubCount = 0;
- if(cfg.ioPublish && dojo.publish && (!dfd || dfd && dfd.ioArgs.args.ioPublish !== false)){
- dojo.publish("/dojo/io/stop");
- }
- }
- };
- var _watchInFlight = function(){
-
-
-
- var now = (new Date()).getTime();
-
-
-
- if(!dojo._blockAsync){
-
-
- for(var i = 0, tif; i < _inFlight.length && (tif = _inFlight[i]); i++){
- var dfd = tif.dfd;
- var func = function(){
- if(!dfd || dfd.canceled || !tif.validCheck(dfd)){
- _inFlight.splice(i--, 1);
- _pubCount -= 1;
- }else if(tif.ioCheck(dfd)){
- _inFlight.splice(i--, 1);
- tif.resHandle(dfd);
- _pubCount -= 1;
- }else if(dfd.startTime){
-
- if(dfd.startTime + (dfd.ioArgs.args.timeout || 0) < now){
- _inFlight.splice(i--, 1);
- var err = new Error("timeout exceeded");
- err.dojoType = "timeout";
- dfd.errback(err);
-
- dfd.cancel();
- _pubCount -= 1;
- }
- }
- };
- if(dojo.config.debugAtAllCosts){
- func.call(this);
- }else{
- try{
- func.call(this);
- }catch(e){
- dfd.errback(e);
- }
- }
- }
- }
- _checkPubCount(dfd);
- if(!_inFlight.length){
- clearInterval(_inFlightIntvl);
- _inFlightIntvl = null;
- }
- };
- dojo._ioCancelAll = function(){
-
-
- try{
- array.forEach(_inFlight, function(i){
- try{
- i.dfd.cancel();
- }catch(e){}
- });
- }catch(e){}
- };
-
-
- if(has("ie")){
- on(window, "unload", dojo._ioCancelAll);
- }
- dojo._ioNotifyStart = function(/*Deferred*/dfd){
-
-
-
-
-
-
-
- if(cfg.ioPublish && dojo.publish && dfd.ioArgs.args.ioPublish !== false){
- if(!_pubCount){
- dojo.publish("/dojo/io/start");
- }
- _pubCount += 1;
- dojo.publish("/dojo/io/send", [dfd]);
- }
- };
- dojo._ioWatch = function(dfd, validCheck, ioCheck, resHandle){
-
-
-
-
-
-
-
-
-
-
-
-
-
- var args = dfd.ioArgs.args;
- if(args.timeout){
- dfd.startTime = (new Date()).getTime();
- }
- _inFlight.push({dfd: dfd, validCheck: validCheck, ioCheck: ioCheck, resHandle: resHandle});
- if(!_inFlightIntvl){
- _inFlightIntvl = setInterval(_watchInFlight, 50);
- }
-
-
-
-
-
- if(args.sync){
- _watchInFlight();
- }
- };
- var _defaultContentType = "application/x-www-form-urlencoded";
- var _validCheck = function(/*Deferred*/dfd){
- return dfd.ioArgs.xhr.readyState;
- };
- var _ioCheck = function(/*Deferred*/dfd){
- return 4 == dfd.ioArgs.xhr.readyState;
- };
- var _resHandle = function(/*Deferred*/dfd){
- var xhr = dfd.ioArgs.xhr;
- if(dojo._isDocumentOk(xhr)){
- dfd.callback(dfd);
- }else{
- var err = new Error("Unable to load " + dfd.ioArgs.url + " status:" + xhr.status);
- err.status = xhr.status;
- err.responseText = xhr.responseText;
- err.xhr = xhr;
- dfd.errback(err);
- }
- };
- dojo._ioAddQueryToUrl = function(/*dojo.__IoCallbackArgs*/ioArgs){
-
-
- if(ioArgs.query.length){
- ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query;
- ioArgs.query = null;
- }
- };
-
- dojo.xhr = function(/*String*/ method, /*dojo.__XhrArgs*/ args, /*Boolean?*/ hasBody){
-
-
-
-
-
-
-
-
-
-
-
-
- var dfd = dojo._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError);
- var ioArgs = dfd.ioArgs;
-
-
- var xhr = ioArgs.xhr = dojo._xhrObj(ioArgs.args);
-
- if(!xhr){
- dfd.cancel();
- return dfd;
- }
-
- if("postData" in args){
- ioArgs.query = args.postData;
- }else if("putData" in args){
- ioArgs.query = args.putData;
- }else if("rawBody" in args){
- ioArgs.query = args.rawBody;
- }else if((arguments.length > 2 && !hasBody) || "POST|PUT".indexOf(method.toUpperCase()) == -1){
-
-
- dojo._ioAddQueryToUrl(ioArgs);
- }
-
-
- xhr.open(method, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined);
- if(args.headers){
- for(var hdr in args.headers){
- if(hdr.toLowerCase() === "content-type"){
- if(!args.contentType){
- args.contentType = args.headers[hdr];
- }
- }else if(args.headers[hdr]){
-
-
- xhr.setRequestHeader(hdr, args.headers[hdr]);
- }
- }
- }
-
- if(args.contentType !== false){
- xhr.setRequestHeader("Content-Type", args.contentType || _defaultContentType);
- }
- if(!args.headers || !("X-Requested-With" in args.headers)){
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- }
-
- dojo._ioNotifyStart(dfd);
- if(dojo.config.debugAtAllCosts){
- xhr.send(ioArgs.query);
- }else{
- try{
- xhr.send(ioArgs.query);
- }catch(e){
- ioArgs.error = e;
- dfd.cancel();
- }
- }
- dojo._ioWatch(dfd, _validCheck, _ioCheck, _resHandle);
- xhr = null;
- return dfd;
- };
- dojo.xhrGet = function(/*dojo.__XhrArgs*/ args){
-
-
- return dojo.xhr("GET", args);
- };
- dojo.rawXhrPost = dojo.xhrPost = function(/*dojo.__XhrArgs*/ args){
-
-
-
-
-
- return dojo.xhr("POST", args, true);
- };
- dojo.rawXhrPut = dojo.xhrPut = function(/*dojo.__XhrArgs*/ args){
-
-
-
-
-
- return dojo.xhr("PUT", args, true);
- };
- dojo.xhrDelete = function(/*dojo.__XhrArgs*/ args){
-
-
- return dojo.xhr("DELETE", args);
- };
-
- dojo._isDocumentOk = function(http){
- var stat = http.status || 0;
- stat =
- (stat >= 200 && stat < 300) ||
- stat == 304 ||
- stat == 1223 ||
- !stat;
- return stat;
- };
- dojo._getText = function(url){
- var result;
- dojo.xhrGet({url:url, sync:true, load:function(text){
- result = text;
- }});
- return result;
- };
-
- lang.mixin(dojo.xhr, {
- _xhrObj: dojo._xhrObj,
- fieldToObject: domForm.fieldToObject,
- formToObject: domForm.toObject,
- objectToQuery: ioq.objectToQuery,
- formToQuery: domForm.toQuery,
- formToJson: domForm.toJson,
- queryToObject: ioq.queryToObject,
- contentHandlers: handlers,
- _ioSetArgs: dojo._ioSetArgs,
- _ioCancelAll: dojo._ioCancelAll,
- _ioNotifyStart: dojo._ioNotifyStart,
- _ioWatch: dojo._ioWatch,
- _ioAddQueryToUrl: dojo._ioAddQueryToUrl,
- _isDocumentOk: dojo._isDocumentOk,
- _getText: dojo._getText,
- get: dojo.xhrGet,
- post: dojo.xhrPost,
- put: dojo.xhrPut,
- del: dojo.xhrDelete
- });
- return dojo.xhr;
- });
- },
- 'dojo/loadInit':function(){
- define("dojo/loadInit", ["./_base/loader"], function(loader){
- return {
- dynamic:0,
- normalize:function(id){return id;},
- load:loader.loadInit
- };
- });
- },
- 'dojo/_base/unload':function(){
- define(["./kernel", "./connect"], function(dojo, connect) {
-
-
-
-
- var win = window;
-
- dojo.addOnWindowUnload = function(/*Object?|Function?*/obj, /*String|Function?*/functionName){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (!dojo.windowUnloaded) {
- connect.connect(win, "unload", (dojo.windowUnloaded= function(){}));
- }
- connect.connect(win, "unload", obj, functionName);
- };
- dojo.addOnUnload = function(/*Object?|Function?*/obj, /*String|Function?*/functionName){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- connect.connect(win, "beforeunload", obj, functionName);
- };
- return {
- addOnWindowUnload: dojo.addOnWindowUnload,
- addOnUnload: dojo.addOnUnload
- };
- });
- },
- 'dojo/_base/NodeList':function(){
- define("dojo/_base/NodeList", ["./kernel", "../query", "./array", "./html", "../NodeList-dom"], function(dojo, query, array){
-
-
-
-
-
- var NodeList = query.NodeList;
-
- var nlp = NodeList.prototype;
-
- nlp.connect = NodeList._adaptAsForEach(function(){
- return dojo.connect.apply(this, arguments);
- });
- nlp.coords = NodeList._adaptAsMap(dojo.coords);
- NodeList.events = [
-
-
- "blur", "focus", "change", "click", "error", "keydown", "keypress",
- "keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove",
- "mouseout", "mouseover", "mouseup", "submit"
- ];
-
-
- array.forEach(NodeList.events, function(evt){
- var _oe = "on" + evt;
- nlp[_oe] = function(a, b){
- return this.connect(_oe, a, b);
- };
-
-
- }
- );
- dojo.NodeList = NodeList;
- return dojo.NodeList;
- });
- },
- 'dojo/_base/Color':function(){
- define(["./kernel", "./lang", "./array", "./config"], function(dojo, lang, ArrayUtil, config){
- var Color = dojo.Color = function(/*Array|String|Object*/ color){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(color){ this.setColor(color); }
- };
-
-
-
-
- Color.named = {
- "black": [0,0,0],
- "silver": [192,192,192],
- "gray": [128,128,128],
- "white": [255,255,255],
- "maroon": [128,0,0],
- "red": [255,0,0],
- "purple": [128,0,128],
- "fuchsia":[255,0,255],
- "green": [0,128,0],
- "lime": [0,255,0],
- "olive": [128,128,0],
- "yellow": [255,255,0],
- "navy": [0,0,128],
- "blue": [0,0,255],
- "teal": [0,128,128],
- "aqua": [0,255,255],
- "transparent": config.transparentColor || [0,0,0,0]
- };
- lang.extend(Color, {
- r: 255, g: 255, b: 255, a: 1,
- _set: function(r, g, b, a){
- var t = this; t.r = r; t.g = g; t.b = b; t.a = a;
- },
- setColor: function(/*Array|String|Object*/ color){
-
-
-
-
-
-
-
-
- if(lang.isString(color)){
- Color.fromString(color, this);
- }else if(lang.isArray(color)){
- Color.fromArray(color, this);
- }else{
- this._set(color.r, color.g, color.b, color.a);
- if(!(color instanceof Color)){ this.sanitize(); }
- }
- return this;
- },
- sanitize: function(){
-
-
-
-
-
- return this;
- },
- toRgb: function(){
-
-
-
-
-
- var t = this;
- return [t.r, t.g, t.b];
- },
- toRgba: function(){
-
-
-
- var t = this;
- return [t.r, t.g, t.b, t.a];
- },
- toHex: function(){
-
-
-
-
- var arr = ArrayUtil.map(["r", "g", "b"], function(x){
- var s = this[x].toString(16);
- return s.length < 2 ? "0" + s : s;
- }, this);
- return "#" + arr.join("");
- },
- toCss: function(/*Boolean?*/ includeAlpha){
-
-
-
-
-
- var t = this, rgb = t.r + ", " + t.g + ", " + t.b;
- return (includeAlpha ? "rgba(" + rgb + ", " + t.a : "rgb(" + rgb) + ")";
- },
- toString: function(){
-
-
- return this.toCss(true);
- }
- });
- Color.blendColors = dojo.blendColors = function(
- /*dojo.Color*/ start,
- /*dojo.Color*/ end,
- /*Number*/ weight,
- /*dojo.Color?*/ obj
- ){
-
-
-
- var t = obj || new Color();
- ArrayUtil.forEach(["r", "g", "b", "a"], function(x){
- t[x] = start[x] + (end[x] - start[x]) * weight;
- if(x != "a"){ t[x] = Math.round(t[x]); }
- });
- return t.sanitize();
- };
- Color.fromRgb = dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
-
-
-
-
-
-
-
- var m = color.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
- return m && Color.fromArray(m[1].split(/\s*,\s*/), obj);
- };
- Color.fromHex = dojo.colorFromHex = function(/*String*/ color, /*dojo.Color?*/ obj){
-
-
-
-
-
-
-
-
-
-
-
-
-
- var t = obj || new Color(),
- bits = (color.length == 4) ? 4 : 8,
- mask = (1 << bits) - 1;
- color = Number("0x" + color.substr(1));
- if(isNaN(color)){
- return null;
- }
- ArrayUtil.forEach(["b", "g", "r"], function(x){
- var c = color & mask;
- color >>= bits;
- t[x] = bits == 4 ? 17 * c : c;
- });
- t.a = 1;
- return t;
- };
- Color.fromArray = dojo.colorFromArray = function(/*Array*/ a, /*dojo.Color?*/ obj){
-
-
-
-
-
-
-
- var t = obj || new Color();
- t._set(Number(a[0]), Number(a[1]), Number(a[2]), Number(a[3]));
- if(isNaN(t.a)){ t.a = 1; }
- return t.sanitize();
- };
- Color.fromString = dojo.colorFromString = function(/*String*/ str, /*dojo.Color?*/ obj){
-
-
-
-
-
-
-
-
-
-
- var a = Color.named[str];
- return a && Color.fromArray(a, obj) || Color.fromRgb(str, obj) || Color.fromHex(str, obj);
- };
- return Color;
- });
- },
- 'dojo/selector/_loader':function(){
- define(["../has", "require"],
- function(has, require){
- "use strict";
- var testDiv = document.createElement("div");
- has.add("dom-qsa2.1", !!testDiv.querySelectorAll);
- has.add("dom-qsa3", function(){
-
- try{
- testDiv.innerHTML = "<p class='TEST'></p>";
-
-
- return testDiv.querySelectorAll(".TEST:empty").length == 1;
- }catch(e){}
- });
- var fullEngine;
- var acme = "./acme", lite = "./lite";
- return {
- load: function(id, parentRequire, loaded, config){
- var req = require;
-
- id = id == "default" ? has("config-selectorEngine") || "css3" : id;
- id = id == "css2" || id == "lite" ? lite :
- id == "css2.1" ? has("dom-qsa2.1") ? lite : acme :
- id == "css3" ? has("dom-qsa3") ? lite : acme :
- id == "acme" ? acme : (req = parentRequire) && id;
- if(id.charAt(id.length-1) == '?'){
- id = id.substring(0,id.length - 1);
- var optionalLoad = true;
- }
-
- if(optionalLoad && (has("dom-compliant-qsa") || fullEngine)){
- return loaded(fullEngine);
- }
-
- req([id], function(engine){
- if(id != "./lite"){
- fullEngine = engine;
- }
- loaded(engine);
- });
- }
- };
- });
- },
- 'dojo/on':function(){
- define(["./has!dom-addeventlistener?:./aspect", "./_base/kernel", "./has"], function(aspect, dojo, has){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- "use strict";
- if(1){
- var major = window.ScriptEngineMajorVersion;
- has.add("jscript", major && (major() + ScriptEngineMinorVersion() / 10));
- has.add("event-orientationchange", has("touch") && !has("android"));
- has.add("event-focusin", function(global, doc, element){
- return 'onfocusin' in element;
- });
-
- if(has("touch")){
- has.add("touch-can-modify-event-delegate", function(){
-
-
-
-
- var EventDelegate = function(){};
- EventDelegate.prototype =
- document.createEvent("MouseEvents");
-
-
-
-
-
- try{
- var eventDelegate = new EventDelegate;
- eventDelegate.target = null;
- return eventDelegate.target === null;
- }catch(e){
- return false;
- }
- });
- }
- }
- var on = function(target, type, listener, dontFix){
- if(typeof target.on == "function" && typeof type != "function" && !target.nodeType){
-
- return target.on(type, listener);
- }
-
- return on.parse(target, type, listener, addListener, dontFix, this);
- };
- on.pausable = function(target, type, listener, dontFix){
-
-
-
-
-
- var paused;
- var signal = on(target, type, function(){
- if(!paused){
- return listener.apply(this, arguments);
- }
- }, dontFix);
- signal.pause = function(){
- paused = true;
- };
- signal.resume = function(){
- paused = false;
- };
- return signal;
- };
- on.once = function(target, type, listener, dontFix){
-
-
-
-
- var signal = on(target, type, function(){
-
- signal.remove();
-
- return listener.apply(this, arguments);
- });
- return signal;
- };
- on.parse = function(target, type, listener, addListener, dontFix, matchesTarget){
- if(type.call){
-
-
- return type.call(matchesTarget, target, listener);
- }
- if(type.indexOf(",") > -1){
-
- var events = type.split(/\s*,\s*/);
- var handles = [];
- var i = 0;
- var eventName;
- while(eventName = events[i++]){
- handles.push(addListener(target, eventName, listener, dontFix, matchesTarget));
- }
- handles.remove = function(){
- for(var i = 0; i < handles.length; i++){
- handles[i].remove();
- }
- };
- return handles;
- }
- return addListener(target, type, listener, dontFix, matchesTarget)
- };
- var touchEvents = /^touch/;
- function addListener(target, type, listener, dontFix, matchesTarget){
-
- var selector = type.match(/(.*):(.*)/);
-
- if(selector){
- type = selector[2];
- selector = selector[1];
-
- return on.selector(selector, type).call(matchesTarget, target, listener);
- }
-
- if(has("touch")){
- if(touchEvents.test(type)){
-
- listener = fixTouchListener(listener);
- }
- if(!has("event-orientationchange") && (type == "orientationchange")){
-
-
- type = "resize";
- target = window;
- listener = fixTouchListener(listener);
- }
- }
-
- if(target.addEventListener){
-
-
- var capture = type in captures;
- target.addEventListener(capture ? captures[type] : type, listener, capture);
-
- return {
- remove: function(){
- target.removeEventListener(type, listener, capture);
- }
- };
- }
- type = "on" + type;
- if(fixAttach && target.attachEvent){
- return fixAttach(target, type, listener);
- }
- throw new Error("Target must be an event emitter");
- }
- on.selector = function(selector, eventType, children){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return function(target, listener){
- var matchesTarget = this;
- var bubble = eventType.bubble;
- if(bubble){
-
- eventType = bubble;
- }else if(children !== false){
-
- children = true;
- }
- return on(target, eventType, function(event){
- var eventTarget = event.target;
-
- matchesTarget = matchesTarget && matchesTarget.matches ? matchesTarget : dojo.query;
-
- while(!matchesTarget.matches(eventTarget, selector, target)){
- if(eventTarget == target || !children || !(eventTarget = eventTarget.parentNode)){
- return;
- }
- }
- return listener.call(eventTarget, event);
- });
- };
- };
- function syntheticPreventDefault(){
- this.cancelable = false;
- }
- function syntheticStopPropagation(){
- this.bubbles = false;
- }
- var slice = [].slice,
- syntheticDispatch = on.emit = function(target, type, event){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var args = slice.call(arguments, 2);
- var method = "on" + type;
- if("parentNode" in target){
-
- var newEvent = args[0] = {};
- for(var i in event){
- newEvent[i] = event[i];
- }
- newEvent.preventDefault = syntheticPreventDefault;
- newEvent.stopPropagation = syntheticStopPropagation;
- newEvent.target = target;
- newEvent.type = type;
- event = newEvent;
- }
- do{
-
- target[method] && target[method].apply(target, args);
-
- }while(event && event.bubbles && (target = target.parentNode));
- return event && event.cancelable && event;
- };
- var captures = has("event-focusin") ? {} : {focusin: "focus", focusout: "blur"};
- if(has("dom-addeventlistener")){
- if(has("opera")){
- captures.keydown = "keypress";
- }
-
- on.emit = function(target, type, event){
- if(target.dispatchEvent && document.createEvent){
-
-
-
-
-
-
- var ownerDocument = target.ownerDocument || document;
- var nativeEvent = ownerDocument.createEvent("HTMLEvents");
- nativeEvent.initEvent(type, !!event.bubbles, !!event.cancelable);
-
- for(var i in event){
- var value = event[i];
- if(!(i in nativeEvent)){
- nativeEvent[i] = event[i];
- }
- }
- return target.dispatchEvent(nativeEvent) && nativeEvent;
- }
- return syntheticDispatch.apply(on, arguments);
- };
- }else{
-
- on._fixEvent = function(evt, sender){
-
-
-
-
-
-
-
- if(!evt){
- var w = sender && (sender.ownerDocument || sender.document || sender).parentWindow || window;
- evt = w.event;
- }
- if(!evt){return(evt);}
- if(!evt.target){
- evt.target = evt.srcElement;
- evt.currentTarget = (sender || evt.srcElement);
- if(evt.type == "mouseover"){
- evt.relatedTarget = evt.fromElement;
- }
- if(evt.type == "mouseout"){
- evt.relatedTarget = evt.toElement;
- }
- if(!evt.stopPropagation){
- evt.stopPropagation = stopPropagation;
- evt.preventDefault = preventDefault;
- }
- switch(evt.type){
- case "keypress":
- var c = ("charCode" in evt ? evt.charCode : evt.keyCode);
- if (c==10){
-
- c=0;
- evt.keyCode = 13;
- }else if(c==13||c==27){
- c=0;
- }else if(c==3){
- c=99;
- }
-
-
- evt.charCode = c;
- _setKeyChar(evt);
- break;
- }
- }
- return evt;
- };
- var IESignal = function(handle){
- this.handle = handle;
- };
- IESignal.prototype.remove = function(){
- delete _dojoIEListeners_[this.handle];
- };
- var fixListener = function(listener){
-
- return function(evt){
- evt = on._fixEvent(evt, this);
- return listener.call(this, evt);
- }
- }
- var fixAttach = function(target, type, listener){
- listener = fixListener(listener);
- if(((target.ownerDocument ? target.ownerDocument.parentWindow : target.parentWindow || target.window || window) != top ||
- has("jscript") < 5.8) &&
- !has("config-_allow_leaks")){
-
-
- if(typeof _dojoIEListeners_ == "undefined"){
- _dojoIEListeners_ = [];
- }
- var emiter = target[type];
- if(!emiter || !emiter.listeners){
- var oldListener = emiter;
- target[type] = emiter = Function('event', 'var callee = arguments.callee; for(var i = 0; i<callee.listeners.length; i++){var listener = _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}');
- emiter.listeners = [];
- emiter.global = this;
- if(oldListener){
- emiter.listeners.push(_dojoIEListeners_.push(oldListener) - 1);
- }
- }
- var handle;
- emiter.listeners.push(handle = (emiter.global._dojoIEListeners_.push(listener) - 1));
- return new IESignal(handle);
- }
- return aspect.after(target, type, listener, true);
- };
- var _setKeyChar = function(evt){
- evt.keyChar = evt.charCode ? String.fromCharCode(evt.charCode) : '';
- evt.charOrCode = evt.keyChar || evt.keyCode;
- };
-
- var stopPropagation = function(){
- this.cancelBubble = true;
- };
- var preventDefault = on._preventDefault = function(){
-
-
-
-
-
-
- this.bubbledKeyCode = this.keyCode;
- if(this.ctrlKey){
- try{
-
-
- this.keyCode = 0;
- }catch(e){
- }
- }
- this.returnValue = false;
- };
- }
- if(has("touch")){
- var EventDelegate = function (){};
- var windowOrientation = window.orientation;
- var fixTouchListener = function(listener){
- return function(originalEvent){
-
-
-
-
-
- var event = originalEvent.corrected;
- if(!event){
- var type = originalEvent.type;
- try{
- delete originalEvent.type;
- }catch(e){}
- if(originalEvent.type){
-
-
- if(has("touch-can-modify-event-delegate")){
-
- EventDelegate.prototype = originalEvent;
- event = new EventDelegate;
- }else{
-
-
- event = {};
- for(var name in originalEvent){
- event[name] = originalEvent[name];
- }
- }
-
- event.preventDefault = function(){
- originalEvent.preventDefault();
- };
- event.stopPropagation = function(){
- originalEvent.stopPropagation();
- };
- }else{
-
- event = originalEvent;
- event.type = type;
- }
- originalEvent.corrected = event;
- if(type == 'resize'){
- if(windowOrientation == window.orientation){
- return null;
- }
- windowOrientation = window.orientation;
- event.type = "orientationchange";
- return listener.call(this, event);
- }
-
- if(!("rotation" in event)){
- event.rotation = 0;
- event.scale = 1;
- }
-
- var firstChangeTouch = event.changedTouches[0];
- for(var i in firstChangeTouch){
- delete event[i];
- event[i] = firstChangeTouch[i];
- }
- }
- return listener.call(this, event);
- };
- };
- }
- return on;
- });
- },
- 'dojo/_base/sniff':function(){
- define(["./kernel", "../has"], function(dojo, has){
-
-
-
-
- if(!1){
- return has;
- }
- dojo.isBrowser = true,
- dojo._name = "browser";
- var hasAdd = has.add,
- n = navigator,
- dua = n.userAgent,
- dav = n.appVersion,
- tv = parseFloat(dav),
- isOpera,
- isAIR,
- isKhtml,
- isWebKit,
- isChrome,
- isMac,
- isSafari,
- isMozilla ,
- isMoz,
- isIE,
- isFF,
- isQuirks,
- isIos,
- isAndroid,
- isWii;
-
-
- if(dua.indexOf("AdobeAIR") >= 0){ isAIR = 1; }
- isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : 0;
- isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined;
- isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined;
- isMac = dav.indexOf("Macintosh") >= 0;
- isIos = /iPhone|iPod|iPad/.test(dua);
- isAndroid = parseFloat(dua.split("Android ")[1]) || undefined;
- isWii = typeof opera != "undefined" && opera.wiiremote;
- isTrident = parseFloat(dav.split("Trident/")[1]) || undefined;
-
-
-
- var index = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0);
- if(index && !isChrome){
-
-
-
- isSafari = parseFloat(dav.split("Version/")[1]);
- if(!isSafari || parseFloat(dav.substr(index + 7)) <= 419.3){
- isSafari = 2;
- }
- }
- if (!has("dojo-webkit")) {
- if(dua.indexOf("Opera") >= 0){
- isOpera = tv;
-
-
- if(isOpera >= 9.8){
- isOpera = parseFloat(dua.split("Version/")[1]) || tv;
- }
- }
- if(dua.indexOf("Gecko") >= 0 && !isKhtml && !isWebKit && !isTrident){
- isMozilla = isMoz = tv;
- }
- if(isMoz){
-
- isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1]) || undefined;
- }
- if(document.all && !isOpera){
- isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
-
-
-
-
-
-
- var mode = document.documentMode;
- if(mode && mode != 5 && Math.floor(isIE) != mode){
- isIE = mode;
- }
- }
- }
- isQuirks = document.compatMode == "BackCompat";
- hasAdd("opera", dojo.isOpera = isOpera);
- hasAdd("air", dojo.isAIR = isAIR);
- hasAdd("khtml", dojo.isKhtml = isKhtml);
- hasAdd("webkit", dojo.isWebKit = isWebKit);
- hasAdd("chrome", dojo.isChrome = isChrome);
- hasAdd("mac", dojo.isMac = isMac );
- hasAdd("safari", dojo.isSafari = isSafari);
- hasAdd("mozilla", dojo.isMozilla = dojo.isMoz = isMozilla );
- hasAdd("ie", dojo.isIE = isIE );
- hasAdd("ff", dojo.isFF = isFF);
- hasAdd("quirks", dojo.isQuirks = isQuirks);
- hasAdd("ios", dojo.isIos = isIos);
- hasAdd("android", dojo.isAndroid = isAndroid);
- hasAdd("trident", dojo.isTrident = isTrident);
- dojo.locale = dojo.locale || (isIE ? n.userLanguage : n.language).toLowerCase();
- return has;
- });
- },
- 'dojo/_base/array':function(){
- define(["./kernel", "../has", "./lang"], function(dojo, has, lang){
-
-
-
-
-
-
- var cache = {}, u, array;
- function clearCache(){
- cache = {};
- }
- function buildFn(fn){
- return cache[fn] = new Function("item", "index", "array", fn);
- }
-
-
- function everyOrSome(some){
- var every = !some;
- return function(a, fn, o){
- var i = 0, l = a && a.length || 0, result;
- if(l && typeof a == "string") a = a.split("");
- if(typeof fn == "string") fn = cache[fn] || buildFn(fn);
- if(o){
- for(; i < l; ++i){
- result = !fn.call(o, a[i], i, a);
- if(some ^ result){
- return !result;
- }
- }
- }else{
- for(; i < l; ++i){
- result = !fn(a[i], i, a);
- if(some ^ result){
- return !result;
- }
- }
- }
- return every;
- }
- }
-
-
- function index(up){
- var delta = 1, lOver = 0, uOver = 0;
- if(!up){
- delta = lOver = uOver = -1;
- }
- return function(a, x, from, last){
- if(last && delta > 0){
-
- return array.lastIndexOf(a, x, from);
- }
- var l = a && a.length || 0, end = up ? l + uOver : lOver, i;
- if(from === u){
- i = up ? lOver : l + uOver;
- }else{
- if(from < 0){
- i = l + from;
- if(i < 0){
- i = lOver;
- }
- }else{
- i = from >= l ? l + uOver : from;
- }
- }
- if(l && typeof a == "string") a = a.split("");
- for(; i != end; i += delta){
- if(a[i] == x){
- return i;
- }
- }
- return -1;
- }
- }
-
- function forEach(a, fn, o){
- var i = 0, l = a && a.length || 0;
- if(l && typeof a == "string") a = a.split("");
- if(typeof fn == "string") fn = cache[fn] || buildFn(fn);
- if(o){
- for(; i < l; ++i){
- fn.call(o, a[i], i, a);
- }
- }else{
- for(; i < l; ++i){
- fn(a[i], i, a);
- }
- }
- }
- function map(a, fn, o, Ctr){
-
- var i = 0, l = a && a.length || 0, out = new (Ctr || Array)(l);
- if(l && typeof a == "string") a = a.split("");
- if(typeof fn == "string") fn = cache[fn] || buildFn(fn);
- if(o){
- for(; i < l; ++i){
- out[i] = fn.call(o, a[i], i, a);
- }
- }else{
- for(; i < l; ++i){
- out[i] = fn(a[i], i, a);
- }
- }
- return out;
- }
- function filter(a, fn, o){
-
- var i = 0, l = a && a.length || 0, out = [], value;
- if(l && typeof a == "string") a = a.split("");
- if(typeof fn == "string") fn = cache[fn] || buildFn(fn);
- if(o){
- for(; i < l; ++i){
- value = a[i];
- if(fn.call(o, value, i, a)){
- out.push(value);
- }
- }
- }else{
- for(; i < l; ++i){
- value = a[i];
- if(fn(value, i, a)){
- out.push(value);
- }
- }
- }
- return out;
- }
- array = {
- every: everyOrSome(false),
- some: everyOrSome(true),
- indexOf: index(true),
- lastIndexOf: index(false),
- forEach: forEach,
- map: map,
- filter: filter,
- clearCache: clearCache
- };
- 1 && lang.mixin(dojo, array);
-
- return array;
- });
- },
- 'dojo/_base/json':function(){
- define(["./kernel", "../json"], function(dojo, json){
-
-
-
-
- dojo.fromJson = function(/*String*/ js){
-
-
-
-
-
-
-
-
-
-
-
- return eval("(" + js + ")");
- };
- dojo._escapeString = json.stringify;
- dojo.toJsonIndentStr = "\t";
- dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return json.stringify(it, function(key, value){
- if(value){
- var tf = value.__json__||value.json;
- if(typeof tf == "function"){
- return tf.call(value);
- }
- }
- return value;
- }, prettyPrint && dojo.toJsonIndentStr);
- };
- return dojo;
- });
- },
- 'dojo/_base/window':function(){
- define("dojo/_base/window", ["./kernel", "../has", "./sniff"], function(dojo, has){
-
-
-
-
- dojo.doc = dojo.global["document"] || null;
- dojo.body = function(){
-
-
-
-
-
-
-
- return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0];
- };
- dojo.setContext = function(/*Object*/globalObject, /*DocumentElement*/globalDocument){
-
-
-
-
-
-
- dojo.global = ret.global = globalObject;
- dojo.doc = ret.doc = globalDocument;
- };
- dojo.withGlobal = function( /*Object*/globalObject,
- /*Function*/callback,
- /*Object?*/thisObject,
- /*Array?*/cbArguments){
-
-
-
-
-
-
-
-
-
- var oldGlob = dojo.global;
- try{
- dojo.global = ret.global = globalObject;
- return dojo.withDoc.call(null, globalObject.document, callback, thisObject, cbArguments);
- }finally{
- dojo.global = ret.global = oldGlob;
- }
- };
- dojo.withDoc = function( /*DocumentElement*/documentObject,
- /*Function*/callback,
- /*Object?*/thisObject,
- /*Array?*/cbArguments){
-
-
-
-
-
-
-
- var oldDoc = dojo.doc,
- oldQ = dojo.isQuirks,
- oldIE = dojo.isIE, isIE, mode, pwin;
- try{
- dojo.doc = ret.doc = documentObject;
-
- dojo.isQuirks = has.add("quirks", dojo.doc.compatMode == "BackCompat", true, true);
- if(has("ie")){
- if((pwin = documentObject.parentWindow) && pwin.navigator){
-
-
-
- isIE = parseFloat(pwin.navigator.appVersion.split("MSIE ")[1]) || undefined;
- mode = documentObject.documentMode;
- if(mode && mode != 5 && Math.floor(isIE) != mode){
- isIE = mode;
- }
- dojo.isIE = has.add("ie", isIE, true, true);
- }
- }
- if(thisObject && typeof callback == "string"){
- callback = thisObject[callback];
- }
- return callback.apply(thisObject, cbArguments || []);
- }finally{
- dojo.doc = ret.doc = oldDoc;
- dojo.isQuirks = has.add("quirks", oldQ, true, true);
- dojo.isIE = has.add("ie", oldIE, true, true);
- }
- };
- var ret = {
- global: dojo.global,
- doc: dojo.doc,
- body: dojo.body,
- setContext: dojo.setContext,
- withGlobal: dojo.withGlobal,
- withDoc: dojo.withDoc
- };
- return ret;
- });
- },
- 'dojo/dom-class':function(){
- define(["./_base/lang", "./_base/array", "./dom"], function(lang, array, dom){
-
-
-
-
- var className = "className";
-
-
-
-
-
-
-
-
-
- var cls,
- spaces = /\s+/, a1 = [""];
- function str2array(s){
- if(typeof s == "string" || s instanceof String){
- if(s && !spaces.test(s)){
- a1[0] = s;
- return a1;
- }
- var a = s.split(spaces);
- if(a.length && !a[0]){
- a.shift();
- }
- if(a.length && !a[a.length - 1]){
- a.pop();
- }
- return a;
- }
-
- if(!s){
- return [];
- }
- return array.filter(s, function(x){ return x; });
- }
-
-
- var fakeNode = {};
- cls = {
- contains: function containsClass(/*DomNode|String*/node, /*String*/classStr){
- return ((" " + dom.byId(node)[className] + " ").indexOf(" " + classStr + " ") >= 0);
- },
- add: function addClass(/*DomNode|String*/node, /*String|Array*/classStr){
- node = dom.byId(node);
- classStr = str2array(classStr);
- var cls = node[className], oldLen;
- cls = cls ? " " + cls + " " : " ";
- oldLen = cls.length;
- for(var i = 0, len = classStr.length, c; i < len; ++i){
- c = classStr[i];
- if(c && cls.indexOf(" " + c + " ") < 0){
- cls += c + " ";
- }
- }
- if(oldLen < cls.length){
- node[className] = cls.substr(1, cls.length - 2);
- }
- },
- remove: function removeClass(/*DomNode|String*/node, /*String|Array?*/classStr){
- node = dom.byId(node);
- var cls;
- if(classStr !== undefined){
- classStr = str2array(classStr);
- cls = " " + node[className] + " ";
- for(var i = 0, len = classStr.length; i < len; ++i){
- cls = cls.replace(" " + classStr[i] + " ", " ");
- }
- cls = lang.trim(cls);
- }else{
- cls = "";
- }
- if(node[className] != cls){ node[className] = cls; }
- },
- replace: function replaceClass(/*DomNode|String*/node, /*String|Array*/addClassStr, /*String|Array?*/removeClassStr){
- node = dom.byId(node);
- fakeNode[className] = node[className];
- cls.remove(fakeNode, removeClassStr);
- cls.add(fakeNode, addClassStr);
- if(node[className] !== fakeNode[className]){
- node[className] = fakeNode[className];
- }
- },
- toggle: function toggleClass(/*DomNode|String*/node, /*String|Array*/classStr, /*Boolean?*/condition){
- node = dom.byId(node);
- if(condition === undefined){
- classStr = str2array(classStr);
- for(var i = 0, len = classStr.length, c; i < len; ++i){
- c = classStr[i];
- cls[cls.contains(node, c) ? "remove" : "add"](node, c);
- }
- }else{
- cls[condition ? "add" : "remove"](node, classStr);
- }
- return condition;
- }
- };
- return cls;
- });
- },
- 'dojo/_base/config':function(){
- define(["../has", "require"], function(has, require){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var result = {};
- if(1){
-
- var src = require.rawConfig, p;
- for(p in src){
- result[p] = src[p];
- }
- }else{
- var global = (function () { return this; })();
- var adviseHas = function(featureSet, prefix, booting){
- for(p in featureSet){
- p!="has" && has.add(prefix + p, featureSet[p], 0, booting);
- }
- };
- result = 1 ?
-
- require.rawConfig :
-
- global.dojoConfig || global.djConfig || {};
- adviseHas(result, "config", 1);
- adviseHas(result.has, "", 1);
- }
- return result;
- });
- },
- 'dojo/_base/event':function(){
- define("dojo/_base/event", ["./kernel", "../on", "../has", "../dom-geometry"], function(dojo, on, has, dom){
-
-
-
-
- if(on._fixEvent){
- var fixEvent = on._fixEvent;
- on._fixEvent = function(evt, se){
-
- evt = fixEvent(evt, se);
- if(evt){
- dom.normalizeEvent(evt);
- }
- return evt;
- };
- }
- dojo.fixEvent = function(/*Event*/ evt, /*DOMNode*/ sender){
-
-
-
-
-
-
-
- if(on._fixEvent){
- return on._fixEvent(evt, sender);
- }
- return evt;
- };
-
- dojo.stopEvent = function(/*Event*/ evt){
-
-
-
-
-
- if(has("dom-addeventlistener") || (evt && evt.preventDefault)){
- evt.preventDefault();
- evt.stopPropagation();
- }else{
- evt = evt || window.event;
- evt.cancelBubble = true;
- on._preventDefault.call(evt);
- }
- };
- return {
- fix: dojo.fixEvent,
- stop: dojo.stopEvent
- };
- });
- },
- 'dojo/main':function(){
- define([
- "./_base/kernel",
- "./has",
- "require",
- "./_base/sniff",
- "./_base/lang",
- "./_base/array",
- "./ready",
- "./_base/declare",
- "./_base/connect",
- "./_base/Deferred",
- "./_base/json",
- "./_base/Color",
- "./has!dojo-firebug?./_firebug/firebug",
- "./_base/browser",
- "./_base/loader"], function(dojo, has, require, sniff, lang, array, ready){
-
-
-
-
-
-
-
-
-
- if(dojo.config.isDebug){
- require(["./_firebug/firebug"]);
- }
-
- true || has.add("dojo-config-require", 1);
- if(1){
- var deps= dojo.config.require;
- if(deps){
-
- deps= array.map(lang.isArray(deps) ? deps : [deps], function(item){ return item.replace(/\./g, "/"); });
- if(dojo.isAsync){
- require(deps);
- }else{
-
-
-
- ready(1, function(){require(deps);});
- }
- }
- }
- return dojo;
- });
- },
- 'dojo/ready':function(){
- define("dojo/ready", ["./_base/kernel", "./has", "require", "./domReady", "./_base/lang"], function(dojo, has, require, domReady, lang) {
-
-
-
-
-
-
-
- var
-
- isDomReady = 0,
-
- loadQ = [],
-
- onLoadRecursiveGuard = 0,
- handleDomReady = function(){
- isDomReady = 1;
- dojo._postLoad = dojo.config.afterOnLoad = true;
- onEvent();
- },
- onEvent = function(){
-
-
-
-
-
-
-
-
- if(onLoadRecursiveGuard){
- return;
- }
- onLoadRecursiveGuard = 1;
-
-
-
-
-
- while(isDomReady && (!domReady || domReady._Q.length == 0) && require.idle() && loadQ.length){
- var f = loadQ.shift();
- try{
- f();
- }catch(e){
-
- }
- }
- onLoadRecursiveGuard = 0;
- };
-
-
- require.on("idle", onEvent);
- if(domReady){
- domReady._onQEmpty = onEvent;
- }
- var ready = dojo.ready = dojo.addOnLoad = function(priority, context, callback){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var hitchArgs = lang._toArray(arguments);
- if(typeof priority != "number"){
- callback = context;
- context = priority;
- priority = 1000;
- }else{
- hitchArgs.shift();
- }
- callback = callback ?
- lang.hitch.apply(dojo, hitchArgs) :
- function(){
- context();
- };
- callback.priority = priority;
- for(var i = 0; i < loadQ.length && priority >= loadQ[i].priority; i++){}
- loadQ.splice(i, 0, callback);
- onEvent();
- };
- true || has.add("dojo-config-addOnLoad", 1);
- if(1){
- var dca = dojo.config.addOnLoad;
- if(dca){
- ready[(lang.isArray(dca) ? "apply" : "call")](dojo, dca);
- }
- }
- if(1 && dojo.config.parseOnLoad && !dojo.isAsync){
- ready(99, function(){
- if(!dojo.parser){
- dojo.deprecated("Add explicit require(['dojo/parser']);", "", "2.0");
- require(["dojo/parser"]);
- }
- });
- }
- if(domReady){
- domReady(handleDomReady);
- }else{
- handleDomReady();
- }
- return ready;
- });
- },
- 'dojo/aspect':function(){
- define("dojo/aspect", [], function(){
- "use strict";
- var nextId = 0;
- function advise(dispatcher, type, advice, receiveArguments){
- var previous = dispatcher[type];
- var around = type == "around";
- var signal;
- if(around){
- var advised = advice(function(){
- return previous.advice(this, arguments);
- });
- signal = {
- remove: function(){
- if(advised){
- advised = dispatcher = advice = null;
- }
- },
- advice: function(target, args){
- return advised ?
- advised.apply(target, args) :
- previous.advice(target, args);
- }
- };
- }else{
-
- signal = {
- remove: function(){
- if(signal.advice){
- var previous = signal.previous;
- var next = signal.next;
- if(!next && !previous){
- delete dispatcher[type];
- }else{
- if(previous){
- previous.next = next;
- }else{
- dispatcher[type] = next;
- }
- if(next){
- next.previous = previous;
- }
- }
-
- dispatcher = advice = signal.advice = null;
- }
- },
- id: nextId++,
- advice: advice,
- receiveArguments: receiveArguments
- };
- }
- if(previous && !around){
- if(type == "after"){
-
-
- while(previous.next && (previous = previous.next)){}
- previous.next = signal;
- signal.previous = previous;
- }else if(type == "before"){
-
- dispatcher[type] = signal;
- signal.next = previous;
- previous.previous = signal;
- }
- }else{
-
- dispatcher[type] = signal;
- }
- return signal;
- }
- function aspect(type){
- return function(target, methodName, advice, receiveArguments){
- var existing = target[methodName], dispatcher;
- if(!existing || existing.target != target){
-
- target[methodName] = dispatcher = function(){
- var executionId = nextId;
-
- var args = arguments;
- var before = dispatcher.before;
- while(before){
- args = before.advice.apply(this, args) || args;
- before = before.next;
- }
-
- if(dispatcher.around){
- var results = dispatcher.around.advice(this, args);
- }
-
- var after = dispatcher.after;
- while(after && after.id < executionId){
- results = after.receiveArguments ? after.advice.apply(this, args) || results :
- after.advice.call(this, results);
- after = after.next;
- }
- return results;
- };
- if(existing){
- dispatcher.around = {advice: function(target, args){
- return existing.apply(target, args);
- }};
- }
- dispatcher.target = target;
- }
- var results = advise((dispatcher || existing), type, advice, receiveArguments);
- advice = null;
- return results;
- };
- }
- return {
- before: aspect("before"),
- around: aspect("around"),
- after: aspect("after")
- };
- });
- },
- 'dojo/_base/connect':function(){
- define(["./kernel", "../on", "../topic", "../aspect", "./event", "../mouse", "./sniff", "./lang", "../keys"], function(kernel, on, hub, aspect, eventModule, mouse, has, lang){
- has.add("events-keypress-typed", function(){
- var testKeyEvent = {charCode: 0};
- try{
- testKeyEvent = document.createEvent("KeyboardEvent");
- (testKeyEvent.initKeyboardEvent || testKeyEvent.initKeyEvent).call(testKeyEvent, "keypress", true, true, null, false, false, false, false, 9, 3);
- }catch(e){}
- return testKeyEvent.charCode == 0 && !has("opera");
- });
- function connect_(obj, event, context, method, dontFix){
- method = lang.hitch(context, method);
- if(!obj || !(obj.addEventListener || obj.attachEvent)){
-
-
- return aspect.after(obj || kernel.global, event, method, true);
- }
- if(typeof event == "string" && event.substring(0, 2) == "on"){
- event = event.substring(2);
- }
- if(!obj){
- obj = kernel.global;
- }
- if(!dontFix){
- switch(event){
-
- case "keypress":
- event = keypress;
- break;
- case "mouseenter":
- event = mouse.enter;
- break;
- case "mouseleave":
- event = mouse.leave;
- break;
- }
- }
- return on(obj, event, method, dontFix);
- }
- var _punctMap = {
- 106:42,
- 111:47,
- 186:59,
- 187:43,
- 188:44,
- 189:45,
- 190:46,
- 191:47,
- 192:96,
- 219:91,
- 220:92,
- 221:93,
- 222:39,
- 229:113
- };
- var evtCopyKey = has("mac") ? "metaKey" : "ctrlKey";
- var _synthesizeEvent = function(evt, props){
- var faux = lang.mixin({}, evt, props);
- setKeyChar(faux);
-
-
-
- faux.preventDefault = function(){ evt.preventDefault(); };
- faux.stopPropagation = function(){ evt.stopPropagation(); };
- return faux;
- };
- function setKeyChar(evt){
- evt.keyChar = evt.charCode ? String.fromCharCode(evt.charCode) : '';
- evt.charOrCode = evt.keyChar || evt.keyCode;
- }
- var keypress;
- if(has("events-keypress-typed")){
-
- var _trySetKeyCode = function(e, code){
- try{
-
-
- return (e.keyCode = code);
- }catch(e){
- return 0;
- }
- };
- keypress = function(object, listener){
- var keydownSignal = on(object, "keydown", function(evt){
-
- var k=evt.keyCode;
-
-
- var unprintable = (k!=13 || (has("ie") >= 9 && !has("quirks"))) && k!=32 && (k!=27||!has("ie")) && (k<48||k>90) && (k<96||k>111) && (k<186||k>192) && (k<219||k>222) && k!=229;
-
- if(unprintable||evt.ctrlKey){
- var c = unprintable ? 0 : k;
- if(evt.ctrlKey){
- if(k==3 || k==13){
- return listener.call(evt.currentTarget, evt);
- }else if(c>95 && c<106){
- c -= 48;
- }else if((!evt.shiftKey)&&(c>=65&&c<=90)){
- c += 32;
- }else{
- c = _punctMap[c] || c;
- }
- }
-
- var faux = _synthesizeEvent(evt, {type: 'keypress', faux: true, charCode: c});
- listener.call(evt.currentTarget, faux);
- if(has("ie")){
- _trySetKeyCode(evt, faux.keyCode);
- }
- }
- });
- var keypressSignal = on(object, "keypress", function(evt){
- var c = evt.charCode;
- c = c>=32 ? c : 0;
- evt = _synthesizeEvent(evt, {charCode: c, faux: true});
- return listener.call(this, evt);
- });
- return {
- remove: function(){
- keydownSignal.remove();
- keypressSignal.remove();
- }
- };
- };
- }else{
- if(has("opera")){
- keypress = function(object, listener){
- return on(object, "keypress", function(evt){
- var c = evt.which;
- if(c==3){
- c=99;
- }
-
-
- c = c<32 && !evt.shiftKey ? 0 : c;
- if(evt.ctrlKey && !evt.shiftKey && c>=65 && c<=90){
-
- c += 32;
- }
- return listener.call(this, _synthesizeEvent(evt, { charCode: c }));
- });
- };
- }else{
- keypress = function(object, listener){
- return on(object, "keypress", function(evt){
- setKeyChar(evt);
- return listener.call(this, evt);
- });
- };
- }
- }
- var connect = {
- _keypress:keypress,
- connect:function(obj, event, context, method, dontFix){
-
- var a=arguments, args=[], i=0;
-
- args.push(typeof a[0] == "string" ? null : a[i++], a[i++]);
-
- var a1 = a[i+1];
- args.push(typeof a1 == "string" || typeof a1 == "function" ? a[i++] : null, a[i++]);
-
- for(var l=a.length; i<l; i++){ args.push(a[i]); }
- return connect_.apply(this, args);
- },
- disconnect:function(handle){
- if(handle){
- handle.remove();
- }
- },
- subscribe:function(topic, context, method){
- return hub.subscribe(topic, lang.hitch(context, method));
- },
- publish:function(topic, args){
- return hub.publish.apply(hub, [topic].concat(args));
- },
- connectPublisher:function(topic, obj, event){
- var pf = function(){ connect.publish(topic, arguments); };
- return event ? connect.connect(obj, event, pf) : connect.connect(obj, pf);
- },
- isCopyKey: function(e){
- return e[evtCopyKey];
- }
- };
- connect.unsubscribe = connect.disconnect;
- 1 && lang.mixin(kernel, connect);
- return connect;
- });
- }}});
- (function(){
-
- var require = this.require;
-
- require({cache:{}});
- !require.async && require(["dojo"]);
- require.boot && require.apply(null, require.boot);
- })();
|