| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188511895119051191511925119351194511955119651197511985119951200512015120251203512045120551206512075120851209512105121151212512135121451215512165121751218512195122051221512225122351224512255122651227512285122951230512315123251233512345123551236512375123851239512405124151242512435124451245512465124751248512495125051251512525125351254512555125651257512585125951260512615126251263512645126551266512675126851269512705127151272512735127451275512765127751278512795128051281512825128351284512855128651287512885128951290512915129251293512945129551296512975129851299513005130151302513035130451305513065130751308513095131051311513125131351314513155131651317513185131951320513215132251323513245132551326513275132851329513305133151332513335133451335513365133751338513395134051341513425134351344513455134651347513485134951350513515135251353513545135551356513575135851359513605136151362513635136451365513665136751368513695137051371513725137351374513755137651377513785137951380513815138251383513845138551386513875138851389513905139151392513935139451395513965139751398513995140051401514025140351404514055140651407514085140951410514115141251413514145141551416514175141851419514205142151422514235142451425514265142751428514295143051431514325143351434514355143651437514385143951440514415144251443514445144551446514475144851449514505145151452514535145451455514565145751458514595146051461514625146351464514655146651467514685146951470514715147251473514745147551476514775147851479514805148151482514835148451485514865148751488514895149051491514925149351494514955149651497514985149951500515015150251503515045150551506515075150851509515105151151512515135151451515515165151751518515195152051521515225152351524515255152651527515285152951530515315153251533515345153551536515375153851539515405154151542515435154451545515465154751548515495155051551515525155351554515555155651557515585155951560515615156251563515645156551566515675156851569515705157151572515735157451575515765157751578515795158051581515825158351584515855158651587515885158951590515915159251593515945159551596515975159851599516005160151602516035160451605516065160751608516095161051611516125161351614516155161651617516185161951620516215162251623516245162551626516275162851629516305163151632516335163451635516365163751638516395164051641516425164351644516455164651647516485164951650516515165251653516545165551656516575165851659516605166151662516635166451665516665166751668516695167051671516725167351674516755167651677516785167951680516815168251683516845168551686516875168851689516905169151692516935169451695516965169751698516995170051701517025170351704517055170651707517085170951710517115171251713517145171551716517175171851719517205172151722517235172451725517265172751728517295173051731517325173351734517355173651737517385173951740517415174251743517445174551746517475174851749517505175151752517535175451755517565175751758517595176051761517625176351764517655176651767517685176951770517715177251773517745177551776517775177851779517805178151782517835178451785517865178751788517895179051791517925179351794517955179651797517985179951800518015180251803518045180551806518075180851809518105181151812518135181451815518165181751818518195182051821518225182351824518255182651827518285182951830518315183251833518345183551836518375183851839518405184151842518435184451845518465184751848518495185051851518525185351854518555185651857518585185951860518615186251863518645186551866518675186851869518705187151872518735187451875518765187751878518795188051881518825188351884518855188651887518885188951890518915189251893518945189551896518975189851899519005190151902519035190451905519065190751908519095191051911519125191351914519155191651917519185191951920519215192251923519245192551926519275192851929519305193151932519335193451935519365193751938519395194051941519425194351944519455194651947519485194951950519515195251953519545195551956519575195851959519605196151962519635196451965519665196751968519695197051971519725197351974519755197651977519785197951980519815198251983519845198551986519875198851989519905199151992519935199451995519965199751998519995200052001520025200352004520055200652007520085200952010520115201252013520145201552016520175201852019520205202152022520235202452025520265202752028520295203052031520325203352034520355203652037520385203952040520415204252043520445204552046520475204852049520505205152052520535205452055520565205752058520595206052061520625206352064520655206652067520685206952070520715207252073520745207552076520775207852079520805208152082520835208452085520865208752088520895209052091520925209352094520955209652097520985209952100521015210252103521045210552106521075210852109521105211152112521135211452115521165211752118521195212052121521225212352124521255212652127521285212952130521315213252133521345213552136521375213852139521405214152142521435214452145521465214752148521495215052151521525215352154521555215652157521585215952160521615216252163521645216552166521675216852169521705217152172521735217452175521765217752178521795218052181521825218352184521855218652187521885218952190521915219252193521945219552196521975219852199522005220152202522035220452205522065220752208522095221052211522125221352214522155221652217522185221952220522215222252223522245222552226522275222852229522305223152232522335223452235522365223752238522395224052241522425224352244522455224652247522485224952250522515225252253522545225552256522575225852259522605226152262522635226452265522665226752268522695227052271522725227352274522755227652277522785227952280522815228252283522845228552286522875228852289522905229152292522935229452295522965229752298522995230052301523025230352304523055230652307523085230952310523115231252313523145231552316523175231852319523205232152322523235232452325523265232752328523295233052331523325233352334523355233652337523385233952340523415234252343523445234552346523475234852349523505235152352523535235452355523565235752358523595236052361523625236352364523655236652367523685236952370523715237252373523745237552376523775237852379523805238152382523835238452385523865238752388523895239052391523925239352394523955239652397523985239952400524015240252403524045240552406524075240852409524105241152412524135241452415524165241752418524195242052421524225242352424524255242652427524285242952430524315243252433524345243552436524375243852439524405244152442524435244452445524465244752448524495245052451524525245352454524555245652457524585245952460524615246252463524645246552466524675246852469524705247152472524735247452475524765247752478524795248052481524825248352484524855248652487524885248952490524915249252493524945249552496524975249852499525005250152502525035250452505525065250752508525095251052511525125251352514525155251652517525185251952520525215252252523525245252552526525275252852529525305253152532525335253452535525365253752538525395254052541525425254352544525455254652547525485254952550525515255252553525545255552556525575255852559525605256152562525635256452565525665256752568525695257052571525725257352574525755257652577525785257952580525815258252583525845258552586525875258852589525905259152592525935259452595525965259752598525995260052601526025260352604526055260652607526085260952610526115261252613526145261552616526175261852619526205262152622526235262452625526265262752628526295263052631526325263352634526355263652637526385263952640526415264252643526445264552646526475264852649526505265152652526535265452655526565265752658526595266052661526625266352664526655266652667526685266952670526715267252673526745267552676526775267852679526805268152682526835268452685526865268752688526895269052691526925269352694526955269652697526985269952700527015270252703527045270552706527075270852709527105271152712527135271452715527165271752718527195272052721527225272352724527255272652727527285272952730527315273252733527345273552736527375273852739527405274152742527435274452745527465274752748527495275052751527525275352754527555275652757527585275952760527615276252763527645276552766527675276852769527705277152772527735277452775527765277752778527795278052781527825278352784527855278652787527885278952790527915279252793527945279552796527975279852799528005280152802528035280452805528065280752808528095281052811528125281352814528155281652817528185281952820528215282252823528245282552826528275282852829528305283152832528335283452835528365283752838528395284052841528425284352844528455284652847528485284952850528515285252853528545285552856528575285852859528605286152862528635286452865528665286752868528695287052871528725287352874528755287652877528785287952880528815288252883528845288552886528875288852889528905289152892528935289452895528965289752898528995290052901529025290352904529055290652907529085290952910529115291252913529145291552916529175291852919529205292152922529235292452925529265292752928529295293052931529325293352934529355293652937529385293952940529415294252943529445294552946529475294852949529505295152952529535295452955529565295752958529595296052961529625296352964529655296652967529685296952970529715297252973529745297552976529775297852979529805298152982529835298452985529865298752988529895299052991529925299352994529955299652997529985299953000530015300253003530045300553006530075300853009530105301153012530135301453015530165301753018530195302053021530225302353024530255302653027530285302953030530315303253033530345303553036530375303853039530405304153042530435304453045530465304753048530495305053051530525305353054530555305653057530585305953060530615306253063530645306553066530675306853069530705307153072530735307453075530765307753078530795308053081530825308353084530855308653087530885308953090530915309253093530945309553096530975309853099531005310153102531035310453105531065310753108531095311053111531125311353114531155311653117531185311953120531215312253123531245312553126531275312853129531305313153132531335313453135531365313753138531395314053141531425314353144531455314653147531485314953150531515315253153531545315553156531575315853159531605316153162531635316453165531665316753168531695317053171531725317353174531755317653177531785317953180531815318253183531845318553186531875318853189531905319153192531935319453195531965319753198531995320053201532025320353204532055320653207532085320953210532115321253213532145321553216532175321853219532205322153222532235322453225532265322753228532295323053231532325323353234532355323653237532385323953240532415324253243532445324553246532475324853249532505325153252532535325453255532565325753258532595326053261532625326353264532655326653267532685326953270532715327253273532745327553276532775327853279532805328153282532835328453285532865328753288532895329053291532925329353294532955329653297532985329953300533015330253303533045330553306533075330853309533105331153312533135331453315533165331753318533195332053321533225332353324533255332653327533285332953330533315333253333533345333553336533375333853339533405334153342533435334453345533465334753348533495335053351533525335353354533555335653357533585335953360533615336253363533645336553366533675336853369533705337153372533735337453375533765337753378533795338053381533825338353384533855338653387533885338953390533915339253393533945339553396533975339853399534005340153402534035340453405534065340753408534095341053411534125341353414534155341653417534185341953420534215342253423534245342553426534275342853429534305343153432534335343453435534365343753438534395344053441534425344353444534455344653447534485344953450534515345253453534545345553456534575345853459534605346153462534635346453465534665346753468534695347053471534725347353474534755347653477534785347953480534815348253483534845348553486534875348853489534905349153492534935349453495534965349753498534995350053501535025350353504535055350653507535085350953510535115351253513535145351553516535175351853519535205352153522535235352453525535265352753528535295353053531535325353353534535355353653537535385353953540535415354253543535445354553546535475354853549535505355153552535535355453555535565355753558535595356053561535625356353564535655356653567535685356953570535715357253573535745357553576535775357853579535805358153582535835358453585535865358753588535895359053591535925359353594535955359653597535985359953600536015360253603536045360553606536075360853609536105361153612536135361453615536165361753618536195362053621536225362353624536255362653627536285362953630536315363253633536345363553636536375363853639536405364153642536435364453645536465364753648536495365053651536525365353654536555365653657536585365953660536615366253663536645366553666536675366853669536705367153672536735367453675536765367753678536795368053681536825368353684536855368653687536885368953690536915369253693536945369553696536975369853699537005370153702537035370453705537065370753708537095371053711537125371353714537155371653717537185371953720537215372253723537245372553726537275372853729537305373153732537335373453735537365373753738537395374053741537425374353744537455374653747537485374953750537515375253753537545375553756537575375853759537605376153762537635376453765537665376753768537695377053771537725377353774537755377653777537785377953780537815378253783537845378553786537875378853789537905379153792537935379453795537965379753798537995380053801538025380353804538055380653807538085380953810538115381253813538145381553816538175381853819538205382153822538235382453825538265382753828538295383053831538325383353834538355383653837538385383953840538415384253843538445384553846538475384853849538505385153852538535385453855538565385753858538595386053861538625386353864538655386653867538685386953870538715387253873538745387553876538775387853879538805388153882538835388453885538865388753888538895389053891538925389353894538955389653897538985389953900539015390253903539045390553906539075390853909539105391153912539135391453915539165391753918539195392053921539225392353924539255392653927539285392953930539315393253933539345393553936539375393853939539405394153942539435394453945539465394753948539495395053951539525395353954539555395653957539585395953960539615396253963539645396553966539675396853969539705397153972539735397453975539765397753978539795398053981539825398353984539855398653987539885398953990539915399253993539945399553996539975399853999540005400154002540035400454005540065400754008540095401054011540125401354014540155401654017540185401954020540215402254023540245402554026540275402854029540305403154032540335403454035540365403754038540395404054041540425404354044540455404654047540485404954050540515405254053540545405554056540575405854059540605406154062540635406454065540665406754068540695407054071540725407354074540755407654077540785407954080540815408254083540845408554086540875408854089540905409154092540935409454095540965409754098540995410054101541025410354104541055410654107541085410954110541115411254113541145411554116541175411854119541205412154122541235412454125541265412754128541295413054131541325413354134541355413654137541385413954140541415414254143541445414554146541475414854149541505415154152541535415454155541565415754158541595416054161541625416354164541655416654167541685416954170541715417254173541745417554176541775417854179541805418154182541835418454185541865418754188541895419054191541925419354194541955419654197541985419954200542015420254203542045420554206542075420854209542105421154212542135421454215542165421754218542195422054221542225422354224542255422654227542285422954230542315423254233542345423554236542375423854239542405424154242542435424454245542465424754248542495425054251542525425354254542555425654257542585425954260542615426254263542645426554266542675426854269542705427154272542735427454275542765427754278542795428054281542825428354284542855428654287542885428954290542915429254293542945429554296542975429854299543005430154302543035430454305543065430754308543095431054311543125431354314543155431654317543185431954320543215432254323543245432554326543275432854329543305433154332543335433454335543365433754338543395434054341543425434354344543455434654347543485434954350543515435254353543545435554356543575435854359543605436154362543635436454365543665436754368543695437054371543725437354374543755437654377543785437954380543815438254383543845438554386543875438854389543905439154392543935439454395543965439754398543995440054401544025440354404544055440654407544085440954410544115441254413544145441554416544175441854419544205442154422544235442454425544265442754428544295443054431544325443354434544355443654437544385443954440544415444254443544445444554446544475444854449544505445154452544535445454455544565445754458544595446054461544625446354464544655446654467544685446954470544715447254473544745447554476544775447854479544805448154482544835448454485544865448754488544895449054491544925449354494544955449654497544985449954500545015450254503545045450554506545075450854509545105451154512545135451454515545165451754518545195452054521545225452354524545255452654527545285452954530545315453254533545345453554536545375453854539545405454154542545435454454545545465454754548545495455054551545525455354554545555455654557545585455954560545615456254563545645456554566545675456854569545705457154572545735457454575545765457754578545795458054581545825458354584545855458654587545885458954590545915459254593545945459554596545975459854599546005460154602546035460454605546065460754608546095461054611546125461354614546155461654617546185461954620546215462254623546245462554626546275462854629546305463154632546335463454635546365463754638546395464054641546425464354644546455464654647546485464954650546515465254653546545465554656546575465854659546605466154662546635466454665546665466754668546695467054671546725467354674546755467654677546785467954680546815468254683546845468554686546875468854689546905469154692546935469454695546965469754698546995470054701547025470354704547055470654707547085470954710547115471254713547145471554716547175471854719547205472154722547235472454725547265472754728547295473054731547325473354734547355473654737547385473954740547415474254743547445474554746547475474854749547505475154752547535475454755547565475754758547595476054761547625476354764547655476654767547685476954770547715477254773547745477554776547775477854779547805478154782547835478454785547865478754788547895479054791547925479354794547955479654797547985479954800548015480254803548045480554806548075480854809548105481154812548135481454815548165481754818548195482054821548225482354824548255482654827548285482954830548315483254833548345483554836548375483854839548405484154842548435484454845548465484754848548495485054851548525485354854548555485654857548585485954860548615486254863548645486554866548675486854869548705487154872548735487454875548765487754878548795488054881548825488354884548855488654887548885488954890548915489254893548945489554896548975489854899549005490154902549035490454905549065490754908549095491054911549125491354914549155491654917549185491954920549215492254923549245492554926549275492854929549305493154932549335493454935549365493754938549395494054941549425494354944549455494654947549485494954950549515495254953549545495554956549575495854959549605496154962549635496454965549665496754968549695497054971549725497354974549755497654977549785497954980549815498254983549845498554986549875498854989549905499154992549935499454995549965499754998549995500055001550025500355004550055500655007550085500955010550115501255013550145501555016550175501855019550205502155022550235502455025550265502755028550295503055031550325503355034550355503655037550385503955040550415504255043550445504555046550475504855049550505505155052550535505455055550565505755058550595506055061550625506355064550655506655067550685506955070550715507255073550745507555076550775507855079550805508155082550835508455085550865508755088550895509055091550925509355094550955509655097550985509955100551015510255103551045510555106551075510855109551105511155112551135511455115551165511755118551195512055121551225512355124551255512655127551285512955130551315513255133551345513555136551375513855139551405514155142551435514455145551465514755148551495515055151551525515355154551555515655157551585515955160551615516255163551645516555166551675516855169551705517155172551735517455175551765517755178551795518055181551825518355184551855518655187551885518955190551915519255193551945519555196551975519855199552005520155202552035520455205552065520755208552095521055211552125521355214552155521655217552185521955220552215522255223552245522555226552275522855229552305523155232552335523455235552365523755238552395524055241552425524355244552455524655247552485524955250552515525255253552545525555256552575525855259552605526155262552635526455265552665526755268552695527055271552725527355274552755527655277552785527955280552815528255283552845528555286552875528855289552905529155292552935529455295552965529755298552995530055301553025530355304553055530655307553085530955310553115531255313553145531555316553175531855319553205532155322553235532455325553265532755328553295533055331553325533355334553355533655337553385533955340553415534255343553445534555346553475534855349553505535155352553535535455355553565535755358553595536055361553625536355364553655536655367553685536955370553715537255373553745537555376553775537855379553805538155382553835538455385553865538755388553895539055391553925539355394553955539655397553985539955400554015540255403554045540555406554075540855409554105541155412554135541455415554165541755418554195542055421554225542355424554255542655427554285542955430554315543255433554345543555436554375543855439554405544155442554435544455445554465544755448554495545055451554525545355454554555545655457554585545955460554615546255463554645546555466554675546855469554705547155472554735547455475554765547755478554795548055481554825548355484554855548655487554885548955490554915549255493554945549555496554975549855499555005550155502555035550455505555065550755508555095551055511555125551355514555155551655517555185551955520555215552255523555245552555526555275552855529555305553155532555335553455535555365553755538555395554055541555425554355544555455554655547555485554955550555515555255553555545555555556555575555855559555605556155562555635556455565555665556755568555695557055571555725557355574555755557655577555785557955580555815558255583555845558555586555875558855589555905559155592555935559455595555965559755598555995560055601556025560355604556055560655607556085560955610556115561255613556145561555616556175561855619556205562155622556235562455625556265562755628556295563055631556325563355634556355563655637556385563955640556415564255643556445564555646556475564855649556505565155652556535565455655556565565755658556595566055661556625566355664556655566655667556685566955670556715567255673556745567555676556775567855679556805568155682556835568455685556865568755688556895569055691556925569355694556955569655697556985569955700557015570255703557045570555706557075570855709557105571155712557135571455715557165571755718557195572055721557225572355724557255572655727557285572955730557315573255733557345573555736557375573855739557405574155742557435574455745557465574755748557495575055751557525575355754557555575655757557585575955760557615576255763557645576555766557675576855769557705577155772557735577455775557765577755778557795578055781557825578355784557855578655787557885578955790557915579255793557945579555796557975579855799558005580155802558035580455805558065580755808558095581055811558125581355814558155581655817558185581955820558215582255823558245582555826558275582855829558305583155832558335583455835558365583755838558395584055841558425584355844558455584655847558485584955850558515585255853558545585555856558575585855859558605586155862558635586455865558665586755868558695587055871558725587355874558755587655877558785587955880558815588255883558845588555886558875588855889558905589155892558935589455895558965589755898558995590055901559025590355904559055590655907559085590955910559115591255913559145591555916559175591855919559205592155922559235592455925559265592755928559295593055931559325593355934559355593655937559385593955940559415594255943559445594555946559475594855949559505595155952559535595455955559565595755958559595596055961559625596355964559655596655967559685596955970559715597255973559745597555976559775597855979559805598155982559835598455985559865598755988559895599055991559925599355994559955599655997559985599956000560015600256003560045600556006560075600856009560105601156012560135601456015560165601756018560195602056021560225602356024560255602656027560285602956030560315603256033560345603556036560375603856039560405604156042560435604456045560465604756048560495605056051560525605356054560555605656057560585605956060560615606256063560645606556066560675606856069560705607156072560735607456075560765607756078560795608056081560825608356084560855608656087560885608956090560915609256093560945609556096560975609856099561005610156102561035610456105561065610756108561095611056111561125611356114561155611656117561185611956120561215612256123561245612556126561275612856129561305613156132561335613456135561365613756138561395614056141561425614356144561455614656147561485614956150561515615256153561545615556156561575615856159561605616156162561635616456165561665616756168561695617056171561725617356174561755617656177561785617956180561815618256183561845618556186561875618856189561905619156192561935619456195561965619756198561995620056201562025620356204562055620656207562085620956210562115621256213562145621556216562175621856219562205622156222562235622456225562265622756228562295623056231562325623356234562355623656237562385623956240562415624256243562445624556246562475624856249562505625156252562535625456255562565625756258562595626056261562625626356264562655626656267562685626956270562715627256273562745627556276562775627856279562805628156282562835628456285562865628756288562895629056291562925629356294562955629656297562985629956300563015630256303563045630556306563075630856309563105631156312563135631456315563165631756318563195632056321563225632356324563255632656327563285632956330563315633256333563345633556336563375633856339563405634156342563435634456345563465634756348563495635056351563525635356354563555635656357563585635956360563615636256363563645636556366563675636856369563705637156372563735637456375563765637756378563795638056381563825638356384563855638656387563885638956390563915639256393563945639556396563975639856399564005640156402564035640456405564065640756408564095641056411564125641356414564155641656417564185641956420564215642256423564245642556426564275642856429564305643156432564335643456435564365643756438564395644056441564425644356444564455644656447564485644956450564515645256453564545645556456564575645856459564605646156462564635646456465564665646756468564695647056471564725647356474564755647656477564785647956480564815648256483564845648556486564875648856489564905649156492564935649456495564965649756498564995650056501565025650356504 |
- import { $ as createTextVNode, $n as toRefs, At as onBeforeMount, Bn as markRaw, Bt as onUpdated, C as vShow, Cn as withDirectives, Dt as mergeProps, Ft as onMounted, G as createBlock, Gn as readonly, I as Teleport, Jt as renderSlot, K as createCommentVNode, Kn as ref, L as Text, M as Fragment, Mn as effectScope, Mt as onBeforeUpdate, Nn as getCurrentScope, Nt as onDeactivated, O as Comment, Ot as nextTick, Qn as toRef, Rn as isRef, S as vModelText, T as withModifiers, U as computed, Ut as provide, V as cloneVNode, Vn as onScopeDispose, Vt as openBlock, W as createBaseVNode, Wn as reactive, Xt as resolveDirective, Yn as shallowRef, Yt as resolveComponent, Z as createSlots, Zn as toRaw, Zt as resolveDynamicComponent, _n as watchEffect, _r as normalizeStyle, a as createApp, an as toHandlers, ar as capitalize$1, b as vModelRadio, cr as isArray$1, dn as useSlots, dr as isObject$2, er as toValue$1, et as createVNode, fr as isPlainObject$1, ft as guardReactiveProps, gn as watch, gr as normalizeProps, hn as warn, hr as normalizeClass, ir as camelize$1, jt as onBeforeUnmount, kt as onActivated, lr as isDate, mr as isString, n as Transition, nr as unref, nt as defineComponent, or as hasOwn, p as render, pr as isPromise, pt as h$1, q as createElementBlock, qn as shallowReactive, qt as renderList, r as TransitionGroup, rr as NOOP, sn as useAttrs$1, sr as hyphenate$1, tr as triggerRef, ur as isFunction$1, ut as getCurrentInstance, v as vModelCheckbox, vr as toDisplayString, w as withKeys, wt as isVNode, xn as withCtx, xt as inject, yr as toHandlerKey, zt as onUnmounted } from "./vue.runtime.esm-bundler-BjtQpYUU.js";
- import { ArrowDown as arrow_down_default, ArrowLeft as arrow_left_default, ArrowRight as arrow_right_default, ArrowUp as arrow_up_default, Back as back_default, Calendar as calendar_default$1, CaretRight as caret_right_default, CaretTop as caret_top_default, Check as check_default, CircleCheck as circle_check_default, CircleCheckFilled as circle_check_filled_default, CircleClose as circle_close_default, CircleCloseFilled as circle_close_filled_default, Clock as clock_default, Close as close_default, DArrowLeft as d_arrow_left_default, DArrowRight as d_arrow_right_default, Delete as delete_default, Document as document_default, FullScreen as full_screen_default, Hide as hide_default, InfoFilled as info_filled_default, Loading as loading_default, Minus as minus_default, More as more_default, MoreFilled as more_filled_default, PictureFilled as picture_filled_default, Plus as plus_default, QuestionFilled as question_filled_default, RefreshLeft as refresh_left_default, RefreshRight as refresh_right_default, ScaleToOriginal as scale_to_original_default, Search as search_default, SortDown as sort_down_default, SortUp as sort_up_default, Star as star_default, StarFilled as star_filled_default, SuccessFilled as success_filled_default, View as view_default, WarningFilled as warning_filled_default, ZoomIn as zoom_in_default, ZoomOut as zoom_out_default } from "./@element-plus_icons-vue.js";
- //#region \0rolldown/runtime.js
- var __create = Object.create;
- var __defProp = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames = Object.getOwnPropertyNames;
- var __getProtoOf = Object.getPrototypeOf;
- var __hasOwnProp = Object.prototype.hasOwnProperty;
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
- key = keys[i];
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
- get: ((k) => from[k]).bind(null, key),
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
- });
- }
- return to;
- };
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
- value: mod,
- enumerable: true
- }) : target, mod));
- //#endregion
- //#region node_modules/element-plus/es/constants/aria.mjs
- var EVENT_CODE = {
- tab: "Tab",
- enter: "Enter",
- space: "Space",
- left: "ArrowLeft",
- up: "ArrowUp",
- right: "ArrowRight",
- down: "ArrowDown",
- esc: "Escape",
- delete: "Delete",
- backspace: "Backspace",
- numpadEnter: "NumpadEnter",
- pageUp: "PageUp",
- pageDown: "PageDown",
- home: "Home",
- end: "End"
- };
- //#endregion
- //#region node_modules/element-plus/es/constants/date.mjs
- var datePickTypes = [
- "year",
- "years",
- "month",
- "months",
- "date",
- "dates",
- "week",
- "datetime",
- "datetimerange",
- "daterange",
- "monthrange",
- "yearrange"
- ];
- var WEEK_DAYS = [
- "sun",
- "mon",
- "tue",
- "wed",
- "thu",
- "fri",
- "sat"
- ];
- //#endregion
- //#region node_modules/element-plus/es/constants/event.mjs
- var UPDATE_MODEL_EVENT = "update:modelValue";
- var CHANGE_EVENT = "change";
- var INPUT_EVENT = "input";
- //#endregion
- //#region node_modules/element-plus/es/constants/key.mjs
- var INSTALLED_KEY = Symbol("INSTALLED_KEY");
- //#endregion
- //#region node_modules/element-plus/es/constants/size.mjs
- var componentSizes = [
- "",
- "default",
- "small",
- "large"
- ];
- var componentSizeMap = {
- large: 40,
- default: 32,
- small: 24
- };
- //#endregion
- //#region node_modules/element-plus/es/constants/column-alignment.mjs
- var columnAlignment = [
- "left",
- "center",
- "right"
- ];
- //#endregion
- //#region node_modules/element-plus/es/constants/form.mjs
- var MINIMUM_INPUT_WIDTH = 11;
- var BORDER_HORIZONTAL_WIDTH = 2;
- //#endregion
- //#region node_modules/lodash-es/_freeGlobal.js
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
- //#endregion
- //#region node_modules/lodash-es/_root.js
- /** Detect free variable `self`. */
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function("return this")();
- //#endregion
- //#region node_modules/lodash-es/_Symbol.js
- /** Built-in value references. */
- var Symbol$1 = root.Symbol;
- //#endregion
- //#region node_modules/lodash-es/_getRawTag.js
- /** Used for built-in method references. */
- var objectProto$4 = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty$13 = objectProto$4.hasOwnProperty;
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString$1 = objectProto$4.toString;
- /** Built-in value references. */
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty$13.call(value, symToStringTag$1), tag = value[symToStringTag$1];
- try {
- value[symToStringTag$1] = void 0;
- var unmasked = true;
- } catch (e) {}
- var result = nativeObjectToString$1.call(value);
- if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
- else delete value[symToStringTag$1];
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_objectToString.js
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = Object.prototype.toString;
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseGetTag.js
- /** `Object#toString` result references. */
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
- /** Built-in value references. */
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) return value === void 0 ? undefinedTag : nullTag;
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
- }
- //#endregion
- //#region node_modules/lodash-es/isObjectLike.js
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == "object";
- }
- //#endregion
- //#region node_modules/lodash-es/isSymbol.js
- /** `Object#toString` result references. */
- var symbolTag$3 = "[object Symbol]";
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
- }
- //#endregion
- //#region node_modules/lodash-es/_arrayMap.js
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
- while (++index < length) result[index] = iteratee(array[index], index, array);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/isArray.js
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
- //#endregion
- //#region node_modules/lodash-es/_baseToString.js
- /** Used as references for various `Number` constants. */
- var INFINITY$3 = Infinity;
- /** Used to convert symbols to primitives and strings. */
- var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
- /**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- if (typeof value == "string") return value;
- if (isArray(value)) return arrayMap(value, baseToString) + "";
- if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
- var result = value + "";
- return result == "0" && 1 / value == -INFINITY$3 ? "-0" : result;
- }
- //#endregion
- //#region node_modules/lodash-es/_trimmedEndIndex.js
- /** Used to match a single whitespace character. */
- var reWhitespace = /\s/;
- /**
- * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the last non-whitespace character.
- */
- function trimmedEndIndex(string) {
- var index = string.length;
- while (index-- && reWhitespace.test(string.charAt(index)));
- return index;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseTrim.js
- /** Used to match leading whitespace. */
- var reTrimStart = /^\s+/;
- /**
- * The base implementation of `_.trim`.
- *
- * @private
- * @param {string} string The string to trim.
- * @returns {string} Returns the trimmed string.
- */
- function baseTrim(string) {
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
- }
- //#endregion
- //#region node_modules/lodash-es/isObject.js
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject$1(value) {
- var type = typeof value;
- return value != null && (type == "object" || type == "function");
- }
- //#endregion
- //#region node_modules/lodash-es/toNumber.js
- /** Used as references for various `Number` constants. */
- var NAN = NaN;
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
- /** Built-in method references without a dependency on `root`. */
- var freeParseInt = parseInt;
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- function toNumber(value) {
- if (typeof value == "number") return value;
- if (isSymbol(value)) return NAN;
- if (isObject$1(value)) {
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
- value = isObject$1(other) ? other + "" : other;
- }
- if (typeof value != "string") return value === 0 ? value : +value;
- value = baseTrim(value);
- var isBinary = reIsBinary.test(value);
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
- }
- //#endregion
- //#region node_modules/lodash-es/toFinite.js
- /** Used as references for various `Number` constants. */
- var INFINITY$2 = Infinity, MAX_INTEGER = 17976931348623157e292;
- /**
- * Converts `value` to a finite number.
- *
- * @static
- * @memberOf _
- * @since 4.12.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted number.
- * @example
- *
- * _.toFinite(3.2);
- * // => 3.2
- *
- * _.toFinite(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toFinite(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toFinite('3.2');
- * // => 3.2
- */
- function toFinite(value) {
- if (!value) return value === 0 ? value : 0;
- value = toNumber(value);
- if (value === INFINITY$2 || value === -INFINITY$2) return (value < 0 ? -1 : 1) * MAX_INTEGER;
- return value === value ? value : 0;
- }
- //#endregion
- //#region node_modules/lodash-es/toInteger.js
- /**
- * Converts `value` to an integer.
- *
- * **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toInteger(3.2);
- * // => 3
- *
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toInteger(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toInteger('3.2');
- * // => 3
- */
- function toInteger(value) {
- var result = toFinite(value), remainder = result % 1;
- return result === result ? remainder ? result - remainder : result : 0;
- }
- //#endregion
- //#region node_modules/lodash-es/identity.js
- /**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
- function identity(value) {
- return value;
- }
- //#endregion
- //#region node_modules/lodash-es/isFunction.js
- /** `Object#toString` result references. */
- var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- if (!isObject$1(value)) return false;
- var tag = baseGetTag(value);
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
- }
- //#endregion
- //#region node_modules/lodash-es/_coreJsData.js
- /** Used to detect overreaching core-js shims. */
- var coreJsData = root["__core-js_shared__"];
- //#endregion
- //#region node_modules/lodash-es/_isMasked.js
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
- return uid ? "Symbol(src)_1." + uid : "";
- }();
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && maskSrcKey in func;
- }
- //#endregion
- //#region node_modules/lodash-es/_toSource.js
- /** Used to resolve the decompiled source of functions. */
- var funcToString$2 = Function.prototype.toString;
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to convert.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString$2.call(func);
- } catch (e) {}
- try {
- return func + "";
- } catch (e) {}
- }
- return "";
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsNative.js
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used for built-in method references. */
- var funcProto$1 = Function.prototype, objectProto$3 = Object.prototype;
- /** Used to resolve the decompiled source of functions. */
- var funcToString$1 = funcProto$1.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty$12 = objectProto$3.hasOwnProperty;
- /** Used to detect if a method is native. */
- var reIsNative = RegExp("^" + funcToString$1.call(hasOwnProperty$12).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject$1(value) || isMasked(value)) return false;
- return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
- }
- //#endregion
- //#region node_modules/lodash-es/_getValue.js
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue$1(object, key) {
- return object == null ? void 0 : object[key];
- }
- //#endregion
- //#region node_modules/lodash-es/_getNative.js
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue$1(object, key);
- return baseIsNative(value) ? value : void 0;
- }
- //#endregion
- //#region node_modules/lodash-es/_WeakMap.js
- var WeakMap$1 = getNative(root, "WeakMap");
- //#endregion
- //#region node_modules/lodash-es/_baseCreate.js
- /** Built-in value references. */
- var objectCreate = Object.create;
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} proto The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- var baseCreate = function() {
- function object() {}
- return function(proto) {
- if (!isObject$1(proto)) return {};
- if (objectCreate) return objectCreate(proto);
- object.prototype = proto;
- var result = new object();
- object.prototype = void 0;
- return result;
- };
- }();
- //#endregion
- //#region node_modules/lodash-es/_apply.js
- /**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
- function apply(func, thisArg, args) {
- switch (args.length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
- }
- //#endregion
- //#region node_modules/lodash-es/noop.js
- /**
- * This method returns `undefined`.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Util
- * @example
- *
- * _.times(2, _.noop);
- * // => [undefined, undefined]
- */
- function noop$1() {}
- //#endregion
- //#region node_modules/lodash-es/_copyArray.js
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source, array) {
- var index = -1, length = source.length;
- array || (array = Array(length));
- while (++index < length) array[index] = source[index];
- return array;
- }
- //#endregion
- //#region node_modules/lodash-es/_shortOut.js
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 800, HOT_SPAN = 16;
- var nativeNow = Date.now;
- /**
- * Creates a function that'll short out and invoke `identity` instead
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
- * milliseconds.
- *
- * @private
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new shortable function.
- */
- function shortOut(func) {
- var count = 0, lastCalled = 0;
- return function() {
- var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) return arguments[0];
- } else count = 0;
- return func.apply(void 0, arguments);
- };
- }
- //#endregion
- //#region node_modules/lodash-es/constant.js
- /**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new constant function.
- * @example
- *
- * var objects = _.times(2, _.constant({ 'a': 1 }));
- *
- * console.log(objects);
- * // => [{ 'a': 1 }, { 'a': 1 }]
- *
- * console.log(objects[0] === objects[1]);
- * // => true
- */
- function constant(value) {
- return function() {
- return value;
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_defineProperty.js
- var defineProperty = function() {
- try {
- var func = getNative(Object, "defineProperty");
- func({}, "", {});
- return func;
- } catch (e) {}
- }();
- //#endregion
- //#region node_modules/lodash-es/_setToString.js
- /**
- * Sets the `toString` method of `func` to return `string`.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
- var setToString = shortOut(!defineProperty ? identity : function(func, string) {
- return defineProperty(func, "toString", {
- "configurable": true,
- "enumerable": false,
- "value": constant(string),
- "writable": true
- });
- });
- //#endregion
- //#region node_modules/lodash-es/_arrayEach.js
- /**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) if (iteratee(array[index], index, array) === false) break;
- return array;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseFindIndex.js
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
- var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
- while (fromRight ? index-- : ++index < length) if (predicate(array[index], index, array)) return index;
- return -1;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsNaN.js
- /**
- * The base implementation of `_.isNaN` without support for number objects.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- */
- function baseIsNaN(value) {
- return value !== value;
- }
- //#endregion
- //#region node_modules/lodash-es/_strictIndexOf.js
- /**
- * A specialized version of `_.indexOf` which performs strict equality
- * comparisons of values, i.e. `===`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function strictIndexOf(array, value, fromIndex) {
- var index = fromIndex - 1, length = array.length;
- while (++index < length) if (array[index] === value) return index;
- return -1;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIndexOf.js
- /**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
- }
- //#endregion
- //#region node_modules/lodash-es/_arrayIncludes.js
- /**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludes(array, value) {
- return !!(array == null ? 0 : array.length) && baseIndexOf(array, value, 0) > -1;
- }
- //#endregion
- //#region node_modules/lodash-es/_isIndex.js
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- var type = typeof value;
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseAssignValue.js
- /**
- * The base implementation of `assignValue` and `assignMergeValue` without
- * value checks.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function baseAssignValue(object, key, value) {
- if (key == "__proto__" && defineProperty) defineProperty(object, key, {
- "configurable": true,
- "enumerable": true,
- "value": value,
- "writable": true
- });
- else object[key] = value;
- }
- //#endregion
- //#region node_modules/lodash-es/eq.js
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || value !== value && other !== other;
- }
- //#endregion
- //#region node_modules/lodash-es/_assignValue.js
- /** Used to check objects for own properties. */
- var hasOwnProperty$11 = Object.prototype.hasOwnProperty;
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty$11.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
- }
- //#endregion
- //#region node_modules/lodash-es/_copyObject.js
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object, customizer) {
- var isNew = !object;
- object || (object = {});
- var index = -1, length = props.length;
- while (++index < length) {
- var key = props[index];
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
- if (newValue === void 0) newValue = source[key];
- if (isNew) baseAssignValue(object, key, newValue);
- else assignValue(object, key, newValue);
- }
- return object;
- }
- //#endregion
- //#region node_modules/lodash-es/_overRest.js
- var nativeMax$2 = Math.max;
- /**
- * A specialized version of `baseRest` which transforms the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @param {Function} transform The rest array transform.
- * @returns {Function} Returns the new function.
- */
- function overRest(func, start, transform) {
- start = nativeMax$2(start === void 0 ? func.length - 1 : start, 0);
- return function() {
- var args = arguments, index = -1, length = nativeMax$2(args.length - start, 0), array = Array(length);
- while (++index < length) array[index] = args[start + index];
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) otherArgs[index] = args[index];
- otherArgs[start] = transform(array);
- return apply(func, this, otherArgs);
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_baseRest.js
- /**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- */
- function baseRest(func, start) {
- return setToString(overRest(func, start, identity), func + "");
- }
- //#endregion
- //#region node_modules/lodash-es/isLength.js
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER = 9007199254740991;
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- //#endregion
- //#region node_modules/lodash-es/isArrayLike.js
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_isIterateeCall.js
- /**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject$1(object)) return false;
- var type = typeof index;
- if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) return eq(object[index], value);
- return false;
- }
- //#endregion
- //#region node_modules/lodash-es/_createAssigner.js
- /**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return baseRest(function(object, sources) {
- var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
- customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? void 0 : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) assigner(object, source, index, customizer);
- }
- return object;
- });
- }
- //#endregion
- //#region node_modules/lodash-es/_isPrototype.js
- /** Used for built-in method references. */
- var objectProto$2 = Object.prototype;
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor;
- return value === (typeof Ctor == "function" && Ctor.prototype || objectProto$2);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseTimes.js
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1, result = Array(n);
- while (++index < n) result[index] = iteratee(index);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsArguments.js
- /** `Object#toString` result references. */
- var argsTag$3 = "[object Arguments]";
- /**
- * The base implementation of `_.isArguments`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- */
- function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag$3;
- }
- //#endregion
- //#region node_modules/lodash-es/isArguments.js
- /** Used for built-in method references. */
- var objectProto$1 = Object.prototype;
- /** Used to check objects for own properties. */
- var hasOwnProperty$10 = objectProto$1.hasOwnProperty;
- /** Built-in value references. */
- var propertyIsEnumerable$1 = objectProto$1.propertyIsEnumerable;
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- var isArguments = baseIsArguments(function() {
- return arguments;
- }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty$10.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
- };
- //#endregion
- //#region node_modules/lodash-es/stubFalse.js
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
- //#endregion
- //#region node_modules/lodash-es/isBuffer.js
- /** Detect free variable `exports`. */
- var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
- /** Built-in value references. */
- var Buffer$2 = freeModule$2 && freeModule$2.exports === freeExports$2 ? root.Buffer : void 0;
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = (Buffer$2 ? Buffer$2.isBuffer : void 0) || stubFalse;
- //#endregion
- //#region node_modules/lodash-es/_baseIsTypedArray.js
- /** `Object#toString` result references. */
- var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
- var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
- typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
- /**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
- function baseIsTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
- }
- //#endregion
- //#region node_modules/lodash-es/_baseUnary.js
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_nodeUtil.js
- /** Detect free variable `exports`. */
- var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
- /** Detect free variable `process` from Node.js. */
- var freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && freeGlobal.process;
- /** Used to access faster Node.js helpers. */
- var nodeUtil = function() {
- try {
- var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
- if (types) return types;
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
- } catch (e) {}
- }();
- //#endregion
- //#region node_modules/lodash-es/isTypedArray.js
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
- //#endregion
- //#region node_modules/lodash-es/_arrayLikeKeys.js
- /** Used to check objects for own properties. */
- var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
- for (var key in value) if ((inherited || hasOwnProperty$9.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) result.push(key);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_overArg.js
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_nativeKeys.js
- var nativeKeys = overArg(Object.keys, Object);
- //#endregion
- //#region node_modules/lodash-es/_baseKeys.js
- /** Used to check objects for own properties. */
- var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
- /**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- if (!isPrototype(object)) return nativeKeys(object);
- var result = [];
- for (var key in Object(object)) if (hasOwnProperty$8.call(object, key) && key != "constructor") result.push(key);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/keys.js
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
- //#endregion
- //#region node_modules/lodash-es/_nativeKeysIn.js
- /**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function nativeKeysIn(object) {
- var result = [];
- if (object != null) for (var key in Object(object)) result.push(key);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseKeysIn.js
- /** Used to check objects for own properties. */
- var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
- /**
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeysIn(object) {
- if (!isObject$1(object)) return nativeKeysIn(object);
- var isProto = isPrototype(object), result = [];
- for (var key in object) if (!(key == "constructor" && (isProto || !hasOwnProperty$7.call(object, key)))) result.push(key);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/keysIn.js
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
- }
- //#endregion
- //#region node_modules/lodash-es/_isKey.js
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- if (isArray(value)) return false;
- var type = typeof value;
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
- }
- //#endregion
- //#region node_modules/lodash-es/_nativeCreate.js
- var nativeCreate = getNative(Object, "create");
- //#endregion
- //#region node_modules/lodash-es/_hashClear.js
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
- }
- //#endregion
- //#region node_modules/lodash-es/_hashDelete.js
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_hashGet.js
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
- /** Used to check objects for own properties. */
- var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED$2 ? void 0 : result;
- }
- return hasOwnProperty$6.call(data, key) ? data[key] : void 0;
- }
- //#endregion
- //#region node_modules/lodash-es/_hashHas.js
- /** Used to check objects for own properties. */
- var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? data[key] !== void 0 : hasOwnProperty$5.call(data, key);
- }
- //#endregion
- //#region node_modules/lodash-es/_hashSet.js
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
- return this;
- }
- //#endregion
- //#region node_modules/lodash-es/_Hash.js
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1, length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- Hash.prototype.clear = hashClear;
- Hash.prototype["delete"] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
- //#endregion
- //#region node_modules/lodash-es/_listCacheClear.js
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
- }
- //#endregion
- //#region node_modules/lodash-es/_assocIndexOf.js
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) if (eq(array[length][0], key)) return length;
- return -1;
- }
- //#endregion
- //#region node_modules/lodash-es/_listCacheDelete.js
- /** Built-in value references. */
- var splice = Array.prototype.splice;
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__, index = assocIndexOf(data, key);
- if (index < 0) return false;
- if (index == data.length - 1) data.pop();
- else splice.call(data, index, 1);
- --this.size;
- return true;
- }
- //#endregion
- //#region node_modules/lodash-es/_listCacheGet.js
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__, index = assocIndexOf(data, key);
- return index < 0 ? void 0 : data[index][1];
- }
- //#endregion
- //#region node_modules/lodash-es/_listCacheHas.js
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
- //#endregion
- //#region node_modules/lodash-es/_listCacheSet.js
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__, index = assocIndexOf(data, key);
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else data[index][1] = value;
- return this;
- }
- //#endregion
- //#region node_modules/lodash-es/_ListCache.js
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1, length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype["delete"] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
- //#endregion
- //#region node_modules/lodash-es/_Map.js
- var Map$1 = getNative(root, "Map");
- //#endregion
- //#region node_modules/lodash-es/_mapCacheClear.js
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.size = 0;
- this.__data__ = {
- "hash": new Hash(),
- "map": new (Map$1 || ListCache)(),
- "string": new Hash()
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_isKeyable.js
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
- }
- //#endregion
- //#region node_modules/lodash-es/_getMapData.js
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
- }
- //#endregion
- //#region node_modules/lodash-es/_mapCacheDelete.js
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- var result = getMapData(this, key)["delete"](key);
- this.size -= result ? 1 : 0;
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_mapCacheGet.js
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
- //#endregion
- //#region node_modules/lodash-es/_mapCacheHas.js
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
- //#endregion
- //#region node_modules/lodash-es/_mapCacheSet.js
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- var data = getMapData(this, key), size = data.size;
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
- }
- //#endregion
- //#region node_modules/lodash-es/_MapCache.js
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1, length = entries == null ? 0 : entries.length;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype["delete"] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
- //#endregion
- //#region node_modules/lodash-es/memoize.js
- /** Error message constants. */
- var FUNC_ERROR_TEXT$2 = "Expected a function";
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided, it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is used as the map cache key. The `func`
- * is invoked with the `this` binding of the memoized function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoized function.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- * var other = { 'c': 3, 'd': 4 };
- *
- * var values = _.memoize(_.values);
- * values(object);
- * // => [1, 2]
- *
- * values(other);
- * // => [3, 4]
- *
- * object.a = 2;
- * values(object);
- * // => [1, 2]
- *
- * // Modify the result cache.
- * values.cache.set(object, ['a', 'b']);
- * values(object);
- * // => ['a', 'b']
- *
- * // Replace `_.memoize.Cache`.
- * _.memoize.Cache = WeakMap;
- */
- function memoize(func, resolver) {
- if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT$2);
- var memoized = function() {
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
- if (cache.has(key)) return cache.get(key);
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result) || cache;
- return result;
- };
- memoized.cache = new (memoize.Cache || MapCache)();
- return memoized;
- }
- memoize.Cache = MapCache;
- //#endregion
- //#region node_modules/lodash-es/_memoizeCapped.js
- /** Used as the maximum memoize cache size. */
- var MAX_MEMOIZE_SIZE = 500;
- /**
- * A specialized version of `_.memoize` which clears the memoized function's
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
- *
- * @private
- * @param {Function} func The function to have its output memoized.
- * @returns {Function} Returns the new memoized function.
- */
- function memoizeCapped(func) {
- var result = memoize(func, function(key) {
- if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
- return key;
- });
- var cache = result.cache;
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_stringToPath.js
- /** Used to match property names within property paths. */
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
- /**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
- var stringToPath = memoizeCapped(function(string) {
- var result = [];
- if (string.charCodeAt(0) === 46) result.push("");
- string.replace(rePropName, function(match, number, quote, subString) {
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
- });
- return result;
- });
- //#endregion
- //#region node_modules/lodash-es/toString.js
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString$1(value) {
- return value == null ? "" : baseToString(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_castPath.js
- /**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @param {Object} [object] The object to query keys on.
- * @returns {Array} Returns the cast property path array.
- */
- function castPath(value, object) {
- if (isArray(value)) return value;
- return isKey(value, object) ? [value] : stringToPath(toString$1(value));
- }
- //#endregion
- //#region node_modules/lodash-es/_toKey.js
- /** Used as references for various `Number` constants. */
- var INFINITY$1 = Infinity;
- /**
- * Converts `value` to a string key if it's not a string or symbol.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {string|symbol} Returns the key.
- */
- function toKey(value) {
- if (typeof value == "string" || isSymbol(value)) return value;
- var result = value + "";
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseGet.js
- /**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path) {
- path = castPath(path, object);
- var index = 0, length = path.length;
- while (object != null && index < length) object = object[toKey(path[index++])];
- return index && index == length ? object : void 0;
- }
- //#endregion
- //#region node_modules/lodash-es/get.js
- /**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined`, the `defaultValue` is returned in its place.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? void 0 : baseGet(object, path);
- return result === void 0 ? defaultValue : result;
- }
- //#endregion
- //#region node_modules/lodash-es/_arrayPush.js
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1, length = values.length, offset = array.length;
- while (++index < length) array[offset + index] = values[index];
- return array;
- }
- //#endregion
- //#region node_modules/lodash-es/_isFlattenable.js
- /** Built-in value references. */
- var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
- /**
- * Checks if `value` is a flattenable `arguments` object or array.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
- */
- function isFlattenable(value) {
- return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseFlatten.js
- /**
- * The base implementation of `_.flatten` with support for restricting flattening.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {number} depth The maximum recursion depth.
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, depth, predicate, isStrict, result) {
- var index = -1, length = array.length;
- predicate || (predicate = isFlattenable);
- result || (result = []);
- while (++index < length) {
- var value = array[index];
- if (depth > 0 && predicate(value)) if (depth > 1) baseFlatten(value, depth - 1, predicate, isStrict, result);
- else arrayPush(result, value);
- else if (!isStrict) result[result.length] = value;
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/flatten.js
- /**
- * Flattens `array` a single level deep.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, [3, [4]], 5]]);
- * // => [1, 2, [3, [4]], 5]
- */
- function flatten(array) {
- return (array == null ? 0 : array.length) ? baseFlatten(array, 1) : [];
- }
- //#endregion
- //#region node_modules/lodash-es/_flatRest.js
- /**
- * A specialized version of `baseRest` which flattens the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @returns {Function} Returns the new function.
- */
- function flatRest(func) {
- return setToString(overRest(func, void 0, flatten), func + "");
- }
- //#endregion
- //#region node_modules/lodash-es/_getPrototype.js
- /** Built-in value references. */
- var getPrototype = overArg(Object.getPrototypeOf, Object);
- //#endregion
- //#region node_modules/lodash-es/isPlainObject.js
- /** `Object#toString` result references. */
- var objectTag$3 = "[object Object]";
- /** Used for built-in method references. */
- var funcProto = Function.prototype, objectProto = Object.prototype;
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty$4 = objectProto.hasOwnProperty;
- /** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object);
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @since 0.8.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) return false;
- var proto = getPrototype(value);
- if (proto === null) return true;
- var Ctor = hasOwnProperty$4.call(proto, "constructor") && proto.constructor;
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseSlice.js
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1, length = array.length;
- if (start < 0) start = -start > length ? 0 : length + start;
- end = end > length ? length : end;
- if (end < 0) end += length;
- length = start > end ? 0 : end - start >>> 0;
- start >>>= 0;
- var result = Array(length);
- while (++index < length) result[index] = array[index + start];
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/castArray.js
- /**
- * Casts `value` as an array if it's not one.
- *
- * @static
- * @memberOf _
- * @since 4.4.0
- * @category Lang
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast array.
- * @example
- *
- * _.castArray(1);
- * // => [1]
- *
- * _.castArray({ 'a': 1 });
- * // => [{ 'a': 1 }]
- *
- * _.castArray('abc');
- * // => ['abc']
- *
- * _.castArray(null);
- * // => [null]
- *
- * _.castArray(undefined);
- * // => [undefined]
- *
- * _.castArray();
- * // => []
- *
- * var array = [1, 2, 3];
- * console.log(_.castArray(array) === array);
- * // => true
- */
- function castArray$1() {
- if (!arguments.length) return [];
- var value = arguments[0];
- return isArray(value) ? value : [value];
- }
- //#endregion
- //#region node_modules/lodash-es/_baseClamp.js
- /**
- * The base implementation of `_.clamp` which doesn't coerce arguments.
- *
- * @private
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- */
- function baseClamp(number, lower, upper) {
- if (number === number) {
- if (upper !== void 0) number = number <= upper ? number : upper;
- if (lower !== void 0) number = number >= lower ? number : lower;
- }
- return number;
- }
- //#endregion
- //#region node_modules/lodash-es/clamp.js
- /**
- * Clamps `number` within the inclusive `lower` and `upper` bounds.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Number
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- * @example
- *
- * _.clamp(-10, -5, 5);
- * // => -5
- *
- * _.clamp(10, -5, 5);
- * // => 5
- */
- function clamp$2(number, lower, upper) {
- if (upper === void 0) {
- upper = lower;
- lower = void 0;
- }
- if (upper !== void 0) {
- upper = toNumber(upper);
- upper = upper === upper ? upper : 0;
- }
- if (lower !== void 0) {
- lower = toNumber(lower);
- lower = lower === lower ? lower : 0;
- }
- return baseClamp(toNumber(number), lower, upper);
- }
- //#endregion
- //#region node_modules/lodash-es/_stackClear.js
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache();
- this.size = 0;
- }
- //#endregion
- //#region node_modules/lodash-es/_stackDelete.js
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__, result = data["delete"](key);
- this.size = data.size;
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_stackGet.js
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
- //#endregion
- //#region node_modules/lodash-es/_stackHas.js
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
- //#endregion
- //#region node_modules/lodash-es/_stackSet.js
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE$1 = 200;
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var data = this.__data__;
- if (data instanceof ListCache) {
- var pairs = data.__data__;
- if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE$1 - 1) {
- pairs.push([key, value]);
- this.size = ++data.size;
- return this;
- }
- data = this.__data__ = new MapCache(pairs);
- }
- data.set(key, value);
- this.size = data.size;
- return this;
- }
- //#endregion
- //#region node_modules/lodash-es/_Stack.js
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- this.size = (this.__data__ = new ListCache(entries)).size;
- }
- Stack.prototype.clear = stackClear;
- Stack.prototype["delete"] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
- //#endregion
- //#region node_modules/lodash-es/_baseAssign.js
- /**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseAssignIn.js
- /**
- * The base implementation of `_.assignIn` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssignIn(object, source) {
- return object && copyObject(source, keysIn(source), object);
- }
- //#endregion
- //#region node_modules/lodash-es/_cloneBuffer.js
- /** Detect free variable `exports`. */
- var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
- /** Built-in value references. */
- var Buffer$1 = freeModule && freeModule.exports === freeExports ? root.Buffer : void 0, allocUnsafe = Buffer$1 ? Buffer$1.allocUnsafe : void 0;
- /**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) return buffer.slice();
- var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
- buffer.copy(result);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_arrayFilter.js
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) result[resIndex++] = value;
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/stubArray.js
- /**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
- function stubArray() {
- return [];
- }
- //#endregion
- //#region node_modules/lodash-es/_getSymbols.js
- /** Built-in value references. */
- var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
- var nativeGetSymbols = Object.getOwnPropertySymbols;
- /**
- * Creates an array of the own enumerable symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
- if (object == null) return [];
- object = Object(object);
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol);
- });
- };
- //#endregion
- //#region node_modules/lodash-es/_copySymbols.js
- /**
- * Copies own symbols of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
- }
- //#endregion
- //#region node_modules/lodash-es/_getSymbolsIn.js
- /**
- * Creates an array of the own and inherited enumerable symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbolsIn = !Object.getOwnPropertySymbols ? stubArray : function(object) {
- var result = [];
- while (object) {
- arrayPush(result, getSymbols(object));
- object = getPrototype(object);
- }
- return result;
- };
- //#endregion
- //#region node_modules/lodash-es/_copySymbolsIn.js
- /**
- * Copies own and inherited symbols of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbolsIn(source, object) {
- return copyObject(source, getSymbolsIn(source), object);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseGetAllKeys.js
- /**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
- }
- //#endregion
- //#region node_modules/lodash-es/_getAllKeys.js
- /**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
- //#endregion
- //#region node_modules/lodash-es/_getAllKeysIn.js
- /**
- * Creates an array of own and inherited enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeysIn(object) {
- return baseGetAllKeys(object, keysIn, getSymbolsIn);
- }
- //#endregion
- //#region node_modules/lodash-es/_DataView.js
- var DataView = getNative(root, "DataView");
- //#endregion
- //#region node_modules/lodash-es/_Promise.js
- var Promise$1 = getNative(root, "Promise");
- //#endregion
- //#region node_modules/lodash-es/_Set.js
- var Set$1 = getNative(root, "Set");
- //#endregion
- //#region node_modules/lodash-es/_getTag.js
- /** `Object#toString` result references. */
- var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
- var dataViewTag$3 = "[object DataView]";
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- var getTag = baseGetTag;
- if (DataView && getTag(new DataView(/* @__PURE__ */ new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$4 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) getTag = function(value) {
- var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
- if (ctorString) switch (ctorString) {
- case dataViewCtorString: return dataViewTag$3;
- case mapCtorString: return mapTag$4;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag$4;
- case weakMapCtorString: return weakMapTag$1;
- }
- return result;
- };
- var _getTag_default = getTag;
- //#endregion
- //#region node_modules/lodash-es/_initCloneArray.js
- /** Used to check objects for own properties. */
- var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length, result = new array.constructor(length);
- if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_Uint8Array.js
- /** Built-in value references. */
- var Uint8Array$1 = root.Uint8Array;
- //#endregion
- //#region node_modules/lodash-es/_cloneArrayBuffer.js
- /**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_cloneDataView.js
- /**
- * Creates a clone of `dataView`.
- *
- * @private
- * @param {Object} dataView The data view to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned data view.
- */
- function cloneDataView(dataView, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
- }
- //#endregion
- //#region node_modules/lodash-es/_cloneRegExp.js
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
- /**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
- function cloneRegExp(regexp) {
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
- result.lastIndex = regexp.lastIndex;
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_cloneSymbol.js
- /** Used to convert symbols to primitives and strings. */
- var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
- /**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
- function cloneSymbol(symbol) {
- return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
- }
- //#endregion
- //#region node_modules/lodash-es/_cloneTypedArray.js
- /**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
- function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
- }
- //#endregion
- //#region node_modules/lodash-es/_initCloneByTag.js
- /** `Object#toString` result references. */
- var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
- var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag$2: return cloneArrayBuffer(object);
- case boolTag$2:
- case dateTag$2: return new Ctor(+object);
- case dataViewTag$2: return cloneDataView(object, isDeep);
- case float32Tag$1:
- case float64Tag$1:
- case int8Tag$1:
- case int16Tag$1:
- case int32Tag$1:
- case uint8Tag$1:
- case uint8ClampedTag$1:
- case uint16Tag$1:
- case uint32Tag$1: return cloneTypedArray(object, isDeep);
- case mapTag$3: return new Ctor();
- case numberTag$2:
- case stringTag$2: return new Ctor(object);
- case regexpTag$2: return cloneRegExp(object);
- case setTag$3: return new Ctor();
- case symbolTag$2: return cloneSymbol(object);
- }
- }
- //#endregion
- //#region node_modules/lodash-es/_initCloneObject.js
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsMap.js
- /** `Object#toString` result references. */
- var mapTag$2 = "[object Map]";
- /**
- * The base implementation of `_.isMap` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
- */
- function baseIsMap(value) {
- return isObjectLike(value) && _getTag_default(value) == mapTag$2;
- }
- //#endregion
- //#region node_modules/lodash-es/isMap.js
- var nodeIsMap = nodeUtil && nodeUtil.isMap;
- /**
- * Checks if `value` is classified as a `Map` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
- * @example
- *
- * _.isMap(new Map);
- * // => true
- *
- * _.isMap(new WeakMap);
- * // => false
- */
- var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
- //#endregion
- //#region node_modules/lodash-es/_baseIsSet.js
- /** `Object#toString` result references. */
- var setTag$2 = "[object Set]";
- /**
- * The base implementation of `_.isSet` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
- */
- function baseIsSet(value) {
- return isObjectLike(value) && _getTag_default(value) == setTag$2;
- }
- //#endregion
- //#region node_modules/lodash-es/isSet.js
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
- /**
- * Checks if `value` is classified as a `Set` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
- * @example
- *
- * _.isSet(new Set);
- * // => true
- *
- * _.isSet(new WeakSet);
- * // => false
- */
- var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
- //#endregion
- //#region node_modules/lodash-es/_baseClone.js
- /** Used to compose bitmasks for cloning. */
- var CLONE_DEEP_FLAG$2 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$2 = 4;
- /** `Object#toString` result references. */
- var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
- var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
- /**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Deep clone
- * 2 - Flatten inherited properties
- * 4 - Clone symbols
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, bitmask, customizer, key, object, stack) {
- var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
- if (customizer) result = object ? customizer(value, key, object, stack) : customizer(value);
- if (result !== void 0) return result;
- if (!isObject$1(value)) return value;
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) return copyArray(value, result);
- } else {
- var tag = _getTag_default(value), isFunc = tag == funcTag || tag == genTag;
- if (isBuffer(value)) return cloneBuffer(value, isDeep);
- if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
- result = isFlat || isFunc ? {} : initCloneObject(value);
- if (!isDeep) return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
- } else {
- if (!cloneableTags[tag]) return object ? value : {};
- result = initCloneByTag(value, tag, isDeep);
- }
- }
- stack || (stack = new Stack());
- var stacked = stack.get(value);
- if (stacked) return stacked;
- stack.set(value, result);
- if (isSet(value)) value.forEach(function(subValue) {
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
- });
- else if (isMap(value)) value.forEach(function(subValue, key) {
- result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- var props = isArr ? void 0 : (isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys)(value);
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/cloneDeep.js
- /** Used to compose bitmasks for cloning. */
- var CLONE_DEEP_FLAG$1 = 1, CLONE_SYMBOLS_FLAG$1 = 4;
- /**
- * This method is like `_.clone` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @returns {*} Returns the deep cloned value.
- * @see _.clone
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var deep = _.cloneDeep(objects);
- * console.log(deep[0] === objects[0]);
- * // => false
- */
- function cloneDeep(value) {
- return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
- }
- //#endregion
- //#region node_modules/lodash-es/_setCacheAdd.js
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
- /**
- * Adds `value` to the array cache.
- *
- * @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
- */
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
- }
- //#endregion
- //#region node_modules/lodash-es/_setCacheHas.js
- /**
- * Checks if `value` is in the array cache.
- *
- * @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function setCacheHas(value) {
- return this.__data__.has(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_SetCache.js
- /**
- *
- * Creates an array cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1, length = values == null ? 0 : values.length;
- this.__data__ = new MapCache();
- while (++index < length) this.add(values[index]);
- }
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
- //#endregion
- //#region node_modules/lodash-es/_arraySome.js
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) if (predicate(array[index], index, array)) return true;
- return false;
- }
- //#endregion
- //#region node_modules/lodash-es/_cacheHas.js
- /**
- * Checks if a `cache` value for `key` exists.
- *
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function cacheHas(cache, key) {
- return cache.has(key);
- }
- //#endregion
- //#region node_modules/lodash-es/_equalArrays.js
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) return false;
- var arrStacked = stack.get(array);
- var othStacked = stack.get(other);
- if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
- var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
- stack.set(array, other);
- stack.set(other, array);
- while (++index < arrLength) {
- var arrValue = array[index], othValue = other[index];
- if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
- if (compared !== void 0) {
- if (compared) continue;
- result = false;
- break;
- }
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
- })) {
- result = false;
- break;
- }
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- result = false;
- break;
- }
- }
- stack["delete"](array);
- stack["delete"](other);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_mapToArray.js
- /**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
- function mapToArray(map) {
- var index = -1, result = Array(map.size);
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_setToArray.js
- /**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
- function setToArray(set) {
- var index = -1, result = Array(set.size);
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_equalByTag.js
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
- /** `Object#toString` result references. */
- var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
- case dataViewTag:
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) return false;
- object = object.buffer;
- other = other.buffer;
- case arrayBufferTag:
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) return false;
- return true;
- case boolTag:
- case dateTag:
- case numberTag: return eq(+object, +other);
- case errorTag: return object.name == other.name && object.message == other.message;
- case regexpTag:
- case stringTag: return object == other + "";
- case mapTag: var convert = mapToArray;
- case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
- convert || (convert = setToArray);
- if (object.size != other.size && !isPartial) return false;
- var stacked = stack.get(object);
- if (stacked) return stacked == other;
- bitmask |= COMPARE_UNORDERED_FLAG$2;
- stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
- stack["delete"](object);
- return result;
- case symbolTag: if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- return false;
- }
- //#endregion
- //#region node_modules/lodash-es/_equalObjects.js
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG$3 = 1;
- /** Used to check objects for own properties. */
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length;
- if (objLength != getAllKeys(other).length && !isPartial) return false;
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) return false;
- }
- var objStacked = stack.get(object);
- var othStacked = stack.get(other);
- if (objStacked && othStacked) return objStacked == other && othStacked == object;
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key], othValue = other[key];
- if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
- if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == "constructor");
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor, othCtor = other.constructor;
- if (objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) result = false;
- }
- stack["delete"](object);
- stack["delete"](other);
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsEqualDeep.js
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG$2 = 1;
- /** `Object#toString` result references. */
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
- /** Used to check objects for own properties. */
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : _getTag_default(object), othTag = othIsArr ? arrayTag : _getTag_default(other);
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
- var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
- if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) return false;
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack());
- return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
- var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
- stack || (stack = new Stack());
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
- }
- }
- if (!isSameTag) return false;
- stack || (stack = new Stack());
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsEqual.js
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) return true;
- if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) return value !== value && other !== other;
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIsMatch.js
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
- /**
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Array} matchData The property names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length, length = index, noCustomizer = !customizer;
- if (object == null) return !length;
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return false;
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0], objValue = object[key], srcValue = data[1];
- if (noCustomizer && data[2]) {
- if (objValue === void 0 && !(key in object)) return false;
- } else {
- var stack = new Stack();
- if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
- if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) return false;
- }
- }
- return true;
- }
- //#endregion
- //#region node_modules/lodash-es/_isStrictComparable.js
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject$1(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_getMatchData.js
- /**
- * Gets the property names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = keys(object), length = result.length;
- while (length--) {
- var key = result[length], value = object[key];
- result[length] = [
- key,
- value,
- isStrictComparable(value)
- ];
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_matchesStrictComparable.js
- /**
- * A specialized version of `matchesProperty` for source values suitable
- * for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
- function matchesStrictComparable(key, srcValue) {
- return function(object) {
- if (object == null) return false;
- return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_baseMatches.js
- /**
- * The base implementation of `_.matches` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) return matchesStrictComparable(matchData[0][0], matchData[0][1]);
- return function(object) {
- return object === source || baseIsMatch(object, source, matchData);
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_baseHasIn.js
- /**
- * The base implementation of `_.hasIn` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHasIn(object, key) {
- return object != null && key in Object(object);
- }
- //#endregion
- //#region node_modules/lodash-es/_hasPath.js
- /**
- * Checks if `path` exists on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @param {Function} hasFunc The function to check properties.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- */
- function hasPath(object, path, hasFunc) {
- path = castPath(path, object);
- var index = -1, length = path.length, result = false;
- while (++index < length) {
- var key = toKey(path[index]);
- if (!(result = object != null && hasFunc(object, key))) break;
- object = object[key];
- }
- if (result || ++index != length) return result;
- length = object == null ? 0 : object.length;
- return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
- }
- //#endregion
- //#region node_modules/lodash-es/hasIn.js
- /**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b');
- * // => true
- *
- * _.hasIn(object, ['a', 'b']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
- function hasIn(object, path) {
- return object != null && hasPath(object, path, baseHasIn);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseMatchesProperty.js
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
- /**
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatchesProperty(path, srcValue) {
- if (isKey(path) && isStrictComparable(srcValue)) return matchesStrictComparable(toKey(path), srcValue);
- return function(object) {
- var objValue = get(object, path);
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_baseProperty.js
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? void 0 : object[key];
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_basePropertyDeep.js
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function basePropertyDeep(path) {
- return function(object) {
- return baseGet(object, path);
- };
- }
- //#endregion
- //#region node_modules/lodash-es/property.js
- /**
- * Creates a function that returns the value at `path` of a given object.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': 2 } },
- * { 'a': { 'b': 1 } }
- * ];
- *
- * _.map(objects, _.property('a.b'));
- * // => [2, 1]
- *
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
- * // => [1, 2]
- */
- function property(path) {
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseIteratee.js
- /**
- * The base implementation of `_.iteratee`.
- *
- * @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
- */
- function baseIteratee(value) {
- if (typeof value == "function") return value;
- if (value == null) return identity;
- if (typeof value == "object") return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
- return property(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_createBaseFor.js
- /**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) break;
- }
- return object;
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_baseFor.js
- /**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
- //#endregion
- //#region node_modules/lodash-es/_baseForOwn.js
- /**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
- //#endregion
- //#region node_modules/lodash-es/_createBaseEach.js
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) return collection;
- if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
- var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
- while (fromRight ? index-- : ++index < length) if (iteratee(iterable[index], index, iterable) === false) break;
- return collection;
- };
- }
- //#endregion
- //#region node_modules/lodash-es/_baseEach.js
- /**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
- //#endregion
- //#region node_modules/lodash-es/now.js
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
- var now = function() {
- return root.Date.now();
- };
- //#endregion
- //#region node_modules/lodash-es/debounce.js
- /** Error message constants. */
- var FUNC_ERROR_TEXT$1 = "Expected a function";
- var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
- if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
- wait = toNumber(wait) || 0;
- if (isObject$1(options)) {
- leading = !!options.leading;
- maxing = "maxWait" in options;
- maxWait = maxing ? nativeMax$1(toNumber(options.maxWait) || 0, wait) : maxWait;
- trailing = "trailing" in options ? !!options.trailing : trailing;
- }
- function invokeFunc(time) {
- var args = lastArgs, thisArg = lastThis;
- lastArgs = lastThis = void 0;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
- function leadingEdge(time) {
- lastInvokeTime = time;
- timerId = setTimeout(timerExpired, wait);
- return leading ? invokeFunc(time) : result;
- }
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
- return maxing ? nativeMin$1(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
- }
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
- }
- function timerExpired() {
- var time = now();
- if (shouldInvoke(time)) return trailingEdge(time);
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
- function trailingEdge(time) {
- timerId = void 0;
- if (trailing && lastArgs) return invokeFunc(time);
- lastArgs = lastThis = void 0;
- return result;
- }
- function cancel() {
- if (timerId !== void 0) clearTimeout(timerId);
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = void 0;
- }
- function flush() {
- return timerId === void 0 ? result : trailingEdge(now());
- }
- function debounced() {
- var time = now(), isInvoking = shouldInvoke(time);
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
- if (isInvoking) {
- if (timerId === void 0) return leadingEdge(lastCallTime);
- if (maxing) {
- clearTimeout(timerId);
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === void 0) timerId = setTimeout(timerExpired, wait);
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
- //#endregion
- //#region node_modules/lodash-es/_assignMergeValue.js
- /**
- * This function is like `assignValue` except that it doesn't assign
- * `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignMergeValue(object, key, value) {
- if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
- }
- //#endregion
- //#region node_modules/lodash-es/isArrayLikeObject.js
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
- //#endregion
- //#region node_modules/lodash-es/_safeGet.js
- /**
- * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function safeGet(object, key) {
- if (key === "constructor" && typeof object[key] === "function") return;
- if (key == "__proto__") return;
- return object[key];
- }
- //#endregion
- //#region node_modules/lodash-es/toPlainObject.js
- /**
- * Converts `value` to a plain object flattening inherited enumerable string
- * keyed properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return copyObject(value, keysIn(value));
- }
- //#endregion
- //#region node_modules/lodash-es/_baseMergeDeep.js
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
- if (stacked) {
- assignMergeValue(object, key, stacked);
- return;
- }
- var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
- var isCommon = newValue === void 0;
- if (isCommon) {
- var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
- newValue = srcValue;
- if (isArr || isBuff || isTyped) if (isArray(objValue)) newValue = objValue;
- else if (isArrayLikeObject(objValue)) newValue = copyArray(objValue);
- else if (isBuff) {
- isCommon = false;
- newValue = cloneBuffer(srcValue, true);
- } else if (isTyped) {
- isCommon = false;
- newValue = cloneTypedArray(srcValue, true);
- } else newValue = [];
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- newValue = objValue;
- if (isArguments(objValue)) newValue = toPlainObject(objValue);
- else if (!isObject$1(objValue) || isFunction(objValue)) newValue = initCloneObject(srcValue);
- } else isCommon = false;
- }
- if (isCommon) {
- stack.set(srcValue, newValue);
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- stack["delete"](srcValue);
- }
- assignMergeValue(object, key, newValue);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseMerge.js
- /**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) return;
- baseFor(source, function(srcValue, key) {
- stack || (stack = new Stack());
- if (isObject$1(srcValue)) baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- else {
- var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
- if (newValue === void 0) newValue = srcValue;
- assignMergeValue(object, key, newValue);
- }
- }, keysIn);
- }
- //#endregion
- //#region node_modules/lodash-es/_arrayIncludesWith.js
- /**
- * This function is like `arrayIncludes` except that it accepts a comparator.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludesWith(array, value, comparator) {
- var index = -1, length = array == null ? 0 : array.length;
- while (++index < length) if (comparator(value, array[index])) return true;
- return false;
- }
- //#endregion
- //#region node_modules/lodash-es/last.js
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array == null ? 0 : array.length;
- return length ? array[length - 1] : void 0;
- }
- //#endregion
- //#region node_modules/lodash-es/findLastIndex.js
- var nativeMax = Math.max, nativeMin = Math.min;
- /**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=array.length-1] The index to search from.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
- * // => 2
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastIndex(users, ['active', false]);
- * // => 2
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastIndex(users, 'active');
- * // => 0
- */
- function findLastIndex(array, predicate, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) return -1;
- var index = length - 1;
- if (fromIndex !== void 0) {
- index = toInteger(fromIndex);
- index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
- }
- return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
- }
- //#endregion
- //#region node_modules/lodash-es/_baseMap.js
- /**
- * The base implementation of `_.map` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/map.js
- /**
- * Creates an array of values by running each element in `collection` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
- * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
- * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * _.map([4, 8], square);
- * // => [16, 64]
- *
- * _.map({ 'a': 4, 'b': 8 }, square);
- * // => [16, 64] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee) {
- return (isArray(collection) ? arrayMap : baseMap)(collection, baseIteratee(iteratee, 3));
- }
- //#endregion
- //#region node_modules/lodash-es/flatMap.js
- /**
- * Creates a flattened array of values by running each element in `collection`
- * thru `iteratee` and flattening the mapped results. The iteratee is invoked
- * with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [n, n];
- * }
- *
- * _.flatMap([1, 2], duplicate);
- * // => [1, 1, 2, 2]
- */
- function flatMap(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), 1);
- }
- //#endregion
- //#region node_modules/lodash-es/flattenDeep.js
- /** Used as references for various `Number` constants. */
- var INFINITY = Infinity;
- /**
- * Recursively flattens `array`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, [3, [4]], 5]]);
- * // => [1, 2, 3, 4, 5]
- */
- function flattenDeep(array) {
- return (array == null ? 0 : array.length) ? baseFlatten(array, INFINITY) : [];
- }
- //#endregion
- //#region node_modules/lodash-es/fromPairs.js
- /**
- * The inverse of `_.toPairs`; this method returns an object composed
- * from key-value `pairs`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} pairs The key-value pairs.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.fromPairs([['a', 1], ['b', 2]]);
- * // => { 'a': 1, 'b': 2 }
- */
- function fromPairs(pairs) {
- var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
- while (++index < length) {
- var pair = pairs[index];
- result[pair[0]] = pair[1];
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_parent.js
- /**
- * Gets the parent value at `path` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path to get the parent value of.
- * @returns {*} Returns the parent value.
- */
- function parent(object, path) {
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
- }
- //#endregion
- //#region node_modules/lodash-es/isEqual.js
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are compared by strict equality, i.e. `===`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual$1(value, other) {
- return baseIsEqual(value, other);
- }
- //#endregion
- //#region node_modules/lodash-es/isNil.js
- /**
- * Checks if `value` is `null` or `undefined`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
- * @example
- *
- * _.isNil(null);
- * // => true
- *
- * _.isNil(void 0);
- * // => true
- *
- * _.isNil(NaN);
- * // => false
- */
- function isNil(value) {
- return value == null;
- }
- //#endregion
- //#region node_modules/lodash-es/isNull.js
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
- //#endregion
- //#region node_modules/lodash-es/isUndefined.js
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined$1(value) {
- return value === void 0;
- }
- //#endregion
- //#region node_modules/lodash-es/merge.js
- /**
- * This method is like `_.assign` except that it recursively merges own and
- * inherited enumerable string keyed properties of source objects into the
- * destination object. Source properties that resolve to `undefined` are
- * skipped if a destination value exists. Array and plain object properties
- * are merged recursively. Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
- * };
- *
- * var other = {
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
- * };
- *
- * _.merge(object, other);
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
- */
- var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex);
- });
- //#endregion
- //#region node_modules/lodash-es/_baseUnset.js
- /** Used to check objects for own properties. */
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- /**
- * The base implementation of `_.unset`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The property path to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- */
- function baseUnset(object, path) {
- path = castPath(path, object);
- var index = -1, length = path.length;
- if (!length) return true;
- var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
- while (++index < length) {
- var key = path[index];
- if (typeof key !== "string") continue;
- if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) return false;
- if (key === "constructor" && index + 1 < length && typeof path[index + 1] === "string" && path[index + 1] === "prototype") {
- if (isRootPrimitive && index === 0) continue;
- return false;
- }
- }
- var obj = parent(object, path);
- return obj == null || delete obj[toKey(last(path))];
- }
- //#endregion
- //#region node_modules/lodash-es/_customOmitClone.js
- /**
- * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
- * objects.
- *
- * @private
- * @param {*} value The value to inspect.
- * @param {string} key The key of the property to inspect.
- * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
- */
- function customOmitClone(value) {
- return isPlainObject(value) ? void 0 : value;
- }
- //#endregion
- //#region node_modules/lodash-es/omit.js
- /** Used to compose bitmasks for cloning. */
- var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable property paths of `object` that are not omitted.
- *
- * **Note:** This method is considerably slower than `_.pick`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [paths] The property paths to omit.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omit(object, ['a', 'c']);
- * // => { 'b': '2' }
- */
- var omit = flatRest(function(object, paths) {
- var result = {};
- if (object == null) return result;
- var isDeep = false;
- paths = arrayMap(paths, function(path) {
- path = castPath(path, object);
- isDeep || (isDeep = path.length > 1);
- return path;
- });
- copyObject(object, getAllKeysIn(object), result);
- if (isDeep) result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
- var length = paths.length;
- while (length--) baseUnset(result, paths[length]);
- return result;
- });
- //#endregion
- //#region node_modules/lodash-es/_baseSet.js
- /**
- * The base implementation of `_.set`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
- function baseSet(object, path, value, customizer) {
- if (!isObject$1(object)) return object;
- path = castPath(path, object);
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
- while (nested != null && ++index < length) {
- var key = toKey(path[index]), newValue = value;
- if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
- if (index != lastIndex) {
- var objValue = nested[key];
- newValue = customizer ? customizer(objValue, key, nested) : void 0;
- if (newValue === void 0) newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
- }
- assignValue(nested, key, newValue);
- nested = nested[key];
- }
- return object;
- }
- //#endregion
- //#region node_modules/lodash-es/_basePickBy.js
- /**
- * The base implementation of `_.pickBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} paths The property paths to pick.
- * @param {Function} predicate The function invoked per property.
- * @returns {Object} Returns the new object.
- */
- function basePickBy(object, paths, predicate) {
- var index = -1, length = paths.length, result = {};
- while (++index < length) {
- var path = paths[index], value = baseGet(object, path);
- if (predicate(value, path)) baseSet(result, castPath(path, object), value);
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/_basePick.js
- /**
- * The base implementation of `_.pick` without support for individual
- * property identifiers.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} paths The property paths to pick.
- * @returns {Object} Returns the new object.
- */
- function basePick(object, paths) {
- return basePickBy(object, paths, function(value, path) {
- return hasIn(object, path);
- });
- }
- //#endregion
- //#region node_modules/lodash-es/pick.js
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [paths] The property paths to pick.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
- */
- var pick = flatRest(function(object, paths) {
- return object == null ? {} : basePick(object, paths);
- });
- //#endregion
- //#region node_modules/lodash-es/set.js
- /**
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
- * it's created. Arrays are created for missing index properties while objects
- * are created for all other missing properties. Use `_.setWith` to customize
- * `path` creation.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, ['x', '0', 'y', 'z'], 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- return object == null ? object : baseSet(object, path, value);
- }
- //#endregion
- //#region node_modules/lodash-es/throttle.js
- /** Error message constants. */
- var FUNC_ERROR_TEXT = "Expected a function";
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide `options` to indicate whether `func`
- * should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true, trailing = true;
- if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
- if (isObject$1(options)) {
- leading = "leading" in options ? !!options.leading : leading;
- trailing = "trailing" in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- "leading": leading,
- "maxWait": wait,
- "trailing": trailing
- });
- }
- //#endregion
- //#region node_modules/lodash-es/_createSet.js
- /**
- * Creates a set object of `values`.
- *
- * @private
- * @param {Array} values The values to add to the set.
- * @returns {Object} Returns the new set.
- */
- var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == Infinity) ? noop$1 : function(values) {
- return new Set$1(values);
- };
- //#endregion
- //#region node_modules/lodash-es/_baseUniq.js
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /**
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseUniq(array, iteratee, comparator) {
- var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
- if (comparator) {
- isCommon = false;
- includes = arrayIncludesWith;
- } else if (length >= LARGE_ARRAY_SIZE) {
- var set = iteratee ? null : createSet(array);
- if (set) return setToArray(set);
- isCommon = false;
- includes = cacheHas;
- seen = new SetCache();
- } else seen = iteratee ? [] : result;
- outer: while (++index < length) {
- var value = array[index], computed = iteratee ? iteratee(value) : value;
- value = comparator || value !== 0 ? value : 0;
- if (isCommon && computed === computed) {
- var seenIndex = seen.length;
- while (seenIndex--) if (seen[seenIndex] === computed) continue outer;
- if (iteratee) seen.push(computed);
- result.push(value);
- } else if (!includes(seen, computed, comparator)) {
- if (seen !== result) seen.push(computed);
- result.push(value);
- }
- }
- return result;
- }
- //#endregion
- //#region node_modules/lodash-es/union.js
- /**
- * Creates an array of unique values, in order, from all given arrays using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([2], [1, 2]);
- * // => [2, 1]
- */
- var union = baseRest(function(arrays) {
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
- });
- //#endregion
- //#region node_modules/element-plus/es/utils/types.mjs
- var isUndefined = (val) => val === void 0;
- var isBoolean = (val) => typeof val === "boolean";
- var isNumber = (val) => typeof val === "number";
- var isEmpty = (val) => !val && val !== 0 || isArray$1(val) && val.length === 0 || isObject$2(val) && !Object.keys(val).length;
- var isElement$1 = (e) => {
- if (typeof Element === "undefined") return false;
- return e instanceof Element;
- };
- var isPropAbsent = (prop) => isNil(prop);
- var isStringNumber = (val) => {
- if (!isString(val)) return false;
- return !Number.isNaN(Number(val));
- };
- var isWindow = (val) => val === window;
- //#endregion
- //#region node_modules/element-plus/es/utils/objects.mjs
- var keysOf = (arr) => Object.keys(arr);
- var entriesOf = (arr) => Object.entries(arr);
- var getProp = (obj, path, defaultValue) => {
- return {
- get value() {
- return get(obj, path, defaultValue);
- },
- set value(val) {
- set(obj, path, val);
- }
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/props/runtime.mjs
- var epPropKey = "__epPropKey";
- var definePropType = (val) => val;
- var isEpProp = (val) => isObject$2(val) && !!val["__epPropKey"];
- /**
- * @description Build prop. It can better optimize prop types
- * @description 生成 prop,能更好地优化类型
- * @example
- // limited options
- // the type will be PropType<'light' | 'dark'>
- buildProp({
- type: String,
- values: ['light', 'dark'],
- } as const)
- * @example
- // limited options and other types
- // the type will be PropType<'small' | 'large' | number>
- buildProp({
- type: [String, Number],
- values: ['small', 'large'],
- validator: (val: unknown): val is number => typeof val === 'number',
- } as const)
- @link see more: https://github.com/element-plus/element-plus/pull/3341
- */
- var buildProp = (prop, key) => {
- if (!isObject$2(prop) || isEpProp(prop)) return prop;
- const { values, required, default: defaultValue, type, validator } = prop;
- const epProp = {
- type,
- required: !!required,
- validator: values || validator ? (val) => {
- let valid = false;
- let allowedValues = [];
- if (values) {
- allowedValues = Array.from(values);
- if (hasOwn(prop, "default")) allowedValues.push(defaultValue);
- valid ||= allowedValues.includes(val);
- }
- if (validator) valid ||= validator(val);
- if (!valid && allowedValues.length > 0) {
- const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
- warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
- }
- return valid;
- } : void 0,
- [epPropKey]: true
- };
- if (hasOwn(prop, "default")) epProp.default = defaultValue;
- return epProp;
- };
- var buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
- //#endregion
- //#region node_modules/element-plus/es/components/teleport/src/teleport.mjs
- var teleportProps = buildProps({
- to: {
- type: definePropType([String, Object]),
- required: true
- },
- disabled: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/affix/src/affix.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AffixProps` instead.
- */
- var affixProps = buildProps({
- zIndex: {
- type: definePropType([Number, String]),
- default: 100
- },
- target: {
- type: String,
- default: ""
- },
- offset: {
- type: Number,
- default: 0
- },
- position: {
- type: String,
- values: ["top", "bottom"],
- default: "top"
- },
- teleported: Boolean,
- appendTo: {
- type: teleportProps.to.type,
- default: "body"
- }
- });
- var affixEmits = {
- scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
- [CHANGE_EVENT]: (fixed) => isBoolean(fixed)
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/error.mjs
- var ElementPlusError = class extends Error {
- constructor(m) {
- super(m);
- this.name = "ElementPlusError";
- }
- };
- function throwError(scope, m) {
- throw new ElementPlusError(`[${scope}] ${m}`);
- }
- function debugWarn(scope, message) {
- {
- const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
- console.warn(error);
- }
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-attrs/index.mjs
- var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
- var LISTENER_PREFIX = /^on[A-Z]/;
- var useAttrs = (params = {}) => {
- const { excludeListeners = false, excludeKeys } = params;
- const allExcludeKeys = computed(() => {
- return (excludeKeys?.value || []).concat(DEFAULT_EXCLUDE_KEYS);
- });
- const instance = getCurrentInstance();
- if (!instance) {
- debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
- return computed(() => ({}));
- }
- return computed(() => fromPairs(Object.entries(instance.proxy?.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key)))));
- };
- //#endregion
- //#region node_modules/@vueuse/shared/index.mjs
- function computedEager(fn, options) {
- var _a;
- const result = shallowRef();
- watchEffect(() => {
- result.value = fn();
- }, {
- ...options,
- flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
- });
- return readonly(result);
- }
- function tryOnScopeDispose(fn) {
- if (getCurrentScope()) {
- onScopeDispose(fn);
- return true;
- }
- return false;
- }
- function toValue(r) {
- return typeof r === "function" ? r() : unref(r);
- }
- function toReactive(objectRef) {
- if (!isRef(objectRef)) return reactive(objectRef);
- return reactive(new Proxy({}, {
- get(_, p, receiver) {
- return unref(Reflect.get(objectRef.value, p, receiver));
- },
- set(_, p, value) {
- if (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;
- else objectRef.value[p] = value;
- return true;
- },
- deleteProperty(_, p) {
- return Reflect.deleteProperty(objectRef.value, p);
- },
- has(_, p) {
- return Reflect.has(objectRef.value, p);
- },
- ownKeys() {
- return Object.keys(objectRef.value);
- },
- getOwnPropertyDescriptor() {
- return {
- enumerable: true,
- configurable: true
- };
- }
- }));
- }
- function reactiveComputed(fn) {
- return toReactive(computed(fn));
- }
- var isClient = typeof window !== "undefined" && typeof document !== "undefined";
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
- var isDef = (val) => typeof val !== "undefined";
- var notNullish = (val) => val != null;
- var toString = Object.prototype.toString;
- var isObject = (val) => toString.call(val) === "[object Object]";
- var clamp$1 = (n, min, max) => Math.min(max, Math.max(min, n));
- var noop = () => {};
- var isIOS = /* @__PURE__ */ getIsIOS();
- function getIsIOS() {
- var _a, _b;
- return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
- }
- function createFilterWrapper(filter, fn) {
- function wrapper(...args) {
- return new Promise((resolve, reject) => {
- Promise.resolve(filter(() => fn.apply(this, args), {
- fn,
- thisArg: this,
- args
- })).then(resolve).catch(reject);
- });
- }
- return wrapper;
- }
- function debounceFilter(ms, options = {}) {
- let timer;
- let maxTimer;
- let lastRejector = noop;
- const _clearTimeout = (timer2) => {
- clearTimeout(timer2);
- lastRejector();
- lastRejector = noop;
- };
- const filter = (invoke) => {
- const duration = toValue(ms);
- const maxDuration = toValue(options.maxWait);
- if (timer) _clearTimeout(timer);
- if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
- if (maxTimer) {
- _clearTimeout(maxTimer);
- maxTimer = null;
- }
- return Promise.resolve(invoke());
- }
- return new Promise((resolve, reject) => {
- lastRejector = options.rejectOnCancel ? reject : resolve;
- if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
- if (timer) _clearTimeout(timer);
- maxTimer = null;
- resolve(invoke());
- }, maxDuration);
- timer = setTimeout(() => {
- if (maxTimer) _clearTimeout(maxTimer);
- maxTimer = null;
- resolve(invoke());
- }, duration);
- });
- };
- return filter;
- }
- function throttleFilter(...args) {
- let lastExec = 0;
- let timer;
- let isLeading = true;
- let lastRejector = noop;
- let lastValue;
- let ms;
- let trailing;
- let leading;
- let rejectOnCancel;
- if (!isRef(args[0]) && typeof args[0] === "object") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);
- else [ms, trailing = true, leading = true, rejectOnCancel = false] = args;
- const clear = () => {
- if (timer) {
- clearTimeout(timer);
- timer = void 0;
- lastRejector();
- lastRejector = noop;
- }
- };
- const filter = (_invoke) => {
- const duration = toValue(ms);
- const elapsed = Date.now() - lastExec;
- const invoke = () => {
- return lastValue = _invoke();
- };
- clear();
- if (duration <= 0) {
- lastExec = Date.now();
- return invoke();
- }
- if (elapsed > duration && (leading || !isLeading)) {
- lastExec = Date.now();
- invoke();
- } else if (trailing) lastValue = new Promise((resolve, reject) => {
- lastRejector = rejectOnCancel ? reject : resolve;
- timer = setTimeout(() => {
- lastExec = Date.now();
- isLeading = true;
- resolve(invoke());
- clear();
- }, Math.max(0, duration - elapsed));
- });
- if (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);
- isLeading = false;
- return lastValue;
- };
- return filter;
- }
- function cacheStringFunction(fn) {
- const cache = /* @__PURE__ */ Object.create(null);
- return (str) => {
- return cache[str] || (cache[str] = fn(str));
- };
- }
- var hyphenateRE = /\B([A-Z])/g;
- cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
- var camelizeRE = /-(\w)/g;
- cacheStringFunction((str) => {
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
- });
- function getLifeCycleTarget(target) {
- return target || getCurrentInstance();
- }
- function useDebounceFn(fn, ms = 200, options = {}) {
- return createFilterWrapper(debounceFilter(ms, options), fn);
- }
- function refDebounced(value, ms = 200, options = {}) {
- const debounced = ref(value.value);
- const updater = useDebounceFn(() => {
- debounced.value = value.value;
- }, ms, options);
- watch(value, () => updater());
- return debounced;
- }
- function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
- return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
- }
- function tryOnMounted(fn, sync = true, target) {
- if (getLifeCycleTarget()) onMounted(fn, target);
- else if (sync) fn();
- else nextTick(fn);
- }
- function useTimeoutFn(cb, interval, options = {}) {
- const { immediate = true } = options;
- const isPending = ref(false);
- let timer = null;
- function clear() {
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- }
- function stop() {
- isPending.value = false;
- clear();
- }
- function start(...args) {
- clear();
- isPending.value = true;
- timer = setTimeout(() => {
- isPending.value = false;
- timer = null;
- cb(...args);
- }, toValue(interval));
- }
- if (immediate) {
- isPending.value = true;
- if (isClient) start();
- }
- tryOnScopeDispose(stop);
- return {
- isPending: readonly(isPending),
- start,
- stop
- };
- }
- //#endregion
- //#region node_modules/@vueuse/core/index.mjs
- var defaultWindow = isClient ? window : void 0;
- var defaultDocument = isClient ? window.document : void 0;
- isClient && window.navigator;
- isClient && window.location;
- function unrefElement(elRef) {
- var _a;
- const plain = toValue(elRef);
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
- }
- function useEventListener(...args) {
- let target;
- let events;
- let listeners;
- let options;
- if (typeof args[0] === "string" || Array.isArray(args[0])) {
- [events, listeners, options] = args;
- target = defaultWindow;
- } else [target, events, listeners, options] = args;
- if (!target) return noop;
- if (!Array.isArray(events)) events = [events];
- if (!Array.isArray(listeners)) listeners = [listeners];
- const cleanups = [];
- const cleanup = () => {
- cleanups.forEach((fn) => fn());
- cleanups.length = 0;
- };
- const register = (el, event, listener, options2) => {
- el.addEventListener(event, listener, options2);
- return () => el.removeEventListener(event, listener, options2);
- };
- const stopWatch = watch(() => [unrefElement(target), toValue(options)], ([el, options2]) => {
- cleanup();
- if (!el) return;
- const optionsClone = isObject(options2) ? { ...options2 } : options2;
- cleanups.push(...events.flatMap((event) => {
- return listeners.map((listener) => register(el, event, listener, optionsClone));
- }));
- }, {
- immediate: true,
- flush: "post"
- });
- const stop = () => {
- stopWatch();
- cleanup();
- };
- tryOnScopeDispose(stop);
- return stop;
- }
- var _iOSWorkaround = false;
- function onClickOutside(target, handler, options = {}) {
- const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
- if (!window) return noop;
- if (isIOS && !_iOSWorkaround) {
- _iOSWorkaround = true;
- Array.from(window.document.body.children).forEach((el) => el.addEventListener("click", noop));
- window.document.documentElement.addEventListener("click", noop);
- }
- let shouldListen = true;
- const shouldIgnore = (event) => {
- return toValue(ignore).some((target2) => {
- if (typeof target2 === "string") return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
- else {
- const el = unrefElement(target2);
- return el && (event.target === el || event.composedPath().includes(el));
- }
- });
- };
- function hasMultipleRoots(target2) {
- const vm = toValue(target2);
- return vm && vm.$.subTree.shapeFlag === 16;
- }
- function checkMultipleRoots(target2, event) {
- const vm = toValue(target2);
- const children = vm.$.subTree && vm.$.subTree.children;
- if (children == null || !Array.isArray(children)) return false;
- return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
- }
- const listener = (event) => {
- const el = unrefElement(target);
- if (event.target == null) return;
- if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
- if (!el || el === event.target || event.composedPath().includes(el)) return;
- if (event.detail === 0) shouldListen = !shouldIgnore(event);
- if (!shouldListen) {
- shouldListen = true;
- return;
- }
- handler(event);
- };
- let isProcessingClick = false;
- const cleanup = [
- useEventListener(window, "click", (event) => {
- if (!isProcessingClick) {
- isProcessingClick = true;
- setTimeout(() => {
- isProcessingClick = false;
- }, 0);
- listener(event);
- }
- }, {
- passive: true,
- capture
- }),
- useEventListener(window, "pointerdown", (e) => {
- const el = unrefElement(target);
- shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
- }, { passive: true }),
- detectIframe && useEventListener(window, "blur", (event) => {
- setTimeout(() => {
- var _a;
- const el = unrefElement(target);
- if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window.document.activeElement))) handler(event);
- }, 0);
- })
- ].filter(Boolean);
- const stop = () => cleanup.forEach((fn) => fn());
- return stop;
- }
- function useMounted() {
- const isMounted = ref(false);
- const instance = getCurrentInstance();
- if (instance) onMounted(() => {
- isMounted.value = true;
- }, instance);
- return isMounted;
- }
- function useSupported(callback) {
- const isMounted = useMounted();
- return computed(() => {
- isMounted.value;
- return Boolean(callback());
- });
- }
- function useMutationObserver(target, callback, options = {}) {
- const { window = defaultWindow, ...mutationOptions } = options;
- let observer;
- const isSupported = useSupported(() => window && "MutationObserver" in window);
- const cleanup = () => {
- if (observer) {
- observer.disconnect();
- observer = void 0;
- }
- };
- const targets = computed(() => {
- const value = toValue(target);
- const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);
- return new Set(items);
- });
- const stopWatch = watch(() => targets.value, (targets2) => {
- cleanup();
- if (isSupported.value && targets2.size) {
- observer = new MutationObserver(callback);
- targets2.forEach((el) => observer.observe(el, mutationOptions));
- }
- }, {
- immediate: true,
- flush: "post"
- });
- const takeRecords = () => {
- return observer == null ? void 0 : observer.takeRecords();
- };
- const stop = () => {
- stopWatch();
- cleanup();
- };
- tryOnScopeDispose(stop);
- return {
- isSupported,
- stop,
- takeRecords
- };
- }
- function useActiveElement(options = {}) {
- var _a;
- const { window = defaultWindow, deep = true, triggerOnRemoval = false } = options;
- const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;
- const getDeepActiveElement = () => {
- var _a2;
- let element = document == null ? void 0 : document.activeElement;
- if (deep) while (element == null ? void 0 : element.shadowRoot) element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;
- return element;
- };
- const activeElement = ref();
- const trigger = () => {
- activeElement.value = getDeepActiveElement();
- };
- if (window) {
- useEventListener(window, "blur", (event) => {
- if (event.relatedTarget !== null) return;
- trigger();
- }, true);
- useEventListener(window, "focus", trigger, true);
- }
- if (triggerOnRemoval) useMutationObserver(document, (mutations) => {
- mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {
- if (node === activeElement.value) trigger();
- });
- }, {
- childList: true,
- subtree: true
- });
- trigger();
- return activeElement;
- }
- function useMediaQuery(query, options = {}) {
- const { window = defaultWindow } = options;
- const isSupported = useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
- let mediaQuery;
- const matches = ref(false);
- const handler = (event) => {
- matches.value = event.matches;
- };
- const cleanup = () => {
- if (!mediaQuery) return;
- if ("removeEventListener" in mediaQuery) mediaQuery.removeEventListener("change", handler);
- else mediaQuery.removeListener(handler);
- };
- const stopWatch = watchEffect(() => {
- if (!isSupported.value) return;
- cleanup();
- mediaQuery = window.matchMedia(toValue(query));
- if ("addEventListener" in mediaQuery) mediaQuery.addEventListener("change", handler);
- else mediaQuery.addListener(handler);
- matches.value = mediaQuery.matches;
- });
- tryOnScopeDispose(() => {
- stopWatch();
- cleanup();
- mediaQuery = void 0;
- });
- return matches;
- }
- function cloneFnJSON(source) {
- return JSON.parse(JSON.stringify(source));
- }
- function useCssVar(prop, target, options = {}) {
- const { window = defaultWindow, initialValue, observe = false } = options;
- const variable = ref(initialValue);
- const elRef = computed(() => {
- var _a;
- return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
- });
- function updateCssVar() {
- var _a;
- const key = toValue(prop);
- const el = toValue(elRef);
- if (el && window && key) variable.value = ((_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim()) || initialValue;
- }
- if (observe) useMutationObserver(elRef, updateCssVar, {
- attributeFilter: ["style", "class"],
- window
- });
- watch([elRef, () => toValue(prop)], (_, old) => {
- if (old[0] && old[1]) old[0].style.removeProperty(old[1]);
- updateCssVar();
- }, { immediate: true });
- watch(variable, (val) => {
- var _a;
- const raw_prop = toValue(prop);
- if (((_a = elRef.value) == null ? void 0 : _a.style) && raw_prop) if (val == null) elRef.value.style.removeProperty(raw_prop);
- else elRef.value.style.setProperty(raw_prop, val);
- });
- return variable;
- }
- function useDocumentVisibility(options = {}) {
- const { document = defaultDocument } = options;
- if (!document) return ref("visible");
- const visibility = ref(document.visibilityState);
- useEventListener(document, "visibilitychange", () => {
- visibility.value = document.visibilityState;
- });
- return visibility;
- }
- function useResizeObserver(target, callback, options = {}) {
- const { window = defaultWindow, ...observerOptions } = options;
- let observer;
- const isSupported = useSupported(() => window && "ResizeObserver" in window);
- const cleanup = () => {
- if (observer) {
- observer.disconnect();
- observer = void 0;
- }
- };
- const stopWatch = watch(computed(() => {
- const _targets = toValue(target);
- return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
- }), (els) => {
- cleanup();
- if (isSupported.value && window) {
- observer = new ResizeObserver(callback);
- for (const _el of els) if (_el) observer.observe(_el, observerOptions);
- }
- }, {
- immediate: true,
- flush: "post"
- });
- const stop = () => {
- cleanup();
- stopWatch();
- };
- tryOnScopeDispose(stop);
- return {
- isSupported,
- stop
- };
- }
- function useElementBounding(target, options = {}) {
- const { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = "sync" } = options;
- const height = ref(0);
- const bottom = ref(0);
- const left = ref(0);
- const right = ref(0);
- const top = ref(0);
- const width = ref(0);
- const x = ref(0);
- const y = ref(0);
- function recalculate() {
- const el = unrefElement(target);
- if (!el) {
- if (reset) {
- height.value = 0;
- bottom.value = 0;
- left.value = 0;
- right.value = 0;
- top.value = 0;
- width.value = 0;
- x.value = 0;
- y.value = 0;
- }
- return;
- }
- const rect = el.getBoundingClientRect();
- height.value = rect.height;
- bottom.value = rect.bottom;
- left.value = rect.left;
- right.value = rect.right;
- top.value = rect.top;
- width.value = rect.width;
- x.value = rect.x;
- y.value = rect.y;
- }
- function update() {
- if (updateTiming === "sync") recalculate();
- else if (updateTiming === "next-frame") requestAnimationFrame(() => recalculate());
- }
- useResizeObserver(target, update);
- watch(() => unrefElement(target), (ele) => !ele && update());
- useMutationObserver(target, update, { attributeFilter: ["style", "class"] });
- if (windowScroll) useEventListener("scroll", update, {
- capture: true,
- passive: true
- });
- if (windowResize) useEventListener("resize", update, { passive: true });
- tryOnMounted(() => {
- if (immediate) update();
- });
- return {
- height,
- bottom,
- left,
- right,
- top,
- width,
- x,
- y,
- update
- };
- }
- function useElementSize(target, initialSize = {
- width: 0,
- height: 0
- }, options = {}) {
- const { window = defaultWindow, box = "content-box" } = options;
- const isSVG = computed(() => {
- var _a, _b;
- return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
- });
- const width = ref(initialSize.width);
- const height = ref(initialSize.height);
- const { stop: stop1 } = useResizeObserver(target, ([entry]) => {
- const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
- if (window && isSVG.value) {
- const $elem = unrefElement(target);
- if ($elem) {
- const rect = $elem.getBoundingClientRect();
- width.value = rect.width;
- height.value = rect.height;
- }
- } else if (boxSize) {
- const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
- width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
- height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
- } else {
- width.value = entry.contentRect.width;
- height.value = entry.contentRect.height;
- }
- }, options);
- tryOnMounted(() => {
- const ele = unrefElement(target);
- if (ele) {
- width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
- height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
- }
- });
- const stop2 = watch(() => unrefElement(target), (ele) => {
- width.value = ele ? initialSize.width : 0;
- height.value = ele ? initialSize.height : 0;
- });
- function stop() {
- stop1();
- stop2();
- }
- return {
- width,
- height,
- stop
- };
- }
- function useIntersectionObserver(target, callback, options = {}) {
- const { root, rootMargin = "0px", threshold = 0, window = defaultWindow, immediate = true } = options;
- const isSupported = useSupported(() => window && "IntersectionObserver" in window);
- const targets = computed(() => {
- const _target = toValue(target);
- return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);
- });
- let cleanup = noop;
- const isActive = ref(immediate);
- const stopWatch = isSupported.value ? watch(() => [
- targets.value,
- unrefElement(root),
- isActive.value
- ], ([targets2, root2]) => {
- cleanup();
- if (!isActive.value) return;
- if (!targets2.length) return;
- const observer = new IntersectionObserver(callback, {
- root: unrefElement(root2),
- rootMargin,
- threshold
- });
- targets2.forEach((el) => el && observer.observe(el));
- cleanup = () => {
- observer.disconnect();
- cleanup = noop;
- };
- }, {
- immediate,
- flush: "post"
- }) : noop;
- const stop = () => {
- cleanup();
- stopWatch();
- isActive.value = false;
- };
- tryOnScopeDispose(stop);
- return {
- isSupported,
- isActive,
- pause() {
- cleanup();
- isActive.value = false;
- },
- resume() {
- isActive.value = true;
- },
- stop
- };
- }
- Number.POSITIVE_INFINITY;
- function useVModel(props, key, emit, options = {}) {
- var _a, _b, _c;
- const { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;
- const vm = getCurrentInstance();
- const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
- let event = eventName;
- if (!key) key = "modelValue";
- event = event || `update:${key.toString()}`;
- const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val);
- const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
- const triggerEmit = (value) => {
- if (shouldEmit) {
- if (shouldEmit(value)) _emit(event, value);
- } else _emit(event, value);
- };
- if (passive) {
- const proxy = ref(getValue());
- let isUpdating = false;
- watch(() => props[key], (v) => {
- if (!isUpdating) {
- isUpdating = true;
- proxy.value = cloneFn(v);
- nextTick(() => isUpdating = false);
- }
- });
- watch(proxy, (v) => {
- if (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);
- }, { deep });
- return proxy;
- } else return computed({
- get() {
- return getValue();
- },
- set(value) {
- triggerEmit(value);
- }
- });
- }
- function useWindowFocus(options = {}) {
- const { window = defaultWindow } = options;
- if (!window) return ref(false);
- const focused = ref(window.document.hasFocus());
- useEventListener(window, "blur", () => {
- focused.value = false;
- });
- useEventListener(window, "focus", () => {
- focused.value = true;
- });
- return focused;
- }
- function useWindowSize(options = {}) {
- const { window = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = "inner" } = options;
- const width = ref(initialWidth);
- const height = ref(initialHeight);
- const update = () => {
- if (window) if (type === "outer") {
- width.value = window.outerWidth;
- height.value = window.outerHeight;
- } else if (includeScrollbar) {
- width.value = window.innerWidth;
- height.value = window.innerHeight;
- } else {
- width.value = window.document.documentElement.clientWidth;
- height.value = window.document.documentElement.clientHeight;
- }
- };
- update();
- tryOnMounted(update);
- useEventListener("resize", update, { passive: true });
- if (listenOrientation) watch(useMediaQuery("(orientation: portrait)"), () => update());
- return {
- width,
- height
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-calc-input-width/index.mjs
- function useCalcInputWidth() {
- const calculatorRef = shallowRef();
- const calculatorWidth = ref(0);
- const inputStyle = computed(() => ({ minWidth: `${Math.max(calculatorWidth.value, 11)}px` }));
- const resetCalculatorWidth = () => {
- calculatorWidth.value = calculatorRef.value?.getBoundingClientRect().width ?? 0;
- };
- useResizeObserver(calculatorRef, resetCalculatorWidth);
- return {
- calculatorRef,
- calculatorWidth,
- inputStyle
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-deprecated/index.mjs
- var useDeprecated = ({ from, replacement, scope, version, ref, type = "API" }, condition) => {
- watch(() => unref(condition), (val) => {
- if (val) debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version}, please use ${replacement} instead.
- For more detail, please visit: ${ref}
- `);
- }, { immediate: true });
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/dom/aria.mjs
- var FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])`;
- var isShadowRoot$1 = (e) => {
- if (typeof ShadowRoot === "undefined") return false;
- return e instanceof ShadowRoot;
- };
- var isHTMLElement$1 = (e) => {
- if (typeof Element === "undefined") return false;
- return e instanceof Element;
- };
- /**
- * Determine if the testing element is visible on screen no matter if its on the viewport or not
- */
- var isVisible = (element) => {
- return getComputedStyle(element).position === "fixed" ? false : element.offsetParent !== null;
- };
- var obtainAllFocusableElements$1 = (element) => {
- return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
- };
- /**
- * @desc Determine if target element is focusable
- * @param element {HTMLElement}
- * @returns {Boolean} true if it is focusable
- */
- var isFocusable = (element) => {
- if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) return true;
- if (element.tabIndex < 0 || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true") return false;
- switch (element.nodeName) {
- case "A": return !!element.href && element.rel !== "ignore";
- case "INPUT": return !(element.type === "hidden" || element.type === "file");
- case "BUTTON":
- case "SELECT":
- case "TEXTAREA": return true;
- default: return false;
- }
- };
- /**
- * Trigger an event
- * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
- * @param {HTMLElement} elm
- * @param {String} name
- * @param {*} opts
- */
- var triggerEvent = function(elm, name, ...opts) {
- let eventName;
- if (name.includes("mouse") || name.includes("click")) eventName = "MouseEvents";
- else if (name.includes("key")) eventName = "KeyboardEvent";
- else eventName = "HTMLEvents";
- const evt = document.createEvent(eventName);
- evt.initEvent(name, ...opts);
- elm.dispatchEvent(evt);
- return elm;
- };
- var isLeaf = (el) => !el.getAttribute("aria-owns");
- var getSibling = (el, distance, elClass) => {
- const { parentNode } = el;
- if (!parentNode) return null;
- const siblings = parentNode.querySelectorAll(elClass);
- return siblings[Array.prototype.indexOf.call(siblings, el) + distance] || null;
- };
- var focusElement = (el, options) => {
- if (!el || !el.focus) return;
- let cleanup = false;
- if (isHTMLElement$1(el) && !isFocusable(el) && !el.getAttribute("tabindex")) {
- el.setAttribute("tabindex", "-1");
- cleanup = true;
- }
- el.focus(options);
- if (isHTMLElement$1(el) && cleanup) el.removeAttribute("tabindex");
- };
- var focusNode = (el) => {
- if (!el) return;
- focusElement(el);
- !isLeaf(el) && el.click();
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/browser.mjs
- var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
- var isAndroid = () => isClient && /android/i.test(window.navigator.userAgent);
- //#endregion
- //#region node_modules/element-plus/es/utils/strings.mjs
- /**
- * fork from {@link https://github.com/sindresorhus/escape-string-regexp}
- */
- var escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
- var capitalize = (str) => capitalize$1(str);
- //#endregion
- //#region node_modules/element-plus/es/utils/dom/style.mjs
- var SCOPE$12 = "utils/dom/style";
- var classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
- var hasClass = (el, cls) => {
- if (!el || !cls) return false;
- if (cls.includes(" ")) throw new Error("className should not contain space.");
- return el.classList.contains(cls);
- };
- var addClass = (el, cls) => {
- if (!el || !cls.trim()) return;
- el.classList.add(...classNameToArray(cls));
- };
- var removeClass = (el, cls) => {
- if (!el || !cls.trim()) return;
- el.classList.remove(...classNameToArray(cls));
- };
- var getStyle = (element, styleName) => {
- if (!isClient || !element || !styleName || isShadowRoot$1(element)) return "";
- let key = camelize$1(styleName);
- if (key === "float") key = "cssFloat";
- try {
- const style = element.style[key];
- if (style) return style;
- const computed = document.defaultView?.getComputedStyle(element, "");
- return computed ? computed[key] : "";
- } catch {
- return element.style[key];
- }
- };
- var setStyle = (element, styleName, value) => {
- if (!element || !styleName) return;
- if (isObject$2(styleName)) entriesOf(styleName).forEach(([prop, value]) => setStyle(element, prop, value));
- else {
- const key = camelize$1(styleName);
- element.style[key] = value;
- }
- };
- function addUnit(value, defaultUnit = "px") {
- if (!value && value !== 0) return "";
- if (isNumber(value) || isStringNumber(value)) return `${value}${defaultUnit}`;
- else if (isString(value)) return value;
- debugWarn(SCOPE$12, "binding value must be a string or number");
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-draggable/index.mjs
- var useDraggable = (targetRef, dragRef, draggable, overflow) => {
- const transform = {
- offsetX: 0,
- offsetY: 0
- };
- const isDragging = ref(false);
- const adjustPosition = (moveX, moveY) => {
- if (targetRef.value) {
- const { offsetX, offsetY } = transform;
- const targetRect = targetRef.value.getBoundingClientRect();
- const targetLeft = targetRect.left;
- const targetTop = targetRect.top;
- const targetWidth = targetRect.width;
- const targetHeight = targetRect.height;
- const clientWidth = document.documentElement.clientWidth;
- const clientHeight = document.documentElement.clientHeight;
- const minLeft = -targetLeft + offsetX;
- const minTop = -targetTop + offsetY;
- const maxLeft = clientWidth - targetLeft - targetWidth + offsetX;
- const maxTop = clientHeight - targetTop - (targetHeight < clientHeight ? targetHeight : 0) + offsetY;
- if (!overflow?.value) {
- moveX = Math.min(Math.max(moveX, minLeft), maxLeft);
- moveY = Math.min(Math.max(moveY, minTop), maxTop);
- }
- transform.offsetX = moveX;
- transform.offsetY = moveY;
- targetRef.value.style.transform = `translate(${addUnit(moveX)}, ${addUnit(moveY)})`;
- }
- };
- const onMousedown = (e) => {
- const downX = e.clientX;
- const downY = e.clientY;
- const { offsetX, offsetY } = transform;
- const onMousemove = (e) => {
- if (!isDragging.value) isDragging.value = true;
- adjustPosition(offsetX + e.clientX - downX, offsetY + e.clientY - downY);
- };
- const onMouseup = () => {
- isDragging.value = false;
- document.removeEventListener("mousemove", onMousemove);
- document.removeEventListener("mouseup", onMouseup);
- };
- document.addEventListener("mousemove", onMousemove);
- document.addEventListener("mouseup", onMouseup);
- };
- const onDraggable = () => {
- if (dragRef.value && targetRef.value) {
- dragRef.value.addEventListener("mousedown", onMousedown);
- window.addEventListener("resize", updatePosition);
- }
- };
- const offDraggable = () => {
- if (dragRef.value && targetRef.value) {
- dragRef.value.removeEventListener("mousedown", onMousedown);
- window.removeEventListener("resize", updatePosition);
- }
- };
- const resetPosition = () => {
- transform.offsetX = 0;
- transform.offsetY = 0;
- if (targetRef.value) targetRef.value.style.transform = "";
- };
- const updatePosition = () => {
- const { offsetX, offsetY } = transform;
- adjustPosition(offsetX, offsetY);
- };
- onMounted(() => {
- watchEffect(() => {
- if (draggable.value) onDraggable();
- else offDraggable();
- });
- });
- onBeforeUnmount(() => {
- offDraggable();
- });
- return {
- isDragging,
- resetPosition,
- updatePosition
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-focus/index.mjs
- var useFocus = (el) => {
- return { focus: () => {
- el.value?.focus?.();
- } };
- };
- //#endregion
- //#region node_modules/element-plus/es/locale/lang/en.mjs
- var en_default = {
- name: "en",
- el: {
- breadcrumb: { label: "Breadcrumb" },
- colorpicker: {
- confirm: "OK",
- clear: "Clear",
- defaultLabel: "color picker",
- description: "current color is {color}. press enter to select a new color.",
- alphaLabel: "pick alpha value",
- alphaDescription: "alpha {alpha}, current color is {color}",
- hueLabel: "pick hue value",
- hueDescription: "hue {hue}, current color is {color}",
- svLabel: "pick saturation and brightness value",
- svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
- predefineDescription: "select {value} as the color"
- },
- datepicker: {
- now: "Now",
- today: "Today",
- cancel: "Cancel",
- clear: "Clear",
- confirm: "OK",
- dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
- monthTablePrompt: "Use the arrow keys and enter to select the month",
- yearTablePrompt: "Use the arrow keys and enter to select the year",
- selectedDate: "Selected date",
- selectDate: "Select date",
- selectTime: "Select time",
- startDate: "Start Date",
- startTime: "Start Time",
- endDate: "End Date",
- endTime: "End Time",
- prevYear: "Previous Year",
- nextYear: "Next Year",
- prevMonth: "Previous Month",
- nextMonth: "Next Month",
- year: "",
- month1: "January",
- month2: "February",
- month3: "March",
- month4: "April",
- month5: "May",
- month6: "June",
- month7: "July",
- month8: "August",
- month9: "September",
- month10: "October",
- month11: "November",
- month12: "December",
- weeks: {
- sun: "Sun",
- mon: "Mon",
- tue: "Tue",
- wed: "Wed",
- thu: "Thu",
- fri: "Fri",
- sat: "Sat"
- },
- weeksFull: {
- sun: "Sunday",
- mon: "Monday",
- tue: "Tuesday",
- wed: "Wednesday",
- thu: "Thursday",
- fri: "Friday",
- sat: "Saturday"
- },
- months: {
- jan: "Jan",
- feb: "Feb",
- mar: "Mar",
- apr: "Apr",
- may: "May",
- jun: "Jun",
- jul: "Jul",
- aug: "Aug",
- sep: "Sep",
- oct: "Oct",
- nov: "Nov",
- dec: "Dec"
- }
- },
- inputNumber: {
- decrease: "decrease number",
- increase: "increase number"
- },
- select: {
- loading: "Loading",
- noMatch: "No matching data",
- noData: "No data",
- placeholder: "Select"
- },
- mention: { loading: "Loading" },
- dropdown: { toggleDropdown: "Toggle Dropdown" },
- cascader: {
- noMatch: "No matching data",
- loading: "Loading",
- placeholder: "Select",
- noData: "No data"
- },
- pagination: {
- goto: "Go to",
- pagesize: "/page",
- total: "Total {total}",
- pageClassifier: "",
- page: "Page",
- prev: "Go to previous page",
- next: "Go to next page",
- currentPage: "page {pager}",
- prevPages: "Previous {pager} pages",
- nextPages: "Next {pager} pages",
- deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
- },
- dialog: { close: "Close this dialog" },
- drawer: { close: "Close this dialog" },
- messagebox: {
- title: "Message",
- confirm: "OK",
- cancel: "Cancel",
- error: "Illegal input",
- close: "Close this dialog"
- },
- upload: {
- deleteTip: "press delete to remove",
- delete: "Delete",
- preview: "Preview",
- continue: "Continue"
- },
- slider: {
- defaultLabel: "slider between {min} and {max}",
- defaultRangeStartLabel: "pick start value",
- defaultRangeEndLabel: "pick end value"
- },
- table: {
- emptyText: "No Data",
- confirmFilter: "Confirm",
- resetFilter: "Reset",
- clearFilter: "All",
- sumText: "Sum",
- selectAllLabel: "Select all rows",
- selectRowLabel: "Select this row",
- expandRowLabel: "Expand this row",
- collapseRowLabel: "Collapse this row",
- sortLabel: "Sort by {column}",
- filterLabel: "Filter by {column}"
- },
- tag: { close: "Close this tag" },
- tour: {
- next: "Next",
- previous: "Previous",
- finish: "Finish",
- close: "Close this dialog"
- },
- tree: { emptyText: "No Data" },
- transfer: {
- noMatch: "No matching data",
- noData: "No data",
- titles: ["List 1", "List 2"],
- filterPlaceholder: "Enter keyword",
- noCheckedFormat: "{total} items",
- hasCheckedFormat: "{checked}/{total} checked"
- },
- image: { error: "FAILED" },
- pageHeader: { title: "Back" },
- popconfirm: {
- confirmButtonText: "Yes",
- cancelButtonText: "No"
- },
- carousel: {
- leftArrow: "Carousel arrow left",
- rightArrow: "Carousel arrow right",
- indicator: "Carousel switch to index {index}"
- }
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-locale/index.mjs
- var buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
- var translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => `${option?.[key] ?? `{${key}}`}`);
- var buildLocaleContext = (locale) => {
- return {
- lang: computed(() => unref(locale).name),
- locale: isRef(locale) ? locale : ref(locale),
- t: buildTranslator(locale)
- };
- };
- var localeContextKey = Symbol("localeContextKey");
- var useLocale = (localeOverrides) => {
- const locale = localeOverrides || inject(localeContextKey, ref());
- return buildLocaleContext(computed(() => locale.value || en_default));
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-namespace/index.mjs
- var defaultNamespace = "el";
- var statePrefix = "is-";
- var _bem = (namespace, block, blockSuffix, element, modifier) => {
- let cls = `${namespace}-${block}`;
- if (blockSuffix) cls += `-${blockSuffix}`;
- if (element) cls += `__${element}`;
- if (modifier) cls += `--${modifier}`;
- return cls;
- };
- var namespaceContextKey = Symbol("namespaceContextKey");
- var useGetDerivedNamespace = (namespaceOverrides) => {
- const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref("el")) : ref("el"));
- return computed(() => {
- return unref(derivedNamespace) || "el";
- });
- };
- var useNamespace = (block, namespaceOverrides) => {
- const namespace = useGetDerivedNamespace(namespaceOverrides);
- const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
- const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
- const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
- const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
- const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
- const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
- const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
- const is = (name, ...args) => {
- const state = args.length >= 1 ? args[0] : true;
- return name && state ? `${statePrefix}${name}` : "";
- };
- const cssVar = (object) => {
- const styles = {};
- for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
- return styles;
- };
- const cssVarBlock = (object) => {
- const styles = {};
- for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
- return styles;
- };
- const cssVarName = (name) => `--${namespace.value}-${name}`;
- const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
- return {
- namespace,
- b,
- e,
- m,
- be,
- em,
- bm,
- bem,
- is,
- cssVar,
- cssVarName,
- cssVarBlock,
- cssVarBlockName
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/easings.mjs
- function easeInOutCubic(t, b, c, d) {
- const cc = c - b;
- t /= d / 2;
- if (t < 1) return cc / 2 * t * t * t + b;
- return cc / 2 * ((t -= 2) * t * t + 2) + b;
- }
- //#endregion
- //#region node_modules/element-plus/es/utils/raf.mjs
- var rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
- var cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
- //#endregion
- //#region node_modules/element-plus/es/utils/dom/scroll.mjs
- var isScroll = (el, isVertical) => {
- if (!isClient) return false;
- const key = {
- undefined: "overflow",
- true: "overflow-y",
- false: "overflow-x"
- }[String(isVertical)];
- const overflow = getStyle(el, key);
- return [
- "scroll",
- "auto",
- "overlay"
- ].some((s) => overflow.includes(s));
- };
- var getScrollContainer = (el, isVertical) => {
- if (!isClient) return;
- let parent = el;
- while (parent) {
- if ([
- window,
- document,
- document.documentElement
- ].includes(parent)) return window;
- if (isScroll(parent, isVertical)) return parent;
- if (isShadowRoot$1(parent)) parent = parent.host;
- else parent = parent.parentNode;
- }
- return parent;
- };
- var scrollBarWidth;
- var getScrollBarWidth = (namespace) => {
- if (!isClient) return 0;
- if (scrollBarWidth !== void 0) return scrollBarWidth;
- const outer = document.createElement("div");
- outer.className = `${namespace}-scrollbar__wrap`;
- outer.style.visibility = "hidden";
- outer.style.width = "100px";
- outer.style.position = "absolute";
- outer.style.top = "-9999px";
- document.body.appendChild(outer);
- const widthNoScroll = outer.offsetWidth;
- outer.style.overflow = "scroll";
- const inner = document.createElement("div");
- inner.style.width = "100%";
- outer.appendChild(inner);
- const widthWithScroll = inner.offsetWidth;
- outer.parentNode?.removeChild(outer);
- scrollBarWidth = widthNoScroll - widthWithScroll;
- return scrollBarWidth;
- };
- /**
- * Scroll with in the container element, positioning the **selected** element at the top
- * of the container
- */
- function scrollIntoView(container, selected) {
- if (!isClient) return;
- if (!selected) {
- container.scrollTop = 0;
- return;
- }
- const offsetParents = [];
- let pointer = selected.offsetParent;
- while (pointer !== null && container !== pointer && container.contains(pointer)) {
- offsetParents.push(pointer);
- pointer = pointer.offsetParent;
- }
- const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
- const bottom = top + selected.offsetHeight;
- const viewRectTop = container.scrollTop;
- const viewRectBottom = viewRectTop + container.clientHeight;
- if (top < viewRectTop) container.scrollTop = top;
- else if (bottom > viewRectBottom) container.scrollTop = bottom - container.clientHeight;
- }
- function animateScrollTo(container, from, to, duration, callback) {
- const startTime = Date.now();
- let handle;
- const scroll = () => {
- const time = Date.now() - startTime;
- const nextScrollTop = easeInOutCubic(time > duration ? duration : time, from, to, duration);
- if (isWindow(container)) container.scrollTo(window.pageXOffset, nextScrollTop);
- else container.scrollTop = nextScrollTop;
- if (time < duration) handle = rAF(scroll);
- else if (isFunction$1(callback)) callback();
- };
- scroll();
- return () => {
- handle && cAF(handle);
- };
- }
- var getScrollElement = (target, container) => {
- if (isWindow(container)) return target.ownerDocument.documentElement;
- return container;
- };
- var getScrollTop = (container) => {
- if (isWindow(container)) return window.scrollY;
- return container.scrollTop;
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-lockscreen/index.mjs
- /**
- * Hook that monitoring the ref value to lock or unlock the screen.
- * When the trigger became true, it assumes modal is now opened and vice versa.
- * @param trigger {Ref<boolean>}
- */
- var useLockscreen = (trigger, options = {}) => {
- if (!isRef(trigger)) throwError("[useLockscreen]", "You need to pass a ref param to this function");
- const ns = options.ns || useNamespace("popup");
- const hiddenCls = computed(() => ns.bm("parent", "hidden"));
- let scrollBarWidth = 0;
- let withoutHiddenClass = false;
- let bodyWidth = "0";
- let cleaned = false;
- const cleanup = () => {
- if (cleaned) return;
- cleaned = true;
- setTimeout(() => {
- if (typeof document === "undefined") return;
- if (withoutHiddenClass && document) {
- document.body.style.width = bodyWidth;
- removeClass(document.body, hiddenCls.value);
- }
- }, 200);
- };
- watch(trigger, (val) => {
- if (!val) {
- cleanup();
- return;
- }
- cleaned = false;
- withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
- if (withoutHiddenClass) {
- bodyWidth = document.body.style.width;
- addClass(document.body, hiddenCls.value);
- }
- scrollBarWidth = getScrollBarWidth(ns.namespace.value);
- const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
- const bodyOverflowY = getStyle(document.body, "overflowY");
- if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) document.body.style.width = `calc(100% - ${scrollBarWidth}px)`;
- });
- onScopeDispose(() => cleanup());
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/dom/event.mjs
- var composeEventHandlers = (theirsHandler, oursHandler, { checkForDefaultPrevented = true } = {}) => {
- const handleEvent = (event) => {
- const shouldPrevent = theirsHandler?.(event);
- if (checkForDefaultPrevented === false || !shouldPrevent) return oursHandler?.(event);
- };
- return handleEvent;
- };
- var whenMouse = (handler) => {
- return (e) => e.pointerType === "mouse" ? handler(e) : void 0;
- };
- var getEventCode = (event) => {
- if (event.code && event.code !== "Unidentified") return event.code;
- const key = getEventKey(event);
- if (key) {
- if (Object.values(EVENT_CODE).includes(key)) return key;
- switch (key) {
- case " ": return EVENT_CODE.space;
- default: return "";
- }
- }
- return "";
- };
- var getEventKey = (event) => {
- let key = event.key && event.key !== "Unidentified" ? event.key : "";
- if (!key && event.type === "keyup" && isAndroid()) {
- const target = event.target;
- key = target.value.charAt(target.selectionStart - 1);
- }
- return key;
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-modal/index.mjs
- var modalStack = [];
- var closeModal = (e) => {
- if (modalStack.length === 0) return;
- if (getEventCode(e) === EVENT_CODE.esc) {
- e.stopPropagation();
- modalStack[modalStack.length - 1].handleClose();
- }
- };
- var useModal = (instance, visibleRef) => {
- watch(visibleRef, (val) => {
- if (val) modalStack.push(instance);
- else modalStack.splice(modalStack.indexOf(instance), 1);
- });
- };
- if (isClient) useEventListener(document, "keydown", closeModal);
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-model-toggle/index.mjs
- var _prop = buildProp({
- type: definePropType(Boolean),
- default: null
- });
- var _event = buildProp({ type: definePropType(Function) });
- var createModelToggleComposable = (name) => {
- const updateEventKey = `update:${name}`;
- const updateEventKeyRaw = `onUpdate:${name}`;
- const useModelToggleEmits = [updateEventKey];
- const useModelToggleProps = {
- [name]: _prop,
- [updateEventKeyRaw]: _event
- };
- const useModelToggle = ({ indicator, toggleReason, shouldHideWhenRouteChanges, shouldProceed, onShow, onHide }) => {
- const instance = getCurrentInstance();
- const { emit } = instance;
- const props = instance.props;
- const hasUpdateHandler = computed(() => isFunction$1(props[updateEventKeyRaw]));
- const isModelBindingAbsent = computed(() => props[name] === null);
- const doShow = (event) => {
- if (indicator.value === true) return;
- indicator.value = true;
- if (toggleReason) toggleReason.value = event;
- if (isFunction$1(onShow)) onShow(event);
- };
- const doHide = (event) => {
- if (indicator.value === false) return;
- indicator.value = false;
- if (toggleReason) toggleReason.value = event;
- if (isFunction$1(onHide)) onHide(event);
- };
- const show = (event) => {
- if (props.disabled === true || isFunction$1(shouldProceed) && !shouldProceed()) return;
- const shouldEmit = hasUpdateHandler.value && isClient;
- if (shouldEmit) emit(updateEventKey, true);
- if (isModelBindingAbsent.value || !shouldEmit) doShow(event);
- };
- const hide = (event) => {
- if (props.disabled === true || !isClient) return;
- const shouldEmit = hasUpdateHandler.value && isClient;
- if (shouldEmit) emit(updateEventKey, false);
- if (isModelBindingAbsent.value || !shouldEmit) doHide(event);
- };
- const onChange = (val) => {
- if (!isBoolean(val)) return;
- if (props.disabled && val) {
- if (hasUpdateHandler.value) emit(updateEventKey, false);
- } else if (indicator.value !== val) if (val) doShow();
- else doHide();
- };
- const toggle = () => {
- if (indicator.value) hide();
- else show();
- };
- watch(() => props[name], onChange);
- if (shouldHideWhenRouteChanges && instance.appContext.config.globalProperties.$route !== void 0) watch(() => ({ ...instance.proxy.$route }), () => {
- if (shouldHideWhenRouteChanges.value && indicator.value) hide();
- });
- onMounted(() => {
- onChange(props[name]);
- });
- return {
- hide,
- show,
- toggle,
- hasUpdateHandler
- };
- };
- return {
- useModelToggle,
- useModelToggleProps,
- useModelToggleEmits
- };
- };
- var { useModelToggle, useModelToggleProps, useModelToggleEmits } = createModelToggleComposable("modelValue");
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-prevent-global/index.mjs
- var usePreventGlobal = (indicator, evt, cb) => {
- const prevent = (e) => {
- if (cb(e)) e.stopImmediatePropagation();
- };
- let stop = void 0;
- watch(() => indicator.value, (val) => {
- if (val) stop = useEventListener(document, evt, prevent, true);
- else stop?.();
- }, { immediate: true });
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-prop/index.mjs
- var useProp = (name) => {
- const vm = getCurrentInstance();
- return computed(() => (vm?.proxy?.$props)?.[name]);
- }, W = "bottom", T$1 = "right", P$1 = "left", me = "auto", Q = [
- "top",
- W,
- T$1,
- P$1
- ], Y$1 = "start", Ye = "clippingParents", je = "viewport", ee = "popper", Ge = "reference", De = Q.reduce(function(e, t) {
- return e.concat([t + "-" + Y$1, t + "-end"]);
- }, []), Ee = [].concat(Q, [me]).reduce(function(e, t) {
- return e.concat([
- t,
- t + "-" + Y$1,
- t + "-end"
- ]);
- }, []), it = [
- "beforeRead",
- "read",
- "afterRead",
- "beforeMain",
- "main",
- "afterMain",
- "beforeWrite",
- "write",
- "afterWrite"
- ];
- function V(e) {
- return e ? (e.nodeName || "").toLowerCase() : null;
- }
- function B(e) {
- if (e == null) return window;
- if (e.toString() !== "[object Window]") {
- var t = e.ownerDocument;
- return t && t.defaultView || window;
- }
- return e;
- }
- function G(e) {
- return e instanceof B(e).Element || e instanceof Element;
- }
- function R(e) {
- return e instanceof B(e).HTMLElement || e instanceof HTMLElement;
- }
- function Ae(e) {
- if (typeof ShadowRoot == "undefined") return !1;
- return e instanceof B(e).ShadowRoot || e instanceof ShadowRoot;
- }
- function Tt(e) {
- var t = e.state;
- Object.keys(t.elements).forEach(function(n) {
- var r = t.styles[n] || {}, o = t.attributes[n] || {}, a = t.elements[n];
- !R(a) || !V(a) || (Object.assign(a.style, r), Object.keys(o).forEach(function(c) {
- var s = o[c];
- s === !1 ? a.removeAttribute(c) : a.setAttribute(c, s === !0 ? "" : s);
- }));
- });
- }
- function Bt(e) {
- var t = e.state, n = {
- popper: {
- position: t.options.strategy,
- left: "0",
- top: "0",
- margin: "0"
- },
- arrow: { position: "absolute" },
- reference: {}
- };
- return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
- Object.keys(t.elements).forEach(function(r) {
- var o = t.elements[r], a = t.attributes[r] || {}, s = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]).reduce(function(i, f) {
- return i[f] = "", i;
- }, {});
- !R(o) || !V(o) || (Object.assign(o.style, s), Object.keys(a).forEach(function(i) {
- o.removeAttribute(i);
- }));
- });
- };
- }
- var ke = {
- name: "applyStyles",
- enabled: !0,
- phase: "write",
- fn: Tt,
- effect: Bt,
- requires: ["computeStyles"]
- };
- function C(e) {
- return e.split("-")[0];
- }
- var J = Math.max, ve = Math.min, te = Math.round;
- function Le() {
- var e = navigator.userAgentData;
- return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
- return t.brand + "/" + t.version;
- }).join(" ") : navigator.userAgent;
- }
- function at() {
- return !/^((?!chrome|android).)*safari/i.test(Le());
- }
- function ne(e, t, n) {
- t === void 0 && (t = !1), n === void 0 && (n = !1);
- var r = e.getBoundingClientRect(), o = 1, a = 1;
- t && R(e) && (o = e.offsetWidth > 0 && te(r.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && te(r.height) / e.offsetHeight || 1);
- var s = (G(e) ? B(e) : window).visualViewport, i = !at() && n, f = (r.left + (i && s ? s.offsetLeft : 0)) / o, u = (r.top + (i && s ? s.offsetTop : 0)) / a, m = r.width / o, h = r.height / a;
- return {
- width: m,
- height: h,
- top: u,
- right: f + m,
- bottom: u + h,
- left: f,
- x: f,
- y: u
- };
- }
- function Pe(e) {
- var t = ne(e), n = e.offsetWidth, r = e.offsetHeight;
- return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
- x: e.offsetLeft,
- y: e.offsetTop,
- width: n,
- height: r
- };
- }
- function st(e, t) {
- var n = t.getRootNode && t.getRootNode();
- if (e.contains(t)) return !0;
- if (n && Ae(n)) {
- var r = t;
- do {
- if (r && e.isSameNode(r)) return !0;
- r = r.parentNode || r.host;
- } while (r);
- }
- return !1;
- }
- function I$1(e) {
- return B(e).getComputedStyle(e);
- }
- function Rt(e) {
- return [
- "table",
- "td",
- "th"
- ].indexOf(V(e)) >= 0;
- }
- function N$1(e) {
- return ((G(e) ? e.ownerDocument : e.document) || window.document).documentElement;
- }
- function ye(e) {
- return V(e) === "html" ? e : e.assignedSlot || e.parentNode || (Ae(e) ? e.host : null) || N$1(e);
- }
- function ft(e) {
- return !R(e) || I$1(e).position === "fixed" ? null : e.offsetParent;
- }
- function Ht(e) {
- var t = /firefox/i.test(Le());
- if (/Trident/i.test(Le()) && R(e)) {
- if (I$1(e).position === "fixed") return null;
- }
- var o = ye(e);
- for (Ae(o) && (o = o.host); R(o) && ["html", "body"].indexOf(V(o)) < 0;) {
- var a = I$1(o);
- if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || t && a.willChange === "filter" || t && a.filter && a.filter !== "none") return o;
- o = o.parentNode;
- }
- return null;
- }
- function se(e) {
- for (var t = B(e), n = ft(e); n && Rt(n) && I$1(n).position === "static";) n = ft(n);
- return n && (V(n) === "html" || V(n) === "body" && I$1(n).position === "static") ? t : n || Ht(e) || t;
- }
- function Me(e) {
- return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
- }
- function fe(e, t, n) {
- return J(e, ve(t, n));
- }
- function St(e, t, n) {
- var r = fe(e, t, n);
- return r > n ? n : r;
- }
- function ct() {
- return {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- };
- }
- function ut(e) {
- return Object.assign({}, ct(), e);
- }
- function pt(e, t) {
- return t.reduce(function(n, r) {
- return n[r] = e, n;
- }, {});
- }
- var Vt = function(e, t) {
- return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, ut(typeof e != "number" ? e : pt(e, Q));
- };
- function Ct(e) {
- var t, n = e.state, r = e.name, o = e.options, a = n.elements.arrow, c = n.modifiersData.popperOffsets, s = C(n.placement), i = Me(s), u = ["left", "right"].indexOf(s) >= 0 ? "height" : "width";
- if (!(!a || !c)) {
- var m = Vt(o.padding, n), h = Pe(a), l = i === "y" ? "top" : P$1, g = i === "y" ? W : T$1, p = n.rects.reference[u] + n.rects.reference[i] - c[i] - n.rects.popper[u], y = c[i] - n.rects.reference[i], b = se(a), x = b ? i === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, O = p / 2 - y / 2, d = m[l], v = x - h[u] - m[g], w = x / 2 - h[u] / 2 + O, $ = fe(d, w, v), j = i;
- n.modifiersData[r] = (t = {}, t[j] = $, t.centerOffset = $ - w, t);
- }
- }
- function qt(e) {
- var t = e.state, r = e.options.element, o = r === void 0 ? "[data-popper-arrow]" : r;
- o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || st(t.elements.popper, o) && (t.elements.arrow = o));
- }
- var lt = {
- name: "arrow",
- enabled: !0,
- phase: "main",
- fn: Ct,
- effect: qt,
- requires: ["popperOffsets"],
- requiresIfExists: ["preventOverflow"]
- };
- function re(e) {
- return e.split("-")[1];
- }
- var It = {
- top: "auto",
- right: "auto",
- bottom: "auto",
- left: "auto"
- };
- function Nt(e, t) {
- var n = e.x, r = e.y, o = t.devicePixelRatio || 1;
- return {
- x: te(n * o) / o || 0,
- y: te(r * o) / o || 0
- };
- }
- function dt(e) {
- var t, n = e.popper, r = e.popperRect, o = e.placement, a = e.variation, c = e.offsets, s = e.position, i = e.gpuAcceleration, f = e.adaptive, u = e.roundOffsets, m = e.isFixed, h = c.x, l = h === void 0 ? 0 : h, g = c.y, p = g === void 0 ? 0 : g, y = typeof u == "function" ? u({
- x: l,
- y: p
- }) : {
- x: l,
- y: p
- };
- l = y.x, p = y.y;
- var b = c.hasOwnProperty("x"), x = c.hasOwnProperty("y"), O = P$1, d = "top", v = window;
- if (f) {
- var w = se(n), $ = "clientHeight", j = "clientWidth";
- if (w === B(n) && (w = N$1(n), I$1(w).position !== "static" && s === "absolute" && ($ = "scrollHeight", j = "scrollWidth")), w = w, o === "top" || (o === "left" || o === "right") && a === "end") {
- d = W;
- var D = m && w === v && v.visualViewport ? v.visualViewport.height : w[$];
- p -= D - r.height, p *= i ? 1 : -1;
- }
- if (o === "left" || (o === "top" || o === "bottom") && a === "end") {
- O = T$1;
- var E = m && w === v && v.visualViewport ? v.visualViewport.width : w[j];
- l -= E - r.width, l *= i ? 1 : -1;
- }
- }
- var A = Object.assign({ position: s }, f && It), H = u === !0 ? Nt({
- x: l,
- y: p
- }, B(n)) : {
- x: l,
- y: p
- };
- if (l = H.x, p = H.y, i) {
- var k;
- return Object.assign({}, A, (k = {}, k[d] = x ? "0" : "", k[O] = b ? "0" : "", k.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + l + "px, " + p + "px)" : "translate3d(" + l + "px, " + p + "px, 0)", k));
- }
- return Object.assign({}, A, (t = {}, t[d] = x ? p + "px" : "", t[O] = b ? l + "px" : "", t.transform = "", t));
- }
- function Ft(e) {
- var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, a = n.adaptive, c = a === void 0 ? !0 : a, s = n.roundOffsets, i = s === void 0 ? !0 : s, f = {
- placement: C(t.placement),
- variation: re(t.placement),
- popper: t.elements.popper,
- popperRect: t.rects.popper,
- gpuAcceleration: o,
- isFixed: t.options.strategy === "fixed"
- };
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, dt(Object.assign({}, f, {
- offsets: t.modifiersData.popperOffsets,
- position: t.options.strategy,
- adaptive: c,
- roundOffsets: i
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, dt(Object.assign({}, f, {
- offsets: t.modifiersData.arrow,
- position: "absolute",
- adaptive: !1,
- roundOffsets: i
- })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
- }
- var We = {
- name: "computeStyles",
- enabled: !0,
- phase: "beforeWrite",
- fn: Ft,
- data: {}
- }, ge = { passive: !0 };
- function Ut(e) {
- var t = e.state, n = e.instance, r = e.options, o = r.scroll, a = o === void 0 ? !0 : o, c = r.resize, s = c === void 0 ? !0 : c, i = B(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
- return a && f.forEach(function(u) {
- u.addEventListener("scroll", n.update, ge);
- }), s && i.addEventListener("resize", n.update, ge), function() {
- a && f.forEach(function(u) {
- u.removeEventListener("scroll", n.update, ge);
- }), s && i.removeEventListener("resize", n.update, ge);
- };
- }
- var Te = {
- name: "eventListeners",
- enabled: !0,
- phase: "write",
- fn: function() {},
- effect: Ut,
- data: {}
- }, _t = {
- left: "right",
- right: "left",
- bottom: "top",
- top: "bottom"
- };
- function be(e) {
- return e.replace(/left|right|bottom|top/g, function(t) {
- return _t[t];
- });
- }
- var zt = {
- start: "end",
- end: "start"
- };
- function ht(e) {
- return e.replace(/start|end/g, function(t) {
- return zt[t];
- });
- }
- function Be(e) {
- var t = B(e);
- return {
- scrollLeft: t.pageXOffset,
- scrollTop: t.pageYOffset
- };
- }
- function Re(e) {
- return ne(N$1(e)).left + Be(e).scrollLeft;
- }
- function Xt(e, t) {
- var n = B(e), r = N$1(e), o = n.visualViewport, a = r.clientWidth, c = r.clientHeight, s = 0, i = 0;
- if (o) {
- a = o.width, c = o.height;
- var f = at();
- (f || !f && t === "fixed") && (s = o.offsetLeft, i = o.offsetTop);
- }
- return {
- width: a,
- height: c,
- x: s + Re(e),
- y: i
- };
- }
- function Yt(e) {
- var t, n = N$1(e), r = Be(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = J(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), c = J(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -r.scrollLeft + Re(e), i = -r.scrollTop;
- return I$1(o || n).direction === "rtl" && (s += J(n.clientWidth, o ? o.clientWidth : 0) - a), {
- width: a,
- height: c,
- x: s,
- y: i
- };
- }
- function He(e) {
- var t = I$1(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
- return /auto|scroll|overlay|hidden/.test(n + o + r);
- }
- function mt(e) {
- return [
- "html",
- "body",
- "#document"
- ].indexOf(V(e)) >= 0 ? e.ownerDocument.body : R(e) && He(e) ? e : mt(ye(e));
- }
- function ce(e, t) {
- var n;
- t === void 0 && (t = []);
- var r = mt(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), a = B(r), c = o ? [a].concat(a.visualViewport || [], He(r) ? r : []) : r, s = t.concat(c);
- return o ? s : s.concat(ce(ye(c)));
- }
- function Se(e) {
- return Object.assign({}, e, {
- left: e.x,
- top: e.y,
- right: e.x + e.width,
- bottom: e.y + e.height
- });
- }
- function Gt(e, t) {
- var n = ne(e, !1, t === "fixed");
- return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
- }
- function vt(e, t, n) {
- return t === "viewport" ? Se(Xt(e, n)) : G(t) ? Gt(t, n) : Se(Yt(N$1(e)));
- }
- function Jt(e) {
- var t = ce(ye(e)), r = ["absolute", "fixed"].indexOf(I$1(e).position) >= 0 && R(e) ? se(e) : e;
- return G(r) ? t.filter(function(o) {
- return G(o) && st(o, r) && V(o) !== "body";
- }) : [];
- }
- function Kt(e, t, n, r) {
- var o = t === "clippingParents" ? Jt(e) : [].concat(t), a = [].concat(o, [n]), c = a[0], s = a.reduce(function(i, f) {
- var u = vt(e, f, r);
- return i.top = J(u.top, i.top), i.right = ve(u.right, i.right), i.bottom = ve(u.bottom, i.bottom), i.left = J(u.left, i.left), i;
- }, vt(e, c, r));
- return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
- }
- function yt(e) {
- var t = e.reference, n = e.element, r = e.placement, o = r ? C(r) : null, a = r ? re(r) : null, c = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, i;
- switch (o) {
- case "top":
- i = {
- x: c,
- y: t.y - n.height
- };
- break;
- case W:
- i = {
- x: c,
- y: t.y + t.height
- };
- break;
- case T$1:
- i = {
- x: t.x + t.width,
- y: s
- };
- break;
- case P$1:
- i = {
- x: t.x - n.width,
- y: s
- };
- break;
- default: i = {
- x: t.x,
- y: t.y
- };
- }
- var f = o ? Me(o) : null;
- if (f != null) {
- var u = f === "y" ? "height" : "width";
- switch (a) {
- case Y$1:
- i[f] = i[f] - (t[u] / 2 - n[u] / 2);
- break;
- case "end":
- i[f] = i[f] + (t[u] / 2 - n[u] / 2);
- break;
- }
- }
- return i;
- }
- function oe(e, t) {
- t === void 0 && (t = {});
- var n = t, r = n.placement, o = r === void 0 ? e.placement : r, a = n.strategy, c = a === void 0 ? e.strategy : a, s = n.boundary, i = s === void 0 ? Ye : s, f = n.rootBoundary, u = f === void 0 ? je : f, m = n.elementContext, h = m === void 0 ? ee : m, l = n.altBoundary, g = l === void 0 ? !1 : l, p = n.padding, y = p === void 0 ? 0 : p, b = ut(typeof y != "number" ? y : pt(y, Q)), x = h === "popper" ? Ge : ee, O = e.rects.popper, d = e.elements[g ? x : h], v = Kt(G(d) ? d : d.contextElement || N$1(e.elements.popper), i, u, c), w = ne(e.elements.reference), $ = yt({
- reference: w,
- element: O,
- placement: o
- }), j = Se(Object.assign({}, O, $)), D = h === "popper" ? j : w, E = {
- top: v.top - D.top + b.top,
- bottom: D.bottom - v.bottom + b.bottom,
- left: v.left - D.left + b.left,
- right: D.right - v.right + b.right
- }, A = e.modifiersData.offset;
- if (h === "popper" && A) {
- var H = A[o];
- Object.keys(E).forEach(function(k) {
- var F = ["right", "bottom"].indexOf(k) >= 0 ? 1 : -1, U = ["top", "bottom"].indexOf(k) >= 0 ? "y" : "x";
- E[k] += H[U] * F;
- });
- }
- return E;
- }
- function Qt(e, t) {
- t === void 0 && (t = {});
- var n = t, r = n.placement, o = n.boundary, a = n.rootBoundary, c = n.padding, s = n.flipVariations, i = n.allowedAutoPlacements, f = i === void 0 ? Ee : i, u = re(r), m = u ? s ? De : De.filter(function(g) {
- return re(g) === u;
- }) : Q, h = m.filter(function(g) {
- return f.indexOf(g) >= 0;
- });
- h.length === 0 && (h = m);
- var l = h.reduce(function(g, p) {
- return g[p] = oe(e, {
- placement: p,
- boundary: o,
- rootBoundary: a,
- padding: c
- })[C(p)], g;
- }, {});
- return Object.keys(l).sort(function(g, p) {
- return l[g] - l[p];
- });
- }
- function Zt(e) {
- if (C(e) === "auto") return [];
- var t = be(e);
- return [
- ht(e),
- t,
- ht(t)
- ];
- }
- function en(e) {
- var t = e.state, n = e.options, r = e.name;
- if (!t.modifiersData[r]._skip) {
- for (var o = n.mainAxis, a = o === void 0 ? !0 : o, c = n.altAxis, s = c === void 0 ? !0 : c, i = n.fallbackPlacements, f = n.padding, u = n.boundary, m = n.rootBoundary, h = n.altBoundary, l = n.flipVariations, g = l === void 0 ? !0 : l, p = n.allowedAutoPlacements, y = t.options.placement, x = C(y) === y, O = i || (x || !g ? [be(y)] : Zt(y)), d = [y].concat(O).reduce(function(z, q) {
- return z.concat(C(q) === "auto" ? Qt(t, {
- placement: q,
- boundary: u,
- rootBoundary: m,
- padding: f,
- flipVariations: g,
- allowedAutoPlacements: p
- }) : q);
- }, []), v = t.rects.reference, w = t.rects.popper, $ = /* @__PURE__ */ new Map(), j = !0, D = d[0], E = 0; E < d.length; E++) {
- var A = d[E], H = C(A), k = re(A) === Y$1, F = ["top", W].indexOf(H) >= 0, U = F ? "width" : "height", M = oe(t, {
- placement: A,
- boundary: u,
- rootBoundary: m,
- altBoundary: h,
- padding: f
- }), S = F ? k ? T$1 : P$1 : k ? W : "top";
- v[U] > w[U] && (S = be(S));
- var ue = be(S), _ = [];
- if (a && _.push(M[H] <= 0), s && _.push(M[S] <= 0, M[ue] <= 0), _.every(function(z) {
- return z;
- })) {
- D = A, j = !1;
- break;
- }
- $.set(A, _);
- }
- if (j) {
- for (var pe = g ? 3 : 1, xe = function(z) {
- var q = d.find(function(de) {
- var ae = $.get(de);
- if (ae) return ae.slice(0, z).every(function(K) {
- return K;
- });
- });
- if (q) return D = q, "break";
- }, ie = pe; ie > 0; ie--) if (xe(ie) === "break") break;
- }
- t.placement !== D && (t.modifiersData[r]._skip = !0, t.placement = D, t.reset = !0);
- }
- }
- var gt = {
- name: "flip",
- enabled: !0,
- phase: "main",
- fn: en,
- requiresIfExists: ["offset"],
- data: { _skip: !1 }
- };
- function bt(e, t, n) {
- return n === void 0 && (n = {
- x: 0,
- y: 0
- }), {
- top: e.top - t.height - n.y,
- right: e.right - t.width + n.x,
- bottom: e.bottom - t.height + n.y,
- left: e.left - t.width - n.x
- };
- }
- function wt(e) {
- return [
- "top",
- T$1,
- W,
- P$1
- ].some(function(t) {
- return e[t] >= 0;
- });
- }
- function tn(e) {
- var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, c = oe(t, { elementContext: "reference" }), s = oe(t, { altBoundary: !0 }), i = bt(c, r), f = bt(s, o, a), u = wt(i), m = wt(f);
- t.modifiersData[n] = {
- referenceClippingOffsets: i,
- popperEscapeOffsets: f,
- isReferenceHidden: u,
- hasPopperEscaped: m
- }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
- "data-popper-reference-hidden": u,
- "data-popper-escaped": m
- });
- }
- var xt = {
- name: "hide",
- enabled: !0,
- phase: "main",
- requiresIfExists: ["preventOverflow"],
- fn: tn
- };
- function nn(e, t, n) {
- var r = C(e), o = ["left", "top"].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, c = a[0], s = a[1];
- return c = c || 0, s = (s || 0) * o, ["left", "right"].indexOf(r) >= 0 ? {
- x: s,
- y: c
- } : {
- x: c,
- y: s
- };
- }
- function rn(e) {
- var t = e.state, n = e.options, r = e.name, o = n.offset, a = o === void 0 ? [0, 0] : o, c = Ee.reduce(function(u, m) {
- return u[m] = nn(m, t.rects, a), u;
- }, {}), s = c[t.placement], i = s.x, f = s.y;
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += i, t.modifiersData.popperOffsets.y += f), t.modifiersData[r] = c;
- }
- var Ot = {
- name: "offset",
- enabled: !0,
- phase: "main",
- requires: ["popperOffsets"],
- fn: rn
- };
- function on(e) {
- var t = e.state, n = e.name;
- t.modifiersData[n] = yt({
- reference: t.rects.reference,
- element: t.rects.popper,
- placement: t.placement
- });
- }
- var Ve = {
- name: "popperOffsets",
- enabled: !0,
- phase: "read",
- fn: on,
- data: {}
- };
- function an(e) {
- return e === "x" ? "y" : "x";
- }
- function sn(e) {
- var t = e.state, n = e.options, r = e.name, o = n.mainAxis, a = o === void 0 ? !0 : o, c = n.altAxis, s = c === void 0 ? !1 : c, i = n.boundary, f = n.rootBoundary, u = n.altBoundary, m = n.padding, h = n.tether, l = h === void 0 ? !0 : h, g = n.tetherOffset, p = g === void 0 ? 0 : g, y = oe(t, {
- boundary: i,
- rootBoundary: f,
- padding: m,
- altBoundary: u
- }), b = C(t.placement), x = re(t.placement), O = !x, d = Me(b), v = an(d), w = t.modifiersData.popperOffsets, $ = t.rects.reference, j = t.rects.popper, D = typeof p == "function" ? p(Object.assign({}, t.rects, { placement: t.placement })) : p, E = typeof D == "number" ? {
- mainAxis: D,
- altAxis: D
- } : Object.assign({
- mainAxis: 0,
- altAxis: 0
- }, D), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = {
- x: 0,
- y: 0
- };
- if (w) {
- if (a) {
- var k, F = d === "y" ? "top" : P$1, U = d === "y" ? W : T$1, M = d === "y" ? "height" : "width", S = w[d], ue = S + y[F], _ = S - y[U], pe = l ? -j[M] / 2 : 0, xe = x === "start" ? $[M] : j[M], ie = x === "start" ? -j[M] : -$[M], le = t.elements.arrow, z = l && le ? Pe(le) : {
- width: 0,
- height: 0
- }, q = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ct(), de = q[F], ae = q[U], K = fe(0, $[M], z[M]), Et = O ? $[M] / 2 - pe - K - de - E.mainAxis : xe - K - de - E.mainAxis, At = O ? -$[M] / 2 + pe + K + ae + E.mainAxis : ie + K + ae + E.mainAxis, Oe = t.elements.arrow && se(t.elements.arrow), kt = Oe ? d === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Ce = (k = A == null ? void 0 : A[d]) != null ? k : 0, Lt = S + Et - Ce - kt, Pt = S + At - Ce, qe = fe(l ? ve(ue, Lt) : ue, S, l ? J(_, Pt) : _);
- w[d] = qe, H[d] = qe - S;
- }
- if (s) {
- var Ie, Mt = d === "x" ? "top" : P$1, Wt = d === "x" ? W : T$1, X = w[v], he = v === "y" ? "height" : "width", Ne = X + y[Mt], Fe = X - y[Wt], $e = ["top", P$1].indexOf(b) !== -1, Ue = (Ie = A == null ? void 0 : A[v]) != null ? Ie : 0, _e = $e ? Ne : X - $[he] - j[he] - Ue + E.altAxis, ze = $e ? X + $[he] + j[he] - Ue - E.altAxis : Fe, Xe = l && $e ? St(_e, X, ze) : fe(l ? _e : Ne, X, l ? ze : Fe);
- w[v] = Xe, H[v] = Xe - X;
- }
- t.modifiersData[r] = H;
- }
- }
- var $t = {
- name: "preventOverflow",
- enabled: !0,
- phase: "main",
- fn: sn,
- requiresIfExists: ["offset"]
- };
- function fn(e) {
- return {
- scrollLeft: e.scrollLeft,
- scrollTop: e.scrollTop
- };
- }
- function cn(e) {
- return e === B(e) || !R(e) ? Be(e) : fn(e);
- }
- function un(e) {
- var t = e.getBoundingClientRect(), n = te(t.width) / e.offsetWidth || 1, r = te(t.height) / e.offsetHeight || 1;
- return n !== 1 || r !== 1;
- }
- function pn(e, t, n) {
- n === void 0 && (n = !1);
- var r = R(t), o = R(t) && un(t), a = N$1(t), c = ne(e, o, n), s = {
- scrollLeft: 0,
- scrollTop: 0
- }, i = {
- x: 0,
- y: 0
- };
- return (r || !r && !n) && ((V(t) !== "body" || He(a)) && (s = cn(t)), R(t) ? (i = ne(t, !0), i.x += t.clientLeft, i.y += t.clientTop) : a && (i.x = Re(a))), {
- x: c.left + s.scrollLeft - i.x,
- y: c.top + s.scrollTop - i.y,
- width: c.width,
- height: c.height
- };
- }
- function ln(e) {
- var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
- e.forEach(function(a) {
- t.set(a.name, a);
- });
- function o(a) {
- n.add(a.name);
- [].concat(a.requires || [], a.requiresIfExists || []).forEach(function(s) {
- if (!n.has(s)) {
- var i = t.get(s);
- i && o(i);
- }
- }), r.push(a);
- }
- return e.forEach(function(a) {
- n.has(a.name) || o(a);
- }), r;
- }
- function dn(e) {
- var t = ln(e);
- return it.reduce(function(n, r) {
- return n.concat(t.filter(function(o) {
- return o.phase === r;
- }));
- }, []);
- }
- function hn(e) {
- var t;
- return function() {
- return t || (t = new Promise(function(n) {
- Promise.resolve().then(function() {
- t = void 0, n(e());
- });
- })), t;
- };
- }
- function mn(e) {
- var t = e.reduce(function(n, r) {
- var o = n[r.name];
- return n[r.name] = o ? Object.assign({}, o, r, {
- options: Object.assign({}, o.options, r.options),
- data: Object.assign({}, o.data, r.data)
- }) : r, n;
- }, {});
- return Object.keys(t).map(function(n) {
- return t[n];
- });
- }
- var jt = {
- placement: "bottom",
- modifiers: [],
- strategy: "absolute"
- };
- function Dt() {
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- return !t.some(function(r) {
- return !(r && typeof r.getBoundingClientRect == "function");
- });
- }
- function we(e) {
- e === void 0 && (e = {});
- var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, a = o === void 0 ? jt : o;
- return function(c, s, i) {
- i === void 0 && (i = a);
- var f = {
- placement: "bottom",
- orderedModifiers: [],
- options: Object.assign({}, jt, a),
- modifiersData: {},
- elements: {
- reference: c,
- popper: s
- },
- attributes: {},
- styles: {}
- }, u = [], m = !1, h = {
- state: f,
- setOptions: function(p) {
- var y = typeof p == "function" ? p(f.options) : p;
- g(), f.options = Object.assign({}, a, f.options, y), f.scrollParents = {
- reference: G(c) ? ce(c) : c.contextElement ? ce(c.contextElement) : [],
- popper: ce(s)
- };
- var b = dn(mn([].concat(r, f.options.modifiers)));
- return f.orderedModifiers = b.filter(function(x) {
- return x.enabled;
- }), l(), h.update();
- },
- forceUpdate: function() {
- if (!m) {
- var p = f.elements, y = p.reference, b = p.popper;
- if (Dt(y, b)) {
- f.rects = {
- reference: pn(y, se(b), f.options.strategy === "fixed"),
- popper: Pe(b)
- }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(j) {
- return f.modifiersData[j.name] = Object.assign({}, j.data);
- });
- for (var x = 0; x < f.orderedModifiers.length; x++) {
- if (f.reset === !0) {
- f.reset = !1, x = -1;
- continue;
- }
- var O = f.orderedModifiers[x], d = O.fn, v = O.options, w = v === void 0 ? {} : v, $ = O.name;
- typeof d == "function" && (f = d({
- state: f,
- options: w,
- name: $,
- instance: h
- }) || f);
- }
- }
- }
- },
- update: hn(function() {
- return new Promise(function(p) {
- h.forceUpdate(), p(f);
- });
- }),
- destroy: function() {
- g(), m = !0;
- }
- };
- if (!Dt(c, s)) return h;
- h.setOptions(i).then(function(p) {
- !m && i.onFirstUpdate && i.onFirstUpdate(p);
- });
- function l() {
- f.orderedModifiers.forEach(function(p) {
- var y = p.name, b = p.options, x = b === void 0 ? {} : b, O = p.effect;
- if (typeof O == "function") {
- var d = O({
- state: f,
- name: y,
- instance: h,
- options: x
- }), v = function() {};
- u.push(d || v);
- }
- });
- }
- function g() {
- u.forEach(function(p) {
- return p();
- }), u = [];
- }
- return h;
- };
- }
- we();
- we({ defaultModifiers: [
- Te,
- Ve,
- We,
- ke
- ] });
- var wn = we({ defaultModifiers: [
- Te,
- Ve,
- We,
- ke,
- Ot,
- gt,
- $t,
- lt,
- xt
- ] });
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-popper/index.mjs
- var usePopper = (referenceElementRef, popperElementRef, opts = {}) => {
- const stateUpdater = {
- name: "updateState",
- enabled: true,
- phase: "write",
- fn: ({ state }) => {
- const derivedState = deriveState(state);
- Object.assign(states.value, derivedState);
- },
- requires: ["computeStyles"]
- };
- const options = computed(() => {
- const { onFirstUpdate, placement, strategy, modifiers } = unref(opts);
- return {
- onFirstUpdate,
- placement: placement || "bottom",
- strategy: strategy || "absolute",
- modifiers: [
- ...modifiers || [],
- stateUpdater,
- {
- name: "applyStyles",
- enabled: false
- }
- ]
- };
- });
- const instanceRef = shallowRef();
- const states = ref({
- styles: {
- popper: {
- position: unref(options).strategy,
- left: "0",
- top: "0"
- },
- arrow: { position: "absolute" }
- },
- attributes: {}
- });
- const destroy = () => {
- if (!instanceRef.value) return;
- instanceRef.value.destroy();
- instanceRef.value = void 0;
- };
- watch(options, (newOptions) => {
- const instance = unref(instanceRef);
- if (instance) instance.setOptions(newOptions);
- }, { deep: true });
- watch([referenceElementRef, popperElementRef], ([referenceElement, popperElement]) => {
- destroy();
- if (!referenceElement || !popperElement) return;
- instanceRef.value = wn(referenceElement, popperElement, unref(options));
- });
- onBeforeUnmount(() => {
- destroy();
- });
- return {
- state: computed(() => ({ ...unref(instanceRef)?.state || {} })),
- styles: computed(() => unref(states).styles),
- attributes: computed(() => unref(states).attributes),
- update: () => unref(instanceRef)?.update(),
- forceUpdate: () => unref(instanceRef)?.forceUpdate(),
- instanceRef: computed(() => unref(instanceRef))
- };
- };
- function deriveState(state) {
- const elements = Object.keys(state.elements);
- return {
- styles: fromPairs(elements.map((element) => [element, state.styles[element] || {}])),
- attributes: fromPairs(elements.map((element) => [element, state.attributes[element]]))
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-same-target/index.mjs
- var useSameTarget = (handleClick) => {
- if (!handleClick) return {
- onClick: NOOP,
- onMousedown: NOOP,
- onMouseup: NOOP
- };
- let mousedownTarget = false;
- let mouseupTarget = false;
- const onClick = (e) => {
- if (mousedownTarget && mouseupTarget) handleClick(e);
- mousedownTarget = mouseupTarget = false;
- };
- const onMousedown = (e) => {
- mousedownTarget = e.target === e.currentTarget;
- };
- const onMouseup = (e) => {
- mouseupTarget = e.target === e.currentTarget;
- };
- return {
- onClick,
- onMousedown,
- onMouseup
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/global-node.mjs
- var globalNodes = [];
- var target = !isClient ? void 0 : document.body;
- function createGlobalNode(id) {
- const el = document.createElement("div");
- if (id !== void 0) el.setAttribute("id", id);
- if (target) {
- target.appendChild(el);
- globalNodes.push(el);
- }
- return el;
- }
- function removeGlobalNode(el) {
- globalNodes.splice(globalNodes.indexOf(el), 1);
- el.remove();
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-teleport/index.mjs
- var useTeleport = (contentRenderer, appendToBody) => {
- const isTeleportVisible = ref(false);
- if (!isClient) return {
- isTeleportVisible,
- showTeleport: NOOP,
- hideTeleport: NOOP,
- renderTeleport: NOOP
- };
- let $el = null;
- const showTeleport = () => {
- isTeleportVisible.value = true;
- if ($el !== null) return;
- $el = createGlobalNode();
- };
- const hideTeleport = () => {
- isTeleportVisible.value = false;
- if ($el !== null) {
- removeGlobalNode($el);
- $el = null;
- }
- };
- const renderTeleport = () => {
- return appendToBody.value !== true ? contentRenderer() : isTeleportVisible.value ? [h$1(Teleport, { to: $el }, contentRenderer())] : void 0;
- };
- onUnmounted(hideTeleport);
- return {
- isTeleportVisible,
- showTeleport,
- hideTeleport,
- renderTeleport
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-throttle-render/index.mjs
- var useThrottleRender = (loading, throttle = 0) => {
- if (throttle === 0) return loading;
- const throttled = ref(isObject$2(throttle) && Boolean(throttle.initVal));
- let timeoutHandle = null;
- const dispatchThrottling = (timer) => {
- if (isUndefined(timer)) {
- throttled.value = loading.value;
- return;
- }
- if (timeoutHandle) clearTimeout(timeoutHandle);
- timeoutHandle = setTimeout(() => {
- throttled.value = loading.value;
- }, timer);
- };
- const dispatcher = (type) => {
- if (type === "leading") if (isNumber(throttle)) dispatchThrottling(throttle);
- else dispatchThrottling(throttle.leading);
- else if (isObject$2(throttle)) dispatchThrottling(throttle.trailing);
- else throttled.value = false;
- };
- onMounted(() => dispatcher("leading"));
- watch(() => loading.value, (val) => {
- dispatcher(val ? "leading" : "trailing");
- });
- return throttled;
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-timeout/index.mjs
- function useTimeout() {
- let timeoutHandle;
- const registerTimeout = (fn, delay) => {
- cancelTimeout();
- timeoutHandle = window.setTimeout(fn, delay);
- };
- const cancelTimeout = () => window.clearTimeout(timeoutHandle);
- tryOnScopeDispose(() => cancelTimeout());
- return {
- registerTimeout,
- cancelTimeout
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-transition-fallthrough/index.mjs
- /* istanbul ignore file */
- var AFTER_APPEAR = "after-appear";
- var AFTER_ENTER = "after-enter";
- var AFTER_LEAVE = "after-leave";
- var APPEAR = "appear";
- var APPEAR_CANCELLED = "appear-cancelled";
- var BEFORE_ENTER = "before-enter";
- var BEFORE_LEAVE = "before-leave";
- var ENTER = "enter";
- var ENTER_CANCELLED = "enter-cancelled";
- var LEAVE = "leave";
- var LEAVE_CANCELLED = "leave-cancelled";
- var useTransitionFallthroughEmits = [
- AFTER_APPEAR,
- AFTER_ENTER,
- AFTER_LEAVE,
- APPEAR,
- APPEAR_CANCELLED,
- BEFORE_ENTER,
- BEFORE_LEAVE,
- ENTER,
- ENTER_CANCELLED,
- LEAVE,
- LEAVE_CANCELLED
- ];
- /**
- * NOTE:
- * This is only a delegator for delegating transition callbacks.
- * Use this at your need.
- */
- /**
- * Simple usage
- *
- * In your setups:
- *
- * setup() {
- * const fallthroughMethods = useTransitionFallthrough()
- * return fallthrough
- * }
- *
- * In your template:
- *
- * <template>
- * <transition name="whatever" v-bind="fallthrough">
- * <slot />
- * </transition>
- * </template>
- *
- */
- var useTransitionFallthrough = () => {
- const { emit } = getCurrentInstance();
- return {
- onAfterAppear: () => {
- emit(AFTER_APPEAR);
- },
- onAfterEnter: () => {
- emit(AFTER_ENTER);
- },
- onAfterLeave: () => {
- emit(AFTER_LEAVE);
- },
- onAppearCancelled: () => {
- emit(APPEAR_CANCELLED);
- },
- onBeforeEnter: () => {
- emit(BEFORE_ENTER);
- },
- onBeforeLeave: () => {
- emit(BEFORE_LEAVE);
- },
- onEnter: () => {
- emit(ENTER);
- },
- onEnterCancelled: () => {
- emit(ENTER_CANCELLED);
- },
- onLeave: () => {
- emit(LEAVE);
- },
- onLeaveCancelled: () => {
- emit(LEAVE_CANCELLED);
- }
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-id/index.mjs
- var defaultIdInjection = {
- prefix: Math.floor(Math.random() * 1e4),
- current: 0
- };
- var ID_INJECTION_KEY = Symbol("elIdInjection");
- var useIdInjection = () => {
- return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
- };
- var useId = (deterministicId) => {
- const idInjection = useIdInjection();
- if (!isClient && idInjection === defaultIdInjection) debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
- usage: app.provide(ID_INJECTION_KEY, {
- prefix: number,
- current: number,
- })`);
- const namespace = useGetDerivedNamespace();
- return computedEager(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-escape-keydown/index.mjs
- var registeredEscapeHandlers = [];
- var cachedHandler = (event) => {
- if (getEventCode(event) === EVENT_CODE.esc) registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
- };
- var useEscapeKeydown = (handler) => {
- onMounted(() => {
- if (registeredEscapeHandlers.length === 0) document.addEventListener("keydown", cachedHandler);
- if (isClient) registeredEscapeHandlers.push(handler);
- });
- onBeforeUnmount(() => {
- registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
- if (registeredEscapeHandlers.length === 0) {
- if (isClient) document.removeEventListener("keydown", cachedHandler);
- }
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-popper-container/index.mjs
- var usePopperContainerId = () => {
- const namespace = useGetDerivedNamespace();
- const idInjection = useIdInjection();
- const id = computed(() => {
- return `${namespace.value}-popper-container-${idInjection.prefix}`;
- });
- return {
- id,
- selector: computed(() => `#${id.value}`)
- };
- };
- var createContainer = (id) => {
- const container = document.createElement("div");
- container.id = id;
- document.body.appendChild(container);
- return container;
- };
- var usePopperContainer = () => {
- const { id, selector } = usePopperContainerId();
- onBeforeMount(() => {
- if (!isClient) return;
- if (!document.body.querySelector(selector.value)) createContainer(id.value);
- });
- return {
- id,
- selector
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-intermediate-render/index.mjs
- var useDelayedRender = ({ indicator, intermediateIndicator, shouldSetIntermediate = () => true, beforeShow, afterShow, afterHide, beforeHide }) => {
- watch(() => unref(indicator), (val) => {
- if (val) {
- beforeShow?.();
- nextTick(() => {
- if (!unref(indicator)) return;
- if (shouldSetIntermediate("show")) intermediateIndicator.value = true;
- });
- } else {
- beforeHide?.();
- nextTick(() => {
- if (unref(indicator)) return;
- if (shouldSetIntermediate("hide")) intermediateIndicator.value = false;
- });
- }
- });
- watch(() => intermediateIndicator.value, (val) => {
- if (val) afterShow?.();
- else afterHide?.();
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `UseDelayedToggleProps` instead.
- */
- var useDelayedToggleProps = buildProps({
- showAfter: {
- type: Number,
- default: 0
- },
- hideAfter: {
- type: Number,
- default: 200
- },
- autoClose: {
- type: Number,
- default: 0
- }
- });
- var useDelayedTogglePropsDefaults = {
- showAfter: 0,
- hideAfter: 200,
- autoClose: 0
- };
- var useDelayedToggle = ({ showAfter, hideAfter, autoClose, open, close }) => {
- const { registerTimeout } = useTimeout();
- const { registerTimeout: registerTimeoutForAutoClose, cancelTimeout: cancelTimeoutForAutoClose } = useTimeout();
- const onOpen = (event, delay = unref(showAfter)) => {
- registerTimeout(() => {
- open(event);
- const _autoClose = unref(autoClose);
- if (isNumber(_autoClose) && _autoClose > 0) registerTimeoutForAutoClose(() => {
- close(event);
- }, _autoClose);
- }, delay);
- };
- const onClose = (event, delay = unref(hideAfter)) => {
- cancelTimeoutForAutoClose();
- registerTimeout(() => {
- close(event);
- }, delay);
- };
- return {
- onOpen,
- onClose
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-forward-ref/index.mjs
- var FORWARD_REF_INJECTION_KEY = Symbol("elForwardRef");
- var useForwardRef = (forwardRef) => {
- const setForwardRef = ((el) => {
- forwardRef.value = el;
- });
- provide(FORWARD_REF_INJECTION_KEY, { setForwardRef });
- };
- var useForwardRefDirective = (setForwardRef) => {
- return {
- mounted(el) {
- setForwardRef(el);
- },
- updated(el) {
- setForwardRef(el);
- },
- unmounted() {
- setForwardRef(null);
- }
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-z-index/index.mjs
- var initial = { current: 0 };
- var zIndex = ref(0);
- var defaultInitialZIndex = 2e3;
- var ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
- var zIndexContextKey = Symbol("zIndexContextKey");
- var useZIndex = (zIndexOverrides) => {
- const increasingInjection = getCurrentInstance() ? inject(ZINDEX_INJECTION_KEY, initial) : initial;
- const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
- const initialZIndex = computed(() => {
- const zIndexFromInjection = unref(zIndexInjection);
- return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
- });
- const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
- const nextZIndex = () => {
- increasingInjection.current++;
- zIndex.value = increasingInjection.current;
- return currentZIndex.value;
- };
- if (!isClient && !inject(ZINDEX_INJECTION_KEY)) debugWarn("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
- return {
- initialZIndex,
- currentZIndex,
- nextZIndex
- };
- };
- //#endregion
- //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
- var min$1 = Math.min;
- var max$1 = Math.max;
- var round = Math.round;
- var floor$1 = Math.floor;
- var createCoords = (v) => ({
- x: v,
- y: v
- });
- var oppositeSideMap = {
- left: "right",
- right: "left",
- bottom: "top",
- top: "bottom"
- };
- function clamp(start, value, end) {
- return max$1(start, min$1(value, end));
- }
- function evaluate(value, param) {
- return typeof value === "function" ? value(param) : value;
- }
- function getSide(placement) {
- return placement.split("-")[0];
- }
- function getAlignment(placement) {
- return placement.split("-")[1];
- }
- function getOppositeAxis(axis) {
- return axis === "x" ? "y" : "x";
- }
- function getAxisLength(axis) {
- return axis === "y" ? "height" : "width";
- }
- function getSideAxis(placement) {
- const firstChar = placement[0];
- return firstChar === "t" || firstChar === "b" ? "y" : "x";
- }
- function getAlignmentAxis(placement) {
- return getOppositeAxis(getSideAxis(placement));
- }
- function getAlignmentSides(placement, rects, rtl) {
- if (rtl === void 0) rtl = false;
- const alignment = getAlignment(placement);
- const alignmentAxis = getAlignmentAxis(placement);
- const length = getAxisLength(alignmentAxis);
- let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
- if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
- return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
- }
- function getExpandedPlacements(placement) {
- const oppositePlacement = getOppositePlacement(placement);
- return [
- getOppositeAlignmentPlacement(placement),
- oppositePlacement,
- getOppositeAlignmentPlacement(oppositePlacement)
- ];
- }
- function getOppositeAlignmentPlacement(placement) {
- return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
- }
- var lrPlacement = ["left", "right"];
- var rlPlacement = ["right", "left"];
- var tbPlacement = ["top", "bottom"];
- var btPlacement = ["bottom", "top"];
- function getSideList(side, isStart, rtl) {
- switch (side) {
- case "top":
- case "bottom":
- if (rtl) return isStart ? rlPlacement : lrPlacement;
- return isStart ? lrPlacement : rlPlacement;
- case "left":
- case "right": return isStart ? tbPlacement : btPlacement;
- default: return [];
- }
- }
- function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
- const alignment = getAlignment(placement);
- let list = getSideList(getSide(placement), direction === "start", rtl);
- if (alignment) {
- list = list.map((side) => side + "-" + alignment);
- if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
- }
- return list;
- }
- function getOppositePlacement(placement) {
- const side = getSide(placement);
- return oppositeSideMap[side] + placement.slice(side.length);
- }
- function expandPaddingObject(padding) {
- return {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0,
- ...padding
- };
- }
- function getPaddingObject(padding) {
- return typeof padding !== "number" ? expandPaddingObject(padding) : {
- top: padding,
- right: padding,
- bottom: padding,
- left: padding
- };
- }
- function rectToClientRect(rect) {
- const { x, y, width, height } = rect;
- return {
- width,
- height,
- top: y,
- left: x,
- right: x + width,
- bottom: y + height,
- x,
- y
- };
- }
- //#endregion
- //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
- function computeCoordsFromPlacement(_ref, placement, rtl) {
- let { reference, floating } = _ref;
- const sideAxis = getSideAxis(placement);
- const alignmentAxis = getAlignmentAxis(placement);
- const alignLength = getAxisLength(alignmentAxis);
- const side = getSide(placement);
- const isVertical = sideAxis === "y";
- const commonX = reference.x + reference.width / 2 - floating.width / 2;
- const commonY = reference.y + reference.height / 2 - floating.height / 2;
- const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
- let coords;
- switch (side) {
- case "top":
- coords = {
- x: commonX,
- y: reference.y - floating.height
- };
- break;
- case "bottom":
- coords = {
- x: commonX,
- y: reference.y + reference.height
- };
- break;
- case "right":
- coords = {
- x: reference.x + reference.width,
- y: commonY
- };
- break;
- case "left":
- coords = {
- x: reference.x - floating.width,
- y: commonY
- };
- break;
- default: coords = {
- x: reference.x,
- y: reference.y
- };
- }
- switch (getAlignment(placement)) {
- case "start":
- coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
- break;
- case "end":
- coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
- break;
- }
- return coords;
- }
- /**
- * Resolves with an object of overflow side offsets that determine how much the
- * element is overflowing a given clipping boundary on each side.
- * - positive = overflowing the boundary by that number of pixels
- * - negative = how many pixels left before it will overflow
- * - 0 = lies flush with the boundary
- * @see https://floating-ui.com/docs/detectOverflow
- */
- async function detectOverflow$1(state, options) {
- var _await$platform$isEle;
- if (options === void 0) options = {};
- const { x, y, platform, rects, elements, strategy } = state;
- const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
- const paddingObject = getPaddingObject(padding);
- const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
- boundary,
- rootBoundary,
- strategy
- }));
- const rect = elementContext === "floating" ? {
- x,
- y,
- width: rects.floating.width,
- height: rects.floating.height
- } : rects.reference;
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
- const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
- x: 1,
- y: 1
- } : {
- x: 1,
- y: 1
- };
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
- elements,
- rect,
- offsetParent,
- strategy
- }) : rect);
- return {
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
- };
- }
- var MAX_RESET_COUNT = 50;
- /**
- * Computes the `x` and `y` coordinates that will place the floating element
- * next to a given reference element.
- *
- * This export does not have any `platform` interface logic. You will need to
- * write one for the platform you are using Floating UI with.
- */
- var computePosition$1 = async (reference, floating, config) => {
- const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
- const platformWithDetectOverflow = platform.detectOverflow ? platform : {
- ...platform,
- detectOverflow: detectOverflow$1
- };
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
- let rects = await platform.getElementRects({
- reference,
- floating,
- strategy
- });
- let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
- let statefulPlacement = placement;
- let resetCount = 0;
- const middlewareData = {};
- for (let i = 0; i < middleware.length; i++) {
- const currentMiddleware = middleware[i];
- if (!currentMiddleware) continue;
- const { name, fn } = currentMiddleware;
- const { x: nextX, y: nextY, data, reset } = await fn({
- x,
- y,
- initialPlacement: placement,
- placement: statefulPlacement,
- strategy,
- middlewareData,
- rects,
- platform: platformWithDetectOverflow,
- elements: {
- reference,
- floating
- }
- });
- x = nextX != null ? nextX : x;
- y = nextY != null ? nextY : y;
- middlewareData[name] = {
- ...middlewareData[name],
- ...data
- };
- if (reset && resetCount < MAX_RESET_COUNT) {
- resetCount++;
- if (typeof reset === "object") {
- if (reset.placement) statefulPlacement = reset.placement;
- if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
- reference,
- floating,
- strategy
- }) : reset.rects;
- ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
- }
- i = -1;
- }
- }
- return {
- x,
- y,
- placement: statefulPlacement,
- strategy,
- middlewareData
- };
- };
- /**
- * Provides data to position an inner element of the floating element so that it
- * appears centered to the reference element.
- * @see https://floating-ui.com/docs/arrow
- */
- var arrow$1 = (options) => ({
- name: "arrow",
- options,
- async fn(state) {
- const { x, y, placement, rects, platform, elements, middlewareData } = state;
- const { element, padding = 0 } = evaluate(options, state) || {};
- if (element == null) return {};
- const paddingObject = getPaddingObject(padding);
- const coords = {
- x,
- y
- };
- const axis = getAlignmentAxis(placement);
- const length = getAxisLength(axis);
- const arrowDimensions = await platform.getDimensions(element);
- const isYAxis = axis === "y";
- const minProp = isYAxis ? "top" : "left";
- const maxProp = isYAxis ? "bottom" : "right";
- const clientProp = isYAxis ? "clientHeight" : "clientWidth";
- const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
- const startDiff = coords[axis] - rects.reference[axis];
- const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
- let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
- if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];
- const centerToReference = endDiff / 2 - startDiff / 2;
- const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
- const minPadding = min$1(paddingObject[minProp], largestPossiblePadding);
- const maxPadding = min$1(paddingObject[maxProp], largestPossiblePadding);
- const min$1$1 = minPadding;
- const max = clientSize - arrowDimensions[length] - maxPadding;
- const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
- const offset = clamp(min$1$1, center, max);
- const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
- const alignmentOffset = shouldAddOffset ? center < min$1$1 ? center - min$1$1 : center - max : 0;
- return {
- [axis]: coords[axis] + alignmentOffset,
- data: {
- [axis]: offset,
- centerOffset: center - offset - alignmentOffset,
- ...shouldAddOffset && { alignmentOffset }
- },
- reset: shouldAddOffset
- };
- }
- });
- /**
- * Optimizes the visibility of the floating element by flipping the `placement`
- * in order to keep it in view when the preferred placement(s) will overflow the
- * clipping boundary. Alternative to `autoPlacement`.
- * @see https://floating-ui.com/docs/flip
- */
- var flip$1 = function(options) {
- if (options === void 0) options = {};
- return {
- name: "flip",
- options,
- async fn(state) {
- var _middlewareData$arrow, _middlewareData$flip;
- const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
- const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
- if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
- const side = getSide(placement);
- const initialSideAxis = getSideAxis(initialPlacement);
- const isBasePlacement = getSide(initialPlacement) === initialPlacement;
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
- const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
- const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
- if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
- const placements = [initialPlacement, ...fallbackPlacements];
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
- const overflows = [];
- let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
- if (checkMainAxis) overflows.push(overflow[side]);
- if (checkCrossAxis) {
- const sides = getAlignmentSides(placement, rects, rtl);
- overflows.push(overflow[sides[0]], overflow[sides[1]]);
- }
- overflowsData = [...overflowsData, {
- placement,
- overflows
- }];
- if (!overflows.every((side) => side <= 0)) {
- var _middlewareData$flip2, _overflowsData$filter;
- const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
- const nextPlacement = placements[nextIndex];
- if (nextPlacement) {
- if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
- data: {
- index: nextIndex,
- overflows: overflowsData
- },
- reset: { placement: nextPlacement }
- };
- }
- let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
- if (!resetPlacement) switch (fallbackStrategy) {
- case "bestFit": {
- var _overflowsData$filter2;
- const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
- if (hasFallbackAxisSideDirection) {
- const currentSideAxis = getSideAxis(d.placement);
- return currentSideAxis === initialSideAxis || currentSideAxis === "y";
- }
- return true;
- }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
- if (placement) resetPlacement = placement;
- break;
- }
- case "initialPlacement":
- resetPlacement = initialPlacement;
- break;
- }
- if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
- }
- return {};
- }
- };
- };
- var originSides = /* @__PURE__ */ new Set(["left", "top"]);
- async function convertValueToCoords(state, options) {
- const { placement, platform, elements } = state;
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
- const side = getSide(placement);
- const alignment = getAlignment(placement);
- const isVertical = getSideAxis(placement) === "y";
- const mainAxisMulti = originSides.has(side) ? -1 : 1;
- const crossAxisMulti = rtl && isVertical ? -1 : 1;
- const rawValue = evaluate(options, state);
- let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
- mainAxis: rawValue,
- crossAxis: 0,
- alignmentAxis: null
- } : {
- mainAxis: rawValue.mainAxis || 0,
- crossAxis: rawValue.crossAxis || 0,
- alignmentAxis: rawValue.alignmentAxis
- };
- if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
- return isVertical ? {
- x: crossAxis * crossAxisMulti,
- y: mainAxis * mainAxisMulti
- } : {
- x: mainAxis * mainAxisMulti,
- y: crossAxis * crossAxisMulti
- };
- }
- /**
- * Modifies the placement by translating the floating element along the
- * specified axes.
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
- * object may be passed.
- * @see https://floating-ui.com/docs/offset
- */
- var offset$1 = function(options) {
- if (options === void 0) options = 0;
- return {
- name: "offset",
- options,
- async fn(state) {
- var _middlewareData$offse, _middlewareData$arrow;
- const { x, y, placement, middlewareData } = state;
- const diffCoords = await convertValueToCoords(state, options);
- if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
- return {
- x: x + diffCoords.x,
- y: y + diffCoords.y,
- data: {
- ...diffCoords,
- placement
- }
- };
- }
- };
- };
- /**
- * Optimizes the visibility of the floating element by shifting it in order to
- * keep it in view when it will overflow the clipping boundary.
- * @see https://floating-ui.com/docs/shift
- */
- var shift$1 = function(options) {
- if (options === void 0) options = {};
- return {
- name: "shift",
- options,
- async fn(state) {
- const { x, y, placement, platform } = state;
- const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
- let { x, y } = _ref;
- return {
- x,
- y
- };
- } }, ...detectOverflowOptions } = evaluate(options, state);
- const coords = {
- x,
- y
- };
- const overflow = await platform.detectOverflow(state, detectOverflowOptions);
- const crossAxis = getSideAxis(getSide(placement));
- const mainAxis = getOppositeAxis(crossAxis);
- let mainAxisCoord = coords[mainAxis];
- let crossAxisCoord = coords[crossAxis];
- if (checkMainAxis) {
- const minSide = mainAxis === "y" ? "top" : "left";
- const maxSide = mainAxis === "y" ? "bottom" : "right";
- const min = mainAxisCoord + overflow[minSide];
- const max = mainAxisCoord - overflow[maxSide];
- mainAxisCoord = clamp(min, mainAxisCoord, max);
- }
- if (checkCrossAxis) {
- const minSide = crossAxis === "y" ? "top" : "left";
- const maxSide = crossAxis === "y" ? "bottom" : "right";
- const min = crossAxisCoord + overflow[minSide];
- const max = crossAxisCoord - overflow[maxSide];
- crossAxisCoord = clamp(min, crossAxisCoord, max);
- }
- const limitedCoords = limiter.fn({
- ...state,
- [mainAxis]: mainAxisCoord,
- [crossAxis]: crossAxisCoord
- });
- return {
- ...limitedCoords,
- data: {
- x: limitedCoords.x - x,
- y: limitedCoords.y - y,
- enabled: {
- [mainAxis]: checkMainAxis,
- [crossAxis]: checkCrossAxis
- }
- }
- };
- }
- };
- };
- //#endregion
- //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
- function hasWindow() {
- return typeof window !== "undefined";
- }
- function getNodeName(node) {
- if (isNode(node)) return (node.nodeName || "").toLowerCase();
- return "#document";
- }
- function getWindow(node) {
- var _node$ownerDocument;
- return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
- }
- function getDocumentElement(node) {
- var _ref;
- return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
- }
- function isNode(value) {
- if (!hasWindow()) return false;
- return value instanceof Node || value instanceof getWindow(value).Node;
- }
- function isElement(value) {
- if (!hasWindow()) return false;
- return value instanceof Element || value instanceof getWindow(value).Element;
- }
- function isHTMLElement(value) {
- if (!hasWindow()) return false;
- return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
- }
- function isShadowRoot(value) {
- if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
- return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
- }
- function isOverflowElement(element) {
- const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
- }
- function isTableElement(element) {
- return /^(table|td|th)$/.test(getNodeName(element));
- }
- function isTopLayer(element) {
- try {
- if (element.matches(":popover-open")) return true;
- } catch (_e) {}
- try {
- return element.matches(":modal");
- } catch (_e) {
- return false;
- }
- }
- var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
- var containRe = /paint|layout|strict|content/;
- var isNotNone = (value) => !!value && value !== "none";
- var isWebKitValue;
- function isContainingBlock(elementOrCss) {
- const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
- return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
- }
- function getContainingBlock(element) {
- let currentNode = getParentNode(element);
- while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
- if (isContainingBlock(currentNode)) return currentNode;
- else if (isTopLayer(currentNode)) return null;
- currentNode = getParentNode(currentNode);
- }
- return null;
- }
- function isWebKit() {
- if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
- return isWebKitValue;
- }
- function isLastTraversableNode(node) {
- return /^(html|body|#document)$/.test(getNodeName(node));
- }
- function getComputedStyle$1(element) {
- return getWindow(element).getComputedStyle(element);
- }
- function getNodeScroll(element) {
- if (isElement(element)) return {
- scrollLeft: element.scrollLeft,
- scrollTop: element.scrollTop
- };
- return {
- scrollLeft: element.scrollX,
- scrollTop: element.scrollY
- };
- }
- function getParentNode(node) {
- if (getNodeName(node) === "html") return node;
- const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
- return isShadowRoot(result) ? result.host : result;
- }
- function getNearestOverflowAncestor(node) {
- const parentNode = getParentNode(node);
- if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
- if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
- return getNearestOverflowAncestor(parentNode);
- }
- function getOverflowAncestors(node, list, traverseIframes) {
- var _node$ownerDocument2;
- if (list === void 0) list = [];
- if (traverseIframes === void 0) traverseIframes = true;
- const scrollableAncestor = getNearestOverflowAncestor(node);
- const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
- const win = getWindow(scrollableAncestor);
- if (isBody) {
- const frameElement = getFrameElement(win);
- return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
- } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
- }
- function getFrameElement(win) {
- return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
- }
- //#endregion
- //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
- function getCssDimensions(element) {
- const css = getComputedStyle$1(element);
- let width = parseFloat(css.width) || 0;
- let height = parseFloat(css.height) || 0;
- const hasOffset = isHTMLElement(element);
- const offsetWidth = hasOffset ? element.offsetWidth : width;
- const offsetHeight = hasOffset ? element.offsetHeight : height;
- const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
- if (shouldFallback) {
- width = offsetWidth;
- height = offsetHeight;
- }
- return {
- width,
- height,
- $: shouldFallback
- };
- }
- function unwrapElement(element) {
- return !isElement(element) ? element.contextElement : element;
- }
- function getScale(element) {
- const domElement = unwrapElement(element);
- if (!isHTMLElement(domElement)) return createCoords(1);
- const rect = domElement.getBoundingClientRect();
- const { width, height, $ } = getCssDimensions(domElement);
- let x = ($ ? round(rect.width) : rect.width) / width;
- let y = ($ ? round(rect.height) : rect.height) / height;
- if (!x || !Number.isFinite(x)) x = 1;
- if (!y || !Number.isFinite(y)) y = 1;
- return {
- x,
- y
- };
- }
- var noOffsets = /* @__PURE__ */ createCoords(0);
- function getVisualOffsets(element) {
- const win = getWindow(element);
- if (!isWebKit() || !win.visualViewport) return noOffsets;
- return {
- x: win.visualViewport.offsetLeft,
- y: win.visualViewport.offsetTop
- };
- }
- function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
- if (isFixed === void 0) isFixed = false;
- if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) return false;
- return isFixed;
- }
- function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
- if (includeScale === void 0) includeScale = false;
- if (isFixedStrategy === void 0) isFixedStrategy = false;
- const clientRect = element.getBoundingClientRect();
- const domElement = unwrapElement(element);
- let scale = createCoords(1);
- if (includeScale) if (offsetParent) {
- if (isElement(offsetParent)) scale = getScale(offsetParent);
- } else scale = getScale(element);
- const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
- let x = (clientRect.left + visualOffsets.x) / scale.x;
- let y = (clientRect.top + visualOffsets.y) / scale.y;
- let width = clientRect.width / scale.x;
- let height = clientRect.height / scale.y;
- if (domElement) {
- const win = getWindow(domElement);
- const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
- let currentWin = win;
- let currentIFrame = getFrameElement(currentWin);
- while (currentIFrame && offsetParent && offsetWin !== currentWin) {
- const iframeScale = getScale(currentIFrame);
- const iframeRect = currentIFrame.getBoundingClientRect();
- const css = getComputedStyle$1(currentIFrame);
- const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
- const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
- x *= iframeScale.x;
- y *= iframeScale.y;
- width *= iframeScale.x;
- height *= iframeScale.y;
- x += left;
- y += top;
- currentWin = getWindow(currentIFrame);
- currentIFrame = getFrameElement(currentWin);
- }
- }
- return rectToClientRect({
- width,
- height,
- x,
- y
- });
- }
- function getWindowScrollBarX(element, rect) {
- const leftScroll = getNodeScroll(element).scrollLeft;
- if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
- return rect.left + leftScroll;
- }
- function getHTMLOffset(documentElement, scroll) {
- const htmlRect = documentElement.getBoundingClientRect();
- return {
- x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
- y: htmlRect.top + scroll.scrollTop
- };
- }
- function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
- let { elements, rect, offsetParent, strategy } = _ref;
- const isFixed = strategy === "fixed";
- const documentElement = getDocumentElement(offsetParent);
- const topLayer = elements ? isTopLayer(elements.floating) : false;
- if (offsetParent === documentElement || topLayer && isFixed) return rect;
- let scroll = {
- scrollLeft: 0,
- scrollTop: 0
- };
- let scale = createCoords(1);
- const offsets = createCoords(0);
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
- if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
- if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
- if (isOffsetParentAnElement) {
- const offsetRect = getBoundingClientRect(offsetParent);
- scale = getScale(offsetParent);
- offsets.x = offsetRect.x + offsetParent.clientLeft;
- offsets.y = offsetRect.y + offsetParent.clientTop;
- }
- }
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
- return {
- width: rect.width * scale.x,
- height: rect.height * scale.y,
- x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
- y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
- };
- }
- function getClientRects(element) {
- return Array.from(element.getClientRects());
- }
- function getDocumentRect(element) {
- const html = getDocumentElement(element);
- const scroll = getNodeScroll(element);
- const body = element.ownerDocument.body;
- const width = max$1(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
- const height = max$1(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
- let x = -scroll.scrollLeft + getWindowScrollBarX(element);
- const y = -scroll.scrollTop;
- if (getComputedStyle$1(body).direction === "rtl") x += max$1(html.clientWidth, body.clientWidth) - width;
- return {
- width,
- height,
- x,
- y
- };
- }
- var SCROLLBAR_MAX = 25;
- function getViewportRect(element, strategy) {
- const win = getWindow(element);
- const html = getDocumentElement(element);
- const visualViewport = win.visualViewport;
- let width = html.clientWidth;
- let height = html.clientHeight;
- let x = 0;
- let y = 0;
- if (visualViewport) {
- width = visualViewport.width;
- height = visualViewport.height;
- const visualViewportBased = isWebKit();
- if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
- x = visualViewport.offsetLeft;
- y = visualViewport.offsetTop;
- }
- }
- const windowScrollbarX = getWindowScrollBarX(html);
- if (windowScrollbarX <= 0) {
- const doc = html.ownerDocument;
- const body = doc.body;
- const bodyStyles = getComputedStyle(body);
- const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
- const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
- if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) width -= clippingStableScrollbarWidth;
- } else if (windowScrollbarX <= SCROLLBAR_MAX) width += windowScrollbarX;
- return {
- width,
- height,
- x,
- y
- };
- }
- function getInnerBoundingClientRect(element, strategy) {
- const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
- const top = clientRect.top + element.clientTop;
- const left = clientRect.left + element.clientLeft;
- const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
- return {
- width: element.clientWidth * scale.x,
- height: element.clientHeight * scale.y,
- x: left * scale.x,
- y: top * scale.y
- };
- }
- function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
- let rect;
- if (clippingAncestor === "viewport") rect = getViewportRect(element, strategy);
- else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
- else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
- else {
- const visualOffsets = getVisualOffsets(element);
- rect = {
- x: clippingAncestor.x - visualOffsets.x,
- y: clippingAncestor.y - visualOffsets.y,
- width: clippingAncestor.width,
- height: clippingAncestor.height
- };
- }
- return rectToClientRect(rect);
- }
- function hasFixedPositionAncestor(element, stopNode) {
- const parentNode = getParentNode(element);
- if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
- return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
- }
- function getClippingElementAncestors(element, cache) {
- const cachedResult = cache.get(element);
- if (cachedResult) return cachedResult;
- let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
- let currentContainingBlockComputedStyle = null;
- const elementIsFixed = getComputedStyle$1(element).position === "fixed";
- let currentNode = elementIsFixed ? getParentNode(element) : element;
- while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
- const computedStyle = getComputedStyle$1(currentNode);
- const currentNodeIsContaining = isContainingBlock(currentNode);
- if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
- if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
- else currentContainingBlockComputedStyle = computedStyle;
- currentNode = getParentNode(currentNode);
- }
- cache.set(element, result);
- return result;
- }
- function getClippingRect(_ref) {
- let { element, boundary, rootBoundary, strategy } = _ref;
- const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
- const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
- let top = firstRect.top;
- let right = firstRect.right;
- let bottom = firstRect.bottom;
- let left = firstRect.left;
- for (let i = 1; i < clippingAncestors.length; i++) {
- const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
- top = max$1(rect.top, top);
- right = min$1(rect.right, right);
- bottom = min$1(rect.bottom, bottom);
- left = max$1(rect.left, left);
- }
- return {
- width: right - left,
- height: bottom - top,
- x: left,
- y: top
- };
- }
- function getDimensions(element) {
- const { width, height } = getCssDimensions(element);
- return {
- width,
- height
- };
- }
- function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
- const documentElement = getDocumentElement(offsetParent);
- const isFixed = strategy === "fixed";
- const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
- let scroll = {
- scrollLeft: 0,
- scrollTop: 0
- };
- const offsets = createCoords(0);
- function setLeftRTLScrollbarOffset() {
- offsets.x = getWindowScrollBarX(documentElement);
- }
- if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
- if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
- if (isOffsetParentAnElement) {
- const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
- offsets.x = offsetRect.x + offsetParent.clientLeft;
- offsets.y = offsetRect.y + offsetParent.clientTop;
- } else if (documentElement) setLeftRTLScrollbarOffset();
- }
- if (isFixed && !isOffsetParentAnElement && documentElement) setLeftRTLScrollbarOffset();
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
- return {
- x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
- y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
- width: rect.width,
- height: rect.height
- };
- }
- function isStaticPositioned(element) {
- return getComputedStyle$1(element).position === "static";
- }
- function getTrueOffsetParent(element, polyfill) {
- if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
- if (polyfill) return polyfill(element);
- let rawOffsetParent = element.offsetParent;
- if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
- return rawOffsetParent;
- }
- function getOffsetParent(element, polyfill) {
- const win = getWindow(element);
- if (isTopLayer(element)) return win;
- if (!isHTMLElement(element)) {
- let svgOffsetParent = getParentNode(element);
- while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
- if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
- svgOffsetParent = getParentNode(svgOffsetParent);
- }
- return win;
- }
- let offsetParent = getTrueOffsetParent(element, polyfill);
- while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
- if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
- return offsetParent || getContainingBlock(element) || win;
- }
- var getElementRects = async function(data) {
- const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
- const getDimensionsFn = this.getDimensions;
- const floatingDimensions = await getDimensionsFn(data.floating);
- return {
- reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
- floating: {
- x: 0,
- y: 0,
- width: floatingDimensions.width,
- height: floatingDimensions.height
- }
- };
- };
- function isRTL$1(element) {
- return getComputedStyle$1(element).direction === "rtl";
- }
- var platform = {
- convertOffsetParentRelativeRectToViewportRelativeRect,
- getDocumentElement,
- getClippingRect,
- getOffsetParent,
- getElementRects,
- getClientRects,
- getDimensions,
- getScale,
- isElement,
- isRTL: isRTL$1
- };
- function rectsAreEqual(a, b) {
- return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
- }
- function observeMove(element, onMove) {
- let io = null;
- let timeoutId;
- const root = getDocumentElement(element);
- function cleanup() {
- var _io;
- clearTimeout(timeoutId);
- (_io = io) == null || _io.disconnect();
- io = null;
- }
- function refresh(skip, threshold) {
- if (skip === void 0) skip = false;
- if (threshold === void 0) threshold = 1;
- cleanup();
- const elementRectForRootMargin = element.getBoundingClientRect();
- const { left, top, width, height } = elementRectForRootMargin;
- if (!skip) onMove();
- if (!width || !height) return;
- const insetTop = floor$1(top);
- const insetRight = floor$1(root.clientWidth - (left + width));
- const insetBottom = floor$1(root.clientHeight - (top + height));
- const insetLeft = floor$1(left);
- const options = {
- rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
- threshold: max$1(0, min$1(1, threshold)) || 1
- };
- let isFirstUpdate = true;
- function handleObserve(entries) {
- const ratio = entries[0].intersectionRatio;
- if (ratio !== threshold) {
- if (!isFirstUpdate) return refresh();
- if (!ratio) timeoutId = setTimeout(() => {
- refresh(false, 1e-7);
- }, 1e3);
- else refresh(false, ratio);
- }
- if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) refresh();
- isFirstUpdate = false;
- }
- try {
- io = new IntersectionObserver(handleObserve, {
- ...options,
- root: root.ownerDocument
- });
- } catch (_e) {
- io = new IntersectionObserver(handleObserve, options);
- }
- io.observe(element);
- }
- refresh(true);
- return cleanup;
- }
- /**
- * Automatically updates the position of the floating element when necessary.
- * Should only be called when the floating element is mounted on the DOM or
- * visible on the screen.
- * @returns cleanup function that should be invoked when the floating element is
- * removed from the DOM or hidden from the screen.
- * @see https://floating-ui.com/docs/autoUpdate
- */
- function autoUpdate(reference, floating, update, options) {
- if (options === void 0) options = {};
- const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
- const referenceEl = unwrapElement(reference);
- const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
- ancestors.forEach((ancestor) => {
- ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
- ancestorResize && ancestor.addEventListener("resize", update);
- });
- const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
- let reobserveFrame = -1;
- let resizeObserver = null;
- if (elementResize) {
- resizeObserver = new ResizeObserver((_ref) => {
- let [firstEntry] = _ref;
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
- resizeObserver.unobserve(floating);
- cancelAnimationFrame(reobserveFrame);
- reobserveFrame = requestAnimationFrame(() => {
- var _resizeObserver;
- (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
- });
- }
- update();
- });
- if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
- if (floating) resizeObserver.observe(floating);
- }
- let frameId;
- let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
- if (animationFrame) frameLoop();
- function frameLoop() {
- const nextRefRect = getBoundingClientRect(reference);
- if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
- prevRefRect = nextRefRect;
- frameId = requestAnimationFrame(frameLoop);
- }
- update();
- return () => {
- var _resizeObserver2;
- ancestors.forEach((ancestor) => {
- ancestorScroll && ancestor.removeEventListener("scroll", update);
- ancestorResize && ancestor.removeEventListener("resize", update);
- });
- cleanupIo?.();
- (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
- resizeObserver = null;
- if (animationFrame) cancelAnimationFrame(frameId);
- };
- }
- /**
- * Resolves with an object of overflow side offsets that determine how much the
- * element is overflowing a given clipping boundary on each side.
- * - positive = overflowing the boundary by that number of pixels
- * - negative = how many pixels left before it will overflow
- * - 0 = lies flush with the boundary
- * @see https://floating-ui.com/docs/detectOverflow
- */
- var detectOverflow = detectOverflow$1;
- /**
- * Modifies the placement by translating the floating element along the
- * specified axes.
- * A number (shorthand for `mainAxis` or distance), or an axes configuration
- * object may be passed.
- * @see https://floating-ui.com/docs/offset
- */
- var offset = offset$1;
- /**
- * Optimizes the visibility of the floating element by shifting it in order to
- * keep it in view when it will overflow the clipping boundary.
- * @see https://floating-ui.com/docs/shift
- */
- var shift = shift$1;
- /**
- * Optimizes the visibility of the floating element by flipping the `placement`
- * in order to keep it in view when the preferred placement(s) will overflow the
- * clipping boundary. Alternative to `autoPlacement`.
- * @see https://floating-ui.com/docs/flip
- */
- var flip = flip$1;
- /**
- * Provides data to position an inner element of the floating element so that it
- * appears centered to the reference element.
- * @see https://floating-ui.com/docs/arrow
- */
- var arrow = arrow$1;
- /**
- * Computes the `x` and `y` coordinates that will place the floating element
- * next to a given reference element.
- */
- var computePosition = (reference, floating, options) => {
- const cache = /* @__PURE__ */ new Map();
- const mergedOptions = {
- platform,
- ...options
- };
- const platformWithCache = {
- ...mergedOptions.platform,
- _c: cache
- };
- return computePosition$1(reference, floating, {
- ...mergedOptions,
- platform: platformWithCache
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-floating/index.mjs
- var useFloatingProps = buildProps({});
- var unrefReference = (elRef) => {
- if (!isClient) return;
- if (!elRef) return elRef;
- const unrefEl = unrefElement(elRef);
- if (unrefEl) return unrefEl;
- return isRef(elRef) ? unrefEl : elRef;
- };
- var getPositionDataWithUnit = (record, key) => {
- const value = record?.[key];
- return isNil(value) ? "" : `${value}px`;
- };
- var useFloating = ({ middleware, placement, strategy }) => {
- const referenceRef = ref();
- const contentRef = ref();
- const states = {
- x: ref(),
- y: ref(),
- placement,
- strategy,
- middlewareData: ref({})
- };
- const update = async () => {
- if (!isClient) return;
- const referenceEl = unrefReference(referenceRef);
- const contentEl = unrefElement(contentRef);
- if (!referenceEl || !contentEl) return;
- const data = await computePosition(referenceEl, contentEl, {
- placement: unref(placement),
- strategy: unref(strategy),
- middleware: unref(middleware)
- });
- keysOf(states).forEach((key) => {
- states[key].value = data[key];
- });
- };
- onMounted(() => {
- watchEffect(() => {
- update();
- });
- });
- return {
- ...states,
- update,
- referenceRef,
- contentRef
- };
- };
- var arrowMiddleware = ({ arrowRef, padding }) => {
- return {
- name: "arrow",
- options: {
- element: arrowRef,
- padding
- },
- fn(args) {
- const arrowEl = unref(arrowRef);
- if (!arrowEl) return {};
- return arrow({
- element: arrowEl,
- padding
- }).fn(args);
- }
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-cursor/index.mjs
- function useCursor(input) {
- let selectionInfo;
- function recordCursor() {
- if (input.value == void 0) return;
- const { selectionStart, selectionEnd, value } = input.value;
- if (selectionStart == null || selectionEnd == null) return;
- selectionInfo = {
- selectionStart,
- selectionEnd,
- value,
- beforeTxt: value.slice(0, Math.max(0, selectionStart)),
- afterTxt: value.slice(Math.max(0, selectionEnd))
- };
- }
- function setCursor() {
- if (input.value == void 0 || selectionInfo == void 0) return;
- const { value } = input.value;
- const { beforeTxt, afterTxt, selectionStart } = selectionInfo;
- if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0) return;
- let startPos = value.length;
- if (value.endsWith(afterTxt)) startPos = value.length - afterTxt.length;
- else if (value.startsWith(beforeTxt)) startPos = beforeTxt.length;
- else {
- const beforeLastChar = beforeTxt[selectionStart - 1];
- const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
- if (newIndex !== -1) startPos = newIndex + 1;
- }
- input.value.setSelectionRange(startPos, startPos);
- }
- return [recordCursor, setCursor];
- }
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/vnode.mjs
- var SCOPE$11 = "utils/vue/vnode";
- var PatchFlags = /* @__PURE__ */ function(PatchFlags) {
- PatchFlags[PatchFlags["TEXT"] = 1] = "TEXT";
- PatchFlags[PatchFlags["CLASS"] = 2] = "CLASS";
- PatchFlags[PatchFlags["STYLE"] = 4] = "STYLE";
- PatchFlags[PatchFlags["PROPS"] = 8] = "PROPS";
- PatchFlags[PatchFlags["FULL_PROPS"] = 16] = "FULL_PROPS";
- PatchFlags[PatchFlags["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
- PatchFlags[PatchFlags["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
- PatchFlags[PatchFlags["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
- PatchFlags[PatchFlags["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
- PatchFlags[PatchFlags["NEED_PATCH"] = 512] = "NEED_PATCH";
- PatchFlags[PatchFlags["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
- PatchFlags[PatchFlags["HOISTED"] = -1] = "HOISTED";
- PatchFlags[PatchFlags["BAIL"] = -2] = "BAIL";
- return PatchFlags;
- }({});
- function isFragment(node) {
- return isVNode(node) && node.type === Fragment;
- }
- function isComment(node) {
- return isVNode(node) && node.type === Comment;
- }
- function isValidElementNode(node) {
- return isVNode(node) && !isFragment(node) && !isComment(node);
- }
- var getNormalizedProps = (node) => {
- if (!isVNode(node)) {
- debugWarn(SCOPE$11, "[getNormalizedProps] must be a VNode");
- return {};
- }
- const raw = node.props || {};
- const type = (isVNode(node.type) ? node.type.props : void 0) || {};
- const props = {};
- Object.keys(type).forEach((key) => {
- if (hasOwn(type[key], "default")) props[key] = type[key].default;
- });
- Object.keys(raw).forEach((key) => {
- props[camelize$1(key)] = raw[key];
- });
- return props;
- };
- var flattedChildren = (children) => {
- const vNodes = isArray$1(children) ? children : [children];
- const result = [];
- vNodes.forEach((child) => {
- if (isArray$1(child)) result.push(...flattedChildren(child));
- else if (isVNode(child) && child.component?.subTree) result.push(child, ...flattedChildren(child.component.subTree));
- else if (isVNode(child) && isArray$1(child.children)) result.push(...flattedChildren(child.children));
- else if (isVNode(child) && child.shapeFlag === 2) result.push(...flattedChildren(child.type()));
- else result.push(child);
- });
- return result;
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-ordered-children/index.mjs
- var getOrderedChildren = (vm, childComponentName, children) => {
- return flattedChildren(vm.subTree).filter((n) => isVNode(n) && n.type?.name === childComponentName && !!n.component).map((n) => n.component.uid).map((uid) => children[uid]).filter((p) => !!p);
- };
- var useOrderedChildren = (vm, childComponentName) => {
- const children = shallowRef({});
- const orderedChildren = shallowRef([]);
- const nodesMap = /* @__PURE__ */ new WeakMap();
- const addChild = (child) => {
- children.value[child.uid] = child;
- triggerRef(children);
- onMounted(() => {
- const childNode = child.getVnode().el;
- const parentNode = childNode.parentNode;
- if (!nodesMap.has(parentNode)) {
- nodesMap.set(parentNode, []);
- const originalFn = parentNode.insertBefore.bind(parentNode);
- parentNode.insertBefore = (node, anchor) => {
- if (nodesMap.get(parentNode).some((el) => node === el || anchor === el)) triggerRef(children);
- return originalFn(node, anchor);
- };
- }
- nodesMap.get(parentNode).push(childNode);
- });
- };
- const removeChild = (child) => {
- delete children.value[child.uid];
- triggerRef(children);
- const childNode = child.getVnode().el;
- const parentNode = childNode.parentNode;
- const childNodes = nodesMap.get(parentNode);
- const index = childNodes.indexOf(childNode);
- childNodes.splice(index, 1);
- };
- const sortChildren = () => {
- orderedChildren.value = getOrderedChildren(vm, childComponentName, children.value);
- };
- const IsolatedRenderer = (props) => {
- return props.render();
- };
- return {
- children: orderedChildren,
- addChild,
- removeChild,
- ChildrenSorter: defineComponent({ setup(_, { slots }) {
- return () => {
- sortChildren();
- return slots.default ? h$1(IsolatedRenderer, { render: slots.default }) : null;
- };
- } })
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-size/index.mjs
- var useSizeProp = buildProp({
- type: String,
- values: componentSizes,
- required: false
- });
- var useSizeProps = { size: useSizeProp };
- var SIZE_INJECTION_KEY = Symbol("size");
- var useGlobalSize = () => {
- const injectedSize = inject(SIZE_INJECTION_KEY, {});
- return computed(() => {
- return unref(injectedSize.size) || "";
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-focus-controller/index.mjs
- function useFocusController(target, { disabled, beforeFocus, afterFocus, beforeBlur, afterBlur } = {}) {
- const { emit } = getCurrentInstance();
- const wrapperRef = shallowRef();
- const isFocused = ref(false);
- const handleFocus = (event) => {
- const cancelFocus = isFunction$1(beforeFocus) ? beforeFocus(event) : false;
- if (unref(disabled) || isFocused.value || cancelFocus) return;
- isFocused.value = true;
- emit("focus", event);
- afterFocus?.();
- };
- const handleBlur = (event) => {
- const cancelBlur = isFunction$1(beforeBlur) ? beforeBlur(event) : false;
- if (unref(disabled) || event.relatedTarget && wrapperRef.value?.contains(event.relatedTarget) || cancelBlur) return;
- isFocused.value = false;
- emit("blur", event);
- afterBlur?.();
- };
- const handleClick = (event) => {
- if (unref(disabled) || isFocusable(event.target) || wrapperRef.value?.contains(document.activeElement) && wrapperRef.value !== document.activeElement) return;
- target.value?.focus();
- };
- watch([wrapperRef, () => unref(disabled)], ([el, disabled]) => {
- if (!el) return;
- if (disabled) el.removeAttribute("tabindex");
- else el.setAttribute("tabindex", "-1");
- });
- useEventListener(wrapperRef, "focus", handleFocus, true);
- useEventListener(wrapperRef, "blur", handleBlur, true);
- useEventListener(wrapperRef, "click", handleClick, true);
- return {
- isFocused,
- wrapperRef,
- handleFocus,
- handleBlur
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/utils/i18n.mjs
- var isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-composition/index.mjs
- function useComposition({ afterComposition, emit }) {
- const isComposing = ref(false);
- const handleCompositionStart = (event) => {
- emit?.("compositionstart", event);
- isComposing.value = true;
- };
- const handleCompositionUpdate = (event) => {
- emit?.("compositionupdate", event);
- const text = event.target?.value;
- isComposing.value = !isKorean(text[text.length - 1] || "");
- };
- const handleCompositionEnd = (event) => {
- emit?.("compositionend", event);
- if (isComposing.value) {
- isComposing.value = false;
- nextTick(() => afterComposition(event));
- }
- };
- const handleComposition = (event) => {
- event.type === "compositionend" ? handleCompositionEnd(event) : handleCompositionUpdate(event);
- };
- return {
- isComposing,
- handleComposition,
- handleCompositionStart,
- handleCompositionUpdate,
- handleCompositionEnd
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-empty-values/index.mjs
- var emptyValuesContextKey = Symbol("emptyValuesContextKey");
- var SCOPE = "use-empty-values";
- var DEFAULT_EMPTY_VALUES = [
- "",
- void 0,
- null
- ];
- var DEFAULT_VALUE_ON_CLEAR = void 0;
- /**
- * @deprecated Removed after 3.0.0, Use `UseEmptyValuesProps` instead.
- */
- var useEmptyValuesProps = buildProps({
- emptyValues: Array,
- valueOnClear: {
- type: definePropType([
- String,
- Number,
- Boolean,
- Function
- ]),
- default: void 0,
- validator: (val) => {
- val = isFunction$1(val) ? val() : val;
- if (isArray$1(val)) return val.every((item) => !item);
- return !val;
- }
- }
- });
- var useEmptyValues = (props, defaultValue) => {
- const config = getCurrentInstance() ? inject(emptyValuesContextKey, ref({})) : ref({});
- const emptyValues = computed(() => props.emptyValues || config.value.emptyValues || DEFAULT_EMPTY_VALUES);
- const valueOnClear = computed(() => {
- if (isFunction$1(props.valueOnClear)) return props.valueOnClear();
- else if (props.valueOnClear !== void 0) return props.valueOnClear;
- else if (isFunction$1(config.value.valueOnClear)) return config.value.valueOnClear();
- else if (config.value.valueOnClear !== void 0) return config.value.valueOnClear;
- return defaultValue !== void 0 ? defaultValue : void 0;
- });
- const isEmptyValue = (value) => {
- let result = true;
- if (isArray$1(value)) result = emptyValues.value.some((emptyValue) => {
- return isEqual$1(value, emptyValue);
- });
- else result = emptyValues.value.includes(value);
- return result;
- };
- if (!isEmptyValue(valueOnClear.value)) debugWarn(SCOPE, "value-on-clear should be a value of empty-values");
- return {
- emptyValues,
- valueOnClear,
- isEmptyValue
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/hooks/use-aria/index.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AriaProps` instead.
- */
- var ariaProps = buildProps({
- ariaLabel: String,
- ariaOrientation: {
- type: String,
- values: [
- "horizontal",
- "vertical",
- "undefined"
- ]
- },
- ariaControls: String
- });
- var useAriaProps = (arias) => {
- return pick(ariaProps, arias);
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/install.mjs
- var withPropsDefaultsSetter = (target) => {
- const _p = target.props;
- const props = isArray$1(_p) ? fromPairs(_p.map((key) => [key, {}])) : _p;
- target.setPropsDefaults = (defaults) => {
- if (!props) return;
- for (const [key, value] of Object.entries(defaults)) {
- const prop = props[key];
- if (!hasOwn(props, key)) continue;
- if (isPlainObject(prop)) {
- props[key] = {
- ...prop,
- default: value
- };
- continue;
- }
- props[key] = {
- type: prop,
- default: value
- };
- }
- target.props = props;
- };
- };
- var withInstall = (main, extra) => {
- main.install = (app) => {
- for (const comp of [main, ...Object.values(extra ?? {})]) app.component(comp.name, comp);
- };
- if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
- withPropsDefaultsSetter(main);
- return main;
- };
- var withInstallFunction = (fn, name) => {
- fn.install = (app) => {
- fn._context = app._context;
- app.config.globalProperties[name] = fn;
- };
- return fn;
- };
- var withInstallDirective = (directive, name) => {
- directive.install = (app) => {
- app.directive(name, directive);
- };
- return directive;
- };
- var withNoopInstall = (component) => {
- component.install = NOOP;
- withPropsDefaultsSetter(component);
- return component;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/teleport/index.mjs
- var ElTeleport = withInstall(/* @__PURE__ */ defineComponent({
- __name: "teleport",
- props: teleportProps,
- setup(__props) {
- return (_ctx, _cache) => {
- return _ctx.disabled ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, {
- key: 1,
- to: _ctx.to
- }, [renderSlot(_ctx.$slots, "default")], 8, ["to"]));
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/affix/src/affix.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$22 = "ElAffix";
- //#endregion
- //#region node_modules/element-plus/es/components/affix/index.mjs
- var ElAffix = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$22,
- __name: "affix",
- props: affixProps,
- emits: affixEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("affix");
- const target = shallowRef();
- const root = shallowRef();
- const scrollContainer = shallowRef();
- const { height: windowHeight } = useWindowSize();
- const { height: rootHeight, width: rootWidth, top: rootTop, bottom: rootBottom, left: rootLeft, update: updateRoot } = useElementBounding(root, { windowScroll: false });
- const targetRect = useElementBounding(target);
- const fixed = ref(false);
- const scrollTop = ref(0);
- const transform = ref(0);
- const teleportDisabled = computed(() => {
- return !props.teleported || !fixed.value;
- });
- const rootStyle = computed(() => {
- return {
- display: "flow-root",
- height: fixed.value ? `${rootHeight.value}px` : "",
- width: fixed.value ? `${rootWidth.value}px` : ""
- };
- });
- const affixStyle = computed(() => {
- if (!fixed.value) return {};
- const offset = addUnit(props.offset);
- return {
- height: `${rootHeight.value}px`,
- width: `${rootWidth.value}px`,
- top: props.position === "top" ? offset : "",
- bottom: props.position === "bottom" ? offset : "",
- left: props.teleported ? `${rootLeft.value}px` : "",
- transform: transform.value ? `translateY(${transform.value}px)` : "",
- zIndex: props.zIndex
- };
- });
- const update = () => {
- if (!scrollContainer.value) return;
- scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
- const { position, target, offset } = props;
- const rootHeightOffset = offset + rootHeight.value;
- if (position === "top") if (target) {
- const difference = targetRect.bottom.value - rootHeightOffset;
- fixed.value = offset > rootTop.value && targetRect.bottom.value > 0;
- transform.value = difference < 0 ? difference : 0;
- } else fixed.value = offset > rootTop.value;
- else if (target) {
- const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
- fixed.value = windowHeight.value - offset < rootBottom.value && windowHeight.value > targetRect.top.value;
- transform.value = difference < 0 ? -difference : 0;
- } else fixed.value = windowHeight.value - offset < rootBottom.value;
- };
- const updateRootRect = async () => {
- if (!fixed.value) {
- updateRoot();
- return;
- }
- fixed.value = false;
- await nextTick();
- updateRoot();
- fixed.value = true;
- };
- const handleScroll = async () => {
- updateRoot();
- await nextTick();
- emit("scroll", {
- scrollTop: scrollTop.value,
- fixed: fixed.value
- });
- };
- watch(fixed, (val) => emit(CHANGE_EVENT, val));
- onMounted(() => {
- if (props.target) {
- target.value = document.querySelector(props.target) ?? void 0;
- if (!target.value) throwError(COMPONENT_NAME$22, `Target does not exist: ${props.target}`);
- } else target.value = document.documentElement;
- scrollContainer.value = getScrollContainer(root.value, true);
- updateRoot();
- });
- onActivated(() => {
- nextTick(updateRootRect);
- });
- onDeactivated(() => {
- fixed.value = false;
- });
- useEventListener(scrollContainer, "scroll", handleScroll);
- watchEffect(update);
- __expose({
- update,
- updateRoot: updateRootRect
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "root",
- ref: root,
- class: normalizeClass(unref(ns).b()),
- style: normalizeStyle(rootStyle.value)
- }, [createVNode(unref(ElTeleport), {
- disabled: teleportDisabled.value,
- to: __props.appendTo
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
- style: normalizeStyle(affixStyle.value)
- }, [renderSlot(_ctx.$slots, "default")], 6)]),
- _: 3
- }, 8, ["disabled", "to"])], 6);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/icon.mjs
- var iconPropType = definePropType([
- String,
- Object,
- Function
- ]);
- var CloseComponents = { Close: close_default };
- var TypeComponents = {
- Close: close_default,
- SuccessFilled: success_filled_default,
- InfoFilled: info_filled_default,
- WarningFilled: warning_filled_default,
- CircleCloseFilled: circle_close_filled_default
- };
- var TypeComponentsMap = {
- primary: info_filled_default,
- success: success_filled_default,
- warning: warning_filled_default,
- error: circle_close_filled_default,
- info: info_filled_default
- };
- var ValidateComponentsMap = {
- validating: loading_default,
- success: circle_check_default,
- error: circle_close_default
- };
- //#endregion
- //#region node_modules/element-plus/es/components/alert/src/alert.mjs
- var alertEffects = ["light", "dark"];
- /**
- * @deprecated Removed after 3.0.0, Use `AlertProps` instead.
- */
- var alertProps = buildProps({
- title: {
- type: String,
- default: ""
- },
- description: {
- type: String,
- default: ""
- },
- type: {
- type: String,
- values: keysOf(TypeComponentsMap),
- default: "info"
- },
- closable: {
- type: Boolean,
- default: true
- },
- closeText: {
- type: String,
- default: ""
- },
- showIcon: Boolean,
- center: Boolean,
- effect: {
- type: String,
- values: alertEffects,
- default: "light"
- }
- });
- var alertEmits = { close: (evt) => evt instanceof MouseEvent };
- //#endregion
- //#region node_modules/element-plus/es/components/icon/src/icon.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `IconProps` instead.
- */
- var iconProps = buildProps({
- size: { type: definePropType([Number, String]) },
- color: { type: String }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/icon/index.mjs
- var ElIcon = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElIcon",
- inheritAttrs: false,
- __name: "icon",
- props: iconProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("icon");
- const style = computed(() => {
- const { size, color } = props;
- const fontSize = addUnit(size);
- if (!fontSize && !color) return {};
- return {
- fontSize,
- "--color": color
- };
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("i", mergeProps({
- class: unref(ns).b(),
- style: style.value
- }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/alert/index.mjs
- var ElAlert = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElAlert",
- __name: "alert",
- props: alertProps,
- emits: alertEmits,
- setup(__props, { emit: __emit }) {
- const { Close } = TypeComponents;
- const props = __props;
- const emit = __emit;
- const slots = useSlots();
- const ns = useNamespace("alert");
- const visible = ref(true);
- const iconComponent = computed(() => TypeComponentsMap[props.type]);
- const hasDesc = computed(() => {
- if (props.description) return true;
- const slotContent = slots.default?.();
- if (!slotContent) return false;
- return flattedChildren(slotContent).some((child) => !isComment(child));
- });
- const close = (evt) => {
- visible.value = false;
- emit("close", evt);
- };
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, {
- name: unref(ns).b("fade"),
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createBaseVNode("div", {
- class: normalizeClass([
- unref(ns).b(),
- unref(ns).m(__props.type),
- unref(ns).is("center", __props.center),
- unref(ns).is(__props.effect)
- ]),
- role: "alert"
- }, [__props.showIcon && (_ctx.$slots.icon || iconComponent.value) ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(ns).e("icon"), unref(ns).is("big", hasDesc.value)])
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))])]),
- _: 3
- }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [
- __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass([unref(ns).e("title"), { "with-description": hasDesc.value }])
- }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true),
- hasDesc.value ? (openBlock(), createElementBlock("p", {
- key: 1,
- class: normalizeClass(unref(ns).e("description"))
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 2)) : createCommentVNode("v-if", true),
- __props.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [__props.closeText ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")]),
- onClick: close
- }, toDisplayString(__props.closeText), 3)) : (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass(unref(ns).e("close-btn")),
- onClick: close
- }, {
- default: withCtx(() => [createVNode(unref(Close))]),
- _: 1
- }, 8, ["class"]))], 64)) : createCommentVNode("v-if", true)
- ], 2)], 2), [[vShow, visible.value]])]),
- _: 3
- }, 8, ["name"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/popper.mjs
- var Effect = {
- LIGHT: "light",
- DARK: "dark"
- };
- var roleTypes = [
- "dialog",
- "grid",
- "group",
- "listbox",
- "menu",
- "navigation",
- "tooltip",
- "tree"
- ];
- /**
- * @deprecated Removed after 3.0.0, Use `PopperProps` instead.
- */
- var popperProps = buildProps({ role: {
- type: String,
- values: roleTypes,
- default: "tooltip"
- } });
- /** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */
- var usePopperProps = popperProps;
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/constants.mjs
- var POPPER_INJECTION_KEY = Symbol("popper");
- var POPPER_CONTENT_INJECTION_KEY = Symbol("popperContent");
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/arrow2.mjs
- var arrow_default = /* @__PURE__ */ defineComponent({
- name: "ElPopperArrow",
- inheritAttrs: false,
- __name: "arrow",
- setup(__props, { expose: __expose }) {
- const ns = useNamespace("popper");
- const { arrowRef, arrowStyle } = inject(POPPER_CONTENT_INJECTION_KEY, void 0);
- onBeforeUnmount(() => {
- arrowRef.value = void 0;
- });
- __expose({ arrowRef });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", {
- ref_key: "arrowRef",
- ref: arrowRef,
- class: normalizeClass(unref(ns).e("arrow")),
- style: normalizeStyle(unref(arrowStyle)),
- "data-popper-arrow": ""
- }, null, 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/trigger.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PopperTriggerProps` instead.
- */
- var popperTriggerProps = buildProps({
- virtualRef: { type: definePropType(Object) },
- virtualTriggering: Boolean,
- onMouseenter: { type: definePropType(Function) },
- onMouseleave: { type: definePropType(Function) },
- onClick: { type: definePropType(Function) },
- onKeydown: { type: definePropType(Function) },
- onFocus: { type: definePropType(Function) },
- onBlur: { type: definePropType(Function) },
- onContextmenu: { type: definePropType(Function) },
- id: String,
- open: Boolean
- });
- /** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */
- var usePopperTriggerProps = popperTriggerProps;
- //#endregion
- //#region node_modules/element-plus/es/components/slot/src/only-child.mjs
- var NAME = "ElOnlyChild";
- var OnlyChild = /* @__PURE__ */ defineComponent({
- name: NAME,
- setup(_, { slots, attrs }) {
- const forwardRefDirective = useForwardRefDirective(inject(FORWARD_REF_INJECTION_KEY)?.setForwardRef ?? NOOP);
- return () => {
- const defaultSlot = slots.default?.(attrs);
- if (!defaultSlot) return null;
- const [firstLegitNode, length] = findFirstLegitChild(defaultSlot);
- if (!firstLegitNode) {
- debugWarn(NAME, "no valid child node found");
- return null;
- }
- if (length > 1) debugWarn(NAME, "requires exact only one valid child.");
- return withDirectives(cloneVNode(firstLegitNode, attrs), [[forwardRefDirective]]);
- };
- }
- });
- function findFirstLegitChild(node) {
- if (!node) return [null, 0];
- const children = node;
- const len = children.filter((c) => c.type !== Comment).length;
- for (const child of children) {
- /**
- * when user uses h(Fragment, [text]) to render plain string,
- * this switch case just cannot handle, when the value is primitives
- * we should just return the wrapped string
- */
- if (isObject$2(child)) switch (child.type) {
- case Comment: continue;
- case Text:
- case "svg": return [wrapTextContent(child), len];
- case Fragment: return findFirstLegitChild(child.children);
- default: return [child, len];
- }
- return [wrapTextContent(child), len];
- }
- return [null, 0];
- }
- function wrapTextContent(s) {
- const ns = useNamespace("only-child");
- return createVNode("span", { "class": ns.e("content") }, [s]);
- }
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/trigger2.mjs
- var trigger_default = /* @__PURE__ */ defineComponent({
- name: "ElPopperTrigger",
- inheritAttrs: false,
- __name: "trigger",
- props: popperTriggerProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { role, triggerRef } = inject(POPPER_INJECTION_KEY, void 0);
- useForwardRef(triggerRef);
- const ariaControls = computed(() => {
- return ariaHaspopup.value ? props.id : void 0;
- });
- const ariaDescribedby = computed(() => {
- if (role && role.value === "tooltip") return props.open && props.id ? props.id : void 0;
- });
- const ariaHaspopup = computed(() => {
- if (role && role.value !== "tooltip") return role.value;
- });
- const ariaExpanded = computed(() => {
- return ariaHaspopup.value ? `${props.open}` : void 0;
- });
- let virtualTriggerAriaStopWatch = void 0;
- const TRIGGER_ELE_EVENTS = [
- "onMouseenter",
- "onMouseleave",
- "onClick",
- "onKeydown",
- "onFocus",
- "onBlur",
- "onContextmenu"
- ];
- onMounted(() => {
- watch(() => props.virtualRef, (virtualEl) => {
- if (virtualEl) triggerRef.value = unrefElement(virtualEl);
- }, { immediate: true });
- watch(triggerRef, (el, prevEl) => {
- virtualTriggerAriaStopWatch?.();
- virtualTriggerAriaStopWatch = void 0;
- if (isElement$1(prevEl)) TRIGGER_ELE_EVENTS.forEach((eventName) => {
- const handler = props[eventName];
- if (handler) prevEl.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
- });
- if (isElement$1(el)) {
- TRIGGER_ELE_EVENTS.forEach((eventName) => {
- const handler = props[eventName];
- if (handler) el.addEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
- });
- if (isFocusable(el)) virtualTriggerAriaStopWatch = watch([
- ariaControls,
- ariaDescribedby,
- ariaHaspopup,
- ariaExpanded
- ], (watches) => {
- [
- "aria-controls",
- "aria-describedby",
- "aria-haspopup",
- "aria-expanded"
- ].forEach((key, idx) => {
- isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
- });
- }, { immediate: true });
- }
- if (isElement$1(prevEl) && isFocusable(prevEl)) [
- "aria-controls",
- "aria-describedby",
- "aria-haspopup",
- "aria-expanded"
- ].forEach((key) => prevEl.removeAttribute(key));
- }, { immediate: true });
- });
- onBeforeUnmount(() => {
- virtualTriggerAriaStopWatch?.();
- virtualTriggerAriaStopWatch = void 0;
- if (triggerRef.value && isElement$1(triggerRef.value)) {
- const el = triggerRef.value;
- TRIGGER_ELE_EVENTS.forEach((eventName) => {
- const handler = props[eventName];
- if (handler) el.removeEventListener(eventName.slice(2).toLowerCase(), handler, ["onFocus", "onBlur"].includes(eventName));
- });
- triggerRef.value = void 0;
- }
- });
- __expose({ triggerRef });
- return (_ctx, _cache) => {
- return !__props.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
- "aria-controls": ariaControls.value,
- "aria-describedby": ariaDescribedby.value,
- "aria-expanded": ariaExpanded.value,
- "aria-haspopup": ariaHaspopup.value
- }), {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 16, [
- "aria-controls",
- "aria-describedby",
- "aria-expanded",
- "aria-haspopup"
- ])) : createCommentVNode("v-if", true);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/arrow.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PopperArrowProps` instead.
- */
- var popperArrowProps = buildProps({ arrowOffset: {
- type: Number,
- default: 5
- } });
- var popperArrowPropsDefaults = { arrowOffset: 5 };
- /** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */
- var usePopperArrowProps = popperArrowProps;
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/content.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PopperCoreConfigProps` instead.
- */
- var popperCoreConfigProps = buildProps({
- boundariesPadding: {
- type: Number,
- default: 0
- },
- fallbackPlacements: {
- type: definePropType(Array),
- default: void 0
- },
- gpuAcceleration: {
- type: Boolean,
- default: true
- },
- offset: {
- type: Number,
- default: 12
- },
- placement: {
- type: String,
- values: Ee,
- default: "bottom"
- },
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- strategy: {
- type: String,
- values: ["fixed", "absolute"],
- default: "absolute"
- }
- });
- /**
- * @deprecated Removed after 3.0.0, Use `PopperContentProps` instead.
- */
- var popperContentProps = buildProps({
- ...popperCoreConfigProps,
- ...popperArrowProps,
- id: String,
- style: { type: definePropType([
- String,
- Array,
- Object
- ]) },
- className: { type: definePropType([
- String,
- Array,
- Object
- ]) },
- effect: {
- type: definePropType(String),
- default: "dark"
- },
- visible: Boolean,
- enterable: {
- type: Boolean,
- default: true
- },
- pure: Boolean,
- focusOnShow: Boolean,
- trapping: Boolean,
- popperClass: { type: definePropType([
- String,
- Array,
- Object
- ]) },
- popperStyle: { type: definePropType([
- String,
- Array,
- Object
- ]) },
- referenceEl: { type: definePropType(Object) },
- triggerTargetEl: { type: definePropType(Object) },
- stopPopperMouseEvent: {
- type: Boolean,
- default: true
- },
- virtualTriggering: Boolean,
- zIndex: Number,
- ...useAriaProps(["ariaLabel"]),
- loop: Boolean
- });
- var popperCoreConfigPropsDefaults = {
- boundariesPadding: 0,
- gpuAcceleration: true,
- offset: 12,
- placement: "bottom",
- popperOptions: () => ({}),
- strategy: "absolute"
- };
- var popperContentPropsDefaults = {
- ...popperCoreConfigPropsDefaults,
- ...popperArrowPropsDefaults,
- effect: "dark",
- enterable: true,
- stopPopperMouseEvent: true,
- visible: false,
- pure: false,
- focusOnShow: false,
- trapping: false,
- virtualTriggering: false,
- loop: false,
- style: void 0,
- popperStyle: void 0
- };
- var popperContentEmits = {
- mouseenter: (evt) => evt instanceof MouseEvent,
- mouseleave: (evt) => evt instanceof MouseEvent,
- focus: () => true,
- blur: () => true,
- close: () => true
- };
- /** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */
- var usePopperCoreConfigProps = popperCoreConfigProps;
- /** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */
- var usePopperContentProps = popperContentProps;
- /** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */
- var usePopperContentEmits = popperContentEmits;
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.
- */
- var formMetaProps = buildProps({
- size: {
- type: String,
- values: componentSizes
- },
- disabled: Boolean
- });
- /**
- * @deprecated Removed after 3.0.0, Use `FormProps` instead.
- */
- var formProps = buildProps({
- ...formMetaProps,
- model: Object,
- rules: { type: definePropType(Object) },
- labelPosition: {
- type: String,
- values: [
- "left",
- "right",
- "top"
- ],
- default: "right"
- },
- requireAsteriskPosition: {
- type: String,
- values: ["left", "right"],
- default: "left"
- },
- labelWidth: {
- type: [String, Number],
- default: ""
- },
- labelSuffix: {
- type: String,
- default: ""
- },
- inline: Boolean,
- inlineMessage: Boolean,
- statusIcon: Boolean,
- showMessage: {
- type: Boolean,
- default: true
- },
- validateOnRuleChange: {
- type: Boolean,
- default: true
- },
- hideRequiredAsterisk: Boolean,
- scrollToError: Boolean,
- scrollIntoViewOptions: {
- type: definePropType([Object, Boolean]),
- default: true
- }
- });
- var formEmits = { validate: (prop, isValid, message) => (isArray$1(prop) || isString(prop)) && isBoolean(isValid) && isString(message) };
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/constants.mjs
- var formContextKey = Symbol("formContextKey");
- var formItemContextKey = Symbol("formItemContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs
- var useFormSize = (fallback, ignore = {}) => {
- const emptyRef = ref(void 0);
- const size = ignore.prop ? emptyRef : useProp("size");
- const globalConfig = ignore.global ? emptyRef : useGlobalSize();
- const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
- const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
- return computed(() => size.value || unref(fallback) || formItem?.size || form?.size || globalConfig.value || "");
- };
- var useFormDisabled = (fallback) => {
- const disabled = useProp("disabled");
- const form = inject(formContextKey, void 0);
- return computed(() => {
- return disabled.value ?? unref(fallback) ?? form?.disabled ?? false;
- });
- };
- var useSize = useFormSize;
- var useDisabled = useFormDisabled;
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/hooks/use-form-item.mjs
- var useFormItem = () => {
- return {
- form: inject(formContextKey, void 0),
- formItem: inject(formItemContextKey, void 0)
- };
- };
- var useFormItemInputId = (props, { formItemContext, disableIdGeneration, disableIdManagement }) => {
- if (!disableIdGeneration) disableIdGeneration = ref(false);
- if (!disableIdManagement) disableIdManagement = ref(false);
- const instance = getCurrentInstance();
- const inLabel = () => {
- let parent = instance?.parent;
- while (parent) {
- if (parent.type.name === "ElFormItem") return false;
- if (parent.type.name === "ElLabelWrap") return true;
- parent = parent.parent;
- }
- return false;
- };
- const inputId = ref();
- let idUnwatch = void 0;
- const isLabeledByFormItem = computed(() => {
- return !!(!(props.label || props.ariaLabel) && formItemContext && formItemContext.inputIds && formItemContext.inputIds?.length <= 1);
- });
- onMounted(() => {
- idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration]) => {
- const newId = id ?? (!disableIdGeneration ? useId().value : void 0);
- if (newId !== inputId.value) {
- if (formItemContext?.removeInputId && !inLabel()) {
- inputId.value && formItemContext.removeInputId(inputId.value);
- if (!disableIdManagement?.value && !disableIdGeneration && newId) formItemContext.addInputId(newId);
- }
- inputId.value = newId;
- }
- }, { immediate: true });
- });
- onUnmounted(() => {
- idUnwatch && idUnwatch();
- if (formItemContext?.removeInputId) inputId.value && formItemContext.removeInputId(inputId.value);
- });
- return {
- isLabeledByFormItem,
- inputId
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form-item.mjs
- var formItemValidateStates = [
- "",
- "error",
- "validating",
- "success"
- ];
- /**
- * @deprecated Removed after 3.0.0, Use `FormItemProps` instead.
- */
- var formItemProps = buildProps({
- label: String,
- labelWidth: { type: [String, Number] },
- labelPosition: {
- type: String,
- values: [
- "left",
- "right",
- "top",
- ""
- ],
- default: ""
- },
- prop: { type: definePropType([String, Array]) },
- required: {
- type: Boolean,
- default: void 0
- },
- rules: { type: definePropType([Object, Array]) },
- error: String,
- validateStatus: {
- type: String,
- values: formItemValidateStates
- },
- for: String,
- inlineMessage: {
- type: Boolean,
- default: void 0
- },
- showMessage: {
- type: Boolean,
- default: true
- },
- size: {
- type: String,
- values: componentSizes
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/utils/arrays.mjs
- var unique = (arr) => [...new Set(arr)];
- var extractFirst = (arr) => {
- return isArray$1(arr) ? arr[0] : arr;
- };
- /** like `_.castArray`, except falsy value returns empty array. */
- var castArray = (arr) => {
- if (!arr && arr !== 0) return [];
- return isArray$1(arr) ? arr : [arr];
- };
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/utils.mjs
- var SCOPE$10 = "ElForm";
- function useFormLabelWidth() {
- const potentialLabelWidthArr = ref([]);
- const autoLabelWidth = computed(() => {
- if (!potentialLabelWidthArr.value.length) return "0";
- const max = Math.max(...potentialLabelWidthArr.value);
- return max ? `${max}px` : "";
- });
- function getLabelWidthIndex(width) {
- const index = potentialLabelWidthArr.value.indexOf(width);
- if (index === -1 && autoLabelWidth.value === "0") debugWarn(SCOPE$10, `unexpected width ${width}`);
- return index;
- }
- function registerLabelWidth(val, oldVal) {
- if (val && oldVal) {
- const index = getLabelWidthIndex(oldVal);
- potentialLabelWidthArr.value.splice(index, 1, val);
- } else if (val) potentialLabelWidthArr.value.push(val);
- }
- function deregisterLabelWidth(val) {
- const index = getLabelWidthIndex(val);
- if (index > -1) potentialLabelWidthArr.value.splice(index, 1);
- }
- return {
- autoLabelWidth,
- registerLabelWidth,
- deregisterLabelWidth
- };
- }
- var filterFields = (fields, props) => {
- const normalized = castArray$1(props).map((prop) => isArray$1(prop) ? prop.join(".") : prop);
- return normalized.length > 0 ? fields.filter((field) => field.propString && normalized.includes(field.propString)) : fields;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$21 = "ElForm";
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form2.mjs
- var form_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$21,
- __name: "form",
- props: formProps,
- emits: formEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const formRef = ref();
- const fields = reactive([]);
- const initialValues = /* @__PURE__ */ new Map();
- const formSize = useFormSize();
- const ns = useNamespace("form");
- const formClasses = computed(() => {
- const { labelPosition, inline } = props;
- return [
- ns.b(),
- ns.m(formSize.value || "default"),
- {
- [ns.m(`label-${labelPosition}`)]: labelPosition,
- [ns.m("inline")]: inline
- }
- ];
- });
- const getField = (prop) => {
- return filterFields(fields, [prop])[0];
- };
- const addField = (field) => {
- fields.push(field);
- if (field.propString) if (initialValues.has(field.propString)) field.setInitialValue(initialValues.get(field.propString));
- else initialValues.set(field.propString, cloneDeep(field.fieldValue));
- };
- const removeField = (field) => {
- if (field.prop) fields.splice(fields.indexOf(field), 1);
- };
- const setInitialValues = (initModel) => {
- if (!props.model) {
- debugWarn(COMPONENT_NAME$21, "model is required for setInitialValues to work.");
- return;
- }
- if (!initModel) {
- debugWarn(COMPONENT_NAME$21, "initModel is required for setInitialValues to work.");
- return;
- }
- for (const key of initialValues.keys()) initialValues.set(key, cloneDeep(getProp(initModel, key).value));
- fields.forEach((field) => {
- if (field.prop) field.setInitialValue(getProp(initModel, field.prop).value);
- });
- };
- const resetFields = (properties = []) => {
- if (!props.model) {
- debugWarn(COMPONENT_NAME$21, "model is required for resetFields to work.");
- return;
- }
- filterFields(fields, properties).forEach((field) => field.resetField());
- const activePropStrings = new Set(fields.map((f) => f.propString).filter(Boolean));
- const propsToCheck = properties.length > 0 ? castArray$1(properties).map((p) => isArray$1(p) ? p.join(".") : p) : [...initialValues.keys()];
- for (const propString of propsToCheck) if (!activePropStrings.has(propString) && initialValues.has(propString)) getProp(props.model, propString).value = cloneDeep(initialValues.get(propString));
- };
- const clearValidate = (props = []) => {
- filterFields(fields, props).forEach((field) => field.clearValidate());
- };
- const isValidatable = computed(() => {
- const hasModel = !!props.model;
- if (!hasModel) debugWarn(COMPONENT_NAME$21, "model is required for validate to work.");
- return hasModel;
- });
- const obtainValidateFields = (props) => {
- if (fields.length === 0) return [];
- const filteredFields = filterFields(fields, props);
- if (!filteredFields.length) {
- debugWarn(COMPONENT_NAME$21, "please pass correct props!");
- return [];
- }
- return filteredFields;
- };
- const validate = async (callback) => validateField(void 0, callback);
- const doValidateField = async (props = []) => {
- if (!isValidatable.value) return false;
- const fields = obtainValidateFields(props);
- if (fields.length === 0) return true;
- let validationErrors = {};
- for (const field of fields) try {
- await field.validate("");
- if (field.validateState === "error" && !field.error) field.resetField();
- } catch (fields) {
- validationErrors = {
- ...validationErrors,
- ...fields
- };
- }
- if (Object.keys(validationErrors).length === 0) return true;
- return Promise.reject(validationErrors);
- };
- const validateField = async (modelProps = [], callback) => {
- let result = false;
- const shouldThrow = !isFunction$1(callback);
- try {
- result = await doValidateField(modelProps);
- if (result === true) await callback?.(result);
- return result;
- } catch (e) {
- if (e instanceof Error) throw e;
- const invalidFields = e;
- if (props.scrollToError) {
- if (formRef.value) formRef.value.querySelector(`.${ns.b()}-item.is-error`)?.scrollIntoView(props.scrollIntoViewOptions);
- }
- !result && await callback?.(false, invalidFields);
- return shouldThrow && Promise.reject(invalidFields);
- }
- };
- const scrollToField = (prop) => {
- const field = getField(prop);
- if (field) field.$el?.scrollIntoView(props.scrollIntoViewOptions);
- };
- watch(() => props.rules, () => {
- if (props.validateOnRuleChange) validate().catch((err) => debugWarn(err));
- }, {
- deep: true,
- flush: "post"
- });
- provide(formContextKey, reactive({
- ...toRefs(props),
- emit,
- resetFields,
- clearValidate,
- validateField,
- getField,
- addField,
- removeField,
- setInitialValues,
- ...useFormLabelWidth()
- }));
- __expose({
- validate,
- validateField,
- resetFields,
- clearValidate,
- scrollToField,
- getField,
- fields,
- setInitialValues
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("form", {
- ref_key: "formRef",
- ref: formRef,
- class: normalizeClass(formClasses.value)
- }, [renderSlot(_ctx.$slots, "default")], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form-label-wrap.mjs
- var COMPONENT_NAME$20 = "ElLabelWrap";
- var form_label_wrap_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$20,
- props: {
- isAutoWidth: Boolean,
- updateAll: Boolean
- },
- setup(props, { slots }) {
- const formContext = inject(formContextKey, void 0);
- const formItemContext = inject(formItemContextKey);
- if (!formItemContext) throwError(COMPONENT_NAME$20, "usage: <el-form-item><label-wrap /></el-form-item>");
- const ns = useNamespace("form");
- const el = ref();
- const computedWidth = ref(0);
- const getLabelWidth = () => {
- if (el.value?.firstElementChild) {
- const width = window.getComputedStyle(el.value.firstElementChild).width;
- return Math.ceil(Number.parseFloat(width));
- } else return 0;
- };
- const updateLabelWidth = (action = "update") => {
- nextTick(() => {
- if (slots.default && props.isAutoWidth) {
- if (action === "update") computedWidth.value = getLabelWidth();
- else if (action === "remove") formContext?.deregisterLabelWidth(computedWidth.value);
- }
- });
- };
- const updateLabelWidthFn = () => updateLabelWidth("update");
- onMounted(() => {
- updateLabelWidthFn();
- });
- onBeforeUnmount(() => {
- updateLabelWidth("remove");
- });
- onUpdated(() => updateLabelWidthFn());
- watch(computedWidth, (val, oldVal) => {
- if (props.updateAll) formContext?.registerLabelWidth(val, oldVal);
- });
- useResizeObserver(computed(() => el.value?.firstElementChild ?? null), updateLabelWidthFn);
- return () => {
- if (!slots) return null;
- const { isAutoWidth } = props;
- if (isAutoWidth) {
- const autoLabelWidth = formContext?.autoLabelWidth;
- const hasLabel = formItemContext?.hasLabel;
- const style = {};
- if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") {
- const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value);
- const marginPosition = (formItemContext.labelPosition || formContext.labelPosition) === "left" ? "marginRight" : "marginLeft";
- if (marginWidth) style[marginPosition] = `${marginWidth}px`;
- }
- return createVNode("div", {
- "ref": el,
- "class": [ns.be("item", "label-wrap")],
- "style": style
- }, [slots.default?.()]);
- } else return createVNode(Fragment, { "ref": el }, [slots.default?.()]);
- };
- }
- });
- //#endregion
- //#region node_modules/async-validator/dist-web/index.js
- function _extends() {
- _extends = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
- }
- return target;
- };
- return _extends.apply(this, arguments);
- }
- function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- _setPrototypeOf(subClass, superClass);
- }
- function _getPrototypeOf(o) {
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
- return o.__proto__ || Object.getPrototypeOf(o);
- };
- return _getPrototypeOf(o);
- }
- function _setPrototypeOf(o, p) {
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
- o.__proto__ = p;
- return o;
- };
- return _setPrototypeOf(o, p);
- }
- function _isNativeReflectConstruct() {
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
- if (Reflect.construct.sham) return false;
- if (typeof Proxy === "function") return true;
- try {
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
- return true;
- } catch (e) {
- return false;
- }
- }
- function _construct(Parent, args, Class) {
- if (_isNativeReflectConstruct()) _construct = Reflect.construct.bind();
- else _construct = function _construct(Parent, args, Class) {
- var a = [null];
- a.push.apply(a, args);
- var instance = new (Function.bind.apply(Parent, a))();
- if (Class) _setPrototypeOf(instance, Class.prototype);
- return instance;
- };
- return _construct.apply(null, arguments);
- }
- function _isNativeFunction(fn) {
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
- }
- function _wrapNativeSuper(Class) {
- var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
- if (Class === null || !_isNativeFunction(Class)) return Class;
- if (typeof Class !== "function") throw new TypeError("Super expression must either be null or a function");
- if (typeof _cache !== "undefined") {
- if (_cache.has(Class)) return _cache.get(Class);
- _cache.set(Class, Wrapper);
- }
- function Wrapper() {
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
- }
- Wrapper.prototype = Object.create(Class.prototype, { constructor: {
- value: Wrapper,
- enumerable: false,
- writable: true,
- configurable: true
- } });
- return _setPrototypeOf(Wrapper, Class);
- };
- return _wrapNativeSuper(Class);
- }
- var formatRegExp = /%[sdj%]/g;
- var warning = function warning() {};
- if (typeof process !== "undefined" && process.env && typeof window !== "undefined" && typeof document !== "undefined") warning = function warning(type, errors) {
- if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
- if (errors.every(function(e) {
- return typeof e === "string";
- })) console.warn(type, errors);
- }
- };
- function convertFieldsError(errors) {
- if (!errors || !errors.length) return null;
- var fields = {};
- errors.forEach(function(error) {
- var field = error.field;
- fields[field] = fields[field] || [];
- fields[field].push(error);
- });
- return fields;
- }
- function format(template) {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
- var i = 0;
- var len = args.length;
- if (typeof template === "function") return template.apply(null, args);
- if (typeof template === "string") return template.replace(formatRegExp, function(x) {
- if (x === "%%") return "%";
- if (i >= len) return x;
- switch (x) {
- case "%s": return String(args[i++]);
- case "%d": return Number(args[i++]);
- case "%j":
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return "[Circular]";
- }
- break;
- default: return x;
- }
- });
- return template;
- }
- function isNativeStringType(type) {
- return type === "string" || type === "url" || type === "hex" || type === "email" || type === "date" || type === "pattern";
- }
- function isEmptyValue(value, type) {
- if (value === void 0 || value === null) return true;
- if (type === "array" && Array.isArray(value) && !value.length) return true;
- if (isNativeStringType(type) && typeof value === "string" && !value) return true;
- return false;
- }
- function asyncParallelArray(arr, func, callback) {
- var results = [];
- var total = 0;
- var arrLength = arr.length;
- function count(errors) {
- results.push.apply(results, errors || []);
- total++;
- if (total === arrLength) callback(results);
- }
- arr.forEach(function(a) {
- func(a, count);
- });
- }
- function asyncSerialArray(arr, func, callback) {
- var index = 0;
- var arrLength = arr.length;
- function next(errors) {
- if (errors && errors.length) {
- callback(errors);
- return;
- }
- var original = index;
- index = index + 1;
- if (original < arrLength) func(arr[original], next);
- else callback([]);
- }
- next([]);
- }
- function flattenObjArr(objArr) {
- var ret = [];
- Object.keys(objArr).forEach(function(k) {
- ret.push.apply(ret, objArr[k] || []);
- });
- return ret;
- }
- var AsyncValidationError = /* @__PURE__ */ function(_Error) {
- _inheritsLoose(AsyncValidationError, _Error);
- function AsyncValidationError(errors, fields) {
- var _this = _Error.call(this, "Async Validation Error") || this;
- _this.errors = errors;
- _this.fields = fields;
- return _this;
- }
- return AsyncValidationError;
- }(/* @__PURE__ */ _wrapNativeSuper(Error));
- function asyncMap(objArr, option, func, callback, source) {
- if (option.first) {
- var _pending = new Promise(function(resolve, reject) {
- asyncSerialArray(flattenObjArr(objArr), func, function next(errors) {
- callback(errors);
- return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
- });
- });
- _pending["catch"](function(e) {
- return e;
- });
- return _pending;
- }
- var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
- var objArrKeys = Object.keys(objArr);
- var objArrLength = objArrKeys.length;
- var total = 0;
- var results = [];
- var pending = new Promise(function(resolve, reject) {
- var next = function next(errors) {
- results.push.apply(results, errors);
- total++;
- if (total === objArrLength) {
- callback(results);
- return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
- }
- };
- if (!objArrKeys.length) {
- callback(results);
- resolve(source);
- }
- objArrKeys.forEach(function(key) {
- var arr = objArr[key];
- if (firstFields.indexOf(key) !== -1) asyncSerialArray(arr, func, next);
- else asyncParallelArray(arr, func, next);
- });
- });
- pending["catch"](function(e) {
- return e;
- });
- return pending;
- }
- function isErrorObj(obj) {
- return !!(obj && obj.message !== void 0);
- }
- function getValue(value, path) {
- var v = value;
- for (var i = 0; i < path.length; i++) {
- if (v == void 0) return v;
- v = v[path[i]];
- }
- return v;
- }
- function complementError(rule, source) {
- return function(oe) {
- var fieldValue;
- if (rule.fullFields) fieldValue = getValue(source, rule.fullFields);
- else fieldValue = source[oe.field || rule.fullField];
- if (isErrorObj(oe)) {
- oe.field = oe.field || rule.fullField;
- oe.fieldValue = fieldValue;
- return oe;
- }
- return {
- message: typeof oe === "function" ? oe() : oe,
- fieldValue,
- field: oe.field || rule.fullField
- };
- };
- }
- function deepMerge(target, source) {
- if (source) {
- for (var s in source) if (source.hasOwnProperty(s)) {
- var value = source[s];
- if (typeof value === "object" && typeof target[s] === "object") target[s] = _extends({}, target[s], value);
- else target[s] = value;
- }
- }
- return target;
- }
- var required$1 = function required(rule, value, source, errors, options, type) {
- if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) errors.push(format(options.messages.required, rule.fullField));
- };
- /**
- * Rule for validating whitespace.
- *
- * @param rule The validation rule.
- * @param value The value of the field on the source object.
- * @param source The source object being validated.
- * @param errors An array of errors that this rule may add
- * validation errors to.
- * @param options The validation options.
- * @param options.messages The validation messages.
- */
- var whitespace = function whitespace(rule, value, source, errors, options) {
- if (/^\s+$/.test(value) || value === "") errors.push(format(options.messages.whitespace, rule.fullField));
- };
- var urlReg;
- var getUrlRegex = (function() {
- if (urlReg) return urlReg;
- var word = "[a-fA-F\\d:]";
- var b = function b(options) {
- return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
- };
- var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
- var v6seg = "[a-fA-F\\d]{1,4}";
- var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
- var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
- var v4exact = new RegExp("^" + v4 + "$");
- var v6exact = new RegExp("^" + v6 + "$");
- var ip = function ip(options) {
- return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
- };
- ip.v4 = function(options) {
- return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
- };
- ip.v6 = function(options) {
- return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
- };
- var protocol = "(?:(?:[a-z]+:)?//)";
- var auth = "(?:\\S+(?::\\S*)?@)?";
- var ipv4 = ip.v4().source;
- var ipv6 = ip.v6().source;
- var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s\"]*)?";
- urlReg = new RegExp("(?:^" + regex + "$)", "i");
- return urlReg;
- });
- var pattern$2 = {
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
- };
- var types = {
- integer: function integer(value) {
- return types.number(value) && parseInt(value, 10) === value;
- },
- "float": function float(value) {
- return types.number(value) && !types.integer(value);
- },
- array: function array(value) {
- return Array.isArray(value);
- },
- regexp: function regexp(value) {
- if (value instanceof RegExp) return true;
- try {
- return !!new RegExp(value);
- } catch (e) {
- return false;
- }
- },
- date: function date(value) {
- return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
- },
- number: function number(value) {
- if (isNaN(value)) return false;
- return typeof value === "number";
- },
- object: function object(value) {
- return typeof value === "object" && !types.array(value);
- },
- method: function method(value) {
- return typeof value === "function";
- },
- email: function email(value) {
- return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
- },
- url: function url(value) {
- return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
- },
- hex: function hex(value) {
- return typeof value === "string" && !!value.match(pattern$2.hex);
- }
- };
- var type$1 = function type(rule, value, source, errors, options) {
- if (rule.required && value === void 0) {
- required$1(rule, value, source, errors, options);
- return;
- }
- var custom = [
- "integer",
- "float",
- "array",
- "regexp",
- "object",
- "method",
- "email",
- "number",
- "date",
- "url",
- "hex"
- ];
- var ruleType = rule.type;
- if (custom.indexOf(ruleType) > -1) {
- if (!types[ruleType](value)) errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
- } else if (ruleType && typeof value !== rule.type) errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
- };
- var range = function range(rule, value, source, errors, options) {
- var len = typeof rule.len === "number";
- var min = typeof rule.min === "number";
- var max = typeof rule.max === "number";
- var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
- var val = value;
- var key = null;
- var num = typeof value === "number";
- var str = typeof value === "string";
- var arr = Array.isArray(value);
- if (num) key = "number";
- else if (str) key = "string";
- else if (arr) key = "array";
- if (!key) return false;
- if (arr) val = value.length;
- if (str) val = value.replace(spRegexp, "_").length;
- if (len) {
- if (val !== rule.len) errors.push(format(options.messages[key].len, rule.fullField, rule.len));
- } else if (min && !max && val < rule.min) errors.push(format(options.messages[key].min, rule.fullField, rule.min));
- else if (max && !min && val > rule.max) errors.push(format(options.messages[key].max, rule.fullField, rule.max));
- else if (min && max && (val < rule.min || val > rule.max)) errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
- };
- var ENUM$1 = "enum";
- var enumerable$1 = function enumerable(rule, value, source, errors, options) {
- rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
- if (rule[ENUM$1].indexOf(value) === -1) errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
- };
- var pattern$1 = function pattern(rule, value, source, errors, options) {
- if (rule.pattern) {
- if (rule.pattern instanceof RegExp) {
- rule.pattern.lastIndex = 0;
- if (!rule.pattern.test(value)) errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
- } else if (typeof rule.pattern === "string") {
- if (!new RegExp(rule.pattern).test(value)) errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
- }
- }
- };
- var rules = {
- required: required$1,
- whitespace,
- type: type$1,
- range,
- "enum": enumerable$1,
- pattern: pattern$1
- };
- var string = function string(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value, "string") && !rule.required) return callback();
- rules.required(rule, value, source, errors, options, "string");
- if (!isEmptyValue(value, "string")) {
- rules.type(rule, value, source, errors, options);
- rules.range(rule, value, source, errors, options);
- rules.pattern(rule, value, source, errors, options);
- if (rule.whitespace === true) rules.whitespace(rule, value, source, errors, options);
- }
- }
- callback(errors);
- };
- var method = function method(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) rules.type(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var number = function number(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (value === "") value = void 0;
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) {
- rules.type(rule, value, source, errors, options);
- rules.range(rule, value, source, errors, options);
- }
- }
- callback(errors);
- };
- var _boolean = function _boolean(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) rules.type(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var regexp = function regexp(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (!isEmptyValue(value)) rules.type(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var integer = function integer(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) {
- rules.type(rule, value, source, errors, options);
- rules.range(rule, value, source, errors, options);
- }
- }
- callback(errors);
- };
- var floatFn = function floatFn(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) {
- rules.type(rule, value, source, errors, options);
- rules.range(rule, value, source, errors, options);
- }
- }
- callback(errors);
- };
- var array = function array(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if ((value === void 0 || value === null) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options, "array");
- if (value !== void 0 && value !== null) {
- rules.type(rule, value, source, errors, options);
- rules.range(rule, value, source, errors, options);
- }
- }
- callback(errors);
- };
- var object = function object(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) rules.type(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var ENUM = "enum";
- var enumerable = function enumerable(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (value !== void 0) rules[ENUM](rule, value, source, errors, options);
- }
- callback(errors);
- };
- var pattern = function pattern(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value, "string") && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (!isEmptyValue(value, "string")) rules.pattern(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var date = function date(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value, "date") && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- if (!isEmptyValue(value, "date")) {
- var dateObject;
- if (value instanceof Date) dateObject = value;
- else dateObject = new Date(value);
- rules.type(rule, dateObject, source, errors, options);
- if (dateObject) rules.range(rule, dateObject.getTime(), source, errors, options);
- }
- }
- callback(errors);
- };
- var required = function required(rule, value, callback, source, options) {
- var errors = [];
- var type = Array.isArray(value) ? "array" : typeof value;
- rules.required(rule, value, source, errors, options, type);
- callback(errors);
- };
- var type = function type(rule, value, callback, source, options) {
- var ruleType = rule.type;
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value, ruleType) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options, ruleType);
- if (!isEmptyValue(value, ruleType)) rules.type(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var any = function any(rule, value, callback, source, options) {
- var errors = [];
- if (rule.required || !rule.required && source.hasOwnProperty(rule.field)) {
- if (isEmptyValue(value) && !rule.required) return callback();
- rules.required(rule, value, source, errors, options);
- }
- callback(errors);
- };
- var validators = {
- string,
- method,
- number,
- "boolean": _boolean,
- regexp,
- integer,
- "float": floatFn,
- array,
- object,
- "enum": enumerable,
- pattern,
- date,
- url: type,
- hex: type,
- email: type,
- required,
- any
- };
- function newMessages() {
- return {
- "default": "Validation error on field %s",
- required: "%s is required",
- "enum": "%s must be one of %s",
- whitespace: "%s cannot be empty",
- date: {
- format: "%s date %s is invalid for format %s",
- parse: "%s date could not be parsed, %s is invalid ",
- invalid: "%s date %s is invalid"
- },
- types: {
- string: "%s is not a %s",
- method: "%s is not a %s (function)",
- array: "%s is not an %s",
- object: "%s is not an %s",
- number: "%s is not a %s",
- date: "%s is not a %s",
- "boolean": "%s is not a %s",
- integer: "%s is not an %s",
- "float": "%s is not a %s",
- regexp: "%s is not a valid %s",
- email: "%s is not a valid %s",
- url: "%s is not a valid %s",
- hex: "%s is not a valid %s"
- },
- string: {
- len: "%s must be exactly %s characters",
- min: "%s must be at least %s characters",
- max: "%s cannot be longer than %s characters",
- range: "%s must be between %s and %s characters"
- },
- number: {
- len: "%s must equal %s",
- min: "%s cannot be less than %s",
- max: "%s cannot be greater than %s",
- range: "%s must be between %s and %s"
- },
- array: {
- len: "%s must be exactly %s in length",
- min: "%s cannot be less than %s in length",
- max: "%s cannot be greater than %s in length",
- range: "%s must be between %s and %s in length"
- },
- pattern: { mismatch: "%s value %s does not match pattern %s" },
- clone: function clone() {
- var cloned = JSON.parse(JSON.stringify(this));
- cloned.clone = this.clone;
- return cloned;
- }
- };
- }
- var messages = newMessages();
- /**
- * Encapsulates a validation schema.
- *
- * @param descriptor An object declaring validation rules
- * for this schema.
- */
- var Schema = /* @__PURE__ */ function() {
- function Schema(descriptor) {
- this.rules = null;
- this._messages = messages;
- this.define(descriptor);
- }
- var _proto = Schema.prototype;
- _proto.define = function define(rules) {
- var _this = this;
- if (!rules) throw new Error("Cannot configure a schema with no rules");
- if (typeof rules !== "object" || Array.isArray(rules)) throw new Error("Rules must be an object");
- this.rules = {};
- Object.keys(rules).forEach(function(name) {
- var item = rules[name];
- _this.rules[name] = Array.isArray(item) ? item : [item];
- });
- };
- _proto.messages = function messages(_messages) {
- if (_messages) this._messages = deepMerge(newMessages(), _messages);
- return this._messages;
- };
- _proto.validate = function validate(source_, o, oc) {
- var _this2 = this;
- if (o === void 0) o = {};
- if (oc === void 0) oc = function oc() {};
- var source = source_;
- var options = o;
- var callback = oc;
- if (typeof options === "function") {
- callback = options;
- options = {};
- }
- if (!this.rules || Object.keys(this.rules).length === 0) {
- if (callback) callback(null, source);
- return Promise.resolve(source);
- }
- function complete(results) {
- var errors = [];
- var fields = {};
- function add(e) {
- if (Array.isArray(e)) {
- var _errors;
- errors = (_errors = errors).concat.apply(_errors, e);
- } else errors.push(e);
- }
- for (var i = 0; i < results.length; i++) add(results[i]);
- if (!errors.length) callback(null, source);
- else {
- fields = convertFieldsError(errors);
- callback(errors, fields);
- }
- }
- if (options.messages) {
- var messages$1 = this.messages();
- if (messages$1 === messages) messages$1 = newMessages();
- deepMerge(messages$1, options.messages);
- options.messages = messages$1;
- } else options.messages = this.messages();
- var series = {};
- (options.keys || Object.keys(this.rules)).forEach(function(z) {
- var arr = _this2.rules[z];
- var value = source[z];
- arr.forEach(function(r) {
- var rule = r;
- if (typeof rule.transform === "function") {
- if (source === source_) source = _extends({}, source);
- value = source[z] = rule.transform(value);
- }
- if (typeof rule === "function") rule = { validator: rule };
- else rule = _extends({}, rule);
- rule.validator = _this2.getValidationMethod(rule);
- if (!rule.validator) return;
- rule.field = z;
- rule.fullField = rule.fullField || z;
- rule.type = _this2.getType(rule);
- series[z] = series[z] || [];
- series[z].push({
- rule,
- value,
- source,
- field: z
- });
- });
- });
- var errorFields = {};
- return asyncMap(series, options, function(data, doIt) {
- var rule = data.rule;
- var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
- deep = deep && (rule.required || !rule.required && data.value);
- rule.field = data.field;
- function addFullField(key, schema) {
- return _extends({}, schema, {
- fullField: rule.fullField + "." + key,
- fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
- });
- }
- function cb(e) {
- if (e === void 0) e = [];
- var errorList = Array.isArray(e) ? e : [e];
- if (!options.suppressWarning && errorList.length) Schema.warning("async-validator:", errorList);
- if (errorList.length && rule.message !== void 0) errorList = [].concat(rule.message);
- var filledErrors = errorList.map(complementError(rule, source));
- if (options.first && filledErrors.length) {
- errorFields[rule.field] = 1;
- return doIt(filledErrors);
- }
- if (!deep) doIt(filledErrors);
- else {
- if (rule.required && !data.value) {
- if (rule.message !== void 0) filledErrors = [].concat(rule.message).map(complementError(rule, source));
- else if (options.error) filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
- return doIt(filledErrors);
- }
- var fieldsSchema = {};
- if (rule.defaultField) Object.keys(data.value).map(function(key) {
- fieldsSchema[key] = rule.defaultField;
- });
- fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
- var paredFieldsSchema = {};
- Object.keys(fieldsSchema).forEach(function(field) {
- var fieldSchema = fieldsSchema[field];
- paredFieldsSchema[field] = (Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema]).map(addFullField.bind(null, field));
- });
- var schema = new Schema(paredFieldsSchema);
- schema.messages(options.messages);
- if (data.rule.options) {
- data.rule.options.messages = options.messages;
- data.rule.options.error = options.error;
- }
- schema.validate(data.value, data.rule.options || options, function(errs) {
- var finalErrors = [];
- if (filledErrors && filledErrors.length) finalErrors.push.apply(finalErrors, filledErrors);
- if (errs && errs.length) finalErrors.push.apply(finalErrors, errs);
- doIt(finalErrors.length ? finalErrors : null);
- });
- }
- }
- var res;
- if (rule.asyncValidator) res = rule.asyncValidator(rule, data.value, cb, data.source, options);
- else if (rule.validator) {
- try {
- res = rule.validator(rule, data.value, cb, data.source, options);
- } catch (error) {
- console.error == null || console.error(error);
- if (!options.suppressValidatorError) setTimeout(function() {
- throw error;
- }, 0);
- cb(error.message);
- }
- if (res === true) cb();
- else if (res === false) cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
- else if (res instanceof Array) cb(res);
- else if (res instanceof Error) cb(res.message);
- }
- if (res && res.then) res.then(function() {
- return cb();
- }, function(e) {
- return cb(e);
- });
- }, function(results) {
- complete(results);
- }, source);
- };
- _proto.getType = function getType(rule) {
- if (rule.type === void 0 && rule.pattern instanceof RegExp) rule.type = "pattern";
- if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) throw new Error(format("Unknown rule type %s", rule.type));
- return rule.type || "string";
- };
- _proto.getValidationMethod = function getValidationMethod(rule) {
- if (typeof rule.validator === "function") return rule.validator;
- var keys = Object.keys(rule);
- var messageIndex = keys.indexOf("message");
- if (messageIndex !== -1) keys.splice(messageIndex, 1);
- if (keys.length === 1 && keys[0] === "required") return validators.required;
- return validators[this.getType(rule)] || void 0;
- };
- return Schema;
- }();
- Schema.register = function register(type, validator) {
- if (typeof validator !== "function") throw new Error("Cannot register a validator by type, validator is not a function");
- validators[type] = validator;
- };
- Schema.warning = warning;
- Schema.messages = messages;
- Schema.validators = validators;
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form-item.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$78 = ["role", "aria-labelledby"];
- //#endregion
- //#region node_modules/element-plus/es/components/form/src/form-item2.mjs
- var form_item_default = /* @__PURE__ */ defineComponent({
- name: "ElFormItem",
- __name: "form-item",
- props: formItemProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const slots = useSlots();
- const formContext = inject(formContextKey, void 0);
- const parentFormItemContext = inject(formItemContextKey, void 0);
- const _size = useFormSize(void 0, { formItem: false });
- const ns = useNamespace("form-item");
- const labelId = useId().value;
- const inputIds = ref([]);
- const validateState = ref("");
- const validateStateDebounced = refDebounced(validateState, 100);
- const validateMessage = ref("");
- const formItemRef = ref();
- let initialValue = void 0;
- let isResettingField = false;
- const labelPosition = computed(() => props.labelPosition || formContext?.labelPosition);
- const labelStyle = computed(() => {
- if (labelPosition.value === "top") return {};
- return { width: addUnit(props.labelWidth ?? formContext?.labelWidth) };
- });
- const contentStyle = computed(() => {
- if (labelPosition.value === "top" || formContext?.inline) return {};
- if (!props.label && !props.labelWidth && isNested) return {};
- const labelWidth = addUnit(props.labelWidth ?? formContext?.labelWidth);
- if (!props.label && !slots.label) return { marginLeft: labelWidth };
- return {};
- });
- const formItemClasses = computed(() => [
- ns.b(),
- ns.m(_size.value),
- ns.is("error", validateState.value === "error"),
- ns.is("validating", validateState.value === "validating"),
- ns.is("success", validateState.value === "success"),
- ns.is("required", isRequired.value || props.required),
- ns.is("no-asterisk", formContext?.hideRequiredAsterisk),
- formContext?.requireAsteriskPosition === "right" ? "asterisk-right" : "asterisk-left",
- {
- [ns.m("feedback")]: formContext?.statusIcon,
- [ns.m(`label-${labelPosition.value}`)]: labelPosition.value
- }
- ]);
- const _inlineMessage = computed(() => isBoolean(props.inlineMessage) ? props.inlineMessage : formContext?.inlineMessage || false);
- const validateClasses = computed(() => [ns.e("error"), { [ns.em("error", "inline")]: _inlineMessage.value }]);
- const propString = computed(() => {
- if (!props.prop) return "";
- return isArray$1(props.prop) ? props.prop.join(".") : props.prop;
- });
- const hasLabel = computed(() => {
- return !!(props.label || slots.label);
- });
- const labelFor = computed(() => {
- return props.for ?? (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
- });
- const isGroup = computed(() => {
- return !labelFor.value && hasLabel.value;
- });
- const isNested = !!parentFormItemContext;
- const fieldValue = computed(() => {
- const model = formContext?.model;
- if (!model || !props.prop) return;
- return getProp(model, props.prop).value;
- });
- const normalizedRules = computed(() => {
- const { required } = props;
- const rules = [];
- if (props.rules) rules.push(...castArray$1(props.rules));
- const formRules = formContext?.rules;
- if (formRules && props.prop) {
- const _rules = getProp(formRules, props.prop).value;
- if (_rules) rules.push(...castArray$1(_rules));
- }
- if (required !== void 0) {
- const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => "required" in rule);
- if (requiredRules.length > 0) for (const [rule, i] of requiredRules) {
- if (rule.required === required) continue;
- rules[i] = {
- ...rule,
- required
- };
- }
- else rules.push({ required });
- }
- return rules;
- });
- const validateEnabled = computed(() => normalizedRules.value.length > 0);
- const getFilteredRule = (trigger) => {
- return normalizedRules.value.filter((rule) => {
- if (!rule.trigger || !trigger) return true;
- if (isArray$1(rule.trigger)) return rule.trigger.includes(trigger);
- else return rule.trigger === trigger;
- }).map(({ trigger, ...rule }) => rule);
- };
- const isRequired = computed(() => normalizedRules.value.some((rule) => rule.required));
- const shouldShowError = computed(() => validateStateDebounced.value === "error" && props.showMessage && (formContext?.showMessage ?? true));
- const currentLabel = computed(() => `${props.label || ""}${formContext?.labelSuffix || ""}`);
- const setValidationState = (state) => {
- validateState.value = state;
- };
- const onValidationFailed = (error) => {
- const { errors, fields } = error;
- if (!errors || !fields) console.error(error);
- setValidationState("error");
- validateMessage.value = errors ? errors?.[0]?.message ?? `${props.prop} is required` : "";
- formContext?.emit("validate", props.prop, false, validateMessage.value);
- };
- const onValidationSucceeded = () => {
- setValidationState("success");
- formContext?.emit("validate", props.prop, true, "");
- };
- const doValidate = async (rules) => {
- const modelName = propString.value;
- return new Schema({ [modelName]: rules }).validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
- onValidationSucceeded();
- return true;
- }).catch((err) => {
- onValidationFailed(err);
- return Promise.reject(err);
- });
- };
- const validate = async (trigger, callback) => {
- if (isResettingField || !props.prop) return false;
- const hasCallback = isFunction$1(callback);
- if (!validateEnabled.value) {
- callback?.(false);
- return false;
- }
- const rules = getFilteredRule(trigger);
- if (rules.length === 0) {
- callback?.(true);
- return true;
- }
- setValidationState("validating");
- return doValidate(rules).then(() => {
- callback?.(true);
- return true;
- }).catch((err) => {
- const { fields } = err;
- callback?.(false, fields);
- return hasCallback ? false : Promise.reject(fields);
- });
- };
- const clearValidate = () => {
- setValidationState("");
- validateMessage.value = "";
- isResettingField = false;
- };
- const resetField = async () => {
- const model = formContext?.model;
- if (!model || !props.prop) return;
- const computedValue = getProp(model, props.prop);
- isResettingField = true;
- computedValue.value = cloneDeep(initialValue);
- await nextTick();
- clearValidate();
- isResettingField = false;
- };
- const addInputId = (id) => {
- if (!inputIds.value.includes(id)) inputIds.value.push(id);
- };
- const removeInputId = (id) => {
- inputIds.value = inputIds.value.filter((listId) => listId !== id);
- };
- const setInitialValue = (value) => {
- initialValue = cloneDeep(value);
- };
- watch(() => props.error, (val) => {
- validateMessage.value = val || "";
- setValidationState(val ? "error" : "");
- }, { immediate: true });
- watch(() => props.validateStatus, (val) => setValidationState(val || ""));
- const context = reactive({
- ...toRefs(props),
- $el: formItemRef,
- size: _size,
- validateMessage,
- validateState,
- labelId,
- inputIds,
- isGroup,
- hasLabel,
- fieldValue,
- addInputId,
- removeInputId,
- resetField,
- clearValidate,
- validate,
- propString,
- setInitialValue
- });
- provide(formItemContextKey, context);
- onMounted(() => {
- if (props.prop) {
- setInitialValue(fieldValue.value);
- formContext?.addField(context);
- }
- });
- onBeforeUnmount(() => {
- formContext?.removeField(context);
- });
- __expose({
- size: _size,
- validateMessage,
- validateState,
- validate,
- clearValidate,
- resetField,
- setInitialValue
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "formItemRef",
- ref: formItemRef,
- class: normalizeClass(formItemClasses.value),
- role: isGroup.value ? "group" : void 0,
- "aria-labelledby": isGroup.value ? unref(labelId) : void 0
- }, [createVNode(unref(form_label_wrap_default), {
- "is-auto-width": labelStyle.value.width === "auto",
- "update-all": unref(formContext)?.labelWidth === "auto"
- }, {
- default: withCtx(() => [!!(__props.label || _ctx.$slots.label) ? (openBlock(), createBlock(resolveDynamicComponent(labelFor.value ? "label" : "div"), {
- key: 0,
- id: unref(labelId),
- for: labelFor.value,
- class: normalizeClass(unref(ns).e("label")),
- style: normalizeStyle(labelStyle.value)
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "label", { label: currentLabel.value }, () => [createTextVNode(toDisplayString(currentLabel.value), 1)])]),
- _: 3
- }, 8, [
- "id",
- "for",
- "class",
- "style"
- ])) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, ["is-auto-width", "update-all"]), createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("content")),
- style: normalizeStyle(contentStyle.value)
- }, [renderSlot(_ctx.$slots, "default"), createVNode(TransitionGroup, { name: `${unref(ns).namespace.value}-zoom-in-top` }, {
- default: withCtx(() => [shouldShowError.value ? renderSlot(_ctx.$slots, "error", {
- key: 0,
- error: validateMessage.value
- }, () => [createBaseVNode("div", { class: normalizeClass(validateClasses.value) }, toDisplayString(validateMessage.value), 3)]) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, ["name"])], 6)], 10, _hoisted_1$78);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/form/index.mjs
- var ElForm = withInstall(form_default, { FormItem: form_item_default });
- var ElFormItem = withNoopInstall(form_item_default);
- //#endregion
- //#region node_modules/element-plus/es/components/focus-trap/src/tokens.mjs
- var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
- var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
- var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
- var FOCUS_AFTER_TRAPPED_OPTS = {
- cancelable: true,
- bubbles: false
- };
- var FOCUSOUT_PREVENTED_OPTS = {
- cancelable: true,
- bubbles: false
- };
- var ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
- var ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
- var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
- //#endregion
- //#region node_modules/element-plus/es/components/focus-trap/src/utils.mjs
- var focusReason = ref();
- var lastUserFocusTimestamp = ref(0);
- var lastAutomatedFocusTimestamp = ref(0);
- var focusReasonUserCount = 0;
- var obtainAllFocusableElements = (element) => {
- const nodes = [];
- const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
- const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
- return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
- } });
- while (walker.nextNode()) nodes.push(walker.currentNode);
- return nodes;
- };
- var getVisibleElement = (elements, container) => {
- for (const element of elements) if (!isHidden(element, container)) return element;
- };
- var isHidden = (element, container) => {
- if (getComputedStyle(element).visibility === "hidden") return true;
- while (element) {
- if (container && element === container) return false;
- if (getComputedStyle(element).display === "none") return true;
- element = element.parentElement;
- }
- return false;
- };
- var getEdges = (container) => {
- const focusable = obtainAllFocusableElements(container);
- return [getVisibleElement(focusable, container), getVisibleElement(focusable.reverse(), container)];
- };
- var isSelectable = (element) => {
- return element instanceof HTMLInputElement && "select" in element;
- };
- var tryFocus = (element, shouldSelect) => {
- if (element) {
- const prevFocusedElement = document.activeElement;
- focusElement(element, { preventScroll: true });
- lastAutomatedFocusTimestamp.value = window.performance.now();
- if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) element.select();
- }
- };
- function removeFromStack(list, item) {
- const copy = [...list];
- const idx = list.indexOf(item);
- if (idx !== -1) copy.splice(idx, 1);
- return copy;
- }
- var createFocusableStack = () => {
- let stack = [];
- const push = (layer) => {
- const currentLayer = stack[0];
- if (currentLayer && layer !== currentLayer) currentLayer.pause();
- stack = removeFromStack(stack, layer);
- stack.unshift(layer);
- };
- const remove = (layer) => {
- stack = removeFromStack(stack, layer);
- stack[0]?.resume?.();
- };
- return {
- push,
- remove
- };
- };
- var focusFirstDescendant = (elements, shouldSelect = false) => {
- const prevFocusedElement = document.activeElement;
- for (const element of elements) {
- tryFocus(element, shouldSelect);
- if (document.activeElement !== prevFocusedElement) return;
- }
- };
- var focusableStack = createFocusableStack();
- var isFocusCausedByUserEvent = () => {
- return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
- };
- var notifyFocusReasonPointer = () => {
- focusReason.value = "pointer";
- lastUserFocusTimestamp.value = window.performance.now();
- };
- var notifyFocusReasonKeydown = () => {
- focusReason.value = "keyboard";
- lastUserFocusTimestamp.value = window.performance.now();
- };
- var useFocusReason = () => {
- onMounted(() => {
- if (focusReasonUserCount === 0) {
- document.addEventListener("mousedown", notifyFocusReasonPointer);
- document.addEventListener("touchstart", notifyFocusReasonPointer);
- document.addEventListener("keydown", notifyFocusReasonKeydown);
- }
- focusReasonUserCount++;
- });
- onBeforeUnmount(() => {
- focusReasonUserCount--;
- if (focusReasonUserCount <= 0) {
- document.removeEventListener("mousedown", notifyFocusReasonPointer);
- document.removeEventListener("touchstart", notifyFocusReasonPointer);
- document.removeEventListener("keydown", notifyFocusReasonKeydown);
- }
- });
- return {
- focusReason,
- lastUserFocusTimestamp,
- lastAutomatedFocusTimestamp
- };
- };
- var createFocusOutPreventedEvent = (detail) => {
- return new CustomEvent(FOCUSOUT_PREVENTED, {
- ...FOCUSOUT_PREVENTED_OPTS,
- detail
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs
- var focus_trap_vue_vue_type_script_lang_default = defineComponent({
- name: "ElFocusTrap",
- inheritAttrs: false,
- props: {
- loop: Boolean,
- trapped: Boolean,
- focusTrapEl: Object,
- focusStartEl: {
- type: [Object, String],
- default: "first"
- }
- },
- emits: [
- ON_TRAP_FOCUS_EVT,
- ON_RELEASE_FOCUS_EVT,
- "focusin",
- "focusout",
- "focusout-prevented",
- "release-requested"
- ],
- setup(props, { emit }) {
- const forwardRef = ref();
- let lastFocusBeforeTrapped;
- let lastFocusAfterTrapped;
- const { focusReason } = useFocusReason();
- useEscapeKeydown((event) => {
- if (props.trapped && !focusLayer.paused) emit("release-requested", event);
- });
- const focusLayer = {
- paused: false,
- pause() {
- this.paused = true;
- },
- resume() {
- this.paused = false;
- }
- };
- const onKeydown = (e) => {
- if (!props.loop && !props.trapped) return;
- if (focusLayer.paused) return;
- const { altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
- const { loop } = props;
- const isTabbing = getEventCode(e) === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
- const currentFocusingEl = document.activeElement;
- if (isTabbing && currentFocusingEl) {
- const container = currentTarget;
- const [first, last] = getEdges(container);
- if (!(first && last)) {
- if (currentFocusingEl === container) {
- const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
- emit("focusout-prevented", focusoutPreventedEvent);
- if (!focusoutPreventedEvent.defaultPrevented) e.preventDefault();
- }
- } else if (!shiftKey && currentFocusingEl === last) {
- const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
- emit("focusout-prevented", focusoutPreventedEvent);
- if (!focusoutPreventedEvent.defaultPrevented) {
- e.preventDefault();
- if (loop) tryFocus(first, true);
- }
- } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
- const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
- emit("focusout-prevented", focusoutPreventedEvent);
- if (!focusoutPreventedEvent.defaultPrevented) {
- e.preventDefault();
- if (loop) tryFocus(last, true);
- }
- }
- }
- };
- provide(FOCUS_TRAP_INJECTION_KEY, {
- focusTrapRef: forwardRef,
- onKeydown
- });
- watch(() => props.focusTrapEl, (focusTrapEl) => {
- if (focusTrapEl) forwardRef.value = focusTrapEl;
- }, { immediate: true });
- watch([forwardRef], ([forwardRef], [oldForwardRef]) => {
- if (forwardRef) {
- forwardRef.addEventListener("keydown", onKeydown);
- forwardRef.addEventListener("focusin", onFocusIn);
- forwardRef.addEventListener("focusout", onFocusOut);
- }
- if (oldForwardRef) {
- oldForwardRef.removeEventListener("keydown", onKeydown);
- oldForwardRef.removeEventListener("focusin", onFocusIn);
- oldForwardRef.removeEventListener("focusout", onFocusOut);
- }
- });
- const trapOnFocus = (e) => {
- emit(ON_TRAP_FOCUS_EVT, e);
- };
- const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
- const onFocusIn = (e) => {
- const trapContainer = unref(forwardRef);
- if (!trapContainer) return;
- const target = e.target;
- const relatedTarget = e.relatedTarget;
- const isFocusedInTrap = target && trapContainer.contains(target);
- if (!props.trapped) {
- if (!(relatedTarget && trapContainer.contains(relatedTarget))) lastFocusBeforeTrapped = relatedTarget;
- }
- if (isFocusedInTrap) emit("focusin", e);
- if (focusLayer.paused) return;
- if (props.trapped) if (isFocusedInTrap) lastFocusAfterTrapped = target;
- else tryFocus(lastFocusAfterTrapped, true);
- };
- const onFocusOut = (e) => {
- const trapContainer = unref(forwardRef);
- if (focusLayer.paused || !trapContainer) return;
- if (props.trapped) {
- const relatedTarget = e.relatedTarget;
- if (!isNil(relatedTarget) && !trapContainer.contains(relatedTarget)) setTimeout(() => {
- if (!focusLayer.paused && props.trapped) {
- const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason.value });
- emit("focusout-prevented", focusoutPreventedEvent);
- if (!focusoutPreventedEvent.defaultPrevented) tryFocus(lastFocusAfterTrapped, true);
- }
- }, 0);
- } else {
- const target = e.target;
- if (!(target && trapContainer.contains(target))) emit("focusout", e);
- }
- };
- async function startTrap() {
- await nextTick();
- const trapContainer = unref(forwardRef);
- if (trapContainer) {
- focusableStack.push(focusLayer);
- const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
- lastFocusBeforeTrapped = prevFocusedElement;
- if (!trapContainer.contains(prevFocusedElement)) {
- const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
- trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
- trapContainer.dispatchEvent(focusEvent);
- if (!focusEvent.defaultPrevented) nextTick(() => {
- let focusStartEl = props.focusStartEl;
- if (!isString(focusStartEl)) {
- tryFocus(focusStartEl);
- if (document.activeElement !== focusStartEl) focusStartEl = "first";
- }
- if (focusStartEl === "first") focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
- if (document.activeElement === prevFocusedElement || focusStartEl === "container") tryFocus(trapContainer);
- });
- }
- }
- }
- function stopTrap() {
- const trapContainer = unref(forwardRef);
- if (trapContainer) {
- trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
- const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
- ...FOCUS_AFTER_TRAPPED_OPTS,
- detail: { focusReason: focusReason.value }
- });
- trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
- trapContainer.dispatchEvent(releasedEvent);
- if (!releasedEvent.defaultPrevented && (focusReason.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) tryFocus(lastFocusBeforeTrapped ?? document.body);
- trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
- focusableStack.remove(focusLayer);
- lastFocusBeforeTrapped = null;
- lastFocusAfterTrapped = null;
- }
- }
- onMounted(() => {
- if (props.trapped) startTrap();
- watch(() => props.trapped, (trapped) => {
- if (trapped) startTrap();
- else stopTrap();
- });
- });
- onBeforeUnmount(() => {
- if (props.trapped) stopTrap();
- if (forwardRef.value) {
- forwardRef.value.removeEventListener("keydown", onKeydown);
- forwardRef.value.removeEventListener("focusin", onFocusIn);
- forwardRef.value.removeEventListener("focusout", onFocusOut);
- forwardRef.value = void 0;
- }
- lastFocusBeforeTrapped = null;
- lastFocusAfterTrapped = null;
- });
- return { onKeydown };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/_virtual/_plugin-vue_export-helper.mjs
- var _plugin_vue_export_helper_default = (sfc, props) => {
- const target = sfc.__vccOpts || sfc;
- for (const [key, val] of props) target[key] = val;
- return target;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/focus-trap/src/focus-trap.mjs
- function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
- return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
- }
- //#endregion
- //#region node_modules/element-plus/es/components/focus-trap/index.mjs
- var focus_trap_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(focus_trap_vue_vue_type_script_lang_default, [["render", _sfc_render$21]]);
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/utils.mjs
- var buildPopperOptions = (props, modifiers = []) => {
- const { placement, strategy, popperOptions } = props;
- const options = {
- placement,
- strategy,
- ...popperOptions,
- modifiers: [...genModifiers(props), ...modifiers]
- };
- deriveExtraModifiers(options, popperOptions?.modifiers);
- return options;
- };
- var unwrapMeasurableEl = ($el) => {
- if (!isClient) return;
- return unrefElement($el);
- };
- function genModifiers(options) {
- const { offset, gpuAcceleration, fallbackPlacements } = options;
- return [
- {
- name: "offset",
- options: { offset: [0, offset ?? 12] }
- },
- {
- name: "preventOverflow",
- options: { padding: {
- top: 0,
- bottom: 0,
- left: 0,
- right: 0
- } }
- },
- {
- name: "flip",
- options: {
- padding: 5,
- fallbackPlacements
- }
- },
- {
- name: "computeStyles",
- options: { gpuAcceleration }
- }
- ];
- }
- function deriveExtraModifiers(options, modifiers) {
- if (modifiers) options.modifiers = [...options.modifiers, ...modifiers ?? []];
- }
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/composables/use-content.mjs
- var DEFAULT_ARROW_OFFSET = 0;
- var usePopperContent = (props) => {
- const { popperInstanceRef, contentRef, triggerRef, role } = inject(POPPER_INJECTION_KEY, void 0);
- const arrowRef = ref();
- const arrowOffset = computed(() => props.arrowOffset);
- const eventListenerModifier = computed(() => {
- return {
- name: "eventListeners",
- enabled: !!props.visible
- };
- });
- const arrowModifier = computed(() => {
- const arrowEl = unref(arrowRef);
- const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET;
- return {
- name: "arrow",
- enabled: !isUndefined$1(arrowEl),
- options: {
- element: arrowEl,
- padding: offset
- }
- };
- });
- const options = computed(() => {
- return {
- onFirstUpdate: () => {
- update();
- },
- ...buildPopperOptions(props, [unref(arrowModifier), unref(eventListenerModifier)])
- };
- });
- const computedReference = computed(() => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef));
- const { attributes, state, styles, update, forceUpdate, instanceRef } = usePopper(computedReference, contentRef, options);
- watch(instanceRef, (instance) => popperInstanceRef.value = instance, { flush: "sync" });
- onMounted(() => {
- watch(() => unref(computedReference)?.getBoundingClientRect?.(), () => {
- update();
- });
- });
- onBeforeUnmount(() => {
- popperInstanceRef.value = void 0;
- });
- return {
- attributes,
- arrowRef,
- contentRef,
- instanceRef,
- state,
- styles,
- role,
- forceUpdate,
- update
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/composables/use-content-dom.mjs
- var usePopperContentDOM = (props, { attributes, styles, role }) => {
- const { nextZIndex } = useZIndex();
- const ns = useNamespace("popper");
- const contentAttrs = computed(() => unref(attributes).popper);
- const contentZIndex = ref(isNumber(props.zIndex) ? props.zIndex : nextZIndex());
- const contentClass = computed(() => [
- ns.b(),
- ns.is("pure", props.pure),
- ns.is(props.effect),
- props.popperClass
- ]);
- const contentStyle = computed(() => {
- return [
- { zIndex: unref(contentZIndex) },
- unref(styles).popper,
- props.popperStyle || {}
- ];
- });
- const ariaModal = computed(() => role.value === "dialog" ? "false" : void 0);
- const arrowStyle = computed(() => unref(styles).arrow || {});
- const updateZIndex = () => {
- contentZIndex.value = isNumber(props.zIndex) ? props.zIndex : nextZIndex();
- };
- return {
- ariaModal,
- arrowStyle,
- contentAttrs,
- contentClass,
- contentStyle,
- contentZIndex,
- updateZIndex
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/composables/use-focus-trap.mjs
- var usePopperContentFocusTrap = (props, emit) => {
- const trapped = ref(false);
- const focusStartRef = ref();
- const onFocusAfterTrapped = () => {
- emit("focus");
- };
- const onFocusAfterReleased = (event) => {
- if (event.detail?.focusReason !== "pointer") {
- focusStartRef.value = "first";
- emit("blur");
- }
- };
- const onFocusInTrap = (event) => {
- if (props.visible && !trapped.value) {
- if (event.target) focusStartRef.value = event.target;
- trapped.value = true;
- }
- };
- const onFocusoutPrevented = (event) => {
- if (!props.trapping) {
- if (event.detail.focusReason === "pointer") event.preventDefault();
- trapped.value = false;
- }
- };
- const onReleaseRequested = () => {
- trapped.value = false;
- emit("close");
- };
- onBeforeUnmount(() => {
- focusStartRef.value = void 0;
- });
- return {
- focusStartRef,
- trapped,
- onFocusAfterReleased,
- onFocusAfterTrapped,
- onFocusInTrap,
- onFocusoutPrevented,
- onReleaseRequested
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/popper/src/content2.mjs
- var content_default = /* @__PURE__ */ defineComponent({
- name: "ElPopperContent",
- __name: "content",
- props: popperContentProps,
- emits: popperContentEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const emit = __emit;
- const props = __props;
- const { focusStartRef, trapped, onFocusAfterReleased, onFocusAfterTrapped, onFocusInTrap, onFocusoutPrevented, onReleaseRequested } = usePopperContentFocusTrap(props, emit);
- const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
- const { ariaModal, arrowStyle, contentAttrs, contentClass, contentStyle, updateZIndex } = usePopperContentDOM(props, {
- styles,
- attributes,
- role
- });
- const formItemContext = inject(formItemContextKey, void 0);
- provide(POPPER_CONTENT_INJECTION_KEY, {
- arrowStyle,
- arrowRef
- });
- if (formItemContext) provide(formItemContextKey, {
- ...formItemContext,
- addInputId: NOOP,
- removeInputId: NOOP
- });
- let triggerTargetAriaStopWatch = void 0;
- const updatePopper = (shouldUpdateZIndex = true) => {
- update();
- shouldUpdateZIndex && updateZIndex();
- };
- const togglePopperAlive = () => {
- updatePopper(false);
- if (props.visible && props.focusOnShow) trapped.value = true;
- else if (props.visible === false) trapped.value = false;
- };
- onMounted(() => {
- watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
- triggerTargetAriaStopWatch?.();
- triggerTargetAriaStopWatch = void 0;
- const el = unref(triggerTargetEl || contentRef.value);
- const prevEl = unref(prevTriggerTargetEl || contentRef.value);
- if (isElement$1(el)) triggerTargetAriaStopWatch = watch([
- role,
- () => props.ariaLabel,
- ariaModal,
- () => props.id
- ], (watches) => {
- [
- "role",
- "aria-label",
- "aria-modal",
- "id"
- ].forEach((key, idx) => {
- isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
- });
- }, { immediate: true });
- if (prevEl !== el && isElement$1(prevEl)) [
- "role",
- "aria-label",
- "aria-modal",
- "id"
- ].forEach((key) => {
- prevEl.removeAttribute(key);
- });
- }, { immediate: true });
- watch(() => props.visible, togglePopperAlive, { immediate: true });
- });
- onBeforeUnmount(() => {
- triggerTargetAriaStopWatch?.();
- triggerTargetAriaStopWatch = void 0;
- contentRef.value = void 0;
- });
- __expose({
- popperContentRef: contentRef,
- popperInstanceRef: instanceRef,
- updatePopper,
- contentStyle
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", mergeProps({
- ref_key: "contentRef",
- ref: contentRef
- }, unref(contentAttrs), {
- style: unref(contentStyle),
- class: unref(contentClass),
- tabindex: "-1",
- onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
- onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
- }), [createVNode(unref(focus_trap_default$1), {
- loop: __props.loop,
- trapped: unref(trapped),
- "trap-on-focus-in": true,
- "focus-trap-el": unref(contentRef),
- "focus-start-el": unref(focusStartRef),
- onFocusAfterTrapped: unref(onFocusAfterTrapped),
- onFocusAfterReleased: unref(onFocusAfterReleased),
- onFocusin: unref(onFocusInTrap),
- onFocusoutPrevented: unref(onFocusoutPrevented),
- onReleaseRequested: unref(onReleaseRequested)
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, [
- "loop",
- "trapped",
- "focus-trap-el",
- "focus-start-el",
- "onFocusAfterTrapped",
- "onFocusAfterReleased",
- "onFocusin",
- "onFocusoutPrevented",
- "onReleaseRequested"
- ])], 16);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/popper/index.mjs
- var ElPopper = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElPopper",
- inheritAttrs: false,
- __name: "popper",
- props: popperProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const popperProvides = {
- triggerRef: ref(),
- popperInstanceRef: ref(),
- contentRef: ref(),
- referenceRef: ref(),
- role: computed(() => props.role)
- };
- __expose(popperProvides);
- provide(POPPER_INJECTION_KEY, popperProvides);
- return (_ctx, _cache) => {
- return renderSlot(_ctx.$slots, "default");
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/content.mjs
- var useTooltipContentPropsDefaults = {
- ...useDelayedTogglePropsDefaults,
- ...popperContentPropsDefaults,
- content: "",
- visible: null,
- teleported: true
- };
- /**
- * @deprecated Removed after 3.0.0, Use `ElTooltipContentProps` instead.
- */
- var useTooltipContentProps = buildProps({
- ...useDelayedToggleProps,
- ...popperContentProps,
- appendTo: { type: teleportProps.to.type },
- content: {
- type: String,
- default: ""
- },
- rawContent: Boolean,
- persistent: Boolean,
- visible: {
- type: definePropType(Boolean),
- default: null
- },
- transition: String,
- teleported: {
- type: Boolean,
- default: true
- },
- disabled: Boolean,
- ...useAriaProps(["ariaLabel"])
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/trigger.mjs
- var useTooltipTriggerPropsDefaults = {
- trigger: "hover",
- triggerKeys: () => [
- EVENT_CODE.enter,
- EVENT_CODE.numpadEnter,
- EVENT_CODE.space
- ]
- };
- /**
- * @deprecated Removed after 3.0.0, Use `UseTooltipTriggerProps` instead.
- */
- var useTooltipTriggerProps = buildProps({
- ...popperTriggerProps,
- disabled: Boolean,
- trigger: {
- type: definePropType([String, Array]),
- default: "hover"
- },
- triggerKeys: {
- type: definePropType(Array),
- default: () => [
- EVENT_CODE.enter,
- EVENT_CODE.numpadEnter,
- EVENT_CODE.space
- ]
- },
- focusOnTarget: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/tooltip.mjs
- var { useModelToggleProps: useTooltipModelToggleProps, useModelToggleEmits: useTooltipModelToggleEmits, useModelToggle: useTooltipModelToggle } = createModelToggleComposable("visible");
- /**
- * @deprecated Removed after 3.0.0, Use `UseTooltipProps` instead.
- */
- var useTooltipProps = buildProps({
- ...popperProps,
- ...useTooltipModelToggleProps,
- ...useTooltipContentProps,
- ...useTooltipTriggerProps,
- ...popperArrowProps,
- showArrow: {
- type: Boolean,
- default: true
- }
- });
- var tooltipEmits = [
- ...useTooltipModelToggleEmits,
- "before-show",
- "before-hide",
- "show",
- "hide",
- "open",
- "close"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/constants.mjs
- var TOOLTIP_INJECTION_KEY = Symbol("elTooltip");
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/utils.mjs
- var isTriggerType = (trigger, type) => {
- if (isArray$1(trigger)) return trigger.includes(type);
- return trigger === type;
- };
- var whenTrigger = (trigger, type, handler) => {
- return (e) => {
- isTriggerType(unref(trigger), type) && handler(e);
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/trigger2.mjs
- var trigger_default$1 = /* @__PURE__ */ defineComponent({
- name: "ElTooltipTrigger",
- __name: "trigger",
- props: useTooltipTriggerProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const ns = useNamespace("tooltip");
- const { controlled, id, open, onOpen, onClose, onToggle } = inject(TOOLTIP_INJECTION_KEY, void 0);
- const triggerRef = ref(null);
- const stopWhenControlledOrDisabled = () => {
- if (unref(controlled) || props.disabled) return true;
- };
- const trigger = toRef(props, "trigger");
- const onMouseenter = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", (e) => {
- onOpen(e);
- if (props.focusOnTarget && e.target) nextTick(() => {
- focusElement(e.target, { preventScroll: true });
- });
- }));
- const onMouseleave = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "hover", onClose));
- const onClick = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "click", (e) => {
- if (e.button === 0) onToggle(e);
- }));
- const onFocus = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onOpen));
- const onBlur = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "focus", onClose));
- const onContextMenu = composeEventHandlers(stopWhenControlledOrDisabled, whenTrigger(trigger, "contextmenu", (e) => {
- e.preventDefault();
- onToggle(e);
- }));
- const onKeydown = composeEventHandlers(stopWhenControlledOrDisabled, (e) => {
- const code = getEventCode(e);
- if (props.triggerKeys.includes(code)) {
- e.preventDefault();
- onToggle(e);
- }
- });
- __expose({ triggerRef });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(trigger_default), {
- id: unref(id),
- "virtual-ref": __props.virtualRef,
- open: unref(open),
- "virtual-triggering": __props.virtualTriggering,
- class: normalizeClass(unref(ns).e("trigger")),
- onBlur: unref(onBlur),
- onClick: unref(onClick),
- onContextmenu: unref(onContextMenu),
- onFocus: unref(onFocus),
- onMouseenter: unref(onMouseenter),
- onMouseleave: unref(onMouseleave),
- onKeydown: unref(onKeydown)
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, [
- "id",
- "virtual-ref",
- "open",
- "virtual-triggering",
- "class",
- "onBlur",
- "onClick",
- "onContextmenu",
- "onFocus",
- "onMouseenter",
- "onMouseleave",
- "onKeydown"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/content2.mjs
- var content_default$2 = /* @__PURE__ */ defineComponent({
- name: "ElTooltipContent",
- inheritAttrs: false,
- __name: "content",
- props: useTooltipContentProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { selector } = usePopperContainerId();
- const ns = useNamespace("tooltip");
- const contentRef = ref();
- const popperContentRef = computedEager(() => contentRef.value?.popperContentRef);
- let stopHandle;
- const { controlled, id, open, trigger, onClose, onOpen, onShow, onHide, onBeforeShow, onBeforeHide } = inject(TOOLTIP_INJECTION_KEY, void 0);
- const transitionClass = computed(() => {
- return props.transition || `${ns.namespace.value}-fade-in-linear`;
- });
- const persistentRef = computed(() => {
- return props.persistent;
- });
- onBeforeUnmount(() => {
- stopHandle?.();
- });
- const shouldRender = computed(() => {
- return unref(persistentRef) ? true : unref(open);
- });
- const shouldShow = computed(() => {
- return props.disabled ? false : unref(open);
- });
- const appendTo = computed(() => {
- return props.appendTo || selector.value;
- });
- const contentStyle = computed(() => props.style ?? {});
- const ariaHidden = ref(true);
- const onTransitionLeave = () => {
- onHide();
- isFocusInsideContent() && focusElement(document.body, { preventScroll: true });
- ariaHidden.value = true;
- };
- const stopWhenControlled = () => {
- if (unref(controlled)) return true;
- };
- const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
- if (props.enterable && isTriggerType(unref(trigger), "hover")) onOpen();
- });
- const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
- if (isTriggerType(unref(trigger), "hover")) onClose();
- });
- const onBeforeEnter = () => {
- contentRef.value?.updatePopper?.();
- onBeforeShow?.();
- };
- const onBeforeLeave = () => {
- onBeforeHide?.();
- };
- const onAfterShow = () => {
- onShow();
- };
- const onBlur = () => {
- if (!props.virtualTriggering) onClose();
- };
- const isFocusInsideContent = (event) => {
- const popperContent = contentRef.value?.popperContentRef;
- const activeElement = event?.relatedTarget || document.activeElement;
- return popperContent?.contains(activeElement);
- };
- watch(() => unref(open), (val) => {
- if (!val) stopHandle?.();
- else {
- ariaHidden.value = false;
- stopHandle = onClickOutside(popperContentRef, () => {
- if (unref(controlled)) return;
- if (castArray(unref(trigger)).every((item) => {
- return item !== "hover" && item !== "focus";
- })) onClose();
- }, { detectIframe: true });
- }
- }, { flush: "post" });
- watch(() => props.content, () => {
- contentRef.value?.updatePopper?.();
- });
- __expose({
- contentRef,
- isFocusInsideContent
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTeleport), {
- disabled: !__props.teleported,
- to: appendTo.value
- }, {
- default: withCtx(() => [shouldRender.value || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
- key: 0,
- name: transitionClass.value,
- appear: !persistentRef.value,
- onAfterLeave: onTransitionLeave,
- onBeforeEnter,
- onAfterEnter: onAfterShow,
- onBeforeLeave,
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createVNode(unref(content_default), mergeProps({
- id: unref(id),
- ref_key: "contentRef",
- ref: contentRef
- }, _ctx.$attrs, {
- "aria-label": __props.ariaLabel,
- "aria-hidden": ariaHidden.value,
- "boundaries-padding": __props.boundariesPadding,
- "fallback-placements": __props.fallbackPlacements,
- "gpu-acceleration": __props.gpuAcceleration,
- offset: __props.offset,
- placement: __props.placement,
- "popper-options": __props.popperOptions,
- "arrow-offset": __props.arrowOffset,
- strategy: __props.strategy,
- effect: __props.effect,
- enterable: __props.enterable,
- pure: __props.pure,
- "popper-class": __props.popperClass,
- "popper-style": [__props.popperStyle, contentStyle.value],
- "reference-el": __props.referenceEl,
- "trigger-target-el": __props.triggerTargetEl,
- visible: shouldShow.value,
- "z-index": __props.zIndex,
- loop: __props.loop,
- onMouseenter: unref(onContentEnter),
- onMouseleave: unref(onContentLeave),
- onBlur,
- onClose: unref(onClose)
- }), {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 16, [
- "id",
- "aria-label",
- "aria-hidden",
- "boundaries-padding",
- "fallback-placements",
- "gpu-acceleration",
- "offset",
- "placement",
- "popper-options",
- "arrow-offset",
- "strategy",
- "effect",
- "enterable",
- "pure",
- "popper-class",
- "popper-style",
- "reference-el",
- "trigger-target-el",
- "visible",
- "z-index",
- "loop",
- "onMouseenter",
- "onMouseleave",
- "onClose"
- ]), [[vShow, shouldShow.value]])]),
- _: 3
- }, 8, ["name", "appear"])) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, ["disabled", "to"]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$77 = ["innerHTML"];
- var _hoisted_2$43 = { key: 1 };
- //#endregion
- //#region node_modules/element-plus/es/components/tooltip/index.mjs
- var ElTooltip = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElTooltip",
- __name: "tooltip",
- props: useTooltipProps,
- emits: tooltipEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- usePopperContainer();
- const ns = useNamespace("tooltip");
- const id = useId();
- const popperRef = ref();
- const contentRef = ref();
- const updatePopper = () => {
- const popperComponent = unref(popperRef);
- if (popperComponent) popperComponent.popperInstanceRef?.update();
- };
- const open = ref(false);
- const toggleReason = ref();
- const { show, hide, hasUpdateHandler } = useTooltipModelToggle({
- indicator: open,
- toggleReason
- });
- const { onOpen, onClose } = useDelayedToggle({
- showAfter: toRef(props, "showAfter"),
- hideAfter: toRef(props, "hideAfter"),
- autoClose: toRef(props, "autoClose"),
- open: show,
- close: hide
- });
- const controlled = computed(() => isBoolean(props.visible) && !hasUpdateHandler.value);
- const kls = computed(() => {
- return [ns.b(), props.popperClass];
- });
- provide(TOOLTIP_INJECTION_KEY, {
- controlled,
- id,
- open: readonly(open),
- trigger: toRef(props, "trigger"),
- onOpen,
- onClose,
- onToggle: (event) => {
- if (unref(open)) onClose(event);
- else onOpen(event);
- },
- onShow: () => {
- emit("show", toggleReason.value);
- },
- onHide: () => {
- emit("hide", toggleReason.value);
- },
- onBeforeShow: () => {
- emit("before-show", toggleReason.value);
- },
- onBeforeHide: () => {
- emit("before-hide", toggleReason.value);
- },
- updatePopper
- });
- watch(() => props.disabled, (disabled) => {
- if (disabled && open.value) open.value = false;
- });
- const isFocusInsideContent = (event) => {
- return contentRef.value?.isFocusInsideContent(event);
- };
- onDeactivated(() => open.value && hide());
- onBeforeUnmount(() => {
- toggleReason.value = void 0;
- });
- __expose({
- popperRef,
- contentRef,
- isFocusInsideContent,
- updatePopper,
- onOpen,
- onClose,
- hide
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElPopper), {
- ref_key: "popperRef",
- ref: popperRef,
- role: __props.role
- }, {
- default: withCtx(() => [createVNode(trigger_default$1, {
- disabled: __props.disabled,
- trigger: __props.trigger,
- "trigger-keys": __props.triggerKeys,
- "virtual-ref": __props.virtualRef,
- "virtual-triggering": __props.virtualTriggering,
- "focus-on-target": __props.focusOnTarget
- }, {
- default: withCtx(() => [_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, [
- "disabled",
- "trigger",
- "trigger-keys",
- "virtual-ref",
- "virtual-triggering",
- "focus-on-target"
- ]), createVNode(content_default$2, {
- ref_key: "contentRef",
- ref: contentRef,
- "aria-label": __props.ariaLabel,
- "boundaries-padding": __props.boundariesPadding,
- content: __props.content,
- disabled: __props.disabled,
- effect: __props.effect,
- enterable: __props.enterable,
- "fallback-placements": __props.fallbackPlacements,
- "hide-after": __props.hideAfter,
- "gpu-acceleration": __props.gpuAcceleration,
- offset: __props.offset,
- persistent: __props.persistent,
- "popper-class": kls.value,
- "popper-style": __props.popperStyle,
- placement: __props.placement,
- "popper-options": __props.popperOptions,
- "arrow-offset": __props.arrowOffset,
- pure: __props.pure,
- "raw-content": __props.rawContent,
- "reference-el": __props.referenceEl,
- "trigger-target-el": __props.triggerTargetEl,
- "show-after": __props.showAfter,
- strategy: __props.strategy,
- teleported: __props.teleported,
- transition: __props.transition,
- "virtual-triggering": __props.virtualTriggering,
- "z-index": __props.zIndex,
- "append-to": __props.appendTo,
- loop: __props.loop
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [__props.rawContent ? (openBlock(), createElementBlock("span", {
- key: 0,
- innerHTML: __props.content
- }, null, 8, _hoisted_1$77)) : (openBlock(), createElementBlock("span", _hoisted_2$43, toDisplayString(__props.content), 1))]), __props.showArrow ? (openBlock(), createBlock(unref(arrow_default), { key: 0 })) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, [
- "aria-label",
- "boundaries-padding",
- "content",
- "disabled",
- "effect",
- "enterable",
- "fallback-placements",
- "hide-after",
- "gpu-acceleration",
- "offset",
- "persistent",
- "popper-class",
- "popper-style",
- "placement",
- "popper-options",
- "arrow-offset",
- "pure",
- "raw-content",
- "reference-el",
- "trigger-target-el",
- "show-after",
- "strategy",
- "teleported",
- "transition",
- "virtual-triggering",
- "z-index",
- "append-to",
- "loop"
- ])]),
- _: 3
- }, 8, ["role"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/utils/typescript.mjs
- var mutable = (val) => val;
- //#endregion
- //#region node_modules/element-plus/es/components/input/src/input.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `InputProps` instead.
- */
- var inputProps = buildProps({
- id: {
- type: String,
- default: void 0
- },
- size: useSizeProp,
- disabled: {
- type: Boolean,
- default: void 0
- },
- modelValue: {
- type: definePropType([
- String,
- Number,
- Object
- ]),
- default: ""
- },
- modelModifiers: {
- type: definePropType(Object),
- default: () => ({})
- },
- maxlength: { type: [String, Number] },
- minlength: { type: [String, Number] },
- type: {
- type: definePropType(String),
- default: "text"
- },
- resize: {
- type: String,
- values: [
- "none",
- "both",
- "horizontal",
- "vertical"
- ]
- },
- autosize: {
- type: definePropType([Boolean, Object]),
- default: false
- },
- autocomplete: {
- type: definePropType(String),
- default: "off"
- },
- formatter: { type: Function },
- parser: { type: Function },
- placeholder: { type: String },
- form: { type: String },
- readonly: Boolean,
- clearable: Boolean,
- clearIcon: {
- type: iconPropType,
- default: circle_close_default
- },
- showPassword: Boolean,
- showWordLimit: Boolean,
- wordLimitPosition: {
- type: String,
- values: ["inside", "outside"],
- default: "inside"
- },
- suffixIcon: { type: iconPropType },
- prefixIcon: { type: iconPropType },
- containerRole: {
- type: String,
- default: void 0
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- inputStyle: {
- type: definePropType([
- Object,
- Array,
- String
- ]),
- default: () => mutable({})
- },
- autofocus: Boolean,
- rows: {
- type: Number,
- default: 2
- },
- ...useAriaProps(["ariaLabel"]),
- inputmode: {
- type: definePropType(String),
- default: void 0
- },
- name: String
- });
- var inputEmits = {
- [UPDATE_MODEL_EVENT]: (value) => isString(value),
- input: (value) => isString(value),
- change: (value, evt) => isString(value) && (evt instanceof Event || evt === void 0),
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: (evt) => evt === void 0 || evt instanceof MouseEvent,
- mouseleave: (evt) => evt instanceof MouseEvent,
- mouseenter: (evt) => evt instanceof MouseEvent,
- keydown: (evt) => evt instanceof Event,
- compositionstart: (evt) => evt instanceof CompositionEvent,
- compositionupdate: (evt) => evt instanceof CompositionEvent,
- compositionend: (evt) => evt instanceof CompositionEvent
- };
- /**
- * @description default values for InputProps, used in components that extend InputProps like Autocomplete
- */
- var inputPropsDefaults = {
- disabled: void 0,
- modelValue: "",
- modelModifiers: () => ({}),
- type: "text",
- autocomplete: "off",
- clearIcon: markRaw(circle_close_default),
- wordLimitPosition: "inside",
- tabindex: 0,
- validateEvent: true,
- inputStyle: () => ({}),
- rows: 2
- };
- //#endregion
- //#region node_modules/element-plus/es/components/input/src/utils.mjs
- var hiddenTextarea = void 0;
- var HIDDEN_STYLE = {
- height: "0",
- visibility: "hidden",
- overflow: isFirefox() ? "" : "hidden",
- position: "absolute",
- "z-index": "-1000",
- top: "0",
- right: "0"
- };
- var CONTEXT_STYLE = [
- "letter-spacing",
- "line-height",
- "padding-top",
- "padding-bottom",
- "font-family",
- "font-weight",
- "font-size",
- "text-rendering",
- "text-transform",
- "width",
- "text-indent",
- "padding-left",
- "padding-right",
- "border-width",
- "box-sizing",
- "word-break"
- ];
- var looseToNumber = (val) => {
- const n = Number.parseFloat(val);
- return Number.isNaN(n) ? val : n;
- };
- function calculateNodeStyling(targetElement) {
- const style = window.getComputedStyle(targetElement);
- const boxSizing = style.getPropertyValue("box-sizing");
- const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
- const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
- return {
- contextStyle: CONTEXT_STYLE.map((name) => [name, style.getPropertyValue(name)]),
- paddingSize,
- borderSize,
- boxSizing
- };
- }
- function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
- if (!hiddenTextarea) {
- hiddenTextarea = document.createElement("textarea");
- let hostNode = document.body;
- if (!isFirefox() && targetElement.parentNode) hostNode = targetElement.parentNode;
- hostNode.appendChild(hiddenTextarea);
- }
- const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
- contextStyle.forEach(([key, value]) => hiddenTextarea?.style.setProperty(key, value));
- Object.entries(HIDDEN_STYLE).forEach(([key, value]) => hiddenTextarea?.style.setProperty(key, value, "important"));
- hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
- let height = hiddenTextarea.scrollHeight;
- const result = {};
- if (boxSizing === "border-box") height = height + borderSize;
- else if (boxSizing === "content-box") height = height - paddingSize;
- hiddenTextarea.value = "";
- const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
- if (isNumber(minRows)) {
- let minHeight = singleRowHeight * minRows;
- if (boxSizing === "border-box") minHeight = minHeight + paddingSize + borderSize;
- height = Math.max(minHeight, height);
- result.minHeight = `${minHeight}px`;
- }
- if (isNumber(maxRows)) {
- let maxHeight = singleRowHeight * maxRows;
- if (boxSizing === "border-box") maxHeight = maxHeight + paddingSize + borderSize;
- height = Math.min(maxHeight, height);
- }
- result.height = `${height}px`;
- hiddenTextarea.parentNode?.removeChild(hiddenTextarea);
- hiddenTextarea = void 0;
- return result;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$76 = [
- "id",
- "name",
- "minlength",
- "maxlength",
- "type",
- "disabled",
- "readonly",
- "autocomplete",
- "tabindex",
- "aria-label",
- "placeholder",
- "form",
- "autofocus",
- "role",
- "inputmode"
- ];
- var _hoisted_2$42 = [
- "id",
- "name",
- "minlength",
- "maxlength",
- "tabindex",
- "disabled",
- "readonly",
- "autocomplete",
- "aria-label",
- "placeholder",
- "form",
- "autofocus",
- "rows",
- "role"
- ];
- var COMPONENT_NAME$19 = "ElInput";
- //#endregion
- //#region node_modules/element-plus/es/components/input/index.mjs
- var ElInput = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$19,
- inheritAttrs: false,
- __name: "input",
- props: inputProps,
- emits: inputEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const rawAttrs = useAttrs$1();
- const attrs = useAttrs();
- const slots = useSlots();
- const containerKls = computed(() => [
- props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
- nsInput.m(inputSize.value),
- nsInput.is("disabled", inputDisabled.value),
- nsInput.is("exceed", inputExceed.value),
- {
- [nsInput.b("group")]: slots.prepend || slots.append,
- [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
- [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
- [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value,
- [nsInput.b("hidden")]: props.type === "hidden"
- },
- rawAttrs.class
- ]);
- const wrapperKls = computed(() => [nsInput.e("wrapper"), nsInput.is("focus", isFocused.value)]);
- const { form: elForm, formItem: elFormItem } = useFormItem();
- const { inputId } = useFormItemInputId(props, { formItemContext: elFormItem });
- const inputSize = useFormSize();
- const inputDisabled = useFormDisabled();
- const nsInput = useNamespace("input");
- const nsTextarea = useNamespace("textarea");
- const input = shallowRef();
- const textarea = shallowRef();
- const hovering = ref(false);
- const passwordVisible = ref(false);
- const countStyle = ref();
- const textareaCalcStyle = shallowRef(props.inputStyle);
- const _ref = computed(() => input.value || textarea.value);
- const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, {
- disabled: inputDisabled,
- afterBlur() {
- if (props.validateEvent) elFormItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- });
- const needStatusIcon = computed(() => elForm?.statusIcon ?? false);
- const validateState = computed(() => elFormItem?.validateState || "");
- const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
- const passwordIcon = computed(() => passwordVisible.value ? view_default : hide_default);
- const containerStyle = computed(() => [rawAttrs.style]);
- const textareaStyle = computed(() => [
- props.inputStyle,
- textareaCalcStyle.value,
- { resize: props.resize }
- ]);
- const nativeInputValue = computed(() => isNil(props.modelValue) ? "" : String(props.modelValue));
- const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
- const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !!nativeInputValue.value);
- const isWordLimitVisible = computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
- const textLength = computed(() => nativeInputValue.value.length);
- const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
- const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
- const hasModelModifiers = computed(() => !!Object.keys(props.modelModifiers).length);
- const [recordCursor, setCursor] = useCursor(input);
- useResizeObserver(textarea, (entries) => {
- onceInitSizeTextarea();
- if (!isWordLimitVisible.value || props.resize !== "both" && props.resize !== "horizontal") return;
- const { width } = entries[0].contentRect;
- countStyle.value = { right: `calc(100% - ${width + 22 - 10}px)` };
- });
- const resizeTextarea = () => {
- const { type, autosize } = props;
- if (!isClient || type !== "textarea" || !textarea.value) return;
- if (autosize) {
- const minRows = isObject$2(autosize) ? autosize.minRows : void 0;
- const maxRows = isObject$2(autosize) ? autosize.maxRows : void 0;
- const textareaStyle = calcTextareaHeight(textarea.value, minRows, maxRows);
- textareaCalcStyle.value = {
- overflowY: "hidden",
- ...textareaStyle
- };
- nextTick(() => {
- textarea.value.offsetHeight;
- textareaCalcStyle.value = textareaStyle;
- });
- } else textareaCalcStyle.value = { minHeight: calcTextareaHeight(textarea.value).minHeight };
- };
- const createOnceInitResize = (resizeTextarea) => {
- let isInit = false;
- return () => {
- if (isInit || !props.autosize) return;
- if (!(textarea.value?.offsetParent === null)) {
- setTimeout(resizeTextarea);
- isInit = true;
- }
- };
- };
- const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
- const setNativeInputValue = () => {
- const input = _ref.value;
- const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
- if (!input || input.value === formatterValue || props.type === "file") return;
- input.value = formatterValue;
- };
- const formatValue = (value) => {
- const { trim, number } = props.modelModifiers;
- if (trim) value = value.trim();
- if (number) value = `${looseToNumber(value)}`;
- if (props.formatter && props.parser) value = props.parser(value);
- return value;
- };
- const handleInput = async (event) => {
- if (isComposing.value) return;
- const { lazy } = props.modelModifiers;
- let { value } = event.target;
- if (lazy) {
- emit(INPUT_EVENT, value);
- return;
- }
- value = formatValue(value);
- if (String(value) === nativeInputValue.value) {
- if (props.formatter) setNativeInputValue();
- return;
- }
- recordCursor();
- emit(UPDATE_MODEL_EVENT, value);
- emit(INPUT_EVENT, value);
- await nextTick();
- if (props.formatter && props.parser || !hasModelModifiers.value) setNativeInputValue();
- setCursor();
- };
- const handleChange = async (event) => {
- let { value } = event.target;
- value = formatValue(value);
- if (props.modelModifiers.lazy) emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value, event);
- await nextTick();
- setNativeInputValue();
- };
- const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({
- emit,
- afterComposition: handleInput
- });
- const handlePasswordVisible = () => {
- passwordVisible.value = !passwordVisible.value;
- };
- const focus = () => _ref.value?.focus();
- const blur = () => _ref.value?.blur();
- const handleMouseLeave = (evt) => {
- hovering.value = false;
- emit("mouseleave", evt);
- };
- const handleMouseEnter = (evt) => {
- hovering.value = true;
- emit("mouseenter", evt);
- };
- const handleKeydown = (evt) => {
- emit("keydown", evt);
- };
- const select = () => {
- _ref.value?.select();
- };
- const clear = (evt) => {
- emit(UPDATE_MODEL_EVENT, "");
- emit(CHANGE_EVENT, "");
- emit("clear", evt);
- emit(INPUT_EVENT, "");
- };
- watch(() => props.modelValue, () => {
- nextTick(() => resizeTextarea());
- if (props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
- });
- watch(nativeInputValue, (newValue) => {
- if (!_ref.value) return;
- const { trim, number } = props.modelModifiers;
- const elValue = _ref.value.value;
- const displayValue = (number || props.type === "number") && !/^0\d/.test(elValue) ? `${looseToNumber(elValue)}` : elValue;
- if (displayValue === newValue) return;
- if (document.activeElement === _ref.value && _ref.value.type !== "range") {
- if (trim && displayValue.trim() === newValue) return;
- }
- setNativeInputValue();
- });
- watch(() => props.type, async () => {
- await nextTick();
- setNativeInputValue();
- resizeTextarea();
- });
- onMounted(() => {
- if (!props.formatter && props.parser) debugWarn(COMPONENT_NAME$19, "If you set the parser, you also need to set the formatter.");
- setNativeInputValue();
- nextTick(resizeTextarea);
- });
- __expose({
- input,
- textarea,
- ref: _ref,
- textareaStyle,
- autosize: toRef(props, "autosize"),
- isComposing,
- focus,
- blur,
- select,
- clear,
- resizeTextarea
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([containerKls.value, {
- [unref(nsInput).bm("group", "append")]: _ctx.$slots.append,
- [unref(nsInput).bm("group", "prepend")]: _ctx.$slots.prepend
- }]),
- style: normalizeStyle(containerStyle.value),
- onMouseenter: handleMouseEnter,
- onMouseleave: handleMouseLeave
- }, [createCommentVNode(" input "), __props.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
- createCommentVNode(" prepend slot "),
- _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(nsInput).be("group", "prepend"))
- }, [renderSlot(_ctx.$slots, "prepend")], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- ref_key: "wrapperRef",
- ref: wrapperRef,
- class: normalizeClass(wrapperKls.value)
- }, [
- createCommentVNode(" prefix slot "),
- _ctx.$slots.prefix || __props.prefixIcon ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(unref(nsInput).e("prefix"))
- }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("prefix-inner")) }, [renderSlot(_ctx.$slots, "prefix"), __props.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(nsInput).e("icon"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)], 2)], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("input", mergeProps({
- id: unref(inputId),
- ref_key: "input",
- ref: input,
- class: unref(nsInput).e("inner")
- }, unref(attrs), {
- name: __props.name,
- minlength: __props.minlength,
- maxlength: __props.maxlength,
- type: __props.showPassword ? passwordVisible.value ? "text" : "password" : __props.type,
- disabled: unref(inputDisabled),
- readonly: __props.readonly,
- autocomplete: __props.autocomplete,
- tabindex: __props.tabindex,
- "aria-label": __props.ariaLabel,
- placeholder: __props.placeholder,
- style: __props.inputStyle,
- form: __props.form,
- autofocus: __props.autofocus,
- role: __props.containerRole,
- inputmode: __props.inputmode,
- onCompositionstart: _cache[0] || (_cache[0] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
- onCompositionupdate: _cache[1] || (_cache[1] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
- onCompositionend: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
- onInput: handleInput,
- onChange: handleChange,
- onKeydown: handleKeydown
- }), null, 16, _hoisted_1$76),
- createCommentVNode(" suffix slot "),
- suffixVisible.value ? (openBlock(), createElementBlock("span", {
- key: 1,
- class: normalizeClass(unref(nsInput).e("suffix"))
- }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("suffix-inner")) }, [
- !showClear.value || !showPwdVisible.value || !isWordLimitVisible.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "suffix"), __props.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(nsInput).e("icon"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.suffixIcon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true),
- showClear.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
- onMousedown: withModifiers(unref(NOOP), ["prevent"]),
- onClick: clear
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
- _: 1
- }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
- showPwdVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 2,
- class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
- onClick: handlePasswordVisible,
- onMousedown: withModifiers(unref(NOOP), ["prevent"]),
- onMouseup: withModifiers(unref(NOOP), ["prevent"])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(passwordIcon.value)))]),
- _: 1
- }, 8, [
- "class",
- "onMousedown",
- "onMouseup"
- ])) : createCommentVNode("v-if", true),
- isWordLimitVisible.value ? (openBlock(), createElementBlock("span", {
- key: 3,
- class: normalizeClass([unref(nsInput).e("count"), unref(nsInput).is("outside", __props.wordLimitPosition === "outside")])
- }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("count-inner")) }, toDisplayString(textLength.value) + " / " + toDisplayString(__props.maxlength), 3)], 2)) : createCommentVNode("v-if", true),
- validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 4,
- class: normalizeClass([
- unref(nsInput).e("icon"),
- unref(nsInput).e("validateIcon"),
- unref(nsInput).is("loading", validateState.value === "validating")
- ])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(validateIcon.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)
- ], 2)], 2)) : createCommentVNode("v-if", true)
- ], 2),
- createCommentVNode(" append slot "),
- _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(nsInput).be("group", "append"))
- }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
- createCommentVNode(" textarea "),
- createBaseVNode("textarea", mergeProps({
- id: unref(inputId),
- ref_key: "textarea",
- ref: textarea,
- class: [
- unref(nsTextarea).e("inner"),
- unref(nsInput).is("focus", unref(isFocused)),
- unref(nsTextarea).is("clearable", __props.clearable)
- ]
- }, unref(attrs), {
- name: __props.name,
- minlength: __props.minlength,
- maxlength: __props.maxlength,
- tabindex: __props.tabindex,
- disabled: unref(inputDisabled),
- readonly: __props.readonly,
- autocomplete: __props.autocomplete,
- style: textareaStyle.value,
- "aria-label": __props.ariaLabel,
- placeholder: __props.placeholder,
- form: __props.form,
- autofocus: __props.autofocus,
- rows: __props.rows,
- role: __props.containerRole,
- onCompositionstart: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
- onCompositionupdate: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
- onCompositionend: _cache[5] || (_cache[5] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
- onInput: handleInput,
- onFocus: _cache[6] || (_cache[6] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
- onBlur: _cache[7] || (_cache[7] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
- onChange: handleChange,
- onKeydown: handleKeydown
- }), null, 16, _hoisted_2$42),
- showClear.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(nsTextarea).e("icon"), unref(nsTextarea).e("clear")]),
- onMousedown: withModifiers(unref(NOOP), ["prevent"]),
- onClick: clear
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
- _: 1
- }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
- isWordLimitVisible.value ? (openBlock(), createElementBlock("span", {
- key: 1,
- style: normalizeStyle(countStyle.value),
- class: normalizeClass([unref(nsInput).e("count"), unref(nsInput).is("outside", __props.wordLimitPosition === "outside")])
- }, toDisplayString(textLength.value) + " / " + toDisplayString(__props.maxlength), 7)) : createCommentVNode("v-if", true)
- ], 64))], 38);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/autocomplete/src/autocomplete.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AutocompleteProps` instead.
- */
- var autocompleteProps = buildProps({
- ...inputProps,
- valueKey: {
- type: String,
- default: "value"
- },
- modelValue: {
- type: [String, Number],
- default: ""
- },
- debounce: {
- type: Number,
- default: 300
- },
- placement: {
- type: definePropType(String),
- values: [
- "top",
- "top-start",
- "top-end",
- "bottom",
- "bottom-start",
- "bottom-end"
- ],
- default: "bottom-start"
- },
- fetchSuggestions: {
- type: definePropType([Function, Array]),
- default: NOOP
- },
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- triggerOnFocus: {
- type: Boolean,
- default: true
- },
- selectWhenUnmatched: Boolean,
- hideLoading: Boolean,
- teleported: useTooltipContentProps.teleported,
- appendTo: useTooltipContentProps.appendTo,
- highlightFirstItem: Boolean,
- fitInputWidth: Boolean,
- loopNavigation: {
- type: Boolean,
- default: true
- }
- });
- var autocompleteEmits = {
- [UPDATE_MODEL_EVENT]: (value) => isString(value) || isNumber(value),
- [INPUT_EVENT]: (value) => isString(value) || isNumber(value),
- [CHANGE_EVENT]: (value) => isString(value) || isNumber(value),
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true,
- select: (item) => isObject$2(item)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/scrollbar.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ScrollbarProps` instead.
- */
- var scrollbarProps = buildProps({
- distance: {
- type: Number,
- default: 0
- },
- height: {
- type: [String, Number],
- default: ""
- },
- maxHeight: {
- type: [String, Number],
- default: ""
- },
- native: Boolean,
- wrapStyle: {
- type: definePropType([
- String,
- Object,
- Array
- ]),
- default: ""
- },
- wrapClass: {
- type: [String, Array],
- default: ""
- },
- viewClass: {
- type: [String, Array],
- default: ""
- },
- viewStyle: {
- type: [
- String,
- Array,
- Object
- ],
- default: ""
- },
- noresize: Boolean,
- tag: {
- type: String,
- default: "div"
- },
- always: Boolean,
- minSize: {
- type: Number,
- default: 20
- },
- tabindex: {
- type: [String, Number],
- default: void 0
- },
- id: String,
- role: String,
- ...useAriaProps(["ariaLabel", "ariaOrientation"])
- });
- var scrollbarEmits = {
- "end-reached": (direction) => [
- "left",
- "right",
- "top",
- "bottom"
- ].includes(direction),
- scroll: ({ scrollTop, scrollLeft }) => [scrollTop, scrollLeft].every(isNumber)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/util.mjs
- var GAP = 4;
- var BAR_MAP = {
- vertical: {
- offset: "offsetHeight",
- scroll: "scrollTop",
- scrollSize: "scrollHeight",
- size: "height",
- key: "vertical",
- axis: "Y",
- client: "clientY",
- direction: "top"
- },
- horizontal: {
- offset: "offsetWidth",
- scroll: "scrollLeft",
- scrollSize: "scrollWidth",
- size: "width",
- key: "horizontal",
- axis: "X",
- client: "clientX",
- direction: "left"
- }
- };
- var renderThumbStyle = ({ move, size, bar }) => ({
- [bar.size]: size,
- transform: `translate${bar.axis}(${move}%)`
- });
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/thumb.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ThumbProps` instead.
- */
- var thumbProps = buildProps({
- vertical: Boolean,
- size: String,
- move: Number,
- ratio: {
- type: Number,
- required: true
- },
- always: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/constants.mjs
- var scrollbarContextKey = Symbol("scrollbarContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/bar.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `BarProps` instead.
- */
- var barProps = buildProps({
- always: {
- type: Boolean,
- default: true
- },
- minSize: {
- type: Number,
- required: true
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$18 = "Thumb";
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/thumb2.mjs
- var thumb_default = /* @__PURE__ */ defineComponent({
- __name: "thumb",
- props: thumbProps,
- setup(__props) {
- const props = __props;
- const scrollbar = inject(scrollbarContextKey);
- const ns = useNamespace("scrollbar");
- if (!scrollbar) throwError(COMPONENT_NAME$18, "can not inject scrollbar context");
- const instance = ref();
- const thumb = ref();
- const thumbState = ref({});
- const visible = ref(false);
- let cursorDown = false;
- let cursorLeave = false;
- let baseScrollHeight = 0;
- let baseScrollWidth = 0;
- let originalOnSelectStart = isClient ? document.onselectstart : null;
- const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
- const thumbStyle = computed(() => renderThumbStyle({
- size: props.size,
- move: props.move,
- bar: bar.value
- }));
- const offsetRatio = computed(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]);
- const clickThumbHandler = (e) => {
- e.stopPropagation();
- if (e.ctrlKey || [1, 2].includes(e.button)) return;
- window.getSelection()?.removeAllRanges();
- startDrag(e);
- const el = e.currentTarget;
- if (!el) return;
- thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
- };
- const clickTrackHandler = (e) => {
- if (!thumb.value || !instance.value || !scrollbar.wrapElement) return;
- const thumbPositionPercentage = (Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) - thumb.value[bar.value.offset] / 2) * 100 * offsetRatio.value / instance.value[bar.value.offset];
- scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
- };
- const startDrag = (e) => {
- e.stopImmediatePropagation();
- cursorDown = true;
- baseScrollHeight = scrollbar.wrapElement.scrollHeight;
- baseScrollWidth = scrollbar.wrapElement.scrollWidth;
- document.addEventListener("mousemove", mouseMoveDocumentHandler);
- document.addEventListener("mouseup", mouseUpDocumentHandler);
- originalOnSelectStart = document.onselectstart;
- document.onselectstart = () => false;
- };
- const mouseMoveDocumentHandler = (e) => {
- if (!instance.value || !thumb.value) return;
- if (cursorDown === false) return;
- const prevPage = thumbState.value[bar.value.axis];
- if (!prevPage) return;
- const thumbPositionPercentage = ((instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1 - (thumb.value[bar.value.offset] - prevPage)) * 100 * offsetRatio.value / instance.value[bar.value.offset];
- if (bar.value.scroll === "scrollLeft") scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollWidth / 100;
- else scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollHeight / 100;
- };
- const mouseUpDocumentHandler = () => {
- cursorDown = false;
- thumbState.value[bar.value.axis] = 0;
- document.removeEventListener("mousemove", mouseMoveDocumentHandler);
- document.removeEventListener("mouseup", mouseUpDocumentHandler);
- restoreOnselectstart();
- if (cursorLeave) visible.value = false;
- };
- const mouseMoveScrollbarHandler = () => {
- cursorLeave = false;
- visible.value = !!props.size;
- };
- const mouseLeaveScrollbarHandler = () => {
- cursorLeave = true;
- visible.value = cursorDown;
- };
- onBeforeUnmount(() => {
- restoreOnselectstart();
- document.removeEventListener("mouseup", mouseUpDocumentHandler);
- });
- const restoreOnselectstart = () => {
- if (document.onselectstart !== originalOnSelectStart) document.onselectstart = originalOnSelectStart;
- };
- useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
- useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, {
- name: unref(ns).b("fade"),
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createBaseVNode("div", {
- ref_key: "instance",
- ref: instance,
- class: normalizeClass([unref(ns).e("bar"), unref(ns).is(bar.value.key)]),
- onMousedown: clickTrackHandler,
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
- }, [createBaseVNode("div", {
- ref_key: "thumb",
- ref: thumb,
- class: normalizeClass(unref(ns).e("thumb")),
- style: normalizeStyle(thumbStyle.value),
- onMousedown: clickThumbHandler
- }, null, 38)], 34), [[vShow, __props.always || visible.value]])]),
- _: 1
- }, 8, ["name"]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/bar2.mjs
- var bar_default = /* @__PURE__ */ defineComponent({
- __name: "bar",
- props: barProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const scrollbar = inject(scrollbarContextKey);
- const moveX = ref(0);
- const moveY = ref(0);
- const sizeWidth = ref("");
- const sizeHeight = ref("");
- const ratioY = ref(1);
- const ratioX = ref(1);
- const handleScroll = (wrap) => {
- if (wrap) {
- const offsetHeight = wrap.offsetHeight - 4;
- const offsetWidth = wrap.offsetWidth - 4;
- moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
- moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
- }
- };
- const update = () => {
- const wrap = scrollbar?.wrapElement;
- if (!wrap) return;
- const offsetHeight = wrap.offsetHeight - 4;
- const offsetWidth = wrap.offsetWidth - 4;
- const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
- const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
- const height = Math.max(originalHeight, props.minSize);
- const width = Math.max(originalWidth, props.minSize);
- ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
- ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
- sizeHeight.value = height + 4 < offsetHeight ? `${height}px` : "";
- sizeWidth.value = width + 4 < offsetWidth ? `${width}px` : "";
- };
- __expose({
- handleScroll,
- update
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock(Fragment, null, [createVNode(thumb_default, {
- move: moveX.value,
- ratio: ratioX.value,
- size: sizeWidth.value,
- always: __props.always
- }, null, 8, [
- "move",
- "ratio",
- "size",
- "always"
- ]), createVNode(thumb_default, {
- move: moveY.value,
- ratio: ratioY.value,
- size: sizeHeight.value,
- vertical: "",
- always: __props.always
- }, null, 8, [
- "move",
- "ratio",
- "size",
- "always"
- ])], 64);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/src/scrollbar.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$75 = ["tabindex"];
- var COMPONENT_NAME$17 = "ElScrollbar";
- //#endregion
- //#region node_modules/element-plus/es/components/scrollbar/index.mjs
- var ElScrollbar = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$17,
- __name: "scrollbar",
- props: scrollbarProps,
- emits: scrollbarEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("scrollbar");
- let stopResizeObserver = void 0;
- let stopWrapResizeObserver = void 0;
- let stopResizeListener = void 0;
- let wrapScrollTop = 0;
- let wrapScrollLeft = 0;
- let direction = "";
- const distanceScrollState = {
- bottom: false,
- top: false,
- right: false,
- left: false
- };
- const scrollbarRef = ref();
- const wrapRef = ref();
- const resizeRef = ref();
- const barRef = ref();
- const wrapStyle = computed(() => {
- const style = {};
- const height = addUnit(props.height);
- const maxHeight = addUnit(props.maxHeight);
- if (height) style.height = height;
- if (maxHeight) style.maxHeight = maxHeight;
- return [props.wrapStyle, style];
- });
- const wrapKls = computed(() => {
- return [
- props.wrapClass,
- ns.e("wrap"),
- { [ns.em("wrap", "hidden-default")]: !props.native }
- ];
- });
- const resizeKls = computed(() => {
- return [ns.e("view"), props.viewClass];
- });
- const shouldSkipDirection = (direction) => {
- return distanceScrollState[direction] ?? false;
- };
- const DIRECTION_PAIRS = {
- top: "bottom",
- bottom: "top",
- left: "right",
- right: "left"
- };
- const updateTriggerStatus = (arrivedStates) => {
- const oppositeDirection = DIRECTION_PAIRS[direction];
- if (!oppositeDirection) return;
- const arrived = arrivedStates[direction];
- const oppositeArrived = arrivedStates[oppositeDirection];
- if (arrived && !distanceScrollState[direction]) distanceScrollState[direction] = true;
- if (!oppositeArrived && distanceScrollState[oppositeDirection]) distanceScrollState[oppositeDirection] = false;
- };
- const handleScroll = () => {
- if (wrapRef.value) {
- barRef.value?.handleScroll(wrapRef.value);
- const prevTop = wrapScrollTop;
- const prevLeft = wrapScrollLeft;
- wrapScrollTop = wrapRef.value.scrollTop;
- wrapScrollLeft = wrapRef.value.scrollLeft;
- const arrivedStates = {
- bottom: wrapScrollTop + wrapRef.value.clientHeight >= wrapRef.value.scrollHeight - props.distance,
- top: wrapScrollTop <= props.distance && prevTop !== 0,
- right: wrapScrollLeft + wrapRef.value.clientWidth >= wrapRef.value.scrollWidth - props.distance && prevLeft !== wrapScrollLeft,
- left: wrapScrollLeft <= props.distance && prevLeft !== 0
- };
- emit("scroll", {
- scrollTop: wrapScrollTop,
- scrollLeft: wrapScrollLeft
- });
- if (prevTop !== wrapScrollTop) direction = wrapScrollTop > prevTop ? "bottom" : "top";
- if (prevLeft !== wrapScrollLeft) direction = wrapScrollLeft > prevLeft ? "right" : "left";
- if (props.distance > 0) {
- if (shouldSkipDirection(direction)) return;
- updateTriggerStatus(arrivedStates);
- }
- if (arrivedStates[direction]) emit("end-reached", direction);
- }
- };
- function scrollTo(arg1, arg2) {
- if (isObject$2(arg1)) wrapRef.value.scrollTo(arg1);
- else if (isNumber(arg1) && isNumber(arg2)) wrapRef.value.scrollTo(arg1, arg2);
- }
- const setScrollTop = (value) => {
- if (!isNumber(value)) {
- debugWarn(COMPONENT_NAME$17, "value must be a number");
- return;
- }
- wrapRef.value.scrollTop = value;
- };
- const setScrollLeft = (value) => {
- if (!isNumber(value)) {
- debugWarn(COMPONENT_NAME$17, "value must be a number");
- return;
- }
- wrapRef.value.scrollLeft = value;
- };
- const update = () => {
- barRef.value?.update();
- distanceScrollState[direction] = false;
- };
- watch(() => props.noresize, (noresize) => {
- if (noresize) {
- stopResizeObserver?.();
- stopWrapResizeObserver?.();
- stopResizeListener?.();
- } else {
- ({stop: stopResizeObserver} = useResizeObserver(resizeRef, update));
- ({stop: stopWrapResizeObserver} = useResizeObserver(wrapRef, update));
- stopResizeListener = useEventListener("resize", update);
- }
- }, { immediate: true });
- watch(() => [props.maxHeight, props.height], () => {
- if (!props.native) nextTick(() => {
- update();
- if (wrapRef.value) barRef.value?.handleScroll(wrapRef.value);
- });
- });
- provide(scrollbarContextKey, reactive({
- scrollbarElement: scrollbarRef,
- wrapElement: wrapRef
- }));
- onActivated(() => {
- if (wrapRef.value) {
- wrapRef.value.scrollTop = wrapScrollTop;
- wrapRef.value.scrollLeft = wrapScrollLeft;
- }
- });
- onMounted(() => {
- if (!props.native) nextTick(() => {
- update();
- });
- });
- onUpdated(() => update());
- __expose({
- wrapRef,
- update,
- scrollTo,
- setScrollTop,
- setScrollLeft,
- handleScroll
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "scrollbarRef",
- ref: scrollbarRef,
- class: normalizeClass(unref(ns).b())
- }, [createBaseVNode("div", {
- ref_key: "wrapRef",
- ref: wrapRef,
- class: normalizeClass(wrapKls.value),
- style: normalizeStyle(wrapStyle.value),
- tabindex: __props.tabindex,
- onScroll: handleScroll
- }, [(openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
- id: __props.id,
- ref_key: "resizeRef",
- ref: resizeRef,
- class: normalizeClass(resizeKls.value),
- style: normalizeStyle(__props.viewStyle),
- role: __props.role,
- "aria-label": __props.ariaLabel,
- "aria-orientation": __props.ariaOrientation
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, [
- "id",
- "class",
- "style",
- "role",
- "aria-label",
- "aria-orientation"
- ]))], 46, _hoisted_1$75), !__props.native ? (openBlock(), createBlock(bar_default, {
- key: 0,
- ref_key: "barRef",
- ref: barRef,
- always: __props.always,
- "min-size": __props.minSize
- }, null, 8, ["always", "min-size"])) : createCommentVNode("v-if", true)], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$74 = ["aria-expanded", "aria-owns"];
- var _hoisted_2$41 = { key: 0 };
- var _hoisted_3$18 = [
- "id",
- "aria-selected",
- "onClick"
- ];
- var COMPONENT_NAME$16 = "ElAutocomplete";
- //#endregion
- //#region node_modules/element-plus/es/components/autocomplete/index.mjs
- var ElAutocomplete = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$16,
- inheritAttrs: false,
- __name: "autocomplete",
- props: autocompleteProps,
- emits: autocompleteEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const passInputProps = computed(() => pick(props, Object.keys(inputProps)));
- const rawAttrs = useAttrs$1();
- const disabled = useFormDisabled();
- const ns = useNamespace("autocomplete");
- const inputRef = ref();
- const regionRef = ref();
- const popperRef = ref();
- const listboxRef = ref();
- let readonly = false;
- let ignoreFocusEvent = false;
- const suggestions = ref([]);
- const highlightedIndex = ref(-1);
- const dropdownWidth = ref("");
- const activated = ref(false);
- const suggestionDisabled = ref(false);
- const loading = ref(false);
- const listboxId = useId();
- const styles = computed(() => rawAttrs.style);
- const suggestionVisible = computed(() => {
- return (suggestions.value.length > 0 || loading.value) && activated.value;
- });
- const suggestionLoading = computed(() => !props.hideLoading && loading.value);
- const refInput = computed(() => {
- if (inputRef.value) return Array.from(inputRef.value.$el.querySelectorAll("input"));
- return [];
- });
- const onSuggestionShow = () => {
- if (suggestionVisible.value) dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
- };
- const onHide = () => {
- highlightedIndex.value = -1;
- };
- const getData = async (queryString) => {
- if (suggestionDisabled.value) return;
- const cb = (suggestionList) => {
- loading.value = false;
- if (suggestionDisabled.value) return;
- if (isArray$1(suggestionList)) {
- suggestions.value = suggestionList;
- highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
- } else throwError(COMPONENT_NAME$16, "autocomplete suggestions must be an array");
- };
- loading.value = true;
- if (isArray$1(props.fetchSuggestions)) cb(props.fetchSuggestions);
- else {
- const result = await props.fetchSuggestions(queryString, cb);
- if (isArray$1(result)) cb(result);
- }
- };
- const debouncedGetData = useDebounceFn(getData, computed(() => props.debounce));
- const handleInput = (value) => {
- const valuePresented = !!value;
- emit(INPUT_EVENT, value);
- emit(UPDATE_MODEL_EVENT, value);
- suggestionDisabled.value = false;
- activated.value ||= valuePresented;
- if (!props.triggerOnFocus && !value) {
- suggestionDisabled.value = true;
- suggestions.value = [];
- return;
- }
- debouncedGetData(value);
- };
- const handleMouseDown = (event) => {
- if (disabled.value) return;
- if (event.target?.tagName !== "INPUT" || refInput.value.includes(document.activeElement)) activated.value = true;
- };
- const handleChange = (value) => {
- emit(CHANGE_EVENT, value);
- };
- const handleFocus = (evt) => {
- if (!ignoreFocusEvent) {
- activated.value = true;
- emit("focus", evt);
- const queryString = props.modelValue ?? "";
- if (props.triggerOnFocus && !readonly) debouncedGetData(String(queryString));
- } else ignoreFocusEvent = false;
- };
- const handleBlur = (evt) => {
- setTimeout(() => {
- if (popperRef.value?.isFocusInsideContent()) {
- ignoreFocusEvent = true;
- return;
- }
- activated.value && close();
- emit("blur", evt);
- });
- };
- const handleClear = () => {
- activated.value = false;
- emit(UPDATE_MODEL_EVENT, "");
- emit("clear");
- };
- const handleKeyEnter = async () => {
- if (inputRef.value?.isComposing) return;
- if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) handleSelect(suggestions.value[highlightedIndex.value]);
- else {
- if (props.selectWhenUnmatched) {
- emit("select", { value: props.modelValue });
- suggestions.value = [];
- highlightedIndex.value = -1;
- }
- activated.value = true;
- debouncedGetData(String(props.modelValue));
- }
- };
- const handleKeyEscape = (evt) => {
- if (suggestionVisible.value) {
- evt.preventDefault();
- evt.stopPropagation();
- close();
- }
- };
- const close = () => {
- activated.value = false;
- };
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- inputRef.value?.blur();
- };
- const handleSelect = async (item) => {
- emit(INPUT_EVENT, item[props.valueKey]);
- emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
- emit("select", item);
- suggestions.value = [];
- highlightedIndex.value = -1;
- };
- const highlight = (index) => {
- if (!suggestionVisible.value || loading.value) return;
- if (index < 0) {
- if (!props.loopNavigation) {
- highlightedIndex.value = -1;
- return;
- }
- index = suggestions.value.length - 1;
- }
- if (index >= suggestions.value.length) index = props.loopNavigation ? 0 : suggestions.value.length - 1;
- const [suggestion, suggestionList] = getSuggestionContext();
- const highlightItem = suggestionList[index];
- const scrollTop = suggestion.scrollTop;
- const { offsetTop, scrollHeight } = highlightItem;
- if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) suggestion.scrollTop = offsetTop + scrollHeight - suggestion.clientHeight;
- if (offsetTop < scrollTop) suggestion.scrollTop = offsetTop;
- highlightedIndex.value = index;
- inputRef.value?.ref?.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
- };
- const getSuggestionContext = () => {
- const suggestion = regionRef.value.querySelector(`.${ns.be("suggestion", "wrap")}`);
- return [suggestion, suggestion.querySelectorAll(`.${ns.be("suggestion", "list")} li`)];
- };
- const stopHandle = onClickOutside(listboxRef, (event) => {
- if (popperRef.value?.isFocusInsideContent()) return;
- const hadIgnoredFocus = ignoreFocusEvent;
- ignoreFocusEvent = false;
- if (!suggestionVisible.value) return;
- if (hadIgnoredFocus) handleBlur(new FocusEvent("blur", event));
- else close();
- });
- const handleKeydown = (e) => {
- switch (getEventCode(e)) {
- case EVENT_CODE.up:
- e.preventDefault();
- highlight(highlightedIndex.value - 1);
- break;
- case EVENT_CODE.down:
- e.preventDefault();
- highlight(highlightedIndex.value + 1);
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- e.preventDefault();
- handleKeyEnter();
- break;
- case EVENT_CODE.tab:
- close();
- break;
- case EVENT_CODE.esc:
- handleKeyEscape(e);
- break;
- case EVENT_CODE.home:
- e.preventDefault();
- highlight(0);
- break;
- case EVENT_CODE.end:
- e.preventDefault();
- highlight(suggestions.value.length - 1);
- break;
- case EVENT_CODE.pageUp:
- e.preventDefault();
- highlight(Math.max(0, highlightedIndex.value - 10));
- break;
- case EVENT_CODE.pageDown:
- e.preventDefault();
- highlight(Math.min(suggestions.value.length - 1, highlightedIndex.value + 10));
- break;
- }
- };
- onBeforeUnmount(() => {
- stopHandle?.();
- });
- onMounted(() => {
- const inputElement = inputRef.value?.ref;
- if (!inputElement) return;
- [
- {
- key: "role",
- value: "textbox"
- },
- {
- key: "aria-autocomplete",
- value: "list"
- },
- {
- key: "aria-controls",
- value: listboxId.value
- },
- {
- key: "aria-activedescendant",
- value: `${listboxId.value}-item-${highlightedIndex.value}`
- }
- ].forEach(({ key, value }) => inputElement.setAttribute(key, value));
- readonly = inputElement.hasAttribute("readonly");
- });
- __expose({
- highlightedIndex,
- activated,
- loading,
- inputRef,
- popperRef,
- suggestions,
- handleSelect,
- handleKeyEnter,
- focus,
- blur,
- close,
- highlight,
- getData
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTooltip), {
- ref_key: "popperRef",
- ref: popperRef,
- visible: suggestionVisible.value,
- placement: __props.placement,
- "fallback-placements": ["bottom-start", "top-start"],
- "popper-class": [unref(ns).e("popper"), __props.popperClass],
- "popper-style": __props.popperStyle,
- teleported: __props.teleported,
- "append-to": __props.appendTo,
- "gpu-acceleration": false,
- pure: "",
- "manual-mode": "",
- effect: "light",
- trigger: "click",
- transition: `${unref(ns).namespace.value}-zoom-in-top`,
- persistent: "",
- role: "listbox",
- onBeforeShow: onSuggestionShow,
- onHide
- }, {
- content: withCtx(() => [createBaseVNode("div", {
- ref_key: "regionRef",
- ref: regionRef,
- class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", suggestionLoading.value)]),
- style: normalizeStyle({
- [__props.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
- outline: "none"
- }),
- role: "region"
- }, [
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).be("suggestion", "header")),
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
- createVNode(unref(ElScrollbar), {
- id: unref(listboxId),
- tag: "ul",
- "wrap-class": unref(ns).be("suggestion", "wrap"),
- "view-class": unref(ns).be("suggestion", "list"),
- role: "listbox"
- }, {
- default: withCtx(() => [suggestionLoading.value ? (openBlock(), createElementBlock("li", _hoisted_2$41, [renderSlot(_ctx.$slots, "loading", {}, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).is("loading")) }, {
- default: withCtx(() => [createVNode(unref(loading_default))]),
- _: 1
- }, 8, ["class"])])])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
- return openBlock(), createElementBlock("li", {
- id: `${unref(listboxId)}-item-${index}`,
- key: index,
- class: normalizeClass({ highlighted: highlightedIndex.value === index }),
- role: "option",
- "aria-selected": highlightedIndex.value === index,
- onClick: ($event) => handleSelect(item)
- }, [renderSlot(_ctx.$slots, "default", { item }, () => [createTextVNode(toDisplayString(item[__props.valueKey]), 1)])], 10, _hoisted_3$18);
- }), 128))]),
- _: 3
- }, 8, [
- "id",
- "wrap-class",
- "view-class"
- ]),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).be("suggestion", "footer")),
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
- ], 6)]),
- default: withCtx(() => [createBaseVNode("div", {
- ref_key: "listboxRef",
- ref: listboxRef,
- class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]),
- style: normalizeStyle(styles.value),
- role: "combobox",
- "aria-haspopup": "listbox",
- "aria-expanded": suggestionVisible.value,
- "aria-owns": unref(listboxId)
- }, [createVNode(unref(ElInput), mergeProps({
- ref_key: "inputRef",
- ref: inputRef
- }, mergeProps(passInputProps.value, _ctx.$attrs), {
- "model-value": __props.modelValue,
- disabled: unref(disabled),
- onInput: handleInput,
- onChange: handleChange,
- onFocus: handleFocus,
- onBlur: handleBlur,
- onClear: handleClear,
- onKeydown: handleKeydown,
- onMousedown: handleMouseDown
- }), createSlots({ _: 2 }, [
- _ctx.$slots.prepend ? {
- name: "prepend",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "prepend")]),
- key: "0"
- } : void 0,
- _ctx.$slots.append ? {
- name: "append",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "append")]),
- key: "1"
- } : void 0,
- _ctx.$slots.prefix ? {
- name: "prefix",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
- key: "2"
- } : void 0,
- _ctx.$slots.suffix ? {
- name: "suffix",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
- key: "3"
- } : void 0
- ]), 1040, ["model-value", "disabled"])], 14, _hoisted_1$74)]),
- _: 3
- }, 8, [
- "visible",
- "placement",
- "popper-class",
- "popper-style",
- "teleported",
- "append-to",
- "transition"
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/src/avatar.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AvatarProps` instead.
- */
- var avatarProps = buildProps({
- size: {
- type: [Number, String],
- values: componentSizes,
- validator: (val) => isNumber(val)
- },
- shape: {
- type: String,
- values: ["circle", "square"]
- },
- icon: { type: iconPropType },
- src: {
- type: String,
- default: ""
- },
- alt: String,
- srcSet: String,
- fit: {
- type: definePropType(String),
- default: "cover"
- }
- });
- var avatarEmits = { error: (evt) => evt instanceof Event };
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/src/constants.mjs
- var avatarGroupContextKey = Symbol("avatarGroupContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/src/avatar-group-props.mjs
- var avatarGroupProps = {
- size: {
- type: definePropType([Number, String]),
- values: componentSizes,
- validator: (val) => isNumber(val)
- },
- shape: {
- type: definePropType(String),
- values: ["circle", "square"]
- },
- collapseAvatars: Boolean,
- collapseAvatarsTooltip: Boolean,
- maxCollapseAvatars: {
- type: Number,
- default: 1
- },
- effect: {
- type: definePropType(String),
- default: "light"
- },
- placement: {
- type: definePropType(String),
- values: Ee,
- default: "top"
- },
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- collapseClass: String,
- collapseStyle: { type: definePropType([
- String,
- Array,
- Object
- ]) }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/src/avatar.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$73 = [
- "src",
- "alt",
- "srcset"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/src/avatar2.mjs
- var avatar_default = /* @__PURE__ */ defineComponent({
- name: "ElAvatar",
- __name: "avatar",
- props: avatarProps,
- emits: avatarEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const avatarGroupContext = inject(avatarGroupContextKey, void 0);
- const ns = useNamespace("avatar");
- const hasLoadError = ref(false);
- const size = computed(() => props.size ?? avatarGroupContext?.size);
- const shape = computed(() => props.shape ?? avatarGroupContext?.shape ?? "circle");
- const avatarClass = computed(() => {
- const { icon } = props;
- const classList = [ns.b()];
- if (isString(size.value)) classList.push(ns.m(size.value));
- if (icon) classList.push(ns.m("icon"));
- if (shape.value) classList.push(ns.m(shape.value));
- return classList;
- });
- const sizeStyle = computed(() => {
- return isNumber(size.value) ? ns.cssVarBlock({ size: addUnit(size.value) }) : void 0;
- });
- const fitStyle = computed(() => ({ objectFit: props.fit }));
- watch(() => [props.src, props.srcSet], () => hasLoadError.value = false);
- function handleError(e) {
- hasLoadError.value = true;
- emit("error", e);
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", {
- class: normalizeClass(avatarClass.value),
- style: normalizeStyle(sizeStyle.value)
- }, [(__props.src || __props.srcSet) && !hasLoadError.value ? (openBlock(), createElementBlock("img", {
- key: 0,
- src: __props.src,
- alt: __props.alt,
- srcset: __props.srcSet,
- style: normalizeStyle(fitStyle.value),
- onError: handleError
- }, null, 44, _hoisted_1$73)) : __props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- })) : renderSlot(_ctx.$slots, "default", { key: 2 })], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/src/avatar-group.mjs
- var avatar_group_default = /* @__PURE__ */ defineComponent({
- name: "ElAvatarGroup",
- props: avatarGroupProps,
- setup(props, { slots }) {
- const ns = useNamespace("avatar-group");
- provide(avatarGroupContextKey, reactive({
- size: toRef(props, "size"),
- shape: toRef(props, "shape")
- }));
- return () => {
- const avatars = flattedChildren(slots.default?.() ?? []);
- let visibleAvatars = avatars;
- if (props.collapseAvatars && avatars.length > props.maxCollapseAvatars) {
- visibleAvatars = avatars.slice(0, props.maxCollapseAvatars);
- const hiddenAvatars = avatars.slice(props.maxCollapseAvatars);
- visibleAvatars.push(createVNode(ElTooltip, {
- "popperClass": props.popperClass,
- "popperStyle": props.popperStyle,
- "placement": props.placement,
- "effect": props.effect,
- "disabled": !props.collapseAvatarsTooltip
- }, {
- default: () => createVNode(avatar_default, {
- "size": props.size,
- "shape": props.shape,
- "class": props.collapseClass,
- "style": props.collapseStyle
- }, { default: () => [createTextVNode("+ "), hiddenAvatars.length] }),
- content: () => createVNode("div", { "class": ns.e("collapse-avatars") }, [hiddenAvatars.map((node, idx) => isVNode(node) ? cloneVNode(node, { key: node.key ?? idx }) : node)])
- }));
- }
- return createVNode("div", { "class": ns.b() }, [visibleAvatars]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/avatar/index.mjs
- var ElAvatar = withInstall(avatar_default, { AvatarGroup: avatar_group_default });
- var ElAvatarGroup = withNoopInstall(avatar_group_default);
- //#endregion
- //#region node_modules/element-plus/es/components/backtop/src/backtop.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `BacktopProps` instead.
- */
- var backtopProps = {
- visibilityHeight: {
- type: Number,
- default: 200
- },
- target: {
- type: String,
- default: ""
- },
- right: {
- type: Number,
- default: 40
- },
- bottom: {
- type: Number,
- default: 40
- }
- };
- var backtopEmits = { click: (evt) => evt instanceof MouseEvent };
- //#endregion
- //#region node_modules/element-plus/es/components/backtop/src/use-backtop.mjs
- var useBackTop = (props, emit, componentName) => {
- const el = shallowRef();
- const container = shallowRef();
- const visible = ref(false);
- const handleScroll = () => {
- if (el.value) visible.value = el.value.scrollTop >= props.visibilityHeight;
- };
- const handleClick = (event) => {
- el.value?.scrollTo({
- top: 0,
- behavior: "smooth"
- });
- emit("click", event);
- };
- useEventListener(container, "scroll", useThrottleFn(handleScroll, 300, true));
- onMounted(() => {
- container.value = document;
- el.value = document.documentElement;
- if (props.target) {
- el.value = document.querySelector(props.target) ?? void 0;
- if (!el.value) throwError(componentName, `target does not exist: ${props.target}`);
- container.value = el.value;
- }
- handleScroll();
- });
- return {
- visible,
- handleClick
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/backtop/src/backtop.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$15 = "ElBacktop";
- //#endregion
- //#region node_modules/element-plus/es/components/backtop/index.mjs
- var ElBacktop = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$15,
- __name: "backtop",
- props: backtopProps,
- emits: backtopEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("backtop");
- const { handleClick, visible } = useBackTop(props, emit, COMPONENT_NAME$15);
- const backTopStyle = computed(() => ({
- right: `${props.right}px`,
- bottom: `${props.bottom}px`
- }));
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, { name: `${unref(ns).namespace.value}-fade-in` }, {
- default: withCtx(() => [unref(visible) ? (openBlock(), createElementBlock("div", {
- key: 0,
- style: normalizeStyle(backTopStyle.value),
- class: normalizeClass(unref(ns).b()),
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => unref(handleClick) && unref(handleClick)(...args), ["stop"]))
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("icon")) }, {
- default: withCtx(() => [createVNode(unref(caret_top_default))]),
- _: 1
- }, 8, ["class"])])], 6)) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, ["name"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/badge/src/badge.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `BadgeProps` instead.
- */
- var badgeProps = buildProps({
- value: {
- type: [String, Number],
- default: ""
- },
- max: {
- type: Number,
- default: 99
- },
- isDot: Boolean,
- hidden: Boolean,
- type: {
- type: String,
- values: [
- "primary",
- "success",
- "warning",
- "info",
- "danger"
- ],
- default: "danger"
- },
- showZero: {
- type: Boolean,
- default: true
- },
- color: String,
- badgeStyle: { type: definePropType([
- String,
- Object,
- Array
- ]) },
- offset: {
- type: definePropType(Array),
- default: () => [0, 0]
- },
- badgeClass: { type: String }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/badge/index.mjs
- var ElBadge = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElBadge",
- __name: "badge",
- props: badgeProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const ns = useNamespace("badge");
- const content = computed(() => {
- if (props.isDot) return "";
- if (isNumber(props.value) && isNumber(props.max)) return props.max < props.value ? `${props.max}+` : `${props.value}`;
- return `${props.value}`;
- });
- const style = computed(() => {
- return [{
- backgroundColor: props.color,
- marginRight: addUnit(-props.offset[0]),
- marginTop: addUnit(props.offset[1])
- }, props.badgeStyle ?? {}];
- });
- __expose({ content });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [renderSlot(_ctx.$slots, "default"), createVNode(Transition, { name: `${unref(ns).namespace.value}-zoom-in-center` }, {
- default: withCtx(() => [!__props.hidden && (content.value || __props.isDot || _ctx.$slots.content) ? (openBlock(), createElementBlock("sup", {
- key: 0,
- class: normalizeClass([
- unref(ns).e("content"),
- unref(ns).em("content", __props.type),
- unref(ns).is("fixed", !!_ctx.$slots.default),
- unref(ns).is("dot", __props.isDot),
- unref(ns).is("hide-zero", !__props.showZero && __props.value === 0),
- __props.badgeClass
- ]),
- style: normalizeStyle(style.value)
- }, [renderSlot(_ctx.$slots, "content", { value: content.value }, () => [createTextVNode(toDisplayString(content.value), 1)])], 6)) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, ["name"])], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `BreadcrumbProps` instead.
- */
- var breadcrumbProps = buildProps({
- separator: {
- type: String,
- default: "/"
- },
- separatorIcon: { type: iconPropType }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/src/constants.mjs
- var breadcrumbKey = Symbol("breadcrumbKey");
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `BreadcrumbItemProps` instead.
- */
- var breadcrumbItemProps = buildProps({
- to: {
- type: definePropType([String, Object]),
- default: ""
- },
- replace: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$72 = ["aria-label"];
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb2.mjs
- var breadcrumb_default = /* @__PURE__ */ defineComponent({
- name: "ElBreadcrumb",
- __name: "breadcrumb",
- props: breadcrumbProps,
- setup(__props) {
- const { t } = useLocale();
- const props = __props;
- const ns = useNamespace("breadcrumb");
- const breadcrumb = ref();
- provide(breadcrumbKey, props);
- onMounted(() => {
- const items = breadcrumb.value.querySelectorAll(`.${ns.e("item")}`);
- if (items.length) items[items.length - 1].setAttribute("aria-current", "page");
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "breadcrumb",
- ref: breadcrumb,
- class: normalizeClass(unref(ns).b()),
- "aria-label": unref(t)("el.breadcrumb.label"),
- role: "navigation"
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$72);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/src/breadcrumb-item2.mjs
- var breadcrumb_item_default = /* @__PURE__ */ defineComponent({
- name: "ElBreadcrumbItem",
- __name: "breadcrumb-item",
- props: breadcrumbItemProps,
- setup(__props) {
- const props = __props;
- const instance = getCurrentInstance();
- const breadcrumbContext = inject(breadcrumbKey, void 0);
- const ns = useNamespace("breadcrumb");
- const router = instance.appContext.config.globalProperties.$router;
- const onClick = () => {
- if (!props.to || !router) return;
- props.replace ? router.replace(props.to) : router.push(props.to);
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("item")) }, [createBaseVNode("span", {
- class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!__props.to)]),
- role: "link",
- onClick
- }, [renderSlot(_ctx.$slots, "default")], 2), unref(breadcrumbContext)?.separatorIcon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(ns).e("separator"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(breadcrumbContext).separatorIcon)))]),
- _: 1
- }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
- key: 1,
- class: normalizeClass(unref(ns).e("separator")),
- role: "presentation"
- }, toDisplayString(unref(breadcrumbContext)?.separator), 3))], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/breadcrumb/index.mjs
- var ElBreadcrumb = withInstall(breadcrumb_default, { BreadcrumbItem: breadcrumb_item_default });
- var ElBreadcrumbItem = withNoopInstall(breadcrumb_item_default);
- //#endregion
- //#region node_modules/element-plus/es/components/button/src/button.mjs
- var buttonTypes = [
- "default",
- "primary",
- "success",
- "warning",
- "info",
- "danger",
- "text",
- ""
- ];
- var buttonNativeTypes = [
- "button",
- "submit",
- "reset"
- ];
- /**
- * @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
- */
- var buttonProps = buildProps({
- size: useSizeProp,
- disabled: {
- type: Boolean,
- default: void 0
- },
- type: {
- type: String,
- values: buttonTypes,
- default: ""
- },
- icon: { type: iconPropType },
- nativeType: {
- type: String,
- values: buttonNativeTypes,
- default: "button"
- },
- loading: Boolean,
- loadingIcon: {
- type: iconPropType,
- default: () => loading_default
- },
- plain: {
- type: Boolean,
- default: void 0
- },
- text: {
- type: Boolean,
- default: void 0
- },
- link: Boolean,
- bg: Boolean,
- autofocus: Boolean,
- round: {
- type: Boolean,
- default: void 0
- },
- circle: Boolean,
- dashed: {
- type: Boolean,
- default: void 0
- },
- color: String,
- dark: Boolean,
- autoInsertSpace: {
- type: Boolean,
- default: void 0
- },
- tag: {
- type: definePropType([String, Object]),
- default: "button"
- }
- });
- var buttonEmits = { click: (evt) => evt instanceof MouseEvent };
- //#endregion
- //#region node_modules/element-plus/es/components/config-provider/src/constants.mjs
- var configProviderContextKey = Symbol();
- //#endregion
- //#region node_modules/element-plus/es/components/config-provider/src/hooks/use-global-config.mjs
- var globalConfig = ref();
- function useGlobalConfig(key, defaultValue = void 0) {
- const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
- if (key) return computed(() => config.value?.[key] ?? defaultValue);
- else return config;
- }
- function useGlobalComponentSettings(block, sizeFallback) {
- const config = useGlobalConfig();
- const ns = useNamespace(block, computed(() => config.value?.namespace || "el"));
- const locale = useLocale(computed(() => config.value?.locale));
- const zIndex = useZIndex(computed(() => config.value?.zIndex || 2e3));
- const size = computed(() => unref(sizeFallback) || config.value?.size || "");
- provideGlobalConfig(computed(() => unref(config) || {}));
- return {
- ns,
- locale,
- zIndex,
- size
- };
- }
- var provideGlobalConfig = (config, app, global = false) => {
- const inSetup = !!getCurrentInstance();
- const oldConfig = inSetup ? useGlobalConfig() : void 0;
- const provideFn = app?.provide ?? (inSetup ? provide : void 0);
- if (!provideFn) {
- debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
- return;
- }
- const context = computed(() => {
- const cfg = unref(config);
- if (!oldConfig?.value) return cfg;
- return mergeConfig(oldConfig.value, cfg);
- });
- provideFn(configProviderContextKey, context);
- provideFn(localeContextKey, computed(() => context.value.locale));
- provideFn(namespaceContextKey, computed(() => context.value.namespace));
- provideFn(zIndexContextKey, computed(() => context.value.zIndex));
- provideFn(SIZE_INJECTION_KEY, { size: computed(() => context.value.size || "") });
- provideFn(emptyValuesContextKey, computed(() => ({
- emptyValues: context.value.emptyValues,
- valueOnClear: context.value.valueOnClear
- })));
- if (global || !globalConfig.value) globalConfig.value = context.value;
- return context;
- };
- var mergeConfig = (a, b) => {
- const keys = [...new Set([...keysOf(a), ...keysOf(b)])];
- const obj = {};
- for (const key of keys) obj[key] = b[key] !== void 0 ? b[key] : a[key];
- return obj;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/config-provider/src/config-provider-props.mjs
- var configProviderProps = buildProps({
- a11y: {
- type: Boolean,
- default: true
- },
- locale: { type: definePropType(Object) },
- size: useSizeProp,
- button: { type: definePropType(Object) },
- card: { type: definePropType(Object) },
- dialog: { type: definePropType(Object) },
- link: { type: definePropType(Object) },
- experimentalFeatures: { type: definePropType(Object) },
- keyboardNavigation: {
- type: Boolean,
- default: true
- },
- message: { type: definePropType(Object) },
- zIndex: Number,
- namespace: {
- type: String,
- default: "el"
- },
- table: { type: definePropType(Object) },
- ...useEmptyValuesProps
- });
- //#endregion
- //#region node_modules/element-plus/es/components/config-provider/src/config-provider.mjs
- var messageConfig = { placement: "top" };
- //#endregion
- //#region node_modules/element-plus/es/components/config-provider/index.mjs
- var ElConfigProvider = withInstall(defineComponent({
- name: "ElConfigProvider",
- props: configProviderProps,
- setup(props, { slots }) {
- const config = provideGlobalConfig(props);
- watch(() => props.message, (val) => {
- Object.assign(messageConfig, config?.value?.message ?? {}, val ?? {});
- }, {
- immediate: true,
- deep: true
- });
- return () => renderSlot(slots, "default", { config: config?.value });
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/button/src/constants.mjs
- var buttonGroupContextKey = Symbol("buttonGroupContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/button/src/use-button.mjs
- var useButton = (props, emit) => {
- useDeprecated({
- from: "type.text",
- replacement: "link",
- version: "3.0.0",
- scope: "props",
- ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
- }, computed(() => props.type === "text"));
- const buttonGroupContext = inject(buttonGroupContextKey, void 0);
- const globalConfig = useGlobalConfig("button");
- const { form } = useFormItem();
- const _size = useFormSize(computed(() => buttonGroupContext?.size));
- const _disabled = useFormDisabled();
- const _ref = ref();
- const slots = useSlots();
- const _type = computed(() => props.type || buttonGroupContext?.type || globalConfig.value?.type || "");
- const autoInsertSpace = computed(() => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false);
- const _plain = computed(() => props.plain ?? globalConfig.value?.plain ?? false);
- const _round = computed(() => props.round ?? globalConfig.value?.round ?? false);
- const _text = computed(() => props.text ?? globalConfig.value?.text ?? false);
- const _dashed = computed(() => props.dashed ?? globalConfig.value?.dashed ?? false);
- const _props = computed(() => {
- if (props.tag === "button") return {
- ariaDisabled: _disabled.value || props.loading,
- disabled: _disabled.value || props.loading,
- autofocus: props.autofocus,
- type: props.nativeType
- };
- return {};
- });
- const shouldAddSpace = computed(() => {
- const defaultSlot = slots.default?.();
- if (autoInsertSpace.value && defaultSlot?.length === 1) {
- const slot = defaultSlot[0];
- if (slot?.type === Text) {
- const text = slot.children;
- return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
- }
- }
- return false;
- });
- const handleClick = (evt) => {
- if (_disabled.value || props.loading) {
- evt.stopPropagation();
- return;
- }
- if (props.nativeType === "reset") form?.resetFields();
- emit("click", evt);
- };
- return {
- _disabled,
- _size,
- _type,
- _ref,
- _props,
- _plain,
- _round,
- _text,
- _dashed,
- shouldAddSpace,
- handleClick
- };
- };
- //#endregion
- //#region node_modules/@ctrl/tinycolor/dist/module/util.js
- /**
- * Take input from [0, n] and return it as [0, 1]
- * @hidden
- */
- function bound01(n, max) {
- if (isOnePointZero(n)) n = "100%";
- const isPercent = isPercentage(n);
- n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
- if (isPercent) n = parseInt(String(n * max), 10) / 100;
- if (Math.abs(n - max) < 1e-6) return 1;
- if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
- else n = n % max / parseFloat(String(max));
- return n;
- }
- /**
- * Force a number between 0 and 1
- * @hidden
- */
- function clamp01(val) {
- return Math.min(1, Math.max(0, val));
- }
- /**
- * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
- * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
- * @hidden
- */
- function isOnePointZero(n) {
- return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
- }
- /**
- * Check to see if string passed in is a percentage
- * @hidden
- */
- function isPercentage(n) {
- return typeof n === "string" && n.indexOf("%") !== -1;
- }
- /**
- * Return a valid alpha value [0,1] with all invalid values being set to 1
- * @hidden
- */
- function boundAlpha(a) {
- a = parseFloat(a);
- if (isNaN(a) || a < 0 || a > 1) a = 1;
- return a;
- }
- /**
- * Replace a decimal with it's percentage value
- * @hidden
- */
- function convertToPercentage(n) {
- if (Number(n) <= 1) return `${Number(n) * 100}%`;
- return n;
- }
- /**
- * Force a hex value to have 2 characters
- * @hidden
- */
- function pad2(c) {
- return c.length === 1 ? "0" + c : String(c);
- }
- //#endregion
- //#region node_modules/@ctrl/tinycolor/dist/module/conversion.js
- /**
- * Handle bounds / percentage checking to conform to CSS color spec
- * <http://www.w3.org/TR/css3-color/>
- * *Assumes:* r, g, b in [0, 255] or [0, 1]
- * *Returns:* { r, g, b } in [0, 255]
- */
- function rgbToRgb(r, g, b) {
- return {
- r: bound01(r, 255) * 255,
- g: bound01(g, 255) * 255,
- b: bound01(b, 255) * 255
- };
- }
- /**
- * Converts an RGB color value to HSL.
- * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
- * *Returns:* { h, s, l } in [0,1]
- */
- function rgbToHsl(r, g, b) {
- r = bound01(r, 255);
- g = bound01(g, 255);
- b = bound01(b, 255);
- const max = Math.max(r, g, b);
- const min = Math.min(r, g, b);
- let h = 0;
- let s = 0;
- const l = (max + min) / 2;
- if (max === min) {
- s = 0;
- h = 0;
- } else {
- const d = max - min;
- s = l > .5 ? d / (2 - max - min) : d / (max + min);
- switch (max) {
- case r:
- h = (g - b) / d + (g < b ? 6 : 0);
- break;
- case g:
- h = (b - r) / d + 2;
- break;
- case b:
- h = (r - g) / d + 4;
- break;
- default: break;
- }
- h /= 6;
- }
- return {
- h,
- s,
- l
- };
- }
- function hue2rgb(p, q, t) {
- if (t < 0) t += 1;
- if (t > 1) t -= 1;
- if (t < 1 / 6) return p + (q - p) * (6 * t);
- if (t < 1 / 2) return q;
- if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
- return p;
- }
- /**
- * Converts an HSL color value to RGB.
- *
- * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
- * *Returns:* { r, g, b } in the set [0, 255]
- */
- function hslToRgb(h, s, l) {
- let r;
- let g;
- let b;
- h = bound01(h, 360);
- s = bound01(s, 100);
- l = bound01(l, 100);
- if (s === 0) {
- g = l;
- b = l;
- r = l;
- } else {
- const q = l < .5 ? l * (1 + s) : l + s - l * s;
- const p = 2 * l - q;
- r = hue2rgb(p, q, h + 1 / 3);
- g = hue2rgb(p, q, h);
- b = hue2rgb(p, q, h - 1 / 3);
- }
- return {
- r: r * 255,
- g: g * 255,
- b: b * 255
- };
- }
- /**
- * Converts an RGB color value to HSV
- *
- * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
- * *Returns:* { h, s, v } in [0,1]
- */
- function rgbToHsv(r, g, b) {
- r = bound01(r, 255);
- g = bound01(g, 255);
- b = bound01(b, 255);
- const max = Math.max(r, g, b);
- const min = Math.min(r, g, b);
- let h = 0;
- const v = max;
- const d = max - min;
- const s = max === 0 ? 0 : d / max;
- if (max === min) h = 0;
- else {
- switch (max) {
- case r:
- h = (g - b) / d + (g < b ? 6 : 0);
- break;
- case g:
- h = (b - r) / d + 2;
- break;
- case b:
- h = (r - g) / d + 4;
- break;
- default: break;
- }
- h /= 6;
- }
- return {
- h,
- s,
- v
- };
- }
- /**
- * Converts an HSV color value to RGB.
- *
- * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
- * *Returns:* { r, g, b } in the set [0, 255]
- */
- function hsvToRgb(h, s, v) {
- h = bound01(h, 360) * 6;
- s = bound01(s, 100);
- v = bound01(v, 100);
- const i = Math.floor(h);
- const f = h - i;
- const p = v * (1 - s);
- const q = v * (1 - f * s);
- const t = v * (1 - (1 - f) * s);
- const mod = i % 6;
- const r = [
- v,
- q,
- p,
- p,
- t,
- v
- ][mod];
- const g = [
- t,
- v,
- v,
- q,
- p,
- p
- ][mod];
- const b = [
- p,
- p,
- t,
- v,
- v,
- q
- ][mod];
- return {
- r: r * 255,
- g: g * 255,
- b: b * 255
- };
- }
- /**
- * Converts an RGB color to hex
- *
- * *Assumes:* r, g, and b are contained in the set [0, 255]
- * *Returns:* a 3 or 6 character hex
- */
- function rgbToHex(r, g, b, allow3Char) {
- const hex = [
- pad2(Math.round(r).toString(16)),
- pad2(Math.round(g).toString(16)),
- pad2(Math.round(b).toString(16))
- ];
- if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
- return hex.join("");
- }
- /**
- * Converts an RGBA color plus alpha transparency to hex
- *
- * *Assumes:* r, g, b are contained in the set [0, 255] and a in [0, 1]
- * *Returns:* a 4 or 8 character rgba hex
- */
- function rgbaToHex(r, g, b, a, allow4Char) {
- const hex = [
- pad2(Math.round(r).toString(16)),
- pad2(Math.round(g).toString(16)),
- pad2(Math.round(b).toString(16)),
- pad2(convertDecimalToHex(a))
- ];
- if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
- return hex.join("");
- }
- /**
- * Converts CMYK to RBG
- * Assumes c, m, y, k are in the set [0, 100]
- */
- function cmykToRgb(c, m, y, k) {
- const cConv = c / 100;
- const mConv = m / 100;
- const yConv = y / 100;
- const kConv = k / 100;
- return {
- r: 255 * (1 - cConv) * (1 - kConv),
- g: 255 * (1 - mConv) * (1 - kConv),
- b: 255 * (1 - yConv) * (1 - kConv)
- };
- }
- function rgbToCmyk(r, g, b) {
- let c = 1 - r / 255;
- let m = 1 - g / 255;
- let y = 1 - b / 255;
- let k = Math.min(c, m, y);
- if (k === 1) {
- c = 0;
- m = 0;
- y = 0;
- } else {
- c = (c - k) / (1 - k) * 100;
- m = (m - k) / (1 - k) * 100;
- y = (y - k) / (1 - k) * 100;
- }
- k *= 100;
- return {
- c: Math.round(c),
- m: Math.round(m),
- y: Math.round(y),
- k: Math.round(k)
- };
- }
- /** Converts a decimal to a hex value */
- function convertDecimalToHex(d) {
- return Math.round(parseFloat(d) * 255).toString(16);
- }
- /** Converts a hex value to a decimal */
- function convertHexToDecimal(h) {
- return parseIntFromHex(h) / 255;
- }
- /** Parse a base-16 hex value into a base-10 integer */
- function parseIntFromHex(val) {
- return parseInt(val, 16);
- }
- function numberInputToObject(color) {
- return {
- r: color >> 16,
- g: (color & 65280) >> 8,
- b: color & 255
- };
- }
- //#endregion
- //#region node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
- /**
- * @hidden
- */
- var names = {
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- goldenrod: "#daa520",
- gold: "#ffd700",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavenderblush: "#fff0f5",
- lavender: "#e6e6fa",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- rebeccapurple: "#663399",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- };
- //#endregion
- //#region node_modules/@ctrl/tinycolor/dist/module/format-input.js
- /**
- * Given a string or object, convert that input to RGB
- *
- * Possible string inputs:
- * ```
- * "red"
- * "#f00" or "f00"
- * "#ff0000" or "ff0000"
- * "#ff000000" or "ff000000"
- * "rgb 255 0 0" or "rgb (255, 0, 0)"
- * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
- * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
- * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
- * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
- * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
- * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
- * "cmyk(0, 20, 0, 0)" or "cmyk 0 20 0 0"
- * ```
- */
- function inputToRGB(color) {
- let rgb = {
- r: 0,
- g: 0,
- b: 0
- };
- let a = 1;
- let s = null;
- let v = null;
- let l = null;
- let ok = false;
- let format = false;
- if (typeof color === "string") color = stringInputToObject(color);
- if (typeof color === "object") {
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
- rgb = rgbToRgb(color.r, color.g, color.b);
- ok = true;
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
- s = convertToPercentage(color.s);
- v = convertToPercentage(color.v);
- rgb = hsvToRgb(color.h, s, v);
- ok = true;
- format = "hsv";
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
- s = convertToPercentage(color.s);
- l = convertToPercentage(color.l);
- rgb = hslToRgb(color.h, s, l);
- ok = true;
- format = "hsl";
- } else if (isValidCSSUnit(color.c) && isValidCSSUnit(color.m) && isValidCSSUnit(color.y) && isValidCSSUnit(color.k)) {
- rgb = cmykToRgb(color.c, color.m, color.y, color.k);
- ok = true;
- format = "cmyk";
- }
- if (Object.prototype.hasOwnProperty.call(color, "a")) a = color.a;
- }
- a = boundAlpha(a);
- return {
- ok,
- format: color.format || format,
- r: Math.min(255, Math.max(rgb.r, 0)),
- g: Math.min(255, Math.max(rgb.g, 0)),
- b: Math.min(255, Math.max(rgb.b, 0)),
- a
- };
- }
- var CSS_UNIT = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)";
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?";
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?";
- var matchers = {
- CSS_UNIT: new RegExp(CSS_UNIT),
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
- cmyk: new RegExp("cmyk" + PERMISSIVE_MATCH4),
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
- };
- /**
- * Permissive string parsing. Take in a number of formats, and output an object
- * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` or `{c, m, y, k}` or `{c, m, y, k, a}`
- */
- function stringInputToObject(color) {
- color = color.trim().toLowerCase();
- if (color.length === 0) return false;
- let named = false;
- if (names[color]) {
- color = names[color];
- named = true;
- } else if (color === "transparent") return {
- r: 0,
- g: 0,
- b: 0,
- a: 0,
- format: "name"
- };
- let match = matchers.rgb.exec(color);
- if (match) return {
- r: match[1],
- g: match[2],
- b: match[3]
- };
- match = matchers.rgba.exec(color);
- if (match) return {
- r: match[1],
- g: match[2],
- b: match[3],
- a: match[4]
- };
- match = matchers.hsl.exec(color);
- if (match) return {
- h: match[1],
- s: match[2],
- l: match[3]
- };
- match = matchers.hsla.exec(color);
- if (match) return {
- h: match[1],
- s: match[2],
- l: match[3],
- a: match[4]
- };
- match = matchers.hsv.exec(color);
- if (match) return {
- h: match[1],
- s: match[2],
- v: match[3]
- };
- match = matchers.hsva.exec(color);
- if (match) return {
- h: match[1],
- s: match[2],
- v: match[3],
- a: match[4]
- };
- match = matchers.cmyk.exec(color);
- if (match) return {
- c: match[1],
- m: match[2],
- y: match[3],
- k: match[4]
- };
- match = matchers.hex8.exec(color);
- if (match) return {
- r: parseIntFromHex(match[1]),
- g: parseIntFromHex(match[2]),
- b: parseIntFromHex(match[3]),
- a: convertHexToDecimal(match[4]),
- format: named ? "name" : "hex8"
- };
- match = matchers.hex6.exec(color);
- if (match) return {
- r: parseIntFromHex(match[1]),
- g: parseIntFromHex(match[2]),
- b: parseIntFromHex(match[3]),
- format: named ? "name" : "hex"
- };
- match = matchers.hex4.exec(color);
- if (match) return {
- r: parseIntFromHex(match[1] + match[1]),
- g: parseIntFromHex(match[2] + match[2]),
- b: parseIntFromHex(match[3] + match[3]),
- a: convertHexToDecimal(match[4] + match[4]),
- format: named ? "name" : "hex8"
- };
- match = matchers.hex3.exec(color);
- if (match) return {
- r: parseIntFromHex(match[1] + match[1]),
- g: parseIntFromHex(match[2] + match[2]),
- b: parseIntFromHex(match[3] + match[3]),
- format: named ? "name" : "hex"
- };
- return false;
- }
- /**
- * Check to see if it looks like a CSS unit
- * (see `matchers` above for definition).
- */
- function isValidCSSUnit(color) {
- if (typeof color === "number") return !Number.isNaN(color);
- return matchers.CSS_UNIT.test(color);
- }
- //#endregion
- //#region node_modules/@ctrl/tinycolor/dist/module/index.js
- var TinyColor = class TinyColor {
- constructor(color = "", opts = {}) {
- if (color instanceof TinyColor) return color;
- if (typeof color === "number") color = numberInputToObject(color);
- this.originalInput = color;
- const rgb = inputToRGB(color);
- this.originalInput = color;
- this.r = rgb.r;
- this.g = rgb.g;
- this.b = rgb.b;
- this.a = rgb.a;
- this.roundA = Math.round(100 * this.a) / 100;
- this.format = opts.format ?? rgb.format;
- this.gradientType = opts.gradientType;
- if (this.r < 1) this.r = Math.round(this.r);
- if (this.g < 1) this.g = Math.round(this.g);
- if (this.b < 1) this.b = Math.round(this.b);
- this.isValid = rgb.ok;
- }
- isDark() {
- return this.getBrightness() < 128;
- }
- isLight() {
- return !this.isDark();
- }
- /**
- * Returns the perceived brightness of the color, from 0-255.
- */
- getBrightness() {
- const rgb = this.toRgb();
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
- }
- /**
- * Returns the perceived luminance of a color, from 0-1.
- */
- getLuminance() {
- const rgb = this.toRgb();
- let R;
- let G;
- let B;
- const RsRGB = rgb.r / 255;
- const GsRGB = rgb.g / 255;
- const BsRGB = rgb.b / 255;
- if (RsRGB <= .03928) R = RsRGB / 12.92;
- else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
- if (GsRGB <= .03928) G = GsRGB / 12.92;
- else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
- if (BsRGB <= .03928) B = BsRGB / 12.92;
- else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
- return .2126 * R + .7152 * G + .0722 * B;
- }
- /**
- * Returns the alpha value of a color, from 0-1.
- */
- getAlpha() {
- return this.a;
- }
- /**
- * Sets the alpha value on the current color.
- *
- * @param alpha - The new alpha value. The accepted range is 0-1.
- */
- setAlpha(alpha) {
- this.a = boundAlpha(alpha);
- this.roundA = Math.round(100 * this.a) / 100;
- return this;
- }
- /**
- * Returns whether the color is monochrome.
- */
- isMonochrome() {
- const { s } = this.toHsl();
- return s === 0;
- }
- /**
- * Returns the object as a HSVA object.
- */
- toHsv() {
- const hsv = rgbToHsv(this.r, this.g, this.b);
- return {
- h: hsv.h * 360,
- s: hsv.s,
- v: hsv.v,
- a: this.a
- };
- }
- /**
- * Returns the hsva values interpolated into a string with the following format:
- * "hsva(xxx, xxx, xxx, xx)".
- */
- toHsvString() {
- const hsv = rgbToHsv(this.r, this.g, this.b);
- const h = Math.round(hsv.h * 360);
- const s = Math.round(hsv.s * 100);
- const v = Math.round(hsv.v * 100);
- return this.a === 1 ? `hsv(${h}, ${s}%, ${v}%)` : `hsva(${h}, ${s}%, ${v}%, ${this.roundA})`;
- }
- /**
- * Returns the object as a HSLA object.
- */
- toHsl() {
- const hsl = rgbToHsl(this.r, this.g, this.b);
- return {
- h: hsl.h * 360,
- s: hsl.s,
- l: hsl.l,
- a: this.a
- };
- }
- /**
- * Returns the hsla values interpolated into a string with the following format:
- * "hsla(xxx, xxx, xxx, xx)".
- */
- toHslString() {
- const hsl = rgbToHsl(this.r, this.g, this.b);
- const h = Math.round(hsl.h * 360);
- const s = Math.round(hsl.s * 100);
- const l = Math.round(hsl.l * 100);
- return this.a === 1 ? `hsl(${h}, ${s}%, ${l}%)` : `hsla(${h}, ${s}%, ${l}%, ${this.roundA})`;
- }
- /**
- * Returns the hex value of the color.
- * @param allow3Char will shorten hex value to 3 char if possible
- */
- toHex(allow3Char = false) {
- return rgbToHex(this.r, this.g, this.b, allow3Char);
- }
- /**
- * Returns the hex value of the color -with a # prefixed.
- * @param allow3Char will shorten hex value to 3 char if possible
- */
- toHexString(allow3Char = false) {
- return "#" + this.toHex(allow3Char);
- }
- /**
- * Returns the hex 8 value of the color.
- * @param allow4Char will shorten hex value to 4 char if possible
- */
- toHex8(allow4Char = false) {
- return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
- }
- /**
- * Returns the hex 8 value of the color -with a # prefixed.
- * @param allow4Char will shorten hex value to 4 char if possible
- */
- toHex8String(allow4Char = false) {
- return "#" + this.toHex8(allow4Char);
- }
- /**
- * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
- * @param allowShortChar will shorten hex value to 3 or 4 char if possible
- */
- toHexShortString(allowShortChar = false) {
- return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
- }
- /**
- * Returns the object as a RGBA object.
- */
- toRgb() {
- return {
- r: Math.round(this.r),
- g: Math.round(this.g),
- b: Math.round(this.b),
- a: this.a
- };
- }
- /**
- * Returns the RGBA values interpolated into a string with the following format:
- * "RGBA(xxx, xxx, xxx, xx)".
- */
- toRgbString() {
- const r = Math.round(this.r);
- const g = Math.round(this.g);
- const b = Math.round(this.b);
- return this.a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${this.roundA})`;
- }
- /**
- * Returns the object as a RGBA object.
- */
- toPercentageRgb() {
- const fmt = (x) => `${Math.round(bound01(x, 255) * 100)}%`;
- return {
- r: fmt(this.r),
- g: fmt(this.g),
- b: fmt(this.b),
- a: this.a
- };
- }
- /**
- * Returns the RGBA relative values interpolated into a string
- */
- toPercentageRgbString() {
- const rnd = (x) => Math.round(bound01(x, 255) * 100);
- return this.a === 1 ? `rgb(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%)` : `rgba(${rnd(this.r)}%, ${rnd(this.g)}%, ${rnd(this.b)}%, ${this.roundA})`;
- }
- toCmyk() {
- return { ...rgbToCmyk(this.r, this.g, this.b) };
- }
- toCmykString() {
- const { c, m, y, k } = rgbToCmyk(this.r, this.g, this.b);
- return `cmyk(${c}, ${m}, ${y}, ${k})`;
- }
- /**
- * The 'real' name of the color -if there is one.
- */
- toName() {
- if (this.a === 0) return "transparent";
- if (this.a < 1) return false;
- const hex = "#" + rgbToHex(this.r, this.g, this.b, false);
- for (const [key, value] of Object.entries(names)) if (hex === value) return key;
- return false;
- }
- toString(format) {
- const formatSet = Boolean(format);
- format = format ?? this.format;
- let formattedString = false;
- const hasAlpha = this.a < 1 && this.a >= 0;
- if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
- if (format === "name" && this.a === 0) return this.toName();
- return this.toRgbString();
- }
- if (format === "rgb") formattedString = this.toRgbString();
- if (format === "prgb") formattedString = this.toPercentageRgbString();
- if (format === "hex" || format === "hex6") formattedString = this.toHexString();
- if (format === "hex3") formattedString = this.toHexString(true);
- if (format === "hex4") formattedString = this.toHex8String(true);
- if (format === "hex8") formattedString = this.toHex8String();
- if (format === "name") formattedString = this.toName();
- if (format === "hsl") formattedString = this.toHslString();
- if (format === "hsv") formattedString = this.toHsvString();
- if (format === "cmyk") formattedString = this.toCmykString();
- return formattedString || this.toHexString();
- }
- toNumber() {
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
- }
- clone() {
- return new TinyColor(this.toString());
- }
- /**
- * Lighten the color a given amount. Providing 100 will always return white.
- * @param amount - valid between 1-100
- */
- lighten(amount = 10) {
- const hsl = this.toHsl();
- hsl.l += amount / 100;
- hsl.l = clamp01(hsl.l);
- return new TinyColor(hsl);
- }
- /**
- * Brighten the color a given amount, from 0 to 100.
- * @param amount - valid between 1-100
- */
- brighten(amount = 10) {
- const rgb = this.toRgb();
- rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
- rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
- rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
- return new TinyColor(rgb);
- }
- /**
- * Darken the color a given amount, from 0 to 100.
- * Providing 100 will always return black.
- * @param amount - valid between 1-100
- */
- darken(amount = 10) {
- const hsl = this.toHsl();
- hsl.l -= amount / 100;
- hsl.l = clamp01(hsl.l);
- return new TinyColor(hsl);
- }
- /**
- * Mix the color with pure white, from 0 to 100.
- * Providing 0 will do nothing, providing 100 will always return white.
- * @param amount - valid between 1-100
- */
- tint(amount = 10) {
- return this.mix("white", amount);
- }
- /**
- * Mix the color with pure black, from 0 to 100.
- * Providing 0 will do nothing, providing 100 will always return black.
- * @param amount - valid between 1-100
- */
- shade(amount = 10) {
- return this.mix("black", amount);
- }
- /**
- * Desaturate the color a given amount, from 0 to 100.
- * Providing 100 will is the same as calling greyscale
- * @param amount - valid between 1-100
- */
- desaturate(amount = 10) {
- const hsl = this.toHsl();
- hsl.s -= amount / 100;
- hsl.s = clamp01(hsl.s);
- return new TinyColor(hsl);
- }
- /**
- * Saturate the color a given amount, from 0 to 100.
- * @param amount - valid between 1-100
- */
- saturate(amount = 10) {
- const hsl = this.toHsl();
- hsl.s += amount / 100;
- hsl.s = clamp01(hsl.s);
- return new TinyColor(hsl);
- }
- /**
- * Completely desaturates a color into greyscale.
- * Same as calling `desaturate(100)`
- */
- greyscale() {
- return this.desaturate(100);
- }
- /**
- * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
- * Values outside of this range will be wrapped into this range.
- */
- spin(amount) {
- const hsl = this.toHsl();
- const hue = (hsl.h + amount) % 360;
- hsl.h = hue < 0 ? 360 + hue : hue;
- return new TinyColor(hsl);
- }
- /**
- * Mix the current color a given amount with another color, from 0 to 100.
- * 0 means no mixing (return current color).
- */
- mix(color, amount = 50) {
- const rgb1 = this.toRgb();
- const rgb2 = new TinyColor(color).toRgb();
- const p = amount / 100;
- return new TinyColor({
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
- b: (rgb2.b - rgb1.b) * p + rgb1.b,
- a: (rgb2.a - rgb1.a) * p + rgb1.a
- });
- }
- analogous(results = 6, slices = 30) {
- const hsl = this.toHsl();
- const part = 360 / slices;
- const ret = [this];
- for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
- hsl.h = (hsl.h + part) % 360;
- ret.push(new TinyColor(hsl));
- }
- return ret;
- }
- /**
- * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
- */
- complement() {
- const hsl = this.toHsl();
- hsl.h = (hsl.h + 180) % 360;
- return new TinyColor(hsl);
- }
- monochromatic(results = 6) {
- const hsv = this.toHsv();
- const { h } = hsv;
- const { s } = hsv;
- let { v } = hsv;
- const res = [];
- const modification = 1 / results;
- while (results--) {
- res.push(new TinyColor({
- h,
- s,
- v
- }));
- v = (v + modification) % 1;
- }
- return res;
- }
- splitcomplement() {
- const hsl = this.toHsl();
- const { h } = hsl;
- return [
- this,
- new TinyColor({
- h: (h + 72) % 360,
- s: hsl.s,
- l: hsl.l
- }),
- new TinyColor({
- h: (h + 216) % 360,
- s: hsl.s,
- l: hsl.l
- })
- ];
- }
- /**
- * Compute how the color would appear on a background
- */
- onBackground(background) {
- const fg = this.toRgb();
- const bg = new TinyColor(background).toRgb();
- const alpha = fg.a + bg.a * (1 - fg.a);
- return new TinyColor({
- r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
- g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
- b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
- a: alpha
- });
- }
- /**
- * Alias for `polyad(3)`
- */
- triad() {
- return this.polyad(3);
- }
- /**
- * Alias for `polyad(4)`
- */
- tetrad() {
- return this.polyad(4);
- }
- /**
- * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
- * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
- */
- polyad(n) {
- const hsl = this.toHsl();
- const { h } = hsl;
- const result = [this];
- const increment = 360 / n;
- for (let i = 1; i < n; i++) result.push(new TinyColor({
- h: (h + i * increment) % 360,
- s: hsl.s,
- l: hsl.l
- }));
- return result;
- }
- /**
- * compare color vs current color
- */
- equals(color) {
- const comparedColor = new TinyColor(color);
- /**
- * RGB and CMYK do not have the same color gamut, so a CMYK conversion will never be 100%.
- * This means we need to compare CMYK to CMYK to ensure accuracy of the equals function.
- */
- if (this.format === "cmyk" || comparedColor.format === "cmyk") return this.toCmykString() === comparedColor.toCmykString();
- return this.toRgbString() === comparedColor.toRgbString();
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/button/src/button-custom.mjs
- function darken(color, amount = 20) {
- return color.mix("#141414", amount).toString();
- }
- function useButtonCustomStyle(props) {
- const _disabled = useFormDisabled();
- const ns = useNamespace("button");
- return computed(() => {
- let styles = {};
- let buttonColor = props.color;
- if (buttonColor) {
- const match = buttonColor.match(/var\((.*?)\)/);
- if (match) buttonColor = window.getComputedStyle(window.document.documentElement).getPropertyValue(match[1]);
- const color = new TinyColor(buttonColor);
- const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
- if (props.plain) {
- styles = ns.cssVarBlock({
- "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
- "text-color": buttonColor,
- "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
- "hover-text-color": `var(${ns.cssVarName("color-white")})`,
- "hover-bg-color": buttonColor,
- "hover-border-color": buttonColor,
- "active-bg-color": activeBgColor,
- "active-text-color": `var(${ns.cssVarName("color-white")})`,
- "active-border-color": activeBgColor
- });
- if (_disabled.value) {
- styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
- styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
- styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
- }
- } else {
- const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
- const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
- styles = ns.cssVarBlock({
- "bg-color": buttonColor,
- "text-color": textColor,
- "border-color": buttonColor,
- "hover-bg-color": hoverBgColor,
- "hover-text-color": textColor,
- "hover-border-color": hoverBgColor,
- "active-bg-color": activeBgColor,
- "active-border-color": activeBgColor
- });
- if (_disabled.value) {
- const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
- styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
- styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
- styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
- }
- }
- }
- return styles;
- });
- }
- //#endregion
- //#region node_modules/element-plus/es/components/button/src/button2.mjs
- var button_default$1 = /* @__PURE__ */ defineComponent({
- name: "ElButton",
- __name: "button",
- props: buttonProps,
- emits: buttonEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const buttonStyle = useButtonCustomStyle(props);
- const ns = useNamespace("button");
- const { _ref, _size, _type, _disabled, _props, _plain, _round, _text, _dashed, shouldAddSpace, handleClick } = useButton(props, emit);
- const buttonKls = computed(() => [
- ns.b(),
- ns.m(_type.value),
- ns.m(_size.value),
- ns.is("disabled", _disabled.value),
- ns.is("loading", props.loading),
- ns.is("plain", _plain.value),
- ns.is("round", _round.value),
- ns.is("circle", props.circle),
- ns.is("text", _text.value),
- ns.is("dashed", _dashed.value),
- ns.is("link", props.link),
- ns.is("has-bg", props.bg)
- ]);
- __expose({
- ref: _ref,
- size: _size,
- type: _type,
- disabled: _disabled,
- shouldAddSpace
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({
- ref_key: "_ref",
- ref: _ref
- }, unref(_props), {
- class: buttonKls.value,
- style: unref(buttonStyle),
- onClick: unref(handleClick)
- }), {
- default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass(unref(ns).is("loading"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.loadingIcon)))]),
- _: 1
- }, 8, ["class"]))], 64)) : __props.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
- default: withCtx(() => [__props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })]),
- _: 3
- })) : createCommentVNode("v-if", true), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
- key: 2,
- class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)]),
- _: 3
- }, 16, [
- "class",
- "style",
- "onClick"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/button/src/button-group2.mjs
- var button_group_default = /* @__PURE__ */ defineComponent({
- name: "ElButtonGroup",
- __name: "button-group",
- props: {
- size: buttonProps.size,
- type: buttonProps.type,
- direction: {
- type: definePropType(String),
- values: ["horizontal", "vertical"],
- default: "horizontal"
- }
- },
- setup(__props) {
- const props = __props;
- provide(buttonGroupContextKey, reactive({
- size: toRef(props, "size"),
- type: toRef(props, "type")
- }));
- const ns = useNamespace("button");
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("group"), unref(ns).bm("group", props.direction)]) }, [renderSlot(_ctx.$slots, "default")], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/button/index.mjs
- var ElButton = withInstall(button_default$1, { ButtonGroup: button_group_default });
- var ElButtonGroup = withNoopInstall(button_group_default);
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/calendar.mjs
- var isValidRange$1 = (range) => isArray$1(range) && range.length === 2 && range.every((item) => isDate(item));
- /**
- * @deprecated Removed after 3.0.0, Use `CalendarProps` instead.
- */
- var calendarProps = buildProps({
- modelValue: { type: Date },
- range: {
- type: definePropType(Array),
- validator: isValidRange$1
- },
- controllerType: {
- type: String,
- values: ["button", "select"],
- default: "button"
- },
- formatter: { type: definePropType(Function) }
- });
- var calendarEmits = {
- [UPDATE_MODEL_EVENT]: (value) => isDate(value),
- [INPUT_EVENT]: (value) => isDate(value)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/constants.mjs
- var timeUnits = [
- "hours",
- "minutes",
- "seconds"
- ];
- var PICKER_BASE_INJECTION_KEY = "EP_PICKER_BASE";
- var PICKER_POPPER_OPTIONS_INJECTION_KEY = "ElPopperOptions";
- var ROOT_COMMON_PICKER_INJECTION_KEY = Symbol("commonPickerContextKey");
- var DEFAULT_FORMATS_TIME = "HH:mm:ss";
- var DEFAULT_FORMATS_DATE = "YYYY-MM-DD";
- var DEFAULT_FORMATS_DATEPICKER = {
- date: DEFAULT_FORMATS_DATE,
- dates: DEFAULT_FORMATS_DATE,
- week: "gggg[w]ww",
- year: "YYYY",
- years: "YYYY",
- month: "YYYY-MM",
- months: "YYYY-MM",
- datetime: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,
- monthrange: "YYYY-MM",
- yearrange: "YYYY",
- daterange: DEFAULT_FORMATS_DATE,
- datetimerange: `${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/utils.mjs
- var import_dayjs_min = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(t, e) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
- })(exports, (function() {
- "use strict";
- var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = {
- name: "en",
- weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
- months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
- ordinal: function(t) {
- var e = [
- "th",
- "st",
- "nd",
- "rd"
- ], n = t % 100;
- return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
- }
- }, m = function(t, e, n) {
- var r = String(t);
- return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
- }, v = {
- s: m,
- z: function(t) {
- var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;
- return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
- },
- m: function t(e, n) {
- if (e.date() < n.date()) return -t(n, e);
- var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), i = e.clone().add(r, c), s = n - i < 0, u = e.clone().add(r + (s ? -1 : 1), c);
- return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
- },
- a: function(t) {
- return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
- },
- p: function(t) {
- return {
- M: c,
- y: h,
- w: o,
- d: a,
- D: d,
- h: u,
- m: s,
- s: i,
- ms: r,
- Q: f
- }[t] || String(t || "").toLowerCase().replace(/s$/, "");
- },
- u: function(t) {
- return void 0 === t;
- }
- }, g = "en", D = {};
- D[g] = M;
- var p = "$isDayjsObject", S = function(t) {
- return t instanceof _ || !(!t || !t[p]);
- }, w = function t(e, n, r) {
- var i;
- if (!e) return g;
- if ("string" == typeof e) {
- var s = e.toLowerCase();
- D[s] && (i = s), n && (D[s] = n, i = s);
- var u = e.split("-");
- if (!i && u.length > 1) return t(u[0]);
- } else {
- var a = e.name;
- D[a] = e, i = a;
- }
- return !r && i && (g = i), i || !r && g;
- }, O = function(t, e) {
- if (S(t)) return t.clone();
- var n = "object" == typeof e ? e : {};
- return n.date = t, n.args = arguments, new _(n);
- }, b = v;
- b.l = w, b.i = S, b.w = function(t, e) {
- return O(t, {
- locale: e.$L,
- utc: e.$u,
- x: e.$x,
- $offset: e.$offset
- });
- };
- var _ = function() {
- function M(t) {
- this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0;
- }
- var m = M.prototype;
- return m.parse = function(t) {
- this.$d = function(t) {
- var e = t.date, n = t.utc;
- if (null === e) return /* @__PURE__ */ new Date(NaN);
- if (b.u(e)) return /* @__PURE__ */ new Date();
- if (e instanceof Date) return new Date(e);
- if ("string" == typeof e && !/Z$/i.test(e)) {
- var r = e.match($);
- if (r) {
- var i = r[2] - 1 || 0, s = (r[7] || "0").substring(0, 3);
- return n ? new Date(Date.UTC(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s)) : new Date(r[1], i, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, s);
- }
- }
- return new Date(e);
- }(t), this.init();
- }, m.init = function() {
- var t = this.$d;
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
- }, m.$utils = function() {
- return b;
- }, m.isValid = function() {
- return !(this.$d.toString() === l);
- }, m.isSame = function(t, e) {
- var n = O(t);
- return this.startOf(e) <= n && n <= this.endOf(e);
- }, m.isAfter = function(t, e) {
- return O(t) < this.startOf(e);
- }, m.isBefore = function(t, e) {
- return this.endOf(e) < O(t);
- }, m.$g = function(t, e, n) {
- return b.u(t) ? this[e] : this.set(n, t);
- }, m.unix = function() {
- return Math.floor(this.valueOf() / 1e3);
- }, m.valueOf = function() {
- return this.$d.getTime();
- }, m.startOf = function(t, e) {
- var n = this, r = !!b.u(e) || e, f = b.p(t), l = function(t, e) {
- var i = b.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n);
- return r ? i : i.endOf(a);
- }, $ = function(t, e) {
- return b.w(n.toDate()[t].apply(n.toDate("s"), (r ? [
- 0,
- 0,
- 0,
- 0
- ] : [
- 23,
- 59,
- 59,
- 999
- ]).slice(e)), n);
- }, y = this.$W, M = this.$M, m = this.$D, v = "set" + (this.$u ? "UTC" : "");
- switch (f) {
- case h: return r ? l(1, 0) : l(31, 11);
- case c: return r ? l(1, M) : l(0, M + 1);
- case o:
- var g = this.$locale().weekStart || 0, D = (y < g ? y + 7 : y) - g;
- return l(r ? m - D : m + (6 - D), M);
- case a:
- case d: return $(v + "Hours", 0);
- case u: return $(v + "Minutes", 1);
- case s: return $(v + "Seconds", 2);
- case i: return $(v + "Milliseconds", 3);
- default: return this.clone();
- }
- }, m.endOf = function(t) {
- return this.startOf(t, !1);
- }, m.$set = function(t, e) {
- var n, o = b.p(t), f = "set" + (this.$u ? "UTC" : ""), l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[s] = f + "Minutes", n[i] = f + "Seconds", n[r] = f + "Milliseconds", n)[o], $ = o === a ? this.$D + (e - this.$W) : e;
- if (o === c || o === h) {
- var y = this.clone().set(d, 1);
- y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d;
- } else l && this.$d[l]($);
- return this.init(), this;
- }, m.set = function(t, e) {
- return this.clone().$set(t, e);
- }, m.get = function(t) {
- return this[b.p(t)]();
- }, m.add = function(r, f) {
- var d, l = this;
- r = Number(r);
- var $ = b.p(f), y = function(t) {
- var e = O(l);
- return b.w(e.date(e.date() + Math.round(t * r)), l);
- };
- if ($ === c) return this.set(c, this.$M + r);
- if ($ === h) return this.set(h, this.$y + r);
- if ($ === a) return y(1);
- if ($ === o) return y(7);
- var M = (d = {}, d[s] = e, d[u] = n, d[i] = t, d)[$] || 1, m = this.$d.getTime() + r * M;
- return b.w(m, this);
- }, m.subtract = function(t, e) {
- return this.add(-1 * t, e);
- }, m.format = function(t) {
- var e = this, n = this.$locale();
- if (!this.isValid()) return n.invalidDate || l;
- var r = t || "YYYY-MM-DDTHH:mm:ssZ", i = b.z(this), s = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function(t, n, i, s) {
- return t && (t[n] || t(e, r)) || i[n].slice(0, s);
- }, d = function(t) {
- return b.s(s % 12 || 12, t, "0");
- }, $ = f || function(t, e, n) {
- var r = t < 12 ? "AM" : "PM";
- return n ? r.toLowerCase() : r;
- };
- return r.replace(y, (function(t, r) {
- return r || function(t) {
- switch (t) {
- case "YY": return String(e.$y).slice(-2);
- case "YYYY": return b.s(e.$y, 4, "0");
- case "M": return a + 1;
- case "MM": return b.s(a + 1, 2, "0");
- case "MMM": return h(n.monthsShort, a, c, 3);
- case "MMMM": return h(c, a);
- case "D": return e.$D;
- case "DD": return b.s(e.$D, 2, "0");
- case "d": return String(e.$W);
- case "dd": return h(n.weekdaysMin, e.$W, o, 2);
- case "ddd": return h(n.weekdaysShort, e.$W, o, 3);
- case "dddd": return o[e.$W];
- case "H": return String(s);
- case "HH": return b.s(s, 2, "0");
- case "h": return d(1);
- case "hh": return d(2);
- case "a": return $(s, u, !0);
- case "A": return $(s, u, !1);
- case "m": return String(u);
- case "mm": return b.s(u, 2, "0");
- case "s": return String(e.$s);
- case "ss": return b.s(e.$s, 2, "0");
- case "SSS": return b.s(e.$ms, 3, "0");
- case "Z": return i;
- }
- return null;
- }(t) || i.replace(":", "");
- }));
- }, m.utcOffset = function() {
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
- }, m.diff = function(r, d, l) {
- var $, y = this, M = b.p(d), m = O(r), v = (m.utcOffset() - this.utcOffset()) * e, g = this - m, D = function() {
- return b.m(y, m);
- };
- switch (M) {
- case h:
- $ = D() / 12;
- break;
- case c:
- $ = D();
- break;
- case f:
- $ = D() / 3;
- break;
- case o:
- $ = (g - v) / 6048e5;
- break;
- case a:
- $ = (g - v) / 864e5;
- break;
- case u:
- $ = g / n;
- break;
- case s:
- $ = g / e;
- break;
- case i:
- $ = g / t;
- break;
- default: $ = g;
- }
- return l ? $ : b.a($);
- }, m.daysInMonth = function() {
- return this.endOf(c).$D;
- }, m.$locale = function() {
- return D[this.$L];
- }, m.locale = function(t, e) {
- if (!t) return this.$L;
- var n = this.clone(), r = w(t, e, !0);
- return r && (n.$L = r), n;
- }, m.clone = function() {
- return b.w(this.$d, this);
- }, m.toDate = function() {
- return new Date(this.valueOf());
- }, m.toJSON = function() {
- return this.isValid() ? this.toISOString() : null;
- }, m.toISOString = function() {
- return this.$d.toISOString();
- }, m.toString = function() {
- return this.$d.toUTCString();
- }, M;
- }(), k = _.prototype;
- return O.prototype = k, [
- ["$ms", r],
- ["$s", i],
- ["$m", s],
- ["$H", u],
- ["$W", a],
- ["$M", c],
- ["$y", h],
- ["$D", d]
- ].forEach((function(t) {
- k[t[1]] = function(e) {
- return this.$g(e, t[0], t[1]);
- };
- })), O.extend = function(t, e) {
- return t.$i || (t(e, _, O), t.$i = !0), O;
- }, O.locale = w, O.isDayjs = S, O.unix = function(t) {
- return O(1e3 * t);
- }, O.en = D[g], O.Ls = D, O.p = {}, O;
- }));
- })))(), 1);
- var buildTimeList = (value, bound) => {
- return [
- value > 0 ? value - 1 : void 0,
- value,
- value < bound ? value + 1 : void 0
- ];
- };
- var rangeArr = (n) => Array.from(Array.from({ length: n }).keys());
- var extractDateFormat = (format) => {
- return format.replace(/\W?m{1,2}|\W?ZZ/g, "").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi, "").trim();
- };
- var extractTimeFormat = (format) => {
- return format.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g, "").trim();
- };
- var dateEquals = function(a, b) {
- const aIsDate = isDate(a);
- const bIsDate = isDate(b);
- if (aIsDate && bIsDate) return a.getTime() === b.getTime();
- if (!aIsDate && !bIsDate) return a === b;
- return false;
- };
- var valueEquals = function(a, b) {
- const aIsArray = isArray$1(a);
- const bIsArray = isArray$1(b);
- if (aIsArray && bIsArray) {
- if (a.length !== b.length) return false;
- return a.every((item, index) => dateEquals(item, b[index]));
- }
- if (!aIsArray && !bIsArray) return dateEquals(a, b);
- return false;
- };
- var parseDate = function(date, format, lang) {
- const day = isEmpty(format) || format === "x" ? (0, import_dayjs_min.default)(date).locale(lang) : (0, import_dayjs_min.default)(date, format).locale(lang);
- return day.isValid() ? day : void 0;
- };
- var formatter = function(date, format, lang) {
- if (isEmpty(format)) return date;
- if (format === "x") return +date;
- return (0, import_dayjs_min.default)(date).locale(lang).format(format);
- };
- var makeList = (total, method) => {
- const arr = [];
- const disabledArr = method?.();
- for (let i = 0; i < total; i++) arr.push(disabledArr?.includes(i) ?? false);
- return arr;
- };
- var dayOrDaysToDate = (dayOrDays) => {
- return isArray$1(dayOrDays) ? dayOrDays.map((d) => d.toDate()) : dayOrDays.toDate();
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/props/shared.mjs
- var disabledTimeListsProps = buildProps({
- disabledHours: { type: definePropType(Function) },
- disabledMinutes: { type: definePropType(Function) },
- disabledSeconds: { type: definePropType(Function) }
- });
- var timePanelSharedProps = buildProps({
- visible: Boolean,
- actualVisible: {
- type: Boolean,
- default: void 0
- },
- format: {
- type: String,
- default: ""
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/common/props.mjs
- var timePickerDefaultProps = buildProps({
- automaticDropdown: {
- type: Boolean,
- default: true
- },
- id: { type: definePropType([Array, String]) },
- name: { type: definePropType([Array, String]) },
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- format: String,
- valueFormat: String,
- dateFormat: String,
- timeFormat: String,
- type: {
- type: String,
- default: ""
- },
- clearable: {
- type: Boolean,
- default: true
- },
- clearIcon: {
- type: definePropType([String, Object]),
- default: circle_close_default
- },
- editable: {
- type: Boolean,
- default: true
- },
- saveOnBlur: {
- type: Boolean,
- default: true
- },
- prefixIcon: {
- type: definePropType([String, Object]),
- default: ""
- },
- size: useSizeProp,
- readonly: Boolean,
- disabled: {
- type: Boolean,
- default: void 0
- },
- placeholder: {
- type: String,
- default: ""
- },
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- modelValue: {
- type: definePropType([
- Date,
- Array,
- String,
- Number
- ]),
- default: ""
- },
- rangeSeparator: {
- type: String,
- default: "-"
- },
- startPlaceholder: String,
- endPlaceholder: String,
- defaultValue: { type: definePropType([Date, Array]) },
- defaultTime: { type: definePropType([Date, Array]) },
- isRange: Boolean,
- ...disabledTimeListsProps,
- disabledDate: { type: Function },
- cellClassName: { type: Function },
- shortcuts: {
- type: Array,
- default: () => []
- },
- arrowControl: Boolean,
- tabindex: {
- type: definePropType([String, Number]),
- default: 0
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- unlinkPanels: Boolean,
- placement: {
- type: definePropType(String),
- values: Ee,
- default: "bottom"
- },
- fallbackPlacements: {
- type: definePropType(Array),
- default: [
- "bottom",
- "top",
- "right",
- "left"
- ]
- },
- ...useEmptyValuesProps,
- ...useAriaProps(["ariaLabel"]),
- showNow: {
- type: Boolean,
- default: true
- },
- showConfirm: {
- type: Boolean,
- default: true
- },
- showFooter: {
- type: Boolean,
- default: true
- },
- showWeekNumber: Boolean
- });
- var timePickerRangeTriggerProps = buildProps({
- id: { type: definePropType(Array) },
- name: { type: definePropType(Array) },
- modelValue: { type: definePropType([Array, String]) },
- startPlaceholder: String,
- endPlaceholder: String,
- disabled: Boolean
- });
- /**
- * @deprecated Use `timePickerRangeTriggerProps` instead. This will be removed in future versions.
- */
- var timePickerRngeTriggerProps = timePickerRangeTriggerProps;
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/composables/use-common-picker.mjs
- var useCommonPicker = (props, emit) => {
- const { lang } = useLocale();
- const pickerVisible = ref(false);
- const pickerActualVisible = ref(false);
- const userInput = ref(null);
- const valueIsEmpty = computed(() => {
- const { modelValue } = props;
- return !modelValue || isArray$1(modelValue) && !modelValue.filter(Boolean).length;
- });
- const emitInput = (input) => {
- if (!valueEquals(props.modelValue, input)) {
- let formatted;
- if (isArray$1(input)) formatted = input.map((item) => formatter(item, props.valueFormat, lang.value));
- else if (input) formatted = formatter(input, props.valueFormat, lang.value);
- emit(UPDATE_MODEL_EVENT, input ? formatted : input, lang.value);
- }
- };
- const parsedValue = computed(() => {
- let dayOrDays;
- if (valueIsEmpty.value) {
- if (pickerOptions.value.getDefaultValue) dayOrDays = pickerOptions.value.getDefaultValue();
- } else if (isArray$1(props.modelValue)) dayOrDays = props.modelValue.map((d) => parseDate(d, props.valueFormat, lang.value));
- else dayOrDays = parseDate(props.modelValue ?? "", props.valueFormat, lang.value);
- if (pickerOptions.value.getRangeAvailableTime) {
- const availableResult = pickerOptions.value.getRangeAvailableTime(dayOrDays);
- if (!isEqual$1(availableResult, dayOrDays)) {
- dayOrDays = availableResult;
- if (!valueIsEmpty.value) emitInput(dayOrDaysToDate(dayOrDays));
- }
- }
- if (isArray$1(dayOrDays) && dayOrDays.some((day) => !day)) dayOrDays = [];
- return dayOrDays;
- });
- const pickerOptions = ref({});
- const onSetPickerOption = (e) => {
- pickerOptions.value[e[0]] = e[1];
- pickerOptions.value.panelReady = true;
- };
- const onCalendarChange = (e) => {
- emit("calendar-change", e);
- };
- const onPanelChange = (value, mode, view) => {
- emit("panel-change", value, mode, view);
- };
- const onPick = (date = "", visible = false) => {
- pickerVisible.value = visible;
- let result;
- if (isArray$1(date)) result = date.map((_) => _.toDate());
- else result = date ? date.toDate() : date;
- userInput.value = null;
- emitInput(result);
- };
- return {
- parsedValue,
- pickerActualVisible,
- pickerOptions,
- pickerVisible,
- userInput,
- valueIsEmpty,
- emitInput,
- onCalendarChange,
- onPanelChange,
- onPick,
- onSetPickerOption
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$71 = [
- "id",
- "name",
- "placeholder",
- "value",
- "disabled"
- ];
- var _hoisted_2$40 = [
- "id",
- "name",
- "placeholder",
- "value",
- "disabled"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/common/picker-range-trigger.mjs
- var picker_range_trigger_default = /* @__PURE__ */ defineComponent({
- name: "PickerRangeTrigger",
- inheritAttrs: false,
- __name: "picker-range-trigger",
- props: timePickerRangeTriggerProps,
- emits: [
- "mouseenter",
- "mouseleave",
- "click",
- "touchstart",
- "focus",
- "blur",
- "startInput",
- "endInput",
- "startChange",
- "endChange"
- ],
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { formItem } = useFormItem();
- const { inputId } = useFormItemInputId(reactive({ id: computed(() => props.id?.[0]) }), { formItemContext: formItem });
- const attrs = useAttrs();
- const nsDate = useNamespace("date");
- const nsRange = useNamespace("range");
- const inputRef = ref();
- const endInputRef = ref();
- const { wrapperRef, isFocused } = useFocusController(inputRef, { disabled: computed(() => props.disabled) });
- const handleClick = (evt) => {
- emit("click", evt);
- };
- const handleMouseEnter = (evt) => {
- emit("mouseenter", evt);
- };
- const handleMouseLeave = (evt) => {
- emit("mouseleave", evt);
- };
- const handleTouchStart = (evt) => {
- emit("touchstart", evt);
- };
- const handleStartInput = (evt) => {
- emit("startInput", evt);
- };
- const handleEndInput = (evt) => {
- emit("endInput", evt);
- };
- const handleStartChange = (evt) => {
- emit("startChange", evt);
- };
- const handleEndChange = (evt) => {
- emit("endChange", evt);
- };
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- inputRef.value?.blur();
- endInputRef.value?.blur();
- };
- __expose({
- focus,
- blur
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "wrapperRef",
- ref: wrapperRef,
- class: normalizeClass([unref(nsDate).is("active", unref(isFocused)), _ctx.$attrs.class]),
- style: normalizeStyle(_ctx.$attrs.style),
- onClick: handleClick,
- onMouseenter: handleMouseEnter,
- onMouseleave: handleMouseLeave,
- onTouchstartPassive: handleTouchStart
- }, [
- renderSlot(_ctx.$slots, "prefix"),
- createBaseVNode("input", mergeProps(unref(attrs), {
- id: unref(inputId),
- ref_key: "inputRef",
- ref: inputRef,
- name: _ctx.name && _ctx.name[0],
- placeholder: _ctx.startPlaceholder,
- value: _ctx.modelValue && _ctx.modelValue[0],
- class: unref(nsRange).b("input"),
- disabled: _ctx.disabled,
- onInput: handleStartInput,
- onChange: handleStartChange
- }), null, 16, _hoisted_1$71),
- renderSlot(_ctx.$slots, "range-separator"),
- createBaseVNode("input", mergeProps(unref(attrs), {
- id: _ctx.id && _ctx.id[1],
- ref_key: "endInputRef",
- ref: endInputRef,
- name: _ctx.name && _ctx.name[1],
- placeholder: _ctx.endPlaceholder,
- value: _ctx.modelValue && _ctx.modelValue[1],
- class: unref(nsRange).b("input"),
- disabled: _ctx.disabled,
- onInput: handleEndInput,
- onChange: handleEndChange
- }), null, 16, _hoisted_2$40),
- renderSlot(_ctx.$slots, "suffix")
- ], 38);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/common/picker.mjs
- var picker_default = /* @__PURE__ */ defineComponent({
- name: "Picker",
- __name: "picker",
- props: timePickerDefaultProps,
- emits: [
- UPDATE_MODEL_EVENT,
- CHANGE_EVENT,
- "focus",
- "blur",
- "clear",
- "calendar-change",
- "panel-change",
- "visible-change",
- "keydown"
- ],
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const attrs = useAttrs$1();
- const nsDate = useNamespace("date");
- const nsInput = useNamespace("input");
- const nsRange = useNamespace("range");
- const { formItem } = useFormItem();
- const elPopperOptions = inject(PICKER_POPPER_OPTIONS_INJECTION_KEY, {});
- const emptyValues = useEmptyValues(props, null);
- const refPopper = ref();
- const inputRef = ref();
- const valueOnOpen = ref(null);
- let hasJustTabExitedInput = false;
- const pickerDisabled = useFormDisabled();
- const commonPicker = useCommonPicker(props, emit);
- const { parsedValue, pickerActualVisible, userInput, pickerVisible, pickerOptions, valueIsEmpty, emitInput, onPick, onSetPickerOption, onCalendarChange, onPanelChange } = commonPicker;
- const { isFocused, handleFocus, handleBlur } = useFocusController(inputRef, {
- disabled: pickerDisabled,
- beforeFocus() {
- return props.readonly;
- },
- afterFocus() {
- if (!props.automaticDropdown) return;
- pickerVisible.value = true;
- },
- beforeBlur(event) {
- return !hasJustTabExitedInput && refPopper.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- if (isTimePicker.value && !props.saveOnBlur) {
- if (!valueIsEmpty.value) pickerOptions.value.handleCancel?.();
- } else handleChange();
- pickerVisible.value = false;
- hasJustTabExitedInput = false;
- props.validateEvent && formItem?.validate("blur").catch((err) => debugWarn(err));
- }
- });
- const hovering = ref(false);
- const rangeInputKls = computed(() => [
- nsDate.b("editor"),
- nsDate.bm("editor", props.type),
- nsInput.e("wrapper"),
- nsDate.is("disabled", pickerDisabled.value),
- nsDate.is("active", pickerVisible.value),
- nsRange.b("editor"),
- pickerSize ? nsRange.bm("editor", pickerSize.value) : "",
- attrs.class
- ]);
- const clearIconKls = computed(() => [
- nsInput.e("icon"),
- nsRange.e("close-icon"),
- !showClearBtn.value ? nsRange.em("close-icon", "hidden") : ""
- ]);
- watch(pickerVisible, (val) => {
- if (!val) {
- userInput.value = null;
- nextTick(() => {
- emitChange(props.modelValue);
- });
- } else nextTick(() => {
- if (val) valueOnOpen.value = props.modelValue;
- });
- });
- const emitChange = (val, isClear) => {
- if (isClear || !valueEquals(val, valueOnOpen.value)) {
- emit(CHANGE_EVENT, val);
- isClear && (valueOnOpen.value = val);
- props.validateEvent && formItem?.validate("change").catch((err) => debugWarn(err));
- }
- };
- const emitKeydown = (e) => {
- emit("keydown", e);
- };
- const refInput = computed(() => {
- if (inputRef.value) return Array.from(inputRef.value.$el.querySelectorAll("input"));
- return [];
- });
- const setSelectionRange = (start, end, pos) => {
- const _inputs = refInput.value;
- if (!_inputs.length) return;
- if (!pos || pos === "min") {
- _inputs[0].setSelectionRange(start, end);
- _inputs[0].focus();
- } else if (pos === "max") {
- _inputs[1].setSelectionRange(start, end);
- _inputs[1].focus();
- }
- };
- const onBeforeShow = () => {
- pickerActualVisible.value = true;
- };
- const onShow = () => {
- emit("visible-change", true);
- };
- const onHide = () => {
- pickerActualVisible.value = false;
- pickerVisible.value = false;
- emit("visible-change", false);
- };
- const handleOpen = () => {
- pickerVisible.value = true;
- };
- const handleClose = () => {
- pickerVisible.value = false;
- };
- const displayValue = computed(() => {
- const formattedValue = formatToString(parsedValue.value);
- if (isArray$1(userInput.value)) return [userInput.value[0] || formattedValue && formattedValue[0] || "", userInput.value[1] || formattedValue && formattedValue[1] || ""];
- else if (userInput.value !== null) return userInput.value;
- if (isTimePicker.value && valueIsEmpty.value && !props.saveOnBlur) return "";
- if (!isTimePicker.value && valueIsEmpty.value) return "";
- if (!pickerVisible.value && valueIsEmpty.value) return "";
- if (formattedValue) return isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value ? formattedValue.join(", ") : formattedValue;
- return "";
- });
- const isTimeLikePicker = computed(() => props.type.includes("time"));
- const isTimePicker = computed(() => props.type.startsWith("time"));
- const isDatesPicker = computed(() => props.type === "dates");
- const isMonthsPicker = computed(() => props.type === "months");
- const isYearsPicker = computed(() => props.type === "years");
- const triggerIcon = computed(() => props.prefixIcon || (isTimeLikePicker.value ? clock_default : calendar_default$1));
- const showClearBtn = computed(() => props.clearable && !pickerDisabled.value && !props.readonly && !valueIsEmpty.value && (hovering.value || isFocused.value));
- const onClear = (event) => {
- if (props.readonly || pickerDisabled.value) return;
- if (showClearBtn.value) {
- event?.stopPropagation();
- if (pickerOptions.value.handleClear) pickerOptions.value.handleClear();
- else emitInput(emptyValues.valueOnClear.value);
- emitChange(emptyValues.valueOnClear.value, true);
- onHide();
- }
- emit("clear");
- };
- const onMouseDownInput = async (event) => {
- if (props.readonly || pickerDisabled.value) return;
- if (event.target?.tagName !== "INPUT" || isFocused.value || !props.automaticDropdown) pickerVisible.value = true;
- };
- const onMouseEnter = () => {
- if (props.readonly || pickerDisabled.value) return;
- if (!valueIsEmpty.value && props.clearable) hovering.value = true;
- };
- const onMouseLeave = () => {
- hovering.value = false;
- };
- const onTouchStartInput = (event) => {
- if (props.readonly || pickerDisabled.value) return;
- if (event.touches[0].target?.tagName !== "INPUT" || isFocused.value || !props.automaticDropdown) pickerVisible.value = true;
- };
- const isRangeInput = computed(() => {
- return props.type.includes("range");
- });
- const pickerSize = useFormSize();
- const popperEl = computed(() => unref(refPopper)?.popperRef?.contentRef);
- const stophandle = onClickOutside(inputRef, (e) => {
- const unrefedPopperEl = unref(popperEl);
- const inputEl = unrefElement(inputRef);
- if (unrefedPopperEl && (e.target === unrefedPopperEl || e.composedPath().includes(unrefedPopperEl)) || e.target === inputEl || inputEl && e.composedPath().includes(inputEl)) return;
- pickerVisible.value = false;
- });
- onBeforeUnmount(() => {
- stophandle?.();
- });
- const handleChange = () => {
- if (isTimePicker.value && !props.saveOnBlur) return;
- if (userInput.value) {
- const value = parseUserInputToDayjs(displayValue.value);
- if (value) {
- if (isValidValue(value)) emitInput(dayOrDaysToDate(value));
- userInput.value = null;
- }
- }
- if (userInput.value === "") {
- emitInput(emptyValues.valueOnClear.value);
- emitChange(emptyValues.valueOnClear.value, true);
- userInput.value = null;
- }
- };
- const parseUserInputToDayjs = (value) => {
- if (!value) return null;
- return pickerOptions.value.parseUserInput(value);
- };
- const formatToString = (value) => {
- if (!value) return null;
- return isArray$1(value) ? value.map((_) => _.format(props.format)) : value.format(props.format);
- };
- const isValidValue = (value) => {
- return pickerOptions.value.isValidValue(value);
- };
- const handleKeydownInput = async (event) => {
- if (props.readonly || pickerDisabled.value) return;
- const code = getEventCode(event);
- emitKeydown(event);
- if (code === EVENT_CODE.esc) {
- if (pickerVisible.value === true) {
- pickerVisible.value = false;
- event.preventDefault();
- event.stopPropagation();
- }
- return;
- }
- if (code === EVENT_CODE.down) {
- if (pickerOptions.value.handleFocusPicker) {
- event.preventDefault();
- event.stopPropagation();
- }
- if (pickerVisible.value === false) {
- pickerVisible.value = true;
- await nextTick();
- }
- if (pickerOptions.value.handleFocusPicker) {
- pickerOptions.value.handleFocusPicker();
- return;
- }
- }
- if (code === EVENT_CODE.tab) {
- hasJustTabExitedInput = true;
- return;
- }
- if (code === EVENT_CODE.enter || code === EVENT_CODE.numpadEnter) {
- if (!pickerVisible.value) pickerVisible.value = true;
- else if (userInput.value === null || userInput.value === "" || isValidValue(parseUserInputToDayjs(displayValue.value))) {
- handleChange();
- pickerVisible.value = false;
- }
- event.preventDefault();
- event.stopPropagation();
- return;
- }
- if (userInput.value) {
- event.stopPropagation();
- return;
- }
- if (pickerOptions.value.handleKeydownInput) pickerOptions.value.handleKeydownInput(event);
- };
- const onUserInput = (e) => {
- userInput.value = e;
- if (!pickerVisible.value) pickerVisible.value = true;
- };
- const handleStartInput = (event) => {
- const target = event.target;
- if (userInput.value) userInput.value = [target.value, userInput.value[1]];
- else userInput.value = [target.value, null];
- };
- const handleEndInput = (event) => {
- const target = event.target;
- if (userInput.value) userInput.value = [userInput.value[0], target.value];
- else userInput.value = [null, target.value];
- };
- const handleStartChange = () => {
- const values = userInput.value;
- const value = parseUserInputToDayjs(values && values[0]);
- const parsedVal = unref(parsedValue);
- if (value && value.isValid()) {
- userInput.value = [formatToString(value), displayValue.value?.[1] || null];
- const newValue = [value, parsedVal && (parsedVal[1] || null)];
- if (isValidValue(newValue)) {
- emitInput(dayOrDaysToDate(newValue));
- userInput.value = null;
- }
- }
- };
- const handleEndChange = () => {
- const values = unref(userInput);
- const value = parseUserInputToDayjs(values && values[1]);
- const parsedVal = unref(parsedValue);
- if (value && value.isValid()) {
- userInput.value = [unref(displayValue)?.[0] || null, formatToString(value)];
- const newValue = [parsedVal && parsedVal[0], value];
- if (isValidValue(newValue)) {
- emitInput(dayOrDaysToDate(newValue));
- userInput.value = null;
- }
- }
- };
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- inputRef.value?.blur();
- };
- provide(PICKER_BASE_INJECTION_KEY, {
- props,
- emptyValues
- });
- provide(ROOT_COMMON_PICKER_INJECTION_KEY, commonPicker);
- __expose({
- focus,
- blur,
- handleOpen,
- handleClose,
- onPick
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTooltip), mergeProps({
- ref_key: "refPopper",
- ref: refPopper,
- visible: unref(pickerVisible),
- effect: "light",
- pure: "",
- trigger: "click"
- }, _ctx.$attrs, {
- role: "dialog",
- teleported: "",
- transition: `${unref(nsDate).namespace.value}-zoom-in-top`,
- "popper-class": [`${unref(nsDate).namespace.value}-picker__popper`, _ctx.popperClass],
- "popper-style": _ctx.popperStyle,
- "popper-options": unref(elPopperOptions),
- "fallback-placements": _ctx.fallbackPlacements,
- "gpu-acceleration": false,
- placement: _ctx.placement,
- "stop-popper-mouse-event": false,
- "hide-after": 0,
- persistent: "",
- onBeforeShow,
- onShow,
- onHide
- }), {
- default: withCtx(() => [!isRangeInput.value ? (openBlock(), createBlock(unref(ElInput), {
- key: 0,
- id: _ctx.id,
- ref_key: "inputRef",
- ref: inputRef,
- "container-role": "combobox",
- "model-value": displayValue.value,
- name: _ctx.name,
- size: unref(pickerSize),
- disabled: unref(pickerDisabled),
- placeholder: _ctx.placeholder,
- class: normalizeClass([
- unref(nsDate).b("editor"),
- unref(nsDate).bm("editor", _ctx.type),
- unref(nsDate).is("focus", unref(pickerVisible)),
- _ctx.$attrs.class
- ]),
- style: normalizeStyle(_ctx.$attrs.style),
- readonly: !_ctx.editable || _ctx.readonly || isDatesPicker.value || isMonthsPicker.value || isYearsPicker.value || _ctx.type === "week",
- "aria-label": _ctx.ariaLabel,
- tabindex: _ctx.tabindex,
- "validate-event": false,
- onInput: onUserInput,
- onFocus: unref(handleFocus),
- onBlur: unref(handleBlur),
- onKeydown: handleKeydownInput,
- onChange: handleChange,
- onMousedown: onMouseDownInput,
- onMouseenter: onMouseEnter,
- onMouseleave: onMouseLeave,
- onTouchstartPassive: onTouchStartInput,
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
- }, {
- prefix: withCtx(() => [triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(nsInput).e("icon")),
- onMousedown: withModifiers(onMouseDownInput, ["prevent"]),
- onTouchstartPassive: onTouchStartInput
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)]),
- suffix: withCtx(() => [showClearBtn.value && _ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(`${unref(nsInput).e("icon")} clear-icon`),
- onMousedown: withModifiers(unref(NOOP), ["prevent"]),
- onClick: onClear
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
- _: 1
- }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)]),
- _: 1
- }, 8, [
- "id",
- "model-value",
- "name",
- "size",
- "disabled",
- "placeholder",
- "class",
- "style",
- "readonly",
- "aria-label",
- "tabindex",
- "onFocus",
- "onBlur"
- ])) : (openBlock(), createBlock(picker_range_trigger_default, {
- key: 1,
- id: _ctx.id,
- ref_key: "inputRef",
- ref: inputRef,
- "model-value": displayValue.value,
- name: _ctx.name,
- disabled: unref(pickerDisabled),
- readonly: !_ctx.editable || _ctx.readonly,
- "start-placeholder": _ctx.startPlaceholder,
- "end-placeholder": _ctx.endPlaceholder,
- class: normalizeClass(rangeInputKls.value),
- style: normalizeStyle(_ctx.$attrs.style),
- "aria-label": _ctx.ariaLabel,
- tabindex: _ctx.tabindex,
- autocomplete: "off",
- role: "combobox",
- onClick: onMouseDownInput,
- onFocus: unref(handleFocus),
- onBlur: unref(handleBlur),
- onStartInput: handleStartInput,
- onStartChange: handleStartChange,
- onEndInput: handleEndInput,
- onEndChange: handleEndChange,
- onMousedown: onMouseDownInput,
- onMouseenter: onMouseEnter,
- onMouseleave: onMouseLeave,
- onTouchstartPassive: onTouchStartInput,
- onKeydown: handleKeydownInput
- }, {
- prefix: withCtx(() => [triggerIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(nsInput).e("icon"), unref(nsRange).e("icon")])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(triggerIcon.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)]),
- "range-separator": withCtx(() => [renderSlot(_ctx.$slots, "range-separator", {}, () => [createBaseVNode("span", { class: normalizeClass(unref(nsRange).b("separator")) }, toDisplayString(_ctx.rangeSeparator), 3)])]),
- suffix: withCtx(() => [_ctx.clearIcon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(clearIconKls.value),
- onMousedown: withModifiers(unref(NOOP), ["prevent"]),
- onClick: onClear
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
- _: 1
- }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, [
- "id",
- "model-value",
- "name",
- "disabled",
- "readonly",
- "start-placeholder",
- "end-placeholder",
- "class",
- "style",
- "aria-label",
- "tabindex",
- "onFocus",
- "onBlur"
- ]))]),
- content: withCtx(() => [renderSlot(_ctx.$slots, "default", {
- visible: unref(pickerVisible),
- actualVisible: unref(pickerActualVisible),
- parsedValue: unref(parsedValue),
- format: _ctx.format,
- dateFormat: _ctx.dateFormat,
- timeFormat: _ctx.timeFormat,
- unlinkPanels: _ctx.unlinkPanels,
- type: _ctx.type,
- defaultValue: _ctx.defaultValue,
- showNow: _ctx.showNow,
- showConfirm: _ctx.showConfirm,
- showFooter: _ctx.showFooter,
- showWeekNumber: _ctx.showWeekNumber,
- onPick: _cache[1] || (_cache[1] = (...args) => unref(onPick) && unref(onPick)(...args)),
- onSelectRange: setSelectionRange,
- onSetPickerOption: _cache[2] || (_cache[2] = (...args) => unref(onSetPickerOption) && unref(onSetPickerOption)(...args)),
- onCalendarChange: _cache[3] || (_cache[3] = (...args) => unref(onCalendarChange) && unref(onCalendarChange)(...args)),
- onClear,
- onPanelChange: _cache[4] || (_cache[4] = (...args) => unref(onPanelChange) && unref(onPanelChange)(...args)),
- onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"]))
- })]),
- _: 3
- }, 16, [
- "visible",
- "transition",
- "popper-class",
- "popper-style",
- "popper-options",
- "fallback-placements",
- "placement"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/directives/click-outside/index.mjs
- var nodeList = /* @__PURE__ */ new Map();
- if (isClient) {
- let startClick;
- document.addEventListener("mousedown", (e) => startClick = e);
- document.addEventListener("mouseup", (e) => {
- if (startClick) {
- for (const handlers of nodeList.values()) for (const { documentHandler } of handlers) documentHandler(e, startClick);
- startClick = void 0;
- }
- });
- }
- function createDocumentHandler(el, binding) {
- let excludes = [];
- if (isArray$1(binding.arg)) excludes = binding.arg;
- else if (isElement$1(binding.arg)) excludes.push(binding.arg);
- return function(mouseup, mousedown) {
- const popperRef = binding.instance.popperRef;
- const mouseUpTarget = mouseup.target;
- const mouseDownTarget = mousedown?.target;
- const isBound = !binding || !binding.instance;
- const isTargetExists = !mouseUpTarget || !mouseDownTarget;
- const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
- const isSelf = el === mouseUpTarget;
- const isTargetExcluded = excludes.length && excludes.some((item) => item?.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget);
- const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
- if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) return;
- binding.value(mouseup, mousedown);
- };
- }
- var ClickOutside = {
- beforeMount(el, binding) {
- if (!nodeList.has(el)) nodeList.set(el, []);
- nodeList.get(el).push({
- documentHandler: createDocumentHandler(el, binding),
- bindingFn: binding.value
- });
- },
- updated(el, binding) {
- if (!nodeList.has(el)) nodeList.set(el, []);
- const handlers = nodeList.get(el);
- const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
- const newHandler = {
- documentHandler: createDocumentHandler(el, binding),
- bindingFn: binding.value
- };
- if (oldHandlerIndex >= 0) handlers.splice(oldHandlerIndex, 1, newHandler);
- else handlers.push(newHandler);
- },
- unmounted(el) {
- nodeList.delete(el);
- }
- };
- var SCOPE$9 = "_RepeatClick";
- var vRepeatClick = {
- beforeMount(el, binding) {
- const value = binding.value;
- const { interval = 100, delay = 600 } = isFunction$1(value) ? {} : value;
- let intervalId;
- let delayId;
- const handler = () => isFunction$1(value) ? value() : value.handler();
- const clear = () => {
- if (delayId) {
- clearTimeout(delayId);
- delayId = void 0;
- }
- if (intervalId) {
- clearInterval(intervalId);
- intervalId = void 0;
- }
- };
- const start = (evt) => {
- if (evt.button !== 0) return;
- clear();
- handler();
- document.addEventListener("mouseup", clear, { once: true });
- delayId = setTimeout(() => {
- intervalId = setInterval(() => {
- handler();
- }, interval);
- }, delay);
- };
- el[SCOPE$9] = {
- start,
- clear
- };
- el.addEventListener("mousedown", start);
- },
- unmounted(el) {
- if (!el[SCOPE$9]) return;
- const { start, clear } = el[SCOPE$9];
- if (start) el.removeEventListener("mousedown", start);
- if (clear) {
- clear();
- document.removeEventListener("mouseup", clear);
- }
- el[SCOPE$9] = null;
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/directives/trap-focus/index.mjs
- var FOCUSABLE_CHILDREN = "_trap-focus-children";
- var FOCUS_STACK = [];
- var FOCUS_HANDLER = (e) => {
- if (FOCUS_STACK.length === 0) return;
- const code = getEventCode(e);
- const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];
- if (focusableElement.length > 0 && code === EVENT_CODE.tab) {
- if (focusableElement.length === 1) {
- e.preventDefault();
- if (document.activeElement !== focusableElement[0]) focusableElement[0].focus();
- return;
- }
- const goingBackward = e.shiftKey;
- const isFirst = e.target === focusableElement[0];
- const isLast = e.target === focusableElement[focusableElement.length - 1];
- if (isFirst && goingBackward) {
- e.preventDefault();
- focusableElement[focusableElement.length - 1].focus();
- }
- if (isLast && !goingBackward) {
- e.preventDefault();
- focusableElement[0].focus();
- }
- }
- };
- var TrapFocus = {
- beforeMount(el) {
- el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements$1(el);
- FOCUS_STACK.push(el);
- if (FOCUS_STACK.length <= 1) document.addEventListener("keydown", FOCUS_HANDLER);
- },
- updated(el) {
- nextTick(() => {
- el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements$1(el);
- });
- },
- unmounted() {
- FOCUS_STACK.shift();
- if (FOCUS_STACK.length === 0) document.removeEventListener("keydown", FOCUS_HANDLER);
- }
- };
- //#endregion
- //#region node_modules/normalize-wheel-es/dist/index.mjs
- var v = !1, o, f, s, u, d, N, l, p, m, w, D, x, E, M, F;
- function a() {
- if (!v) {
- v = !0;
- var e = navigator.userAgent, n = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e), i = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
- if (x = /\b(iPhone|iP[ao]d)/.exec(e), E = /\b(iP[ao]d)/.exec(e), w = /Android/i.exec(e), M = /FBAN\/\w+;/i.exec(e), F = /Mobile/i.exec(e), D = !!/Win64/.exec(e), n) {
- o = n[1] ? parseFloat(n[1]) : n[5] ? parseFloat(n[5]) : NaN, o && document && document.documentMode && (o = document.documentMode);
- var r = /(?:Trident\/(\d+.\d+))/.exec(e);
- N = r ? parseFloat(r[1]) + 4 : o, f = n[2] ? parseFloat(n[2]) : NaN, s = n[3] ? parseFloat(n[3]) : NaN, u = n[4] ? parseFloat(n[4]) : NaN, u ? (n = /(?:Chrome\/(\d+\.\d+))/.exec(e), d = n && n[1] ? parseFloat(n[1]) : NaN) : d = NaN;
- } else o = f = s = d = u = NaN;
- if (i) {
- if (i[1]) {
- var t = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
- l = t ? parseFloat(t[1].replace("_", ".")) : !0;
- } else l = !1;
- p = !!i[2], m = !!i[3];
- } else l = p = m = !1;
- }
- }
- var _ = {
- ie: function() {
- return a() || o;
- },
- ieCompatibilityMode: function() {
- return a() || N > o;
- },
- ie64: function() {
- return _.ie() && D;
- },
- firefox: function() {
- return a() || f;
- },
- opera: function() {
- return a() || s;
- },
- webkit: function() {
- return a() || u;
- },
- safari: function() {
- return _.webkit();
- },
- chrome: function() {
- return a() || d;
- },
- windows: function() {
- return a() || p;
- },
- osx: function() {
- return a() || l;
- },
- linux: function() {
- return a() || m;
- },
- iphone: function() {
- return a() || x;
- },
- mobile: function() {
- return a() || x || E || w || F;
- },
- nativeApp: function() {
- return a() || M;
- },
- android: function() {
- return a() || w;
- },
- ipad: function() {
- return a() || E;
- }
- }, A = _;
- var c = !!(typeof window < "u" && window.document && window.document.createElement), h = {
- canUseDOM: c,
- canUseWorkers: typeof Worker < "u",
- canUseEventListeners: c && !!(window.addEventListener || window.attachEvent),
- canUseViewport: c && !!window.screen,
- isInWorker: !c
- };
- var X;
- h.canUseDOM && (X = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0);
- function S(e, n) {
- if (!h.canUseDOM || n && !("addEventListener" in document)) return !1;
- var i = "on" + e, r = i in document;
- if (!r) {
- var t = document.createElement("div");
- t.setAttribute(i, "return;"), r = typeof t[i] == "function";
- }
- return !r && X && e === "wheel" && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r;
- }
- var b = S;
- var O = 10, I = 40, P = 800;
- function T(e) {
- var n = 0, i = 0, r = 0, t = 0;
- return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (n = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (n = i, i = 0), r = n * O, t = i * O, "deltaY" in e && (t = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || t) && e.deltaMode && (e.deltaMode == 1 ? (r *= I, t *= I) : (r *= P, t *= P)), r && !n && (n = r < 1 ? -1 : 1), t && !i && (i = t < 1 ? -1 : 1), {
- spinX: n,
- spinY: i,
- pixelX: r,
- pixelY: t
- };
- }
- T.getEventType = function() {
- return A.firefox() ? "DOMMouseScroll" : b("wheel") ? "wheel" : "mousewheel";
- };
- var Y = T;
- /**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @param {?boolean} capture Check if the capture phase is supported.
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
- //#endregion
- //#region node_modules/element-plus/es/directives/mousewheel/index.mjs
- var SCOPE$8 = "_Mousewheel";
- var mousewheel = function(element, callback) {
- if (element && element.addEventListener) {
- removeWheelHandler(element);
- const fn = function(event) {
- const normalized = Y(event);
- callback && Reflect.apply(callback, this, [event, normalized]);
- };
- element[SCOPE$8] = { wheelHandler: fn };
- element.addEventListener("wheel", fn, { passive: true });
- }
- };
- var removeWheelHandler = (element) => {
- if (element["_Mousewheel"]?.wheelHandler) {
- element.removeEventListener("wheel", element[SCOPE$8].wheelHandler);
- element[SCOPE$8] = null;
- }
- };
- var Mousewheel = {
- beforeMount(el, binding) {
- mousewheel(el, binding.value);
- },
- unmounted(el) {
- removeWheelHandler(el);
- },
- updated(el, binding) {
- if (binding.value !== binding.oldValue) mousewheel(el, binding.value);
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/props/panel-time-picker.mjs
- var panelTimePickerProps = buildProps({
- ...timePanelSharedProps,
- datetimeRole: String,
- parsedValue: { type: definePropType(Object) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/composables/use-time-panel.mjs
- var useTimePanel = ({ getAvailableHours, getAvailableMinutes, getAvailableSeconds }) => {
- const getAvailableTime = (date, role, first, compareDate) => {
- const availableTimeGetters = {
- hour: getAvailableHours,
- minute: getAvailableMinutes,
- second: getAvailableSeconds
- };
- let result = date;
- [
- "hour",
- "minute",
- "second"
- ].forEach((type) => {
- if (availableTimeGetters[type]) {
- let availableTimeSlots;
- const method = availableTimeGetters[type];
- switch (type) {
- case "minute":
- availableTimeSlots = method(result.hour(), role, compareDate);
- break;
- case "second":
- availableTimeSlots = method(result.hour(), result.minute(), role, compareDate);
- break;
- default:
- availableTimeSlots = method(role, compareDate);
- break;
- }
- if (availableTimeSlots?.length && !availableTimeSlots.includes(result[type]())) {
- const pos = first ? 0 : availableTimeSlots.length - 1;
- result = result[type](availableTimeSlots[pos]);
- }
- }
- });
- return result;
- };
- const timePickerOptions = {};
- const onSetOption = ([key, val]) => {
- timePickerOptions[key] = val;
- };
- return {
- timePickerOptions,
- getAvailableTime,
- onSetOption
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/composables/use-time-picker.mjs
- var makeAvailableArr = (disabledList) => {
- const trueOrNumber = (isDisabled, index) => isDisabled || index;
- const getNumber = (predicate) => predicate !== true;
- return disabledList.map(trueOrNumber).filter(getNumber);
- };
- var getTimeLists = (disabledHours, disabledMinutes, disabledSeconds) => {
- const getHoursList = (role, compare) => {
- return makeList(24, disabledHours && (() => disabledHours?.(role, compare)));
- };
- const getMinutesList = (hour, role, compare) => {
- return makeList(60, disabledMinutes && (() => disabledMinutes?.(hour, role, compare)));
- };
- const getSecondsList = (hour, minute, role, compare) => {
- return makeList(60, disabledSeconds && (() => disabledSeconds?.(hour, minute, role, compare)));
- };
- return {
- getHoursList,
- getMinutesList,
- getSecondsList
- };
- };
- var buildAvailableTimeSlotGetter = (disabledHours, disabledMinutes, disabledSeconds) => {
- const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(disabledHours, disabledMinutes, disabledSeconds);
- const getAvailableHours = (role, compare) => {
- return makeAvailableArr(getHoursList(role, compare));
- };
- const getAvailableMinutes = (hour, role, compare) => {
- return makeAvailableArr(getMinutesList(hour, role, compare));
- };
- const getAvailableSeconds = (hour, minute, role, compare) => {
- return makeAvailableArr(getSecondsList(hour, minute, role, compare));
- };
- return {
- getAvailableHours,
- getAvailableMinutes,
- getAvailableSeconds
- };
- };
- var useOldValue = (props, options) => {
- const oldValue = ref(props.parsedValue);
- watch(() => props.visible, (val) => {
- const modelValue = toValue$1(options.modelValue);
- const valueOnClear = toValue$1(options.valueOnClear);
- if (val && modelValue === valueOnClear) {
- oldValue.value = valueOnClear;
- return;
- }
- if (!val) oldValue.value = props.parsedValue;
- });
- return oldValue;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/props/basic-time-spinner.mjs
- var basicTimeSpinnerProps = buildProps({
- role: {
- type: String,
- required: true
- },
- spinnerDate: {
- type: definePropType(Object),
- required: true
- },
- showSeconds: {
- type: Boolean,
- default: true
- },
- arrowControl: Boolean,
- amPmMode: {
- type: definePropType(String),
- default: ""
- },
- ...disabledTimeListsProps
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$70 = ["onClick"];
- var _hoisted_2$39 = ["onMouseenter"];
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs
- var basic_time_spinner_default = /* @__PURE__ */ defineComponent({
- __name: "basic-time-spinner",
- props: basicTimeSpinnerProps,
- emits: [
- CHANGE_EVENT,
- "select-range",
- "set-option"
- ],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const { isRange, format, saveOnBlur } = inject(PICKER_BASE_INJECTION_KEY).props;
- const emit = __emit;
- const ns = useNamespace("time");
- const { getHoursList, getMinutesList, getSecondsList } = getTimeLists(props.disabledHours, props.disabledMinutes, props.disabledSeconds);
- let isScrolling = false;
- const ignoreScroll = {
- hours: false,
- minutes: false,
- seconds: false
- };
- const currentScrollbar = ref();
- const listRefsMap = {
- hours: ref(),
- minutes: ref(),
- seconds: ref()
- };
- const spinnerItems = computed(() => {
- return props.showSeconds ? timeUnits : timeUnits.slice(0, 2);
- });
- const timePartials = computed(() => {
- const { spinnerDate } = props;
- return {
- hours: spinnerDate.hour(),
- minutes: spinnerDate.minute(),
- seconds: spinnerDate.second()
- };
- });
- const timeList = computed(() => {
- const { hours, minutes } = unref(timePartials);
- const { role, spinnerDate } = props;
- const compare = !isRange ? spinnerDate : void 0;
- return {
- hours: getHoursList(role, compare),
- minutes: getMinutesList(hours, role, compare),
- seconds: getSecondsList(hours, minutes, role, compare)
- };
- });
- const arrowControlTimeList = computed(() => {
- const { hours, minutes, seconds } = unref(timePartials);
- return {
- hours: buildTimeList(hours, 23),
- minutes: buildTimeList(minutes, 59),
- seconds: buildTimeList(seconds, 59)
- };
- });
- const debouncedResetScroll = debounce((type) => {
- isScrolling = false;
- adjustCurrentSpinner(type);
- }, 200);
- const getAmPmFlag = (hour) => {
- if (!!!props.amPmMode) return "";
- const isCapital = props.amPmMode === "A";
- let content = hour < 12 ? " am" : " pm";
- if (isCapital) content = content.toUpperCase();
- return content;
- };
- const emitSelectRange = (type) => {
- let range = [0, 0];
- const actualFormat = format || "HH:mm:ss";
- const hourIndex = actualFormat.indexOf("HH");
- const minuteIndex = actualFormat.indexOf("mm");
- const secondIndex = actualFormat.indexOf("ss");
- switch (type) {
- case "hours":
- if (hourIndex !== -1) range = [hourIndex, hourIndex + 2];
- break;
- case "minutes":
- if (minuteIndex !== -1) range = [minuteIndex, minuteIndex + 2];
- break;
- case "seconds":
- if (secondIndex !== -1) range = [secondIndex, secondIndex + 2];
- break;
- }
- const [left, right] = range;
- emit("select-range", left, right);
- currentScrollbar.value = type;
- };
- const adjustCurrentSpinner = (type) => {
- adjustSpinner(type, unref(timePartials)[type]);
- };
- const adjustSpinners = () => {
- adjustCurrentSpinner("hours");
- adjustCurrentSpinner("minutes");
- adjustCurrentSpinner("seconds");
- };
- const getScrollbarElement = (el) => el.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
- const adjustSpinner = (type, value) => {
- if (props.arrowControl) return;
- const scrollbar = unref(listRefsMap[type]);
- if (scrollbar && scrollbar.$el) {
- if (!saveOnBlur) {
- ignoreScroll[type] = true;
- rAF(() => {
- ignoreScroll[type] = false;
- });
- }
- getScrollbarElement(scrollbar.$el).scrollTop = Math.max(0, value * typeItemHeight(type));
- }
- };
- const typeItemHeight = (type) => {
- const listItem = unref(listRefsMap[type])?.$el.querySelector("li");
- if (listItem) return Number.parseFloat(getStyle(listItem, "height")) || 0;
- return 0;
- };
- const onIncrement = () => {
- scrollDown(1);
- };
- const onDecrement = () => {
- scrollDown(-1);
- };
- const scrollDown = (step) => {
- if (!currentScrollbar.value) emitSelectRange("hours");
- const label = currentScrollbar.value;
- const now = unref(timePartials)[label];
- const next = findNextUnDisabled(label, now, step, currentScrollbar.value === "hours" ? 24 : 60);
- modifyDateField(label, next);
- adjustSpinner(label, next);
- nextTick(() => emitSelectRange(label));
- };
- const findNextUnDisabled = (type, now, step, total) => {
- let next = (now + step + total) % total;
- const list = unref(timeList)[type];
- while (list[next] && next !== now) next = (next + step + total) % total;
- return next;
- };
- const modifyDateField = (type, value) => {
- if (unref(timeList)[type][value]) return;
- const { hours, minutes, seconds } = unref(timePartials);
- let changeTo;
- switch (type) {
- case "hours":
- changeTo = props.spinnerDate.hour(value).minute(minutes).second(seconds);
- break;
- case "minutes":
- changeTo = props.spinnerDate.hour(hours).minute(value).second(seconds);
- break;
- case "seconds":
- changeTo = props.spinnerDate.hour(hours).minute(minutes).second(value);
- break;
- }
- emit(CHANGE_EVENT, changeTo);
- };
- const handleClick = (type, { value, disabled }) => {
- if (!disabled) {
- modifyDateField(type, value);
- emitSelectRange(type);
- adjustSpinner(type, value);
- }
- };
- const handleScroll = (type) => {
- if (!saveOnBlur && ignoreScroll[type]) return;
- const scrollbar = unref(listRefsMap[type]);
- if (!scrollbar) return;
- isScrolling = true;
- debouncedResetScroll(type);
- modifyDateField(type, Math.min(Math.round((getScrollbarElement(scrollbar.$el).scrollTop - (scrollBarHeight(type) * .5 - 10) / typeItemHeight(type) + 3) / typeItemHeight(type)), type === "hours" ? 23 : 59));
- };
- const scrollBarHeight = (type) => {
- return unref(listRefsMap[type]).$el.offsetHeight;
- };
- const bindScrollEvent = () => {
- const bindFunction = (type) => {
- const scrollbar = unref(listRefsMap[type]);
- if (scrollbar && scrollbar.$el) getScrollbarElement(scrollbar.$el).onscroll = () => {
- handleScroll(type);
- };
- };
- bindFunction("hours");
- bindFunction("minutes");
- bindFunction("seconds");
- };
- onMounted(() => {
- nextTick(() => {
- !props.arrowControl && bindScrollEvent();
- adjustSpinners();
- if (props.role === "start") emitSelectRange("hours");
- });
- });
- const setRef = (scrollbar, type) => {
- listRefsMap[type].value = scrollbar ?? void 0;
- };
- emit("set-option", [`${props.role}_scrollDown`, scrollDown]);
- emit("set-option", [`${props.role}_emitSelectRange`, emitSelectRange]);
- watch(() => props.spinnerDate, () => {
- if (isScrolling) return;
- adjustSpinners();
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b("spinner"), { "has-seconds": _ctx.showSeconds }]) }, [!_ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(spinnerItems.value, (item) => {
- return openBlock(), createBlock(unref(ElScrollbar), {
- key: item,
- ref_for: true,
- ref: (scrollbar) => setRef(scrollbar, item),
- class: normalizeClass(unref(ns).be("spinner", "wrapper")),
- "wrap-style": "max-height: inherit;",
- "view-class": unref(ns).be("spinner", "list"),
- noresize: "",
- tag: "ul",
- onMouseenter: ($event) => emitSelectRange(item),
- onMousemove: ($event) => adjustCurrentSpinner(item)
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(timeList.value[item], (disabled, key) => {
- return openBlock(), createElementBlock("li", {
- key,
- class: normalizeClass([
- unref(ns).be("spinner", "item"),
- unref(ns).is("active", key === timePartials.value[item]),
- unref(ns).is("disabled", disabled)
- ]),
- onClick: ($event) => handleClick(item, {
- value: key,
- disabled
- })
- }, [item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? key % 12 || 12 : key)).slice(-2)) + toDisplayString(getAmPmFlag(key)), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(("0" + key).slice(-2)), 1)], 64))], 10, _hoisted_1$70);
- }), 128))]),
- _: 2
- }, 1032, [
- "class",
- "view-class",
- "onMouseenter",
- "onMousemove"
- ]);
- }), 128)) : createCommentVNode("v-if", true), _ctx.arrowControl ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(spinnerItems.value, (item) => {
- return openBlock(), createElementBlock("div", {
- key: item,
- class: normalizeClass([unref(ns).be("spinner", "wrapper"), unref(ns).is("arrow")]),
- onMouseenter: ($event) => emitSelectRange(item)
- }, [
- withDirectives((openBlock(), createBlock(unref(ElIcon), { class: normalizeClass(["arrow-up", unref(ns).be("spinner", "arrow")]) }, {
- default: withCtx(() => [createVNode(unref(arrow_up_default))]),
- _: 1
- }, 8, ["class"])), [[unref(vRepeatClick), onDecrement]]),
- withDirectives((openBlock(), createBlock(unref(ElIcon), { class: normalizeClass(["arrow-down", unref(ns).be("spinner", "arrow")]) }, {
- default: withCtx(() => [createVNode(unref(arrow_down_default))]),
- _: 1
- }, 8, ["class"])), [[unref(vRepeatClick), onIncrement]]),
- createBaseVNode("ul", { class: normalizeClass(unref(ns).be("spinner", "list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(arrowControlTimeList.value[item], (time, key) => {
- return openBlock(), createElementBlock("li", {
- key,
- class: normalizeClass([
- unref(ns).be("spinner", "item"),
- unref(ns).is("active", time === timePartials.value[item]),
- unref(ns).is("disabled", timeList.value[item][time])
- ])
- }, [unref(isNumber)(time) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [item === "hours" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(("0" + (_ctx.amPmMode ? time % 12 || 12 : time)).slice(-2)) + toDisplayString(getAmPmFlag(time)), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(("0" + time).slice(-2)), 1)], 64))], 64)) : createCommentVNode("v-if", true)], 2);
- }), 128))], 2)
- ], 42, _hoisted_2$39);
- }), 128)) : createCommentVNode("v-if", true)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-pick.mjs
- var panel_time_pick_default = /* @__PURE__ */ defineComponent({
- __name: "panel-time-pick",
- props: panelTimePickerProps,
- emits: [
- "pick",
- "select-range",
- "set-picker-option"
- ],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
- const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;
- const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours, disabledMinutes, disabledSeconds);
- const ns = useNamespace("time");
- const { t, lang } = useLocale();
- const selectionRange = ref([0, 2]);
- const oldValue = useOldValue(props, {
- modelValue: computed(() => pickerBase.props.modelValue),
- valueOnClear: computed(() => pickerBase?.emptyValues ? pickerBase.emptyValues.valueOnClear.value : null)
- });
- const transitionName = computed(() => {
- return isUndefined(props.actualVisible) ? `${ns.namespace.value}-zoom-in-top` : "";
- });
- const showSeconds = computed(() => {
- return props.format.includes("ss");
- });
- const amPmMode = computed(() => {
- if (props.format.includes("A")) return "A";
- if (props.format.includes("a")) return "a";
- return "";
- });
- const isValidValue = (_date) => {
- const parsedDate = (0, import_dayjs_min.default)(_date).locale(lang.value);
- const result = getRangeAvailableTime(parsedDate);
- return parsedDate.isSame(result);
- };
- const handleCancel = () => {
- const old = oldValue.value;
- emit("pick", old, false);
- nextTick(() => {
- oldValue.value = old;
- });
- };
- const handleConfirm = (visible = false, first = false) => {
- if (first) return;
- emit("pick", props.parsedValue, visible);
- };
- const handleChange = (_date) => {
- if (!props.visible) return;
- emit("pick", getRangeAvailableTime(_date).millisecond(0), true);
- };
- const setSelectionRange = (start, end) => {
- emit("select-range", start, end);
- selectionRange.value = [start, end];
- };
- const changeSelectionRange = (step) => {
- const actualFormat = props.format;
- const hourIndex = actualFormat.indexOf("HH");
- const minuteIndex = actualFormat.indexOf("mm");
- const secondIndex = actualFormat.indexOf("ss");
- const list = [];
- const mapping = [];
- if (hourIndex !== -1) {
- list.push(hourIndex);
- mapping.push("hours");
- }
- if (minuteIndex !== -1) {
- list.push(minuteIndex);
- mapping.push("minutes");
- }
- if (secondIndex !== -1 && showSeconds.value) {
- list.push(secondIndex);
- mapping.push("seconds");
- }
- const next = (list.indexOf(selectionRange.value[0]) + step + list.length) % list.length;
- timePickerOptions["start_emitSelectRange"](mapping[next]);
- };
- const handleKeydown = (event) => {
- const code = getEventCode(event);
- const { left, right, up, down } = EVENT_CODE;
- if ([left, right].includes(code)) {
- changeSelectionRange(code === left ? -1 : 1);
- event.preventDefault();
- return;
- }
- if ([up, down].includes(code)) {
- const step = code === up ? -1 : 1;
- timePickerOptions["start_scrollDown"](step);
- event.preventDefault();
- return;
- }
- };
- const { timePickerOptions, onSetOption, getAvailableTime } = useTimePanel({
- getAvailableHours,
- getAvailableMinutes,
- getAvailableSeconds
- });
- const getRangeAvailableTime = (date) => {
- return getAvailableTime(date, props.datetimeRole || "", true);
- };
- const parseUserInput = (value) => {
- if (!value) return null;
- return (0, import_dayjs_min.default)(value, props.format).locale(lang.value);
- };
- const getDefaultValue = () => {
- return (0, import_dayjs_min.default)(defaultValue).locale(lang.value);
- };
- emit("set-picker-option", ["isValidValue", isValidValue]);
- emit("set-picker-option", ["parseUserInput", parseUserInput]);
- emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
- emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
- emit("set-picker-option", ["getDefaultValue", getDefaultValue]);
- emit("set-picker-option", ["handleCancel", handleCancel]);
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, { name: transitionName.value }, {
- default: withCtx(() => [_ctx.actualVisible || _ctx.visible ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).b("panel"))
- }, [createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "content"), { "has-seconds": showSeconds.value }]) }, [createVNode(basic_time_spinner_default, {
- ref: "spinner",
- role: _ctx.datetimeRole || "start",
- "arrow-control": unref(arrowControl),
- "show-seconds": showSeconds.value,
- "am-pm-mode": amPmMode.value,
- "spinner-date": _ctx.parsedValue,
- "disabled-hours": unref(disabledHours),
- "disabled-minutes": unref(disabledMinutes),
- "disabled-seconds": unref(disabledSeconds),
- onChange: handleChange,
- onSetOption: unref(onSetOption),
- onSelectRange: setSelectionRange
- }, null, 8, [
- "role",
- "arrow-control",
- "show-seconds",
- "am-pm-mode",
- "spinner-date",
- "disabled-hours",
- "disabled-minutes",
- "disabled-seconds",
- "onSetOption"
- ])], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).be("panel", "footer")) }, [createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ns).be("panel", "btn"), "cancel"]),
- onClick: handleCancel
- }, toDisplayString(unref(t)("el.datepicker.cancel")), 3), createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ns).be("panel", "btn"), "confirm"]),
- onClick: _cache[0] || (_cache[0] = ($event) => handleConfirm())
- }, toDisplayString(unref(t)("el.datepicker.confirm")), 3)], 2)], 2)) : createCommentVNode("v-if", true)]),
- _: 1
- }, 8, ["name"]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/props/panel-time-range.mjs
- var panelTimeRangeProps = buildProps({
- ...timePanelSharedProps,
- parsedValue: { type: definePropType(Array) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$69 = ["disabled"];
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/time-picker-com/panel-time-range.mjs
- var panel_time_range_default = /* @__PURE__ */ defineComponent({
- __name: "panel-time-range",
- props: panelTimeRangeProps,
- emits: [
- "pick",
- "select-range",
- "set-picker-option"
- ],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const makeSelectRange = (start, end) => {
- const result = [];
- for (let i = start; i <= end; i++) result.push(i);
- return result;
- };
- const { t, lang } = useLocale();
- const nsTime = useNamespace("time");
- const nsPicker = useNamespace("picker");
- const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
- const { arrowControl, disabledHours, disabledMinutes, disabledSeconds, defaultValue } = pickerBase.props;
- const startContainerKls = computed(() => [
- nsTime.be("range-picker", "body"),
- nsTime.be("panel", "content"),
- nsTime.is("arrow", arrowControl),
- showSeconds.value ? "has-seconds" : ""
- ]);
- const endContainerKls = computed(() => [
- nsTime.be("range-picker", "body"),
- nsTime.be("panel", "content"),
- nsTime.is("arrow", arrowControl),
- showSeconds.value ? "has-seconds" : ""
- ]);
- const startTime = computed(() => props.parsedValue[0]);
- const endTime = computed(() => props.parsedValue[1]);
- const oldValue = useOldValue(props, {
- modelValue: computed(() => pickerBase.props.modelValue),
- valueOnClear: computed(() => pickerBase?.emptyValues ? pickerBase.emptyValues.valueOnClear.value : null)
- });
- const handleCancel = () => {
- const old = oldValue.value;
- emit("pick", old, false);
- nextTick(() => {
- oldValue.value = old;
- });
- };
- const showSeconds = computed(() => {
- return props.format.includes("ss");
- });
- const amPmMode = computed(() => {
- if (props.format.includes("A")) return "A";
- if (props.format.includes("a")) return "a";
- return "";
- });
- const handleConfirm = (visible = false) => {
- emit("pick", [startTime.value, endTime.value], visible);
- };
- const handleMinChange = (date) => {
- handleChange(date.millisecond(0), endTime.value);
- };
- const handleMaxChange = (date) => {
- handleChange(startTime.value, date.millisecond(0));
- };
- const isValidValue = (_date) => {
- const parsedDate = _date.map((_) => (0, import_dayjs_min.default)(_).locale(lang.value));
- const result = getRangeAvailableTime(parsedDate);
- return parsedDate[0].isSame(result[0]) && parsedDate[1].isSame(result[1]);
- };
- const handleChange = (start, end) => {
- if (!props.visible) return;
- emit("pick", [start, end], true);
- };
- const btnConfirmDisabled = computed(() => {
- return startTime.value > endTime.value;
- });
- const selectionRange = ref([0, 2]);
- const setMinSelectionRange = (start, end) => {
- emit("select-range", start, end, "min");
- selectionRange.value = [start, end];
- };
- const offset = computed(() => showSeconds.value ? 11 : 8);
- const setMaxSelectionRange = (start, end) => {
- emit("select-range", start, end, "max");
- const _offset = unref(offset);
- selectionRange.value = [start + _offset, end + _offset];
- };
- const changeSelectionRange = (step) => {
- const list = showSeconds.value ? [
- 0,
- 3,
- 6,
- 11,
- 14,
- 17
- ] : [
- 0,
- 3,
- 8,
- 11
- ];
- const mapping = ["hours", "minutes"].concat(showSeconds.value ? ["seconds"] : []);
- const next = (list.indexOf(selectionRange.value[0]) + step + list.length) % list.length;
- const half = list.length / 2;
- if (next < half) timePickerOptions["start_emitSelectRange"](mapping[next]);
- else timePickerOptions["end_emitSelectRange"](mapping[next - half]);
- };
- const handleKeydown = (event) => {
- const code = getEventCode(event);
- const { left, right, up, down } = EVENT_CODE;
- if ([left, right].includes(code)) {
- changeSelectionRange(code === left ? -1 : 1);
- event.preventDefault();
- return;
- }
- if ([up, down].includes(code)) {
- const step = code === up ? -1 : 1;
- timePickerOptions[`${selectionRange.value[0] < offset.value ? "start" : "end"}_scrollDown`](step);
- event.preventDefault();
- return;
- }
- };
- const disabledHours_ = (role, compare) => {
- const defaultDisable = disabledHours ? disabledHours(role) : [];
- const isStart = role === "start";
- const compareHour = (compare || (isStart ? endTime.value : startTime.value)).hour();
- return union(defaultDisable, isStart ? makeSelectRange(compareHour + 1, 23) : makeSelectRange(0, compareHour - 1));
- };
- const disabledMinutes_ = (hour, role, compare) => {
- const defaultDisable = disabledMinutes ? disabledMinutes(hour, role) : [];
- const isStart = role === "start";
- const compareDate = compare || (isStart ? endTime.value : startTime.value);
- if (hour !== compareDate.hour()) return defaultDisable;
- const compareMinute = compareDate.minute();
- return union(defaultDisable, isStart ? makeSelectRange(compareMinute + 1, 59) : makeSelectRange(0, compareMinute - 1));
- };
- const disabledSeconds_ = (hour, minute, role, compare) => {
- const defaultDisable = disabledSeconds ? disabledSeconds(hour, minute, role) : [];
- const isStart = role === "start";
- const compareDate = compare || (isStart ? endTime.value : startTime.value);
- const compareHour = compareDate.hour();
- const compareMinute = compareDate.minute();
- if (hour !== compareHour || minute !== compareMinute) return defaultDisable;
- const compareSecond = compareDate.second();
- return union(defaultDisable, isStart ? makeSelectRange(compareSecond + 1, 59) : makeSelectRange(0, compareSecond - 1));
- };
- const getRangeAvailableTime = ([start, end]) => {
- return [getAvailableTime(start, "start", true, end), getAvailableTime(end, "end", false, start)];
- };
- const { getAvailableHours, getAvailableMinutes, getAvailableSeconds } = buildAvailableTimeSlotGetter(disabledHours_, disabledMinutes_, disabledSeconds_);
- const { timePickerOptions, getAvailableTime, onSetOption } = useTimePanel({
- getAvailableHours,
- getAvailableMinutes,
- getAvailableSeconds
- });
- const parseUserInput = (days) => {
- if (!days) return null;
- if (isArray$1(days)) return days.map((d) => (0, import_dayjs_min.default)(d, props.format).locale(lang.value));
- return (0, import_dayjs_min.default)(days, props.format).locale(lang.value);
- };
- const getDefaultValue = () => {
- if (isArray$1(defaultValue)) return defaultValue.map((d) => (0, import_dayjs_min.default)(d).locale(lang.value));
- const defaultDay = (0, import_dayjs_min.default)(defaultValue).locale(lang.value);
- return [defaultDay, defaultDay.add(60, "m")];
- };
- emit("set-picker-option", ["parseUserInput", parseUserInput]);
- emit("set-picker-option", ["isValidValue", isValidValue]);
- emit("set-picker-option", ["handleKeydownInput", handleKeydown]);
- emit("set-picker-option", ["getDefaultValue", getDefaultValue]);
- emit("set-picker-option", ["getRangeAvailableTime", getRangeAvailableTime]);
- emit("set-picker-option", ["handleCancel", handleCancel]);
- return (_ctx, _cache) => {
- return _ctx.actualVisible ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(nsTime).b("range-picker"), unref(nsPicker).b("panel")])
- }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "content")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "cell")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.startTime")), 3), createBaseVNode("div", { class: normalizeClass(startContainerKls.value) }, [createVNode(basic_time_spinner_default, {
- ref: "minSpinner",
- role: "start",
- "show-seconds": showSeconds.value,
- "am-pm-mode": amPmMode.value,
- "arrow-control": unref(arrowControl),
- "spinner-date": startTime.value,
- "disabled-hours": disabledHours_,
- "disabled-minutes": disabledMinutes_,
- "disabled-seconds": disabledSeconds_,
- onChange: handleMinChange,
- onSetOption: unref(onSetOption),
- onSelectRange: setMinSelectionRange
- }, null, 8, [
- "show-seconds",
- "am-pm-mode",
- "arrow-control",
- "spinner-date",
- "onSetOption"
- ])], 2)], 2), createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "cell")) }, [createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("range-picker", "header")) }, toDisplayString(unref(t)("el.datepicker.endTime")), 3), createBaseVNode("div", { class: normalizeClass(endContainerKls.value) }, [createVNode(basic_time_spinner_default, {
- ref: "maxSpinner",
- role: "end",
- "show-seconds": showSeconds.value,
- "am-pm-mode": amPmMode.value,
- "arrow-control": unref(arrowControl),
- "spinner-date": endTime.value,
- "disabled-hours": disabledHours_,
- "disabled-minutes": disabledMinutes_,
- "disabled-seconds": disabledSeconds_,
- onChange: handleMaxChange,
- onSetOption: unref(onSetOption),
- onSelectRange: setMaxSelectionRange
- }, null, 8, [
- "show-seconds",
- "am-pm-mode",
- "arrow-control",
- "spinner-date",
- "onSetOption"
- ])], 2)], 2)], 2), createBaseVNode("div", { class: normalizeClass(unref(nsTime).be("panel", "footer")) }, [createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(nsTime).be("panel", "btn"), "cancel"]),
- onClick: _cache[0] || (_cache[0] = ($event) => handleCancel())
- }, toDisplayString(unref(t)("el.datepicker.cancel")), 3), createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(nsTime).be("panel", "btn"), "confirm"]),
- disabled: btnConfirmDisabled.value,
- onClick: _cache[1] || (_cache[1] = ($event) => handleConfirm())
- }, toDisplayString(unref(t)("el.datepicker.confirm")), 11, _hoisted_1$69)], 2)], 2)) : createCommentVNode("v-if", true);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/src/time-picker.mjs
- var import_customParseFormat = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, t) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
- })(exports, (function() {
- "use strict";
- var e = {
- LTS: "h:mm:ss A",
- LT: "h:mm A",
- L: "MM/DD/YYYY",
- LL: "MMMM D, YYYY",
- LLL: "MMMM D, YYYY h:mm A",
- LLLL: "dddd, MMMM D, YYYY h:mm A"
- }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e) {
- return (e = +e) + (e > 68 ? 1900 : 2e3);
- };
- var f = function(e) {
- return function(t) {
- this[e] = +t;
- };
- }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e) {
- (this.zone || (this.zone = {})).offset = function(e) {
- if (!e) return 0;
- if ("Z" === e) return 0;
- var t = e.match(/([+-]|\d\d)/g), n = 60 * t[1] + (+t[2] || 0);
- return 0 === n ? 0 : "+" === t[0] ? -n : n;
- }(e);
- }], u = function(e) {
- var t = s[e];
- return t && (t.indexOf ? t : t.s.concat(t.f));
- }, d = function(e, t) {
- var n, r = s.meridiem;
- if (r) {
- for (var i = 1; i <= 24; i += 1) if (e.indexOf(r(i, 0, t)) > -1) {
- n = i > 12;
- break;
- }
- } else n = e === (t ? "pm" : "PM");
- return n;
- }, c = {
- A: [o, function(e) {
- this.afternoon = d(e, !1);
- }],
- a: [o, function(e) {
- this.afternoon = d(e, !0);
- }],
- Q: [n, function(e) {
- this.month = 3 * (e - 1) + 1;
- }],
- S: [n, function(e) {
- this.milliseconds = 100 * +e;
- }],
- SS: [r, function(e) {
- this.milliseconds = 10 * +e;
- }],
- SSS: [/\d{3}/, function(e) {
- this.milliseconds = +e;
- }],
- s: [i, f("seconds")],
- ss: [i, f("seconds")],
- m: [i, f("minutes")],
- mm: [i, f("minutes")],
- H: [i, f("hours")],
- h: [i, f("hours")],
- HH: [i, f("hours")],
- hh: [i, f("hours")],
- D: [i, f("day")],
- DD: [r, f("day")],
- Do: [o, function(e) {
- var t = s.ordinal;
- if (this.day = e.match(/\d+/)[0], t) for (var r = 1; r <= 31; r += 1) t(r).replace(/\[|\]/g, "") === e && (this.day = r);
- }],
- w: [i, f("week")],
- ww: [r, f("week")],
- M: [i, f("month")],
- MM: [r, f("month")],
- MMM: [o, function(e) {
- var t = u("months"), n = (u("monthsShort") || t.map((function(e) {
- return e.slice(0, 3);
- }))).indexOf(e) + 1;
- if (n < 1) throw new Error();
- this.month = n % 12 || n;
- }],
- MMMM: [o, function(e) {
- var t = u("months").indexOf(e) + 1;
- if (t < 1) throw new Error();
- this.month = t % 12 || t;
- }],
- Y: [/[+-]?\d+/, f("year")],
- YY: [r, function(e) {
- this.year = a(e);
- }],
- YYYY: [/\d{4}/, f("year")],
- Z: h,
- ZZ: h
- };
- function l(n) {
- var r = n, i = s && s.formats;
- for (var o = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t, n, r) {
- var o = r && r.toUpperCase();
- return n || i[r] || e[r] || i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e, t, n) {
- return t || n.slice(1);
- }));
- }))).match(t), a = o.length, f = 0; f < a; f += 1) {
- var h = o[f], u = c[h], d = u && u[0], l = u && u[1];
- o[f] = l ? {
- regex: d,
- parser: l
- } : h.replace(/^\[|\]$/g, "");
- }
- return function(e) {
- for (var t = {}, n = 0, r = 0; n < a; n += 1) {
- var i = o[n];
- if ("string" == typeof i) r += i.length;
- else {
- var s = i.regex, f = i.parser, h = e.slice(r), u = s.exec(h)[0];
- f.call(t, u), e = e.replace(u, "");
- }
- }
- return function(e) {
- var t = e.afternoon;
- if (void 0 !== t) {
- var n = e.hours;
- t ? n < 12 && (e.hours += 12) : 12 === n && (e.hours = 0), delete e.afternoon;
- }
- }(t), t;
- };
- }
- return function(e, t, n) {
- n.p.customParseFormat = !0, e && e.parseTwoDigitYear && (a = e.parseTwoDigitYear);
- var r = t.prototype, i = r.parse;
- r.parse = function(e) {
- var t = e.date, r = e.utc, o = e.args;
- this.$u = r;
- var a = o[1];
- if ("string" == typeof a) {
- var f = !0 === o[2], h = !0 === o[3], u = f || h, d = o[2];
- h && (d = o[2]), s = this.$locale(), !f && d && (s = n.Ls[d]), this.$d = function(e, t, n, r) {
- try {
- if (["x", "X"].indexOf(t) > -1) return /* @__PURE__ */ new Date(("X" === t ? 1e3 : 1) * e);
- var i = l(t)(e), o = i.year, s = i.month, a = i.day, f = i.hours, h = i.minutes, u = i.seconds, d = i.milliseconds, c = i.zone, m = i.week, M = /* @__PURE__ */ new Date(), Y = a || (o || s ? 1 : M.getDate()), p = o || M.getFullYear(), v = 0;
- o && !s || (v = s > 0 ? s - 1 : M.getMonth());
- var D, w = f || 0, g = h || 0, y = u || 0, L = d || 0;
- return c ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c.offset * 1e3)) : n ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m && (D = r(D).week(m).toDate()), D);
- } catch (e) {
- return /* @__PURE__ */ new Date("");
- }
- }(t, a, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(a) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
- } else if (a instanceof Array) for (var c = a.length, m = 1; m <= c; m += 1) {
- o[1] = a[m - 1];
- var M = n.apply(this, o);
- if (M.isValid()) {
- this.$d = M.$d, this.$L = M.$L, this.init();
- break;
- }
- m === c && (this.$d = /* @__PURE__ */ new Date(""));
- }
- else i.call(this, e);
- };
- };
- }));
- })))(), 1);
- import_dayjs_min.default.extend(import_customParseFormat.default);
- //#endregion
- //#region node_modules/element-plus/es/components/time-picker/index.mjs
- var ElTimePicker = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElTimePicker",
- install: null,
- props: {
- ...timePickerDefaultProps,
- isRange: Boolean
- },
- emits: [UPDATE_MODEL_EVENT],
- setup(props, ctx) {
- const commonPicker = ref();
- const [type, Panel] = props.isRange ? ["timerange", panel_time_range_default] : ["time", panel_time_pick_default];
- const modelUpdater = (value) => ctx.emit(UPDATE_MODEL_EVENT, value);
- provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, props.popperOptions);
- ctx.expose({
- focus: () => {
- commonPicker.value?.focus();
- },
- blur: () => {
- commonPicker.value?.blur();
- },
- handleOpen: () => {
- commonPicker.value?.handleOpen();
- },
- handleClose: () => {
- commonPicker.value?.handleClose();
- }
- });
- return () => {
- const format = props.format ?? "HH:mm:ss";
- return createVNode(picker_default, mergeProps(props, {
- "ref": commonPicker,
- "type": type,
- "format": format,
- "onUpdate:modelValue": modelUpdater
- }), { default: (props) => createVNode(Panel, props, null) });
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/tag/src/tag.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TagProps` instead.
- */
- var tagProps = buildProps({
- type: {
- type: String,
- values: [
- "primary",
- "success",
- "info",
- "warning",
- "danger"
- ],
- default: "primary"
- },
- closable: Boolean,
- disableTransitions: Boolean,
- hit: Boolean,
- color: String,
- size: {
- type: String,
- values: componentSizes
- },
- effect: {
- type: String,
- values: [
- "dark",
- "light",
- "plain"
- ],
- default: "light"
- },
- round: Boolean
- });
- var tagEmits = {
- close: (evt) => evt instanceof MouseEvent,
- click: (evt) => evt instanceof MouseEvent
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tag/src/tag.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$68 = ["aria-label"];
- var _hoisted_2$38 = ["aria-label"];
- //#endregion
- //#region node_modules/element-plus/es/components/tag/index.mjs
- var ElTag = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElTag",
- __name: "tag",
- props: tagProps,
- emits: tagEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const tagSize = useFormSize();
- const { t } = useLocale();
- const ns = useNamespace("tag");
- const containerKls = computed(() => {
- const { type, hit, effect, closable, round } = props;
- return [
- ns.b(),
- ns.is("closable", closable),
- ns.m(type || "primary"),
- ns.m(tagSize.value),
- ns.m(effect),
- ns.is("hit", hit),
- ns.is("round", round)
- ];
- });
- const handleClose = (event) => {
- emit("close", event);
- };
- const handleClick = (event) => {
- emit("click", event);
- };
- const handleVNodeMounted = (vnode) => {
- if (vnode?.component?.subTree?.component?.bum) vnode.component.subTree.component.bum = null;
- };
- return (_ctx, _cache) => {
- return __props.disableTransitions ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(containerKls.value),
- style: normalizeStyle({ backgroundColor: __props.color }),
- onClick: handleClick
- }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2), __props.closable ? (openBlock(), createElementBlock("button", {
- key: 0,
- "aria-label": unref(t)("el.tag.close"),
- class: normalizeClass(unref(ns).e("close")),
- type: "button",
- onClick: withModifiers(handleClose, ["stop"])
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- })], 10, _hoisted_1$68)) : createCommentVNode("v-if", true)], 6)) : (openBlock(), createBlock(Transition, {
- key: 1,
- name: `${unref(ns).namespace.value}-zoom-in-center`,
- appear: "",
- onVnodeMounted: handleVNodeMounted
- }, {
- default: withCtx(() => [createBaseVNode("span", {
- class: normalizeClass(containerKls.value),
- style: normalizeStyle({ backgroundColor: __props.color }),
- onClick: handleClick
- }, [createBaseVNode("span", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2), __props.closable ? (openBlock(), createElementBlock("button", {
- key: 0,
- "aria-label": unref(t)("el.tag.close"),
- class: normalizeClass(unref(ns).e("close")),
- type: "button",
- onClick: withModifiers(handleClose, ["stop"])
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- })], 10, _hoisted_2$38)) : createCommentVNode("v-if", true)], 6)]),
- _: 3
- }, 8, ["name"]));
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/token.mjs
- var selectGroupKey = Symbol("ElSelectGroup");
- var selectKey = Symbol("ElSelect");
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/useProps.mjs
- var defaultProps$2 = {
- label: "label",
- value: "value",
- disabled: "disabled",
- options: "options"
- };
- function useProps(props) {
- const aliasProps = ref({
- ...defaultProps$2,
- ...props.props
- });
- let cache = { ...props.props };
- watch(() => props.props, (val) => {
- if (!isEqual$1(val, cache)) {
- aliasProps.value = {
- ...defaultProps$2,
- ...val
- };
- cache = { ...val };
- }
- }, { deep: true });
- const getLabel = (option) => get(option, aliasProps.value.label);
- const getValue = (option) => get(option, aliasProps.value.value);
- const getDisabled = (option) => get(option, aliasProps.value.disabled);
- const getOptions = (option) => get(option, aliasProps.value.options);
- return {
- aliasProps,
- getLabel,
- getValue,
- getDisabled,
- getOptions
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/select.mjs
- var selectProps = buildProps({
- name: String,
- id: String,
- modelValue: {
- type: definePropType([
- Array,
- String,
- Number,
- Boolean,
- Object
- ]),
- default: void 0
- },
- autocomplete: {
- type: String,
- default: "off"
- },
- automaticDropdown: Boolean,
- size: useSizeProp,
- effect: {
- type: definePropType(String),
- default: "light"
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- clearable: Boolean,
- filterable: Boolean,
- allowCreate: Boolean,
- loading: Boolean,
- popperClass: {
- type: String,
- default: ""
- },
- popperStyle: { type: definePropType([String, Object]) },
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- remote: Boolean,
- debounce: {
- type: Number,
- default: 300
- },
- loadingText: String,
- noMatchText: String,
- noDataText: String,
- remoteMethod: { type: definePropType(Function) },
- filterMethod: { type: definePropType(Function) },
- multiple: Boolean,
- multipleLimit: {
- type: Number,
- default: 0
- },
- placeholder: { type: String },
- defaultFirstOption: Boolean,
- reserveKeyword: {
- type: Boolean,
- default: true
- },
- valueKey: {
- type: String,
- default: "value"
- },
- collapseTags: Boolean,
- collapseTagsTooltip: Boolean,
- tagTooltip: {
- type: definePropType(Object),
- default: () => ({})
- },
- maxCollapseTags: {
- type: Number,
- default: 1
- },
- teleported: useTooltipContentProps.teleported,
- persistent: {
- type: Boolean,
- default: true
- },
- clearIcon: {
- type: iconPropType,
- default: circle_close_default
- },
- fitInputWidth: Boolean,
- suffixIcon: {
- type: iconPropType,
- default: arrow_down_default
- },
- tagType: {
- ...tagProps.type,
- default: "info"
- },
- tagEffect: {
- ...tagProps.effect,
- default: "light"
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- remoteShowSuffix: Boolean,
- showArrow: {
- type: Boolean,
- default: true
- },
- offset: {
- type: Number,
- default: 12
- },
- placement: {
- type: definePropType(String),
- values: Ee,
- default: "bottom-start"
- },
- fallbackPlacements: {
- type: definePropType(Array),
- default: [
- "bottom-start",
- "top-start",
- "right",
- "left"
- ]
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- appendTo: useTooltipContentProps.appendTo,
- options: { type: definePropType(Array) },
- props: {
- type: definePropType(Object),
- default: () => defaultProps$2
- },
- ...useEmptyValuesProps,
- ...useAriaProps(["ariaLabel"])
- });
- var selectEmits = {
- [UPDATE_MODEL_EVENT]: (val) => true,
- [CHANGE_EVENT]: (val) => true,
- "popup-scroll": scrollbarEmits.scroll,
- "remove-tag": (val) => true,
- "visible-change": (visible) => true,
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/option.mjs
- var COMPONENT_NAME$14 = "ElOption";
- var optionProps = buildProps({
- value: {
- type: [
- String,
- Number,
- Boolean,
- Object
- ],
- required: true
- },
- label: { type: [String, Number] },
- created: Boolean,
- disabled: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/useOption.mjs
- function useOption$1(props, states) {
- const select = inject(selectKey);
- if (!select) throwError(COMPONENT_NAME$14, "usage: <el-select><el-option /></el-select/>");
- const selectGroup = inject(selectGroupKey, { disabled: false });
- const itemSelected = computed(() => {
- return contains(castArray$1(select.props.modelValue), props.value);
- });
- const limitReached = computed(() => {
- if (select.props.multiple) {
- const modelValue = castArray$1(select.props.modelValue ?? []);
- return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
- } else return false;
- });
- const currentLabel = computed(() => {
- return props.label ?? (isObject$2(props.value) ? "" : props.value);
- });
- const currentValue = computed(() => {
- return props.value || props.label || "";
- });
- const isDisabled = computed(() => {
- return props.disabled || states.groupDisabled || limitReached.value;
- });
- const instance = getCurrentInstance();
- const contains = (arr = [], target) => {
- if (!isObject$2(props.value)) return arr && arr.includes(target);
- else {
- const valueKey = select.props.valueKey;
- return arr && arr.some((item) => {
- return toRaw(get(item, valueKey)) === get(target, valueKey);
- });
- }
- };
- const hoverItem = () => {
- if (!isDisabled.value) select.states.hoveringIndex = select.optionsArray.indexOf(instance.proxy);
- };
- const updateOption = (query) => {
- states.visible = new RegExp(escapeStringRegexp(query), "i").test(String(currentLabel.value)) || props.created;
- };
- watch(() => currentLabel.value, () => {
- if (!props.created && !select.props.remote) select.setSelected();
- });
- watch(() => props.value, (val, oldVal) => {
- const { remote, valueKey } = select.props;
- if (remote ? val !== oldVal : !isEqual$1(val, oldVal)) {
- select.onOptionDestroy(oldVal, instance.proxy);
- select.onOptionCreate(instance.proxy);
- }
- if (!props.created && !remote) {
- if (valueKey && isObject$2(val) && isObject$2(oldVal) && val[valueKey] === oldVal[valueKey]) return;
- select.setSelected();
- }
- });
- watch(() => selectGroup.disabled, () => {
- states.groupDisabled = selectGroup.disabled;
- }, { immediate: true });
- return {
- select,
- currentLabel,
- currentValue,
- itemSelected,
- isDisabled,
- hoverItem,
- updateOption
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs
- var option_vue_vue_type_script_lang_default = defineComponent({
- name: COMPONENT_NAME$14,
- componentName: COMPONENT_NAME$14,
- props: optionProps,
- setup(props) {
- const ns = useNamespace("select");
- const id = useId();
- const containerKls = computed(() => [
- ns.be("dropdown", "item"),
- ns.is("disabled", unref(isDisabled)),
- ns.is("selected", unref(itemSelected)),
- ns.is("hovering", unref(hover))
- ]);
- const states = reactive({
- index: -1,
- groupDisabled: false,
- visible: true,
- hover: false
- });
- const { currentLabel, itemSelected, isDisabled, select, hoverItem, updateOption } = useOption$1(props, states);
- const { visible, hover } = toRefs(states);
- const vm = getCurrentInstance().proxy;
- select.onOptionCreate(vm);
- onBeforeUnmount(() => {
- const key = vm.value;
- nextTick(() => {
- const { selected: selectedOptions } = select.states;
- const doesSelected = selectedOptions.some((item) => {
- return item.value === vm.value;
- });
- if (select.states.cachedOptions.get(key) === vm && !doesSelected) select.states.cachedOptions.delete(key);
- });
- select.onOptionDestroy(key, vm);
- });
- function selectOptionClick() {
- if (!isDisabled.value) select.handleOptionSelect(vm);
- }
- return {
- ns,
- id,
- containerKls,
- currentLabel,
- itemSelected,
- isDisabled,
- select,
- visible,
- hover,
- states,
- hoverItem,
- updateOption,
- selectOptionClick
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/option2.mjs
- var _hoisted_1$67 = [
- "id",
- "aria-disabled",
- "aria-selected"
- ];
- function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
- return withDirectives((openBlock(), createElementBlock("li", {
- id: _ctx.id,
- class: normalizeClass(_ctx.containerKls),
- role: "option",
- "aria-disabled": _ctx.isDisabled || void 0,
- "aria-selected": _ctx.itemSelected,
- onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
- onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentLabel), 1)])], 42, _hoisted_1$67)), [[vShow, _ctx.visible]]);
- }
- var option_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_vue_vue_type_script_lang_default, [["render", _sfc_render$20]]);
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs
- var option_group_vue_vue_type_script_lang_default = defineComponent({
- name: "ElOptionGroup",
- componentName: "ElOptionGroup",
- props: {
- label: String,
- disabled: Boolean
- },
- setup(props) {
- const ns = useNamespace("select");
- const groupRef = ref();
- const instance = getCurrentInstance();
- const children = ref([]);
- provide(selectGroupKey, reactive({ ...toRefs(props) }));
- const visible = computed(() => children.value.some((option) => option.visible === true));
- const isOption = (node) => node.type.name === "ElOption" && !!node.component?.proxy;
- const flattedChildren = (node) => {
- const nodes = castArray$1(node);
- const children = [];
- nodes.forEach((child) => {
- if (!isVNode(child)) return;
- if (isOption(child)) children.push(child.component.proxy);
- else if (isArray$1(child.children) && child.children.length) children.push(...flattedChildren(child.children));
- else if (child.component?.subTree) children.push(...flattedChildren(child.component.subTree));
- });
- return children;
- };
- const updateChildren = () => {
- children.value = flattedChildren(instance.subTree);
- };
- onMounted(() => {
- updateChildren();
- });
- useMutationObserver(groupRef, updateChildren, {
- attributes: true,
- subtree: true,
- childList: true
- });
- return {
- groupRef,
- visible,
- ns
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/option-group.mjs
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
- return withDirectives((openBlock(), createElementBlock("ul", {
- ref: "groupRef",
- class: normalizeClass(_ctx.ns.be("group", "wrap"))
- }, [createBaseVNode("li", { class: normalizeClass(_ctx.ns.be("group", "title")) }, toDisplayString(_ctx.label), 3), createBaseVNode("li", null, [createBaseVNode("ul", { class: normalizeClass(_ctx.ns.b("group")) }, [renderSlot(_ctx.$slots, "default")], 2)])], 2)), [[vShow, _ctx.visible]]);
- }
- var option_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_group_vue_vue_type_script_lang_default, [["render", _sfc_render$19]]);
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs
- var select_dropdown_vue_vue_type_script_lang_default = defineComponent({
- name: "ElSelectDropdown",
- componentName: "ElSelectDropdown",
- setup() {
- const select = inject(selectKey);
- const ns = useNamespace("select");
- const popperClass = computed(() => select.props.popperClass);
- const isMultiple = computed(() => select.props.multiple);
- const isFitInputWidth = computed(() => select.props.fitInputWidth);
- const minWidth = ref("");
- function updateMinWidth() {
- const offsetWidth = select.selectRef?.offsetWidth;
- if (offsetWidth) minWidth.value = `${offsetWidth - 2}px`;
- else minWidth.value = "";
- }
- onMounted(() => {
- updateMinWidth();
- useResizeObserver(select.selectRef, updateMinWidth);
- });
- return {
- ns,
- minWidth,
- popperClass,
- isMultiple,
- isFitInputWidth
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/select-dropdown.mjs
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([
- _ctx.ns.b("dropdown"),
- _ctx.ns.is("multiple", _ctx.isMultiple),
- _ctx.popperClass
- ]),
- style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
- }, [
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(_ctx.ns.be("dropdown", "header"))
- }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
- renderSlot(_ctx.$slots, "default"),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(_ctx.ns.be("dropdown", "footer"))
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
- ], 6);
- }
- var select_dropdown_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(select_dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render$18]]);
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/useSelect.mjs
- var useSelect$2 = (props, emit) => {
- const { t } = useLocale();
- const slots = useSlots();
- const contentId = useId();
- const nsSelect = useNamespace("select");
- const nsInput = useNamespace("input");
- const states = reactive({
- inputValue: "",
- options: /* @__PURE__ */ new Map(),
- cachedOptions: /* @__PURE__ */ new Map(),
- optionValues: [],
- selected: [],
- selectionWidth: 0,
- collapseItemWidth: 0,
- selectedLabel: "",
- hoveringIndex: -1,
- previousQuery: null,
- inputHovering: false,
- menuVisibleOnFocus: false,
- isBeforeHide: false
- });
- const selectRef = ref();
- const selectionRef = ref();
- const tooltipRef = ref();
- const tagTooltipRef = ref();
- const inputRef = ref();
- const prefixRef = ref();
- const suffixRef = ref();
- const menuRef = ref();
- const tagMenuRef = ref();
- const collapseItemRef = ref();
- const scrollbarRef = ref();
- const expanded = ref(false);
- const hoverOption = ref();
- const debouncing = ref(false);
- const { form, formItem } = useFormItem();
- const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
- const { valueOnClear, isEmptyValue } = useEmptyValues(props);
- const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: (e) => onInput(e) });
- const selectDisabled = useFormDisabled();
- const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
- disabled: selectDisabled,
- afterFocus() {
- if (props.automaticDropdown && !expanded.value) {
- expanded.value = true;
- states.menuVisibleOnFocus = true;
- }
- },
- beforeBlur(event) {
- return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- expanded.value = false;
- states.menuVisibleOnFocus = false;
- if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- });
- const hasModelValue = computed(() => {
- return isArray$1(props.modelValue) ? props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
- });
- const needStatusIcon = computed(() => form?.statusIcon ?? false);
- const showClearBtn = computed(() => {
- return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
- });
- const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
- const iconReverse = computed(() => nsSelect.is("reverse", !!(iconComponent.value && expanded.value)));
- const validateState = computed(() => formItem?.validateState || "");
- const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
- const debounce = computed(() => props.remote ? props.debounce : 0);
- const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && states.options.size === 0);
- const emptyText = computed(() => {
- if (props.loading) return props.loadingText || t("el.select.loading");
- else {
- if (props.filterable && states.inputValue && states.options.size > 0 && filteredOptionsCount.value === 0) return props.noMatchText || t("el.select.noMatch");
- if (states.options.size === 0) return props.noDataText || t("el.select.noData");
- }
- return null;
- });
- const filteredOptionsCount = computed(() => optionsArray.value.filter((option) => option.visible).length);
- const optionsArray = computed(() => {
- const list = Array.from(states.options.values());
- const newList = [];
- states.optionValues.forEach((item) => {
- const index = list.findIndex((i) => i.value === item);
- if (index > -1) newList.push(list[index]);
- });
- return newList.length >= list.length ? newList : list;
- });
- const cachedOptionsArray = computed(() => Array.from(states.cachedOptions.values()));
- const showNewOption = computed(() => {
- const hasExistingOption = optionsArray.value.filter((option) => {
- return !option.created;
- }).some((option) => {
- return option.currentLabel === states.inputValue;
- });
- return props.filterable && props.allowCreate && states.inputValue !== "" && !hasExistingOption;
- });
- const updateOptions = () => {
- if (props.filterable && isFunction$1(props.filterMethod)) return;
- if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) return;
- optionsArray.value.forEach((option) => {
- option.updateOption?.(states.inputValue);
- });
- };
- const selectSize = useFormSize();
- const collapseTagSize = computed(() => ["small"].includes(selectSize.value) ? "small" : "default");
- const dropdownMenuVisible = computed({
- get() {
- return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery));
- },
- set(val) {
- expanded.value = val;
- }
- });
- const shouldShowPlaceholder = computed(() => {
- if (props.multiple && !isUndefined(props.modelValue)) return castArray$1(props.modelValue).length === 0 && !states.inputValue;
- const value = isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue;
- return props.filterable || isUndefined(value) ? !states.inputValue : true;
- });
- const currentPlaceholder = computed(() => {
- const _placeholder = props.placeholder ?? t("el.select.placeholder");
- return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
- });
- const mouseEnterEventName = computed(() => isIOS ? null : "mouseenter");
- watch(() => props.modelValue, (val, oldVal) => {
- if (props.multiple) {
- if (props.filterable && !props.reserveKeyword) {
- states.inputValue = "";
- handleQueryChange("");
- }
- }
- setSelected();
- if (!isEqual$1(val, oldVal) && props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
- }, {
- flush: "post",
- deep: true
- });
- watch(() => expanded.value, (val) => {
- if (val) handleQueryChange(states.inputValue);
- else {
- states.inputValue = "";
- states.previousQuery = null;
- states.isBeforeHide = true;
- states.menuVisibleOnFocus = false;
- }
- });
- watch(() => states.options.entries(), () => {
- if (!isClient) return;
- setSelected();
- if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) checkDefaultFirstOption();
- }, { flush: "post" });
- watch([() => states.hoveringIndex, optionsArray], ([val]) => {
- if (isNumber(val) && val > -1) hoverOption.value = optionsArray.value[val] || {};
- else hoverOption.value = {};
- optionsArray.value.forEach((option) => {
- option.hover = hoverOption.value === option;
- });
- });
- watchEffect(() => {
- if (states.isBeforeHide) return;
- updateOptions();
- });
- const handleQueryChange = (val) => {
- if (states.previousQuery === val || isComposing.value) return;
- states.previousQuery = val;
- if (props.filterable && isFunction$1(props.filterMethod)) props.filterMethod(val);
- else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) props.remoteMethod(val);
- if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) nextTick(checkDefaultFirstOption);
- else nextTick(updateHoveringIndex);
- };
- /**
- * find and highlight first option as default selected
- * @remark
- * - if the first option in dropdown list is user-created,
- * it would be at the end of the optionsArray
- * so find it and set hover.
- * (NOTE: there must be only one user-created option in dropdown list with query)
- * - if there's no user-created option in list, just find the first one as usual
- * (NOTE: exclude options that are disabled or in disabled-group)
- */
- const checkDefaultFirstOption = () => {
- const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.states.groupDisabled);
- const userCreatedOption = optionsInDropdown.find((n) => n.created);
- const firstOriginOption = optionsInDropdown[0];
- states.hoveringIndex = getValueIndex(optionsArray.value.map((item) => item.value), userCreatedOption || firstOriginOption);
- };
- const setSelected = () => {
- if (!props.multiple) {
- const option = getOption(isArray$1(props.modelValue) ? props.modelValue[0] : props.modelValue);
- states.selectedLabel = option.currentLabel;
- states.selected = [option];
- return;
- } else states.selectedLabel = "";
- const result = [];
- if (!isUndefined(props.modelValue)) castArray$1(props.modelValue).forEach((value) => {
- result.push(getOption(value));
- });
- states.selected = result;
- };
- const getOption = (value) => {
- let option;
- const isObjectValue = isPlainObject$1(value);
- for (let i = states.cachedOptions.size - 1; i >= 0; i--) {
- const cachedOption = cachedOptionsArray.value[i];
- if (isObjectValue ? get(cachedOption.value, props.valueKey) === get(value, props.valueKey) : cachedOption.value === value) {
- option = {
- index: optionsArray.value.filter((opt) => !opt.created).indexOf(cachedOption),
- value,
- currentLabel: cachedOption.currentLabel,
- get isDisabled() {
- return cachedOption.isDisabled;
- }
- };
- break;
- }
- }
- if (option) return option;
- return {
- index: -1,
- value,
- currentLabel: isObjectValue ? value.label : value ?? ""
- };
- };
- const updateHoveringIndex = () => {
- const length = states.selected.length;
- if (length > 0) {
- const lastOption = states.selected[length - 1];
- states.hoveringIndex = optionsArray.value.findIndex((item) => getValueKey(lastOption) === getValueKey(item));
- } else states.hoveringIndex = -1;
- };
- const resetSelectionWidth = () => {
- states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
- };
- const resetCollapseItemWidth = () => {
- states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
- };
- const updateTooltip = () => {
- tooltipRef.value?.updatePopper?.();
- };
- const updateTagTooltip = () => {
- tagTooltipRef.value?.updatePopper?.();
- };
- const onInputChange = () => {
- if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
- handleQueryChange(states.inputValue);
- };
- const onInput = (event) => {
- states.inputValue = event.target.value;
- if (props.remote) {
- debouncing.value = true;
- debouncedOnInputChange();
- } else return onInputChange();
- };
- const debouncedOnInputChange = useDebounceFn(() => {
- onInputChange();
- debouncing.value = false;
- }, debounce);
- const emitChange = (val) => {
- if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
- };
- const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => {
- const option = states.cachedOptions.get(it);
- return !option?.disabled && !option?.states.groupDisabled;
- });
- const deletePrevTag = (e) => {
- const code = getEventCode(e);
- if (!props.multiple) return;
- if (code === EVENT_CODE.delete) return;
- if (e.target.value.length <= 0) {
- const value = castArray$1(props.modelValue).slice();
- const lastNotDisabledIndex = getLastNotDisabledIndex(value);
- if (lastNotDisabledIndex < 0) return;
- const removeTagValue = value[lastNotDisabledIndex];
- value.splice(lastNotDisabledIndex, 1);
- emit(UPDATE_MODEL_EVENT, value);
- emitChange(value);
- emit("remove-tag", removeTagValue);
- }
- };
- const deleteTag = (event, tag) => {
- const index = states.selected.indexOf(tag);
- if (index > -1 && !selectDisabled.value) {
- const value = castArray$1(props.modelValue).slice();
- value.splice(index, 1);
- emit(UPDATE_MODEL_EVENT, value);
- emitChange(value);
- emit("remove-tag", tag.value);
- }
- event.stopPropagation();
- focus();
- };
- const deleteSelected = (event) => {
- event.stopPropagation();
- const value = props.multiple ? [] : valueOnClear.value;
- if (props.multiple) {
- for (const item of states.selected) if (item.isDisabled) value.push(item.value);
- }
- emit(UPDATE_MODEL_EVENT, value);
- emitChange(value);
- states.hoveringIndex = -1;
- expanded.value = false;
- emit("clear");
- focus();
- };
- const handleOptionSelect = (option) => {
- if (props.multiple) {
- const value = castArray$1(props.modelValue ?? []).slice();
- const optionIndex = getValueIndex(value, option);
- if (optionIndex > -1) value.splice(optionIndex, 1);
- else if (props.multipleLimit <= 0 || value.length < props.multipleLimit) value.push(option.value);
- emit(UPDATE_MODEL_EVENT, value);
- emitChange(value);
- if (option.created) handleQueryChange("");
- if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
- } else {
- !isEqual$1(props.modelValue, option.value) && emit("update:modelValue", option.value);
- emitChange(option.value);
- expanded.value = false;
- }
- focus();
- if (expanded.value) return;
- nextTick(() => {
- scrollToOption(option);
- });
- };
- const getValueIndex = (arr, option) => {
- if (isUndefined(option)) return -1;
- if (!isObject$2(option.value)) return arr.indexOf(option.value);
- return arr.findIndex((item) => {
- return isEqual$1(get(item, props.valueKey), getValueKey(option));
- });
- };
- const scrollToOption = (option) => {
- const targetOption = isArray$1(option) ? option[option.length - 1] : option;
- let target = null;
- if (!isNil(targetOption?.value)) {
- const options = optionsArray.value.filter((item) => item.value === targetOption.value);
- if (options.length > 0) target = options[0].$el;
- }
- if (tooltipRef.value && target) {
- const menu = tooltipRef.value?.popperRef?.contentRef?.querySelector?.(`.${nsSelect.be("dropdown", "wrap")}`);
- if (menu) scrollIntoView(menu, target);
- }
- scrollbarRef.value?.handleScroll();
- };
- const onOptionCreate = (vm) => {
- states.options.set(vm.value, vm);
- states.cachedOptions.set(vm.value, vm);
- };
- const onOptionDestroy = (key, vm) => {
- if (states.options.get(key) === vm) states.options.delete(key);
- };
- const popperRef = computed(() => {
- return tooltipRef.value?.popperRef?.contentRef;
- });
- const handleMenuEnter = () => {
- states.isBeforeHide = false;
- nextTick(() => {
- scrollbarRef.value?.update();
- scrollToOption(states.selected);
- });
- };
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- if (expanded.value) {
- expanded.value = false;
- nextTick(() => inputRef.value?.blur());
- return;
- }
- inputRef.value?.blur();
- };
- const handleClearClick = (event) => {
- deleteSelected(event);
- };
- const handleClickOutside = (event) => {
- expanded.value = false;
- if (isFocused.value) {
- const _event = new FocusEvent("blur", event);
- nextTick(() => handleBlur(_event));
- }
- };
- const handleEsc = () => {
- if (states.inputValue.length > 0) states.inputValue = "";
- else expanded.value = false;
- };
- const toggleMenu = (event) => {
- if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
- if (isIOS) states.inputHovering = true;
- if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
- else expanded.value = !expanded.value;
- };
- const selectOption = () => {
- if (!expanded.value) toggleMenu();
- else {
- const option = optionsArray.value[states.hoveringIndex];
- if (option && !option.isDisabled) handleOptionSelect(option);
- }
- };
- const getValueKey = (item) => {
- return isObject$2(item.value) ? get(item.value, props.valueKey) : item.value;
- };
- const optionsAllDisabled = computed(() => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled));
- const showTagList = computed(() => {
- if (!props.multiple) return [];
- return props.collapseTags ? states.selected.slice(0, props.maxCollapseTags) : states.selected;
- });
- const collapseTagList = computed(() => {
- if (!props.multiple) return [];
- return props.collapseTags ? states.selected.slice(props.maxCollapseTags) : [];
- });
- const navigateOptions = (direction) => {
- if (!expanded.value) {
- expanded.value = true;
- return;
- }
- if (states.options.size === 0 || filteredOptionsCount.value === 0 || isComposing.value) return;
- if (!optionsAllDisabled.value) {
- if (direction === "next") {
- states.hoveringIndex++;
- if (states.hoveringIndex === states.options.size) states.hoveringIndex = 0;
- } else if (direction === "prev") {
- states.hoveringIndex--;
- if (states.hoveringIndex < 0) states.hoveringIndex = states.options.size - 1;
- }
- const option = optionsArray.value[states.hoveringIndex];
- if (option.isDisabled || !option.visible) navigateOptions(direction);
- nextTick(() => scrollToOption(hoverOption.value));
- }
- };
- const findFocusableIndex = (arr, start, step, len) => {
- for (let i = start; i >= 0 && i < len; i += step) {
- const obj = arr[i];
- if (!obj?.isDisabled && obj?.visible) return i;
- }
- return null;
- };
- const focusOption = (targetIndex, mode) => {
- const len = states.options.size;
- if (len === 0) return;
- const start = clamp$2(targetIndex, 0, len - 1);
- const options = optionsArray.value;
- const direction = mode === "up" ? -1 : 1;
- const newIndex = findFocusableIndex(options, start, direction, len) ?? findFocusableIndex(options, start - direction, -direction, len);
- if (newIndex != null) {
- states.hoveringIndex = newIndex;
- nextTick(() => scrollToOption(hoverOption.value));
- }
- };
- const handleKeydown = (e) => {
- const code = getEventCode(e);
- let isPreventDefault = true;
- switch (code) {
- case EVENT_CODE.up:
- navigateOptions("prev");
- break;
- case EVENT_CODE.down:
- navigateOptions("next");
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- if (!isComposing.value) selectOption();
- break;
- case EVENT_CODE.esc:
- handleEsc();
- break;
- case EVENT_CODE.backspace:
- isPreventDefault = false;
- deletePrevTag(e);
- return;
- case EVENT_CODE.home:
- if (!expanded.value) return;
- focusOption(0, "down");
- break;
- case EVENT_CODE.end:
- if (!expanded.value) return;
- focusOption(states.options.size - 1, "up");
- break;
- case EVENT_CODE.pageUp:
- if (!expanded.value) return;
- focusOption(states.hoveringIndex - 10, "up");
- break;
- case EVENT_CODE.pageDown:
- if (!expanded.value) return;
- focusOption(states.hoveringIndex + 10, "down");
- break;
- default:
- isPreventDefault = false;
- break;
- }
- if (isPreventDefault) {
- e.preventDefault();
- e.stopPropagation();
- }
- };
- const getGapWidth = () => {
- if (!selectionRef.value) return 0;
- const style = window.getComputedStyle(selectionRef.value);
- return Number.parseFloat(style.gap || "6px");
- };
- const tagStyle = computed(() => {
- const gapWidth = getGapWidth();
- const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
- return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
- });
- const collapseTagStyle = computed(() => {
- return { maxWidth: `${states.selectionWidth}px` };
- });
- const popupScroll = (data) => {
- emit("popup-scroll", data);
- };
- useResizeObserver(selectionRef, resetSelectionWidth);
- useResizeObserver(wrapperRef, updateTooltip);
- useResizeObserver(tagMenuRef, updateTagTooltip);
- useResizeObserver(collapseItemRef, resetCollapseItemWidth);
- let stop;
- watch(() => dropdownMenuVisible.value, (newVal) => {
- if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
- else {
- stop?.();
- stop = void 0;
- }
- emit("visible-change", newVal);
- });
- onMounted(() => {
- setSelected();
- });
- return {
- inputId,
- contentId,
- nsSelect,
- nsInput,
- states,
- isFocused,
- expanded,
- optionsArray,
- hoverOption,
- selectSize,
- filteredOptionsCount,
- updateTooltip,
- updateTagTooltip,
- debouncedOnInputChange,
- onInput,
- deletePrevTag,
- deleteTag,
- deleteSelected,
- handleOptionSelect,
- scrollToOption,
- hasModelValue,
- shouldShowPlaceholder,
- currentPlaceholder,
- mouseEnterEventName,
- needStatusIcon,
- showClearBtn,
- iconComponent,
- iconReverse,
- validateState,
- validateIcon,
- showNewOption,
- updateOptions,
- collapseTagSize,
- setSelected,
- selectDisabled,
- emptyText,
- handleCompositionStart,
- handleCompositionUpdate,
- handleCompositionEnd,
- handleKeydown,
- onOptionCreate,
- onOptionDestroy,
- handleMenuEnter,
- focus,
- blur,
- handleClearClick,
- handleClickOutside,
- handleEsc,
- toggleMenu,
- selectOption,
- getValueKey,
- navigateOptions,
- dropdownMenuVisible,
- showTagList,
- collapseTagList,
- popupScroll,
- getOption,
- tagStyle,
- collapseTagStyle,
- popperRef,
- inputRef,
- tooltipRef,
- tagTooltipRef,
- prefixRef,
- suffixRef,
- selectRef,
- wrapperRef,
- selectionRef,
- scrollbarRef,
- menuRef,
- tagMenuRef,
- collapseItemRef
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/options.mjs
- var options_default = defineComponent({
- name: "ElOptions",
- setup(_, { slots }) {
- const select = inject(selectKey);
- let cachedValueList = [];
- return () => {
- const children = slots.default?.();
- const valueList = [];
- function filterOptions(children) {
- if (!isArray$1(children)) return;
- children.forEach((item) => {
- const name = (item?.type || {})?.name;
- if (name === "ElOptionGroup") filterOptions(!isString(item.children) && !isArray$1(item.children) && isFunction$1(item.children?.default) ? item.children?.default() : item.children);
- else if (name === "ElOption") valueList.push(item.props?.value);
- else if (isArray$1(item.children)) filterOptions(item.children);
- });
- }
- if (children.length) filterOptions(children[0]?.children);
- if (!isEqual$1(valueList, cachedValueList)) {
- cachedValueList = valueList;
- if (select) select.states.optionValues = valueList;
- }
- return children;
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs
- var COMPONENT_NAME$13 = "ElSelect";
- var warnHandlerMap = /* @__PURE__ */ new WeakMap();
- var createSelectWarnHandler = (appContext) => {
- return (...args) => {
- const message = args[0];
- if (!message || message.includes("Slot \"default\" invoked outside of the render function") && args[2]?.includes("ElTreeSelect")) return;
- const original = warnHandlerMap.get(appContext)?.originalWarnHandler;
- if (original) {
- original(...args);
- return;
- }
- console.warn(...args);
- };
- };
- var getWarnHandlerRecord = (appContext) => {
- let record = warnHandlerMap.get(appContext);
- if (!record) {
- record = {
- originalWarnHandler: appContext.config.warnHandler,
- handler: createSelectWarnHandler(appContext),
- count: 0
- };
- warnHandlerMap.set(appContext, record);
- }
- return record;
- };
- var select_vue_vue_type_script_lang_default$1 = defineComponent({
- name: COMPONENT_NAME$13,
- componentName: COMPONENT_NAME$13,
- components: {
- ElSelectMenu: select_dropdown_default$1,
- ElOption: option_default,
- ElOptions: options_default,
- ElOptionGroup: option_group_default,
- ElTag,
- ElScrollbar,
- ElTooltip,
- ElIcon
- },
- directives: { ClickOutside },
- props: selectProps,
- emits: [
- UPDATE_MODEL_EVENT,
- CHANGE_EVENT,
- "remove-tag",
- "clear",
- "visible-change",
- "focus",
- "blur",
- "popup-scroll"
- ],
- setup(props, { emit, slots }) {
- const instance = getCurrentInstance();
- const warnRecord = getWarnHandlerRecord(instance.appContext);
- warnRecord.count += 1;
- instance.appContext.config.warnHandler = warnRecord.handler;
- const modelValue = computed(() => {
- const { modelValue: rawModelValue, multiple } = props;
- const fallback = multiple ? [] : void 0;
- if (isArray$1(rawModelValue)) return multiple ? rawModelValue : fallback;
- return multiple ? fallback : rawModelValue;
- });
- const _props = reactive({
- ...toRefs(props),
- modelValue
- });
- const API = useSelect$2(_props, emit);
- const { calculatorRef, inputStyle } = useCalcInputWidth();
- const { getLabel, getValue, getOptions, getDisabled } = useProps(props);
- const getOptionProps = (option) => ({
- label: getLabel(option),
- value: getValue(option),
- disabled: getDisabled(option)
- });
- const flatTreeSelectData = (data) => {
- return data.reduce((acc, item) => {
- acc.push(item);
- if (item.children && item.children.length > 0) acc.push(...flatTreeSelectData(item.children));
- return acc;
- }, []);
- };
- const manuallyRenderSlots = (vnodes) => {
- flattedChildren(vnodes || []).forEach((item) => {
- if (isObject$2(item) && (item.type.name === "ElOption" || item.type.name === "ElTree")) {
- const _name = item.type.name;
- if (_name === "ElTree") flatTreeSelectData(item.props?.data || []).forEach((treeItem) => {
- treeItem.currentLabel = treeItem.label || (isObject$2(treeItem.value) ? "" : treeItem.value);
- API.onOptionCreate(treeItem);
- });
- else if (_name === "ElOption") {
- const obj = { ...item.props };
- obj.currentLabel = obj.label || (isObject$2(obj.value) ? "" : obj.value);
- API.onOptionCreate(obj);
- }
- }
- });
- };
- watch(() => [props.persistent || API.expanded.value || !slots.default ? void 0 : slots.default?.(), modelValue.value], () => {
- if (props.persistent || API.expanded.value) return;
- API.states.options.clear();
- manuallyRenderSlots(slots.default?.());
- }, { immediate: true });
- provide(selectKey, reactive({
- props: _props,
- states: API.states,
- selectRef: API.selectRef,
- optionsArray: API.optionsArray,
- setSelected: API.setSelected,
- handleOptionSelect: API.handleOptionSelect,
- onOptionCreate: API.onOptionCreate,
- onOptionDestroy: API.onOptionDestroy
- }));
- const selectedLabel = computed(() => {
- if (!props.multiple) return API.states.selectedLabel;
- return API.states.selected.map((i) => i.currentLabel);
- });
- onBeforeUnmount(() => {
- const record = warnHandlerMap.get(instance.appContext);
- if (!record) return;
- record.count -= 1;
- if (record.count <= 0) {
- instance.appContext.config.warnHandler = record.originalWarnHandler;
- warnHandlerMap.delete(instance.appContext);
- }
- });
- return {
- ...API,
- modelValue,
- selectedLabel,
- calculatorRef,
- inputStyle,
- getLabel,
- getValue,
- getOptions,
- getDisabled,
- getOptionProps
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select/src/select2.mjs
- var _hoisted_1$66 = [
- "id",
- "value",
- "name",
- "disabled",
- "autocomplete",
- "tabindex",
- "readonly",
- "aria-activedescendant",
- "aria-controls",
- "aria-expanded",
- "aria-label"
- ];
- var _hoisted_2$37 = ["textContent"];
- var _hoisted_3$17 = { key: 1 };
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_tag = resolveComponent("el-tag");
- const _component_el_tooltip = resolveComponent("el-tooltip");
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_option = resolveComponent("el-option");
- const _component_el_option_group = resolveComponent("el-option-group");
- const _component_el_options = resolveComponent("el-options");
- const _component_el_scrollbar = resolveComponent("el-scrollbar");
- const _component_el_select_menu = resolveComponent("el-select-menu");
- const _directive_click_outside = resolveDirective("click-outside");
- return withDirectives((openBlock(), createElementBlock("div", mergeProps({
- ref: "selectRef",
- class: [_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]
- }, { [toHandlerKey(_ctx.mouseEnterEventName)]: _cache[11] || (_cache[11] = ($event) => _ctx.states.inputHovering = true) }, { onMouseleave: _cache[12] || (_cache[12] = ($event) => _ctx.states.inputHovering = false) }), [createVNode(_component_el_tooltip, {
- ref: "tooltipRef",
- visible: _ctx.dropdownMenuVisible,
- placement: _ctx.placement,
- teleported: _ctx.teleported,
- "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
- "popper-style": _ctx.popperStyle,
- "popper-options": _ctx.popperOptions,
- "fallback-placements": _ctx.fallbackPlacements,
- effect: _ctx.effect,
- pure: "",
- trigger: "click",
- transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
- "stop-popper-mouse-event": false,
- "gpu-acceleration": false,
- persistent: _ctx.persistent,
- "append-to": _ctx.appendTo,
- "show-arrow": _ctx.showArrow,
- offset: _ctx.offset,
- onBeforeShow: _ctx.handleMenuEnter,
- onHide: _cache[10] || (_cache[10] = ($event) => _ctx.states.isBeforeHide = false)
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref: "wrapperRef",
- class: normalizeClass([
- _ctx.nsSelect.e("wrapper"),
- _ctx.nsSelect.is("focused", _ctx.isFocused),
- _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
- _ctx.nsSelect.is("filterable", _ctx.filterable),
- _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
- ]),
- onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
- }, [
- _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref: "prefixRef",
- class: normalizeClass(_ctx.nsSelect.e("prefix"))
- }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- ref: "selectionRef",
- class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length)])
- }, [
- _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
- key: 0,
- data: _ctx.states.selected,
- deleteTag: _ctx.deleteTag,
- selectDisabled: _ctx.selectDisabled
- }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
- return openBlock(), createElementBlock("div", {
- key: _ctx.getValueKey(item),
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
- }, [createVNode(_component_el_tag, {
- closable: !_ctx.selectDisabled && !item.isDisabled,
- size: _ctx.collapseTagSize,
- type: _ctx.tagType,
- effect: _ctx.tagEffect,
- "disable-transitions": "",
- style: normalizeStyle(_ctx.tagStyle),
- onClose: ($event) => _ctx.deleteTag($event, item)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
- index: item.index,
- label: item.currentLabel,
- value: item.value
- }, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
- _: 2
- }, 1032, [
- "closable",
- "size",
- "type",
- "effect",
- "style",
- "onClose"
- ])], 2);
- }), 128)), _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
- key: 0,
- ref: "tagTooltipRef",
- disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
- "fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
- "bottom",
- "top",
- "right",
- "left"
- ],
- effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
- placement: _ctx.tagTooltip?.placement ?? "bottom",
- "popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
- "popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
- teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
- "append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
- "popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
- transition: _ctx.tagTooltip?.transition,
- "show-after": _ctx.tagTooltip?.showAfter,
- "hide-after": _ctx.tagTooltip?.hideAfter,
- "auto-close": _ctx.tagTooltip?.autoClose,
- offset: _ctx.tagTooltip?.offset
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref: "collapseItemRef",
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
- }, [createVNode(_component_el_tag, {
- closable: false,
- size: _ctx.collapseTagSize,
- type: _ctx.tagType,
- effect: _ctx.tagEffect,
- "disable-transitions": "",
- style: normalizeStyle(_ctx.collapseTagStyle)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), 3)]),
- _: 1
- }, 8, [
- "size",
- "type",
- "effect",
- "style"
- ])], 2)]),
- content: withCtx(() => [createBaseVNode("div", {
- ref: "tagMenuRef",
- class: normalizeClass(_ctx.nsSelect.e("selection"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (item) => {
- return openBlock(), createElementBlock("div", {
- key: _ctx.getValueKey(item),
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
- }, [createVNode(_component_el_tag, {
- class: "in-tooltip",
- closable: !_ctx.selectDisabled && !item.isDisabled,
- size: _ctx.collapseTagSize,
- type: _ctx.tagType,
- effect: _ctx.tagEffect,
- "disable-transitions": "",
- onClose: ($event) => _ctx.deleteTag($event, item)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
- index: item.index,
- label: item.currentLabel,
- value: item.value
- }, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
- _: 2
- }, 1032, [
- "closable",
- "size",
- "type",
- "effect",
- "onClose"
- ])], 2);
- }), 128))], 2)]),
- _: 3
- }, 8, [
- "disabled",
- "fallback-placements",
- "effect",
- "placement",
- "popper-class",
- "popper-style",
- "teleported",
- "append-to",
- "popper-options",
- "transition",
- "show-after",
- "hide-after",
- "auto-close",
- "offset"
- ])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass([
- _ctx.nsSelect.e("selected-item"),
- _ctx.nsSelect.e("input-wrapper"),
- _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
- ]) }, [createBaseVNode("input", {
- id: _ctx.inputId,
- ref: "inputRef",
- value: _ctx.states.inputValue,
- type: "text",
- name: _ctx.name,
- class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
- disabled: _ctx.selectDisabled,
- autocomplete: _ctx.autocomplete,
- style: normalizeStyle(_ctx.inputStyle),
- tabindex: _ctx.tabindex,
- role: "combobox",
- readonly: !_ctx.filterable,
- spellcheck: "false",
- "aria-activedescendant": _ctx.hoverOption?.id || "",
- "aria-controls": _ctx.contentId,
- "aria-expanded": _ctx.dropdownMenuVisible,
- "aria-label": _ctx.ariaLabel,
- "aria-autocomplete": "none",
- "aria-haspopup": "listbox",
- onKeydown: _cache[0] || (_cache[0] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
- onCompositionstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
- onCompositionupdate: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
- onCompositionend: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
- onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
- onChange: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
- onClick: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
- }, null, 46, _hoisted_1$66), _ctx.filterable ? (openBlock(), createElementBlock("span", {
- key: 0,
- ref: "calculatorRef",
- "aria-hidden": "true",
- class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
- textContent: toDisplayString(_ctx.states.inputValue)
- }, null, 10, _hoisted_2$37)) : createCommentVNode("v-if", true)], 2),
- _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([
- _ctx.nsSelect.e("selected-item"),
- _ctx.nsSelect.e("placeholder"),
- _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
- ])
- }, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
- key: 0,
- index: _ctx.getOption(_ctx.modelValue).index,
- label: _ctx.currentPlaceholder,
- value: _ctx.modelValue
- }, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3$17, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
- ], 2),
- createBaseVNode("div", {
- ref: "suffixRef",
- class: normalizeClass(_ctx.nsSelect.e("suffix"))
- }, [
- _ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, {
- key: 0,
- class: normalizeClass([
- _ctx.nsSelect.e("caret"),
- _ctx.nsSelect.e("icon"),
- _ctx.iconReverse
- ])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true),
- _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
- key: 1,
- class: normalizeClass([
- _ctx.nsSelect.e("caret"),
- _ctx.nsSelect.e("icon"),
- _ctx.nsSelect.e("clear")
- ]),
- onClick: _ctx.handleClearClick
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
- _: 1
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
- _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
- key: 2,
- class: normalizeClass([
- _ctx.nsInput.e("icon"),
- _ctx.nsInput.e("validateIcon"),
- _ctx.nsInput.is("loading", _ctx.validateState === "validating")
- ])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)
- ], 2)
- ], 2)]),
- content: withCtx(() => [createVNode(_component_el_select_menu, { ref: "menuRef" }, {
- default: withCtx(() => [
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
- onClick: _cache[8] || (_cache[8] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
- withDirectives(createVNode(_component_el_scrollbar, {
- id: _ctx.contentId,
- ref: "scrollbarRef",
- tag: "ul",
- "wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
- "view-class": _ctx.nsSelect.be("dropdown", "list"),
- class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
- role: "listbox",
- "aria-label": _ctx.ariaLabel,
- "aria-orientation": "vertical",
- onScroll: _ctx.popupScroll
- }, {
- default: withCtx(() => [_ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
- key: 0,
- value: _ctx.states.inputValue,
- created: true
- }, null, 8, ["value"])) : createCommentVNode("v-if", true), createVNode(_component_el_options, null, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
- return openBlock(), createElementBlock(Fragment, { key: index }, [_ctx.getOptions(option)?.length ? (openBlock(), createBlock(_component_el_option_group, {
- key: 0,
- label: _ctx.getLabel(option),
- disabled: _ctx.getDisabled(option)
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getOptions(option), (item) => {
- return openBlock(), createBlock(_component_el_option, mergeProps({ key: _ctx.getValue(item) }, { ref_for: true }, _ctx.getOptionProps(item)), null, 16);
- }), 128))]),
- _: 2
- }, 1032, ["label", "disabled"])) : (openBlock(), createBlock(_component_el_option, mergeProps({
- key: 1,
- ref_for: true
- }, _ctx.getOptionProps(option)), null, 16))], 64);
- }), 128))])]),
- _: 3
- })]),
- _: 3
- }, 8, [
- "id",
- "wrap-class",
- "view-class",
- "class",
- "aria-label",
- "onScroll"
- ]), [[vShow, _ctx.states.options.size > 0 && !_ctx.loading]]),
- _ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
- }, [renderSlot(_ctx.$slots, "loading")], 2)) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)) : createCommentVNode("v-if", true),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
- key: 3,
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
- onClick: _cache[9] || (_cache[9] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
- ]),
- _: 3
- }, 512)]),
- _: 3
- }, 8, [
- "visible",
- "placement",
- "teleported",
- "popper-class",
- "popper-style",
- "popper-options",
- "fallback-placements",
- "effect",
- "transition",
- "persistent",
- "append-to",
- "show-arrow",
- "offset",
- "onBeforeShow"
- ])], 16)), [[
- _directive_click_outside,
- _ctx.handleClickOutside,
- _ctx.popperRef
- ]]);
- }
- //#endregion
- //#region node_modules/element-plus/es/components/select/index.mjs
- var ElSelect = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default$1, [["render", _sfc_render$17]]), {
- Option: option_default,
- OptionGroup: option_group_default
- });
- var ElOption = withNoopInstall(option_default);
- var ElOptionGroup = withNoopInstall(option_group_default);
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/date-table.mjs
- var getPrevMonthLastDays = (date, count) => {
- const lastDay = date.subtract(1, "month").endOf("month").date();
- return rangeArr(count).map((_, index) => lastDay - (count - index - 1));
- };
- var getMonthDays = (date) => {
- return rangeArr(date.daysInMonth()).map((_, index) => index + 1);
- };
- var toNestedArr = (days) => rangeArr(days.length / 7).map((index) => {
- const start = index * 7;
- return days.slice(start, start + 7);
- });
- /**
- * @deprecated Removed after 3.0.0, Use `DateTableProps` instead.
- */
- var dateTableProps = buildProps({
- selectedDay: { type: definePropType(Object) },
- range: { type: definePropType(Array) },
- date: {
- type: definePropType(Object),
- required: true
- },
- hideHeader: { type: Boolean }
- });
- var dateTableEmits = { pick: (value) => isObject$2(value) };
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/use-date-table.mjs
- var import_localeData = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(n, e) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e();
- })(exports, (function() {
- "use strict";
- return function(n, e, t) {
- var r = e.prototype, o = function(n) {
- return n && (n.indexOf ? n : n.s);
- }, u = function(n, e, t, r, u) {
- var i = n.name ? n : n.$locale(), a = o(i[e]), s = o(i[t]), f = a || s.map((function(n) {
- return n.slice(0, r);
- }));
- if (!u) return f;
- var d = i.weekStart;
- return f.map((function(n, e) {
- return f[(e + (d || 0)) % 7];
- }));
- }, i = function() {
- return t.Ls[t.locale()];
- }, a = function(n, e) {
- return n.formats[e] || function(n) {
- return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(n, e, t) {
- return e || t.slice(1);
- }));
- }(n.formats[e.toUpperCase()]);
- }, s = function() {
- var n = this;
- return {
- months: function(e) {
- return e ? e.format("MMMM") : u(n, "months");
- },
- monthsShort: function(e) {
- return e ? e.format("MMM") : u(n, "monthsShort", "months", 3);
- },
- firstDayOfWeek: function() {
- return n.$locale().weekStart || 0;
- },
- weekdays: function(e) {
- return e ? e.format("dddd") : u(n, "weekdays");
- },
- weekdaysMin: function(e) {
- return e ? e.format("dd") : u(n, "weekdaysMin", "weekdays", 2);
- },
- weekdaysShort: function(e) {
- return e ? e.format("ddd") : u(n, "weekdaysShort", "weekdays", 3);
- },
- longDateFormat: function(e) {
- return a(n.$locale(), e);
- },
- meridiem: this.$locale().meridiem,
- ordinal: this.$locale().ordinal
- };
- };
- r.localeData = function() {
- return s.bind(this)();
- }, t.localeData = function() {
- var n = i();
- return {
- firstDayOfWeek: function() {
- return n.weekStart || 0;
- },
- weekdays: function() {
- return t.weekdays();
- },
- weekdaysShort: function() {
- return t.weekdaysShort();
- },
- weekdaysMin: function() {
- return t.weekdaysMin();
- },
- months: function() {
- return t.months();
- },
- monthsShort: function() {
- return t.monthsShort();
- },
- longDateFormat: function(e) {
- return a(n, e);
- },
- meridiem: n.meridiem,
- ordinal: n.ordinal
- };
- }, t.months = function() {
- return u(i(), "months");
- }, t.monthsShort = function() {
- return u(i(), "monthsShort", "months", 3);
- }, t.weekdays = function(n) {
- return u(i(), "weekdays", null, null, n);
- }, t.weekdaysShort = function(n) {
- return u(i(), "weekdaysShort", "weekdays", 3, n);
- }, t.weekdaysMin = function(n) {
- return u(i(), "weekdaysMin", "weekdays", 2, n);
- };
- };
- }));
- })))(), 1);
- var useDateTable = (props, emit) => {
- import_dayjs_min.default.extend(import_localeData.default);
- const firstDayOfWeek = import_dayjs_min.default.localeData().firstDayOfWeek();
- const { t, lang } = useLocale();
- const now = (0, import_dayjs_min.default)().locale(lang.value);
- const isInRange = computed(() => !!props.range && !!props.range.length);
- const rows = computed(() => {
- let days = [];
- if (isInRange.value) {
- const [start, end] = props.range;
- const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((index) => ({
- text: start.date() + index,
- type: "current"
- }));
- let remaining = currentMonthRange.length % 7;
- remaining = remaining === 0 ? 0 : 7 - remaining;
- const nextMonthRange = rangeArr(remaining).map((_, index) => ({
- text: index + 1,
- type: "next"
- }));
- days = currentMonthRange.concat(nextMonthRange);
- } else {
- const firstDay = props.date.startOf("month").day();
- const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
- text: day,
- type: "prev"
- }));
- const currentMonthDays = getMonthDays(props.date).map((day) => ({
- text: day,
- type: "current"
- }));
- days = [...prevMonthDays, ...currentMonthDays];
- const nextMonthDays = rangeArr(7 - (days.length % 7 || 7)).map((_, index) => ({
- text: index + 1,
- type: "next"
- }));
- days = days.concat(nextMonthDays);
- }
- return toNestedArr(days);
- });
- const weekDays = computed(() => {
- const start = firstDayOfWeek;
- if (start === 0) return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`));
- else return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_) => t(`el.datepicker.weeks.${_}`));
- });
- const getFormattedDate = (day, type) => {
- switch (type) {
- case "prev": return props.date.startOf("month").subtract(1, "month").date(day);
- case "next": return props.date.startOf("month").add(1, "month").date(day);
- case "current": return props.date.date(day);
- }
- };
- const handlePickDay = ({ text, type }) => {
- emit("pick", getFormattedDate(text, type));
- };
- const getSlotData = ({ text, type }) => {
- const day = getFormattedDate(text, type);
- return {
- isSelected: day.isSame(props.selectedDay),
- type: `${type}-month`,
- day: day.format("YYYY-MM-DD"),
- date: day.toDate()
- };
- };
- return {
- now,
- isInRange,
- rows,
- weekDays,
- getFormattedDate,
- handlePickDay,
- getSlotData
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/date-table.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$65 = { key: 0 };
- var _hoisted_2$36 = ["onClick"];
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/date-table2.mjs
- var date_table_default = /* @__PURE__ */ defineComponent({
- name: "DateTable",
- __name: "date-table",
- props: dateTableProps,
- emits: dateTableEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const { isInRange, now, rows, weekDays, getFormattedDate, handlePickDay, getSlotData } = useDateTable(props, __emit);
- const nsTable = useNamespace("calendar-table");
- const nsDay = useNamespace("calendar-day");
- const getCellClass = ({ text, type }) => {
- const classes = [type];
- if (type === "current") {
- const date = getFormattedDate(text, type);
- if (date.isSame(props.selectedDay, "day")) classes.push(nsDay.is("selected"));
- if (date.isSame(now, "day")) classes.push(nsDay.is("today"));
- }
- return classes;
- };
- __expose({ getFormattedDate });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("table", {
- class: normalizeClass([unref(nsTable).b(), unref(nsTable).is("range", unref(isInRange))]),
- cellspacing: "0",
- cellpadding: "0"
- }, [!__props.hideHeader ? (openBlock(), createElementBlock("thead", _hoisted_1$65, [createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(weekDays), (day) => {
- return openBlock(), createElementBlock("th", {
- key: day,
- scope: "col"
- }, toDisplayString(day), 1);
- }), 128))])])) : createCommentVNode("v-if", true), createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, index) => {
- return openBlock(), createElementBlock("tr", {
- key: index,
- class: normalizeClass({
- [unref(nsTable).e("row")]: true,
- [unref(nsTable).em("row", "hide-border")]: index === 0 && __props.hideHeader
- })
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key) => {
- return openBlock(), createElementBlock("td", {
- key,
- class: normalizeClass(getCellClass(cell)),
- onClick: ($event) => unref(handlePickDay)(cell)
- }, [createBaseVNode("div", { class: normalizeClass(unref(nsDay).b()) }, [renderSlot(_ctx.$slots, "date-cell", { data: unref(getSlotData)(cell) }, () => [createBaseVNode("span", null, toDisplayString(cell.text), 1)])], 2)], 10, _hoisted_2$36);
- }), 128))], 2);
- }), 128))])], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/use-calendar.mjs
- var adjacentMonth = (start, end) => {
- const firstMonthLastDay = start.endOf("month");
- const lastMonthFirstDay = end.startOf("month");
- const lastMonthStartDay = firstMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
- return [[start, firstMonthLastDay], [lastMonthStartDay.startOf("week"), end]];
- };
- var threeConsecutiveMonth = (start, end) => {
- const firstMonthLastDay = start.endOf("month");
- const secondMonthFirstDay = start.add(1, "month").startOf("month");
- const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
- const secondMonthLastDay = secondMonthStartDay.endOf("month");
- const lastMonthFirstDay = end.startOf("month");
- const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
- return [
- [start, firstMonthLastDay],
- [secondMonthStartDay.startOf("week"), secondMonthLastDay],
- [lastMonthStartDay.startOf("week"), end]
- ];
- };
- var useCalendar = (props, emit, componentName) => {
- const { lang } = useLocale();
- const selectedDay = ref();
- const now = (0, import_dayjs_min.default)().locale(lang.value);
- const realSelectedDay = computed({
- get() {
- if (!props.modelValue) return selectedDay.value;
- return date.value;
- },
- set(val) {
- if (!val) return;
- selectedDay.value = val;
- const result = val.toDate();
- emit(INPUT_EVENT, result);
- emit(UPDATE_MODEL_EVENT, result);
- }
- });
- const validatedRange = computed(() => {
- if (!props.range || !isArray$1(props.range) || props.range.length !== 2 || props.range.some((item) => !isDate(item))) return [];
- const [startDayjs, endDayjs] = props.range.map((_) => (0, import_dayjs_min.default)(_).locale(lang.value));
- if (startDayjs.isAfter(endDayjs)) {
- debugWarn(componentName, "end time should be greater than start time");
- return [];
- }
- if (startDayjs.isSame(endDayjs, "month")) return calculateValidatedDateRange(startDayjs, endDayjs);
- else {
- if (startDayjs.add(1, "month").month() !== endDayjs.month()) {
- debugWarn(componentName, "start time and end time interval must not exceed two months");
- return [];
- }
- return calculateValidatedDateRange(startDayjs, endDayjs);
- }
- });
- const date = computed(() => {
- if (!props.modelValue) return realSelectedDay.value || (validatedRange.value.length ? validatedRange.value[0][0] : now);
- else return (0, import_dayjs_min.default)(props.modelValue).locale(lang.value);
- });
- const prevMonthDayjs = computed(() => date.value.subtract(1, "month").date(1));
- const nextMonthDayjs = computed(() => date.value.add(1, "month").date(1));
- const prevYearDayjs = computed(() => date.value.subtract(1, "year").date(1));
- const nextYearDayjs = computed(() => date.value.add(1, "year").date(1));
- const calculateValidatedDateRange = (startDayjs, endDayjs) => {
- const firstDay = startDayjs.startOf("week");
- const lastDay = endDayjs.endOf("week");
- const firstMonth = firstDay.get("month");
- const lastMonth = lastDay.get("month");
- if (firstMonth === lastMonth) return [[firstDay, lastDay]];
- else if ((firstMonth + 1) % 12 === lastMonth) return adjacentMonth(firstDay, lastDay);
- else if (firstMonth + 2 === lastMonth || (firstMonth + 1) % 11 === lastMonth) return threeConsecutiveMonth(firstDay, lastDay);
- else {
- debugWarn(componentName, "start time and end time interval must not exceed two months");
- return [];
- }
- };
- const pickDay = (day) => {
- realSelectedDay.value = day;
- };
- const selectDate = (type) => {
- const day = {
- "prev-month": prevMonthDayjs.value,
- "next-month": nextMonthDayjs.value,
- "prev-year": prevYearDayjs.value,
- "next-year": nextYearDayjs.value,
- today: now
- }[type];
- if (!day.isSame(date.value, "day")) pickDay(day);
- };
- const handleDateChange = (date) => {
- if (date === "today") selectDate("today");
- else pickDay(date);
- };
- return {
- calculateValidatedDateRange,
- date,
- realSelectedDay,
- pickDay,
- selectDate,
- validatedRange,
- handleDateChange
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/select-controller2.mjs
- var select_controller_default = /* @__PURE__ */ defineComponent({
- name: "SelectController",
- __name: "select-controller",
- props: buildProps({
- date: {
- type: definePropType(Object),
- required: true
- },
- formatter: { type: definePropType(Function) }
- }),
- emits: { "date-change": (date) => isObject$2(date) || isString(date) },
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const nsSelect = useNamespace("calendar-select");
- const { t, lang } = useLocale();
- const monthOptions = Array.from({ length: 12 }, (_, index) => {
- const actualMonth = index + 1;
- return {
- value: actualMonth,
- label: isFunction$1(props.formatter) ? props.formatter(actualMonth, "month") : actualMonth
- };
- });
- const yearValue = computed(() => props.date.year());
- const monthValue = computed(() => props.date.month() + 1);
- const yearOptions = computed(() => {
- const years = [];
- for (let i = -10; i < 10; i++) {
- const year = yearValue.value + i;
- if (year > 0) {
- const label = isFunction$1(props.formatter) ? props.formatter(year, "year") : year;
- years.push({
- value: year,
- label
- });
- }
- }
- return years;
- });
- const handleYearChange = (year) => {
- emit("date-change", (0, import_dayjs_min.default)(new Date(year, monthValue.value - 1, 1)).locale(lang.value));
- };
- const handleMonthChange = (month) => {
- emit("date-change", (0, import_dayjs_min.default)(new Date(yearValue.value, month - 1, 1)).locale(lang.value));
- };
- const selectToday = () => {
- emit("date-change", "today");
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock(Fragment, null, [
- createVNode(unref(ElSelect), {
- "model-value": yearValue.value,
- size: "small",
- class: normalizeClass(unref(nsSelect).e("year")),
- "validate-event": false,
- options: yearOptions.value,
- onChange: handleYearChange
- }, null, 8, [
- "model-value",
- "class",
- "options"
- ]),
- createVNode(unref(ElSelect), {
- "model-value": monthValue.value,
- size: "small",
- class: normalizeClass(unref(nsSelect).e("month")),
- "validate-event": false,
- options: unref(monthOptions),
- onChange: handleMonthChange
- }, null, 8, [
- "model-value",
- "class",
- "options"
- ]),
- createVNode(unref(ElButton), {
- size: "small",
- onClick: selectToday
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)]),
- _: 1
- })
- ], 64);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/src/calendar.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$12 = "ElCalendar";
- //#endregion
- //#region node_modules/element-plus/es/components/calendar/index.mjs
- var ElCalendar = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$12,
- __name: "calendar",
- props: calendarProps,
- emits: calendarEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const ns = useNamespace("calendar");
- const { calculateValidatedDateRange, date, pickDay, realSelectedDay, selectDate, validatedRange, handleDateChange } = useCalendar(__props, __emit, COMPONENT_NAME$12);
- const { t } = useLocale();
- const i18nDate = computed(() => {
- const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
- return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
- });
- __expose({
- selectedDay: realSelectedDay,
- pickDay,
- selectDate,
- calculateValidatedDateRange
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("header")) }, [renderSlot(_ctx.$slots, "header", { date: i18nDate.value }, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, toDisplayString(i18nDate.value), 3), unref(validatedRange).length === 0 && __props.controllerType === "button" ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("button-group"))
- }, [createVNode(unref(ElButtonGroup), null, {
- default: withCtx(() => [
- createVNode(unref(ElButton), {
- size: "small",
- onClick: _cache[0] || (_cache[0] = ($event) => unref(selectDate)("prev-month"))
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)]),
- _: 1
- }),
- createVNode(unref(ElButton), {
- size: "small",
- onClick: _cache[1] || (_cache[1] = ($event) => unref(selectDate)("today"))
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)]),
- _: 1
- }),
- createVNode(unref(ElButton), {
- size: "small",
- onClick: _cache[2] || (_cache[2] = ($event) => unref(selectDate)("next-month"))
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)]),
- _: 1
- })
- ]),
- _: 1
- })], 2)) : unref(validatedRange).length === 0 && __props.controllerType === "select" ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("select-controller"))
- }, [createVNode(select_controller_default, {
- date: unref(date),
- formatter: __props.formatter,
- onDateChange: unref(handleDateChange)
- }, null, 8, [
- "date",
- "formatter",
- "onDateChange"
- ])], 2)) : createCommentVNode("v-if", true)])], 2), unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("body"))
- }, [createVNode(date_table_default, {
- date: unref(date),
- "selected-day": unref(realSelectedDay),
- onPick: unref(pickDay)
- }, createSlots({ _: 2 }, [_ctx.$slots["date-cell"] ? {
- name: "date-cell",
- fn: withCtx((data) => [renderSlot(_ctx.$slots, "date-cell", normalizeProps(guardReactiveProps(data)))]),
- key: "0"
- } : void 0]), 1032, [
- "date",
- "selected-day",
- "onPick"
- ])], 2)) : (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("body"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
- return openBlock(), createBlock(date_table_default, {
- key: index,
- date: range_[0],
- "selected-day": unref(realSelectedDay),
- range: range_,
- "hide-header": index !== 0,
- onPick: unref(pickDay)
- }, createSlots({ _: 2 }, [_ctx.$slots["date-cell"] ? {
- name: "date-cell",
- fn: withCtx((data) => [renderSlot(_ctx.$slots, "date-cell", mergeProps({ ref_for: true }, data))]),
- key: "0"
- } : void 0]), 1032, [
- "date",
- "selected-day",
- "range",
- "hide-header",
- "onPick"
- ]);
- }), 128))], 2))], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/card/src/card.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CardProps` instead.
- */
- var cardProps = buildProps({
- header: {
- type: String,
- default: ""
- },
- footer: {
- type: String,
- default: ""
- },
- bodyStyle: {
- type: definePropType([
- String,
- Object,
- Array
- ]),
- default: ""
- },
- headerClass: String,
- bodyClass: String,
- footerClass: String,
- shadow: {
- type: String,
- values: [
- "always",
- "hover",
- "never"
- ],
- default: void 0
- }
- });
- var cardContextKey = Symbol("cardContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/card/index.mjs
- var ElCard = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCard",
- __name: "card",
- props: cardProps,
- setup(__props) {
- const globalConfig = useGlobalConfig("card");
- const ns = useNamespace("card");
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).is(`${__props.shadow || unref(globalConfig)?.shadow || "always"}-shadow`)]) }, [
- _ctx.$slots.header || __props.header ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(ns).e("header"), __props.headerClass])
- }, [renderSlot(_ctx.$slots, "header", {}, () => [createTextVNode(toDisplayString(__props.header), 1)])], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- class: normalizeClass([unref(ns).e("body"), __props.bodyClass]),
- style: normalizeStyle(__props.bodyStyle)
- }, [renderSlot(_ctx.$slots, "default")], 6),
- _ctx.$slots.footer || __props.footer ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
- }, [renderSlot(_ctx.$slots, "footer", {}, () => [createTextVNode(toDisplayString(__props.footer), 1)])], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/carousel.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CarouselProps` instead.
- */
- var carouselProps = buildProps({
- initialIndex: {
- type: Number,
- default: 0
- },
- height: {
- type: String,
- default: ""
- },
- trigger: {
- type: String,
- values: ["hover", "click"],
- default: "hover"
- },
- autoplay: {
- type: Boolean,
- default: true
- },
- interval: {
- type: Number,
- default: 3e3
- },
- indicatorPosition: {
- type: String,
- values: [
- "",
- "none",
- "outside"
- ],
- default: ""
- },
- arrow: {
- type: String,
- values: [
- "always",
- "hover",
- "never"
- ],
- default: "hover"
- },
- type: {
- type: String,
- values: ["", "card"],
- default: ""
- },
- cardScale: {
- type: Number,
- default: .83
- },
- loop: {
- type: Boolean,
- default: true
- },
- direction: {
- type: String,
- values: ["horizontal", "vertical"],
- default: "horizontal"
- },
- pauseOnHover: {
- type: Boolean,
- default: true
- },
- motionBlur: Boolean
- });
- var carouselEmits = { change: (current, prev) => [current, prev].every(isNumber) };
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/constants.mjs
- var carouselContextKey = Symbol("carouselContextKey");
- var CAROUSEL_ITEM_NAME = "ElCarouselItem";
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/carousel-item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CarouselItemProps` instead.
- */
- var carouselItemProps = buildProps({
- name: {
- type: String,
- default: ""
- },
- label: {
- type: [String, Number],
- default: ""
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/use-carousel.mjs
- var THROTTLE_TIME = 300;
- var useCarousel = (props, emit, componentName) => {
- const { children: items, addChild: addItem, removeChild: removeItem, ChildrenSorter: ItemsSorter } = useOrderedChildren(getCurrentInstance(), CAROUSEL_ITEM_NAME);
- const slots = useSlots();
- const activeIndex = ref(-1);
- const timer = ref(null);
- const hover = ref(false);
- const root = ref();
- const containerHeight = ref(0);
- const isItemsTwoLength = ref(true);
- const arrowDisplay = computed(() => props.arrow !== "never" && !unref(isVertical));
- const hasLabel = computed(() => {
- return items.value.some((item) => item.props.label.toString().length > 0);
- });
- const isCardType = computed(() => props.type === "card");
- const isVertical = computed(() => props.direction === "vertical");
- const containerStyle = computed(() => {
- if (props.height !== "auto") return { height: props.height };
- return {
- height: `${containerHeight.value}px`,
- overflow: "hidden"
- };
- });
- const throttledArrowClick = throttle((index) => {
- setActiveItem(index);
- }, THROTTLE_TIME, { trailing: true });
- const throttledIndicatorHover = throttle((index) => {
- handleIndicatorHover(index);
- }, THROTTLE_TIME);
- const isTwoLengthShow = (index) => {
- if (!isItemsTwoLength.value) return true;
- return activeIndex.value <= 1 ? index <= 1 : index > 1;
- };
- function pauseTimer() {
- if (timer.value) {
- clearInterval(timer.value);
- timer.value = null;
- }
- }
- function startTimer() {
- if (props.interval <= 0 || !props.autoplay || timer.value) return;
- timer.value = setInterval(() => playSlides(), props.interval);
- }
- const playSlides = () => {
- if (activeIndex.value < items.value.length - 1) activeIndex.value = activeIndex.value + 1;
- else if (props.loop) activeIndex.value = 0;
- };
- function setActiveItem(index) {
- if (isString(index)) {
- const filteredItems = items.value.filter((item) => item.props.name === index);
- if (filteredItems.length > 0) index = items.value.indexOf(filteredItems[0]);
- }
- index = Number(index);
- if (Number.isNaN(index) || index !== Math.floor(index)) {
- debugWarn(componentName, "index must be integer.");
- return;
- }
- const itemCount = items.value.length;
- const oldIndex = activeIndex.value;
- if (index < 0) activeIndex.value = props.loop ? itemCount - 1 : 0;
- else if (index >= itemCount) activeIndex.value = props.loop ? 0 : itemCount - 1;
- else activeIndex.value = index;
- if (oldIndex === activeIndex.value) resetItemPosition(oldIndex);
- resetTimer();
- }
- function resetItemPosition(oldIndex) {
- items.value.forEach((item, index) => {
- item.translateItem(index, activeIndex.value, oldIndex);
- });
- }
- function itemInStage(item, index) {
- const _items = unref(items);
- const itemCount = _items.length;
- if (itemCount === 0 || !item.states.inStage) return false;
- const nextItemIndex = index + 1;
- const prevItemIndex = index - 1;
- const lastItemIndex = itemCount - 1;
- const isLastItemActive = _items[lastItemIndex].states.active;
- const isFirstItemActive = _items[0].states.active;
- const isNextItemActive = _items[nextItemIndex]?.states?.active;
- const isPrevItemActive = _items[prevItemIndex]?.states?.active;
- if (index === lastItemIndex && isFirstItemActive || isNextItemActive) return "left";
- else if (index === 0 && isLastItemActive || isPrevItemActive) return "right";
- return false;
- }
- function handleMouseEnter() {
- hover.value = true;
- if (props.pauseOnHover) pauseTimer();
- }
- function handleMouseLeave() {
- hover.value = false;
- startTimer();
- }
- function handleButtonEnter(arrow) {
- if (unref(isVertical)) return;
- items.value.forEach((item, index) => {
- if (arrow === itemInStage(item, index)) item.states.hover = true;
- });
- }
- function handleButtonLeave() {
- if (unref(isVertical)) return;
- items.value.forEach((item) => {
- item.states.hover = false;
- });
- }
- function handleIndicatorClick(index) {
- activeIndex.value = index;
- }
- function handleIndicatorHover(index) {
- if (props.trigger === "hover" && index !== activeIndex.value) activeIndex.value = index;
- }
- function prev() {
- setActiveItem(activeIndex.value - 1);
- }
- function next() {
- setActiveItem(activeIndex.value + 1);
- }
- function resetTimer() {
- pauseTimer();
- if (!props.pauseOnHover || !hover.value) startTimer();
- }
- function setContainerHeight(height) {
- if (props.height !== "auto") return;
- containerHeight.value = height;
- }
- function PlaceholderItem() {
- const defaultSlots = slots.default?.();
- if (!defaultSlots) return null;
- const normalizeSlots = flattedChildren(defaultSlots).filter((slot) => {
- return isVNode(slot) && slot.type.name === "ElCarouselItem";
- });
- if (normalizeSlots?.length === 2 && props.loop && !isCardType.value) {
- isItemsTwoLength.value = true;
- return normalizeSlots;
- }
- isItemsTwoLength.value = false;
- return null;
- }
- watch(() => activeIndex.value, (current, prev) => {
- resetItemPosition(prev);
- if (isItemsTwoLength.value) {
- current = current % 2;
- prev = prev % 2;
- }
- if (prev > -1) emit(CHANGE_EVENT, current, prev);
- });
- const exposeActiveIndex = computed({
- get: () => {
- return isItemsTwoLength.value ? activeIndex.value % 2 : activeIndex.value;
- },
- set: (value) => activeIndex.value = value
- });
- watch(() => props.autoplay, (autoplay) => {
- autoplay ? startTimer() : pauseTimer();
- });
- watch(() => props.loop, () => {
- setActiveItem(activeIndex.value);
- });
- watch(() => props.interval, () => {
- resetTimer();
- });
- const resizeObserver = shallowRef();
- onMounted(() => {
- watch(() => items.value, () => {
- if (items.value.length > 0) setActiveItem(props.initialIndex);
- }, { immediate: true });
- resizeObserver.value = useResizeObserver(root.value, () => {
- resetItemPosition();
- });
- startTimer();
- });
- onBeforeUnmount(() => {
- pauseTimer();
- if (root.value && resizeObserver.value) resizeObserver.value.stop();
- });
- provide(carouselContextKey, {
- root,
- isCardType,
- isVertical,
- items,
- loop: props.loop,
- cardScale: props.cardScale,
- addItem,
- removeItem,
- setActiveItem,
- setContainerHeight
- });
- return {
- root,
- activeIndex,
- exposeActiveIndex,
- arrowDisplay,
- hasLabel,
- hover,
- isCardType,
- items,
- isVertical,
- containerStyle,
- isItemsTwoLength,
- handleButtonEnter,
- handleButtonLeave,
- handleIndicatorClick,
- handleMouseEnter,
- handleMouseLeave,
- setActiveItem,
- prev,
- next,
- PlaceholderItem,
- isTwoLengthShow,
- ItemsSorter,
- throttledArrowClick,
- throttledIndicatorHover
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/carousel.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$64 = ["aria-label"];
- var _hoisted_2$35 = ["aria-label"];
- var _hoisted_3$16 = ["onMouseenter", "onClick"];
- var _hoisted_4$12 = ["aria-label"];
- var _hoisted_5$9 = { key: 0 };
- var _hoisted_6$4 = {
- key: 2,
- xmlns: "http://www.w3.org/2000/svg",
- version: "1.1",
- style: { "display": "none" }
- };
- var COMPONENT_NAME$11 = "ElCarousel";
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/carousel2.mjs
- var carousel_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$11,
- __name: "carousel",
- props: carouselProps,
- emits: carouselEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const { root, activeIndex, exposeActiveIndex, arrowDisplay, hasLabel, hover, isCardType, items, isVertical, containerStyle, handleButtonEnter, handleButtonLeave, handleIndicatorClick, handleMouseEnter, handleMouseLeave, setActiveItem, prev, next, PlaceholderItem, isTwoLengthShow, ItemsSorter, throttledArrowClick, throttledIndicatorHover } = useCarousel(props, __emit, COMPONENT_NAME$11);
- const ns = useNamespace("carousel");
- const { t } = useLocale();
- const carouselClasses = computed(() => {
- const classes = [ns.b(), ns.m(props.direction)];
- if (unref(isCardType)) classes.push(ns.m("card"));
- classes.push(ns.is("vertical-outside", unref(isVertical) && props.indicatorPosition === "outside"));
- return classes;
- });
- const indicatorsClasses = computed(() => {
- const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
- if (unref(hasLabel)) classes.push(ns.em("indicators", "labels"));
- if (props.indicatorPosition === "outside") classes.push(ns.em("indicators", "outside"));
- if (unref(isVertical)) classes.push(ns.em("indicators", "right"));
- return classes;
- });
- function handleTransitionStart(e) {
- if (!props.motionBlur) return;
- const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
- e.currentTarget.classList.add(kls);
- }
- function handleTransitionEnd(e) {
- if (!props.motionBlur) return;
- const kls = unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`;
- e.currentTarget.classList.remove(kls);
- }
- __expose({
- activeIndex: exposeActiveIndex,
- setActiveItem,
- prev,
- next
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "root",
- ref: root,
- class: normalizeClass(carouselClasses.value),
- onMouseenter: _cache[6] || (_cache[6] = withModifiers((...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args), ["stop"])),
- onMouseleave: _cache[7] || (_cache[7] = withModifiers((...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args), ["stop"]))
- }, [
- unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
- key: 0,
- name: "carousel-arrow-left",
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "left")]),
- "aria-label": unref(t)("el.carousel.leftArrow"),
- onMouseenter: _cache[0] || (_cache[0] = ($event) => unref(handleButtonEnter)("left")),
- onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
- onClick: _cache[2] || (_cache[2] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) - 1), ["stop"]))
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_left_default))]),
- _: 1
- })], 42, _hoisted_1$64), [[vShow, (__props.arrow === "always" || unref(hover)) && (__props.loop || unref(activeIndex) > 0)]])]),
- _: 1
- })) : createCommentVNode("v-if", true),
- unref(arrowDisplay) ? (openBlock(), createBlock(Transition, {
- key: 1,
- name: "carousel-arrow-right",
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ns).e("arrow"), unref(ns).em("arrow", "right")]),
- "aria-label": unref(t)("el.carousel.rightArrow"),
- onMouseenter: _cache[3] || (_cache[3] = ($event) => unref(handleButtonEnter)("right")),
- onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(handleButtonLeave) && unref(handleButtonLeave)(...args)),
- onClick: _cache[5] || (_cache[5] = withModifiers(($event) => unref(throttledArrowClick)(unref(activeIndex) + 1), ["stop"]))
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })], 42, _hoisted_2$35), [[vShow, (__props.arrow === "always" || unref(hover)) && (__props.loop || unref(activeIndex) < unref(items).length - 1)]])]),
- _: 1
- })) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("container")),
- style: normalizeStyle(unref(containerStyle)),
- onTransitionstart: handleTransitionStart,
- onTransitionend: handleTransitionEnd
- }, [createVNode(unref(PlaceholderItem)), renderSlot(_ctx.$slots, "default")], 38),
- createVNode(unref(ItemsSorter), null, {
- default: withCtx(() => [__props.indicatorPosition !== "none" ? (openBlock(), createElementBlock("ul", {
- key: 0,
- class: normalizeClass(indicatorsClasses.value)
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
- return withDirectives((openBlock(), createElementBlock("li", {
- key: index,
- class: normalizeClass([
- unref(ns).e("indicator"),
- unref(ns).em("indicator", __props.direction),
- unref(ns).is("active", index === unref(activeIndex))
- ]),
- onMouseenter: ($event) => unref(throttledIndicatorHover)(index),
- onClick: withModifiers(($event) => unref(handleIndicatorClick)(index), ["stop"])
- }, [createBaseVNode("button", {
- class: normalizeClass(unref(ns).e("button")),
- "aria-label": unref(t)("el.carousel.indicator", { index: index + 1 })
- }, [unref(hasLabel) ? (openBlock(), createElementBlock("span", _hoisted_5$9, toDisplayString(item.props.label), 1)) : createCommentVNode("v-if", true)], 10, _hoisted_4$12)], 42, _hoisted_3$16)), [[vShow, unref(isTwoLengthShow)(index)]]);
- }), 128))], 2)) : createCommentVNode("v-if", true)]),
- _: 1
- }),
- __props.motionBlur ? (openBlock(), createElementBlock("svg", _hoisted_6$4, [..._cache[8] || (_cache[8] = [createBaseVNode("defs", null, [createBaseVNode("filter", { id: "elCarouselHorizontal" }, [createBaseVNode("feGaussianBlur", {
- in: "SourceGraphic",
- stdDeviation: "12,0"
- })]), createBaseVNode("filter", { id: "elCarouselVertical" }, [createBaseVNode("feGaussianBlur", {
- in: "SourceGraphic",
- stdDeviation: "0,10"
- })])], -1)])])) : createCommentVNode("v-if", true)
- ], 34);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/use-carousel-item.mjs
- var useCarouselItem = (props) => {
- const carouselContext = inject(carouselContextKey);
- const instance = getCurrentInstance();
- if (!carouselContext) debugWarn(CAROUSEL_ITEM_NAME, "usage: <el-carousel></el-carousel-item></el-carousel>");
- if (!instance) debugWarn(CAROUSEL_ITEM_NAME, "compositional hook can only be invoked inside setups");
- const carouselItemRef = ref();
- const hover = ref(false);
- const translate = ref(0);
- const scale = ref(1);
- const active = ref(false);
- const ready = ref(false);
- const inStage = ref(false);
- const animating = ref(false);
- const { isCardType, isVertical, cardScale } = carouselContext;
- function processIndex(index, activeIndex, length) {
- const lastItemIndex = length - 1;
- const prevItemIndex = activeIndex - 1;
- const nextItemIndex = activeIndex + 1;
- const halfItemIndex = length / 2;
- if (activeIndex === 0 && index === lastItemIndex) return -1;
- else if (activeIndex === lastItemIndex && index === 0) return length;
- else if (index < prevItemIndex && activeIndex - index >= halfItemIndex) return length + 1;
- else if (index > nextItemIndex && index - activeIndex >= halfItemIndex) return -2;
- return index;
- }
- function calcCardTranslate(index, activeIndex) {
- const parentWidth = unref(isVertical) ? carouselContext.root.value?.offsetHeight || 0 : carouselContext.root.value?.offsetWidth || 0;
- if (inStage.value) return parentWidth * ((2 - cardScale) * (index - activeIndex) + 1) / 4;
- else if (index < activeIndex) return -(1 + cardScale) * parentWidth / 4;
- else return (3 + cardScale) * parentWidth / 4;
- }
- function calcTranslate(index, activeIndex, isVertical) {
- const rootEl = carouselContext.root.value;
- if (!rootEl) return 0;
- return ((isVertical ? rootEl.offsetHeight : rootEl.offsetWidth) || 0) * (index - activeIndex);
- }
- const translateItem = (index, activeIndex, oldIndex) => {
- const _isCardType = unref(isCardType);
- const carouselItemLength = carouselContext.items.value.length ?? NaN;
- const isActive = index === activeIndex;
- if (!_isCardType && !isUndefined(oldIndex)) animating.value = isActive || index === oldIndex;
- if (!isActive && carouselItemLength > 2 && carouselContext.loop) index = processIndex(index, activeIndex, carouselItemLength);
- const _isVertical = unref(isVertical);
- active.value = isActive;
- if (_isCardType) {
- inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
- translate.value = calcCardTranslate(index, activeIndex);
- scale.value = unref(active) ? 1 : cardScale;
- } else translate.value = calcTranslate(index, activeIndex, _isVertical);
- ready.value = true;
- if (isActive && carouselItemRef.value) carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight);
- };
- function handleItemClick() {
- if (carouselContext && unref(isCardType)) {
- const index = carouselContext.items.value.findIndex(({ uid }) => uid === instance.uid);
- carouselContext.setActiveItem(index);
- }
- }
- const carouselItemContext = {
- props,
- states: reactive({
- hover,
- translate,
- scale,
- active,
- ready,
- inStage,
- animating
- }),
- uid: instance.uid,
- getVnode: () => instance.vnode,
- translateItem
- };
- carouselContext.addItem(carouselItemContext);
- onBeforeUnmount(() => {
- carouselContext.removeItem(carouselItemContext);
- });
- return {
- carouselItemRef,
- active,
- animating,
- hover,
- inStage,
- isVertical,
- translate,
- isCardType,
- scale,
- ready,
- handleItemClick
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/src/carousel-item2.mjs
- var carousel_item_default = /* @__PURE__ */ defineComponent({
- name: CAROUSEL_ITEM_NAME,
- __name: "carousel-item",
- props: carouselItemProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("carousel");
- const { carouselItemRef, active, animating, hover, inStage, isVertical, translate, isCardType, scale, ready, handleItemClick } = useCarouselItem(props);
- const itemKls = computed(() => [
- ns.e("item"),
- ns.is("active", active.value),
- ns.is("in-stage", inStage.value),
- ns.is("hover", hover.value),
- ns.is("animating", animating.value),
- {
- [ns.em("item", "card")]: isCardType.value,
- [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
- }
- ]);
- const itemStyle = computed(() => {
- return { transform: [`${`translate${unref(isVertical) ? "Y" : "X"}`}(${unref(translate)}px)`, `scale(${unref(scale)})`].join(" ") };
- });
- return (_ctx, _cache) => {
- return withDirectives((openBlock(), createElementBlock("div", {
- ref_key: "carouselItemRef",
- ref: carouselItemRef,
- class: normalizeClass(itemKls.value),
- style: normalizeStyle(itemStyle.value),
- onClick: _cache[0] || (_cache[0] = (...args) => unref(handleItemClick) && unref(handleItemClick)(...args))
- }, [unref(isCardType) ? withDirectives((openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("mask"))
- }, null, 2)), [[vShow, !unref(active)]]) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 6)), [[vShow, unref(ready)]]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/carousel/index.mjs
- var ElCarousel = withInstall(carousel_default, { CarouselItem: carousel_item_default });
- var ElCarouselItem = withNoopInstall(carousel_item_default);
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/config.mjs
- var CommonProps = buildProps({
- modelValue: { type: definePropType([
- Number,
- String,
- Array,
- Object
- ]) },
- options: {
- type: definePropType(Array),
- default: () => []
- },
- props: {
- type: definePropType(Object),
- default: () => ({})
- }
- });
- var DefaultProps = {
- expandTrigger: "click",
- multiple: false,
- checkStrictly: false,
- emitPath: true,
- lazy: false,
- lazyLoad: NOOP,
- value: "value",
- label: "label",
- children: "children",
- leaf: "leaf",
- disabled: "disabled",
- hoverThreshold: 500,
- checkOnClickNode: false,
- checkOnClickLeaf: true,
- showPrefix: true
- };
- /**
- * @deprecated Removed after 3.0.0, Use `CascaderPanelProps` instead.
- */
- var cascaderPanelProps = buildProps({
- ...CommonProps,
- border: {
- type: Boolean,
- default: true
- },
- renderLabel: { type: Function }
- });
- var emitChangeFn$2 = (value) => true;
- var cascaderPanelEmits = {
- [UPDATE_MODEL_EVENT]: emitChangeFn$2,
- [CHANGE_EVENT]: emitChangeFn$2,
- close: () => true,
- "expand-change": (value) => value
- };
- var useCascaderConfig = (props) => {
- return computed(() => ({
- ...DefaultProps,
- ...props.props
- }));
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CheckboxProps` instead.
- */
- var checkboxProps = {
- modelValue: {
- type: [
- Number,
- String,
- Boolean
- ],
- default: void 0
- },
- label: {
- type: [
- String,
- Boolean,
- Number,
- Object
- ],
- default: void 0
- },
- value: {
- type: [
- String,
- Boolean,
- Number,
- Object
- ],
- default: void 0
- },
- indeterminate: Boolean,
- disabled: {
- type: Boolean,
- default: void 0
- },
- checked: Boolean,
- name: {
- type: String,
- default: void 0
- },
- trueValue: {
- type: [String, Number],
- default: void 0
- },
- falseValue: {
- type: [String, Number],
- default: void 0
- },
- trueLabel: {
- type: [String, Number],
- default: void 0
- },
- falseLabel: {
- type: [String, Number],
- default: void 0
- },
- id: {
- type: String,
- default: void 0
- },
- border: Boolean,
- size: useSizeProp,
- tabindex: [String, Number],
- validateEvent: {
- type: Boolean,
- default: true
- },
- ariaLabel: String,
- ...useAriaProps(["ariaControls"])
- };
- var checkboxEmits = {
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
- change: (val) => isString(val) || isNumber(val) || isBoolean(val)
- };
- var checkboxPropsDefaults = {
- modelValue: void 0,
- label: void 0,
- value: void 0,
- disabled: void 0,
- name: void 0,
- trueValue: void 0,
- falseValue: void 0,
- trueLabel: void 0,
- falseLabel: void 0,
- id: void 0,
- validateEvent: true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/constants.mjs
- var checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox-group.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CheckboxGroupProps` instead.
- */
- var checkboxGroupProps = buildProps({
- modelValue: {
- type: definePropType(Array),
- default: () => []
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- min: Number,
- max: Number,
- size: useSizeProp,
- fill: String,
- textColor: String,
- tag: {
- type: String,
- default: "div"
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- options: { type: definePropType(Array) },
- props: {
- type: definePropType(Object),
- default: () => checkboxDefaultProps
- },
- type: {
- type: String,
- values: ["checkbox", "button"],
- default: "checkbox"
- },
- ...useAriaProps(["ariaLabel"])
- });
- var checkboxGroupEmits = {
- [UPDATE_MODEL_EVENT]: (val) => isArray$1(val),
- change: (val) => isArray$1(val)
- };
- var checkboxDefaultProps = {
- label: "label",
- value: "value",
- disabled: "disabled"
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-disabled.mjs
- var useCheckboxDisabled = ({ model, isChecked }) => {
- const checkboxGroup = inject(checkboxGroupContextKey, void 0);
- const formContext = inject(formContextKey, void 0);
- const isLimitDisabled = computed(() => {
- const max = checkboxGroup?.max?.value;
- const min = checkboxGroup?.min?.value;
- return !isUndefined(max) && model.value.length >= max && !isChecked.value || !isUndefined(min) && model.value.length <= min && isChecked.value;
- });
- return {
- isDisabled: useFormDisabled(computed(() => {
- if (checkboxGroup === void 0) return formContext?.disabled ?? isLimitDisabled.value;
- else return checkboxGroup.disabled?.value || isLimitDisabled.value;
- })),
- isLimitDisabled
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-event.mjs
- var useCheckboxEvent = (props, { model, isLimitExceeded, hasOwnLabel, isDisabled, isLabeledByFormItem }) => {
- const checkboxGroup = inject(checkboxGroupContextKey, void 0);
- const { formItem } = useFormItem();
- const { emit } = getCurrentInstance();
- function getLabeledValue(value) {
- return [
- true,
- props.trueValue,
- props.trueLabel
- ].includes(value) ? props.trueValue ?? props.trueLabel ?? true : props.falseValue ?? props.falseLabel ?? false;
- }
- function emitChangeEvent(checked, e) {
- emit(CHANGE_EVENT, getLabeledValue(checked), e);
- }
- function handleChange(e) {
- if (isLimitExceeded.value) return;
- const target = e.target;
- emit(CHANGE_EVENT, getLabeledValue(target.checked), e);
- }
- async function onClickRoot(e) {
- if (isLimitExceeded.value) return;
- if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
- if (!e.composedPath().some((item) => item.tagName === "LABEL")) {
- model.value = getLabeledValue([
- false,
- props.falseValue,
- props.falseLabel
- ].includes(model.value));
- await nextTick();
- emitChangeEvent(model.value, e);
- }
- }
- }
- const validateEvent = computed(() => checkboxGroup?.validateEvent || props.validateEvent);
- watch(() => props.modelValue, () => {
- if (validateEvent.value) formItem?.validate("change").catch((err) => debugWarn(err));
- });
- return {
- handleChange,
- onClickRoot
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-model.mjs
- var useCheckboxModel = (props) => {
- const selfModel = ref(false);
- const { emit } = getCurrentInstance();
- const checkboxGroup = inject(checkboxGroupContextKey, void 0);
- const isGroup = computed(() => isUndefined(checkboxGroup) === false);
- const isLimitExceeded = ref(false);
- const model = computed({
- get() {
- return isGroup.value ? checkboxGroup?.modelValue?.value : props.modelValue ?? selfModel.value;
- },
- set(val) {
- if (isGroup.value && isArray$1(val)) {
- isLimitExceeded.value = checkboxGroup?.max?.value !== void 0 && val.length > checkboxGroup?.max.value && val.length > model.value.length;
- isLimitExceeded.value === false && checkboxGroup?.changeEvent?.(val);
- } else {
- emit(UPDATE_MODEL_EVENT, val);
- selfModel.value = val;
- }
- }
- });
- return {
- model,
- isGroup,
- isLimitExceeded
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox-status.mjs
- var useCheckboxStatus = (props, slots, { model }) => {
- const checkboxGroup = inject(checkboxGroupContextKey, void 0);
- const isFocused = ref(false);
- const actualValue = computed(() => {
- if (!isPropAbsent(props.value)) return props.value;
- return props.label;
- });
- const isChecked = computed(() => {
- const value = model.value;
- if (isBoolean(value)) return value;
- else if (isArray$1(value)) if (isObject$2(actualValue.value)) return value.map(toRaw).some((o) => isEqual$1(o, actualValue.value));
- else return value.map(toRaw).includes(actualValue.value);
- else if (value !== null && value !== void 0) return value === props.trueValue || value === props.trueLabel;
- else return !!value;
- });
- return {
- checkboxButtonSize: useFormSize(computed(() => checkboxGroup?.size?.value), { prop: true }),
- isChecked,
- isFocused,
- checkboxSize: useFormSize(computed(() => checkboxGroup?.size?.value)),
- hasOwnLabel: computed(() => {
- return !!slots.default || !isPropAbsent(actualValue.value);
- }),
- actualValue
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/composables/use-checkbox.mjs
- var useCheckbox = (props, slots) => {
- const { formItem: elFormItem } = useFormItem();
- const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
- const { isFocused, isChecked, checkboxButtonSize, checkboxSize, hasOwnLabel, actualValue } = useCheckboxStatus(props, slots, { model });
- const { isDisabled } = useCheckboxDisabled({
- model,
- isChecked
- });
- const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
- formItemContext: elFormItem,
- disableIdGeneration: hasOwnLabel,
- disableIdManagement: isGroup
- });
- const { handleChange, onClickRoot } = useCheckboxEvent(props, {
- model,
- isLimitExceeded,
- hasOwnLabel,
- isDisabled,
- isLabeledByFormItem
- });
- const setStoreValue = () => {
- function addToStore() {
- if (isArray$1(model.value) && !model.value.includes(actualValue.value)) model.value.push(actualValue.value);
- else model.value = props.trueValue ?? props.trueLabel ?? true;
- }
- props.checked && addToStore();
- };
- setStoreValue();
- useDeprecated({
- from: "label act as value",
- replacement: "value",
- version: "3.0.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, computed(() => isGroup.value && isPropAbsent(props.value)));
- useDeprecated({
- from: "true-label",
- replacement: "true-value",
- version: "3.0.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, computed(() => !!props.trueLabel));
- useDeprecated({
- from: "false-label",
- replacement: "false-value",
- version: "3.0.0",
- scope: "el-checkbox",
- ref: "https://element-plus.org/en-US/component/checkbox.html"
- }, computed(() => !!props.falseLabel));
- return {
- inputId,
- isLabeledByFormItem,
- isChecked,
- isDisabled,
- isFocused,
- checkboxButtonSize,
- checkboxSize,
- hasOwnLabel,
- model,
- actualValue,
- handleChange,
- onClickRoot
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$63 = [
- "id",
- "indeterminate",
- "name",
- "tabindex",
- "disabled"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox2.mjs
- var checkbox_default = /* @__PURE__ */ defineComponent({
- name: "ElCheckbox",
- __name: "checkbox",
- props: checkboxProps,
- emits: checkboxEmits,
- setup(__props) {
- const props = __props;
- const { inputId, isLabeledByFormItem, isChecked, isDisabled, isFocused, checkboxSize, hasOwnLabel, model, actualValue, handleChange, onClickRoot } = useCheckbox(props, useSlots());
- const inputBindings = computed(() => {
- if (props.trueValue || props.falseValue || props.trueLabel || props.falseLabel) return {
- "true-value": props.trueValue ?? props.trueLabel ?? true,
- "false-value": props.falseValue ?? props.falseLabel ?? false
- };
- return { value: actualValue.value };
- });
- const ns = useNamespace("checkbox");
- const compKls = computed(() => {
- return [
- ns.b(),
- ns.m(checkboxSize.value),
- ns.is("disabled", isDisabled.value),
- ns.is("bordered", props.border),
- ns.is("checked", isChecked.value)
- ];
- });
- const spanKls = computed(() => {
- return [
- ns.e("input"),
- ns.is("disabled", isDisabled.value),
- ns.is("checked", isChecked.value),
- ns.is("indeterminate", props.indeterminate),
- ns.is("focus", isFocused.value)
- ];
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
- for: !unref(hasOwnLabel) && unref(isLabeledByFormItem) ? null : unref(inputId),
- class: normalizeClass(compKls.value),
- "aria-controls": __props.indeterminate ? __props.ariaControls : null,
- "aria-checked": __props.indeterminate ? "mixed" : void 0,
- "aria-label": __props.ariaLabel,
- onClick: unref(onClickRoot)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(spanKls.value) }, [withDirectives(createBaseVNode("input", mergeProps({
- id: unref(inputId),
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
- class: unref(ns).e("original"),
- type: "checkbox",
- indeterminate: __props.indeterminate,
- name: __props.name,
- tabindex: __props.tabindex,
- disabled: unref(isDisabled)
- }, inputBindings.value, {
- onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
- onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
- onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
- onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
- }), null, 16, _hoisted_1$63), [[vModelCheckbox, unref(model)]]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2)], 2), unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(unref(ns).e("label"))
- }, [renderSlot(_ctx.$slots, "default"), !_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(__props.label), 1)], 64)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, [
- "for",
- "class",
- "aria-controls",
- "aria-checked",
- "aria-label",
- "onClick"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox-button.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$62 = [
- "name",
- "tabindex",
- "disabled"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox-button.mjs
- var checkbox_button_default = /* @__PURE__ */ defineComponent({
- name: "ElCheckboxButton",
- __name: "checkbox-button",
- props: checkboxProps,
- emits: checkboxEmits,
- setup(__props) {
- const props = __props;
- const { isFocused, isChecked, isDisabled, checkboxButtonSize, model, actualValue, handleChange } = useCheckbox(props, useSlots());
- const inputBindings = computed(() => {
- if (props.trueValue || props.falseValue || props.trueLabel || props.falseLabel) return {
- "true-value": props.trueValue ?? props.trueLabel ?? true,
- "false-value": props.falseValue ?? props.falseLabel ?? false
- };
- return { value: actualValue.value };
- });
- const checkboxGroup = inject(checkboxGroupContextKey, void 0);
- const ns = useNamespace("checkbox");
- const activeStyle = computed(() => {
- const fillValue = checkboxGroup?.fill?.value ?? "";
- return {
- backgroundColor: fillValue,
- borderColor: fillValue,
- color: checkboxGroup?.textColor?.value ?? "",
- boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
- };
- });
- const labelKls = computed(() => {
- return [
- ns.b("button"),
- ns.bm("button", checkboxButtonSize.value),
- ns.is("disabled", isDisabled.value),
- ns.is("checked", isChecked.value),
- ns.is("focus", isFocused.value)
- ];
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("label", { class: normalizeClass(labelKls.value) }, [withDirectives(createBaseVNode("input", mergeProps({
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
- class: unref(ns).be("button", "original"),
- type: "checkbox",
- name: __props.name,
- tabindex: __props.tabindex,
- disabled: unref(isDisabled)
- }, inputBindings.value, {
- onChange: _cache[1] || (_cache[1] = (...args) => unref(handleChange) && unref(handleChange)(...args)),
- onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
- onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
- onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
- }), null, 16, _hoisted_1$62), [[vModelCheckbox, unref(model)]]), _ctx.$slots.default || __props.label ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(unref(ns).be("button", "inner")),
- style: normalizeStyle(unref(isChecked) ? activeStyle.value : void 0)
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 6)) : createCommentVNode("v-if", true)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/src/checkbox-group2.mjs
- var checkbox_group_default = /* @__PURE__ */ defineComponent({
- name: "ElCheckboxGroup",
- __name: "checkbox-group",
- props: checkboxGroupProps,
- emits: checkboxGroupEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("checkbox");
- const checkboxDisabled = useFormDisabled();
- const { formItem } = useFormItem();
- const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
- const changeEvent = async (value) => {
- emit(UPDATE_MODEL_EVENT, value);
- await nextTick();
- emit(CHANGE_EVENT, value);
- };
- const modelValue = computed({
- get() {
- return props.modelValue;
- },
- set(val) {
- changeEvent(val);
- }
- });
- const aliasProps = computed(() => ({
- ...checkboxDefaultProps,
- ...props.props
- }));
- const getOptionProps = (option) => {
- const { label, value, disabled } = aliasProps.value;
- const base = {
- label: option[label],
- value: option[value],
- disabled: option[disabled]
- };
- return {
- ...omit(option, [
- label,
- value,
- disabled
- ]),
- ...base
- };
- };
- const optionComponent = computed(() => props.type === "button" ? checkbox_button_default : checkbox_default);
- provide(checkboxGroupContextKey, {
- ...pick(toRefs(props), [
- "size",
- "min",
- "max",
- "validateEvent",
- "fill",
- "textColor"
- ]),
- disabled: checkboxDisabled,
- modelValue,
- changeEvent
- });
- watch(() => props.modelValue, (newVal, oldValue) => {
- if (props.validateEvent && !isEqual$1(newVal, oldValue)) formItem?.validate("change").catch((err) => debugWarn(err));
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
- id: unref(groupId),
- class: normalizeClass(unref(ns).b("group")),
- role: "group",
- "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "checkbox-group" : void 0,
- "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem)?.labelId : void 0
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
- return openBlock(), createBlock(resolveDynamicComponent(optionComponent.value), mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), null, 16);
- }), 128))])]),
- _: 3
- }, 8, [
- "id",
- "class",
- "aria-label",
- "aria-labelledby"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/checkbox/index.mjs
- var ElCheckbox = withInstall(checkbox_default, {
- CheckboxButton: checkbox_button_default,
- CheckboxGroup: checkbox_group_default
- });
- var ElCheckboxButton = withNoopInstall(checkbox_button_default);
- var ElCheckboxGroup = withNoopInstall(checkbox_group_default);
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `RadioPropsBase` instead.
- */
- var radioPropsBase = buildProps({
- modelValue: {
- type: [
- String,
- Number,
- Boolean
- ],
- default: void 0
- },
- size: useSizeProp,
- disabled: {
- type: Boolean,
- default: void 0
- },
- label: {
- type: [
- String,
- Number,
- Boolean
- ],
- default: void 0
- },
- value: {
- type: [
- String,
- Number,
- Boolean
- ],
- default: void 0
- },
- name: {
- type: String,
- default: void 0
- }
- });
- /**
- * @deprecated Removed after 3.0.0, Use `RadioProps` instead.
- */
- var radioProps = buildProps({
- ...radioPropsBase,
- border: Boolean
- });
- var radioEmits = {
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
- [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
- };
- /**
- * @description default values for RadioProps
- */
- var radioPropsDefaults = {
- modelValue: void 0,
- disabled: void 0,
- label: void 0,
- value: void 0,
- name: void 0,
- border: false
- };
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/constants.mjs
- var radioGroupKey = Symbol("radioGroupKey");
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio-button.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `RadioButtonProps` instead.
- */
- var radioButtonProps = buildProps({ ...radioPropsBase });
- /**
- * @description default values for RadioButtonProps
- */
- var radioButtonPropsDefaults = {
- modelValue: void 0,
- disabled: void 0,
- label: void 0,
- value: void 0,
- name: void 0
- };
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio-group.mjs
- var radioDefaultProps = {
- label: "label",
- value: "value",
- disabled: "disabled"
- };
- /**
- * @deprecated Removed after 3.0.0, Use `RadioGroupProps` instead.
- */
- var radioGroupProps = buildProps({
- id: {
- type: String,
- default: void 0
- },
- size: useSizeProp,
- disabled: {
- type: Boolean,
- default: void 0
- },
- modelValue: {
- type: [
- String,
- Number,
- Boolean
- ],
- default: void 0
- },
- fill: {
- type: String,
- default: ""
- },
- textColor: {
- type: String,
- default: ""
- },
- name: {
- type: String,
- default: void 0
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- options: { type: definePropType(Array) },
- props: {
- type: definePropType(Object),
- default: () => radioDefaultProps
- },
- type: {
- type: String,
- values: ["radio", "button"],
- default: "radio"
- },
- ...useAriaProps(["ariaLabel"])
- });
- var radioGroupEmits = radioEmits;
- /**
- * @description default values for RadioGroupProps
- */
- var radioGroupPropsDefaults = {
- id: void 0,
- disabled: void 0,
- modelValue: void 0,
- fill: "",
- textColor: "",
- name: void 0,
- validateEvent: true,
- props: () => radioDefaultProps,
- type: "radio"
- };
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/use-radio.mjs
- var useRadio = (props, emit) => {
- const radioRef = ref();
- const radioGroup = inject(radioGroupKey, void 0);
- const isGroup = computed(() => !!radioGroup);
- const actualValue = computed(() => {
- if (!isPropAbsent(props.value)) return props.value;
- return props.label;
- });
- const modelValue = computed({
- get() {
- return isGroup.value ? radioGroup.modelValue : props.modelValue;
- },
- set(val) {
- if (isGroup.value) radioGroup.changeEvent(val);
- else emit && emit("update:modelValue", val);
- radioRef.value.checked = props.modelValue === actualValue.value;
- }
- });
- const size = useFormSize(computed(() => radioGroup?.size));
- const disabled = useFormDisabled(computed(() => radioGroup?.disabled));
- const focus = ref(false);
- const tabIndex = computed(() => {
- return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
- });
- useDeprecated({
- from: "label act as value",
- replacement: "value",
- version: "3.0.0",
- scope: "el-radio",
- ref: "https://element-plus.org/en-US/component/radio.html"
- }, computed(() => isGroup.value && isPropAbsent(props.value)));
- return {
- radioRef,
- isGroup,
- radioGroup,
- focus,
- size,
- disabled,
- tabIndex,
- modelValue,
- actualValue
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$61 = [
- "value",
- "name",
- "disabled",
- "checked"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio2.mjs
- var radio_default = /* @__PURE__ */ defineComponent({
- name: "ElRadio",
- __name: "radio",
- props: radioProps,
- emits: radioEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("radio");
- const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
- function handleChange() {
- nextTick(() => emit(CHANGE_EVENT, modelValue.value));
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("label", { class: normalizeClass([
- unref(ns).b(),
- unref(ns).is("disabled", unref(disabled)),
- unref(ns).is("focus", unref(focus)),
- unref(ns).is("bordered", __props.border),
- unref(ns).is("checked", unref(modelValue) === unref(actualValue)),
- unref(ns).m(unref(size))
- ]) }, [createBaseVNode("span", { class: normalizeClass([
- unref(ns).e("input"),
- unref(ns).is("disabled", unref(disabled)),
- unref(ns).is("checked", unref(modelValue) === unref(actualValue))
- ]) }, [withDirectives(createBaseVNode("input", {
- ref_key: "radioRef",
- ref: radioRef,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
- class: normalizeClass(unref(ns).e("original")),
- value: unref(actualValue),
- name: __props.name || unref(radioGroup)?.name,
- disabled: unref(disabled),
- checked: unref(modelValue) === unref(actualValue),
- type: "radio",
- onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
- onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
- onChange: handleChange,
- onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
- }, null, 42, _hoisted_1$61), [[vModelRadio, unref(modelValue)]]), createBaseVNode("span", { class: normalizeClass(unref(ns).e("inner")) }, null, 2)], 2), createBaseVNode("span", {
- class: normalizeClass(unref(ns).e("label")),
- onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 34)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio-button.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$60 = [
- "value",
- "name",
- "disabled"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio-button2.mjs
- var radio_button_default = /* @__PURE__ */ defineComponent({
- name: "ElRadioButton",
- __name: "radio-button",
- props: radioButtonProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("radio");
- const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
- const activeStyle = computed(() => {
- return {
- backgroundColor: radioGroup?.fill || "",
- borderColor: radioGroup?.fill || "",
- boxShadow: radioGroup?.fill ? `-1px 0 0 0 ${radioGroup.fill}` : "",
- color: radioGroup?.textColor || ""
- };
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("label", { class: normalizeClass([
- unref(ns).b("button"),
- unref(ns).is("active", unref(modelValue) === unref(actualValue)),
- unref(ns).is("disabled", unref(disabled)),
- unref(ns).is("focus", unref(focus)),
- unref(ns).bm("button", unref(size))
- ]) }, [withDirectives(createBaseVNode("input", {
- ref_key: "radioRef",
- ref: radioRef,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
- class: normalizeClass(unref(ns).be("button", "original-radio")),
- value: unref(actualValue),
- type: "radio",
- name: __props.name || unref(radioGroup)?.name,
- disabled: unref(disabled),
- onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
- onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
- onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
- }, null, 42, _hoisted_1$60), [[vModelRadio, unref(modelValue)]]), createBaseVNode("span", {
- class: normalizeClass(unref(ns).be("button", "inner")),
- style: normalizeStyle(unref(modelValue) === unref(actualValue) ? activeStyle.value : {}),
- onKeydown: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 38)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio-group.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$59 = [
- "id",
- "aria-label",
- "aria-labelledby"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/radio/src/radio-group2.mjs
- var radio_group_default = /* @__PURE__ */ defineComponent({
- name: "ElRadioGroup",
- __name: "radio-group",
- props: radioGroupProps,
- emits: radioGroupEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("radio");
- const radioId = useId();
- const radioGroupRef = ref();
- const { formItem } = useFormItem();
- const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
- const changeEvent = (value) => {
- emit(UPDATE_MODEL_EVENT, value);
- nextTick(() => emit(CHANGE_EVENT, value));
- };
- onMounted(() => {
- const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
- const firstLabel = radios[0];
- if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) firstLabel.tabIndex = 0;
- });
- const name = computed(() => {
- return props.name || radioId.value;
- });
- const aliasProps = computed(() => ({
- ...radioDefaultProps,
- ...props.props
- }));
- const getOptionProps = (option) => {
- const { label, value, disabled } = aliasProps.value;
- const base = {
- label: option[label],
- value: option[value],
- disabled: option[disabled]
- };
- return {
- ...omit(option, [
- label,
- value,
- disabled
- ]),
- ...base
- };
- };
- const optionComponent = computed(() => props.type === "button" ? radio_button_default : radio_default);
- provide(radioGroupKey, reactive({
- ...toRefs(props),
- changeEvent,
- name
- }));
- watch(() => props.modelValue, (newVal, oldValue) => {
- if (props.validateEvent && !isEqual$1(newVal, oldValue)) formItem?.validate("change").catch((err) => debugWarn(err));
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- id: unref(groupId),
- ref_key: "radioGroupRef",
- ref: radioGroupRef,
- class: normalizeClass(unref(ns).b("group")),
- role: "radiogroup",
- "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "radio-group" : void 0,
- "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
- }, [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
- return openBlock(), createBlock(resolveDynamicComponent(optionComponent.value), mergeProps({ key: index }, { ref_for: true }, getOptionProps(item)), null, 16);
- }), 128))])], 10, _hoisted_1$59);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/radio/index.mjs
- var ElRadio = withInstall(radio_default, {
- RadioButton: radio_button_default,
- RadioGroup: radio_group_default
- });
- var ElRadioGroup = withNoopInstall(radio_group_default);
- var ElRadioButton = withNoopInstall(radio_button_default);
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/types.mjs
- var CASCADER_PANEL_INJECTION_KEY = Symbol();
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
- function isVNodeEmpty(vnodes) {
- return !!(isArray$1(vnodes) ? vnodes.every(({ type }) => type === Comment) : vnodes?.type === Comment);
- }
- var node_content_default = /* @__PURE__ */ defineComponent({
- name: "NodeContent",
- props: { node: {
- type: Object,
- required: true
- } },
- setup(props) {
- const ns = useNamespace("cascader-node");
- const { renderLabelFn } = inject(CASCADER_PANEL_INJECTION_KEY);
- const { node } = props;
- const { data, label: nodeLabel } = node;
- const label = () => {
- const renderLabel = renderLabelFn?.({
- node,
- data
- });
- return isVNodeEmpty(renderLabel) ? nodeLabel : renderLabel ?? nodeLabel;
- };
- return () => createVNode("span", { "class": ns.e("label") }, [label()]);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/node.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$58 = [
- "id",
- "aria-haspopup",
- "aria-owns",
- "aria-expanded",
- "tabindex"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/node2.mjs
- var node_default = /* @__PURE__ */ defineComponent({
- name: "ElCascaderNode",
- __name: "node",
- props: {
- node: {
- type: Object,
- required: true
- },
- menuId: String
- },
- emits: ["expand"],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const panel = inject(CASCADER_PANEL_INJECTION_KEY);
- const ns = useNamespace("cascader-node");
- const isHoverMenu = computed(() => panel.isHoverMenu);
- const multiple = computed(() => panel.config.multiple);
- const checkStrictly = computed(() => panel.config.checkStrictly);
- const showPrefix = computed(() => panel.config.showPrefix);
- const checkedNodeId = computed(() => panel.checkedNodes[0]?.uid);
- const isDisabled = computed(() => props.node.isDisabled);
- const isLeaf = computed(() => props.node.isLeaf);
- const expandable = computed(() => checkStrictly.value && !isLeaf.value || !isDisabled.value);
- const inExpandingPath = computed(() => isInPath(panel.expandingNode));
- const inCheckedPath = computed(() => checkStrictly.value && panel.checkedNodes.some(isInPath));
- const isInPath = (node) => {
- const { level, uid } = props.node;
- return node?.pathNodes[level - 1]?.uid === uid;
- };
- const doExpand = () => {
- if (inExpandingPath.value) return;
- panel.expandNode(props.node);
- };
- const doCheck = (checked) => {
- const { node } = props;
- if (checked === node.checked) return;
- panel.handleCheckChange(node, checked);
- };
- const doLoad = () => {
- panel.lazyLoad(props.node, () => {
- if (!isLeaf.value) doExpand();
- });
- };
- const handleHoverExpand = (e) => {
- if (!isHoverMenu.value) return;
- handleExpand();
- !isLeaf.value && emit("expand", e);
- };
- const handleExpand = () => {
- const { node } = props;
- if (!expandable.value || node.loading) return;
- node.loaded ? doExpand() : doLoad();
- };
- const handleClick = () => {
- if (isLeaf.value && !isDisabled.value && !checkStrictly.value && !multiple.value) handleCheck(true);
- else if ((panel.config.checkOnClickNode && (multiple.value || checkStrictly.value) || isLeaf.value && panel.config.checkOnClickLeaf) && !isDisabled.value) handleSelectCheck(!props.node.checked);
- else if (!isHoverMenu.value) handleExpand();
- };
- const handleSelectCheck = (checked) => {
- if (checkStrictly.value) {
- doCheck(checked);
- if (props.node.loaded) doExpand();
- } else handleCheck(checked);
- };
- const handleCheck = (checked) => {
- if (!props.node.loaded) doLoad();
- else {
- doCheck(checked);
- !checkStrictly.value && doExpand();
- }
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("li", {
- id: `${__props.menuId}-${__props.node.uid}`,
- role: "menuitem",
- "aria-haspopup": !isLeaf.value,
- "aria-owns": isLeaf.value ? void 0 : __props.menuId,
- "aria-expanded": inExpandingPath.value,
- tabindex: expandable.value ? -1 : void 0,
- class: normalizeClass([
- unref(ns).b(),
- unref(ns).is("selectable", checkStrictly.value),
- unref(ns).is("active", __props.node.checked),
- unref(ns).is("disabled", !expandable.value),
- inExpandingPath.value && "in-active-path",
- inCheckedPath.value && "in-checked-path"
- ]),
- onMouseenter: handleHoverExpand,
- onFocus: handleHoverExpand,
- onClick: handleClick
- }, [
- createCommentVNode(" prefix "),
- multiple.value && showPrefix.value ? (openBlock(), createBlock(unref(ElCheckbox), {
- key: 0,
- "model-value": __props.node.checked,
- indeterminate: __props.node.indeterminate,
- disabled: isDisabled.value,
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
- "onUpdate:modelValue": handleSelectCheck
- }, null, 8, [
- "model-value",
- "indeterminate",
- "disabled"
- ])) : checkStrictly.value && showPrefix.value ? (openBlock(), createBlock(unref(ElRadio), {
- key: 1,
- "model-value": checkedNodeId.value,
- label: __props.node.uid,
- disabled: isDisabled.value,
- "onUpdate:modelValue": handleSelectCheck,
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
- }, {
- default: withCtx(() => [createCommentVNode("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "), _cache[2] || (_cache[2] = createBaseVNode("span", null, null, -1))]),
- _: 1
- }, 8, [
- "model-value",
- "label",
- "disabled"
- ])) : isLeaf.value && __props.node.checked ? (openBlock(), createBlock(unref(ElIcon), {
- key: 2,
- class: normalizeClass(unref(ns).e("prefix"))
- }, {
- default: withCtx(() => [createVNode(unref(check_default))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true),
- createCommentVNode(" content "),
- createVNode(unref(node_content_default), { node: __props.node }, null, 8, ["node"]),
- createCommentVNode(" postfix "),
- !isLeaf.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [__props.node.loading ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(ns).is("loading"), unref(ns).e("postfix")])
- }, {
- default: withCtx(() => [createVNode(unref(loading_default))]),
- _: 1
- }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass(["arrow-right", unref(ns).e("postfix")])
- }, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- }, 8, ["class"]))], 64)) : createCommentVNode("v-if", true)
- ], 42, _hoisted_1$58);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/menu.mjs
- var menu_default$1 = /* @__PURE__ */ defineComponent({
- name: "ElCascaderMenu",
- __name: "menu",
- props: {
- nodes: {
- type: Array,
- required: true
- },
- index: {
- type: Number,
- required: true
- }
- },
- setup(__props) {
- const props = __props;
- const instance = getCurrentInstance();
- const ns = useNamespace("cascader-menu");
- const { t } = useLocale();
- const id = useId();
- let activeNode;
- let hoverTimer;
- const panel = inject(CASCADER_PANEL_INJECTION_KEY);
- const hoverZone = ref();
- const isEmpty = computed(() => !props.nodes.length);
- const isLoading = computed(() => !panel.initialLoaded);
- const menuId = computed(() => `${id.value}-${props.index}`);
- const handleExpand = (e) => {
- activeNode = e.target;
- };
- const handleMouseMove = (e) => {
- if (!panel.isHoverMenu || !activeNode || !hoverZone.value) return;
- if (activeNode.contains(e.target)) {
- clearHoverTimer();
- const el = instance.vnode.el;
- const { left } = el.getBoundingClientRect();
- const { offsetWidth, offsetHeight } = el;
- const startX = e.clientX - left;
- const top = activeNode.offsetTop;
- const bottom = top + activeNode.offsetHeight;
- const scrollTop = el.querySelector(`.${ns.e("wrap")}`)?.scrollTop || 0;
- hoverZone.value.innerHTML = `
- <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${top} L${offsetWidth} ${scrollTop} V${top} Z" />
- <path style="pointer-events: auto;" fill="transparent" d="M${startX} ${bottom} L${offsetWidth} ${offsetHeight + scrollTop} V${bottom} Z" />
- `;
- } else if (!hoverTimer) hoverTimer = window.setTimeout(clearHoverZone, panel.config.hoverThreshold);
- };
- const clearHoverTimer = () => {
- if (!hoverTimer) return;
- clearTimeout(hoverTimer);
- hoverTimer = void 0;
- };
- const clearHoverZone = () => {
- if (!hoverZone.value) return;
- hoverZone.value.innerHTML = "";
- clearHoverTimer();
- };
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElScrollbar), {
- key: menuId.value,
- tag: "ul",
- role: "menu",
- class: normalizeClass(unref(ns).b()),
- "wrap-class": unref(ns).e("wrap"),
- "view-class": [unref(ns).e("list"), unref(ns).is("empty", isEmpty.value)],
- onMousemove: handleMouseMove,
- onMouseleave: clearHoverZone
- }, {
- default: withCtx(() => [
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes, (node) => {
- return openBlock(), createBlock(node_default, {
- key: node.uid,
- node,
- "menu-id": menuId.value,
- onExpand: handleExpand
- }, null, 8, ["node", "menu-id"]);
- }), 128)),
- isLoading.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("empty-text"))
- }, [createVNode(unref(ElIcon), {
- size: "14",
- class: normalizeClass(unref(ns).is("loading"))
- }, {
- default: withCtx(() => [createVNode(unref(loading_default))]),
- _: 1
- }, 8, ["class"]), createTextVNode(" " + toDisplayString(unref(t)("el.cascader.loading")), 1)], 2)) : isEmpty.value ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("empty-text"))
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(unref(t)("el.cascader.noData")), 1)])], 2)) : unref(panel)?.isHoverMenu ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" eslint-disable vue/html-self-closing "), (openBlock(), createElementBlock("svg", {
- ref_key: "hoverZone",
- ref: hoverZone,
- class: normalizeClass(unref(ns).e("hover-zone"))
- }, null, 2))], 2112)) : createCommentVNode("v-if", true),
- createCommentVNode(" eslint-enable vue/html-self-closing ")
- ]),
- _: 3
- }, 8, [
- "class",
- "wrap-class",
- "view-class"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/node.mjs
- var uid = 0;
- var calculatePathNodes = (node) => {
- const nodes = [node];
- let { parent } = node;
- while (parent) {
- nodes.unshift(parent);
- parent = parent.parent;
- }
- return nodes;
- };
- var Node$2 = class Node {
- constructor(data, config, parent, root = false) {
- this.data = data;
- this.config = config;
- this.parent = parent;
- this.root = root;
- this.uid = uid++;
- this.checked = false;
- this.indeterminate = false;
- this.loading = false;
- const { value: valueKey, label: labelKey, children: childrenKey } = config;
- const childrenData = data[childrenKey];
- const pathNodes = calculatePathNodes(this);
- this.level = root ? 0 : parent ? parent.level + 1 : 1;
- this.value = data[valueKey];
- this.label = data[labelKey];
- this.pathNodes = pathNodes;
- this.pathValues = pathNodes.map((node) => node.value);
- this.pathLabels = pathNodes.map((node) => node.label);
- this.childrenData = childrenData;
- this.children = (childrenData || []).map((child) => new Node(child, config, this));
- this.loaded = !config.lazy || this.isLeaf || !isEmpty(childrenData);
- this.text = "";
- }
- get isDisabled() {
- const { data, parent, config } = this;
- const { disabled, checkStrictly } = config;
- return (isFunction$1(disabled) ? disabled(data, this) : !!data[disabled]) || !checkStrictly && !!parent?.isDisabled;
- }
- get isLeaf() {
- const { data, config, childrenData, loaded } = this;
- const { lazy, leaf } = config;
- const isLeaf = isFunction$1(leaf) ? leaf(data, this) : data[leaf];
- return isUndefined(isLeaf) ? lazy && !loaded ? false : !(isArray$1(childrenData) && childrenData.length) : !!isLeaf;
- }
- get valueByOption() {
- return this.config.emitPath ? this.pathValues : this.value;
- }
- appendChild(childData) {
- const { childrenData, children } = this;
- const node = new Node(childData, this.config, this);
- if (isArray$1(childrenData)) childrenData.push(childData);
- else this.childrenData = [childData];
- children.push(node);
- return node;
- }
- calcText(allLevels, separator) {
- const text = allLevels ? this.pathLabels.join(separator) : this.label;
- this.text = text;
- return text;
- }
- broadcast(checked) {
- this.children.forEach((child) => {
- if (child) {
- child.broadcast(checked);
- child.onParentCheck?.(checked);
- }
- });
- }
- emit() {
- const { parent } = this;
- if (parent) {
- parent.onChildCheck?.();
- parent.emit();
- }
- }
- onParentCheck(checked) {
- if (!this.isDisabled) this.setCheckState(checked);
- }
- onChildCheck() {
- const { children } = this;
- const validChildren = children.filter((child) => !child.isDisabled);
- const checked = validChildren.length ? validChildren.every((child) => child.checked) : false;
- this.setCheckState(checked);
- }
- setCheckState(checked) {
- const totalNum = this.children.length;
- const checkedNum = this.children.reduce((c, p) => {
- return c + (p.checked ? 1 : p.indeterminate ? .5 : 0);
- }, 0);
- this.checked = this.loaded && this.children.filter((child) => !child.isDisabled).every((child) => child.loaded && child.checked) && checked;
- this.indeterminate = this.loaded && checkedNum !== totalNum && checkedNum > 0;
- }
- doCheck(checked) {
- if (this.checked === checked) return;
- const { checkStrictly, multiple } = this.config;
- if (checkStrictly || !multiple) this.checked = checked;
- else {
- this.broadcast(checked);
- this.setCheckState(checked);
- this.emit();
- }
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/store.mjs
- var flatNodes = (nodes, leafOnly) => {
- return nodes.reduce((res, node) => {
- if (node.isLeaf) res.push(node);
- else {
- !leafOnly && res.push(node);
- res = res.concat(flatNodes(node.children, leafOnly));
- }
- return res;
- }, []);
- };
- var Store = class {
- constructor(data, config) {
- this.config = config;
- const nodes = (data || []).map((nodeData) => new Node$2(nodeData, this.config));
- this.nodes = nodes;
- this.allNodes = flatNodes(nodes, false);
- this.leafNodes = flatNodes(nodes, true);
- }
- getNodes() {
- return this.nodes;
- }
- getFlattedNodes(leafOnly) {
- return leafOnly ? this.leafNodes : this.allNodes;
- }
- appendNode(nodeData, parentNode) {
- const node = parentNode ? parentNode.appendChild(nodeData) : new Node$2(nodeData, this.config);
- if (!parentNode) this.nodes.push(node);
- this.appendAllNodesAndLeafNodes(node);
- }
- appendNodes(nodeDataList, parentNode) {
- if (nodeDataList.length > 0) nodeDataList.forEach((nodeData) => this.appendNode(nodeData, parentNode));
- else parentNode && parentNode.isLeaf && this.leafNodes.push(parentNode);
- }
- appendAllNodesAndLeafNodes(node) {
- this.allNodes.push(node);
- node.isLeaf && this.leafNodes.push(node);
- if (node.children) node.children.forEach((subNode) => {
- this.appendAllNodesAndLeafNodes(subNode);
- });
- }
- getNodeByValue(value, leafOnly = false) {
- if (isPropAbsent(value)) return null;
- return this.getFlattedNodes(leafOnly).find((node) => isEqual$1(node.value, value) || isEqual$1(node.pathValues, value)) || null;
- }
- getSameNode(node) {
- if (!node) return null;
- return this.getFlattedNodes(false).find(({ value, level }) => isEqual$1(node.value, value) && node.level === level) || null;
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/src/utils.mjs
- var getMenuIndex = (el) => {
- if (!el) return 0;
- const pieces = el.id.split("-");
- return Number(pieces[pieces.length - 2]);
- };
- var checkNode = (el) => {
- if (!el) return;
- const input = el.querySelector("input");
- if (input) input.click();
- else if (isLeaf(el)) el.click();
- };
- var sortByOriginalOrder = (oldNodes, newNodes) => {
- const newNodesCopy = newNodes.slice(0);
- const newIds = newNodesCopy.map((node) => node.uid);
- const res = oldNodes.reduce((acc, item) => {
- const index = newIds.indexOf(item.uid);
- if (index > -1) {
- acc.push(item);
- newNodesCopy.splice(index, 1);
- newIds.splice(index, 1);
- }
- return acc;
- }, []);
- res.push(...newNodesCopy);
- return res;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/cascader-panel/index.mjs
- var ElCascaderPanel = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCascaderPanel",
- __name: "index",
- props: cascaderPanelProps,
- emits: cascaderPanelEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- let manualChecked = false;
- const ns = useNamespace("cascader");
- const config = useCascaderConfig(props);
- const slots = useSlots();
- let store;
- const initialLoaded = ref(true);
- const initialLoadedOnce = ref(false);
- const menuList = ref([]);
- const checkedValue = ref();
- const menus = ref([]);
- const expandingNode = ref();
- const checkedNodes = ref([]);
- const isHoverMenu = computed(() => config.value.expandTrigger === "hover");
- const renderLabelFn = computed(() => props.renderLabel || slots.default);
- const initStore = () => {
- const { options } = props;
- const cfg = config.value;
- manualChecked = false;
- store = new Store(options, cfg);
- menus.value = [store.getNodes()];
- if (cfg.lazy && isEmpty(props.options)) {
- initialLoaded.value = false;
- lazyLoad(void 0, (list) => {
- if (list) {
- store = new Store(list, cfg);
- menus.value = [store.getNodes()];
- }
- initialLoaded.value = true;
- syncCheckedValue(false, true);
- });
- } else syncCheckedValue(false, true);
- };
- const lazyLoad = (node, cb) => {
- const cfg = config.value;
- node = node || new Node$2({}, cfg, void 0, true);
- node.loading = true;
- const resolve = (dataList) => {
- const _node = node;
- const parent = _node.root ? null : _node;
- _node.loading = false;
- _node.loaded = true;
- _node.childrenData = _node.childrenData || [];
- dataList && store?.appendNodes(dataList, parent);
- dataList && cb?.(dataList);
- if (node.level === 0) initialLoadedOnce.value = true;
- };
- const reject = () => {
- node.loading = false;
- node.loaded = false;
- if (node.level === 0) initialLoaded.value = true;
- };
- cfg.lazyLoad(node, resolve, reject);
- };
- const expandNode = (node, silent) => {
- const { level } = node;
- const newMenus = menus.value.slice(0, level);
- let newExpandingNode;
- if (node.isLeaf) newExpandingNode = node.pathNodes[level - 2];
- else {
- newExpandingNode = node;
- newMenus.push(node.children);
- }
- if (expandingNode.value?.uid !== newExpandingNode?.uid) {
- expandingNode.value = node;
- menus.value = newMenus;
- !silent && emit("expand-change", node?.pathValues || []);
- }
- };
- const handleCheckChange = (node, checked, emitClose = true) => {
- const { checkStrictly, multiple } = config.value;
- const oldNode = checkedNodes.value[0];
- manualChecked = true;
- !multiple && oldNode?.doCheck(false);
- node.doCheck(checked);
- calculateCheckedValue();
- emitClose && !multiple && !checkStrictly && emit("close");
- !emitClose && !multiple && expandParentNode(node);
- };
- const expandParentNode = (node) => {
- if (!node) return;
- node = node.parent;
- expandParentNode(node);
- node && expandNode(node);
- };
- const getFlattedNodes = (leafOnly) => store?.getFlattedNodes(leafOnly);
- const getCheckedNodes = (leafOnly) => {
- return getFlattedNodes(leafOnly)?.filter(({ checked }) => checked !== false);
- };
- const clearCheckedNodes = () => {
- checkedNodes.value.forEach((node) => node.doCheck(false));
- calculateCheckedValue();
- menus.value = menus.value.slice(0, 1);
- expandingNode.value = void 0;
- emit("expand-change", []);
- };
- const calculateCheckedValue = () => {
- const { checkStrictly, multiple } = config.value;
- const oldNodes = checkedNodes.value;
- const nodes = sortByOriginalOrder(oldNodes, getCheckedNodes(!checkStrictly));
- const values = nodes.map((node) => node.valueByOption);
- checkedNodes.value = nodes;
- checkedValue.value = multiple ? values : values[0] ?? null;
- };
- const syncCheckedValue = (loaded = false, forced = false) => {
- const { modelValue } = props;
- const { lazy, multiple, checkStrictly } = config.value;
- const leafOnly = !checkStrictly;
- if (!initialLoaded.value || manualChecked || !forced && isEqual$1(modelValue, checkedValue.value)) return;
- if (lazy && !loaded) {
- const nodes = unique(flattenDeep(castArray(modelValue))).map((val) => store?.getNodeByValue(val)).filter((node) => !!node && !node.loaded && !node.loading);
- if (nodes.length) nodes.forEach((node) => {
- lazyLoad(node, () => syncCheckedValue(false, forced));
- });
- else syncCheckedValue(true, forced);
- } else {
- syncMenuState(unique((multiple ? castArray(modelValue) : [modelValue]).map((val) => store?.getNodeByValue(val, leafOnly))), forced);
- checkedValue.value = cloneDeep(modelValue ?? void 0);
- }
- };
- const syncMenuState = (newCheckedNodes, reserveExpandingState = true) => {
- const { checkStrictly } = config.value;
- const oldNodes = checkedNodes.value;
- const newNodes = newCheckedNodes.filter((node) => !!node && (checkStrictly || node.isLeaf));
- const oldExpandingNode = store?.getSameNode(expandingNode.value);
- const newExpandingNode = reserveExpandingState && oldExpandingNode || newNodes[0];
- if (newExpandingNode) newExpandingNode.pathNodes.forEach((node) => expandNode(node, true));
- else expandingNode.value = void 0;
- oldNodes.forEach((node) => node.doCheck(false));
- reactive(newNodes).forEach((node) => node.doCheck(true));
- checkedNodes.value = newNodes;
- nextTick(scrollToExpandingNode);
- };
- const scrollToExpandingNode = () => {
- if (!isClient) return;
- menuList.value.forEach((menu) => {
- const menuElement = menu?.$el;
- if (menuElement) {
- const container = menuElement.querySelector(`.${ns.namespace.value}-scrollbar__wrap`);
- let activeNode = menuElement.querySelector(`.${ns.b("node")}.in-active-path`);
- if (!activeNode) {
- const activeElements = menuElement.querySelectorAll(`.${ns.b("node")}.${ns.is("active")}`);
- activeNode = activeElements[activeElements.length - 1];
- }
- scrollIntoView(container, activeNode);
- }
- });
- };
- const handleKeyDown = (e) => {
- const target = e.target;
- const code = getEventCode(e);
- switch (code) {
- case EVENT_CODE.up:
- case EVENT_CODE.down:
- e.preventDefault();
- focusNode(getSibling(target, code === EVENT_CODE.up ? -1 : 1, `.${ns.b("node")}[tabindex="-1"]`));
- break;
- case EVENT_CODE.left: {
- e.preventDefault();
- const expandedNode = menuList.value[getMenuIndex(target) - 1]?.$el.querySelector(`.${ns.b("node")}[aria-expanded="true"]`);
- focusNode(expandedNode);
- break;
- }
- case EVENT_CODE.right: {
- e.preventDefault();
- const firstNode = menuList.value[getMenuIndex(target) + 1]?.$el.querySelector(`.${ns.b("node")}[tabindex="-1"]`);
- focusNode(firstNode);
- break;
- }
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- checkNode(target);
- break;
- }
- };
- provide(CASCADER_PANEL_INJECTION_KEY, reactive({
- config,
- expandingNode,
- checkedNodes,
- isHoverMenu,
- initialLoaded,
- renderLabelFn,
- lazyLoad,
- expandNode,
- handleCheckChange
- }));
- watch(config, (newVal, oldVal) => {
- if (isEqual$1(newVal, oldVal)) return;
- initStore();
- }, { immediate: true });
- watch(() => props.options, initStore, { deep: true });
- watch(() => props.modelValue, () => {
- manualChecked = false;
- syncCheckedValue();
- }, { deep: true });
- watch(() => checkedValue.value, (val) => {
- if (!isEqual$1(val, props.modelValue)) {
- emit(UPDATE_MODEL_EVENT, val);
- emit(CHANGE_EVENT, val);
- }
- });
- const loadLazyRootNodes = () => {
- if (initialLoadedOnce.value) return;
- initStore();
- };
- onBeforeUpdate(() => menuList.value = []);
- onMounted(() => !isEmpty(props.modelValue) && syncCheckedValue());
- __expose({
- menuList,
- menus,
- checkedNodes,
- handleKeyDown,
- handleCheckChange,
- getFlattedNodes,
- getCheckedNodes,
- clearCheckedNodes,
- calculateCheckedValue,
- scrollToExpandingNode,
- loadLazyRootNodes
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([unref(ns).b("panel"), unref(ns).is("bordered", __props.border)]),
- onKeydown: handleKeyDown
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(menus.value, (menu, index) => {
- return openBlock(), createBlock(menu_default$1, {
- key: index,
- ref_for: true,
- ref: (item) => menuList.value[index] = item,
- index,
- nodes: [...menu]
- }, {
- empty: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
- _: 3
- }, 8, ["index", "nodes"]);
- }), 128))], 34);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/cascader/src/cascader.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CascaderComponentProps` instead.
- */
- var cascaderProps = buildProps({
- ...CommonProps,
- size: useSizeProp,
- placeholder: String,
- disabled: {
- type: Boolean,
- default: void 0
- },
- clearable: Boolean,
- clearIcon: {
- type: iconPropType,
- default: circle_close_default
- },
- filterable: Boolean,
- filterMethod: {
- type: definePropType(Function),
- default: (node, keyword) => node.text.includes(keyword)
- },
- separator: {
- type: String,
- default: " / "
- },
- showAllLevels: {
- type: Boolean,
- default: true
- },
- collapseTags: Boolean,
- maxCollapseTags: {
- type: Number,
- default: 1
- },
- collapseTagsTooltip: Boolean,
- maxCollapseTagsTooltipHeight: { type: [String, Number] },
- debounce: {
- type: Number,
- default: 300
- },
- beforeFilter: {
- type: definePropType(Function),
- default: () => true
- },
- placement: {
- type: definePropType(String),
- values: Ee,
- default: "bottom-start"
- },
- fallbackPlacements: {
- type: definePropType(Array),
- default: [
- "bottom-start",
- "bottom",
- "top-start",
- "top",
- "right",
- "left"
- ]
- },
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- teleported: useTooltipContentProps.teleported,
- effect: {
- type: definePropType(String),
- default: "light"
- },
- tagType: {
- ...tagProps.type,
- default: "info"
- },
- tagEffect: {
- ...tagProps.effect,
- default: "light"
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- persistent: {
- type: Boolean,
- default: true
- },
- showCheckedStrategy: {
- type: String,
- values: ["parent", "child"],
- default: "child"
- },
- checkOnClickNode: Boolean,
- showPrefix: {
- type: Boolean,
- default: true
- },
- ...useEmptyValuesProps
- });
- var emitChangeFn$1 = (value) => true;
- var cascaderEmits = {
- [UPDATE_MODEL_EVENT]: emitChangeFn$1,
- [CHANGE_EVENT]: emitChangeFn$1,
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true,
- visibleChange: (val) => isBoolean(val),
- expandChange: (val) => !!val,
- removeTag: (val) => !!val
- };
- //#endregion
- //#region node_modules/element-plus/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$57 = ["placeholder"];
- var _hoisted_2$34 = ["onClick"];
- //#endregion
- //#region node_modules/element-plus/es/components/cascader/index.mjs
- var ElCascader = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCascader",
- __name: "cascader",
- props: cascaderProps,
- emits: cascaderEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const popperOptions = { modifiers: [{
- name: "arrowPosition",
- enabled: true,
- phase: "main",
- fn: ({ state }) => {
- const { modifiersData, placement } = state;
- if ([
- "right",
- "left",
- "bottom",
- "top"
- ].includes(placement)) return;
- if (modifiersData.arrow) modifiersData.arrow.x = 35;
- },
- requires: ["arrow"]
- }] };
- const props = __props;
- const emit = __emit;
- const attrs = useAttrs$1();
- const slots = useSlots();
- let inputInitialHeight = 0;
- let pressDeleteCount = 0;
- const nsCascader = useNamespace("cascader");
- const nsInput = useNamespace("input");
- const sizeMapPadding = {
- small: 7,
- default: 11,
- large: 15
- };
- const { t } = useLocale();
- const { formItem } = useFormItem();
- const isDisabled = useFormDisabled();
- const { valueOnClear } = useEmptyValues(props);
- const { isComposing, handleComposition } = useComposition({ afterComposition(event) {
- const text = event.target?.value;
- handleInput(text);
- } });
- const tooltipRef = ref();
- const tagTooltipRef = ref();
- const inputRef = ref();
- const tagWrapper = ref();
- const cascaderPanelRef = ref();
- const suggestionPanel = ref();
- const popperVisible = ref(false);
- const inputHover = ref(false);
- const filtering = ref(false);
- const inputValue = ref("");
- const searchInputValue = ref("");
- const tags = ref([]);
- const suggestions = ref([]);
- const showTagList = computed(() => {
- if (!props.props.multiple) return [];
- return props.collapseTags ? tags.value.slice(0, props.maxCollapseTags) : tags.value;
- });
- const collapseTagList = computed(() => {
- if (!props.props.multiple) return [];
- return props.collapseTags ? tags.value.slice(props.maxCollapseTags) : [];
- });
- const cascaderStyle = computed(() => {
- return attrs.style;
- });
- const inputPlaceholder = computed(() => props.placeholder ?? t("el.cascader.placeholder"));
- const currentPlaceholder = computed(() => searchInputValue.value || tags.value.length > 0 || isComposing.value ? "" : inputPlaceholder.value);
- const realSize = useFormSize();
- const tagSize = computed(() => realSize.value === "small" ? "small" : "default");
- const multiple = computed(() => !!props.props.multiple);
- const readonly = computed(() => !props.filterable || multiple.value);
- const searchKeyword = computed(() => multiple.value ? searchInputValue.value : inputValue.value);
- const checkedNodes = computed(() => cascaderPanelRef.value?.checkedNodes || []);
- const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
- disabled: isDisabled,
- beforeBlur(event) {
- return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- });
- const clearBtnVisible = computed(() => {
- if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value && !isFocused.value) return false;
- return !!checkedNodes.value.length;
- });
- const presentText = computed(() => {
- const { showAllLevels, separator } = props;
- const nodes = checkedNodes.value;
- return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
- });
- const validateState = computed(() => formItem?.validateState || "");
- const checkedValue = computed({
- get() {
- return cloneDeep(props.modelValue);
- },
- set(val) {
- const value = val ?? valueOnClear.value;
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value);
- if (props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
- }
- });
- const cascaderKls = computed(() => {
- return [
- nsCascader.b(),
- nsCascader.m(realSize.value),
- nsCascader.is("disabled", isDisabled.value),
- attrs.class
- ];
- });
- const cascaderIconKls = computed(() => {
- return [
- nsInput.e("icon"),
- "icon-arrow-down",
- nsCascader.is("reverse", popperVisible.value)
- ];
- });
- const inputClass = computed(() => nsCascader.is("focus", isFocused.value));
- const contentRef = computed(() => {
- return tooltipRef.value?.popperRef?.contentRef;
- });
- const handleClickOutside = (event) => {
- if (isFocused.value) handleBlur(new FocusEvent("blur", event));
- togglePopperVisible(false);
- };
- const togglePopperVisible = (visible) => {
- if (isDisabled.value) return;
- visible = visible ?? !popperVisible.value;
- if (visible !== popperVisible.value) {
- popperVisible.value = visible;
- inputRef.value?.input?.setAttribute("aria-expanded", `${visible}`);
- if (visible) {
- updatePopperPosition();
- cascaderPanelRef.value && nextTick(cascaderPanelRef.value.scrollToExpandingNode);
- } else if (props.filterable) syncPresentTextValue();
- emit("visibleChange", visible);
- }
- };
- const updatePopperPosition = () => {
- nextTick(() => {
- tooltipRef.value?.updatePopper();
- });
- };
- const hideSuggestionPanel = () => {
- filtering.value = false;
- };
- const genTag = (node) => {
- const { showAllLevels, separator } = props;
- return {
- node,
- key: node.uid,
- text: node.calcText(showAllLevels, separator),
- hitState: false,
- closable: !isDisabled.value && !node.isDisabled
- };
- };
- const deleteTag = (tag) => {
- const node = tag.node;
- node.doCheck(false);
- cascaderPanelRef.value?.calculateCheckedValue();
- emit("removeTag", node.valueByOption);
- };
- const getStrategyCheckedNodes = () => {
- switch (props.showCheckedStrategy) {
- case "child": return checkedNodes.value;
- case "parent": {
- const clickedNodes = getCheckedNodes(false);
- const clickedNodesValue = clickedNodes.map((o) => o.value);
- return clickedNodes.filter((o) => !o.parent || !clickedNodesValue.includes(o.parent.value));
- }
- default: return [];
- }
- };
- const calculatePresentTags = () => {
- if (!multiple.value) return;
- const nodes = getStrategyCheckedNodes();
- const allTags = [];
- nodes.forEach((node) => allTags.push(genTag(node)));
- tags.value = allTags;
- };
- const calculateSuggestions = () => {
- const { filterMethod, showAllLevels, separator } = props;
- const res = cascaderPanelRef.value?.getFlattedNodes(!props.props.checkStrictly)?.filter((node) => {
- if (node.isDisabled) return false;
- node.calcText(showAllLevels, separator);
- return filterMethod(node, searchKeyword.value);
- });
- if (multiple.value) tags.value.forEach((tag) => {
- tag.hitState = false;
- });
- filtering.value = true;
- suggestions.value = res;
- updatePopperPosition();
- };
- const focusFirstNode = () => {
- let firstNode;
- if (filtering.value && suggestionPanel.value) firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
- else firstNode = cascaderPanelRef.value?.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
- if (firstNode) {
- firstNode.focus();
- !filtering.value && firstNode.click();
- }
- };
- const updateStyle = () => {
- const inputInner = inputRef.value?.input;
- const tagWrapperEl = tagWrapper.value;
- const suggestionPanelEl = suggestionPanel.value?.$el;
- if (!isClient || !inputInner) return;
- if (suggestionPanelEl) {
- const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
- suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
- }
- if (tagWrapperEl) {
- const { offsetHeight } = tagWrapperEl;
- const height = tags.value.length > 0 ? `${Math.max(offsetHeight, inputInitialHeight) - 2}px` : `${inputInitialHeight}px`;
- inputInner.style.height = height;
- if (slots.prefix) {
- const prefix = inputRef.value?.$el.querySelector(`.${nsInput.e("prefix")}`);
- let left = 0;
- if (prefix) {
- left = prefix.offsetWidth;
- if (left > 0) left += sizeMapPadding[realSize.value || "default"];
- }
- tagWrapperEl.style.left = `${left}px`;
- } else tagWrapperEl.style.left = `0`;
- updatePopperPosition();
- }
- };
- const getCheckedNodes = (leafOnly) => {
- return cascaderPanelRef.value?.getCheckedNodes(leafOnly);
- };
- const handleExpandChange = (value) => {
- updatePopperPosition();
- emit("expandChange", value);
- };
- const handleKeyDown = (e) => {
- if (isComposing.value) return;
- switch (getEventCode(e)) {
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- togglePopperVisible();
- break;
- case EVENT_CODE.down:
- togglePopperVisible(true);
- nextTick(focusFirstNode);
- e.preventDefault();
- break;
- case EVENT_CODE.esc:
- if (popperVisible.value === true) {
- e.preventDefault();
- e.stopPropagation();
- togglePopperVisible(false);
- }
- break;
- case EVENT_CODE.tab:
- togglePopperVisible(false);
- break;
- }
- };
- const handleClear = () => {
- cascaderPanelRef.value?.clearCheckedNodes();
- if (!popperVisible.value && props.filterable) syncPresentTextValue();
- togglePopperVisible(false);
- emit("clear");
- };
- const syncPresentTextValue = () => {
- const { value } = presentText;
- inputValue.value = value;
- searchInputValue.value = value;
- };
- const handleSuggestionClick = (node) => {
- const { checked } = node;
- if (multiple.value) cascaderPanelRef.value?.handleCheckChange(node, !checked, false);
- else {
- !checked && cascaderPanelRef.value?.handleCheckChange(node, true, false);
- togglePopperVisible(false);
- }
- };
- const handleSuggestionKeyDown = (e) => {
- const target = e.target;
- const code = getEventCode(e);
- switch (code) {
- case EVENT_CODE.up:
- case EVENT_CODE.down:
- e.preventDefault();
- focusNode(getSibling(target, code === EVENT_CODE.up ? -1 : 1, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- target.click();
- break;
- }
- };
- const handleDelete = () => {
- const lastTag = tags.value[tags.value.length - 1];
- pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
- if (!lastTag || !pressDeleteCount || props.collapseTags && tags.value.length > 1) return;
- if (lastTag.hitState) deleteTag(lastTag);
- else lastTag.hitState = true;
- };
- const handleFilter = useDebounceFn(() => {
- const { value } = searchKeyword;
- if (!value) return;
- const passed = props.beforeFilter(value);
- if (isPromise(passed)) passed.then(calculateSuggestions).catch(() => {});
- else if (passed !== false) calculateSuggestions();
- else hideSuggestionPanel();
- }, computed(() => props.debounce));
- const handleInput = (val, e) => {
- !popperVisible.value && togglePopperVisible(true);
- if (e?.isComposing) return;
- val ? handleFilter() : hideSuggestionPanel();
- };
- const getInputInnerHeight = (inputInner) => Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- inputRef.value?.blur();
- };
- watch(filtering, updatePopperPosition);
- watch([
- checkedNodes,
- isDisabled,
- () => props.collapseTags,
- () => props.maxCollapseTags
- ], calculatePresentTags);
- watch(tags, () => {
- nextTick(() => updateStyle());
- });
- watch(realSize, async () => {
- await nextTick();
- const inputInner = inputRef.value.input;
- inputInitialHeight = getInputInnerHeight(inputInner) || inputInitialHeight;
- updateStyle();
- });
- watch(presentText, syncPresentTextValue, { immediate: true });
- watch(() => popperVisible.value, (val) => {
- if (val && props.props.lazy && props.props.lazyLoad) cascaderPanelRef.value?.loadLazyRootNodes();
- });
- onMounted(() => {
- const inputInner = inputRef.value.input;
- const inputInnerHeight = getInputInnerHeight(inputInner);
- inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
- useResizeObserver(inputInner, updateStyle);
- });
- __expose({
- getCheckedNodes,
- cascaderPanelRef,
- togglePopperVisible,
- contentRef,
- presentText,
- focus,
- blur
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTooltip), {
- ref_key: "tooltipRef",
- ref: tooltipRef,
- visible: popperVisible.value,
- teleported: __props.teleported,
- "popper-class": [unref(nsCascader).e("dropdown"), __props.popperClass],
- "popper-style": __props.popperStyle,
- "popper-options": popperOptions,
- "fallback-placements": __props.fallbackPlacements,
- "stop-popper-mouse-event": false,
- "gpu-acceleration": false,
- placement: __props.placement,
- transition: `${unref(nsCascader).namespace.value}-zoom-in-top`,
- effect: __props.effect,
- pure: "",
- persistent: __props.persistent,
- onHide: hideSuggestionPanel
- }, {
- default: withCtx(() => [withDirectives((openBlock(), createElementBlock("div", {
- ref_key: "wrapperRef",
- ref: wrapperRef,
- class: normalizeClass(cascaderKls.value),
- style: normalizeStyle(cascaderStyle.value),
- onClick: _cache[8] || (_cache[8] = () => togglePopperVisible(readonly.value ? void 0 : true)),
- onKeydown: handleKeyDown,
- onMouseenter: _cache[9] || (_cache[9] = ($event) => inputHover.value = true),
- onMouseleave: _cache[10] || (_cache[10] = ($event) => inputHover.value = false)
- }, [createVNode(unref(ElInput), {
- ref_key: "inputRef",
- ref: inputRef,
- modelValue: inputValue.value,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inputValue.value = $event),
- placeholder: currentPlaceholder.value,
- readonly: readonly.value,
- disabled: unref(isDisabled),
- "validate-event": false,
- size: unref(realSize),
- class: normalizeClass(inputClass.value),
- tabindex: multiple.value && __props.filterable && !unref(isDisabled) ? -1 : void 0,
- onCompositionstart: unref(handleComposition),
- onCompositionupdate: unref(handleComposition),
- onCompositionend: unref(handleComposition),
- onInput: handleInput
- }, createSlots({
- suffix: withCtx(() => [clearBtnVisible.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: "clear",
- class: normalizeClass([unref(nsInput).e("icon"), "icon-circle-close"]),
- onClick: withModifiers(handleClear, ["stop"])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
- _: 1
- }, 8, ["class"])) : (openBlock(), createBlock(unref(ElIcon), {
- key: "arrow-down",
- class: normalizeClass(cascaderIconKls.value),
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => togglePopperVisible(), ["stop"]))
- }, {
- default: withCtx(() => [createVNode(unref(arrow_down_default))]),
- _: 1
- }, 8, ["class"]))]),
- _: 2
- }, [_ctx.$slots.prefix ? {
- name: "prefix",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
- key: "0"
- } : void 0]), 1032, [
- "modelValue",
- "placeholder",
- "readonly",
- "disabled",
- "size",
- "class",
- "tabindex",
- "onCompositionstart",
- "onCompositionupdate",
- "onCompositionend"
- ]), multiple.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref_key: "tagWrapper",
- ref: tagWrapper,
- class: normalizeClass([unref(nsCascader).e("tags"), unref(nsCascader).is("validate", Boolean(validateState.value))])
- }, [
- renderSlot(_ctx.$slots, "tag", {
- data: tags.value,
- deleteTag
- }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(showTagList.value, (tag) => {
- return openBlock(), createBlock(unref(ElTag), {
- key: tag.key,
- type: __props.tagType,
- size: tagSize.value,
- effect: __props.tagEffect,
- hit: tag.hitState,
- closable: tag.closable,
- "disable-transitions": "",
- onClose: ($event) => deleteTag(tag)
- }, {
- default: withCtx(() => [createBaseVNode("span", null, toDisplayString(tag.text), 1)]),
- _: 2
- }, 1032, [
- "type",
- "size",
- "effect",
- "hit",
- "closable",
- "onClose"
- ]);
- }), 128))]),
- __props.collapseTags && tags.value.length > __props.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
- key: 0,
- ref_key: "tagTooltipRef",
- ref: tagTooltipRef,
- disabled: popperVisible.value || !__props.collapseTagsTooltip,
- "fallback-placements": [
- "bottom",
- "top",
- "right",
- "left"
- ],
- placement: "bottom",
- "popper-class": __props.popperClass,
- "popper-style": __props.popperStyle,
- effect: __props.effect,
- persistent: __props.persistent
- }, {
- default: withCtx(() => [createVNode(unref(ElTag), {
- closable: false,
- size: tagSize.value,
- type: __props.tagType,
- effect: __props.tagEffect,
- "disable-transitions": ""
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(unref(nsCascader).e("tags-text")) }, " + " + toDisplayString(tags.value.length - __props.maxCollapseTags), 3)]),
- _: 1
- }, 8, [
- "size",
- "type",
- "effect"
- ])]),
- content: withCtx(() => [createVNode(unref(ElScrollbar), { "max-height": __props.maxCollapseTagsTooltipHeight }, {
- default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(nsCascader).e("collapse-tags")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(collapseTagList.value, (tag, idx) => {
- return openBlock(), createElementBlock("div", {
- key: idx,
- class: normalizeClass(unref(nsCascader).e("collapse-tag"))
- }, [(openBlock(), createBlock(unref(ElTag), {
- key: tag.key,
- class: "in-tooltip",
- type: __props.tagType,
- size: tagSize.value,
- effect: __props.tagEffect,
- hit: tag.hitState,
- closable: tag.closable,
- "disable-transitions": "",
- onClose: ($event) => deleteTag(tag)
- }, {
- default: withCtx(() => [createBaseVNode("span", null, toDisplayString(tag.text), 1)]),
- _: 2
- }, 1032, [
- "type",
- "size",
- "effect",
- "hit",
- "closable",
- "onClose"
- ]))], 2);
- }), 128))], 2)]),
- _: 1
- }, 8, ["max-height"])]),
- _: 1
- }, 8, [
- "disabled",
- "popper-class",
- "popper-style",
- "effect",
- "persistent"
- ])) : createCommentVNode("v-if", true),
- __props.filterable && !unref(isDisabled) ? withDirectives((openBlock(), createElementBlock("input", {
- key: 1,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchInputValue.value = $event),
- type: "text",
- class: normalizeClass(unref(nsCascader).e("search-input")),
- placeholder: presentText.value ? "" : inputPlaceholder.value,
- onInput: _cache[3] || (_cache[3] = (e) => handleInput(searchInputValue.value, e)),
- onClick: _cache[4] || (_cache[4] = withModifiers(($event) => togglePopperVisible(true), ["stop"])),
- onKeydown: withKeys(handleDelete, ["delete"]),
- onCompositionstart: _cache[5] || (_cache[5] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
- onCompositionupdate: _cache[6] || (_cache[6] = (...args) => unref(handleComposition) && unref(handleComposition)(...args)),
- onCompositionend: _cache[7] || (_cache[7] = (...args) => unref(handleComposition) && unref(handleComposition)(...args))
- }, null, 42, _hoisted_1$57)), [[vModelText, searchInputValue.value]]) : createCommentVNode("v-if", true)
- ], 2)) : createCommentVNode("v-if", true)], 38)), [[
- unref(ClickOutside),
- handleClickOutside,
- contentRef.value
- ]])]),
- content: withCtx(() => [
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(nsCascader).e("header")),
- onClick: _cache[11] || (_cache[11] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
- withDirectives(createVNode(unref(ElCascaderPanel), {
- ref_key: "cascaderPanelRef",
- ref: cascaderPanelRef,
- modelValue: checkedValue.value,
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => checkedValue.value = $event),
- options: __props.options,
- props: props.props,
- border: false,
- "render-label": _ctx.$slots.default,
- onExpandChange: handleExpandChange,
- onClose: _cache[13] || (_cache[13] = ($event) => _ctx.$nextTick(() => togglePopperVisible(false)))
- }, {
- empty: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
- _: 3
- }, 8, [
- "modelValue",
- "options",
- "props",
- "render-label"
- ]), [[vShow, !filtering.value]]),
- __props.filterable ? withDirectives((openBlock(), createBlock(unref(ElScrollbar), {
- key: 1,
- ref_key: "suggestionPanel",
- ref: suggestionPanel,
- tag: "ul",
- class: normalizeClass(unref(nsCascader).e("suggestion-panel")),
- "view-class": unref(nsCascader).e("suggestion-list"),
- onKeydown: handleSuggestionKeyDown
- }, {
- default: withCtx(() => [suggestions.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(suggestions.value, (item) => {
- return openBlock(), createElementBlock("li", {
- key: item.uid,
- class: normalizeClass([unref(nsCascader).e("suggestion-item"), unref(nsCascader).is("checked", item.checked)]),
- tabindex: -1,
- onClick: ($event) => handleSuggestionClick(item)
- }, [renderSlot(_ctx.$slots, "suggestion-item", { item }, () => [createBaseVNode("span", null, toDisplayString(item.text), 1), item.checked ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [createVNode(unref(check_default))]),
- _: 1
- })) : createCommentVNode("v-if", true)])], 10, _hoisted_2$34);
- }), 128)) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [createBaseVNode("li", { class: normalizeClass(unref(nsCascader).e("empty-text")) }, toDisplayString(unref(t)("el.cascader.noMatch")), 3)])]),
- _: 3
- }, 8, ["class", "view-class"])), [[vShow, filtering.value]]) : createCommentVNode("v-if", true),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass(unref(nsCascader).e("footer")),
- onClick: _cache[14] || (_cache[14] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
- ]),
- _: 3
- }, 8, [
- "visible",
- "teleported",
- "popper-class",
- "popper-style",
- "fallback-placements",
- "placement",
- "transition",
- "effect",
- "persistent"
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/check-tag/src/check-tag.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CheckTagProps` instead.
- */
- var checkTagProps = buildProps({
- checked: Boolean,
- disabled: Boolean,
- type: {
- type: String,
- values: [
- "primary",
- "success",
- "info",
- "warning",
- "danger"
- ],
- default: "primary"
- }
- });
- var checkTagEmits = {
- "update:checked": (value) => isBoolean(value),
- [CHANGE_EVENT]: (value) => isBoolean(value)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/check-tag/index.mjs
- var ElCheckTag = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCheckTag",
- __name: "check-tag",
- props: checkTagProps,
- emits: checkTagEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("check-tag");
- const containerKls = computed(() => [
- ns.b(),
- ns.is("checked", props.checked),
- ns.is("disabled", props.disabled),
- ns.m(props.type || "primary")
- ]);
- const handleChange = () => {
- if (props.disabled) return;
- const checked = !props.checked;
- emit(CHANGE_EVENT, checked);
- emit("update:checked", checked);
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", {
- class: normalizeClass(containerKls.value),
- onClick: handleChange
- }, [renderSlot(_ctx.$slots, "default")], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/col/src/col.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ColProps` instead.
- */
- var colProps = buildProps({
- tag: {
- type: String,
- default: "div"
- },
- span: {
- type: Number,
- default: 24
- },
- offset: {
- type: Number,
- default: 0
- },
- pull: {
- type: Number,
- default: 0
- },
- push: {
- type: Number,
- default: 0
- },
- xs: {
- type: definePropType([Number, Object]),
- default: () => mutable({})
- },
- sm: {
- type: definePropType([Number, Object]),
- default: () => mutable({})
- },
- md: {
- type: definePropType([Number, Object]),
- default: () => mutable({})
- },
- lg: {
- type: definePropType([Number, Object]),
- default: () => mutable({})
- },
- xl: {
- type: definePropType([Number, Object]),
- default: () => mutable({})
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/row/src/row.mjs
- var RowJustify = [
- "start",
- "center",
- "end",
- "space-around",
- "space-between",
- "space-evenly"
- ];
- var RowAlign = [
- "top",
- "middle",
- "bottom"
- ];
- /**
- * @deprecated Removed after 3.0.0, Use `RowProps` instead.
- */
- var rowProps = buildProps({
- tag: {
- type: String,
- default: "div"
- },
- gutter: {
- type: Number,
- default: 0
- },
- justify: {
- type: String,
- values: RowJustify,
- default: "start"
- },
- align: {
- type: String,
- values: RowAlign
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/row/src/constants.mjs
- var rowContextKey = Symbol("rowContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/row/index.mjs
- var ElRow = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElRow",
- __name: "row",
- props: rowProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("row");
- provide(rowContextKey, { gutter: computed(() => props.gutter) });
- const style = computed(() => {
- const styles = {};
- if (!props.gutter) return styles;
- styles.marginRight = styles.marginLeft = `-${props.gutter / 2}px`;
- return styles;
- });
- const rowKls = computed(() => [
- ns.b(),
- ns.is(`justify-${props.justify}`, props.justify !== "start"),
- ns.is(`align-${props.align}`, !!props.align)
- ]);
- return (_ctx, _cache) => {
- return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
- class: normalizeClass(rowKls.value),
- style: normalizeStyle(style.value)
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["class", "style"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/col/index.mjs
- var ElCol = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCol",
- __name: "col",
- props: colProps,
- setup(__props) {
- const props = __props;
- const { gutter } = inject(rowContextKey, { gutter: computed(() => 0) });
- const ns = useNamespace("col");
- const style = computed(() => {
- const styles = {};
- if (gutter.value) styles.paddingLeft = styles.paddingRight = `${gutter.value / 2}px`;
- return styles;
- });
- const colKls = computed(() => {
- const classes = [];
- [
- "span",
- "offset",
- "pull",
- "push"
- ].forEach((prop) => {
- const size = props[prop];
- if (isNumber(size)) {
- if (prop === "span") classes.push(ns.b(`${props[prop]}`));
- else if (size > 0) classes.push(ns.b(`${prop}-${props[prop]}`));
- }
- });
- [
- "xs",
- "sm",
- "md",
- "lg",
- "xl"
- ].forEach((size) => {
- if (isNumber(props[size])) classes.push(ns.b(`${size}-${props[size]}`));
- else if (isObject$2(props[size])) Object.entries(props[size]).forEach(([prop, sizeProp]) => {
- classes.push(prop !== "span" ? ns.b(`${size}-${prop}-${sizeProp}`) : ns.b(`${size}-${sizeProp}`));
- });
- });
- if (gutter.value) classes.push(ns.is("guttered"));
- return [ns.b(), classes];
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
- class: normalizeClass(colKls.value),
- style: normalizeStyle(style.value)
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["class", "style"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/collapse.mjs
- var emitChangeFn = (value) => isNumber(value) || isString(value) || isArray$1(value);
- /**
- * @deprecated Removed after 3.0.0, Use `CollapseProps` instead.
- */
- var collapseProps = buildProps({
- accordion: Boolean,
- modelValue: {
- type: definePropType([
- Array,
- String,
- Number
- ]),
- default: () => mutable([])
- },
- expandIconPosition: {
- type: definePropType([String]),
- default: "right"
- },
- beforeCollapse: { type: definePropType(Function) }
- });
- var collapseEmits = {
- [UPDATE_MODEL_EVENT]: emitChangeFn,
- [CHANGE_EVENT]: emitChangeFn
- };
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/constants.mjs
- var collapseContextKey = Symbol("collapseContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/collapse-item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CollapseItemProps` instead.
- */
- var collapseItemProps = buildProps({
- title: {
- type: String,
- default: ""
- },
- name: {
- type: definePropType([String, Number]),
- default: void 0
- },
- icon: {
- type: iconPropType,
- default: arrow_right_default
- },
- disabled: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/collapse-transition/index.mjs
- var ElCollapseTransition = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCollapseTransition",
- __name: "collapse-transition",
- setup(__props) {
- const ns = useNamespace("collapse-transition");
- const reset = (el) => {
- el.style.maxHeight = "";
- el.style.overflow = el.dataset.oldOverflow;
- el.style.paddingTop = el.dataset.oldPaddingTop;
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
- };
- const on = {
- beforeEnter(el) {
- if (!el.dataset) el.dataset = {};
- el.dataset.oldPaddingTop = el.style.paddingTop;
- el.dataset.oldPaddingBottom = el.style.paddingBottom;
- if (el.style.height) el.dataset.elExistsHeight = el.style.height;
- el.style.maxHeight = 0;
- el.style.paddingTop = 0;
- el.style.paddingBottom = 0;
- },
- enter(el) {
- requestAnimationFrame(() => {
- el.dataset.oldOverflow = el.style.overflow;
- if (el.dataset.elExistsHeight) el.style.maxHeight = el.dataset.elExistsHeight;
- else if (el.scrollHeight !== 0) el.style.maxHeight = `${el.scrollHeight}px`;
- else el.style.maxHeight = 0;
- el.style.paddingTop = el.dataset.oldPaddingTop;
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
- el.style.overflow = "hidden";
- });
- },
- afterEnter(el) {
- el.style.maxHeight = "";
- el.style.overflow = el.dataset.oldOverflow;
- },
- enterCancelled(el) {
- reset(el);
- },
- beforeLeave(el) {
- if (!el.dataset) el.dataset = {};
- el.dataset.oldPaddingTop = el.style.paddingTop;
- el.dataset.oldPaddingBottom = el.style.paddingBottom;
- el.dataset.oldOverflow = el.style.overflow;
- el.style.maxHeight = `${el.scrollHeight}px`;
- el.style.overflow = "hidden";
- },
- leave(el) {
- if (el.scrollHeight !== 0) {
- el.style.maxHeight = 0;
- el.style.paddingTop = 0;
- el.style.paddingBottom = 0;
- }
- },
- afterLeave(el) {
- reset(el);
- },
- leaveCancelled(el) {
- reset(el);
- }
- };
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, mergeProps({ name: unref(ns).b() }, toHandlers(on)), {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 16, ["name"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/use-collapse.mjs
- var SCOPE$7 = "ElCollapse";
- var useCollapse = (props, emit) => {
- const activeNames = ref(castArray$1(props.modelValue));
- const setActiveNames = (_activeNames) => {
- activeNames.value = _activeNames;
- const value = props.accordion ? activeNames.value[0] : activeNames.value;
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value);
- };
- const handleChange = (name) => {
- if (props.accordion) setActiveNames([activeNames.value[0] === name ? "" : name]);
- else {
- const _activeNames = [...activeNames.value];
- const index = _activeNames.indexOf(name);
- if (index > -1) _activeNames.splice(index, 1);
- else _activeNames.push(name);
- setActiveNames(_activeNames);
- }
- };
- const handleItemClick = async (name) => {
- const { beforeCollapse } = props;
- if (!beforeCollapse) {
- handleChange(name);
- return;
- }
- const shouldChange = beforeCollapse(name);
- if (![isPromise(shouldChange), isBoolean(shouldChange)].includes(true)) throwError(SCOPE$7, "beforeCollapse must return type `Promise<boolean>` or `boolean`");
- if (isPromise(shouldChange)) shouldChange.then((result) => {
- if (result !== false) handleChange(name);
- }).catch((e) => {
- debugWarn(SCOPE$7, `some error occurred: ${e}`);
- });
- else if (shouldChange) handleChange(name);
- };
- watch(() => props.modelValue, () => activeNames.value = castArray$1(props.modelValue), { deep: true });
- provide(collapseContextKey, {
- activeNames,
- handleItemClick
- });
- return {
- activeNames,
- setActiveNames
- };
- };
- var useCollapseDOM = (props) => {
- const ns = useNamespace("collapse");
- return { rootKls: computed(() => [ns.b(), ns.b(`icon-position-${props.expandIconPosition}`)]) };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/collapse2.mjs
- var collapse_default = /* @__PURE__ */ defineComponent({
- name: "ElCollapse",
- __name: "collapse",
- props: collapseProps,
- emits: collapseEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const { activeNames, setActiveNames } = useCollapse(props, __emit);
- const { rootKls } = useCollapseDOM(props);
- __expose({
- activeNames,
- setActiveNames
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [renderSlot(_ctx.$slots, "default")], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/use-collapse-item.mjs
- var useCollapseItem = (props) => {
- const collapse = inject(collapseContextKey);
- const { namespace } = useNamespace("collapse");
- const focusing = ref(false);
- const isClick = ref(false);
- const idInjection = useIdInjection();
- const id = computed(() => idInjection.current++);
- const name = computed(() => {
- return props.name ?? `${namespace.value}-id-${idInjection.prefix}-${unref(id)}`;
- });
- const isActive = computed(() => collapse?.activeNames.value.includes(unref(name)));
- const handleFocus = () => {
- setTimeout(() => {
- if (!isClick.value) focusing.value = true;
- else isClick.value = false;
- }, 50);
- };
- const handleHeaderClick = (e) => {
- if (props.disabled) return;
- if (e.target?.closest("input, textarea, select")) return;
- collapse?.handleItemClick(unref(name));
- focusing.value = false;
- isClick.value = true;
- };
- const handleEnterClick = (e) => {
- if (e.target?.closest("input, textarea, select")) return;
- e.preventDefault();
- collapse?.handleItemClick(unref(name));
- };
- return {
- focusing,
- id,
- isActive,
- handleFocus,
- handleHeaderClick,
- handleEnterClick
- };
- };
- var useCollapseItemDOM = (props, { focusing, isActive, id }) => {
- const ns = useNamespace("collapse");
- const rootKls = computed(() => [
- ns.b("item"),
- ns.is("active", unref(isActive)),
- ns.is("disabled", props.disabled)
- ]);
- const headKls = computed(() => [
- ns.be("item", "header"),
- ns.is("active", unref(isActive)),
- { focusing: unref(focusing) && !props.disabled }
- ]);
- const arrowKls = computed(() => [ns.be("item", "arrow"), ns.is("active", unref(isActive))]);
- return {
- itemTitleKls: computed(() => [ns.be("item", "title")]),
- arrowKls,
- headKls,
- rootKls,
- itemWrapperKls: computed(() => ns.be("item", "wrap")),
- itemContentKls: computed(() => ns.be("item", "content")),
- scopedContentId: computed(() => ns.b(`content-${unref(id)}`)),
- scopedHeadId: computed(() => ns.b(`head-${unref(id)}`))
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/collapse-item.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$56 = [
- "id",
- "aria-expanded",
- "aria-controls",
- "aria-describedby",
- "tabindex",
- "aria-disabled"
- ];
- var _hoisted_2$33 = [
- "id",
- "aria-hidden",
- "aria-labelledby"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/src/collapse-item2.mjs
- var collapse_item_default = /* @__PURE__ */ defineComponent({
- name: "ElCollapseItem",
- __name: "collapse-item",
- props: collapseItemProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { focusing, id, isActive, handleFocus, handleHeaderClick, handleEnterClick } = useCollapseItem(props);
- const { arrowKls, headKls, rootKls, itemTitleKls, itemWrapperKls, itemContentKls, scopedContentId, scopedHeadId } = useCollapseItemDOM(props, {
- focusing,
- isActive,
- id
- });
- __expose({ isActive });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
- id: unref(scopedHeadId),
- class: normalizeClass(unref(headKls)),
- "aria-expanded": unref(isActive),
- "aria-controls": unref(scopedContentId),
- "aria-describedby": unref(scopedContentId),
- tabindex: __props.disabled ? void 0 : 0,
- "aria-disabled": __props.disabled,
- role: "button",
- onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)),
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop"]), ["space", "enter"])),
- onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
- onBlur: _cache[3] || (_cache[3] = ($event) => focusing.value = false)
- }, [createBaseVNode("span", { class: normalizeClass(unref(itemTitleKls)) }, [renderSlot(_ctx.$slots, "title", { isActive: unref(isActive) }, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), renderSlot(_ctx.$slots, "icon", { isActive: unref(isActive) }, () => [createVNode(unref(ElIcon), { class: normalizeClass(unref(arrowKls)) }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- }, 8, ["class"])])], 42, _hoisted_1$56), createVNode(unref(ElCollapseTransition), null, {
- default: withCtx(() => [withDirectives(createBaseVNode("div", {
- id: unref(scopedContentId),
- role: "region",
- class: normalizeClass(unref(itemWrapperKls)),
- "aria-hidden": !unref(isActive),
- "aria-labelledby": unref(scopedHeadId)
- }, [createBaseVNode("div", { class: normalizeClass(unref(itemContentKls)) }, [renderSlot(_ctx.$slots, "default")], 2)], 10, _hoisted_2$33), [[vShow, unref(isActive)]])]),
- _: 3
- })], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/collapse/index.mjs
- var ElCollapse = withInstall(collapse_default, { CollapseItem: collapse_item_default });
- var ElCollapseItem = withNoopInstall(collapse_item_default);
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/color-picker-panel.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ColorPickerPanelProps` instead.
- */
- var colorPickerPanelProps = buildProps({
- modelValue: {
- type: definePropType(String),
- default: void 0
- },
- border: {
- type: Boolean,
- default: true
- },
- showAlpha: Boolean,
- colorFormat: { type: definePropType(String) },
- disabled: Boolean,
- predefine: { type: definePropType(Array) },
- validateEvent: {
- type: Boolean,
- default: true
- }
- });
- var colorPickerPanelEmits = { [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val) };
- var ROOT_COMMON_COLOR_INJECTION_KEY = Symbol("colorCommonPickerKey");
- var colorPickerPanelContextKey = Symbol("colorPickerPanelContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/props/slider.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AlphaSliderProps` instead.
- */
- var alphaSliderProps = buildProps({
- color: {
- type: definePropType(Object),
- required: true
- },
- vertical: Boolean,
- disabled: Boolean
- });
- /**
- * @deprecated Removed after 3.0.0, Use `HueSliderProps` instead.
- */
- var hueSliderProps = alphaSliderProps;
- //#endregion
- //#region node_modules/element-plus/es/utils/dom/position.mjs
- var getOffsetTop = (el) => {
- let offset = 0;
- let parent = el;
- while (parent) {
- offset += parent.offsetTop;
- parent = parent.offsetParent;
- }
- return offset;
- };
- var getOffsetTopDistance = (el, containerEl) => {
- return Math.abs(getOffsetTop(el) - getOffsetTop(containerEl));
- };
- var getClientXY = (event) => {
- let clientX;
- let clientY;
- if (event.type === "touchend") {
- clientY = event.changedTouches[0].clientY;
- clientX = event.changedTouches[0].clientX;
- } else if (event.type.startsWith("touch")) {
- clientY = event.touches[0].clientY;
- clientX = event.touches[0].clientX;
- } else {
- clientY = event.clientY;
- clientX = event.clientX;
- }
- return {
- clientX,
- clientY
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/utils/draggable.mjs
- var isDragging = false;
- function draggable(element, options) {
- if (!isClient) return;
- const moveFn = function(event) {
- options.drag?.(event);
- };
- const upFn = function(event) {
- document.removeEventListener("mousemove", moveFn);
- document.removeEventListener("mouseup", upFn);
- document.removeEventListener("touchmove", moveFn);
- document.removeEventListener("touchend", upFn);
- document.onselectstart = null;
- document.ondragstart = null;
- isDragging = false;
- options.end?.(event);
- };
- const downFn = function(event) {
- if (isDragging) return;
- document.onselectstart = () => false;
- document.ondragstart = () => false;
- document.addEventListener("mousemove", moveFn);
- document.addEventListener("mouseup", upFn);
- document.addEventListener("touchmove", moveFn);
- document.addEventListener("touchend", upFn);
- isDragging = true;
- options.start?.(event);
- };
- element.addEventListener("mousedown", downFn);
- element.addEventListener("touchstart", downFn, { passive: false });
- }
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-slider.mjs
- var useSlider = (props, { key, minValue, maxValue }) => {
- const instance = getCurrentInstance();
- const thumb = shallowRef();
- const bar = shallowRef();
- const currentValue = computed(() => props.color.get(key));
- function handleClick(event) {
- if (props.disabled) return;
- if (event.target !== thumb.value) handleDrag(event);
- thumb.value?.focus();
- }
- function handleDrag(event) {
- if (!bar.value || !thumb.value || props.disabled) return;
- const rect = instance.vnode.el.getBoundingClientRect();
- const { clientX, clientY } = getClientXY(event);
- let value;
- if (!props.vertical) {
- let left = clientX - rect.left;
- left = Math.max(thumb.value.offsetWidth / 2, left);
- left = Math.min(left, rect.width - thumb.value.offsetWidth / 2);
- value = Math.round((left - thumb.value.offsetWidth / 2) / (rect.width - thumb.value.offsetWidth) * maxValue);
- } else {
- let top = clientY - rect.top;
- top = Math.max(thumb.value.offsetHeight / 2, top);
- top = Math.min(top, rect.height - thumb.value.offsetHeight / 2);
- value = Math.round((top - thumb.value.offsetHeight / 2) / (rect.height - thumb.value.offsetHeight) * maxValue);
- }
- props.color.set(key, value);
- }
- function handleKeydown(event) {
- if (props.disabled) return;
- const { shiftKey } = event;
- const code = getEventCode(event);
- const step = shiftKey ? 10 : 1;
- const reverse = key === "hue" ? -1 : 1;
- let isPreventDefault = true;
- switch (code) {
- case EVENT_CODE.left:
- case EVENT_CODE.down:
- incrementPosition(-step * reverse);
- break;
- case EVENT_CODE.right:
- case EVENT_CODE.up:
- incrementPosition(step * reverse);
- break;
- case EVENT_CODE.home:
- props.color.set(key, key === "hue" ? maxValue : minValue);
- break;
- case EVENT_CODE.end:
- props.color.set(key, key === "hue" ? minValue : maxValue);
- break;
- case EVENT_CODE.pageDown:
- incrementPosition(-4 * reverse);
- break;
- case EVENT_CODE.pageUp:
- incrementPosition(4 * reverse);
- break;
- default:
- isPreventDefault = false;
- break;
- }
- isPreventDefault && event.preventDefault();
- }
- function incrementPosition(step) {
- let next = currentValue.value + step;
- next = next < minValue ? minValue : next > maxValue ? maxValue : next;
- props.color.set(key, next);
- }
- return {
- thumb,
- bar,
- currentValue,
- handleDrag,
- handleClick,
- handleKeydown
- };
- };
- var useSliderDOM = (props, { namespace, maxValue, bar, thumb, currentValue, handleDrag, getBackground }) => {
- const instance = getCurrentInstance();
- const ns = useNamespace(namespace);
- const thumbLeft = ref(0);
- const thumbTop = ref(0);
- const background = ref();
- function getThumbLeft() {
- if (!thumb.value) return 0;
- if (props.vertical) return 0;
- const el = instance.vnode.el;
- const value = currentValue.value;
- if (!el) return 0;
- return Math.round(value * (el.offsetWidth - thumb.value.offsetWidth / 2) / maxValue);
- }
- function getThumbTop() {
- if (!thumb.value) return 0;
- const el = instance.vnode.el;
- if (!props.vertical) return 0;
- const value = currentValue.value;
- if (!el) return 0;
- return Math.round(value * (el.offsetHeight - thumb.value.offsetHeight / 2) / maxValue);
- }
- function update() {
- thumbLeft.value = getThumbLeft();
- thumbTop.value = getThumbTop();
- background.value = getBackground?.();
- }
- onMounted(() => {
- if (!bar.value || !thumb.value) return;
- const dragConfig = {
- drag: (event) => {
- handleDrag(event);
- },
- end: (event) => {
- handleDrag(event);
- }
- };
- draggable(bar.value, dragConfig);
- draggable(thumb.value, dragConfig);
- update();
- });
- watch(currentValue, () => update());
- watch(() => props.color.value, () => update());
- const rootKls = computed(() => [
- ns.b(),
- ns.is("vertical", props.vertical),
- ns.is("disabled", props.disabled)
- ]);
- const barKls = computed(() => ns.e("bar"));
- const thumbKls = computed(() => ns.e("thumb"));
- return {
- rootKls,
- barKls,
- barStyle: computed(() => ({ background: background.value })),
- thumbKls,
- thumbStyle: computed(() => ({
- left: addUnit(thumbLeft.value),
- top: addUnit(thumbTop.value)
- })),
- thumbLeft,
- thumbTop,
- update
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$55 = [
- "aria-label",
- "aria-valuenow",
- "aria-valuetext",
- "aria-orientation",
- "tabindex",
- "aria-disabled"
- ];
- var minValue$1 = 0;
- var maxValue$1 = 100;
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/alpha-slider.mjs
- var alpha_slider_default = /* @__PURE__ */ defineComponent({
- name: "ElColorAlphaSlider",
- __name: "alpha-slider",
- props: alphaSliderProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, {
- key: "alpha",
- minValue: minValue$1,
- maxValue: maxValue$1
- });
- const { rootKls, barKls, barStyle, thumbKls, thumbStyle, update } = useSliderDOM(props, {
- namespace: "color-alpha-slider",
- maxValue: maxValue$1,
- currentValue,
- bar,
- thumb,
- handleDrag,
- getBackground
- });
- const { t } = useLocale();
- const ariaLabel = computed(() => t("el.colorpicker.alphaLabel"));
- const ariaValuetext = computed(() => {
- return t("el.colorpicker.alphaDescription", {
- alpha: currentValue.value,
- color: props.color.value
- });
- });
- function getBackground() {
- if (props.color && props.color.value) {
- const { r, g, b } = props.color.toRgb();
- return `linear-gradient(to right, rgba(${r}, ${g}, ${b}, 0) 0%, rgba(${r}, ${g}, ${b}, 1) 100%)`;
- }
- return "";
- }
- __expose({
- update,
- bar,
- thumb
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
- ref_key: "bar",
- ref: bar,
- class: normalizeClass(unref(barKls)),
- style: normalizeStyle(unref(barStyle)),
- onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
- }, null, 6), createBaseVNode("div", {
- ref_key: "thumb",
- ref: thumb,
- class: normalizeClass(unref(thumbKls)),
- style: normalizeStyle(unref(thumbStyle)),
- "aria-label": ariaLabel.value,
- "aria-valuenow": unref(currentValue),
- "aria-valuetext": ariaValuetext.value,
- "aria-orientation": __props.vertical ? "vertical" : "horizontal",
- "aria-valuemin": minValue$1,
- "aria-valuemax": maxValue$1,
- role: "slider",
- tabindex: __props.disabled ? void 0 : 0,
- "aria-disabled": __props.disabled,
- onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
- }, null, 46, _hoisted_1$55)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$54 = [
- "aria-label",
- "aria-valuenow",
- "aria-valuetext",
- "aria-orientation",
- "tabindex",
- "aria-disabled"
- ];
- var minValue = 0;
- var maxValue = 360;
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/hue-slider.mjs
- var hue_slider_default = /* @__PURE__ */ defineComponent({
- name: "ElColorHueSlider",
- __name: "hue-slider",
- props: hueSliderProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { currentValue, bar, thumb, handleDrag, handleClick, handleKeydown } = useSlider(props, {
- key: "hue",
- minValue,
- maxValue
- });
- const { rootKls, barKls, thumbKls, thumbStyle, thumbTop, update } = useSliderDOM(props, {
- namespace: "color-hue-slider",
- maxValue,
- currentValue,
- bar,
- thumb,
- handleDrag
- });
- const { t } = useLocale();
- const ariaLabel = computed(() => t("el.colorpicker.hueLabel"));
- const ariaValuetext = computed(() => {
- return t("el.colorpicker.hueDescription", {
- hue: currentValue.value,
- color: props.color.value
- });
- });
- __expose({
- bar,
- thumb,
- thumbTop,
- update
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", {
- ref_key: "bar",
- ref: bar,
- class: normalizeClass(unref(barKls)),
- onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClick) && unref(handleClick)(...args))
- }, null, 2), createBaseVNode("div", {
- ref_key: "thumb",
- ref: thumb,
- class: normalizeClass(unref(thumbKls)),
- style: normalizeStyle(unref(thumbStyle)),
- "aria-label": ariaLabel.value,
- "aria-valuenow": unref(currentValue),
- "aria-valuetext": ariaValuetext.value,
- "aria-orientation": __props.vertical ? "vertical" : "horizontal",
- "aria-valuemin": minValue,
- "aria-valuemax": maxValue,
- role: "slider",
- tabindex: __props.disabled ? void 0 : 0,
- "aria-disabled": __props.disabled,
- onKeydown: _cache[1] || (_cache[1] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
- }, null, 46, _hoisted_1$54)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/props/predefine.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PredefineProps` instead.
- */
- var predefineProps = buildProps({
- colors: {
- type: definePropType(Array),
- required: true
- },
- color: {
- type: definePropType(Object),
- required: true
- },
- enableAlpha: {
- type: Boolean,
- required: true
- },
- disabled: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/utils/color.mjs
- var Color = class {
- constructor(options = {}) {
- this._hue = 0;
- this._saturation = 100;
- this._value = 100;
- this._alpha = 100;
- this._tiny = new TinyColor();
- this._isValid = false;
- this.enableAlpha = false;
- this.format = "";
- this.value = "";
- for (const option in options) if (hasOwn(options, option)) this[option] = options[option];
- if (options.value) this.fromString(options.value);
- else this.doOnChange();
- }
- set(prop, value) {
- if (arguments.length === 1 && typeof prop === "object") {
- for (const p in prop) if (hasOwn(prop, p)) this.set(p, prop[p]);
- return;
- }
- this[`_${prop}`] = value;
- this._isValid = true;
- this.doOnChange();
- }
- get(prop) {
- if ([
- "hue",
- "saturation",
- "value",
- "alpha"
- ].includes(prop)) return Math.round(this[`_${prop}`]);
- return this[`_${prop}`];
- }
- toRgb() {
- return this._isValid ? this._tiny.toRgb() : {
- r: 255,
- g: 255,
- b: 255,
- a: 0
- };
- }
- fromString(value) {
- const color = new TinyColor(value);
- this._isValid = color.isValid;
- if (color.isValid) {
- const { h, s, v, a } = color.toHsv();
- this._hue = h;
- this._saturation = s * 100;
- this._value = v * 100;
- this._alpha = a * 100;
- } else {
- this._hue = 0;
- this._saturation = 100;
- this._value = 100;
- this._alpha = 100;
- }
- this.doOnChange();
- }
- clear() {
- this._isValid = false;
- this.value = "";
- this._hue = 0;
- this._saturation = 100;
- this._value = 100;
- this._alpha = 100;
- }
- compare(color) {
- const compareColor = new TinyColor({
- h: color._hue,
- s: color._saturation / 100,
- v: color._value / 100,
- a: color._alpha / 100
- });
- return this._tiny.equals(compareColor);
- }
- doOnChange() {
- const { _hue, _saturation, _value, _alpha, format, enableAlpha } = this;
- let _format = format || (enableAlpha ? "rgb" : "hex");
- if (format === "hex" && enableAlpha) _format = "hex8";
- this._tiny = new TinyColor({
- h: _hue,
- s: _saturation / 100,
- v: _value / 100,
- a: _alpha / 100
- });
- this.value = this._isValid ? this._tiny.toString(_format) : "";
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-predefine.mjs
- var usePredefine = (props) => {
- const { currentColor } = inject(colorPickerPanelContextKey);
- const rgbaColors = ref(parseColors(props.colors, props.color));
- watch(() => currentColor.value, (val) => {
- const color = new Color({
- value: val,
- enableAlpha: props.enableAlpha
- });
- rgbaColors.value.forEach((item) => {
- item.selected = color.compare(item);
- });
- });
- watchEffect(() => {
- rgbaColors.value = parseColors(props.colors, props.color);
- });
- function handleSelect(index) {
- props.color.fromString(props.colors[index]);
- }
- function parseColors(colors, color) {
- return colors.map((value) => {
- const c = new Color({
- value,
- enableAlpha: props.enableAlpha
- });
- c.selected = c.compare(color);
- return c;
- });
- }
- return {
- rgbaColors,
- handleSelect
- };
- };
- var usePredefineDOM = (props) => {
- const ns = useNamespace("color-predefine");
- const rootKls = computed(() => [ns.b(), ns.is("disabled", props.disabled)]);
- const colorsKls = computed(() => ns.e("colors"));
- function colorSelectorKls(item) {
- return [
- ns.e("color-selector"),
- ns.is("alpha", item.get("alpha") < 100),
- { selected: item.selected }
- ];
- }
- return {
- rootKls,
- colorsKls,
- colorSelectorKls
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$53 = [
- "disabled",
- "aria-label",
- "onClick"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/predefine.mjs
- var predefine_default = /* @__PURE__ */ defineComponent({
- name: "ElColorPredefine",
- __name: "predefine",
- props: predefineProps,
- setup(__props) {
- const props = __props;
- const { rgbaColors, handleSelect } = usePredefine(props);
- const { rootKls, colorsKls, colorSelectorKls } = usePredefineDOM(props);
- const { t } = useLocale();
- const ariaLabel = (value) => {
- return t("el.colorpicker.predefineDescription", { value });
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(rootKls)) }, [createBaseVNode("div", { class: normalizeClass(unref(colorsKls)) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(rgbaColors), (item, index) => {
- return openBlock(), createElementBlock("button", {
- key: __props.colors[index],
- type: "button",
- disabled: __props.disabled,
- "aria-label": ariaLabel(item.value),
- class: normalizeClass(unref(colorSelectorKls)(item)),
- onClick: ($event) => unref(handleSelect)(index)
- }, [createBaseVNode("div", { style: normalizeStyle({ backgroundColor: item.value }) }, null, 4)], 10, _hoisted_1$53);
- }), 128))], 2)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/props/sv-panel.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `SvPanelProps` instead.
- */
- var svPanelProps = buildProps({
- color: {
- type: definePropType(Object),
- required: true
- },
- disabled: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-sv-panel.mjs
- var useSvPanel = (props) => {
- const instance = getCurrentInstance();
- const cursorRef = ref();
- const cursorTop = ref(0);
- const cursorLeft = ref(0);
- const background = ref("hsl(0, 100%, 50%)");
- const saturation = computed(() => props.color.get("saturation"));
- const brightness = computed(() => props.color.get("value"));
- const hue = computed(() => props.color.get("hue"));
- function handleClick(event) {
- if (props.disabled) return;
- if (event.target !== cursorRef.value) handleDrag(event);
- cursorRef.value?.focus({ preventScroll: true });
- }
- function handleDrag(event) {
- if (props.disabled) return;
- const rect = instance.vnode.el.getBoundingClientRect();
- const { clientX, clientY } = getClientXY(event);
- let left = clientX - rect.left;
- let top = clientY - rect.top;
- left = Math.max(0, left);
- left = Math.min(left, rect.width);
- top = Math.max(0, top);
- top = Math.min(top, rect.height);
- cursorLeft.value = left;
- cursorTop.value = top;
- props.color.set({
- saturation: left / rect.width * 100,
- value: 100 - top / rect.height * 100
- });
- }
- function handleKeydown(event) {
- if (props.disabled) return;
- const { shiftKey } = event;
- const code = getEventCode(event);
- const step = shiftKey ? 10 : 1;
- let isPreventDefault = true;
- switch (code) {
- case EVENT_CODE.left:
- incrementSaturation(-step);
- break;
- case EVENT_CODE.right:
- incrementSaturation(step);
- break;
- case EVENT_CODE.up:
- incrementBrightness(step);
- break;
- case EVENT_CODE.down:
- incrementBrightness(-step);
- break;
- default:
- isPreventDefault = false;
- break;
- }
- isPreventDefault && event.preventDefault();
- }
- function incrementSaturation(step) {
- let next = saturation.value + step;
- next = next < 0 ? 0 : next > 100 ? 100 : next;
- props.color.set("saturation", next);
- }
- function incrementBrightness(step) {
- let next = brightness.value + step;
- next = next < 0 ? 0 : next > 100 ? 100 : next;
- props.color.set("value", next);
- }
- return {
- cursorRef,
- cursorTop,
- cursorLeft,
- background,
- saturation,
- brightness,
- hue,
- handleClick,
- handleDrag,
- handleKeydown
- };
- };
- var useSvPanelDOM = (props, { cursorTop, cursorLeft, background, handleDrag }) => {
- const instance = getCurrentInstance();
- const ns = useNamespace("color-svpanel");
- function update() {
- const saturation = props.color.get("saturation");
- const brightness = props.color.get("value");
- const { clientWidth: width, clientHeight: height } = instance.vnode.el;
- cursorLeft.value = saturation * width / 100;
- cursorTop.value = (100 - brightness) * height / 100;
- background.value = `hsl(${props.color.get("hue")}, 100%, 50%)`;
- }
- onMounted(() => {
- draggable(instance.vnode.el, {
- drag: (event) => {
- handleDrag(event);
- },
- end: (event) => {
- handleDrag(event);
- }
- });
- update();
- });
- watch([
- () => props.color.get("hue"),
- () => props.color.get("value"),
- () => props.color.value
- ], () => update());
- return {
- rootKls: computed(() => ns.b()),
- cursorKls: computed(() => ns.e("cursor")),
- rootStyle: computed(() => ({ backgroundColor: background.value })),
- cursorStyle: computed(() => ({
- top: addUnit(cursorTop.value),
- left: addUnit(cursorLeft.value)
- })),
- update
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$52 = [
- "tabindex",
- "aria-disabled",
- "aria-label",
- "aria-valuenow",
- "aria-valuetext"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/components/sv-panel.mjs
- var sv_panel_default = /* @__PURE__ */ defineComponent({
- name: "ElSvPanel",
- __name: "sv-panel",
- props: svPanelProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { cursorRef, cursorTop, cursorLeft, background, saturation, brightness, handleClick, handleDrag, handleKeydown } = useSvPanel(props);
- const { rootKls, cursorKls, rootStyle, cursorStyle, update } = useSvPanelDOM(props, {
- cursorTop,
- cursorLeft,
- background,
- handleDrag
- });
- const { t } = useLocale();
- const ariaLabel = computed(() => t("el.colorpicker.svLabel"));
- const ariaValuetext = computed(() => {
- return t("el.colorpicker.svDescription", {
- saturation: saturation.value,
- brightness: brightness.value,
- color: props.color.value
- });
- });
- __expose({ update });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(unref(rootKls)),
- style: normalizeStyle(unref(rootStyle)),
- onClick: _cache[1] || (_cache[1] = (...args) => unref(handleClick) && unref(handleClick)(...args))
- }, [createBaseVNode("div", {
- ref_key: "cursorRef",
- ref: cursorRef,
- class: normalizeClass(unref(cursorKls)),
- style: normalizeStyle(unref(cursorStyle)),
- tabindex: __props.disabled ? void 0 : 0,
- "aria-disabled": __props.disabled,
- role: "slider",
- "aria-valuemin": "0,0",
- "aria-valuemax": "100,100",
- "aria-label": ariaLabel.value,
- "aria-valuenow": `${unref(saturation)},${unref(brightness)}`,
- "aria-valuetext": ariaValuetext.value,
- onKeydown: _cache[0] || (_cache[0] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args))
- }, null, 46, _hoisted_1$52)], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/src/composables/use-common-color.mjs
- var useCommonColor = (props, emit) => {
- const color = reactive(new Color({
- enableAlpha: props.showAlpha,
- format: props.colorFormat || "",
- value: props.modelValue
- }));
- watch(() => [props.colorFormat, props.showAlpha], () => {
- color.enableAlpha = props.showAlpha;
- color.format = props.colorFormat || color.format;
- color.doOnChange();
- emit(UPDATE_MODEL_EVENT, color.value);
- });
- return { color };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker-panel/index.mjs
- var ElColorPickerPanel = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElColorPickerPanel",
- __name: "color-picker-panel",
- props: colorPickerPanelProps,
- emits: colorPickerPanelEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("color-picker-panel");
- const { formItem } = useFormItem();
- const disabled = useFormDisabled();
- const hueRef = ref();
- const svRef = ref();
- const alphaRef = ref();
- const inputRef = ref();
- const customInput = ref("");
- const { color } = inject(ROOT_COMMON_COLOR_INJECTION_KEY, () => useCommonColor(props, emit), true);
- function handleConfirm() {
- color.fromString(customInput.value);
- if (color.value !== customInput.value) customInput.value = color.value;
- }
- function handleFocusout() {
- if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- function update() {
- hueRef.value?.update();
- svRef.value?.update();
- alphaRef.value?.update();
- }
- onMounted(() => {
- if (props.modelValue) customInput.value = color.value;
- nextTick(update);
- });
- watch(() => props.modelValue, (newVal) => {
- if (newVal !== color.value) newVal ? color.fromString(newVal) : color.clear();
- });
- watch(() => color.value, (val) => {
- emit(UPDATE_MODEL_EVENT, val);
- customInput.value = val;
- if (props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
- });
- provide(colorPickerPanelContextKey, { currentColor: computed(() => color.value) });
- __expose({
- color,
- inputRef,
- update
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([
- unref(ns).b(),
- unref(ns).is("disabled", unref(disabled)),
- unref(ns).is("border", __props.border)
- ]),
- onFocusout: handleFocusout
- }, [
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [createVNode(hue_slider_default, {
- ref_key: "hueRef",
- ref: hueRef,
- class: "hue-slider",
- color: unref(color),
- vertical: "",
- disabled: unref(disabled)
- }, null, 8, ["color", "disabled"]), createVNode(sv_panel_default, {
- ref_key: "svRef",
- ref: svRef,
- color: unref(color),
- disabled: unref(disabled)
- }, null, 8, ["color", "disabled"])], 2),
- __props.showAlpha ? (openBlock(), createBlock(alpha_slider_default, {
- key: 0,
- ref_key: "alphaRef",
- ref: alphaRef,
- color: unref(color),
- disabled: unref(disabled)
- }, null, 8, ["color", "disabled"])) : createCommentVNode("v-if", true),
- __props.predefine ? (openBlock(), createBlock(predefine_default, {
- key: 1,
- ref: "predefine",
- "enable-alpha": __props.showAlpha,
- color: unref(color),
- colors: __props.predefine,
- disabled: unref(disabled)
- }, null, 8, [
- "enable-alpha",
- "color",
- "colors",
- "disabled"
- ])) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("footer")) }, [createVNode(unref(ElInput), {
- ref_key: "inputRef",
- ref: inputRef,
- modelValue: customInput.value,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
- "validate-event": false,
- size: "small",
- disabled: unref(disabled),
- onChange: handleConfirm
- }, null, 8, ["modelValue", "disabled"]), renderSlot(_ctx.$slots, "footer")], 2)
- ], 34);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker/src/color-picker.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ColorPickerProps` instead.
- */
- var colorPickerProps = buildProps({
- persistent: {
- type: Boolean,
- default: true
- },
- modelValue: {
- type: definePropType(String),
- default: void 0
- },
- id: String,
- showAlpha: Boolean,
- colorFormat: { type: definePropType(String) },
- disabled: {
- type: Boolean,
- default: void 0
- },
- clearable: {
- type: Boolean,
- default: true
- },
- size: useSizeProp,
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- tabindex: {
- type: [String, Number],
- default: 0
- },
- teleported: useTooltipContentProps.teleported,
- appendTo: useTooltipContentProps.appendTo,
- predefine: { type: definePropType(Array) },
- validateEvent: {
- type: Boolean,
- default: true
- },
- ...useEmptyValuesProps,
- ...useAriaProps(["ariaLabel"])
- });
- var colorPickerEmits = {
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
- [CHANGE_EVENT]: (val) => isString(val) || isNil(val),
- activeChange: (val) => isString(val) || isNil(val),
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true
- };
- /**
- * @description default values for ColorPickerProps, used in components that extend ColorPickerProps
- */
- var colorPickerPropsDefaults = {
- persistent: true,
- modelValue: void 0,
- disabled: void 0,
- clearable: true,
- popperStyle: void 0,
- tabindex: 0,
- teleported: true,
- validateEvent: true,
- valueOnClear: void 0
- };
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$51 = [
- "id",
- "aria-label",
- "aria-labelledby",
- "aria-description",
- "aria-disabled",
- "tabindex"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/color-picker/index.mjs
- var ElColorPicker = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElColorPicker",
- __name: "color-picker",
- props: colorPickerProps,
- emits: colorPickerEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { t } = useLocale();
- const ns = useNamespace("color");
- const { formItem } = useFormItem();
- const colorSize = useFormSize();
- const colorDisabled = useFormDisabled();
- const { valueOnClear, isEmptyValue } = useEmptyValues(props, null);
- const commonColor = useCommonColor(props, emit);
- const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
- const popper = ref();
- const triggerRef = ref();
- const pickerPanelRef = ref();
- const showPicker = ref(false);
- const showPanelColor = ref(false);
- let shouldActiveChange = true;
- const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {
- disabled: colorDisabled,
- beforeBlur(event) {
- return popper.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- setShowPicker(false);
- resetColor();
- if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- });
- const color = reactiveComputed(() => pickerPanelRef.value?.color ?? commonColor.color);
- const panelProps = computed(() => pick(props, Object.keys(colorPickerPanelProps)));
- const displayedColor = computed(() => {
- if (!props.modelValue && !showPanelColor.value) return "transparent";
- return displayedRgb(color, props.showAlpha);
- });
- const currentColor = computed(() => {
- return !props.modelValue && !showPanelColor.value ? "" : color.value;
- });
- const buttonAriaLabel = computed(() => {
- return !isLabeledByFormItem.value ? props.ariaLabel || t("el.colorpicker.defaultLabel") : void 0;
- });
- const buttonAriaLabelledby = computed(() => {
- return isLabeledByFormItem.value ? formItem?.labelId : void 0;
- });
- const btnKls = computed(() => {
- return [
- ns.b("picker"),
- ns.is("disabled", colorDisabled.value),
- ns.bm("picker", colorSize.value),
- ns.is("focused", isFocused.value)
- ];
- });
- function displayedRgb(color, showAlpha) {
- const { r, g, b, a } = color.toRgb();
- return showAlpha ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
- }
- function setShowPicker(value) {
- showPicker.value = value;
- }
- const debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true });
- function show() {
- if (colorDisabled.value) return;
- setShowPicker(true);
- }
- function hide() {
- debounceSetShowPicker(false);
- resetColor();
- }
- function resetColor() {
- nextTick(() => {
- if (props.modelValue) color.fromString(props.modelValue);
- else {
- color.value = "";
- nextTick(() => {
- showPanelColor.value = false;
- });
- }
- });
- }
- function handleTrigger() {
- if (colorDisabled.value) return;
- if (showPicker.value) resetColor();
- debounceSetShowPicker(!showPicker.value);
- }
- function confirmValue() {
- const value = isEmptyValue(color.value) ? valueOnClear.value : color.value;
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value);
- if (props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
- debounceSetShowPicker(false);
- nextTick(() => {
- const newColor = new Color({
- enableAlpha: props.showAlpha,
- format: props.colorFormat || "",
- value: props.modelValue
- });
- if (!color.compare(newColor)) resetColor();
- });
- }
- function clear() {
- debounceSetShowPicker(false);
- emit(UPDATE_MODEL_EVENT, valueOnClear.value);
- emit(CHANGE_EVENT, valueOnClear.value);
- if (props.modelValue !== valueOnClear.value && props.validateEvent) formItem?.validate("change").catch((err) => debugWarn(err));
- resetColor();
- emit("clear");
- }
- function handleShowTooltip() {
- pickerPanelRef?.value?.inputRef?.focus();
- }
- function handleClickOutside() {
- if (!showPicker.value) return;
- hide();
- isFocused.value && focus();
- }
- function handleEsc(event) {
- event.preventDefault();
- event.stopPropagation();
- setShowPicker(false);
- resetColor();
- }
- function handleKeyDown(event) {
- switch (getEventCode(event)) {
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- case EVENT_CODE.space:
- event.preventDefault();
- event.stopPropagation();
- show();
- break;
- case EVENT_CODE.esc:
- handleEsc(event);
- break;
- }
- }
- function focus() {
- triggerRef.value.focus();
- }
- function blur() {
- triggerRef.value.blur();
- }
- watch(() => currentColor.value, (val) => {
- shouldActiveChange && emit("activeChange", val);
- shouldActiveChange = true;
- });
- watch(() => color.value, () => {
- if (!props.modelValue && !showPanelColor.value) showPanelColor.value = true;
- });
- watch(() => props.modelValue, (newVal) => {
- if (!newVal) showPanelColor.value = false;
- else if (newVal && newVal !== color.value) {
- shouldActiveChange = false;
- color.fromString(newVal);
- }
- });
- watch(() => showPicker.value, () => {
- pickerPanelRef.value && nextTick(pickerPanelRef.value.update);
- });
- provide(ROOT_COMMON_COLOR_INJECTION_KEY, commonColor);
- __expose({
- color,
- show,
- hide,
- focus,
- blur
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTooltip), {
- ref_key: "popper",
- ref: popper,
- visible: showPicker.value,
- "show-arrow": false,
- "fallback-placements": [
- "bottom",
- "top",
- "right",
- "left"
- ],
- offset: 0,
- "gpu-acceleration": false,
- "popper-class": [unref(ns).be("picker", "panel"), __props.popperClass],
- "popper-style": __props.popperStyle,
- "stop-popper-mouse-event": false,
- pure: "",
- loop: "",
- role: "dialog",
- effect: "light",
- trigger: "click",
- teleported: __props.teleported,
- transition: `${unref(ns).namespace.value}-zoom-in-top`,
- persistent: __props.persistent,
- "append-to": __props.appendTo,
- onShow: handleShowTooltip,
- onHide: _cache[2] || (_cache[2] = ($event) => setShowPicker(false))
- }, {
- content: withCtx(() => [withDirectives((openBlock(), createBlock(unref(ElColorPickerPanel), mergeProps({
- ref_key: "pickerPanelRef",
- ref: pickerPanelRef
- }, panelProps.value, {
- border: false,
- "validate-event": false,
- onKeydown: withKeys(handleEsc, ["esc"])
- }), {
- footer: withCtx(() => [createBaseVNode("div", null, [__props.clearable ? (openBlock(), createBlock(unref(ElButton), {
- key: 0,
- class: normalizeClass(unref(ns).be("footer", "link-btn")),
- text: "",
- size: "small",
- onClick: clear
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.colorpicker.clear")), 1)]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true), createVNode(unref(ElButton), {
- plain: "",
- size: "small",
- class: normalizeClass(unref(ns).be("footer", "btn")),
- onClick: confirmValue
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.colorpicker.confirm")), 1)]),
- _: 1
- }, 8, ["class"])])]),
- _: 1
- }, 16)), [[
- unref(ClickOutside),
- handleClickOutside,
- triggerRef.value
- ]])]),
- default: withCtx(() => [createBaseVNode("div", mergeProps({
- id: unref(buttonId),
- ref_key: "triggerRef",
- ref: triggerRef
- }, _ctx.$attrs, {
- class: btnKls.value,
- role: "button",
- "aria-label": buttonAriaLabel.value,
- "aria-labelledby": buttonAriaLabelledby.value,
- "aria-description": unref(t)("el.colorpicker.description", { color: __props.modelValue || "" }),
- "aria-disabled": unref(colorDisabled),
- tabindex: unref(colorDisabled) ? void 0 : __props.tabindex,
- onKeydown: handleKeyDown,
- onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
- onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args))
- }), [createBaseVNode("div", {
- class: normalizeClass(unref(ns).be("picker", "trigger")),
- onClick: handleTrigger
- }, [createBaseVNode("span", { class: normalizeClass([unref(ns).be("picker", "color"), unref(ns).is("alpha", __props.showAlpha)]) }, [createBaseVNode("span", {
- class: normalizeClass(unref(ns).be("picker", "color-inner")),
- style: normalizeStyle({ backgroundColor: displayedColor.value })
- }, [withDirectives(createVNode(unref(ElIcon), { class: normalizeClass([unref(ns).be("picker", "icon"), unref(ns).is("icon-arrow-down")]) }, {
- default: withCtx(() => [createVNode(unref(arrow_down_default))]),
- _: 1
- }, 8, ["class"]), [[vShow, __props.modelValue || showPanelColor.value]]), withDirectives(createVNode(unref(ElIcon), { class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")]) }, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- }, 8, ["class"]), [[vShow, !__props.modelValue && !showPanelColor.value]])], 6)], 2)], 2)], 16, _hoisted_1$51)]),
- _: 1
- }, 8, [
- "visible",
- "popper-class",
- "popper-style",
- "teleported",
- "transition",
- "persistent",
- "append-to"
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/container/src/container.mjs
- var container_default = /* @__PURE__ */ defineComponent({
- name: "ElContainer",
- __name: "container",
- props: { direction: {
- type: String,
- required: false
- } },
- setup(__props) {
- const props = __props;
- const slots = useSlots();
- const ns = useNamespace("container");
- const isVertical = computed(() => {
- if (props.direction === "vertical") return true;
- else if (props.direction === "horizontal") return false;
- if (slots && slots.default) return slots.default().some((vNode) => {
- const tag = vNode.type.name;
- return tag === "ElHeader" || tag === "ElFooter";
- });
- else return false;
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("section", { class: normalizeClass([unref(ns).b(), unref(ns).is("vertical", isVertical.value)]) }, [renderSlot(_ctx.$slots, "default")], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/container/src/aside.mjs
- var aside_default = /* @__PURE__ */ defineComponent({
- name: "ElAside",
- __name: "aside",
- props: { width: {
- type: [String, null],
- required: false,
- default: null
- } },
- setup(__props) {
- const props = __props;
- const ns = useNamespace("aside");
- const style = computed(() => props.width ? ns.cssVarBlock({ width: props.width }) : {});
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("aside", {
- class: normalizeClass(unref(ns).b()),
- style: normalizeStyle(style.value)
- }, [renderSlot(_ctx.$slots, "default")], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/container/src/footer.mjs
- var footer_default = /* @__PURE__ */ defineComponent({
- name: "ElFooter",
- __name: "footer",
- props: { height: {
- type: [String, null],
- required: false,
- default: null
- } },
- setup(__props) {
- const props = __props;
- const ns = useNamespace("footer");
- const style = computed(() => props.height ? ns.cssVarBlock({ height: props.height }) : {});
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("footer", {
- class: normalizeClass(unref(ns).b()),
- style: normalizeStyle(style.value)
- }, [renderSlot(_ctx.$slots, "default")], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/container/src/header.mjs
- var header_default = /* @__PURE__ */ defineComponent({
- name: "ElHeader",
- __name: "header",
- props: { height: {
- type: [String, null],
- required: false,
- default: null
- } },
- setup(__props) {
- const props = __props;
- const ns = useNamespace("header");
- const style = computed(() => {
- return props.height ? ns.cssVarBlock({ height: props.height }) : {};
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("header", {
- class: normalizeClass(unref(ns).b()),
- style: normalizeStyle(style.value)
- }, [renderSlot(_ctx.$slots, "default")], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/container/src/main.mjs
- var main_default = /* @__PURE__ */ defineComponent({
- name: "ElMain",
- __name: "main",
- setup(__props) {
- const ns = useNamespace("main");
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("main", { class: normalizeClass(unref(ns).b()) }, [renderSlot(_ctx.$slots, "default")], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/container/index.mjs
- var ElContainer = withInstall(container_default, {
- Aside: aside_default,
- Footer: footer_default,
- Header: header_default,
- Main: main_default
- });
- var ElAside = withNoopInstall(aside_default);
- var ElFooter = withNoopInstall(footer_default);
- var ElHeader = withNoopInstall(header_default);
- var ElMain = withNoopInstall(main_default);
- //#endregion
- //#region node_modules/element-plus/es/components/countdown/src/countdown.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `CountdownProps` instead.
- */
- var countdownProps = buildProps({
- format: {
- type: String,
- default: "HH:mm:ss"
- },
- prefix: String,
- suffix: String,
- title: String,
- value: {
- type: definePropType([Number, Object]),
- default: 0
- },
- valueStyle: { type: definePropType([
- String,
- Object,
- Array
- ]) }
- });
- var countdownEmits = {
- finish: () => true,
- [CHANGE_EVENT]: (value) => isNumber(value)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/statistic/src/statistic.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `StatisticProps` instead.
- */
- var statisticProps = buildProps({
- decimalSeparator: {
- type: String,
- default: "."
- },
- groupSeparator: {
- type: String,
- default: ","
- },
- precision: {
- type: Number,
- default: 0
- },
- formatter: Function,
- value: {
- type: definePropType([Number, Object]),
- default: 0
- },
- prefix: String,
- suffix: String,
- title: String,
- valueStyle: { type: definePropType([
- String,
- Object,
- Array
- ]) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/statistic/index.mjs
- var ElStatistic = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElStatistic",
- __name: "statistic",
- props: statisticProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const ns = useNamespace("statistic");
- const displayValue = computed(() => {
- const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
- if (isFunction$1(formatter)) return formatter(value);
- if (!isNumber(value) || Number.isNaN(value)) return value;
- let [integer, decimal = ""] = String(value).split(".");
- decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
- return [integer, decimal].join(decimal ? decimalSeparator : "");
- });
- __expose({ displayValue });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [_ctx.$slots.title || __props.title ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("head"))
- }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [
- _ctx.$slots.prefix || __props.prefix ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("prefix"))
- }, [renderSlot(_ctx.$slots, "prefix", {}, () => [createBaseVNode("span", null, toDisplayString(__props.prefix), 1)])], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("span", {
- class: normalizeClass(unref(ns).e("number")),
- style: normalizeStyle(__props.valueStyle)
- }, toDisplayString(displayValue.value), 7),
- _ctx.$slots.suffix || __props.suffix ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("suffix"))
- }, [renderSlot(_ctx.$slots, "suffix", {}, () => [createBaseVNode("span", null, toDisplayString(__props.suffix), 1)])], 2)) : createCommentVNode("v-if", true)
- ], 2)], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/countdown/src/utils.mjs
- var timeUnits$1 = [
- ["Y", 1e3 * 60 * 60 * 24 * 365],
- ["M", 1e3 * 60 * 60 * 24 * 30],
- ["D", 1e3 * 60 * 60 * 24],
- ["H", 1e3 * 60 * 60],
- ["m", 1e3 * 60],
- ["s", 1e3],
- ["S", 1]
- ];
- var getTime = (value) => {
- return isNumber(value) ? new Date(value).getTime() : value.valueOf();
- };
- var formatTime$1 = (timestamp, format) => {
- let timeLeft = timestamp;
- return timeUnits$1.reduce((current, [name, unit]) => {
- const replaceRegex = new RegExp(`${name}+(?![^\\[\\]]*\\])`, "g");
- if (replaceRegex.test(current)) {
- const value = Math.floor(timeLeft / unit);
- timeLeft -= value * unit;
- return current.replace(replaceRegex, (match) => String(value).padStart(match.length, "0"));
- }
- return current;
- }, format).replace(/\[([^\]]*)]/g, "$1");
- };
- //#endregion
- //#region node_modules/element-plus/es/components/countdown/index.mjs
- var ElCountdown = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElCountdown",
- __name: "countdown",
- props: countdownProps,
- emits: countdownEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- let timer;
- const rawValue = ref(0);
- const displayValue = computed(() => formatTime$1(rawValue.value, props.format));
- const formatter = (val) => formatTime$1(val, props.format);
- const stopTimer = () => {
- if (timer) {
- cAF(timer);
- timer = void 0;
- }
- };
- const startTimer = () => {
- const timestamp = getTime(props.value);
- const frameFunc = () => {
- let diff = timestamp - Date.now();
- emit(CHANGE_EVENT, diff);
- if (diff <= 0) {
- diff = 0;
- stopTimer();
- emit("finish");
- } else timer = rAF(frameFunc);
- rawValue.value = diff;
- };
- timer = rAF(frameFunc);
- };
- onMounted(() => {
- rawValue.value = getTime(props.value) - Date.now();
- watch(() => [props.value, props.format], () => {
- stopTimer();
- startTimer();
- }, { immediate: true });
- });
- onBeforeUnmount(() => {
- stopTimer();
- });
- __expose({ displayValue });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElStatistic), {
- value: rawValue.value,
- title: __props.title,
- prefix: __props.prefix,
- suffix: __props.suffix,
- "value-style": __props.valueStyle,
- formatter
- }, createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
- return {
- name,
- fn: withCtx(() => [renderSlot(_ctx.$slots, name)])
- };
- })]), 1032, [
- "value",
- "title",
- "prefix",
- "suffix",
- "value-style"
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/date-picker-panel.mjs
- var datePickerPanelProps = buildProps({
- valueFormat: String,
- dateFormat: String,
- timeFormat: String,
- disabled: {
- type: Boolean,
- default: void 0
- },
- modelValue: {
- type: definePropType([
- Date,
- Array,
- String,
- Number
- ]),
- default: ""
- },
- defaultValue: { type: definePropType([Date, Array]) },
- defaultTime: { type: definePropType([Date, Array]) },
- isRange: Boolean,
- ...disabledTimeListsProps,
- disabledDate: { type: Function },
- cellClassName: { type: Function },
- shortcuts: {
- type: Array,
- default: () => []
- },
- arrowControl: Boolean,
- unlinkPanels: Boolean,
- showNow: {
- type: Boolean,
- default: true
- },
- showConfirm: Boolean,
- showFooter: Boolean,
- showWeekNumber: Boolean,
- type: {
- type: definePropType(String),
- default: "date"
- },
- clearable: {
- type: Boolean,
- default: true
- },
- border: {
- type: Boolean,
- default: true
- },
- editable: {
- type: Boolean,
- default: true
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/constants.mjs
- var ROOT_PICKER_INJECTION_KEY = Symbol("rootPickerContextKey");
- var ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY = "ElIsDefaultFormat";
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/shared.mjs
- var selectionModes = [
- "date",
- "dates",
- "year",
- "years",
- "month",
- "months",
- "week",
- "range"
- ];
- var datePickerSharedProps = buildProps({
- cellClassName: { type: definePropType(Function) },
- disabledDate: { type: definePropType(Function) },
- date: {
- type: definePropType(Object),
- required: true
- },
- minDate: { type: definePropType(Object) },
- maxDate: { type: definePropType(Object) },
- parsedValue: { type: definePropType([Object, Array]) },
- rangeState: {
- type: definePropType(Object),
- default: () => ({
- endDate: null,
- selecting: false
- })
- },
- disabled: Boolean
- });
- var panelSharedProps = buildProps({
- type: {
- type: definePropType(String),
- required: true,
- values: datePickTypes
- },
- dateFormat: String,
- timeFormat: String,
- showNow: {
- type: Boolean,
- default: true
- },
- showConfirm: Boolean,
- showFooter: {
- type: Boolean,
- default: true
- },
- showWeekNumber: Boolean,
- border: Boolean,
- disabled: Boolean,
- editable: {
- type: Boolean,
- default: true
- }
- });
- var panelRangeSharedProps = buildProps({
- unlinkPanels: Boolean,
- visible: {
- type: Boolean,
- default: true
- },
- showConfirm: Boolean,
- showFooter: {
- type: Boolean,
- default: true
- },
- border: Boolean,
- disabled: Boolean,
- parsedValue: { type: definePropType(Array) }
- });
- var selectionModeWithDefault = (mode) => {
- return {
- type: String,
- values: selectionModes,
- default: mode
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-pick.mjs
- var panelDatePickProps = buildProps({
- ...panelSharedProps,
- parsedValue: { type: definePropType([Object, Array]) },
- visible: {
- type: Boolean,
- default: true
- },
- format: {
- type: String,
- default: ""
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/utils.mjs
- var isValidRange = (range) => {
- if (!isArray$1(range)) return false;
- const [left, right] = range;
- return import_dayjs_min.default.isDayjs(left) && import_dayjs_min.default.isDayjs(right) && (0, import_dayjs_min.default)(left).isValid() && (0, import_dayjs_min.default)(right).isValid() && left.isSameOrBefore(right);
- };
- var getDefaultValue = (defaultValue, { lang, step = 1, unit, unlinkPanels }) => {
- let start;
- if (isArray$1(defaultValue)) {
- let [left, right] = defaultValue.map((d) => (0, import_dayjs_min.default)(d).locale(lang));
- if (!unlinkPanels) right = left.add(step, unit);
- return [left, right];
- } else if (defaultValue) start = (0, import_dayjs_min.default)(defaultValue);
- else start = (0, import_dayjs_min.default)();
- start = start.locale(lang);
- return [start, start.add(step, unit)];
- };
- var buildPickerTable = (dimension, rows, { columnIndexOffset, startDate, nextEndDate, now, unit, relativeDateGetter, setCellMetadata, setRowMetadata }) => {
- for (let rowIndex = 0; rowIndex < dimension.row; rowIndex++) {
- const row = rows[rowIndex];
- for (let columnIndex = 0; columnIndex < dimension.column; columnIndex++) {
- let cell = row[columnIndex + columnIndexOffset];
- if (!cell) cell = {
- row: rowIndex,
- column: columnIndex,
- type: "normal",
- inRange: false,
- start: false,
- end: false
- };
- const nextStartDate = relativeDateGetter(rowIndex * dimension.column + columnIndex);
- cell.dayjs = nextStartDate;
- cell.date = nextStartDate.toDate();
- cell.timestamp = nextStartDate.valueOf();
- cell.type = "normal";
- cell.inRange = !!(startDate && nextStartDate.isSameOrAfter(startDate, unit) && nextEndDate && nextStartDate.isSameOrBefore(nextEndDate, unit)) || !!(startDate && nextStartDate.isSameOrBefore(startDate, unit) && nextEndDate && nextStartDate.isSameOrAfter(nextEndDate, unit));
- if (startDate?.isSameOrAfter(nextEndDate)) {
- cell.start = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit);
- cell.end = startDate && nextStartDate.isSame(startDate, unit);
- } else {
- cell.start = !!startDate && nextStartDate.isSame(startDate, unit);
- cell.end = !!nextEndDate && nextStartDate.isSame(nextEndDate, unit);
- }
- if (nextStartDate.isSame(now, unit)) cell.type = "today";
- setCellMetadata?.(cell, {
- rowIndex,
- columnIndex
- });
- row[columnIndex + columnIndexOffset] = cell;
- }
- setRowMetadata?.(row);
- }
- };
- var datesInMonth = (date, year, month, lang) => {
- const firstDay = (0, import_dayjs_min.default)().locale(lang).startOf("month").month(month).year(year).hour(date.hour()).minute(date.minute()).second(date.second());
- return rangeArr(firstDay.daysInMonth()).map((n) => firstDay.add(n, "day").toDate());
- };
- var getValidDateOfMonth = (date, year, month, lang, disabledDate) => {
- const _value = (0, import_dayjs_min.default)().year(year).month(month).startOf("month").hour(date.hour()).minute(date.minute()).second(date.second());
- const _date = datesInMonth(date, year, month, lang).find((date) => {
- return !disabledDate?.(date);
- });
- if (_date) return (0, import_dayjs_min.default)(_date).locale(lang);
- return _value.locale(lang);
- };
- var getValidDateOfYear = (value, lang, disabledDate) => {
- const year = value.year();
- if (!disabledDate?.(value.toDate())) return value.locale(lang);
- const month = value.month();
- if (!datesInMonth(value, year, month, lang).every(disabledDate)) return getValidDateOfMonth(value, year, month, lang, disabledDate);
- for (let i = 0; i < 12; i++) if (!datesInMonth(value, year, i, lang).every(disabledDate)) return getValidDateOfMonth(value, year, i, lang, disabledDate);
- return value;
- };
- var correctlyParseUserInput = (value, format, lang, defaultFormat) => {
- if (isArray$1(value)) return value.map((v) => correctlyParseUserInput(v, format, lang, defaultFormat));
- if (isString(value)) {
- const dayjsValue = defaultFormat?.value ? (0, import_dayjs_min.default)(value) : (0, import_dayjs_min.default)(value, format);
- if (!dayjsValue.isValid()) return dayjsValue;
- }
- return (0, import_dayjs_min.default)(value, format).locale(lang);
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-date-table.mjs
- var basicDateTableProps = buildProps({
- ...datePickerSharedProps,
- showWeekNumber: Boolean,
- selectionMode: selectionModeWithDefault("date")
- });
- var basicDateTableEmits = [
- "changerange",
- "pick",
- "select"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-basic-date-table.mjs
- var isNormalDay = (type = "") => {
- return ["normal", "today"].includes(type);
- };
- var useBasicDateTable = (props, emit) => {
- const { lang } = useLocale();
- const tbodyRef = ref();
- const currentCellRef = ref();
- const lastRow = ref();
- const lastColumn = ref();
- const tableRows = ref([
- [],
- [],
- [],
- [],
- [],
- []
- ]);
- let focusWithClick = false;
- const firstDayOfWeek = props.date.$locale().weekStart || 7;
- const WEEKS_CONSTANT = props.date.locale("en").localeData().weekdaysShort().map((_) => _.toLowerCase());
- const offsetDay = computed(() => {
- return firstDayOfWeek > 3 ? 7 - firstDayOfWeek : -firstDayOfWeek;
- });
- const startDate = computed(() => {
- const startDayOfMonth = props.date.startOf("month");
- return startDayOfMonth.subtract(startDayOfMonth.day() || 7, "day");
- });
- const WEEKS = computed(() => {
- return WEEKS_CONSTANT.concat(WEEKS_CONSTANT).slice(firstDayOfWeek, firstDayOfWeek + 7);
- });
- const hasCurrent = computed(() => {
- return flatten(unref(rows)).some((row) => {
- return row.isCurrent;
- });
- });
- const days = computed(() => {
- const startOfMonth = props.date.startOf("month");
- return {
- startOfMonthDay: startOfMonth.day() || 7,
- dateCountOfMonth: startOfMonth.daysInMonth(),
- dateCountOfLastMonth: startOfMonth.subtract(1, "month").daysInMonth()
- };
- });
- const selectedDate = computed(() => {
- return props.selectionMode === "dates" ? castArray(props.parsedValue) : [];
- });
- const setDateText = (cell, { count, rowIndex, columnIndex }) => {
- const { startOfMonthDay, dateCountOfMonth, dateCountOfLastMonth } = unref(days);
- const offset = unref(offsetDay);
- if (rowIndex >= 0 && rowIndex <= 1) {
- const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
- if (columnIndex + rowIndex * 7 >= numberOfDaysFromPreviousMonth) {
- cell.text = count;
- return true;
- } else {
- cell.text = dateCountOfLastMonth - (numberOfDaysFromPreviousMonth - columnIndex % 7) + 1 + rowIndex * 7;
- cell.type = "prev-month";
- }
- } else {
- if (count <= dateCountOfMonth) cell.text = count;
- else {
- cell.text = count - dateCountOfMonth;
- cell.type = "next-month";
- }
- return true;
- }
- return false;
- };
- const setCellMetadata = (cell, { columnIndex, rowIndex }, count) => {
- const { disabledDate, cellClassName } = props;
- const _selectedDate = unref(selectedDate);
- const shouldIncrement = setDateText(cell, {
- count,
- rowIndex,
- columnIndex
- });
- const cellDate = cell.dayjs.toDate();
- cell.selected = _selectedDate.find((d) => d.isSame(cell.dayjs, "day"));
- cell.isSelected = !!cell.selected;
- cell.isCurrent = isCurrent(cell);
- cell.disabled = disabledDate?.(cellDate);
- cell.customClass = cellClassName?.(cellDate);
- return shouldIncrement;
- };
- const setRowMetadata = (row) => {
- if (props.selectionMode === "week") {
- const [start, end] = props.showWeekNumber ? [1, 7] : [0, 6];
- const isActive = isWeekActive(row[start + 1]);
- row[start].inRange = isActive;
- row[start].start = isActive;
- row[end].inRange = isActive;
- row[end].end = isActive;
- }
- };
- const rows = computed(() => {
- const { minDate, maxDate, rangeState, showWeekNumber } = props;
- const offset = unref(offsetDay);
- const rows_ = unref(tableRows);
- const dateUnit = "day";
- let count = 1;
- buildPickerTable({
- row: 6,
- column: 7
- }, rows_, {
- startDate: minDate,
- columnIndexOffset: showWeekNumber ? 1 : 0,
- nextEndDate: rangeState.endDate || maxDate || rangeState.selecting && minDate || null,
- now: (0, import_dayjs_min.default)().locale(unref(lang)).startOf(dateUnit),
- unit: dateUnit,
- relativeDateGetter: (idx) => unref(startDate).add(idx - offset, dateUnit),
- setCellMetadata: (...args) => {
- if (setCellMetadata(...args, count)) count += 1;
- },
- setRowMetadata
- });
- if (showWeekNumber) {
- for (let rowIndex = 0; rowIndex < 6; rowIndex++) if (rows_[rowIndex][1].dayjs) rows_[rowIndex][0] = {
- type: "week",
- text: rows_[rowIndex][1].dayjs.week()
- };
- }
- return rows_;
- });
- watch(() => props.date, async () => {
- if (unref(tbodyRef)?.contains(document.activeElement)) {
- await nextTick();
- await focus();
- }
- });
- const focus = async () => unref(currentCellRef)?.focus();
- const isCurrent = (cell) => {
- return props.selectionMode === "date" && isNormalDay(cell.type) && cellMatchesDate(cell, props.parsedValue);
- };
- const cellMatchesDate = (cell, date) => {
- if (!date) return false;
- return (0, import_dayjs_min.default)(date).locale(unref(lang)).isSame(props.date.date(Number(cell.text)), "day");
- };
- const getDateOfCell = (row, column) => {
- const startOfMonthDay = unref(days).startOfMonthDay;
- const offset = unref(offsetDay);
- const numberOfDaysFromPreviousMonth = startOfMonthDay + offset < 0 ? 7 + startOfMonthDay + offset : startOfMonthDay + offset;
- const offsetFromStart = row * 7 + (column - (props.showWeekNumber ? 1 : 0));
- return props.date.startOf("month").subtract(numberOfDaysFromPreviousMonth, "day").add(offsetFromStart, "day");
- };
- const handleMouseMove = (event) => {
- if (!props.rangeState.selecting) return;
- let target = event.target;
- if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
- if (target.tagName === "DIV") target = target.parentNode;
- if (target.tagName !== "TD") return;
- const row = target.parentNode.rowIndex - 1;
- const column = target.cellIndex;
- if (unref(rows)[row][column].disabled) return;
- if (row !== unref(lastRow) || column !== unref(lastColumn)) {
- lastRow.value = row;
- lastColumn.value = column;
- emit("changerange", {
- selecting: true,
- endDate: getDateOfCell(row, column)
- });
- }
- };
- const isSelectedCell = (cell) => {
- return !unref(hasCurrent) && cell?.text === 1 && isNormalDay(cell.type) || cell.isCurrent;
- };
- const handleFocus = (event) => {
- if (focusWithClick || unref(hasCurrent) || props.selectionMode !== "date") return;
- handlePickDate(event, true);
- };
- const handleMouseDown = (event) => {
- if (!event.target.closest("td")) return;
- focusWithClick = true;
- };
- const handleMouseUp = (event) => {
- if (!event.target.closest("td")) return;
- focusWithClick = false;
- };
- const handleRangePick = (newDate) => {
- if (!props.rangeState.selecting || !props.minDate) {
- emit("pick", {
- minDate: newDate,
- maxDate: null
- });
- emit("select", true);
- } else {
- if (newDate >= props.minDate) emit("pick", {
- minDate: props.minDate,
- maxDate: newDate
- });
- else emit("pick", {
- minDate: newDate,
- maxDate: props.minDate
- });
- emit("select", false);
- }
- };
- const handleWeekPick = (newDate) => {
- const weekNumber = newDate.week();
- const value = `${newDate.year()}w${weekNumber}`;
- emit("pick", {
- year: newDate.year(),
- week: weekNumber,
- value,
- date: newDate.startOf("week")
- });
- };
- const handleDatesPick = (newDate, selected) => {
- emit("pick", selected ? castArray(props.parsedValue).filter((d) => d?.valueOf() !== newDate.valueOf()) : castArray(props.parsedValue).concat([newDate]));
- };
- const handlePickDate = (event, isKeyboardMovement = false) => {
- if (props.disabled) return;
- const target = event.target.closest("td");
- if (!target) return;
- const row = target.parentNode.rowIndex - 1;
- const column = target.cellIndex;
- const cell = unref(rows)[row][column];
- if (cell.disabled || cell.type === "week") return;
- const newDate = getDateOfCell(row, column);
- switch (props.selectionMode) {
- case "range":
- handleRangePick(newDate);
- break;
- case "date":
- emit("pick", newDate, isKeyboardMovement);
- break;
- case "week":
- handleWeekPick(newDate);
- break;
- case "dates":
- handleDatesPick(newDate, !!cell.selected);
- break;
- default: break;
- }
- };
- const isWeekActive = (cell) => {
- if (props.selectionMode !== "week") return false;
- let newDate = props.date.startOf("day");
- if (cell.type === "prev-month") newDate = newDate.subtract(1, "month");
- if (cell.type === "next-month") newDate = newDate.add(1, "month");
- newDate = newDate.date(Number.parseInt(cell.text, 10));
- if (props.parsedValue && !isArray$1(props.parsedValue)) {
- const dayOffset = (props.parsedValue.day() - firstDayOfWeek + 7) % 7 - 1;
- return props.parsedValue.subtract(dayOffset, "day").isSame(newDate, "day");
- }
- return false;
- };
- return {
- WEEKS,
- rows,
- tbodyRef,
- currentCellRef,
- focus,
- isCurrent,
- isWeekActive,
- isSelectedCell,
- handlePickDate,
- handleMouseUp,
- handleMouseDown,
- handleMouseMove,
- handleFocus
- };
- };
- var useBasicDateTableDOM = (props, { isCurrent, isWeekActive }) => {
- const ns = useNamespace("date-table");
- const { t } = useLocale();
- const tableKls = computed(() => [ns.b(), ns.is("week-mode", props.selectionMode === "week" && !props.disabled)]);
- const tableLabel = computed(() => t("el.datepicker.dateTablePrompt"));
- const getCellClasses = (cell) => {
- const classes = [];
- if (isNormalDay(cell.type) && !cell.disabled) {
- classes.push("available");
- if (cell.type === "today") classes.push("today");
- } else classes.push(cell.type);
- if (isCurrent(cell)) classes.push("current");
- if (cell.inRange && (isNormalDay(cell.type) || props.selectionMode === "week")) {
- classes.push("in-range");
- if (cell.start) classes.push("start-date");
- if (cell.end) classes.push("end-date");
- }
- if (cell.disabled || props.disabled) classes.push("disabled");
- if (cell.selected) classes.push("selected");
- if (cell.customClass) classes.push(cell.customClass);
- return classes.join(" ");
- };
- const getRowKls = (cell) => [ns.e("row"), { current: isWeekActive(cell) }];
- return {
- tableKls,
- tableLabel,
- weekHeaderClass: ns.e("week-header"),
- getCellClasses,
- getRowKls,
- t
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-cell-render.mjs
- var basic_cell_render_default = /* @__PURE__ */ defineComponent({
- name: "ElDatePickerCell",
- props: buildProps({ cell: { type: definePropType(Object) } }),
- setup(props) {
- const ns = useNamespace("date-table-cell");
- const { slots } = inject(ROOT_PICKER_INJECTION_KEY);
- return () => {
- const { cell } = props;
- return renderSlot(slots, "default", { ...cell }, () => [createVNode("div", { "class": ns.b() }, [createVNode("span", { "class": ns.e("text") }, [cell?.renderText ?? cell?.text])])]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$50 = ["aria-label"];
- var _hoisted_2$32 = ["aria-label"];
- var _hoisted_3$15 = [
- "aria-current",
- "aria-selected",
- "tabindex",
- "aria-disabled"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-date-table.mjs
- var basic_date_table_default = /* @__PURE__ */ defineComponent({
- __name: "basic-date-table",
- props: basicDateTableProps,
- emits: basicDateTableEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const { WEEKS, rows, tbodyRef, currentCellRef, focus, isCurrent, isWeekActive, isSelectedCell, handlePickDate, handleMouseUp, handleMouseDown, handleMouseMove, handleFocus } = useBasicDateTable(props, __emit);
- const { tableLabel, tableKls, getCellClasses, getRowKls, weekHeaderClass, t } = useBasicDateTableDOM(props, {
- isCurrent,
- isWeekActive
- });
- let isUnmounting = false;
- onBeforeUnmount(() => {
- isUnmounting = true;
- });
- __expose({ focus });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("table", {
- "aria-label": unref(tableLabel),
- class: normalizeClass(unref(tableKls)),
- cellspacing: "0",
- cellpadding: "0",
- role: "grid",
- onClick: _cache[1] || (_cache[1] = (...args) => unref(handlePickDate) && unref(handlePickDate)(...args)),
- onMousemove: _cache[2] || (_cache[2] = (...args) => unref(handleMouseMove) && unref(handleMouseMove)(...args)),
- onMousedown: _cache[3] || (_cache[3] = (...args) => unref(handleMouseDown) && unref(handleMouseDown)(...args)),
- onMouseup: _cache[4] || (_cache[4] = (...args) => unref(handleMouseUp) && unref(handleMouseUp)(...args))
- }, [createBaseVNode("tbody", {
- ref_key: "tbodyRef",
- ref: tbodyRef
- }, [createBaseVNode("tr", null, [_ctx.showWeekNumber ? (openBlock(), createElementBlock("th", {
- key: 0,
- scope: "col",
- class: normalizeClass(unref(weekHeaderClass))
- }, null, 2)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(WEEKS), (week, key) => {
- return openBlock(), createElementBlock("th", {
- key,
- "aria-label": unref(t)("el.datepicker.weeksFull." + week),
- scope: "col"
- }, toDisplayString(unref(t)("el.datepicker.weeks." + week)), 9, _hoisted_2$32);
- }), 128))]), (openBlock(true), createElementBlock(Fragment, null, renderList(unref(rows), (row, rowKey) => {
- return openBlock(), createElementBlock("tr", {
- key: rowKey,
- class: normalizeClass(unref(getRowKls)(_ctx.showWeekNumber ? row[2] : row[1]))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, columnKey) => {
- return openBlock(), createElementBlock("td", {
- key: `${rowKey}.${columnKey}`,
- ref_for: true,
- ref: (el) => !unref(isUnmounting) && unref(isSelectedCell)(cell) && (currentCellRef.value = el),
- class: normalizeClass(unref(getCellClasses)(cell)),
- "aria-current": cell.isCurrent ? "date" : void 0,
- "aria-selected": cell.isCurrent,
- tabindex: _ctx.disabled ? void 0 : unref(isSelectedCell)(cell) ? 0 : -1,
- "aria-disabled": _ctx.disabled,
- onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args))
- }, [createVNode(unref(basic_cell_render_default), { cell }, null, 8, ["cell"])], 42, _hoisted_3$15);
- }), 128))], 2);
- }), 128))], 512)], 42, _hoisted_1$50);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-month-table.mjs
- var basicMonthTableProps = buildProps({
- ...datePickerSharedProps,
- selectionMode: selectionModeWithDefault("month")
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$49 = ["aria-label"];
- var _hoisted_2$31 = [
- "aria-selected",
- "aria-label",
- "tabindex",
- "onKeydown"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-month-table.mjs
- var basic_month_table_default = /* @__PURE__ */ defineComponent({
- __name: "basic-month-table",
- props: basicMonthTableProps,
- emits: [
- "changerange",
- "pick",
- "select"
- ],
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("month-table");
- const { t, lang } = useLocale();
- const tbodyRef = ref();
- const currentCellRef = ref();
- const months = ref(props.date.locale("en").localeData().monthsShort().map((_) => _.toLowerCase()));
- const tableRows = ref([
- [],
- [],
- []
- ]);
- const lastRow = ref();
- const lastColumn = ref();
- const rows = computed(() => {
- const rows = tableRows.value;
- const now = (0, import_dayjs_min.default)().locale(lang.value).startOf("month");
- for (let i = 0; i < 3; i++) {
- const row = rows[i];
- for (let j = 0; j < 4; j++) {
- const cell = row[j] ||= {
- row: i,
- column: j,
- type: "normal",
- inRange: false,
- start: false,
- end: false,
- text: -1,
- disabled: false,
- isSelected: false,
- customClass: void 0,
- date: void 0,
- dayjs: void 0,
- isCurrent: void 0,
- selected: void 0,
- renderText: void 0,
- timestamp: void 0
- };
- cell.type = "normal";
- const index = i * 4 + j;
- const calTime = props.date.startOf("year").month(index);
- const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
- cell.inRange = !!(props.minDate && calTime.isSameOrAfter(props.minDate, "month") && calEndDate && calTime.isSameOrBefore(calEndDate, "month")) || !!(props.minDate && calTime.isSameOrBefore(props.minDate, "month") && calEndDate && calTime.isSameOrAfter(calEndDate, "month"));
- if (props.minDate?.isSameOrAfter(calEndDate)) {
- cell.start = !!(calEndDate && calTime.isSame(calEndDate, "month"));
- cell.end = props.minDate && calTime.isSame(props.minDate, "month");
- } else {
- cell.start = !!(props.minDate && calTime.isSame(props.minDate, "month"));
- cell.end = !!(calEndDate && calTime.isSame(calEndDate, "month"));
- }
- if (now.isSame(calTime)) cell.type = "today";
- const cellDate = calTime.toDate();
- cell.text = index;
- cell.disabled = props.disabledDate?.(cellDate) || false;
- cell.date = cellDate;
- cell.customClass = props.cellClassName?.(cellDate);
- cell.dayjs = calTime;
- cell.timestamp = calTime.valueOf();
- cell.isSelected = isSelectedCell(cell);
- }
- }
- return rows;
- });
- const focus = () => {
- currentCellRef.value?.focus();
- };
- const getCellStyle = (cell) => {
- const style = {};
- const year = props.date.year();
- const today = /* @__PURE__ */ new Date();
- const month = cell.text;
- style.disabled = props.disabled || (props.disabledDate ? datesInMonth(props.date, year, month, lang.value).every(props.disabledDate) : false);
- style.current = castArray(props.parsedValue).some((date) => import_dayjs_min.default.isDayjs(date) && date.year() === year && date.month() === month);
- style.today = today.getFullYear() === year && today.getMonth() === month;
- if (cell.customClass) style[cell.customClass] = true;
- if (cell.inRange) {
- style["in-range"] = true;
- if (cell.start) style["start-date"] = true;
- if (cell.end) style["end-date"] = true;
- }
- return style;
- };
- const isSelectedCell = (cell) => {
- const year = props.date.year();
- const month = cell.text;
- return castArray(props.date).some((date) => date.year() === year && date.month() === month);
- };
- const handleMouseMove = (event) => {
- if (!props.rangeState.selecting) return;
- let target = event.target;
- if (target.tagName === "SPAN") target = target.parentNode?.parentNode;
- if (target.tagName === "DIV") target = target.parentNode;
- if (target.tagName !== "TD") return;
- const row = target.parentNode.rowIndex;
- const column = target.cellIndex;
- if (rows.value[row][column].disabled) return;
- if (row !== lastRow.value || column !== lastColumn.value) {
- lastRow.value = row;
- lastColumn.value = column;
- emit("changerange", {
- selecting: true,
- endDate: props.date.startOf("year").month(row * 4 + column)
- });
- }
- };
- const handleMonthTableClick = (event) => {
- if (props.disabled) return;
- const target = event.target?.closest("td");
- if (target?.tagName !== "TD") return;
- if (hasClass(target, "disabled")) return;
- const column = target.cellIndex;
- const month = target.parentNode.rowIndex * 4 + column;
- const newDate = props.date.startOf("year").month(month);
- if (props.selectionMode === "months") {
- if (event.type === "keydown") {
- emit("pick", castArray(props.parsedValue), false);
- return;
- }
- const newMonth = getValidDateOfMonth(props.date, props.date.year(), month, lang.value, props.disabledDate);
- emit("pick", hasClass(target, "current") ? castArray(props.parsedValue).filter((d) => d?.year() !== newMonth.year() || d?.month() !== newMonth.month()) : castArray(props.parsedValue).concat([(0, import_dayjs_min.default)(newMonth)]));
- } else if (props.selectionMode === "range") if (!props.rangeState.selecting) {
- emit("pick", {
- minDate: newDate,
- maxDate: null
- });
- emit("select", true);
- } else {
- if (props.minDate && newDate >= props.minDate) emit("pick", {
- minDate: props.minDate,
- maxDate: newDate
- });
- else emit("pick", {
- minDate: newDate,
- maxDate: props.minDate
- });
- emit("select", false);
- }
- else emit("pick", month);
- };
- watch(() => props.date, async () => {
- if (tbodyRef.value?.contains(document.activeElement)) {
- await nextTick();
- currentCellRef.value?.focus();
- }
- });
- __expose({ focus });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("table", {
- role: "grid",
- "aria-label": unref(t)("el.datepicker.monthTablePrompt"),
- class: normalizeClass(unref(ns).b()),
- onClick: handleMonthTableClick,
- onMousemove: handleMouseMove
- }, [createBaseVNode("tbody", {
- ref_key: "tbodyRef",
- ref: tbodyRef
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, key) => {
- return openBlock(), createElementBlock("tr", { key }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, key_) => {
- return openBlock(), createElementBlock("td", {
- key: key_,
- ref_for: true,
- ref: (el) => cell.isSelected && (currentCellRef.value = el),
- class: normalizeClass(getCellStyle(cell)),
- "aria-selected": !!cell.isSelected,
- "aria-label": unref(t)(`el.datepicker.month${+cell.text + 1}`),
- tabindex: cell.isSelected ? 0 : -1,
- onKeydown: [withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["space"]), withKeys(withModifiers(handleMonthTableClick, ["prevent", "stop"]), ["enter"])]
- }, [createVNode(unref(basic_cell_render_default), { cell: {
- ...cell,
- renderText: unref(t)("el.datepicker.months." + months.value[cell.text])
- } }, null, 8, ["cell"])], 42, _hoisted_2$31);
- }), 128))]);
- }), 128))], 512)], 42, _hoisted_1$49);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/basic-year-table.mjs
- var basicYearTableProps = buildProps({
- ...datePickerSharedProps,
- selectionMode: selectionModeWithDefault("year")
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$48 = ["aria-label"];
- var _hoisted_2$30 = [
- "aria-selected",
- "aria-label",
- "tabindex",
- "onKeydown"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/basic-year-table.mjs
- var basic_year_table_default = /* @__PURE__ */ defineComponent({
- __name: "basic-year-table",
- props: basicYearTableProps,
- emits: [
- "changerange",
- "pick",
- "select"
- ],
- setup(__props, { expose: __expose, emit: __emit }) {
- const datesInYear = (year, lang) => {
- const firstDay = (0, import_dayjs_min.default)(String(year)).locale(lang).startOf("year");
- return rangeArr(firstDay.endOf("year").dayOfYear()).map((n) => firstDay.add(n, "day").toDate());
- };
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("year-table");
- const { t, lang } = useLocale();
- const tbodyRef = ref();
- const currentCellRef = ref();
- const startYear = computed(() => {
- return Math.floor(props.date.year() / 10) * 10;
- });
- const tableRows = ref([
- [],
- [],
- []
- ]);
- const lastRow = ref();
- const lastColumn = ref();
- const rows = computed(() => {
- const rows = tableRows.value;
- const now = (0, import_dayjs_min.default)().locale(lang.value).startOf("year");
- for (let i = 0; i < 3; i++) {
- const row = rows[i];
- for (let j = 0; j < 4; j++) {
- if (i * 4 + j >= 10) break;
- let cell = row[j];
- if (!cell) cell = {
- row: i,
- column: j,
- type: "normal",
- inRange: false,
- start: false,
- end: false,
- text: -1,
- disabled: false,
- isSelected: false,
- customClass: void 0,
- date: void 0,
- dayjs: void 0,
- isCurrent: void 0,
- selected: void 0,
- renderText: void 0,
- timestamp: void 0
- };
- cell.type = "normal";
- const index = i * 4 + j + startYear.value;
- const calTime = (0, import_dayjs_min.default)().year(index);
- const calEndDate = props.rangeState.endDate || props.maxDate || props.rangeState.selecting && props.minDate || null;
- cell.inRange = !!(props.minDate && calTime.isSameOrAfter(props.minDate, "year") && calEndDate && calTime.isSameOrBefore(calEndDate, "year")) || !!(props.minDate && calTime.isSameOrBefore(props.minDate, "year") && calEndDate && calTime.isSameOrAfter(calEndDate, "year"));
- if (props.minDate?.isSameOrAfter(calEndDate)) {
- cell.start = !!(calEndDate && calTime.isSame(calEndDate, "year"));
- cell.end = !!(props.minDate && calTime.isSame(props.minDate, "year"));
- } else {
- cell.start = !!(props.minDate && calTime.isSame(props.minDate, "year"));
- cell.end = !!(calEndDate && calTime.isSame(calEndDate, "year"));
- }
- if (now.isSame(calTime)) cell.type = "today";
- cell.text = index;
- const cellDate = calTime.toDate();
- cell.disabled = props.disabledDate?.(cellDate) || false;
- cell.date = cellDate;
- cell.customClass = props.cellClassName?.(cellDate);
- cell.dayjs = calTime;
- cell.timestamp = calTime.valueOf();
- cell.isSelected = isSelectedCell(cell);
- row[j] = cell;
- }
- }
- return rows;
- });
- const focus = () => {
- currentCellRef.value?.focus();
- };
- const getCellKls = (cell) => {
- const kls = {};
- const today = (0, import_dayjs_min.default)().locale(lang.value);
- const year = cell.text;
- kls.disabled = props.disabled || (props.disabledDate ? datesInYear(year, lang.value).every(props.disabledDate) : false);
- kls.today = today.year() === year;
- kls.current = castArray(props.parsedValue).some((d) => d.year() === year);
- if (cell.customClass) kls[cell.customClass] = true;
- if (cell.inRange) {
- kls["in-range"] = true;
- if (cell.start) kls["start-date"] = true;
- if (cell.end) kls["end-date"] = true;
- }
- return kls;
- };
- const isSelectedCell = (cell) => {
- const year = cell.text;
- return castArray(props.date).some((date) => date.year() === year);
- };
- const handleYearTableClick = (event) => {
- if (props.disabled) return;
- const target = event.target?.closest("td");
- if (!target || !target.textContent || hasClass(target, "disabled")) return;
- const column = target.cellIndex;
- const selectedYear = target.parentNode.rowIndex * 4 + column + startYear.value;
- const newDate = (0, import_dayjs_min.default)().year(selectedYear);
- if (props.selectionMode === "range") if (!props.rangeState.selecting) {
- emit("pick", {
- minDate: newDate,
- maxDate: null
- });
- emit("select", true);
- } else {
- if (props.minDate && newDate >= props.minDate) emit("pick", {
- minDate: props.minDate,
- maxDate: newDate
- });
- else emit("pick", {
- minDate: newDate,
- maxDate: props.minDate
- });
- emit("select", false);
- }
- else if (props.selectionMode === "years") {
- if (event.type === "keydown") {
- emit("pick", castArray(props.parsedValue), false);
- return;
- }
- const vaildYear = getValidDateOfYear(newDate.startOf("year"), lang.value, props.disabledDate);
- emit("pick", hasClass(target, "current") ? castArray(props.parsedValue).filter((d) => d?.year() !== selectedYear) : castArray(props.parsedValue).concat([vaildYear]));
- } else emit("pick", selectedYear);
- };
- const handleMouseMove = (event) => {
- if (!props.rangeState.selecting) return;
- const target = event.target?.closest("td");
- if (!target) return;
- const row = target.parentNode.rowIndex;
- const column = target.cellIndex;
- if (rows.value[row][column].disabled) return;
- if (row !== lastRow.value || column !== lastColumn.value) {
- lastRow.value = row;
- lastColumn.value = column;
- emit("changerange", {
- selecting: true,
- endDate: (0, import_dayjs_min.default)().year(startYear.value).add(row * 4 + column, "year")
- });
- }
- };
- watch(() => props.date, async () => {
- if (tbodyRef.value?.contains(document.activeElement)) {
- await nextTick();
- currentCellRef.value?.focus();
- }
- });
- __expose({ focus });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("table", {
- role: "grid",
- "aria-label": unref(t)("el.datepicker.yearTablePrompt"),
- class: normalizeClass(unref(ns).b()),
- onClick: handleYearTableClick,
- onMousemove: handleMouseMove
- }, [createBaseVNode("tbody", {
- ref_key: "tbodyRef",
- ref: tbodyRef
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, rowKey) => {
- return openBlock(), createElementBlock("tr", { key: rowKey }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, cellKey) => {
- return openBlock(), createElementBlock("td", {
- key: `${rowKey}_${cellKey}`,
- ref_for: true,
- ref: (el) => cell.isSelected && (currentCellRef.value = el),
- class: normalizeClass(["available", getCellKls(cell)]),
- "aria-selected": cell.isSelected,
- "aria-label": String(cell.text),
- tabindex: cell.isSelected ? 0 : -1,
- onKeydown: [withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["space"]), withKeys(withModifiers(handleYearTableClick, ["prevent", "stop"]), ["enter"])]
- }, [createVNode(unref(basic_cell_render_default), { cell }, null, 8, ["cell"])], 42, _hoisted_2$30);
- }), 128))]);
- }), 128))], 512)], 42, _hoisted_1$48);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$47 = ["disabled", "onClick"];
- var _hoisted_2$29 = ["aria-label", "disabled"];
- var _hoisted_3$14 = ["aria-label", "disabled"];
- var _hoisted_4$11 = ["tabindex", "aria-disabled"];
- var _hoisted_5$8 = ["tabindex", "aria-disabled"];
- var _hoisted_6$3 = ["aria-label", "disabled"];
- var _hoisted_7$2 = ["aria-label", "disabled"];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs
- var panel_date_pick_default = /* @__PURE__ */ defineComponent({
- __name: "panel-date-pick",
- props: panelDatePickProps,
- emits: [
- "pick",
- "set-picker-option",
- "panel-change"
- ],
- setup(__props, { emit: __emit }) {
- const timeWithinRange = (_, __, ___) => true;
- const props = __props;
- const contextEmit = __emit;
- const ppNs = useNamespace("picker-panel");
- const dpNs = useNamespace("date-picker");
- const attrs = useAttrs$1();
- const slots = useSlots();
- const { t, lang } = useLocale();
- const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
- const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
- const { shortcuts, disabledDate, cellClassName, defaultTime } = pickerBase.props;
- const defaultValue = toRef(pickerBase.props, "defaultValue");
- const currentViewRef = ref();
- const innerDate = ref((0, import_dayjs_min.default)().locale(lang.value));
- const isChangeToNow = ref(false);
- let isShortcut = false;
- const defaultTimeD = computed(() => {
- return (0, import_dayjs_min.default)(defaultTime).locale(lang.value);
- });
- const month = computed(() => {
- return innerDate.value.month();
- });
- const year = computed(() => {
- return innerDate.value.year();
- });
- const selectableRange = ref([]);
- const userInputDate = ref(null);
- const userInputTime = ref(null);
- const checkDateWithinRange = (date) => {
- return selectableRange.value.length > 0 ? timeWithinRange(date, selectableRange.value, props.format || "HH:mm:ss") : true;
- };
- const formatEmit = (emitDayjs) => {
- if (defaultTime && !visibleTime.value && !isChangeToNow.value && !isShortcut) return defaultTimeD.value.year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
- if (showTime.value) return emitDayjs.millisecond(0);
- return emitDayjs.startOf("day");
- };
- const emit = (value, ...args) => {
- if (!value) contextEmit("pick", value, ...args);
- else if (isArray$1(value)) contextEmit("pick", value.map(formatEmit), ...args);
- else contextEmit("pick", formatEmit(value), ...args);
- userInputDate.value = null;
- userInputTime.value = null;
- isChangeToNow.value = false;
- isShortcut = false;
- };
- const handleDatePick = async (value, keepOpen) => {
- if (selectionMode.value === "date" && import_dayjs_min.default.isDayjs(value)) {
- const parsedDateValue = extractFirst(props.parsedValue);
- let newDate = parsedDateValue ? parsedDateValue.year(value.year()).month(value.month()).date(value.date()) : value;
- if (!checkDateWithinRange(newDate)) newDate = selectableRange.value[0][0].year(value.year()).month(value.month()).date(value.date());
- innerDate.value = newDate;
- emit(newDate, showTime.value || keepOpen);
- } else if (selectionMode.value === "week") emit(value.date);
- else if (selectionMode.value === "dates") emit(value, true);
- };
- const moveByMonth = (forward) => {
- const action = forward ? "add" : "subtract";
- innerDate.value = innerDate.value[action](1, "month");
- handlePanelChange("month");
- };
- const moveByYear = (forward) => {
- const currentDate = innerDate.value;
- const action = forward ? "add" : "subtract";
- innerDate.value = currentView.value === "year" ? currentDate[action](10, "year") : currentDate[action](1, "year");
- handlePanelChange("year");
- };
- const currentView = ref("date");
- const yearLabel = computed(() => {
- const yearTranslation = t("el.datepicker.year");
- if (currentView.value === "year") {
- const startYear = Math.floor(year.value / 10) * 10;
- if (yearTranslation) return `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}`;
- return `${startYear} - ${startYear + 9}`;
- }
- return `${year.value} ${yearTranslation}`;
- });
- const handleShortcutClick = (shortcut) => {
- const shortcutValue = isFunction$1(shortcut.value) ? shortcut.value() : shortcut.value;
- if (shortcutValue) {
- isShortcut = true;
- emit((0, import_dayjs_min.default)(shortcutValue).locale(lang.value));
- return;
- }
- if (shortcut.onClick) shortcut.onClick({
- attrs,
- slots,
- emit: contextEmit
- });
- };
- const selectionMode = computed(() => {
- const { type } = props;
- if ([
- "week",
- "month",
- "months",
- "year",
- "years",
- "dates"
- ].includes(type)) return type;
- return "date";
- });
- const isMultipleType = computed(() => {
- return selectionMode.value === "dates" || selectionMode.value === "months" || selectionMode.value === "years";
- });
- const keyboardMode = computed(() => {
- return selectionMode.value === "date" ? currentView.value : selectionMode.value;
- });
- const hasShortcuts = computed(() => !!shortcuts.length);
- const handleMonthPick = async (month, keepOpen) => {
- if (selectionMode.value === "month") {
- innerDate.value = getValidDateOfMonth(innerDate.value, innerDate.value.year(), month, lang.value, disabledDate);
- emit(innerDate.value, false);
- } else if (selectionMode.value === "months") emit(month, keepOpen ?? true);
- else {
- innerDate.value = getValidDateOfMonth(innerDate.value, innerDate.value.year(), month, lang.value, disabledDate);
- currentView.value = "date";
- if ([
- "month",
- "year",
- "date",
- "week"
- ].includes(selectionMode.value)) {
- emit(innerDate.value, true);
- await nextTick();
- handleFocusPicker();
- }
- }
- handlePanelChange("month");
- };
- const handleYearPick = async (year, keepOpen) => {
- if (selectionMode.value === "year") {
- innerDate.value = getValidDateOfYear(innerDate.value.startOf("year").year(year), lang.value, disabledDate);
- emit(innerDate.value, false);
- } else if (selectionMode.value === "years") emit(year, keepOpen ?? true);
- else {
- innerDate.value = getValidDateOfYear(innerDate.value.year(year), lang.value, disabledDate);
- currentView.value = "month";
- if ([
- "month",
- "year",
- "date",
- "week"
- ].includes(selectionMode.value)) {
- emit(innerDate.value, true);
- await nextTick();
- handleFocusPicker();
- }
- }
- handlePanelChange("year");
- };
- const dateDisabled = useFormDisabled();
- const showPicker = async (view) => {
- if (dateDisabled.value) return;
- currentView.value = view;
- await nextTick();
- handleFocusPicker();
- };
- const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
- const footerVisible = computed(() => {
- const showDateFooter = showTime.value || selectionMode.value === "dates";
- const showYearFooter = selectionMode.value === "years";
- const showMonthFooter = selectionMode.value === "months";
- const isDateView = currentView.value === "date";
- const isYearView = currentView.value === "year";
- const isMonthView = currentView.value === "month";
- return showDateFooter && isDateView || showYearFooter && isYearView || showMonthFooter && isMonthView;
- });
- const footerFilled = computed(() => !isMultipleType.value && props.showNow || props.showConfirm);
- const disabledConfirm = computed(() => {
- if (!disabledDate) return false;
- if (!props.parsedValue) return true;
- if (isArray$1(props.parsedValue)) return disabledDate(props.parsedValue[0].toDate());
- return disabledDate(props.parsedValue.toDate());
- });
- const onConfirm = () => {
- if (isMultipleType.value) emit(props.parsedValue);
- else {
- let result = extractFirst(props.parsedValue);
- if (!result) {
- const defaultTimeD = (0, import_dayjs_min.default)(defaultTime).locale(lang.value);
- const defaultValueD = getDefaultValue();
- result = defaultTimeD.year(defaultValueD.year()).month(defaultValueD.month()).date(defaultValueD.date());
- }
- innerDate.value = result;
- emit(result);
- }
- };
- const disabledNow = computed(() => {
- if (!disabledDate) return false;
- return disabledDate((0, import_dayjs_min.default)().locale(lang.value).toDate());
- });
- const changeToNow = () => {
- const nowDate = (0, import_dayjs_min.default)().locale(lang.value).toDate();
- isChangeToNow.value = true;
- if ((!disabledDate || !disabledDate(nowDate)) && checkDateWithinRange(nowDate)) {
- innerDate.value = (0, import_dayjs_min.default)().locale(lang.value);
- emit(innerDate.value);
- }
- };
- const timeFormat = computed(() => {
- return props.timeFormat || extractTimeFormat(props.format) || "HH:mm:ss";
- });
- const dateFormat = computed(() => {
- return props.dateFormat || extractDateFormat(props.format) || "YYYY-MM-DD";
- });
- const visibleTime = computed(() => {
- if (userInputTime.value) return userInputTime.value;
- if (!props.parsedValue && !defaultValue.value) return;
- return (extractFirst(props.parsedValue) || innerDate.value).format(timeFormat.value);
- });
- const visibleDate = computed(() => {
- if (userInputDate.value) return userInputDate.value;
- if (!props.parsedValue && !defaultValue.value) return;
- return (extractFirst(props.parsedValue) || innerDate.value).format(dateFormat.value);
- });
- const timePickerVisible = ref(false);
- const onTimePickerInputFocus = () => {
- timePickerVisible.value = true;
- };
- const handleTimePickClose = () => {
- timePickerVisible.value = false;
- };
- const getUnits = (date) => {
- return {
- hour: date.hour(),
- minute: date.minute(),
- second: date.second(),
- year: date.year(),
- month: date.month(),
- date: date.date()
- };
- };
- const handleTimePick = (value, visible, first) => {
- const { hour, minute, second } = getUnits(value);
- const parsedDateValue = extractFirst(props.parsedValue);
- innerDate.value = parsedDateValue ? parsedDateValue.hour(hour).minute(minute).second(second) : value;
- emit(innerDate.value, true);
- if (!first) timePickerVisible.value = visible;
- };
- const handleVisibleTimeChange = (value) => {
- const newDate = (0, import_dayjs_min.default)(value, timeFormat.value).locale(lang.value);
- if (newDate.isValid() && checkDateWithinRange(newDate)) {
- const { year, month, date } = getUnits(innerDate.value);
- innerDate.value = newDate.year(year).month(month).date(date);
- userInputTime.value = null;
- timePickerVisible.value = false;
- emit(innerDate.value, true);
- }
- };
- const handleVisibleDateChange = (value) => {
- const newDate = correctlyParseUserInput(value, dateFormat.value, lang.value, isDefaultFormat);
- if (newDate.isValid()) {
- if (disabledDate && disabledDate(newDate.toDate())) return;
- const { hour, minute, second } = getUnits(innerDate.value);
- innerDate.value = newDate.hour(hour).minute(minute).second(second);
- userInputDate.value = null;
- emit(innerDate.value, true);
- }
- };
- const isValidValue = (date) => {
- return import_dayjs_min.default.isDayjs(date) && date.isValid() && (disabledDate ? !disabledDate(date.toDate()) : true);
- };
- const parseUserInput = (value) => {
- return correctlyParseUserInput(value, props.format, lang.value, isDefaultFormat);
- };
- const getDefaultValue = () => {
- const parseDate = (0, import_dayjs_min.default)(defaultValue.value).locale(lang.value);
- if (!defaultValue.value) {
- const defaultTimeDValue = defaultTimeD.value;
- return (0, import_dayjs_min.default)().hour(defaultTimeDValue.hour()).minute(defaultTimeDValue.minute()).second(defaultTimeDValue.second()).locale(lang.value);
- }
- return parseDate;
- };
- const handleFocusPicker = () => {
- if ([
- "week",
- "month",
- "year",
- "date"
- ].includes(selectionMode.value)) currentViewRef.value?.focus();
- };
- const _handleFocusPicker = () => {
- handleFocusPicker();
- if (selectionMode.value === "week") handleKeyControl(EVENT_CODE.down);
- };
- const handleKeydownTable = (event) => {
- const code = getEventCode(event);
- if ([
- EVENT_CODE.up,
- EVENT_CODE.down,
- EVENT_CODE.left,
- EVENT_CODE.right,
- EVENT_CODE.home,
- EVENT_CODE.end,
- EVENT_CODE.pageUp,
- EVENT_CODE.pageDown
- ].includes(code)) {
- handleKeyControl(code);
- event.stopPropagation();
- event.preventDefault();
- }
- if ([
- EVENT_CODE.enter,
- EVENT_CODE.space,
- EVENT_CODE.numpadEnter
- ].includes(code) && userInputDate.value === null && userInputTime.value === null) {
- event.preventDefault();
- emit(innerDate.value, false);
- }
- };
- const handleKeyControl = (code) => {
- const { up, down, left, right, home, end, pageUp, pageDown } = EVENT_CODE;
- const mapping = {
- year: {
- [up]: -4,
- [down]: 4,
- [left]: -1,
- [right]: 1,
- offset: (date, step) => date.setFullYear(date.getFullYear() + step)
- },
- month: {
- [up]: -4,
- [down]: 4,
- [left]: -1,
- [right]: 1,
- offset: (date, step) => date.setMonth(date.getMonth() + step)
- },
- week: {
- [up]: -1,
- [down]: 1,
- [left]: -1,
- [right]: 1,
- offset: (date, step) => date.setDate(date.getDate() + step * 7)
- },
- date: {
- [up]: -7,
- [down]: 7,
- [left]: -1,
- [right]: 1,
- [home]: (date) => -date.getDay(),
- [end]: (date) => -date.getDay() + 6,
- [pageUp]: (date) => -new Date(date.getFullYear(), date.getMonth(), 0).getDate(),
- [pageDown]: (date) => new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(),
- offset: (date, step) => date.setDate(date.getDate() + step)
- }
- };
- const newDate = innerDate.value.toDate();
- while (Math.abs(innerDate.value.diff(newDate, "year", true)) < 1) {
- const map = mapping[keyboardMode.value];
- if (!map) return;
- map.offset(newDate, isFunction$1(map[code]) ? map[code](newDate) : map[code] ?? 0);
- if (disabledDate && disabledDate(newDate)) break;
- const result = (0, import_dayjs_min.default)(newDate).locale(lang.value);
- innerDate.value = result;
- contextEmit("pick", result, true);
- break;
- }
- };
- const handlePanelChange = (mode) => {
- contextEmit("panel-change", innerDate.value.toDate(), mode, currentView.value);
- };
- watch(() => selectionMode.value, (val) => {
- if (["month", "year"].includes(val)) {
- currentView.value = val;
- return;
- } else if (val === "years") {
- currentView.value = "year";
- return;
- } else if (val === "months") {
- currentView.value = "month";
- return;
- }
- currentView.value = "date";
- }, { immediate: true });
- watch(() => defaultValue.value, (val) => {
- if (val) innerDate.value = getDefaultValue();
- }, { immediate: true });
- watch(() => props.parsedValue, (val) => {
- if (val) {
- if (isMultipleType.value) return;
- if (isArray$1(val)) return;
- innerDate.value = val;
- } else innerDate.value = getDefaultValue();
- }, { immediate: true });
- contextEmit("set-picker-option", ["isValidValue", isValidValue]);
- contextEmit("set-picker-option", ["parseUserInput", parseUserInput]);
- contextEmit("set-picker-option", ["handleFocusPicker", _handleFocusPicker]);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([
- unref(ppNs).b(),
- unref(dpNs).b(),
- unref(ppNs).is("border", _ctx.border),
- unref(ppNs).is("disabled", unref(dateDisabled)),
- {
- "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value,
- "has-time": showTime.value
- }
- ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
- renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
- hasShortcuts.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ppNs).e("sidebar"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
- return openBlock(), createElementBlock("button", {
- key,
- type: "button",
- disabled: unref(dateDisabled),
- class: normalizeClass(unref(ppNs).e("shortcut")),
- onClick: ($event) => handleShortcutClick(shortcut)
- }, toDisplayString(shortcut.text), 11, _hoisted_1$47);
- }), 128))], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [
- showTime.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(dpNs).e("time-header"))
- }, [createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("editor-wrap")) }, [createVNode(unref(ElInput), {
- placeholder: unref(t)("el.datepicker.selectDate"),
- "model-value": visibleDate.value,
- size: "small",
- "validate-event": false,
- disabled: unref(dateDisabled),
- readonly: !_ctx.editable,
- onInput: _cache[0] || (_cache[0] = (val) => userInputDate.value = val),
- onChange: handleVisibleDateChange
- }, null, 8, [
- "placeholder",
- "model-value",
- "disabled",
- "readonly"
- ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(dpNs).e("editor-wrap")) }, [createVNode(unref(ElInput), {
- placeholder: unref(t)("el.datepicker.selectTime"),
- "model-value": visibleTime.value,
- size: "small",
- "validate-event": false,
- disabled: unref(dateDisabled),
- readonly: !_ctx.editable,
- onFocus: onTimePickerInputFocus,
- onInput: _cache[1] || (_cache[1] = (val) => userInputTime.value = val),
- onChange: handleVisibleTimeChange
- }, null, 8, [
- "placeholder",
- "model-value",
- "disabled",
- "readonly"
- ]), createVNode(unref(panel_time_pick_default), {
- visible: timePickerVisible.value,
- format: timeFormat.value,
- "parsed-value": innerDate.value,
- onPick: handleTimePick
- }, null, 8, [
- "visible",
- "format",
- "parsed-value"
- ])], 2)), [[unref(ClickOutside), handleTimePickClose]])], 2)) : createCommentVNode("v-if", true),
- withDirectives(createBaseVNode("div", { class: normalizeClass([unref(dpNs).e("header"), (currentView.value === "year" || currentView.value === "month") && unref(dpNs).em("header", "bordered")]) }, [
- createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("prev-btn")) }, [createBaseVNode("button", {
- type: "button",
- "aria-label": unref(t)(`el.datepicker.prevYear`),
- class: normalizeClass(["d-arrow-left", unref(ppNs).e("icon-btn")]),
- disabled: unref(dateDisabled),
- onClick: _cache[2] || (_cache[2] = ($event) => moveByYear(false))
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_2$29), withDirectives(createBaseVNode("button", {
- type: "button",
- "aria-label": unref(t)(`el.datepicker.prevMonth`),
- class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
- disabled: unref(dateDisabled),
- onClick: _cache[3] || (_cache[3] = ($event) => moveByMonth(false))
- }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_3$14), [[vShow, currentView.value === "date"]])], 2),
- createBaseVNode("span", {
- role: "button",
- class: normalizeClass(unref(dpNs).e("header-label")),
- "aria-live": "polite",
- tabindex: _ctx.disabled ? void 0 : 0,
- "aria-disabled": _ctx.disabled,
- onKeydown: _cache[4] || (_cache[4] = withKeys(($event) => showPicker("year"), ["enter"])),
- onClick: _cache[5] || (_cache[5] = ($event) => showPicker("year"))
- }, toDisplayString(yearLabel.value), 43, _hoisted_4$11),
- withDirectives(createBaseVNode("span", {
- role: "button",
- "aria-live": "polite",
- tabindex: _ctx.disabled ? void 0 : 0,
- "aria-disabled": _ctx.disabled,
- class: normalizeClass([unref(dpNs).e("header-label"), { active: currentView.value === "month" }]),
- onKeydown: _cache[6] || (_cache[6] = withKeys(($event) => showPicker("month"), ["enter"])),
- onClick: _cache[7] || (_cache[7] = ($event) => showPicker("month"))
- }, toDisplayString(unref(t)(`el.datepicker.month${month.value + 1}`)), 43, _hoisted_5$8), [[vShow, currentView.value === "date"]]),
- createBaseVNode("span", { class: normalizeClass(unref(dpNs).e("next-btn")) }, [withDirectives(createBaseVNode("button", {
- type: "button",
- "aria-label": unref(t)(`el.datepicker.nextMonth`),
- class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
- disabled: unref(dateDisabled),
- onClick: _cache[8] || (_cache[8] = ($event) => moveByMonth(true))
- }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_6$3), [[vShow, currentView.value === "date"]]), createBaseVNode("button", {
- type: "button",
- "aria-label": unref(t)(`el.datepicker.nextYear`),
- class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
- disabled: unref(dateDisabled),
- onClick: _cache[9] || (_cache[9] = ($event) => moveByYear(true))
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_7$2)], 2)
- ], 2), [[vShow, currentView.value !== "time"]]),
- createBaseVNode("div", {
- class: normalizeClass(unref(ppNs).e("content")),
- onKeydown: handleKeydownTable
- }, [
- currentView.value === "date" ? (openBlock(), createBlock(basic_date_table_default, {
- key: 0,
- ref_key: "currentViewRef",
- ref: currentViewRef,
- "selection-mode": selectionMode.value,
- date: innerDate.value,
- "parsed-value": _ctx.parsedValue,
- "disabled-date": unref(disabledDate),
- disabled: unref(dateDisabled),
- "cell-class-name": unref(cellClassName),
- "show-week-number": _ctx.showWeekNumber,
- onPick: handleDatePick
- }, null, 8, [
- "selection-mode",
- "date",
- "parsed-value",
- "disabled-date",
- "disabled",
- "cell-class-name",
- "show-week-number"
- ])) : createCommentVNode("v-if", true),
- currentView.value === "year" ? (openBlock(), createBlock(basic_year_table_default, {
- key: 1,
- ref_key: "currentViewRef",
- ref: currentViewRef,
- "selection-mode": selectionMode.value,
- date: innerDate.value,
- "disabled-date": unref(disabledDate),
- disabled: unref(dateDisabled),
- "parsed-value": _ctx.parsedValue,
- "cell-class-name": unref(cellClassName),
- onPick: handleYearPick
- }, null, 8, [
- "selection-mode",
- "date",
- "disabled-date",
- "disabled",
- "parsed-value",
- "cell-class-name"
- ])) : createCommentVNode("v-if", true),
- currentView.value === "month" ? (openBlock(), createBlock(basic_month_table_default, {
- key: 2,
- ref_key: "currentViewRef",
- ref: currentViewRef,
- "selection-mode": selectionMode.value,
- date: innerDate.value,
- "parsed-value": _ctx.parsedValue,
- "disabled-date": unref(disabledDate),
- disabled: unref(dateDisabled),
- "cell-class-name": unref(cellClassName),
- onPick: handleMonthPick
- }, null, 8, [
- "selection-mode",
- "date",
- "parsed-value",
- "disabled-date",
- "disabled",
- "cell-class-name"
- ])) : createCommentVNode("v-if", true)
- ], 34)
- ], 2)
- ], 2), _ctx.showFooter && footerVisible.value && footerFilled.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ppNs).e("footer"))
- }, [withDirectives(createVNode(unref(ElButton), {
- text: "",
- size: "small",
- class: normalizeClass(unref(ppNs).e("link-btn")),
- disabled: disabledNow.value,
- onClick: changeToNow
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.now")), 1)]),
- _: 1
- }, 8, ["class", "disabled"]), [[vShow, !isMultipleType.value && _ctx.showNow]]), _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
- key: 0,
- plain: "",
- size: "small",
- class: normalizeClass(unref(ppNs).e("link-btn")),
- disabled: disabledConfirm.value,
- onClick: onConfirm
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)]),
- _: 1
- }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-date-range.mjs
- var panelDateRangeProps = buildProps({
- ...panelSharedProps,
- ...panelRangeSharedProps
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-shortcut.mjs
- var useShortcut = (lang) => {
- const { emit } = getCurrentInstance();
- const attrs = useAttrs$1();
- const slots = useSlots();
- const handleShortcutClick = (shortcut) => {
- const shortcutValues = isFunction$1(shortcut.value) ? shortcut.value() : shortcut.value;
- if (shortcutValues) {
- emit("pick", [(0, import_dayjs_min.default)(shortcutValues[0]).locale(lang.value), (0, import_dayjs_min.default)(shortcutValues[1]).locale(lang.value)]);
- return;
- }
- if (shortcut.onClick) shortcut.onClick({
- attrs,
- slots,
- emit
- });
- };
- return handleShortcutClick;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-range-picker.mjs
- var useRangePicker = (props, { defaultValue, defaultTime, leftDate, rightDate, step, unit, sortDates }) => {
- const { emit } = getCurrentInstance();
- const { pickerNs } = inject(ROOT_PICKER_INJECTION_KEY);
- const drpNs = useNamespace("date-range-picker");
- const { t, lang } = useLocale();
- const handleShortcutClick = useShortcut(lang);
- const minDate = ref();
- const maxDate = ref();
- const rangeState = ref({
- endDate: null,
- selecting: false
- });
- const handleChangeRange = (val) => {
- rangeState.value = val;
- };
- const handleRangeConfirm = (visible = false) => {
- const _minDate = unref(minDate);
- const _maxDate = unref(maxDate);
- if (isValidRange([_minDate, _maxDate])) emit("pick", [_minDate, _maxDate], visible);
- };
- const onSelect = (selecting) => {
- rangeState.value.selecting = selecting;
- if (!selecting) rangeState.value.endDate = null;
- };
- const parseValue = (parsedValue) => {
- if (isArray$1(parsedValue) && parsedValue.length === 2) {
- const [start, end] = parsedValue;
- minDate.value = start;
- leftDate.value = start;
- maxDate.value = end;
- sortDates(unref(minDate), unref(maxDate));
- } else restoreDefault();
- };
- const restoreDefault = () => {
- let [start, end] = getDefaultValue(unref(defaultValue), {
- lang: unref(lang),
- step,
- unit,
- unlinkPanels: props.unlinkPanels
- });
- const getShift = (day) => {
- return day.diff(day.startOf("d"), "ms");
- };
- const maybeTimes = unref(defaultTime);
- if (maybeTimes) {
- let leftShift = 0;
- let rightShift = 0;
- if (isArray$1(maybeTimes)) {
- const [timeStart, timeEnd] = maybeTimes.map(import_dayjs_min.default);
- leftShift = getShift(timeStart);
- rightShift = getShift(timeEnd);
- } else {
- const shift = getShift((0, import_dayjs_min.default)(maybeTimes));
- leftShift = shift;
- rightShift = shift;
- }
- start = start.startOf("d").add(leftShift, "ms");
- end = end.startOf("d").add(rightShift, "ms");
- }
- minDate.value = void 0;
- maxDate.value = void 0;
- leftDate.value = start;
- rightDate.value = end;
- };
- watch(defaultValue, (val) => {
- if (val) restoreDefault();
- }, { immediate: true });
- watch(() => props.parsedValue, (parsedValue) => {
- if (!parsedValue?.length || !isEqual$1(parsedValue, [minDate.value, maxDate.value])) parseValue(parsedValue);
- }, { immediate: true });
- watch(() => props.visible, () => {
- if (props.visible) parseValue(props.parsedValue);
- }, { immediate: true });
- return {
- minDate,
- maxDate,
- rangeState,
- lang,
- ppNs: pickerNs,
- drpNs,
- handleChangeRange,
- handleRangeConfirm,
- handleShortcutClick,
- onSelect,
- parseValue,
- t
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-panel-date-range.mjs
- var usePanelDateRange = (props, emit, leftDate, rightDate) => {
- const leftCurrentView = ref("date");
- const leftCurrentViewRef = ref();
- const rightCurrentView = ref("date");
- const rightCurrentViewRef = ref();
- const { disabledDate } = inject(PICKER_BASE_INJECTION_KEY).props;
- const { t, lang } = useLocale();
- const leftYear = computed(() => {
- return leftDate.value.year();
- });
- const leftMonth = computed(() => {
- return leftDate.value.month();
- });
- const rightYear = computed(() => {
- return rightDate.value.year();
- });
- const rightMonth = computed(() => {
- return rightDate.value.month();
- });
- function computedYearLabel(currentView, yearValue) {
- const yearTranslation = t("el.datepicker.year");
- if (currentView.value === "year") {
- const startYear = Math.floor(yearValue.value / 10) * 10;
- return yearTranslation ? `${startYear} ${yearTranslation} - ${startYear + 9} ${yearTranslation}` : `${startYear} - ${startYear + 9}`;
- }
- return `${yearValue.value} ${yearTranslation}`;
- }
- function focusPicker(currentViewRef) {
- currentViewRef?.focus();
- }
- async function showPicker(pickerType, view) {
- if (props.disabled) return;
- const currentView = pickerType === "left" ? leftCurrentView : rightCurrentView;
- const currentViewRef = pickerType === "left" ? leftCurrentViewRef : rightCurrentViewRef;
- currentView.value = view;
- await nextTick();
- focusPicker(currentViewRef.value);
- }
- async function handlePick(mode, pickerType, value) {
- if (props.disabled) return;
- const isLeftPicker = pickerType === "left";
- const startDate = isLeftPicker ? leftDate : rightDate;
- const endDate = isLeftPicker ? rightDate : leftDate;
- const currentView = isLeftPicker ? leftCurrentView : rightCurrentView;
- const currentViewRef = isLeftPicker ? leftCurrentViewRef : rightCurrentViewRef;
- if (mode === "year") startDate.value = getValidDateOfYear(startDate.value.year(value), lang.value, disabledDate);
- if (mode === "month") startDate.value = getValidDateOfMonth(startDate.value, startDate.value.year(), value, lang.value, disabledDate);
- if (!props.unlinkPanels) endDate.value = pickerType === "left" ? startDate.value.add(1, "month") : startDate.value.subtract(1, "month");
- currentView.value = mode === "year" ? "month" : "date";
- await nextTick();
- focusPicker(currentViewRef.value);
- handlePanelChange(mode);
- }
- function handlePanelChange(mode) {
- emit("panel-change", [leftDate.value.toDate(), rightDate.value.toDate()], mode);
- }
- function adjustDateByView(currentView, date, forward) {
- const action = forward ? "add" : "subtract";
- return currentView === "year" ? date[action](10, "year") : date[action](1, "year");
- }
- return {
- leftCurrentView,
- rightCurrentView,
- leftCurrentViewRef,
- rightCurrentViewRef,
- leftYear,
- rightYear,
- leftMonth,
- rightMonth,
- leftYearLabel: computed(() => computedYearLabel(leftCurrentView, leftYear)),
- rightYearLabel: computed(() => computedYearLabel(rightCurrentView, rightYear)),
- showLeftPicker: (view) => showPicker("left", view),
- showRightPicker: (view) => showPicker("right", view),
- handleLeftYearPick: (year) => handlePick("year", "left", year),
- handleRightYearPick: (year) => handlePick("year", "right", year),
- handleLeftMonthPick: (month) => handlePick("month", "left", month),
- handleRightMonthPick: (month) => handlePick("month", "right", month),
- handlePanelChange,
- adjustDateByView
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$46 = ["disabled", "onClick"];
- var _hoisted_2$28 = ["aria-label", "disabled"];
- var _hoisted_3$13 = ["aria-label", "disabled"];
- var _hoisted_4$10 = ["disabled", "aria-label"];
- var _hoisted_5$7 = ["disabled", "aria-label"];
- var _hoisted_6$2 = ["tabindex", "aria-disabled"];
- var _hoisted_7$1 = ["tabindex", "aria-disabled"];
- var _hoisted_8$1 = ["disabled", "aria-label"];
- var _hoisted_9$1 = ["disabled", "aria-label"];
- var _hoisted_10$1 = ["aria-label", "disabled"];
- var _hoisted_11$1 = ["disabled", "aria-label"];
- var _hoisted_12$1 = ["tabindex", "aria-disabled"];
- var _hoisted_13$1 = ["tabindex", "aria-disabled"];
- var unit$2 = "month";
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs
- var panel_date_range_default = /* @__PURE__ */ defineComponent({
- __name: "panel-date-range",
- props: panelDateRangeProps,
- emits: [
- "pick",
- "set-picker-option",
- "calendar-change",
- "panel-change",
- "clear"
- ],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
- const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
- const { disabledDate, cellClassName, defaultTime, clearable } = pickerBase.props;
- const format = toRef(pickerBase.props, "format");
- const shortcuts = toRef(pickerBase.props, "shortcuts");
- const defaultValue = toRef(pickerBase.props, "defaultValue");
- const { lang } = useLocale();
- const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
- const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(1, unit$2));
- const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue, t } = useRangePicker(props, {
- defaultValue,
- defaultTime,
- leftDate,
- rightDate,
- unit: unit$2,
- sortDates
- });
- watch(() => props.visible, (visible) => {
- if (!visible && rangeState.value.selecting) {
- parseValue(props.parsedValue);
- onSelect(false);
- }
- });
- const dateUserInput = ref({
- min: null,
- max: null
- });
- const timeUserInput = ref({
- min: null,
- max: null
- });
- const { leftCurrentView, rightCurrentView, leftCurrentViewRef, rightCurrentViewRef, leftYear, rightYear, leftMonth, rightMonth, leftYearLabel, rightYearLabel, showLeftPicker, showRightPicker, handleLeftYearPick, handleRightYearPick, handleLeftMonthPick, handleRightMonthPick, handlePanelChange, adjustDateByView } = usePanelDateRange(props, emit, leftDate, rightDate);
- const hasShortcuts = computed(() => !!shortcuts.value.length);
- const minVisibleDate = computed(() => {
- if (dateUserInput.value.min !== null) return dateUserInput.value.min;
- if (minDate.value) return minDate.value.format(dateFormat.value);
- return "";
- });
- const maxVisibleDate = computed(() => {
- if (dateUserInput.value.max !== null) return dateUserInput.value.max;
- if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(dateFormat.value);
- return "";
- });
- const minVisibleTime = computed(() => {
- if (timeUserInput.value.min !== null) return timeUserInput.value.min;
- if (minDate.value) return minDate.value.format(timeFormat.value);
- return "";
- });
- const maxVisibleTime = computed(() => {
- if (timeUserInput.value.max !== null) return timeUserInput.value.max;
- if (maxDate.value || minDate.value) return (maxDate.value || minDate.value).format(timeFormat.value);
- return "";
- });
- const timeFormat = computed(() => {
- return props.timeFormat || extractTimeFormat(format.value || "") || "HH:mm:ss";
- });
- const dateFormat = computed(() => {
- return props.dateFormat || extractDateFormat(format.value || "") || "YYYY-MM-DD";
- });
- const isValidValue = (date) => {
- return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true);
- };
- const leftPrevYear = () => {
- leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, false);
- if (!props.unlinkPanels) rightDate.value = leftDate.value.add(1, "month");
- handlePanelChange("year");
- };
- const leftPrevMonth = () => {
- leftDate.value = leftDate.value.subtract(1, "month");
- if (!props.unlinkPanels) rightDate.value = leftDate.value.add(1, "month");
- handlePanelChange("month");
- };
- const rightNextYear = () => {
- if (!props.unlinkPanels) {
- leftDate.value = adjustDateByView(rightCurrentView.value, leftDate.value, true);
- rightDate.value = leftDate.value.add(1, "month");
- } else rightDate.value = adjustDateByView(rightCurrentView.value, rightDate.value, true);
- handlePanelChange("year");
- };
- const rightNextMonth = () => {
- if (!props.unlinkPanels) {
- leftDate.value = leftDate.value.add(1, "month");
- rightDate.value = leftDate.value.add(1, "month");
- } else rightDate.value = rightDate.value.add(1, "month");
- handlePanelChange("month");
- };
- const leftNextYear = () => {
- leftDate.value = adjustDateByView(leftCurrentView.value, leftDate.value, true);
- handlePanelChange("year");
- };
- const leftNextMonth = () => {
- leftDate.value = leftDate.value.add(1, "month");
- handlePanelChange("month");
- };
- const rightPrevYear = () => {
- rightDate.value = adjustDateByView(rightCurrentView.value, rightDate.value, false);
- handlePanelChange("year");
- };
- const rightPrevMonth = () => {
- rightDate.value = rightDate.value.subtract(1, "month");
- handlePanelChange("month");
- };
- const enableMonthArrow = computed(() => {
- const nextMonth = (leftMonth.value + 1) % 12;
- const yearOffset = leftMonth.value + 1 >= 12 ? 1 : 0;
- return props.unlinkPanels && new Date(leftYear.value + yearOffset, nextMonth) < new Date(rightYear.value, rightMonth.value);
- });
- const enableYearArrow = computed(() => {
- return props.unlinkPanels && rightYear.value * 12 + rightMonth.value - (leftYear.value * 12 + leftMonth.value + 1) >= 12;
- });
- const dateRangeDisabled = useFormDisabled();
- const btnDisabled = computed(() => {
- return !(minDate.value && maxDate.value && !rangeState.value.selecting && isValidRange([minDate.value, maxDate.value]) && !dateRangeDisabled.value);
- });
- const showTime = computed(() => props.type === "datetime" || props.type === "datetimerange");
- const formatEmit = (emitDayjs, index) => {
- if (!emitDayjs) return;
- if (defaultTime) return (0, import_dayjs_min.default)(defaultTime[index] || defaultTime).locale(lang.value).year(emitDayjs.year()).month(emitDayjs.month()).date(emitDayjs.date());
- return emitDayjs;
- };
- const handleRangePick = (val, close = true) => {
- const min_ = val.minDate;
- const max_ = val.maxDate;
- const minDate_ = formatEmit(min_, 0);
- const maxDate_ = formatEmit(max_, 1);
- if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
- emit("calendar-change", [min_.toDate(), max_ && max_.toDate()]);
- maxDate.value = maxDate_;
- minDate.value = minDate_;
- if (!showTime.value && close) close = !minDate_ || !maxDate_;
- handleRangeConfirm(close);
- };
- const minTimePickerVisible = ref(false);
- const maxTimePickerVisible = ref(false);
- const handleMinTimeClose = () => {
- minTimePickerVisible.value = false;
- };
- const handleMaxTimeClose = () => {
- maxTimePickerVisible.value = false;
- };
- const handleDateInput = (value, type) => {
- dateUserInput.value[type] = value;
- const parsedValueD = (0, import_dayjs_min.default)(value, dateFormat.value).locale(lang.value);
- if (parsedValueD.isValid()) {
- if (disabledDate && disabledDate(parsedValueD.toDate())) return;
- if (type === "min") {
- leftDate.value = parsedValueD;
- minDate.value = (minDate.value || leftDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
- if (!props.unlinkPanels && (!maxDate.value || maxDate.value.isBefore(minDate.value))) {
- rightDate.value = parsedValueD.add(1, "month");
- maxDate.value = minDate.value.add(1, "month");
- }
- } else {
- rightDate.value = parsedValueD;
- maxDate.value = (maxDate.value || rightDate.value).year(parsedValueD.year()).month(parsedValueD.month()).date(parsedValueD.date());
- if (!props.unlinkPanels && (!minDate.value || minDate.value.isAfter(maxDate.value))) {
- leftDate.value = parsedValueD.subtract(1, "month");
- minDate.value = maxDate.value.subtract(1, "month");
- }
- }
- sortDates(minDate.value, maxDate.value);
- handleRangeConfirm(true);
- }
- };
- const handleDateChange = (_, type) => {
- dateUserInput.value[type] = null;
- };
- const handleTimeInput = (value, type) => {
- timeUserInput.value[type] = value;
- const parsedValueD = (0, import_dayjs_min.default)(value, timeFormat.value).locale(lang.value);
- if (parsedValueD.isValid()) if (type === "min") {
- minTimePickerVisible.value = true;
- minDate.value = (minDate.value || leftDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
- leftDate.value = minDate.value;
- } else {
- maxTimePickerVisible.value = true;
- maxDate.value = (maxDate.value || rightDate.value).hour(parsedValueD.hour()).minute(parsedValueD.minute()).second(parsedValueD.second());
- rightDate.value = maxDate.value;
- }
- };
- const handleTimeChange = (_value, type) => {
- timeUserInput.value[type] = null;
- if (type === "min") {
- leftDate.value = minDate.value;
- minTimePickerVisible.value = false;
- if (!maxDate.value || maxDate.value.isBefore(minDate.value)) maxDate.value = minDate.value;
- } else {
- rightDate.value = maxDate.value;
- maxTimePickerVisible.value = false;
- if (maxDate.value && maxDate.value.isBefore(minDate.value)) minDate.value = maxDate.value;
- }
- handleRangeConfirm(true);
- };
- const handleMinTimePick = (value, visible, first) => {
- if (timeUserInput.value.min) return;
- if (value) minDate.value = (minDate.value || leftDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
- if (!first) minTimePickerVisible.value = visible;
- if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {
- maxDate.value = minDate.value;
- rightDate.value = value;
- nextTick(() => {
- parseValue(props.parsedValue);
- });
- }
- handleRangeConfirm(true);
- };
- const handleMaxTimePick = (value, visible, first) => {
- if (timeUserInput.value.max) return;
- if (value) maxDate.value = (maxDate.value || rightDate.value).hour(value.hour()).minute(value.minute()).second(value.second());
- if (!first) maxTimePickerVisible.value = visible;
- if (maxDate.value && maxDate.value.isBefore(minDate.value)) minDate.value = maxDate.value;
- handleRangeConfirm(true);
- };
- const onClear = () => {
- handleClear();
- emit("clear");
- };
- const handleClear = () => {
- let valueOnClear = null;
- if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
- leftDate.value = getDefaultValue(unref(defaultValue), {
- lang: unref(lang),
- unit: "month",
- unlinkPanels: props.unlinkPanels
- })[0];
- rightDate.value = leftDate.value.add(1, "month");
- maxDate.value = void 0;
- minDate.value = void 0;
- handleRangeConfirm(true);
- emit("pick", valueOnClear);
- };
- const parseUserInput = (value) => {
- return correctlyParseUserInput(value, format.value || "", lang.value, isDefaultFormat);
- };
- function sortDates(minDate, maxDate) {
- if (props.unlinkPanels && maxDate) {
- const minDateYear = minDate?.year() || 0;
- const minDateMonth = minDate?.month() || 0;
- const maxDateYear = maxDate.year();
- const maxDateMonth = maxDate.month();
- rightDate.value = minDateYear === maxDateYear && minDateMonth === maxDateMonth ? maxDate.add(1, unit$2) : maxDate;
- } else {
- rightDate.value = leftDate.value.add(1, unit$2);
- if (maxDate) rightDate.value = rightDate.value.hour(maxDate.hour()).minute(maxDate.minute()).second(maxDate.second());
- }
- }
- emit("set-picker-option", ["isValidValue", isValidValue]);
- emit("set-picker-option", ["parseUserInput", parseUserInput]);
- emit("set-picker-option", ["handleClear", handleClear]);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([
- unref(ppNs).b(),
- unref(drpNs).b(),
- unref(ppNs).is("border", _ctx.border),
- unref(ppNs).is("disabled", unref(dateRangeDisabled)),
- {
- "has-sidebar": _ctx.$slots.sidebar || hasShortcuts.value,
- "has-time": showTime.value
- }
- ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
- renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
- hasShortcuts.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ppNs).e("sidebar"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(shortcuts.value, (shortcut, key) => {
- return openBlock(), createElementBlock("button", {
- key,
- type: "button",
- disabled: unref(dateRangeDisabled),
- class: normalizeClass(unref(ppNs).e("shortcut")),
- onClick: ($event) => unref(handleShortcutClick)(shortcut)
- }, toDisplayString(shortcut.text), 11, _hoisted_1$46);
- }), 128))], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [
- showTime.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(drpNs).e("time-header"))
- }, [
- createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("editors-wrap")) }, [createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
- size: "small",
- disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
- placeholder: unref(t)("el.datepicker.startDate"),
- class: normalizeClass(unref(drpNs).e("editor")),
- "model-value": minVisibleDate.value,
- "validate-event": false,
- readonly: !_ctx.editable,
- onInput: _cache[0] || (_cache[0] = (val) => handleDateInput(val, "min")),
- onChange: _cache[1] || (_cache[1] = (val) => handleDateChange(val, "min"))
- }, null, 8, [
- "disabled",
- "placeholder",
- "class",
- "model-value",
- "readonly"
- ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
- size: "small",
- class: normalizeClass(unref(drpNs).e("editor")),
- disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
- placeholder: unref(t)("el.datepicker.startTime"),
- "model-value": minVisibleTime.value,
- "validate-event": false,
- readonly: !_ctx.editable,
- onFocus: _cache[2] || (_cache[2] = ($event) => minTimePickerVisible.value = true),
- onInput: _cache[3] || (_cache[3] = (val) => handleTimeInput(val, "min")),
- onChange: _cache[4] || (_cache[4] = (val) => handleTimeChange(val, "min"))
- }, null, 8, [
- "class",
- "disabled",
- "placeholder",
- "model-value",
- "readonly"
- ]), createVNode(unref(panel_time_pick_default), {
- visible: minTimePickerVisible.value,
- format: timeFormat.value,
- "datetime-role": "start",
- "parsed-value": unref(minDate) || leftDate.value,
- onPick: handleMinTimePick
- }, null, 8, [
- "visible",
- "format",
- "parsed-value"
- ])], 2)), [[unref(ClickOutside), handleMinTimeClose]])], 2),
- createBaseVNode("span", null, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })]),
- createBaseVNode("span", { class: normalizeClass([unref(drpNs).e("editors-wrap"), "is-right"]) }, [createBaseVNode("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
- size: "small",
- class: normalizeClass(unref(drpNs).e("editor")),
- disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
- placeholder: unref(t)("el.datepicker.endDate"),
- "model-value": maxVisibleDate.value,
- readonly: !unref(minDate) || !_ctx.editable,
- "validate-event": false,
- onInput: _cache[5] || (_cache[5] = (val) => handleDateInput(val, "max")),
- onChange: _cache[6] || (_cache[6] = (val) => handleDateChange(val, "max"))
- }, null, 8, [
- "class",
- "disabled",
- "placeholder",
- "model-value",
- "readonly"
- ])], 2), withDirectives((openBlock(), createElementBlock("span", { class: normalizeClass(unref(drpNs).e("time-picker-wrap")) }, [createVNode(unref(ElInput), {
- size: "small",
- class: normalizeClass(unref(drpNs).e("editor")),
- disabled: unref(rangeState).selecting || unref(dateRangeDisabled),
- placeholder: unref(t)("el.datepicker.endTime"),
- "model-value": maxVisibleTime.value,
- readonly: !unref(minDate) || !_ctx.editable,
- "validate-event": false,
- onFocus: _cache[7] || (_cache[7] = ($event) => unref(minDate) && (maxTimePickerVisible.value = true)),
- onInput: _cache[8] || (_cache[8] = (val) => handleTimeInput(val, "max")),
- onChange: _cache[9] || (_cache[9] = (val) => handleTimeChange(val, "max"))
- }, null, 8, [
- "class",
- "disabled",
- "placeholder",
- "model-value",
- "readonly"
- ]), createVNode(unref(panel_time_pick_default), {
- "datetime-role": "end",
- visible: maxTimePickerVisible.value,
- format: timeFormat.value,
- "parsed-value": unref(maxDate) || rightDate.value,
- onPick: handleMaxTimePick
- }, null, 8, [
- "visible",
- "format",
- "parsed-value"
- ])], 2)), [[unref(ClickOutside), handleMaxTimeClose]])], 2)
- ], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"]) }, [
- createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
- createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
- "aria-label": unref(t)(`el.datepicker.prevYear`),
- disabled: unref(dateRangeDisabled),
- onClick: leftPrevYear
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_2$28),
- withDirectives(createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-left"]),
- "aria-label": unref(t)(`el.datepicker.prevMonth`),
- disabled: unref(dateRangeDisabled),
- onClick: leftPrevMonth
- }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_3$13), [[vShow, unref(leftCurrentView) === "date"]]),
- _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- disabled: !enableYearArrow.value || unref(dateRangeDisabled),
- class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled))], "d-arrow-right"]),
- "aria-label": unref(t)(`el.datepicker.nextYear`),
- onClick: leftNextYear
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_4$10)) : createCommentVNode("v-if", true),
- _ctx.unlinkPanels && unref(leftCurrentView) === "date" ? (openBlock(), createElementBlock("button", {
- key: 1,
- type: "button",
- disabled: !enableMonthArrow.value || unref(dateRangeDisabled),
- class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled))], "arrow-right"]),
- "aria-label": unref(t)(`el.datepicker.nextMonth`),
- onClick: leftNextMonth
- }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_5$7)) : createCommentVNode("v-if", true),
- createBaseVNode("div", null, [createBaseVNode("span", {
- role: "button",
- class: normalizeClass(unref(drpNs).e("header-label")),
- "aria-live": "polite",
- tabindex: _ctx.disabled ? void 0 : 0,
- "aria-disabled": _ctx.disabled,
- onKeydown: _cache[10] || (_cache[10] = withKeys(($event) => unref(showLeftPicker)("year"), ["enter"])),
- onClick: _cache[11] || (_cache[11] = ($event) => unref(showLeftPicker)("year"))
- }, toDisplayString(unref(leftYearLabel)), 43, _hoisted_6$2), withDirectives(createBaseVNode("span", {
- role: "button",
- "aria-live": "polite",
- tabindex: _ctx.disabled ? void 0 : 0,
- "aria-disabled": _ctx.disabled,
- class: normalizeClass([unref(drpNs).e("header-label"), { active: unref(leftCurrentView) === "month" }]),
- onKeydown: _cache[12] || (_cache[12] = withKeys(($event) => unref(showLeftPicker)("month"), ["enter"])),
- onClick: _cache[13] || (_cache[13] = ($event) => unref(showLeftPicker)("month"))
- }, toDisplayString(unref(t)(`el.datepicker.month${leftDate.value.month() + 1}`)), 43, _hoisted_7$1), [[vShow, unref(leftCurrentView) === "date"]])])
- ], 2),
- unref(leftCurrentView) === "date" ? (openBlock(), createBlock(basic_date_table_default, {
- key: 0,
- ref_key: "leftCurrentViewRef",
- ref: leftCurrentViewRef,
- "selection-mode": "range",
- date: leftDate.value,
- "min-date": unref(minDate),
- "max-date": unref(maxDate),
- "range-state": unref(rangeState),
- "disabled-date": unref(disabledDate),
- "cell-class-name": unref(cellClassName),
- "show-week-number": _ctx.showWeekNumber,
- disabled: unref(dateRangeDisabled),
- onChangerange: unref(handleChangeRange),
- onPick: handleRangePick,
- onSelect: unref(onSelect)
- }, null, 8, [
- "date",
- "min-date",
- "max-date",
- "range-state",
- "disabled-date",
- "cell-class-name",
- "show-week-number",
- "disabled",
- "onChangerange",
- "onSelect"
- ])) : createCommentVNode("v-if", true),
- unref(leftCurrentView) === "year" ? (openBlock(), createBlock(basic_year_table_default, {
- key: 1,
- ref_key: "leftCurrentViewRef",
- ref: leftCurrentViewRef,
- "selection-mode": "year",
- date: leftDate.value,
- "disabled-date": unref(disabledDate),
- "parsed-value": _ctx.parsedValue,
- disabled: unref(dateRangeDisabled),
- onPick: unref(handleLeftYearPick)
- }, null, 8, [
- "date",
- "disabled-date",
- "parsed-value",
- "disabled",
- "onPick"
- ])) : createCommentVNode("v-if", true),
- unref(leftCurrentView) === "month" ? (openBlock(), createBlock(basic_month_table_default, {
- key: 2,
- ref_key: "leftCurrentViewRef",
- ref: leftCurrentViewRef,
- "selection-mode": "month",
- date: leftDate.value,
- "parsed-value": _ctx.parsedValue,
- "disabled-date": unref(disabledDate),
- disabled: unref(dateRangeDisabled),
- onPick: unref(handleLeftMonthPick)
- }, null, 8, [
- "date",
- "parsed-value",
- "disabled-date",
- "disabled",
- "onPick"
- ])) : createCommentVNode("v-if", true)
- ], 2),
- createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"]) }, [
- createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
- _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- disabled: !enableYearArrow.value || unref(dateRangeDisabled),
- class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(dateRangeDisabled))], "d-arrow-left"]),
- "aria-label": unref(t)(`el.datepicker.prevYear`),
- onClick: rightPrevYear
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_8$1)) : createCommentVNode("v-if", true),
- _ctx.unlinkPanels && unref(rightCurrentView) === "date" ? (openBlock(), createElementBlock("button", {
- key: 1,
- type: "button",
- disabled: !enableMonthArrow.value || unref(dateRangeDisabled),
- class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableMonthArrow.value || unref(dateRangeDisabled))], "arrow-left"]),
- "aria-label": unref(t)(`el.datepicker.prevMonth`),
- onClick: rightPrevMonth
- }, [renderSlot(_ctx.$slots, "prev-month", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_9$1)) : createCommentVNode("v-if", true),
- createBaseVNode("button", {
- type: "button",
- "aria-label": unref(t)(`el.datepicker.nextYear`),
- class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
- disabled: unref(dateRangeDisabled),
- onClick: rightNextYear
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_10$1),
- withDirectives(createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ppNs).e("icon-btn"), "arrow-right"]),
- disabled: unref(dateRangeDisabled),
- "aria-label": unref(t)(`el.datepicker.nextMonth`),
- onClick: rightNextMonth
- }, [renderSlot(_ctx.$slots, "next-month", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_11$1), [[vShow, unref(rightCurrentView) === "date"]]),
- createBaseVNode("div", null, [createBaseVNode("span", {
- role: "button",
- class: normalizeClass(unref(drpNs).e("header-label")),
- "aria-live": "polite",
- tabindex: _ctx.disabled ? void 0 : 0,
- "aria-disabled": _ctx.disabled,
- onKeydown: _cache[14] || (_cache[14] = withKeys(($event) => unref(showRightPicker)("year"), ["enter"])),
- onClick: _cache[15] || (_cache[15] = ($event) => unref(showRightPicker)("year"))
- }, toDisplayString(unref(rightYearLabel)), 43, _hoisted_12$1), withDirectives(createBaseVNode("span", {
- role: "button",
- "aria-live": "polite",
- tabindex: _ctx.disabled ? void 0 : 0,
- "aria-disabled": _ctx.disabled,
- class: normalizeClass([unref(drpNs).e("header-label"), { active: unref(rightCurrentView) === "month" }]),
- onKeydown: _cache[16] || (_cache[16] = withKeys(($event) => unref(showRightPicker)("month"), ["enter"])),
- onClick: _cache[17] || (_cache[17] = ($event) => unref(showRightPicker)("month"))
- }, toDisplayString(unref(t)(`el.datepicker.month${rightDate.value.month() + 1}`)), 43, _hoisted_13$1), [[vShow, unref(rightCurrentView) === "date"]])])
- ], 2),
- unref(rightCurrentView) === "date" ? (openBlock(), createBlock(basic_date_table_default, {
- key: 0,
- ref_key: "rightCurrentViewRef",
- ref: rightCurrentViewRef,
- "selection-mode": "range",
- date: rightDate.value,
- "min-date": unref(minDate),
- "max-date": unref(maxDate),
- "range-state": unref(rangeState),
- "disabled-date": unref(disabledDate),
- "cell-class-name": unref(cellClassName),
- "show-week-number": _ctx.showWeekNumber,
- disabled: unref(dateRangeDisabled),
- onChangerange: unref(handleChangeRange),
- onPick: handleRangePick,
- onSelect: unref(onSelect)
- }, null, 8, [
- "date",
- "min-date",
- "max-date",
- "range-state",
- "disabled-date",
- "cell-class-name",
- "show-week-number",
- "disabled",
- "onChangerange",
- "onSelect"
- ])) : createCommentVNode("v-if", true),
- unref(rightCurrentView) === "year" ? (openBlock(), createBlock(basic_year_table_default, {
- key: 1,
- ref_key: "rightCurrentViewRef",
- ref: rightCurrentViewRef,
- "selection-mode": "year",
- date: rightDate.value,
- "disabled-date": unref(disabledDate),
- "parsed-value": _ctx.parsedValue,
- disabled: unref(dateRangeDisabled),
- onPick: unref(handleRightYearPick)
- }, null, 8, [
- "date",
- "disabled-date",
- "parsed-value",
- "disabled",
- "onPick"
- ])) : createCommentVNode("v-if", true),
- unref(rightCurrentView) === "month" ? (openBlock(), createBlock(basic_month_table_default, {
- key: 2,
- ref_key: "rightCurrentViewRef",
- ref: rightCurrentViewRef,
- "selection-mode": "month",
- date: rightDate.value,
- "parsed-value": _ctx.parsedValue,
- "disabled-date": unref(disabledDate),
- disabled: unref(dateRangeDisabled),
- onPick: unref(handleRightMonthPick)
- }, null, 8, [
- "date",
- "parsed-value",
- "disabled-date",
- "disabled",
- "onPick"
- ])) : createCommentVNode("v-if", true)
- ], 2)
- ], 2)
- ], 2), _ctx.showFooter && showTime.value && (_ctx.showConfirm || unref(clearable)) ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ppNs).e("footer"))
- }, [unref(clearable) ? (openBlock(), createBlock(unref(ElButton), {
- key: 0,
- text: "",
- size: "small",
- class: normalizeClass(unref(ppNs).e("link-btn")),
- onClick: onClear
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.clear")), 1)]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
- key: 1,
- plain: "",
- size: "small",
- class: normalizeClass(unref(ppNs).e("link-btn")),
- disabled: btnDisabled.value,
- onClick: _cache[18] || (_cache[18] = ($event) => unref(handleRangeConfirm)(false))
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("el.datepicker.confirm")), 1)]),
- _: 1
- }, 8, ["class", "disabled"])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-month-range.mjs
- var panelMonthRangeProps = buildProps({ ...panelRangeSharedProps });
- var panelMonthRangeEmits = [
- "pick",
- "set-picker-option",
- "calendar-change"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-month-range-header.mjs
- var useMonthRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
- const { t } = useLocale();
- const leftPrevYear = () => {
- leftDate.value = leftDate.value.subtract(1, "year");
- if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(1, "year");
- };
- const rightNextYear = () => {
- if (!unlinkPanels.value) leftDate.value = leftDate.value.add(1, "year");
- rightDate.value = rightDate.value.add(1, "year");
- };
- const leftNextYear = () => {
- leftDate.value = leftDate.value.add(1, "year");
- };
- const rightPrevYear = () => {
- rightDate.value = rightDate.value.subtract(1, "year");
- };
- return {
- leftPrevYear,
- rightNextYear,
- leftNextYear,
- rightPrevYear,
- leftLabel: computed(() => {
- return `${leftDate.value.year()} ${t("el.datepicker.year")}`;
- }),
- rightLabel: computed(() => {
- return `${rightDate.value.year()} ${t("el.datepicker.year")}`;
- }),
- leftYear: computed(() => {
- return leftDate.value.year();
- }),
- rightYear: computed(() => {
- return rightDate.value.year() === leftDate.value.year() ? leftDate.value.year() + 1 : rightDate.value.year();
- })
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$45 = ["disabled", "onClick"];
- var _hoisted_2$27 = ["disabled"];
- var _hoisted_3$12 = ["disabled"];
- var _hoisted_4$9 = ["disabled"];
- var _hoisted_5$6 = ["disabled"];
- var unit$1 = "year";
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-month-range.mjs
- var panel_month_range_default = /* @__PURE__ */ defineComponent({
- name: "DatePickerMonthRange",
- __name: "panel-month-range",
- props: panelMonthRangeProps,
- emits: panelMonthRangeEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { lang } = useLocale();
- const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
- const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
- const { shortcuts, disabledDate, cellClassName } = pickerBase.props;
- const format = toRef(pickerBase.props, "format");
- const defaultValue = toRef(pickerBase.props, "defaultValue");
- const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
- const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(1, unit$1));
- const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue } = useRangePicker(props, {
- defaultValue,
- leftDate,
- rightDate,
- unit: unit$1,
- sortDates
- });
- const hasShortcuts = computed(() => !!shortcuts.length);
- const { leftPrevYear, rightNextYear, leftNextYear, rightPrevYear, leftLabel, rightLabel, leftYear, rightYear } = useMonthRangeHeader({
- unlinkPanels: toRef(props, "unlinkPanels"),
- leftDate,
- rightDate
- });
- const enableYearArrow = computed(() => {
- return props.unlinkPanels && rightYear.value > leftYear.value + 1;
- });
- const handleRangePick = (val, close = true) => {
- const minDate_ = val.minDate;
- const maxDate_ = val.maxDate;
- if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
- emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]);
- maxDate.value = maxDate_;
- minDate.value = minDate_;
- if (!close) return;
- handleRangeConfirm();
- };
- const handleClear = () => {
- let valueOnClear = null;
- if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
- leftDate.value = getDefaultValue(unref(defaultValue), {
- lang: unref(lang),
- unit: "year",
- unlinkPanels: props.unlinkPanels
- })[0];
- rightDate.value = leftDate.value.add(1, "year");
- emit("pick", valueOnClear);
- };
- const parseUserInput = (value) => {
- return correctlyParseUserInput(value, format.value, lang.value, isDefaultFormat);
- };
- function sortDates(minDate, maxDate) {
- if (props.unlinkPanels && maxDate) rightDate.value = (minDate?.year() || 0) === maxDate.year() ? maxDate.add(1, unit$1) : maxDate;
- else rightDate.value = leftDate.value.add(1, unit$1);
- }
- const monthRangeDisabled = useFormDisabled();
- watch(() => props.visible, (visible) => {
- if (!visible && rangeState.value.selecting) {
- parseValue(props.parsedValue);
- onSelect(false);
- }
- });
- emit("set-picker-option", ["isValidValue", isValidRange]);
- emit("set-picker-option", ["parseUserInput", parseUserInput]);
- emit("set-picker-option", ["handleClear", handleClear]);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([
- unref(ppNs).b(),
- unref(drpNs).b(),
- unref(ppNs).is("border", _ctx.border),
- unref(ppNs).is("disabled", unref(monthRangeDisabled)),
- { "has-sidebar": Boolean(_ctx.$slots.sidebar) || hasShortcuts.value }
- ]) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
- renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
- hasShortcuts.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ppNs).e("sidebar"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
- return openBlock(), createElementBlock("button", {
- key,
- type: "button",
- class: normalizeClass(unref(ppNs).e("shortcut")),
- disabled: unref(monthRangeDisabled),
- onClick: ($event) => unref(handleShortcutClick)(shortcut)
- }, toDisplayString(shortcut.text), 11, _hoisted_1$45);
- }), 128))], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-left"]) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
- createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-left"]),
- disabled: unref(monthRangeDisabled),
- onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_2$27),
- _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- disabled: !enableYearArrow.value || unref(monthRangeDisabled),
- class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled))], "d-arrow-right"]),
- onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_3$12)) : createCommentVNode("v-if", true),
- createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
- ], 2), createVNode(basic_month_table_default, {
- "selection-mode": "range",
- date: leftDate.value,
- "min-date": unref(minDate),
- "max-date": unref(maxDate),
- "range-state": unref(rangeState),
- "disabled-date": unref(disabledDate),
- disabled: unref(monthRangeDisabled),
- "cell-class-name": unref(cellClassName),
- onChangerange: unref(handleChangeRange),
- onPick: handleRangePick,
- onSelect: unref(onSelect)
- }, null, 8, [
- "date",
- "min-date",
- "max-date",
- "range-state",
- "disabled-date",
- "disabled",
- "cell-class-name",
- "onChangerange",
- "onSelect"
- ])], 2), createBaseVNode("div", { class: normalizeClass([[unref(ppNs).e("content"), unref(drpNs).e("content")], "is-right"]) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
- _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- disabled: !enableYearArrow.value || unref(monthRangeDisabled),
- class: normalizeClass([[unref(ppNs).e("icon-btn"), unref(ppNs).is("disabled", !enableYearArrow.value || unref(monthRangeDisabled))], "d-arrow-left"]),
- onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_4$9)) : createCommentVNode("v-if", true),
- createBaseVNode("button", {
- type: "button",
- class: normalizeClass([unref(ppNs).e("icon-btn"), "d-arrow-right"]),
- disabled: unref(monthRangeDisabled),
- onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_5$6),
- createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
- ], 2), createVNode(basic_month_table_default, {
- "selection-mode": "range",
- date: rightDate.value,
- "min-date": unref(minDate),
- "max-date": unref(maxDate),
- "range-state": unref(rangeState),
- "disabled-date": unref(disabledDate),
- disabled: unref(monthRangeDisabled),
- "cell-class-name": unref(cellClassName),
- onChangerange: unref(handleChangeRange),
- onPick: handleRangePick,
- onSelect: unref(onSelect)
- }, null, 8, [
- "date",
- "min-date",
- "max-date",
- "range-state",
- "disabled-date",
- "disabled",
- "cell-class-name",
- "onChangerange",
- "onSelect"
- ])], 2)], 2)
- ], 2)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/props/panel-year-range.mjs
- var panelYearRangeProps = buildProps({ ...panelRangeSharedProps });
- var panelYearRangeEmits = [
- "pick",
- "set-picker-option",
- "calendar-change"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/composables/use-year-range-header.mjs
- var useYearRangeHeader = ({ unlinkPanels, leftDate, rightDate }) => {
- const leftPrevYear = () => {
- leftDate.value = leftDate.value.subtract(10, "year");
- if (!unlinkPanels.value) rightDate.value = rightDate.value.subtract(10, "year");
- };
- const rightNextYear = () => {
- if (!unlinkPanels.value) leftDate.value = leftDate.value.add(10, "year");
- rightDate.value = rightDate.value.add(10, "year");
- };
- const leftNextYear = () => {
- leftDate.value = leftDate.value.add(10, "year");
- };
- const rightPrevYear = () => {
- rightDate.value = rightDate.value.subtract(10, "year");
- };
- return {
- leftPrevYear,
- rightNextYear,
- leftNextYear,
- rightPrevYear,
- leftLabel: computed(() => {
- const leftStartDate = Math.floor(leftDate.value.year() / 10) * 10;
- return `${leftStartDate}-${leftStartDate + 9}`;
- }),
- rightLabel: computed(() => {
- const rightStartDate = Math.floor(rightDate.value.year() / 10) * 10;
- return `${rightStartDate}-${rightStartDate + 9}`;
- }),
- leftYear: computed(() => {
- return Math.floor(leftDate.value.year() / 10) * 10 + 9;
- }),
- rightYear: computed(() => {
- return Math.floor(rightDate.value.year() / 10) * 10;
- })
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$44 = ["disabled", "onClick"];
- var _hoisted_2$26 = ["disabled"];
- var _hoisted_3$11 = ["disabled"];
- var _hoisted_4$8 = ["disabled"];
- var _hoisted_5$5 = ["disabled"];
- var step = 10;
- var unit = "year";
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-com/panel-year-range.mjs
- var panel_year_range_default = /* @__PURE__ */ defineComponent({
- name: "DatePickerYearRange",
- __name: "panel-year-range",
- props: panelYearRangeProps,
- emits: panelYearRangeEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { lang } = useLocale();
- const leftDate = ref((0, import_dayjs_min.default)().locale(lang.value));
- const rightDate = ref((0, import_dayjs_min.default)().locale(lang.value).add(step, unit));
- const isDefaultFormat = inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, void 0);
- const pickerBase = inject(PICKER_BASE_INJECTION_KEY);
- const { shortcuts, disabledDate, cellClassName } = pickerBase.props;
- const format = toRef(pickerBase.props, "format");
- const defaultValue = toRef(pickerBase.props, "defaultValue");
- const { minDate, maxDate, rangeState, ppNs, drpNs, handleChangeRange, handleRangeConfirm, handleShortcutClick, onSelect, parseValue } = useRangePicker(props, {
- defaultValue,
- leftDate,
- rightDate,
- step,
- unit,
- sortDates
- });
- const { leftPrevYear, rightNextYear, leftNextYear, rightPrevYear, leftLabel, rightLabel, leftYear, rightYear } = useYearRangeHeader({
- unlinkPanels: toRef(props, "unlinkPanels"),
- leftDate,
- rightDate
- });
- const yearRangeDisabled = useFormDisabled();
- const hasShortcuts = computed(() => !!shortcuts.length);
- const panelKls = computed(() => [
- ppNs.b(),
- drpNs.b(),
- ppNs.is("border", props.border),
- ppNs.is("disabled", yearRangeDisabled.value),
- { "has-sidebar": Boolean(useSlots().sidebar) || hasShortcuts.value }
- ]);
- const leftPanelKls = computed(() => {
- return {
- content: [
- ppNs.e("content"),
- drpNs.e("content"),
- "is-left"
- ],
- arrowLeftBtn: [ppNs.e("icon-btn"), "d-arrow-left"],
- arrowRightBtn: [
- ppNs.e("icon-btn"),
- ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value),
- "d-arrow-right"
- ]
- };
- });
- const rightPanelKls = computed(() => {
- return {
- content: [
- ppNs.e("content"),
- drpNs.e("content"),
- "is-right"
- ],
- arrowLeftBtn: [
- ppNs.e("icon-btn"),
- ppNs.is("disabled", !enableYearArrow.value || yearRangeDisabled.value),
- "d-arrow-left"
- ],
- arrowRightBtn: [ppNs.e("icon-btn"), "d-arrow-right"]
- };
- });
- const enableYearArrow = computed(() => {
- return props.unlinkPanels && rightYear.value > leftYear.value + 1;
- });
- const handleRangePick = (val, close = true) => {
- const minDate_ = val.minDate;
- const maxDate_ = val.maxDate;
- if (maxDate.value === maxDate_ && minDate.value === minDate_) return;
- emit("calendar-change", [minDate_.toDate(), maxDate_ && maxDate_.toDate()]);
- maxDate.value = maxDate_;
- minDate.value = minDate_;
- if (!close) return;
- handleRangeConfirm();
- };
- const parseUserInput = (value) => {
- return correctlyParseUserInput(value, format.value, lang.value, isDefaultFormat);
- };
- const isValidValue = (date) => {
- return isValidRange(date) && (disabledDate ? !disabledDate(date[0].toDate()) && !disabledDate(date[1].toDate()) : true);
- };
- const handleClear = () => {
- let valueOnClear = null;
- if (pickerBase?.emptyValues) valueOnClear = pickerBase.emptyValues.valueOnClear.value;
- const defaultArr = getDefaultValue(unref(defaultValue), {
- lang: unref(lang),
- step,
- unit,
- unlinkPanels: props.unlinkPanels
- });
- leftDate.value = defaultArr[0];
- rightDate.value = defaultArr[1];
- emit("pick", valueOnClear);
- };
- function sortDates(minDate, maxDate) {
- if (props.unlinkPanels && maxDate) {
- const minDateYear = minDate?.year() || 0;
- const maxDateYear = maxDate.year();
- rightDate.value = minDateYear + step > maxDateYear ? maxDate.add(step, unit) : maxDate;
- } else rightDate.value = leftDate.value.add(step, unit);
- }
- watch(() => props.visible, (visible) => {
- if (!visible && rangeState.value.selecting) {
- parseValue(props.parsedValue);
- onSelect(false);
- }
- });
- emit("set-picker-option", ["isValidValue", isValidValue]);
- emit("set-picker-option", ["parseUserInput", parseUserInput]);
- emit("set-picker-option", ["handleClear", handleClear]);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(panelKls.value) }, [createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body-wrapper")) }, [
- renderSlot(_ctx.$slots, "sidebar", { class: normalizeClass(unref(ppNs).e("sidebar")) }),
- hasShortcuts.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ppNs).e("sidebar"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(shortcuts), (shortcut, key) => {
- return openBlock(), createElementBlock("button", {
- key,
- type: "button",
- class: normalizeClass(unref(ppNs).e("shortcut")),
- disabled: unref(yearRangeDisabled),
- onClick: ($event) => unref(handleShortcutClick)(shortcut)
- }, toDisplayString(shortcut.text), 11, _hoisted_1$44);
- }), 128))], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ppNs).e("body")) }, [createBaseVNode("div", { class: normalizeClass(leftPanelKls.value.content) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
- createBaseVNode("button", {
- type: "button",
- class: normalizeClass(leftPanelKls.value.arrowLeftBtn),
- disabled: unref(yearRangeDisabled),
- onClick: _cache[0] || (_cache[0] = (...args) => unref(leftPrevYear) && unref(leftPrevYear)(...args))
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_2$26),
- _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- disabled: !enableYearArrow.value || unref(yearRangeDisabled),
- class: normalizeClass(leftPanelKls.value.arrowRightBtn),
- onClick: _cache[1] || (_cache[1] = (...args) => unref(leftNextYear) && unref(leftNextYear)(...args))
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_3$11)) : createCommentVNode("v-if", true),
- createBaseVNode("div", null, toDisplayString(unref(leftLabel)), 1)
- ], 2), createVNode(basic_year_table_default, {
- "selection-mode": "range",
- date: leftDate.value,
- "min-date": unref(minDate),
- "max-date": unref(maxDate),
- "range-state": unref(rangeState),
- "disabled-date": unref(disabledDate),
- disabled: unref(yearRangeDisabled),
- "cell-class-name": unref(cellClassName),
- onChangerange: unref(handleChangeRange),
- onPick: handleRangePick,
- onSelect: unref(onSelect)
- }, null, 8, [
- "date",
- "min-date",
- "max-date",
- "range-state",
- "disabled-date",
- "disabled",
- "cell-class-name",
- "onChangerange",
- "onSelect"
- ])], 2), createBaseVNode("div", { class: normalizeClass(rightPanelKls.value.content) }, [createBaseVNode("div", { class: normalizeClass(unref(drpNs).e("header")) }, [
- _ctx.unlinkPanels ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- disabled: !enableYearArrow.value || unref(yearRangeDisabled),
- class: normalizeClass(rightPanelKls.value.arrowLeftBtn),
- onClick: _cache[2] || (_cache[2] = (...args) => unref(rightPrevYear) && unref(rightPrevYear)(...args))
- }, [renderSlot(_ctx.$slots, "prev-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_left_default))]),
- _: 1
- })])], 10, _hoisted_4$8)) : createCommentVNode("v-if", true),
- createBaseVNode("button", {
- type: "button",
- class: normalizeClass(rightPanelKls.value.arrowRightBtn),
- disabled: unref(yearRangeDisabled),
- onClick: _cache[3] || (_cache[3] = (...args) => unref(rightNextYear) && unref(rightNextYear)(...args))
- }, [renderSlot(_ctx.$slots, "next-year", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(d_arrow_right_default))]),
- _: 1
- })])], 10, _hoisted_5$5),
- createBaseVNode("div", null, toDisplayString(unref(rightLabel)), 1)
- ], 2), createVNode(basic_year_table_default, {
- "selection-mode": "range",
- date: rightDate.value,
- "min-date": unref(minDate),
- "max-date": unref(maxDate),
- "range-state": unref(rangeState),
- "disabled-date": unref(disabledDate),
- disabled: unref(yearRangeDisabled),
- "cell-class-name": unref(cellClassName),
- onChangerange: unref(handleChangeRange),
- onPick: handleRangePick,
- onSelect: unref(onSelect)
- }, null, 8, [
- "date",
- "min-date",
- "max-date",
- "range-state",
- "disabled-date",
- "disabled",
- "cell-class-name",
- "onChangerange",
- "onSelect"
- ])], 2)], 2)
- ], 2)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/panel-utils.mjs
- var getPanel = function(type) {
- switch (type) {
- case "daterange":
- case "datetimerange": return panel_date_range_default;
- case "monthrange": return panel_month_range_default;
- case "yearrange": return panel_year_range_default;
- default: return panel_date_pick_default;
- }
- };
- //#endregion
- //#region node_modules/dayjs/plugin/advancedFormat.js
- var require_advancedFormat = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, t) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t();
- })(exports, (function() {
- "use strict";
- return function(e, t) {
- var r = t.prototype, n = r.format;
- r.format = function(e) {
- var t = this, r = this.$locale();
- if (!this.isValid()) return n.bind(this)(e);
- var s = this.$utils(), a = (e || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, (function(e) {
- switch (e) {
- case "Q": return Math.ceil((t.$M + 1) / 3);
- case "Do": return r.ordinal(t.$D);
- case "gggg": return t.weekYear();
- case "GGGG": return t.isoWeekYear();
- case "wo": return r.ordinal(t.week(), "W");
- case "w":
- case "ww": return s.s(t.week(), "w" === e ? 1 : 2, "0");
- case "W":
- case "WW": return s.s(t.isoWeek(), "W" === e ? 1 : 2, "0");
- case "k":
- case "kk": return s.s(String(0 === t.$H ? 24 : t.$H), "k" === e ? 1 : 2, "0");
- case "X": return Math.floor(t.$d.getTime() / 1e3);
- case "x": return t.$d.getTime();
- case "z": return "[" + t.offsetName() + "]";
- case "zzz": return "[" + t.offsetName("long") + "]";
- default: return e;
- }
- }));
- return n.bind(this)(a);
- };
- };
- }));
- }));
- //#endregion
- //#region node_modules/dayjs/plugin/weekOfYear.js
- var require_weekOfYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, t) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t();
- })(exports, (function() {
- "use strict";
- var e = "week", t = "year";
- return function(i, n, r) {
- var f = n.prototype;
- f.week = function(i) {
- if (void 0 === i && (i = null), null !== i) return this.add(7 * (i - this.week()), "day");
- var n = this.$locale().yearStart || 1;
- if (11 === this.month() && this.date() > 25) {
- var f = r(this).startOf(t).add(1, t).date(n), s = r(this).endOf(e);
- if (f.isBefore(s)) return 1;
- }
- var a = r(this).startOf(t).date(n).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, !0);
- return o < 0 ? r(this).startOf("week").week() : Math.ceil(o);
- }, f.weeks = function(e) {
- return void 0 === e && (e = null), this.week(e);
- };
- };
- }));
- }));
- //#endregion
- //#region node_modules/dayjs/plugin/weekYear.js
- var require_weekYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, t) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t();
- })(exports, (function() {
- "use strict";
- return function(e, t) {
- t.prototype.weekYear = function() {
- var e = this.month(), t = this.week(), n = this.year();
- return 1 === t && 11 === e ? n + 1 : 0 === e && t >= 52 ? n - 1 : n;
- };
- };
- }));
- }));
- //#endregion
- //#region node_modules/dayjs/plugin/dayOfYear.js
- var require_dayOfYear = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, t) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_dayOfYear = t();
- })(exports, (function() {
- "use strict";
- return function(e, t, n) {
- t.prototype.dayOfYear = function(e) {
- var t = Math.round((n(this).startOf("day") - n(this).startOf("year")) / 864e5) + 1;
- return null == e ? t : this.add(e - t, "day");
- };
- };
- }));
- }));
- //#endregion
- //#region node_modules/dayjs/plugin/isSameOrAfter.js
- var require_isSameOrAfter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, t) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t();
- })(exports, (function() {
- "use strict";
- return function(e, t) {
- t.prototype.isSameOrAfter = function(e, t) {
- return this.isSame(e, t) || this.isAfter(e, t);
- };
- };
- }));
- }));
- //#endregion
- //#region node_modules/dayjs/plugin/isSameOrBefore.js
- var require_isSameOrBefore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
- (function(e, i) {
- "object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i();
- })(exports, (function() {
- "use strict";
- return function(e, i) {
- i.prototype.isSameOrBefore = function(e, i) {
- return this.isSame(e, i) || this.isBefore(e, i);
- };
- };
- }));
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/src/date-picker-panel.mjs
- var import_advancedFormat = /* @__PURE__ */ __toESM(require_advancedFormat(), 1);
- var import_weekOfYear = /* @__PURE__ */ __toESM(require_weekOfYear(), 1);
- var import_weekYear = /* @__PURE__ */ __toESM(require_weekYear(), 1);
- var import_dayOfYear = /* @__PURE__ */ __toESM(require_dayOfYear(), 1);
- var import_isSameOrAfter = /* @__PURE__ */ __toESM(require_isSameOrAfter(), 1);
- var import_isSameOrBefore = /* @__PURE__ */ __toESM(require_isSameOrBefore(), 1);
- function _isSlot$7(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- import_dayjs_min.default.extend(import_localeData.default);
- import_dayjs_min.default.extend(import_advancedFormat.default);
- import_dayjs_min.default.extend(import_customParseFormat.default);
- import_dayjs_min.default.extend(import_weekOfYear.default);
- import_dayjs_min.default.extend(import_weekYear.default);
- import_dayjs_min.default.extend(import_dayOfYear.default);
- import_dayjs_min.default.extend(import_isSameOrAfter.default);
- import_dayjs_min.default.extend(import_isSameOrBefore.default);
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker-panel/index.mjs
- var ElDatePickerPanel = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElDatePickerPanel",
- install: null,
- inheritAttrs: false,
- props: datePickerPanelProps,
- emits: [
- UPDATE_MODEL_EVENT,
- "calendar-change",
- "panel-change",
- "visible-change",
- "clear"
- ],
- setup(props, { slots, emit, attrs }) {
- const ns = useNamespace("picker-panel");
- if (isUndefined(inject("EP_PICKER_BASE", void 0))) provide(PICKER_BASE_INJECTION_KEY, { props: reactive({ ...toRefs(props) }) });
- provide(ROOT_PICKER_INJECTION_KEY, {
- slots,
- pickerNs: ns
- });
- const { parsedValue, onCalendarChange, onPanelChange, onSetPickerOption, onPick } = inject(ROOT_COMMON_PICKER_INJECTION_KEY, () => useCommonPicker(props, emit), true);
- return () => {
- return createVNode(getPanel(props.type), mergeProps(omit(attrs, "onPick"), props, {
- "parsedValue": parsedValue.value,
- "onSet-picker-option": onSetPickerOption,
- "onCalendar-change": onCalendarChange,
- "onPanel-change": onPanelChange,
- "onClear": () => emit("clear"),
- "onPick": onPick
- }), _isSlot$7(slots) ? slots : { default: () => [slots] });
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker/src/props.mjs
- var datePickerProps = buildProps({
- ...timePickerDefaultProps,
- type: {
- type: definePropType(String),
- default: "date"
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker/src/date-picker.mjs
- function _isSlot$6(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- //#endregion
- //#region node_modules/element-plus/es/components/date-picker/index.mjs
- var ElDatePicker = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElDatePicker",
- install: null,
- props: datePickerProps,
- emits: [UPDATE_MODEL_EVENT],
- setup(props, { expose, emit, slots }) {
- provide(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, computed(() => {
- return !props.format;
- }));
- provide(PICKER_POPPER_OPTIONS_INJECTION_KEY, reactive(toRef(props, "popperOptions")));
- const commonPicker = ref();
- expose({
- focus: () => {
- commonPicker.value?.focus();
- },
- blur: () => {
- commonPicker.value?.blur();
- },
- handleOpen: () => {
- commonPicker.value?.handleOpen();
- },
- handleClose: () => {
- commonPicker.value?.handleClose();
- }
- });
- const onModelValueUpdated = (val) => {
- emit(UPDATE_MODEL_EVENT, val);
- };
- return () => {
- const format = props.format ?? (DEFAULT_FORMATS_DATEPICKER[props.type] || "YYYY-MM-DD");
- return createVNode(picker_default, mergeProps(props, {
- "format": format,
- "type": props.type,
- "ref": commonPicker,
- "onUpdate:modelValue": onModelValueUpdated
- }), {
- default: (scopedProps) => createVNode(ElDatePickerPanel, mergeProps({
- "disabled": props.disabled,
- "editable": props.editable,
- "border": false
- }, scopedProps), _isSlot$6(slots) ? slots : { default: () => [slots] }),
- "range-separator": slots["range-separator"]
- });
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/description.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `DescriptionProps` instead.
- */
- var descriptionProps = buildProps({
- border: Boolean,
- column: {
- type: Number,
- default: 3
- },
- direction: {
- type: String,
- values: ["horizontal", "vertical"],
- default: "horizontal"
- },
- size: useSizeProp,
- title: {
- type: String,
- default: ""
- },
- extra: {
- type: String,
- default: ""
- },
- labelWidth: { type: [String, Number] }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/constants.mjs
- var COMPONENT_NAME$10 = "ElDescriptionsItem";
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/description-item.mjs
- var descriptionItemProps = buildProps({
- label: {
- type: String,
- default: ""
- },
- span: {
- type: Number,
- default: 1
- },
- rowspan: {
- type: Number,
- default: 1
- },
- width: {
- type: [String, Number],
- default: ""
- },
- minWidth: {
- type: [String, Number],
- default: ""
- },
- labelWidth: { type: [String, Number] },
- align: {
- type: String,
- values: columnAlignment,
- default: "left"
- },
- labelAlign: {
- type: String,
- values: columnAlignment
- },
- className: {
- type: String,
- default: ""
- },
- labelClassName: {
- type: String,
- default: ""
- }
- });
- var DescriptionItem = defineComponent({
- name: COMPONENT_NAME$10,
- props: descriptionItemProps
- });
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/token.mjs
- var descriptionsKey = Symbol("elDescriptions");
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `DescriptionsRowProps` instead.
- */
- var descriptionsRowProps = buildProps({ row: {
- type: definePropType(Array),
- default: () => []
- } });
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/descriptions-cell.mjs
- var descriptions_cell_default = defineComponent({
- name: "ElDescriptionsCell",
- props: {
- cell: { type: Object },
- tag: {
- type: String,
- default: "td"
- },
- type: { type: String }
- },
- setup() {
- return { descriptions: inject(descriptionsKey, {}) };
- },
- render() {
- const item = getNormalizedProps(this.cell);
- const directives = (this.cell?.dirs || []).map((dire) => {
- const { dir, arg, modifiers, value } = dire;
- return [
- dir,
- value,
- arg,
- modifiers
- ];
- });
- const { border, direction } = this.descriptions;
- const isVertical = direction === "vertical";
- const renderLabel = () => this.cell?.children?.label?.() || item.label;
- const renderContent = () => this.cell?.children?.default?.();
- const span = item.span;
- const rowspan = item.rowspan;
- const align = item.align ? `is-${item.align}` : "";
- const labelAlign = item.labelAlign ? `is-${item.labelAlign}` : align;
- const className = item.className;
- const labelClassName = item.labelClassName;
- const style = {
- width: addUnit(this.type === "label" ? item.labelWidth ?? this.descriptions.labelWidth ?? item.width : item.width),
- minWidth: addUnit(item.minWidth)
- };
- const ns = useNamespace("descriptions");
- switch (this.type) {
- case "label": return withDirectives(h$1(this.tag, {
- style,
- class: [
- ns.e("cell"),
- ns.e("label"),
- ns.is("bordered-label", border),
- ns.is("vertical-label", isVertical),
- labelAlign,
- labelClassName
- ],
- colSpan: isVertical ? span : 1,
- rowspan: isVertical ? 1 : rowspan
- }, renderLabel()), directives);
- case "content": return withDirectives(h$1(this.tag, {
- style,
- class: [
- ns.e("cell"),
- ns.e("content"),
- ns.is("bordered-content", border),
- ns.is("vertical-content", isVertical),
- align,
- className
- ],
- colSpan: isVertical ? span : span * 2 - 1,
- rowspan: isVertical ? rowspan * 2 - 1 : rowspan
- }, renderContent()), directives);
- default: {
- const label = renderLabel();
- const labelStyle = {};
- const width = addUnit(item.labelWidth ?? this.descriptions.labelWidth);
- if (width) {
- labelStyle.width = width;
- labelStyle.display = "inline-block";
- }
- return withDirectives(h$1("td", {
- style,
- class: [ns.e("cell"), align],
- colSpan: span,
- rowspan
- }, [!isNil(label) ? h$1("span", {
- style: labelStyle,
- class: [ns.e("label"), labelClassName]
- }, label) : void 0, h$1("span", { class: [ns.e("content"), className] }, renderContent())]), directives);
- }
- }
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$43 = { key: 1 };
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/src/descriptions-row2.mjs
- var descriptions_row_default = /* @__PURE__ */ defineComponent({
- name: "ElDescriptionsRow",
- __name: "descriptions-row",
- props: descriptionsRowProps,
- setup(__props) {
- const descriptions = inject(descriptionsKey, {});
- return (_ctx, _cache) => {
- return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
- return openBlock(), createBlock(unref(descriptions_cell_default), {
- key: `tr1-${_index}`,
- cell,
- tag: "th",
- type: "label"
- }, null, 8, ["cell"]);
- }), 128))]), createBaseVNode("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
- return openBlock(), createBlock(unref(descriptions_cell_default), {
- key: `tr2-${_index}`,
- cell,
- tag: "td",
- type: "content"
- }, null, 8, ["cell"]);
- }), 128))])], 64)) : (openBlock(), createElementBlock("tr", _hoisted_1$43, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row, (cell, _index) => {
- return openBlock(), createElementBlock(Fragment, { key: `tr3-${_index}` }, [unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(descriptions_cell_default), {
- cell,
- tag: "td",
- type: "label"
- }, null, 8, ["cell"]), createVNode(unref(descriptions_cell_default), {
- cell,
- tag: "td",
- type: "content"
- }, null, 8, ["cell"])], 64)) : (openBlock(), createBlock(unref(descriptions_cell_default), {
- key: 1,
- cell,
- tag: "td",
- type: "both"
- }, null, 8, ["cell"]))], 64);
- }), 128))]));
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/descriptions/index.mjs
- var ElDescriptions = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElDescriptions",
- __name: "description",
- props: descriptionProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("descriptions");
- const descriptionsSize = useFormSize();
- const slots = useSlots();
- provide(descriptionsKey, props);
- const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
- const filledNode = (node, span, count, isLast = false) => {
- if (!node.props) node.props = {};
- if (span > count) node.props.span = count;
- if (isLast) node.props.span = span;
- return node;
- };
- const getRows = () => {
- if (!slots.default) return [];
- const children = flattedChildren(slots.default()).filter((node) => node?.type?.name === COMPONENT_NAME$10);
- const rows = [];
- let temp = [];
- let count = props.column;
- let totalSpan = 0;
- const rowspanTemp = [];
- children.forEach((node, index) => {
- const span = node.props?.span || 1;
- const rowspan = node.props?.rowspan || 1;
- const rowNo = rows.length;
- rowspanTemp[rowNo] ||= 0;
- if (rowspan > 1) for (let i = 1; i < rowspan; i++) {
- rowspanTemp[rowNo + i] ||= 0;
- rowspanTemp[rowNo + i]++;
- totalSpan++;
- }
- if (rowspanTemp[rowNo] > 0) {
- count -= rowspanTemp[rowNo];
- rowspanTemp[rowNo] = 0;
- }
- if (index < children.length - 1) totalSpan += span > count ? count : span;
- if (index === children.length - 1) {
- const lastSpan = props.column - totalSpan % props.column;
- temp.push(filledNode(node, lastSpan, count, true));
- rows.push(temp);
- return;
- }
- if (span < count) {
- count -= span;
- temp.push(node);
- } else {
- temp.push(filledNode(node, span, count));
- rows.push(temp);
- count = props.column;
- temp = [];
- }
- });
- return rows;
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(descriptionKls.value) }, [__props.title || __props.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("header"))
- }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).e("extra")) }, [renderSlot(_ctx.$slots, "extra", {}, () => [createTextVNode(toDisplayString(__props.extra), 1)])], 2)], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("body")) }, [createBaseVNode("table", { class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", __props.border)]) }, [createBaseVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, _index) => {
- return openBlock(), createBlock(descriptions_row_default, {
- key: _index,
- row
- }, null, 8, ["row"]);
- }), 128))])], 2)], 2)], 2);
- };
- }
- }), { DescriptionsItem: DescriptionItem });
- var ElDescriptionsItem = withNoopInstall(DescriptionItem);
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/dialog-content.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `DialogContentProps` instead.
- */
- var dialogContentProps = buildProps({
- center: Boolean,
- alignCenter: {
- type: Boolean,
- default: void 0
- },
- closeIcon: { type: iconPropType },
- draggable: {
- type: Boolean,
- default: void 0
- },
- overflow: {
- type: Boolean,
- default: void 0
- },
- fullscreen: Boolean,
- headerClass: String,
- bodyClass: String,
- footerClass: String,
- showClose: {
- type: Boolean,
- default: true
- },
- title: {
- type: String,
- default: ""
- },
- ariaLevel: {
- type: String,
- default: "2"
- }
- });
- var dialogContentEmits = { close: () => true };
- var dialogContentPropsDefaults = {
- alignCenter: void 0,
- draggable: void 0,
- overflow: void 0,
- showClose: true,
- title: "",
- ariaLevel: "2"
- };
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/dialog.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `DialogProps` instead.
- */
- var dialogProps = buildProps({
- ...dialogContentProps,
- appendToBody: Boolean,
- appendTo: {
- type: teleportProps.to.type,
- default: "body"
- },
- beforeClose: { type: definePropType(Function) },
- destroyOnClose: Boolean,
- closeOnClickModal: {
- type: Boolean,
- default: true
- },
- closeOnPressEscape: {
- type: Boolean,
- default: true
- },
- lockScroll: {
- type: Boolean,
- default: true
- },
- modal: {
- type: Boolean,
- default: true
- },
- modalPenetrable: Boolean,
- openDelay: {
- type: Number,
- default: 0
- },
- closeDelay: {
- type: Number,
- default: 0
- },
- top: { type: String },
- modelValue: Boolean,
- modalClass: String,
- headerClass: String,
- bodyClass: String,
- footerClass: String,
- width: { type: [String, Number] },
- zIndex: { type: Number },
- trapFocus: Boolean,
- headerAriaLevel: {
- type: String,
- default: "2"
- },
- transition: {
- type: definePropType([String, Object]),
- default: void 0
- }
- });
- var dialogEmits = {
- open: () => true,
- opened: () => true,
- close: () => true,
- closed: () => true,
- [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
- openAutoFocus: () => true,
- closeAutoFocus: () => true
- };
- var dialogContextKey = Symbol("dialogContextKey");
- var dialogPropsDefaults = {
- ...dialogContentPropsDefaults,
- appendTo: "body",
- closeOnClickModal: true,
- closeOnPressEscape: true,
- lockScroll: true,
- modal: true,
- openDelay: 0,
- closeDelay: 0,
- headerAriaLevel: "2",
- transition: void 0
- };
- //#endregion
- //#region node_modules/element-plus/es/components/overlay/src/overlay.mjs
- var overlayProps = buildProps({
- mask: {
- type: Boolean,
- default: true
- },
- customMaskEvent: Boolean,
- overlayClass: { type: definePropType([
- String,
- Array,
- Object
- ]) },
- zIndex: { type: definePropType([String, Number]) }
- });
- var overlayEmits = { click: (evt) => evt instanceof MouseEvent };
- var BLOCK = "overlay";
- //#endregion
- //#region node_modules/element-plus/es/components/overlay/index.mjs
- var ElOverlay = defineComponent({
- name: "ElOverlay",
- props: overlayProps,
- emits: overlayEmits,
- setup(props, { slots, emit }) {
- const ns = useNamespace(BLOCK);
- const onMaskClick = (e) => {
- emit("click", e);
- };
- const { onClick, onMousedown, onMouseup } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
- return () => {
- return props.mask ? createVNode("div", {
- class: [ns.b(), props.overlayClass],
- style: { zIndex: props.zIndex },
- onClick,
- onMousedown,
- onMouseup
- }, [renderSlot(slots, "default")], PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, [
- "onClick",
- "onMouseup",
- "onMousedown"
- ]) : h$1("div", {
- class: props.overlayClass,
- style: {
- zIndex: props.zIndex,
- position: "fixed",
- top: "0px",
- right: "0px",
- bottom: "0px",
- left: "0px"
- }
- }, [renderSlot(slots, "default")]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/constants.mjs
- var dialogInjectionKey = Symbol("dialogInjectionKey");
- var DEFAULT_DIALOG_TRANSITION = "dialog-fade";
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/use-dialog.mjs
- var COMPONENT_NAME$9 = "ElDialog";
- var useDialog = (props, targetRef) => {
- const emit = getCurrentInstance().emit;
- const { nextZIndex } = useZIndex();
- let lastPosition = "";
- const titleId = useId();
- const bodyId = useId();
- const visible = ref(false);
- const closed = ref(false);
- const rendered = ref(false);
- const zIndex = ref(props.zIndex ?? nextZIndex());
- const closing = ref(false);
- let openTimer = void 0;
- let closeTimer = void 0;
- const config = useGlobalConfig();
- const namespace = computed(() => config.value?.namespace ?? "el");
- const globalConfig = computed(() => config.value?.dialog);
- const style = computed(() => {
- const style = {};
- const varPrefix = `--${namespace.value}-dialog`;
- if (!props.fullscreen) {
- if (props.top) style[`${varPrefix}-margin-top`] = props.top;
- const width = addUnit(props.width);
- if (width) style[`${varPrefix}-width`] = width;
- }
- return style;
- });
- const _draggable = computed(() => (props.draggable ?? globalConfig.value?.draggable ?? false) && !props.fullscreen);
- const _alignCenter = computed(() => props.alignCenter ?? globalConfig.value?.alignCenter ?? false);
- const _overflow = computed(() => props.overflow ?? globalConfig.value?.overflow ?? false);
- const overlayDialogStyle = computed(() => {
- if (_alignCenter.value) return { display: "flex" };
- return {};
- });
- const transitionConfig = computed(() => {
- const transition = props.transition ?? globalConfig.value?.transition ?? "dialog-fade";
- const baseConfig = {
- name: transition,
- onAfterEnter: afterEnter,
- onBeforeLeave: beforeLeave,
- onAfterLeave: afterLeave
- };
- if (isObject$2(transition)) {
- const config = { ...transition };
- const _mergeHook = (userHook, defaultHook) => {
- return (el) => {
- if (isArray$1(userHook)) userHook.forEach((fn) => {
- if (isFunction$1(fn)) fn(el);
- });
- else if (isFunction$1(userHook)) userHook(el);
- defaultHook();
- };
- };
- config.onAfterEnter = _mergeHook(config.onAfterEnter, afterEnter);
- config.onBeforeLeave = _mergeHook(config.onBeforeLeave, beforeLeave);
- config.onAfterLeave = _mergeHook(config.onAfterLeave, afterLeave);
- if (!config.name) {
- config.name = DEFAULT_DIALOG_TRANSITION;
- debugWarn(COMPONENT_NAME$9, `transition.name is missing when using object syntax, fallback to '${DEFAULT_DIALOG_TRANSITION}'`);
- }
- return config;
- }
- return baseConfig;
- });
- function afterEnter() {
- emit("opened");
- }
- function afterLeave() {
- emit("closed");
- emit(UPDATE_MODEL_EVENT, false);
- if (props.destroyOnClose) rendered.value = false;
- closing.value = false;
- }
- function beforeLeave() {
- closing.value = true;
- emit("close");
- }
- function open() {
- closeTimer?.();
- openTimer?.();
- if (props.openDelay && props.openDelay > 0) ({stop: openTimer} = useTimeoutFn(() => doOpen(), props.openDelay));
- else doOpen();
- }
- function close() {
- openTimer?.();
- closeTimer?.();
- if (props.closeDelay && props.closeDelay > 0) ({stop: closeTimer} = useTimeoutFn(() => doClose(), props.closeDelay));
- else doClose();
- }
- function handleClose() {
- function hide(shouldCancel) {
- if (shouldCancel) return;
- closed.value = true;
- visible.value = false;
- }
- if (props.beforeClose) props.beforeClose(hide);
- else close();
- }
- function onModalClick() {
- if (props.closeOnClickModal) handleClose();
- }
- function doOpen() {
- if (!isClient) return;
- visible.value = true;
- }
- function doClose() {
- visible.value = false;
- }
- function onOpenAutoFocus() {
- emit("openAutoFocus");
- }
- function onCloseAutoFocus() {
- emit("closeAutoFocus");
- }
- function onFocusoutPrevented(event) {
- if (event.detail?.focusReason === "pointer") event.preventDefault();
- }
- if (props.lockScroll) useLockscreen(visible);
- function onCloseRequested() {
- if (props.closeOnPressEscape) handleClose();
- }
- watch(() => props.zIndex, () => {
- zIndex.value = props.zIndex ?? nextZIndex();
- });
- watch(() => props.modelValue, (val) => {
- if (val) {
- closed.value = false;
- closing.value = false;
- open();
- rendered.value = true;
- zIndex.value = props.zIndex ?? nextZIndex();
- nextTick(() => {
- emit("open");
- if (targetRef.value) {
- targetRef.value.parentElement.scrollTop = 0;
- targetRef.value.parentElement.scrollLeft = 0;
- targetRef.value.scrollTop = 0;
- }
- });
- } else if (visible.value) close();
- });
- watch(() => props.fullscreen, (val) => {
- if (!targetRef.value) return;
- if (val) {
- lastPosition = targetRef.value.style.transform;
- targetRef.value.style.transform = "";
- } else targetRef.value.style.transform = lastPosition;
- });
- onMounted(() => {
- if (props.modelValue) {
- visible.value = true;
- rendered.value = true;
- open();
- }
- });
- return {
- afterEnter,
- afterLeave,
- beforeLeave,
- handleClose,
- onModalClick,
- close,
- doClose,
- onOpenAutoFocus,
- onCloseAutoFocus,
- onCloseRequested,
- onFocusoutPrevented,
- titleId,
- bodyId,
- closed,
- style,
- overlayDialogStyle,
- rendered,
- visible,
- zIndex,
- transitionConfig,
- _draggable,
- _alignCenter,
- _overflow,
- closing
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/refs.mjs
- var composeRefs = (...refs) => {
- return (el) => {
- refs.forEach((ref) => {
- ref.value = el;
- });
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/dialog-content.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$42 = ["aria-level"];
- var _hoisted_2$25 = ["aria-label"];
- var _hoisted_3$10 = ["id"];
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/dialog-content2.mjs
- var dialog_content_default = /* @__PURE__ */ defineComponent({
- name: "ElDialogContent",
- __name: "dialog-content",
- props: dialogContentProps,
- emits: dialogContentEmits,
- setup(__props, { expose: __expose }) {
- const { t } = useLocale();
- const { Close } = CloseComponents;
- const props = __props;
- const { dialogRef, headerRef, bodyId, ns, style } = inject(dialogInjectionKey);
- const { focusTrapRef } = inject(FOCUS_TRAP_INJECTION_KEY);
- const composedDialogRef = composeRefs(focusTrapRef, dialogRef);
- const draggable = computed(() => !!props.draggable);
- const { resetPosition, updatePosition, isDragging } = useDraggable(dialogRef, headerRef, draggable, computed(() => !!props.overflow));
- const dialogKls = computed(() => [
- ns.b(),
- ns.is("fullscreen", props.fullscreen),
- ns.is("draggable", draggable.value),
- ns.is("dragging", isDragging.value),
- ns.is("align-center", !!props.alignCenter),
- { [ns.m("center")]: props.center }
- ]);
- __expose({
- resetPosition,
- updatePosition
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref: unref(composedDialogRef),
- class: normalizeClass(dialogKls.value),
- style: normalizeStyle(unref(style)),
- tabindex: "-1"
- }, [
- createBaseVNode("header", {
- ref_key: "headerRef",
- ref: headerRef,
- class: normalizeClass([
- unref(ns).e("header"),
- __props.headerClass,
- { "show-close": __props.showClose }
- ])
- }, [renderSlot(_ctx.$slots, "header", {}, () => [createBaseVNode("span", {
- role: "heading",
- "aria-level": __props.ariaLevel,
- class: normalizeClass(unref(ns).e("title"))
- }, toDisplayString(__props.title), 11, _hoisted_1$42)]), __props.showClose ? (openBlock(), createElementBlock("button", {
- key: 0,
- "aria-label": unref(t)("el.dialog.close"),
- class: normalizeClass(unref(ns).e("headerbtn")),
- type: "button",
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
- }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon || unref(Close))))]),
- _: 1
- }, 8, ["class"])], 10, _hoisted_2$25)) : createCommentVNode("v-if", true)], 2),
- createBaseVNode("div", {
- id: unref(bodyId),
- class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_3$10),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", {
- key: 0,
- class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
- ], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$41 = [
- "aria-label",
- "aria-labelledby",
- "aria-describedby"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/dialog/index.mjs
- var ElDialog = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElDialog",
- inheritAttrs: false,
- __name: "dialog",
- props: dialogProps,
- emits: dialogEmits,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const slots = useSlots();
- useDeprecated({
- scope: "el-dialog",
- from: "the title slot",
- replacement: "the header slot",
- version: "3.0.0",
- ref: "https://element-plus.org/en-US/component/dialog.html#slots"
- }, computed(() => !!slots.title));
- const ns = useNamespace("dialog");
- const dialogRef = ref();
- const headerRef = ref();
- const dialogContentRef = ref();
- const { visible, titleId, bodyId, style, overlayDialogStyle, rendered, transitionConfig, zIndex, _draggable, _alignCenter, _overflow, handleClose, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onCloseRequested, onFocusoutPrevented, closing } = useDialog(props, dialogRef);
- provide(dialogInjectionKey, {
- dialogRef,
- headerRef,
- bodyId,
- ns,
- rendered,
- style
- });
- const overlayEvent = useSameTarget(onModalClick);
- const penetrable = computed(() => props.modalPenetrable && !props.modal && !props.fullscreen);
- const resetPosition = () => {
- dialogContentRef.value?.resetPosition();
- };
- __expose({
- visible,
- dialogContentRef,
- resetPosition,
- handleClose
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTeleport), {
- to: __props.appendTo,
- disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
- }, {
- default: withCtx(() => [createVNode(Transition, mergeProps(unref(transitionConfig), { persisted: "" }), {
- default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
- "custom-mask-event": "",
- mask: __props.modal,
- "overlay-class": [
- __props.modalClass ?? "",
- `${unref(ns).namespace.value}-modal-dialog`,
- unref(ns).is("penetrable", penetrable.value)
- ],
- "z-index": unref(zIndex)
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- role: "dialog",
- "aria-modal": "true",
- "aria-label": __props.title || void 0,
- "aria-labelledby": !__props.title ? unref(titleId) : void 0,
- "aria-describedby": unref(bodyId),
- class: normalizeClass([`${unref(ns).namespace.value}-overlay-dialog`, unref(ns).is("closing", unref(closing))]),
- style: normalizeStyle(unref(overlayDialogStyle)),
- onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
- onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
- onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
- }, [createVNode(unref(focus_trap_default$1), {
- loop: "",
- trapped: unref(visible),
- "focus-start-el": "container",
- onFocusAfterTrapped: unref(onOpenAutoFocus),
- onFocusAfterReleased: unref(onCloseAutoFocus),
- onFocusoutPrevented: unref(onFocusoutPrevented),
- onReleaseRequested: unref(onCloseRequested)
- }, {
- default: withCtx(() => [unref(rendered) ? (openBlock(), createBlock(dialog_content_default, mergeProps({
- key: 0,
- ref_key: "dialogContentRef",
- ref: dialogContentRef
- }, _ctx.$attrs, {
- center: __props.center,
- "align-center": unref(_alignCenter),
- "close-icon": __props.closeIcon,
- draggable: unref(_draggable),
- overflow: unref(_overflow),
- fullscreen: __props.fullscreen,
- "header-class": __props.headerClass,
- "body-class": __props.bodyClass,
- "footer-class": __props.footerClass,
- "show-close": __props.showClose,
- title: __props.title,
- "aria-level": __props.headerAriaLevel,
- onClose: unref(handleClose)
- }), createSlots({
- header: withCtx(() => [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
- key: 0,
- close: unref(handleClose),
- titleId: unref(titleId),
- titleClass: unref(ns).e("title")
- }) : renderSlot(_ctx.$slots, "title", { key: 1 })]),
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 2
- }, [_ctx.$slots.footer ? {
- name: "footer",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
- key: "0"
- } : void 0]), 1040, [
- "center",
- "align-center",
- "close-icon",
- "draggable",
- "overflow",
- "fullscreen",
- "header-class",
- "body-class",
- "footer-class",
- "show-close",
- "title",
- "aria-level",
- "onClose"
- ])) : createCommentVNode("v-if", true)]),
- _: 3
- }, 8, [
- "trapped",
- "onFocusAfterTrapped",
- "onFocusAfterReleased",
- "onFocusoutPrevented",
- "onReleaseRequested"
- ])], 46, _hoisted_1$41)]),
- _: 3
- }, 8, [
- "mask",
- "overlay-class",
- "z-index"
- ]), [[vShow, unref(visible)]])]),
- _: 3
- }, 16)]),
- _: 3
- }, 8, ["to", "disabled"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/divider/src/divider.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `DividerProps` instead.
- */
- var dividerProps = buildProps({
- direction: {
- type: String,
- values: ["horizontal", "vertical"],
- default: "horizontal"
- },
- contentPosition: {
- type: String,
- values: [
- "left",
- "center",
- "right"
- ],
- default: "center"
- },
- borderStyle: {
- type: definePropType(String),
- default: "solid"
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/divider/index.mjs
- var ElDivider = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElDivider",
- __name: "divider",
- props: dividerProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("divider");
- const dividerStyle = computed(() => {
- return ns.cssVar({ "border-style": props.borderStyle });
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([unref(ns).b(), unref(ns).m(__props.direction)]),
- style: normalizeStyle(dividerStyle.value),
- role: "separator"
- }, [_ctx.$slots.default && __props.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(ns).e("text"), unref(ns).is(__props.contentPosition)])
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)], 6);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/drawer/src/drawer.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `DrawerProps` instead.
- */
- var drawerProps = buildProps({
- ...dialogProps,
- direction: {
- type: String,
- default: "rtl",
- values: [
- "ltr",
- "rtl",
- "ttb",
- "btt"
- ]
- },
- resizable: Boolean,
- size: {
- type: [String, Number],
- default: "30%"
- },
- withHeader: {
- type: Boolean,
- default: true
- },
- modalFade: {
- type: Boolean,
- default: true
- },
- headerAriaLevel: {
- type: String,
- default: "2"
- }
- });
- var drawerEmits = {
- ...dialogEmits,
- "resize-start": (evt, size) => evt instanceof MouseEvent && typeof size === "number",
- resize: (evt, size) => evt instanceof MouseEvent && typeof size === "number",
- "resize-end": (evt, size) => evt instanceof MouseEvent && typeof size === "number"
- };
- //#endregion
- //#region node_modules/element-plus/es/components/drawer/src/composables/useResizable.mjs
- function useResizable(props, target, emit) {
- const { width, height } = useWindowSize();
- const isHorizontal = computed(() => ["ltr", "rtl"].includes(props.direction));
- const sign = computed(() => ["ltr", "ttb"].includes(props.direction) ? 1 : -1);
- const windowSize = computed(() => isHorizontal.value ? width.value : height.value);
- const getSize = computed(() => {
- return clamp$1(startSize.value + sign.value * offset.value, 4, windowSize.value);
- });
- const startSize = ref(0);
- const offset = ref(0);
- const isResizing = ref(false);
- const hasStartedDragging = ref(false);
- let startPos = [];
- let cleanups = [];
- const getActualSize = () => {
- const drawerEl = target.value?.closest("[aria-modal=\"true\"]");
- if (drawerEl) return isHorizontal.value ? drawerEl.offsetWidth : drawerEl.offsetHeight;
- return 100;
- };
- watch(() => [props.size, props.resizable], () => {
- hasStartedDragging.value = false;
- startSize.value = 0;
- offset.value = 0;
- onMouseUp();
- });
- const onMousedown = (e) => {
- if (!props.resizable) return;
- if (!hasStartedDragging.value) {
- startSize.value = getActualSize();
- hasStartedDragging.value = true;
- }
- startPos = [e.pageX, e.pageY];
- isResizing.value = true;
- emit("resize-start", e, startSize.value);
- cleanups.push(useEventListener(window, "mouseup", onMouseUp), useEventListener(window, "mousemove", onMouseMove));
- };
- const onMouseMove = (e) => {
- const { pageX, pageY } = e;
- const offsetX = pageX - startPos[0];
- const offsetY = pageY - startPos[1];
- offset.value = isHorizontal.value ? offsetX : offsetY;
- emit("resize", e, getSize.value);
- };
- const onMouseUp = (e) => {
- if (!isResizing.value) return;
- startPos = [];
- startSize.value = getSize.value;
- offset.value = 0;
- isResizing.value = false;
- cleanups.forEach((cleanup) => cleanup?.());
- cleanups = [];
- if (e) emit("resize-end", e, startSize.value);
- };
- const cleanup = useEventListener(target, "mousedown", onMousedown);
- onBeforeUnmount(() => {
- cleanup();
- onMouseUp();
- });
- return {
- size: computed(() => {
- return hasStartedDragging.value ? `${getSize.value}px` : addUnit(props.size);
- }),
- isResizing,
- isHorizontal
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$40 = [
- "aria-label",
- "aria-labelledby",
- "aria-describedby"
- ];
- var _hoisted_2$24 = ["id", "aria-level"];
- var _hoisted_3$9 = ["aria-label"];
- var _hoisted_4$7 = ["id"];
- //#endregion
- //#region node_modules/element-plus/es/components/drawer/index.mjs
- var ElDrawer = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElDrawer",
- inheritAttrs: false,
- __name: "drawer",
- props: drawerProps,
- emits: drawerEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const slots = useSlots();
- useDeprecated({
- scope: "el-drawer",
- from: "the title slot",
- replacement: "the header slot",
- version: "3.0.0",
- ref: "https://element-plus.org/en-US/component/drawer.html#slots"
- }, computed(() => !!slots.title));
- const drawerRef = ref();
- const focusStartRef = ref();
- const draggerRef = ref();
- const ns = useNamespace("drawer");
- const { t } = useLocale();
- const { afterEnter, afterLeave, beforeLeave, visible, rendered, titleId, bodyId, zIndex, onModalClick, onOpenAutoFocus, onCloseAutoFocus, onFocusoutPrevented, onCloseRequested, handleClose } = useDialog(props, drawerRef);
- const { isHorizontal, size, isResizing } = useResizable(props, draggerRef, emit);
- const penetrable = computed(() => props.modalPenetrable && !props.modal);
- __expose({
- handleClose,
- afterEnter,
- afterLeave
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTeleport), {
- to: __props.appendTo,
- disabled: __props.appendTo !== "body" ? false : !__props.appendToBody
- }, {
- default: withCtx(() => [createVNode(Transition, {
- name: unref(ns).b("fade"),
- onAfterEnter: unref(afterEnter),
- onAfterLeave: unref(afterLeave),
- onBeforeLeave: unref(beforeLeave),
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createVNode(unref(ElOverlay), {
- mask: __props.modal,
- "overlay-class": [
- unref(ns).is("drawer"),
- __props.modalClass ?? "",
- `${unref(ns).namespace.value}-modal-drawer`,
- unref(ns).is("penetrable", penetrable.value)
- ],
- "z-index": unref(zIndex),
- onClick: unref(onModalClick)
- }, {
- default: withCtx(() => [createVNode(unref(focus_trap_default$1), {
- loop: "",
- trapped: unref(visible),
- "focus-trap-el": drawerRef.value,
- "focus-start-el": focusStartRef.value,
- onFocusAfterTrapped: unref(onOpenAutoFocus),
- onFocusAfterReleased: unref(onCloseAutoFocus),
- onFocusoutPrevented: unref(onFocusoutPrevented),
- onReleaseRequested: unref(onCloseRequested)
- }, {
- default: withCtx(() => [createBaseVNode("div", mergeProps({
- ref_key: "drawerRef",
- ref: drawerRef,
- "aria-modal": "true",
- "aria-label": __props.title || void 0,
- "aria-labelledby": !__props.title ? unref(titleId) : void 0,
- "aria-describedby": unref(bodyId)
- }, _ctx.$attrs, {
- class: [
- unref(ns).b(),
- __props.direction,
- unref(visible) && "open",
- unref(ns).is("dragging", unref(isResizing))
- ],
- style: { [unref(isHorizontal) ? "width" : "height"]: unref(size) },
- role: "dialog",
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
- }), [
- createBaseVNode("span", {
- ref_key: "focusStartRef",
- ref: focusStartRef,
- class: normalizeClass(unref(ns).e("sr-focus")),
- tabindex: "-1"
- }, null, 2),
- __props.withHeader ? (openBlock(), createElementBlock("header", {
- key: 0,
- class: normalizeClass([unref(ns).e("header"), __props.headerClass])
- }, [!_ctx.$slots.title ? renderSlot(_ctx.$slots, "header", {
- key: 0,
- close: unref(handleClose),
- titleId: unref(titleId),
- titleClass: unref(ns).e("title")
- }, () => [createBaseVNode("span", {
- id: unref(titleId),
- role: "heading",
- "aria-level": __props.headerAriaLevel,
- class: normalizeClass(unref(ns).e("title"))
- }, toDisplayString(__props.title), 11, _hoisted_2$24)]) : renderSlot(_ctx.$slots, "title", { key: 1 }, () => [createCommentVNode(" DEPRECATED SLOT ")]), __props.showClose ? (openBlock(), createElementBlock("button", {
- key: 2,
- "aria-label": unref(t)("el.drawer.close"),
- class: normalizeClass(unref(ns).e("close-btn")),
- type: "button",
- onClick: _cache[0] || (_cache[0] = (...args) => unref(handleClose) && unref(handleClose)(...args))
- }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- }, 8, ["class"])], 10, _hoisted_3$9)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
- unref(rendered) ? (openBlock(), createElementBlock("div", {
- key: 1,
- id: unref(bodyId),
- class: normalizeClass([unref(ns).e("body"), __props.bodyClass])
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_4$7)) : createCommentVNode("v-if", true),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass([unref(ns).e("footer"), __props.footerClass])
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true),
- __props.resizable ? (openBlock(), createElementBlock("div", {
- key: 3,
- ref_key: "draggerRef",
- ref: draggerRef,
- style: normalizeStyle({ zIndex: unref(zIndex) }),
- class: normalizeClass(unref(ns).e("dragger"))
- }, null, 6)) : createCommentVNode("v-if", true)
- ], 16, _hoisted_1$40)]),
- _: 3
- }, 8, [
- "trapped",
- "focus-trap-el",
- "focus-start-el",
- "onFocusAfterTrapped",
- "onFocusAfterReleased",
- "onFocusoutPrevented",
- "onReleaseRequested"
- ])]),
- _: 3
- }, 8, [
- "mask",
- "overlay-class",
- "z-index",
- "onClick"
- ]), [[vShow, unref(visible)]])]),
- _: 3
- }, 8, [
- "name",
- "onAfterEnter",
- "onAfterLeave",
- "onBeforeLeave"
- ])]),
- _: 3
- }, 8, ["to", "disabled"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown.mjs
- var dropdownProps = buildProps({
- trigger: {
- ...useTooltipTriggerProps.trigger,
- type: definePropType([String, Array])
- },
- triggerKeys: {
- type: definePropType(Array),
- default: () => [
- EVENT_CODE.enter,
- EVENT_CODE.numpadEnter,
- EVENT_CODE.space,
- EVENT_CODE.down
- ]
- },
- virtualTriggering: useTooltipTriggerProps.virtualTriggering,
- virtualRef: useTooltipTriggerProps.virtualRef,
- effect: {
- ...useTooltipContentProps.effect,
- default: "light"
- },
- type: { type: definePropType(String) },
- placement: {
- type: definePropType(String),
- default: "bottom"
- },
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- id: String,
- size: {
- type: String,
- default: ""
- },
- splitButton: Boolean,
- hideOnClick: {
- type: Boolean,
- default: true
- },
- loop: {
- type: Boolean,
- default: true
- },
- showArrow: {
- type: Boolean,
- default: true
- },
- showTimeout: {
- type: Number,
- default: 150
- },
- hideTimeout: {
- type: Number,
- default: 150
- },
- tabindex: {
- type: definePropType([Number, String]),
- default: 0
- },
- maxHeight: {
- type: definePropType([Number, String]),
- default: ""
- },
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- disabled: Boolean,
- role: {
- type: String,
- values: roleTypes,
- default: "menu"
- },
- buttonProps: { type: definePropType(Object) },
- teleported: useTooltipContentProps.teleported,
- appendTo: useTooltipContentProps.appendTo,
- persistent: {
- type: Boolean,
- default: true
- }
- });
- var dropdownItemProps = buildProps({
- command: {
- type: [
- Object,
- String,
- Number
- ],
- default: () => ({})
- },
- disabled: Boolean,
- divided: Boolean,
- textValue: String,
- icon: { type: iconPropType }
- });
- var dropdownMenuProps = buildProps({ onKeydown: { type: definePropType(Function) } });
- var FIRST_KEYS = [
- EVENT_CODE.down,
- EVENT_CODE.pageDown,
- EVENT_CODE.home
- ];
- var LAST_KEYS = [
- EVENT_CODE.up,
- EVENT_CODE.pageUp,
- EVENT_CODE.end
- ];
- var FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/tokens.mjs
- var DROPDOWN_INJECTION_KEY = Symbol("elDropdown");
- var DROPDOWN_INSTANCE_INJECTION_KEY = "elDropdown";
- //#endregion
- //#region node_modules/element-plus/es/components/collection/src/collection.vue_vue_type_script_lang.mjs
- var collection_vue_vue_type_script_lang_default = defineComponent({ inheritAttrs: false });
- //#endregion
- //#region node_modules/element-plus/es/components/collection/src/collection2.mjs
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
- return renderSlot(_ctx.$slots, "default");
- }
- var collection_default = /* @__PURE__ */ _plugin_vue_export_helper_default(collection_vue_vue_type_script_lang_default, [["render", _sfc_render$16]]);
- //#endregion
- //#region node_modules/element-plus/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs
- var collection_item_vue_vue_type_script_lang_default = defineComponent({
- name: "ElCollectionItem",
- inheritAttrs: false
- });
- //#endregion
- //#region node_modules/element-plus/es/components/collection/src/collection-item.mjs
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
- return renderSlot(_ctx.$slots, "default");
- }
- var collection_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(collection_item_vue_vue_type_script_lang_default, [["render", _sfc_render$15]]);
- //#endregion
- //#region node_modules/element-plus/es/components/collection/src/collection.mjs
- var COLLECTION_ITEM_SIGN = `data-el-collection-item`;
- var createCollectionWithScope = (name) => {
- const COLLECTION_NAME = `El${name}Collection`;
- const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
- const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
- const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
- return {
- COLLECTION_INJECTION_KEY,
- COLLECTION_ITEM_INJECTION_KEY,
- ElCollection: Object.assign({}, collection_default, {
- name: COLLECTION_NAME,
- setup() {
- const collectionRef = ref();
- const itemMap = /* @__PURE__ */ new Map();
- const getItems = (() => {
- const collectionEl = unref(collectionRef);
- if (!collectionEl) return [];
- const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
- return [...itemMap.values()].sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
- });
- provide(COLLECTION_INJECTION_KEY, {
- itemMap,
- getItems,
- collectionRef
- });
- }
- }),
- ElCollectionItem: Object.assign({}, collection_item_default, {
- name: COLLECTION_ITEM_NAME,
- setup(_, { attrs }) {
- const collectionItemRef = ref();
- const collectionInjection = inject(COLLECTION_INJECTION_KEY, void 0);
- provide(COLLECTION_ITEM_INJECTION_KEY, { collectionItemRef });
- onMounted(() => {
- const collectionItemEl = unref(collectionItemRef);
- if (collectionItemEl) collectionInjection.itemMap.set(collectionItemEl, {
- ref: collectionItemEl,
- ...attrs
- });
- });
- onBeforeUnmount(() => {
- const collectionItemEl = unref(collectionItemRef);
- collectionInjection.itemMap.delete(collectionItemEl);
- });
- }
- })
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
- var rovingFocusGroupProps = buildProps({
- style: { type: definePropType([
- String,
- Array,
- Object
- ]) },
- currentTabId: { type: definePropType(String) },
- defaultCurrentTabId: String,
- loop: Boolean,
- dir: {
- type: String,
- values: ["ltr", "rtl"],
- default: "ltr"
- },
- orientation: { type: definePropType(String) },
- onBlur: Function,
- onFocus: Function,
- onMousedown: Function
- });
- var { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY } = createCollectionWithScope("RovingFocusGroup");
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
- var ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
- var ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
- var MAP_KEY_TO_FOCUS_INTENT = {
- ArrowLeft: "prev",
- ArrowUp: "prev",
- ArrowRight: "next",
- ArrowDown: "next",
- PageUp: "first",
- Home: "first",
- PageDown: "last",
- End: "last"
- };
- var getDirectionAwareKey = (key, dir) => {
- if (dir !== "rtl") return key;
- switch (key) {
- case EVENT_CODE.right: return EVENT_CODE.left;
- case EVENT_CODE.left: return EVENT_CODE.right;
- default: return key;
- }
- };
- var getFocusIntent = (event, orientation, dir) => {
- const key = getDirectionAwareKey(getEventCode(event), dir);
- if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key)) return void 0;
- if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key)) return void 0;
- return MAP_KEY_TO_FOCUS_INTENT[key];
- };
- var reorderArray = (array, atIdx) => {
- return array.map((_, idx) => array[(idx + atIdx) % array.length]);
- };
- var focusFirst = (elements) => {
- const { activeElement: prevActive } = document;
- for (const element of elements) {
- if (element === prevActive) return;
- element.focus();
- if (prevActive !== document.activeElement) return;
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs
- var CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
- var ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
- var EVT_OPTS = {
- bubbles: false,
- cancelable: true
- };
- var roving_focus_group_impl_vue_vue_type_script_lang_default = defineComponent({
- name: "ElRovingFocusGroupImpl",
- inheritAttrs: false,
- props: rovingFocusGroupProps,
- emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
- setup(props, { emit }) {
- const currentTabbedId = ref((props.currentTabId || props.defaultCurrentTabId) ?? null);
- const isBackingOut = ref(false);
- const isClickFocus = ref(false);
- const rovingFocusGroupRef = ref();
- const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
- const rovingFocusGroupRootStyle = computed(() => {
- return [{ outline: "none" }, props.style];
- });
- const onItemFocus = (tabbedId) => {
- emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId);
- };
- const onItemShiftTab = () => {
- isBackingOut.value = true;
- };
- const onMousedown = composeEventHandlers((e) => {
- props.onMousedown?.(e);
- }, () => {
- isClickFocus.value = true;
- });
- const onFocus = composeEventHandlers((e) => {
- props.onFocus?.(e);
- }, (e) => {
- const isKeyboardFocus = !unref(isClickFocus);
- const { target, currentTarget } = e;
- if (target === currentTarget && isKeyboardFocus && !unref(isBackingOut)) {
- const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS);
- currentTarget?.dispatchEvent(entryFocusEvt);
- if (!entryFocusEvt.defaultPrevented) {
- const items = getItems().filter((item) => item.focusable);
- focusFirst([
- items.find((item) => item.active),
- items.find((item) => item.id === unref(currentTabbedId)),
- ...items
- ].filter(Boolean).map((item) => item.ref));
- }
- }
- isClickFocus.value = false;
- });
- const onBlur = composeEventHandlers((e) => {
- props.onBlur?.(e);
- }, () => {
- isBackingOut.value = false;
- });
- const handleEntryFocus = (...args) => {
- emit("entryFocus", ...args);
- };
- const onKeydown = (e) => {
- const focusIntent = getFocusIntent(e);
- if (focusIntent) {
- e.preventDefault();
- let elements = getItems().filter((item) => item.focusable).map((item) => item.ref);
- switch (focusIntent) {
- case "last":
- elements.reverse();
- break;
- case "prev":
- case "next": {
- if (focusIntent === "prev") elements.reverse();
- const currentIdx = elements.indexOf(e.currentTarget);
- elements = props.loop ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1);
- break;
- }
- default: break;
- }
- nextTick(() => {
- focusFirst(elements);
- });
- }
- };
- provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {
- currentTabbedId: readonly(currentTabbedId),
- loop: toRef(props, "loop"),
- tabIndex: computed(() => {
- return unref(isBackingOut) ? -1 : 0;
- }),
- rovingFocusGroupRef,
- rovingFocusGroupRootStyle,
- orientation: toRef(props, "orientation"),
- dir: toRef(props, "dir"),
- onItemFocus,
- onItemShiftTab,
- onBlur,
- onFocus,
- onMousedown,
- onKeydown
- });
- watch(() => props.currentTabId, (val) => {
- currentTabbedId.value = val ?? null;
- });
- useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
- return renderSlot(_ctx.$slots, "default");
- }
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs
- var roving_focus_group_vue_vue_type_script_lang_default = defineComponent({
- name: "ElRovingFocusGroup",
- components: {
- ElFocusGroupCollection: ElCollection,
- ElRovingFocusGroupImpl: /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_impl_vue_vue_type_script_lang_default, [["render", _sfc_render$14]])
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
- const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
- return openBlock(), createBlock(_component_el_focus_group_collection, null, {
- default: withCtx(() => [createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 16)]),
- _: 3
- });
- }
- var roving_focus_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_vue_vue_type_script_lang_default, [["render", _sfc_render$13]]);
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs
- var roving_focus_item_vue_vue_type_script_lang_default = defineComponent({
- components: { ElRovingFocusCollectionItem: ElCollectionItem },
- props: {
- focusable: {
- type: Boolean,
- default: true
- },
- active: Boolean
- },
- emits: [
- "mousedown",
- "focus",
- "keydown"
- ],
- setup(props, { emit }) {
- const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
- const id = useId();
- const rovingFocusGroupItemRef = ref();
- const handleMousedown = composeEventHandlers((e) => {
- emit("mousedown", e);
- }, (e) => {
- if (!props.focusable) e.preventDefault();
- else onItemFocus(unref(id));
- });
- const handleFocus = composeEventHandlers((e) => {
- emit("focus", e);
- }, () => {
- onItemFocus(unref(id));
- });
- const handleKeydown = composeEventHandlers((e) => {
- emit("keydown", e);
- }, (e) => {
- const { shiftKey, target, currentTarget } = e;
- if (getEventCode(e) === EVENT_CODE.tab && shiftKey) {
- onItemShiftTab();
- return;
- }
- if (target !== currentTarget) return;
- onKeydown(e);
- });
- const isCurrentTab = computed(() => currentTabbedId.value === unref(id));
- provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {
- rovingFocusGroupItemRef,
- tabIndex: computed(() => unref(isCurrentTab) ? 0 : -1),
- handleMousedown,
- handleFocus,
- handleKeydown
- });
- return {
- id,
- handleKeydown,
- handleFocus,
- handleMousedown
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item");
- return openBlock(), createBlock(_component_el_roving_focus_collection_item, {
- id: _ctx.id,
- focusable: _ctx.focusable,
- active: _ctx.active
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, [
- "id",
- "focusable",
- "active"
- ]);
- }
- var roving_focus_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_item_vue_vue_type_script_lang_default, [["render", _sfc_render$12]]);
- //#endregion
- //#region node_modules/element-plus/es/components/roving-focus-group/index.mjs
- var roving_focus_group_default$1 = roving_focus_group_default;
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs
- var { ButtonGroup: ElButtonGroup$1 } = ElButton;
- var dropdown_vue_vue_type_script_lang_default = defineComponent({
- name: "ElDropdown",
- components: {
- ElButton,
- ElButtonGroup: ElButtonGroup$1,
- ElScrollbar,
- ElTooltip,
- ElRovingFocusGroup: roving_focus_group_default$1,
- ElOnlyChild: OnlyChild,
- ElIcon,
- ArrowDown: arrow_down_default
- },
- props: dropdownProps,
- emits: [
- "visible-change",
- "click",
- "command"
- ],
- setup(props, { emit }) {
- const _instance = getCurrentInstance();
- const ns = useNamespace("dropdown");
- const { t } = useLocale();
- const triggeringElementRef = ref();
- const referenceElementRef = ref();
- const popperRef = ref();
- const contentRef = ref();
- const scrollbar = ref(null);
- const currentTabId = ref(null);
- const isUsingKeyboard = ref(false);
- const wrapStyle = computed(() => ({ maxHeight: addUnit(props.maxHeight) }));
- const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)]);
- const trigger = computed(() => castArray$1(props.trigger));
- const defaultTriggerId = useId().value;
- const triggerId = computed(() => props.id || defaultTriggerId);
- function handleClick() {
- popperRef.value?.onClose(void 0, 0);
- }
- function handleClose() {
- popperRef.value?.onClose();
- }
- function handleOpen() {
- popperRef.value?.onOpen();
- }
- const dropdownSize = useFormSize();
- function commandHandler(...args) {
- emit("command", ...args);
- }
- function onItemEnter() {}
- function onItemLeave() {
- const contentEl = unref(contentRef);
- trigger.value.includes("hover") && contentEl?.focus({ preventScroll: true });
- currentTabId.value = null;
- }
- function handleCurrentTabIdChange(id) {
- currentTabId.value = id;
- }
- function handleBeforeShowTooltip() {
- emit("visible-change", true);
- }
- function handleShowTooltip(event) {
- isUsingKeyboard.value = event?.type === "keydown";
- contentRef.value?.focus();
- }
- function handleBeforeHideTooltip() {
- emit("visible-change", false);
- }
- provide(DROPDOWN_INJECTION_KEY, {
- contentRef,
- role: computed(() => props.role),
- triggerId,
- isUsingKeyboard,
- onItemEnter,
- onItemLeave,
- handleClose
- });
- provide(DROPDOWN_INSTANCE_INJECTION_KEY, {
- instance: _instance,
- dropdownSize,
- handleClick,
- commandHandler,
- trigger: toRef(props, "trigger"),
- hideOnClick: toRef(props, "hideOnClick")
- });
- const handlerMainButtonClick = (event) => {
- emit("click", event);
- };
- return {
- t,
- ns,
- scrollbar,
- wrapStyle,
- dropdownTriggerKls,
- dropdownSize,
- triggerId,
- currentTabId,
- handleCurrentTabIdChange,
- handlerMainButtonClick,
- handleClose,
- handleOpen,
- handleBeforeShowTooltip,
- handleShowTooltip,
- handleBeforeHideTooltip,
- popperRef,
- contentRef,
- triggeringElementRef,
- referenceElementRef
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_roving_focus_group = resolveComponent("el-roving-focus-group");
- const _component_el_scrollbar = resolveComponent("el-scrollbar");
- const _component_el_only_child = resolveComponent("el-only-child");
- const _component_el_tooltip = resolveComponent("el-tooltip");
- const _component_el_button = resolveComponent("el-button");
- const _component_arrow_down = resolveComponent("arrow-down");
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_button_group = resolveComponent("el-button-group");
- return openBlock(), createElementBlock("div", { class: normalizeClass([_ctx.ns.b(), _ctx.ns.is("disabled", _ctx.disabled)]) }, [createVNode(_component_el_tooltip, {
- ref: "popperRef",
- role: _ctx.role,
- effect: _ctx.effect,
- "fallback-placements": ["bottom", "top"],
- "popper-options": _ctx.popperOptions,
- "gpu-acceleration": false,
- placement: _ctx.placement,
- "popper-class": [_ctx.ns.e("popper"), _ctx.popperClass],
- "popper-style": _ctx.popperStyle,
- trigger: _ctx.trigger,
- "trigger-keys": _ctx.triggerKeys,
- "trigger-target-el": _ctx.contentRef,
- "show-arrow": _ctx.showArrow,
- "show-after": _ctx.trigger === "hover" ? _ctx.showTimeout : 0,
- "hide-after": _ctx.trigger === "hover" ? _ctx.hideTimeout : 0,
- "virtual-ref": _ctx.virtualRef ?? _ctx.triggeringElementRef,
- "virtual-triggering": _ctx.virtualTriggering || _ctx.splitButton,
- disabled: _ctx.disabled,
- transition: `${_ctx.ns.namespace.value}-zoom-in-top`,
- teleported: _ctx.teleported,
- "append-to": _ctx.appendTo,
- pure: "",
- "focus-on-target": "",
- persistent: _ctx.persistent,
- onBeforeShow: _ctx.handleBeforeShowTooltip,
- onShow: _ctx.handleShowTooltip,
- onBeforeHide: _ctx.handleBeforeHideTooltip
- }, createSlots({
- content: withCtx(() => [createVNode(_component_el_scrollbar, {
- ref: "scrollbar",
- "wrap-style": _ctx.wrapStyle,
- tag: "div",
- "view-class": _ctx.ns.e("list")
- }, {
- default: withCtx(() => [createVNode(_component_el_roving_focus_group, {
- loop: _ctx.loop,
- "current-tab-id": _ctx.currentTabId,
- orientation: "horizontal",
- onCurrentTabIdChange: _ctx.handleCurrentTabIdChange
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "dropdown")]),
- _: 3
- }, 8, [
- "loop",
- "current-tab-id",
- "onCurrentTabIdChange"
- ])]),
- _: 3
- }, 8, ["wrap-style", "view-class"])]),
- _: 2
- }, [!_ctx.splitButton ? {
- name: "default",
- fn: withCtx(() => [createVNode(_component_el_only_child, {
- id: _ctx.triggerId,
- ref: "triggeringElementRef",
- role: "button",
- tabindex: _ctx.tabindex
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["id", "tabindex"])]),
- key: "0"
- } : void 0]), 1032, [
- "role",
- "effect",
- "popper-options",
- "placement",
- "popper-class",
- "popper-style",
- "trigger",
- "trigger-keys",
- "trigger-target-el",
- "show-arrow",
- "show-after",
- "hide-after",
- "virtual-ref",
- "virtual-triggering",
- "disabled",
- "transition",
- "teleported",
- "append-to",
- "persistent",
- "onBeforeShow",
- "onShow",
- "onBeforeHide"
- ]), _ctx.splitButton ? (openBlock(), createBlock(_component_el_button_group, { key: 0 }, {
- default: withCtx(() => [createVNode(_component_el_button, mergeProps({ ref: "referenceElementRef" }, _ctx.buttonProps, {
- size: _ctx.dropdownSize,
- type: _ctx.type,
- disabled: _ctx.disabled,
- tabindex: _ctx.tabindex,
- onClick: _ctx.handlerMainButtonClick
- }), {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 16, [
- "size",
- "type",
- "disabled",
- "tabindex",
- "onClick"
- ]), createVNode(_component_el_button, mergeProps({
- id: _ctx.triggerId,
- ref: "triggeringElementRef"
- }, _ctx.buttonProps, {
- role: "button",
- size: _ctx.dropdownSize,
- type: _ctx.type,
- class: _ctx.ns.e("caret-button"),
- disabled: _ctx.disabled,
- tabindex: _ctx.tabindex,
- "aria-label": _ctx.t("el.dropdown.toggleDropdown")
- }), {
- default: withCtx(() => [createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("icon")) }, {
- default: withCtx(() => [createVNode(_component_arrow_down)]),
- _: 1
- }, 8, ["class"])]),
- _: 1
- }, 16, [
- "id",
- "size",
- "type",
- "class",
- "disabled",
- "tabindex",
- "aria-label"
- ])]),
- _: 3
- })) : createCommentVNode("v-if", true)], 2);
- }
- var dropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render$11]]);
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs
- var dropdown_item_impl_vue_vue_type_script_lang_default = defineComponent({
- name: "DropdownItemImpl",
- components: { ElIcon },
- props: dropdownItemProps,
- emits: [
- "pointermove",
- "pointerleave",
- "click",
- "clickimpl"
- ],
- setup(_, { emit }) {
- const ns = useNamespace("dropdown");
- const { role: menuRole } = inject(DROPDOWN_INJECTION_KEY, void 0);
- const { collectionItemRef: rovingFocusCollectionItemRef } = inject(COLLECTION_ITEM_INJECTION_KEY, void 0);
- const { rovingFocusGroupItemRef, tabIndex, handleFocus, handleKeydown: handleItemKeydown, handleMousedown } = inject(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, void 0);
- const itemRef = composeRefs(rovingFocusCollectionItemRef, rovingFocusGroupItemRef);
- const role = computed(() => {
- if (menuRole.value === "menu") return "menuitem";
- else if (menuRole.value === "navigation") return "link";
- return "button";
- });
- const handleKeydown = composeEventHandlers((e) => {
- const code = getEventCode(e);
- if ([
- EVENT_CODE.enter,
- EVENT_CODE.numpadEnter,
- EVENT_CODE.space
- ].includes(code)) {
- e.preventDefault();
- e.stopImmediatePropagation();
- emit("clickimpl", e);
- return true;
- }
- }, handleItemKeydown);
- return {
- ns,
- itemRef,
- dataset: { [COLLECTION_ITEM_SIGN]: "" },
- role,
- tabIndex,
- handleFocus,
- handleKeydown,
- handleMousedown
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item-impl.mjs
- var _hoisted_1$39 = [
- "aria-disabled",
- "tabindex",
- "role"
- ];
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_icon = resolveComponent("el-icon");
- return openBlock(), createElementBlock(Fragment, null, [_ctx.divided ? (openBlock(), createElementBlock("li", {
- key: 0,
- role: "separator",
- class: normalizeClass(_ctx.ns.bem("menu", "item", "divided"))
- }, null, 2)) : createCommentVNode("v-if", true), createBaseVNode("li", mergeProps({ ref: _ctx.itemRef }, {
- ..._ctx.dataset,
- ..._ctx.$attrs
- }, {
- "aria-disabled": _ctx.disabled,
- class: [_ctx.ns.be("menu", "item"), _ctx.ns.is("disabled", _ctx.disabled)],
- tabindex: _ctx.tabIndex,
- role: _ctx.role,
- onClick: _cache[0] || (_cache[0] = (e) => _ctx.$emit("clickimpl", e)),
- onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
- onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])),
- onMousedown: _cache[3] || (_cache[3] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
- onPointermove: _cache[4] || (_cache[4] = (e) => _ctx.$emit("pointermove", e)),
- onPointerleave: _cache[5] || (_cache[5] = (e) => _ctx.$emit("pointerleave", e))
- }), [_ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))])]),
- _: 3
- })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$39)], 64);
- }
- var dropdown_item_impl_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_item_impl_vue_vue_type_script_lang_default, [["render", _sfc_render$10]]);
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/useDropdown.mjs
- var useDropdown = () => {
- const elDropdown = inject(DROPDOWN_INSTANCE_INJECTION_KEY, {});
- return {
- elDropdown,
- _elDropdownSize: computed(() => elDropdown?.dropdownSize)
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs
- var dropdown_item_vue_vue_type_script_lang_default = defineComponent({
- name: "ElDropdownItem",
- components: {
- ElRovingFocusItem: roving_focus_item_default,
- ElDropdownItemImpl: dropdown_item_impl_default
- },
- inheritAttrs: false,
- props: dropdownItemProps,
- emits: [
- "pointermove",
- "pointerleave",
- "click"
- ],
- setup(props, { emit, attrs }) {
- const { elDropdown } = useDropdown();
- const _instance = getCurrentInstance();
- const { onItemEnter, onItemLeave } = inject(DROPDOWN_INJECTION_KEY, void 0);
- const handlePointerMove = composeEventHandlers((e) => {
- emit("pointermove", e);
- return e.defaultPrevented;
- }, whenMouse((e) => {
- if (props.disabled) {
- onItemLeave(e);
- return;
- }
- const target = e.currentTarget;
- /**
- * This handles the following scenario:
- * when the item contains a form element such as input element
- * when the mouse is moving over the element itself which is contained by
- * the item, the default focusing logic should be prevented so that
- * it won't cause weird action.
- */
- if (target === document.activeElement || target.contains(document.activeElement)) return;
- onItemEnter(e);
- if (!e.defaultPrevented) target?.focus({ preventScroll: true });
- }));
- const handlePointerLeave = composeEventHandlers((e) => {
- emit("pointerleave", e);
- return e.defaultPrevented;
- }, whenMouse(onItemLeave));
- return {
- handleClick: composeEventHandlers((e) => {
- if (props.disabled) return;
- emit("click", e);
- return e.type !== "keydown" && e.defaultPrevented;
- }, (e) => {
- if (props.disabled) {
- e.stopImmediatePropagation();
- return;
- }
- if (elDropdown?.hideOnClick?.value) elDropdown.handleClick?.();
- elDropdown.commandHandler?.(props.command, _instance, e);
- }),
- handlePointerMove,
- handlePointerLeave,
- propsAndAttrs: computed(() => ({
- ...props,
- ...attrs
- }))
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_dropdown_item_impl = resolveComponent("el-dropdown-item-impl");
- const _component_el_roving_focus_item = resolveComponent("el-roving-focus-item");
- return openBlock(), createBlock(_component_el_roving_focus_item, { focusable: !_ctx.disabled }, {
- default: withCtx(() => [createVNode(_component_el_dropdown_item_impl, mergeProps(_ctx.propsAndAttrs, {
- onPointerleave: _ctx.handlePointerLeave,
- onPointermove: _ctx.handlePointerMove,
- onClickimpl: _ctx.handleClick
- }), createSlots({
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 2
- }, [_ctx.$slots.icon ? {
- name: "icon",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
- key: "0"
- } : void 0]), 1040, [
- "onPointerleave",
- "onPointermove",
- "onClickimpl"
- ])]),
- _: 3
- }, 8, ["focusable"]);
- }
- var dropdown_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_item_vue_vue_type_script_lang_default, [["render", _sfc_render$9]]);
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs
- var dropdown_menu_vue_vue_type_script_lang_default = defineComponent({
- name: "ElDropdownMenu",
- props: dropdownMenuProps,
- setup(props) {
- const ns = useNamespace("dropdown");
- const { _elDropdownSize } = useDropdown();
- const size = _elDropdownSize.value;
- const { contentRef, role, triggerId, isUsingKeyboard, handleClose } = inject(DROPDOWN_INJECTION_KEY, void 0);
- const { rovingFocusGroupRef, rovingFocusGroupRootStyle, onBlur, onFocus, onKeydown, onMousedown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
- const { collectionRef: rovingFocusGroupCollectionRef } = inject(COLLECTION_INJECTION_KEY, void 0);
- const dropdownKls = computed(() => {
- return [ns.b("menu"), ns.bm("menu", size?.value)];
- });
- const dropdownListWrapperRef = composeRefs(contentRef, rovingFocusGroupRef, rovingFocusGroupCollectionRef);
- const handleKeydown = composeEventHandlers((e) => {
- props.onKeydown?.(e);
- }, (e) => {
- const { currentTarget, target } = e;
- const code = getEventCode(e);
- if (currentTarget.contains(target)) {}
- if (EVENT_CODE.tab === code) return handleClose();
- onKeydown(e);
- });
- function handleFocus(e) {
- isUsingKeyboard.value && onFocus(e);
- }
- return {
- size,
- rovingFocusGroupRootStyle,
- dropdownKls,
- role,
- triggerId,
- dropdownListWrapperRef,
- handleKeydown,
- onBlur,
- handleFocus,
- onMousedown
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/src/dropdown-menu.mjs
- var _hoisted_1$38 = ["role", "aria-labelledby"];
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
- return openBlock(), createElementBlock("ul", {
- ref: _ctx.dropdownListWrapperRef,
- class: normalizeClass(_ctx.dropdownKls),
- style: normalizeStyle(_ctx.rovingFocusGroupRootStyle),
- tabindex: -1,
- role: _ctx.role,
- "aria-labelledby": _ctx.triggerId,
- onFocusin: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
- onFocusout: _cache[1] || (_cache[1] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
- onKeydown: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args), ["self"])),
- onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.onMousedown && _ctx.onMousedown(...args), ["self"]))
- }, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_1$38);
- }
- var dropdown_menu_default = /* @__PURE__ */ _plugin_vue_export_helper_default(dropdown_menu_vue_vue_type_script_lang_default, [["render", _sfc_render$8]]);
- //#endregion
- //#region node_modules/element-plus/es/components/dropdown/index.mjs
- var ElDropdown = withInstall(dropdown_default, {
- DropdownItem: dropdown_item_default,
- DropdownMenu: dropdown_menu_default
- });
- var ElDropdownItem = withNoopInstall(dropdown_item_default);
- var ElDropdownMenu = withNoopInstall(dropdown_menu_default);
- //#endregion
- //#region node_modules/element-plus/es/components/empty/src/empty.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `EmptyProps` instead.
- */
- var emptyProps = buildProps({
- image: {
- type: String,
- default: ""
- },
- imageSize: Number,
- description: {
- type: String,
- default: ""
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/empty/src/img-empty.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$37 = {
- viewBox: "0 0 79 86",
- version: "1.1",
- xmlns: "http://www.w3.org/2000/svg",
- "xmlns:xlink": "http://www.w3.org/1999/xlink"
- };
- var _hoisted_2$23 = ["id"];
- var _hoisted_3$8 = ["stop-color"];
- var _hoisted_4$6 = ["stop-color"];
- var _hoisted_5$4 = ["id"];
- var _hoisted_6$1 = ["stop-color"];
- var _hoisted_7 = ["stop-color"];
- var _hoisted_8 = ["id"];
- var _hoisted_9 = {
- stroke: "none",
- "stroke-width": "1",
- fill: "none",
- "fill-rule": "evenodd"
- };
- var _hoisted_10 = { transform: "translate(-1268.000000, -535.000000)" };
- var _hoisted_11 = { transform: "translate(1268.000000, 535.000000)" };
- var _hoisted_12 = ["fill"];
- var _hoisted_13 = ["fill"];
- var _hoisted_14 = { transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)" };
- var _hoisted_15 = ["fill"];
- var _hoisted_16 = ["fill"];
- var _hoisted_17 = ["fill"];
- var _hoisted_18 = ["fill"];
- var _hoisted_19 = ["fill"];
- var _hoisted_20 = { transform: "translate(53.000000, 45.000000)" };
- var _hoisted_21 = ["fill", "xlink:href"];
- var _hoisted_22 = ["fill", "mask"];
- var _hoisted_23 = ["fill"];
- //#endregion
- //#region node_modules/element-plus/es/components/empty/src/img-empty.mjs
- var img_empty_default = /* @__PURE__ */ defineComponent({
- name: "ImgEmpty",
- __name: "img-empty",
- setup(__props) {
- const ns = useNamespace("empty");
- const id = useId();
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("svg", _hoisted_1$37, [createBaseVNode("defs", null, [
- createBaseVNode("linearGradient", {
- id: `linearGradient-1-${unref(id)}`,
- x1: "38.8503086%",
- y1: "0%",
- x2: "61.1496914%",
- y2: "100%"
- }, [createBaseVNode("stop", {
- "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
- offset: "0%"
- }, null, 8, _hoisted_3$8), createBaseVNode("stop", {
- "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-4")})`,
- offset: "100%"
- }, null, 8, _hoisted_4$6)], 8, _hoisted_2$23),
- createBaseVNode("linearGradient", {
- id: `linearGradient-2-${unref(id)}`,
- x1: "0%",
- y1: "9.5%",
- x2: "100%",
- y2: "90.5%"
- }, [createBaseVNode("stop", {
- "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-1")})`,
- offset: "0%"
- }, null, 8, _hoisted_6$1), createBaseVNode("stop", {
- "stop-color": `var(${unref(ns).cssVarBlockName("fill-color-6")})`,
- offset: "100%"
- }, null, 8, _hoisted_7)], 8, _hoisted_5$4),
- createBaseVNode("rect", {
- id: `path-3-${unref(id)}`,
- x: "0",
- y: "0",
- width: "17",
- height: "36"
- }, null, 8, _hoisted_8)
- ]), createBaseVNode("g", _hoisted_9, [createBaseVNode("g", _hoisted_10, [createBaseVNode("g", _hoisted_11, [
- createBaseVNode("path", {
- d: "M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",
- fill: `var(${unref(ns).cssVarBlockName("fill-color-3")})`
- }, null, 8, _hoisted_12),
- createBaseVNode("polygon", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
- transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
- points: "13 58 53 58 42 45 2 45"
- }, null, 8, _hoisted_13),
- createBaseVNode("g", _hoisted_14, [
- createBaseVNode("polygon", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-7")})`,
- transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
- points: "2.84078316e-14 3 18 3 23 7 5 7"
- }, null, 8, _hoisted_15),
- createBaseVNode("polygon", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-5")})`,
- points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
- }, null, 8, _hoisted_16),
- createBaseVNode("rect", {
- fill: `url(#linearGradient-1-${unref(id)})`,
- transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
- x: "38",
- y: "7",
- width: "17",
- height: "36"
- }, null, 8, _hoisted_17),
- createBaseVNode("polygon", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
- transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
- points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
- }, null, 8, _hoisted_18)
- ]),
- createBaseVNode("rect", {
- fill: `url(#linearGradient-2-${unref(id)})`,
- x: "13",
- y: "45",
- width: "40",
- height: "36"
- }, null, 8, _hoisted_19),
- createBaseVNode("g", _hoisted_20, [createBaseVNode("use", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-8")})`,
- transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
- "xlink:href": `#path-3-${unref(id)}`
- }, null, 8, _hoisted_21), createBaseVNode("polygon", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-9")})`,
- mask: `url(#mask-4-${unref(id)})`,
- transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
- points: "7 0 24 0 20 18 7 16.5"
- }, null, 8, _hoisted_22)]),
- createBaseVNode("polygon", {
- fill: `var(${unref(ns).cssVarBlockName("fill-color-2")})`,
- transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
- points: "62 45 79 45 70 58 53 58"
- }, null, 8, _hoisted_23)
- ])])])]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/empty/src/empty.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$36 = ["src"];
- var _hoisted_2$22 = { key: 1 };
- //#endregion
- //#region node_modules/element-plus/es/components/empty/index.mjs
- var ElEmpty = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElEmpty",
- __name: "empty",
- props: emptyProps,
- setup(__props) {
- const props = __props;
- const { t } = useLocale();
- const ns = useNamespace("empty");
- const emptyDescription = computed(() => props.description || t("el.table.emptyText"));
- const imageStyle = computed(() => ({ width: addUnit(props.imageSize) }));
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
- createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("image")),
- style: normalizeStyle(imageStyle.value)
- }, [__props.image ? (openBlock(), createElementBlock("img", {
- key: 0,
- src: __props.image,
- ondragstart: "return false"
- }, null, 8, _hoisted_1$36)) : renderSlot(_ctx.$slots, "image", { key: 1 }, () => [createVNode(img_empty_default)])], 6),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("description")) }, [_ctx.$slots.description ? renderSlot(_ctx.$slots, "description", { key: 0 }) : (openBlock(), createElementBlock("p", _hoisted_2$22, toDisplayString(emptyDescription.value), 1))], 2),
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("bottom"))
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/image/src/image.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ImageProps` instead.
- */
- var imageProps = buildProps({
- hideOnClickModal: Boolean,
- src: {
- type: String,
- default: ""
- },
- fit: {
- type: String,
- values: [
- "",
- "contain",
- "cover",
- "fill",
- "none",
- "scale-down"
- ],
- default: ""
- },
- loading: {
- type: String,
- values: ["eager", "lazy"]
- },
- lazy: Boolean,
- scrollContainer: { type: definePropType([String, Object]) },
- previewSrcList: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- previewTeleported: Boolean,
- zIndex: { type: Number },
- initialIndex: {
- type: Number,
- default: 0
- },
- infinite: {
- type: Boolean,
- default: true
- },
- closeOnPressEscape: {
- type: Boolean,
- default: true
- },
- zoomRate: {
- type: Number,
- default: 1.2
- },
- scale: {
- type: Number,
- default: 1
- },
- minScale: {
- type: Number,
- default: .2
- },
- maxScale: {
- type: Number,
- default: 7
- },
- showProgress: Boolean,
- crossorigin: { type: definePropType(String) }
- });
- var imageEmits = {
- load: (evt) => evt instanceof Event,
- error: (evt) => evt instanceof Event,
- switch: (val) => isNumber(val),
- close: () => true,
- show: () => true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/image-viewer/src/image-viewer.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ImageViewerProps` instead.
- */
- var imageViewerProps = buildProps({
- urlList: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- zIndex: { type: Number },
- initialIndex: {
- type: Number,
- default: 0
- },
- infinite: {
- type: Boolean,
- default: true
- },
- hideOnClickModal: Boolean,
- teleported: Boolean,
- closeOnPressEscape: {
- type: Boolean,
- default: true
- },
- zoomRate: {
- type: Number,
- default: 1.2
- },
- scale: {
- type: Number,
- default: 1
- },
- minScale: {
- type: Number,
- default: .2
- },
- maxScale: {
- type: Number,
- default: 7
- },
- showProgress: Boolean,
- crossorigin: { type: definePropType(String) }
- });
- var imageViewerEmits = {
- close: () => true,
- error: (evt) => evt instanceof Event,
- switch: (index) => isNumber(index),
- rotate: (deg) => isNumber(deg)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$35 = ["src", "crossorigin"];
- //#endregion
- //#region node_modules/element-plus/es/components/image-viewer/index.mjs
- var ElImageViewer = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElImageViewer",
- __name: "image-viewer",
- props: imageViewerProps,
- emits: imageViewerEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const modes = {
- CONTAIN: {
- name: "contain",
- icon: markRaw(full_screen_default)
- },
- ORIGINAL: {
- name: "original",
- icon: markRaw(scale_to_original_default)
- }
- };
- const props = __props;
- const emit = __emit;
- let stopWheelListener;
- const { t } = useLocale();
- const ns = useNamespace("image-viewer");
- const { nextZIndex } = useZIndex();
- const wrapper = ref();
- const imgRef = ref();
- const scopeEventListener = effectScope();
- const scaleClamped = computed(() => {
- const { scale, minScale, maxScale } = props;
- return clamp$1(scale, minScale, maxScale);
- });
- const loading = ref(true);
- const loadError = ref(false);
- const visible = ref(false);
- const activeIndex = ref(props.initialIndex);
- const mode = shallowRef(modes.CONTAIN);
- const transform = ref({
- scale: scaleClamped.value,
- deg: 0,
- offsetX: 0,
- offsetY: 0,
- enableTransition: false
- });
- const zIndex = ref(props.zIndex ?? nextZIndex());
- useLockscreen(visible, { ns });
- const isSingle = computed(() => {
- const { urlList } = props;
- return urlList.length <= 1;
- });
- const isFirst = computed(() => activeIndex.value === 0);
- const isLast = computed(() => activeIndex.value === props.urlList.length - 1);
- const currentImg = computed(() => props.urlList[activeIndex.value]);
- const arrowPrevKls = computed(() => [
- ns.e("btn"),
- ns.e("prev"),
- ns.is("disabled", !props.infinite && isFirst.value)
- ]);
- const arrowNextKls = computed(() => [
- ns.e("btn"),
- ns.e("next"),
- ns.is("disabled", !props.infinite && isLast.value)
- ]);
- const imgStyle = computed(() => {
- const { scale, deg, offsetX, offsetY, enableTransition } = transform.value;
- let translateX = offsetX / scale;
- let translateY = offsetY / scale;
- const radian = deg * Math.PI / 180;
- const cosRadian = Math.cos(radian);
- const sinRadian = Math.sin(radian);
- translateX = translateX * cosRadian + translateY * sinRadian;
- translateY = translateY * cosRadian - offsetX / scale * sinRadian;
- const style = {
- transform: `scale(${scale}) rotate(${deg}deg) translate(${translateX}px, ${translateY}px)`,
- transition: enableTransition ? "transform .3s" : ""
- };
- if (mode.value.name === modes.CONTAIN.name) style.maxWidth = style.maxHeight = "100%";
- return style;
- });
- const progress = computed(() => `${activeIndex.value + 1} / ${props.urlList.length}`);
- function hide() {
- unregisterEventListener();
- stopWheelListener?.();
- visible.value = false;
- emit("close");
- }
- function registerEventListener() {
- const keydownHandler = throttle((e) => {
- switch (getEventCode(e)) {
- case EVENT_CODE.esc:
- props.closeOnPressEscape && hide();
- break;
- case EVENT_CODE.space:
- toggleMode();
- break;
- case EVENT_CODE.left:
- prev();
- break;
- case EVENT_CODE.up:
- handleActions("zoomIn");
- break;
- case EVENT_CODE.right:
- next();
- break;
- case EVENT_CODE.down:
- handleActions("zoomOut");
- break;
- }
- });
- const mousewheelHandler = throttle((e) => {
- handleActions((e.deltaY || e.deltaX) < 0 ? "zoomIn" : "zoomOut", {
- zoomRate: props.zoomRate,
- enableTransition: false
- });
- });
- scopeEventListener.run(() => {
- useEventListener(document, "keydown", keydownHandler);
- useEventListener(wrapper, "wheel", mousewheelHandler);
- });
- }
- function unregisterEventListener() {
- scopeEventListener.stop();
- }
- function handleImgLoad() {
- loading.value = false;
- }
- function handleImgError(e) {
- loadError.value = true;
- loading.value = false;
- emit("error", e);
- e.target.alt = t("el.image.error");
- }
- function handleMouseDown(e) {
- if (loading.value || e.button !== 0 || !wrapper.value) return;
- transform.value.enableTransition = false;
- const { offsetX, offsetY } = transform.value;
- const startX = e.pageX;
- const startY = e.pageY;
- const dragHandler = throttle((ev) => {
- transform.value = {
- ...transform.value,
- offsetX: offsetX + ev.pageX - startX,
- offsetY: offsetY + ev.pageY - startY
- };
- });
- const removeMousemove = useEventListener(document, "mousemove", dragHandler);
- const removeMouseup = useEventListener(document, "mouseup", () => {
- removeMousemove();
- removeMouseup();
- });
- e.preventDefault();
- }
- function handleTouchStart(e) {
- if (loading.value || !wrapper.value || e.touches.length !== 1) return;
- transform.value.enableTransition = false;
- const { offsetX, offsetY } = transform.value;
- const { pageX: startX, pageY: startY } = e.touches[0];
- const dragHandler = throttle((ev) => {
- const targetTouch = ev.touches[0];
- transform.value = {
- ...transform.value,
- offsetX: offsetX + targetTouch.pageX - startX,
- offsetY: offsetY + targetTouch.pageY - startY
- };
- });
- const removeTouchmove = useEventListener(document, "touchmove", dragHandler);
- const removeTouchend = useEventListener(document, "touchend", () => {
- removeTouchmove();
- removeTouchend();
- });
- e.preventDefault();
- }
- function reset() {
- transform.value = {
- scale: scaleClamped.value,
- deg: 0,
- offsetX: 0,
- offsetY: 0,
- enableTransition: false
- };
- }
- function toggleMode() {
- if (loading.value || loadError.value) return;
- const modeNames = keysOf(modes);
- const modeValues = Object.values(modes);
- const currentMode = mode.value.name;
- mode.value = modes[modeNames[(modeValues.findIndex((i) => i.name === currentMode) + 1) % modeNames.length]];
- reset();
- }
- function setActiveItem(index) {
- loadError.value = false;
- const len = props.urlList.length;
- activeIndex.value = (index + len) % len;
- }
- function prev() {
- if (isFirst.value && !props.infinite) return;
- setActiveItem(activeIndex.value - 1);
- }
- function next() {
- if (isLast.value && !props.infinite) return;
- setActiveItem(activeIndex.value + 1);
- }
- function handleActions(action, options = {}) {
- if (loading.value || loadError.value) return;
- const { minScale, maxScale } = props;
- const { zoomRate, rotateDeg, enableTransition } = {
- zoomRate: props.zoomRate,
- rotateDeg: 90,
- enableTransition: true,
- ...options
- };
- switch (action) {
- case "zoomOut":
- if (transform.value.scale > minScale) transform.value.scale = Number.parseFloat((transform.value.scale / zoomRate).toFixed(3));
- break;
- case "zoomIn":
- if (transform.value.scale < maxScale) transform.value.scale = Number.parseFloat((transform.value.scale * zoomRate).toFixed(3));
- break;
- case "clockwise":
- transform.value.deg += rotateDeg;
- emit("rotate", transform.value.deg);
- break;
- case "anticlockwise":
- transform.value.deg -= rotateDeg;
- emit("rotate", transform.value.deg);
- break;
- }
- transform.value.enableTransition = enableTransition;
- }
- function onFocusoutPrevented(event) {
- if (event.detail?.focusReason === "pointer") event.preventDefault();
- }
- function onCloseRequested() {
- if (props.closeOnPressEscape) hide();
- }
- function wheelHandler(e) {
- if (!e.ctrlKey) return;
- if (e.deltaY < 0) {
- e.preventDefault();
- return false;
- } else if (e.deltaY > 0) {
- e.preventDefault();
- return false;
- }
- }
- watch(() => scaleClamped.value, (val) => {
- transform.value.scale = val;
- });
- watch(currentImg, () => {
- nextTick(() => {
- if (!imgRef.value?.complete) loading.value = true;
- });
- });
- watch(activeIndex, (val) => {
- reset();
- emit("switch", val);
- });
- onMounted(() => {
- visible.value = true;
- registerEventListener();
- stopWheelListener = useEventListener("wheel", wheelHandler, { passive: false });
- });
- __expose({ setActiveItem });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTeleport), {
- to: "body",
- disabled: !__props.teleported
- }, {
- default: withCtx(() => [createVNode(Transition, {
- name: "viewer-fade",
- appear: ""
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref_key: "wrapper",
- ref: wrapper,
- tabindex: -1,
- class: normalizeClass(unref(ns).e("wrapper")),
- style: normalizeStyle({ zIndex: zIndex.value })
- }, [createVNode(unref(focus_trap_default$1), {
- loop: "",
- trapped: "",
- "focus-trap-el": wrapper.value,
- "focus-start-el": "container",
- onFocusoutPrevented,
- onReleaseRequested: onCloseRequested
- }, {
- default: withCtx(() => [
- createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("mask")),
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => __props.hideOnClickModal && hide(), ["self"]))
- }, null, 2),
- createCommentVNode(" CLOSE "),
- createBaseVNode("span", {
- class: normalizeClass([unref(ns).e("btn"), unref(ns).e("close")]),
- onClick: hide
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- })], 2),
- createCommentVNode(" ARROW "),
- !isSingle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createBaseVNode("span", {
- class: normalizeClass(arrowPrevKls.value),
- onClick: prev
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_left_default))]),
- _: 1
- })], 2), createBaseVNode("span", {
- class: normalizeClass(arrowNextKls.value),
- onClick: next
- }, [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })], 2)], 64)) : createCommentVNode("v-if", true),
- _ctx.$slots.progress || __props.showProgress ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([unref(ns).e("btn"), unref(ns).e("progress")])
- }, [renderSlot(_ctx.$slots, "progress", {
- activeIndex: activeIndex.value,
- total: __props.urlList.length
- }, () => [createTextVNode(toDisplayString(progress.value), 1)])], 2)) : createCommentVNode("v-if", true),
- createCommentVNode(" ACTIONS "),
- createBaseVNode("div", { class: normalizeClass([unref(ns).e("btn"), unref(ns).e("actions")]) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("actions__inner")) }, [renderSlot(_ctx.$slots, "toolbar", {
- actions: handleActions,
- prev,
- next,
- reset: toggleMode,
- activeIndex: activeIndex.value,
- setActiveItem
- }, () => [
- createVNode(unref(ElIcon), { onClick: _cache[1] || (_cache[1] = ($event) => handleActions("zoomOut")) }, {
- default: withCtx(() => [createVNode(unref(zoom_out_default))]),
- _: 1
- }),
- createVNode(unref(ElIcon), { onClick: _cache[2] || (_cache[2] = ($event) => handleActions("zoomIn")) }, {
- default: withCtx(() => [createVNode(unref(zoom_in_default))]),
- _: 1
- }),
- createBaseVNode("i", { class: normalizeClass(unref(ns).e("actions__divider")) }, null, 2),
- createVNode(unref(ElIcon), { onClick: toggleMode }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(mode.value.icon)))]),
- _: 1
- }),
- createBaseVNode("i", { class: normalizeClass(unref(ns).e("actions__divider")) }, null, 2),
- createVNode(unref(ElIcon), { onClick: _cache[3] || (_cache[3] = ($event) => handleActions("anticlockwise")) }, {
- default: withCtx(() => [createVNode(unref(refresh_left_default))]),
- _: 1
- }),
- createVNode(unref(ElIcon), { onClick: _cache[4] || (_cache[4] = ($event) => handleActions("clockwise")) }, {
- default: withCtx(() => [createVNode(unref(refresh_right_default))]),
- _: 1
- })
- ])], 2)], 2),
- createCommentVNode(" CANVAS "),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("canvas")) }, [loadError.value && _ctx.$slots["viewer-error"] ? renderSlot(_ctx.$slots, "viewer-error", {
- key: 0,
- activeIndex: activeIndex.value,
- src: currentImg.value
- }) : (openBlock(), createElementBlock("img", {
- ref_key: "imgRef",
- ref: imgRef,
- key: currentImg.value,
- src: currentImg.value,
- style: normalizeStyle(imgStyle.value),
- class: normalizeClass(unref(ns).e("img")),
- crossorigin: __props.crossorigin,
- onLoad: handleImgLoad,
- onError: handleImgError,
- onMousedown: handleMouseDown,
- onTouchstart: handleTouchStart
- }, null, 46, _hoisted_1$35))], 2),
- renderSlot(_ctx.$slots, "default")
- ]),
- _: 3
- }, 8, ["focus-trap-el"])], 6)]),
- _: 3
- })]),
- _: 3
- }, 8, ["disabled"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/image/src/image.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$34 = [
- "src",
- "loading",
- "crossorigin"
- ];
- var _hoisted_2$21 = { key: 0 };
- //#endregion
- //#region node_modules/element-plus/es/components/image/index.mjs
- var ElImage = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElImage",
- inheritAttrs: false,
- __name: "image",
- props: imageProps,
- emits: imageEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { t } = useLocale();
- const ns = useNamespace("image");
- const rawAttrs = useAttrs$1();
- const containerAttrs = computed(() => {
- return fromPairs(Object.entries(rawAttrs).filter(([key]) => /^(data-|on[A-Z])/i.test(key) || ["id", "style"].includes(key)));
- });
- const imgAttrs = useAttrs({
- excludeListeners: true,
- excludeKeys: computed(() => {
- return Object.keys(containerAttrs.value);
- })
- });
- const imageSrc = ref();
- const hasLoadError = ref(false);
- const isLoading = ref(true);
- const showViewer = ref(false);
- const container = ref();
- const _scrollContainer = ref();
- const supportLoading = isClient && "loading" in HTMLImageElement.prototype;
- let stopScrollListener;
- const imageKls = computed(() => [
- ns.e("inner"),
- preview.value && ns.e("preview"),
- isLoading.value && ns.is("loading")
- ]);
- const imageStyle = computed(() => {
- const { fit } = props;
- if (isClient && fit) return { objectFit: fit };
- return {};
- });
- const preview = computed(() => {
- const { previewSrcList } = props;
- return isArray$1(previewSrcList) && previewSrcList.length > 0;
- });
- const imageIndex = computed(() => {
- const { previewSrcList, initialIndex } = props;
- let previewIndex = initialIndex;
- if (initialIndex > previewSrcList.length - 1) previewIndex = 0;
- return previewIndex;
- });
- const isManual = computed(() => {
- if (props.loading === "eager") return false;
- return !supportLoading && props.loading === "lazy" || props.lazy;
- });
- const loadImage = () => {
- if (!isClient) return;
- isLoading.value = true;
- hasLoadError.value = false;
- imageSrc.value = props.src;
- };
- function handleLoad(event) {
- isLoading.value = false;
- hasLoadError.value = false;
- emit("load", event);
- }
- function handleError(event) {
- isLoading.value = false;
- hasLoadError.value = true;
- emit("error", event);
- }
- function handleLazyLoad(isIntersecting) {
- if (isIntersecting) {
- loadImage();
- removeLazyLoadListener();
- }
- }
- const lazyLoadHandler = useThrottleFn(handleLazyLoad, 200, true);
- async function addLazyLoadListener() {
- if (!isClient) return;
- await nextTick();
- const { scrollContainer } = props;
- if (isElement$1(scrollContainer)) _scrollContainer.value = scrollContainer;
- else if (isString(scrollContainer) && scrollContainer !== "") _scrollContainer.value = document.querySelector(scrollContainer) ?? void 0;
- else if (container.value) {
- const scrollContainer = getScrollContainer(container.value);
- _scrollContainer.value = isWindow(scrollContainer) ? void 0 : scrollContainer;
- }
- const { stop } = useIntersectionObserver(container, ([entry]) => {
- lazyLoadHandler(entry.isIntersecting);
- }, { root: _scrollContainer });
- stopScrollListener = stop;
- }
- function removeLazyLoadListener() {
- if (!isClient || !lazyLoadHandler) return;
- stopScrollListener?.();
- _scrollContainer.value = void 0;
- stopScrollListener = void 0;
- }
- function clickHandler() {
- if (!preview.value) return;
- showViewer.value = true;
- emit("show");
- }
- function closeViewer() {
- showViewer.value = false;
- emit("close");
- }
- function switchViewer(val) {
- emit("switch", val);
- }
- watch(() => props.src, () => {
- if (isManual.value) {
- isLoading.value = true;
- hasLoadError.value = false;
- removeLazyLoadListener();
- addLazyLoadListener();
- } else loadImage();
- });
- onMounted(() => {
- if (isManual.value) addLazyLoadListener();
- else loadImage();
- });
- __expose({ showPreview: clickHandler });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", mergeProps({
- ref_key: "container",
- ref: container
- }, containerAttrs.value, { class: [unref(ns).b(), _ctx.$attrs.class] }), [hasLoadError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("error")) }, toDisplayString(unref(t)("el.image.error")), 3)]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [imageSrc.value !== void 0 ? (openBlock(), createElementBlock("img", mergeProps({ key: 0 }, unref(imgAttrs), {
- src: imageSrc.value,
- loading: __props.loading,
- style: imageStyle.value,
- class: imageKls.value,
- crossorigin: __props.crossorigin,
- onClick: clickHandler,
- onLoad: handleLoad,
- onError: handleError
- }), null, 16, _hoisted_1$34)) : createCommentVNode("v-if", true), isLoading.value ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("wrapper"))
- }, [renderSlot(_ctx.$slots, "placeholder", {}, () => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("placeholder")) }, null, 2)])], 2)) : createCommentVNode("v-if", true)], 64)), preview.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [showViewer.value ? (openBlock(), createBlock(unref(ElImageViewer), {
- key: 0,
- "z-index": __props.zIndex,
- "initial-index": imageIndex.value,
- infinite: __props.infinite,
- "zoom-rate": __props.zoomRate,
- "min-scale": __props.minScale,
- "max-scale": __props.maxScale,
- "show-progress": __props.showProgress,
- "url-list": __props.previewSrcList,
- scale: __props.scale,
- crossorigin: __props.crossorigin,
- "hide-on-click-modal": __props.hideOnClickModal,
- teleported: __props.previewTeleported,
- "close-on-press-escape": __props.closeOnPressEscape,
- onClose: closeViewer,
- onSwitch: switchViewer
- }, createSlots({
- toolbar: withCtx((toolbar) => [renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbar)))]),
- default: withCtx(() => [_ctx.$slots.viewer ? (openBlock(), createElementBlock("div", _hoisted_2$21, [renderSlot(_ctx.$slots, "viewer")])) : createCommentVNode("v-if", true)]),
- _: 2
- }, [_ctx.$slots.progress ? {
- name: "progress",
- fn: withCtx((progress) => [renderSlot(_ctx.$slots, "progress", normalizeProps(guardReactiveProps(progress)))]),
- key: "0"
- } : void 0, _ctx.$slots["viewer-error"] ? {
- name: "viewer-error",
- fn: withCtx((viewerError) => [renderSlot(_ctx.$slots, "viewer-error", normalizeProps(guardReactiveProps(viewerError)))]),
- key: "1"
- } : void 0]), 1032, [
- "z-index",
- "initial-index",
- "infinite",
- "zoom-rate",
- "min-scale",
- "max-scale",
- "show-progress",
- "url-list",
- "scale",
- "crossorigin",
- "hide-on-click-modal",
- "teleported",
- "close-on-press-escape"
- ])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true)], 16);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/input-number/src/input-number.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `InputNumberProps` instead.
- */
- var inputNumberProps = buildProps({
- id: {
- type: String,
- default: void 0
- },
- step: {
- type: Number,
- default: 1
- },
- stepStrictly: Boolean,
- max: {
- type: Number,
- default: Number.MAX_SAFE_INTEGER
- },
- min: {
- type: Number,
- default: Number.MIN_SAFE_INTEGER
- },
- modelValue: { type: [Number, null] },
- readonly: Boolean,
- disabled: {
- type: Boolean,
- default: void 0
- },
- size: useSizeProp,
- controls: {
- type: Boolean,
- default: true
- },
- controlsPosition: {
- type: String,
- default: "",
- values: ["", "right"]
- },
- valueOnClear: {
- type: definePropType([
- String,
- Number,
- null
- ]),
- validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val),
- default: null
- },
- name: String,
- placeholder: String,
- precision: {
- type: Number,
- validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- ...useAriaProps(["ariaLabel"]),
- inputmode: {
- type: definePropType(String),
- default: void 0
- },
- align: {
- type: definePropType(String),
- default: "center"
- },
- disabledScientific: Boolean
- });
- var inputNumberEmits = {
- [CHANGE_EVENT]: (cur, prev) => prev !== cur,
- blur: (e) => e instanceof FocusEvent,
- focus: (e) => e instanceof FocusEvent,
- [INPUT_EVENT]: (val) => isNumber(val) || isNil(val),
- [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$33 = ["aria-label"];
- var _hoisted_2$20 = ["aria-label"];
- //#endregion
- //#region node_modules/element-plus/es/components/input-number/index.mjs
- var ElInputNumber = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElInputNumber",
- __name: "input-number",
- props: inputNumberProps,
- emits: inputNumberEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { t } = useLocale();
- const ns = useNamespace("input-number");
- const input = ref();
- const data = reactive({
- currentValue: props.modelValue,
- userInput: null
- });
- const { formItem } = useFormItem();
- const minDisabled = computed(() => isNumber(props.modelValue) && props.modelValue <= props.min);
- const maxDisabled = computed(() => isNumber(props.modelValue) && props.modelValue >= props.max);
- const numPrecision = computed(() => {
- const stepPrecision = getPrecision(props.step);
- if (!isUndefined(props.precision)) {
- if (stepPrecision > props.precision) debugWarn("InputNumber", "precision should not be less than the decimal places of step");
- return props.precision;
- } else return Math.max(getPrecision(props.modelValue), stepPrecision);
- });
- const controlsAtRight = computed(() => {
- return props.controls && props.controlsPosition === "right";
- });
- const inputNumberSize = useFormSize();
- const inputNumberDisabled = useFormDisabled();
- const displayValue = computed(() => {
- if (data.userInput !== null) return data.userInput;
- let currentValue = data.currentValue;
- if (isNil(currentValue)) return "";
- if (isNumber(currentValue)) {
- if (Number.isNaN(currentValue)) return "";
- if (!isUndefined(props.precision)) currentValue = currentValue.toFixed(props.precision);
- }
- return currentValue;
- });
- const toPrecision = (num, pre) => {
- if (isUndefined(pre)) pre = numPrecision.value;
- if (pre === 0) return Math.round(num);
- let snum = String(num);
- const pointPos = snum.indexOf(".");
- if (pointPos === -1) return num;
- if (!snum.replace(".", "").split("")[pointPos + pre]) return num;
- const length = snum.length;
- if (snum.charAt(length - 1) === "5") snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
- return Number.parseFloat(Number(snum).toFixed(pre));
- };
- const getPrecision = (value) => {
- if (isNil(value)) return 0;
- const valueString = value.toString();
- const dotPosition = valueString.indexOf(".");
- let precision = 0;
- if (dotPosition !== -1) precision = valueString.length - dotPosition - 1;
- return precision;
- };
- const ensurePrecision = (val, coefficient = 1) => {
- if (!isNumber(val)) return data.currentValue;
- if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {
- debugWarn("InputNumber", "The value has reached the maximum safe integer limit.");
- return val;
- } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {
- debugWarn("InputNumber", "The value has reached the minimum safe integer limit.");
- return val;
- }
- return toPrecision(val + props.step * coefficient);
- };
- const handleKeydown = (event) => {
- const code = getEventCode(event);
- const key = getEventKey(event);
- if (props.disabledScientific && ["e", "E"].includes(key)) {
- event.preventDefault();
- return;
- }
- switch (code) {
- case EVENT_CODE.up:
- event.preventDefault();
- increase();
- break;
- case EVENT_CODE.down:
- event.preventDefault();
- decrease();
- break;
- }
- };
- const increase = () => {
- if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return;
- setCurrentValue(ensurePrecision(Number(displayValue.value) || 0));
- emit(INPUT_EVENT, data.currentValue);
- setCurrentValueToModelValue();
- };
- const decrease = () => {
- if (props.readonly || inputNumberDisabled.value || minDisabled.value) return;
- setCurrentValue(ensurePrecision(Number(displayValue.value) || 0, -1));
- emit(INPUT_EVENT, data.currentValue);
- setCurrentValueToModelValue();
- };
- const verifyValue = (value, update) => {
- const { max, min, step, precision, stepStrictly, valueOnClear } = props;
- if (max < min) throwError("InputNumber", "min should not be greater than max.");
- let newVal = Number(value);
- if (isNil(value) || Number.isNaN(newVal)) return null;
- if (value === "") {
- if (valueOnClear === null) return null;
- newVal = isString(valueOnClear) ? {
- min,
- max
- }[valueOnClear] : valueOnClear;
- }
- if (stepStrictly) {
- newVal = toPrecision(Math.round(toPrecision(newVal / step)) * step, precision);
- if (newVal !== value) update && emit("update:modelValue", newVal);
- }
- if (!isUndefined(precision)) newVal = toPrecision(newVal, precision);
- if (newVal > max || newVal < min) {
- newVal = newVal > max ? max : min;
- update && emit("update:modelValue", newVal);
- }
- return newVal;
- };
- const setCurrentValue = (value, emitChange = true) => {
- const oldVal = data.currentValue;
- const newVal = verifyValue(value);
- if (!emitChange) {
- emit(UPDATE_MODEL_EVENT, newVal);
- return;
- }
- data.userInput = null;
- if (oldVal === newVal && value) return;
- emit(UPDATE_MODEL_EVENT, newVal);
- if (oldVal !== newVal) emit(CHANGE_EVENT, newVal, oldVal);
- if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
- data.currentValue = newVal;
- };
- const handleInput = (value) => {
- data.userInput = value;
- const newVal = value === "" ? null : Number(value);
- emit(INPUT_EVENT, newVal);
- setCurrentValue(newVal, false);
- };
- const handleInputChange = (value) => {
- const newVal = value !== "" ? Number(value) : "";
- if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") setCurrentValue(newVal);
- setCurrentValueToModelValue();
- data.userInput = null;
- };
- const focus = () => {
- input.value?.focus?.();
- };
- const blur = () => {
- input.value?.blur?.();
- };
- const handleFocus = (event) => {
- emit("focus", event);
- };
- const handleBlur = (event) => {
- data.userInput = null;
- if (data.currentValue === null && input.value?.input) input.value.input.value = "";
- emit("blur", event);
- if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
- };
- const setCurrentValueToModelValue = () => {
- if (data.currentValue !== props.modelValue) data.currentValue = props.modelValue;
- };
- const handleWheel = (e) => {
- if (document.activeElement === e.target) e.preventDefault();
- };
- watch(() => props.modelValue, (value, oldValue) => {
- const newValue = verifyValue(value, true);
- if (data.userInput === null && newValue !== oldValue) data.currentValue = newValue;
- }, { immediate: true });
- watch(() => props.precision, () => {
- data.currentValue = verifyValue(props.modelValue);
- });
- onMounted(() => {
- const { min, max, modelValue } = props;
- const innerInput = input.value?.input;
- innerInput.setAttribute("role", "spinbutton");
- if (Number.isFinite(max)) innerInput.setAttribute("aria-valuemax", String(max));
- else innerInput.removeAttribute("aria-valuemax");
- if (Number.isFinite(min)) innerInput.setAttribute("aria-valuemin", String(min));
- else innerInput.removeAttribute("aria-valuemin");
- innerInput.setAttribute("aria-valuenow", data.currentValue || data.currentValue === 0 ? String(data.currentValue) : "");
- innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
- if (!isNumber(modelValue) && modelValue != null) {
- let val = Number(modelValue);
- if (Number.isNaN(val)) val = null;
- emit(UPDATE_MODEL_EVENT, val);
- }
- innerInput.addEventListener("wheel", handleWheel, { passive: false });
- });
- onUpdated(() => {
- (input.value?.input)?.setAttribute("aria-valuenow", `${data.currentValue ?? ""}`);
- });
- __expose({
- focus,
- blur
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([
- unref(ns).b(),
- unref(ns).m(unref(inputNumberSize)),
- unref(ns).is("disabled", unref(inputNumberDisabled)),
- unref(ns).is("without-controls", !__props.controls),
- unref(ns).is("controls-right", controlsAtRight.value),
- unref(ns).is(__props.align, !!__props.align)
- ]),
- onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"]))
- }, [
- __props.controls ? withDirectives((openBlock(), createElementBlock("span", {
- key: 0,
- role: "button",
- "aria-label": unref(t)("el.inputNumber.decrease"),
- class: normalizeClass([unref(ns).e("decrease"), unref(ns).is("disabled", minDisabled.value)]),
- onKeydown: withKeys(decrease, ["enter"])
- }, [renderSlot(_ctx.$slots, "decrease-icon", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_down_default), { key: 0 })) : (openBlock(), createBlock(unref(minus_default), { key: 1 }))]),
- _: 1
- })])], 42, _hoisted_1$33)), [[unref(vRepeatClick), decrease]]) : createCommentVNode("v-if", true),
- __props.controls ? withDirectives((openBlock(), createElementBlock("span", {
- key: 1,
- role: "button",
- "aria-label": unref(t)("el.inputNumber.increase"),
- class: normalizeClass([unref(ns).e("increase"), unref(ns).is("disabled", maxDisabled.value)]),
- onKeydown: withKeys(increase, ["enter"])
- }, [renderSlot(_ctx.$slots, "increase-icon", {}, () => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [controlsAtRight.value ? (openBlock(), createBlock(unref(arrow_up_default), { key: 0 })) : (openBlock(), createBlock(unref(plus_default), { key: 1 }))]),
- _: 1
- })])], 42, _hoisted_2$20)), [[unref(vRepeatClick), increase]]) : createCommentVNode("v-if", true),
- createVNode(unref(ElInput), {
- id: __props.id,
- ref_key: "input",
- ref: input,
- type: "number",
- step: __props.step,
- "model-value": displayValue.value,
- placeholder: __props.placeholder,
- readonly: __props.readonly,
- disabled: unref(inputNumberDisabled),
- size: unref(inputNumberSize),
- max: __props.max,
- min: __props.min,
- name: __props.name,
- "aria-label": __props.ariaLabel,
- "validate-event": false,
- inputmode: __props.inputmode,
- onKeydown: handleKeydown,
- onBlur: handleBlur,
- onFocus: handleFocus,
- onInput: handleInput,
- onChange: handleInputChange
- }, createSlots({ _: 2 }, [_ctx.$slots.prefix ? {
- name: "prefix",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
- key: "0"
- } : void 0, _ctx.$slots.suffix ? {
- name: "suffix",
- fn: withCtx(() => [renderSlot(_ctx.$slots, "suffix")]),
- key: "1"
- } : void 0]), 1032, [
- "id",
- "step",
- "model-value",
- "placeholder",
- "readonly",
- "disabled",
- "size",
- "max",
- "min",
- "name",
- "aria-label",
- "inputmode"
- ])
- ], 34);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/src/input-tag.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `InputTagProps` instead.
- */
- var inputTagProps = buildProps({
- modelValue: { type: definePropType(Array) },
- max: Number,
- tagType: {
- ...tagProps.type,
- default: "info"
- },
- tagEffect: tagProps.effect,
- effect: {
- type: definePropType(String),
- default: "light"
- },
- trigger: {
- type: definePropType(String),
- default: EVENT_CODE.enter
- },
- draggable: Boolean,
- delimiter: {
- type: [String, RegExp],
- default: ""
- },
- size: useSizeProp,
- clearable: Boolean,
- clearIcon: {
- type: iconPropType,
- default: circle_close_default
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- readonly: Boolean,
- autofocus: Boolean,
- id: {
- type: String,
- default: void 0
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- maxlength: { type: [String, Number] },
- minlength: { type: [String, Number] },
- placeholder: String,
- autocomplete: {
- type: definePropType(String),
- default: "off"
- },
- saveOnBlur: {
- type: Boolean,
- default: true
- },
- collapseTags: Boolean,
- collapseTagsTooltip: Boolean,
- maxCollapseTags: {
- type: Number,
- default: 1
- },
- ariaLabel: String
- });
- var inputTagEmits = {
- [UPDATE_MODEL_EVENT]: (value) => isArray$1(value) || isUndefined(value),
- [CHANGE_EVENT]: (value) => isArray$1(value) || isUndefined(value),
- [INPUT_EVENT]: (value) => isString(value),
- "add-tag": (value) => isString(value) || isArray$1(value),
- "remove-tag": (value, index) => isString(value) && isNumber(index),
- "drag-tag": (oldIndex, newIndex, value) => isNumber(oldIndex) && isNumber(newIndex) && isString(value),
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/src/composables/use-drag-tag.mjs
- function useDragTag({ wrapperRef, handleDragged, afterDragged }) {
- const ns = useNamespace("input-tag");
- const dropIndicatorRef = shallowRef();
- const showDropIndicator = ref(false);
- let draggingIndex;
- let draggingTag;
- let dropIndex;
- let dropType;
- function getTagClassName(index) {
- return `.${ns.e("inner")} .${ns.namespace.value}-tag:nth-child(${index + 1})`;
- }
- function handleDragStart(event, index) {
- draggingIndex = index;
- draggingTag = wrapperRef.value.querySelector(getTagClassName(index));
- if (draggingTag) draggingTag.style.opacity = "0.5";
- event.dataTransfer.effectAllowed = "move";
- }
- function handleDragOver(event, index) {
- dropIndex = index;
- event.preventDefault();
- event.dataTransfer.dropEffect = "move";
- if (isUndefined(draggingIndex) || draggingIndex === index) {
- showDropIndicator.value = false;
- return;
- }
- const dropPosition = wrapperRef.value.querySelector(getTagClassName(index)).getBoundingClientRect();
- const dropPrev = !(draggingIndex + 1 === index);
- const dropNext = !(draggingIndex - 1 === index);
- const distance = event.clientX - dropPosition.left;
- const prevPercent = dropPrev ? dropNext ? .5 : 1 : -1;
- const nextPercent = dropNext ? dropPrev ? .5 : 0 : 1;
- if (distance <= dropPosition.width * prevPercent) dropType = "before";
- else if (distance > dropPosition.width * nextPercent) dropType = "after";
- else dropType = void 0;
- const innerEl = wrapperRef.value.querySelector(`.${ns.e("inner")}`);
- const innerPosition = innerEl.getBoundingClientRect();
- const gap = Number.parseFloat(getStyle(innerEl, "gap")) / 2;
- const indicatorTop = dropPosition.top - innerPosition.top;
- let indicatorLeft = -9999;
- if (dropType === "before") indicatorLeft = Math.max(dropPosition.left - innerPosition.left - gap, Math.floor(-gap / 2));
- else if (dropType === "after") {
- const left = dropPosition.right - innerPosition.left;
- indicatorLeft = left + (innerPosition.width === left ? Math.floor(gap / 2) : gap);
- }
- setStyle(dropIndicatorRef.value, {
- top: `${indicatorTop}px`,
- left: `${indicatorLeft}px`
- });
- showDropIndicator.value = !!dropType;
- }
- function handleDragEnd(event) {
- event.preventDefault();
- if (draggingTag) draggingTag.style.opacity = "";
- if (dropType && !isUndefined(draggingIndex) && !isUndefined(dropIndex) && draggingIndex !== dropIndex) handleDragged(draggingIndex, dropIndex, dropType);
- showDropIndicator.value = false;
- draggingIndex = void 0;
- draggingTag = null;
- dropIndex = void 0;
- dropType = void 0;
- afterDragged?.();
- }
- return {
- dropIndicatorRef,
- showDropIndicator,
- handleDragStart,
- handleDragOver,
- handleDragEnd
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/src/composables/use-hovering.mjs
- function useHovering() {
- const hovering = ref(false);
- const handleMouseEnter = () => {
- hovering.value = true;
- };
- const handleMouseLeave = () => {
- hovering.value = false;
- };
- return {
- hovering,
- handleMouseEnter,
- handleMouseLeave
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag.mjs
- function useInputTag({ props, emit, formItem }) {
- const disabled = useFormDisabled();
- const size = useFormSize();
- const inputRef = shallowRef();
- const inputValue = ref();
- const tagTooltipRef = ref();
- const tagSize = computed(() => {
- return ["small"].includes(size.value) ? "small" : "default";
- });
- const placeholder = computed(() => {
- return props.modelValue?.length ? void 0 : props.placeholder;
- });
- const closable = computed(() => !(props.readonly || disabled.value));
- const inputLimit = computed(() => {
- return isUndefined(props.max) ? false : (props.modelValue?.length ?? 0) >= props.max;
- });
- const showTagList = computed(() => {
- return props.collapseTags ? props.modelValue?.slice(0, props.maxCollapseTags) : props.modelValue;
- });
- const collapseTagList = computed(() => {
- return props.collapseTags ? props.modelValue?.slice(props.maxCollapseTags) : [];
- });
- const addTagsEmit = (value) => {
- const list = [...props.modelValue ?? [], ...castArray$1(value)];
- emit(UPDATE_MODEL_EVENT, list);
- emit(CHANGE_EVENT, list);
- emit("add-tag", value);
- inputValue.value = void 0;
- };
- const getDelimitedTags = (input) => {
- const parts = input.split(props.delimiter);
- const tags = parts.length > 1 ? parts.map((val) => val.trim()).filter(Boolean) : [];
- if (props.max) {
- const maxInsert = props.max - (props.modelValue?.length ?? 0);
- tags.splice(maxInsert);
- }
- return tags.length === 1 ? tags[0] : tags;
- };
- const handlePaste = (event) => {
- const pasted = event.clipboardData?.getData("text");
- if (props.readonly || inputLimit.value || !props.delimiter || !pasted) return;
- const { selectionStart = 0, selectionEnd = 0, value } = event.target;
- const nextValue = value.slice(0, selectionStart) + pasted + value.slice(selectionEnd);
- const tags = getDelimitedTags(nextValue);
- if (tags.length) {
- addTagsEmit(tags);
- emit(INPUT_EVENT, nextValue);
- event.preventDefault();
- }
- };
- const handleInput = (event) => {
- if (inputLimit.value) {
- inputValue.value = void 0;
- return;
- }
- if (isComposing.value) return;
- if (props.delimiter && inputValue.value) {
- const tags = getDelimitedTags(inputValue.value);
- if (tags.length) addTagsEmit(tags);
- }
- emit(INPUT_EVENT, event.target.value);
- };
- const handleKeydown = (event) => {
- if (isComposing.value) return;
- switch (getEventCode(event)) {
- case props.trigger:
- event.preventDefault();
- event.stopPropagation();
- handleAddTag();
- break;
- case EVENT_CODE.numpadEnter:
- if (props.trigger === EVENT_CODE.enter) {
- event.preventDefault();
- event.stopPropagation();
- handleAddTag();
- }
- break;
- case EVENT_CODE.backspace:
- if (!inputValue.value && props.modelValue?.length) {
- event.preventDefault();
- event.stopPropagation();
- handleRemoveTag(props.modelValue.length - 1);
- }
- break;
- }
- };
- const handleKeyup = (event) => {
- if (isComposing.value || !isAndroid()) return;
- switch (getEventCode(event)) {
- case EVENT_CODE.space:
- if (props.trigger === EVENT_CODE.space) {
- event.preventDefault();
- event.stopPropagation();
- handleAddTag();
- }
- break;
- }
- };
- const handleAddTag = () => {
- const value = inputValue.value?.trim();
- if (!value || inputLimit.value) return;
- addTagsEmit(value);
- };
- const handleRemoveTag = (index) => {
- const value = (props.modelValue ?? []).slice();
- const [item] = value.splice(index, 1);
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value);
- emit("remove-tag", item, index);
- };
- const handleClear = () => {
- inputValue.value = void 0;
- emit(UPDATE_MODEL_EVENT, void 0);
- emit(CHANGE_EVENT, void 0);
- emit("clear");
- };
- const handleDragged = (draggingIndex, dropIndex, type) => {
- const value = (props.modelValue ?? []).slice();
- const [draggedItem] = value.splice(draggingIndex, 1);
- const step = dropIndex > draggingIndex && type === "before" ? -1 : dropIndex < draggingIndex && type === "after" ? 1 : 0;
- value.splice(dropIndex + step, 0, draggedItem);
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value);
- emit("drag-tag", draggingIndex, dropIndex + step, draggedItem);
- };
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- inputRef.value?.blur();
- };
- const { wrapperRef, isFocused } = useFocusController(inputRef, {
- disabled,
- beforeBlur(event) {
- return tagTooltipRef.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- if (props.saveOnBlur) handleAddTag();
- else inputValue.value = void 0;
- if (props.validateEvent) formItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- });
- const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: handleInput });
- watch(() => props.modelValue, () => {
- if (props.validateEvent) formItem?.validate?.(CHANGE_EVENT).catch((err) => debugWarn(err));
- });
- return {
- inputRef,
- wrapperRef,
- tagTooltipRef,
- isFocused,
- isComposing,
- inputValue,
- size,
- tagSize,
- placeholder,
- closable,
- disabled,
- inputLimit,
- showTagList,
- collapseTagList,
- handleDragged,
- handlePaste,
- handleInput,
- handleKeydown,
- handleKeyup,
- handleAddTag,
- handleRemoveTag,
- handleClear,
- handleCompositionStart,
- handleCompositionUpdate,
- handleCompositionEnd,
- focus,
- blur
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/src/composables/use-input-tag-dom.mjs
- function useInputTagDom({ props, isFocused, hovering, disabled, inputValue, size, validateState, validateIcon, needStatusIcon }) {
- const attrs = useAttrs$1();
- const slots = useSlots();
- const ns = useNamespace("input-tag");
- const nsInput = useNamespace("input");
- const collapseItemRef = ref();
- const innerRef = ref();
- const containerKls = computed(() => [
- ns.b(),
- ns.is("focused", isFocused.value),
- ns.is("hovering", hovering.value),
- ns.is("disabled", disabled.value),
- ns.m(size.value),
- ns.e("wrapper"),
- attrs.class
- ]);
- const containerStyle = computed(() => [attrs.style]);
- const innerKls = computed(() => [
- ns.e("inner"),
- ns.is("draggable", props.draggable),
- ns.is("left-space", !props.modelValue?.length && !slots.prefix),
- ns.is("right-space", !props.modelValue?.length && !showSuffix.value)
- ]);
- const showClear = computed(() => {
- return props.clearable && !disabled.value && !props.readonly && (props.modelValue?.length || inputValue.value) && (isFocused.value || hovering.value);
- });
- const showSuffix = computed(() => {
- return slots.suffix || showClear.value || validateState.value && validateIcon.value && needStatusIcon.value;
- });
- const states = reactive({
- innerWidth: 0,
- collapseItemWidth: 0
- });
- const getGapWidth = () => {
- if (!innerRef.value) return 0;
- const style = window.getComputedStyle(innerRef.value);
- return Number.parseFloat(style.gap || "6px");
- };
- const resetInnerWidth = () => {
- states.innerWidth = Number.parseFloat(window.getComputedStyle(innerRef.value).width);
- };
- const resetCollapseItemWidth = () => {
- states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
- };
- const tagStyle = computed(() => {
- if (!props.collapseTags) return {};
- const gapWidth = getGapWidth();
- const inputSlotWidth = gapWidth + 11;
- const maxWidth = collapseItemRef.value && props.maxCollapseTags === 1 ? states.innerWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.innerWidth - inputSlotWidth;
- return { maxWidth: `${Math.max(maxWidth, 0)}px` };
- });
- useResizeObserver(innerRef, resetInnerWidth);
- useResizeObserver(collapseItemRef, resetCollapseItemWidth);
- return {
- ns,
- nsInput,
- containerKls,
- containerStyle,
- innerKls,
- showClear,
- showSuffix,
- tagStyle,
- collapseItemRef,
- innerRef
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/src/input-tag.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$32 = [
- "id",
- "minlength",
- "maxlength",
- "disabled",
- "readonly",
- "autocomplete",
- "tabindex",
- "placeholder",
- "autofocus",
- "ariaLabel"
- ];
- var _hoisted_2$19 = ["textContent"];
- //#endregion
- //#region node_modules/element-plus/es/components/input-tag/index.mjs
- var ElInputTag = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElInputTag",
- inheritAttrs: false,
- __name: "input-tag",
- props: inputTagProps,
- emits: inputTagEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const attrs = useAttrs();
- const slots = useSlots();
- const { form, formItem } = useFormItem();
- const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
- const needStatusIcon = computed(() => form?.statusIcon ?? false);
- const validateState = computed(() => formItem?.validateState || "");
- const validateIcon = computed(() => {
- return validateState.value && ValidateComponentsMap[validateState.value];
- });
- const { inputRef, wrapperRef, tagTooltipRef, isFocused, inputValue, size, tagSize, placeholder, closable, disabled, showTagList, collapseTagList, handleDragged, handlePaste, handleInput, handleKeydown, handleKeyup, handleRemoveTag, handleClear, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd, focus, blur } = useInputTag({
- props,
- emit,
- formItem
- });
- const { hovering, handleMouseEnter, handleMouseLeave } = useHovering();
- const { calculatorRef, inputStyle } = useCalcInputWidth();
- const { dropIndicatorRef, showDropIndicator, handleDragStart, handleDragOver, handleDragEnd } = useDragTag({
- wrapperRef,
- handleDragged,
- afterDragged: focus
- });
- const { ns, nsInput, containerKls, containerStyle, innerKls, showClear, showSuffix, tagStyle, collapseItemRef, innerRef } = useInputTagDom({
- props,
- hovering,
- isFocused,
- inputValue,
- disabled,
- size,
- validateState,
- validateIcon,
- needStatusIcon
- });
- __expose({
- focus,
- blur
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "wrapperRef",
- ref: wrapperRef,
- class: normalizeClass(unref(containerKls)),
- style: normalizeStyle(unref(containerStyle)),
- onMouseenter: _cache[9] || (_cache[9] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
- onMouseleave: _cache[10] || (_cache[10] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args))
- }, [
- unref(slots).prefix ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("prefix"))
- }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- ref_key: "innerRef",
- ref: innerRef,
- class: normalizeClass(unref(innerKls))
- }, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(showTagList), (item, index) => {
- return openBlock(), createBlock(unref(ElTag), {
- key: index,
- size: unref(tagSize),
- closable: unref(closable),
- type: __props.tagType,
- effect: __props.tagEffect,
- draggable: unref(closable) && __props.draggable,
- style: normalizeStyle(unref(tagStyle)),
- "disable-transitions": "",
- onClose: ($event) => unref(handleRemoveTag)(index),
- onDragstart: (event) => unref(handleDragStart)(event, index),
- onDragover: (event) => unref(handleDragOver)(event, index),
- onDragend: unref(handleDragEnd),
- onDrop: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "tag", {
- value: item,
- index
- }, () => [createTextVNode(toDisplayString(item), 1)])]),
- _: 2
- }, 1032, [
- "size",
- "closable",
- "type",
- "effect",
- "draggable",
- "style",
- "onClose",
- "onDragstart",
- "onDragover",
- "onDragend"
- ]);
- }), 128)),
- __props.collapseTags && __props.modelValue && __props.modelValue.length > __props.maxCollapseTags ? (openBlock(), createBlock(unref(ElTooltip), {
- key: 0,
- ref_key: "tagTooltipRef",
- ref: tagTooltipRef,
- disabled: !__props.collapseTagsTooltip,
- "fallback-placements": [
- "bottom",
- "top",
- "right",
- "left"
- ],
- effect: __props.effect,
- placement: "bottom"
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref_key: "collapseItemRef",
- ref: collapseItemRef,
- class: normalizeClass(unref(ns).e("collapse-tag"))
- }, [createVNode(unref(ElTag), {
- closable: false,
- size: unref(tagSize),
- type: __props.tagType,
- effect: __props.tagEffect,
- "disable-transitions": ""
- }, {
- default: withCtx(() => [createTextVNode(" + " + toDisplayString(__props.modelValue.length - __props.maxCollapseTags), 1)]),
- _: 1
- }, 8, [
- "size",
- "type",
- "effect"
- ])], 2)]),
- content: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(ns).e("input-tag-list")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(collapseTagList), (item, index) => {
- return openBlock(), createBlock(unref(ElTag), {
- key: index,
- size: unref(tagSize),
- closable: unref(closable),
- type: __props.tagType,
- effect: __props.tagEffect,
- "disable-transitions": "",
- onClose: ($event) => unref(handleRemoveTag)(index + __props.maxCollapseTags)
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "tag", {
- value: item,
- index: index + __props.maxCollapseTags
- }, () => [createTextVNode(toDisplayString(item), 1)])]),
- _: 2
- }, 1032, [
- "size",
- "closable",
- "type",
- "effect",
- "onClose"
- ]);
- }), 128))], 2)]),
- _: 3
- }, 8, ["disabled", "effect"])) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("input-wrapper")) }, [withDirectives(createBaseVNode("input", mergeProps({
- id: unref(inputId),
- ref_key: "inputRef",
- ref: inputRef,
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null)
- }, unref(attrs), {
- type: "text",
- minlength: __props.minlength,
- maxlength: __props.maxlength,
- disabled: unref(disabled),
- readonly: __props.readonly,
- autocomplete: __props.autocomplete,
- tabindex: __props.tabindex,
- placeholder: unref(placeholder),
- autofocus: __props.autofocus,
- ariaLabel: __props.ariaLabel,
- class: unref(ns).e("input"),
- style: unref(inputStyle),
- onCompositionstart: _cache[2] || (_cache[2] = (...args) => unref(handleCompositionStart) && unref(handleCompositionStart)(...args)),
- onCompositionupdate: _cache[3] || (_cache[3] = (...args) => unref(handleCompositionUpdate) && unref(handleCompositionUpdate)(...args)),
- onCompositionend: _cache[4] || (_cache[4] = (...args) => unref(handleCompositionEnd) && unref(handleCompositionEnd)(...args)),
- onPaste: _cache[5] || (_cache[5] = (...args) => unref(handlePaste) && unref(handlePaste)(...args)),
- onInput: _cache[6] || (_cache[6] = (...args) => unref(handleInput) && unref(handleInput)(...args)),
- onKeydown: _cache[7] || (_cache[7] = (...args) => unref(handleKeydown) && unref(handleKeydown)(...args)),
- onKeyup: _cache[8] || (_cache[8] = (...args) => unref(handleKeyup) && unref(handleKeyup)(...args))
- }), null, 16, _hoisted_1$32), [[vModelText, unref(inputValue)]]), createBaseVNode("span", {
- ref_key: "calculatorRef",
- ref: calculatorRef,
- "aria-hidden": "true",
- class: normalizeClass(unref(ns).e("input-calculator")),
- textContent: toDisplayString(unref(inputValue))
- }, null, 10, _hoisted_2$19)], 2),
- withDirectives(createBaseVNode("div", {
- ref_key: "dropIndicatorRef",
- ref: dropIndicatorRef,
- class: normalizeClass(unref(ns).e("drop-indicator"))
- }, null, 2), [[vShow, unref(showDropIndicator)]])
- ], 2),
- unref(showSuffix) ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("suffix"))
- }, [
- renderSlot(_ctx.$slots, "suffix"),
- unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(ns).e("icon"), unref(ns).e("clear")]),
- onMousedown: withModifiers(unref(NOOP), ["prevent"]),
- onClick: unref(handleClear)
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.clearIcon)))]),
- _: 1
- }, 8, [
- "class",
- "onMousedown",
- "onClick"
- ])) : createCommentVNode("v-if", true),
- validateState.value && validateIcon.value && needStatusIcon.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass([
- unref(nsInput).e("icon"),
- unref(nsInput).e("validateIcon"),
- unref(nsInput).is("loading", validateState.value === "validating")
- ])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(validateIcon.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)
- ], 2)) : createCommentVNode("v-if", true)
- ], 38);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/link/src/link.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `LinkProps` instead.
- */
- var linkProps = buildProps({
- type: {
- type: String,
- values: [
- "primary",
- "success",
- "warning",
- "info",
- "danger",
- "default"
- ],
- default: void 0
- },
- underline: {
- type: [Boolean, String],
- values: [
- true,
- false,
- "always",
- "never",
- "hover"
- ],
- default: void 0
- },
- disabled: Boolean,
- href: {
- type: String,
- default: ""
- },
- target: {
- type: String,
- default: "_self"
- },
- icon: { type: iconPropType }
- });
- var linkEmits = { click: (evt) => evt instanceof MouseEvent };
- //#endregion
- //#region node_modules/element-plus/es/components/link/src/link.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$31 = ["href", "target"];
- //#endregion
- //#region node_modules/element-plus/es/components/link/index.mjs
- var ElLink = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElLink",
- __name: "link",
- props: linkProps,
- emits: linkEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const globalConfig = useGlobalConfig("link");
- useDeprecated({
- scope: "el-link",
- from: "The underline option (boolean)",
- replacement: "'always' | 'hover' | 'never'",
- version: "3.0.0",
- ref: "https://element-plus.org/en-US/component/link.html#underline"
- }, computed(() => isBoolean(props.underline)));
- const ns = useNamespace("link");
- const linkKls = computed(() => [
- ns.b(),
- ns.m(props.type ?? globalConfig.value?.type ?? "default"),
- ns.is("disabled", props.disabled),
- ns.is("underline", underline.value === "always"),
- ns.is("hover-underline", underline.value === "hover" && !props.disabled)
- ]);
- const underline = computed(() => {
- if (isBoolean(props.underline)) return props.underline ? "hover" : "never";
- else return props.underline ?? globalConfig.value?.underline ?? "hover";
- });
- function handleClick(event) {
- if (!props.disabled) emit("click", event);
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("a", {
- class: normalizeClass(linkKls.value),
- href: __props.disabled || !__props.href ? void 0 : __props.href,
- target: __props.disabled || !__props.href ? void 0 : __props.target,
- onClick: handleClick
- }, [
- __props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- })) : createCommentVNode("v-if", true),
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
- key: 1,
- class: normalizeClass(unref(ns).e("inner"))
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true),
- _ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 2 }) : createCommentVNode("v-if", true)
- ], 10, _hoisted_1$31);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/tokens.mjs
- var MENU_INJECTION_KEY = "rootMenu";
- var SUB_MENU_INJECTION_KEY = "subMenu:";
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/use-menu.mjs
- function useMenu(instance, currentIndex) {
- const indexPath = computed(() => {
- let parent = instance.parent;
- const path = [currentIndex.value];
- while (parent.type.name !== "ElMenu") {
- if (parent.props.index) path.unshift(parent.props.index);
- parent = parent.parent;
- }
- return path;
- });
- return {
- parentMenu: computed(() => {
- let parent = instance.parent;
- while (parent && !["ElMenu", "ElSubMenu"].includes(parent.type.name)) parent = parent.parent;
- return parent;
- }),
- indexPath
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/use-menu-color.mjs
- function useMenuColor(props) {
- return computed(() => {
- const color = props.backgroundColor;
- return color ? new TinyColor(color).shade(20).toString() : "";
- });
- }
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/use-menu-css-var.mjs
- var useMenuCssVar = (props, level) => {
- const ns = useNamespace("menu");
- return computed(() => ns.cssVarBlock({
- "text-color": props.textColor || "",
- "hover-text-color": props.textColor || "",
- "bg-color": props.backgroundColor || "",
- "hover-bg-color": useMenuColor(props).value || "",
- "active-color": props.activeTextColor || "",
- level: `${level}`
- }));
- };
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/sub-menu.mjs
- var subMenuProps = buildProps({
- index: {
- type: String,
- required: true
- },
- showTimeout: Number,
- hideTimeout: Number,
- popperClass: String,
- popperStyle: { type: definePropType([String, Object]) },
- disabled: Boolean,
- teleported: {
- type: Boolean,
- default: void 0
- },
- popperOffset: Number,
- expandCloseIcon: { type: iconPropType },
- expandOpenIcon: { type: iconPropType },
- collapseCloseIcon: { type: iconPropType },
- collapseOpenIcon: { type: iconPropType }
- });
- var COMPONENT_NAME$8 = "ElSubMenu";
- var sub_menu_default = defineComponent({
- name: COMPONENT_NAME$8,
- props: subMenuProps,
- setup(props, { slots, expose }) {
- const instance = getCurrentInstance();
- const { indexPath, parentMenu } = useMenu(instance, computed(() => props.index));
- const nsMenu = useNamespace("menu");
- const nsSubMenu = useNamespace("sub-menu");
- const rootMenu = inject(MENU_INJECTION_KEY);
- if (!rootMenu) throwError(COMPONENT_NAME$8, "can not inject root menu");
- const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
- if (!subMenu) throwError(COMPONENT_NAME$8, "can not inject sub menu");
- const items = ref({});
- const subMenus = ref({});
- let timeout;
- const mouseInChild = ref(false);
- const verticalTitleRef = ref();
- const vPopper = ref();
- const isFirstLevel = computed(() => subMenu.level === 0);
- const currentPlacement = computed(() => mode.value === "horizontal" && isFirstLevel.value ? "bottom-start" : "right-start");
- const subMenuTitleIcon = computed(() => {
- if (mode.value === "horizontal" && isFirstLevel.value || mode.value === "vertical" && !rootMenu.props.collapse) {
- if (props.expandCloseIcon && props.expandOpenIcon) return opened.value ? props.expandOpenIcon : props.expandCloseIcon;
- return arrow_down_default;
- } else {
- if (props.collapseCloseIcon && props.collapseOpenIcon) return opened.value ? props.collapseOpenIcon : props.collapseCloseIcon;
- return arrow_right_default;
- }
- });
- const appendToBody = computed(() => {
- const value = props.teleported;
- return isUndefined(value) ? isFirstLevel.value : value;
- });
- const menuTransitionName = computed(() => rootMenu.props.collapse ? `${nsMenu.namespace.value}-zoom-in-left` : `${nsMenu.namespace.value}-zoom-in-top`);
- const fallbackPlacements = computed(() => mode.value === "horizontal" && isFirstLevel.value ? [
- "bottom-start",
- "bottom-end",
- "top-start",
- "top-end",
- "right-start",
- "left-start"
- ] : [
- "right-start",
- "right",
- "right-end",
- "left-start",
- "bottom-start",
- "bottom-end",
- "top-start",
- "top-end"
- ]);
- const opened = computed(() => rootMenu.openedMenus.includes(props.index));
- const active = computed(() => [...Object.values(items.value), ...Object.values(subMenus.value)].some(({ active }) => active));
- const mode = computed(() => rootMenu.props.mode);
- const persistent = computed(() => rootMenu.props.persistent);
- const item = reactive({
- index: props.index,
- indexPath,
- active
- });
- const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1);
- const subMenuPopperOffset = computed(() => props.popperOffset ?? rootMenu.props.popperOffset);
- const subMenuPopperClass = computed(() => props.popperClass ?? rootMenu.props.popperClass);
- const subMenuPopperStyle = computed(() => props.popperStyle ?? rootMenu.props.popperStyle);
- const subMenuShowTimeout = computed(() => props.showTimeout ?? rootMenu.props.showTimeout);
- const subMenuHideTimeout = computed(() => props.hideTimeout ?? rootMenu.props.hideTimeout);
- const doDestroy = () => vPopper.value?.popperRef?.popperInstanceRef?.destroy();
- const handleCollapseToggle = (value) => {
- if (!value) doDestroy();
- };
- const handleClick = () => {
- if (rootMenu.props.menuTrigger === "hover" && rootMenu.props.mode === "horizontal" || rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) return;
- rootMenu.handleSubMenuClick({
- index: props.index,
- indexPath: indexPath.value,
- active: active.value
- });
- };
- const handleMouseenter = (event, showTimeout = subMenuShowTimeout.value) => {
- if (event.type === "focus") return;
- if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical" || props.disabled) {
- subMenu.mouseInChild.value = true;
- return;
- }
- subMenu.mouseInChild.value = true;
- timeout?.();
- ({stop: timeout} = useTimeoutFn(() => {
- rootMenu.openMenu(props.index, indexPath.value);
- }, showTimeout));
- if (appendToBody.value) parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter"));
- if (event.type === "mouseenter" && event.target) nextTick(() => {
- focusElement(event.target, { preventScroll: true });
- });
- };
- const handleMouseleave = (deepDispatch = false) => {
- if (rootMenu.props.menuTrigger === "click" && rootMenu.props.mode === "horizontal" || !rootMenu.props.collapse && rootMenu.props.mode === "vertical") {
- subMenu.mouseInChild.value = false;
- return;
- }
- timeout?.();
- subMenu.mouseInChild.value = false;
- ({stop: timeout} = useTimeoutFn(() => !mouseInChild.value && rootMenu.closeMenu(props.index, indexPath.value), subMenuHideTimeout.value));
- if (appendToBody.value && deepDispatch) subMenu.handleMouseleave?.(true);
- };
- watch(() => rootMenu.props.collapse, (value) => handleCollapseToggle(Boolean(value)));
- {
- const addSubMenu = (item) => {
- subMenus.value[item.index] = item;
- };
- const removeSubMenu = (item) => {
- delete subMenus.value[item.index];
- };
- provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
- addSubMenu,
- removeSubMenu,
- handleMouseleave,
- mouseInChild,
- level: subMenu.level + 1
- });
- }
- expose({ opened });
- onMounted(() => {
- rootMenu.addSubMenu(item);
- subMenu.addSubMenu(item);
- });
- onBeforeUnmount(() => {
- subMenu.removeSubMenu(item);
- rootMenu.removeSubMenu(item);
- });
- return () => {
- const titleTag = [slots.title?.(), h$1(ElIcon, {
- class: nsSubMenu.e("icon-arrow"),
- style: { transform: opened.value ? props.expandCloseIcon && props.expandOpenIcon || props.collapseCloseIcon && props.collapseOpenIcon && rootMenu.props.collapse ? "none" : "rotateZ(180deg)" : "none" }
- }, { default: () => isString(subMenuTitleIcon.value) ? h$1(instance.appContext.components[subMenuTitleIcon.value]) : h$1(subMenuTitleIcon.value) })];
- const child = rootMenu.isMenuPopup ? h$1(ElTooltip, {
- ref: vPopper,
- visible: opened.value,
- effect: "light",
- pure: true,
- offset: subMenuPopperOffset.value,
- showArrow: false,
- persistent: persistent.value,
- popperClass: subMenuPopperClass.value,
- popperStyle: subMenuPopperStyle.value,
- placement: currentPlacement.value,
- teleported: appendToBody.value,
- fallbackPlacements: fallbackPlacements.value,
- transition: menuTransitionName.value,
- gpuAcceleration: false
- }, {
- content: () => h$1("div", {
- class: [
- nsMenu.m(mode.value),
- nsMenu.m("popup-container"),
- subMenuPopperClass.value
- ],
- onMouseenter: (evt) => handleMouseenter(evt, 100),
- onMouseleave: () => handleMouseleave(true),
- onFocus: (evt) => handleMouseenter(evt, 100)
- }, [h$1("ul", {
- class: [
- nsMenu.b(),
- nsMenu.m("popup"),
- nsMenu.m(`popup-${currentPlacement.value}`)
- ],
- style: ulStyle.value
- }, [slots.default?.()])]),
- default: () => h$1("div", {
- class: nsSubMenu.e("title"),
- onClick: handleClick
- }, titleTag)
- }) : h$1(Fragment, {}, [h$1("div", {
- class: nsSubMenu.e("title"),
- ref: verticalTitleRef,
- onClick: handleClick
- }, titleTag), h$1(ElCollapseTransition, {}, { default: () => withDirectives(h$1("ul", {
- role: "menu",
- class: [nsMenu.b(), nsMenu.m("inline")],
- style: ulStyle.value
- }, [slots.default?.()]), [[vShow, opened.value]]) })]);
- return h$1("li", {
- class: [
- nsSubMenu.b(),
- nsSubMenu.is("active", active.value),
- nsSubMenu.is("opened", opened.value),
- nsSubMenu.is("disabled", props.disabled)
- ],
- role: "menuitem",
- ariaHaspopup: true,
- ariaExpanded: opened.value,
- onMouseenter: handleMouseenter,
- onMouseleave: () => handleMouseleave(),
- onFocus: handleMouseenter
- }, [child]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/utils/submenu.mjs
- var SubMenu = class {
- constructor(parent, domNode) {
- this.parent = parent;
- this.domNode = domNode;
- this.subIndex = 0;
- this.subIndex = 0;
- this.init();
- }
- init() {
- this.subMenuItems = this.domNode.querySelectorAll("li");
- this.addListeners();
- }
- gotoSubIndex(idx) {
- if (idx === this.subMenuItems.length) idx = 0;
- else if (idx < 0) idx = this.subMenuItems.length - 1;
- this.subMenuItems[idx].focus();
- this.subIndex = idx;
- }
- addListeners() {
- const parentNode = this.parent.domNode;
- Array.prototype.forEach.call(this.subMenuItems, (el) => {
- el.addEventListener("keydown", (event) => {
- const code = getEventCode(event);
- let prevDef = false;
- switch (code) {
- case EVENT_CODE.down:
- this.gotoSubIndex(this.subIndex + 1);
- prevDef = true;
- break;
- case EVENT_CODE.up:
- this.gotoSubIndex(this.subIndex - 1);
- prevDef = true;
- break;
- case EVENT_CODE.tab:
- triggerEvent(parentNode, "mouseleave");
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- case EVENT_CODE.space:
- prevDef = true;
- event.currentTarget.click();
- break;
- }
- if (prevDef) {
- event.preventDefault();
- event.stopPropagation();
- }
- return false;
- });
- });
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/utils/menu-item.mjs
- var MenuItem = class {
- constructor(domNode, namespace) {
- this.domNode = domNode;
- this.submenu = null;
- this.submenu = null;
- this.init(namespace);
- }
- init(namespace) {
- this.domNode.setAttribute("tabindex", "0");
- const menuChild = this.domNode.querySelector(`.${namespace}-menu`);
- if (menuChild) this.submenu = new SubMenu(this, menuChild);
- this.addListeners();
- }
- addListeners() {
- this.domNode.addEventListener("keydown", (event) => {
- const code = getEventCode(event);
- let prevDef = false;
- switch (code) {
- case EVENT_CODE.down:
- triggerEvent(event.currentTarget, "mouseenter");
- this.submenu && this.submenu.gotoSubIndex(0);
- prevDef = true;
- break;
- case EVENT_CODE.up:
- triggerEvent(event.currentTarget, "mouseenter");
- this.submenu && this.submenu.gotoSubIndex(this.submenu.subMenuItems.length - 1);
- prevDef = true;
- break;
- case EVENT_CODE.tab:
- triggerEvent(event.currentTarget, "mouseleave");
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- case EVENT_CODE.space:
- prevDef = true;
- event.currentTarget.click();
- break;
- }
- if (prevDef) event.preventDefault();
- });
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/utils/menu-bar.mjs
- var Menu = class {
- constructor(domNode, namespace) {
- this.domNode = domNode;
- this.init(namespace);
- }
- init(namespace) {
- const menuChildren = this.domNode.childNodes;
- Array.from(menuChildren).forEach((child) => {
- if (child.nodeType === 1) new MenuItem(child, namespace);
- });
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu-collapse-transition.mjs
- var menu_collapse_transition_default = /* @__PURE__ */ defineComponent({
- name: "ElMenuCollapseTransition",
- __name: "menu-collapse-transition",
- setup(__props) {
- const ns = useNamespace("menu");
- const listeners = {
- onBeforeEnter: (el) => el.style.opacity = "0.2",
- onEnter(el, done) {
- addClass(el, `${ns.namespace.value}-opacity-transition`);
- el.style.opacity = "1";
- done();
- },
- onAfterEnter(el) {
- removeClass(el, `${ns.namespace.value}-opacity-transition`);
- el.style.opacity = "";
- },
- onBeforeLeave(el) {
- if (!el.dataset) el.dataset = {};
- if (hasClass(el, ns.m("collapse"))) {
- removeClass(el, ns.m("collapse"));
- el.dataset.oldOverflow = el.style.overflow;
- el.dataset.scrollWidth = el.clientWidth.toString();
- addClass(el, ns.m("collapse"));
- } else {
- addClass(el, ns.m("collapse"));
- el.dataset.oldOverflow = el.style.overflow;
- el.dataset.scrollWidth = el.clientWidth.toString();
- removeClass(el, ns.m("collapse"));
- }
- el.style.width = `${el.scrollWidth}px`;
- el.style.overflow = "hidden";
- },
- onLeave(el) {
- addClass(el, "horizontal-collapse-transition");
- el.style.width = `${el.dataset.scrollWidth}px`;
- }
- };
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, mergeProps({ mode: "out-in" }, listeners), {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 16);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu.mjs
- var menuProps = buildProps({
- mode: {
- type: String,
- values: ["horizontal", "vertical"],
- default: "vertical"
- },
- defaultActive: {
- type: String,
- default: ""
- },
- defaultOpeneds: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- uniqueOpened: Boolean,
- router: Boolean,
- menuTrigger: {
- type: String,
- values: ["hover", "click"],
- default: "hover"
- },
- collapse: Boolean,
- backgroundColor: String,
- textColor: String,
- activeTextColor: String,
- closeOnClickOutside: Boolean,
- collapseTransition: {
- type: Boolean,
- default: true
- },
- ellipsis: {
- type: Boolean,
- default: true
- },
- popperOffset: {
- type: Number,
- default: 6
- },
- ellipsisIcon: {
- type: iconPropType,
- default: () => more_default
- },
- popperEffect: {
- type: definePropType(String),
- default: "dark"
- },
- popperClass: String,
- popperStyle: { type: definePropType([String, Object]) },
- showTimeout: {
- type: Number,
- default: 300
- },
- hideTimeout: {
- type: Number,
- default: 300
- },
- persistent: {
- type: Boolean,
- default: true
- }
- });
- var checkIndexPath = (indexPath) => isArray$1(indexPath) && indexPath.every((path) => isString(path));
- var menuEmits = {
- close: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
- open: (index, indexPath) => isString(index) && checkIndexPath(indexPath),
- select: (index, indexPath, item, routerResult) => isString(index) && checkIndexPath(indexPath) && isObject$2(item) && (isUndefined(routerResult) || routerResult instanceof Promise)
- };
- var DEFAULT_MORE_ITEM_WIDTH = 64;
- var menu_default = defineComponent({
- name: "ElMenu",
- props: menuProps,
- emits: menuEmits,
- setup(props, { emit, slots, expose }) {
- const instance = getCurrentInstance();
- const router = instance.appContext.config.globalProperties.$router;
- const menu = ref();
- const subMenu = ref();
- const nsMenu = useNamespace("menu");
- const nsSubMenu = useNamespace("sub-menu");
- let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH;
- const sliceIndex = ref(-1);
- const openedMenus = ref(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
- const activeIndex = ref(props.defaultActive);
- const items = ref({});
- const subMenus = ref({});
- const isMenuPopup = computed(() => props.mode === "horizontal" || props.mode === "vertical" && props.collapse);
- const initMenu = () => {
- const activeItem = activeIndex.value && items.value[activeIndex.value];
- if (!activeItem || props.mode === "horizontal" || props.collapse) return;
- activeItem.indexPath.forEach((index) => {
- const subMenu = subMenus.value[index];
- subMenu && openMenu(index, subMenu.indexPath);
- });
- };
- const openMenu = (index, indexPath) => {
- if (openedMenus.value.includes(index)) return;
- if (props.uniqueOpened) openedMenus.value = openedMenus.value.filter((index) => indexPath.includes(index));
- openedMenus.value.push(index);
- emit("open", index, indexPath);
- };
- const close = (index) => {
- const i = openedMenus.value.indexOf(index);
- if (i !== -1) openedMenus.value.splice(i, 1);
- };
- const closeMenu = (index, indexPath) => {
- close(index);
- emit("close", index, indexPath);
- };
- const handleSubMenuClick = ({ index, indexPath }) => {
- openedMenus.value.includes(index) ? closeMenu(index, indexPath) : openMenu(index, indexPath);
- };
- const handleMenuItemClick = (menuItem) => {
- if (props.mode === "horizontal" || props.collapse) openedMenus.value = [];
- const { index, indexPath } = menuItem;
- if (isNil(index) || isNil(indexPath)) return;
- if (props.router && router) {
- const route = menuItem.route || index;
- const routerResult = router.push(route).then((res) => {
- if (!res) activeIndex.value = index;
- return res;
- });
- emit("select", index, indexPath, {
- index,
- indexPath,
- route
- }, routerResult);
- } else {
- activeIndex.value = index;
- emit("select", index, indexPath, {
- index,
- indexPath
- });
- }
- };
- const updateActiveIndex = (val) => {
- const itemsInData = items.value;
- activeIndex.value = (itemsInData[val] || activeIndex.value && itemsInData[activeIndex.value] || itemsInData[props.defaultActive])?.index ?? val;
- };
- const calcMenuItemWidth = (menuItem) => {
- const computedStyle = getComputedStyle(menuItem);
- const marginLeft = Number.parseInt(computedStyle.marginLeft, 10);
- const marginRight = Number.parseInt(computedStyle.marginRight, 10);
- return menuItem.offsetWidth + marginLeft + marginRight || 0;
- };
- const calcSliceIndex = () => {
- if (!menu.value) return -1;
- const items = Array.from(menu.value.childNodes).filter((item) => item.nodeName !== "#comment" && (item.nodeName !== "#text" || item.nodeValue));
- const computedMenuStyle = getComputedStyle(menu.value);
- const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10);
- const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10);
- const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight;
- let calcWidth = 0;
- let sliceIndex = 0;
- items.forEach((item, index) => {
- calcWidth += calcMenuItemWidth(item);
- if (calcWidth <= menuWidth - moreItemWidth) sliceIndex = index + 1;
- });
- return sliceIndex === items.length ? -1 : sliceIndex;
- };
- const getIndexPath = (index) => subMenus.value[index].indexPath;
- const debounce = (fn, wait = 33.34) => {
- let timer;
- return () => {
- timer && clearTimeout(timer);
- timer = setTimeout(() => {
- fn();
- }, wait);
- };
- };
- let isFirstTimeRender = true;
- const handleResize = () => {
- const el = unrefElement(subMenu);
- if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH;
- if (sliceIndex.value === calcSliceIndex()) return;
- const callback = () => {
- sliceIndex.value = -1;
- nextTick(() => {
- sliceIndex.value = calcSliceIndex();
- });
- };
- isFirstTimeRender ? callback() : debounce(callback)();
- isFirstTimeRender = false;
- };
- watch(() => props.defaultActive, (currentActive) => {
- if (!items.value[currentActive]) activeIndex.value = "";
- updateActiveIndex(currentActive);
- });
- watch(() => props.collapse, (value) => {
- if (value) openedMenus.value = [];
- });
- watch(items.value, initMenu);
- let resizeStopper;
- watchEffect(() => {
- if (props.mode === "horizontal" && props.ellipsis) resizeStopper = useResizeObserver(menu, handleResize).stop;
- else resizeStopper?.();
- });
- const mouseInChild = ref(false);
- {
- const addSubMenu = (item) => {
- subMenus.value[item.index] = item;
- };
- const removeSubMenu = (item) => {
- delete subMenus.value[item.index];
- };
- const addMenuItem = (item) => {
- items.value[item.index] = item;
- };
- const removeMenuItem = (item) => {
- delete items.value[item.index];
- };
- provide(MENU_INJECTION_KEY, reactive({
- props,
- openedMenus,
- items,
- subMenus,
- activeIndex,
- isMenuPopup,
- addMenuItem,
- removeMenuItem,
- addSubMenu,
- removeSubMenu,
- openMenu,
- closeMenu,
- handleMenuItemClick,
- handleSubMenuClick
- }));
- provide(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {
- addSubMenu,
- removeSubMenu,
- mouseInChild,
- level: 0
- });
- }
- onMounted(() => {
- if (props.mode === "horizontal") new Menu(instance.vnode.el, nsMenu.namespace.value);
- });
- {
- const open = (index) => {
- const { indexPath } = subMenus.value[index];
- indexPath.forEach((i) => openMenu(i, indexPath));
- };
- expose({
- open,
- close,
- updateActiveIndex,
- handleResize
- });
- }
- const ulStyle = useMenuCssVar(props, 0);
- return () => {
- let slot = slots.default?.() ?? [];
- const vShowMore = [];
- if (props.mode === "horizontal" && menu.value) {
- const originalSlot = flattedChildren(slot).filter((vnode) => {
- return vnode?.shapeFlag !== 8;
- });
- const slotDefault = sliceIndex.value === -1 ? originalSlot : originalSlot.slice(0, sliceIndex.value);
- const slotMore = sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value);
- if (slotMore?.length && props.ellipsis) {
- slot = slotDefault;
- vShowMore.push(h$1(sub_menu_default, {
- ref: subMenu,
- index: "sub-menu-more",
- class: nsSubMenu.e("hide-arrow"),
- popperOffset: props.popperOffset
- }, {
- title: () => h$1(ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => h$1(props.ellipsisIcon) }),
- default: () => slotMore
- }));
- }
- }
- const directives = props.closeOnClickOutside ? [[ClickOutside, () => {
- if (!openedMenus.value.length) return;
- if (!mouseInChild.value) {
- openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
- openedMenus.value = [];
- }
- }]] : [];
- const vMenu = withDirectives(h$1("ul", {
- key: String(props.collapse),
- role: "menubar",
- ref: menu,
- style: ulStyle.value,
- class: {
- [nsMenu.b()]: true,
- [nsMenu.m(props.mode)]: true,
- [nsMenu.m("collapse")]: props.collapse
- }
- }, [...slot, ...vShowMore]), directives);
- if (props.collapseTransition && props.mode === "vertical") return h$1(menu_collapse_transition_default, () => vMenu);
- return vMenu;
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu-item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `MenuItemProps` instead.
- */
- var menuItemProps = buildProps({
- index: {
- type: definePropType([String, null]),
- default: null
- },
- route: { type: definePropType([String, Object]) },
- disabled: Boolean
- });
- var menuItemEmits = { click: (item) => isString(item.index) && isArray$1(item.indexPath) };
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu-item-group.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `MenuItemGroupProps` instead.
- */
- var menuItemGroupProps = { title: String };
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu-item.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$7 = "ElMenuItem";
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu-item2.mjs
- var menu_item_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$7,
- __name: "menu-item",
- props: menuItemProps,
- emits: menuItemEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- isPropAbsent(props.index) && debugWarn(COMPONENT_NAME$7, "Missing required prop: \"index\"");
- const instance = getCurrentInstance();
- const rootMenu = inject(MENU_INJECTION_KEY);
- const nsMenu = useNamespace("menu");
- const nsMenuItem = useNamespace("menu-item");
- if (!rootMenu) throwError(COMPONENT_NAME$7, "can not inject root menu");
- const { parentMenu, indexPath } = useMenu(instance, toRef(props, "index"));
- const subMenu = inject(`${SUB_MENU_INJECTION_KEY}${parentMenu.value.uid}`);
- if (!subMenu) throwError(COMPONENT_NAME$7, "can not inject sub menu");
- const active = computed(() => props.index === rootMenu.activeIndex);
- const item = reactive({
- index: props.index,
- indexPath,
- active
- });
- const handleClick = () => {
- if (!props.disabled) {
- rootMenu.handleMenuItemClick({
- index: props.index,
- indexPath: indexPath.value,
- route: props.route
- });
- emit("click", item);
- }
- };
- onMounted(() => {
- subMenu.addSubMenu(item);
- rootMenu.addMenuItem(item);
- });
- onBeforeUnmount(() => {
- subMenu.removeSubMenu(item);
- rootMenu.removeMenuItem(item);
- });
- __expose({
- parentMenu,
- rootMenu,
- active,
- nsMenu,
- nsMenuItem,
- handleClick
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("li", {
- class: normalizeClass([
- unref(nsMenuItem).b(),
- unref(nsMenuItem).is("active", active.value),
- unref(nsMenuItem).is("disabled", __props.disabled)
- ]),
- role: "menuitem",
- tabindex: "-1",
- onClick: handleClick
- }, [unref(parentMenu).type.name === "ElMenu" && unref(rootMenu).props.collapse && _ctx.$slots.title ? (openBlock(), createBlock(unref(ElTooltip), {
- key: 0,
- effect: unref(rootMenu).props.popperEffect,
- placement: "right",
- "fallback-placements": ["left"],
- "popper-class": unref(rootMenu).props.popperClass,
- "popper-style": unref(rootMenu).props.popperStyle,
- persistent: unref(rootMenu).props.persistent,
- "focus-on-target": ""
- }, {
- content: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
- default: withCtx(() => [createBaseVNode("div", { class: normalizeClass(unref(nsMenu).be("tooltip", "trigger")) }, [renderSlot(_ctx.$slots, "default")], 2)]),
- _: 3
- }, 8, [
- "effect",
- "popper-class",
- "popper-style",
- "persistent"
- ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [renderSlot(_ctx.$slots, "default"), renderSlot(_ctx.$slots, "title")], 64))], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/menu/src/menu-item-group2.mjs
- var menu_item_group_default = /* @__PURE__ */ defineComponent({
- name: "ElMenuItemGroup",
- __name: "menu-item-group",
- props: menuItemGroupProps,
- setup(__props) {
- const ns = useNamespace("menu-item-group");
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("li", { class: normalizeClass(unref(ns).b()) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [!_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(__props.title), 1)], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })], 2), createBaseVNode("ul", null, [renderSlot(_ctx.$slots, "default")])], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/menu/index.mjs
- var ElMenu = withInstall(menu_default, {
- MenuItem: menu_item_default,
- MenuItemGroup: menu_item_group_default,
- SubMenu: sub_menu_default
- });
- var ElMenuItem = withNoopInstall(menu_item_default);
- var ElMenuItemGroup = withNoopInstall(menu_item_group_default);
- var ElSubMenu = withNoopInstall(sub_menu_default);
- //#endregion
- //#region node_modules/element-plus/es/components/page-header/src/page-header.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PageHeaderProps` instead.
- */
- var pageHeaderProps = buildProps({
- icon: {
- type: iconPropType,
- default: () => back_default
- },
- title: String,
- content: {
- type: String,
- default: ""
- }
- });
- var pageHeaderEmits = { back: () => true };
- //#endregion
- //#region node_modules/element-plus/es/components/page-header/src/page-header.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$30 = ["aria-label"];
- //#endregion
- //#region node_modules/element-plus/es/components/page-header/index.mjs
- var ElPageHeader = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElPageHeader",
- __name: "page-header",
- props: pageHeaderProps,
- emits: pageHeaderEmits,
- setup(__props, { emit: __emit }) {
- const emit = __emit;
- const { t } = useLocale();
- const ns = useNamespace("page-header");
- function handleClick() {
- emit("back");
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([
- unref(ns).b(),
- unref(ns).is("contentful", !!_ctx.$slots.default),
- {
- [unref(ns).m("has-breadcrumb")]: !!_ctx.$slots.breadcrumb,
- [unref(ns).m("has-extra")]: !!_ctx.$slots.extra
- }
- ]) }, [
- _ctx.$slots.breadcrumb ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("breadcrumb"))
- }, [renderSlot(_ctx.$slots, "breadcrumb")], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("header")) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("left")) }, [
- createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("back")),
- role: "button",
- tabindex: "0",
- onClick: handleClick
- }, [__props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", {
- key: 0,
- "aria-label": __props.title || unref(t)("el.pageHeader.title"),
- class: normalizeClass(unref(ns).e("icon"))
- }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- })) : createCommentVNode("v-if", true)])], 10, _hoisted_1$30)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("title")) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title || unref(t)("el.pageHeader.title")), 1)])], 2)], 2),
- createVNode(unref(ElDivider), { direction: "vertical" }),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])], 2)
- ], 2), _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("extra"))
- }, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)], 2),
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("main"))
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/constants.mjs
- var elPaginationKey = Symbol("elPaginationKey");
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/prev.mjs
- var paginationPrevProps = buildProps({
- disabled: Boolean,
- currentPage: {
- type: Number,
- default: 1
- },
- prevText: { type: String },
- prevIcon: { type: iconPropType }
- });
- var paginationPrevEmits = { click: (evt) => evt instanceof MouseEvent };
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/prev.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$29 = [
- "disabled",
- "aria-label",
- "aria-disabled"
- ];
- var _hoisted_2$18 = { key: 0 };
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/prev2.mjs
- var prev_default = /* @__PURE__ */ defineComponent({
- name: "ElPaginationPrev",
- __name: "prev",
- props: paginationPrevProps,
- emits: paginationPrevEmits,
- setup(__props) {
- const props = __props;
- const { t } = useLocale();
- const internalDisabled = computed(() => props.disabled || props.currentPage <= 1);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("button", {
- type: "button",
- class: "btn-prev",
- disabled: internalDisabled.value,
- "aria-label": _ctx.prevText || unref(t)("el.pagination.prev"),
- "aria-disabled": internalDisabled.value,
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
- }, [_ctx.prevText ? (openBlock(), createElementBlock("span", _hoisted_2$18, toDisplayString(_ctx.prevText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon)))]),
- _: 1
- }))], 8, _hoisted_1$29);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/next.mjs
- var paginationNextProps = buildProps({
- disabled: Boolean,
- currentPage: {
- type: Number,
- default: 1
- },
- pageCount: {
- type: Number,
- default: 50
- },
- nextText: { type: String },
- nextIcon: { type: iconPropType }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/next.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$28 = [
- "disabled",
- "aria-label",
- "aria-disabled"
- ];
- var _hoisted_2$17 = { key: 0 };
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/next2.mjs
- var next_default = /* @__PURE__ */ defineComponent({
- name: "ElPaginationNext",
- __name: "next",
- props: paginationNextProps,
- emits: ["click"],
- setup(__props) {
- const props = __props;
- const { t } = useLocale();
- const internalDisabled = computed(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("button", {
- type: "button",
- class: "btn-next",
- disabled: internalDisabled.value,
- "aria-label": _ctx.nextText || unref(t)("el.pagination.next"),
- "aria-disabled": internalDisabled.value,
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
- }, [_ctx.nextText ? (openBlock(), createElementBlock("span", _hoisted_2$17, toDisplayString(_ctx.nextText), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon)))]),
- _: 1
- }))], 8, _hoisted_1$28);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/usePagination.mjs
- var usePagination = () => inject(elPaginationKey, {});
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/sizes2.mjs
- var sizes_default = /* @__PURE__ */ defineComponent({
- name: "ElPaginationSizes",
- __name: "sizes",
- props: buildProps({
- pageSize: {
- type: Number,
- required: true
- },
- pageSizes: {
- type: definePropType(Array),
- default: () => mutable([
- 10,
- 20,
- 30,
- 40,
- 50,
- 100
- ])
- },
- popperClass: { type: String },
- popperStyle: { type: definePropType([String, Object]) },
- disabled: Boolean,
- teleported: Boolean,
- size: {
- type: String,
- values: componentSizes
- },
- appendSizeTo: String
- }),
- emits: ["page-size-change"],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { t } = useLocale();
- const ns = useNamespace("pagination");
- const pagination = usePagination();
- const innerPageSize = ref(props.pageSize);
- watch(() => props.pageSizes, (newVal, oldVal) => {
- if (isEqual$1(newVal, oldVal)) return;
- if (isArray$1(newVal)) emit("page-size-change", newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0]);
- });
- watch(() => props.pageSize, (newVal) => {
- innerPageSize.value = newVal;
- });
- const innerPageSizes = computed(() => props.pageSizes);
- function handleChange(val) {
- if (val !== innerPageSize.value) {
- innerPageSize.value = val;
- pagination.handleSizeChange?.(Number(val));
- }
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", { class: normalizeClass(unref(ns).e("sizes")) }, [createVNode(unref(ElSelect), {
- "model-value": innerPageSize.value,
- disabled: _ctx.disabled,
- "popper-class": _ctx.popperClass,
- "popper-style": _ctx.popperStyle,
- size: _ctx.size,
- teleported: _ctx.teleported,
- "validate-event": false,
- "append-to": _ctx.appendSizeTo,
- onChange: handleChange
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(innerPageSizes.value, (item) => {
- return openBlock(), createBlock(unref(ElOption), {
- key: item,
- value: item,
- label: item + unref(t)("el.pagination.pagesize")
- }, null, 8, ["value", "label"]);
- }), 128))]),
- _: 1
- }, 8, [
- "model-value",
- "disabled",
- "popper-class",
- "popper-style",
- "size",
- "teleported",
- "append-to"
- ])], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/jumper.mjs
- var paginationJumperProps = buildProps({ size: {
- type: String,
- values: componentSizes
- } });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/jumper.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$27 = ["disabled"];
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/jumper2.mjs
- var jumper_default = /* @__PURE__ */ defineComponent({
- name: "ElPaginationJumper",
- __name: "jumper",
- props: paginationJumperProps,
- setup(__props) {
- const { t } = useLocale();
- const ns = useNamespace("pagination");
- const { pageCount, disabled, currentPage, changeEvent } = usePagination();
- const userInput = ref();
- const innerValue = computed(() => userInput.value ?? currentPage?.value);
- function handleInput(val) {
- userInput.value = val ? +val : "";
- }
- function handleChange(val) {
- val = Math.trunc(+val);
- changeEvent?.(val);
- userInput.value = void 0;
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", {
- class: normalizeClass(unref(ns).e("jump")),
- disabled: unref(disabled)
- }, [
- createBaseVNode("span", { class: normalizeClass([unref(ns).e("goto")]) }, toDisplayString(unref(t)("el.pagination.goto")), 3),
- createVNode(unref(ElInput), {
- size: _ctx.size,
- class: normalizeClass([unref(ns).e("editor"), unref(ns).is("in-pagination")]),
- min: 1,
- max: unref(pageCount),
- disabled: unref(disabled),
- "model-value": innerValue.value,
- "validate-event": false,
- "aria-label": unref(t)("el.pagination.page"),
- type: "number",
- "onUpdate:modelValue": handleInput,
- onChange: handleChange
- }, null, 8, [
- "size",
- "class",
- "max",
- "disabled",
- "model-value",
- "aria-label"
- ]),
- createBaseVNode("span", { class: normalizeClass([unref(ns).e("classifier")]) }, toDisplayString(unref(t)("el.pagination.pageClassifier")), 3)
- ], 10, _hoisted_1$27);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/total.mjs
- var paginationTotalProps = buildProps({ total: {
- type: Number,
- default: 1e3
- } });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/total.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$26 = ["disabled"];
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/total2.mjs
- var total_default = /* @__PURE__ */ defineComponent({
- name: "ElPaginationTotal",
- __name: "total",
- props: paginationTotalProps,
- setup(__props) {
- const { t } = useLocale();
- const ns = useNamespace("pagination");
- const { disabled } = usePagination();
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("span", {
- class: normalizeClass(unref(ns).e("total")),
- disabled: unref(disabled)
- }, toDisplayString(unref(t)("el.pagination.total", { total: _ctx.total })), 11, _hoisted_1$26);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/pager.mjs
- var paginationPagerProps = buildProps({
- currentPage: {
- type: Number,
- default: 1
- },
- pageCount: {
- type: Number,
- required: true
- },
- pagerCount: {
- type: Number,
- default: 7
- },
- disabled: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/pager.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$25 = [
- "aria-current",
- "aria-label",
- "tabindex"
- ];
- var _hoisted_2$16 = ["tabindex", "aria-label"];
- var _hoisted_3$7 = [
- "aria-current",
- "aria-label",
- "tabindex"
- ];
- var _hoisted_4$5 = ["tabindex", "aria-label"];
- var _hoisted_5$3 = [
- "aria-current",
- "aria-label",
- "tabindex"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/components/pager2.mjs
- var pager_default = /* @__PURE__ */ defineComponent({
- name: "ElPaginationPager",
- __name: "pager",
- props: paginationPagerProps,
- emits: [CHANGE_EVENT],
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const nsPager = useNamespace("pager");
- const nsIcon = useNamespace("icon");
- const { t } = useLocale();
- const showPrevMore = ref(false);
- const showNextMore = ref(false);
- const quickPrevHover = ref(false);
- const quickNextHover = ref(false);
- const quickPrevFocus = ref(false);
- const quickNextFocus = ref(false);
- const pagers = computed(() => {
- const pagerCount = props.pagerCount;
- const halfPagerCount = (pagerCount - 1) / 2;
- const currentPage = Number(props.currentPage);
- const pageCount = Number(props.pageCount);
- let showPrevMore = false;
- let showNextMore = false;
- if (pageCount > pagerCount) {
- if (currentPage > pagerCount - halfPagerCount) showPrevMore = true;
- if (currentPage < pageCount - halfPagerCount) showNextMore = true;
- }
- const array = [];
- if (showPrevMore && !showNextMore) {
- const startPage = pageCount - (pagerCount - 2);
- for (let i = startPage; i < pageCount; i++) array.push(i);
- } else if (!showPrevMore && showNextMore) for (let i = 2; i < pagerCount; i++) array.push(i);
- else if (showPrevMore && showNextMore) {
- const offset = Math.floor(pagerCount / 2) - 1;
- for (let i = currentPage - offset; i <= currentPage + offset; i++) array.push(i);
- } else for (let i = 2; i < pageCount; i++) array.push(i);
- return array;
- });
- const prevMoreKls = computed(() => [
- "more",
- "btn-quickprev",
- nsIcon.b(),
- nsPager.is("disabled", props.disabled)
- ]);
- const nextMoreKls = computed(() => [
- "more",
- "btn-quicknext",
- nsIcon.b(),
- nsPager.is("disabled", props.disabled)
- ]);
- const tabindex = computed(() => props.disabled ? -1 : 0);
- watch(() => [
- props.pageCount,
- props.pagerCount,
- props.currentPage
- ], ([pageCount, pagerCount, currentPage]) => {
- const halfPagerCount = (pagerCount - 1) / 2;
- let showPrev = false;
- let showNext = false;
- if (pageCount > pagerCount) {
- showPrev = currentPage > pagerCount - halfPagerCount;
- showNext = currentPage < pageCount - halfPagerCount;
- }
- quickPrevHover.value &&= showPrev;
- quickNextHover.value &&= showNext;
- showPrevMore.value = showPrev;
- showNextMore.value = showNext;
- }, { immediate: true });
- function onMouseEnter(forward = false) {
- if (props.disabled) return;
- if (forward) quickPrevHover.value = true;
- else quickNextHover.value = true;
- }
- function onFocus(forward = false) {
- if (forward) quickPrevFocus.value = true;
- else quickNextFocus.value = true;
- }
- function onEnter(e) {
- const target = e.target;
- if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
- const newPage = Number(target.textContent);
- if (newPage !== props.currentPage) emit(CHANGE_EVENT, newPage);
- } else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) onPagerClick(e);
- }
- function onPagerClick(event) {
- const target = event.target;
- if (target.tagName.toLowerCase() === "ul" || props.disabled) return;
- let newPage = Number(target.textContent);
- const pageCount = props.pageCount;
- const currentPage = props.currentPage;
- const pagerCountOffset = props.pagerCount - 2;
- if (target.className.includes("more")) {
- if (target.className.includes("quickprev")) newPage = currentPage - pagerCountOffset;
- else if (target.className.includes("quicknext")) newPage = currentPage + pagerCountOffset;
- }
- if (!Number.isNaN(+newPage)) {
- if (newPage < 1) newPage = 1;
- if (newPage > pageCount) newPage = pageCount;
- }
- if (newPage !== currentPage) emit(CHANGE_EVENT, newPage);
- }
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("ul", {
- class: normalizeClass(unref(nsPager).b()),
- onClick: onPagerClick,
- onKeyup: withKeys(onEnter, ["enter"])
- }, [
- _ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
- key: 0,
- class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === 1), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
- "aria-current": _ctx.currentPage === 1,
- "aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
- tabindex: tabindex.value
- }, " 1 ", 10, _hoisted_1$25)) : createCommentVNode("v-if", true),
- showPrevMore.value ? (openBlock(), createElementBlock("li", {
- key: 1,
- class: normalizeClass(prevMoreKls.value),
- tabindex: tabindex.value,
- "aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
- onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)),
- onMouseleave: _cache[1] || (_cache[1] = ($event) => quickPrevHover.value = false),
- onFocus: _cache[2] || (_cache[2] = ($event) => onFocus(true)),
- onBlur: _cache[3] || (_cache[3] = ($event) => quickPrevFocus.value = false)
- }, [(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_left_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))], 42, _hoisted_2$16)) : createCommentVNode("v-if", true),
- (openBlock(true), createElementBlock(Fragment, null, renderList(pagers.value, (pager) => {
- return openBlock(), createElementBlock("li", {
- key: pager,
- class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === pager), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
- "aria-current": _ctx.currentPage === pager,
- "aria-label": unref(t)("el.pagination.currentPage", { pager }),
- tabindex: tabindex.value
- }, toDisplayString(pager), 11, _hoisted_3$7);
- }), 128)),
- showNextMore.value ? (openBlock(), createElementBlock("li", {
- key: 2,
- class: normalizeClass(nextMoreKls.value),
- tabindex: tabindex.value,
- "aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
- onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()),
- onMouseleave: _cache[5] || (_cache[5] = ($event) => quickNextHover.value = false),
- onFocus: _cache[6] || (_cache[6] = ($event) => onFocus()),
- onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false)
- }, [(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(d_arrow_right_default), { key: 0 })) : (openBlock(), createBlock(unref(more_filled_default), { key: 1 }))], 42, _hoisted_4$5)) : createCommentVNode("v-if", true),
- _ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
- key: 3,
- class: normalizeClass([[unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount), unref(nsPager).is("disabled", _ctx.disabled)], "number"]),
- "aria-current": _ctx.currentPage === _ctx.pageCount,
- "aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
- tabindex: tabindex.value
- }, toDisplayString(_ctx.pageCount), 11, _hoisted_5$3)) : createCommentVNode("v-if", true)
- ], 34);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/src/pagination.mjs
- /**
- * It it user's responsibility to guarantee that the value of props.total... is number
- * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)
- * Otherwise we can reasonable infer that the corresponding field is absent
- */
- var isAbsent = (v) => typeof v !== "number";
- var paginationProps = buildProps({
- pageSize: Number,
- defaultPageSize: Number,
- total: Number,
- pageCount: Number,
- pagerCount: {
- type: Number,
- validator: (value) => {
- return isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
- },
- default: 7
- },
- currentPage: Number,
- defaultCurrentPage: Number,
- layout: {
- type: String,
- default: [
- "prev",
- "pager",
- "next",
- "jumper",
- "->",
- "total"
- ].join(", ")
- },
- pageSizes: {
- type: definePropType(Array),
- default: () => mutable([
- 10,
- 20,
- 30,
- 40,
- 50,
- 100
- ])
- },
- popperClass: {
- type: String,
- default: ""
- },
- popperStyle: { type: definePropType([String, Object]) },
- prevText: {
- type: String,
- default: ""
- },
- prevIcon: {
- type: iconPropType,
- default: () => arrow_left_default
- },
- nextText: {
- type: String,
- default: ""
- },
- nextIcon: {
- type: iconPropType,
- default: () => arrow_right_default
- },
- teleported: {
- type: Boolean,
- default: true
- },
- small: Boolean,
- size: useSizeProp,
- background: Boolean,
- disabled: Boolean,
- hideOnSinglePage: Boolean,
- appendSizeTo: String
- });
- var paginationEmits = {
- "update:current-page": (val) => isNumber(val),
- "update:page-size": (val) => isNumber(val),
- "size-change": (val) => isNumber(val),
- change: (currentPage, pageSize) => isNumber(currentPage) && isNumber(pageSize),
- "current-change": (val) => isNumber(val),
- "prev-click": (val) => isNumber(val),
- "next-click": (val) => isNumber(val)
- };
- var componentName = "ElPagination";
- //#endregion
- //#region node_modules/element-plus/es/components/pagination/index.mjs
- var ElPagination = withInstall(defineComponent({
- name: componentName,
- props: paginationProps,
- emits: paginationEmits,
- setup(props, { emit, slots }) {
- const { t } = useLocale();
- const ns = useNamespace("pagination");
- const vnodeProps = getCurrentInstance().vnode.props || {};
- const _globalSize = useGlobalSize();
- const _size = computed(() => props.small ? "small" : props.size ?? _globalSize.value);
- useDeprecated({
- from: "small",
- replacement: "size",
- version: "3.0.0",
- scope: "el-pagination",
- ref: "https://element-plus.org/zh-CN/component/pagination.html"
- }, computed(() => !!props.small));
- const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
- const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
- const assertValidUsage = computed(() => {
- if (isAbsent(props.total) && isAbsent(props.pageCount)) return false;
- if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false;
- if (props.layout.includes("sizes")) {
- if (!isAbsent(props.pageCount)) {
- if (!hasPageSizeListener) return false;
- } else if (!isAbsent(props.total)) {
- if (!isAbsent(props.pageSize)) {
- if (!hasPageSizeListener) return false;
- }
- }
- }
- return true;
- });
- const innerPageSize = ref(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);
- const innerCurrentPage = ref(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);
- const pageSizeBridge = computed({
- get() {
- return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;
- },
- set(v) {
- if (isAbsent(props.pageSize)) innerPageSize.value = v;
- if (hasPageSizeListener) {
- emit("update:page-size", v);
- emit("size-change", v);
- }
- }
- });
- const pageCountBridge = computed(() => {
- let pageCount = 0;
- if (!isAbsent(props.pageCount)) pageCount = props.pageCount;
- else if (!isAbsent(props.total)) pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));
- return pageCount;
- });
- const currentPageBridge = computed({
- get() {
- return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;
- },
- set(v) {
- let newCurrentPage = v;
- if (v < 1) newCurrentPage = 1;
- else if (v > pageCountBridge.value) newCurrentPage = pageCountBridge.value;
- if (isAbsent(props.currentPage)) innerCurrentPage.value = newCurrentPage;
- if (hasCurrentPageListener) {
- emit("update:current-page", newCurrentPage);
- emit("current-change", newCurrentPage);
- }
- }
- });
- watch(pageCountBridge, (val) => {
- if (currentPageBridge.value > val) currentPageBridge.value = val;
- });
- watch([currentPageBridge, pageSizeBridge], (value) => {
- emit(CHANGE_EVENT, ...value);
- }, { flush: "post" });
- function handleCurrentChange(val) {
- currentPageBridge.value = val;
- }
- function handleSizeChange(val) {
- pageSizeBridge.value = val;
- const newPageCount = pageCountBridge.value;
- if (currentPageBridge.value > newPageCount) currentPageBridge.value = newPageCount;
- }
- function prev() {
- if (props.disabled) return;
- currentPageBridge.value -= 1;
- emit("prev-click", currentPageBridge.value);
- }
- function next() {
- if (props.disabled) return;
- currentPageBridge.value += 1;
- emit("next-click", currentPageBridge.value);
- }
- function addClass(element, cls) {
- if (element) {
- if (!element.props) element.props = {};
- element.props.class = [element.props.class, cls].join(" ");
- }
- }
- provide(elPaginationKey, {
- pageCount: pageCountBridge,
- disabled: computed(() => props.disabled),
- currentPage: currentPageBridge,
- changeEvent: handleCurrentChange,
- handleSizeChange
- });
- return () => {
- if (!assertValidUsage.value) {
- debugWarn(componentName, t("el.pagination.deprecationWarning"));
- return null;
- }
- if (!props.layout) return null;
- if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null;
- const rootChildren = [];
- const rightWrapperChildren = [];
- const rightWrapperRoot = h$1("div", { class: ns.e("rightwrapper") }, rightWrapperChildren);
- const TEMPLATE_MAP = {
- prev: h$1(prev_default, {
- disabled: props.disabled,
- currentPage: currentPageBridge.value,
- prevText: props.prevText,
- prevIcon: props.prevIcon,
- onClick: prev
- }),
- jumper: h$1(jumper_default, { size: _size.value }),
- pager: h$1(pager_default, {
- currentPage: currentPageBridge.value,
- pageCount: pageCountBridge.value,
- pagerCount: props.pagerCount,
- onChange: handleCurrentChange,
- disabled: props.disabled
- }),
- next: h$1(next_default, {
- disabled: props.disabled,
- currentPage: currentPageBridge.value,
- pageCount: pageCountBridge.value,
- nextText: props.nextText,
- nextIcon: props.nextIcon,
- onClick: next
- }),
- sizes: h$1(sizes_default, {
- pageSize: pageSizeBridge.value,
- pageSizes: props.pageSizes,
- popperClass: props.popperClass,
- popperStyle: props.popperStyle,
- disabled: props.disabled,
- teleported: props.teleported,
- size: _size.value,
- appendSizeTo: props.appendSizeTo
- }),
- slot: slots?.default?.() ?? null,
- total: h$1(total_default, { total: isAbsent(props.total) ? 0 : props.total })
- };
- const components = props.layout.split(",").map((item) => item.trim());
- let haveRightWrapper = false;
- components.forEach((c) => {
- if (c === "->") {
- haveRightWrapper = true;
- return;
- }
- if (!haveRightWrapper) rootChildren.push(TEMPLATE_MAP[c]);
- else rightWrapperChildren.push(TEMPLATE_MAP[c]);
- });
- addClass(rootChildren[0], ns.is("first"));
- addClass(rootChildren[rootChildren.length - 1], ns.is("last"));
- if (haveRightWrapper && rightWrapperChildren.length > 0) {
- addClass(rightWrapperChildren[0], ns.is("first"));
- addClass(rightWrapperChildren[rightWrapperChildren.length - 1], ns.is("last"));
- rootChildren.push(rightWrapperRoot);
- }
- return h$1("div", { class: [
- ns.b(),
- ns.is("background", props.background),
- ns.m(_size.value)
- ] }, rootChildren);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/popconfirm/src/popconfirm.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
- */
- var popconfirmProps = buildProps({
- title: String,
- confirmButtonText: String,
- cancelButtonText: String,
- confirmButtonType: {
- type: String,
- values: buttonTypes,
- default: "primary"
- },
- cancelButtonType: {
- type: String,
- values: buttonTypes,
- default: "text"
- },
- icon: {
- type: iconPropType,
- default: () => question_filled_default
- },
- iconColor: {
- type: String,
- default: "#f90"
- },
- hideIcon: Boolean,
- hideAfter: {
- type: Number,
- default: 200
- },
- effect: {
- ...useTooltipContentProps.effect,
- default: "light"
- },
- teleported: useTooltipContentProps.teleported,
- persistent: useTooltipContentProps.persistent,
- width: {
- type: [String, Number],
- default: 150
- },
- virtualTriggering: useTooltipTriggerProps.virtualTriggering,
- virtualRef: useTooltipTriggerProps.virtualRef
- });
- var popconfirmEmits = {
- confirm: (e) => e instanceof MouseEvent,
- cancel: (e) => e instanceof MouseEvent
- };
- //#endregion
- //#region node_modules/element-plus/es/components/popconfirm/index.mjs
- var ElPopconfirm = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElPopconfirm",
- __name: "popconfirm",
- props: popconfirmProps,
- emits: popconfirmEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { t } = useLocale();
- const ns = useNamespace("popconfirm");
- const tooltipRef = ref();
- const rootRef = ref();
- const popperRef = computed(() => {
- return unref(tooltipRef)?.popperRef;
- });
- const showPopper = () => {
- rootRef.value?.focus?.();
- };
- const hidePopper = () => {
- tooltipRef.value?.onClose?.();
- };
- const style = computed(() => {
- return { width: addUnit(props.width) };
- });
- const confirm = (e) => {
- emit("confirm", e);
- hidePopper();
- };
- const cancel = (e) => {
- emit("cancel", e);
- hidePopper();
- };
- const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
- const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
- __expose({
- popperRef,
- hide: hidePopper
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTooltip), mergeProps({
- ref_key: "tooltipRef",
- ref: tooltipRef,
- trigger: "click",
- effect: __props.effect
- }, _ctx.$attrs, {
- "virtual-triggering": __props.virtualTriggering,
- "virtual-ref": __props.virtualRef,
- "popper-class": `${unref(ns).namespace.value}-popover`,
- "popper-style": style.value,
- teleported: __props.teleported,
- "fallback-placements": [
- "bottom",
- "top",
- "right",
- "left"
- ],
- "hide-after": __props.hideAfter,
- persistent: __props.persistent,
- loop: "",
- onShow: showPopper
- }), {
- content: withCtx(() => [createBaseVNode("div", {
- ref_key: "rootRef",
- ref: rootRef,
- tabindex: "-1",
- class: normalizeClass(unref(ns).b())
- }, [createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [!__props.hideIcon && __props.icon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(ns).e("icon")),
- style: normalizeStyle({ color: __props.iconColor })
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- }, 8, ["class", "style"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(__props.title), 1)], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [renderSlot(_ctx.$slots, "actions", {
- confirm,
- cancel
- }, () => [createVNode(unref(ElButton), {
- size: "small",
- type: __props.cancelButtonType === "text" ? "" : __props.cancelButtonType,
- text: __props.cancelButtonType === "text",
- onClick: cancel
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(finalCancelButtonText.value), 1)]),
- _: 1
- }, 8, ["type", "text"]), createVNode(unref(ElButton), {
- size: "small",
- type: __props.confirmButtonType === "text" ? "" : __props.confirmButtonType,
- text: __props.confirmButtonType === "text",
- onClick: confirm
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(finalConfirmButtonText.value), 1)]),
- _: 1
- }, 8, ["type", "text"])])], 2)], 2)]),
- default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
- _: 3
- }, 16, [
- "effect",
- "virtual-triggering",
- "virtual-ref",
- "popper-class",
- "popper-style",
- "teleported",
- "hide-after",
- "persistent"
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/progress/src/progress.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `ProgressProps` instead.
- */
- var progressProps = buildProps({
- type: {
- type: String,
- default: "line",
- values: [
- "line",
- "circle",
- "dashboard"
- ]
- },
- percentage: {
- type: Number,
- default: 0,
- validator: (val) => val >= 0 && val <= 100
- },
- status: {
- type: String,
- default: "",
- values: [
- "",
- "success",
- "exception",
- "warning"
- ]
- },
- indeterminate: Boolean,
- duration: {
- type: Number,
- default: 3
- },
- strokeWidth: {
- type: Number,
- default: 6
- },
- strokeLinecap: {
- type: definePropType(String),
- default: "round"
- },
- textInside: Boolean,
- width: {
- type: Number,
- default: 126
- },
- showText: {
- type: Boolean,
- default: true
- },
- color: {
- type: definePropType([
- String,
- Array,
- Function
- ]),
- default: ""
- },
- striped: Boolean,
- stripedFlow: Boolean,
- format: {
- type: definePropType(Function),
- default: (percentage) => `${percentage}%`
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/progress/src/progress.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$24 = ["aria-valuenow"];
- var _hoisted_2$15 = { viewBox: "0 0 100 100" };
- var _hoisted_3$6 = [
- "d",
- "stroke",
- "stroke-linecap",
- "stroke-width"
- ];
- var _hoisted_4$4 = [
- "d",
- "stroke",
- "opacity",
- "stroke-linecap",
- "stroke-width"
- ];
- var _hoisted_5$2 = { key: 0 };
- //#endregion
- //#region node_modules/element-plus/es/components/progress/index.mjs
- var ElProgress = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElProgress",
- __name: "progress",
- props: progressProps,
- setup(__props) {
- const STATUS_COLOR_MAP = {
- success: "#13ce66",
- exception: "#ff4949",
- warning: "#e6a23c",
- default: "#20a0ff"
- };
- const props = __props;
- const ns = useNamespace("progress");
- const barStyle = computed(() => {
- const barStyle = {
- width: `${props.percentage}%`,
- animationDuration: `${props.duration}s`
- };
- const color = getCurrentColor(props.percentage);
- if (color.includes("gradient")) barStyle.background = color;
- else barStyle.backgroundColor = color;
- return barStyle;
- });
- const relativeStrokeWidth = computed(() => (props.strokeWidth / props.width * 100).toFixed(1));
- const radius = computed(() => {
- if (["circle", "dashboard"].includes(props.type)) return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10);
- return 0;
- });
- const trackPath = computed(() => {
- const r = radius.value;
- const isDashboard = props.type === "dashboard";
- return `
- M 50 50
- m 0 ${isDashboard ? "" : "-"}${r}
- a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2}
- a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2}
- `;
- });
- const perimeter = computed(() => 2 * Math.PI * radius.value);
- const rate = computed(() => props.type === "dashboard" ? .75 : 1);
- const strokeDashoffset = computed(() => {
- return `${-1 * perimeter.value * (1 - rate.value) / 2}px`;
- });
- const trailPathStyle = computed(() => ({
- strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,
- strokeDashoffset: strokeDashoffset.value
- }));
- const circlePathStyle = computed(() => ({
- strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,
- strokeDashoffset: strokeDashoffset.value,
- transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
- }));
- const stroke = computed(() => {
- let ret;
- if (props.color) ret = getCurrentColor(props.percentage);
- else ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default;
- return ret;
- });
- const statusIcon = computed(() => {
- if (props.status === "warning") return warning_filled_default;
- if (props.type === "line") return props.status === "success" ? circle_check_default : circle_close_default;
- else return props.status === "success" ? check_default : close_default;
- });
- const progressTextSize = computed(() => {
- return props.type === "line" ? 12 + props.strokeWidth * .4 : props.width * .111111 + 2;
- });
- const content = computed(() => props.format(props.percentage));
- function getColors(color) {
- const span = 100 / color.length;
- return color.map((seriesColor, index) => {
- if (isString(seriesColor)) return {
- color: seriesColor,
- percentage: (index + 1) * span
- };
- return seriesColor;
- }).sort((a, b) => a.percentage - b.percentage);
- }
- const getCurrentColor = (percentage) => {
- const { color } = props;
- if (isFunction$1(color)) return color(percentage);
- else if (isString(color)) return color;
- else {
- const colors = getColors(color);
- for (const color of colors) if (color.percentage > percentage) return color.color;
- return colors[colors.length - 1]?.color;
- }
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([
- unref(ns).b(),
- unref(ns).m(__props.type),
- unref(ns).is(__props.status),
- {
- [unref(ns).m("without-text")]: !__props.showText,
- [unref(ns).m("text-inside")]: __props.textInside
- }
- ]),
- role: "progressbar",
- "aria-valuenow": __props.percentage,
- "aria-valuemin": "0",
- "aria-valuemax": "100"
- }, [__props.type === "line" ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).b("bar"))
- }, [createBaseVNode("div", {
- class: normalizeClass(unref(ns).be("bar", "outer")),
- style: normalizeStyle({ height: `${__props.strokeWidth}px` })
- }, [createBaseVNode("div", {
- class: normalizeClass([
- unref(ns).be("bar", "inner"),
- { [unref(ns).bem("bar", "inner", "indeterminate")]: __props.indeterminate },
- { [unref(ns).bem("bar", "inner", "striped")]: __props.striped },
- { [unref(ns).bem("bar", "inner", "striped-flow")]: __props.stripedFlow }
- ]),
- style: normalizeStyle(barStyle.value)
- }, [(__props.showText || _ctx.$slots.default) && __props.textInside ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).be("bar", "innerText"))
- }, [renderSlot(_ctx.$slots, "default", { percentage: __props.percentage }, () => [createBaseVNode("span", null, toDisplayString(content.value), 1)])], 2)) : createCommentVNode("v-if", true)], 6)], 6)], 2)) : (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).b("circle")),
- style: normalizeStyle({
- height: `${__props.width}px`,
- width: `${__props.width}px`
- })
- }, [(openBlock(), createElementBlock("svg", _hoisted_2$15, [createBaseVNode("path", {
- class: normalizeClass(unref(ns).be("circle", "track")),
- d: trackPath.value,
- stroke: `var(${unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`,
- "stroke-linecap": __props.strokeLinecap,
- "stroke-width": relativeStrokeWidth.value,
- fill: "none",
- style: normalizeStyle(trailPathStyle.value)
- }, null, 14, _hoisted_3$6), createBaseVNode("path", {
- class: normalizeClass(unref(ns).be("circle", "path")),
- d: trackPath.value,
- stroke: stroke.value,
- fill: "none",
- opacity: __props.percentage ? 1 : 0,
- "stroke-linecap": __props.strokeLinecap,
- "stroke-width": relativeStrokeWidth.value,
- style: normalizeStyle(circlePathStyle.value)
- }, null, 14, _hoisted_4$4)]))], 6)), (__props.showText || _ctx.$slots.default) && !__props.textInside ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass(unref(ns).e("text")),
- style: normalizeStyle({ fontSize: `${progressTextSize.value}px` })
- }, [renderSlot(_ctx.$slots, "default", { percentage: __props.percentage }, () => [!__props.status ? (openBlock(), createElementBlock("span", _hoisted_5$2, toDisplayString(content.value), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(statusIcon.value)))]),
- _: 1
- }))])], 6)) : createCommentVNode("v-if", true)], 10, _hoisted_1$24);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/rate/src/rate.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `RateProps` instead.
- */
- var rateProps = buildProps({
- modelValue: {
- type: Number,
- default: 0
- },
- id: {
- type: String,
- default: void 0
- },
- lowThreshold: {
- type: Number,
- default: 2
- },
- highThreshold: {
- type: Number,
- default: 4
- },
- max: {
- type: Number,
- default: 5
- },
- colors: {
- type: definePropType([Array, Object]),
- default: () => mutable([
- "",
- "",
- ""
- ])
- },
- voidColor: {
- type: String,
- default: ""
- },
- disabledVoidColor: {
- type: String,
- default: ""
- },
- icons: {
- type: definePropType([Array, Object]),
- default: () => [
- star_filled_default,
- star_filled_default,
- star_filled_default
- ]
- },
- voidIcon: {
- type: iconPropType,
- default: () => star_default
- },
- disabledVoidIcon: {
- type: iconPropType,
- default: () => star_filled_default
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- allowHalf: Boolean,
- showText: Boolean,
- showScore: Boolean,
- textColor: {
- type: String,
- default: ""
- },
- texts: {
- type: definePropType(Array),
- default: () => mutable([
- "Extremely bad",
- "Disappointed",
- "Fair",
- "Satisfied",
- "Surprise"
- ])
- },
- scoreTemplate: {
- type: String,
- default: "{value}"
- },
- size: useSizeProp,
- clearable: Boolean,
- ...useAriaProps(["ariaLabel"])
- });
- var rateEmits = {
- [CHANGE_EVENT]: (value) => isNumber(value),
- [UPDATE_MODEL_EVENT]: (value) => isNumber(value)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/rate/src/rate.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$23 = [
- "id",
- "aria-label",
- "aria-labelledby",
- "aria-valuenow",
- "aria-valuetext",
- "aria-valuemax",
- "tabindex",
- "aria-disabled"
- ];
- var _hoisted_2$14 = ["onMousemove", "onClick"];
- //#endregion
- //#region node_modules/element-plus/es/components/rate/index.mjs
- var ElRate = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElRate",
- __name: "rate",
- props: rateProps,
- emits: rateEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- function getValueFromMap(value, map) {
- const isExcludedObject = (val) => isObject$2(val);
- const matchedValue = map[Object.keys(map).map((key) => +key).filter((key) => {
- const val = map[key];
- return (isExcludedObject(val) ? val.excluded : false) ? value < key : value <= key;
- }).sort((a, b) => a - b)[0]];
- return isExcludedObject(matchedValue) && matchedValue.value || matchedValue;
- }
- const props = __props;
- const emit = __emit;
- const formItemContext = inject(formItemContextKey, void 0);
- const rateSize = useFormSize();
- const ns = useNamespace("rate");
- const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext });
- const currentValue = ref(clamp$2(props.modelValue, 0, props.max));
- const hoverIndex = ref(-1);
- const pointerAtLeftHalf = ref(true);
- const iconRefs = ref([]);
- const iconClientWidths = computed(() => iconRefs.value.map((icon) => icon.$el.clientWidth));
- const rateClasses = computed(() => [ns.b(), ns.m(rateSize.value)]);
- const rateDisabled = useFormDisabled();
- const rateStyles = computed(() => {
- return ns.cssVarBlock({
- "void-color": props.voidColor,
- "disabled-void-color": props.disabledVoidColor,
- "fill-color": activeColor.value
- });
- });
- const text = computed(() => {
- let result = "";
- if (props.showScore) result = props.scoreTemplate.replace(/\{\s*value\s*\}/, rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`);
- else if (props.showText) result = props.texts[Math.ceil(currentValue.value) - 1];
- return result;
- });
- const valueDecimal = computed(() => props.modelValue * 100 - Math.floor(props.modelValue) * 100);
- const colorMap = computed(() => isArray$1(props.colors) ? {
- [props.lowThreshold]: props.colors[0],
- [props.highThreshold]: {
- value: props.colors[1],
- excluded: true
- },
- [props.max]: props.colors[2]
- } : props.colors);
- const activeColor = computed(() => {
- const color = getValueFromMap(currentValue.value, colorMap.value);
- return isObject$2(color) ? "" : color;
- });
- const decimalStyle = computed(() => {
- let width = "";
- if (rateDisabled.value) width = `${valueDecimal.value}%`;
- else if (props.allowHalf) width = "50%";
- return {
- color: activeColor.value,
- width
- };
- });
- const componentMap = computed(() => {
- let icons = isArray$1(props.icons) ? [...props.icons] : { ...props.icons };
- icons = markRaw(icons);
- return isArray$1(icons) ? {
- [props.lowThreshold]: icons[0],
- [props.highThreshold]: {
- value: icons[1],
- excluded: true
- },
- [props.max]: icons[2]
- } : icons;
- });
- const decimalIconComponent = computed(() => getValueFromMap(props.modelValue, componentMap.value));
- const voidComponent = computed(() => rateDisabled.value ? isString(props.disabledVoidIcon) ? props.disabledVoidIcon : markRaw(props.disabledVoidIcon) : isString(props.voidIcon) ? props.voidIcon : markRaw(props.voidIcon));
- const activeComponent = computed(() => getValueFromMap(currentValue.value, componentMap.value));
- function showDecimalIcon(item) {
- const showWhenDisabled = rateDisabled.value && valueDecimal.value > 0 && item - 1 < props.modelValue && item > props.modelValue;
- const showWhenAllowHalf = props.allowHalf && pointerAtLeftHalf.value && item - .5 <= currentValue.value && item > currentValue.value;
- return showWhenDisabled || showWhenAllowHalf;
- }
- function emitValue(value) {
- if (props.clearable && value === props.modelValue) value = 0;
- emit(UPDATE_MODEL_EVENT, value);
- if (props.modelValue !== value) emit(CHANGE_EVENT, value);
- }
- function selectValue(value) {
- if (rateDisabled.value) return;
- if (props.allowHalf && pointerAtLeftHalf.value) emitValue(currentValue.value);
- else emitValue(value);
- }
- function handleKey(e) {
- if (rateDisabled.value) return;
- const code = getEventCode(e);
- const step = props.allowHalf ? .5 : 1;
- let _currentValue = currentValue.value;
- switch (code) {
- case EVENT_CODE.up:
- case EVENT_CODE.right:
- _currentValue += step;
- break;
- case EVENT_CODE.left:
- case EVENT_CODE.down:
- _currentValue -= step;
- break;
- }
- _currentValue = clamp$2(_currentValue, 0, props.max);
- if (_currentValue === currentValue.value) return;
- e.stopPropagation();
- e.preventDefault();
- emit(UPDATE_MODEL_EVENT, _currentValue);
- emit(CHANGE_EVENT, _currentValue);
- return _currentValue;
- }
- function setCurrentValue(value, event) {
- if (rateDisabled.value) return;
- if (props.allowHalf && event) {
- pointerAtLeftHalf.value = event.offsetX * 2 <= iconClientWidths.value[value - 1];
- currentValue.value = pointerAtLeftHalf.value ? value - .5 : value;
- } else currentValue.value = value;
- hoverIndex.value = value;
- }
- function resetCurrentValue() {
- if (rateDisabled.value) return;
- if (props.allowHalf) pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
- currentValue.value = clamp$2(props.modelValue, 0, props.max);
- hoverIndex.value = -1;
- }
- watch(() => props.modelValue, (val) => {
- currentValue.value = clamp$2(val, 0, props.max);
- pointerAtLeftHalf.value = props.modelValue !== Math.floor(props.modelValue);
- });
- if (!props.modelValue) emit(UPDATE_MODEL_EVENT, 0);
- __expose({
- setCurrentValue,
- resetCurrentValue
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- id: unref(inputId),
- class: normalizeClass([rateClasses.value, unref(ns).is("disabled", unref(rateDisabled))]),
- role: "slider",
- "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "rating" : void 0,
- "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItemContext)?.labelId : void 0,
- "aria-valuenow": currentValue.value,
- "aria-valuetext": text.value || void 0,
- "aria-valuemin": "0",
- "aria-valuemax": __props.max,
- style: normalizeStyle(rateStyles.value),
- tabindex: unref(rateDisabled) ? void 0 : 0,
- "aria-disabled": unref(rateDisabled),
- onKeydown: handleKey
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.max, (item, key) => {
- return openBlock(), createElementBlock("span", {
- key,
- class: normalizeClass(unref(ns).e("item")),
- onMousemove: ($event) => setCurrentValue(item, $event),
- onMouseleave: resetCurrentValue,
- onClick: ($event) => selectValue(item)
- }, [createVNode(unref(ElIcon), {
- ref_for: true,
- ref_key: "iconRefs",
- ref: iconRefs,
- class: normalizeClass([
- unref(ns).e("icon"),
- { hover: hoverIndex.value === item },
- unref(ns).is("active", item <= currentValue.value),
- unref(ns).is("focus-visible", item === Math.ceil(currentValue.value || 1))
- ])
- }, {
- default: withCtx(() => [
- withDirectives((openBlock(), createBlock(resolveDynamicComponent(activeComponent.value), null, null, 512)), [[vShow, !showDecimalIcon(item) && item <= currentValue.value]]),
- withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), null, null, 512)), [[vShow, !showDecimalIcon(item) && item > currentValue.value]]),
- withDirectives((openBlock(), createBlock(resolveDynamicComponent(voidComponent.value), { class: normalizeClass([unref(ns).em("decimal", "box")]) }, null, 8, ["class"])), [[vShow, showDecimalIcon(item)]]),
- withDirectives(createVNode(unref(ElIcon), {
- style: normalizeStyle(decimalStyle.value),
- class: normalizeClass([unref(ns).e("icon"), unref(ns).e("decimal")])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(decimalIconComponent.value)))]),
- _: 1
- }, 8, ["style", "class"]), [[vShow, showDecimalIcon(item)]])
- ]),
- _: 2
- }, 1032, ["class"])], 42, _hoisted_2$14);
- }), 128)), __props.showText || __props.showScore ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(unref(ns).e("text")),
- style: normalizeStyle({ color: __props.textColor })
- }, toDisplayString(text.value), 7)) : createCommentVNode("v-if", true)], 46, _hoisted_1$23);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/result/src/result.mjs
- var IconMap = {
- primary: "icon-primary",
- success: "icon-success",
- warning: "icon-warning",
- error: "icon-error",
- info: "icon-info"
- };
- var IconComponentMap = {
- [IconMap.primary]: info_filled_default,
- [IconMap.success]: circle_check_filled_default,
- [IconMap.warning]: warning_filled_default,
- [IconMap.error]: circle_close_filled_default,
- [IconMap.info]: info_filled_default
- };
- /**
- * @deprecated Removed after 3.0.0, Use `ResultProps` instead.
- */
- var resultProps = buildProps({
- title: {
- type: String,
- default: ""
- },
- subTitle: {
- type: String,
- default: ""
- },
- icon: {
- type: String,
- values: [
- "primary",
- "success",
- "warning",
- "info",
- "error"
- ],
- default: "info"
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/result/index.mjs
- var ElResult = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElResult",
- __name: "result",
- props: resultProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("result");
- const resultIcon = computed(() => {
- const icon = props.icon;
- const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
- return {
- class: iconClass,
- component: IconComponentMap[iconClass] || IconComponentMap["icon-info"]
- };
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("icon")) }, [renderSlot(_ctx.$slots, "icon", {}, () => [resultIcon.value.component ? (openBlock(), createBlock(resolveDynamicComponent(resultIcon.value.component), {
- key: 0,
- class: normalizeClass(resultIcon.value.class)
- }, null, 8, ["class"])) : createCommentVNode("v-if", true)])], 2),
- __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("title"))
- }, [renderSlot(_ctx.$slots, "title", {}, () => [createBaseVNode("p", null, toDisplayString(__props.title), 1)])], 2)) : createCommentVNode("v-if", true),
- __props.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("subtitle"))
- }, [renderSlot(_ctx.$slots, "sub-title", {}, () => [createBaseVNode("p", null, toDisplayString(__props.subTitle), 1)])], 2)) : createCommentVNode("v-if", true),
- _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass(unref(ns).e("extra"))
- }, [renderSlot(_ctx.$slots, "extra")], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/defaults.mjs
- var ITEM_RENDER_EVT = "itemRendered";
- var SCROLL_EVT = "scroll";
- var FORWARD = "forward";
- var BACKWARD = "backward";
- var AUTO_ALIGNMENT = "auto";
- var START_ALIGNMENT = "start";
- var CENTERED_ALIGNMENT = "center";
- var HORIZONTAL = "horizontal";
- var VERTICAL = "vertical";
- var RTL_OFFSET_NAG = "negative";
- var RTL_OFFSET_POS_ASC = "positive-ascending";
- var RTL_OFFSET_POS_DESC = "positive-descending";
- var ScrollbarDirKey = {
- [HORIZONTAL]: "left",
- [VERTICAL]: "top"
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/props.mjs
- var itemSize$1 = buildProp({
- type: definePropType([Number, Function]),
- required: true
- });
- var estimatedItemSize = buildProp({ type: Number });
- var cache = buildProp({
- type: Number,
- default: 2
- });
- var direction = buildProp({
- type: String,
- values: ["ltr", "rtl"],
- default: "ltr"
- });
- var initScrollOffset = buildProp({
- type: Number,
- default: 0
- });
- var total = buildProp({
- type: Number,
- required: true
- });
- var layout = buildProp({
- type: String,
- values: ["horizontal", "vertical"],
- default: VERTICAL
- });
- var virtualizedProps = buildProps({
- className: {
- type: String,
- default: ""
- },
- containerElement: {
- type: definePropType([String, Object]),
- default: "div"
- },
- data: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- direction,
- height: {
- type: [String, Number],
- required: true
- },
- innerElement: {
- type: [String, Object],
- default: "div"
- },
- innerProps: {
- type: definePropType(Object),
- default: () => ({})
- },
- style: { type: definePropType([
- Object,
- String,
- Array
- ]) },
- useIsScrolling: Boolean,
- width: {
- type: [Number, String],
- required: false
- },
- perfMode: {
- type: Boolean,
- default: true
- },
- scrollbarAlwaysOn: Boolean
- });
- var virtualizedListProps = buildProps({
- cache,
- estimatedItemSize,
- layout,
- initScrollOffset,
- total,
- itemSize: itemSize$1,
- ...virtualizedProps
- });
- var scrollbarSize = {
- type: Number,
- default: 6
- };
- var startGap = {
- type: Number,
- default: 0
- };
- var endGap = {
- type: Number,
- default: 2
- };
- var virtualizedGridProps = buildProps({
- columnCache: cache,
- columnWidth: itemSize$1,
- estimatedColumnWidth: estimatedItemSize,
- estimatedRowHeight: estimatedItemSize,
- initScrollLeft: initScrollOffset,
- initScrollTop: initScrollOffset,
- itemKey: {
- type: definePropType(Function),
- default: ({ columnIndex, rowIndex }) => `${rowIndex}:${columnIndex}`
- },
- rowCache: cache,
- rowHeight: itemSize$1,
- totalColumn: total,
- totalRow: total,
- hScrollbarSize: scrollbarSize,
- vScrollbarSize: scrollbarSize,
- scrollbarStartGap: startGap,
- scrollbarEndGap: endGap,
- role: String,
- ...virtualizedProps
- });
- var virtualizedScrollbarProps = buildProps({
- alwaysOn: Boolean,
- class: String,
- layout,
- total,
- ratio: {
- type: Number,
- required: true
- },
- clientSize: {
- type: Number,
- required: true
- },
- scrollFrom: {
- type: Number,
- required: true
- },
- scrollbarSize,
- startGap,
- endGap,
- visible: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/utils.mjs
- var getScrollDir = (prev, cur) => prev < cur ? FORWARD : BACKWARD;
- var isHorizontal = (dir) => dir === "ltr" || dir === "rtl" || dir === "horizontal";
- var isRTL = (dir) => dir === "rtl";
- var cachedRTLResult = null;
- function getRTLOffsetType(recalculate = false) {
- if (cachedRTLResult === null || recalculate) {
- const outerDiv = document.createElement("div");
- const outerStyle = outerDiv.style;
- outerStyle.width = "50px";
- outerStyle.height = "50px";
- outerStyle.overflow = "scroll";
- outerStyle.direction = "rtl";
- const innerDiv = document.createElement("div");
- const innerStyle = innerDiv.style;
- innerStyle.width = "100px";
- innerStyle.height = "100px";
- outerDiv.appendChild(innerDiv);
- document.body.appendChild(outerDiv);
- if (outerDiv.scrollLeft > 0) cachedRTLResult = RTL_OFFSET_POS_DESC;
- else {
- outerDiv.scrollLeft = 1;
- if (outerDiv.scrollLeft === 0) cachedRTLResult = RTL_OFFSET_NAG;
- else cachedRTLResult = RTL_OFFSET_POS_ASC;
- }
- document.body.removeChild(outerDiv);
- return cachedRTLResult;
- }
- return cachedRTLResult;
- }
- function renderThumbStyle$1({ move, size, bar }, layout) {
- const style = {};
- const translate = `translate${bar.axis}(${move}px)`;
- style[bar.size] = size;
- style.transform = translate;
- if (layout === "horizontal") style.height = "100%";
- else style.width = "100%";
- return style;
- }
- //#endregion
- //#region node_modules/memoize-one/dist/memoize-one.esm.js
- var safeIsNaN = Number.isNaN || function ponyfill(value) {
- return typeof value === "number" && value !== value;
- };
- function isEqual(first, second) {
- if (first === second) return true;
- if (safeIsNaN(first) && safeIsNaN(second)) return true;
- return false;
- }
- function areInputsEqual(newInputs, lastInputs) {
- if (newInputs.length !== lastInputs.length) return false;
- for (var i = 0; i < newInputs.length; i++) if (!isEqual(newInputs[i], lastInputs[i])) return false;
- return true;
- }
- function memoizeOne(resultFn, isEqual) {
- if (isEqual === void 0) isEqual = areInputsEqual;
- var cache = null;
- function memoized() {
- var newArgs = [];
- for (var _i = 0; _i < arguments.length; _i++) newArgs[_i] = arguments[_i];
- if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) return cache.lastResult;
- var lastResult = resultFn.apply(this, newArgs);
- cache = {
- lastResult,
- lastArgs: newArgs,
- lastThis: this
- };
- return lastResult;
- }
- memoized.clear = function clear() {
- cache = null;
- };
- return memoized;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-cache.mjs
- var useCache = () => {
- const props = getCurrentInstance().proxy.$props;
- return computed(() => {
- const _getItemStyleCache = (_, __, ___) => ({});
- return props.perfMode ? memoize(_getItemStyleCache) : memoizeOne(_getItemStyleCache);
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-wheel.mjs
- var useWheel = ({ atEndEdge, atStartEdge, layout }, onWheelDelta) => {
- let frameHandle;
- let offset = 0;
- const hasReachedEdge = (offset) => {
- return offset < 0 && atStartEdge.value || offset > 0 && atEndEdge.value;
- };
- const onWheel = (e) => {
- cAF(frameHandle);
- let { deltaX, deltaY } = e;
- if (e.shiftKey && deltaY !== 0) {
- deltaX = deltaY;
- deltaY = 0;
- }
- const newOffset = layout.value === "horizontal" ? deltaX : deltaY;
- if (hasReachedEdge(newOffset)) return;
- offset += newOffset;
- if (!isFirefox() && newOffset !== 0) e.preventDefault();
- frameHandle = rAF(() => {
- onWheelDelta(offset);
- offset = 0;
- });
- };
- return {
- hasReachedEdge,
- onWheel
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/components/scrollbar.mjs
- var ScrollBar = defineComponent({
- name: "ElVirtualScrollBar",
- props: virtualizedScrollbarProps,
- emits: [
- "scroll",
- "start-move",
- "stop-move"
- ],
- setup(props, { emit }) {
- const GAP = computed(() => props.startGap + props.endGap);
- const nsVirtualScrollbar = useNamespace("virtual-scrollbar");
- const nsScrollbar = useNamespace("scrollbar");
- const trackRef = ref();
- const thumbRef = ref();
- let frameHandle = null;
- let onselectstartStore = null;
- const state = reactive({
- isDragging: false,
- traveled: 0
- });
- const bar = computed(() => BAR_MAP[props.layout]);
- const trackSize = computed(() => props.clientSize - unref(GAP));
- const trackStyle = computed(() => ({
- position: "absolute",
- width: `${"horizontal" === props.layout ? trackSize.value : props.scrollbarSize}px`,
- height: `${"horizontal" === props.layout ? props.scrollbarSize : trackSize.value}px`,
- [ScrollbarDirKey[props.layout]]: "2px",
- right: "2px",
- bottom: "2px",
- borderRadius: "4px"
- }));
- const thumbSize = computed(() => {
- const ratio = props.ratio;
- if (ratio >= 100) return Number.POSITIVE_INFINITY;
- if (ratio >= 50) return ratio * trackSize.value / 100;
- const SCROLLBAR_MAX_SIZE = trackSize.value / 3;
- return Math.floor(Math.min(Math.max(ratio * trackSize.value / 100, 20), SCROLLBAR_MAX_SIZE));
- });
- const thumbStyle = computed(() => {
- if (!Number.isFinite(thumbSize.value)) return { display: "none" };
- const thumb = `${thumbSize.value}px`;
- return renderThumbStyle$1({
- bar: bar.value,
- size: thumb,
- move: state.traveled
- }, props.layout);
- });
- const totalSteps = computed(() => Math.ceil(props.clientSize - thumbSize.value - unref(GAP)));
- const attachEvents = () => {
- window.addEventListener("mousemove", onMouseMove);
- window.addEventListener("mouseup", onMouseUp);
- const thumbEl = unref(thumbRef);
- if (!thumbEl) return;
- onselectstartStore = document.onselectstart;
- document.onselectstart = () => false;
- thumbEl.addEventListener("touchmove", onMouseMove, { passive: true });
- thumbEl.addEventListener("touchend", onMouseUp);
- };
- const detachEvents = () => {
- window.removeEventListener("mousemove", onMouseMove);
- window.removeEventListener("mouseup", onMouseUp);
- document.onselectstart = onselectstartStore;
- onselectstartStore = null;
- const thumbEl = unref(thumbRef);
- if (!thumbEl) return;
- thumbEl.removeEventListener("touchmove", onMouseMove);
- thumbEl.removeEventListener("touchend", onMouseUp);
- };
- const onThumbMouseDown = (e) => {
- e.stopImmediatePropagation();
- if (e.ctrlKey || [1, 2].includes(e.button)) return;
- state.isDragging = true;
- state[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
- emit("start-move");
- attachEvents();
- };
- const onMouseUp = () => {
- state.isDragging = false;
- state[bar.value.axis] = 0;
- emit("stop-move");
- detachEvents();
- };
- const onMouseMove = (e) => {
- const { isDragging } = state;
- if (!isDragging) return;
- if (!thumbRef.value || !trackRef.value) return;
- const prevPage = state[bar.value.axis];
- if (!prevPage) return;
- cAF(frameHandle);
- /**
- * +--------------+ +--------------+
- * | - <--------- thumb.offsetTop | |
- * | |+| <--+ | |
- * | - | | |
- * | Content | | | |
- * | | | | |
- * | | | | |
- * | | | | -
- * | | +--> | |+|
- * | | | -
- * +--------------+ +--------------+
- */
- const distance = (trackRef.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1 - (thumbRef.value[bar.value.offset] - prevPage);
- frameHandle = rAF(() => {
- state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
- emit("scroll", distance, totalSteps.value);
- });
- };
- const clickTrackHandler = (e) => {
- const distance = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) - thumbRef.value[bar.value.offset] / 2;
- state.traveled = Math.max(0, Math.min(distance, totalSteps.value));
- emit("scroll", distance, totalSteps.value);
- };
- watch(() => props.scrollFrom, (v) => {
- if (state.isDragging) return;
- /**
- * this is simply mapping the current scrollbar offset
- *
- * formula 1:
- * v = scrollOffset / (estimatedTotalSize - clientSize)
- * traveled = v * (clientSize - thumbSize - GAP) --> v * totalSteps
- *
- * formula 2:
- * traveled = (v * clientSize) / (clientSize / totalSteps) --> (v * clientSize) * (totalSteps / clientSize) --> v * totalSteps
- */
- state.traveled = Math.ceil(v * totalSteps.value);
- });
- onBeforeUnmount(() => {
- detachEvents();
- });
- return () => {
- return h$1("div", {
- role: "presentation",
- ref: trackRef,
- class: [
- nsVirtualScrollbar.b(),
- props.class,
- (props.alwaysOn || state.isDragging) && "always-on"
- ],
- style: trackStyle.value,
- onMousedown: withModifiers(clickTrackHandler, ["stop", "prevent"]),
- onTouchstartPrevent: onThumbMouseDown
- }, h$1("div", {
- ref: thumbRef,
- class: nsScrollbar.e("thumb"),
- style: thumbStyle.value,
- onMousedown: onThumbMouseDown
- }, []));
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/builders/build-list.mjs
- var createList = ({ name, getOffset, getItemSize, getItemOffset, getEstimatedTotalSize, getStartIndexForOffset, getStopIndexForStartIndex, initCache, clearCache, validateProps }) => {
- return defineComponent({
- name: name ?? "ElVirtualList",
- props: virtualizedListProps,
- emits: [ITEM_RENDER_EVT, SCROLL_EVT],
- setup(props, { emit, expose }) {
- validateProps(props);
- const instance = getCurrentInstance();
- const ns = useNamespace("vl");
- const dynamicSizeCache = ref(initCache(props, instance));
- const getItemStyleCache = useCache();
- const windowRef = ref();
- const innerRef = ref();
- const scrollbarRef = ref();
- const states = ref({
- isScrolling: false,
- scrollDir: "forward",
- scrollOffset: isNumber(props.initScrollOffset) ? props.initScrollOffset : 0,
- updateRequested: false,
- isScrollbarDragging: false,
- scrollbarAlwaysOn: props.scrollbarAlwaysOn
- });
- const itemsToRender = computed(() => {
- const { total, cache } = props;
- const { isScrolling, scrollDir, scrollOffset } = unref(states);
- if (total === 0) return [
- 0,
- 0,
- 0,
- 0
- ];
- const startIndex = getStartIndexForOffset(props, scrollOffset, unref(dynamicSizeCache));
- const stopIndex = getStopIndexForStartIndex(props, startIndex, scrollOffset, unref(dynamicSizeCache));
- const cacheBackward = !isScrolling || scrollDir === "backward" ? Math.max(1, cache) : 1;
- const cacheForward = !isScrolling || scrollDir === "forward" ? Math.max(1, cache) : 1;
- return [
- Math.max(0, startIndex - cacheBackward),
- Math.max(0, Math.min(total - 1, stopIndex + cacheForward)),
- startIndex,
- stopIndex
- ];
- });
- const estimatedTotalSize = computed(() => getEstimatedTotalSize(props, unref(dynamicSizeCache)));
- const _isHorizontal = computed(() => isHorizontal(props.layout));
- const windowStyle = computed(() => [
- {
- position: "relative",
- [`overflow-${_isHorizontal.value ? "x" : "y"}`]: "scroll",
- WebkitOverflowScrolling: "touch",
- willChange: "transform"
- },
- {
- direction: props.direction,
- height: isNumber(props.height) ? `${props.height}px` : props.height,
- width: isNumber(props.width) ? `${props.width}px` : props.width
- },
- props.style
- ]);
- const innerStyle = computed(() => {
- const size = unref(estimatedTotalSize);
- const horizontal = unref(_isHorizontal);
- return {
- height: horizontal ? "100%" : `${size}px`,
- pointerEvents: unref(states).isScrolling ? "none" : void 0,
- width: horizontal ? `${size}px` : "100%",
- margin: 0,
- boxSizing: "border-box"
- };
- });
- const clientSize = computed(() => _isHorizontal.value ? props.width : props.height);
- const { onWheel } = useWheel({
- atStartEdge: computed(() => states.value.scrollOffset <= 0),
- atEndEdge: computed(() => states.value.scrollOffset >= estimatedTotalSize.value),
- layout: computed(() => props.layout)
- }, (offset) => {
- scrollbarRef.value.onMouseUp?.();
- scrollTo(Math.min(states.value.scrollOffset + offset, estimatedTotalSize.value - clientSize.value));
- });
- useEventListener(windowRef, "wheel", onWheel, { passive: false });
- const emitEvents = () => {
- const { total } = props;
- if (total > 0) {
- const [cacheStart, cacheEnd, visibleStart, visibleEnd] = unref(itemsToRender);
- emit(ITEM_RENDER_EVT, cacheStart, cacheEnd, visibleStart, visibleEnd);
- }
- const { scrollDir, scrollOffset, updateRequested } = unref(states);
- emit(SCROLL_EVT, scrollDir, scrollOffset, updateRequested);
- };
- const scrollVertically = (e) => {
- const { clientHeight, scrollHeight, scrollTop } = e.currentTarget;
- const _states = unref(states);
- if (_states.scrollOffset === scrollTop) return;
- const scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
- states.value = {
- ..._states,
- isScrolling: true,
- scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
- scrollOffset,
- updateRequested: false
- };
- nextTick(resetIsScrolling);
- };
- const scrollHorizontally = (e) => {
- const { clientWidth, scrollLeft, scrollWidth } = e.currentTarget;
- const _states = unref(states);
- if (_states.scrollOffset === scrollLeft) return;
- const { direction } = props;
- let scrollOffset = scrollLeft;
- if (direction === "rtl") switch (getRTLOffsetType()) {
- case RTL_OFFSET_NAG:
- scrollOffset = -scrollLeft;
- break;
- case RTL_OFFSET_POS_DESC:
- scrollOffset = scrollWidth - clientWidth - scrollLeft;
- break;
- }
- scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
- states.value = {
- ..._states,
- isScrolling: true,
- scrollDir: getScrollDir(_states.scrollOffset, scrollOffset),
- scrollOffset,
- updateRequested: false
- };
- nextTick(resetIsScrolling);
- };
- const onScroll = (e) => {
- unref(_isHorizontal) ? scrollHorizontally(e) : scrollVertically(e);
- emitEvents();
- };
- const onScrollbarScroll = (distanceToGo, totalSteps) => {
- const offset = (estimatedTotalSize.value - clientSize.value) / totalSteps * distanceToGo;
- scrollTo(Math.min(estimatedTotalSize.value - clientSize.value, offset));
- };
- const scrollTo = (offset) => {
- offset = Math.max(offset, 0);
- if (offset === unref(states).scrollOffset) return;
- states.value = {
- ...unref(states),
- scrollOffset: offset,
- scrollDir: getScrollDir(unref(states).scrollOffset, offset),
- updateRequested: true
- };
- nextTick(resetIsScrolling);
- };
- const scrollToItem = (idx, alignment = AUTO_ALIGNMENT) => {
- const { scrollOffset } = unref(states);
- idx = Math.max(0, Math.min(idx, props.total - 1));
- scrollTo(getOffset(props, idx, alignment, scrollOffset, unref(dynamicSizeCache)));
- };
- const getItemStyle = (idx) => {
- const { direction, itemSize, layout } = props;
- const itemStyleCache = getItemStyleCache.value(clearCache && itemSize, clearCache && layout, clearCache && direction);
- let style;
- if (hasOwn(itemStyleCache, String(idx))) style = itemStyleCache[idx];
- else {
- const offset = getItemOffset(props, idx, unref(dynamicSizeCache));
- const size = getItemSize(props, idx, unref(dynamicSizeCache));
- const horizontal = unref(_isHorizontal);
- const isRtl = direction === "rtl";
- const offsetHorizontal = horizontal ? offset : 0;
- itemStyleCache[idx] = style = {
- position: "absolute",
- left: isRtl ? void 0 : `${offsetHorizontal}px`,
- right: isRtl ? `${offsetHorizontal}px` : void 0,
- top: !horizontal ? `${offset}px` : 0,
- height: !horizontal ? `${size}px` : "100%",
- width: horizontal ? `${size}px` : "100%"
- };
- }
- return style;
- };
- const resetIsScrolling = () => {
- states.value.isScrolling = false;
- nextTick(() => {
- getItemStyleCache.value(-1, null, null);
- });
- };
- const resetScrollTop = () => {
- const window = windowRef.value;
- if (window) window.scrollTop = 0;
- };
- onMounted(() => {
- if (!isClient) return;
- const { initScrollOffset } = props;
- const windowElement = unref(windowRef);
- if (isNumber(initScrollOffset) && windowElement) if (unref(_isHorizontal)) windowElement.scrollLeft = initScrollOffset;
- else windowElement.scrollTop = initScrollOffset;
- emitEvents();
- });
- onUpdated(() => {
- const { direction, layout } = props;
- const { scrollOffset, updateRequested } = unref(states);
- const windowElement = unref(windowRef);
- if (updateRequested && windowElement) if (layout === "horizontal") if (direction === "rtl") switch (getRTLOffsetType()) {
- case RTL_OFFSET_NAG:
- windowElement.scrollLeft = -scrollOffset;
- break;
- case RTL_OFFSET_POS_ASC:
- windowElement.scrollLeft = scrollOffset;
- break;
- default: {
- const { clientWidth, scrollWidth } = windowElement;
- windowElement.scrollLeft = scrollWidth - clientWidth - scrollOffset;
- break;
- }
- }
- else windowElement.scrollLeft = scrollOffset;
- else windowElement.scrollTop = scrollOffset;
- });
- onActivated(() => {
- unref(windowRef).scrollTop = unref(states).scrollOffset;
- });
- const api = {
- ns,
- clientSize,
- estimatedTotalSize,
- windowStyle,
- windowRef,
- innerRef,
- innerStyle,
- itemsToRender,
- scrollbarRef,
- states,
- getItemStyle,
- onScroll,
- onScrollbarScroll,
- onWheel,
- scrollTo,
- scrollToItem,
- resetScrollTop
- };
- expose({
- windowRef,
- innerRef,
- getItemStyleCache,
- scrollTo,
- scrollToItem,
- resetScrollTop,
- states
- });
- return api;
- },
- render(ctx) {
- const { $slots, className, clientSize, containerElement, data, getItemStyle, innerElement, itemsToRender, innerStyle, layout, total, onScroll, onScrollbarScroll, states, useIsScrolling, windowStyle, ns } = ctx;
- const [start, end] = itemsToRender;
- const Container = resolveDynamicComponent(containerElement);
- const Inner = resolveDynamicComponent(innerElement);
- const children = [];
- if (total > 0) for (let i = start; i <= end; i++) children.push(h$1(Fragment, { key: i }, $slots.default?.({
- data,
- index: i,
- isScrolling: useIsScrolling ? states.isScrolling : void 0,
- style: getItemStyle(i)
- })));
- const InnerNode = [h$1(Inner, mergeProps(ctx.innerProps, {
- style: innerStyle,
- ref: "innerRef"
- }), !isString(Inner) ? { default: () => children } : children)];
- const scrollbar = h$1(ScrollBar, {
- ref: "scrollbarRef",
- clientSize,
- layout,
- onScroll: onScrollbarScroll,
- ratio: clientSize * 100 / this.estimatedTotalSize,
- scrollFrom: states.scrollOffset / (this.estimatedTotalSize - clientSize),
- total,
- alwaysOn: states.scrollbarAlwaysOn
- });
- const listContainer = h$1(Container, {
- class: [ns.e("window"), className],
- style: windowStyle,
- onScroll,
- ref: "windowRef",
- key: 0
- }, !isString(Container) ? { default: () => [InnerNode] } : [InnerNode]);
- return h$1("div", {
- key: 0,
- class: [ns.e("wrapper"), states.scrollbarAlwaysOn ? "always-on" : ""]
- }, [listContainer, scrollbar]);
- }
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-list.mjs
- var FixedSizeList = createList({
- name: "ElFixedSizeList",
- getItemOffset: ({ itemSize }, index) => index * itemSize,
- getItemSize: ({ itemSize }) => itemSize,
- getEstimatedTotalSize: ({ total, itemSize }) => itemSize * total,
- getOffset: ({ height, total, itemSize, layout, width }, index, alignment, scrollOffset) => {
- const size = isHorizontal(layout) ? width : height;
- if (isString(size)) throwError("[ElVirtualList]", `
- You should set
- width/height
- to number when your layout is
- horizontal/vertical
- `);
- const lastItemOffset = Math.max(0, total * itemSize - size);
- const maxOffset = Math.min(lastItemOffset, index * itemSize);
- const minOffset = Math.max(0, (index + 1) * itemSize - size);
- if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
- else alignment = CENTERED_ALIGNMENT;
- switch (alignment) {
- case START_ALIGNMENT: return maxOffset;
- case "end": return minOffset;
- case CENTERED_ALIGNMENT: {
- const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
- if (middleOffset < Math.ceil(size / 2)) return 0;
- else if (middleOffset > lastItemOffset + Math.floor(size / 2)) return lastItemOffset;
- else return middleOffset;
- }
- case AUTO_ALIGNMENT:
- default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
- else if (scrollOffset < minOffset) return minOffset;
- else return maxOffset;
- }
- },
- getStartIndexForOffset: ({ total, itemSize }, offset) => Math.max(0, Math.min(total - 1, Math.floor(offset / itemSize))),
- getStopIndexForStartIndex: ({ height, total, itemSize, layout, width }, startIndex, scrollOffset) => {
- const offset = startIndex * itemSize;
- const size = isHorizontal(layout) ? width : height;
- const numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);
- return Math.max(0, Math.min(total - 1, startIndex + numVisibleItems - 1));
- },
- initCache() {},
- clearCache: true,
- validateProps() {}
- });
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-list.mjs
- var SCOPE$6 = "ElDynamicSizeList";
- var getItemFromCache$1 = (props, index, listCache) => {
- const { itemSize } = props;
- const { items, lastVisitedIndex } = listCache;
- if (index > lastVisitedIndex) {
- let offset = 0;
- if (lastVisitedIndex >= 0) {
- const item = items[lastVisitedIndex];
- offset = item.offset + item.size;
- }
- for (let i = lastVisitedIndex + 1; i <= index; i++) {
- const size = itemSize(i);
- items[i] = {
- offset,
- size
- };
- offset += size;
- }
- listCache.lastVisitedIndex = index;
- }
- return items[index];
- };
- var findItem$1 = (props, listCache, offset) => {
- const { items, lastVisitedIndex } = listCache;
- if ((lastVisitedIndex > 0 ? items[lastVisitedIndex].offset : 0) >= offset) return bs$1(props, listCache, 0, lastVisitedIndex, offset);
- return es$1(props, listCache, Math.max(0, lastVisitedIndex), offset);
- };
- var bs$1 = (props, listCache, low, high, offset) => {
- while (low <= high) {
- const mid = low + Math.floor((high - low) / 2);
- const currentOffset = getItemFromCache$1(props, mid, listCache).offset;
- if (currentOffset === offset) return mid;
- else if (currentOffset < offset) low = mid + 1;
- else if (currentOffset > offset) high = mid - 1;
- }
- return Math.max(0, low - 1);
- };
- var es$1 = (props, listCache, index, offset) => {
- const { total } = props;
- let exponent = 1;
- while (index < total && getItemFromCache$1(props, index, listCache).offset < offset) {
- index += exponent;
- exponent *= 2;
- }
- return bs$1(props, listCache, Math.floor(index / 2), Math.min(index, total - 1), offset);
- };
- var getEstimatedTotalSize = ({ total }, { items, estimatedItemSize, lastVisitedIndex }) => {
- let totalSizeOfMeasuredItems = 0;
- if (lastVisitedIndex >= total) lastVisitedIndex = total - 1;
- if (lastVisitedIndex >= 0) {
- const item = items[lastVisitedIndex];
- totalSizeOfMeasuredItems = item.offset + item.size;
- }
- const totalSizeOfUnmeasuredItems = (total - lastVisitedIndex - 1) * estimatedItemSize;
- return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
- };
- var DynamicSizeList = createList({
- name: "ElDynamicSizeList",
- getItemOffset: (props, index, listCache) => getItemFromCache$1(props, index, listCache).offset,
- getItemSize: (_, index, { items }) => items[index].size,
- getEstimatedTotalSize,
- getOffset: (props, index, alignment, scrollOffset, listCache) => {
- const { height, layout, width } = props;
- const size = isHorizontal(layout) ? width : height;
- const item = getItemFromCache$1(props, index, listCache);
- const estimatedTotalSize = getEstimatedTotalSize(props, listCache);
- const maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, item.offset));
- const minOffset = Math.max(0, item.offset - size + item.size);
- if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
- else alignment = CENTERED_ALIGNMENT;
- switch (alignment) {
- case START_ALIGNMENT: return maxOffset;
- case "end": return minOffset;
- case CENTERED_ALIGNMENT: return Math.round(minOffset + (maxOffset - minOffset) / 2);
- case AUTO_ALIGNMENT:
- default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
- else if (scrollOffset < minOffset) return minOffset;
- else return maxOffset;
- }
- },
- getStartIndexForOffset: (props, offset, listCache) => findItem$1(props, listCache, offset),
- getStopIndexForStartIndex: (props, startIndex, scrollOffset, listCache) => {
- const { height, total, layout, width } = props;
- const size = isHorizontal(layout) ? width : height;
- const item = getItemFromCache$1(props, startIndex, listCache);
- const maxOffset = scrollOffset + size;
- let offset = item.offset + item.size;
- let stopIndex = startIndex;
- while (stopIndex < total - 1 && offset < maxOffset) {
- stopIndex++;
- offset += getItemFromCache$1(props, stopIndex, listCache).size;
- }
- return stopIndex;
- },
- initCache({ estimatedItemSize = 50 }, instance) {
- const cache = {
- items: {},
- estimatedItemSize,
- lastVisitedIndex: -1
- };
- cache.clearCacheAfterIndex = (index, forceUpdate = true) => {
- cache.lastVisitedIndex = Math.min(cache.lastVisitedIndex, index - 1);
- instance.exposed?.getItemStyleCache(-1);
- if (forceUpdate) instance.proxy?.$forceUpdate();
- };
- return cache;
- },
- clearCache: false,
- validateProps: ({ itemSize }) => {
- if (typeof itemSize !== "function") throwError(SCOPE$6, `
- itemSize is required as function, but the given value was ${typeof itemSize}
- `);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-wheel.mjs
- var useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, onWheelDelta) => {
- let frameHandle = null;
- let xOffset = 0;
- let yOffset = 0;
- const hasReachedEdge = (x, y) => {
- const xEdgeReached = x < 0 && atXStartEdge.value || x > 0 && atXEndEdge.value;
- const yEdgeReached = y < 0 && atYStartEdge.value || y > 0 && atYEndEdge.value;
- return xEdgeReached || yEdgeReached;
- };
- const onWheel = (e) => {
- cAF(frameHandle);
- let x = e.deltaX;
- let y = e.deltaY;
- if (Math.abs(x) > Math.abs(y)) y = 0;
- else x = 0;
- if (e.shiftKey && y !== 0) {
- x = y;
- y = 0;
- }
- if (hasReachedEdge(x, y)) {
- if (e.deltaX !== 0 && x === 0) e.preventDefault();
- return;
- }
- xOffset += x;
- yOffset += y;
- e.preventDefault();
- frameHandle = rAF(() => {
- onWheelDelta(xOffset, yOffset);
- xOffset = 0;
- yOffset = 0;
- });
- };
- return {
- hasReachedEdge,
- onWheel
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/hooks/use-grid-touch.mjs
- var useGridTouch = (windowRef, states, scrollTo, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight) => {
- const touchStartX = ref(0);
- const touchStartY = ref(0);
- let frameHandle;
- let deltaX = 0;
- let deltaY = 0;
- const handleTouchStart = (event) => {
- cAF(frameHandle);
- touchStartX.value = event.touches[0].clientX;
- touchStartY.value = event.touches[0].clientY;
- deltaX = 0;
- deltaY = 0;
- };
- const handleTouchMove = (event) => {
- event.preventDefault();
- cAF(frameHandle);
- deltaX += touchStartX.value - event.touches[0].clientX;
- deltaY += touchStartY.value - event.touches[0].clientY;
- touchStartX.value = event.touches[0].clientX;
- touchStartY.value = event.touches[0].clientY;
- frameHandle = rAF(() => {
- const maxScrollLeft = estimatedTotalWidth.value - unref(parsedWidth);
- const maxScrollTop = estimatedTotalHeight.value - unref(parsedHeight);
- scrollTo({
- scrollLeft: Math.min(states.value.scrollLeft + deltaX, maxScrollLeft),
- scrollTop: Math.min(states.value.scrollTop + deltaY, maxScrollTop)
- });
- deltaX = 0;
- deltaY = 0;
- });
- };
- useEventListener(windowRef, "touchstart", handleTouchStart, { passive: true });
- useEventListener(windowRef, "touchmove", handleTouchMove, { passive: false });
- return {
- touchStartX,
- touchStartY,
- handleTouchStart,
- handleTouchMove
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/builders/build-grid.mjs
- var createGrid = ({ name, clearCache, getColumnPosition, getColumnStartIndexForOffset, getColumnStopIndexForStartIndex, getEstimatedTotalHeight, getEstimatedTotalWidth, getColumnOffset, getRowOffset, getRowPosition, getRowStartIndexForOffset, getRowStopIndexForStartIndex, initCache, injectToInstance, validateProps }) => {
- return defineComponent({
- name: name ?? "ElVirtualList",
- props: virtualizedGridProps,
- emits: [ITEM_RENDER_EVT, SCROLL_EVT],
- setup(props, { emit, expose, slots }) {
- const ns = useNamespace("vl");
- validateProps(props);
- const instance = getCurrentInstance();
- const cache = ref(initCache(props, instance));
- injectToInstance?.(instance, cache);
- const windowRef = ref();
- const hScrollbar = ref();
- const vScrollbar = ref();
- const innerRef = ref();
- const states = ref({
- isScrolling: false,
- scrollLeft: isNumber(props.initScrollLeft) ? props.initScrollLeft : 0,
- scrollTop: isNumber(props.initScrollTop) ? props.initScrollTop : 0,
- updateRequested: false,
- xAxisScrollDir: FORWARD,
- yAxisScrollDir: FORWARD
- });
- const getItemStyleCache = useCache();
- const parsedHeight = computed(() => Number.parseInt(`${props.height}`, 10));
- const parsedWidth = computed(() => Number.parseInt(`${props.width}`, 10));
- const columnsToRender = computed(() => {
- const { totalColumn, totalRow, columnCache } = props;
- const { isScrolling, xAxisScrollDir, scrollLeft } = unref(states);
- if (totalColumn === 0 || totalRow === 0) return [
- 0,
- 0,
- 0,
- 0
- ];
- const startIndex = getColumnStartIndexForOffset(props, scrollLeft, unref(cache));
- const stopIndex = getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, unref(cache));
- const cacheBackward = !isScrolling || xAxisScrollDir === "backward" ? Math.max(1, columnCache) : 1;
- const cacheForward = !isScrolling || xAxisScrollDir === "forward" ? Math.max(1, columnCache) : 1;
- return [
- Math.max(0, startIndex - cacheBackward),
- Math.max(0, Math.min(totalColumn - 1, stopIndex + cacheForward)),
- startIndex,
- stopIndex
- ];
- });
- const rowsToRender = computed(() => {
- const { totalColumn, totalRow, rowCache } = props;
- const { isScrolling, yAxisScrollDir, scrollTop } = unref(states);
- if (totalColumn === 0 || totalRow === 0) return [
- 0,
- 0,
- 0,
- 0
- ];
- const startIndex = getRowStartIndexForOffset(props, scrollTop, unref(cache));
- const stopIndex = getRowStopIndexForStartIndex(props, startIndex, scrollTop, unref(cache));
- const cacheBackward = !isScrolling || yAxisScrollDir === "backward" ? Math.max(1, rowCache) : 1;
- const cacheForward = !isScrolling || yAxisScrollDir === "forward" ? Math.max(1, rowCache) : 1;
- return [
- Math.max(0, startIndex - cacheBackward),
- Math.max(0, Math.min(totalRow - 1, stopIndex + cacheForward)),
- startIndex,
- stopIndex
- ];
- });
- const estimatedTotalHeight = computed(() => getEstimatedTotalHeight(props, unref(cache)));
- const estimatedTotalWidth = computed(() => getEstimatedTotalWidth(props, unref(cache)));
- const windowStyle = computed(() => [
- {
- position: "relative",
- overflow: "hidden",
- WebkitOverflowScrolling: "touch",
- willChange: "transform"
- },
- {
- direction: props.direction,
- height: isNumber(props.height) ? `${props.height}px` : props.height,
- width: isNumber(props.width) ? `${props.width}px` : props.width
- },
- props.style ?? {}
- ]);
- const innerStyle = computed(() => {
- const width = `${unref(estimatedTotalWidth)}px`;
- return {
- height: `${unref(estimatedTotalHeight)}px`,
- pointerEvents: unref(states).isScrolling ? "none" : void 0,
- width,
- margin: 0,
- boxSizing: "border-box"
- };
- });
- const emitEvents = () => {
- const { totalColumn, totalRow } = props;
- if (totalColumn > 0 && totalRow > 0) {
- const [columnCacheStart, columnCacheEnd, columnVisibleStart, columnVisibleEnd] = unref(columnsToRender);
- const [rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd] = unref(rowsToRender);
- emit(ITEM_RENDER_EVT, {
- columnCacheStart,
- columnCacheEnd,
- rowCacheStart,
- rowCacheEnd,
- columnVisibleStart,
- columnVisibleEnd,
- rowVisibleStart,
- rowVisibleEnd
- });
- }
- const { scrollLeft, scrollTop, updateRequested, xAxisScrollDir, yAxisScrollDir } = unref(states);
- emit(SCROLL_EVT, {
- xAxisScrollDir,
- scrollLeft,
- yAxisScrollDir,
- scrollTop,
- updateRequested
- });
- };
- const onScroll = (e) => {
- const { clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth } = e.currentTarget;
- const _states = unref(states);
- if (_states.scrollTop === scrollTop && _states.scrollLeft === scrollLeft) return;
- let _scrollLeft = scrollLeft;
- if (isRTL(props.direction)) switch (getRTLOffsetType()) {
- case RTL_OFFSET_NAG:
- _scrollLeft = -scrollLeft;
- break;
- case RTL_OFFSET_POS_DESC:
- _scrollLeft = scrollWidth - clientWidth - scrollLeft;
- break;
- }
- states.value = {
- ..._states,
- isScrolling: true,
- scrollLeft: _scrollLeft,
- scrollTop: Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight)),
- updateRequested: true,
- xAxisScrollDir: getScrollDir(_states.scrollLeft, _scrollLeft),
- yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop)
- };
- nextTick(() => resetIsScrolling());
- onUpdated();
- emitEvents();
- };
- const onVerticalScroll = (distance, totalSteps) => {
- const height = unref(parsedHeight);
- const offset = (estimatedTotalHeight.value - height) / totalSteps * distance;
- scrollTo({ scrollTop: Math.min(estimatedTotalHeight.value - height, offset) });
- };
- const onHorizontalScroll = (distance, totalSteps) => {
- const width = unref(parsedWidth);
- const offset = (estimatedTotalWidth.value - width) / totalSteps * distance;
- scrollTo({ scrollLeft: Math.min(estimatedTotalWidth.value - width, offset) });
- };
- const { onWheel } = useGridWheel({
- atXStartEdge: computed(() => states.value.scrollLeft <= 0),
- atXEndEdge: computed(() => states.value.scrollLeft >= estimatedTotalWidth.value - unref(parsedWidth)),
- atYStartEdge: computed(() => states.value.scrollTop <= 0),
- atYEndEdge: computed(() => states.value.scrollTop >= estimatedTotalHeight.value - unref(parsedHeight))
- }, (x, y) => {
- hScrollbar.value?.onMouseUp?.();
- vScrollbar.value?.onMouseUp?.();
- const width = unref(parsedWidth);
- const height = unref(parsedHeight);
- scrollTo({
- scrollLeft: Math.min(states.value.scrollLeft + x, estimatedTotalWidth.value - width),
- scrollTop: Math.min(states.value.scrollTop + y, estimatedTotalHeight.value - height)
- });
- });
- useEventListener(windowRef, "wheel", onWheel, { passive: false });
- const scrollTo = ({ scrollLeft = states.value.scrollLeft, scrollTop = states.value.scrollTop }) => {
- scrollLeft = Math.max(scrollLeft, 0);
- scrollTop = Math.max(scrollTop, 0);
- const _states = unref(states);
- if (scrollTop === _states.scrollTop && scrollLeft === _states.scrollLeft) return;
- states.value = {
- ..._states,
- xAxisScrollDir: getScrollDir(_states.scrollLeft, scrollLeft),
- yAxisScrollDir: getScrollDir(_states.scrollTop, scrollTop),
- scrollLeft,
- scrollTop,
- updateRequested: true
- };
- nextTick(() => resetIsScrolling());
- onUpdated();
- emitEvents();
- };
- const { touchStartX, touchStartY, handleTouchStart, handleTouchMove } = useGridTouch(windowRef, states, scrollTo, estimatedTotalWidth, estimatedTotalHeight, parsedWidth, parsedHeight);
- const scrollToItem = (rowIndex = 0, columnIdx = 0, alignment = AUTO_ALIGNMENT) => {
- const _states = unref(states);
- columnIdx = Math.max(0, Math.min(columnIdx, props.totalColumn - 1));
- rowIndex = Math.max(0, Math.min(rowIndex, props.totalRow - 1));
- const scrollBarWidth = getScrollBarWidth(ns.namespace.value);
- const _cache = unref(cache);
- const estimatedHeight = getEstimatedTotalHeight(props, _cache);
- const estimatedWidth = getEstimatedTotalWidth(props, _cache);
- scrollTo({
- scrollLeft: getColumnOffset(props, columnIdx, alignment, _states.scrollLeft, _cache, estimatedWidth > props.width ? scrollBarWidth : 0),
- scrollTop: getRowOffset(props, rowIndex, alignment, _states.scrollTop, _cache, estimatedHeight > props.height ? scrollBarWidth : 0)
- });
- };
- const getItemStyle = (rowIndex, columnIndex) => {
- const { columnWidth, direction, rowHeight } = props;
- const itemStyleCache = getItemStyleCache.value(clearCache && columnWidth, clearCache && rowHeight, clearCache && direction);
- const key = `${rowIndex},${columnIndex}`;
- if (hasOwn(itemStyleCache, key)) return itemStyleCache[key];
- else {
- const [, left] = getColumnPosition(props, columnIndex, unref(cache));
- const _cache = unref(cache);
- const rtl = isRTL(direction);
- const [height, top] = getRowPosition(props, rowIndex, _cache);
- const [width] = getColumnPosition(props, columnIndex, _cache);
- itemStyleCache[key] = {
- position: "absolute",
- left: rtl ? void 0 : `${left}px`,
- right: rtl ? `${left}px` : void 0,
- top: `${top}px`,
- height: `${height}px`,
- width: `${width}px`
- };
- return itemStyleCache[key];
- }
- };
- const resetIsScrolling = () => {
- states.value.isScrolling = false;
- nextTick(() => {
- getItemStyleCache.value(-1, null, null);
- });
- };
- onMounted(() => {
- if (!isClient) return;
- const { initScrollLeft, initScrollTop } = props;
- const windowElement = unref(windowRef);
- if (windowElement) {
- if (isNumber(initScrollLeft)) windowElement.scrollLeft = initScrollLeft;
- if (isNumber(initScrollTop)) windowElement.scrollTop = initScrollTop;
- }
- emitEvents();
- });
- const onUpdated = () => {
- const { direction } = props;
- const { scrollLeft, scrollTop, updateRequested } = unref(states);
- const windowElement = unref(windowRef);
- if (updateRequested && windowElement) {
- if (direction === "rtl") switch (getRTLOffsetType()) {
- case RTL_OFFSET_NAG:
- windowElement.scrollLeft = -scrollLeft;
- break;
- case RTL_OFFSET_POS_ASC:
- windowElement.scrollLeft = scrollLeft;
- break;
- default: {
- const { clientWidth, scrollWidth } = windowElement;
- windowElement.scrollLeft = scrollWidth - clientWidth - scrollLeft;
- break;
- }
- }
- else windowElement.scrollLeft = Math.max(0, scrollLeft);
- windowElement.scrollTop = Math.max(0, scrollTop);
- }
- };
- const { resetAfterColumnIndex, resetAfterRowIndex, resetAfter } = instance.proxy;
- expose({
- windowRef,
- innerRef,
- getItemStyleCache,
- touchStartX,
- touchStartY,
- handleTouchStart,
- handleTouchMove,
- scrollTo,
- scrollToItem,
- states,
- resetAfterColumnIndex,
- resetAfterRowIndex,
- resetAfter
- });
- const renderScrollbars = () => {
- const { scrollbarAlwaysOn, scrollbarStartGap, scrollbarEndGap, totalColumn, totalRow } = props;
- const width = unref(parsedWidth);
- const height = unref(parsedHeight);
- const estimatedWidth = unref(estimatedTotalWidth);
- const estimatedHeight = unref(estimatedTotalHeight);
- const { scrollLeft, scrollTop } = unref(states);
- return {
- horizontalScrollbar: h$1(ScrollBar, {
- ref: hScrollbar,
- alwaysOn: scrollbarAlwaysOn,
- startGap: scrollbarStartGap,
- endGap: scrollbarEndGap,
- class: ns.e("horizontal"),
- clientSize: width,
- layout: "horizontal",
- onScroll: onHorizontalScroll,
- ratio: width * 100 / estimatedWidth,
- scrollFrom: scrollLeft / (estimatedWidth - width),
- total: totalRow,
- visible: true
- }),
- verticalScrollbar: h$1(ScrollBar, {
- ref: vScrollbar,
- alwaysOn: scrollbarAlwaysOn,
- startGap: scrollbarStartGap,
- endGap: scrollbarEndGap,
- class: ns.e("vertical"),
- clientSize: height,
- layout: "vertical",
- onScroll: onVerticalScroll,
- ratio: height * 100 / estimatedHeight,
- scrollFrom: scrollTop / (estimatedHeight - height),
- total: totalColumn,
- visible: true
- })
- };
- };
- const renderItems = () => {
- const [columnStart, columnEnd] = unref(columnsToRender);
- const [rowStart, rowEnd] = unref(rowsToRender);
- const { data, totalColumn, totalRow, useIsScrolling, itemKey } = props;
- const children = [];
- if (totalRow > 0 && totalColumn > 0) for (let row = rowStart; row <= rowEnd; row++) for (let column = columnStart; column <= columnEnd; column++) {
- const key = itemKey({
- columnIndex: column,
- data,
- rowIndex: row
- });
- children.push(h$1(Fragment, { key }, slots.default?.({
- columnIndex: column,
- data,
- isScrolling: useIsScrolling ? unref(states).isScrolling : void 0,
- style: getItemStyle(row, column),
- rowIndex: row
- })));
- }
- return children;
- };
- const renderInner = () => {
- const Inner = resolveDynamicComponent(props.innerElement);
- const children = renderItems();
- return [h$1(Inner, mergeProps(props.innerProps, {
- style: unref(innerStyle),
- ref: innerRef
- }), !isString(Inner) ? { default: () => children } : children)];
- };
- const renderWindow = () => {
- const Container = resolveDynamicComponent(props.containerElement);
- const { horizontalScrollbar, verticalScrollbar } = renderScrollbars();
- const Inner = renderInner();
- return h$1("div", {
- key: 0,
- class: ns.e("wrapper"),
- role: props.role
- }, [
- h$1(Container, {
- class: props.className,
- style: unref(windowStyle),
- onScroll,
- ref: windowRef
- }, !isString(Container) ? { default: () => Inner } : Inner),
- horizontalScrollbar,
- verticalScrollbar
- ]);
- };
- return renderWindow;
- }
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/components/fixed-size-grid.mjs
- var SCOPE$5 = "ElFixedSizeGrid";
- var FixedSizeGrid = createGrid({
- name: "ElFixedSizeGrid",
- getColumnPosition: ({ columnWidth }, index) => [columnWidth, index * columnWidth],
- getRowPosition: ({ rowHeight }, index) => [rowHeight, index * rowHeight],
- getEstimatedTotalHeight: ({ totalRow, rowHeight }) => rowHeight * totalRow,
- getEstimatedTotalWidth: ({ totalColumn, columnWidth }) => columnWidth * totalColumn,
- getColumnOffset: ({ totalColumn, columnWidth, width }, columnIndex, alignment, scrollLeft, _, scrollBarWidth) => {
- width = Number(width);
- const lastColumnOffset = Math.max(0, totalColumn * columnWidth - width);
- const maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);
- const minOffset = Math.max(0, columnIndex * columnWidth - width + scrollBarWidth + columnWidth);
- if (alignment === "smart") if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) alignment = AUTO_ALIGNMENT;
- else alignment = CENTERED_ALIGNMENT;
- switch (alignment) {
- case START_ALIGNMENT: return maxOffset;
- case "end": return minOffset;
- case CENTERED_ALIGNMENT: {
- const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
- if (middleOffset < Math.ceil(width / 2)) return 0;
- else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) return lastColumnOffset;
- else return middleOffset;
- }
- case AUTO_ALIGNMENT:
- default: if (scrollLeft >= minOffset && scrollLeft <= maxOffset) return scrollLeft;
- else if (minOffset > maxOffset) return minOffset;
- else if (scrollLeft < minOffset) return minOffset;
- else return maxOffset;
- }
- },
- getRowOffset: ({ rowHeight, height, totalRow }, rowIndex, align, scrollTop, _, scrollBarWidth) => {
- height = Number(height);
- const lastRowOffset = Math.max(0, totalRow * rowHeight - height);
- const maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);
- const minOffset = Math.max(0, rowIndex * rowHeight - height + scrollBarWidth + rowHeight);
- if (align === "smart") if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) align = AUTO_ALIGNMENT;
- else align = CENTERED_ALIGNMENT;
- switch (align) {
- case START_ALIGNMENT: return maxOffset;
- case "end": return minOffset;
- case CENTERED_ALIGNMENT: {
- const middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
- if (middleOffset < Math.ceil(height / 2)) return 0;
- else if (middleOffset > lastRowOffset + Math.floor(height / 2)) return lastRowOffset;
- else return middleOffset;
- }
- case AUTO_ALIGNMENT:
- default: if (scrollTop >= minOffset && scrollTop <= maxOffset) return scrollTop;
- else if (minOffset > maxOffset) return minOffset;
- else if (scrollTop < minOffset) return minOffset;
- else return maxOffset;
- }
- },
- getColumnStartIndexForOffset: ({ columnWidth, totalColumn }, scrollLeft) => Math.max(0, Math.min(totalColumn - 1, Math.floor(scrollLeft / columnWidth))),
- getColumnStopIndexForStartIndex: ({ columnWidth, totalColumn, width }, startIndex, scrollLeft) => {
- const left = startIndex * columnWidth;
- const visibleColumnsCount = Math.ceil((width + scrollLeft - left) / columnWidth);
- return Math.max(0, Math.min(totalColumn - 1, startIndex + visibleColumnsCount - 1));
- },
- getRowStartIndexForOffset: ({ rowHeight, totalRow }, scrollTop) => Math.max(0, Math.min(totalRow - 1, Math.floor(scrollTop / rowHeight))),
- getRowStopIndexForStartIndex: ({ rowHeight, totalRow, height }, startIndex, scrollTop) => {
- const top = startIndex * rowHeight;
- const numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);
- return Math.max(0, Math.min(totalRow - 1, startIndex + numVisibleRows - 1));
- },
- initCache: () => void 0,
- clearCache: true,
- validateProps: ({ columnWidth, rowHeight }) => {
- if (!isNumber(columnWidth)) throwError(SCOPE$5, `
- "columnWidth" must be passed as number,
- instead ${typeof columnWidth} was given.
- `);
- if (!isNumber(rowHeight)) throwError(SCOPE$5, `
- "columnWidth" must be passed as number,
- instead ${typeof rowHeight} was given.
- `);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/virtual-list/src/components/dynamic-size-grid.mjs
- var { max, min, floor } = Math;
- var SCOPE$4 = "ElDynamicSizeGrid";
- var ACCESS_SIZER_KEY_MAP = {
- column: "columnWidth",
- row: "rowHeight"
- };
- var ACCESS_LAST_VISITED_KEY_MAP = {
- column: "lastVisitedColumnIndex",
- row: "lastVisitedRowIndex"
- };
- var getItemFromCache = (props, index, gridCache, type) => {
- const [cachedItems, sizer, lastVisited] = [
- gridCache[type],
- props[ACCESS_SIZER_KEY_MAP[type]],
- gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]
- ];
- if (index > lastVisited) {
- let offset = 0;
- if (lastVisited >= 0) {
- const item = cachedItems[lastVisited];
- offset = item.offset + item.size;
- }
- for (let i = lastVisited + 1; i <= index; i++) {
- const size = sizer(i);
- cachedItems[i] = {
- offset,
- size
- };
- offset += size;
- }
- gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]] = index;
- }
- return cachedItems[index];
- };
- var bs = (props, gridCache, low, high, offset, type) => {
- while (low <= high) {
- const mid = low + floor((high - low) / 2);
- const currentOffset = getItemFromCache(props, mid, gridCache, type).offset;
- if (currentOffset === offset) return mid;
- else if (currentOffset < offset) low = mid + 1;
- else high = mid - 1;
- }
- return max(0, low - 1);
- };
- var es = (props, gridCache, idx, offset, type) => {
- const total = type === "column" ? props.totalColumn : props.totalRow;
- let exponent = 1;
- while (idx < total && getItemFromCache(props, idx, gridCache, type).offset < offset) {
- idx += exponent;
- exponent *= 2;
- }
- return bs(props, gridCache, floor(idx / 2), min(idx, total - 1), offset, type);
- };
- var findItem = (props, gridCache, offset, type) => {
- const [cache, lastVisitedIndex] = [gridCache[type], gridCache[ACCESS_LAST_VISITED_KEY_MAP[type]]];
- if ((lastVisitedIndex > 0 ? cache[lastVisitedIndex].offset : 0) >= offset) return bs(props, gridCache, 0, lastVisitedIndex, offset, type);
- return es(props, gridCache, max(0, lastVisitedIndex), offset, type);
- };
- var getEstimatedTotalHeight = ({ totalRow }, { estimatedRowHeight, lastVisitedRowIndex, row }) => {
- let sizeOfVisitedRows = 0;
- if (lastVisitedRowIndex >= totalRow) lastVisitedRowIndex = totalRow - 1;
- if (lastVisitedRowIndex >= 0) {
- const item = row[lastVisitedRowIndex];
- sizeOfVisitedRows = item.offset + item.size;
- }
- const sizeOfUnvisitedItems = (totalRow - lastVisitedRowIndex - 1) * estimatedRowHeight;
- return sizeOfVisitedRows + sizeOfUnvisitedItems;
- };
- var getEstimatedTotalWidth = ({ totalColumn }, { column, estimatedColumnWidth, lastVisitedColumnIndex }) => {
- let sizeOfVisitedColumns = 0;
- if (lastVisitedColumnIndex > totalColumn) lastVisitedColumnIndex = totalColumn - 1;
- if (lastVisitedColumnIndex >= 0) {
- const item = column[lastVisitedColumnIndex];
- sizeOfVisitedColumns = item.offset + item.size;
- }
- const sizeOfUnvisitedItems = (totalColumn - lastVisitedColumnIndex - 1) * estimatedColumnWidth;
- return sizeOfVisitedColumns + sizeOfUnvisitedItems;
- };
- var ACCESS_ESTIMATED_SIZE_KEY_MAP = {
- column: getEstimatedTotalWidth,
- row: getEstimatedTotalHeight
- };
- var getOffset$1 = (props, index, alignment, scrollOffset, cache, type, scrollBarWidth) => {
- const [size, estimatedSizeAssociates] = [type === "row" ? props.height : props.width, ACCESS_ESTIMATED_SIZE_KEY_MAP[type]];
- const item = getItemFromCache(props, index, cache, type);
- const maxOffset = max(0, min(estimatedSizeAssociates(props, cache) - size, item.offset));
- const minOffset = max(0, item.offset - size + scrollBarWidth + item.size);
- if (alignment === "smart") if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) alignment = AUTO_ALIGNMENT;
- else alignment = CENTERED_ALIGNMENT;
- switch (alignment) {
- case START_ALIGNMENT: return maxOffset;
- case "end": return minOffset;
- case CENTERED_ALIGNMENT: return Math.round(minOffset + (maxOffset - minOffset) / 2);
- case AUTO_ALIGNMENT:
- default: if (scrollOffset >= minOffset && scrollOffset <= maxOffset) return scrollOffset;
- else if (minOffset > maxOffset) return minOffset;
- else if (scrollOffset < minOffset) return minOffset;
- else return maxOffset;
- }
- };
- var DynamicSizeGrid = createGrid({
- name: "ElDynamicSizeGrid",
- getColumnPosition: (props, idx, cache) => {
- const item = getItemFromCache(props, idx, cache, "column");
- return [item.size, item.offset];
- },
- getRowPosition: (props, idx, cache) => {
- const item = getItemFromCache(props, idx, cache, "row");
- return [item.size, item.offset];
- },
- getColumnOffset: (props, columnIndex, alignment, scrollLeft, cache, scrollBarWidth) => getOffset$1(props, columnIndex, alignment, scrollLeft, cache, "column", scrollBarWidth),
- getRowOffset: (props, rowIndex, alignment, scrollTop, cache, scrollBarWidth) => getOffset$1(props, rowIndex, alignment, scrollTop, cache, "row", scrollBarWidth),
- getColumnStartIndexForOffset: (props, scrollLeft, cache) => findItem(props, cache, scrollLeft, "column"),
- getColumnStopIndexForStartIndex: (props, startIndex, scrollLeft, cache) => {
- const item = getItemFromCache(props, startIndex, cache, "column");
- const maxOffset = scrollLeft + props.width;
- let offset = item.offset + item.size;
- let stopIndex = startIndex;
- while (stopIndex < props.totalColumn - 1 && offset < maxOffset) {
- stopIndex++;
- offset += getItemFromCache(props, startIndex, cache, "column").size;
- }
- return stopIndex;
- },
- getEstimatedTotalHeight,
- getEstimatedTotalWidth,
- getRowStartIndexForOffset: (props, scrollTop, cache) => findItem(props, cache, scrollTop, "row"),
- getRowStopIndexForStartIndex: (props, startIndex, scrollTop, cache) => {
- const { totalRow, height } = props;
- const item = getItemFromCache(props, startIndex, cache, "row");
- const maxOffset = scrollTop + height;
- let offset = item.size + item.offset;
- let stopIndex = startIndex;
- while (stopIndex < totalRow - 1 && offset < maxOffset) {
- stopIndex++;
- offset += getItemFromCache(props, stopIndex, cache, "row").size;
- }
- return stopIndex;
- },
- injectToInstance: (instance, cache) => {
- const resetAfter = ({ columnIndex, rowIndex }, forceUpdate) => {
- forceUpdate = isUndefined(forceUpdate) ? true : forceUpdate;
- if (isNumber(columnIndex)) cache.value.lastVisitedColumnIndex = Math.min(cache.value.lastVisitedColumnIndex, columnIndex - 1);
- if (isNumber(rowIndex)) cache.value.lastVisitedRowIndex = Math.min(cache.value.lastVisitedRowIndex, rowIndex - 1);
- instance.exposed?.getItemStyleCache.value(-1, null, null);
- if (forceUpdate) instance.proxy?.$forceUpdate();
- };
- const resetAfterColumnIndex = (columnIndex, forceUpdate) => {
- resetAfter({ columnIndex }, forceUpdate);
- };
- const resetAfterRowIndex = (rowIndex, forceUpdate) => {
- resetAfter({ rowIndex }, forceUpdate);
- };
- Object.assign(instance.proxy, {
- resetAfterColumnIndex,
- resetAfterRowIndex,
- resetAfter
- });
- },
- initCache: ({ estimatedColumnWidth = 50, estimatedRowHeight = 50 }) => {
- return {
- column: {},
- estimatedColumnWidth,
- estimatedRowHeight,
- lastVisitedColumnIndex: -1,
- lastVisitedRowIndex: -1,
- row: {}
- };
- },
- clearCache: false,
- validateProps: ({ columnWidth, rowHeight }) => {
- if (!isFunction$1(columnWidth)) throwError(SCOPE$4, `
- "columnWidth" must be passed as function,
- instead ${typeof columnWidth} was given.
- `);
- if (!isFunction$1(rowHeight)) throwError(SCOPE$4, `
- "rowHeight" must be passed as function,
- instead ${typeof rowHeight} was given.
- `);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/token.mjs
- var selectV2InjectionKey = Symbol("ElSelectV2Injection");
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/defaults.mjs
- var selectV2Props = buildProps({
- allowCreate: Boolean,
- autocomplete: {
- type: definePropType(String),
- default: "none"
- },
- automaticDropdown: Boolean,
- clearable: Boolean,
- clearIcon: {
- type: iconPropType,
- default: circle_close_default
- },
- effect: {
- type: definePropType(String),
- default: "light"
- },
- collapseTags: Boolean,
- collapseTagsTooltip: Boolean,
- tagTooltip: {
- type: definePropType(Object),
- default: () => ({})
- },
- maxCollapseTags: {
- type: Number,
- default: 1
- },
- defaultFirstOption: Boolean,
- disabled: {
- type: Boolean,
- default: void 0
- },
- estimatedOptionHeight: {
- type: Number,
- default: void 0
- },
- filterable: Boolean,
- filterMethod: { type: definePropType(Function) },
- height: {
- type: Number,
- default: 274
- },
- itemHeight: {
- type: Number,
- default: 34
- },
- id: String,
- loading: Boolean,
- loadingText: String,
- modelValue: {
- type: definePropType([
- Array,
- String,
- Number,
- Boolean,
- Object
- ]),
- default: void 0
- },
- multiple: Boolean,
- multipleLimit: {
- type: Number,
- default: 0
- },
- name: String,
- noDataText: String,
- noMatchText: String,
- remoteMethod: { type: definePropType(Function) },
- reserveKeyword: {
- type: Boolean,
- default: true
- },
- options: {
- type: definePropType(Array),
- required: true
- },
- placeholder: { type: String },
- teleported: useTooltipContentProps.teleported,
- persistent: {
- type: Boolean,
- default: true
- },
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- remote: Boolean,
- debounce: {
- type: Number,
- default: 300
- },
- size: useSizeProp,
- props: {
- type: definePropType(Object),
- default: () => defaultProps$2
- },
- valueKey: {
- type: String,
- default: "value"
- },
- scrollbarAlwaysOn: Boolean,
- validateEvent: {
- type: Boolean,
- default: true
- },
- offset: {
- type: Number,
- default: 12
- },
- remoteShowSuffix: Boolean,
- showArrow: {
- type: Boolean,
- default: true
- },
- placement: {
- type: definePropType(String),
- values: Ee,
- default: "bottom-start"
- },
- fallbackPlacements: {
- type: definePropType(Array),
- default: [
- "bottom-start",
- "top-start",
- "right",
- "left"
- ]
- },
- tagType: {
- ...tagProps.type,
- default: "info"
- },
- tagEffect: {
- ...tagProps.effect,
- default: "light"
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- appendTo: useTooltipContentProps.appendTo,
- fitInputWidth: {
- type: [Boolean, Number],
- default: true,
- validator(val) {
- return isBoolean(val) || isNumber(val);
- }
- },
- suffixIcon: {
- type: iconPropType,
- default: arrow_down_default
- },
- ...useEmptyValuesProps,
- ...useAriaProps(["ariaLabel"])
- });
- var optionV2Props = buildProps({
- data: Array,
- disabled: Boolean,
- hovering: Boolean,
- item: {
- type: definePropType(Object),
- required: true
- },
- index: Number,
- style: Object,
- selected: Boolean,
- created: Boolean
- });
- var selectV2Emits = {
- [UPDATE_MODEL_EVENT]: (val) => true,
- [CHANGE_EVENT]: (val) => true,
- "remove-tag": (val) => true,
- "visible-change": (visible) => true,
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true
- };
- var optionV2Emits = {
- hover: (index) => isNumber(index),
- select: (val, index) => true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/group-item.vue_vue_type_script_lang.mjs
- var group_item_vue_vue_type_script_lang_default = defineComponent({
- props: {
- item: {
- type: Object,
- required: true
- },
- style: { type: Object },
- height: Number
- },
- setup() {
- return { ns: useNamespace("select") };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/group-item.mjs
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(_ctx.ns.be("group", "title")),
- style: normalizeStyle({
- ..._ctx.style,
- lineHeight: `${_ctx.height}px`
- })
- }, toDisplayString(_ctx.item.label), 7);
- }
- var group_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(group_item_vue_vue_type_script_lang_default, [["render", _sfc_render$7]]);
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/useOption.mjs
- function useOption(props, { emit }) {
- return {
- hoverItem: () => {
- if (!props.disabled) emit("hover", props.index);
- },
- selectOptionClick: () => {
- if (!props.disabled) emit("select", props.item, props.index);
- }
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs
- var option_item_vue_vue_type_script_lang_default = defineComponent({
- props: optionV2Props,
- emits: optionV2Emits,
- setup(props, { emit }) {
- const select = inject(selectV2InjectionKey);
- const ns = useNamespace("select");
- const { hoverItem, selectOptionClick } = useOption(props, { emit });
- const { getLabel } = useProps(select.props);
- return {
- ns,
- contentId: select.contentId,
- hoverItem,
- selectOptionClick,
- getLabel
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/option-item.mjs
- var _hoisted_1$22 = [
- "id",
- "aria-selected",
- "aria-disabled"
- ];
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
- return openBlock(), createElementBlock("li", {
- id: `${_ctx.contentId}-${_ctx.index}`,
- role: "option",
- "aria-selected": _ctx.selected,
- "aria-disabled": _ctx.disabled || void 0,
- style: normalizeStyle(_ctx.style),
- class: normalizeClass([
- _ctx.ns.be("dropdown", "item"),
- _ctx.ns.is("selected", _ctx.selected),
- _ctx.ns.is("disabled", _ctx.disabled),
- _ctx.ns.is("created", _ctx.created),
- _ctx.ns.is("hovering", _ctx.hovering)
- ]),
- onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
- onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
- }, [renderSlot(_ctx.$slots, "default", {
- item: _ctx.item,
- index: _ctx.index,
- disabled: _ctx.disabled
- }, () => [createBaseVNode("span", null, toDisplayString(_ctx.getLabel(_ctx.item)), 1)])], 46, _hoisted_1$22);
- }
- var option_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_item_vue_vue_type_script_lang_default, [["render", _sfc_render$6]]);
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/select-dropdown.mjs
- var select_dropdown_default = /* @__PURE__ */ defineComponent({
- name: "ElSelectDropdown",
- props: {
- loading: Boolean,
- data: {
- type: Array,
- required: true
- },
- hoveringIndex: Number,
- width: Number,
- id: String,
- ariaLabel: String
- },
- setup(props, { slots, expose }) {
- const select = inject(selectV2InjectionKey);
- const ns = useNamespace("select");
- const { getLabel, getValue, getDisabled } = useProps(select.props);
- const cachedHeights = ref([]);
- const listRef = ref();
- const size = computed(() => props.data.length);
- watch(() => size.value, () => {
- select.tooltipRef.value?.updatePopper?.();
- });
- const isSized = computed(() => isUndefined(select.props.estimatedOptionHeight));
- const listProps = computed(() => {
- if (isSized.value) return { itemSize: select.props.itemHeight };
- return {
- estimatedSize: select.props.estimatedOptionHeight,
- itemSize: (idx) => cachedHeights.value[idx]
- };
- });
- const contains = (arr = [], target) => {
- const { props: { valueKey } } = select;
- if (!isObject$2(target)) return arr.includes(target);
- return arr && arr.some((item) => {
- return toRaw(get(item, valueKey)) === get(target, valueKey);
- });
- };
- const isEqual = (selected, target) => {
- if (!isObject$2(target)) return selected === target;
- else {
- const { valueKey } = select.props;
- return get(selected, valueKey) === get(target, valueKey);
- }
- };
- const isItemSelected = (modelValue, target) => {
- if (select.props.multiple) return contains(modelValue, getValue(target));
- return isEqual(modelValue, getValue(target));
- };
- const isItemDisabled = (modelValue, selected) => {
- const { disabled, multiple, multipleLimit } = select.props;
- return disabled || !selected && (multiple ? multipleLimit > 0 && modelValue.length >= multipleLimit : false);
- };
- const isItemHovering = (target) => props.hoveringIndex === target;
- const scrollToItem = (index) => {
- const list = listRef.value;
- if (list) list.scrollToItem(index);
- };
- const resetScrollTop = () => {
- const list = listRef.value;
- if (list) list.resetScrollTop();
- };
- expose({
- listRef,
- isSized,
- isItemDisabled,
- isItemHovering,
- isItemSelected,
- scrollToItem,
- resetScrollTop
- });
- const Item = (itemProps) => {
- const { index, data, style } = itemProps;
- const sized = unref(isSized);
- const { itemSize, estimatedSize } = unref(listProps);
- const { modelValue } = select.props;
- const { onSelect, onHover } = select;
- const item = data[index];
- if (item.type === "Group") return createVNode(group_item_default, {
- "item": item,
- "style": style,
- "height": sized ? itemSize : estimatedSize
- }, null);
- const isSelected = isItemSelected(modelValue, item);
- const isDisabled = isItemDisabled(modelValue, isSelected);
- const isHovering = isItemHovering(index);
- return createVNode(option_item_default, mergeProps(itemProps, {
- "selected": isSelected,
- "disabled": getDisabled(item) || isDisabled,
- "created": !!item.created,
- "hovering": isHovering,
- "item": item,
- "onSelect": onSelect,
- "onHover": onHover
- }), { default: (props) => slots.default?.(props) || createVNode("span", null, [getLabel(item)]) });
- };
- const { onKeyboardNavigate, onKeyboardSelect } = select;
- const onForward = () => {
- onKeyboardNavigate("forward");
- };
- const onBackward = () => {
- onKeyboardNavigate("backward");
- };
- const onEscOrTab = () => {};
- const onKeydown = (e) => {
- const code = getEventCode(e);
- const { tab, esc, down, up, enter, numpadEnter } = EVENT_CODE;
- if ([
- esc,
- down,
- up,
- enter,
- numpadEnter
- ].includes(code)) {
- e.preventDefault();
- e.stopPropagation();
- }
- switch (code) {
- case tab:
- case esc:
- onEscOrTab();
- break;
- case down:
- onForward();
- break;
- case up:
- onBackward();
- break;
- case enter:
- case numpadEnter:
- onKeyboardSelect();
- break;
- }
- };
- return () => {
- const { data, width } = props;
- const { height, multiple, scrollbarAlwaysOn } = select.props;
- const isScrollbarAlwaysOn = computed(() => {
- return isIOS ? true : scrollbarAlwaysOn;
- });
- const List = unref(isSized) ? FixedSizeList : DynamicSizeList;
- return createVNode("div", {
- "class": [ns.b("dropdown"), ns.is("multiple", multiple)],
- "style": { width: `${width}px` }
- }, [
- slots.header?.(),
- slots.loading?.() || slots.empty?.() || createVNode(List, mergeProps({ "ref": listRef }, unref(listProps), {
- "className": ns.be("dropdown", "list"),
- "scrollbarAlwaysOn": isScrollbarAlwaysOn.value,
- "data": data,
- "height": height,
- "width": width,
- "total": data.length,
- "innerElement": "ul",
- "innerProps": {
- id: props.id,
- role: "listbox",
- "aria-label": props.ariaLabel,
- "aria-orientation": "vertical"
- },
- "onKeydown": onKeydown
- }), { default: (props) => createVNode(Item, props, null) }),
- slots.footer?.()
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/useAllowCreate.mjs
- function useAllowCreate(props, states) {
- const { aliasProps, getLabel, getValue } = useProps(props);
- const createOptionCount = ref(0);
- const cachedSelectedOption = ref();
- const enableAllowCreateMode = computed(() => {
- return props.allowCreate && props.filterable;
- });
- watch(() => props.options, (options) => {
- const optionLabelsSet = new Set(options.map((option) => getLabel(option)));
- states.createdOptions = states.createdOptions.filter((createdOption) => !optionLabelsSet.has(getLabel(createdOption)));
- });
- function hasExistingOption(query) {
- const hasOption = (option) => getLabel(option) === query;
- return props.options && props.options.some(hasOption) || states.createdOptions.some(hasOption);
- }
- function selectNewOption(option) {
- if (!enableAllowCreateMode.value) return;
- if (props.multiple && option.created) createOptionCount.value++;
- else cachedSelectedOption.value = option;
- }
- function createNewOption(query) {
- if (enableAllowCreateMode.value) if (query && query.length > 0) {
- if (hasExistingOption(query)) {
- states.createdOptions = states.createdOptions.filter((createdOption) => getLabel(createdOption) !== states.previousQuery);
- return;
- }
- const newOption = {
- [aliasProps.value.value]: query,
- [aliasProps.value.label]: query,
- created: true,
- [aliasProps.value.disabled]: false
- };
- if (states.createdOptions.length >= createOptionCount.value) states.createdOptions[createOptionCount.value] = newOption;
- else states.createdOptions.push(newOption);
- } else if (props.multiple) states.createdOptions.length = createOptionCount.value;
- else {
- const selectedOption = cachedSelectedOption.value;
- states.createdOptions.length = 0;
- if (selectedOption && selectedOption.created) states.createdOptions.push(selectedOption);
- }
- }
- function removeNewOption(option) {
- if (!enableAllowCreateMode.value || !option || !option.created || option.created && props.reserveKeyword && states.inputValue === getLabel(option)) return;
- const idx = states.createdOptions.findIndex((it) => getValue(it) === getValue(option));
- if (~idx) {
- states.createdOptions.splice(idx, 1);
- createOptionCount.value--;
- }
- }
- function clearAllNewOption() {
- if (enableAllowCreateMode.value) {
- states.createdOptions.length = 0;
- createOptionCount.value = 0;
- }
- }
- return {
- createNewOption,
- removeNewOption,
- selectNewOption,
- clearAllNewOption
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/useSelect.mjs
- var useSelect$1 = (props, emit) => {
- const { t } = useLocale();
- const slots = useSlots();
- const nsSelect = useNamespace("select");
- const nsInput = useNamespace("input");
- const { form: elForm, formItem: elFormItem } = useFormItem();
- const { inputId } = useFormItemInputId(props, { formItemContext: elFormItem });
- const { aliasProps, getLabel, getValue, getDisabled, getOptions } = useProps(props);
- const { valueOnClear, isEmptyValue } = useEmptyValues(props);
- const states = reactive({
- inputValue: "",
- cachedOptions: [],
- createdOptions: [],
- hoveringIndex: -1,
- inputHovering: false,
- selectionWidth: 0,
- collapseItemWidth: 0,
- previousQuery: null,
- previousValue: void 0,
- selectedLabel: "",
- menuVisibleOnFocus: false,
- isBeforeHide: false
- });
- const popperSize = ref(-1);
- const debouncing = ref(false);
- const selectRef = ref();
- const selectionRef = ref();
- const tooltipRef = ref();
- const tagTooltipRef = ref();
- const inputRef = ref();
- const prefixRef = ref();
- const suffixRef = ref();
- const menuRef = ref();
- const tagMenuRef = ref();
- const collapseItemRef = ref();
- const { isComposing, handleCompositionStart, handleCompositionEnd, handleCompositionUpdate } = useComposition({ afterComposition: (e) => onInput(e) });
- const selectDisabled = useFormDisabled();
- const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
- disabled: selectDisabled,
- afterFocus() {
- if (props.automaticDropdown && !expanded.value) {
- expanded.value = true;
- states.menuVisibleOnFocus = true;
- }
- },
- beforeBlur(event) {
- return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- expanded.value = false;
- states.menuVisibleOnFocus = false;
- if (props.validateEvent) elFormItem?.validate?.("blur").catch((err) => debugWarn(err));
- }
- });
- const allOptions = computed(() => filterOptions(""));
- const hasOptions = computed(() => {
- if (props.loading) return false;
- return props.options.length > 0 || states.createdOptions.length > 0;
- });
- const filteredOptions = ref([]);
- const expanded = ref(false);
- const needStatusIcon = computed(() => elForm?.statusIcon ?? false);
- const popupHeight = computed(() => {
- const totalHeight = filteredOptions.value.length * props.itemHeight;
- return totalHeight > props.height ? props.height : totalHeight;
- });
- const hasModelValue = computed(() => {
- return props.multiple ? isArray$1(props.modelValue) && props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
- });
- const showClearBtn = computed(() => {
- return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
- });
- const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
- const iconReverse = computed(() => iconComponent.value && nsSelect.is("reverse", expanded.value));
- const validateState = computed(() => elFormItem?.validateState || "");
- const validateIcon = computed(() => {
- if (!validateState.value) return;
- return ValidateComponentsMap[validateState.value];
- });
- const debounce = computed(() => props.remote ? props.debounce : 0);
- const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && !hasOptions.value);
- const emptyText = computed(() => {
- if (props.loading) return props.loadingText || t("el.select.loading");
- else {
- if (props.filterable && states.inputValue && hasOptions.value && filteredOptions.value.length === 0) return props.noMatchText || t("el.select.noMatch");
- if (!hasOptions.value) return props.noDataText || t("el.select.noData");
- }
- return null;
- });
- const isFilterMethodValid = computed(() => props.filterable && isFunction$1(props.filterMethod));
- const isRemoteMethodValid = computed(() => props.filterable && props.remote && isFunction$1(props.remoteMethod));
- const filterOptions = (query) => {
- const regexp = new RegExp(escapeStringRegexp(query), "i");
- const isValidOption = (o) => {
- if (isFilterMethodValid.value || isRemoteMethodValid.value) return true;
- return query ? regexp.test(getLabel(o) || "") : true;
- };
- if (props.loading) return [];
- return [...states.createdOptions, ...props.options].reduce((all, item) => {
- const options = getOptions(item);
- if (isArray$1(options)) {
- const filtered = options.filter(isValidOption);
- if (filtered.length > 0) all.push({
- label: getLabel(item),
- type: "Group"
- }, ...filtered);
- } else if (props.remote || isValidOption(item)) all.push(item);
- return all;
- }, []);
- };
- const updateOptions = () => {
- filteredOptions.value = filterOptions(states.inputValue);
- };
- const allOptionsValueMap = computed(() => {
- const valueMap = /* @__PURE__ */ new Map();
- allOptions.value.forEach((option, index) => {
- valueMap.set(getValueKey(getValue(option)), {
- option,
- index
- });
- });
- return valueMap;
- });
- const filteredOptionsValueMap = computed(() => {
- const valueMap = /* @__PURE__ */ new Map();
- filteredOptions.value.forEach((option, index) => {
- valueMap.set(getValueKey(getValue(option)), {
- option,
- index
- });
- });
- return valueMap;
- });
- const optionsAllDisabled = computed(() => filteredOptions.value.every((option) => getDisabled(option)));
- const selectSize = useFormSize();
- const collapseTagSize = computed(() => "small" === selectSize.value ? "small" : "default");
- const calculatePopperSize = () => {
- if (isNumber(props.fitInputWidth)) {
- popperSize.value = props.fitInputWidth;
- return;
- }
- const width = selectRef.value?.offsetWidth || 200;
- if (!props.fitInputWidth && hasOptions.value) nextTick(() => {
- popperSize.value = Math.max(width, calculateLabelMaxWidth());
- });
- else popperSize.value = width;
- };
- const calculateLabelMaxWidth = () => {
- const ctx = document.createElement("canvas").getContext("2d");
- const selector = nsSelect.be("dropdown", "item");
- const dropdownItemEl = (menuRef.value?.listRef?.innerRef || document).querySelector(`.${selector}`);
- if (dropdownItemEl === null || ctx === null) return 0;
- const style = getComputedStyle(dropdownItemEl);
- const padding = Number.parseFloat(style.paddingLeft) + Number.parseFloat(style.paddingRight);
- ctx.font = `bold ${style.font.replace(new RegExp(`\\b${style.fontWeight}\\b`), "")}`;
- return filteredOptions.value.reduce((max, option) => {
- const metrics = ctx.measureText(getLabel(option));
- return Math.max(metrics.width, max);
- }, 0) + padding;
- };
- const getGapWidth = () => {
- if (!selectionRef.value) return 0;
- const style = window.getComputedStyle(selectionRef.value);
- return Number.parseFloat(style.gap || "6px");
- };
- const tagStyle = computed(() => {
- const gapWidth = getGapWidth();
- const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
- return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
- });
- const collapseTagStyle = computed(() => {
- return { maxWidth: `${states.selectionWidth}px` };
- });
- const shouldShowPlaceholder = computed(() => {
- if (isArray$1(props.modelValue)) return props.modelValue.length === 0 && !states.inputValue;
- return props.filterable ? !states.inputValue : true;
- });
- const currentPlaceholder = computed(() => {
- const _placeholder = props.placeholder ?? t("el.select.placeholder");
- return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
- });
- const popperRef = computed(() => tooltipRef.value?.popperRef?.contentRef);
- const indexRef = computed(() => {
- if (props.multiple) {
- const len = props.modelValue.length;
- if (len > 0 && filteredOptionsValueMap.value.has(props.modelValue[len - 1])) {
- const { index } = filteredOptionsValueMap.value.get(props.modelValue[len - 1]);
- return index;
- }
- } else if (!isEmptyValue(props.modelValue) && filteredOptionsValueMap.value.has(props.modelValue)) {
- const { index } = filteredOptionsValueMap.value.get(props.modelValue);
- return index;
- }
- return -1;
- });
- const dropdownMenuVisible = computed({
- get() {
- return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery));
- },
- set(val) {
- expanded.value = val;
- }
- });
- const showTagList = computed(() => {
- if (!props.multiple) return [];
- return props.collapseTags ? states.cachedOptions.slice(0, props.maxCollapseTags) : states.cachedOptions;
- });
- const collapseTagList = computed(() => {
- if (!props.multiple) return [];
- return props.collapseTags ? states.cachedOptions.slice(props.maxCollapseTags) : [];
- });
- const { createNewOption, removeNewOption, selectNewOption, clearAllNewOption } = useAllowCreate(props, states);
- const toggleMenu = (event) => {
- if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
- if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
- else expanded.value = !expanded.value;
- };
- const onInputChange = () => {
- if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
- createNewOption(states.inputValue);
- nextTick(() => {
- handleQueryChange(states.inputValue);
- });
- };
- const debouncedOnInputChange = useDebounceFn(() => {
- onInputChange();
- debouncing.value = false;
- }, debounce);
- const handleQueryChange = (val) => {
- if (states.previousQuery === val || isComposing.value) return;
- states.previousQuery = val;
- if (props.filterable && isFunction$1(props.filterMethod)) props.filterMethod(val);
- else if (props.filterable && props.remote && isFunction$1(props.remoteMethod)) props.remoteMethod(val);
- if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptions.value.length) nextTick(checkDefaultFirstOption);
- else nextTick(updateHoveringIndex);
- };
- /**
- * find and highlight first option as default selected
- * @remark
- * - if the first option in dropdown list is user-created,
- * it would be at the end of the optionsArray
- * so find it and set hover.
- * (NOTE: there must be only one user-created option in dropdown list with query)
- * - if there's no user-created option in list, just find the first one as usual
- * (NOTE: exclude options that are disabled or in disabled-group)
- */
- const checkDefaultFirstOption = () => {
- const optionsInDropdown = filteredOptions.value.filter((n) => !n.disabled && n.type !== "Group");
- const userCreatedOption = optionsInDropdown.find((n) => n.created);
- const firstOriginOption = optionsInDropdown[0];
- states.hoveringIndex = getValueIndex(filteredOptions.value, userCreatedOption || firstOriginOption);
- };
- const emitChange = (val) => {
- if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
- };
- const update = (val) => {
- emit(UPDATE_MODEL_EVENT, val);
- emitChange(val);
- states.previousValue = props.multiple ? String(val) : val;
- nextTick(() => {
- if (props.multiple && isArray$1(props.modelValue)) {
- const cachedOptions = states.cachedOptions.slice();
- const selectedOptions = props.modelValue.map((value) => getOption(value, cachedOptions));
- if (!isEqual$1(states.cachedOptions, selectedOptions)) states.cachedOptions = selectedOptions;
- } else initStates(true);
- });
- };
- const getValueIndex = (arr = [], value) => {
- if (!isObject$2(value)) return arr.indexOf(value);
- const valueKey = props.valueKey;
- let index = -1;
- arr.some((item, i) => {
- if (get(item, valueKey) === get(value, valueKey)) {
- index = i;
- return true;
- }
- return false;
- });
- return index;
- };
- const getValueKey = (item) => {
- return isObject$2(item) ? get(item, props.valueKey) : item;
- };
- const handleResize = () => {
- calculatePopperSize();
- };
- const resetSelectionWidth = () => {
- states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
- };
- const resetCollapseItemWidth = () => {
- states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
- };
- const updateTooltip = () => {
- tooltipRef.value?.updatePopper?.();
- };
- const updateTagTooltip = () => {
- tagTooltipRef.value?.updatePopper?.();
- };
- const onSelect = (option) => {
- const optionValue = getValue(option);
- if (props.multiple) {
- let selectedOptions = props.modelValue.slice();
- const index = getValueIndex(selectedOptions, optionValue);
- if (index > -1) {
- selectedOptions = [...selectedOptions.slice(0, index), ...selectedOptions.slice(index + 1)];
- states.cachedOptions.splice(index, 1);
- removeNewOption(option);
- } else if (props.multipleLimit <= 0 || selectedOptions.length < props.multipleLimit) {
- selectedOptions = [...selectedOptions, optionValue];
- states.cachedOptions.push(option);
- selectNewOption(option);
- }
- update(selectedOptions);
- if (option.created) handleQueryChange("");
- if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
- } else {
- states.selectedLabel = getLabel(option);
- !isEqual$1(props.modelValue, optionValue) && update(optionValue);
- expanded.value = false;
- selectNewOption(option);
- if (!option.created) clearAllNewOption();
- }
- focus();
- };
- const deleteTag = (event, option) => {
- let selectedOptions = props.modelValue.slice();
- const index = getValueIndex(selectedOptions, getValue(option));
- if (index > -1 && !selectDisabled.value) {
- selectedOptions = [...props.modelValue.slice(0, index), ...props.modelValue.slice(index + 1)];
- states.cachedOptions.splice(index, 1);
- update(selectedOptions);
- emit("remove-tag", getValue(option));
- removeNewOption(option);
- }
- event.stopPropagation();
- focus();
- };
- const focus = () => {
- inputRef.value?.focus();
- };
- const blur = () => {
- if (expanded.value) {
- expanded.value = false;
- nextTick(() => inputRef.value?.blur());
- return;
- }
- inputRef.value?.blur();
- };
- const handleEsc = () => {
- if (states.inputValue.length > 0) states.inputValue = "";
- else expanded.value = false;
- };
- const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => !states.cachedOptions.some((option) => getValue(option) === it && getDisabled(option)));
- const handleDel = (e) => {
- const code = getEventCode(e);
- if (!props.multiple) return;
- if (code === EVENT_CODE.delete) return;
- if (states.inputValue.length === 0) {
- e.preventDefault();
- const selected = props.modelValue.slice();
- const lastNotDisabledIndex = getLastNotDisabledIndex(selected);
- if (lastNotDisabledIndex < 0) return;
- const removeTagValue = selected[lastNotDisabledIndex];
- selected.splice(lastNotDisabledIndex, 1);
- const option = states.cachedOptions[lastNotDisabledIndex];
- states.cachedOptions.splice(lastNotDisabledIndex, 1);
- removeNewOption(option);
- update(selected);
- emit("remove-tag", removeTagValue);
- }
- };
- const handleClear = () => {
- let emptyValue;
- if (isArray$1(props.modelValue)) emptyValue = [];
- else emptyValue = valueOnClear.value;
- states.selectedLabel = "";
- expanded.value = false;
- update(emptyValue);
- emit("clear");
- clearAllNewOption();
- focus();
- };
- const onKeyboardNavigate = (direction, hoveringIndex = void 0) => {
- const options = filteredOptions.value;
- if (!["forward", "backward"].includes(direction) || selectDisabled.value || options.length <= 0 || optionsAllDisabled.value || isComposing.value) return;
- if (!expanded.value) return toggleMenu();
- if (isUndefined(hoveringIndex)) hoveringIndex = states.hoveringIndex;
- let newIndex = -1;
- if (direction === "forward") {
- newIndex = hoveringIndex + 1;
- if (newIndex >= options.length) newIndex = 0;
- } else if (direction === "backward") {
- newIndex = hoveringIndex - 1;
- if (newIndex < 0 || newIndex >= options.length) newIndex = options.length - 1;
- }
- const option = options[newIndex];
- if (getDisabled(option) || option.type === "Group") return onKeyboardNavigate(direction, newIndex);
- else {
- states.hoveringIndex = newIndex;
- scrollToItem(newIndex);
- }
- };
- const onKeyboardSelect = () => {
- if (!expanded.value) return toggleMenu();
- else if (~states.hoveringIndex && filteredOptions.value[states.hoveringIndex]) onSelect(filteredOptions.value[states.hoveringIndex]);
- };
- const onHoverOption = (idx) => {
- states.hoveringIndex = idx ?? -1;
- };
- const updateHoveringIndex = () => {
- if (!props.multiple) states.hoveringIndex = filteredOptions.value.findIndex((item) => {
- return getValueKey(getValue(item)) === getValueKey(props.modelValue);
- });
- else {
- const length = props.modelValue.length;
- if (length > 0) {
- const lastValue = props.modelValue[length - 1];
- states.hoveringIndex = filteredOptions.value.findIndex((item) => getValueKey(lastValue) === getValueKey(getValue(item)));
- } else states.hoveringIndex = -1;
- }
- };
- const onInput = (event) => {
- states.inputValue = event.target.value;
- if (props.remote) {
- debouncing.value = true;
- debouncedOnInputChange();
- } else return onInputChange();
- };
- const handleClickOutside = (event) => {
- expanded.value = false;
- if (isFocused.value) handleBlur(new FocusEvent("blur", event));
- };
- const handleMenuEnter = () => {
- states.isBeforeHide = false;
- return nextTick(() => {
- if (~indexRef.value) scrollToItem(indexRef.value);
- });
- };
- const scrollToItem = (index) => {
- menuRef.value.scrollToItem(index);
- };
- const getOption = (value, cachedOptions) => {
- const selectValue = getValueKey(value);
- if (allOptionsValueMap.value.has(selectValue)) {
- const { option } = allOptionsValueMap.value.get(selectValue);
- return option;
- }
- if (cachedOptions && cachedOptions.length) {
- const option = cachedOptions.find((option) => getValueKey(getValue(option)) === selectValue);
- if (option) return option;
- }
- return {
- [aliasProps.value.value]: value,
- [aliasProps.value.label]: value
- };
- };
- const getIndex = (option) => allOptionsValueMap.value.get(getValue(option))?.index ?? -1;
- const initStates = (needUpdateSelectedLabel = false) => {
- if (props.multiple) if (props.modelValue.length > 0) {
- const cachedOptions = states.cachedOptions.slice();
- states.cachedOptions.length = 0;
- states.previousValue = props.modelValue.toString();
- for (const value of props.modelValue) {
- const option = getOption(value, cachedOptions);
- states.cachedOptions.push(option);
- }
- } else {
- states.cachedOptions = [];
- states.previousValue = void 0;
- }
- else if (hasModelValue.value) {
- states.previousValue = props.modelValue;
- const options = filteredOptions.value;
- const selectedItemIndex = options.findIndex((option) => getValueKey(getValue(option)) === getValueKey(props.modelValue));
- if (~selectedItemIndex) states.selectedLabel = getLabel(options[selectedItemIndex]);
- else if (!states.selectedLabel || needUpdateSelectedLabel) states.selectedLabel = getValueKey(props.modelValue);
- } else {
- states.selectedLabel = "";
- states.previousValue = void 0;
- }
- clearAllNewOption();
- calculatePopperSize();
- };
- watch(() => props.fitInputWidth, () => {
- calculatePopperSize();
- });
- watch(expanded, (val) => {
- if (val) {
- if (!props.persistent) calculatePopperSize();
- handleQueryChange("");
- } else {
- states.inputValue = "";
- states.previousQuery = null;
- states.isBeforeHide = true;
- states.menuVisibleOnFocus = false;
- createNewOption("");
- }
- });
- watch(() => props.modelValue, (val, oldVal) => {
- if (!val || isArray$1(val) && val.length === 0 || props.multiple && !isEqual$1(val.toString(), states.previousValue) || !props.multiple && getValueKey(val) !== getValueKey(states.previousValue)) initStates(true);
- if (!isEqual$1(val, oldVal) && props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
- }, { deep: true });
- watch(() => props.options, () => {
- const input = inputRef.value;
- if (!input || input && document.activeElement !== input) initStates();
- }, {
- deep: true,
- flush: "post"
- });
- watch(() => filteredOptions.value, () => {
- calculatePopperSize();
- return menuRef.value && nextTick(menuRef.value.resetScrollTop);
- });
- watchEffect(() => {
- if (states.isBeforeHide) return;
- updateOptions();
- });
- watchEffect(() => {
- const { valueKey, options } = props;
- const duplicateValue = /* @__PURE__ */ new Map();
- for (const item of options) {
- const optionValue = getValue(item);
- let v = optionValue;
- if (isObject$2(v)) v = get(optionValue, valueKey);
- if (duplicateValue.get(v)) {
- debugWarn("ElSelectV2", `The option values you provided seem to be duplicated, which may cause some problems, please check.`);
- break;
- } else duplicateValue.set(v, true);
- }
- });
- onMounted(() => {
- initStates();
- });
- useResizeObserver(selectRef, handleResize);
- useResizeObserver(selectionRef, resetSelectionWidth);
- useResizeObserver(wrapperRef, updateTooltip);
- useResizeObserver(tagMenuRef, updateTagTooltip);
- useResizeObserver(collapseItemRef, resetCollapseItemWidth);
- let stop;
- watch(() => dropdownMenuVisible.value, (newVal) => {
- if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
- else {
- stop?.();
- stop = void 0;
- }
- emit("visible-change", newVal);
- });
- return {
- inputId,
- collapseTagSize,
- currentPlaceholder,
- expanded,
- emptyText,
- popupHeight,
- debounce,
- allOptions,
- allOptionsValueMap,
- filteredOptions,
- iconComponent,
- iconReverse,
- tagStyle,
- collapseTagStyle,
- popperSize,
- dropdownMenuVisible,
- hasModelValue,
- shouldShowPlaceholder,
- selectDisabled,
- selectSize,
- needStatusIcon,
- showClearBtn,
- states,
- isFocused,
- nsSelect,
- nsInput,
- inputRef,
- menuRef,
- tagMenuRef,
- tooltipRef,
- tagTooltipRef,
- selectRef,
- wrapperRef,
- selectionRef,
- prefixRef,
- suffixRef,
- collapseItemRef,
- popperRef,
- validateState,
- validateIcon,
- showTagList,
- collapseTagList,
- debouncedOnInputChange,
- deleteTag,
- getLabel,
- getValue,
- getDisabled,
- getValueKey,
- getIndex,
- handleClear,
- handleClickOutside,
- handleDel,
- handleEsc,
- focus,
- blur,
- handleMenuEnter,
- handleResize,
- resetSelectionWidth,
- updateTooltip,
- updateTagTooltip,
- updateOptions,
- toggleMenu,
- scrollTo: scrollToItem,
- onInput,
- onKeyboardNavigate,
- onKeyboardSelect,
- onSelect,
- onHover: onHoverOption,
- handleCompositionStart,
- handleCompositionEnd,
- handleCompositionUpdate
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs
- var select_vue_vue_type_script_lang_default = defineComponent({
- name: "ElSelectV2",
- components: {
- ElSelectMenu: select_dropdown_default,
- ElTag,
- ElTooltip,
- ElIcon
- },
- directives: { ClickOutside },
- props: selectV2Props,
- emits: selectV2Emits,
- setup(props, { emit }) {
- const modelValue = computed(() => {
- const { modelValue: rawModelValue, multiple } = props;
- const fallback = multiple ? [] : void 0;
- if (isArray$1(rawModelValue)) return multiple ? rawModelValue : fallback;
- return multiple ? fallback : rawModelValue;
- });
- const API = useSelect$1(reactive({
- ...toRefs(props),
- modelValue
- }), emit);
- const { calculatorRef, inputStyle } = useCalcInputWidth();
- const contentId = useId();
- provide(selectV2InjectionKey, {
- props: reactive({
- ...toRefs(props),
- height: API.popupHeight,
- modelValue
- }),
- expanded: API.expanded,
- tooltipRef: API.tooltipRef,
- contentId,
- onSelect: API.onSelect,
- onHover: API.onHover,
- onKeyboardNavigate: API.onKeyboardNavigate,
- onKeyboardSelect: API.onKeyboardSelect
- });
- const selectedLabel = computed(() => {
- if (!props.multiple) return API.states.selectedLabel;
- return API.states.cachedOptions.map((i) => API.getLabel(i));
- });
- return {
- ...API,
- modelValue,
- selectedLabel,
- calculatorRef,
- inputStyle,
- contentId,
- BORDER_HORIZONTAL_WIDTH: 2
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/src/select.mjs
- var _hoisted_1$21 = [
- "id",
- "value",
- "autocomplete",
- "tabindex",
- "aria-expanded",
- "aria-label",
- "disabled",
- "aria-controls",
- "aria-activedescendant",
- "readonly",
- "name"
- ];
- var _hoisted_2$13 = ["textContent"];
- var _hoisted_3$5 = { key: 1 };
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_tag = resolveComponent("el-tag");
- const _component_el_tooltip = resolveComponent("el-tooltip");
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_select_menu = resolveComponent("el-select-menu");
- const _directive_click_outside = resolveDirective("click-outside");
- return withDirectives((openBlock(), createElementBlock("div", {
- ref: "selectRef",
- class: normalizeClass([_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]),
- onMouseenter: _cache[15] || (_cache[15] = ($event) => _ctx.states.inputHovering = true),
- onMouseleave: _cache[16] || (_cache[16] = ($event) => _ctx.states.inputHovering = false)
- }, [createVNode(_component_el_tooltip, {
- ref: "tooltipRef",
- visible: _ctx.dropdownMenuVisible,
- teleported: _ctx.teleported,
- "popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
- "popper-style": _ctx.popperStyle,
- "gpu-acceleration": false,
- "stop-popper-mouse-event": false,
- "popper-options": _ctx.popperOptions,
- "fallback-placements": _ctx.fallbackPlacements,
- effect: _ctx.effect,
- placement: _ctx.placement,
- pure: "",
- transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
- trigger: "click",
- persistent: _ctx.persistent,
- "append-to": _ctx.appendTo,
- "show-arrow": _ctx.showArrow,
- offset: _ctx.offset,
- onBeforeShow: _ctx.handleMenuEnter,
- onHide: _cache[14] || (_cache[14] = ($event) => _ctx.states.isBeforeHide = false)
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref: "wrapperRef",
- class: normalizeClass([
- _ctx.nsSelect.e("wrapper"),
- _ctx.nsSelect.is("focused", _ctx.isFocused),
- _ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
- _ctx.nsSelect.is("filterable", _ctx.filterable),
- _ctx.nsSelect.is("disabled", _ctx.selectDisabled)
- ]),
- onClick: _cache[11] || (_cache[11] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
- }, [
- _ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref: "prefixRef",
- class: normalizeClass(_ctx.nsSelect.e("prefix"))
- }, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- ref: "selectionRef",
- class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.modelValue.length)])
- }, [
- _ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
- key: 0,
- data: _ctx.states.cachedOptions,
- deleteTag: _ctx.deleteTag,
- selectDisabled: _ctx.selectDisabled
- }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
- return openBlock(), createElementBlock("div", {
- key: _ctx.getValueKey(_ctx.getValue(item)),
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
- }, [createVNode(_component_el_tag, {
- closable: !_ctx.selectDisabled && !_ctx.getDisabled(item),
- size: _ctx.collapseTagSize,
- type: _ctx.tagType,
- effect: _ctx.tagEffect,
- "disable-transitions": "",
- style: normalizeStyle(_ctx.tagStyle),
- onClose: ($event) => _ctx.deleteTag($event, item)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
- index: _ctx.getIndex(item),
- label: _ctx.getLabel(item),
- value: _ctx.getValue(item)
- }, () => [createTextVNode(toDisplayString(_ctx.getLabel(item)), 1)])], 2)]),
- _: 2
- }, 1032, [
- "closable",
- "size",
- "type",
- "effect",
- "style",
- "onClose"
- ])], 2);
- }), 128)), _ctx.collapseTags && _ctx.states.cachedOptions.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
- key: 0,
- ref: "tagTooltipRef",
- disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
- "fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
- "bottom",
- "top",
- "right",
- "left"
- ],
- effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
- placement: _ctx.tagTooltip?.placement ?? "bottom",
- "popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
- "popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
- teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
- "append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
- "popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
- transition: _ctx.tagTooltip?.transition,
- "show-after": _ctx.tagTooltip?.showAfter,
- "hide-after": _ctx.tagTooltip?.hideAfter,
- "auto-close": _ctx.tagTooltip?.autoClose,
- offset: _ctx.tagTooltip?.offset
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref: "collapseItemRef",
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
- }, [createVNode(_component_el_tag, {
- closable: false,
- size: _ctx.collapseTagSize,
- type: _ctx.tagType,
- effect: _ctx.tagEffect,
- style: normalizeStyle(_ctx.collapseTagStyle),
- "disable-transitions": ""
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.cachedOptions.length - _ctx.maxCollapseTags), 3)]),
- _: 1
- }, 8, [
- "size",
- "type",
- "effect",
- "style"
- ])], 2)]),
- content: withCtx(() => [createBaseVNode("div", {
- ref: "tagMenuRef",
- class: normalizeClass(_ctx.nsSelect.e("selection"))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (selected) => {
- return openBlock(), createElementBlock("div", {
- key: _ctx.getValueKey(_ctx.getValue(selected)),
- class: normalizeClass(_ctx.nsSelect.e("selected-item"))
- }, [createVNode(_component_el_tag, {
- class: "in-tooltip",
- closable: !_ctx.selectDisabled && !_ctx.getDisabled(selected),
- size: _ctx.collapseTagSize,
- type: _ctx.tagType,
- effect: _ctx.tagEffect,
- "disable-transitions": "",
- onClose: ($event) => _ctx.deleteTag($event, selected)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
- index: _ctx.getIndex(selected),
- label: _ctx.getLabel(selected),
- value: _ctx.getValue(selected)
- }, () => [createTextVNode(toDisplayString(_ctx.getLabel(selected)), 1)])], 2)]),
- _: 2
- }, 1032, [
- "closable",
- "size",
- "type",
- "effect",
- "onClose"
- ])], 2);
- }), 128))], 2)]),
- _: 3
- }, 8, [
- "disabled",
- "fallback-placements",
- "effect",
- "placement",
- "popper-class",
- "popper-style",
- "teleported",
- "append-to",
- "popper-options",
- "transition",
- "show-after",
- "hide-after",
- "auto-close",
- "offset"
- ])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass([
- _ctx.nsSelect.e("selected-item"),
- _ctx.nsSelect.e("input-wrapper"),
- _ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
- ]) }, [createBaseVNode("input", {
- id: _ctx.inputId,
- ref: "inputRef",
- value: _ctx.states.inputValue,
- style: normalizeStyle(_ctx.inputStyle),
- autocomplete: _ctx.autocomplete,
- tabindex: _ctx.tabindex,
- "aria-autocomplete": "none",
- "aria-haspopup": "listbox",
- autocapitalize: "off",
- "aria-expanded": _ctx.expanded,
- "aria-label": _ctx.ariaLabel,
- class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
- disabled: _ctx.selectDisabled,
- role: "combobox",
- "aria-controls": _ctx.contentId,
- "aria-activedescendant": _ctx.states.hoveringIndex >= 0 ? `${_ctx.contentId}-${_ctx.states.hoveringIndex}` : "",
- readonly: !_ctx.filterable,
- spellcheck: "false",
- type: "text",
- name: _ctx.name,
- onInput: _cache[0] || (_cache[0] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
- onChange: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"])),
- onCompositionstart: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
- onCompositionupdate: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
- onCompositionend: _cache[4] || (_cache[4] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
- onKeydown: [
- _cache[5] || (_cache[5] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("backward"), ["stop", "prevent"]), ["up"])),
- _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.onKeyboardNavigate("forward"), ["stop", "prevent"]), ["down"])),
- _cache[7] || (_cache[7] = withKeys(withModifiers((...args) => _ctx.onKeyboardSelect && _ctx.onKeyboardSelect(...args), ["stop", "prevent"]), ["enter"])),
- _cache[8] || (_cache[8] = withKeys(withModifiers((...args) => _ctx.handleEsc && _ctx.handleEsc(...args), ["stop", "prevent"]), ["esc"])),
- _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleDel && _ctx.handleDel(...args), ["stop"]), ["delete"]))
- ],
- onClick: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
- }, null, 46, _hoisted_1$21), _ctx.filterable ? (openBlock(), createElementBlock("span", {
- key: 0,
- ref: "calculatorRef",
- "aria-hidden": "true",
- class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
- textContent: toDisplayString(_ctx.states.inputValue)
- }, null, 10, _hoisted_2$13)) : createCommentVNode("v-if", true)], 2),
- _ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([
- _ctx.nsSelect.e("selected-item"),
- _ctx.nsSelect.e("placeholder"),
- _ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
- ])
- }, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
- key: 0,
- index: _ctx.allOptionsValueMap.get(_ctx.modelValue)?.index ?? -1,
- label: _ctx.currentPlaceholder,
- value: _ctx.modelValue
- }, () => [createBaseVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3$5, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
- ], 2),
- createBaseVNode("div", {
- ref: "suffixRef",
- class: normalizeClass(_ctx.nsSelect.e("suffix"))
- }, [
- _ctx.iconComponent ? withDirectives((openBlock(), createBlock(_component_el_icon, {
- key: 0,
- class: normalizeClass([
- _ctx.nsSelect.e("caret"),
- _ctx.nsInput.e("icon"),
- _ctx.iconReverse
- ])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
- _: 1
- }, 8, ["class"])), [[vShow, !_ctx.showClearBtn]]) : createCommentVNode("v-if", true),
- _ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
- key: 1,
- class: normalizeClass([
- _ctx.nsSelect.e("caret"),
- _ctx.nsInput.e("icon"),
- _ctx.nsSelect.e("clear")
- ]),
- onClick: withModifiers(_ctx.handleClear, ["prevent", "stop"])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
- _: 1
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
- _ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
- key: 2,
- class: normalizeClass([
- _ctx.nsInput.e("icon"),
- _ctx.nsInput.e("validateIcon"),
- _ctx.nsInput.is("loading", _ctx.validateState === "validating")
- ])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)
- ], 2)
- ], 2)]),
- content: withCtx(() => [createVNode(_component_el_select_menu, {
- id: _ctx.contentId,
- ref: "menuRef",
- data: _ctx.filteredOptions,
- width: _ctx.popperSize - _ctx.BORDER_HORIZONTAL_WIDTH,
- "hovering-index": _ctx.states.hoveringIndex,
- "scrollbar-always-on": _ctx.scrollbarAlwaysOn,
- "aria-label": _ctx.ariaLabel
- }, createSlots({
- default: withCtx((scope) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(scope)))]),
- _: 2
- }, [
- _ctx.$slots.header ? {
- name: "header",
- fn: withCtx(() => [createBaseVNode("div", {
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
- onClick: _cache[12] || (_cache[12] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "header")], 2)]),
- key: "0"
- } : void 0,
- _ctx.$slots.loading && _ctx.loading ? {
- name: "loading",
- fn: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading")) }, [renderSlot(_ctx.$slots, "loading")], 2)]),
- key: "1"
- } : _ctx.loading || _ctx.filteredOptions.length === 0 ? {
- name: "empty",
- fn: withCtx(() => [createBaseVNode("div", { class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)]),
- key: "2"
- } : void 0,
- _ctx.$slots.footer ? {
- name: "footer",
- fn: withCtx(() => [createBaseVNode("div", {
- class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
- onClick: _cache[13] || (_cache[13] = withModifiers(() => {}, ["stop"]))
- }, [renderSlot(_ctx.$slots, "footer")], 2)]),
- key: "3"
- } : void 0
- ]), 1032, [
- "id",
- "data",
- "width",
- "hovering-index",
- "scrollbar-always-on",
- "aria-label"
- ])]),
- _: 3
- }, 8, [
- "visible",
- "teleported",
- "popper-class",
- "popper-style",
- "popper-options",
- "fallback-placements",
- "effect",
- "placement",
- "transition",
- "persistent",
- "append-to",
- "show-arrow",
- "offset",
- "onBeforeShow"
- ])], 34)), [[
- _directive_click_outside,
- _ctx.handleClickOutside,
- _ctx.popperRef
- ]]);
- }
- //#endregion
- //#region node_modules/element-plus/es/components/select-v2/index.mjs
- var ElSelectV2 = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default, [["render", _sfc_render$5]]));
- //#endregion
- //#region node_modules/element-plus/es/components/skeleton/src/skeleton.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `SkeletonProps` instead.
- */
- var skeletonProps = buildProps({
- animated: Boolean,
- count: {
- type: Number,
- default: 1
- },
- rows: {
- type: Number,
- default: 3
- },
- loading: {
- type: Boolean,
- default: true
- },
- throttle: { type: definePropType([Number, Object]) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/skeleton/src/skeleton-item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `SkeletonItemProps` instead.
- */
- var skeletonItemProps = buildProps({ variant: {
- type: String,
- values: [
- "circle",
- "rect",
- "h1",
- "h3",
- "text",
- "caption",
- "p",
- "image",
- "button"
- ],
- default: "text"
- } });
- //#endregion
- //#region node_modules/element-plus/es/components/skeleton/src/skeleton-item2.mjs
- var skeleton_item_default = /* @__PURE__ */ defineComponent({
- name: "ElSkeletonItem",
- __name: "skeleton-item",
- props: skeletonItemProps,
- setup(__props) {
- const ns = useNamespace("skeleton");
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).e("item"), unref(ns).e(__props.variant)]) }, [__props.variant === "image" ? (openBlock(), createBlock(unref(picture_filled_default), { key: 0 })) : createCommentVNode("v-if", true)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/skeleton/index.mjs
- var ElSkeleton = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElSkeleton",
- __name: "skeleton",
- props: skeletonProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const ns = useNamespace("skeleton");
- const uiLoading = useThrottleRender(toRef(props, "loading"), props.throttle);
- __expose({ uiLoading });
- return (_ctx, _cache) => {
- return unref(uiLoading) ? (openBlock(), createElementBlock("div", mergeProps({
- key: 0,
- class: [unref(ns).b(), unref(ns).is("animated", __props.animated)]
- }, _ctx.$attrs), [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.count, (i) => {
- return openBlock(), createElementBlock(Fragment, { key: i }, [unref(uiLoading) ? renderSlot(_ctx.$slots, "template", { key: i }, () => [createVNode(skeleton_item_default, {
- class: normalizeClass(unref(ns).is("first")),
- variant: "p"
- }, null, 8, ["class"]), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (item) => {
- return openBlock(), createBlock(skeleton_item_default, {
- key: item,
- class: normalizeClass([unref(ns).e("paragraph"), unref(ns).is("last", item === __props.rows && __props.rows > 1)]),
- variant: "p"
- }, null, 8, ["class"]);
- }), 128))]) : createCommentVNode("v-if", true)], 64);
- }), 128))], 16)) : renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)));
- };
- }
- }), { SkeletonItem: skeleton_item_default });
- var ElSkeletonItem = withNoopInstall(skeleton_item_default);
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/constants.mjs
- var sliderContextKey = Symbol("sliderContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/slider.mjs
- var sliderProps = buildProps({
- modelValue: {
- type: definePropType([Number, Array]),
- default: 0
- },
- id: {
- type: String,
- default: void 0
- },
- min: {
- type: Number,
- default: 0
- },
- max: {
- type: Number,
- default: 100
- },
- step: {
- type: Number,
- default: 1
- },
- showInput: Boolean,
- showInputControls: {
- type: Boolean,
- default: true
- },
- size: useSizeProp,
- inputSize: useSizeProp,
- showStops: Boolean,
- showTooltip: {
- type: Boolean,
- default: true
- },
- formatTooltip: {
- type: definePropType(Function),
- default: void 0
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- range: Boolean,
- vertical: Boolean,
- height: String,
- rangeStartLabel: {
- type: String,
- default: void 0
- },
- rangeEndLabel: {
- type: String,
- default: void 0
- },
- formatValueText: {
- type: definePropType(Function),
- default: void 0
- },
- tooltipClass: {
- type: String,
- default: void 0
- },
- placement: {
- type: String,
- values: Ee,
- default: "top"
- },
- marks: { type: definePropType(Object) },
- validateEvent: {
- type: Boolean,
- default: true
- },
- persistent: {
- type: Boolean,
- default: true
- },
- ...useAriaProps(["ariaLabel"])
- });
- var isValidValue$1 = (value) => isNumber(value) || isArray$1(value) && value.every(isNumber);
- var sliderEmits = {
- [UPDATE_MODEL_EVENT]: isValidValue$1,
- [INPUT_EVENT]: isValidValue$1,
- [CHANGE_EVENT]: isValidValue$1
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/composables/use-lifecycle.mjs
- var useLifecycle = (props, initData, resetSize) => {
- const sliderWrapper = ref();
- onMounted(async () => {
- if (props.range) {
- if (isArray$1(props.modelValue)) {
- initData.firstValue = Math.max(props.min, props.modelValue[0]);
- initData.secondValue = Math.min(props.max, props.modelValue[1]);
- } else {
- initData.firstValue = props.min;
- initData.secondValue = props.max;
- }
- initData.oldValue = [initData.firstValue, initData.secondValue];
- } else {
- if (!isNumber(props.modelValue) || Number.isNaN(props.modelValue)) initData.firstValue = props.min;
- else initData.firstValue = Math.min(props.max, Math.max(props.min, props.modelValue));
- initData.oldValue = initData.firstValue;
- }
- useEventListener(window, "resize", resetSize);
- await nextTick();
- resetSize();
- });
- return { sliderWrapper };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/composables/use-marks.mjs
- var useMarks = (props) => {
- return computed(() => {
- if (!props.marks) return [];
- return Object.keys(props.marks).map(Number.parseFloat).sort((a, b) => a - b).filter((point) => point <= props.max && point >= props.min).map((point) => ({
- point,
- position: (point - props.min) * 100 / (props.max - props.min),
- mark: props.marks[point]
- }));
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/composables/use-slide.mjs
- var useSlide = (props, initData, emit) => {
- const { formItem: elFormItem } = useFormItem();
- const slider = shallowRef();
- const firstButton = ref();
- const secondButton = ref();
- const buttonRefs = {
- firstButton,
- secondButton
- };
- const sliderDisabled = useFormDisabled();
- const minValue = computed(() => {
- return Math.min(initData.firstValue, initData.secondValue);
- });
- const maxValue = computed(() => {
- return Math.max(initData.firstValue, initData.secondValue);
- });
- const barSize = computed(() => {
- return props.range ? `${100 * (maxValue.value - minValue.value) / (props.max - props.min)}%` : `${100 * (initData.firstValue - props.min) / (props.max - props.min)}%`;
- });
- const barStart = computed(() => {
- return props.range ? `${100 * (minValue.value - props.min) / (props.max - props.min)}%` : "0%";
- });
- const runwayStyle = computed(() => {
- return props.vertical ? { height: props.height } : {};
- });
- const barStyle = computed(() => {
- return props.vertical ? {
- height: barSize.value,
- bottom: barStart.value
- } : {
- width: barSize.value,
- left: barStart.value
- };
- });
- const resetSize = () => {
- if (slider.value) initData.sliderSize = slider.value.getBoundingClientRect()[props.vertical ? "height" : "width"];
- };
- const getButtonRefByPercent = (percent) => {
- const targetValue = props.min + percent * (props.max - props.min) / 100;
- if (!props.range) return firstButton;
- let buttonRefName;
- if (Math.abs(minValue.value - targetValue) < Math.abs(maxValue.value - targetValue)) buttonRefName = initData.firstValue < initData.secondValue ? "firstButton" : "secondButton";
- else buttonRefName = initData.firstValue > initData.secondValue ? "firstButton" : "secondButton";
- return buttonRefs[buttonRefName];
- };
- const setPosition = (percent) => {
- const buttonRef = getButtonRefByPercent(percent);
- buttonRef.value.setPosition(percent);
- return buttonRef;
- };
- const setFirstValue = (firstValue) => {
- initData.firstValue = firstValue ?? props.min;
- _emit(props.range ? [minValue.value, maxValue.value] : firstValue ?? props.min);
- };
- const setSecondValue = (secondValue) => {
- initData.secondValue = secondValue;
- if (props.range) _emit([minValue.value, maxValue.value]);
- };
- const _emit = (val) => {
- emit(UPDATE_MODEL_EVENT, val);
- emit(INPUT_EVENT, val);
- };
- const emitChange = async () => {
- await nextTick();
- emit(CHANGE_EVENT, props.range ? [minValue.value, maxValue.value] : props.modelValue);
- };
- const handleSliderPointerEvent = (event) => {
- if (sliderDisabled.value || initData.dragging) return;
- resetSize();
- let newPercent = 0;
- if (props.vertical) {
- const clientY = event.touches?.item(0)?.clientY ?? event.clientY;
- newPercent = (slider.value.getBoundingClientRect().bottom - clientY) / initData.sliderSize * 100;
- } else newPercent = ((event.touches?.item(0)?.clientX ?? event.clientX) - slider.value.getBoundingClientRect().left) / initData.sliderSize * 100;
- if (newPercent < 0 || newPercent > 100) return;
- return setPosition(newPercent);
- };
- const onSliderWrapperPrevent = (event) => {
- if (buttonRefs["firstButton"].value?.dragging || buttonRefs["secondButton"].value?.dragging) event.preventDefault();
- };
- const onSliderDown = async (event) => {
- const buttonRef = handleSliderPointerEvent(event);
- if (buttonRef) {
- await nextTick();
- buttonRef.value.onButtonDown(event);
- }
- };
- const onSliderClick = (event) => {
- if (handleSliderPointerEvent(event)) emitChange();
- };
- const onSliderMarkerDown = (position) => {
- if (sliderDisabled.value || initData.dragging) return;
- if (setPosition(position)) emitChange();
- };
- return {
- elFormItem,
- slider,
- firstButton,
- secondButton,
- sliderDisabled,
- minValue,
- maxValue,
- runwayStyle,
- barStyle,
- resetSize,
- setPosition,
- emitChange,
- onSliderWrapperPrevent,
- onSliderClick,
- onSliderDown,
- onSliderMarkerDown,
- setFirstValue,
- setSecondValue
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/composables/use-stops.mjs
- var useStops = (props, initData, minValue, maxValue) => {
- const stops = computed(() => {
- if (!props.showStops || props.min > props.max) return [];
- if (props.step === 0) {
- debugWarn("ElSlider", "step should not be 0.");
- return [];
- }
- const stopCount = Math.ceil((props.max - props.min) / props.step);
- const stepWidth = 100 * props.step / (props.max - props.min);
- const result = Array.from({ length: stopCount - 1 }).map((_, index) => (index + 1) * stepWidth);
- if (props.range) return result.filter((step) => {
- return step < 100 * (minValue.value - props.min) / (props.max - props.min) || step > 100 * (maxValue.value - props.min) / (props.max - props.min);
- });
- else return result.filter((step) => step > 100 * (initData.firstValue - props.min) / (props.max - props.min));
- });
- const getStopStyle = (position) => {
- return props.vertical ? { bottom: `${position}%` } : { left: `${position}%` };
- };
- return {
- stops,
- getStopStyle
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/composables/use-watch.mjs
- var useWatch = (props, initData, minValue, maxValue, emit, elFormItem) => {
- const _emit = (val) => {
- emit(UPDATE_MODEL_EVENT, val);
- emit(INPUT_EVENT, val);
- };
- const valueChanged = () => {
- if (props.range) return ![minValue.value, maxValue.value].every((item, index) => item === initData.oldValue[index]);
- else return props.modelValue !== initData.oldValue;
- };
- const setValues = () => {
- if (props.min > props.max) throwError("Slider", "min should not be greater than max.");
- const val = props.modelValue;
- if (props.range && isArray$1(val)) if (val[1] < props.min) _emit([props.min, props.min]);
- else if (val[0] > props.max) _emit([props.max, props.max]);
- else if (val[0] < props.min) _emit([props.min, val[1]]);
- else if (val[1] > props.max) _emit([val[0], props.max]);
- else {
- initData.firstValue = val[0];
- initData.secondValue = val[1];
- if (valueChanged()) {
- if (props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
- initData.oldValue = val.slice();
- }
- }
- else if (!props.range && isNumber(val) && !Number.isNaN(val)) if (val < props.min) _emit(props.min);
- else if (val > props.max) _emit(props.max);
- else {
- initData.firstValue = val;
- if (valueChanged()) {
- if (props.validateEvent) elFormItem?.validate?.("change").catch((err) => debugWarn(err));
- initData.oldValue = val;
- }
- }
- };
- setValues();
- watch(() => initData.dragging, (val) => {
- if (!val) setValues();
- });
- watch(() => props.modelValue, (val, oldVal) => {
- if (initData.dragging || isArray$1(val) && isArray$1(oldVal) && val.every((item, index) => item === oldVal[index]) && initData.firstValue === val[0] && initData.secondValue === val[1]) return;
- setValues();
- }, { deep: true });
- watch(() => [props.min, props.max], () => {
- setValues();
- });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/composables/use-slider-button.mjs
- var useTooltip = (props, formatTooltip, showTooltip) => {
- const tooltip = ref();
- const tooltipVisible = ref(false);
- const enableFormat = computed(() => {
- return formatTooltip.value instanceof Function;
- });
- return {
- tooltip,
- tooltipVisible,
- formatValue: computed(() => {
- return enableFormat.value && formatTooltip.value(props.modelValue) || props.modelValue;
- }),
- displayTooltip: debounce(() => {
- showTooltip.value && (tooltipVisible.value = true);
- }, 50),
- hideTooltip: debounce(() => {
- showTooltip.value && (tooltipVisible.value = false);
- }, 50)
- };
- };
- var useSliderButton = (props, initData, emit) => {
- const { disabled, min, max, step, showTooltip, persistent, precision, sliderSize, formatTooltip, emitChange, resetSize, updateDragging } = inject(sliderContextKey);
- const { tooltip, tooltipVisible, formatValue, displayTooltip, hideTooltip } = useTooltip(props, formatTooltip, showTooltip);
- const button = ref();
- const currentPosition = computed(() => {
- return `${(props.modelValue - min.value) / (max.value - min.value) * 100}%`;
- });
- const wrapperStyle = computed(() => {
- return props.vertical ? { bottom: currentPosition.value } : { left: currentPosition.value };
- });
- const handleMouseEnter = () => {
- initData.hovering = true;
- displayTooltip();
- };
- const handleMouseLeave = () => {
- initData.hovering = false;
- if (!initData.dragging) hideTooltip();
- };
- const onButtonDown = (event) => {
- if (disabled.value) return;
- event.preventDefault();
- onDragStart(event);
- window.addEventListener("mousemove", onDragging);
- window.addEventListener("touchmove", onDragging);
- window.addEventListener("mouseup", onDragEnd);
- window.addEventListener("touchend", onDragEnd);
- window.addEventListener("contextmenu", onDragEnd);
- button.value.focus();
- };
- const incrementPosition = (amount) => {
- if (disabled.value) return;
- initData.newPosition = Number.parseFloat(currentPosition.value) + amount / (max.value - min.value) * 100;
- setPosition(initData.newPosition);
- emitChange();
- };
- const onLeftKeyDown = () => {
- incrementPosition(-step.value);
- };
- const onRightKeyDown = () => {
- incrementPosition(step.value);
- };
- const onPageDownKeyDown = () => {
- incrementPosition(-step.value * 4);
- };
- const onPageUpKeyDown = () => {
- incrementPosition(step.value * 4);
- };
- const onHomeKeyDown = () => {
- if (disabled.value) return;
- setPosition(0);
- emitChange();
- };
- const onEndKeyDown = () => {
- if (disabled.value) return;
- setPosition(100);
- emitChange();
- };
- const onKeyDown = (event) => {
- const code = getEventCode(event);
- let isPreventDefault = true;
- switch (code) {
- case EVENT_CODE.left:
- case EVENT_CODE.down:
- onLeftKeyDown();
- break;
- case EVENT_CODE.right:
- case EVENT_CODE.up:
- onRightKeyDown();
- break;
- case EVENT_CODE.home:
- onHomeKeyDown();
- break;
- case EVENT_CODE.end:
- onEndKeyDown();
- break;
- case EVENT_CODE.pageDown:
- onPageDownKeyDown();
- break;
- case EVENT_CODE.pageUp:
- onPageUpKeyDown();
- break;
- default:
- isPreventDefault = false;
- break;
- }
- isPreventDefault && event.preventDefault();
- };
- const getClientXY = (event) => {
- let clientX;
- let clientY;
- if (event.type.startsWith("touch")) {
- clientY = event.touches[0].clientY;
- clientX = event.touches[0].clientX;
- } else {
- clientY = event.clientY;
- clientX = event.clientX;
- }
- return {
- clientX,
- clientY
- };
- };
- const onDragStart = (event) => {
- initData.dragging = true;
- initData.isClick = true;
- const { clientX, clientY } = getClientXY(event);
- if (props.vertical) initData.startY = clientY;
- else initData.startX = clientX;
- initData.startPosition = Number.parseFloat(currentPosition.value);
- initData.newPosition = initData.startPosition;
- };
- const onDragging = (event) => {
- if (initData.dragging) {
- initData.isClick = false;
- displayTooltip();
- resetSize();
- let diff;
- const { clientX, clientY } = getClientXY(event);
- if (props.vertical) {
- initData.currentY = clientY;
- diff = (initData.startY - initData.currentY) / sliderSize.value * 100;
- } else {
- initData.currentX = clientX;
- diff = (initData.currentX - initData.startX) / sliderSize.value * 100;
- }
- initData.newPosition = initData.startPosition + diff;
- setPosition(initData.newPosition);
- }
- };
- const onDragEnd = () => {
- if (initData.dragging) {
- setTimeout(() => {
- initData.dragging = false;
- if (!initData.hovering) hideTooltip();
- if (!initData.isClick) setPosition(initData.newPosition);
- emitChange();
- }, 0);
- window.removeEventListener("mousemove", onDragging);
- window.removeEventListener("touchmove", onDragging);
- window.removeEventListener("mouseup", onDragEnd);
- window.removeEventListener("touchend", onDragEnd);
- window.removeEventListener("contextmenu", onDragEnd);
- }
- };
- const setPosition = async (newPosition) => {
- if (newPosition === null || Number.isNaN(+newPosition)) return;
- newPosition = clamp$2(newPosition, 0, 100);
- const fullSteps = Math.floor((max.value - min.value) / step.value);
- const fullRangePercentage = fullSteps * step.value / (max.value - min.value) * 100;
- const threshold = fullRangePercentage + (100 - fullRangePercentage) / 2;
- let value;
- if (newPosition < fullRangePercentage) {
- const valueBetween = fullRangePercentage / fullSteps;
- const steps = Math.round(newPosition / valueBetween);
- value = min.value + steps * step.value;
- } else if (newPosition < threshold) value = min.value + fullSteps * step.value;
- else value = max.value;
- value = Number.parseFloat(value.toFixed(precision.value));
- if (value !== props.modelValue) emit(UPDATE_MODEL_EVENT, value);
- if (!initData.dragging && props.modelValue !== initData.oldValue) initData.oldValue = props.modelValue;
- await nextTick();
- initData.dragging && displayTooltip();
- tooltip.value.updatePopper();
- };
- watch(() => initData.dragging, (val) => {
- updateDragging(val);
- });
- useEventListener(button, "touchstart", onButtonDown, { passive: false });
- return {
- disabled,
- button,
- tooltip,
- tooltipVisible,
- showTooltip,
- persistent,
- wrapperStyle,
- formatValue,
- handleMouseEnter,
- handleMouseLeave,
- onButtonDown,
- onKeyDown,
- setPosition
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/button.mjs
- var sliderButtonProps = buildProps({
- modelValue: {
- type: Number,
- default: 0
- },
- vertical: Boolean,
- tooltipClass: String,
- placement: {
- type: String,
- values: Ee,
- default: "top"
- }
- });
- var sliderButtonEmits = { [UPDATE_MODEL_EVENT]: (value) => isNumber(value) };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/button.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$20 = ["tabindex"];
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/button2.mjs
- var button_default = /* @__PURE__ */ defineComponent({
- name: "ElSliderButton",
- __name: "button",
- props: sliderButtonProps,
- emits: sliderButtonEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("slider");
- const initData = reactive({
- hovering: false,
- dragging: false,
- isClick: false,
- startX: 0,
- currentX: 0,
- startY: 0,
- currentY: 0,
- startPosition: 0,
- newPosition: 0,
- oldValue: props.modelValue
- });
- const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
- const { disabled, button, tooltip, showTooltip, persistent, tooltipVisible, wrapperStyle, formatValue, handleMouseEnter, handleMouseLeave, onButtonDown, onKeyDown, setPosition } = useSliderButton(props, initData, emit);
- const { hovering, dragging } = toRefs(initData);
- __expose({
- onButtonDown,
- onKeyDown,
- setPosition,
- hovering,
- dragging
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "button",
- ref: button,
- class: normalizeClass([unref(ns).e("button-wrapper"), {
- hover: unref(hovering),
- dragging: unref(dragging)
- }]),
- style: normalizeStyle(unref(wrapperStyle)),
- tabindex: unref(disabled) ? void 0 : 0,
- onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
- onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
- onMousedown: _cache[2] || (_cache[2] = (...args) => unref(onButtonDown) && unref(onButtonDown)(...args)),
- onFocus: _cache[3] || (_cache[3] = (...args) => unref(handleMouseEnter) && unref(handleMouseEnter)(...args)),
- onBlur: _cache[4] || (_cache[4] = (...args) => unref(handleMouseLeave) && unref(handleMouseLeave)(...args)),
- onKeydown: _cache[5] || (_cache[5] = (...args) => unref(onKeyDown) && unref(onKeyDown)(...args))
- }, [createVNode(unref(ElTooltip), {
- ref_key: "tooltip",
- ref: tooltip,
- visible: unref(tooltipVisible),
- placement: _ctx.placement,
- "fallback-placements": [
- "top",
- "bottom",
- "right",
- "left"
- ],
- "stop-popper-mouse-event": false,
- "popper-class": _ctx.tooltipClass,
- disabled: !unref(showTooltip),
- persistent: tooltipPersistent.value
- }, {
- content: withCtx(() => [createBaseVNode("span", null, toDisplayString(unref(formatValue)), 1)]),
- default: withCtx(() => [createBaseVNode("div", { class: normalizeClass([unref(ns).e("button"), {
- hover: unref(hovering),
- dragging: unref(dragging)
- }]) }, null, 2)]),
- _: 1
- }, 8, [
- "visible",
- "placement",
- "popper-class",
- "disabled",
- "persistent"
- ])], 46, _hoisted_1$20);
- };
- }
- });
- var marker_default = defineComponent({
- name: "ElSliderMarker",
- props: buildProps({ mark: {
- type: definePropType([String, Object]),
- default: void 0
- } }),
- setup(props) {
- const ns = useNamespace("slider");
- const label = computed(() => {
- return isString(props.mark) ? props.mark : props.mark.label;
- });
- const style = computed(() => isString(props.mark) ? void 0 : props.mark.style);
- return () => h$1("div", {
- class: ns.e("marks-text"),
- style: style.value
- }, label.value);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/slider/src/slider.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$19 = [
- "id",
- "role",
- "aria-label",
- "aria-labelledby"
- ];
- var _hoisted_2$12 = { key: 1 };
- //#endregion
- //#region node_modules/element-plus/es/components/slider/index.mjs
- var ElSlider = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElSlider",
- __name: "slider",
- props: sliderProps,
- emits: sliderEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("slider");
- const { t } = useLocale();
- const initData = reactive({
- firstValue: 0,
- secondValue: 0,
- oldValue: 0,
- dragging: false,
- sliderSize: 1
- });
- const { elFormItem, slider, firstButton, secondButton, sliderDisabled, minValue, maxValue, runwayStyle, barStyle, resetSize, emitChange, onSliderWrapperPrevent, onSliderClick, onSliderDown, onSliderMarkerDown, setFirstValue, setSecondValue } = useSlide(props, initData, emit);
- const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue);
- const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: elFormItem });
- const sliderWrapperSize = useFormSize();
- const sliderInputSize = computed(() => props.inputSize || sliderWrapperSize.value);
- const groupLabel = computed(() => {
- return props.ariaLabel || t("el.slider.defaultLabel", {
- min: props.min,
- max: props.max
- });
- });
- const firstButtonLabel = computed(() => {
- if (props.range) return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel");
- else return groupLabel.value;
- });
- const firstValueText = computed(() => {
- return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`;
- });
- const secondButtonLabel = computed(() => {
- return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel");
- });
- const secondValueText = computed(() => {
- return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`;
- });
- const sliderKls = computed(() => [
- ns.b(),
- ns.m(sliderWrapperSize.value),
- ns.is("vertical", props.vertical),
- { [ns.m("with-input")]: props.showInput }
- ]);
- const markList = useMarks(props);
- useWatch(props, initData, minValue, maxValue, emit, elFormItem);
- const precision = computed(() => {
- const precisions = [
- props.min,
- props.max,
- props.step
- ].map((item) => {
- const decimal = `${item}`.split(".")[1];
- return decimal ? decimal.length : 0;
- });
- return Math.max.apply(null, precisions);
- });
- const { sliderWrapper } = useLifecycle(props, initData, resetSize);
- const { firstValue, secondValue, sliderSize } = toRefs(initData);
- const updateDragging = (val) => {
- initData.dragging = val;
- };
- useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, { passive: false });
- useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, { passive: false });
- provide(sliderContextKey, {
- ...toRefs(props),
- sliderSize,
- disabled: sliderDisabled,
- precision,
- emitChange,
- resetSize,
- updateDragging
- });
- __expose({ onSliderClick });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- id: _ctx.range ? unref(inputId) : void 0,
- ref_key: "sliderWrapper",
- ref: sliderWrapper,
- class: normalizeClass(sliderKls.value),
- role: _ctx.range ? "group" : void 0,
- "aria-label": _ctx.range && !unref(isLabeledByFormItem) ? groupLabel.value : void 0,
- "aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? unref(elFormItem)?.labelId : void 0
- }, [createBaseVNode("div", {
- ref_key: "slider",
- ref: slider,
- class: normalizeClass([
- unref(ns).e("runway"),
- { "show-input": _ctx.showInput && !_ctx.range },
- unref(ns).is("disabled", unref(sliderDisabled))
- ]),
- style: normalizeStyle(unref(runwayStyle)),
- onMousedown: _cache[0] || (_cache[0] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args)),
- onTouchstartPassive: _cache[1] || (_cache[1] = (...args) => unref(onSliderDown) && unref(onSliderDown)(...args))
- }, [
- createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("bar")),
- style: normalizeStyle(unref(barStyle))
- }, null, 6),
- createVNode(button_default, {
- id: !_ctx.range ? unref(inputId) : void 0,
- ref_key: "firstButton",
- ref: firstButton,
- "model-value": unref(firstValue),
- vertical: _ctx.vertical,
- "tooltip-class": _ctx.tooltipClass,
- placement: _ctx.placement,
- role: "slider",
- "aria-label": _ctx.range || !unref(isLabeledByFormItem) ? firstButtonLabel.value : void 0,
- "aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? unref(elFormItem)?.labelId : void 0,
- "aria-valuemin": _ctx.min,
- "aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max,
- "aria-valuenow": unref(firstValue),
- "aria-valuetext": firstValueText.value,
- "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
- "aria-disabled": unref(sliderDisabled),
- "onUpdate:modelValue": unref(setFirstValue)
- }, null, 8, [
- "id",
- "model-value",
- "vertical",
- "tooltip-class",
- "placement",
- "aria-label",
- "aria-labelledby",
- "aria-valuemin",
- "aria-valuemax",
- "aria-valuenow",
- "aria-valuetext",
- "aria-orientation",
- "aria-disabled",
- "onUpdate:modelValue"
- ]),
- _ctx.range ? (openBlock(), createBlock(button_default, {
- key: 0,
- ref_key: "secondButton",
- ref: secondButton,
- "model-value": unref(secondValue),
- vertical: _ctx.vertical,
- "tooltip-class": _ctx.tooltipClass,
- placement: _ctx.placement,
- role: "slider",
- "aria-label": secondButtonLabel.value,
- "aria-valuemin": unref(firstValue),
- "aria-valuemax": _ctx.max,
- "aria-valuenow": unref(secondValue),
- "aria-valuetext": secondValueText.value,
- "aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
- "aria-disabled": unref(sliderDisabled),
- "onUpdate:modelValue": unref(setSecondValue)
- }, null, 8, [
- "model-value",
- "vertical",
- "tooltip-class",
- "placement",
- "aria-label",
- "aria-valuemin",
- "aria-valuemax",
- "aria-valuenow",
- "aria-valuetext",
- "aria-orientation",
- "aria-disabled",
- "onUpdate:modelValue"
- ])) : createCommentVNode("v-if", true),
- _ctx.showStops ? (openBlock(), createElementBlock("div", _hoisted_2$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => {
- return openBlock(), createElementBlock("div", {
- key,
- class: normalizeClass(unref(ns).e("stop")),
- style: normalizeStyle(unref(getStopStyle)(item))
- }, null, 6);
- }), 128))])) : createCommentVNode("v-if", true),
- unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createBaseVNode("div", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
- return openBlock(), createElementBlock("div", {
- key,
- style: normalizeStyle(unref(getStopStyle)(item.position)),
- class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")])
- }, null, 6);
- }), 128))]), createBaseVNode("div", { class: normalizeClass(unref(ns).e("marks")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
- return openBlock(), createBlock(unref(marker_default), {
- key,
- mark: item.mark,
- style: normalizeStyle(unref(getStopStyle)(item.position)),
- onMousedown: withModifiers(($event) => unref(onSliderMarkerDown)(item.position), ["stop"])
- }, null, 8, [
- "mark",
- "style",
- "onMousedown"
- ]);
- }), 128))], 2)], 64)) : createCommentVNode("v-if", true)
- ], 38), _ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), {
- key: 0,
- ref: "input",
- "model-value": unref(firstValue),
- class: normalizeClass(unref(ns).e("input")),
- step: _ctx.step,
- disabled: unref(sliderDisabled),
- controls: _ctx.showInputControls,
- min: _ctx.min,
- max: _ctx.max,
- precision: precision.value,
- size: sliderInputSize.value,
- "onUpdate:modelValue": unref(setFirstValue),
- onChange: unref(emitChange)
- }, null, 8, [
- "model-value",
- "class",
- "step",
- "disabled",
- "controls",
- "min",
- "max",
- "precision",
- "size",
- "onUpdate:modelValue",
- "onChange"
- ])) : createCommentVNode("v-if", true)], 10, _hoisted_1$19);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/space/src/item.mjs
- var spaceItemProps = buildProps({ prefixCls: { type: String } });
- var SpaceItem = defineComponent({
- name: "ElSpaceItem",
- props: spaceItemProps,
- setup(props, { slots }) {
- const ns = useNamespace("space");
- const classes = computed(() => `${props.prefixCls || ns.b()}__item`);
- return () => h$1("div", { class: classes.value }, renderSlot(slots, "default"));
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/space/src/use-space.mjs
- var SIZE_MAP = {
- small: 8,
- default: 12,
- large: 16
- };
- function useSpace(props) {
- const ns = useNamespace("space");
- const classes = computed(() => [
- ns.b(),
- ns.m(props.direction),
- props.class
- ]);
- const horizontalSize = ref(0);
- const verticalSize = ref(0);
- const containerStyle = computed(() => {
- return [
- props.wrap || props.fill ? { flexWrap: "wrap" } : {},
- { alignItems: props.alignment },
- {
- rowGap: `${verticalSize.value}px`,
- columnGap: `${horizontalSize.value}px`
- },
- props.style
- ];
- });
- const itemStyle = computed(() => {
- return props.fill ? {
- flexGrow: 1,
- minWidth: `${props.fillRatio}%`
- } : {};
- });
- watchEffect(() => {
- const { size = "small", wrap, direction: dir, fill } = props;
- if (isArray$1(size)) {
- const [h = 0, v = 0] = size;
- horizontalSize.value = h;
- verticalSize.value = v;
- } else {
- let val;
- if (isNumber(size)) val = size;
- else val = SIZE_MAP[size || "small"] || SIZE_MAP.small;
- if ((wrap || fill) && dir === "horizontal") horizontalSize.value = verticalSize.value = val;
- else if (dir === "horizontal") {
- horizontalSize.value = val;
- verticalSize.value = 0;
- } else {
- verticalSize.value = val;
- horizontalSize.value = 0;
- }
- }
- });
- return {
- classes,
- containerStyle,
- itemStyle
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/space/src/space.mjs
- var spaceProps = buildProps({
- direction: {
- type: String,
- values: ["horizontal", "vertical"],
- default: "horizontal"
- },
- class: {
- type: definePropType([
- String,
- Object,
- Array
- ]),
- default: ""
- },
- style: {
- type: definePropType([
- String,
- Array,
- Object
- ]),
- default: ""
- },
- alignment: {
- type: definePropType(String),
- default: "center"
- },
- prefixCls: { type: String },
- spacer: {
- type: definePropType([
- Object,
- String,
- Number,
- Array
- ]),
- default: null,
- validator: (val) => isVNode(val) || isNumber(val) || isString(val)
- },
- wrap: Boolean,
- fill: Boolean,
- fillRatio: {
- type: Number,
- default: 100
- },
- size: {
- type: [
- String,
- Array,
- Number
- ],
- values: componentSizes,
- validator: (val) => {
- return isNumber(val) || isArray$1(val) && val.length === 2 && val.every(isNumber);
- }
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/space/index.mjs
- var ElSpace = withInstall(defineComponent({
- name: "ElSpace",
- props: spaceProps,
- setup(props, { slots }) {
- const { classes, containerStyle, itemStyle } = useSpace(props);
- function extractChildren(children, parentKey = "", extractedChildren = []) {
- const { prefixCls } = props;
- children.forEach((child, loopKey) => {
- if (isFragment(child)) {
- if (isArray$1(child.children)) child.children.forEach((nested, key) => {
- if (isFragment(nested) && isArray$1(nested.children)) extractChildren(nested.children, `${parentKey + key}-`, extractedChildren);
- else if (isVNode(nested) && nested?.type === Comment) extractedChildren.push(nested);
- else extractedChildren.push(createVNode(SpaceItem, {
- style: itemStyle.value,
- prefixCls,
- key: `nested-${parentKey + key}`
- }, { default: () => [nested] }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
- });
- } else if (isValidElementNode(child)) extractedChildren.push(createVNode(SpaceItem, {
- style: itemStyle.value,
- prefixCls,
- key: `LoopKey${parentKey + loopKey}`
- }, { default: () => [child] }, PatchFlags.PROPS | PatchFlags.STYLE, ["style", "prefixCls"]));
- });
- return extractedChildren;
- }
- return () => {
- const { spacer, direction } = props;
- const children = renderSlot(slots, "default", { key: 0 }, () => []);
- if ((children.children ?? []).length === 0) return null;
- if (isArray$1(children.children)) {
- let extractedChildren = extractChildren(children.children);
- if (spacer) {
- const len = extractedChildren.length - 1;
- extractedChildren = extractedChildren.reduce((acc, child, idx) => {
- const children = [...acc, child];
- if (idx !== len) children.push(createVNode("span", {
- style: [itemStyle.value, direction === "vertical" ? "width: 100%" : null],
- key: idx
- }, [isVNode(spacer) ? spacer : createTextVNode(spacer, PatchFlags.TEXT)], PatchFlags.STYLE));
- return children;
- }, []);
- }
- return createVNode("div", {
- class: classes.value,
- style: containerStyle.value
- }, extractedChildren, PatchFlags.STYLE | PatchFlags.CLASS);
- }
- return children.children;
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/steps/src/steps.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `StepsProps` instead.
- */
- var stepsProps = buildProps({
- space: {
- type: [Number, String],
- default: ""
- },
- active: {
- type: Number,
- default: 0
- },
- direction: {
- type: String,
- default: "horizontal",
- values: ["horizontal", "vertical"]
- },
- alignCenter: { type: Boolean },
- simple: { type: Boolean },
- finishStatus: {
- type: String,
- values: [
- "wait",
- "process",
- "finish",
- "error",
- "success"
- ],
- default: "finish"
- },
- processStatus: {
- type: String,
- values: [
- "wait",
- "process",
- "finish",
- "error",
- "success"
- ],
- default: "process"
- }
- });
- var stepsEmits = { [CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber) };
- //#endregion
- //#region node_modules/element-plus/es/components/steps/src/tokens.mjs
- var STEPS_INJECTION_KEY = "ElSteps";
- //#endregion
- //#region node_modules/element-plus/es/components/steps/src/item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `StepProps` instead.
- */
- var stepProps = buildProps({
- title: {
- type: String,
- default: ""
- },
- icon: { type: iconPropType },
- description: {
- type: String,
- default: ""
- },
- status: {
- type: String,
- values: [
- "",
- "wait",
- "process",
- "finish",
- "error",
- "success"
- ],
- default: ""
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/steps/src/steps2.mjs
- var steps_default$1 = /* @__PURE__ */ defineComponent({
- name: "ElSteps",
- __name: "steps",
- props: stepsProps,
- emits: stepsEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("steps");
- const { children: steps, addChild: addStep, removeChild: removeStep, ChildrenSorter: StepsSorter } = useOrderedChildren(getCurrentInstance(), "ElStep");
- watch(steps, () => {
- steps.value.forEach((instance, index) => {
- instance.setIndex(index);
- });
- });
- provide(STEPS_INJECTION_KEY, {
- props,
- steps,
- addStep,
- removeStep
- });
- watch(() => props.active, (newVal, oldVal) => {
- emit(CHANGE_EVENT, newVal, oldVal);
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass([unref(ns).b(), unref(ns).m(__props.simple ? "simple" : __props.direction)]) }, [renderSlot(_ctx.$slots, "default"), createVNode(unref(StepsSorter))], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/steps/src/item2.mjs
- var item_default = /* @__PURE__ */ defineComponent({
- name: "ElStep",
- __name: "item",
- props: stepProps,
- setup(__props) {
- const props = __props;
- const ns = useNamespace("step");
- const index = ref(-1);
- const lineStyle = ref({});
- const internalStatus = ref("");
- const parent = inject(STEPS_INJECTION_KEY);
- const currentInstance = getCurrentInstance();
- let stepDiff = 0;
- let beforeActive = 0;
- onMounted(() => {
- watch([
- () => parent.props.active,
- () => parent.props.processStatus,
- () => parent.props.finishStatus
- ], ([active], [oldActive]) => {
- beforeActive = oldActive || 0;
- stepDiff = active - beforeActive;
- updateStatus(active);
- }, { immediate: true });
- });
- const currentStatus = computed(() => {
- return props.status || internalStatus.value;
- });
- const prevInternalStatus = computed(() => {
- const prevStep = parent.steps.value[index.value - 1];
- return prevStep ? prevStep.internalStatus.value : "wait";
- });
- const isCenter = computed(() => {
- return parent.props.alignCenter;
- });
- const isVertical = computed(() => {
- return parent.props.direction === "vertical";
- });
- const isSimple = computed(() => {
- return parent.props.simple;
- });
- const stepsCount = computed(() => {
- return parent.steps.value.length;
- });
- const isLast = computed(() => {
- return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance.uid;
- });
- const space = computed(() => {
- return isSimple.value ? "" : parent.props.space;
- });
- const containerKls = computed(() => {
- return [
- ns.b(),
- ns.is(isSimple.value ? "simple" : parent.props.direction),
- ns.is("flex", isLast.value && !space.value && !isCenter.value),
- ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
- ];
- });
- const style = computed(() => {
- const style = { flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%` };
- if (isVertical.value) return style;
- if (isLast.value) style.maxWidth = `${100 / stepsCount.value}%`;
- return style;
- });
- const setIndex = (val) => {
- index.value = val;
- };
- const calcProgress = (status) => {
- const isWait = status === "wait";
- const style = { transitionDelay: `${Math.abs(stepDiff) === 1 ? 0 : stepDiff > 0 ? (index.value + 1 - beforeActive) * 150 : -(index.value + 1 - parent.props.active) * 150}ms` };
- const step = status === parent.props.processStatus || isWait ? 0 : 100;
- style.borderWidth = step && !isSimple.value ? "1px" : 0;
- style[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
- lineStyle.value = style;
- };
- const updateStatus = (activeIndex) => {
- if (activeIndex > index.value) internalStatus.value = parent.props.finishStatus;
- else if (activeIndex === index.value && prevInternalStatus.value !== "error") internalStatus.value = parent.props.processStatus;
- else internalStatus.value = "wait";
- const prevChild = parent.steps.value[index.value - 1];
- if (prevChild) prevChild.calcProgress(internalStatus.value);
- };
- const stepItemState = {
- uid: currentInstance.uid,
- getVnode: () => currentInstance.vnode,
- currentStatus,
- internalStatus,
- setIndex,
- calcProgress
- };
- parent.addStep(stepItemState);
- onBeforeUnmount(() => {
- parent.removeStep(stepItemState);
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- style: normalizeStyle(style.value),
- class: normalizeClass(containerKls.value)
- }, [
- createCommentVNode(" icon & line "),
- createBaseVNode("div", { class: normalizeClass([unref(ns).e("head"), unref(ns).is(currentStatus.value)]) }, [!isSimple.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("line"))
- }, [createBaseVNode("i", {
- class: normalizeClass(unref(ns).e("line-inner")),
- style: normalizeStyle(lineStyle.value)
- }, null, 6)], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass([unref(ns).e("icon"), unref(ns).is(__props.icon || _ctx.$slots.icon ? "icon" : "text")]) }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(ns).e("icon-inner"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- }, 8, ["class"])) : currentStatus.value === "success" ? (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
- }, {
- default: withCtx(() => [createVNode(unref(check_default))]),
- _: 1
- }, 8, ["class"])) : currentStatus.value === "error" ? (openBlock(), createBlock(unref(ElIcon), {
- key: 2,
- class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
- }, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- }, 8, ["class"])) : !isSimple.value ? (openBlock(), createElementBlock("div", {
- key: 3,
- class: normalizeClass(unref(ns).e("icon-inner"))
- }, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)])], 2)], 2),
- createCommentVNode(" title & description "),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("main")) }, [createBaseVNode("div", { class: normalizeClass([unref(ns).e("title"), unref(ns).is(currentStatus.value)]) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2), isSimple.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("arrow"))
- }, null, 2)) : (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([unref(ns).e("description"), unref(ns).is(currentStatus.value)])
- }, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 2))], 2)
- ], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/steps/index.mjs
- var ElSteps = withInstall(steps_default$1, { Step: item_default });
- var ElStep = withNoopInstall(item_default);
- //#endregion
- //#region node_modules/element-plus/es/utils/vue/validator.mjs
- var isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
- //#endregion
- //#region node_modules/element-plus/es/components/switch/src/switch.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `SwitchProps` instead.
- */
- var switchProps = buildProps({
- modelValue: {
- type: [
- Boolean,
- String,
- Number
- ],
- default: false
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- loading: Boolean,
- size: {
- type: String,
- validator: isValidComponentSize
- },
- width: {
- type: [String, Number],
- default: ""
- },
- inlinePrompt: Boolean,
- inactiveActionIcon: { type: iconPropType },
- activeActionIcon: { type: iconPropType },
- activeIcon: { type: iconPropType },
- inactiveIcon: { type: iconPropType },
- activeText: {
- type: String,
- default: ""
- },
- inactiveText: {
- type: String,
- default: ""
- },
- activeValue: {
- type: [
- Boolean,
- String,
- Number
- ],
- default: true
- },
- inactiveValue: {
- type: [
- Boolean,
- String,
- Number
- ],
- default: false
- },
- name: {
- type: String,
- default: ""
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- beforeChange: { type: definePropType(Function) },
- id: String,
- tabindex: { type: [String, Number] },
- ...useAriaProps(["ariaLabel"])
- });
- var switchEmits = {
- [UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
- [CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
- [INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/switch/src/switch.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$18 = [
- "id",
- "aria-checked",
- "aria-disabled",
- "aria-label",
- "name",
- "true-value",
- "false-value",
- "disabled",
- "tabindex"
- ];
- var _hoisted_2$11 = ["aria-hidden"];
- var _hoisted_3$4 = { key: 1 };
- var _hoisted_4$3 = { key: 1 };
- var _hoisted_5$1 = ["aria-hidden"];
- var COMPONENT_NAME$6 = "ElSwitch";
- //#endregion
- //#region node_modules/element-plus/es/components/switch/index.mjs
- var ElSwitch = withInstall(/* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$6,
- __name: "switch",
- props: switchProps,
- emits: switchEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { formItem } = useFormItem();
- const switchSize = useFormSize();
- const ns = useNamespace("switch");
- const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
- const switchDisabled = useFormDisabled(computed(() => {
- if (props.loading) return true;
- }));
- const isControlled = ref(props.modelValue !== false);
- const input = shallowRef();
- const switchKls = computed(() => [
- ns.b(),
- ns.m(switchSize.value),
- ns.is("disabled", switchDisabled.value),
- ns.is("checked", checked.value)
- ]);
- const labelLeftKls = computed(() => [
- ns.e("label"),
- ns.em("label", "left"),
- ns.is("active", !checked.value)
- ]);
- const labelRightKls = computed(() => [
- ns.e("label"),
- ns.em("label", "right"),
- ns.is("active", checked.value)
- ]);
- const coreStyle = computed(() => ({ width: addUnit(props.width) }));
- watch(() => props.modelValue, () => {
- isControlled.value = true;
- });
- const actualValue = computed(() => {
- return isControlled.value ? props.modelValue : false;
- });
- const checked = computed(() => actualValue.value === props.activeValue);
- if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
- emit(UPDATE_MODEL_EVENT, props.inactiveValue);
- emit(CHANGE_EVENT, props.inactiveValue);
- emit(INPUT_EVENT, props.inactiveValue);
- }
- watch(checked, (val) => {
- input.value.checked = val;
- if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
- });
- const handleChange = () => {
- const val = checked.value ? props.inactiveValue : props.activeValue;
- emit(UPDATE_MODEL_EVENT, val);
- emit(CHANGE_EVENT, val);
- emit(INPUT_EVENT, val);
- nextTick(() => {
- input.value.checked = checked.value;
- });
- };
- const switchValue = () => {
- if (switchDisabled.value) return;
- const { beforeChange } = props;
- if (!beforeChange) {
- handleChange();
- return;
- }
- const shouldChange = beforeChange();
- if (![isPromise(shouldChange), isBoolean(shouldChange)].includes(true)) throwError(COMPONENT_NAME$6, "beforeChange must return type `Promise<boolean>` or `boolean`");
- if (isPromise(shouldChange)) shouldChange.then((result) => {
- if (result) handleChange();
- }).catch((e) => {
- debugWarn(COMPONENT_NAME$6, `some error occurred: ${e}`);
- });
- else if (shouldChange) handleChange();
- };
- const focus = () => {
- input.value?.focus?.();
- };
- onMounted(() => {
- input.value.checked = checked.value;
- });
- __expose({
- focus,
- checked
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(switchKls.value),
- onClick: withModifiers(switchValue, ["prevent"])
- }, [
- createBaseVNode("input", {
- id: unref(inputId),
- ref_key: "input",
- ref: input,
- class: normalizeClass(unref(ns).e("input")),
- type: "checkbox",
- role: "switch",
- "aria-checked": checked.value,
- "aria-disabled": unref(switchDisabled),
- "aria-label": __props.ariaLabel,
- name: __props.name,
- "true-value": __props.activeValue,
- "false-value": __props.inactiveValue,
- disabled: unref(switchDisabled),
- tabindex: __props.tabindex,
- onChange: handleChange,
- onKeydown: withKeys(switchValue, ["enter"])
- }, null, 42, _hoisted_1$18),
- !__props.inlinePrompt && (__props.inactiveIcon || __props.inactiveText || _ctx.$slots.inactive) ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(labelLeftKls.value)
- }, [renderSlot(_ctx.$slots, "inactive", {}, () => [__props.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveIcon)))]),
- _: 1
- })) : createCommentVNode("v-if", true), !__props.inactiveIcon && __props.inactiveText ? (openBlock(), createElementBlock("span", {
- key: 1,
- "aria-hidden": checked.value
- }, toDisplayString(__props.inactiveText), 9, _hoisted_2$11)) : createCommentVNode("v-if", true)])], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("span", {
- class: normalizeClass(unref(ns).e("core")),
- style: normalizeStyle(coreStyle.value)
- }, [__props.inlinePrompt ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("inner"))
- }, [!checked.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("inner-wrapper"))
- }, [renderSlot(_ctx.$slots, "inactive", {}, () => [__props.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveIcon)))]),
- _: 1
- })) : createCommentVNode("v-if", true), !__props.inactiveIcon && __props.inactiveText ? (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(__props.inactiveText), 1)) : createCommentVNode("v-if", true)])], 2)) : (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("inner-wrapper"))
- }, [renderSlot(_ctx.$slots, "active", {}, () => [__props.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeIcon)))]),
- _: 1
- })) : createCommentVNode("v-if", true), !__props.activeIcon && __props.activeText ? (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(__props.activeText), 1)) : createCommentVNode("v-if", true)])], 2))], 2)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("action")) }, [__props.loading ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(ns).is("loading"))
- }, {
- default: withCtx(() => [createVNode(unref(loading_default))]),
- _: 1
- }, 8, ["class"])) : checked.value ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [__props.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeActionIcon)))]),
- _: 1
- })) : createCommentVNode("v-if", true)]) : !checked.value ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [__props.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.inactiveActionIcon)))]),
- _: 1
- })) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true)], 2)], 6),
- !__props.inlinePrompt && (__props.activeIcon || __props.activeText || _ctx.$slots.active) ? (openBlock(), createElementBlock("span", {
- key: 1,
- class: normalizeClass(labelRightKls.value)
- }, [renderSlot(_ctx.$slots, "active", {}, () => [__props.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.activeIcon)))]),
- _: 1
- })) : createCommentVNode("v-if", true), !__props.activeIcon && __props.activeText ? (openBlock(), createElementBlock("span", {
- key: 1,
- "aria-hidden": !checked.value
- }, toDisplayString(__props.activeText), 9, _hoisted_5$1)) : createCommentVNode("v-if", true)])], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/util.mjs
- var getCell = function(event) {
- return event.target?.closest("td");
- };
- var orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
- if (!sortKey && !sortMethod && (!sortBy || isArray$1(sortBy) && !sortBy.length)) return array;
- if (isString(reverse)) reverse = reverse === "descending" ? -1 : 1;
- else reverse = reverse && reverse < 0 ? -1 : 1;
- const getKey = sortMethod ? null : function(value, index) {
- if (sortBy) return flatMap(castArray$1(sortBy), (by) => {
- if (isString(by)) return get(value, by);
- else return by(value, index, array);
- });
- if (sortKey !== "$key") {
- if (isObject$2(value) && "$value" in value) value = value.$value;
- }
- return [isObject$2(value) ? sortKey ? get(value, sortKey) : null : value];
- };
- const compare = function(a, b) {
- if (sortMethod) return sortMethod(a.value, b.value);
- for (let i = 0, len = a.key?.length ?? 0; i < len; i++) {
- if (a.key?.[i] < b.key?.[i]) return -1;
- if (a.key?.[i] > b.key?.[i]) return 1;
- }
- return 0;
- };
- return array.map((value, index) => {
- return {
- value,
- index,
- key: getKey ? getKey(value, index) : null
- };
- }).sort((a, b) => {
- let order = compare(a, b);
- if (!order) order = a.index - b.index;
- return order * +reverse;
- }).map((item) => item.value);
- };
- var getColumnById = function(table, columnId) {
- let column = null;
- table.columns.forEach((item) => {
- if (item.id === columnId) column = item;
- });
- return column;
- };
- var getColumnByKey = function(table, columnKey) {
- let column = null;
- for (let i = 0; i < table.columns.length; i++) {
- const item = table.columns[i];
- if (item.columnKey === columnKey) {
- column = item;
- break;
- }
- }
- if (!column) throwError("ElTable", `No column matching with column-key: ${columnKey}`);
- return column;
- };
- var getColumnByCell = function(table, cell, namespace) {
- const matches = (cell.className || "").match(new RegExp(`${namespace}-table_[^\\s]+`, "gm"));
- if (matches) return getColumnById(table, matches[0]);
- return null;
- };
- var getRowIdentity = (row, rowKey) => {
- if (!row) throw new Error("Row is required when get row identity");
- if (isString(rowKey)) {
- if (!rowKey.includes(".")) return `${row[rowKey]}`;
- const key = rowKey.split(".");
- let current = row;
- for (const element of key) current = current[element];
- return `${current}`;
- } else if (isFunction$1(rowKey)) return rowKey.call(null, row);
- return "";
- };
- var getKeysMap = function(array, rowKey, flatten = false, childrenKey = "children") {
- const data = array || [];
- const arrayMap = {};
- data.forEach((row, index) => {
- arrayMap[getRowIdentity(row, rowKey)] = {
- row,
- index
- };
- if (flatten) {
- const children = row[childrenKey];
- if (isArray$1(children)) Object.assign(arrayMap, getKeysMap(children, rowKey, true, childrenKey));
- }
- });
- return arrayMap;
- };
- function mergeOptions(defaults, config) {
- const options = {};
- let key;
- for (key in defaults) options[key] = defaults[key];
- for (key in config) if (hasOwn(config, key)) {
- const value = config[key];
- if (!isUndefined(value)) options[key] = value;
- }
- return options;
- }
- function parseWidth(width) {
- if (width === "") return width;
- if (!isUndefined(width)) {
- width = Number.parseInt(width, 10);
- if (Number.isNaN(width)) width = "";
- }
- return width;
- }
- function parseMinWidth(minWidth) {
- if (minWidth === "") return minWidth;
- if (!isUndefined(minWidth)) {
- minWidth = parseWidth(minWidth);
- if (Number.isNaN(minWidth)) minWidth = 80;
- }
- return minWidth;
- }
- function parseHeight(height) {
- if (isNumber(height)) return height;
- if (isString(height)) if (/^\d+(?:px)?$/.test(height)) return Number.parseInt(height, 10);
- else return height;
- return null;
- }
- function compose(...funcs) {
- if (funcs.length === 0) return (arg) => arg;
- if (funcs.length === 1) return funcs[0];
- return funcs.reduce((a, b) => (...args) => a(b(...args)));
- }
- function toggleRowStatus(statusArr, row, newVal, tableTreeProps, selectable, rowIndex, rowKey) {
- let _rowIndex = rowIndex ?? 0;
- let changed = false;
- const getIndex = () => {
- if (!rowKey) return statusArr.indexOf(row);
- const id = getRowIdentity(row, rowKey);
- return statusArr.findIndex((item) => getRowIdentity(item, rowKey) === id);
- };
- const index = getIndex();
- const included = index !== -1;
- const isRowSelectable = selectable?.call(null, row, _rowIndex);
- const toggleStatus = (type) => {
- if (type === "add") statusArr.push(row);
- else statusArr.splice(index, 1);
- changed = true;
- };
- const getChildrenCount = (row) => {
- let count = 0;
- const children = tableTreeProps?.children && row[tableTreeProps.children];
- if (children && isArray$1(children)) {
- count += children.length;
- children.forEach((item) => {
- count += getChildrenCount(item);
- });
- }
- return count;
- };
- if (!selectable || isRowSelectable) if (isBoolean(newVal)) {
- if (newVal && !included) toggleStatus("add");
- else if (!newVal && included) toggleStatus("remove");
- } else included ? toggleStatus("remove") : toggleStatus("add");
- if (!tableTreeProps?.checkStrictly && tableTreeProps?.children && isArray$1(row[tableTreeProps.children])) row[tableTreeProps.children].forEach((item) => {
- const childChanged = toggleRowStatus(statusArr, item, newVal ?? !included, tableTreeProps, selectable, _rowIndex + 1, rowKey);
- _rowIndex += getChildrenCount(item) + 1;
- if (childChanged) changed = childChanged;
- });
- return changed;
- }
- function walkTreeNode(root, cb, childrenKey = "children", lazyKey = "hasChildren", lazy = false) {
- const isNil = (array) => !(isArray$1(array) && array.length);
- function _walker(parent, children, level) {
- cb(parent, children, level);
- children.forEach((item) => {
- if (item[lazyKey] && lazy) {
- cb(item, null, level + 1);
- return;
- }
- const children = item[childrenKey];
- if (!isNil(children)) _walker(item, children, level + 1);
- });
- }
- root.forEach((item) => {
- if (item[lazyKey] && lazy) {
- cb(item, null, 0);
- return;
- }
- const children = item[childrenKey];
- if (!isNil(children)) _walker(item, children, 0);
- });
- }
- var getTableOverflowTooltipProps = (props, innerText, row, column) => {
- const popperOptions = {
- strategy: "fixed",
- ...props.popperOptions
- };
- const tooltipFormatterContent = isFunction$1(column?.tooltipFormatter) ? column.tooltipFormatter({
- row,
- column,
- cellValue: getProp(row, column.property).value
- }) : void 0;
- if (isVNode(tooltipFormatterContent)) return {
- slotContent: tooltipFormatterContent,
- content: null,
- ...props,
- popperOptions
- };
- return {
- slotContent: null,
- content: tooltipFormatterContent ?? innerText,
- ...props,
- popperOptions
- };
- };
- var removePopper = null;
- function createTablePopper(props, popperContent, row, column, trigger, table) {
- const tableOverflowTooltipProps = getTableOverflowTooltipProps(props, popperContent, row, column);
- const mergedProps = {
- ...tableOverflowTooltipProps,
- slotContent: void 0
- };
- if (removePopper?.trigger === trigger) {
- const comp = removePopper.vm?.component;
- merge(comp?.props, mergedProps);
- if (comp && tableOverflowTooltipProps.slotContent) comp.slots.content = () => [tableOverflowTooltipProps.slotContent];
- return;
- }
- removePopper?.();
- const parentNode = table?.refs.tableWrapper;
- const ns = parentNode?.dataset.prefix;
- const vm = createVNode(ElTooltip, {
- virtualTriggering: true,
- virtualRef: trigger,
- appendTo: parentNode,
- placement: "top",
- transition: "none",
- offset: 0,
- hideAfter: 0,
- ...mergedProps
- }, tableOverflowTooltipProps.slotContent ? { content: () => tableOverflowTooltipProps.slotContent } : void 0);
- vm.appContext = {
- ...table.appContext,
- ...table
- };
- const container = document.createElement("div");
- render(vm, container);
- vm.component.exposed.onOpen();
- const scrollContainer = parentNode?.querySelector(`.${ns}-scrollbar__wrap`);
- removePopper = () => {
- if (vm.component?.exposed?.onClose) vm.component.exposed.onClose();
- render(null, container);
- const currentRemovePopper = removePopper;
- scrollContainer?.removeEventListener("scroll", currentRemovePopper);
- currentRemovePopper.trigger = void 0;
- currentRemovePopper.vm = void 0;
- removePopper = null;
- };
- removePopper.trigger = trigger ?? void 0;
- removePopper.vm = vm;
- scrollContainer?.addEventListener("scroll", removePopper);
- }
- function getCurrentColumns(column) {
- if (column.children) return flatMap(column.children, getCurrentColumns);
- else return [column];
- }
- function getColSpan(colSpan, column) {
- return colSpan + column.colSpan;
- }
- var isFixedColumn = (index, fixed, store, realColumns) => {
- let start = 0;
- let after = index;
- const columns = store.states.columns.value;
- if (realColumns) {
- const curColumns = getCurrentColumns(realColumns[index]);
- start = columns.slice(0, columns.indexOf(curColumns[0])).reduce(getColSpan, 0);
- after = start + curColumns.reduce(getColSpan, 0) - 1;
- } else start = index;
- let fixedLayout;
- switch (fixed) {
- case "left":
- if (after < store.states.fixedLeafColumnsLength.value) fixedLayout = "left";
- break;
- case "right":
- if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) fixedLayout = "right";
- break;
- default: if (after < store.states.fixedLeafColumnsLength.value) fixedLayout = "left";
- else if (start >= columns.length - store.states.rightFixedLeafColumnsLength.value) fixedLayout = "right";
- }
- return fixedLayout ? {
- direction: fixedLayout,
- start,
- after
- } : {};
- };
- var getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offset = 0) => {
- const classes = [];
- const { direction, start, after } = isFixedColumn(index, fixed, store, realColumns);
- if (direction) {
- const isLeft = direction === "left";
- classes.push(`${namespace}-fixed-column--${direction}`);
- if (isLeft && after + offset === store.states.fixedLeafColumnsLength.value - 1) classes.push("is-last-column");
- else if (!isLeft && start - offset === store.states.columns.value.length - store.states.rightFixedLeafColumnsLength.value) classes.push("is-first-column");
- }
- return classes;
- };
- function getOffset(offset, column) {
- return offset + (isNull(column.realWidth) || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
- }
- var getFixedColumnOffset = (index, fixed, store, realColumns) => {
- const { direction, start = 0, after = 0 } = isFixedColumn(index, fixed, store, realColumns);
- if (!direction) return;
- const styles = {};
- const isLeft = direction === "left";
- const columns = store.states.columns.value;
- if (isLeft) styles.left = columns.slice(0, start).reduce(getOffset, 0);
- else styles.right = columns.slice(after + 1).reverse().reduce(getOffset, 0);
- return styles;
- };
- var ensurePosition = (style, key) => {
- if (!style) return;
- if (!Number.isNaN(style[key])) style[key] = `${style[key]}px`;
- };
- function ensureValidVNode(vnodes) {
- return vnodes.some((child) => {
- if (!isVNode(child)) return true;
- if (child.type === Comment) return false;
- if (child.type === Fragment && !ensureValidVNode(child.children)) return false;
- return true;
- }) ? vnodes : null;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/store/expand.mjs
- function useExpand(watcherData) {
- const instance = getCurrentInstance();
- const defaultExpandAll = ref(false);
- const expandRows = ref([]);
- const canRowExpand = (row, index) => {
- const expandableFn = instance.store.states.rowExpandable.value;
- return expandableFn?.(row, index) ?? true;
- };
- const updateExpandRows = () => {
- const data = watcherData.data.value || [];
- const rowKey = watcherData.rowKey.value;
- if (defaultExpandAll.value) expandRows.value = instance.store.states.rowExpandable.value ? data.filter(canRowExpand) : data.slice();
- else if (rowKey) {
- const expandRowsMap = getKeysMap(expandRows.value, rowKey);
- expandRows.value = data.filter((row, index) => {
- return !!expandRowsMap[getRowIdentity(row, rowKey)] && canRowExpand(row, index);
- });
- } else expandRows.value = [];
- };
- const toggleRowExpansion = (row, expanded) => {
- const rowIndex = (watcherData.data.value || []).indexOf(row);
- if (rowIndex > -1 && !canRowExpand(row, rowIndex)) return;
- if (toggleRowStatus(expandRows.value, row, expanded, void 0, void 0, void 0, watcherData.rowKey.value)) instance.emit("expand-change", row, expandRows.value.slice());
- };
- const setExpandRowKeys = (rowKeys) => {
- instance.store.assertRowKey();
- const data = watcherData.data.value || [];
- const rowKey = watcherData.rowKey.value;
- const keysMap = getKeysMap(data, rowKey);
- expandRows.value = rowKeys.reduce((prev, cur) => {
- const info = keysMap[cur];
- if (info && canRowExpand(info.row, info.index)) prev.push(info.row);
- return prev;
- }, []);
- };
- const isRowExpanded = (row) => {
- const rowKey = watcherData.rowKey.value;
- if (rowKey) return !!getKeysMap(expandRows.value, rowKey)[getRowIdentity(row, rowKey)];
- return expandRows.value.includes(row);
- };
- return {
- updateExpandRows,
- toggleRowExpansion,
- setExpandRowKeys,
- isRowExpanded,
- states: {
- expandRows,
- defaultExpandAll
- }
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/store/current.mjs
- function useCurrent(watcherData) {
- const instance = getCurrentInstance();
- const _currentRowKey = ref(null);
- const currentRow = ref(null);
- const setCurrentRowKey = (key) => {
- instance.store.assertRowKey();
- _currentRowKey.value = key;
- setCurrentRowByKey(key);
- };
- const restoreCurrentRowKey = () => {
- _currentRowKey.value = null;
- };
- const setCurrentRowByKey = (key) => {
- const { data, rowKey } = watcherData;
- const oldCurrentRow = currentRow.value;
- let _currentRow = null;
- if (rowKey.value) _currentRow = (unref(data) || []).find((item) => getRowIdentity(item, rowKey.value) === key) ?? null;
- currentRow.value = _currentRow ?? null;
- instance.emit("current-change", currentRow.value, oldCurrentRow);
- };
- const updateCurrentRow = (_currentRow) => {
- const oldCurrentRow = currentRow.value;
- if (_currentRow && _currentRow !== oldCurrentRow) {
- currentRow.value = _currentRow;
- instance.emit("current-change", currentRow.value, oldCurrentRow);
- return;
- }
- if (!_currentRow && oldCurrentRow) {
- currentRow.value = null;
- instance.emit("current-change", null, oldCurrentRow);
- }
- };
- const updateCurrentRowData = () => {
- const rowKey = watcherData.rowKey.value;
- const data = watcherData.data.value || [];
- const oldCurrentRow = currentRow.value;
- if (oldCurrentRow && !data.includes(oldCurrentRow)) if (rowKey) setCurrentRowByKey(getRowIdentity(oldCurrentRow, rowKey));
- else {
- currentRow.value = null;
- instance.emit("current-change", null, oldCurrentRow);
- }
- else if (_currentRowKey.value) {
- setCurrentRowByKey(_currentRowKey.value);
- restoreCurrentRowKey();
- }
- };
- return {
- setCurrentRowKey,
- restoreCurrentRowKey,
- setCurrentRowByKey,
- updateCurrentRow,
- updateCurrentRowData,
- states: {
- _currentRowKey,
- currentRow
- }
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/store/tree.mjs
- function useTree$2(watcherData) {
- const expandRowKeys = ref([]);
- const treeData = ref({});
- const indent = ref(16);
- const lazy = ref(false);
- const lazyTreeNodeMap = ref({});
- const lazyColumnIdentifier = ref("hasChildren");
- const childrenColumnName = ref("children");
- const checkStrictly = ref(false);
- const instance = getCurrentInstance();
- const normalizedData = computed(() => {
- if (!watcherData.rowKey.value) return {};
- return normalize(watcherData.data.value || []);
- });
- const normalizedLazyNode = computed(() => {
- const rowKey = watcherData.rowKey.value;
- const keys = Object.keys(lazyTreeNodeMap.value);
- const res = {};
- if (!keys.length) return res;
- keys.forEach((key) => {
- if (lazyTreeNodeMap.value[key].length) {
- const item = { children: [] };
- lazyTreeNodeMap.value[key].forEach((row) => {
- const currentRowKey = getRowIdentity(row, rowKey);
- item.children.push(currentRowKey);
- if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) res[currentRowKey] = { children: [] };
- });
- res[key] = item;
- }
- });
- return res;
- });
- const normalize = (data) => {
- const rowKey = watcherData.rowKey.value;
- const res = {};
- walkTreeNode(data, (parent, children, level) => {
- const parentId = getRowIdentity(parent, rowKey);
- if (isArray$1(children)) res[parentId] = {
- children: children.map((row) => getRowIdentity(row, rowKey)),
- level
- };
- else if (lazy.value) res[parentId] = {
- children: [],
- lazy: true,
- level
- };
- }, childrenColumnName.value, lazyColumnIdentifier.value, lazy.value);
- return res;
- };
- const updateTreeData = (ifChangeExpandRowKeys = false, ifExpandAll) => {
- ifExpandAll ||= instance.store?.states.defaultExpandAll.value;
- const nested = normalizedData.value;
- const normalizedLazyNode_ = normalizedLazyNode.value;
- const keys = Object.keys(nested);
- const newTreeData = {};
- if (keys.length) {
- const oldTreeData = unref(treeData);
- const rootLazyRowKeys = [];
- const getExpanded = (oldValue, key) => {
- if (ifChangeExpandRowKeys) if (expandRowKeys.value) return ifExpandAll || expandRowKeys.value.includes(key);
- else return !!(ifExpandAll || oldValue?.expanded);
- else {
- const included = ifExpandAll || expandRowKeys.value && expandRowKeys.value.includes(key);
- return !!(oldValue?.expanded || included);
- }
- };
- keys.forEach((key) => {
- const oldValue = oldTreeData[key];
- const newValue = { ...nested[key] };
- newValue.expanded = getExpanded(oldValue, key);
- if (newValue.lazy) {
- const { loaded = false, loading = false } = oldValue || {};
- newValue.loaded = !!loaded;
- newValue.loading = !!loading;
- rootLazyRowKeys.push(key);
- }
- newTreeData[key] = newValue;
- });
- const lazyKeys = Object.keys(normalizedLazyNode_);
- if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) lazyKeys.forEach((key) => {
- const oldValue = oldTreeData[key];
- const lazyNodeChildren = normalizedLazyNode_[key].children;
- if (rootLazyRowKeys.includes(key)) {
- if (newTreeData[key].children?.length !== 0) throw new Error("[ElTable]children must be an empty array.");
- newTreeData[key].children = lazyNodeChildren;
- } else {
- const { loaded = false, loading = false } = oldValue || {};
- newTreeData[key] = {
- lazy: true,
- loaded: !!loaded,
- loading: !!loading,
- expanded: getExpanded(oldValue, key),
- children: lazyNodeChildren,
- level: void 0
- };
- }
- });
- }
- treeData.value = newTreeData;
- instance.store?.updateTableScrollY();
- };
- watch(() => expandRowKeys.value, () => {
- updateTreeData(true);
- });
- watch(() => normalizedData.value, () => {
- updateTreeData();
- });
- watch(() => normalizedLazyNode.value, () => {
- updateTreeData();
- });
- const updateTreeExpandKeys = (value) => {
- expandRowKeys.value = value;
- updateTreeData();
- };
- const isUseLazy = (data) => {
- return lazy.value && data && "loaded" in data && !data.loaded;
- };
- const toggleTreeExpansion = (row, expanded) => {
- instance.store.assertRowKey();
- const rowKey = watcherData.rowKey.value;
- const id = getRowIdentity(row, rowKey);
- const data = id && treeData.value[id];
- if (id && data && "expanded" in data) {
- const oldExpanded = data.expanded;
- expanded = isUndefined(expanded) ? !data.expanded : expanded;
- treeData.value[id].expanded = expanded;
- if (oldExpanded !== expanded) instance.emit("expand-change", row, expanded);
- expanded && isUseLazy(data) && loadData(row, id, data);
- instance.store.updateTableScrollY();
- }
- };
- const loadOrToggle = (row) => {
- instance.store.assertRowKey();
- const rowKey = watcherData.rowKey.value;
- const id = getRowIdentity(row, rowKey);
- const data = treeData.value[id];
- if (isUseLazy(data)) loadData(row, id, data);
- else toggleTreeExpansion(row, void 0);
- };
- const loadData = (row, key, treeNode) => {
- const { load } = instance.props;
- if (load && !treeData.value[key].loaded) {
- treeData.value[key].loading = true;
- load(row, treeNode, (data) => {
- if (!isArray$1(data)) throw new TypeError("[ElTable] data must be an array");
- treeData.value[key].loading = false;
- treeData.value[key].loaded = true;
- treeData.value[key].expanded = true;
- if (data.length) lazyTreeNodeMap.value[key] = data;
- instance.emit("expand-change", row, true);
- });
- }
- };
- const updateKeyChildren = (key, data) => {
- const { lazy, rowKey } = instance.props;
- if (!lazy) return;
- if (!rowKey) throw new Error("[Table] rowKey is required in updateKeyChild");
- if (lazyTreeNodeMap.value[key]) lazyTreeNodeMap.value[key] = data;
- };
- return {
- loadData,
- loadOrToggle,
- toggleTreeExpansion,
- updateTreeExpandKeys,
- updateTreeData,
- updateKeyChildren,
- normalize,
- states: {
- expandRowKeys,
- treeData,
- indent,
- lazy,
- lazyTreeNodeMap,
- lazyColumnIdentifier,
- childrenColumnName,
- checkStrictly
- }
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/store/watcher.mjs
- var sortData = (data, states) => {
- const sortingColumn = states.sortingColumn;
- if (!sortingColumn || isString(sortingColumn.sortable)) return data;
- return orderBy(data, states.sortProp, states.sortOrder, sortingColumn.sortMethod, sortingColumn.sortBy);
- };
- var doFlattenColumns = (columns) => {
- const result = [];
- columns.forEach((column) => {
- if (column.children && column.children.length > 0) result.push.apply(result, doFlattenColumns(column.children));
- else result.push(column);
- });
- return result;
- };
- function useWatcher$1() {
- const instance = getCurrentInstance();
- const { size: tableSize } = toRefs(instance.proxy?.$props);
- const rowKey = ref(null);
- const data = ref([]);
- const _data = ref([]);
- const isComplex = ref(false);
- const _columns = ref([]);
- const originColumns = ref([]);
- const columns = ref([]);
- const fixedColumns = ref([]);
- const rightFixedColumns = ref([]);
- const leafColumns = ref([]);
- const fixedLeafColumns = ref([]);
- const rightFixedLeafColumns = ref([]);
- const updateOrderFns = [];
- const leafColumnsLength = ref(0);
- const fixedLeafColumnsLength = ref(0);
- const rightFixedLeafColumnsLength = ref(0);
- const isAllSelected = ref(false);
- const selection = ref([]);
- const reserveSelection = ref(false);
- const selectOnIndeterminate = ref(false);
- const selectable = ref(null);
- const rowExpandable = ref(null);
- const filters = ref({});
- const filteredData = ref(null);
- const sortingColumn = ref(null);
- const sortProp = ref(null);
- const sortOrder = ref(null);
- const hoverRow = ref(null);
- const selectedMap = computed(() => {
- return rowKey.value ? getKeysMap(selection.value, rowKey.value) : void 0;
- });
- watch(data, () => {
- if (instance.state) {
- scheduleLayout(false);
- if (instance.props.tableLayout === "auto") instance.refs.tableHeaderRef?.updateFixedColumnStyle();
- }
- }, { deep: true });
- const assertRowKey = () => {
- if (!rowKey.value) throw new Error("[ElTable] prop row-key is required");
- };
- const updateChildFixed = (column) => {
- column.children?.forEach((childColumn) => {
- childColumn.fixed = column.fixed;
- updateChildFixed(childColumn);
- });
- };
- const updateColumns = () => {
- _columns.value.forEach((column) => {
- updateChildFixed(column);
- });
- fixedColumns.value = _columns.value.filter((column) => [true, "left"].includes(column.fixed));
- const selectColumn = _columns.value.find((column) => column.type === "selection");
- let selectColFixLeft;
- if (selectColumn && selectColumn.fixed !== "right" && !fixedColumns.value.includes(selectColumn)) {
- if (_columns.value.indexOf(selectColumn) === 0 && fixedColumns.value.length) {
- fixedColumns.value.unshift(selectColumn);
- selectColFixLeft = true;
- }
- }
- rightFixedColumns.value = _columns.value.filter((column) => column.fixed === "right");
- const notFixedColumns = _columns.value.filter((column) => (selectColFixLeft ? column.type !== "selection" : true) && !column.fixed);
- originColumns.value = Array.from(fixedColumns.value).concat(notFixedColumns).concat(rightFixedColumns.value);
- const leafColumns = doFlattenColumns(notFixedColumns);
- const fixedLeafColumns = doFlattenColumns(fixedColumns.value);
- const rightFixedLeafColumns = doFlattenColumns(rightFixedColumns.value);
- leafColumnsLength.value = leafColumns.length;
- fixedLeafColumnsLength.value = fixedLeafColumns.length;
- rightFixedLeafColumnsLength.value = rightFixedLeafColumns.length;
- columns.value = Array.from(fixedLeafColumns).concat(leafColumns).concat(rightFixedLeafColumns);
- isComplex.value = fixedColumns.value.length > 0 || rightFixedColumns.value.length > 0;
- };
- const scheduleLayout = (needUpdateColumns, immediate = false) => {
- if (needUpdateColumns) updateColumns();
- if (immediate) instance.state.doLayout();
- else instance.state.debouncedUpdateLayout();
- };
- const isSelected = (row) => {
- if (selectedMap.value) return !!selectedMap.value[getRowIdentity(row, rowKey.value)];
- else return selection.value.includes(row);
- };
- const clearSelection = () => {
- isAllSelected.value = false;
- const oldSelection = selection.value;
- selection.value = [];
- if (oldSelection.length) instance.emit("selection-change", []);
- };
- const cleanSelection = () => {
- let deleted;
- if (rowKey.value) {
- deleted = [];
- const childrenKey = instance?.store?.states?.childrenColumnName.value;
- const dataMap = getKeysMap(data.value, rowKey.value, true, childrenKey);
- for (const key in selectedMap.value) if (hasOwn(selectedMap.value, key) && !dataMap[key]) deleted.push(selectedMap.value[key].row);
- } else deleted = selection.value.filter((item) => !data.value.includes(item));
- if (deleted.length) {
- const newSelection = selection.value.filter((item) => !deleted.includes(item));
- selection.value = newSelection;
- instance.emit("selection-change", newSelection.slice());
- }
- };
- const getSelectionRows = () => {
- return (selection.value || []).slice();
- };
- const toggleRowSelection = (row, selected, emitChange = true, ignoreSelectable = false) => {
- const treeProps = {
- children: instance?.store?.states?.childrenColumnName.value,
- checkStrictly: instance?.store?.states?.checkStrictly.value
- };
- if (toggleRowStatus(selection.value, row, selected, treeProps, ignoreSelectable ? void 0 : selectable.value, data.value.indexOf(row), rowKey.value)) {
- const newSelection = (selection.value || []).slice();
- if (emitChange) instance.emit("select", newSelection, row);
- instance.emit("selection-change", newSelection);
- }
- };
- const _toggleAllSelection = () => {
- const value = selectOnIndeterminate.value ? !isAllSelected.value : !(isAllSelected.value || selection.value.length);
- isAllSelected.value = value;
- let selectionChanged = false;
- let childrenCount = 0;
- const rowKey = instance?.store?.states?.rowKey.value;
- const { childrenColumnName } = instance.store.states;
- const treeProps = {
- children: childrenColumnName.value,
- checkStrictly: false
- };
- data.value.forEach((row, index) => {
- const rowIndex = index + childrenCount;
- if (toggleRowStatus(selection.value, row, value, treeProps, selectable.value, rowIndex, rowKey)) selectionChanged = true;
- childrenCount += getChildrenCount(getRowIdentity(row, rowKey));
- });
- if (selectionChanged) instance.emit("selection-change", selection.value ? selection.value.slice() : []);
- instance.emit("select-all", (selection.value || []).slice());
- };
- const updateAllSelected = () => {
- if (data.value?.length === 0) {
- isAllSelected.value = false;
- return;
- }
- const { childrenColumnName } = instance.store.states;
- let rowIndex = 0;
- let selectedCount = 0;
- const checkSelectedStatus = (data) => {
- for (const row of data) {
- const isRowSelectable = selectable.value && selectable.value.call(null, row, rowIndex);
- if (!isSelected(row)) {
- if (!selectable.value || isRowSelectable) return false;
- } else selectedCount++;
- rowIndex++;
- if (row[childrenColumnName.value]?.length && !checkSelectedStatus(row[childrenColumnName.value])) return false;
- }
- return true;
- };
- const isAllSelected_ = checkSelectedStatus(data.value || []);
- isAllSelected.value = selectedCount === 0 ? false : isAllSelected_;
- };
- const getChildrenCount = (rowKey) => {
- if (!instance || !instance.store) return 0;
- const { treeData } = instance.store.states;
- let count = 0;
- const children = treeData.value[rowKey]?.children;
- if (children) {
- count += children.length;
- children.forEach((childKey) => {
- count += getChildrenCount(childKey);
- });
- }
- return count;
- };
- const updateFilters = (column, values) => {
- const filters_ = {};
- castArray$1(column).forEach((col) => {
- filters.value[col.id] = values;
- filters_[col.columnKey || col.id] = values;
- });
- return filters_;
- };
- const updateSort = (column, prop, order) => {
- if (sortingColumn.value && sortingColumn.value !== column) sortingColumn.value.order = null;
- sortingColumn.value = column;
- sortProp.value = prop;
- sortOrder.value = order;
- };
- const execFilter = () => {
- let sourceData = unref(_data);
- Object.keys(filters.value).forEach((columnId) => {
- const values = filters.value[columnId];
- if (!values || values.length === 0) return;
- const column = getColumnById({ columns: columns.value }, columnId);
- if (column && column.filterMethod) sourceData = sourceData.filter((row) => {
- return values.some((value) => column.filterMethod.call(null, value, row, column));
- });
- });
- filteredData.value = sourceData;
- };
- const execSort = () => {
- data.value = sortData(filteredData.value ?? [], {
- sortingColumn: sortingColumn.value,
- sortProp: sortProp.value,
- sortOrder: sortOrder.value
- });
- };
- const execQuery = (ignore = void 0) => {
- if (!ignore?.filter) execFilter();
- execSort();
- };
- const clearFilter = (columnKeys) => {
- const { tableHeaderRef } = instance.refs;
- if (!tableHeaderRef) return;
- const panels = Object.assign({}, tableHeaderRef.filterPanels);
- const keys = Object.keys(panels);
- if (!keys.length) return;
- if (isString(columnKeys)) columnKeys = [columnKeys];
- if (isArray$1(columnKeys)) {
- const columns_ = columnKeys.map((key) => getColumnByKey({ columns: columns.value }, key));
- keys.forEach((key) => {
- const column = columns_.find((col) => col.id === key);
- if (column) column.filteredValue = [];
- });
- instance.store.commit("filterChange", {
- column: columns_,
- values: [],
- silent: true,
- multi: true
- });
- } else {
- keys.forEach((key) => {
- const column = columns.value.find((col) => col.id === key);
- if (column) column.filteredValue = [];
- });
- filters.value = {};
- instance.store.commit("filterChange", {
- column: {},
- values: [],
- silent: true
- });
- }
- };
- const clearSort = () => {
- if (!sortingColumn.value) return;
- updateSort(null, null, null);
- instance.store.commit("changeSortCondition", { silent: true });
- };
- const { setExpandRowKeys, toggleRowExpansion, updateExpandRows, states: expandStates, isRowExpanded } = useExpand({
- data,
- rowKey
- });
- const { updateTreeExpandKeys, toggleTreeExpansion, updateTreeData, updateKeyChildren, loadOrToggle, states: treeStates } = useTree$2({
- data,
- rowKey
- });
- const { updateCurrentRowData, updateCurrentRow, setCurrentRowKey, states: currentData } = useCurrent({
- data,
- rowKey
- });
- const setExpandRowKeysAdapter = (val) => {
- setExpandRowKeys(val);
- updateTreeExpandKeys(val);
- };
- const toggleRowExpansionAdapter = (row, expanded) => {
- if (columns.value.some(({ type }) => type === "expand")) toggleRowExpansion(row, expanded);
- else toggleTreeExpansion(row, expanded);
- };
- return {
- assertRowKey,
- updateColumns,
- scheduleLayout,
- isSelected,
- clearSelection,
- cleanSelection,
- getSelectionRows,
- toggleRowSelection,
- _toggleAllSelection,
- toggleAllSelection: null,
- updateAllSelected,
- updateFilters,
- updateCurrentRow,
- updateSort,
- execFilter,
- execSort,
- execQuery,
- clearFilter,
- clearSort,
- toggleRowExpansion,
- setExpandRowKeysAdapter,
- setCurrentRowKey,
- toggleRowExpansionAdapter,
- isRowExpanded,
- updateExpandRows,
- updateCurrentRowData,
- loadOrToggle,
- updateTreeData,
- updateKeyChildren,
- states: {
- tableSize,
- rowKey,
- data,
- _data,
- isComplex,
- _columns,
- originColumns,
- columns,
- fixedColumns,
- rightFixedColumns,
- leafColumns,
- fixedLeafColumns,
- rightFixedLeafColumns,
- updateOrderFns,
- leafColumnsLength,
- fixedLeafColumnsLength,
- rightFixedLeafColumnsLength,
- isAllSelected,
- selection,
- reserveSelection,
- selectOnIndeterminate,
- selectable,
- rowExpandable,
- filters,
- filteredData,
- sortingColumn,
- sortProp,
- sortOrder,
- hoverRow,
- ...expandStates,
- ...treeStates,
- ...currentData
- }
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/store/index.mjs
- function replaceColumn(array, column) {
- return array.map((item) => {
- if (item.id === column.id) return column;
- else if (item.children?.length) item.children = replaceColumn(item.children, column);
- return item;
- });
- }
- function sortColumn(array) {
- array.forEach((item) => {
- item.no = item.getColumnIndex?.();
- if (item.children?.length) sortColumn(item.children);
- });
- array.sort((cur, pre) => cur.no - pre.no);
- }
- function useStore() {
- const instance = getCurrentInstance();
- const watcher = useWatcher$1();
- const ns = useNamespace("table");
- const { t } = useLocale();
- const mutations = {
- setData(states, data) {
- const dataInstanceChanged = unref(states._data) !== data;
- states.data.value = data;
- states._data.value = data;
- instance.store.execQuery();
- instance.store.updateCurrentRowData();
- instance.store.updateExpandRows();
- instance.store.updateTreeData(instance.store.states.defaultExpandAll.value);
- if (unref(states.reserveSelection)) instance.store.assertRowKey();
- else if (dataInstanceChanged) instance.store.clearSelection();
- else instance.store.cleanSelection();
- instance.store.updateAllSelected();
- if (instance.$ready) instance.store.scheduleLayout();
- },
- insertColumn(states, column, parent, updateColumnOrder) {
- const array = unref(states._columns);
- let newColumns = [];
- if (!parent) {
- array.push(column);
- newColumns = array;
- } else {
- if (parent && !parent.children) parent.children = [];
- parent.children?.push(column);
- newColumns = replaceColumn(array, parent);
- }
- sortColumn(newColumns);
- states._columns.value = newColumns;
- states.updateOrderFns.push(updateColumnOrder);
- if (column.type === "selection") {
- states.selectable.value = column.selectable;
- states.reserveSelection.value = column.reserveSelection;
- }
- if (instance.$ready) {
- instance.store.updateColumns();
- instance.store.scheduleLayout();
- }
- },
- updateColumnOrder(states, column) {
- if (column.getColumnIndex?.() === column.no) return;
- sortColumn(states._columns.value);
- if (instance.$ready) instance.store.updateColumns();
- },
- removeColumn(states, column, parent, updateColumnOrder) {
- const array = unref(states._columns) || [];
- if (parent) {
- parent.children?.splice(parent.children.findIndex((item) => item.id === column.id), 1);
- nextTick(() => {
- if (parent.children?.length === 0) delete parent.children;
- });
- states._columns.value = replaceColumn(array, parent);
- } else {
- const index = array.indexOf(column);
- if (index > -1) {
- array.splice(index, 1);
- states._columns.value = array;
- }
- }
- const updateFnIndex = states.updateOrderFns.indexOf(updateColumnOrder);
- updateFnIndex > -1 && states.updateOrderFns.splice(updateFnIndex, 1);
- if (instance.$ready) {
- instance.store.updateColumns();
- instance.store.scheduleLayout();
- }
- },
- sort(states, options) {
- const { prop, order, init } = options;
- if (prop) {
- const column = unref(states.columns).find((column) => column.property === prop);
- if (column) {
- column.order = order;
- instance.store.updateSort(column, prop, order);
- instance.store.commit("changeSortCondition", { init });
- }
- }
- },
- changeSortCondition(states, options) {
- const { sortingColumn, sortProp, sortOrder } = states;
- const columnValue = unref(sortingColumn), propValue = unref(sortProp), orderValue = unref(sortOrder);
- if (isNull(orderValue)) {
- states.sortingColumn.value = null;
- states.sortProp.value = null;
- }
- instance.store.execQuery({ filter: true });
- if (!options || !(options.silent || options.init)) instance.emit("sort-change", {
- column: columnValue,
- prop: propValue,
- order: orderValue
- });
- instance.store.updateTableScrollY();
- },
- filterChange(_states, options) {
- const { column, values, silent } = options;
- const newFilters = instance.store.updateFilters(column, values);
- instance.store.execQuery();
- if (!silent) instance.emit("filter-change", newFilters);
- instance.store.updateTableScrollY();
- },
- toggleAllSelection() {
- instance.store.toggleAllSelection?.();
- },
- rowSelectedChanged(_states, row) {
- instance.store.toggleRowSelection(row);
- instance.store.updateAllSelected();
- },
- setHoverRow(states, row) {
- states.hoverRow.value = row;
- },
- setCurrentRow(_states, row) {
- instance.store.updateCurrentRow(row);
- }
- };
- const commit = function(name, ...args) {
- const mutations = instance.store.mutations;
- if (mutations[name]) mutations[name].apply(instance, [instance.store.states, ...args]);
- else throw new Error(`Action not found: ${name}`);
- };
- const updateTableScrollY = function() {
- nextTick(() => instance.layout.updateScrollY.apply(instance.layout));
- };
- return {
- ns,
- t,
- ...watcher,
- mutations,
- commit,
- updateTableScrollY
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/store/helper.mjs
- var InitialStateMap = {
- rowKey: "rowKey",
- defaultExpandAll: "defaultExpandAll",
- rowExpandable: "rowExpandable",
- selectOnIndeterminate: "selectOnIndeterminate",
- indent: "indent",
- lazy: "lazy",
- ["treeProps.hasChildren"]: {
- key: "lazyColumnIdentifier",
- default: "hasChildren"
- },
- ["treeProps.children"]: {
- key: "childrenColumnName",
- default: "children"
- },
- ["treeProps.checkStrictly"]: {
- key: "checkStrictly",
- default: false
- }
- };
- function createStore(table, props) {
- if (!table) throw new Error("Table is required.");
- const store = useStore();
- store.toggleAllSelection = debounce(store._toggleAllSelection, 10);
- Object.keys(InitialStateMap).forEach((key) => {
- handleValue(getArrKeysValue(props, key), key, store);
- });
- proxyTableProps(store, props);
- return store;
- }
- function proxyTableProps(store, props) {
- Object.keys(InitialStateMap).forEach((key) => {
- watch(() => getArrKeysValue(props, key), (value) => {
- handleValue(value, key, store);
- });
- });
- }
- function handleValue(value, propsKey, store) {
- let newVal = value;
- let storeKey = InitialStateMap[propsKey];
- if (isObject$2(storeKey)) {
- newVal = newVal || storeKey.default;
- storeKey = storeKey.key;
- }
- store.states[storeKey].value = newVal;
- }
- function getArrKeysValue(props, key) {
- if (key.includes(".")) {
- const keyList = key.split(".");
- let value = props;
- keyList.forEach((k) => {
- value = value[k];
- });
- return value;
- } else return props[key];
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-layout.mjs
- var TableLayout = class {
- constructor(options) {
- this.observers = [];
- this.table = null;
- this.store = null;
- this.columns = [];
- this.fit = true;
- this.showHeader = true;
- this.height = ref(null);
- this.scrollX = ref(false);
- this.scrollY = ref(false);
- this.bodyWidth = ref(null);
- this.fixedWidth = ref(null);
- this.rightFixedWidth = ref(null);
- this.gutterWidth = 0;
- for (const name in options) if (hasOwn(options, name)) if (isRef(this[name])) this[name].value = options[name];
- else this[name] = options[name];
- if (!this.table) throw new Error("Table is required for Table Layout");
- if (!this.store) throw new Error("Store is required for Table Layout");
- }
- updateScrollY() {
- const height = this.height.value;
- /**
- * When the height is not initialized, it is null.
- * After the table is initialized, when the height is not configured, the height is 0.
- */
- if (isNull(height)) return false;
- const scrollBarRef = this.table.refs.scrollBarRef;
- if (this.table.vnode.el && scrollBarRef?.wrapRef) {
- let scrollY = true;
- const prevScrollY = this.scrollY.value;
- scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight;
- this.scrollY.value = scrollY;
- return prevScrollY !== scrollY;
- }
- return false;
- }
- setHeight(value, prop = "height") {
- if (!isClient) return;
- const el = this.table.vnode.el;
- value = parseHeight(value);
- this.height.value = Number(value);
- if (!el && (value || value === 0)) {
- nextTick(() => this.setHeight(value, prop));
- return;
- }
- if (el && isNumber(value)) {
- el.style[prop] = `${value}px`;
- this.updateElsHeight();
- } else if (el && isString(value)) {
- el.style[prop] = value;
- this.updateElsHeight();
- }
- }
- setMaxHeight(value) {
- this.setHeight(value, "max-height");
- }
- getFlattenColumns() {
- const flattenColumns = [];
- this.table.store.states.columns.value.forEach((column) => {
- if (column.isColumnGroup) flattenColumns.push.apply(flattenColumns, column.columns);
- else flattenColumns.push(column);
- });
- return flattenColumns;
- }
- updateElsHeight() {
- this.updateScrollY();
- this.notifyObservers("scrollable");
- }
- headerDisplayNone(elm) {
- if (!elm) return true;
- let headerChild = elm;
- while (headerChild.tagName !== "DIV") {
- if (getComputedStyle(headerChild).display === "none") return true;
- headerChild = headerChild.parentElement;
- }
- return false;
- }
- updateColumnsWidth() {
- if (!isClient) return;
- const fit = this.fit;
- const bodyWidth = this.table.vnode.el?.clientWidth;
- let bodyMinWidth = 0;
- const flattenColumns = this.getFlattenColumns();
- const flexColumns = flattenColumns.filter((column) => !isNumber(column.width));
- flattenColumns.forEach((column) => {
- if (isNumber(column.width) && column.realWidth) column.realWidth = null;
- });
- if (flexColumns.length > 0 && fit) {
- flattenColumns.forEach((column) => {
- bodyMinWidth += Number(column.width || column.minWidth || 80);
- });
- if (bodyMinWidth <= bodyWidth) {
- this.scrollX.value = false;
- const totalFlexWidth = bodyWidth - bodyMinWidth;
- if (flexColumns.length === 1) flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth;
- else {
- const flexWidthPerPixel = totalFlexWidth / flexColumns.reduce((prev, column) => prev + Number(column.minWidth || 80), 0);
- let noneFirstWidth = 0;
- flexColumns.forEach((column, index) => {
- if (index === 0) return;
- const flexWidth = Math.floor(Number(column.minWidth || 80) * flexWidthPerPixel);
- noneFirstWidth += flexWidth;
- column.realWidth = Number(column.minWidth || 80) + flexWidth;
- });
- flexColumns[0].realWidth = Number(flexColumns[0].minWidth || 80) + totalFlexWidth - noneFirstWidth;
- }
- } else {
- this.scrollX.value = true;
- flexColumns.forEach((column) => {
- column.realWidth = Number(column.minWidth);
- });
- }
- this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth);
- this.table.state.resizeState.value.width = this.bodyWidth.value;
- } else {
- flattenColumns.forEach((column) => {
- if (!column.width && !column.minWidth) column.realWidth = 80;
- else column.realWidth = Number(column.width || column.minWidth);
- bodyMinWidth += column.realWidth;
- });
- this.scrollX.value = bodyMinWidth > bodyWidth;
- this.bodyWidth.value = bodyMinWidth;
- }
- const fixedColumns = this.store.states.fixedColumns.value;
- if (fixedColumns.length > 0) {
- let fixedWidth = 0;
- fixedColumns.forEach((column) => {
- fixedWidth += Number(column.realWidth || column.width);
- });
- this.fixedWidth.value = fixedWidth;
- }
- const rightFixedColumns = this.store.states.rightFixedColumns.value;
- if (rightFixedColumns.length > 0) {
- let rightFixedWidth = 0;
- rightFixedColumns.forEach((column) => {
- rightFixedWidth += Number(column.realWidth || column.width);
- });
- this.rightFixedWidth.value = rightFixedWidth;
- }
- this.notifyObservers("columns");
- }
- addObserver(observer) {
- this.observers.push(observer);
- }
- removeObserver(observer) {
- const index = this.observers.indexOf(observer);
- if (index !== -1) this.observers.splice(index, 1);
- }
- notifyObservers(event) {
- this.observers.forEach((observer) => {
- switch (event) {
- case "columns":
- observer.state?.onColumnsChange(this);
- break;
- case "scrollable":
- observer.state?.onScrollableChange(this);
- break;
- default: throw new Error(`Table Layout don't have event ${event}.`);
- }
- });
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/tokens.mjs
- var TABLE_INJECTION_KEY = Symbol("ElTable");
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-header/utils-helper.mjs
- var getAllColumns = (columns) => {
- const result = [];
- columns.forEach((column) => {
- if (column.children) {
- result.push(column);
- result.push.apply(result, getAllColumns(column.children));
- } else result.push(column);
- });
- return result;
- };
- var convertToRows = (originColumns) => {
- let maxLevel = 1;
- const traverse = (column, parent) => {
- if (parent) {
- column.level = parent.level + 1;
- if (maxLevel < column.level) maxLevel = column.level;
- }
- if (column.children) {
- let colSpan = 0;
- column.children.forEach((subColumn) => {
- traverse(subColumn, column);
- colSpan += subColumn.colSpan;
- });
- column.colSpan = colSpan;
- } else column.colSpan = 1;
- };
- originColumns.forEach((column) => {
- column.level = 1;
- traverse(column, void 0);
- });
- const rows = [];
- for (let i = 0; i < maxLevel; i++) rows.push([]);
- getAllColumns(originColumns).forEach((column) => {
- if (!column.children) column.rowSpan = maxLevel - column.level + 1;
- else {
- column.rowSpan = 1;
- column.children.forEach((col) => col.isSubColumn = true);
- }
- rows[column.level - 1].push(column);
- });
- return rows;
- };
- function useUtils$1(props) {
- const parent = inject(TABLE_INJECTION_KEY);
- const columnRows = computed(() => {
- return convertToRows(props.store.states.originColumns.value);
- });
- const isGroup = computed(() => {
- const result = columnRows.value.length > 1;
- if (result && parent) parent.state.isGroup.value = true;
- return result;
- });
- const toggleAllSelection = (event) => {
- event.stopPropagation();
- parent?.store.commit("toggleAllSelection");
- };
- return {
- isGroup,
- toggleAllSelection,
- columnRows
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs
- var filter_panel_vue_vue_type_script_lang_default = defineComponent({
- name: "ElTableFilterPanel",
- components: {
- ElCheckbox,
- ElCheckboxGroup,
- ElScrollbar,
- ElTooltip,
- ElIcon,
- ArrowDown: arrow_down_default,
- ArrowUp: arrow_up_default
- },
- props: {
- placement: {
- type: String,
- default: "bottom-start"
- },
- store: { type: Object },
- column: { type: Object },
- upDataColumn: { type: Function },
- appendTo: useTooltipContentProps.appendTo
- },
- setup(props) {
- const instance = getCurrentInstance();
- const { t } = useLocale();
- const ns = useNamespace("table-filter");
- const parent = instance?.parent;
- if (props.column && !parent.filterPanels.value[props.column.id]) parent.filterPanels.value[props.column.id] = instance;
- const tooltipRef = ref(null);
- const rootRef = ref(null);
- const checkedIndex = ref(0);
- const filters = computed(() => {
- return props.column && props.column.filters;
- });
- const filterClassName = computed(() => {
- if (props.column && props.column.filterClassName) return `${ns.b()} ${props.column.filterClassName}`;
- return ns.b();
- });
- const filterValue = computed({
- get: () => (props.column?.filteredValue || [])[0],
- set: (value) => {
- if (filteredValue.value) if (!isPropAbsent(value)) filteredValue.value.splice(0, 1, value);
- else filteredValue.value.splice(0, 1);
- }
- });
- const filteredValue = computed({
- get() {
- if (props.column) return props.column.filteredValue || [];
- return [];
- },
- set(value) {
- if (props.column) props.upDataColumn?.("filteredValue", value);
- }
- });
- const multiple = computed(() => {
- if (props.column) return props.column.filterMultiple;
- return true;
- });
- const isActive = (filter) => {
- return filter.value === filterValue.value;
- };
- const hidden = () => {
- tooltipRef.value?.onClose();
- };
- const handleConfirm = () => {
- confirmFilter(filteredValue.value);
- hidden();
- };
- const handleReset = () => {
- filteredValue.value = [];
- confirmFilter(filteredValue.value);
- hidden();
- };
- const handleSelect = (_filterValue, index) => {
- filterValue.value = _filterValue;
- checkedIndex.value = index;
- if (!isPropAbsent(_filterValue)) confirmFilter(filteredValue.value);
- else confirmFilter([]);
- hidden();
- };
- const confirmFilter = (filteredValue) => {
- props.store?.commit("filterChange", {
- column: props.column,
- values: filteredValue
- });
- props.store?.updateAllSelected();
- };
- const handleShowTooltip = () => {
- rootRef.value?.focus();
- !multiple.value && initCheckedIndex();
- if (props.column) props.upDataColumn?.("filterOpened", true);
- };
- const handleHideTooltip = () => {
- if (props.column) props.upDataColumn?.("filterOpened", false);
- };
- const initCheckedIndex = () => {
- if (isPropAbsent(filterValue)) {
- checkedIndex.value = 0;
- return;
- }
- const idx = (filters.value || []).findIndex((item) => {
- return item.value === filterValue.value;
- });
- checkedIndex.value = idx >= 0 ? idx + 1 : 0;
- };
- const handleKeydown = (event) => {
- const code = getEventCode(event);
- const len = (filters.value ? filters.value.length : 0) + 1;
- let index = checkedIndex.value;
- let isPreventDefault = true;
- switch (code) {
- case EVENT_CODE.down:
- case EVENT_CODE.right:
- index = (index + 1) % len;
- break;
- case EVENT_CODE.up:
- case EVENT_CODE.left:
- index = (index - 1 + len) % len;
- break;
- case EVENT_CODE.tab:
- hidden();
- isPreventDefault = false;
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.space:
- if (index === 0) handleSelect(null, 0);
- else {
- const item = (filters.value || [])[index - 1];
- item.value && handleSelect(item.value, index);
- }
- break;
- default:
- isPreventDefault = false;
- break;
- }
- isPreventDefault && event.preventDefault();
- checkedIndex.value = index;
- rootRef.value?.querySelector(`.${ns.e("list-item")}:nth-child(${index + 1})`)?.focus();
- };
- return {
- multiple,
- filterClassName,
- filteredValue,
- filterValue,
- filters,
- handleConfirm,
- handleReset,
- handleSelect,
- isPropAbsent,
- isActive,
- t,
- ns,
- tooltipRef,
- rootRef,
- checkedIndex,
- handleShowTooltip,
- handleHideTooltip,
- handleKeydown
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/filter-panel.mjs
- var _hoisted_1$17 = ["disabled"];
- var _hoisted_2$10 = ["tabindex", "aria-checked"];
- var _hoisted_3$3 = [
- "tabindex",
- "aria-checked",
- "onClick"
- ];
- var _hoisted_4$2 = ["aria-label"];
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_checkbox = resolveComponent("el-checkbox");
- const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
- const _component_el_scrollbar = resolveComponent("el-scrollbar");
- const _component_arrow_up = resolveComponent("arrow-up");
- const _component_arrow_down = resolveComponent("arrow-down");
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_tooltip = resolveComponent("el-tooltip");
- return openBlock(), createBlock(_component_el_tooltip, {
- ref: "tooltipRef",
- offset: 0,
- placement: _ctx.placement,
- "show-arrow": false,
- trigger: "click",
- role: "dialog",
- teleported: "",
- effect: "light",
- pure: "",
- loop: "",
- "popper-class": _ctx.filterClassName,
- persistent: "",
- "append-to": _ctx.appendTo,
- onShow: _ctx.handleShowTooltip,
- onHide: _ctx.handleHideTooltip
- }, {
- content: withCtx(() => [_ctx.multiple ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref: "rootRef",
- tabindex: "-1",
- class: normalizeClass(_ctx.ns.e("multiple"))
- }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("content")) }, [createVNode(_component_el_scrollbar, { "wrap-class": _ctx.ns.e("wrap") }, {
- default: withCtx(() => [createVNode(_component_el_checkbox_group, {
- modelValue: _ctx.filteredValue,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.filteredValue = $event),
- class: normalizeClass(_ctx.ns.e("checkbox-group"))
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter) => {
- return openBlock(), createBlock(_component_el_checkbox, {
- key: filter.value,
- value: filter.value
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(filter.text), 1)]),
- _: 2
- }, 1032, ["value"]);
- }), 128))]),
- _: 1
- }, 8, ["modelValue", "class"])]),
- _: 1
- }, 8, ["wrap-class"])], 2), createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("bottom")) }, [createBaseVNode("button", {
- class: normalizeClass(_ctx.ns.is("disabled", _ctx.filteredValue.length === 0)),
- disabled: _ctx.filteredValue.length === 0,
- type: "button",
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleConfirm && _ctx.handleConfirm(...args))
- }, toDisplayString(_ctx.t("el.table.confirmFilter")), 11, _hoisted_1$17), createBaseVNode("button", {
- type: "button",
- onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReset && _ctx.handleReset(...args))
- }, toDisplayString(_ctx.t("el.table.resetFilter")), 1)], 2)], 2)) : (openBlock(), createElementBlock("ul", {
- key: 1,
- ref: "rootRef",
- tabindex: "-1",
- role: "radiogroup",
- class: normalizeClass(_ctx.ns.e("list")),
- onKeydown: _cache[4] || (_cache[4] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args))
- }, [createBaseVNode("li", {
- role: "radio",
- class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isPropAbsent(_ctx.filterValue))]),
- tabindex: _ctx.checkedIndex === 0 ? 0 : -1,
- "aria-checked": _ctx.isPropAbsent(_ctx.filterValue),
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleSelect(null, 0))
- }, toDisplayString(_ctx.t("el.table.clearFilter")), 11, _hoisted_2$10), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filters, (filter, idx) => {
- return openBlock(), createElementBlock("li", {
- key: filter.value,
- role: "radio",
- class: normalizeClass([_ctx.ns.e("list-item"), _ctx.ns.is("active", _ctx.isActive(filter))]),
- tabindex: _ctx.checkedIndex === idx + 1 ? 0 : -1,
- "aria-checked": _ctx.isActive(filter),
- onClick: ($event) => _ctx.handleSelect(filter.value, idx + 1)
- }, toDisplayString(filter.text), 11, _hoisted_3$3);
- }), 128))], 34))]),
- default: withCtx(() => [createBaseVNode("button", {
- type: "button",
- class: normalizeClass(`${_ctx.ns.namespace.value}-table__column-filter-trigger`),
- "aria-label": _ctx.t("el.table.filterLabel", { column: _ctx.column?.label || "" })
- }, [createVNode(_component_el_icon, null, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "filter-icon", {}, () => [_ctx.column?.filterOpened ? (openBlock(), createBlock(_component_arrow_up, { key: 0 })) : (openBlock(), createBlock(_component_arrow_down, { key: 1 }))])]),
- _: 3
- })], 10, _hoisted_4$2)]),
- _: 3
- }, 8, [
- "placement",
- "popper-class",
- "append-to",
- "onShow",
- "onHide"
- ]);
- }
- var filter_panel_default = /* @__PURE__ */ _plugin_vue_export_helper_default(filter_panel_vue_vue_type_script_lang_default, [["render", _sfc_render$4]]);
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/layout-observer.mjs
- function useLayoutObserver(root) {
- const instance = getCurrentInstance();
- onBeforeMount(() => {
- tableLayout.value.addObserver(instance);
- });
- onMounted(() => {
- onColumnsChange(tableLayout.value);
- onScrollableChange(tableLayout.value);
- });
- onUpdated(() => {
- onColumnsChange(tableLayout.value);
- onScrollableChange(tableLayout.value);
- });
- onUnmounted(() => {
- tableLayout.value.removeObserver(instance);
- });
- const tableLayout = computed(() => {
- const layout = root.layout;
- if (!layout) throw new Error("Can not find table layout.");
- return layout;
- });
- const onColumnsChange = (layout) => {
- const cols = root.vnode.el?.querySelectorAll("colgroup > col") || [];
- if (!cols.length) return;
- const flattenColumns = layout.getFlattenColumns();
- const columnsMap = {};
- flattenColumns.forEach((column) => {
- columnsMap[column.id] = column;
- });
- for (let i = 0, j = cols.length; i < j; i++) {
- const col = cols[i];
- const column = columnsMap[col.getAttribute("name")];
- if (column) col.setAttribute("width", column.realWidth || column.width);
- }
- };
- const onScrollableChange = (layout) => {
- const cols = root.vnode.el?.querySelectorAll("colgroup > col[name=gutter]") || [];
- for (let i = 0, j = cols.length; i < j; i++) cols[i].setAttribute("width", layout.scrollY.value ? layout.gutterWidth : "0");
- const ths = root.vnode.el?.querySelectorAll("th.gutter") || [];
- for (let i = 0, j = ths.length; i < j; i++) {
- const th = ths[i];
- th.style.width = layout.scrollY.value ? `${layout.gutterWidth}px` : "0";
- th.style.display = layout.scrollY.value ? "" : "none";
- }
- };
- return {
- tableLayout: tableLayout.value,
- onColumnsChange,
- onScrollableChange
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-header/event-helper.mjs
- function useEvent(props, emit) {
- const instance = getCurrentInstance();
- const parent = inject(TABLE_INJECTION_KEY);
- const handleFilterClick = (event) => {
- event.stopPropagation();
- };
- const handleHeaderClick = (event, column) => {
- if (!column.filters && column.sortable) handleSortClick(event, column, false);
- else if (column.filterable && !column.sortable) handleFilterClick(event);
- parent?.emit("header-click", column, event);
- };
- const handleHeaderContextMenu = (event, column) => {
- parent?.emit("header-contextmenu", column, event);
- };
- const draggingColumn = ref(null);
- const dragging = ref(false);
- const dragState = ref();
- const handleMouseDown = (event, column) => {
- if (!isClient) return;
- if (column.children && column.children.length > 0) return;
- /* istanbul ignore if */
- if (draggingColumn.value && props.border && draggingColumn.value.id === column.id) {
- dragging.value = true;
- const table = parent;
- emit("set-drag-visible", true);
- const tableLeft = (table?.vnode.el)?.getBoundingClientRect().left;
- const columnEl = instance?.vnode?.el?.querySelector(`th.${column.id}`);
- const columnRect = columnEl.getBoundingClientRect();
- const minLeft = columnRect.left - tableLeft + 30;
- addClass(columnEl, "noclick");
- dragState.value = {
- startMouseLeft: event.clientX,
- startLeft: columnRect.right - tableLeft,
- startColumnLeft: columnRect.left - tableLeft,
- tableLeft
- };
- const resizeProxy = table?.refs.resizeProxy;
- resizeProxy.style.left = `${dragState.value.startLeft}px`;
- document.onselectstart = function() {
- return false;
- };
- document.ondragstart = function() {
- return false;
- };
- const handleMouseMove = (event) => {
- const deltaLeft = event.clientX - dragState.value.startMouseLeft;
- const proxyLeft = dragState.value.startLeft + deltaLeft;
- resizeProxy.style.left = `${Math.max(minLeft, proxyLeft)}px`;
- };
- const handleMouseUp = () => {
- if (dragging.value) {
- const { startColumnLeft, startLeft } = dragState.value;
- column.width = column.realWidth = Number.parseInt(resizeProxy.style.left, 10) - startColumnLeft;
- table?.emit("header-dragend", column.width, startLeft - startColumnLeft, column, event);
- requestAnimationFrame(() => {
- props.store.scheduleLayout(false, true);
- });
- document.body.style.cursor = "";
- dragging.value = false;
- draggingColumn.value = null;
- dragState.value = void 0;
- emit("set-drag-visible", false);
- }
- document.removeEventListener("mousemove", handleMouseMove);
- document.removeEventListener("mouseup", handleMouseUp);
- document.onselectstart = null;
- document.ondragstart = null;
- setTimeout(() => {
- removeClass(columnEl, "noclick");
- }, 0);
- };
- document.addEventListener("mousemove", handleMouseMove);
- document.addEventListener("mouseup", handleMouseUp);
- }
- };
- const handleMouseMove = (event, column) => {
- if (!props.border || column.children && column.children.length > 0) return;
- const el = event.target;
- const target = isElement$1(el) ? el.closest("th") : null;
- if (!target) return;
- const isSortable = hasClass(target, "is-sortable");
- if (isSortable) {
- const cursor = dragging.value ? "col-resize" : "";
- target.style.cursor = cursor;
- const caret = target.querySelector(".caret-wrapper");
- if (caret) caret.style.cursor = cursor;
- }
- if (!column.resizable || dragging.value) {
- draggingColumn.value = null;
- return;
- }
- const rect = target.getBoundingClientRect();
- const isLastTh = target.parentNode?.lastElementChild === target;
- const allowDrag = props.allowDragLastColumn || !isLastTh;
- const isResizeHandleActive = rect.width > 12 && rect.right - event.clientX < 8 && allowDrag;
- const cursor = isResizeHandleActive ? "col-resize" : "";
- document.body.style.cursor = cursor;
- draggingColumn.value = isResizeHandleActive ? column : null;
- if (isSortable) target.style.cursor = cursor;
- };
- const handleMouseOut = () => {
- if (!isClient || dragging.value) return;
- document.body.style.cursor = "";
- };
- const toggleOrder = ({ order, sortOrders }) => {
- if (order === "") return sortOrders[0];
- const index = sortOrders.indexOf(order || null);
- return sortOrders[index > sortOrders.length - 2 ? 0 : index + 1];
- };
- const handleSortClick = (event, column, givenOrder) => {
- event.stopPropagation();
- const order = column.order === givenOrder ? null : givenOrder || toggleOrder(column);
- const target = event.target?.closest("th");
- if (target) {
- if (hasClass(target, "noclick")) {
- removeClass(target, "noclick");
- return;
- }
- }
- if (!column.sortable) return;
- const clickTarget = event.currentTarget;
- if (["ascending", "descending"].some((str) => hasClass(clickTarget, str) && !column.sortOrders.includes(str))) return;
- const states = props.store.states;
- let sortProp = states.sortProp.value;
- let sortOrder;
- const sortingColumn = states.sortingColumn.value;
- if (sortingColumn !== column || sortingColumn === column && isNull(sortingColumn.order)) {
- if (sortingColumn) sortingColumn.order = null;
- states.sortingColumn.value = column;
- sortProp = column.property;
- }
- if (!order) sortOrder = column.order = null;
- else sortOrder = column.order = order;
- states.sortProp.value = sortProp;
- states.sortOrder.value = sortOrder;
- parent?.store.commit("changeSortCondition");
- };
- return {
- handleHeaderClick,
- handleHeaderContextMenu,
- handleMouseDown,
- handleMouseMove,
- handleMouseOut,
- handleSortClick,
- handleFilterClick
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-header/style.helper.mjs
- function useStyle$2(props) {
- const parent = inject(TABLE_INJECTION_KEY);
- const ns = useNamespace("table");
- const getHeaderRowStyle = (rowIndex) => {
- const headerRowStyle = parent?.props.headerRowStyle;
- if (isFunction$1(headerRowStyle)) return headerRowStyle.call(null, { rowIndex });
- return headerRowStyle;
- };
- const getHeaderRowClass = (rowIndex) => {
- const classes = [];
- const headerRowClassName = parent?.props.headerRowClassName;
- if (isString(headerRowClassName)) classes.push(headerRowClassName);
- else if (isFunction$1(headerRowClassName)) classes.push(headerRowClassName.call(null, { rowIndex }));
- return classes.join(" ");
- };
- const getHeaderCellStyle = (rowIndex, columnIndex, row, column) => {
- let headerCellStyles = parent?.props.headerCellStyle ?? {};
- if (isFunction$1(headerCellStyles)) headerCellStyles = headerCellStyles.call(null, {
- rowIndex,
- columnIndex,
- row,
- column
- });
- const fixedStyle = getFixedColumnOffset(columnIndex, column.fixed, props.store, row);
- ensurePosition(fixedStyle, "left");
- ensurePosition(fixedStyle, "right");
- return Object.assign({}, headerCellStyles, fixedStyle);
- };
- const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
- const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, column.fixed, props.store, row);
- const classes = [
- column.id,
- column.order,
- column.headerAlign,
- column.className,
- column.labelClassName,
- ...fixedClasses
- ];
- if (!column.children) classes.push("is-leaf");
- if (column.sortable) classes.push("is-sortable");
- const headerCellClassName = parent?.props.headerCellClassName;
- if (isString(headerCellClassName)) classes.push(headerCellClassName);
- else if (isFunction$1(headerCellClassName)) classes.push(headerCellClassName.call(null, {
- rowIndex,
- columnIndex,
- row,
- column
- }));
- classes.push(ns.e("cell"));
- return classes.filter((className) => Boolean(className)).join(" ");
- };
- return {
- getHeaderRowStyle,
- getHeaderRowClass,
- getHeaderCellStyle,
- getHeaderCellClass
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-header/index.mjs
- var table_header_default = defineComponent({
- name: "ElTableHeader",
- components: { ElCheckbox },
- props: {
- fixed: {
- type: String,
- default: ""
- },
- store: {
- required: true,
- type: Object
- },
- border: Boolean,
- defaultSort: {
- type: Object,
- default: () => {
- return {
- prop: "",
- order: ""
- };
- }
- },
- appendFilterPanelTo: { type: String },
- allowDragLastColumn: { type: Boolean }
- },
- setup(props, { emit }) {
- const instance = getCurrentInstance();
- const parent = inject(TABLE_INJECTION_KEY);
- const ns = useNamespace("table");
- const filterPanels = ref({});
- const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
- const isTableLayoutAuto = parent?.props.tableLayout === "auto";
- const saveIndexSelection = reactive(/* @__PURE__ */ new Map());
- const theadRef = ref();
- let delayId;
- const updateFixedColumnStyle = () => {
- delayId = setTimeout(() => {
- if (saveIndexSelection.size > 0) {
- saveIndexSelection.forEach((column, key) => {
- const el = theadRef.value.querySelector(`.${key.replace(/\s/g, ".")}`);
- if (el) column.width = el.getBoundingClientRect().width || column.width;
- });
- saveIndexSelection.clear();
- }
- });
- };
- watch(saveIndexSelection, updateFixedColumnStyle);
- onBeforeUnmount(() => {
- if (delayId) {
- clearTimeout(delayId);
- delayId = void 0;
- }
- });
- onMounted(async () => {
- await nextTick();
- await nextTick();
- const { prop, order } = props.defaultSort;
- parent?.store.commit("sort", {
- prop,
- order,
- init: true
- });
- updateFixedColumnStyle();
- });
- const { handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleMouseOut, handleSortClick, handleFilterClick } = useEvent(props, emit);
- const { getHeaderRowStyle, getHeaderRowClass, getHeaderCellStyle, getHeaderCellClass } = useStyle$2(props);
- const { isGroup, toggleAllSelection, columnRows } = useUtils$1(props);
- const { t } = useLocale();
- instance.state = {
- onColumnsChange,
- onScrollableChange
- };
- instance.filterPanels = filterPanels;
- return {
- ns,
- t,
- filterPanels,
- onColumnsChange,
- onScrollableChange,
- columnRows,
- getHeaderRowClass,
- getHeaderRowStyle,
- getHeaderCellClass,
- getHeaderCellStyle,
- handleHeaderClick,
- handleHeaderContextMenu,
- handleMouseDown,
- handleMouseMove,
- handleMouseOut,
- handleSortClick,
- handleFilterClick,
- isGroup,
- toggleAllSelection,
- saveIndexSelection,
- isTableLayoutAuto,
- theadRef,
- updateFixedColumnStyle
- };
- },
- render() {
- const { ns, t, isGroup, columnRows, getHeaderCellStyle, getHeaderCellClass, getHeaderRowClass, getHeaderRowStyle, handleHeaderClick, handleHeaderContextMenu, handleMouseDown, handleMouseMove, handleSortClick, handleMouseOut, store, $parent, saveIndexSelection, isTableLayoutAuto } = this;
- let rowSpan = 1;
- return h$1("thead", {
- ref: "theadRef",
- class: ns.is("group", isGroup)
- }, columnRows.map((subColumns, rowIndex) => h$1("tr", {
- class: getHeaderRowClass(rowIndex),
- key: rowIndex,
- style: getHeaderRowStyle(rowIndex)
- }, subColumns.map((column, cellIndex) => {
- if (column.rowSpan > rowSpan) rowSpan = column.rowSpan;
- const _class = getHeaderCellClass(rowIndex, cellIndex, subColumns, column);
- if (isTableLayoutAuto && column.fixed) saveIndexSelection.set(_class, column);
- return h$1("th", {
- class: _class,
- colspan: column.colSpan,
- key: `${column.id}-thead`,
- rowspan: column.rowSpan,
- scope: column.colSpan > 1 ? "colgroup" : "col",
- ariaSort: column.sortable ? column.order : void 0,
- style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),
- onClick: ($event) => {
- if ($event.currentTarget?.classList.contains("noclick")) return;
- handleHeaderClick($event, column);
- },
- onContextmenu: ($event) => handleHeaderContextMenu($event, column),
- onMousedown: ($event) => handleMouseDown($event, column),
- onMousemove: ($event) => handleMouseMove($event, column),
- onMouseout: handleMouseOut
- }, [h$1("div", { class: ["cell", column.filteredValue && column.filteredValue.length > 0 ? "highlight" : ""] }, [
- column.renderHeader ? column.renderHeader({
- column,
- $index: cellIndex,
- store,
- _self: $parent
- }) : column.label,
- column.sortable && h$1("button", {
- type: "button",
- class: "caret-wrapper",
- "aria-label": t("el.table.sortLabel", { column: column.label || "" }),
- onClick: ($event) => handleSortClick($event, column)
- }, [h$1("i", {
- onClick: ($event) => handleSortClick($event, column, "ascending"),
- class: "sort-caret ascending"
- }), h$1("i", {
- onClick: ($event) => handleSortClick($event, column, "descending"),
- class: "sort-caret descending"
- })]),
- column.filterable && h$1(filter_panel_default, {
- store,
- placement: column.filterPlacement || "bottom-start",
- appendTo: $parent?.appendFilterPanelTo,
- column,
- upDataColumn: (key, value) => {
- column[key] = value;
- }
- }, { "filter-icon": () => column.renderFilterIcon ? column.renderFilterIcon({ filterOpened: column.filterOpened }) : null })
- ])]);
- }))));
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-body/events-helper.mjs
- function isGreaterThan(a, b, epsilon = .03) {
- return a - b > epsilon;
- }
- function useEvents(props) {
- const parent = inject(TABLE_INJECTION_KEY);
- const tooltipContent = ref("");
- const tooltipTrigger = ref(h$1("div"));
- const handleEvent = (event, row, name) => {
- const table = parent;
- const cell = getCell(event);
- let column = null;
- const namespace = table?.vnode.el?.dataset.prefix;
- if (cell) {
- column = getColumnByCell({ columns: props.store?.states.columns.value ?? [] }, cell, namespace);
- if (column) table?.emit(`cell-${name}`, row, column, cell, event);
- }
- table?.emit(`row-${name}`, row, column, event);
- };
- const handleDoubleClick = (event, row) => {
- handleEvent(event, row, "dblclick");
- };
- const handleClick = (event, row) => {
- props.store?.commit("setCurrentRow", row);
- handleEvent(event, row, "click");
- };
- const handleContextMenu = (event, row) => {
- handleEvent(event, row, "contextmenu");
- };
- const handleMouseEnter = debounce((index) => {
- props.store?.commit("setHoverRow", index);
- }, 30);
- const handleMouseLeave = debounce(() => {
- props.store?.commit("setHoverRow", null);
- }, 30);
- const getPadding = (el) => {
- const style = window.getComputedStyle(el, null);
- return {
- left: Number.parseInt(style.paddingLeft, 10) || 0,
- right: Number.parseInt(style.paddingRight, 10) || 0,
- top: Number.parseInt(style.paddingTop, 10) || 0,
- bottom: Number.parseInt(style.paddingBottom, 10) || 0
- };
- };
- const toggleRowClassByCell = (rowSpan, event, toggle) => {
- let node = (event?.target)?.parentNode;
- while (rowSpan > 1) {
- node = node?.nextSibling;
- if (!node || node.nodeName !== "TR") break;
- toggle(node, "hover-row hover-fixed-row");
- rowSpan--;
- }
- };
- const handleCellMouseEnter = (event, row, tooltipOptions) => {
- if (!parent) return;
- const table = parent;
- const cell = getCell(event);
- const namespace = table?.vnode.el?.dataset.prefix;
- let column = null;
- if (cell) {
- column = getColumnByCell({ columns: props.store?.states.columns.value ?? [] }, cell, namespace);
- if (!column) return;
- if (cell.rowSpan > 1) toggleRowClassByCell(cell.rowSpan, event, addClass);
- const hoverState = table.hoverState = {
- cell,
- column,
- row
- };
- table?.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, event);
- }
- if (!tooltipOptions) {
- if (removePopper?.trigger === cell) removePopper?.();
- return;
- }
- const cellChild = event.target.querySelector(".cell");
- if (!(hasClass(cellChild, `${namespace}-tooltip`) && cellChild.childNodes.length && cellChild.textContent?.trim())) return;
- const range = document.createRange();
- range.setStart(cellChild, 0);
- range.setEnd(cellChild, cellChild.childNodes.length);
- /** detail: https://github.com/element-plus/element-plus/issues/10790
- * What went wrong?
- * UI > Browser > Zoom, In Blink/WebKit, getBoundingClientRect() sometimes returns inexact values, probably due to lost precision during internal calculations. In the example above:
- * - Expected: 188
- * - Actual: 188.00000762939453
- */
- const { width: rangeWidth, height: rangeHeight } = range.getBoundingClientRect();
- const { width: cellChildWidth, height: cellChildHeight } = cellChild.getBoundingClientRect();
- const { top, left, right, bottom } = getPadding(cellChild);
- const horizontalPadding = left + right;
- const verticalPadding = top + bottom;
- if (isGreaterThan(rangeWidth + horizontalPadding, cellChildWidth) || isGreaterThan(rangeHeight + verticalPadding, cellChildHeight) || isGreaterThan(cellChild.scrollWidth, cellChildWidth)) createTablePopper(tooltipOptions, (cell?.innerText || cell?.textContent) ?? "", row, column, cell, table);
- else if (removePopper?.trigger === cell) removePopper?.();
- };
- const handleCellMouseLeave = (event) => {
- const cell = getCell(event);
- if (!cell) return;
- if (cell.rowSpan > 1) toggleRowClassByCell(cell.rowSpan, event, removeClass);
- const oldHoverState = parent?.hoverState;
- parent?.emit("cell-mouse-leave", oldHoverState?.row, oldHoverState?.column, oldHoverState?.cell, event);
- };
- return {
- handleDoubleClick,
- handleClick,
- handleContextMenu,
- handleMouseEnter,
- handleMouseLeave,
- handleCellMouseEnter,
- handleCellMouseLeave,
- tooltipContent,
- tooltipTrigger
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-body/styles-helper.mjs
- function useStyles$1(props) {
- const parent = inject(TABLE_INJECTION_KEY);
- const ns = useNamespace("table");
- const getRowStyle = (row, rowIndex) => {
- const rowStyle = parent?.props.rowStyle;
- if (isFunction$1(rowStyle)) return rowStyle.call(null, {
- row,
- rowIndex
- });
- return rowStyle || null;
- };
- const getRowClass = (row, rowIndex, displayIndex) => {
- const classes = [ns.e("row")];
- if (parent?.props.highlightCurrentRow && row === props.store?.states.currentRow.value) classes.push("current-row");
- if (props.stripe && displayIndex % 2 === 1) classes.push(ns.em("row", "striped"));
- const rowClassName = parent?.props.rowClassName;
- if (isString(rowClassName)) classes.push(rowClassName);
- else if (isFunction$1(rowClassName)) classes.push(rowClassName.call(null, {
- row,
- rowIndex
- }));
- return classes;
- };
- const getCellStyle = (rowIndex, columnIndex, row, column) => {
- const cellStyle = parent?.props.cellStyle;
- let cellStyles = cellStyle ?? {};
- if (isFunction$1(cellStyle)) cellStyles = cellStyle.call(null, {
- rowIndex,
- columnIndex,
- row,
- column
- });
- const fixedStyle = getFixedColumnOffset(columnIndex, props?.fixed, props.store);
- ensurePosition(fixedStyle, "left");
- ensurePosition(fixedStyle, "right");
- return Object.assign({}, cellStyles, fixedStyle);
- };
- const getCellClass = (rowIndex, columnIndex, row, column, offset) => {
- const fixedClasses = getFixedColumnsClass(ns.b(), columnIndex, props?.fixed, props.store, void 0, offset);
- const classes = [
- column.id,
- column.align,
- column.className,
- ...fixedClasses
- ];
- const cellClassName = parent?.props.cellClassName;
- if (isString(cellClassName)) classes.push(cellClassName);
- else if (isFunction$1(cellClassName)) classes.push(cellClassName.call(null, {
- rowIndex,
- columnIndex,
- row,
- column
- }));
- classes.push(ns.e("cell"));
- return classes.filter((className) => Boolean(className)).join(" ");
- };
- const getSpan = (row, column, rowIndex, columnIndex) => {
- let rowspan = 1;
- let colspan = 1;
- const fn = parent?.props.spanMethod;
- if (isFunction$1(fn)) {
- const result = fn({
- row,
- column,
- rowIndex,
- columnIndex
- });
- if (isArray$1(result)) {
- rowspan = result[0];
- colspan = result[1];
- } else if (isObject$2(result)) {
- rowspan = result.rowspan;
- colspan = result.colspan;
- }
- }
- return {
- rowspan,
- colspan
- };
- };
- const getColspanRealWidth = (columns, colspan, index) => {
- if (colspan < 1) return columns[index].realWidth;
- const widthArr = columns.map(({ realWidth, width }) => realWidth || width).slice(index, index + colspan);
- return Number(widthArr.reduce((acc, width) => Number(acc) + Number(width), -1));
- };
- return {
- getRowStyle,
- getRowClass,
- getCellStyle,
- getCellClass,
- getSpan,
- getColspanRealWidth
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-body/td-wrapper.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$16 = ["colspan", "rowspan"];
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-body/td-wrapper.mjs
- var td_wrapper_default = /* @__PURE__ */ defineComponent({
- name: "TableTdWrapper",
- __name: "td-wrapper",
- props: {
- colspan: {
- type: Number,
- default: 1
- },
- rowspan: {
- type: Number,
- default: 1
- }
- },
- setup(__props) {
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("td", {
- colspan: __props.colspan,
- rowspan: __props.rowspan
- }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$16);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-body/render-helper.mjs
- function useRender$1(props) {
- const parent = inject(TABLE_INJECTION_KEY);
- const ns = useNamespace("table");
- const { handleDoubleClick, handleClick, handleContextMenu, handleMouseEnter, handleMouseLeave, handleCellMouseEnter, handleCellMouseLeave, tooltipContent, tooltipTrigger } = useEvents(props);
- const { getRowStyle, getRowClass, getCellStyle, getCellClass, getSpan, getColspanRealWidth } = useStyles$1(props);
- let displayIndex = -1;
- const firstDefaultColumnIndex = computed(() => {
- return props.store?.states.columns.value.findIndex(({ type }) => type === "default");
- });
- const getKeyOfRow = (row, index) => {
- const rowKey = (parent?.props)?.rowKey;
- if (rowKey) return getRowIdentity(row, rowKey);
- return index;
- };
- const rowRender = (row, $index, treeRowData, expanded = false) => {
- const { tooltipEffect, tooltipOptions, store } = props;
- const { indent, columns } = store.states;
- const rowClasses = [];
- let display = true;
- if (treeRowData) {
- rowClasses.push(ns.em("row", `level-${treeRowData.level}`));
- display = !!treeRowData.display;
- }
- if ($index === 0) displayIndex = -1;
- if (props.stripe && display) displayIndex++;
- rowClasses.push(...getRowClass(row, $index, displayIndex));
- return h$1("tr", {
- style: [display ? null : { display: "none" }, getRowStyle(row, $index)],
- class: rowClasses,
- key: getKeyOfRow(row, $index),
- onDblclick: ($event) => handleDoubleClick($event, row),
- onClick: ($event) => handleClick($event, row),
- onContextmenu: ($event) => handleContextMenu($event, row),
- onMouseenter: () => handleMouseEnter($index),
- onMouseleave: handleMouseLeave
- }, columns.value.map((column, cellIndex) => {
- const { rowspan, colspan } = getSpan(row, column, $index, cellIndex);
- if (!rowspan || !colspan) return null;
- const columnData = Object.assign({}, column);
- columnData.realWidth = getColspanRealWidth(columns.value, colspan, cellIndex);
- const data = {
- store,
- _self: props.context || parent,
- column: columnData,
- row,
- $index,
- cellIndex,
- expanded
- };
- if (cellIndex === firstDefaultColumnIndex.value && treeRowData) {
- data.treeNode = {
- indent: treeRowData.level && treeRowData.level * indent.value,
- level: treeRowData.level
- };
- if (isBoolean(treeRowData.expanded)) {
- data.treeNode.expanded = treeRowData.expanded;
- if ("loading" in treeRowData) data.treeNode.loading = treeRowData.loading;
- if ("noLazyChildren" in treeRowData) data.treeNode.noLazyChildren = treeRowData.noLazyChildren;
- }
- }
- const baseKey = `${getKeyOfRow(row, $index)},${cellIndex}`;
- const patchKey = columnData.columnKey || columnData.rawColumnKey || "";
- const mergedTooltipOptions = column.showOverflowTooltip && merge({ effect: tooltipEffect }, tooltipOptions, column.showOverflowTooltip);
- return h$1(td_wrapper_default, {
- style: getCellStyle($index, cellIndex, row, column),
- class: getCellClass($index, cellIndex, row, column, colspan - 1),
- key: `${patchKey}${baseKey}`,
- rowspan,
- colspan,
- onMouseenter: ($event) => handleCellMouseEnter($event, row, mergedTooltipOptions),
- onMouseleave: handleCellMouseLeave
- }, { default: () => cellChildren(cellIndex, column, data) });
- }));
- };
- const cellChildren = (_cellIndex, column, data) => {
- return column.renderCell(data);
- };
- const wrappedRowRender = (row, $index) => {
- const store = props.store;
- const { isRowExpanded, assertRowKey } = store;
- const { treeData, lazyTreeNodeMap, childrenColumnName, rowKey } = store.states;
- const columns = store.states.columns.value;
- if (columns.some(({ type }) => type === "expand")) {
- const expanded = isRowExpanded(row);
- const tr = rowRender(row, $index, void 0, expanded);
- const renderExpanded = parent?.renderExpanded;
- if (!renderExpanded) {
- console.error("[Element Error]renderExpanded is required.");
- return tr;
- }
- const rows = [[tr]];
- if (parent.props.preserveExpandedContent || expanded) rows[0].push(h$1("tr", {
- key: `expanded-row__${tr.key}`,
- style: { display: expanded ? "" : "none" }
- }, [h$1("td", {
- colspan: columns.length,
- class: `${ns.e("cell")} ${ns.e("expanded-cell")}`
- }, [renderExpanded({
- row,
- $index,
- store,
- expanded
- })])]));
- return rows;
- } else if (Object.keys(treeData.value).length) {
- assertRowKey();
- const key = getRowIdentity(row, rowKey.value);
- let cur = treeData.value[key];
- let treeRowData = null;
- if (cur) {
- treeRowData = {
- expanded: cur.expanded,
- level: cur.level,
- display: true,
- noLazyChildren: void 0,
- loading: void 0
- };
- if (isBoolean(cur.lazy)) {
- if (treeRowData && isBoolean(cur.loaded) && cur.loaded) treeRowData.noLazyChildren = !(cur.children && cur.children.length);
- treeRowData.loading = cur.loading;
- }
- }
- const tmp = [rowRender(row, $index, treeRowData ?? void 0)];
- if (cur) {
- let i = 0;
- const traverse = (children, parent) => {
- if (!(children && children.length && parent)) return;
- children.forEach((node) => {
- const innerTreeRowData = {
- display: parent.display && parent.expanded,
- level: parent.level + 1,
- expanded: false,
- noLazyChildren: false,
- loading: false
- };
- const childKey = getRowIdentity(node, rowKey.value);
- if (isPropAbsent(childKey)) throw new Error("For nested data item, row-key is required.");
- cur = { ...treeData.value[childKey] };
- if (cur) {
- innerTreeRowData.expanded = cur.expanded;
- cur.level = cur.level || innerTreeRowData.level;
- cur.display = !!(cur.expanded && innerTreeRowData.display);
- if (isBoolean(cur.lazy)) {
- if (isBoolean(cur.loaded) && cur.loaded) innerTreeRowData.noLazyChildren = !(cur.children && cur.children.length);
- innerTreeRowData.loading = cur.loading;
- }
- }
- i++;
- tmp.push(rowRender(node, $index + i, innerTreeRowData));
- if (cur) traverse(lazyTreeNodeMap.value[childKey] || node[childrenColumnName.value], cur);
- });
- };
- cur.display = true;
- traverse(lazyTreeNodeMap.value[key] || row[childrenColumnName.value], cur);
- }
- return tmp;
- } else return rowRender(row, $index, void 0);
- };
- return {
- wrappedRowRender,
- tooltipContent,
- tooltipTrigger
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-body/index.mjs
- var table_body_default = defineComponent({
- name: "ElTableBody",
- props: {
- store: {
- required: true,
- type: Object
- },
- stripe: Boolean,
- tooltipEffect: String,
- tooltipOptions: { type: Object },
- context: {
- default: () => ({}),
- type: Object
- },
- rowClassName: [String, Function],
- rowStyle: [Object, Function],
- fixed: {
- type: String,
- default: ""
- },
- highlight: Boolean
- },
- setup(props) {
- const instance = getCurrentInstance();
- const parent = inject(TABLE_INJECTION_KEY);
- const ns = useNamespace("table");
- const { wrappedRowRender, tooltipContent, tooltipTrigger } = useRender$1(props);
- const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent);
- const hoveredCellList = [];
- watch(props.store?.states.hoverRow, (newVal, oldVal) => {
- const el = instance?.vnode.el;
- const rows = Array.from(el?.children || []).filter((e) => e?.classList.contains(`${ns.e("row")}`));
- let rowNum = newVal;
- const childNodes = rows[rowNum]?.childNodes;
- if (childNodes?.length) {
- let control = 0;
- Array.from(childNodes).reduce((acc, item, index) => {
- if (childNodes[index]?.colSpan > 1) control = childNodes[index]?.colSpan;
- if (item.nodeName !== "TD" && control === 0) acc.push(index);
- control > 0 && control--;
- return acc;
- }, []).forEach((rowIndex) => {
- rowNum = newVal;
- while (rowNum > 0) {
- const preChildNodes = rows[rowNum - 1]?.childNodes;
- if (preChildNodes[rowIndex] && preChildNodes[rowIndex].nodeName === "TD" && preChildNodes[rowIndex].rowSpan > 1) {
- addClass(preChildNodes[rowIndex], "hover-cell");
- hoveredCellList.push(preChildNodes[rowIndex]);
- break;
- }
- rowNum--;
- }
- });
- } else {
- hoveredCellList.forEach((item) => removeClass(item, "hover-cell"));
- hoveredCellList.length = 0;
- }
- if (!props.store?.states.isComplex.value || !isClient) return;
- rAF(() => {
- const oldRow = rows[oldVal];
- const newRow = rows[newVal];
- if (oldRow && !oldRow.classList.contains("hover-fixed-row")) removeClass(oldRow, "hover-row");
- if (newRow) addClass(newRow, "hover-row");
- });
- });
- onUnmounted(() => {
- removePopper?.();
- });
- return {
- ns,
- onColumnsChange,
- onScrollableChange,
- wrappedRowRender,
- tooltipContent,
- tooltipTrigger
- };
- },
- render() {
- const { wrappedRowRender, store } = this;
- return h$1("tbody", { tabIndex: -1 }, [(store?.states.data.value || []).reduce((acc, row) => {
- return acc.concat(wrappedRowRender(row, acc.length));
- }, [])]);
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-footer/mapState-helper.mjs
- function useMapState() {
- const store = inject(TABLE_INJECTION_KEY)?.store;
- return {
- leftFixedLeafCount: computed(() => {
- return store?.states.fixedLeafColumnsLength.value ?? 0;
- }),
- rightFixedLeafCount: computed(() => {
- return store?.states.rightFixedColumns.value.length ?? 0;
- }),
- columnsCount: computed(() => {
- return store?.states.columns.value.length ?? 0;
- }),
- leftFixedCount: computed(() => {
- return store?.states.fixedColumns.value.length ?? 0;
- }),
- rightFixedCount: computed(() => {
- return store?.states.rightFixedColumns.value.length ?? 0;
- }),
- columns: computed(() => store?.states.columns.value ?? [])
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-footer/style-helper.mjs
- function useStyle$1(props) {
- const { columns } = useMapState();
- const ns = useNamespace("table");
- const getCellClasses = (columns, cellIndex) => {
- const column = columns[cellIndex];
- const classes = [
- ns.e("cell"),
- column.id,
- column.align,
- column.labelClassName,
- ...getFixedColumnsClass(ns.b(), cellIndex, column.fixed, props.store)
- ];
- if (column.className) classes.push(column.className);
- if (!column.children) classes.push(ns.is("leaf"));
- return classes;
- };
- const getCellStyles = (column, cellIndex) => {
- const fixedStyle = getFixedColumnOffset(cellIndex, column.fixed, props.store);
- ensurePosition(fixedStyle, "left");
- ensurePosition(fixedStyle, "right");
- return fixedStyle;
- };
- return {
- getCellClasses,
- getCellStyles,
- columns
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-footer/index.mjs
- var table_footer_default = defineComponent({
- name: "ElTableFooter",
- props: {
- fixed: {
- type: String,
- default: ""
- },
- store: {
- required: true,
- type: Object
- },
- summaryMethod: Function,
- sumText: String,
- border: Boolean,
- defaultSort: {
- type: Object,
- default: () => {
- return {
- prop: "",
- order: ""
- };
- }
- }
- },
- setup(props) {
- const parent = inject(TABLE_INJECTION_KEY);
- const ns = useNamespace("table");
- const { getCellClasses, getCellStyles, columns } = useStyle$1(props);
- const { onScrollableChange, onColumnsChange } = useLayoutObserver(parent);
- return {
- ns,
- onScrollableChange,
- onColumnsChange,
- getCellClasses,
- getCellStyles,
- columns
- };
- },
- render() {
- const { columns, getCellStyles, getCellClasses, summaryMethod, sumText } = this;
- const data = this.store.states.data.value;
- let sums = [];
- if (summaryMethod) sums = summaryMethod({
- columns,
- data
- });
- else columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = sumText;
- return;
- }
- const values = data.map((item) => Number(item[column.property]));
- const precisions = [];
- let notNumber = true;
- values.forEach((value) => {
- if (!Number.isNaN(+value)) {
- notNumber = false;
- const decimal = `${value}`.split(".")[1];
- precisions.push(decimal ? decimal.length : 0);
- }
- });
- const precision = Math.max.apply(null, precisions);
- if (!notNumber) sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!Number.isNaN(+value)) return Number.parseFloat((prev + curr).toFixed(Math.min(precision, 20)));
- else return prev;
- }, 0);
- else sums[index] = "";
- });
- return h$1(h$1("tfoot", [h$1("tr", {}, [...columns.map((column, cellIndex) => h$1("td", {
- key: cellIndex,
- colspan: column.colSpan,
- rowspan: column.rowSpan,
- class: getCellClasses(columns, cellIndex),
- style: getCellStyles(column, cellIndex)
- }, [h$1("div", { class: ["cell", column.labelClassName] }, [sums[cellIndex]])]))])]));
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table/utils-helper.mjs
- function useUtils(store) {
- const setCurrentRow = (row) => {
- store.commit("setCurrentRow", row);
- };
- const getSelectionRows = () => {
- return store.getSelectionRows();
- };
- const toggleRowSelection = (row, selected, ignoreSelectable = true) => {
- store.toggleRowSelection(row, selected, false, ignoreSelectable);
- store.updateAllSelected();
- };
- const clearSelection = () => {
- store.clearSelection();
- };
- const clearFilter = (columnKeys) => {
- store.clearFilter(columnKeys);
- };
- const toggleAllSelection = () => {
- store.commit("toggleAllSelection");
- };
- const toggleRowExpansion = (row, expanded) => {
- store.toggleRowExpansionAdapter(row, expanded);
- };
- const clearSort = () => {
- store.clearSort();
- };
- const sort = (prop, order) => {
- store.commit("sort", {
- prop,
- order
- });
- };
- const updateKeyChildren = (key, data) => {
- store.updateKeyChildren(key, data);
- };
- return {
- setCurrentRow,
- getSelectionRows,
- toggleRowSelection,
- clearSelection,
- clearFilter,
- toggleAllSelection,
- toggleRowExpansion,
- clearSort,
- sort,
- updateKeyChildren
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table/style-helper.mjs
- function useStyle(props, layout, store, table) {
- const isHidden = ref(false);
- const renderExpanded = ref(null);
- const resizeProxyVisible = ref(false);
- const setDragVisible = (visible) => {
- resizeProxyVisible.value = visible;
- };
- const resizeState = ref({
- width: null,
- height: null,
- headerHeight: null
- });
- const isGroup = ref(false);
- const scrollbarViewStyle = {
- display: "inline-block",
- verticalAlign: "middle"
- };
- const tableWidth = ref();
- const tableScrollHeight = ref(0);
- const bodyScrollHeight = ref(0);
- const headerScrollHeight = ref(0);
- const footerScrollHeight = ref(0);
- const appendScrollHeight = ref(0);
- watch(() => props.height, (value) => {
- layout.setHeight(value ?? null);
- }, { immediate: true });
- watch(() => props.maxHeight, (value) => {
- layout.setMaxHeight(value ?? null);
- }, { immediate: true });
- watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey]) => {
- if (!unref(rowKey) || !unref(currentRowKey)) return;
- store.setCurrentRowKey(`${currentRowKey}`);
- }, { immediate: true });
- watch(() => props.data, (data) => {
- table.store.commit("setData", data);
- }, {
- immediate: true,
- deep: true
- });
- watchEffect(() => {
- if (props.expandRowKeys) store.setExpandRowKeysAdapter(props.expandRowKeys);
- });
- const handleMouseLeave = () => {
- table.store.commit("setHoverRow", null);
- if (table.hoverState) table.hoverState = null;
- };
- const handleHeaderFooterMousewheel = (_event, data) => {
- const { pixelX, pixelY } = data;
- if (Math.abs(pixelX) >= Math.abs(pixelY)) table.refs.bodyWrapper.scrollLeft += data.pixelX / 5;
- };
- const shouldUpdateHeight = computed(() => {
- return props.height || props.maxHeight || store.states.fixedColumns.value.length > 0 || store.states.rightFixedColumns.value.length > 0;
- });
- const tableBodyStyles = computed(() => {
- return { width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : "" };
- });
- const doLayout = () => {
- if (shouldUpdateHeight.value) layout.updateElsHeight();
- layout.updateColumnsWidth();
- if (typeof window === "undefined") return;
- requestAnimationFrame(syncPosition);
- };
- onMounted(async () => {
- await nextTick();
- store.updateColumns();
- bindEvents();
- requestAnimationFrame(doLayout);
- const el = table.vnode.el;
- const tableHeader = table.refs.headerWrapper;
- if (props.flexible && el && el.parentElement) el.parentElement.style.minWidth = "0";
- resizeState.value = {
- width: tableWidth.value = el.offsetWidth,
- height: el.offsetHeight,
- headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null
- };
- store.states.columns.value.forEach((column) => {
- if (column.filteredValue && column.filteredValue.length) table.store.commit("filterChange", {
- column,
- values: column.filteredValue,
- silent: true
- });
- });
- table.$ready = true;
- });
- const setScrollClassByEl = (el, className) => {
- if (!el) return;
- const classList = Array.from(el.classList).filter((item) => !item.startsWith("is-scrolling-"));
- classList.push(layout.scrollX.value ? className : "is-scrolling-none");
- el.className = classList.join(" ");
- };
- const setScrollClass = (className) => {
- const { tableWrapper } = table.refs;
- setScrollClassByEl(tableWrapper, className);
- };
- const hasScrollClass = (className) => {
- const { tableWrapper } = table.refs;
- return !!(tableWrapper && tableWrapper.classList.contains(className));
- };
- const syncPosition = function() {
- if (!table.refs.scrollBarRef) return;
- if (!layout.scrollX.value) {
- const scrollingNoneClass = "is-scrolling-none";
- if (!hasScrollClass(scrollingNoneClass)) setScrollClass(scrollingNoneClass);
- return;
- }
- const scrollContainer = table.refs.scrollBarRef.wrapRef;
- if (!scrollContainer) return;
- const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer;
- const { headerWrapper, footerWrapper } = table.refs;
- if (headerWrapper) headerWrapper.scrollLeft = scrollLeft;
- if (footerWrapper) footerWrapper.scrollLeft = scrollLeft;
- if (scrollLeft >= scrollWidth - offsetWidth - 1) setScrollClass("is-scrolling-right");
- else if (scrollLeft === 0) setScrollClass("is-scrolling-left");
- else setScrollClass("is-scrolling-middle");
- };
- const bindEvents = () => {
- if (!table.refs.scrollBarRef) return;
- if (table.refs.scrollBarRef.wrapRef) useEventListener(table.refs.scrollBarRef.wrapRef, "scroll", syncPosition, { passive: true });
- if (props.fit) useResizeObserver(table.vnode.el, resizeListener);
- else useEventListener(window, "resize", resizeListener);
- useResizeObserver(table.refs.tableInnerWrapper, () => {
- resizeListener();
- table.refs?.scrollBarRef?.update();
- });
- };
- const resizeListener = () => {
- const el = table.vnode.el;
- if (!table.$ready || !el) return;
- let shouldUpdateLayout = false;
- const { width: oldWidth, height: oldHeight, headerHeight: oldHeaderHeight } = resizeState.value;
- const width = tableWidth.value = el.offsetWidth;
- if (oldWidth !== width) shouldUpdateLayout = true;
- const height = el.offsetHeight;
- if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) shouldUpdateLayout = true;
- const tableHeader = props.tableLayout === "fixed" ? table.refs.headerWrapper : table.refs.tableHeaderRef?.$el;
- if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) shouldUpdateLayout = true;
- tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0;
- headerScrollHeight.value = tableHeader?.scrollHeight || 0;
- footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0;
- appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0;
- bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value - footerScrollHeight.value - appendScrollHeight.value;
- if (shouldUpdateLayout) {
- resizeState.value = {
- width,
- height,
- headerHeight: props.showHeader && tableHeader?.offsetHeight || 0
- };
- doLayout();
- }
- };
- const tableSize = useFormSize();
- const bodyWidth = computed(() => {
- const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout;
- return bodyWidth_.value ? `${bodyWidth_.value - (scrollY.value ? gutterWidth : 0)}px` : "";
- });
- const tableLayout = computed(() => {
- if (props.maxHeight) return "fixed";
- return props.tableLayout;
- });
- return {
- isHidden,
- renderExpanded,
- setDragVisible,
- isGroup,
- handleMouseLeave,
- handleHeaderFooterMousewheel,
- tableSize,
- emptyBlockStyle: computed(() => {
- if (props.data && props.data.length) return;
- let height = "100%";
- if (props.height && bodyScrollHeight.value) height = `${bodyScrollHeight.value}px`;
- const width = tableWidth.value;
- return {
- width: width ? `${width}px` : "",
- height
- };
- }),
- resizeProxyVisible,
- bodyWidth,
- resizeState,
- doLayout,
- tableBodyStyles,
- tableLayout,
- scrollbarViewStyle,
- scrollbarStyle: computed(() => {
- if (props.height) return { height: "100%" };
- if (props.maxHeight) if (!Number.isNaN(Number(props.maxHeight))) return { maxHeight: `${+props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px` };
- else return { maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value + footerScrollHeight.value}px)` };
- return {};
- })
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table/key-render-helper.mjs
- function useKeyRender(table) {
- let observer;
- const initWatchDom = () => {
- const columnsWrapper = table.vnode.el.querySelector(".hidden-columns");
- const config = {
- childList: true,
- subtree: true
- };
- const updateOrderFns = table.store.states.updateOrderFns;
- observer = new MutationObserver(() => {
- updateOrderFns.forEach((fn) => fn());
- });
- observer.observe(columnsWrapper, config);
- };
- onMounted(() => {
- initWatchDom();
- });
- onUnmounted(() => {
- observer?.disconnect();
- });
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table/defaults.mjs
- var defaults_default$2 = {
- data: {
- type: Array,
- default: () => []
- },
- size: useSizeProp,
- width: [String, Number],
- height: [String, Number],
- maxHeight: [String, Number],
- fit: {
- type: Boolean,
- default: true
- },
- stripe: Boolean,
- border: Boolean,
- rowKey: [String, Function],
- showHeader: {
- type: Boolean,
- default: true
- },
- showSummary: Boolean,
- sumText: String,
- summaryMethod: Function,
- rowClassName: [String, Function],
- rowStyle: [Object, Function],
- cellClassName: [String, Function],
- cellStyle: [Object, Function],
- headerRowClassName: [String, Function],
- headerRowStyle: [Object, Function],
- headerCellClassName: [String, Function],
- headerCellStyle: [Object, Function],
- highlightCurrentRow: Boolean,
- currentRowKey: [String, Number],
- emptyText: String,
- expandRowKeys: Array,
- defaultExpandAll: Boolean,
- rowExpandable: { type: Function },
- defaultSort: Object,
- tooltipEffect: String,
- tooltipOptions: Object,
- spanMethod: Function,
- selectOnIndeterminate: {
- type: Boolean,
- default: true
- },
- indent: {
- type: Number,
- default: 16
- },
- treeProps: {
- type: Object,
- default: () => {
- return {
- hasChildren: "hasChildren",
- children: "children",
- checkStrictly: false
- };
- }
- },
- lazy: Boolean,
- load: Function,
- style: {
- type: [
- String,
- Object,
- Array
- ],
- default: () => ({})
- },
- className: {
- type: String,
- default: ""
- },
- tableLayout: {
- type: String,
- default: "fixed"
- },
- scrollbarAlwaysOn: Boolean,
- flexible: Boolean,
- showOverflowTooltip: {
- type: [Boolean, Object],
- default: void 0
- },
- tooltipFormatter: Function,
- appendFilterPanelTo: String,
- scrollbarTabindex: {
- type: [Number, String],
- default: void 0
- },
- allowDragLastColumn: {
- type: Boolean,
- default: true
- },
- preserveExpandedContent: Boolean,
- nativeScrollbar: Boolean
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/h-helper.mjs
- function hColgroup(props) {
- const isAuto = props.tableLayout === "auto";
- let columns = props.columns || [];
- if (isAuto) {
- if (columns.every(({ width }) => isUndefined(width))) columns = [];
- }
- const getPropsData = (column) => {
- const propsData = {
- key: `${props.tableLayout}_${column.id}`,
- style: {},
- name: void 0
- };
- if (isAuto) propsData.style = { width: `${column.width}px` };
- else propsData.name = column.id;
- return propsData;
- };
- return h$1("colgroup", {}, columns.map((column) => h$1("col", getPropsData(column))));
- }
- hColgroup.props = ["columns", "tableLayout"];
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/composables/use-scrollbar.mjs
- var useScrollbar$1 = () => {
- const scrollBarRef = ref();
- const scrollTo = (options, yCoord) => {
- const scrollbar = scrollBarRef.value;
- if (scrollbar) scrollbar.scrollTo(options, yCoord);
- };
- const setScrollPosition = (position, offset) => {
- const scrollbar = scrollBarRef.value;
- if (scrollbar && isNumber(offset) && ["Top", "Left"].includes(position)) scrollbar[`setScroll${position}`](offset);
- };
- const setScrollTop = (top) => setScrollPosition("Top", top);
- const setScrollLeft = (left) => setScrollPosition("Left", left);
- return {
- scrollBarRef,
- scrollTo,
- setScrollTop,
- setScrollLeft
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table.vue_vue_type_script_lang.mjs
- var tableIdSeed = 1;
- var table_vue_vue_type_script_lang_default = defineComponent({
- name: "ElTable",
- directives: { Mousewheel },
- components: {
- TableHeader: table_header_default,
- TableBody: table_body_default,
- TableFooter: table_footer_default,
- ElScrollbar,
- hColgroup
- },
- props: defaults_default$2,
- emits: [
- "select",
- "select-all",
- "selection-change",
- "cell-mouse-enter",
- "cell-mouse-leave",
- "cell-contextmenu",
- "cell-click",
- "cell-dblclick",
- "row-click",
- "row-contextmenu",
- "row-dblclick",
- "header-click",
- "header-contextmenu",
- "sort-change",
- "filter-change",
- "current-change",
- "header-dragend",
- "expand-change",
- "scroll"
- ],
- setup(props) {
- const { t } = useLocale();
- const ns = useNamespace("table");
- const globalConfig = useGlobalConfig("table");
- const table = getCurrentInstance();
- provide(TABLE_INJECTION_KEY, table);
- const store = createStore(table, props);
- table.store = store;
- const layout = new TableLayout({
- store: table.store,
- table,
- fit: props.fit,
- showHeader: props.showHeader
- });
- table.layout = layout;
- const isEmpty = computed(() => (store.states.data.value || []).length === 0);
- /**
- * open functions
- */
- const { setCurrentRow, getSelectionRows, toggleRowSelection, clearSelection, clearFilter, toggleAllSelection, toggleRowExpansion, clearSort, sort, updateKeyChildren } = useUtils(store);
- const { isHidden, renderExpanded, setDragVisible, isGroup, handleMouseLeave, handleHeaderFooterMousewheel, tableSize, emptyBlockStyle, resizeProxyVisible, bodyWidth, resizeState, doLayout, tableBodyStyles, tableLayout, scrollbarViewStyle, scrollbarStyle } = useStyle(props, layout, store, table);
- const { scrollBarRef, scrollTo, setScrollLeft, setScrollTop } = useScrollbar$1();
- const debouncedUpdateLayout = debounce(doLayout, 50);
- const tableId = `${ns.namespace.value}-table_${tableIdSeed++}`;
- table.tableId = tableId;
- table.state = {
- isGroup,
- resizeState,
- doLayout,
- debouncedUpdateLayout
- };
- const computedSumText = computed(() => props.sumText ?? t("el.table.sumText"));
- const computedEmptyText = computed(() => {
- return props.emptyText ?? t("el.table.emptyText");
- });
- const computedTooltipEffect = computed(() => props.tooltipEffect ?? globalConfig.value?.tooltipEffect);
- const computedTooltipOptions = computed(() => props.tooltipOptions ?? globalConfig.value?.tooltipOptions);
- const columns = computed(() => {
- return convertToRows(store.states.originColumns.value)[0];
- });
- useKeyRender(table);
- onBeforeUnmount(() => {
- debouncedUpdateLayout.cancel();
- });
- return {
- ns,
- layout,
- store,
- columns,
- handleHeaderFooterMousewheel,
- handleMouseLeave,
- tableId,
- tableSize,
- isHidden,
- isEmpty,
- renderExpanded,
- resizeProxyVisible,
- resizeState,
- isGroup,
- bodyWidth,
- tableBodyStyles,
- emptyBlockStyle,
- debouncedUpdateLayout,
- setCurrentRow,
- getSelectionRows,
- toggleRowSelection,
- clearSelection,
- clearFilter,
- toggleAllSelection,
- toggleRowExpansion,
- clearSort,
- doLayout,
- sort,
- updateKeyChildren,
- t,
- setDragVisible,
- context: table,
- computedSumText,
- computedEmptyText,
- computedTooltipEffect,
- computedTooltipOptions,
- tableLayout,
- scrollbarViewStyle,
- scrollbarStyle,
- scrollBarRef,
- scrollTo,
- setScrollLeft,
- setScrollTop,
- allowDragLastColumn: props.allowDragLastColumn
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table.mjs
- var _hoisted_1$15 = ["data-prefix"];
- var _hoisted_2$9 = {
- ref: "hiddenColumns",
- class: "hidden-columns"
- };
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_hColgroup = resolveComponent("hColgroup");
- const _component_table_header = resolveComponent("table-header");
- const _component_table_body = resolveComponent("table-body");
- const _component_table_footer = resolveComponent("table-footer");
- const _component_el_scrollbar = resolveComponent("el-scrollbar");
- const _directive_mousewheel = resolveDirective("mousewheel");
- return openBlock(), createElementBlock("div", {
- ref: "tableWrapper",
- class: normalizeClass([
- {
- [_ctx.ns.m("fit")]: _ctx.fit,
- [_ctx.ns.m("striped")]: _ctx.stripe,
- [_ctx.ns.m("border")]: _ctx.border || _ctx.isGroup,
- [_ctx.ns.m("hidden")]: _ctx.isHidden,
- [_ctx.ns.m("group")]: _ctx.isGroup,
- [_ctx.ns.m("fluid-height")]: _ctx.maxHeight,
- [_ctx.ns.m("scrollable-x")]: _ctx.layout.scrollX.value,
- [_ctx.ns.m("scrollable-y")]: _ctx.layout.scrollY.value,
- [_ctx.ns.m("enable-row-hover")]: !_ctx.store.states.isComplex.value,
- [_ctx.ns.m("enable-row-transition")]: (_ctx.store.states.data.value || []).length !== 0 && (_ctx.store.states.data.value || []).length < 100,
- "has-footer": _ctx.showSummary
- },
- _ctx.ns.m(_ctx.tableSize),
- _ctx.className,
- _ctx.ns.b(),
- _ctx.ns.m(`layout-${_ctx.tableLayout}`)
- ]),
- style: normalizeStyle(_ctx.style),
- "data-prefix": _ctx.ns.namespace.value,
- onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleMouseLeave && _ctx.handleMouseLeave(...args))
- }, [createBaseVNode("div", {
- ref: "tableInnerWrapper",
- class: normalizeClass(_ctx.ns.e("inner-wrapper"))
- }, [
- createBaseVNode("div", _hoisted_2$9, [renderSlot(_ctx.$slots, "default")], 512),
- _ctx.showHeader && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
- key: 0,
- ref: "headerWrapper",
- class: normalizeClass(_ctx.ns.e("header-wrapper"))
- }, [createBaseVNode("table", {
- ref: "tableHeader",
- class: normalizeClass(_ctx.ns.e("header")),
- style: normalizeStyle(_ctx.tableBodyStyles),
- border: "0",
- cellpadding: "0",
- cellspacing: "0"
- }, [createVNode(_component_hColgroup, {
- columns: _ctx.store.states.columns.value,
- "table-layout": _ctx.tableLayout
- }, null, 8, ["columns", "table-layout"]), createVNode(_component_table_header, {
- ref: "tableHeaderRef",
- border: _ctx.border,
- "default-sort": _ctx.defaultSort,
- store: _ctx.store,
- "append-filter-panel-to": _ctx.appendFilterPanelTo,
- "allow-drag-last-column": _ctx.allowDragLastColumn,
- onSetDragVisible: _ctx.setDragVisible
- }, null, 8, [
- "border",
- "default-sort",
- "store",
- "append-filter-panel-to",
- "allow-drag-last-column",
- "onSetDragVisible"
- ])], 6)], 2)), [[_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]]) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- ref: "bodyWrapper",
- class: normalizeClass(_ctx.ns.e("body-wrapper"))
- }, [createVNode(_component_el_scrollbar, {
- ref: "scrollBarRef",
- "view-style": _ctx.scrollbarViewStyle,
- "wrap-style": _ctx.scrollbarStyle,
- always: _ctx.scrollbarAlwaysOn,
- tabindex: _ctx.scrollbarTabindex,
- native: _ctx.nativeScrollbar,
- onScroll: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("scroll", $event))
- }, {
- default: withCtx(() => [
- createBaseVNode("table", {
- ref: "tableBody",
- class: normalizeClass(_ctx.ns.e("body")),
- cellspacing: "0",
- cellpadding: "0",
- border: "0",
- style: normalizeStyle({
- width: _ctx.bodyWidth,
- tableLayout: _ctx.tableLayout
- })
- }, [
- createVNode(_component_hColgroup, {
- columns: _ctx.store.states.columns.value,
- "table-layout": _ctx.tableLayout
- }, null, 8, ["columns", "table-layout"]),
- _ctx.showHeader && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_header, {
- key: 0,
- ref: "tableHeaderRef",
- class: normalizeClass(_ctx.ns.e("body-header")),
- border: _ctx.border,
- "default-sort": _ctx.defaultSort,
- store: _ctx.store,
- "append-filter-panel-to": _ctx.appendFilterPanelTo,
- onSetDragVisible: _ctx.setDragVisible
- }, null, 8, [
- "class",
- "border",
- "default-sort",
- "store",
- "append-filter-panel-to",
- "onSetDragVisible"
- ])) : createCommentVNode("v-if", true),
- createVNode(_component_table_body, {
- context: _ctx.context,
- highlight: _ctx.highlightCurrentRow,
- "row-class-name": _ctx.rowClassName,
- "tooltip-effect": _ctx.computedTooltipEffect,
- "tooltip-options": _ctx.computedTooltipOptions,
- "row-style": _ctx.rowStyle,
- store: _ctx.store,
- stripe: _ctx.stripe
- }, null, 8, [
- "context",
- "highlight",
- "row-class-name",
- "tooltip-effect",
- "tooltip-options",
- "row-style",
- "store",
- "stripe"
- ]),
- _ctx.showSummary && _ctx.tableLayout === "auto" ? (openBlock(), createBlock(_component_table_footer, {
- key: 1,
- class: normalizeClass(_ctx.ns.e("body-footer")),
- border: _ctx.border,
- "default-sort": _ctx.defaultSort,
- store: _ctx.store,
- "sum-text": _ctx.computedSumText,
- "summary-method": _ctx.summaryMethod
- }, null, 8, [
- "class",
- "border",
- "default-sort",
- "store",
- "sum-text",
- "summary-method"
- ])) : createCommentVNode("v-if", true)
- ], 6),
- _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref: "emptyBlock",
- style: normalizeStyle(_ctx.emptyBlockStyle),
- class: normalizeClass(_ctx.ns.e("empty-block"))
- }, [createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(_ctx.computedEmptyText), 1)])], 2)], 6)) : createCommentVNode("v-if", true),
- _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
- key: 1,
- ref: "appendWrapper",
- class: normalizeClass(_ctx.ns.e("append-wrapper"))
- }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
- ]),
- _: 3
- }, 8, [
- "view-style",
- "wrap-style",
- "always",
- "tabindex",
- "native"
- ])], 2),
- _ctx.showSummary && _ctx.tableLayout === "fixed" ? withDirectives((openBlock(), createElementBlock("div", {
- key: 1,
- ref: "footerWrapper",
- class: normalizeClass(_ctx.ns.e("footer-wrapper"))
- }, [createBaseVNode("table", {
- class: normalizeClass(_ctx.ns.e("footer")),
- cellspacing: "0",
- cellpadding: "0",
- border: "0",
- style: normalizeStyle(_ctx.tableBodyStyles)
- }, [createVNode(_component_hColgroup, {
- columns: _ctx.store.states.columns.value,
- "table-layout": _ctx.tableLayout
- }, null, 8, ["columns", "table-layout"]), createVNode(_component_table_footer, {
- border: _ctx.border,
- "default-sort": _ctx.defaultSort,
- store: _ctx.store,
- "sum-text": _ctx.computedSumText,
- "summary-method": _ctx.summaryMethod
- }, null, 8, [
- "border",
- "default-sort",
- "store",
- "sum-text",
- "summary-method"
- ])], 6)], 2)), [[vShow, !_ctx.isEmpty], [_directive_mousewheel, _ctx.handleHeaderFooterMousewheel]]) : createCommentVNode("v-if", true),
- _ctx.border || _ctx.isGroup ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass(_ctx.ns.e("border-left-patch"))
- }, null, 2)) : createCommentVNode("v-if", true)
- ], 2), withDirectives(createBaseVNode("div", {
- ref: "resizeProxy",
- class: normalizeClass(_ctx.ns.e("column-resize-proxy"))
- }, null, 2), [[vShow, _ctx.resizeProxyVisible]])], 46, _hoisted_1$15);
- }
- var table_default = /* @__PURE__ */ _plugin_vue_export_helper_default(table_vue_vue_type_script_lang_default, [["render", _sfc_render$3]]);
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/config.mjs
- var defaultClassNames = {
- selection: "table-column--selection",
- expand: "table__expand-column"
- };
- var cellStarts = {
- default: { order: "" },
- selection: {
- width: 48,
- minWidth: 48,
- realWidth: 48,
- order: ""
- },
- expand: {
- width: 48,
- minWidth: 48,
- realWidth: 48,
- order: ""
- },
- index: {
- width: 48,
- minWidth: 48,
- realWidth: 48,
- order: ""
- }
- };
- var getDefaultClassName = (type) => {
- return defaultClassNames[type] || "";
- };
- var cellForced = {
- selection: {
- renderHeader({ store }) {
- function isDisabled() {
- return store.states.data.value && store.states.data.value.length === 0;
- }
- return h$1(ElCheckbox, {
- disabled: isDisabled(),
- size: store.states.tableSize.value,
- indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
- "onUpdate:modelValue": store.toggleAllSelection ?? void 0,
- modelValue: store.states.isAllSelected.value,
- ariaLabel: store.t("el.table.selectAllLabel")
- });
- },
- renderCell({ row, column, store, $index }) {
- return h$1(ElCheckbox, {
- disabled: column.selectable ? !column.selectable.call(null, row, $index) : false,
- size: store.states.tableSize.value,
- onChange: () => {
- store.commit("rowSelectedChanged", row);
- },
- onClick: (event) => event.stopPropagation(),
- modelValue: store.isSelected(row),
- ariaLabel: store.t("el.table.selectRowLabel")
- });
- },
- sortable: false,
- resizable: false
- },
- index: {
- renderHeader({ column }) {
- return column.label || "#";
- },
- renderCell({ column, $index }) {
- let i = $index + 1;
- const index = column.index;
- if (isNumber(index)) i = $index + index;
- else if (isFunction$1(index)) i = index($index);
- return h$1("div", {}, [i]);
- },
- sortable: false
- },
- expand: {
- renderHeader({ column }) {
- return column.label || "";
- },
- renderCell({ column, row, store, expanded, $index }) {
- const { ns } = store;
- const classes = [ns.e("expand-icon")];
- if (!column.renderExpand && expanded) classes.push(ns.em("expand-icon", "expanded"));
- const callback = function(e) {
- e.stopPropagation();
- store.toggleRowExpansion(row);
- };
- const isRowExpandable = store.states.rowExpandable.value?.(row, $index) ?? true;
- if (!isRowExpandable) classes.push(ns.is("disabled"));
- return h$1("button", {
- type: "button",
- disabled: !isRowExpandable,
- "aria-label": store.t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
- "aria-expanded": expanded,
- class: classes,
- onClick: callback
- }, { default: () => {
- if (column.renderExpand) return [column.renderExpand({
- expanded,
- expandable: isRowExpandable
- })];
- return [h$1(ElIcon, null, { default: () => {
- return [h$1(arrow_right_default)];
- } })];
- } });
- },
- sortable: false,
- resizable: false
- }
- };
- function defaultRenderCell({ row, column, $index }) {
- const property = column.property;
- const value = property && getProp(row, property).value;
- if (column && column.formatter) return column.formatter(row, column, value, $index);
- return value?.toString?.() || "";
- }
- function treeCellPrefix({ row, treeNode, store }, createPlaceholder = false) {
- const { ns } = store;
- if (!treeNode) {
- if (createPlaceholder) return [h$1("span", { class: ns.e("placeholder") })];
- return null;
- }
- const ele = [];
- const callback = function(e) {
- e.stopPropagation();
- if (treeNode.loading) return;
- store.loadOrToggle(row);
- };
- if (treeNode.indent) ele.push(h$1("span", {
- class: ns.e("indent"),
- style: { "padding-left": `${treeNode.indent}px` }
- }));
- if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) {
- const expandClasses = [ns.e("expand-icon"), treeNode.expanded ? ns.em("expand-icon", "expanded") : ""];
- let icon = arrow_right_default;
- if (treeNode.loading) icon = loading_default;
- ele.push(h$1("button", {
- type: "button",
- "aria-label": store.t(treeNode.expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
- "aria-expanded": treeNode.expanded,
- class: expandClasses,
- onClick: callback
- }, { default: () => {
- return [h$1(ElIcon, { class: ns.is("loading", treeNode.loading) }, { default: () => [h$1(icon)] })];
- } }));
- } else ele.push(h$1("span", { class: ns.e("placeholder") }));
- return ele;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-column/watcher-helper.mjs
- function getAllAliases(props, aliases) {
- return props.reduce((prev, cur) => {
- prev[cur] = cur;
- return prev;
- }, aliases);
- }
- function useWatcher(owner, props_) {
- const instance = getCurrentInstance();
- const registerComplexWatchers = () => {
- const props = ["fixed"];
- const aliases = {
- realWidth: "width",
- realMinWidth: "minWidth"
- };
- const allAliases = getAllAliases(props, aliases);
- Object.keys(allAliases).forEach((key) => {
- const columnKey = aliases[key];
- if (hasOwn(props_, columnKey)) watch(() => props_[columnKey], (newVal) => {
- let value = newVal;
- if (columnKey === "width" && key === "realWidth") value = parseWidth(newVal);
- if (columnKey === "minWidth" && key === "realMinWidth") value = parseMinWidth(newVal);
- instance.columnConfig.value[columnKey] = value;
- instance.columnConfig.value[key] = value;
- const updateColumns = columnKey === "fixed";
- owner.value.store.scheduleLayout(updateColumns);
- });
- });
- };
- const registerNormalWatchers = () => {
- const props = [
- "label",
- "filters",
- "filterMultiple",
- "filteredValue",
- "sortable",
- "index",
- "formatter",
- "className",
- "labelClassName",
- "filterClassName",
- "showOverflowTooltip",
- "tooltipFormatter",
- "resizable"
- ];
- const parentProps = ["showOverflowTooltip"];
- const aliases = {
- property: "prop",
- align: "realAlign",
- headerAlign: "realHeaderAlign"
- };
- const allAliases = getAllAliases(props, aliases);
- Object.keys(allAliases).forEach((key) => {
- const columnKey = aliases[key];
- if (hasOwn(props_, columnKey)) watch(() => props_[columnKey], (newVal) => {
- instance.columnConfig.value[key] = newVal;
- if (key === "filters" || key === "filterMethod") instance.columnConfig.value["filterable"] = !!(instance.columnConfig.value["filters"] || instance.columnConfig.value["filterMethod"]);
- });
- });
- parentProps.forEach((key) => {
- if (hasOwn(owner.value.props, key)) watch(() => owner.value.props[key], (newVal) => {
- if (instance.columnConfig.value.type === "selection") return;
- if (!isUndefined(props_[key])) return;
- instance.columnConfig.value[key] = newVal;
- });
- });
- const globalConfig = useGlobalConfig("table");
- if (globalConfig.value && hasOwn(globalConfig.value, "showOverflowTooltip")) watch(() => globalConfig.value?.showOverflowTooltip, (newVal) => {
- if (instance.columnConfig.value.type === "selection") return;
- if (!isUndefined(props_.showOverflowTooltip) || !isUndefined(owner.value.props.showOverflowTooltip)) return;
- instance.columnConfig.value.showOverflowTooltip = newVal;
- });
- };
- return {
- registerComplexWatchers,
- registerNormalWatchers
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-column/render-helper.mjs
- function useRender(props, slots, owner) {
- const instance = getCurrentInstance();
- const columnId = ref("");
- const isSubColumn = ref(false);
- const realAlign = ref();
- const realHeaderAlign = ref();
- const ns = useNamespace("table");
- watchEffect(() => {
- realAlign.value = props.align ? `is-${props.align}` : null;
- realAlign.value;
- });
- watchEffect(() => {
- realHeaderAlign.value = props.headerAlign ? `is-${props.headerAlign}` : realAlign.value;
- realHeaderAlign.value;
- });
- const columnOrTableParent = computed(() => {
- let parent = instance.vnode.vParent || instance.parent;
- while (parent && !parent.tableId && !parent.columnId) parent = parent.vnode.vParent || parent.parent;
- return parent;
- });
- const hasTreeColumn = computed(() => {
- const { store } = instance.parent;
- if (!store) return false;
- const { treeData } = store.states;
- const treeDataValue = treeData.value;
- return treeDataValue && Object.keys(treeDataValue).length > 0;
- });
- const realWidth = ref(parseWidth(props.width));
- const realMinWidth = ref(parseMinWidth(props.minWidth));
- const setColumnWidth = (column) => {
- if (realWidth.value) column.width = realWidth.value;
- if (realMinWidth.value) column.minWidth = realMinWidth.value;
- if (!realWidth.value && realMinWidth.value) column.width = void 0;
- if (!column.minWidth) column.minWidth = 80;
- column.realWidth = Number(isUndefined(column.width) ? column.minWidth : column.width);
- return column;
- };
- const setColumnForcedProps = (column) => {
- const type = column.type;
- const source = cellForced[type] || {};
- Object.keys(source).forEach((prop) => {
- const value = source[prop];
- if (prop !== "className" && !isUndefined(value)) column[prop] = value;
- });
- const className = getDefaultClassName(type);
- if (className) {
- const forceClass = `${unref(ns.namespace)}-${className}`;
- column.className = column.className ? `${column.className} ${forceClass}` : forceClass;
- }
- return column;
- };
- const checkSubColumn = (children) => {
- if (isArray$1(children)) children.forEach((child) => check(child));
- else check(children);
- function check(item) {
- if (item?.type?.name === "ElTableColumn") item.vParent = instance;
- }
- };
- const setColumnRenders = (column) => {
- if (props.renderHeader) debugWarn("TableColumn", "Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header.");
- else if (column.type !== "selection") column.renderHeader = (scope) => {
- instance.columnConfig.value["label"];
- if (slots.header) {
- const slotResult = slots.header(scope);
- if (ensureValidVNode(slotResult)) return h$1(Fragment, slotResult);
- }
- return createTextVNode(column.label);
- };
- if (slots["filter-icon"]) column.renderFilterIcon = (scope) => {
- return renderSlot(slots, "filter-icon", scope);
- };
- if (slots.expand) column.renderExpand = (scope) => {
- return renderSlot(slots, "expand", scope);
- };
- let originRenderCell = column.renderCell;
- if (column.type === "expand") {
- column.renderCell = (data) => h$1("div", { class: "cell" }, [originRenderCell(data)]);
- owner.value.renderExpanded = (row) => {
- return slots.default ? slots.default(row) : slots.default;
- };
- } else {
- originRenderCell = originRenderCell || defaultRenderCell;
- column.renderCell = (data) => {
- let children = null;
- if (slots.default) {
- const vnodes = slots.default(data);
- children = vnodes.some((v) => v.type !== Comment) ? vnodes : originRenderCell(data);
- } else children = originRenderCell(data);
- const { columns } = owner.value.store.states;
- const firstUserColumnIndex = columns.value.findIndex((item) => item.type === "default");
- const prefix = treeCellPrefix(data, hasTreeColumn.value && data.cellIndex === firstUserColumnIndex);
- const props = {
- class: "cell",
- style: {}
- };
- if (column.showOverflowTooltip) {
- props.class = `${props.class} ${unref(ns.namespace)}-tooltip`;
- props.style = { width: `${(data.column.realWidth || Number(data.column.width)) - 1}px` };
- }
- checkSubColumn(children);
- return h$1("div", props, [prefix, children]);
- };
- }
- return column;
- };
- const getPropsData = (...propsKey) => {
- return propsKey.reduce((prev, cur) => {
- if (isArray$1(cur)) cur.forEach((key) => {
- prev[key] = props[key];
- });
- return prev;
- }, {});
- };
- const getColumnElIndex = (children, child) => {
- return Array.prototype.indexOf.call(children, child);
- };
- const updateColumnOrder = () => {
- owner.value.store.commit("updateColumnOrder", instance.columnConfig.value);
- };
- return {
- columnId,
- realAlign,
- isSubColumn,
- realHeaderAlign,
- columnOrTableParent,
- setColumnWidth,
- setColumnForcedProps,
- setColumnRenders,
- getPropsData,
- getColumnElIndex,
- updateColumnOrder
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-column/defaults.mjs
- var defaults_default$1 = {
- type: {
- type: String,
- default: "default"
- },
- label: String,
- className: String,
- labelClassName: String,
- property: String,
- prop: String,
- width: {
- type: [String, Number],
- default: ""
- },
- minWidth: {
- type: [String, Number],
- default: ""
- },
- renderHeader: Function,
- sortable: {
- type: [Boolean, String],
- default: false
- },
- sortMethod: Function,
- sortBy: [
- String,
- Function,
- Array
- ],
- resizable: {
- type: Boolean,
- default: true
- },
- columnKey: String,
- align: String,
- headerAlign: String,
- showOverflowTooltip: {
- type: [Boolean, Object],
- default: void 0
- },
- tooltipFormatter: Function,
- fixed: [Boolean, String],
- formatter: Function,
- selectable: Function,
- reserveSelection: Boolean,
- filterMethod: Function,
- filteredValue: Array,
- filters: Array,
- filterPlacement: String,
- filterMultiple: {
- type: Boolean,
- default: true
- },
- filterClassName: String,
- index: [Number, Function],
- sortOrders: {
- type: Array,
- default: () => {
- return [
- "ascending",
- "descending",
- null
- ];
- },
- validator: (val) => {
- return val.every((order) => [
- "ascending",
- "descending",
- null
- ].includes(order));
- }
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/table-column/index.mjs
- var columnIdSeed = 1;
- //#endregion
- //#region node_modules/element-plus/es/components/table/src/tableColumn.mjs
- var tableColumn_default = defineComponent({
- name: "ElTableColumn",
- components: { ElCheckbox },
- props: defaults_default$1,
- setup(props, { slots }) {
- const instance = getCurrentInstance();
- const globalConfig = useGlobalConfig("table");
- const columnConfig = ref({});
- const owner = computed(() => {
- let parent = instance.parent;
- while (parent && !parent.tableId) parent = parent.parent;
- return parent;
- });
- const { registerNormalWatchers, registerComplexWatchers } = useWatcher(owner, props);
- const { columnId, isSubColumn, realHeaderAlign, columnOrTableParent, setColumnWidth, setColumnForcedProps, setColumnRenders, getPropsData, getColumnElIndex, realAlign, updateColumnOrder } = useRender(props, slots, owner);
- const parent = columnOrTableParent.value;
- columnId.value = `${"tableId" in parent && parent.tableId || "columnId" in parent && parent.columnId}_column_${columnIdSeed++}`;
- onBeforeMount(() => {
- isSubColumn.value = owner.value !== parent;
- const type = props.type || "default";
- const sortable = props.sortable === "" ? true : props.sortable;
- const showOverflowTooltip = type === "selection" ? false : isUndefined(props.showOverflowTooltip) ? parent.props.showOverflowTooltip ?? globalConfig.value?.showOverflowTooltip : props.showOverflowTooltip;
- const tooltipFormatter = isUndefined(props.tooltipFormatter) ? parent.props.tooltipFormatter ?? globalConfig.value?.tooltipFormatter : props.tooltipFormatter;
- const defaults = {
- ...cellStarts[type],
- id: columnId.value,
- type,
- property: props.prop || props.property,
- align: realAlign,
- headerAlign: realHeaderAlign,
- showOverflowTooltip,
- tooltipFormatter,
- filterable: props.filters || props.filterMethod,
- filteredValue: [],
- filterPlacement: "",
- filterClassName: "",
- isColumnGroup: false,
- isSubColumn: false,
- filterOpened: false,
- sortable,
- index: props.index,
- rawColumnKey: instance.vnode.key
- };
- let column = getPropsData([
- "columnKey",
- "label",
- "className",
- "labelClassName",
- "type",
- "renderHeader",
- "formatter",
- "fixed",
- "resizable"
- ], [
- "sortMethod",
- "sortBy",
- "sortOrders"
- ], ["selectable", "reserveSelection"], [
- "filterMethod",
- "filters",
- "filterMultiple",
- "filterOpened",
- "filteredValue",
- "filterPlacement",
- "filterClassName"
- ]);
- column = mergeOptions(defaults, column);
- column = compose(setColumnRenders, setColumnWidth, setColumnForcedProps)(column);
- columnConfig.value = column;
- registerNormalWatchers();
- registerComplexWatchers();
- });
- onMounted(() => {
- const parent = columnOrTableParent.value;
- const children = isSubColumn.value ? parent.vnode.el?.children : parent.refs.hiddenColumns?.children;
- const getColumnIndex = () => getColumnElIndex(children || [], instance.vnode.el);
- columnConfig.value.getColumnIndex = getColumnIndex;
- getColumnIndex() > -1 && owner.value.store.commit("insertColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
- });
- onBeforeUnmount(() => {
- const getColumnIndex = columnConfig.value.getColumnIndex;
- (getColumnIndex ? getColumnIndex() : -1) > -1 && owner.value.store.commit("removeColumn", columnConfig.value, isSubColumn.value ? "columnConfig" in parent && parent.columnConfig.value : null, updateColumnOrder);
- });
- instance.columnId = columnId.value;
- instance.columnConfig = columnConfig;
- },
- render() {
- try {
- const renderDefault = this.$slots.default?.({
- row: {},
- column: {},
- $index: -1
- });
- const children = [];
- if (isArray$1(renderDefault)) {
- for (const childNode of renderDefault) if (childNode.type?.name === "ElTableColumn" || childNode.shapeFlag & 2) children.push(childNode);
- else if (childNode.type === Fragment && isArray$1(childNode.children)) childNode.children.forEach((vnode) => {
- if (vnode?.patchFlag !== 1024 && !isString(vnode?.children)) children.push(vnode);
- });
- }
- return h$1("div", children);
- } catch {
- return h$1("div", []);
- }
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table/index.mjs
- var ElTable = withInstall(table_default, { TableColumn: tableColumn_default });
- var ElTableColumn = withNoopInstall(tableColumn_default);
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/constants.mjs
- var SortOrder = /* @__PURE__ */ function(SortOrder) {
- SortOrder["ASC"] = "asc";
- SortOrder["DESC"] = "desc";
- return SortOrder;
- }({});
- var Alignment = /* @__PURE__ */ function(Alignment) {
- Alignment["LEFT"] = "left";
- Alignment["CENTER"] = "center";
- Alignment["RIGHT"] = "right";
- return Alignment;
- }({});
- var FixedDir = /* @__PURE__ */ function(FixedDir) {
- FixedDir["LEFT"] = "left";
- FixedDir["RIGHT"] = "right";
- return FixedDir;
- }({});
- var oppositeOrderMap = {
- [SortOrder.ASC]: SortOrder.DESC,
- [SortOrder.DESC]: SortOrder.ASC
- };
- SortOrder.ASC, SortOrder.DESC;
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/private.mjs
- var placeholderSign = Symbol("placeholder");
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/common.mjs
- /**
- * @Note even though we can use `string[] | string` as the type but for
- * convenience here we only use `string` as the acceptable value here.
- */
- var classType = String;
- var columns = {
- type: definePropType(Array),
- required: true
- };
- definePropType(Object);
- var fixedDataType = { type: definePropType(Array) };
- var dataType = {
- ...fixedDataType,
- required: true
- };
- var expandColumnKey = String;
- var expandKeys = {
- type: definePropType(Array),
- default: () => mutable([])
- };
- var requiredNumber = {
- type: Number,
- required: true
- };
- var rowKey = {
- type: definePropType([
- String,
- Number,
- Symbol
- ]),
- default: "id"
- };
- /**
- * @note even though we can use `StyleValue` but that would be difficult for us to mapping them,
- * so we only use `CSSProperties` as the acceptable value here.
- */
- var styleType = { type: definePropType(Object) };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/row.mjs
- var tableV2RowProps = buildProps({
- class: String,
- columns,
- columnsStyles: {
- type: definePropType(Object),
- required: true
- },
- depth: Number,
- expandColumnKey,
- estimatedRowHeight: {
- ...virtualizedGridProps.estimatedRowHeight,
- default: void 0
- },
- isScrolling: Boolean,
- onRowExpand: { type: definePropType(Function) },
- onRowHover: { type: definePropType(Function) },
- onRowHeightChange: { type: definePropType(Function) },
- rowData: {
- type: definePropType(Object),
- required: true
- },
- rowEventHandlers: { type: definePropType(Object) },
- rowIndex: {
- type: Number,
- required: true
- },
- rowKey,
- style: { type: definePropType(Object) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/header.mjs
- var requiredNumberType = {
- type: Number,
- required: true
- };
- var tableV2HeaderProps = buildProps({
- class: String,
- columns,
- fixedHeaderData: { type: definePropType(Array) },
- headerData: {
- type: definePropType(Array),
- required: true
- },
- headerHeight: {
- type: definePropType([Number, Array]),
- default: 50
- },
- rowWidth: requiredNumberType,
- rowHeight: {
- type: Number,
- default: 50
- },
- height: requiredNumberType,
- width: requiredNumberType
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/grid.mjs
- var tableV2GridProps = buildProps({
- columns,
- data: dataType,
- fixedData: fixedDataType,
- estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
- width: requiredNumber,
- height: requiredNumber,
- headerWidth: requiredNumber,
- headerHeight: tableV2HeaderProps.headerHeight,
- bodyWidth: requiredNumber,
- rowHeight: requiredNumber,
- cache: virtualizedListProps.cache,
- useIsScrolling: Boolean,
- scrollbarAlwaysOn: virtualizedGridProps.scrollbarAlwaysOn,
- scrollbarStartGap: virtualizedGridProps.scrollbarStartGap,
- scrollbarEndGap: virtualizedGridProps.scrollbarEndGap,
- class: classType,
- style: styleType,
- containerStyle: styleType,
- getRowHeight: {
- type: definePropType(Function),
- required: true
- },
- rowKey: tableV2RowProps.rowKey,
- onRowsRendered: { type: definePropType(Function) },
- onScroll: { type: definePropType(Function) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/table.mjs
- var tableV2Props = buildProps({
- cache: tableV2GridProps.cache,
- estimatedRowHeight: tableV2RowProps.estimatedRowHeight,
- rowKey,
- headerClass: { type: definePropType([String, Function]) },
- headerProps: { type: definePropType([Object, Function]) },
- headerCellProps: { type: definePropType([Object, Function]) },
- headerHeight: tableV2HeaderProps.headerHeight,
- footerHeight: {
- type: Number,
- default: 0
- },
- rowClass: { type: definePropType([String, Function]) },
- rowProps: { type: definePropType([Object, Function]) },
- rowHeight: {
- type: Number,
- default: 50
- },
- cellProps: { type: definePropType([Object, Function]) },
- columns,
- data: dataType,
- dataGetter: { type: definePropType(Function) },
- fixedData: fixedDataType,
- expandColumnKey: tableV2RowProps.expandColumnKey,
- expandedRowKeys: expandKeys,
- defaultExpandedRowKeys: expandKeys,
- class: classType,
- fixed: Boolean,
- style: { type: definePropType(Object) },
- width: requiredNumber,
- height: requiredNumber,
- maxHeight: Number,
- useIsScrolling: Boolean,
- indentSize: {
- type: Number,
- default: 12
- },
- iconSize: {
- type: Number,
- default: 12
- },
- hScrollbarSize: virtualizedGridProps.hScrollbarSize,
- vScrollbarSize: virtualizedGridProps.vScrollbarSize,
- scrollbarAlwaysOn: virtualizedScrollbarProps.alwaysOn,
- sortBy: {
- type: definePropType(Object),
- default: () => ({})
- },
- sortState: {
- type: definePropType(Object),
- default: void 0
- },
- onColumnSort: { type: definePropType(Function) },
- onExpandedRowsChange: { type: definePropType(Function) },
- onEndReached: { type: definePropType(Function) },
- onRowExpand: tableV2RowProps.onRowExpand,
- onScroll: tableV2GridProps.onScroll,
- onRowsRendered: tableV2GridProps.onRowsRendered,
- rowEventHandlers: tableV2RowProps.rowEventHandlers
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/utils.mjs
- var calcColumnStyle = (column, fixedColumn, fixed) => {
- const flex = {
- flexGrow: 0,
- flexShrink: 0,
- ...fixed ? {} : {
- flexGrow: column.flexGrow ?? 0,
- flexShrink: column.flexShrink ?? 1
- }
- };
- const style = {
- ...column.style ?? {},
- ...flex,
- flexBasis: "auto",
- width: column.width
- };
- if (!fixedColumn) {
- if (column.maxWidth) style.maxWidth = column.maxWidth;
- if (column.minWidth) style.minWidth = column.minWidth;
- }
- return style;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/use-columns.mjs
- function useColumns(props, columns, fixed) {
- const _columns = computed(() => unref(columns).map((column, index) => ({
- ...column,
- key: column.key ?? column.dataKey ?? index
- })));
- const visibleColumns = computed(() => {
- return unref(_columns).filter((column) => !column.hidden);
- });
- const fixedColumnsOnLeft = computed(() => unref(visibleColumns).filter((column) => column.fixed === "left" || column.fixed === true));
- const fixedColumnsOnRight = computed(() => unref(visibleColumns).filter((column) => column.fixed === "right"));
- const normalColumns = computed(() => unref(visibleColumns).filter((column) => !column.fixed));
- const mainColumns = computed(() => {
- const ret = [];
- unref(fixedColumnsOnLeft).forEach((column) => {
- ret.push({
- ...column,
- placeholderSign
- });
- });
- unref(normalColumns).forEach((column) => {
- ret.push(column);
- });
- unref(fixedColumnsOnRight).forEach((column) => {
- ret.push({
- ...column,
- placeholderSign
- });
- });
- return ret;
- });
- const hasFixedColumns = computed(() => {
- return unref(fixedColumnsOnLeft).length || unref(fixedColumnsOnRight).length;
- });
- const columnsStyles = computed(() => {
- return unref(_columns).reduce((style, column) => {
- style[column.key] = calcColumnStyle(column, unref(fixed), props.fixed);
- return style;
- }, {});
- });
- const columnsTotalWidth = computed(() => {
- return unref(visibleColumns).reduce((width, column) => width + column.width, 0);
- });
- const getColumn = (key) => {
- return unref(_columns).find((column) => column.key === key);
- };
- const getColumnStyle = (key) => {
- return unref(columnsStyles)[key];
- };
- const updateColumnWidth = (column, width) => {
- column.width = width;
- };
- function onColumnSorted(e) {
- const { key } = e.currentTarget.dataset;
- if (!key) return;
- const { sortState, sortBy } = props;
- let order = SortOrder.ASC;
- if (isObject$2(sortState)) order = oppositeOrderMap[sortState[key]];
- else order = oppositeOrderMap[sortBy.order];
- props.onColumnSort?.({
- column: getColumn(key),
- key,
- order
- });
- }
- return {
- columns: _columns,
- columnsStyles,
- columnsTotalWidth,
- fixedColumnsOnLeft,
- fixedColumnsOnRight,
- hasFixedColumns,
- mainColumns,
- normalColumns,
- visibleColumns,
- getColumn,
- getColumnStyle,
- updateColumnWidth,
- onColumnSorted
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/use-scrollbar.mjs
- var useScrollbar = (props, { mainTableRef, leftTableRef, rightTableRef, onMaybeEndReached }) => {
- const scrollPos = ref({
- scrollLeft: 0,
- scrollTop: 0
- });
- function doScroll(params) {
- const { scrollTop } = params;
- mainTableRef.value?.scrollTo(params);
- leftTableRef.value?.scrollToTop(scrollTop);
- rightTableRef.value?.scrollToTop(scrollTop);
- }
- function scrollTo(params) {
- scrollPos.value = params;
- doScroll(params);
- }
- function scrollToTop(scrollTop) {
- scrollPos.value.scrollTop = scrollTop;
- doScroll(unref(scrollPos));
- }
- function scrollToLeft(scrollLeft) {
- scrollPos.value.scrollLeft = scrollLeft;
- mainTableRef.value?.scrollTo?.(unref(scrollPos));
- }
- function onScroll(params) {
- scrollTo(params);
- props.onScroll?.(params);
- }
- function onVerticalScroll({ scrollTop }) {
- const { scrollTop: currentScrollTop } = unref(scrollPos);
- if (scrollTop !== currentScrollTop) scrollToTop(scrollTop);
- }
- function scrollToRow(row, strategy = "auto") {
- mainTableRef.value?.scrollToRow(row, strategy);
- }
- watch(() => unref(scrollPos).scrollTop, (cur, prev) => {
- if (cur > prev) onMaybeEndReached();
- });
- return {
- scrollPos,
- scrollTo,
- scrollToLeft,
- scrollToTop,
- scrollToRow,
- onScroll,
- onVerticalScroll
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/use-row.mjs
- var useRow = (props, { mainTableRef, leftTableRef, rightTableRef, tableInstance, ns, isScrolling }) => {
- const vm = getCurrentInstance();
- const { emit } = vm;
- const isResetting = shallowRef(false);
- const expandedRowKeys = ref(props.defaultExpandedRowKeys || []);
- const lastRenderedRowIndex = ref(-1);
- const resetIndex = shallowRef(null);
- const rowHeights = ref({});
- const pendingRowHeights = ref({});
- const leftTableHeights = shallowRef({});
- const mainTableHeights = shallowRef({});
- const rightTableHeights = shallowRef({});
- const isDynamic = computed(() => isNumber(props.estimatedRowHeight));
- function onRowsRendered(params) {
- props.onRowsRendered?.(params);
- if (params.rowCacheEnd > unref(lastRenderedRowIndex)) lastRenderedRowIndex.value = params.rowCacheEnd;
- }
- function onRowHovered({ hovered, rowKey }) {
- if (isScrolling.value) return;
- tableInstance.vnode.el.querySelectorAll(`[rowkey="${String(rowKey)}"]`).forEach((row) => {
- if (hovered) row.classList.add(ns.is("hovered"));
- else row.classList.remove(ns.is("hovered"));
- });
- }
- function onRowExpanded({ expanded, rowData, rowIndex, rowKey }) {
- const _expandedRowKeys = [...unref(expandedRowKeys)];
- const currentKeyIndex = _expandedRowKeys.indexOf(rowKey);
- if (expanded) {
- if (currentKeyIndex === -1) _expandedRowKeys.push(rowKey);
- } else if (currentKeyIndex > -1) _expandedRowKeys.splice(currentKeyIndex, 1);
- expandedRowKeys.value = _expandedRowKeys;
- emit("update:expandedRowKeys", _expandedRowKeys);
- props.onRowExpand?.({
- expanded,
- rowData,
- rowIndex,
- rowKey
- });
- props.onExpandedRowsChange?.(_expandedRowKeys);
- if (tableInstance.vnode.el.querySelector(`.${ns.is("hovered")}[rowkey="${String(rowKey)}"]`)) nextTick(() => onRowHovered({
- hovered: true,
- rowKey
- }));
- }
- const flushingRowHeights = debounce(() => {
- isResetting.value = true;
- rowHeights.value = {
- ...unref(rowHeights),
- ...unref(pendingRowHeights)
- };
- resetAfterIndex(unref(resetIndex), false);
- pendingRowHeights.value = {};
- resetIndex.value = null;
- mainTableRef.value?.forceUpdate();
- leftTableRef.value?.forceUpdate();
- rightTableRef.value?.forceUpdate();
- vm.proxy?.$forceUpdate();
- isResetting.value = false;
- }, 0);
- function resetAfterIndex(index, forceUpdate = false) {
- if (!unref(isDynamic)) return;
- [
- mainTableRef,
- leftTableRef,
- rightTableRef
- ].forEach((tableRef) => {
- const table = unref(tableRef);
- if (table) table.resetAfterRowIndex(index, forceUpdate);
- });
- }
- function resetHeights(rowKey, height, rowIdx) {
- const resetIdx = unref(resetIndex);
- if (resetIdx === null) resetIndex.value = rowIdx;
- else if (resetIdx > rowIdx) resetIndex.value = rowIdx;
- pendingRowHeights.value[rowKey] = height;
- }
- function onRowHeightChange({ rowKey, height, rowIndex }, fixedDir) {
- if (!fixedDir) mainTableHeights.value[rowKey] = height;
- else if (fixedDir === FixedDir.RIGHT) rightTableHeights.value[rowKey] = height;
- else leftTableHeights.value[rowKey] = height;
- const maximumHeight = Math.max(...[
- leftTableHeights,
- rightTableHeights,
- mainTableHeights
- ].map((records) => records.value[rowKey] || 0));
- if (unref(rowHeights)[rowKey] !== maximumHeight) {
- resetHeights(rowKey, maximumHeight, rowIndex);
- flushingRowHeights();
- }
- }
- return {
- expandedRowKeys,
- lastRenderedRowIndex,
- isDynamic,
- isResetting,
- rowHeights,
- resetAfterIndex,
- onRowExpanded,
- onRowHovered,
- onRowsRendered,
- onRowHeightChange
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/use-data.mjs
- var useData = (props, { expandedRowKeys, lastRenderedRowIndex, resetAfterIndex }) => {
- const depthMap = ref({});
- const flattenedData = computed(() => {
- const depths = {};
- const { data, rowKey } = props;
- const _expandedRowKeys = unref(expandedRowKeys);
- if (!_expandedRowKeys || !_expandedRowKeys.length) return data;
- const array = [];
- const keysSet = /* @__PURE__ */ new Set();
- _expandedRowKeys.forEach((x) => keysSet.add(x));
- let copy = data.slice();
- copy.forEach((x) => depths[x[rowKey]] = 0);
- while (copy.length > 0) {
- const item = copy.shift();
- array.push(item);
- if (keysSet.has(item[rowKey]) && isArray$1(item.children) && item.children.length > 0) {
- copy = [...item.children, ...copy];
- item.children.forEach((child) => depths[child[rowKey]] = depths[item[rowKey]] + 1);
- }
- }
- depthMap.value = depths;
- return array;
- });
- const data = computed(() => {
- const { data, expandColumnKey } = props;
- return expandColumnKey ? unref(flattenedData) : data;
- });
- watch(data, (val, prev) => {
- if (val !== prev) {
- lastRenderedRowIndex.value = -1;
- resetAfterIndex(0, true);
- }
- });
- return {
- data,
- depthMap
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/utils.mjs
- var sumReducer = (sum, num) => sum + num;
- var sum = (listLike) => {
- return isArray$1(listLike) ? listLike.reduce(sumReducer, 0) : listLike;
- };
- var tryCall = (fLike, params, defaultRet = {}) => {
- return isFunction$1(fLike) ? fLike(params) : fLike ?? defaultRet;
- };
- var enforceUnit = (style) => {
- [
- "width",
- "maxWidth",
- "minWidth",
- "height"
- ].forEach((key) => {
- style[key] = addUnit(style[key]);
- });
- return style;
- };
- var componentToSlot = (ComponentLike) => isVNode(ComponentLike) ? (props) => h$1(ComponentLike, props) : ComponentLike;
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/use-styles.mjs
- var useStyles = (props, { columnsTotalWidth, rowsHeight, fixedColumnsOnLeft, fixedColumnsOnRight }) => {
- const bodyWidth = computed(() => {
- const { fixed, width, vScrollbarSize } = props;
- const ret = width - vScrollbarSize;
- return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret;
- });
- const mainTableHeight = computed(() => {
- const { height = 0, maxHeight = 0, footerHeight, hScrollbarSize } = props;
- if (maxHeight > 0) {
- const _fixedRowsHeight = unref(fixedRowsHeight);
- const _rowsHeight = unref(rowsHeight);
- const total = unref(headerHeight) + _fixedRowsHeight + _rowsHeight + hScrollbarSize;
- return Math.min(total, maxHeight - footerHeight);
- }
- return height - footerHeight;
- });
- const fixedTableHeight = computed(() => {
- const { maxHeight } = props;
- const tableHeight = unref(mainTableHeight);
- if (isNumber(maxHeight) && maxHeight > 0) return tableHeight;
- const totalHeight = unref(rowsHeight) + unref(headerHeight) + unref(fixedRowsHeight);
- return Math.min(tableHeight, totalHeight);
- });
- const mapColumn = (column) => column.width;
- const leftTableWidth = computed(() => sum(unref(fixedColumnsOnLeft).map(mapColumn)));
- const rightTableWidth = computed(() => sum(unref(fixedColumnsOnRight).map(mapColumn)));
- const headerHeight = computed(() => sum(props.headerHeight));
- const fixedRowsHeight = computed(() => {
- return (props.fixedData?.length || 0) * props.rowHeight;
- });
- const windowHeight = computed(() => {
- return unref(mainTableHeight) - unref(headerHeight) - unref(fixedRowsHeight);
- });
- const rootStyle = computed(() => {
- const { style = {}, height, width } = props;
- return enforceUnit({
- ...style,
- height,
- width
- });
- });
- return {
- bodyWidth,
- fixedTableHeight,
- mainTableHeight,
- leftTableWidth,
- rightTableWidth,
- windowHeight,
- footerHeight: computed(() => enforceUnit({ height: props.footerHeight })),
- emptyStyle: computed(() => ({
- top: addUnit(unref(headerHeight)),
- bottom: addUnit(props.footerHeight),
- width: addUnit(props.width)
- })),
- rootStyle,
- headerHeight
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/use-table.mjs
- function useTable(props) {
- const mainTableRef = ref();
- const leftTableRef = ref();
- const rightTableRef = ref();
- const { columns, columnsStyles, columnsTotalWidth, fixedColumnsOnLeft, fixedColumnsOnRight, hasFixedColumns, mainColumns, onColumnSorted } = useColumns(props, toRef(props, "columns"), toRef(props, "fixed"));
- const { scrollTo, scrollToLeft, scrollToTop, scrollToRow, onScroll, onVerticalScroll, scrollPos } = useScrollbar(props, {
- mainTableRef,
- leftTableRef,
- rightTableRef,
- onMaybeEndReached
- });
- const ns = useNamespace("table-v2");
- const instance = getCurrentInstance();
- const isScrolling = shallowRef(false);
- const { expandedRowKeys, lastRenderedRowIndex, isDynamic, isResetting, rowHeights, resetAfterIndex, onRowExpanded, onRowHeightChange, onRowHovered, onRowsRendered } = useRow(props, {
- mainTableRef,
- leftTableRef,
- rightTableRef,
- tableInstance: instance,
- ns,
- isScrolling
- });
- const { data, depthMap } = useData(props, {
- expandedRowKeys,
- lastRenderedRowIndex,
- resetAfterIndex
- });
- const rowsHeight = computed(() => {
- const { estimatedRowHeight, rowHeight } = props;
- const _data = unref(data);
- if (isNumber(estimatedRowHeight)) return Object.values(unref(rowHeights)).reduce((acc, curr) => acc + curr, 0);
- return _data.length * rowHeight;
- });
- const { bodyWidth, fixedTableHeight, mainTableHeight, leftTableWidth, rightTableWidth, windowHeight, footerHeight, emptyStyle, rootStyle, headerHeight } = useStyles(props, {
- columnsTotalWidth,
- fixedColumnsOnLeft,
- fixedColumnsOnRight,
- rowsHeight
- });
- const containerRef = ref();
- const showEmpty = computed(() => {
- const noData = unref(data).length === 0;
- return isArray$1(props.fixedData) ? props.fixedData.length === 0 && noData : noData;
- });
- function getRowHeight(rowIndex) {
- const { estimatedRowHeight, rowHeight, rowKey } = props;
- if (!estimatedRowHeight) return rowHeight;
- return unref(rowHeights)[unref(data)[rowIndex][rowKey]] || estimatedRowHeight;
- }
- const isEndReached = ref(false);
- function onMaybeEndReached() {
- const { onEndReached } = props;
- if (!onEndReached) return;
- const { scrollTop } = unref(scrollPos);
- const _totalHeight = unref(rowsHeight);
- const remainDistance = _totalHeight - (scrollTop + unref(windowHeight)) + props.hScrollbarSize;
- if (!isEndReached.value && unref(lastRenderedRowIndex) >= 0 && _totalHeight <= scrollTop + unref(mainTableHeight) - unref(headerHeight)) {
- isEndReached.value = true;
- onEndReached(remainDistance);
- } else isEndReached.value = false;
- }
- watch(() => unref(rowsHeight), () => isEndReached.value = false);
- watch(() => props.expandedRowKeys, (val) => expandedRowKeys.value = val, { deep: true });
- return {
- columns,
- containerRef,
- mainTableRef,
- leftTableRef,
- rightTableRef,
- isDynamic,
- isResetting,
- isScrolling,
- hasFixedColumns,
- columnsStyles,
- columnsTotalWidth,
- data,
- expandedRowKeys,
- depthMap,
- fixedColumnsOnLeft,
- fixedColumnsOnRight,
- mainColumns,
- bodyWidth,
- emptyStyle,
- rootStyle,
- footerHeight,
- mainTableHeight,
- fixedTableHeight,
- leftTableWidth,
- rightTableWidth,
- showEmpty,
- getRowHeight,
- onColumnSorted,
- onRowHovered,
- onRowExpanded,
- onRowsRendered,
- onRowHeightChange,
- scrollTo,
- scrollToLeft,
- scrollToTop,
- scrollToRow,
- onScroll,
- onVerticalScroll
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/tokens.mjs
- var TableV2InjectionKey = Symbol("tableV2");
- var TABLE_V2_GRID_INJECTION_KEY = "tableV2GridScrollLeft";
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/header.mjs
- var TableV2Header = /* @__PURE__ */ defineComponent({
- name: "ElTableV2Header",
- props: tableV2HeaderProps,
- setup(props, { slots, expose }) {
- const ns = useNamespace("table-v2");
- const scrollLeftInfo = inject(TABLE_V2_GRID_INJECTION_KEY);
- const headerRef = ref();
- const headerStyle = computed(() => enforceUnit({
- width: props.width,
- height: props.height
- }));
- const rowStyle = computed(() => enforceUnit({
- width: props.rowWidth,
- height: props.height
- }));
- const headerHeights = computed(() => castArray$1(unref(props.headerHeight)));
- const scrollToLeft = (left) => {
- const headerEl = unref(headerRef);
- nextTick(() => {
- headerEl?.scroll && headerEl.scroll({ left });
- });
- };
- const renderFixedRows = () => {
- const fixedRowClassName = ns.e("fixed-header-row");
- const { columns, fixedHeaderData, rowHeight } = props;
- return fixedHeaderData?.map((fixedRowData, fixedRowIndex) => {
- const style = enforceUnit({
- height: rowHeight,
- width: "100%"
- });
- return slots.fixed?.({
- class: fixedRowClassName,
- columns,
- rowData: fixedRowData,
- rowIndex: -(fixedRowIndex + 1),
- style
- });
- });
- };
- const renderDynamicRows = () => {
- const dynamicRowClassName = ns.e("dynamic-header-row");
- const { columns } = props;
- return unref(headerHeights).map((rowHeight, rowIndex) => {
- const style = enforceUnit({
- width: "100%",
- height: rowHeight
- });
- return slots.dynamic?.({
- class: dynamicRowClassName,
- columns,
- headerIndex: rowIndex,
- style
- });
- });
- };
- onUpdated(() => {
- if (scrollLeftInfo?.value) scrollToLeft(scrollLeftInfo.value);
- });
- expose({ scrollToLeft });
- return () => {
- if (props.height <= 0) return;
- return createVNode("div", {
- "ref": headerRef,
- "class": props.class,
- "style": unref(headerStyle),
- "role": "rowgroup"
- }, [createVNode("div", {
- "style": unref(rowStyle),
- "class": ns.e("header")
- }, [renderDynamicRows(), renderFixedRows()])]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/table-grid.mjs
- var COMPONENT_NAME$5 = "ElTableV2Grid";
- var useTableGrid = (props) => {
- const headerRef = ref();
- const bodyRef = ref();
- const scrollLeft = ref(0);
- const totalHeight = computed(() => {
- const { data, rowHeight, estimatedRowHeight } = props;
- if (estimatedRowHeight) return;
- return data.length * rowHeight;
- });
- const fixedRowHeight = computed(() => {
- const { fixedData, rowHeight } = props;
- return (fixedData?.length || 0) * rowHeight;
- });
- const headerHeight = computed(() => sum(props.headerHeight));
- const gridHeight = computed(() => {
- const { height } = props;
- return Math.max(0, height - unref(headerHeight) - unref(fixedRowHeight));
- });
- const hasHeader = computed(() => {
- return unref(headerHeight) + unref(fixedRowHeight) > 0;
- });
- const itemKey = ({ data, rowIndex }) => data[rowIndex][props.rowKey];
- function onItemRendered({ rowCacheStart, rowCacheEnd, rowVisibleStart, rowVisibleEnd }) {
- props.onRowsRendered?.({
- rowCacheStart,
- rowCacheEnd,
- rowVisibleStart,
- rowVisibleEnd
- });
- }
- function resetAfterRowIndex(index, forceUpdate) {
- bodyRef.value?.resetAfterRowIndex(index, forceUpdate);
- }
- function scrollTo(leftOrOptions, top) {
- const header$ = unref(headerRef);
- const body$ = unref(bodyRef);
- if (isObject$2(leftOrOptions)) {
- header$?.scrollToLeft(leftOrOptions.scrollLeft);
- scrollLeft.value = leftOrOptions.scrollLeft;
- body$?.scrollTo(leftOrOptions);
- } else {
- header$?.scrollToLeft(leftOrOptions);
- scrollLeft.value = leftOrOptions;
- body$?.scrollTo({
- scrollLeft: leftOrOptions,
- scrollTop: top
- });
- }
- }
- function scrollToTop(scrollTop) {
- unref(bodyRef)?.scrollTo({ scrollTop });
- }
- function scrollToRow(row, strategy) {
- const body = unref(bodyRef);
- if (!body) return;
- const prevScrollLeft = scrollLeft.value;
- body.scrollToItem(row, 0, strategy);
- if (prevScrollLeft) scrollTo({ scrollLeft: prevScrollLeft });
- }
- function forceUpdate() {
- unref(bodyRef)?.$forceUpdate();
- unref(headerRef)?.$forceUpdate();
- }
- watch(() => props.bodyWidth, () => {
- if (isNumber(props.estimatedRowHeight)) bodyRef.value?.resetAfter({ columnIndex: 0 }, false);
- });
- return {
- bodyRef,
- forceUpdate,
- fixedRowHeight,
- gridHeight,
- hasHeader,
- headerHeight,
- headerRef,
- totalHeight,
- itemKey,
- onItemRendered,
- resetAfterRowIndex,
- scrollTo,
- scrollToTop,
- scrollToRow,
- scrollLeft
- };
- };
- var TableGrid = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$5,
- props: tableV2GridProps,
- setup(props, { slots, expose }) {
- const { ns } = inject(TableV2InjectionKey);
- const { bodyRef, fixedRowHeight, gridHeight, hasHeader, headerRef, headerHeight, totalHeight, forceUpdate, itemKey, onItemRendered, resetAfterRowIndex, scrollTo, scrollToTop, scrollToRow, scrollLeft } = useTableGrid(props);
- provide(TABLE_V2_GRID_INJECTION_KEY, scrollLeft);
- onActivated(async () => {
- await nextTick();
- const scrollTop = bodyRef.value?.states.scrollTop;
- scrollTop && scrollToTop(Math.round(scrollTop) + 1);
- });
- expose({
- forceUpdate,
- totalHeight,
- scrollTo,
- scrollToTop,
- scrollToRow,
- resetAfterRowIndex
- });
- const getColumnWidth = () => props.bodyWidth;
- return () => {
- const { cache, columns, data, fixedData, useIsScrolling, scrollbarAlwaysOn, scrollbarEndGap, scrollbarStartGap, style, rowHeight, bodyWidth, estimatedRowHeight, headerWidth, height, width, getRowHeight, onScroll } = props;
- const isDynamicRowEnabled = isNumber(estimatedRowHeight);
- const Grid = isDynamicRowEnabled ? DynamicSizeGrid : FixedSizeGrid;
- const _headerHeight = unref(headerHeight);
- return createVNode("div", {
- "role": "table",
- "class": [ns.e("table"), props.class],
- "style": style
- }, [createVNode(Grid, {
- "ref": bodyRef,
- "data": data,
- "useIsScrolling": useIsScrolling,
- "itemKey": itemKey,
- "columnCache": 0,
- "columnWidth": isDynamicRowEnabled ? getColumnWidth : bodyWidth,
- "totalColumn": 1,
- "totalRow": data.length,
- "rowCache": cache,
- "rowHeight": isDynamicRowEnabled ? getRowHeight : rowHeight,
- "width": width,
- "height": unref(gridHeight),
- "class": ns.e("body"),
- "role": "rowgroup",
- "scrollbarStartGap": scrollbarStartGap,
- "scrollbarEndGap": scrollbarEndGap,
- "scrollbarAlwaysOn": scrollbarAlwaysOn,
- "onScroll": onScroll,
- "onItemRendered": onItemRendered,
- "perfMode": false
- }, { default: (params) => {
- const rowData = data[params.rowIndex];
- return slots.row?.({
- ...params,
- columns,
- rowData
- });
- } }), unref(hasHeader) && createVNode(TableV2Header, {
- "ref": headerRef,
- "class": ns.e("header-wrapper"),
- "columns": columns,
- "headerData": data,
- "headerHeight": props.headerHeight,
- "fixedHeaderData": fixedData,
- "rowWidth": headerWidth,
- "rowHeight": rowHeight,
- "width": width,
- "height": Math.min(_headerHeight + unref(fixedRowHeight), height)
- }, {
- dynamic: slots.header,
- fixed: slots.row
- })]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/main-table.mjs
- function _isSlot$5(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- var MainTable = (props, { slots }) => {
- const { mainTableRef, ...rest } = props;
- return createVNode(TableGrid, mergeProps({ "ref": mainTableRef }, rest), _isSlot$5(slots) ? slots : { default: () => [slots] });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/left-table.mjs
- function _isSlot$4(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- var LeftTable = (props, { slots }) => {
- if (!props.columns.length) return;
- const { leftTableRef, ...rest } = props;
- return createVNode(TableGrid, mergeProps({ "ref": leftTableRef }, rest), _isSlot$4(slots) ? slots : { default: () => [slots] });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/right-table.mjs
- function _isSlot$3(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- var RightTable = (props, { slots }) => {
- if (!props.columns.length) return;
- const { rightTableRef, ...rest } = props;
- return createVNode(TableGrid, mergeProps({ "ref": rightTableRef }, rest), _isSlot$3(slots) ? slots : { default: () => [slots] });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/row.mjs
- var useTableRow = (props) => {
- const { isScrolling } = inject(TableV2InjectionKey);
- const measured = ref(false);
- const rowRef = ref();
- const measurable = computed(() => {
- return isNumber(props.estimatedRowHeight) && props.rowIndex >= 0;
- });
- const doMeasure = (isInit = false) => {
- const $rowRef = unref(rowRef);
- if (!$rowRef) return;
- const { columns, onRowHeightChange, rowKey, rowIndex, style } = props;
- const { height } = $rowRef.getBoundingClientRect();
- measured.value = true;
- nextTick(() => {
- if (isInit || height !== Number.parseInt(style.height)) {
- const firstColumn = columns[0];
- const isPlaceholder = firstColumn?.placeholderSign === placeholderSign;
- onRowHeightChange?.({
- rowKey,
- height,
- rowIndex
- }, firstColumn && !isPlaceholder && firstColumn.fixed);
- }
- });
- };
- const eventHandlers = computed(() => {
- const { rowData, rowIndex, rowKey, onRowHover } = props;
- const handlers = props.rowEventHandlers || {};
- const eventHandlers = {};
- Object.entries(handlers).forEach(([eventName, handler]) => {
- if (isFunction$1(handler)) eventHandlers[eventName] = (event) => {
- handler({
- event,
- rowData,
- rowIndex,
- rowKey
- });
- };
- });
- if (onRowHover) [{
- name: "onMouseleave",
- hovered: false
- }, {
- name: "onMouseenter",
- hovered: true
- }].forEach(({ name, hovered }) => {
- const existedHandler = eventHandlers[name];
- eventHandlers[name] = (event) => {
- onRowHover({
- event,
- hovered,
- rowData,
- rowIndex,
- rowKey
- });
- existedHandler?.(event);
- };
- });
- return eventHandlers;
- });
- const onExpand = (expanded) => {
- const { onRowExpand, rowData, rowIndex, rowKey } = props;
- onRowExpand?.({
- expanded,
- rowData,
- rowIndex,
- rowKey
- });
- };
- onMounted(() => {
- if (unref(measurable)) doMeasure(true);
- });
- return {
- isScrolling,
- measurable,
- measured,
- rowRef,
- eventHandlers,
- onExpand
- };
- };
- var TableV2Row = /* @__PURE__ */ defineComponent({
- name: "ElTableV2TableRow",
- props: tableV2RowProps,
- setup(props, { expose, slots, attrs }) {
- const { eventHandlers, isScrolling, measurable, measured, rowRef, onExpand } = useTableRow(props);
- expose({ onExpand });
- return () => {
- const { columns, columnsStyles, expandColumnKey, depth, rowData, rowIndex, style } = props;
- let ColumnCells = columns.map((column, columnIndex) => {
- const expandable = isArray$1(rowData.children) && rowData.children.length > 0 && column.key === expandColumnKey;
- return slots.cell({
- column,
- columns,
- columnIndex,
- depth,
- style: columnsStyles[column.key],
- rowData,
- rowIndex,
- isScrolling: unref(isScrolling),
- expandIconProps: expandable ? {
- rowData,
- rowIndex,
- onExpand
- } : void 0
- });
- });
- if (slots.row) ColumnCells = slots.row({
- cells: ColumnCells.map((node) => {
- if (isArray$1(node) && node.length === 1) return node[0];
- return node;
- }),
- style,
- columns,
- depth,
- rowData,
- rowIndex,
- isScrolling: unref(isScrolling)
- });
- if (unref(measurable)) {
- const { height, ...exceptHeightStyle } = style || {};
- const _measured = unref(measured);
- return createVNode("div", mergeProps({
- "ref": rowRef,
- "class": props.class,
- "style": _measured ? style : exceptHeightStyle,
- "role": "row"
- }, attrs, unref(eventHandlers)), [ColumnCells]);
- }
- return createVNode("div", mergeProps(attrs, {
- "ref": rowRef,
- "class": props.class,
- "style": style,
- "role": "row"
- }, unref(eventHandlers)), [ColumnCells]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/row.mjs
- function _isSlot$2(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- var RowRenderer = (props, { slots }) => {
- const { columns, columnsStyles, depthMap, expandColumnKey, expandedRowKeys, estimatedRowHeight, hasFixedColumns, rowData, rowIndex, style, isScrolling, rowProps, rowClass, rowKey, rowEventHandlers, ns, onRowHovered, onRowExpanded } = props;
- const rowKls = tryCall(rowClass, {
- columns,
- rowData,
- rowIndex
- }, "");
- const additionalProps = tryCall(rowProps, {
- columns,
- rowData,
- rowIndex
- });
- const _rowKey = rowData[rowKey];
- const depth = depthMap[_rowKey] || 0;
- const canExpand = Boolean(expandColumnKey);
- const isFixedRow = rowIndex < 0;
- const kls = [
- ns.e("row"),
- rowKls,
- ns.is("expanded", canExpand && expandedRowKeys.includes(_rowKey)),
- ns.is("fixed", !depth && isFixedRow),
- ns.is("customized", Boolean(slots.row)),
- { [ns.e(`row-depth-${depth}`)]: canExpand && rowIndex >= 0 }
- ];
- const onRowHover = hasFixedColumns ? onRowHovered : void 0;
- const _rowProps = {
- ...additionalProps,
- columns,
- columnsStyles,
- class: kls,
- depth,
- expandColumnKey,
- estimatedRowHeight: isFixedRow ? void 0 : estimatedRowHeight,
- isScrolling,
- rowIndex,
- rowData,
- rowKey: _rowKey,
- rowEventHandlers,
- style
- };
- const handlerMouseEnter = (e) => {
- onRowHover?.({
- hovered: true,
- rowKey: _rowKey,
- event: e,
- rowData,
- rowIndex
- });
- };
- const handlerMouseLeave = (e) => {
- onRowHover?.({
- hovered: false,
- rowKey: _rowKey,
- event: e,
- rowData,
- rowIndex
- });
- };
- return createVNode(TableV2Row, mergeProps(_rowProps, {
- "onRowExpand": onRowExpanded,
- "onMouseenter": handlerMouseEnter,
- "onMouseleave": handlerMouseLeave,
- "rowkey": _rowKey
- }), _isSlot$2(slots) ? slots : { default: () => [slots] });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/cell.mjs
- var TableV2Cell = (props, { slots }) => {
- const { cellData, style } = props;
- const displayText = cellData?.toString?.() || "";
- const defaultSlot = renderSlot(slots, "default", props, () => [displayText]);
- return createVNode("div", {
- "class": props.class,
- "title": displayText,
- "style": style
- }, [defaultSlot]);
- };
- TableV2Cell.displayName = "ElTableV2Cell";
- TableV2Cell.inheritAttrs = false;
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/expand-icon.mjs
- var ExpandIcon = (props) => {
- const { expanded, expandable, onExpand, style, size, ariaLabel } = props;
- return createVNode("button", mergeProps({
- onClick: expandable ? () => onExpand(!expanded) : void 0,
- ariaLabel,
- ariaExpanded: expanded,
- class: props.class
- }, { "type": "button" }), [createVNode(ElIcon, {
- "size": size,
- "style": style
- }, { default: () => [createVNode(arrow_right_default, null, null)] })]);
- };
- ExpandIcon.inheritAttrs = false;
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/cell.mjs
- var CellRenderer = ({ columns, column, columnIndex, depth, expandIconProps, isScrolling, rowData, rowIndex, style, expandedRowKeys, ns, t, cellProps: _cellProps, expandColumnKey, indentSize, iconSize, rowKey }, { slots }) => {
- const cellStyle = enforceUnit(style);
- if (column.placeholderSign === placeholderSign) return createVNode("div", {
- "class": ns.em("row-cell", "placeholder"),
- "style": cellStyle
- }, null);
- const { cellRenderer, dataKey, dataGetter } = column;
- const cellData = isFunction$1(dataGetter) ? dataGetter({
- columns,
- column,
- columnIndex,
- rowData,
- rowIndex
- }) : get(rowData, dataKey ?? "");
- const extraCellProps = tryCall(_cellProps, {
- cellData,
- columns,
- column,
- columnIndex,
- rowIndex,
- rowData
- });
- const cellProps = {
- class: ns.e("cell-text"),
- columns,
- column,
- columnIndex,
- cellData,
- isScrolling,
- rowData,
- rowIndex
- };
- const columnCellRenderer = componentToSlot(cellRenderer);
- const Cell = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(TableV2Cell, cellProps, null)]);
- const kls = [
- ns.e("row-cell"),
- column.class,
- column.align === Alignment.CENTER && ns.is("align-center"),
- column.align === Alignment.RIGHT && ns.is("align-right")
- ];
- const expandable = rowIndex >= 0 && expandColumnKey && column.key === expandColumnKey;
- const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey]);
- let IconOrPlaceholder;
- const iconStyle = `margin-inline-start: ${depth * indentSize}px;`;
- if (expandable) if (isObject$2(expandIconProps)) IconOrPlaceholder = createVNode(ExpandIcon, mergeProps(expandIconProps, {
- "class": [ns.e("expand-icon"), ns.is("expanded", expanded)],
- "size": iconSize,
- "expanded": expanded,
- "ariaLabel": t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
- "style": iconStyle,
- "expandable": true
- }), null);
- else IconOrPlaceholder = createVNode("div", { "style": [iconStyle, `width: ${iconSize}px; height: ${iconSize}px;`].join(" ") }, null);
- return createVNode("div", mergeProps({
- "class": kls,
- "style": cellStyle
- }, extraCellProps, { "role": "cell" }), [IconOrPlaceholder, Cell]);
- };
- CellRenderer.inheritAttrs = false;
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/header-row.mjs
- var TableV2HeaderRow = /* @__PURE__ */ defineComponent({
- name: "ElTableV2HeaderRow",
- props: buildProps({
- class: String,
- columns,
- columnsStyles: {
- type: definePropType(Object),
- required: true
- },
- headerIndex: Number,
- style: { type: definePropType(Object) }
- }),
- setup(props, { slots }) {
- return () => {
- const { columns, columnsStyles, headerIndex, style } = props;
- let Cells = columns.map((column, columnIndex) => {
- return slots.cell({
- columns,
- column,
- columnIndex,
- headerIndex,
- style: columnsStyles[column.key]
- });
- });
- if (slots.header) Cells = slots.header({
- cells: Cells.map((node) => {
- if (isArray$1(node) && node.length === 1) return node[0];
- return node;
- }),
- columns,
- headerIndex
- });
- return createVNode("div", {
- "class": props.class,
- "style": style,
- "role": "row"
- }, [Cells]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/header.mjs
- function _isSlot$1(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- var HeaderRenderer = ({ columns, columnsStyles, headerIndex, style, headerClass, headerProps, ns }, { slots }) => {
- const param = {
- columns,
- headerIndex
- };
- const kls = [
- ns.e("header-row"),
- tryCall(headerClass, param, ""),
- ns.is("customized", Boolean(slots.header))
- ];
- return createVNode(TableV2HeaderRow, {
- ...tryCall(headerProps, param),
- columnsStyles,
- class: kls,
- columns,
- headerIndex,
- style
- }, _isSlot$1(slots) ? slots : { default: () => [slots] });
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/header-cell.mjs
- var HeaderCell = (props, { slots }) => renderSlot(slots, "default", props, () => [createVNode("div", {
- "class": props.class,
- "title": props.column?.title
- }, [props.column?.title])]);
- HeaderCell.displayName = "ElTableV2HeaderCell";
- HeaderCell.inheritAttrs = false;
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/sort-icon.mjs
- var SortIcon = (props) => {
- const { sortOrder } = props;
- return createVNode("button", {
- "type": "button",
- "aria-label": props.ariaLabel,
- "class": props.class
- }, [createVNode(ElIcon, { "size": 14 }, { default: () => [sortOrder === SortOrder.ASC ? createVNode(sort_up_default, null, null) : createVNode(sort_down_default, null, null)] })]);
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/header-cell.mjs
- var HeaderCellRenderer = (props, { slots }) => {
- const { column, ns, t, style, onColumnSorted } = props;
- const cellStyle = enforceUnit(style);
- if (column.placeholderSign === placeholderSign) return createVNode("div", {
- "class": ns.em("header-row-cell", "placeholder"),
- "style": cellStyle
- }, null);
- const { headerCellRenderer, headerClass, sortable } = column;
- /**
- * render Cell children
- */
- const cellProps = {
- ...props,
- class: ns.e("header-cell-text")
- };
- const columnCellRenderer = componentToSlot(headerCellRenderer);
- const Cell = columnCellRenderer ? columnCellRenderer(cellProps) : renderSlot(slots, "default", cellProps, () => [createVNode(HeaderCell, cellProps, null)]);
- /**
- * Render cell container and sort indicator
- */
- const { sortBy, sortState, headerCellProps } = props;
- let sorting, sortOrder, ariaSort;
- if (sortState) {
- const order = sortState[column.key];
- sorting = Boolean(oppositeOrderMap[order]);
- sortOrder = sorting ? order : SortOrder.ASC;
- } else {
- sorting = column.key === sortBy.key;
- sortOrder = sorting ? sortBy.order : SortOrder.ASC;
- }
- if (sortOrder === SortOrder.ASC) ariaSort = "ascending";
- else if (sortOrder === SortOrder.DESC) ariaSort = "descending";
- else ariaSort = void 0;
- const cellKls = [
- ns.e("header-cell"),
- tryCall(headerClass, props, ""),
- column.align === Alignment.CENTER && ns.is("align-center"),
- column.align === Alignment.RIGHT && ns.is("align-right"),
- sortable && ns.is("sortable")
- ];
- return createVNode("div", mergeProps({
- ...tryCall(headerCellProps, props),
- onClick: column.sortable ? onColumnSorted : void 0,
- ariaSort: sortable ? ariaSort : void 0,
- class: cellKls,
- style: cellStyle,
- ["data-key"]: column.key
- }, { "role": "columnheader" }), [Cell, sortable && createVNode(SortIcon, {
- "class": [ns.e("sort-icon"), sorting && ns.is("sorting")],
- "sortOrder": sortOrder,
- "ariaLabel": t("el.table.sortLabel", { column: column.title || "" })
- }, null)]);
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/footer.mjs
- var Footer$1 = (props, { slots }) => {
- return createVNode("div", {
- "class": props.class,
- "style": props.style
- }, [slots.default?.()]);
- };
- Footer$1.displayName = "ElTableV2Footer";
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/empty.mjs
- var Footer = (props, { slots }) => {
- const defaultSlot = renderSlot(slots, "default", {}, () => [createVNode(ElEmpty, null, null)]);
- return createVNode("div", {
- "class": props.class,
- "style": props.style
- }, [defaultSlot]);
- };
- Footer.displayName = "ElTableV2Empty";
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/renderers/overlay.mjs
- var Overlay = (props, { slots }) => {
- return createVNode("div", {
- "class": props.class,
- "style": props.style
- }, [slots.default?.()]);
- };
- Overlay.displayName = "ElTableV2Overlay";
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/table-v2.mjs
- function _isSlot(s) {
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
- }
- var TableV2 = /* @__PURE__ */ defineComponent({
- name: "ElTableV2",
- props: tableV2Props,
- setup(props, { slots, expose }) {
- const ns = useNamespace("table-v2");
- const { t } = useLocale();
- const { columnsStyles, fixedColumnsOnLeft, fixedColumnsOnRight, mainColumns, mainTableHeight, fixedTableHeight, leftTableWidth, rightTableWidth, data, depthMap, expandedRowKeys, hasFixedColumns, mainTableRef, leftTableRef, rightTableRef, isDynamic, isResetting, isScrolling, bodyWidth, emptyStyle, rootStyle, footerHeight, showEmpty, scrollTo, scrollToLeft, scrollToTop, scrollToRow, getRowHeight, onColumnSorted, onRowHeightChange, onRowHovered, onRowExpanded, onRowsRendered, onScroll, onVerticalScroll } = useTable(props);
- expose({
- scrollTo,
- scrollToLeft,
- scrollToTop,
- scrollToRow
- });
- provide(TableV2InjectionKey, {
- ns,
- isResetting,
- isScrolling
- });
- return () => {
- const { cache, cellProps, estimatedRowHeight, expandColumnKey, fixedData, headerHeight, headerClass, headerProps, headerCellProps, sortBy, sortState, rowHeight, rowClass, rowEventHandlers, rowKey, rowProps, scrollbarAlwaysOn, indentSize, iconSize, useIsScrolling, vScrollbarSize, width } = props;
- const _data = unref(data);
- const mainTableProps = {
- cache,
- class: ns.e("main"),
- columns: unref(mainColumns),
- data: _data,
- fixedData,
- estimatedRowHeight,
- bodyWidth: unref(bodyWidth),
- headerHeight,
- headerWidth: unref(bodyWidth),
- height: unref(mainTableHeight),
- mainTableRef,
- rowKey,
- rowHeight,
- scrollbarAlwaysOn,
- scrollbarStartGap: 2,
- scrollbarEndGap: vScrollbarSize,
- useIsScrolling,
- width,
- getRowHeight,
- onRowsRendered,
- onScroll
- };
- const leftColumnsWidth = unref(leftTableWidth);
- const _fixedTableHeight = unref(fixedTableHeight);
- const leftTableProps = {
- cache,
- class: ns.e("left"),
- columns: unref(fixedColumnsOnLeft),
- data: _data,
- fixedData,
- estimatedRowHeight,
- leftTableRef,
- rowHeight,
- bodyWidth: leftColumnsWidth,
- headerWidth: leftColumnsWidth,
- headerHeight,
- height: _fixedTableHeight,
- rowKey,
- scrollbarAlwaysOn,
- scrollbarStartGap: 2,
- scrollbarEndGap: vScrollbarSize,
- useIsScrolling,
- width: leftColumnsWidth,
- getRowHeight,
- onScroll: onVerticalScroll
- };
- const rightColumnsWidth = unref(rightTableWidth);
- const rightTableProps = {
- cache,
- class: ns.e("right"),
- columns: unref(fixedColumnsOnRight),
- data: _data,
- fixedData,
- estimatedRowHeight,
- rightTableRef,
- rowHeight,
- bodyWidth: rightColumnsWidth,
- headerWidth: rightColumnsWidth,
- headerHeight,
- height: _fixedTableHeight,
- rowKey,
- scrollbarAlwaysOn,
- scrollbarStartGap: 2,
- scrollbarEndGap: vScrollbarSize,
- width: rightColumnsWidth,
- style: `${ns.cssVarName("table-scrollbar-size")}: ${vScrollbarSize}px`,
- useIsScrolling,
- getRowHeight,
- onScroll: onVerticalScroll
- };
- const _columnsStyles = unref(columnsStyles);
- const tableRowProps = {
- ns,
- depthMap: unref(depthMap),
- columnsStyles: _columnsStyles,
- expandColumnKey,
- expandedRowKeys: unref(expandedRowKeys),
- estimatedRowHeight,
- hasFixedColumns: unref(hasFixedColumns),
- rowProps,
- rowClass,
- rowKey,
- rowEventHandlers,
- onRowHovered,
- onRowExpanded,
- onRowHeightChange
- };
- const tableCellProps = {
- cellProps,
- expandColumnKey,
- indentSize,
- iconSize,
- rowKey,
- expandedRowKeys: unref(expandedRowKeys),
- ns,
- t
- };
- const tableHeaderProps = {
- ns,
- headerClass,
- headerProps,
- columnsStyles: _columnsStyles
- };
- const tableHeaderCellProps = {
- ns,
- t,
- sortBy,
- sortState,
- headerCellProps,
- onColumnSorted
- };
- const tableSlots = {
- row: (props) => createVNode(RowRenderer, mergeProps(props, tableRowProps), {
- row: slots.row,
- cell: (props) => {
- let _slot;
- return slots.cell ? createVNode(CellRenderer, mergeProps(props, tableCellProps, { "style": _columnsStyles[props.column.key] }), _isSlot(_slot = slots.cell(props)) ? _slot : { default: () => [_slot] }) : createVNode(CellRenderer, mergeProps(props, tableCellProps, { "style": _columnsStyles[props.column.key] }), null);
- }
- }),
- header: (props) => createVNode(HeaderRenderer, mergeProps(props, tableHeaderProps), {
- header: slots.header,
- cell: (props) => {
- let _slot2;
- return slots["header-cell"] ? createVNode(HeaderCellRenderer, mergeProps(props, tableHeaderCellProps, { "style": _columnsStyles[props.column.key] }), _isSlot(_slot2 = slots["header-cell"](props)) ? _slot2 : { default: () => [_slot2] }) : createVNode(HeaderCellRenderer, mergeProps(props, tableHeaderCellProps, { "style": _columnsStyles[props.column.key] }), null);
- }
- })
- };
- const rootKls = [
- props.class,
- ns.b(),
- ns.e("root"),
- ns.is("dynamic", unref(isDynamic))
- ];
- const footerProps = {
- class: ns.e("footer"),
- style: unref(footerHeight)
- };
- return createVNode("div", {
- "class": rootKls,
- "style": unref(rootStyle)
- }, [
- createVNode(MainTable, mainTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
- createVNode(LeftTable, leftTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
- createVNode(RightTable, rightTableProps, _isSlot(tableSlots) ? tableSlots : { default: () => [tableSlots] }),
- slots.footer && createVNode(Footer$1, footerProps, { default: slots.footer }),
- unref(showEmpty) && createVNode(Footer, {
- "class": ns.e("empty"),
- "style": unref(emptyStyle)
- }, { default: slots.empty }),
- slots.overlay && createVNode(Overlay, { "class": ns.e("overlay") }, { default: slots.overlay })
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/auto-resizer.mjs
- var autoResizerProps = buildProps({
- disableWidth: Boolean,
- disableHeight: Boolean,
- onResize: { type: definePropType(Function) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/composables/use-auto-resize.mjs
- var useAutoResize = (props) => {
- const sizer = ref();
- const width$ = ref(0);
- const height$ = ref(0);
- let resizerStopper;
- onMounted(() => {
- resizerStopper = useResizeObserver(sizer, ([entry]) => {
- const { width, height } = entry.contentRect;
- const { paddingLeft, paddingRight, paddingTop, paddingBottom } = getComputedStyle(entry.target);
- const left = Number.parseInt(paddingLeft) || 0;
- const right = Number.parseInt(paddingRight) || 0;
- const top = Number.parseInt(paddingTop) || 0;
- const bottom = Number.parseInt(paddingBottom) || 0;
- width$.value = width - left - right;
- height$.value = height - top - bottom;
- }).stop;
- });
- onBeforeUnmount(() => {
- resizerStopper?.();
- });
- watch([width$, height$], ([width, height]) => {
- props.onResize?.({
- width,
- height
- });
- });
- return {
- sizer,
- width: width$,
- height: height$
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/src/components/auto-resizer.mjs
- var AutoResizer = /* @__PURE__ */ defineComponent({
- name: "ElAutoResizer",
- props: autoResizerProps,
- setup(props, { slots }) {
- const ns = useNamespace("auto-resizer");
- const { height, width, sizer } = useAutoResize(props);
- const style = {
- width: "100%",
- height: "100%"
- };
- return () => {
- return createVNode("div", {
- "ref": sizer,
- "class": ns.b(),
- "style": style
- }, [slots.default?.({
- height: height.value,
- width: width.value
- })]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/table-v2/index.mjs
- var ElTableV2 = withInstall(TableV2);
- var ElAutoResizer = withInstall(AutoResizer);
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/constants.mjs
- var tabsRootContextKey = Symbol("tabsRootContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-bar.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TabBarProps` instead.
- */
- var tabBarProps = buildProps({
- tabs: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- tabRefs: {
- type: definePropType(Object),
- default: () => mutable({})
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-bar.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$4 = "ElTabBar";
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-bar2.mjs
- var tab_bar_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$4,
- __name: "tab-bar",
- props: tabBarProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const rootTabs = inject(tabsRootContextKey);
- if (!rootTabs) throwError(COMPONENT_NAME$4, "<el-tabs><el-tab-bar /></el-tabs>");
- const ns = useNamespace("tabs");
- const barRef = ref();
- const barStyle = ref();
- /**
- * when defaultValue is not set, the bar is always shown.
- *
- * when defaultValue is set, the bar will be hidden until style is calculated
- * to avoid the bar showing in the wrong position on initial render.
- */
- const renderActiveBar = computed(() => isUndefined(rootTabs.props.defaultValue) || Boolean(barStyle.value?.transform));
- const getBarStyle = () => {
- let offset = 0;
- let tabSize = 0;
- const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
- const sizeDir = sizeName === "width" ? "x" : "y";
- const position = sizeDir === "x" ? "left" : "top";
- props.tabs.every((tab) => {
- if (isUndefined(tab.paneName)) return false;
- const $el = props.tabRefs[tab.paneName];
- if (!$el) return false;
- if (!tab.active) return true;
- offset = $el[`offset${capitalize(position)}`];
- tabSize = $el[`client${capitalize(sizeName)}`];
- const tabStyles = window.getComputedStyle($el);
- if (sizeName === "width") {
- tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
- offset += Number.parseFloat(tabStyles.paddingLeft);
- }
- return false;
- });
- return {
- [sizeName]: `${tabSize}px`,
- transform: `translate${capitalize(sizeDir)}(${offset}px)`
- };
- };
- const update = () => barStyle.value = getBarStyle();
- const tabObservers = [];
- const observerTabs = () => {
- tabObservers.forEach((observer) => observer.stop());
- tabObservers.length = 0;
- Object.values(props.tabRefs).forEach((tab) => {
- tabObservers.push(useResizeObserver(tab, update));
- });
- };
- watch(() => props.tabs, async () => {
- await nextTick();
- update();
- observerTabs();
- }, { immediate: true });
- const barObserver = useResizeObserver(barRef, () => update());
- onBeforeUnmount(() => {
- tabObservers.forEach((observer) => observer.stop());
- tabObservers.length = 0;
- barObserver.stop();
- });
- __expose({
- ref: barRef,
- update
- });
- return (_ctx, _cache) => {
- return renderActiveBar.value ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref_key: "barRef",
- ref: barRef,
- class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
- style: normalizeStyle(barStyle.value)
- }, null, 6)) : createCommentVNode("v-if", true);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-nav.mjs
- var tabNavProps = buildProps({
- panes: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- currentName: {
- type: [String, Number],
- default: ""
- },
- editable: Boolean,
- type: {
- type: String,
- values: [
- "card",
- "border-card",
- ""
- ],
- default: ""
- },
- stretch: Boolean,
- tabindex: {
- type: [String, Number],
- default: void 0
- }
- });
- var tabNavEmits = {
- tabClick: (tab, tabName, ev) => ev instanceof Event,
- tabRemove: (tab, ev) => ev instanceof Event
- };
- var COMPONENT_NAME$3 = "ElTabNav";
- var TabNav = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$3,
- props: tabNavProps,
- emits: tabNavEmits,
- setup(props, { expose, emit }) {
- const rootTabs = inject(tabsRootContextKey);
- if (!rootTabs) throwError(COMPONENT_NAME$3, `<el-tabs><tab-nav /></el-tabs>`);
- const ns = useNamespace("tabs");
- const visibility = useDocumentVisibility();
- const focused = useWindowFocus();
- const navScroll$ = ref();
- const nav$ = ref();
- const el$ = ref();
- const tabRefsMap = ref({});
- const tabBarRef = ref();
- const scrollable = ref(false);
- const navOffset = ref(0);
- const isFocus = ref(false);
- const focusable = ref(true);
- const tracker = shallowRef();
- const isHorizontal = computed(() => ["top", "bottom"].includes(rootTabs.props.tabPosition));
- const sizeName = computed(() => isHorizontal.value ? "width" : "height");
- const navStyle = computed(() => {
- return { transform: `translate${sizeName.value === "width" ? "X" : "Y"}(-${navOffset.value}px)` };
- });
- const { width: navContainerWidth, height: navContainerHeight } = useElementSize(navScroll$);
- const { width: navWidth, height: navHeight } = useElementSize(nav$, {
- width: 0,
- height: 0
- }, { box: "border-box" });
- const navContainerSize = computed(() => isHorizontal.value ? navContainerWidth.value : navContainerHeight.value);
- const navSize = computed(() => isHorizontal.value ? navWidth.value : navHeight.value);
- const { onWheel } = useWheel({
- atStartEdge: computed(() => navOffset.value <= 0),
- atEndEdge: computed(() => navSize.value - navOffset.value <= navContainerSize.value),
- layout: computed(() => isHorizontal.value ? "horizontal" : "vertical")
- }, (offset) => {
- navOffset.value = clamp$2(navOffset.value + offset, 0, navSize.value - navContainerSize.value);
- });
- const scrollPrev = () => {
- if (!navScroll$.value) return;
- const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
- const currentOffset = navOffset.value;
- if (!currentOffset) return;
- navOffset.value = currentOffset > containerSize ? currentOffset - containerSize : 0;
- };
- const scrollNext = () => {
- if (!navScroll$.value || !nav$.value) return;
- const navSize = nav$.value[`offset${capitalize(sizeName.value)}`];
- const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
- const currentOffset = navOffset.value;
- if (navSize - currentOffset <= containerSize) return;
- navOffset.value = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize;
- };
- const scrollToActiveTab = async () => {
- const nav = nav$.value;
- if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return;
- await nextTick();
- const activeTab = tabRefsMap.value[props.currentName];
- if (!activeTab) return;
- const navScroll = navScroll$.value;
- const activeTabBounding = activeTab.getBoundingClientRect();
- const navScrollBounding = navScroll.getBoundingClientRect();
- const maxOffset = isHorizontal.value ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height;
- const currentOffset = navOffset.value;
- let newOffset = currentOffset;
- if (isHorizontal.value) {
- if (activeTabBounding.left < navScrollBounding.left) newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left);
- if (activeTabBounding.right > navScrollBounding.right) newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right;
- } else {
- if (activeTabBounding.top < navScrollBounding.top) newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top);
- if (activeTabBounding.bottom > navScrollBounding.bottom) newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom);
- }
- newOffset = Math.max(newOffset, 0);
- navOffset.value = Math.min(newOffset, maxOffset);
- };
- const update = () => {
- if (!nav$.value || !navScroll$.value) return;
- props.stretch && tabBarRef.value?.update();
- const navSize = nav$.value[`offset${capitalize(sizeName.value)}`];
- const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`];
- const currentOffset = navOffset.value;
- if (containerSize < navSize) {
- scrollable.value = scrollable.value || {};
- scrollable.value.prev = currentOffset;
- scrollable.value.next = currentOffset + containerSize < navSize;
- if (navSize - currentOffset < containerSize) navOffset.value = navSize - containerSize;
- } else {
- scrollable.value = false;
- if (currentOffset > 0) navOffset.value = 0;
- }
- };
- const changeTab = (event) => {
- const code = getEventCode(event);
- let step = 0;
- switch (code) {
- case EVENT_CODE.left:
- case EVENT_CODE.up:
- step = -1;
- break;
- case EVENT_CODE.right:
- case EVENT_CODE.down:
- step = 1;
- break;
- default: return;
- }
- const tabList = Array.from(event.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
- let nextIndex = tabList.indexOf(event.target) + step;
- if (nextIndex < 0) nextIndex = tabList.length - 1;
- else if (nextIndex >= tabList.length) nextIndex = 0;
- tabList[nextIndex].focus({ preventScroll: true });
- tabList[nextIndex].click();
- setFocus();
- };
- const setFocus = () => {
- if (focusable.value) isFocus.value = true;
- };
- const removeFocus = () => isFocus.value = false;
- const setRefs = (el, key) => {
- tabRefsMap.value[key] = el;
- };
- const focusActiveTab = async () => {
- await nextTick();
- tabRefsMap.value[props.currentName]?.focus({ preventScroll: true });
- };
- watch(visibility, (visibility) => {
- if (visibility === "hidden") focusable.value = false;
- else if (visibility === "visible") setTimeout(() => focusable.value = true, 50);
- });
- watch(focused, (focused) => {
- if (focused) setTimeout(() => focusable.value = true, 50);
- else focusable.value = false;
- });
- useResizeObserver(el$, () => {
- rAF(update);
- });
- onMounted(() => setTimeout(() => scrollToActiveTab(), 0));
- onUpdated(() => update());
- expose({
- scrollToActiveTab,
- removeFocus,
- focusActiveTab,
- tabListRef: nav$,
- tabBarRef,
- scheduleRender: () => triggerRef(tracker)
- });
- return () => {
- const scrollBtn = scrollable.value ? [createVNode("span", {
- "class": [ns.e("nav-prev"), ns.is("disabled", !scrollable.value.prev)],
- "onClick": scrollPrev
- }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_left_default, null, null)] })]), createVNode("span", {
- "class": [ns.e("nav-next"), ns.is("disabled", !scrollable.value.next)],
- "onClick": scrollNext
- }, [createVNode(ElIcon, null, { default: () => [createVNode(arrow_right_default, null, null)] })])] : null;
- const tabs = props.panes.map((pane, index) => {
- const uid = pane.uid;
- const disabled = pane.props.disabled;
- const tabName = pane.props.name ?? pane.index ?? `${index}`;
- const closable = !disabled && (pane.isClosable || pane.props.closable !== false && props.editable);
- pane.index = `${index}`;
- const btnClose = closable ? createVNode(ElIcon, {
- "class": "is-icon-close",
- "onClick": (ev) => emit("tabRemove", pane, ev)
- }, { default: () => [createVNode(close_default, null, null)] }) : null;
- const tabLabelContent = pane.slots.label?.() || pane.props.label;
- const tabindex = !disabled && pane.active ? props.tabindex ?? rootTabs.props.tabindex : -1;
- return createVNode("div", {
- "ref": (el) => setRefs(el, tabName),
- "class": [
- ns.e("item"),
- ns.is(rootTabs.props.tabPosition),
- ns.is("active", pane.active),
- ns.is("disabled", disabled),
- ns.is("closable", closable),
- ns.is("focus", isFocus.value)
- ],
- "id": `tab-${tabName}`,
- "key": `tab-${uid}`,
- "aria-controls": `pane-${tabName}`,
- "role": "tab",
- "aria-selected": pane.active,
- "tabindex": tabindex,
- "onFocus": () => setFocus(),
- "onBlur": () => removeFocus(),
- "onClick": (ev) => {
- removeFocus();
- emit("tabClick", pane, tabName, ev);
- },
- "onKeydown": (ev) => {
- const code = getEventCode(ev);
- if (closable && (code === EVENT_CODE.delete || code === EVENT_CODE.backspace)) emit("tabRemove", pane, ev);
- }
- }, [...[tabLabelContent, btnClose]]);
- });
- tracker.value;
- return createVNode("div", {
- "ref": el$,
- "class": [
- ns.e("nav-wrap"),
- ns.is("scrollable", !!scrollable.value),
- ns.is(rootTabs.props.tabPosition)
- ]
- }, [scrollBtn, createVNode("div", {
- "class": ns.e("nav-scroll"),
- "ref": navScroll$
- }, [props.panes.length > 0 ? createVNode("div", {
- "class": [
- ns.e("nav"),
- ns.is(rootTabs.props.tabPosition),
- ns.is("stretch", props.stretch && ["top", "bottom"].includes(rootTabs.props.tabPosition))
- ],
- "ref": nav$,
- "style": navStyle.value,
- "role": "tablist",
- "onKeydown": changeTab,
- "onWheel": onWheel
- }, [...[!props.type ? createVNode(tab_bar_default, {
- "ref": tabBarRef,
- "tabs": [...props.panes],
- "tabRefs": tabRefsMap.value
- }, null) : null, tabs]]) : null])]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tabs.mjs
- var tabsProps = buildProps({
- type: {
- type: String,
- values: [
- "card",
- "border-card",
- ""
- ],
- default: ""
- },
- closable: Boolean,
- addable: Boolean,
- modelValue: { type: [String, Number] },
- defaultValue: { type: [String, Number] },
- editable: Boolean,
- tabPosition: {
- type: String,
- values: [
- "top",
- "right",
- "bottom",
- "left"
- ],
- default: "top"
- },
- beforeLeave: {
- type: definePropType(Function),
- default: () => true
- },
- stretch: Boolean,
- tabindex: {
- type: [String, Number],
- default: 0
- }
- });
- var isPaneName = (value) => isString(value) || isNumber(value);
- var tabsEmits = {
- [UPDATE_MODEL_EVENT]: (name) => isPaneName(name),
- tabClick: (pane, ev) => ev instanceof Event,
- tabChange: (name) => isPaneName(name),
- edit: (paneName, action) => ["remove", "add"].includes(action),
- tabRemove: (name) => isPaneName(name),
- tabAdd: () => true
- };
- var Tabs = /* @__PURE__ */ defineComponent({
- name: "ElTabs",
- props: tabsProps,
- emits: tabsEmits,
- setup(props, { emit, slots, expose }) {
- const ns = useNamespace("tabs");
- const isVertical = computed(() => ["left", "right"].includes(props.tabPosition));
- const { children: panes, addChild: registerPane, removeChild: unregisterPane, ChildrenSorter: PanesSorter } = useOrderedChildren(getCurrentInstance(), "ElTabPane");
- const nav$ = ref();
- const currentName = ref((isUndefined(props.modelValue) ? props.defaultValue : props.modelValue) ?? "0");
- const setCurrentName = async (value, trigger = false) => {
- if (currentName.value === value || isUndefined(value)) return;
- try {
- let canLeave;
- if (props.beforeLeave) {
- const result = props.beforeLeave(value, currentName.value);
- canLeave = result instanceof Promise ? await result : result;
- } else canLeave = true;
- if (canLeave !== false) {
- const isFocusInsidePane = panes.value.find((item) => item.paneName === currentName.value)?.isFocusInsidePane();
- currentName.value = value;
- if (trigger) {
- emit(UPDATE_MODEL_EVENT, value);
- emit("tabChange", value);
- }
- nav$.value?.removeFocus?.();
- if (isFocusInsidePane) nav$.value?.focusActiveTab();
- }
- } catch {}
- };
- const handleTabClick = (tab, tabName, event) => {
- if (tab.props.disabled) return;
- emit("tabClick", tab, event);
- setCurrentName(tabName, true);
- };
- const handleTabRemove = (pane, ev) => {
- if (pane.props.disabled || isUndefined(pane.props.name)) return;
- ev.stopPropagation();
- emit("edit", pane.props.name, "remove");
- emit("tabRemove", pane.props.name);
- };
- const handleTabAdd = () => {
- emit("edit", void 0, "add");
- emit("tabAdd");
- };
- const handleKeydown = (event) => {
- const code = getEventCode(event);
- if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter].includes(code)) handleTabAdd();
- };
- const swapChildren = (vnode) => {
- const actualFirstChild = vnode.el.firstChild;
- const firstChild = ["bottom", "right"].includes(props.tabPosition) ? vnode.children[0].el : vnode.children[1].el;
- if (actualFirstChild !== firstChild) actualFirstChild.before(firstChild);
- };
- watch(() => props.modelValue, (modelValue) => setCurrentName(modelValue));
- watch(currentName, async () => {
- await nextTick();
- nav$.value?.scrollToActiveTab();
- });
- provide(tabsRootContextKey, {
- props,
- currentName,
- registerPane,
- unregisterPane,
- nav$
- });
- expose({
- currentName,
- get tabNavRef() {
- return omit(nav$.value, ["scheduleRender"]);
- }
- });
- return () => {
- const addSlot = slots["add-icon"];
- const newButton = props.editable || props.addable ? createVNode("div", {
- "class": [ns.e("new-tab"), isVertical.value && ns.e("new-tab-vertical")],
- "tabindex": props.tabindex,
- "onClick": handleTabAdd,
- "onKeydown": handleKeydown
- }, [addSlot ? renderSlot(slots, "add-icon") : createVNode(ElIcon, { "class": ns.is("icon-plus") }, { default: () => [createVNode(plus_default, null, null)] })]) : null;
- const tabNav = () => createVNode(TabNav, {
- "ref": nav$,
- "currentName": currentName.value,
- "editable": props.editable,
- "type": props.type,
- "panes": panes.value,
- "stretch": props.stretch,
- "onTabClick": handleTabClick,
- "onTabRemove": handleTabRemove
- }, null);
- const header = createVNode("div", { "class": [
- ns.e("header"),
- isVertical.value && ns.e("header-vertical"),
- ns.is(props.tabPosition)
- ] }, [createVNode(PanesSorter, null, {
- default: tabNav,
- $stable: true
- }), newButton]);
- const panels = createVNode("div", { "class": ns.e("content") }, [renderSlot(slots, "default")]);
- return createVNode("div", {
- "class": [
- ns.b(),
- ns.m(props.tabPosition),
- {
- [ns.m("card")]: props.type === "card",
- [ns.m("border-card")]: props.type === "border-card"
- }
- ],
- "onVnodeMounted": swapChildren,
- "onVnodeUpdated": swapChildren
- }, [panels, header]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-pane.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TabPaneProps` instead.
- */
- var tabPaneProps = buildProps({
- label: {
- type: String,
- default: ""
- },
- name: { type: [String, Number] },
- closable: {
- type: Boolean,
- default: void 0
- },
- disabled: Boolean,
- lazy: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-pane.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$14 = [
- "id",
- "aria-hidden",
- "aria-labelledby"
- ];
- var COMPONENT_NAME$2 = "ElTabPane";
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/src/tab-pane2.mjs
- var tab_pane_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$2,
- __name: "tab-pane",
- props: tabPaneProps,
- setup(__props) {
- const props = __props;
- const instance = getCurrentInstance();
- const slots = useSlots();
- const tabsRoot = inject(tabsRootContextKey);
- if (!tabsRoot) throwError(COMPONENT_NAME$2, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
- const ns = useNamespace("tab-pane");
- const paneRef = ref();
- const index = ref();
- const isClosable = computed(() => props.closable ?? tabsRoot.props.closable);
- const active = computed(() => tabsRoot.currentName.value === (props.name ?? index.value));
- const loaded = ref(active.value);
- const paneName = computed(() => props.name ?? index.value);
- const shouldBeRender = computed(() => !props.lazy || loaded.value || active.value);
- const isFocusInsidePane = () => {
- return paneRef.value?.contains(document.activeElement);
- };
- watch(active, (val) => {
- if (val) loaded.value = true;
- });
- const pane = reactive({
- uid: instance.uid,
- getVnode: () => instance.vnode,
- slots,
- props,
- paneName,
- active,
- index,
- isClosable,
- isFocusInsidePane
- });
- tabsRoot.registerPane(pane);
- onBeforeUnmount(() => {
- tabsRoot.unregisterPane(pane);
- });
- onBeforeUpdate(() => {
- if (slots.label) tabsRoot.nav$.value?.scheduleRender();
- });
- return (_ctx, _cache) => {
- return shouldBeRender.value ? withDirectives((openBlock(), createElementBlock("div", {
- key: 0,
- id: `pane-${paneName.value}`,
- ref_key: "paneRef",
- ref: paneRef,
- class: normalizeClass(unref(ns).b()),
- role: "tabpanel",
- "aria-hidden": !active.value,
- "aria-labelledby": `tab-${paneName.value}`
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$14)), [[vShow, active.value]]) : createCommentVNode("v-if", true);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tabs/index.mjs
- var ElTabs = withInstall(Tabs, { TabPane: tab_pane_default });
- var ElTabPane = withNoopInstall(tab_pane_default);
- //#endregion
- //#region node_modules/element-plus/es/components/text/src/text.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TextProps` instead.
- */
- var textProps = buildProps({
- type: {
- type: String,
- values: [
- "primary",
- "success",
- "info",
- "warning",
- "danger",
- ""
- ],
- default: ""
- },
- size: {
- type: String,
- values: componentSizes,
- default: ""
- },
- truncated: Boolean,
- lineClamp: { type: [String, Number] },
- tag: {
- type: String,
- default: "span"
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/text/index.mjs
- var ElText = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElText",
- __name: "text",
- props: textProps,
- setup(__props) {
- const props = __props;
- const textRef = ref();
- const textSize = useFormSize();
- const ns = useNamespace("text");
- const textKls = computed(() => [
- ns.b(),
- ns.m(props.type),
- ns.m(textSize.value),
- ns.is("truncated", props.truncated),
- ns.is("line-clamp", !isUndefined(props.lineClamp))
- ]);
- const bindTitle = () => {
- if (useAttrs$1().title) return;
- let shouldAddTitle = false;
- const text = textRef.value?.textContent || "";
- if (props.truncated) {
- const width = textRef.value?.offsetWidth;
- const scrollWidth = textRef.value?.scrollWidth;
- if (width && scrollWidth && scrollWidth > width) shouldAddTitle = true;
- } else if (!isUndefined(props.lineClamp)) {
- const height = textRef.value?.offsetHeight;
- const scrollHeight = textRef.value?.scrollHeight;
- if (height && scrollHeight && scrollHeight > height) shouldAddTitle = true;
- }
- if (shouldAddTitle) textRef.value?.setAttribute("title", text);
- else textRef.value?.removeAttribute("title");
- };
- onMounted(bindTitle);
- onUpdated(bindTitle);
- return (_ctx, _cache) => {
- return openBlock(), createBlock(resolveDynamicComponent(__props.tag), {
- ref_key: "textRef",
- ref: textRef,
- class: normalizeClass(textKls.value),
- style: normalizeStyle({ "-webkit-line-clamp": __props.lineClamp })
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["class", "style"]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/time-select/src/time-select.mjs
- var DEFAULT_STEP = "00:30";
- /**
- * @deprecated Removed after 3.0.0, Use `TimeSelectProps` instead.
- */
- var timeSelectProps = buildProps({
- format: {
- type: String,
- default: "HH:mm"
- },
- modelValue: { type: definePropType(String) },
- disabled: {
- type: Boolean,
- default: void 0
- },
- editable: {
- type: Boolean,
- default: true
- },
- effect: {
- type: definePropType(String),
- default: "light"
- },
- clearable: {
- type: Boolean,
- default: true
- },
- size: useSizeProp,
- placeholder: String,
- start: {
- type: String,
- default: "09:00"
- },
- end: {
- type: String,
- default: "18:00"
- },
- step: {
- type: String,
- default: DEFAULT_STEP
- },
- minTime: { type: definePropType(String) },
- maxTime: { type: definePropType(String) },
- includeEndTime: Boolean,
- name: String,
- prefixIcon: {
- type: definePropType([String, Object]),
- default: () => clock_default
- },
- clearIcon: {
- type: definePropType([String, Object]),
- default: () => circle_close_default
- },
- popperClass: {
- type: String,
- default: ""
- },
- popperStyle: { type: definePropType([String, Object]) },
- ...useEmptyValuesProps
- });
- //#endregion
- //#region node_modules/element-plus/es/components/time-select/src/utils.mjs
- var parseTime = (time) => {
- const values = (time || "").split(":");
- if (values.length >= 2) {
- let hours = Number.parseInt(values[0], 10);
- const minutes = Number.parseInt(values[1], 10);
- const timeUpper = time.toUpperCase();
- if (timeUpper.includes("AM") && hours === 12) hours = 0;
- else if (timeUpper.includes("PM") && hours !== 12) hours += 12;
- return {
- hours,
- minutes
- };
- }
- return null;
- };
- var compareTime = (time1, time2) => {
- const value1 = parseTime(time1);
- if (!value1) return -1;
- const value2 = parseTime(time2);
- if (!value2) return -1;
- const minutes1 = value1.minutes + value1.hours * 60;
- const minutes2 = value2.minutes + value2.hours * 60;
- if (minutes1 === minutes2) return 0;
- return minutes1 > minutes2 ? 1 : -1;
- };
- var padTime = (time) => {
- return `${time}`.padStart(2, "0");
- };
- var formatTime = (time) => {
- return `${padTime(time.hours)}:${padTime(time.minutes)}`;
- };
- var nextTime = (time, step) => {
- const timeValue = parseTime(time);
- if (!timeValue) return "";
- const stepValue = parseTime(step);
- if (!stepValue) return "";
- const next = {
- hours: timeValue.hours,
- minutes: timeValue.minutes
- };
- next.minutes += stepValue.minutes;
- next.hours += stepValue.hours;
- next.hours += Math.floor(next.minutes / 60);
- next.minutes = next.minutes % 60;
- return formatTime(next);
- };
- //#endregion
- //#region node_modules/element-plus/es/components/time-select/index.mjs
- var ElTimeSelect = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElTimeSelect",
- __name: "time-select",
- props: timeSelectProps,
- emits: [
- CHANGE_EVENT,
- "blur",
- "focus",
- "clear",
- UPDATE_MODEL_EVENT
- ],
- setup(__props, { expose: __expose }) {
- import_dayjs_min.default.extend(import_customParseFormat.default);
- const { Option: ElOption } = ElSelect;
- const props = __props;
- const nsInput = useNamespace("input");
- const select = ref();
- const _disabled = useFormDisabled();
- const { lang } = useLocale();
- const value = computed(() => props.modelValue);
- const start = computed(() => {
- const time = parseTime(props.start);
- return time ? formatTime(time) : null;
- });
- const end = computed(() => {
- const time = parseTime(props.end);
- return time ? formatTime(time) : null;
- });
- const minTime = computed(() => {
- const time = parseTime(props.minTime || "");
- return time ? formatTime(time) : null;
- });
- const maxTime = computed(() => {
- const time = parseTime(props.maxTime || "");
- return time ? formatTime(time) : null;
- });
- const step = computed(() => {
- const time = parseTime(props.step);
- const isInvalidStep = !time || time.hours < 0 || time.minutes < 0 || Number.isNaN(time.hours) || Number.isNaN(time.minutes) || time.hours === 0 && time.minutes === 0;
- if (isInvalidStep) debugWarn("ElTimeSelect", `invalid step, fallback to default step (${DEFAULT_STEP}).`);
- return !isInvalidStep ? formatTime(time) : DEFAULT_STEP;
- });
- const items = computed(() => {
- const result = [];
- const push = (formattedValue, rawValue) => {
- result.push({
- value: formattedValue,
- rawValue,
- disabled: compareTime(rawValue, minTime.value || "-1:-1") <= 0 || compareTime(rawValue, maxTime.value || "100:100") >= 0
- });
- };
- if (props.start && props.end && props.step) {
- let current = start.value;
- let currentTime;
- while (current && end.value && compareTime(current, end.value) <= 0) {
- currentTime = (0, import_dayjs_min.default)(current, "HH:mm").locale(lang.value).format(props.format);
- push(currentTime, current);
- current = nextTime(current, step.value);
- }
- if (props.includeEndTime && end.value && result[result.length - 1]?.rawValue !== end.value) push((0, import_dayjs_min.default)(end.value, "HH:mm").locale(lang.value).format(props.format), end.value);
- }
- return result;
- });
- const blur = () => {
- select.value?.blur?.();
- };
- const focus = () => {
- select.value?.focus?.();
- };
- __expose({
- blur,
- focus
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElSelect), {
- ref_key: "select",
- ref: select,
- name: __props.name,
- "model-value": value.value,
- disabled: unref(_disabled),
- clearable: __props.clearable,
- "clear-icon": __props.clearIcon,
- size: __props.size,
- effect: __props.effect,
- placeholder: __props.placeholder,
- "default-first-option": "",
- filterable: __props.editable,
- "empty-values": __props.emptyValues,
- "value-on-clear": __props.valueOnClear,
- "popper-class": __props.popperClass,
- "popper-style": __props.popperStyle,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (event) => _ctx.$emit(unref("update:modelValue"), event)),
- onChange: _cache[1] || (_cache[1] = (event) => _ctx.$emit(unref("change"), event)),
- onBlur: _cache[2] || (_cache[2] = (event) => _ctx.$emit("blur", event)),
- onFocus: _cache[3] || (_cache[3] = (event) => _ctx.$emit("focus", event)),
- onClear: _cache[4] || (_cache[4] = () => _ctx.$emit("clear"))
- }, {
- prefix: withCtx(() => [__props.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(nsInput).e("prefix-icon"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.prefixIcon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)]),
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
- return openBlock(), createBlock(unref(ElOption), {
- key: item.value,
- label: item.value,
- value: item.value,
- disabled: item.disabled
- }, null, 8, [
- "label",
- "value",
- "disabled"
- ]);
- }), 128))]),
- _: 1
- }, 8, [
- "name",
- "model-value",
- "disabled",
- "clearable",
- "clear-icon",
- "size",
- "effect",
- "placeholder",
- "filterable",
- "empty-values",
- "value-on-clear",
- "popper-class",
- "popper-style"
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/timeline/src/tokens.mjs
- var TIMELINE_INJECTION_KEY = "timeline";
- //#endregion
- //#region node_modules/element-plus/es/components/timeline/src/timeline.mjs
- var timelineProps = buildProps({
- mode: {
- type: String,
- values: [
- "start",
- "alternate",
- "alternate-reverse",
- "end"
- ],
- default: "start"
- },
- reverse: Boolean
- });
- var Timeline = defineComponent({
- name: "ElTimeline",
- props: timelineProps,
- setup(props, { slots }) {
- const ns = useNamespace("timeline");
- provide(TIMELINE_INJECTION_KEY, {
- props,
- slots
- });
- const timelineKls = computed(() => [ns.b(), ns.is(props.mode)]);
- return () => {
- const children = flattedChildren(slots.default?.() ?? []);
- return h$1("ul", { class: timelineKls.value }, props.reverse ? children.reverse() : children);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/timeline/src/timeline-item.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TimelineItemProps` instead.
- */
- var timelineItemProps = buildProps({
- timestamp: {
- type: String,
- default: ""
- },
- hideTimestamp: Boolean,
- center: Boolean,
- placement: {
- type: String,
- values: ["top", "bottom"],
- default: "bottom"
- },
- type: {
- type: String,
- values: [
- "primary",
- "success",
- "warning",
- "danger",
- "info"
- ],
- default: ""
- },
- color: {
- type: String,
- default: ""
- },
- size: {
- type: String,
- values: ["normal", "large"],
- default: "normal"
- },
- icon: { type: iconPropType },
- hollow: Boolean
- });
- //#endregion
- //#region node_modules/element-plus/es/components/timeline/src/timeline-item2.mjs
- var timeline_item_default = /* @__PURE__ */ defineComponent({
- name: "ElTimelineItem",
- __name: "timeline-item",
- props: timelineItemProps,
- setup(__props) {
- const props = __props;
- const { props: timelineProps } = inject(TIMELINE_INJECTION_KEY);
- const ns = useNamespace("timeline-item");
- const defaultNodeKls = computed(() => [
- ns.e("node"),
- ns.em("node", props.size || ""),
- ns.em("node", props.type || ""),
- ns.is("hollow", props.hollow)
- ]);
- const timelineItemKls = computed(() => [
- ns.b(),
- { [ns.e("center")]: props.center },
- ns.is(timelineProps.mode)
- ]);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("li", { class: normalizeClass(timelineItemKls.value) }, [
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("tail")) }, null, 2),
- !_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(defaultNodeKls.value),
- style: normalizeStyle({ backgroundColor: __props.color })
- }, [__props.icon ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(ns).e("icon"))
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)], 6)) : createCommentVNode("v-if", true),
- _ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("dot"))
- }, [renderSlot(_ctx.$slots, "dot")], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("wrapper")) }, [
- !__props.hideTimestamp && __props.placement === "top" ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("top")])
- }, toDisplayString(__props.timestamp), 3)) : createCommentVNode("v-if", true),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("content")) }, [renderSlot(_ctx.$slots, "default")], 2),
- !__props.hideTimestamp && __props.placement === "bottom" ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([unref(ns).e("timestamp"), unref(ns).is("bottom")])
- }, toDisplayString(__props.timestamp), 3)) : createCommentVNode("v-if", true)
- ], 2)
- ], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/timeline/index.mjs
- var ElTimeline = withInstall(Timeline, { TimelineItem: timeline_item_default });
- var ElTimelineItem = withNoopInstall(timeline_item_default);
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/transfer.mjs
- var LEFT_CHECK_CHANGE_EVENT = "left-check-change";
- var RIGHT_CHECK_CHANGE_EVENT = "right-check-change";
- /**
- * @deprecated Removed after 3.0.0, Use `TransferProps` instead.
- */
- var transferProps = buildProps({
- data: {
- type: definePropType(Array),
- default: () => []
- },
- titles: {
- type: definePropType(Array),
- default: () => []
- },
- buttonTexts: {
- type: definePropType(Array),
- default: () => []
- },
- filterPlaceholder: String,
- filterMethod: { type: definePropType(Function) },
- leftDefaultChecked: {
- type: definePropType(Array),
- default: () => []
- },
- rightDefaultChecked: {
- type: definePropType(Array),
- default: () => []
- },
- renderContent: { type: definePropType(Function) },
- modelValue: {
- type: definePropType(Array),
- default: () => []
- },
- format: {
- type: definePropType(Object),
- default: () => ({})
- },
- filterable: Boolean,
- props: {
- type: definePropType(Object),
- default: () => mutable({
- label: "label",
- key: "key",
- disabled: "disabled"
- })
- },
- targetOrder: {
- type: String,
- values: [
- "original",
- "push",
- "unshift"
- ],
- default: "original"
- },
- validateEvent: {
- type: Boolean,
- default: true
- }
- });
- var transferCheckedChangeFn = (value, movedKeys) => [value, movedKeys].every(isArray$1) || isArray$1(value) && isNil(movedKeys);
- var transferEmits = {
- [CHANGE_EVENT]: (value, direction, movedKeys) => [value, movedKeys].every(isArray$1) && ["left", "right"].includes(direction),
- [UPDATE_MODEL_EVENT]: (value) => isArray$1(value),
- [LEFT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn,
- [RIGHT_CHECK_CHANGE_EVENT]: transferCheckedChangeFn
- };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/composables/use-props-alias.mjs
- var usePropsAlias = (props) => {
- const initProps = {
- label: "label",
- key: "key",
- disabled: "disabled"
- };
- return computed(() => ({
- ...initProps,
- ...props.props
- }));
- };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/composables/use-checked-change.mjs
- var useCheckedChange = (checkedState, emit) => {
- const onSourceCheckedChange = (val, movedKeys) => {
- checkedState.leftChecked = val;
- if (!movedKeys) return;
- emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys);
- };
- const onTargetCheckedChange = (val, movedKeys) => {
- checkedState.rightChecked = val;
- if (!movedKeys) return;
- emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);
- };
- return {
- onSourceCheckedChange,
- onTargetCheckedChange
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/composables/use-computed-data.mjs
- var useComputedData = (props) => {
- const propsAlias = usePropsAlias(props);
- const dataObj = computed(() => props.data.reduce((o, cur) => (o[cur[propsAlias.value.key]] = cur) && o, {}));
- return {
- sourceData: computed(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key]))),
- targetData: computed(() => {
- if (props.targetOrder === "original") return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key]));
- else return props.modelValue.reduce((arr, cur) => {
- const val = dataObj.value[cur];
- if (val) arr.push(val);
- return arr;
- }, []);
- })
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/composables/use-move.mjs
- var useMove = (props, checkedState, emit) => {
- const propsAlias = usePropsAlias(props);
- const _emit = (value, direction, movedKeys) => {
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value, direction, movedKeys);
- };
- const addToLeft = () => {
- const currentValue = props.modelValue.slice();
- checkedState.rightChecked.forEach((item) => {
- const index = currentValue.indexOf(item);
- if (index > -1) currentValue.splice(index, 1);
- });
- _emit(currentValue, "left", checkedState.rightChecked);
- };
- const addToRight = () => {
- let currentValue = props.modelValue.slice();
- const itemsToBeMoved = props.data.filter((item) => {
- const itemKey = item[propsAlias.value.key];
- return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);
- }).map((item) => item[propsAlias.value.key]);
- currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
- if (props.targetOrder === "original") currentValue = props.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]);
- _emit(currentValue, "right", checkedState.leftChecked);
- };
- return {
- addToLeft,
- addToRight
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/transfer-panel.mjs
- var CHECKED_CHANGE_EVENT = "checked-change";
- /**
- * @deprecated Removed after 3.0.0, Use `TransferPanelProps` instead.
- */
- var transferPanelProps = buildProps({
- data: transferProps.data,
- optionRender: { type: definePropType(Function) },
- placeholder: String,
- title: String,
- filterable: Boolean,
- format: transferProps.format,
- filterMethod: transferProps.filterMethod,
- defaultChecked: transferProps.leftDefaultChecked,
- props: transferProps.props
- });
- var transferPanelEmits = { [CHECKED_CHANGE_EVENT]: transferCheckedChangeFn };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/composables/use-check.mjs
- var useCheck$1 = (props, panelState, emit) => {
- const propsAlias = usePropsAlias(props);
- const filteredData = computed(() => {
- return props.data.filter((item) => {
- if (isFunction$1(props.filterMethod)) return props.filterMethod(panelState.query, item);
- else return String(item[propsAlias.value.label] || item[propsAlias.value.key]).toLowerCase().includes(panelState.query.toLowerCase());
- });
- });
- const checkableData = computed(() => filteredData.value.filter((item) => !item[propsAlias.value.disabled]));
- const checkedSummary = computed(() => {
- const checkedLength = panelState.checked.length;
- const dataLength = props.data.length;
- const { noChecked, hasChecked } = props.format;
- if (noChecked && hasChecked) return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString());
- else return `${checkedLength}/${dataLength}`;
- });
- const isIndeterminate = computed(() => {
- const checkedLength = panelState.checked.length;
- return checkedLength > 0 && checkedLength < checkableData.value.length;
- });
- const updateAllChecked = () => {
- const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
- panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item));
- };
- const handleAllCheckedChange = (value) => {
- panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : [];
- };
- watch(() => panelState.checked, (val, oldVal) => {
- updateAllChecked();
- if (panelState.checkChangeByUser) emit(CHECKED_CHANGE_EVENT, val, val.concat(oldVal).filter((v) => !val.includes(v) || !oldVal.includes(v)));
- else {
- emit(CHECKED_CHANGE_EVENT, val);
- panelState.checkChangeByUser = true;
- }
- });
- watch(checkableData, () => {
- updateAllChecked();
- });
- watch(() => props.data, () => {
- const checked = [];
- const filteredDataKeys = filteredData.value.map((item) => item[propsAlias.value.key]);
- panelState.checked.forEach((item) => {
- if (filteredDataKeys.includes(item)) checked.push(item);
- });
- panelState.checkChangeByUser = false;
- panelState.checked = checked;
- });
- watch(() => props.defaultChecked, (val, oldVal) => {
- if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item))) return;
- const checked = [];
- const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
- val.forEach((item) => {
- if (checkableDataKeys.includes(item)) checked.push(item);
- });
- panelState.checkChangeByUser = false;
- panelState.checked = checked;
- }, { immediate: true });
- return {
- filteredData,
- checkableData,
- checkedSummary,
- isIndeterminate,
- updateAllChecked,
- handleAllCheckedChange
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/transfer-panel2.mjs
- var transfer_panel_default = /* @__PURE__ */ defineComponent({
- name: "ElTransferPanel",
- __name: "transfer-panel",
- props: transferPanelProps,
- emits: transferPanelEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const slots = useSlots();
- const OptionContent = ({ option }) => option;
- const { t } = useLocale();
- const ns = useNamespace("transfer");
- const panelState = reactive({
- checked: [],
- allChecked: false,
- query: "",
- checkChangeByUser: true
- });
- const propsAlias = usePropsAlias(props);
- const { filteredData, checkedSummary, isIndeterminate, handleAllCheckedChange } = useCheck$1(props, panelState, emit);
- const hasNoMatch = computed(() => !isEmpty(panelState.query) && isEmpty(filteredData.value));
- const hasFooter = computed(() => !isEmpty(slots.default()[0].children));
- const { checked, allChecked, query } = toRefs(panelState);
- __expose({ query });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b("panel")) }, [
- createBaseVNode("p", { class: normalizeClass(unref(ns).be("panel", "header")) }, [createVNode(unref(ElCheckbox), {
- modelValue: unref(allChecked),
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(allChecked) ? allChecked.value = $event : null),
- indeterminate: unref(isIndeterminate),
- "validate-event": false,
- onChange: unref(handleAllCheckedChange)
- }, {
- default: withCtx(() => [createBaseVNode("span", { class: normalizeClass(unref(ns).be("panel", "header-title")) }, toDisplayString(__props.title), 3), createBaseVNode("span", { class: normalizeClass(unref(ns).be("panel", "header-count")) }, toDisplayString(unref(checkedSummary)), 3)]),
- _: 1
- }, 8, [
- "modelValue",
- "indeterminate",
- "onChange"
- ])], 2),
- createBaseVNode("div", { class: normalizeClass([unref(ns).be("panel", "body"), unref(ns).is("with-footer", hasFooter.value)]) }, [
- __props.filterable ? (openBlock(), createBlock(unref(ElInput), {
- key: 0,
- modelValue: unref(query),
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(query) ? query.value = $event : null),
- class: normalizeClass(unref(ns).be("panel", "filter")),
- size: "default",
- placeholder: __props.placeholder,
- "prefix-icon": unref(search_default),
- clearable: "",
- "validate-event": false
- }, null, 8, [
- "modelValue",
- "class",
- "placeholder",
- "prefix-icon"
- ])) : createCommentVNode("v-if", true),
- withDirectives(createVNode(unref(ElCheckboxGroup), {
- modelValue: unref(checked),
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(checked) ? checked.value = $event : null),
- "validate-event": false,
- class: normalizeClass([unref(ns).is("filterable", __props.filterable), unref(ns).be("panel", "list")])
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredData), (item) => {
- return openBlock(), createBlock(unref(ElCheckbox), {
- key: item[unref(propsAlias).key],
- class: normalizeClass(unref(ns).be("panel", "item")),
- value: item[unref(propsAlias).key],
- disabled: item[unref(propsAlias).disabled],
- "validate-event": false
- }, {
- default: withCtx(() => [createVNode(OptionContent, { option: __props.optionRender?.(item) }, null, 8, ["option"])]),
- _: 2
- }, 1032, [
- "class",
- "value",
- "disabled"
- ]);
- }), 128))]),
- _: 1
- }, 8, ["modelValue", "class"]), [[vShow, !hasNoMatch.value && !unref(isEmpty)(__props.data)]]),
- withDirectives(createBaseVNode("div", { class: normalizeClass(unref(ns).be("panel", "empty")) }, [renderSlot(_ctx.$slots, "empty", {}, () => [createTextVNode(toDisplayString(hasNoMatch.value ? unref(t)("el.transfer.noMatch") : unref(t)("el.transfer.noData")), 1)])], 2), [[vShow, hasNoMatch.value || unref(isEmpty)(__props.data)]])
- ], 2),
- hasFooter.value ? (openBlock(), createElementBlock("p", {
- key: 0,
- class: normalizeClass(unref(ns).be("panel", "footer"))
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$13 = { key: 0 };
- var _hoisted_2$8 = { key: 0 };
- //#endregion
- //#region node_modules/element-plus/es/components/transfer/index.mjs
- var ElTransfer = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElTransfer",
- __name: "transfer",
- props: transferProps,
- emits: transferEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const slots = useSlots();
- const { t } = useLocale();
- const ns = useNamespace("transfer");
- const { formItem } = useFormItem();
- const checkedState = reactive({
- leftChecked: [],
- rightChecked: []
- });
- const propsAlias = usePropsAlias(props);
- const { sourceData, targetData } = useComputedData(props);
- const { onSourceCheckedChange, onTargetCheckedChange } = useCheckedChange(checkedState, emit);
- const { addToLeft, addToRight } = useMove(props, checkedState, emit);
- const leftPanel = ref();
- const rightPanel = ref();
- const clearQuery = (which) => {
- switch (which) {
- case "left":
- leftPanel.value.query = "";
- break;
- case "right":
- rightPanel.value.query = "";
- break;
- }
- };
- const hasButtonTexts = computed(() => props.buttonTexts.length === 2);
- const leftPanelTitle = computed(() => props.titles[0] || t("el.transfer.titles.0"));
- const rightPanelTitle = computed(() => props.titles[1] || t("el.transfer.titles.1"));
- const panelFilterPlaceholder = computed(() => props.filterPlaceholder || t("el.transfer.filterPlaceholder"));
- watch(() => props.modelValue, () => {
- if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
- });
- const optionRender = computed(() => (option) => {
- if (props.renderContent) return props.renderContent(h$1, option);
- const defaultSlotVNodes = (slots.default?.({ option }) || []).filter((node) => node.type !== Comment);
- if (defaultSlotVNodes.length) return defaultSlotVNodes;
- return h$1("span", option[propsAlias.value.label] || option[propsAlias.value.key]);
- });
- __expose({
- clearQuery,
- leftPanel,
- rightPanel
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).b()) }, [
- createVNode(transfer_panel_default, {
- ref_key: "leftPanel",
- ref: leftPanel,
- data: unref(sourceData),
- "option-render": optionRender.value,
- placeholder: panelFilterPlaceholder.value,
- title: leftPanelTitle.value,
- filterable: __props.filterable,
- format: __props.format,
- "filter-method": __props.filterMethod,
- "default-checked": __props.leftDefaultChecked,
- props: props.props,
- onCheckedChange: unref(onSourceCheckedChange)
- }, {
- empty: withCtx(() => [renderSlot(_ctx.$slots, "left-empty")]),
- default: withCtx(() => [renderSlot(_ctx.$slots, "left-footer")]),
- _: 3
- }, 8, [
- "data",
- "option-render",
- "placeholder",
- "title",
- "filterable",
- "format",
- "filter-method",
- "default-checked",
- "props",
- "onCheckedChange"
- ]),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("buttons")) }, [createVNode(unref(ElButton), {
- type: "primary",
- class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]),
- disabled: unref(isEmpty)(checkedState.rightChecked),
- onClick: unref(addToLeft)
- }, {
- default: withCtx(() => [createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_left_default))]),
- _: 1
- }), !unref(isUndefined)(__props.buttonTexts[0]) ? (openBlock(), createElementBlock("span", _hoisted_1$13, toDisplayString(__props.buttonTexts[0]), 1)) : createCommentVNode("v-if", true)]),
- _: 1
- }, 8, [
- "class",
- "disabled",
- "onClick"
- ]), createVNode(unref(ElButton), {
- type: "primary",
- class: normalizeClass([unref(ns).e("button"), unref(ns).is("with-texts", hasButtonTexts.value)]),
- disabled: unref(isEmpty)(checkedState.leftChecked),
- onClick: unref(addToRight)
- }, {
- default: withCtx(() => [!unref(isUndefined)(__props.buttonTexts[1]) ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString(__props.buttonTexts[1]), 1)) : createCommentVNode("v-if", true), createVNode(unref(ElIcon), null, {
- default: withCtx(() => [createVNode(unref(arrow_right_default))]),
- _: 1
- })]),
- _: 1
- }, 8, [
- "class",
- "disabled",
- "onClick"
- ])], 2),
- createVNode(transfer_panel_default, {
- ref_key: "rightPanel",
- ref: rightPanel,
- data: unref(targetData),
- "option-render": optionRender.value,
- placeholder: panelFilterPlaceholder.value,
- filterable: __props.filterable,
- format: __props.format,
- "filter-method": __props.filterMethod,
- title: rightPanelTitle.value,
- "default-checked": __props.rightDefaultChecked,
- props: props.props,
- onCheckedChange: unref(onTargetCheckedChange)
- }, {
- empty: withCtx(() => [renderSlot(_ctx.$slots, "right-empty")]),
- default: withCtx(() => [renderSlot(_ctx.$slots, "right-footer")]),
- _: 3
- }, 8, [
- "data",
- "option-render",
- "placeholder",
- "filterable",
- "format",
- "filter-method",
- "title",
- "default-checked",
- "props",
- "onCheckedChange"
- ])
- ], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/tokens.mjs
- var ROOT_TREE_INJECTION_KEY = "RootTree";
- var NODE_INSTANCE_INJECTION_KEY = "NodeInstance";
- var TREE_NODE_MAP_INJECTION_KEY = "TreeNodeMap";
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/tree.mjs
- var treeProps = buildProps({
- data: {
- type: definePropType(Array),
- default: () => []
- },
- emptyText: { type: String },
- renderAfterExpand: {
- type: Boolean,
- default: true
- },
- nodeKey: String,
- checkStrictly: Boolean,
- defaultExpandAll: Boolean,
- expandOnClickNode: {
- type: Boolean,
- default: true
- },
- checkOnClickNode: Boolean,
- checkOnClickLeaf: {
- type: Boolean,
- default: true
- },
- checkDescendants: Boolean,
- autoExpandParent: {
- type: Boolean,
- default: true
- },
- defaultCheckedKeys: { type: Array },
- defaultExpandedKeys: { type: Array },
- currentNodeKey: { type: [String, Number] },
- renderContent: { type: definePropType(Function) },
- showCheckbox: Boolean,
- draggable: Boolean,
- allowDrag: { type: definePropType(Function) },
- allowDrop: { type: definePropType(Function) },
- props: {
- type: Object,
- default: () => ({
- children: "children",
- label: "label",
- disabled: "disabled"
- })
- },
- lazy: Boolean,
- highlightCurrent: Boolean,
- load: { type: Function },
- filterNodeMethod: { type: Function },
- accordion: Boolean,
- indent: {
- type: Number,
- default: 18
- },
- icon: { type: iconPropType }
- });
- var treeEmits = {
- "check-change": (data, checked, indeterminate) => data && isBoolean(checked) && isBoolean(indeterminate),
- "current-change": (data, node) => true,
- "node-click": (data, node, nodeInstance, evt) => data && node && evt instanceof Event,
- "node-contextmenu": (evt, data, node, nodeInstance) => evt instanceof Event && data && node,
- "node-collapse": (data, node, nodeInstance) => data && node,
- "node-expand": (data, node, nodeInstance) => data && node,
- check: (data, checkedInfo) => data && checkedInfo,
- "node-drag-start": (node, evt) => node && evt,
- "node-drag-end": (draggingNode, dropNode, dropType, evt) => draggingNode && evt,
- "node-drop": (draggingNode, dropNode, dropType, evt) => draggingNode && dropNode && evt,
- "node-drag-leave": (draggingNode, oldDropNode, evt) => draggingNode && oldDropNode && evt,
- "node-drag-enter": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt,
- "node-drag-over": (draggingNode, dropNode, evt) => draggingNode && dropNode && evt
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/model/util.mjs
- var NODE_KEY = "$treeNodeId";
- var markNodeData = function(node, data) {
- if (!data || data["$treeNodeId"]) return;
- Object.defineProperty(data, NODE_KEY, {
- value: node.id,
- enumerable: false,
- configurable: false,
- writable: false
- });
- };
- var getNodeKey = (key, data) => data?.[key || "$treeNodeId"];
- var handleCurrentChange = (store, emit, setCurrent) => {
- const preCurrentNode = store.value.currentNode;
- setCurrent();
- const currentNode = store.value.currentNode;
- if (preCurrentNode === currentNode) return;
- emit("current-change", currentNode ? currentNode.data : null, currentNode);
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/model/node.mjs
- var getChildState = (node) => {
- let all = true;
- let none = true;
- let allWithoutDisable = true;
- let isEffectivelyChecked = true;
- for (let i = 0, j = node.length; i < j; i++) {
- const n = node[i];
- if (n.checked !== true || n.indeterminate) {
- all = false;
- if (!n.disabled) allWithoutDisable = false;
- }
- if (n.checked !== false || n.indeterminate) none = false;
- if (!n.isEffectivelyChecked) isEffectivelyChecked = false;
- }
- return {
- all,
- none,
- allWithoutDisable,
- half: !all && !none,
- isEffectivelyChecked
- };
- };
- var reInitChecked = function(node) {
- if (node.childNodes.length === 0 || node.loading) {
- node.isEffectivelyChecked = node.disabled || node.checked;
- return;
- }
- const { all, none, half, isEffectivelyChecked } = getChildState(node.childNodes);
- node.isEffectivelyChecked = isEffectivelyChecked;
- if (all) {
- node.checked = true;
- node.indeterminate = false;
- } else if (half) {
- node.checked = false;
- node.indeterminate = true;
- } else if (none) {
- node.checked = false;
- node.indeterminate = false;
- }
- const parent = node.parent;
- if (!parent || parent.level === 0) return;
- if (!node.store.checkStrictly) reInitChecked(parent);
- };
- var getPropertyFromData = function(node, prop) {
- const props = node.store.props;
- const data = node.data || {};
- const config = props[prop];
- if (isFunction$1(config)) return config(data, node);
- else if (isString(config)) return data[config];
- else if (isUndefined(config)) {
- const dataProp = data[prop];
- return isUndefined(dataProp) ? "" : dataProp;
- }
- };
- var setCanFocus = function(childNodes, focus) {
- childNodes.forEach((item) => {
- item.canFocus = focus;
- setCanFocus(item.childNodes, focus);
- });
- };
- var nodeIdSeed = 0;
- var Node$1 = class Node {
- constructor(options) {
- this.isLeafByUser = void 0;
- this.isLeaf = void 0;
- this.isEffectivelyChecked = false;
- this.id = nodeIdSeed++;
- this.text = null;
- this.checked = false;
- this.indeterminate = false;
- this.data = null;
- this.expanded = false;
- this.parent = null;
- this.visible = true;
- this.isCurrent = false;
- this.canFocus = false;
- for (const name in options) if (hasOwn(options, name)) this[name] = options[name];
- this.level = 0;
- this.loaded = false;
- this.childNodes = [];
- this.loading = false;
- if (this.parent) this.level = this.parent.level + 1;
- }
- initialize() {
- const store = this.store;
- if (!store) throw new Error("[Node]store is required!");
- store.registerNode(this);
- const props = store.props;
- if (props && typeof props.isLeaf !== "undefined") {
- const isLeaf = getPropertyFromData(this, "isLeaf");
- if (isBoolean(isLeaf)) this.isLeafByUser = isLeaf;
- }
- if (store.lazy !== true && this.data) {
- this.setData(this.data);
- if (store.defaultExpandAll) {
- this.expanded = true;
- this.canFocus = true;
- }
- } else if (this.level > 0 && store.lazy && store.defaultExpandAll && !this.isLeafByUser) this.expand();
- if (!isArray$1(this.data)) markNodeData(this, this.data);
- if (!this.data) return;
- const defaultExpandedKeys = store.defaultExpandedKeys;
- const key = store.key;
- if (key && !isNil(this.key) && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) this.expand(null, store.autoExpandParent);
- if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {
- store.currentNode && (store.currentNode.isCurrent = false);
- store.currentNode = this;
- store.currentNode.isCurrent = true;
- }
- if (store.lazy) store._initDefaultCheckedNode(this);
- this.updateLeafState();
- if (this.level === 1 || this.parent?.expanded === true) this.canFocus = true;
- }
- setData(data) {
- if (!isArray$1(data)) markNodeData(this, data);
- this.data = data;
- this.childNodes = [];
- let children;
- if (this.level === 0 && isArray$1(this.data)) children = this.data;
- else children = getPropertyFromData(this, "children") || [];
- for (let i = 0, j = children.length; i < j; i++) this.insertChild({ data: children[i] });
- }
- get label() {
- return getPropertyFromData(this, "label");
- }
- get key() {
- const nodeKey = this.store.key;
- if (this.data) return this.data[nodeKey];
- return null;
- }
- get disabled() {
- return getPropertyFromData(this, "disabled");
- }
- get nextSibling() {
- const parent = this.parent;
- if (parent) {
- const index = parent.childNodes.indexOf(this);
- if (index > -1) return parent.childNodes[index + 1];
- }
- return null;
- }
- get previousSibling() {
- const parent = this.parent;
- if (parent) {
- const index = parent.childNodes.indexOf(this);
- if (index > -1) return index > 0 ? parent.childNodes[index - 1] : null;
- }
- return null;
- }
- contains(target, deep = true) {
- return (this.childNodes || []).some((child) => child === target || deep && child.contains(target));
- }
- remove() {
- const parent = this.parent;
- if (parent) parent.removeChild(this);
- }
- insertChild(child, index, batch) {
- if (!child) throw new Error("InsertChild error: child is required.");
- if (!(child instanceof Node)) {
- if (!batch) {
- const children = this.getChildren(true);
- if (!children?.includes(child.data)) if (isUndefined(index) || index < 0) children?.push(child.data);
- else children?.splice(index, 0, child.data);
- }
- Object.assign(child, {
- parent: this,
- store: this.store
- });
- child = reactive(new Node(child));
- if (child instanceof Node) child.initialize();
- }
- child.level = this.level + 1;
- if (isUndefined(index) || index < 0) this.childNodes.push(child);
- else this.childNodes.splice(index, 0, child);
- this.updateLeafState();
- }
- insertBefore(child, ref) {
- let index;
- if (ref) index = this.childNodes.indexOf(ref);
- this.insertChild(child, index);
- }
- insertAfter(child, ref) {
- let index;
- if (ref) {
- index = this.childNodes.indexOf(ref);
- if (index !== -1) index += 1;
- }
- this.insertChild(child, index);
- }
- removeChild(child) {
- const children = this.getChildren() || [];
- const dataIndex = children.indexOf(child.data);
- if (dataIndex > -1) children.splice(dataIndex, 1);
- const index = this.childNodes.indexOf(child);
- if (index > -1) {
- this.store && this.store.deregisterNode(child);
- child.parent = null;
- this.childNodes.splice(index, 1);
- }
- this.updateLeafState();
- }
- removeChildByData(data) {
- const targetNode = this.childNodes.find((child) => child.data === data);
- if (targetNode) this.removeChild(targetNode);
- }
- expand(callback, expandParent) {
- const done = () => {
- if (expandParent) {
- let parent = this.parent;
- while (parent && parent.level > 0) {
- parent.expanded = true;
- parent = parent.parent;
- }
- }
- this.expanded = true;
- if (callback) callback();
- setCanFocus(this.childNodes, true);
- };
- if (this.shouldLoadData()) this.loadData((data) => {
- if (isArray$1(data)) {
- if (this.checked) this.setChecked(true, true);
- else if (!this.store.checkStrictly) reInitChecked(this);
- done();
- }
- });
- else done();
- }
- doCreateChildren(array, defaultProps = {}) {
- array.forEach((item) => {
- this.insertChild(Object.assign({ data: item }, defaultProps), void 0, true);
- });
- }
- collapse() {
- this.expanded = false;
- setCanFocus(this.childNodes, false);
- }
- shouldLoadData() {
- return Boolean(this.store.lazy === true && this.store.load && !this.loaded);
- }
- updateLeafState() {
- if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") {
- this.isLeaf = this.isLeafByUser;
- this.isEffectivelyChecked = this.isLeaf && this.disabled;
- return;
- }
- const childNodes = this.childNodes;
- if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
- this.isLeaf = !childNodes || childNodes.length === 0;
- this.isEffectivelyChecked = this.isLeaf && this.disabled;
- return;
- }
- this.isLeaf = false;
- }
- setChecked(value, deep, recursion, passValue) {
- this.indeterminate = value === "half";
- this.checked = value === true;
- this.isEffectivelyChecked = !this.childNodes.length && (this.disabled || this.checked);
- if (this.store.checkStrictly) return;
- if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
- const handleDescendants = () => {
- if (deep) {
- const childNodes = this.childNodes;
- for (let i = 0, j = childNodes.length; i < j; i++) {
- const child = childNodes[i];
- passValue = passValue || value !== false;
- const isCheck = child.disabled && child.isLeaf ? child.checked : passValue;
- child.setChecked(isCheck, deep, true, passValue);
- }
- const { half, all, isEffectivelyChecked } = getChildState(childNodes);
- if (!all) {
- this.checked = all;
- this.indeterminate = half;
- }
- this.isEffectivelyChecked = !this.childNodes.length ? this.disabled || this.checked : isEffectivelyChecked;
- }
- };
- if (this.shouldLoadData()) {
- this.loadData(() => {
- handleDescendants();
- reInitChecked(this);
- }, { checked: value !== false });
- return;
- } else handleDescendants();
- }
- const parent = this.parent;
- if (!parent || parent.level === 0) return;
- if (!recursion) reInitChecked(parent);
- }
- getChildren(forceInit = false) {
- if (this.level === 0) return this.data;
- const data = this.data;
- if (!data) return null;
- const props = this.store.props;
- let children = "children";
- if (props) children = props.children || "children";
- if (isUndefined(data[children])) data[children] = null;
- if (forceInit && !data[children]) data[children] = [];
- return data[children];
- }
- updateChildren() {
- const newData = this.getChildren() || [];
- const oldData = this.childNodes.map((node) => node.data);
- const newDataMap = {};
- const newNodes = [];
- newData.forEach((item, index) => {
- const key = item[NODE_KEY];
- if (!!key && oldData.some((data) => data?.["$treeNodeId"] === key)) newDataMap[key] = {
- index,
- data: item
- };
- else newNodes.push({
- index,
- data: item
- });
- });
- if (!this.store.lazy) oldData.forEach((item) => {
- if (!newDataMap[item?.["$treeNodeId"]]) this.removeChildByData(item);
- });
- newNodes.forEach(({ index, data }) => {
- this.insertChild({ data }, index);
- });
- this.updateLeafState();
- }
- loadData(callback, defaultProps = {}) {
- if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
- this.loading = true;
- const resolve = (children) => {
- this.childNodes = [];
- this.doCreateChildren(children, defaultProps);
- this.loaded = true;
- this.loading = false;
- this.updateLeafState();
- if (callback) callback.call(this, children);
- };
- const reject = () => {
- this.loading = false;
- };
- this.store.load(this, resolve, reject);
- } else if (callback) callback.call(this);
- }
- eachNode(callback) {
- const arr = [this];
- while (arr.length) {
- const node = arr.shift();
- arr.unshift(...node.childNodes);
- callback(node);
- }
- }
- reInitChecked() {
- if (this.store.checkStrictly) return;
- reInitChecked(this);
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/model/tree-store.mjs
- var TreeStore = class {
- constructor(options) {
- this.lazy = false;
- this.checkStrictly = false;
- this.autoExpandParent = false;
- this.defaultExpandAll = false;
- this.checkDescendants = false;
- this.currentNode = null;
- this.currentNodeKey = null;
- for (const option in options) if (hasOwn(options, option)) this[option] = options[option];
- this.nodesMap = {};
- }
- initialize() {
- this.root = new Node$1({
- data: this.data,
- store: this
- });
- this.root.initialize();
- if (this.lazy && this.load) {
- const loadFn = this.load;
- loadFn(this.root, (data) => {
- this.root.doCreateChildren(data);
- this._initDefaultCheckedNodes();
- }, NOOP);
- } else this._initDefaultCheckedNodes();
- }
- filter(value) {
- const filterNodeMethod = this.filterNodeMethod;
- const lazy = this.lazy;
- const traverse = async function(node) {
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
- for (const [index, child] of childNodes.entries()) {
- child.visible = !!filterNodeMethod?.call(child, value, child.data, child);
- if (index % 80 === 0 && index > 0) await nextTick();
- await traverse(child);
- }
- if (!node.visible && childNodes.length) {
- let allHidden = true;
- allHidden = !childNodes.some((child) => child.visible);
- if (node.root) node.root.visible = allHidden === false;
- else node.visible = allHidden === false;
- }
- if (!value) return;
- if (node.visible && !node.isLeaf) {
- if (!lazy || node.loaded) node.expand();
- }
- };
- traverse(this);
- }
- setData(newVal) {
- if (newVal !== this.root.data) {
- this.nodesMap = {};
- this.root.setData(newVal);
- this._initDefaultCheckedNodes();
- this.setCurrentNodeKey(this.currentNodeKey);
- } else this.root.updateChildren();
- }
- getNode(data) {
- if (data instanceof Node$1) return data;
- const key = isObject$2(data) ? getNodeKey(this.key, data) : data;
- return this.nodesMap[key] || null;
- }
- insertBefore(data, refData) {
- const refNode = this.getNode(refData);
- refNode.parent?.insertBefore({ data }, refNode);
- }
- insertAfter(data, refData) {
- const refNode = this.getNode(refData);
- refNode.parent?.insertAfter({ data }, refNode);
- }
- remove(data) {
- const node = this.getNode(data);
- if (node && node.parent) {
- if (node === this.currentNode) this.currentNode = null;
- node.parent.removeChild(node);
- }
- }
- append(data, parentData) {
- const parentNode = !isPropAbsent(parentData) ? this.getNode(parentData) : this.root;
- if (parentNode) parentNode.insertChild({ data });
- }
- _initDefaultCheckedNodes() {
- const defaultCheckedKeys = this.defaultCheckedKeys || [];
- const nodesMap = this.nodesMap;
- defaultCheckedKeys.forEach((checkedKey) => {
- const node = nodesMap[checkedKey];
- if (node) node.setChecked(true, !this.checkStrictly);
- });
- }
- _initDefaultCheckedNode(node) {
- const defaultCheckedKeys = this.defaultCheckedKeys || [];
- if (!isNil(node.key) && defaultCheckedKeys.includes(node.key)) node.setChecked(true, !this.checkStrictly);
- }
- setDefaultCheckedKey(newVal) {
- if (newVal !== this.defaultCheckedKeys) {
- this.defaultCheckedKeys = newVal;
- this._initDefaultCheckedNodes();
- }
- }
- registerNode(node) {
- const key = this.key;
- if (!node || !node.data) return;
- if (!key) this.nodesMap[node.id] = node;
- else {
- const nodeKey = node.key;
- if (!isNil(nodeKey)) this.nodesMap[nodeKey] = node;
- }
- }
- deregisterNode(node) {
- if (!this.key || !node || !node.data) return;
- node.childNodes.forEach((child) => {
- this.deregisterNode(child);
- });
- delete this.nodesMap[node.key];
- }
- getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
- const checkedNodes = [];
- const traverse = function(node) {
- (node.root ? node.root.childNodes : node.childNodes).forEach((child) => {
- if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) checkedNodes.push(child.data);
- traverse(child);
- });
- };
- traverse(this);
- return checkedNodes;
- }
- getCheckedKeys(leafOnly = false) {
- return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
- }
- getHalfCheckedNodes() {
- const nodes = [];
- const traverse = function(node) {
- (node.root ? node.root.childNodes : node.childNodes).forEach((child) => {
- if (child.indeterminate) nodes.push(child.data);
- traverse(child);
- });
- };
- traverse(this);
- return nodes;
- }
- getHalfCheckedKeys() {
- return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
- }
- _getAllNodes() {
- const allNodes = [];
- const nodesMap = this.nodesMap;
- for (const nodeKey in nodesMap) if (hasOwn(nodesMap, nodeKey)) allNodes.push(nodesMap[nodeKey]);
- return allNodes;
- }
- updateChildren(key, data) {
- const node = this.nodesMap[key];
- if (!node) return;
- const childNodes = node.childNodes;
- for (let i = childNodes.length - 1; i >= 0; i--) {
- const child = childNodes[i];
- this.remove(child.data);
- }
- for (let i = 0, j = data.length; i < j; i++) {
- const child = data[i];
- this.append(child, node.data);
- }
- }
- _setCheckedKeys(key, leafOnly = false, checkedKeys) {
- const allNodes = this._getAllNodes().sort((a, b) => a.level - b.level);
- const cache = Object.create(null);
- const keys = Object.keys(checkedKeys);
- allNodes.forEach((node) => node.setChecked(false, false));
- const cacheCheckedChild = (node) => {
- node.childNodes.forEach((child) => {
- cache[child.data[key]] = true;
- if (child.childNodes?.length) cacheCheckedChild(child);
- });
- };
- for (let i = 0, j = allNodes.length; i < j; i++) {
- const node = allNodes[i];
- const nodeKey = node.data[key].toString();
- if (!keys.includes(nodeKey)) {
- if (node.checked && !cache[nodeKey]) node.setChecked(false, false);
- continue;
- }
- if (node.childNodes.length) cacheCheckedChild(node);
- if (node.isLeaf || this.checkStrictly) {
- node.setChecked(true, false);
- continue;
- }
- node.setChecked(true, true);
- if (leafOnly) {
- node.setChecked(false, false, true);
- const traverse = function(node) {
- node.childNodes.forEach((child) => {
- if (!child.isLeaf) child.setChecked(false, false, true);
- traverse(child);
- });
- node.reInitChecked();
- };
- traverse(node);
- }
- }
- }
- setCheckedNodes(array, leafOnly = false) {
- const key = this.key;
- const checkedKeys = {};
- array.forEach((item) => {
- checkedKeys[(item || {})[key]] = true;
- });
- this._setCheckedKeys(key, leafOnly, checkedKeys);
- }
- setCheckedKeys(keys, leafOnly = false) {
- this.defaultCheckedKeys = keys;
- const key = this.key;
- const checkedKeys = {};
- keys.forEach((key) => {
- checkedKeys[key] = true;
- });
- this._setCheckedKeys(key, leafOnly, checkedKeys);
- }
- setDefaultExpandedKeys(keys) {
- keys = keys || [];
- this.defaultExpandedKeys = keys;
- keys.forEach((key) => {
- const node = this.getNode(key);
- if (node) node.expand(null, this.autoExpandParent);
- });
- }
- setChecked(data, checked, deep) {
- const node = this.getNode(data);
- if (node) node.setChecked(!!checked, deep);
- }
- getCurrentNode() {
- return this.currentNode;
- }
- setCurrentNode(currentNode) {
- const prevCurrentNode = this.currentNode;
- if (prevCurrentNode) prevCurrentNode.isCurrent = false;
- this.currentNode = currentNode;
- this.currentNode.isCurrent = true;
- }
- setUserCurrentNode(node, shouldAutoExpandParent = true) {
- const key = node[this.key];
- const currNode = this.nodesMap[key];
- this.setCurrentNode(currNode);
- if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) this.currentNode.parent?.expand(null, true);
- }
- setCurrentNodeKey(key, shouldAutoExpandParent = true) {
- this.currentNodeKey = key;
- if (isPropAbsent(key)) {
- this.currentNode && (this.currentNode.isCurrent = false);
- this.currentNode = null;
- return;
- }
- const node = this.getNode(key);
- if (node) {
- this.setCurrentNode(node);
- if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) this.currentNode.parent?.expand(null, true);
- }
- }
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs
- function useNodeExpandEventBroadcast(props) {
- const parentNodeMap = inject(TREE_NODE_MAP_INJECTION_KEY, null);
- let currentNodeMap = {
- treeNodeExpand: (node) => {
- if (props.node !== node) props.node?.collapse();
- },
- children: /* @__PURE__ */ new Set()
- };
- if (parentNodeMap) parentNodeMap.children.add(currentNodeMap);
- onBeforeUnmount(() => {
- if (parentNodeMap) parentNodeMap.children.delete(currentNodeMap);
- currentNodeMap = null;
- });
- provide(TREE_NODE_MAP_INJECTION_KEY, currentNodeMap);
- return { broadcastExpanded: (node) => {
- if (!props.accordion) return;
- for (const childNode of currentNodeMap.children) childNode.treeNodeExpand(node);
- } };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/model/useDragNode.mjs
- var dragEventsKey = Symbol("dragEvents");
- function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
- const ns = useNamespace("tree");
- const dragState = ref({
- showDropIndicator: false,
- draggingNode: null,
- dropNode: null,
- allowDrop: true,
- dropType: null
- });
- const treeNodeDragStart = ({ event, treeNode }) => {
- if (!event.dataTransfer) return;
- if (isFunction$1(props.allowDrag) && !props.allowDrag(treeNode.node)) {
- event.preventDefault();
- return false;
- }
- event.dataTransfer.effectAllowed = "move";
- try {
- event.dataTransfer.setData("text/plain", "");
- } catch {}
- dragState.value.draggingNode = treeNode;
- ctx.emit("node-drag-start", treeNode.node, event);
- };
- const treeNodeDragOver = ({ event, treeNode }) => {
- if (!event.dataTransfer) return;
- const dropNode = treeNode;
- const oldDropNode = dragState.value.dropNode;
- if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) removeClass(oldDropNode.$el, ns.is("drop-inner"));
- const draggingNode = dragState.value.draggingNode;
- if (!draggingNode || !dropNode) return;
- let dropPrev = true;
- let dropInner = true;
- let dropNext = true;
- let userAllowDropInner = true;
- if (isFunction$1(props.allowDrop)) {
- dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev");
- userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner");
- dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
- }
- event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
- if ((dropPrev || dropInner || dropNext) && oldDropNode?.node.id !== dropNode.node.id) {
- if (oldDropNode) ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
- ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event);
- }
- if (dropPrev || dropInner || dropNext) dragState.value.dropNode = dropNode;
- else dragState.value.dropNode = null;
- if (dropNode.node.nextSibling === draggingNode.node) dropNext = false;
- if (dropNode.node.previousSibling === draggingNode.node) dropPrev = false;
- if (dropNode.node.contains(draggingNode.node, false)) dropInner = false;
- if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
- dropPrev = false;
- dropInner = false;
- dropNext = false;
- }
- const dropEl = dropNode.$el;
- const targetPosition = dropEl.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect();
- const treePosition = el$.value.getBoundingClientRect();
- const treeScrollTop = el$.value.scrollTop;
- let dropType;
- const prevPercent = dropPrev ? dropInner ? .25 : dropNext ? .45 : 1 : Number.NEGATIVE_INFINITY;
- const nextPercent = dropNext ? dropInner ? .75 : dropPrev ? .55 : 0 : Number.POSITIVE_INFINITY;
- let indicatorTop = -9999;
- const distance = event.clientY - targetPosition.top;
- if (distance < targetPosition.height * prevPercent) dropType = "before";
- else if (distance > targetPosition.height * nextPercent) dropType = "after";
- else if (dropInner) dropType = "inner";
- else dropType = "none";
- const iconPosition = dropEl.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect();
- const dropIndicator = dropIndicator$.value;
- if (dropType === "before") indicatorTop = iconPosition.top - treePosition.top + treeScrollTop;
- else if (dropType === "after") indicatorTop = iconPosition.bottom - treePosition.top + treeScrollTop;
- dropIndicator.style.top = `${indicatorTop}px`;
- dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`;
- if (dropType === "inner") addClass(dropEl, ns.is("drop-inner"));
- else removeClass(dropEl, ns.is("drop-inner"));
- dragState.value.showDropIndicator = dropType === "before" || dropType === "after";
- dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;
- dragState.value.dropType = dropType;
- ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event);
- };
- const treeNodeDragEnd = (event) => {
- const { draggingNode, dropType, dropNode } = dragState.value;
- event.preventDefault();
- if (event.dataTransfer) event.dataTransfer.dropEffect = "move";
- if (draggingNode?.node.data && dropNode) {
- const draggingNodeCopy = { data: draggingNode.node.data };
- if (dropType !== "none") draggingNode.node.remove();
- if (dropType === "before") dropNode.node.parent?.insertBefore(draggingNodeCopy, dropNode.node);
- else if (dropType === "after") dropNode.node.parent?.insertAfter(draggingNodeCopy, dropNode.node);
- else if (dropType === "inner") dropNode.node.insertChild(draggingNodeCopy);
- if (dropType !== "none") {
- store.value.registerNode(draggingNodeCopy);
- if (store.value.key) draggingNode.node.eachNode((node) => {
- store.value.nodesMap[node.data[store.value.key]]?.setChecked(node.checked, !store.value.checkStrictly);
- });
- }
- removeClass(dropNode.$el, ns.is("drop-inner"));
- ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event);
- if (dropType !== "none") ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event);
- }
- if (draggingNode && !dropNode) ctx.emit("node-drag-end", draggingNode.node, null, dropType, event);
- dragState.value.showDropIndicator = false;
- dragState.value.draggingNode = null;
- dragState.value.dropNode = null;
- dragState.value.allowDrop = true;
- };
- provide(dragEventsKey, {
- treeNodeDragStart,
- treeNodeDragOver,
- treeNodeDragEnd
- });
- return { dragState };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/tree-node.vue_vue_type_script_lang.mjs
- var tree_node_vue_vue_type_script_lang_default = defineComponent({
- name: "ElTreeNode",
- components: {
- ElCollapseTransition,
- ElCheckbox,
- NodeContent: defineComponent({
- name: "ElTreeNodeContent",
- props: {
- node: {
- type: Object,
- required: true
- },
- renderContent: Function
- },
- setup(props) {
- const ns = useNamespace("tree");
- const nodeInstance = inject(NODE_INSTANCE_INJECTION_KEY);
- const tree = inject(ROOT_TREE_INJECTION_KEY);
- return () => {
- const node = props.node;
- const { data, store } = node;
- return props.renderContent ? props.renderContent(h$1, {
- _self: nodeInstance,
- node,
- data,
- store
- }) : renderSlot(tree.ctx.slots, "default", {
- node,
- data
- }, () => [h$1(ElText, {
- tag: "span",
- truncated: true,
- class: ns.be("node", "label")
- }, () => [node.label])]);
- };
- }
- }),
- ElIcon,
- Loading: loading_default
- },
- props: {
- node: {
- type: Node$1,
- default: () => ({})
- },
- props: {
- type: Object,
- default: () => ({})
- },
- accordion: Boolean,
- renderContent: Function,
- renderAfterExpand: Boolean,
- showCheckbox: Boolean
- },
- emits: ["node-expand"],
- setup(props, ctx) {
- const ns = useNamespace("tree");
- const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
- const tree = inject(ROOT_TREE_INJECTION_KEY);
- const expanded = ref(false);
- const childNodeRendered = ref(false);
- const oldChecked = ref();
- const oldIndeterminate = ref();
- const node$ = ref();
- const dragEvents = inject(dragEventsKey);
- const instance = getCurrentInstance();
- provide(NODE_INSTANCE_INJECTION_KEY, instance);
- if (!tree) debugWarn("Tree", "Can not find node's tree.");
- if (props.node.expanded) {
- expanded.value = true;
- childNodeRendered.value = true;
- }
- const childrenKey = tree.props.props["children"] || "children";
- watch(() => {
- const children = props.node.data?.[childrenKey];
- return children && [...children];
- }, () => {
- props.node.updateChildren();
- });
- watch(() => props.node.indeterminate, (val) => {
- handleSelectChange(props.node.checked, val);
- });
- watch(() => props.node.checked, (val) => {
- handleSelectChange(val, props.node.indeterminate);
- });
- watch(() => props.node.childNodes.length, () => props.node.reInitChecked());
- watch(() => props.node.expanded, (val) => {
- nextTick(() => expanded.value = val);
- if (val) childNodeRendered.value = true;
- });
- const getNodeKey$1 = (node) => {
- return tree.props.nodeKey ? getNodeKey(tree.props.nodeKey, node.data) : node.id;
- };
- const getNodeClass = (node) => {
- const nodeClassFunc = props.props.class;
- if (!nodeClassFunc) return {};
- let className;
- if (isFunction$1(nodeClassFunc)) {
- const { data } = node;
- className = nodeClassFunc(data, node);
- } else className = nodeClassFunc;
- if (isString(className)) return { [className]: true };
- else return className;
- };
- const handleSelectChange = (checked, indeterminate) => {
- if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) tree.ctx.emit("check-change", props.node.data, checked, indeterminate);
- oldChecked.value = checked;
- oldIndeterminate.value = indeterminate;
- };
- const handleClick = (e) => {
- handleCurrentChange(tree.store, tree.ctx.emit, () => {
- if (tree?.props?.nodeKey) {
- const curNodeKey = getNodeKey$1(props.node);
- tree.store.value.setCurrentNodeKey(curNodeKey);
- } else tree.store.value.setCurrentNode(props.node);
- });
- tree.currentNode.value = props.node;
- if (tree.props.expandOnClickNode) handleExpandIconClick();
- if ((tree.props.checkOnClickNode || props.node.isLeaf && tree.props.checkOnClickLeaf && props.showCheckbox) && !props.node.disabled) handleCheckChange(!props.node.checked);
- tree.ctx.emit("node-click", props.node.data, props.node, instance, e);
- };
- const handleContextMenu = (event) => {
- if (tree.instance.vnode.props?.["onNodeContextmenu"]) {
- event.stopPropagation();
- event.preventDefault();
- }
- tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance);
- };
- const handleExpandIconClick = () => {
- if (props.node.isLeaf) return;
- if (expanded.value) {
- tree.ctx.emit("node-collapse", props.node.data, props.node, instance);
- props.node.collapse();
- } else props.node.expand(() => {
- ctx.emit("node-expand", props.node.data, props.node, instance);
- });
- };
- const handleCheckChange = (value) => {
- const checkStrictly = tree?.props.checkStrictly;
- const childNodes = props.node.childNodes;
- if (!checkStrictly && childNodes.length) value = childNodes.some((node) => !node.isEffectivelyChecked);
- props.node.setChecked(value, !checkStrictly);
- nextTick(() => {
- const store = tree.store.value;
- tree.ctx.emit("check", props.node.data, {
- checkedNodes: store.getCheckedNodes(),
- checkedKeys: store.getCheckedKeys(),
- halfCheckedNodes: store.getHalfCheckedNodes(),
- halfCheckedKeys: store.getHalfCheckedKeys()
- });
- });
- };
- const handleChildNodeExpand = (nodeData, node, instance) => {
- broadcastExpanded(node);
- tree.ctx.emit("node-expand", nodeData, node, instance);
- };
- const handleDragStart = (event) => {
- if (!tree.props.draggable) return;
- dragEvents.treeNodeDragStart({
- event,
- treeNode: props
- });
- };
- const handleDragOver = (event) => {
- event.preventDefault();
- if (!tree.props.draggable) return;
- dragEvents.treeNodeDragOver({
- event,
- treeNode: {
- $el: node$.value,
- node: props.node
- }
- });
- };
- const handleDrop = (event) => {
- event.preventDefault();
- };
- const handleDragEnd = (event) => {
- if (!tree.props.draggable) return;
- dragEvents.treeNodeDragEnd(event);
- };
- return {
- ns,
- node$,
- tree,
- expanded,
- childNodeRendered,
- oldChecked,
- oldIndeterminate,
- getNodeKey: getNodeKey$1,
- getNodeClass,
- handleSelectChange,
- handleClick,
- handleContextMenu,
- handleExpandIconClick,
- handleCheckChange,
- handleChildNodeExpand,
- handleDragStart,
- handleDragOver,
- handleDrop,
- handleDragEnd,
- CaretRight: caret_right_default
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/tree-node.mjs
- var _hoisted_1$12 = [
- "aria-expanded",
- "aria-disabled",
- "aria-checked",
- "draggable",
- "data-key"
- ];
- var _hoisted_2$7 = ["aria-expanded"];
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_checkbox = resolveComponent("el-checkbox");
- const _component_loading = resolveComponent("loading");
- const _component_node_content = resolveComponent("node-content");
- const _component_el_tree_node = resolveComponent("el-tree-node");
- const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
- return withDirectives((openBlock(), createElementBlock("div", {
- ref: "node$",
- class: normalizeClass([
- _ctx.ns.b("node"),
- _ctx.ns.is("expanded", _ctx.expanded),
- _ctx.ns.is("current", _ctx.node.isCurrent),
- _ctx.ns.is("hidden", !_ctx.node.visible),
- _ctx.ns.is("focusable", !_ctx.node.disabled),
- _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked),
- _ctx.getNodeClass(_ctx.node)
- ]),
- role: "treeitem",
- tabindex: "-1",
- "aria-expanded": _ctx.expanded,
- "aria-disabled": _ctx.node.disabled,
- "aria-checked": _ctx.node.checked,
- draggable: _ctx.tree.props.draggable,
- "data-key": _ctx.getNodeKey(_ctx.node),
- onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
- onContextmenu: _cache[3] || (_cache[3] = (...args) => _ctx.handleContextMenu && _ctx.handleContextMenu(...args)),
- onDragstart: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleDragStart && _ctx.handleDragStart(...args), ["stop"])),
- onDragover: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.handleDragOver && _ctx.handleDragOver(...args), ["stop"])),
- onDragend: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.handleDragEnd && _ctx.handleDragEnd(...args), ["stop"])),
- onDrop: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.handleDrop && _ctx.handleDrop(...args), ["stop"]))
- }, [createBaseVNode("div", {
- class: normalizeClass(_ctx.ns.be("node", "content")),
- style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" })
- }, [
- _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, {
- key: 0,
- class: normalizeClass([
- _ctx.ns.be("node", "expand-icon"),
- _ctx.ns.is("leaf", _ctx.node.isLeaf),
- { expanded: !_ctx.node.isLeaf && _ctx.expanded }
- ]),
- onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight)))]),
- _: 1
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
- _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
- key: 1,
- "model-value": _ctx.node.checked,
- indeterminate: _ctx.node.indeterminate,
- disabled: !!_ctx.node.disabled,
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
- onChange: _ctx.handleCheckChange
- }, null, 8, [
- "model-value",
- "indeterminate",
- "disabled",
- "onChange"
- ])) : createCommentVNode("v-if", true),
- _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
- key: 2,
- class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")])
- }, {
- default: withCtx(() => [createVNode(_component_loading)]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true),
- createVNode(_component_node_content, {
- node: _ctx.node,
- "render-content": _ctx.renderContent
- }, null, 8, ["node", "render-content"])
- ], 6), createVNode(_component_el_collapse_transition, null, {
- default: withCtx(() => [!_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(_ctx.ns.be("node", "children")),
- role: "group",
- "aria-expanded": _ctx.expanded,
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {
- return openBlock(), createBlock(_component_el_tree_node, {
- key: _ctx.getNodeKey(child),
- "render-content": _ctx.renderContent,
- "render-after-expand": _ctx.renderAfterExpand,
- "show-checkbox": _ctx.showCheckbox,
- node: child,
- accordion: _ctx.accordion,
- props: _ctx.props,
- onNodeExpand: _ctx.handleChildNodeExpand
- }, null, 8, [
- "render-content",
- "render-after-expand",
- "show-checkbox",
- "node",
- "accordion",
- "props",
- "onNodeExpand"
- ]);
- }), 128))], 10, _hoisted_2$7)), [[vShow, _ctx.expanded]]) : createCommentVNode("v-if", true)]),
- _: 1
- })], 42, _hoisted_1$12)), [[vShow, _ctx.node.visible]]);
- }
- var tree_node_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(tree_node_vue_vue_type_script_lang_default, [["render", _sfc_render$2]]);
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/model/useKeydown.mjs
- function useKeydown({ el$ }, store) {
- const ns = useNamespace("tree");
- onMounted(() => {
- initTabIndex();
- });
- onUpdated(() => {
- el$.value?.querySelectorAll("input[type=checkbox]").forEach((checkbox) => {
- checkbox.setAttribute("tabindex", "-1");
- });
- });
- function canNodeFocus(treeItems, nextIndex) {
- const currentNode = store.value.getNode(treeItems[nextIndex].dataset.key);
- return currentNode.canFocus && currentNode.visible && (currentNode.parent?.expanded || currentNode.parent?.level === 0);
- }
- const handleKeydown = (ev) => {
- const currentItem = ev.target;
- if (!currentItem.className.includes(ns.b("node"))) return;
- const code = getEventCode(ev);
- const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
- const currentIndex = treeItems.indexOf(currentItem);
- let nextIndex;
- if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {
- ev.preventDefault();
- if (code === EVENT_CODE.up) {
- nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.length - 1;
- const startIndex = nextIndex;
- while (true) {
- if (canNodeFocus(treeItems, nextIndex)) break;
- nextIndex--;
- if (nextIndex === startIndex) {
- nextIndex = -1;
- break;
- }
- if (nextIndex < 0) nextIndex = treeItems.length - 1;
- }
- } else {
- nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.length - 1 ? currentIndex + 1 : 0;
- const startIndex = nextIndex;
- while (true) {
- if (canNodeFocus(treeItems, nextIndex)) break;
- nextIndex++;
- if (nextIndex === startIndex) {
- nextIndex = -1;
- break;
- }
- if (nextIndex >= treeItems.length) nextIndex = 0;
- }
- }
- nextIndex !== -1 && treeItems[nextIndex].focus();
- }
- if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) {
- ev.preventDefault();
- currentItem.click();
- }
- const hasInput = currentItem.querySelector("[type=\"checkbox\"]");
- if ([
- EVENT_CODE.enter,
- EVENT_CODE.numpadEnter,
- EVENT_CODE.space
- ].includes(code) && hasInput) {
- ev.preventDefault();
- hasInput.click();
- }
- };
- useEventListener(el$, "keydown", handleKeydown);
- const initTabIndex = () => {
- if (!el$.value) return;
- const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
- Array.from(el$.value.querySelectorAll("input[type=checkbox]")).forEach((checkbox) => {
- checkbox.setAttribute("tabindex", "-1");
- });
- const checkedItem = el$.value.querySelectorAll(`.${ns.is("checked")}[role=treeitem]`);
- if (checkedItem.length) {
- checkedItem[0].setAttribute("tabindex", "0");
- return;
- }
- treeItems[0]?.setAttribute("tabindex", "0");
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/tree.vue_vue_type_script_lang.mjs
- var tree_vue_vue_type_script_lang_default = defineComponent({
- name: "ElTree",
- components: { ElTreeNode: tree_node_default$1 },
- props: treeProps,
- emits: treeEmits,
- setup(props, ctx) {
- const { t } = useLocale();
- const ns = useNamespace("tree");
- const store = ref(new TreeStore({
- key: props.nodeKey,
- data: props.data,
- lazy: props.lazy,
- props: props.props,
- load: props.load,
- currentNodeKey: props.currentNodeKey,
- checkStrictly: props.checkStrictly,
- checkDescendants: props.checkDescendants,
- defaultCheckedKeys: props.defaultCheckedKeys,
- defaultExpandedKeys: props.defaultExpandedKeys,
- autoExpandParent: props.autoExpandParent,
- defaultExpandAll: props.defaultExpandAll,
- filterNodeMethod: props.filterNodeMethod
- }));
- store.value.initialize();
- const root = ref(store.value.root);
- const currentNode = ref(null);
- const el$ = ref(null);
- const dropIndicator$ = ref(null);
- const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
- const { dragState } = useDragNodeHandler({
- props,
- ctx,
- el$,
- dropIndicator$,
- store
- });
- useKeydown({ el$ }, store);
- const instance = getCurrentInstance();
- const isSelectTree = computed(() => {
- let parent = instance?.parent;
- while (parent) {
- if (parent.type.name === "ElTreeSelect") return true;
- parent = parent.parent;
- }
- return false;
- });
- const isEmpty = computed(() => {
- const { childNodes } = root.value;
- return (!childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible)) && !isSelectTree.value;
- });
- watch(() => props.currentNodeKey, (newVal) => {
- store.value.setCurrentNodeKey(newVal ?? null);
- });
- watch(() => props.defaultCheckedKeys, (newVal, oldVal) => {
- if (isEqual$1(newVal, oldVal)) return;
- store.value.setDefaultCheckedKey(newVal ?? []);
- });
- watch(() => props.defaultExpandedKeys, (newVal) => {
- store.value.setDefaultExpandedKeys(newVal ?? []);
- });
- watch(() => props.data, (newVal) => {
- store.value.setData(newVal);
- }, { deep: true });
- watch(() => props.checkStrictly, (newVal) => {
- store.value.checkStrictly = newVal;
- });
- const filter = (value) => {
- if (!props.filterNodeMethod) throw new Error("[Tree] filterNodeMethod is required when filter");
- store.value.filter(value);
- };
- const getNodeKey$1 = (node) => {
- return props.nodeKey ? getNodeKey(props.nodeKey, node.data) : node.id;
- };
- const requireNodeKey = (methodName) => {
- if (!props.nodeKey) throw new Error(`[Tree] nodeKey is required in ${methodName}`);
- };
- const getNodePath = (data) => {
- requireNodeKey("getNodePath");
- const node = store.value.getNode(data);
- if (!node) return [];
- const path = [node.data];
- let parent = node.parent;
- while (parent && parent !== root.value) {
- path.push(parent.data);
- parent = parent.parent;
- }
- return path.reverse();
- };
- const getCheckedNodes = (leafOnly, includeHalfChecked) => {
- return store.value.getCheckedNodes(leafOnly, includeHalfChecked);
- };
- const getCheckedKeys = (leafOnly) => {
- return store.value.getCheckedKeys(leafOnly);
- };
- const getCurrentNode = () => {
- const currentNode = store.value.getCurrentNode();
- return currentNode ? currentNode.data : null;
- };
- const getCurrentKey = () => {
- requireNodeKey("getCurrentKey");
- const currentNode = getCurrentNode();
- return currentNode ? currentNode[props.nodeKey] : null;
- };
- const setCheckedNodes = (nodes, leafOnly) => {
- requireNodeKey("setCheckedNodes");
- store.value.setCheckedNodes(nodes, leafOnly);
- };
- const setCheckedKeys = (keys, leafOnly) => {
- requireNodeKey("setCheckedKeys");
- store.value.setCheckedKeys(keys, leafOnly);
- };
- const setChecked = (data, checked, deep) => {
- store.value.setChecked(data, checked, deep);
- };
- const getHalfCheckedNodes = () => {
- return store.value.getHalfCheckedNodes();
- };
- const getHalfCheckedKeys = () => {
- return store.value.getHalfCheckedKeys();
- };
- const setCurrentNode = (node, shouldAutoExpandParent = true) => {
- requireNodeKey("setCurrentNode");
- handleCurrentChange(store, ctx.emit, () => {
- broadcastExpanded(node);
- store.value.setUserCurrentNode(node, shouldAutoExpandParent);
- });
- };
- const setCurrentKey = (key = null, shouldAutoExpandParent = true) => {
- requireNodeKey("setCurrentKey");
- handleCurrentChange(store, ctx.emit, () => {
- broadcastExpanded();
- store.value.setCurrentNodeKey(key, shouldAutoExpandParent);
- });
- };
- const getNode = (data) => {
- return store.value.getNode(data);
- };
- const remove = (data) => {
- store.value.remove(data);
- };
- const append = (data, parentNode) => {
- store.value.append(data, parentNode);
- };
- const insertBefore = (data, refNode) => {
- store.value.insertBefore(data, refNode);
- };
- const insertAfter = (data, refNode) => {
- store.value.insertAfter(data, refNode);
- };
- const handleNodeExpand = (nodeData, node, instance) => {
- broadcastExpanded(node);
- ctx.emit("node-expand", nodeData, node, instance);
- };
- const updateKeyChildren = (key, data) => {
- requireNodeKey("updateKeyChildren");
- store.value.updateChildren(key, data);
- };
- provide(ROOT_TREE_INJECTION_KEY, {
- ctx,
- props,
- store,
- root,
- currentNode,
- instance
- });
- provide(formItemContextKey, void 0);
- return {
- ns,
- store,
- root,
- currentNode,
- dragState,
- el$,
- dropIndicator$,
- isEmpty,
- filter,
- getNodeKey: getNodeKey$1,
- getNodePath,
- getCheckedNodes,
- getCheckedKeys,
- getCurrentNode,
- getCurrentKey,
- setCheckedNodes,
- setCheckedKeys,
- setChecked,
- getHalfCheckedNodes,
- getHalfCheckedKeys,
- setCurrentNode,
- setCurrentKey,
- t,
- getNode,
- remove,
- append,
- insertBefore,
- insertAfter,
- handleNodeExpand,
- updateKeyChildren
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tree/src/tree2.mjs
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_tree_node = resolveComponent("el-tree-node");
- return openBlock(), createElementBlock("div", {
- ref: "el$",
- class: normalizeClass([
- _ctx.ns.b(),
- _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode),
- _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop),
- _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"),
- { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent }
- ]),
- role: "tree"
- }, [
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {
- return openBlock(), createBlock(_component_el_tree_node, {
- key: _ctx.getNodeKey(child),
- node: child,
- props: _ctx.props,
- accordion: _ctx.accordion,
- "render-after-expand": _ctx.renderAfterExpand,
- "show-checkbox": _ctx.showCheckbox,
- "render-content": _ctx.renderContent,
- onNodeExpand: _ctx.handleNodeExpand
- }, null, 8, [
- "node",
- "props",
- "accordion",
- "render-after-expand",
- "show-checkbox",
- "render-content",
- "onNodeExpand"
- ]);
- }), 128)),
- _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(_ctx.ns.e("empty-block"))
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", { class: normalizeClass(_ctx.ns.e("empty-text")) }, toDisplayString(_ctx.emptyText ?? _ctx.t("el.tree.emptyText")), 3)])], 2)) : createCommentVNode("v-if", true),
- withDirectives(createBaseVNode("div", {
- ref: "dropIndicator$",
- class: normalizeClass(_ctx.ns.e("drop-indicator"))
- }, null, 2), [[vShow, _ctx.dragState.showDropIndicator]])
- ], 2);
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree/index.mjs
- var ElTree = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(tree_vue_vue_type_script_lang_default, [["render", _sfc_render$1]]));
- //#endregion
- //#region node_modules/element-plus/es/components/tree-select/src/select.mjs
- var useSelect = (props, { attrs, emit }, { select, tree, key }) => {
- const ns = useNamespace("tree-select");
- watch(() => props.data, () => {
- if (props.filterable) nextTick(() => {
- tree.value?.filter(select.value?.states.inputValue);
- });
- }, { flush: "post" });
- const focusLastNode = (listNode) => {
- const lastNode = listNode.at(-1);
- if (lastNode.expanded && lastNode.childNodes.at(-1)) focusLastNode([lastNode.childNodes.at(-1)]);
- else {
- (tree.value.el$?.querySelector(`[data-key="${listNode.at(-1).key}"]`))?.focus({ preventScroll: true });
- return;
- }
- };
- onMounted(() => {
- useEventListener(() => select.value?.$el, "keydown", async (evt) => {
- const code = getEventCode(evt);
- const { dropdownMenuVisible } = select.value;
- if ([EVENT_CODE.down, EVENT_CODE.up].includes(code) && dropdownMenuVisible) {
- await nextTick();
- setTimeout(() => {
- if (EVENT_CODE.up === code) {
- const listNode = tree.value.store.root.childNodes;
- focusLastNode(listNode);
- return;
- }
- select.value.optionsArray[select.value.states.hoveringIndex].$el?.parentNode?.parentNode?.focus({ preventScroll: true });
- });
- }
- }, { capture: true });
- });
- return {
- ...pick(toRefs(props), Object.keys(ElSelect.props)),
- ...attrs,
- class: computed(() => attrs.class),
- style: computed(() => attrs.style),
- "onUpdate:modelValue": (value) => emit(UPDATE_MODEL_EVENT, value),
- valueKey: key,
- popperClass: computed(() => {
- const classes = [ns.e("popper")];
- if (props.popperClass) classes.push(props.popperClass);
- return classes.join(" ");
- }),
- filterMethod: (keyword = "") => {
- if (props.filterMethod) props.filterMethod(keyword);
- else if (props.remoteMethod) props.remoteMethod(keyword);
- else tree.value?.filter(keyword);
- }
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree-select/src/tree-select-option.mjs
- var component = defineComponent({
- extends: ElOption,
- setup(props, ctx) {
- const result = ElOption.setup(props, ctx);
- delete result.selectOptionClick;
- const vm = getCurrentInstance().proxy;
- nextTick(() => {
- if (!result.select.states.cachedOptions.get(vm.value)) result.select.onOptionCreate(vm);
- });
- watch(() => ctx.attrs.visible, (val) => {
- nextTick(() => {
- result.states.visible = val;
- });
- }, { immediate: true });
- return result;
- },
- methods: { selectOptionClick() {
- this.$el.parentElement.click();
- } }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tree-select/src/utils.mjs
- function isValidValue(val) {
- return val || val === 0;
- }
- function isValidArray(val) {
- return isArray$1(val) && val.length;
- }
- function toValidArray(val) {
- return isArray$1(val) ? val : isValidValue(val) ? [val] : [];
- }
- function treeFind(treeData, findCallback, getChildren, resultCallback, parent) {
- for (let i = 0; i < treeData.length; i++) {
- const data = treeData[i];
- if (findCallback(data, i, treeData, parent)) return resultCallback ? resultCallback(data, i, treeData, parent) : data;
- else {
- const children = getChildren(data);
- if (isValidArray(children)) {
- const find = treeFind(children, findCallback, getChildren, resultCallback, data);
- if (find) return find;
- }
- }
- }
- }
- function treeEach(treeData, callback, getChildren, parent) {
- for (let i = 0; i < treeData.length; i++) {
- const data = treeData[i];
- callback(data, i, treeData, parent);
- const children = getChildren(data);
- if (isValidArray(children)) treeEach(children, callback, getChildren, data);
- }
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree-select/src/tree.mjs
- var useTree$1 = (props, { attrs, slots, emit }, { select, tree, key }) => {
- watch([() => props.modelValue, tree], () => {
- if (props.showCheckbox) nextTick(() => {
- const treeInstance = tree.value;
- if (treeInstance && !isEqual$1(treeInstance.getCheckedKeys(), toValidArray(props.modelValue))) treeInstance.setCheckedKeys(toValidArray(props.modelValue));
- });
- }, {
- immediate: true,
- deep: true
- });
- const propsMap = computed(() => ({
- value: key.value,
- label: "label",
- children: "children",
- disabled: "disabled",
- isLeaf: "isLeaf",
- ...props.props
- }));
- const getNodeValByProp = (prop, data) => {
- const propVal = propsMap.value[prop];
- if (isFunction$1(propVal)) return propVal(data, tree.value?.getNode(getNodeValByProp("value", data)));
- else return data[propVal];
- };
- const defaultExpandedParentKeys = toValidArray(props.modelValue).map((value) => {
- return treeFind(props.data || [], (data) => getNodeValByProp("value", data) === value, (data) => getNodeValByProp("children", data), (data, index, array, parent) => parent && getNodeValByProp("value", parent));
- }).filter((item) => isValidValue(item));
- const cacheOptions = computed(() => {
- if (!props.renderAfterExpand && !props.lazy) return [];
- const options = [];
- treeEach(props.data.concat(props.cacheData), (node) => {
- const value = getNodeValByProp("value", node);
- options.push({
- value,
- currentLabel: getNodeValByProp("label", node),
- isDisabled: getNodeValByProp("disabled", node)
- });
- }, (data) => getNodeValByProp("children", data));
- return options;
- });
- const getChildCheckedKeys = () => {
- return tree.value?.getCheckedKeys().filter((checkedKey) => {
- const node = tree.value?.getNode(checkedKey);
- return !isNil(node) && isEmpty(node.childNodes);
- });
- };
- const emitChange = (val) => {
- if (!isEqual$1(props.modelValue, val)) emit(CHANGE_EVENT, val);
- };
- function update(val) {
- emit(UPDATE_MODEL_EVENT, val);
- emitChange(val);
- }
- return {
- ...pick(toRefs(props), Object.keys(ElTree.props)),
- ...attrs,
- nodeKey: key,
- expandOnClickNode: computed(() => {
- return !props.checkStrictly && props.expandOnClickNode;
- }),
- defaultExpandedKeys: computed(() => {
- return props.defaultExpandedKeys ? props.defaultExpandedKeys.concat(defaultExpandedParentKeys) : defaultExpandedParentKeys;
- }),
- renderContent: (h, { node, data, store }) => {
- return h(component, {
- value: getNodeValByProp("value", data),
- label: getNodeValByProp("label", data),
- disabled: getNodeValByProp("disabled", data),
- visible: node.visible
- }, props.renderContent ? () => props.renderContent(h, {
- node,
- data,
- store
- }) : slots.default ? () => slots.default({
- node,
- data,
- store
- }) : void 0);
- },
- filterNodeMethod: (value, data, node) => {
- if (props.filterNodeMethod) return props.filterNodeMethod(value, data, node);
- if (!value) return true;
- return new RegExp(escapeStringRegexp(value), "i").test(getNodeValByProp("label", data) || "");
- },
- onNodeClick: (data, node, e) => {
- attrs.onNodeClick?.(data, node, e);
- if (props.showCheckbox && props.checkOnClickNode) return;
- if (!props.showCheckbox && (props.checkStrictly || node.isLeaf)) {
- if (!getNodeValByProp("disabled", data)) {
- const option = select.value?.states.options.get(getNodeValByProp("value", data));
- select.value?.handleOptionSelect(option);
- }
- } else if (props.expandOnClickNode) e.proxy.handleExpandIconClick();
- },
- onCheck: (data, params) => {
- if (!props.showCheckbox) return;
- const dataValue = getNodeValByProp("value", data);
- const dataMap = {};
- treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
- const uncachedCheckedKeys = params.checkedKeys;
- const cachedKeys = props.multiple ? toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item)) : [];
- const checkedKeys = cachedKeys.concat(uncachedCheckedKeys);
- if (props.checkStrictly) update(props.multiple ? checkedKeys : checkedKeys.includes(dataValue) ? dataValue : void 0);
- else if (props.multiple) {
- const childKeys = getChildCheckedKeys();
- update(cachedKeys.concat(childKeys));
- } else {
- const firstLeaf = treeFind([data], (data) => !isValidArray(getNodeValByProp("children", data)) && !getNodeValByProp("disabled", data), (data) => getNodeValByProp("children", data));
- const firstLeafKey = firstLeaf ? getNodeValByProp("value", firstLeaf) : void 0;
- const hasCheckedChild = isValidValue(props.modelValue) && !!treeFind([data], (data) => getNodeValByProp("value", data) === props.modelValue, (data) => getNodeValByProp("children", data));
- update(firstLeafKey === props.modelValue || hasCheckedChild ? void 0 : firstLeafKey);
- }
- nextTick(() => {
- const checkedKeys = toValidArray(props.modelValue);
- tree.value.setCheckedKeys(checkedKeys);
- attrs.onCheck?.(data, {
- checkedKeys: tree.value.getCheckedKeys(),
- checkedNodes: tree.value.getCheckedNodes(),
- halfCheckedKeys: tree.value.getHalfCheckedKeys(),
- halfCheckedNodes: tree.value.getHalfCheckedNodes()
- });
- });
- select.value?.focus();
- },
- onNodeExpand: (data, node, e) => {
- attrs.onNodeExpand?.(data, node, e);
- nextTick(() => {
- if (!props.checkStrictly && props.lazy && props.multiple && node.checked) {
- const dataMap = {};
- const uncachedCheckedKeys = tree.value.getCheckedKeys();
- treeEach([tree.value.store.root], (node) => dataMap[node.key] = node, (node) => node.childNodes);
- const cachedKeys = toValidArray(props.modelValue).filter((item) => !(item in dataMap) && !uncachedCheckedKeys.includes(item));
- const childKeys = getChildCheckedKeys();
- update(cachedKeys.concat(childKeys));
- }
- });
- },
- cacheOptions
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree-select/src/cache-options.mjs
- var cache_options_default = defineComponent({
- props: { data: {
- type: Array,
- default: () => []
- } },
- setup(props) {
- const select = inject(selectKey);
- watch(() => props.data, () => {
- props.data.forEach((item) => {
- if (!select.states.cachedOptions.has(item.value)) select.states.cachedOptions.set(item.value, item);
- });
- const inputs = select.selectRef?.querySelectorAll("input") || [];
- if (isClient && !Array.from(inputs).includes(document.activeElement)) select.setSelected();
- }, {
- flush: "post",
- immediate: true
- });
- return () => void 0;
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tree-select/index.mjs
- var ElTreeSelect = withInstall(defineComponent({
- name: "ElTreeSelect",
- inheritAttrs: false,
- props: {
- ...selectProps,
- ...treeProps,
- cacheData: {
- type: Array,
- default: () => []
- }
- },
- setup(props, context) {
- const { slots, expose, emit, attrs } = context;
- const childAttrs = {
- ...attrs,
- onChange: void 0
- };
- const select = ref();
- const tree = ref();
- const key = computed(() => props.nodeKey || props.valueKey || "value");
- const selectProps = useSelect(props, {
- attrs,
- emit
- }, {
- select,
- tree,
- key
- });
- const { cacheOptions, ...treeProps } = useTree$1(props, {
- attrs: childAttrs,
- slots,
- emit
- }, {
- select,
- tree,
- key
- });
- const methods = reactive({});
- expose(methods);
- onMounted(() => {
- Object.assign(methods, {
- ...pick(tree.value, [
- "filter",
- "updateKeyChildren",
- "getCheckedNodes",
- "setCheckedNodes",
- "getCheckedKeys",
- "setCheckedKeys",
- "setChecked",
- "getHalfCheckedNodes",
- "getHalfCheckedKeys",
- "getCurrentKey",
- "getCurrentNode",
- "setCurrentKey",
- "setCurrentNode",
- "getNode",
- "remove",
- "append",
- "insertBefore",
- "insertAfter"
- ]),
- ...pick(select.value, [
- "focus",
- "blur",
- "selectedLabel"
- ]),
- treeRef: tree.value,
- selectRef: select.value
- });
- });
- return () => h$1(
- ElSelect,
- /**
- * 1. The `props` is processed into `Refs`, but `v-bind` and
- * render function props cannot read `Refs`, so use `reactive`
- * unwrap the `Refs` and keep reactive.
- * 2. The keyword `ref` requires `Ref`, but `reactive` broke it,
- * so use function.
- */
- reactive({
- ...selectProps,
- ref: (ref) => select.value = ref
- }),
- {
- ...slots,
- default: () => [h$1(cache_options_default, { data: cacheOptions.value }), h$1(ElTree, reactive({
- ...treeProps,
- ref: (ref) => tree.value = ref
- }))]
- }
- );
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/virtual-tree.mjs
- var ROOT_TREE_INJECTION_KEY$1 = Symbol();
- var EMPTY_NODE = {
- key: -1,
- level: -1,
- data: {}
- };
- var TreeOptionsEnum = /* @__PURE__ */ function(TreeOptionsEnum) {
- TreeOptionsEnum["KEY"] = "id";
- TreeOptionsEnum["LABEL"] = "label";
- TreeOptionsEnum["CHILDREN"] = "children";
- TreeOptionsEnum["DISABLED"] = "disabled";
- TreeOptionsEnum["CLASS"] = "";
- return TreeOptionsEnum;
- }({});
- var SetOperationEnum = /* @__PURE__ */ function(SetOperationEnum) {
- SetOperationEnum["ADD"] = "add";
- SetOperationEnum["DELETE"] = "delete";
- return SetOperationEnum;
- }({});
- var itemSize = {
- type: Number,
- default: 26
- };
- /**
- * @deprecated Removed after 3.0.0, Use `TreeProps` instead.
- */
- var treeProps$1 = buildProps({
- data: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- emptyText: { type: String },
- height: {
- type: Number,
- default: 200
- },
- props: {
- type: definePropType(Object),
- default: () => mutable({
- children: TreeOptionsEnum.CHILDREN,
- label: TreeOptionsEnum.LABEL,
- disabled: TreeOptionsEnum.DISABLED,
- value: TreeOptionsEnum.KEY,
- class: TreeOptionsEnum.CLASS
- })
- },
- highlightCurrent: Boolean,
- showCheckbox: Boolean,
- defaultCheckedKeys: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- checkStrictly: Boolean,
- defaultExpandedKeys: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- indent: {
- type: Number,
- default: 16
- },
- itemSize,
- icon: { type: iconPropType },
- expandOnClickNode: {
- type: Boolean,
- default: true
- },
- checkOnClickNode: Boolean,
- checkOnClickLeaf: {
- type: Boolean,
- default: true
- },
- currentNodeKey: { type: definePropType([String, Number]) },
- accordion: Boolean,
- filterMethod: { type: definePropType(Function) },
- perfMode: {
- type: Boolean,
- default: true
- },
- scrollbarAlwaysOn: Boolean
- });
- /**
- * @deprecated Removed after 3.0.0, Use `TreeNodeProps` instead.
- */
- var treeNodeProps = buildProps({
- node: {
- type: definePropType(Object),
- default: () => mutable(EMPTY_NODE)
- },
- expanded: Boolean,
- checked: Boolean,
- indeterminate: Boolean,
- showCheckbox: Boolean,
- disabled: Boolean,
- current: Boolean,
- hiddenExpandIcon: Boolean,
- itemSize
- });
- var treeNodeContentProps = buildProps({ node: {
- type: definePropType(Object),
- required: true
- } });
- var NODE_CLICK = "node-click";
- var NODE_DROP = "node-drop";
- var NODE_EXPAND = "node-expand";
- var NODE_COLLAPSE = "node-collapse";
- var CURRENT_CHANGE = "current-change";
- var NODE_CHECK = "check";
- var NODE_CHECK_CHANGE = "check-change";
- var NODE_CONTEXTMENU = "node-contextmenu";
- var treeEmits$1 = {
- [NODE_CLICK]: (data, node, e) => data && node && e,
- [NODE_DROP]: (data, node, e) => data && node && e,
- [NODE_EXPAND]: (data, node) => data && node,
- [NODE_COLLAPSE]: (data, node) => data && node,
- [CURRENT_CHANGE]: (data, node) => data && node,
- [NODE_CHECK]: (data, checkedInfo) => data && checkedInfo,
- [NODE_CHECK_CHANGE]: (data, checked) => data && isBoolean(checked),
- [NODE_CONTEXTMENU]: (evt, data, node) => evt && data && node
- };
- var treeNodeEmits = {
- click: (node, e) => !!(node && e),
- drop: (node, e) => !!(node && e),
- toggle: (node) => !!node,
- check: (node, checked) => node && isBoolean(checked)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/composables/useCheck.mjs
- function useCheck(props, tree) {
- const checkedKeys = ref(/* @__PURE__ */ new Set());
- const indeterminateKeys = ref(/* @__PURE__ */ new Set());
- const { emit } = getCurrentInstance();
- watch([() => tree.value, () => props.defaultCheckedKeys], () => {
- return nextTick(() => {
- _setCheckedKeys(props.defaultCheckedKeys);
- });
- }, { immediate: true });
- const updateCheckedKeys = () => {
- if (!tree.value || !props.showCheckbox || props.checkStrictly) return;
- const { levelTreeNodeMap, maxLevel } = tree.value;
- const checkedKeySet = checkedKeys.value;
- const indeterminateKeySet = /* @__PURE__ */ new Set();
- for (let level = maxLevel; level >= 1; --level) {
- const nodes = levelTreeNodeMap.get(level);
- if (!nodes) continue;
- nodes.forEach((node) => {
- const children = node.children;
- let isEffectivelyChecked = !node.isLeaf || node.disabled || checkedKeySet.has(node.key);
- if (children) {
- let allChecked = true;
- let hasChecked = false;
- for (const childNode of children) {
- const key = childNode.key;
- if (!childNode.isEffectivelyChecked) isEffectivelyChecked = false;
- if (checkedKeySet.has(key)) hasChecked = true;
- else if (indeterminateKeySet.has(key)) {
- allChecked = false;
- hasChecked = true;
- break;
- } else allChecked = false;
- }
- if (allChecked) checkedKeySet.add(node.key);
- else if (hasChecked) {
- indeterminateKeySet.add(node.key);
- checkedKeySet.delete(node.key);
- } else {
- checkedKeySet.delete(node.key);
- indeterminateKeySet.delete(node.key);
- }
- }
- node.isEffectivelyChecked = isEffectivelyChecked;
- });
- }
- indeterminateKeys.value = indeterminateKeySet;
- };
- const isChecked = (node) => checkedKeys.value.has(node.key);
- const isIndeterminate = (node) => indeterminateKeys.value.has(node.key);
- const toggleCheckbox = (node, isChecked, nodeClick = true, immediateUpdate = true) => {
- const checkedKeySet = checkedKeys.value;
- const children = node.children;
- if (!props.checkStrictly && nodeClick && children?.length) isChecked = children.some((node) => !node.isEffectivelyChecked);
- const toggle = (node, checked) => {
- checkedKeySet[checked ? SetOperationEnum.ADD : SetOperationEnum.DELETE](node.key);
- const children = node.children;
- if (!props.checkStrictly && children) children.forEach((childNode) => {
- if (!childNode.disabled || childNode.children) toggle(childNode, checked);
- });
- };
- toggle(node, isChecked);
- if (immediateUpdate) updateCheckedKeys();
- if (nodeClick) afterNodeCheck(node, isChecked);
- };
- const afterNodeCheck = (node, checked) => {
- const { checkedNodes, checkedKeys } = getChecked();
- const { halfCheckedNodes, halfCheckedKeys } = getHalfChecked();
- emit(NODE_CHECK, node.data, {
- checkedKeys,
- checkedNodes,
- halfCheckedKeys,
- halfCheckedNodes
- });
- emit(NODE_CHECK_CHANGE, node.data, checked);
- };
- function getCheckedKeys(leafOnly = false) {
- return getChecked(leafOnly).checkedKeys;
- }
- function getCheckedNodes(leafOnly = false) {
- return getChecked(leafOnly).checkedNodes;
- }
- function getHalfCheckedKeys() {
- return getHalfChecked().halfCheckedKeys;
- }
- function getHalfCheckedNodes() {
- return getHalfChecked().halfCheckedNodes;
- }
- function getChecked(leafOnly = false) {
- const checkedNodes = [];
- const keys = [];
- if (tree?.value && props.showCheckbox) {
- const { treeNodeMap } = tree.value;
- checkedKeys.value.forEach((key) => {
- const node = treeNodeMap.get(key);
- if (node && (!leafOnly || leafOnly && node.isLeaf)) {
- keys.push(key);
- checkedNodes.push(node.data);
- }
- });
- }
- return {
- checkedKeys: keys,
- checkedNodes
- };
- }
- function getHalfChecked() {
- const halfCheckedNodes = [];
- const halfCheckedKeys = [];
- if (tree?.value && props.showCheckbox) {
- const { treeNodeMap } = tree.value;
- indeterminateKeys.value.forEach((key) => {
- const node = treeNodeMap.get(key);
- if (node) {
- halfCheckedKeys.push(key);
- halfCheckedNodes.push(node.data);
- }
- });
- }
- return {
- halfCheckedNodes,
- halfCheckedKeys
- };
- }
- function setCheckedKeys(keys) {
- checkedKeys.value.clear();
- indeterminateKeys.value.clear();
- nextTick(() => {
- _setCheckedKeys(keys);
- });
- }
- function setChecked(key, isChecked) {
- if (tree?.value && props.showCheckbox) {
- const node = tree.value.treeNodeMap.get(key);
- if (node) toggleCheckbox(node, isChecked, false);
- }
- }
- function _setCheckedKeys(keys) {
- if (tree?.value) {
- const { treeNodeMap } = tree.value;
- if (props.showCheckbox && treeNodeMap && keys?.length > 0) {
- for (const key of keys) {
- const node = treeNodeMap.get(key);
- if (node && !isChecked(node)) toggleCheckbox(node, true, false, false);
- }
- updateCheckedKeys();
- }
- }
- }
- return {
- updateCheckedKeys,
- toggleCheckbox,
- isChecked,
- isIndeterminate,
- getCheckedKeys,
- getCheckedNodes,
- getHalfCheckedKeys,
- getHalfCheckedNodes,
- setChecked,
- setCheckedKeys
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/composables/useFilter.mjs
- function useFilter(props, tree) {
- const hiddenNodeKeySet = ref(/* @__PURE__ */ new Set([]));
- const hiddenExpandIconKeySet = ref(/* @__PURE__ */ new Set([]));
- const filterable = computed(() => {
- return isFunction$1(props.filterMethod);
- });
- function doFilter(query) {
- if (!filterable.value) return;
- const expandKeySet = /* @__PURE__ */ new Set();
- const hiddenExpandIconKeys = hiddenExpandIconKeySet.value;
- const hiddenKeys = hiddenNodeKeySet.value;
- const family = [];
- const nodes = tree.value?.treeNodes || [];
- const filter = props.filterMethod;
- hiddenKeys.clear();
- function traverse(nodes) {
- nodes.forEach((node) => {
- family.push(node);
- if (filter?.(query, node.data, node)) family.forEach((member) => {
- expandKeySet.add(member.key);
- member.expanded = true;
- });
- else {
- node.expanded = false;
- if (node.isLeaf) hiddenKeys.add(node.key);
- }
- const children = node.children;
- if (children) traverse(children);
- if (!node.isLeaf) {
- if (!expandKeySet.has(node.key)) hiddenKeys.add(node.key);
- else if (children) {
- let allHidden = true;
- for (const childNode of children) if (!hiddenKeys.has(childNode.key)) {
- allHidden = false;
- break;
- }
- if (allHidden) hiddenExpandIconKeys.add(node.key);
- else hiddenExpandIconKeys.delete(node.key);
- }
- }
- family.pop();
- });
- }
- traverse(nodes);
- return expandKeySet;
- }
- function isForceHiddenExpandIcon(node) {
- return hiddenExpandIconKeySet.value.has(node.key);
- }
- return {
- hiddenExpandIconKeySet,
- hiddenNodeKeySet,
- doFilter,
- isForceHiddenExpandIcon
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/composables/useTree.mjs
- function useTree(props, emit) {
- const expandedKeySet = ref(/* @__PURE__ */ new Set());
- const currentKey = ref();
- const tree = shallowRef();
- const listRef = ref();
- const { isIndeterminate, isChecked, toggleCheckbox, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys } = useCheck(props, tree);
- const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(props, tree);
- const valueKey = computed(() => {
- return props.props?.value || TreeOptionsEnum.KEY;
- });
- const childrenKey = computed(() => {
- return props.props?.children || TreeOptionsEnum.CHILDREN;
- });
- const disabledKey = computed(() => {
- return props.props?.disabled || TreeOptionsEnum.DISABLED;
- });
- const labelKey = computed(() => {
- return props.props?.label || TreeOptionsEnum.LABEL;
- });
- const flattenTree = computed(() => {
- const expandedKeys = expandedKeySet.value;
- const hiddenKeys = hiddenNodeKeySet.value;
- const flattenNodes = [];
- const nodes = tree.value?.treeNodes || [];
- const stack = [];
- for (let i = nodes.length - 1; i >= 0; --i) stack.push(nodes[i]);
- while (stack.length) {
- const node = stack.pop();
- if (hiddenKeys.has(node.key)) continue;
- flattenNodes.push(node);
- if (node.children && expandedKeys.has(node.key)) for (let i = node.children.length - 1; i >= 0; --i) stack.push(node.children[i]);
- }
- return flattenNodes;
- });
- const isNotEmpty = computed(() => {
- return flattenTree.value.length > 0;
- });
- function createTree(data) {
- const treeNodeMap = /* @__PURE__ */ new Map();
- const levelTreeNodeMap = /* @__PURE__ */ new Map();
- let maxLevel = 1;
- function traverse(nodes, level = 1, parent = void 0) {
- const siblings = [];
- for (const rawNode of nodes) {
- const value = getKey(rawNode);
- const node = {
- level,
- key: value,
- data: rawNode
- };
- node.label = getLabel(rawNode);
- node.parent = parent;
- const children = getChildren(rawNode);
- node.disabled = getDisabled(rawNode);
- node.isLeaf = !children || children.length === 0;
- node.expanded = expandedKeySet.value.has(value);
- if (children && children.length) node.children = traverse(children, level + 1, node);
- siblings.push(node);
- treeNodeMap.set(value, node);
- if (!levelTreeNodeMap.has(level)) levelTreeNodeMap.set(level, []);
- levelTreeNodeMap.get(level)?.push(node);
- }
- if (level > maxLevel) maxLevel = level;
- return siblings;
- }
- const treeNodes = traverse(data);
- return {
- treeNodeMap,
- levelTreeNodeMap,
- maxLevel,
- treeNodes
- };
- }
- function filter(query) {
- const keys = doFilter(query);
- if (keys) expandedKeySet.value = keys;
- }
- function getChildren(node) {
- return node[childrenKey.value];
- }
- function getKey(node) {
- if (!node) return "";
- return node[valueKey.value];
- }
- function getDisabled(node) {
- return node[disabledKey.value];
- }
- function getLabel(node) {
- return node[labelKey.value];
- }
- function toggleExpand(node) {
- if (expandedKeySet.value.has(node.key)) collapseNode(node);
- else expandNode(node);
- }
- function setExpandedKeys(keys) {
- const expandedKeys = /* @__PURE__ */ new Set();
- const nodeMap = tree.value.treeNodeMap;
- expandedKeySet.value.forEach((key) => {
- const node = nodeMap.get(key);
- expandedKeySet.value.delete(node.key);
- node.expanded = false;
- });
- keys.forEach((k) => {
- let node = nodeMap.get(k);
- while (node && !expandedKeys.has(node.key)) {
- expandedKeys.add(node.key);
- node.expanded = true;
- node = node.parent;
- }
- });
- expandedKeySet.value = expandedKeys;
- }
- function handleNodeClick(node, e) {
- emit(NODE_CLICK, node.data, node, e);
- handleCurrentChange(node);
- if (props.expandOnClickNode) toggleExpand(node);
- if (props.showCheckbox && (props.checkOnClickNode || node.isLeaf && props.checkOnClickLeaf) && !node.disabled) toggleCheckbox(node, !isChecked(node), true);
- }
- function handleNodeDrop(node, e) {
- emit(NODE_DROP, node.data, node, e);
- }
- function handleCurrentChange(node) {
- if (!isCurrent(node)) {
- currentKey.value = node.key;
- emit(CURRENT_CHANGE, node.data, node);
- }
- }
- function handleNodeCheck(node, checked) {
- toggleCheckbox(node, checked);
- }
- function expandNode(node) {
- const keySet = expandedKeySet.value;
- if (tree.value && props.accordion) {
- const { treeNodeMap } = tree.value;
- keySet.forEach((key) => {
- const treeNode = treeNodeMap.get(key);
- if (node && node.level === treeNode?.level) {
- keySet.delete(key);
- treeNode.expanded = false;
- }
- });
- }
- keySet.add(node.key);
- const _node = getNode(node.key);
- if (_node) {
- _node.expanded = true;
- emit(NODE_EXPAND, _node.data, _node);
- }
- }
- function collapseNode(node) {
- expandedKeySet.value.delete(node.key);
- const _node = getNode(node.key);
- if (_node) {
- _node.expanded = false;
- emit(NODE_COLLAPSE, _node.data, _node);
- }
- }
- function isDisabled(node) {
- return !!node.disabled;
- }
- function isCurrent(node) {
- const current = currentKey.value;
- return current !== void 0 && current === node.key;
- }
- function getCurrentNode() {
- if (!currentKey.value) return void 0;
- return tree.value?.treeNodeMap.get(currentKey.value)?.data;
- }
- function getCurrentKey() {
- return currentKey.value;
- }
- function setCurrentKey(key) {
- currentKey.value = key;
- }
- function setData(data) {
- tree.value = createTree(data);
- }
- function getNode(data) {
- const key = isObject$2(data) ? getKey(data) : data;
- return tree.value?.treeNodeMap.get(key);
- }
- function scrollToNode(key, strategy = "auto") {
- const node = getNode(key);
- if (node && listRef.value) listRef.value.scrollToItem(flattenTree.value.indexOf(node), strategy);
- }
- function scrollTo(offset) {
- listRef.value?.scrollTo(offset);
- }
- watch(() => props.currentNodeKey, (key) => {
- currentKey.value = key;
- }, { immediate: true });
- watch(() => props.defaultExpandedKeys, (key) => {
- expandedKeySet.value = new Set(key);
- }, { immediate: true });
- watch(() => props.data, (data) => {
- setData(data);
- }, { immediate: true });
- return {
- tree,
- flattenTree,
- isNotEmpty,
- listRef,
- getKey,
- getChildren,
- toggleExpand,
- toggleCheckbox,
- isChecked,
- isIndeterminate,
- isDisabled,
- isCurrent,
- isForceHiddenExpandIcon,
- handleNodeClick,
- handleNodeDrop,
- handleNodeCheck,
- getCurrentNode,
- getCurrentKey,
- setCurrentKey,
- getCheckedKeys,
- getCheckedNodes,
- getHalfCheckedKeys,
- getHalfCheckedNodes,
- setChecked,
- setCheckedKeys,
- filter,
- setData,
- getNode,
- expandNode,
- collapseNode,
- setExpandedKeys,
- scrollToNode,
- scrollTo
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/tree-node-content.mjs
- var tree_node_content_default = defineComponent({
- name: "ElTreeNodeContent",
- props: treeNodeContentProps,
- setup(props) {
- const tree = inject(ROOT_TREE_INJECTION_KEY$1);
- const ns = useNamespace("tree");
- return () => {
- const node = props.node;
- const { data } = node;
- return tree?.ctx.slots.default ? tree.ctx.slots.default({
- node,
- data
- }) : h$1(ElText, {
- tag: "span",
- truncated: true,
- class: ns.be("node", "label")
- }, () => [node?.label]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/tree-node.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$11 = [
- "aria-expanded",
- "aria-disabled",
- "aria-checked",
- "data-key"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/src/tree-node.mjs
- var tree_node_default = /* @__PURE__ */ defineComponent({
- name: "ElTreeNode",
- __name: "tree-node",
- props: treeNodeProps,
- emits: treeNodeEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const tree = inject(ROOT_TREE_INJECTION_KEY$1);
- const ns = useNamespace("tree");
- const indent = computed(() => tree?.props.indent ?? 16);
- const icon = computed(() => tree?.props.icon ?? caret_right_default);
- const getNodeClass = (node) => {
- const nodeClassFunc = tree?.props.props?.class;
- if (!nodeClassFunc) return {};
- let className;
- if (isFunction$1(nodeClassFunc)) {
- const { data } = node;
- className = nodeClassFunc(data, node);
- } else className = nodeClassFunc;
- return isString(className) ? { [className]: true } : className;
- };
- const handleClick = (e) => {
- emit("click", props.node, e);
- };
- const handleDrop = (e) => {
- emit("drop", props.node, e);
- };
- const handleExpandIconClick = () => {
- emit("toggle", props.node);
- };
- const handleCheckChange = (value) => {
- emit("check", props.node, value);
- };
- const handleContextMenu = (event) => {
- if (tree?.instance?.vnode?.props?.["onNodeContextmenu"]) {
- event.stopPropagation();
- event.preventDefault();
- }
- tree?.ctx.emit(NODE_CONTEXTMENU, event, props.node?.data, props.node);
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref: "node$",
- class: normalizeClass([
- unref(ns).b("node"),
- unref(ns).is("expanded", __props.expanded),
- unref(ns).is("current", __props.current),
- unref(ns).is("focusable", !__props.disabled),
- unref(ns).is("checked", !__props.disabled && __props.checked),
- getNodeClass(__props.node)
- ]),
- role: "treeitem",
- tabindex: "-1",
- "aria-expanded": __props.expanded,
- "aria-disabled": __props.disabled,
- "aria-checked": __props.checked,
- "data-key": __props.node?.key,
- onClick: withModifiers(handleClick, ["stop"]),
- onContextmenu: handleContextMenu,
- onDragover: _cache[1] || (_cache[1] = withModifiers(() => {}, ["prevent"])),
- onDragenter: _cache[2] || (_cache[2] = withModifiers(() => {}, ["prevent"])),
- onDrop: withModifiers(handleDrop, ["stop"])
- }, [createBaseVNode("div", {
- class: normalizeClass(unref(ns).be("node", "content")),
- style: normalizeStyle({
- paddingLeft: `${(__props.node.level - 1) * indent.value}px`,
- height: __props.itemSize + "px"
- })
- }, [
- icon.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([
- unref(ns).is("leaf", !!__props.node?.isLeaf),
- unref(ns).is("hidden", __props.hiddenExpandIcon),
- { expanded: !__props.node?.isLeaf && __props.expanded },
- unref(ns).be("node", "expand-icon")
- ]),
- onClick: withModifiers(handleExpandIconClick, ["stop"])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(icon.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true),
- __props.showCheckbox ? (openBlock(), createBlock(unref(ElCheckbox), {
- key: 1,
- "model-value": __props.checked,
- indeterminate: __props.indeterminate,
- disabled: __props.disabled,
- onChange: handleCheckChange,
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
- }, null, 8, [
- "model-value",
- "indeterminate",
- "disabled"
- ])) : createCommentVNode("v-if", true),
- createVNode(unref(tree_node_content_default), { node: {
- ...__props.node,
- expanded: __props.expanded
- } }, null, 8, ["node"])
- ], 6)], 42, _hoisted_1$11);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tree-v2/index.mjs
- var ElTreeV2 = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElTreeV2",
- __name: "tree",
- props: treeProps$1,
- emits: treeEmits$1,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const slots = useSlots();
- const treeNodeSize = computed(() => props.itemSize);
- provide(ROOT_TREE_INJECTION_KEY$1, {
- ctx: {
- emit,
- slots
- },
- props,
- instance: getCurrentInstance()
- });
- provide(formItemContextKey, void 0);
- const { t } = useLocale();
- const ns = useNamespace("tree");
- const { flattenTree, isNotEmpty, listRef, toggleExpand, isIndeterminate, isChecked, isDisabled, isCurrent, isForceHiddenExpandIcon, handleNodeClick, handleNodeDrop, handleNodeCheck, toggleCheckbox, getCurrentNode, getCurrentKey, setCurrentKey, getCheckedKeys, getCheckedNodes, getHalfCheckedKeys, getHalfCheckedNodes, setChecked, setCheckedKeys, filter, setData, getNode, expandNode, collapseNode, setExpandedKeys, scrollToNode, scrollTo } = useTree(props, emit);
- __expose({
- toggleCheckbox,
- getCurrentNode,
- getCurrentKey,
- setCurrentKey,
- getCheckedKeys,
- getCheckedNodes,
- getHalfCheckedKeys,
- getHalfCheckedNodes,
- setChecked,
- setCheckedKeys,
- filter,
- setData,
- getNode,
- expandNode,
- collapseNode,
- setExpandedKeys,
- scrollToNode,
- scrollTo
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([unref(ns).b(), { [unref(ns).m("highlight-current")]: __props.highlightCurrent }]),
- role: "tree"
- }, [unref(isNotEmpty) ? (openBlock(), createBlock(unref(FixedSizeList), {
- key: 0,
- ref_key: "listRef",
- ref: listRef,
- "class-name": unref(ns).b("virtual-list"),
- data: unref(flattenTree),
- total: unref(flattenTree).length,
- height: __props.height,
- "item-size": treeNodeSize.value,
- "perf-mode": __props.perfMode,
- "scrollbar-always-on": __props.scrollbarAlwaysOn
- }, {
- default: withCtx(({ data, index, style }) => [(openBlock(), createBlock(tree_node_default, {
- key: data[index].key,
- style: normalizeStyle(style),
- node: data[index],
- expanded: data[index].expanded,
- "show-checkbox": __props.showCheckbox,
- checked: unref(isChecked)(data[index]),
- indeterminate: unref(isIndeterminate)(data[index]),
- "item-size": treeNodeSize.value,
- disabled: unref(isDisabled)(data[index]),
- current: unref(isCurrent)(data[index]),
- "hidden-expand-icon": unref(isForceHiddenExpandIcon)(data[index]),
- onClick: unref(handleNodeClick),
- onToggle: unref(toggleExpand),
- onCheck: unref(handleNodeCheck),
- onDrop: unref(handleNodeDrop)
- }, null, 8, [
- "style",
- "node",
- "expanded",
- "show-checkbox",
- "checked",
- "indeterminate",
- "item-size",
- "disabled",
- "current",
- "hidden-expand-icon",
- "onClick",
- "onToggle",
- "onCheck",
- "onDrop"
- ]))]),
- _: 1
- }, 8, [
- "class-name",
- "data",
- "total",
- "height",
- "item-size",
- "perf-mode",
- "scrollbar-always-on"
- ])) : (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).e("empty-block"))
- }, [renderSlot(_ctx.$slots, "empty", {}, () => [createBaseVNode("span", { class: normalizeClass(unref(ns).e("empty-text")) }, toDisplayString(__props.emptyText ?? unref(t)("el.tree.emptyText")), 3)])], 2))], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/ajax.mjs
- var SCOPE$3 = "ElUpload";
- var UploadAjaxError = class extends Error {
- constructor(message, status, method, url) {
- super(message);
- this.name = "UploadAjaxError";
- this.status = status;
- this.method = method;
- this.url = url;
- }
- };
- function getError(action, option, xhr) {
- let msg;
- if (xhr.response) msg = `${xhr.response.error || xhr.response}`;
- else if (xhr.responseText) msg = `${xhr.responseText}`;
- else msg = `fail to ${option.method} ${action} ${xhr.status}`;
- return new UploadAjaxError(msg, xhr.status, option.method, action);
- }
- function getBody(xhr) {
- const text = xhr.responseText || xhr.response;
- if (!text) return text;
- try {
- return JSON.parse(text);
- } catch {
- return text;
- }
- }
- var ajaxUpload = (option) => {
- if (typeof XMLHttpRequest === "undefined") throwError(SCOPE$3, "XMLHttpRequest is undefined");
- const xhr = new XMLHttpRequest();
- const action = option.action;
- if (xhr.upload) xhr.upload.addEventListener("progress", (evt) => {
- const progressEvt = evt;
- progressEvt.percent = evt.total > 0 ? evt.loaded / evt.total * 100 : 0;
- option.onProgress(progressEvt);
- });
- const formData = new FormData();
- if (option.data) for (const [key, value] of Object.entries(option.data)) if (isArray$1(value)) if (value.length === 2 && value[0] instanceof Blob && isString(value[1])) formData.append(key, value[0], value[1]);
- else value.forEach((item) => {
- formData.append(key, item);
- });
- else formData.append(key, value);
- formData.append(option.filename, option.file, option.file.name);
- xhr.addEventListener("error", () => {
- option.onError(getError(action, option, xhr));
- });
- xhr.addEventListener("load", () => {
- if (xhr.status < 200 || xhr.status >= 300) return option.onError(getError(action, option, xhr));
- option.onSuccess(getBody(xhr));
- });
- xhr.open(option.method, action, true);
- if (option.withCredentials && "withCredentials" in xhr) xhr.withCredentials = true;
- const headers = option.headers || {};
- if (headers instanceof Headers) headers.forEach((value, key) => xhr.setRequestHeader(key, value));
- else for (const [key, value] of Object.entries(headers)) {
- if (isNil(value)) continue;
- xhr.setRequestHeader(key, String(value));
- }
- xhr.send(formData);
- return xhr;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `UploadProps` instead.
- */
- var uploadListTypes = [
- "text",
- "picture",
- "picture-card"
- ];
- var fileId = 1;
- var genFileId = () => Date.now() + fileId++;
- /**
- * @deprecated Removed after 3.0.0, Use `UploadBaseProps` instead.
- */
- var uploadBaseProps = buildProps({
- action: {
- type: String,
- default: "#"
- },
- headers: { type: definePropType(Object) },
- method: {
- type: String,
- default: "post"
- },
- data: {
- type: definePropType([
- Object,
- Function,
- Promise
- ]),
- default: () => mutable({})
- },
- multiple: Boolean,
- name: {
- type: String,
- default: "file"
- },
- drag: Boolean,
- withCredentials: Boolean,
- showFileList: {
- type: Boolean,
- default: true
- },
- accept: {
- type: String,
- default: ""
- },
- fileList: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- autoUpload: {
- type: Boolean,
- default: true
- },
- listType: {
- type: String,
- values: uploadListTypes,
- default: "text"
- },
- httpRequest: {
- type: definePropType(Function),
- default: ajaxUpload
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- limit: Number,
- directory: Boolean
- });
- /**
- * @deprecated Removed after 3.0.0, Use `UploadProps` instead.
- */
- var uploadProps = buildProps({
- ...uploadBaseProps,
- beforeUpload: {
- type: definePropType(Function),
- default: NOOP
- },
- beforeRemove: { type: definePropType(Function) },
- onRemove: {
- type: definePropType(Function),
- default: NOOP
- },
- onChange: {
- type: definePropType(Function),
- default: NOOP
- },
- onPreview: {
- type: definePropType(Function),
- default: NOOP
- },
- onSuccess: {
- type: definePropType(Function),
- default: NOOP
- },
- onProgress: {
- type: definePropType(Function),
- default: NOOP
- },
- onError: {
- type: definePropType(Function),
- default: NOOP
- },
- onExceed: {
- type: definePropType(Function),
- default: NOOP
- },
- crossorigin: { type: definePropType(String) }
- });
- var uploadBasePropsDefaults = {
- action: "#",
- method: "post",
- data: () => mutable({}),
- name: "file",
- showFileList: true,
- accept: "",
- fileList: () => mutable([]),
- autoUpload: true,
- listType: "text",
- httpRequest: ajaxUpload,
- disabled: void 0
- };
- var uploadPropsDefaults = {
- ...uploadBasePropsDefaults,
- beforeUpload: NOOP,
- onRemove: NOOP,
- onChange: NOOP,
- onPreview: NOOP,
- onSuccess: NOOP,
- onProgress: NOOP,
- onError: NOOP,
- onExceed: NOOP
- };
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/constants.mjs
- var uploadContextKey = Symbol("uploadContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-list.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `UploadListProps` instead.
- */
- var uploadListProps = buildProps({
- files: {
- type: definePropType(Array),
- default: () => mutable([])
- },
- disabled: {
- type: Boolean,
- default: void 0
- },
- handlePreview: {
- type: definePropType(Function),
- default: NOOP
- },
- listType: {
- type: String,
- values: uploadListTypes,
- default: "text"
- },
- crossorigin: { type: definePropType(String) }
- });
- var uploadListEmits = { remove: (file) => !!file };
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-content.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `UploadContentProps` instead.
- */
- var uploadContentProps = buildProps({
- ...uploadBaseProps,
- beforeUpload: {
- type: definePropType(Function),
- default: NOOP
- },
- onRemove: {
- type: definePropType(Function),
- default: NOOP
- },
- onStart: {
- type: definePropType(Function),
- default: NOOP
- },
- onSuccess: {
- type: definePropType(Function),
- default: NOOP
- },
- onProgress: {
- type: definePropType(Function),
- default: NOOP
- },
- onError: {
- type: definePropType(Function),
- default: NOOP
- },
- onExceed: {
- type: definePropType(Function),
- default: NOOP
- }
- });
- var uploadContentPropsDefaults = {
- ...uploadBasePropsDefaults,
- beforeUpload: NOOP,
- onRemove: NOOP,
- onStart: NOOP,
- onSuccess: NOOP,
- onProgress: NOOP,
- onError: NOOP,
- onExceed: NOOP
- };
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-dragger.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `UploadDraggerProps` instead.
- */
- var uploadDraggerProps = buildProps({
- disabled: {
- type: Boolean,
- default: void 0
- },
- directory: Boolean
- });
- var uploadDraggerEmits = { file: (file) => isArray$1(file) };
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-list.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$10 = [
- "tabindex",
- "aria-disabled",
- "onKeydown"
- ];
- var _hoisted_2$6 = ["src", "crossorigin"];
- var _hoisted_3$2 = ["onClick"];
- var _hoisted_4$1 = ["title"];
- var _hoisted_5 = ["onClick"];
- var _hoisted_6 = ["onClick"];
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-list2.mjs
- var upload_list_default = /* @__PURE__ */ defineComponent({
- name: "ElUploadList",
- __name: "upload-list",
- props: uploadListProps,
- emits: uploadListEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { t } = useLocale();
- const nsUpload = useNamespace("upload");
- const nsIcon = useNamespace("icon");
- const nsList = useNamespace("list");
- const disabled = useFormDisabled();
- const focusing = ref(false);
- const containerKls = computed(() => [
- nsUpload.b("list"),
- nsUpload.bm("list", props.listType),
- nsUpload.is("disabled", disabled.value)
- ]);
- const handleRemove = (file) => {
- emit("remove", file);
- };
- return (_ctx, _cache) => {
- return openBlock(), createBlock(TransitionGroup, {
- tag: "ul",
- class: normalizeClass(containerKls.value),
- name: unref(nsList).b()
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.files, (file, index) => {
- return openBlock(), createElementBlock("li", {
- key: file.uid || file.name,
- class: normalizeClass([
- unref(nsUpload).be("list", "item"),
- unref(nsUpload).is(file.status),
- { focusing: focusing.value }
- ]),
- tabindex: unref(disabled) ? void 0 : 0,
- "aria-disabled": unref(disabled),
- role: "button",
- onKeydown: withKeys(($event) => !unref(disabled) && handleRemove(file), ["delete"]),
- onFocus: _cache[0] || (_cache[0] = ($event) => focusing.value = true),
- onBlur: _cache[1] || (_cache[1] = ($event) => focusing.value = false),
- onClick: _cache[2] || (_cache[2] = ($event) => focusing.value = false)
- }, [renderSlot(_ctx.$slots, "default", {
- file,
- index
- }, () => [
- __props.listType === "picture" || file.status !== "uploading" && __props.listType === "picture-card" ? (openBlock(), createElementBlock("img", {
- key: 0,
- class: normalizeClass(unref(nsUpload).be("list", "item-thumbnail")),
- src: file.url,
- crossorigin: __props.crossorigin,
- alt: ""
- }, null, 10, _hoisted_2$6)) : createCommentVNode("v-if", true),
- file.status === "uploading" || __props.listType !== "picture-card" ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(nsUpload).be("list", "item-info"))
- }, [createBaseVNode("a", {
- class: normalizeClass(unref(nsUpload).be("list", "item-name")),
- onClick: withModifiers(($event) => __props.handlePreview(file), ["prevent"])
- }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("document")) }, {
- default: withCtx(() => [createVNode(unref(document_default))]),
- _: 1
- }, 8, ["class"]), createBaseVNode("span", {
- class: normalizeClass(unref(nsUpload).be("list", "item-file-name")),
- title: file.name
- }, toDisplayString(file.name), 11, _hoisted_4$1)], 10, _hoisted_3$2), file.status === "uploading" ? (openBlock(), createBlock(unref(ElProgress), {
- key: 0,
- type: __props.listType === "picture-card" ? "circle" : "line",
- "stroke-width": __props.listType === "picture-card" ? 6 : 2,
- percentage: Number(file.percentage),
- style: normalizeStyle(__props.listType === "picture-card" ? "" : "margin-top: 0.5rem")
- }, null, 8, [
- "type",
- "stroke-width",
- "percentage",
- "style"
- ])) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("label", { class: normalizeClass(unref(nsUpload).be("list", "item-status-label")) }, [__props.listType === "text" ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("circle-check")])
- }, {
- default: withCtx(() => [createVNode(unref(circle_check_default))]),
- _: 1
- }, 8, ["class"])) : ["picture-card", "picture"].includes(__props.listType) ? (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass([unref(nsIcon).m("upload-success"), unref(nsIcon).m("check")])
- }, {
- default: withCtx(() => [createVNode(unref(check_default))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)], 2),
- !unref(disabled) ? (openBlock(), createBlock(unref(ElIcon), {
- key: 2,
- class: normalizeClass(unref(nsIcon).m("close")),
- "aria-label": unref(t)("el.upload.delete"),
- role: "button",
- tabindex: "0",
- onClick: ($event) => handleRemove(file),
- onKeydown: withKeys(withModifiers(($event) => handleRemove(file), ["prevent"]), ["enter", "space"])
- }, {
- default: withCtx(() => [createVNode(unref(close_default))]),
- _: 1
- }, 8, [
- "class",
- "aria-label",
- "onClick",
- "onKeydown"
- ])) : createCommentVNode("v-if", true),
- !unref(disabled) ? (openBlock(), createElementBlock("i", {
- key: 3,
- class: normalizeClass(unref(nsIcon).m("close-tip"))
- }, toDisplayString(unref(t)("el.upload.deleteTip")), 3)) : createCommentVNode("v-if", true),
- __props.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
- key: 4,
- class: normalizeClass(unref(nsUpload).be("list", "item-actions"))
- }, [createBaseVNode("span", {
- class: normalizeClass(unref(nsUpload).be("list", "item-preview")),
- onClick: ($event) => __props.handlePreview(file)
- }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("zoom-in")) }, {
- default: withCtx(() => [createVNode(unref(zoom_in_default))]),
- _: 1
- }, 8, ["class"])], 10, _hoisted_5), !unref(disabled) ? (openBlock(), createElementBlock("span", {
- key: 0,
- class: normalizeClass(unref(nsUpload).be("list", "item-delete")),
- onClick: ($event) => handleRemove(file)
- }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(nsIcon).m("delete")) }, {
- default: withCtx(() => [createVNode(unref(delete_default))]),
- _: 1
- }, 8, ["class"])], 10, _hoisted_6)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true)
- ])], 42, _hoisted_1$10);
- }), 128)), renderSlot(_ctx.$slots, "append")]),
- _: 3
- }, 8, ["class", "name"]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-dragger.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME$1 = "ElUploadDrag";
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-dragger2.mjs
- var upload_dragger_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME$1,
- __name: "upload-dragger",
- props: uploadDraggerProps,
- emits: uploadDraggerEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- if (!inject(uploadContextKey)) throwError(COMPONENT_NAME$1, "usage: <el-upload><el-upload-dragger /></el-upload>");
- const ns = useNamespace("upload");
- const dragover = ref(false);
- const disabled = useFormDisabled();
- const getFile = (entry) => {
- return new Promise((resolve, reject) => entry.file(resolve, reject));
- };
- const getAllFiles = async (entry) => {
- try {
- if (entry.isFile) {
- const file = await getFile(entry);
- file.isDirectory = false;
- return [file];
- }
- if (entry.isDirectory) {
- const dirReader = entry.createReader();
- const getEntries = () => {
- return new Promise((resolve, reject) => dirReader.readEntries(resolve, reject));
- };
- const entries = [];
- let readEntries = await getEntries();
- /**
- * In Chromium-based browsers, readEntries() will only return the first 100 FileSystemEntry instances.
- * https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries#:~:text=In%20Chromium%2Dbased%20browsers%2C%20readEntries()%20will%20only%20return%20the%20first%20100%20FileSystemEntry%20instances.%20In%20order%20to%20obtain%20all%20of%20the%20instances%2C%20readEntries()%20must%20be%20called%20multiple%20times.
- */
- while (readEntries.length > 0) {
- entries.push(...readEntries);
- readEntries = await getEntries();
- }
- const filePromises = entries.map((entry) => getAllFiles(entry).catch(() => []));
- return flatten(await Promise.all(filePromises));
- }
- } catch {
- return [];
- }
- return [];
- };
- const onDrop = async (e) => {
- if (disabled.value) return;
- dragover.value = false;
- e.stopPropagation();
- const files = Array.from(e.dataTransfer.files);
- const items = e.dataTransfer.items || [];
- if (props.directory) {
- const entries = Array.from(items).map((item) => item?.webkitGetAsEntry?.()).filter((entry) => entry);
- emit("file", flatten(await Promise.all(entries.map(getAllFiles))));
- return;
- }
- files.forEach((file, index) => {
- const entry = items[index]?.webkitGetAsEntry?.();
- if (entry) file.isDirectory = entry.isDirectory;
- });
- emit("file", files);
- };
- const onDragover = () => {
- if (!disabled.value) dragover.value = true;
- };
- const onDragleave = (e) => {
- if (!e.currentTarget.contains(e.relatedTarget)) dragover.value = false;
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([unref(ns).b("dragger"), unref(ns).is("dragover", dragover.value)]),
- onDrop: withModifiers(onDrop, ["prevent"]),
- onDragover: withModifiers(onDragover, ["prevent"]),
- onDragleave: withModifiers(onDragleave, ["prevent"])
- }, [renderSlot(_ctx.$slots, "default")], 34);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-content.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$9 = [
- "tabindex",
- "aria-disabled",
- "onKeydown"
- ];
- var _hoisted_2$5 = [
- "name",
- "disabled",
- "multiple",
- "accept",
- "webkitdirectory"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/upload-content2.mjs
- var upload_content_default = /* @__PURE__ */ defineComponent({
- name: "ElUploadContent",
- inheritAttrs: false,
- __name: "upload-content",
- props: uploadContentProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const ns = useNamespace("upload");
- const disabled = useFormDisabled();
- const requests = shallowRef({});
- const inputRef = shallowRef();
- const uploadFiles = (files) => {
- if (files.length === 0) return;
- const { autoUpload, limit, fileList, multiple, onStart, onExceed } = props;
- if (limit && fileList.length + files.length > limit) {
- onExceed(files, fileList);
- return;
- }
- if (!multiple) files = files.slice(0, 1);
- for (const file of files) {
- const rawFile = file;
- rawFile.uid = genFileId();
- onStart(rawFile);
- if (autoUpload) upload(rawFile);
- }
- };
- const upload = async (rawFile) => {
- inputRef.value.value = "";
- if (!props.beforeUpload) return doUpload(rawFile);
- let hookResult;
- let beforeData = {};
- try {
- const originData = props.data;
- const beforeUploadPromise = props.beforeUpload(rawFile);
- beforeData = isPlainObject$1(props.data) ? cloneDeep(props.data) : props.data;
- hookResult = await beforeUploadPromise;
- if (isPlainObject$1(props.data) && isEqual$1(originData, beforeData)) beforeData = cloneDeep(props.data);
- } catch {
- hookResult = false;
- }
- if (hookResult === false) {
- props.onRemove(rawFile);
- return;
- }
- let file = rawFile;
- if (hookResult instanceof Blob) if (hookResult instanceof File) file = hookResult;
- else file = new File([hookResult], rawFile.name, { type: rawFile.type });
- doUpload(Object.assign(file, { uid: rawFile.uid }), beforeData);
- };
- const resolveData = async (data, rawFile) => {
- if (isFunction$1(data)) return data(rawFile);
- return data;
- };
- const doUpload = async (rawFile, beforeData) => {
- const { headers, data, method, withCredentials, name: filename, action, onProgress, onSuccess, onError, httpRequest } = props;
- try {
- beforeData = await resolveData(beforeData ?? data, rawFile);
- } catch {
- props.onRemove(rawFile);
- return;
- }
- const { uid } = rawFile;
- const options = {
- headers: headers || {},
- withCredentials,
- file: rawFile,
- data: beforeData,
- method,
- filename,
- action,
- onProgress: (evt) => {
- onProgress(evt, rawFile);
- },
- onSuccess: (res) => {
- onSuccess(res, rawFile);
- delete requests.value[uid];
- },
- onError: (err) => {
- onError(err, rawFile);
- delete requests.value[uid];
- }
- };
- const request = httpRequest(options);
- requests.value[uid] = request;
- if (request instanceof Promise) request.then(options.onSuccess, options.onError);
- };
- const handleChange = (e) => {
- const files = e.target.files;
- if (!files) return;
- uploadFiles(Array.from(files));
- };
- const handleClick = () => {
- if (!disabled.value) {
- inputRef.value.value = "";
- inputRef.value.click();
- }
- };
- const handleKeydown = () => {
- handleClick();
- };
- const abort = (file) => {
- entriesOf(requests.value).filter(file ? ([uid]) => String(file.uid) === uid : () => true).forEach(([uid, req]) => {
- if (req instanceof XMLHttpRequest) req.abort();
- delete requests.value[uid];
- });
- };
- __expose({
- abort,
- upload
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([
- unref(ns).b(),
- unref(ns).m(__props.listType),
- unref(ns).is("drag", __props.drag),
- unref(ns).is("disabled", unref(disabled))
- ]),
- tabindex: unref(disabled) ? void 0 : 0,
- "aria-disabled": unref(disabled),
- role: "button",
- onClick: handleClick,
- onKeydown: withKeys(withModifiers(handleKeydown, ["self"]), ["enter", "space"])
- }, [__props.drag ? (openBlock(), createBlock(upload_dragger_default, {
- key: 0,
- disabled: unref(disabled),
- directory: __props.directory,
- onFile: uploadFiles
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["disabled", "directory"])) : renderSlot(_ctx.$slots, "default", { key: 1 }), createBaseVNode("input", {
- ref_key: "inputRef",
- ref: inputRef,
- class: normalizeClass(unref(ns).e("input")),
- name: __props.name,
- disabled: unref(disabled),
- multiple: __props.multiple,
- accept: __props.accept,
- webkitdirectory: __props.directory || void 0,
- type: "file",
- onChange: handleChange,
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
- }, null, 42, _hoisted_2$5)], 42, _hoisted_1$9);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/upload/src/use-handlers.mjs
- var SCOPE$2 = "ElUpload";
- var revokeFileObjectURL = (file) => {
- if (file.url?.startsWith("blob:")) URL.revokeObjectURL(file.url);
- };
- var useHandlers = (props, uploadRef) => {
- const uploadFiles = useVModel(props, "fileList", void 0, { passive: true });
- const getFile = (rawFile) => uploadFiles.value.find((file) => file.uid === rawFile.uid);
- function abort(file) {
- uploadRef.value?.abort(file);
- }
- function clearFiles(states = [
- "ready",
- "uploading",
- "success",
- "fail"
- ]) {
- uploadFiles.value = uploadFiles.value.filter((row) => !states.includes(row.status));
- }
- function removeFile(file) {
- uploadFiles.value = uploadFiles.value.filter((uploadFile) => uploadFile.uid !== file.uid);
- }
- const emitChange = (file) => {
- nextTick(() => props.onChange(file, uploadFiles.value));
- };
- const handleError = (err, rawFile) => {
- const file = getFile(rawFile);
- if (!file) return;
- console.error(err);
- file.status = "fail";
- removeFile(file);
- props.onError(err, file, uploadFiles.value);
- emitChange(file);
- };
- const handleProgress = (evt, rawFile) => {
- const file = getFile(rawFile);
- if (!file) return;
- props.onProgress(evt, file, uploadFiles.value);
- file.status = "uploading";
- file.percentage = Math.round(evt.percent);
- };
- const handleSuccess = (response, rawFile) => {
- const file = getFile(rawFile);
- if (!file) return;
- file.status = "success";
- file.response = response;
- props.onSuccess(response, file, uploadFiles.value);
- emitChange(file);
- };
- const handleStart = (file) => {
- if (isNil(file.uid)) file.uid = genFileId();
- const uploadFile = {
- name: file.name,
- percentage: 0,
- status: "ready",
- size: file.size,
- raw: file,
- uid: file.uid
- };
- if (props.listType === "picture-card" || props.listType === "picture") try {
- uploadFile.url = URL.createObjectURL(file);
- } catch (err) {
- debugWarn(SCOPE$2, err.message);
- props.onError(err, uploadFile, uploadFiles.value);
- }
- uploadFiles.value = [...uploadFiles.value, uploadFile];
- emitChange(uploadFile);
- };
- const handleRemove = async (file) => {
- const uploadFile = file instanceof File ? getFile(file) : file;
- if (!uploadFile) throwError(SCOPE$2, "file to be removed not found");
- const doRemove = (file) => {
- abort(file);
- removeFile(file);
- props.onRemove(file, uploadFiles.value);
- revokeFileObjectURL(file);
- };
- if (props.beforeRemove) {
- if (await props.beforeRemove(uploadFile, uploadFiles.value) !== false) doRemove(uploadFile);
- } else doRemove(uploadFile);
- };
- function submit() {
- uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => raw && uploadRef.value?.upload(raw));
- }
- watch(() => props.listType, (val) => {
- if (val !== "picture-card" && val !== "picture") return;
- uploadFiles.value = uploadFiles.value.map((file) => {
- const { raw, url } = file;
- if (!url && raw) try {
- file.url = URL.createObjectURL(raw);
- } catch (err) {
- props.onError(err, file, uploadFiles.value);
- }
- return file;
- });
- });
- watch(uploadFiles, (files) => {
- for (const file of files) {
- file.uid ||= genFileId();
- file.status ||= "success";
- }
- }, {
- immediate: true,
- deep: true
- });
- return {
- uploadFiles,
- abort,
- clearFiles,
- handleError,
- handleProgress,
- handleStart,
- handleSuccess,
- handleRemove,
- submit,
- revokeFileObjectURL
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/upload/index.mjs
- var ElUpload = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElUpload",
- __name: "upload",
- props: uploadProps,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const disabled = useFormDisabled();
- const uploadRef = shallowRef();
- const { abort, submit, clearFiles, uploadFiles, handleStart, handleError, handleRemove, handleSuccess, handleProgress, revokeFileObjectURL } = useHandlers(props, uploadRef);
- const isPictureCard = computed(() => props.listType === "picture-card");
- const uploadContentProps = computed(() => ({
- ...props,
- fileList: uploadFiles.value,
- onStart: handleStart,
- onProgress: handleProgress,
- onSuccess: handleSuccess,
- onError: handleError,
- onRemove: handleRemove
- }));
- onBeforeUnmount(() => {
- uploadFiles.value.forEach(revokeFileObjectURL);
- });
- provide(uploadContextKey, { accept: toRef(props, "accept") });
- __expose({
- abort,
- submit,
- clearFiles,
- handleStart,
- handleRemove
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", null, [
- isPictureCard.value && __props.showFileList ? (openBlock(), createBlock(upload_list_default, {
- key: 0,
- disabled: unref(disabled),
- "list-type": __props.listType,
- files: unref(uploadFiles),
- crossorigin: __props.crossorigin,
- "handle-preview": __props.onPreview,
- onRemove: unref(handleRemove)
- }, createSlots({
- append: withCtx(() => [createVNode(upload_content_default, mergeProps({
- ref_key: "uploadRef",
- ref: uploadRef
- }, uploadContentProps.value), {
- default: withCtx(() => [_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)]),
- _: 3
- }, 16)]),
- _: 2
- }, [_ctx.$slots.file ? {
- name: "default",
- fn: withCtx(({ file, index }) => [renderSlot(_ctx.$slots, "file", {
- file,
- index
- })]),
- key: "0"
- } : void 0]), 1032, [
- "disabled",
- "list-type",
- "files",
- "crossorigin",
- "handle-preview",
- "onRemove"
- ])) : createCommentVNode("v-if", true),
- !isPictureCard.value || isPictureCard.value && !__props.showFileList ? (openBlock(), createBlock(upload_content_default, mergeProps({
- key: 1,
- ref_key: "uploadRef",
- ref: uploadRef
- }, uploadContentProps.value), {
- default: withCtx(() => [_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true), !_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)]),
- _: 3
- }, 16)) : createCommentVNode("v-if", true),
- _ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
- renderSlot(_ctx.$slots, "tip"),
- !isPictureCard.value && __props.showFileList ? (openBlock(), createBlock(upload_list_default, {
- key: 3,
- disabled: unref(disabled),
- "list-type": __props.listType,
- files: unref(uploadFiles),
- crossorigin: __props.crossorigin,
- "handle-preview": __props.onPreview,
- onRemove: unref(handleRemove)
- }, createSlots({ _: 2 }, [_ctx.$slots.file ? {
- name: "default",
- fn: withCtx(({ file, index }) => [renderSlot(_ctx.$slots, "file", {
- file,
- index
- })]),
- key: "0"
- } : void 0]), 1032, [
- "disabled",
- "list-type",
- "files",
- "crossorigin",
- "handle-preview",
- "onRemove"
- ])) : createCommentVNode("v-if", true)
- ]);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/watermark/src/watermark.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `WatermarkProps` instead.
- */
- var watermarkProps = buildProps({
- zIndex: {
- type: Number,
- default: 9
- },
- rotate: {
- type: Number,
- default: -22
- },
- width: Number,
- height: Number,
- image: String,
- content: {
- type: definePropType([String, Array]),
- default: "Element Plus"
- },
- font: { type: definePropType(Object) },
- gap: {
- type: definePropType(Array),
- default: () => [100, 100]
- },
- offset: { type: definePropType(Array) }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/watermark/src/utils.mjs
- /** converting camel-cased strings to be lowercase and link it with Separator */
- function toLowercaseSeparator(key) {
- return key.replace(/([A-Z])/g, "-$1").toLowerCase();
- }
- function getStyleStr(style) {
- return Object.keys(style).map((key) => `${toLowercaseSeparator(key)}: ${style[key]};`).join(" ");
- }
- /** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
- function getPixelRatio() {
- return window.devicePixelRatio || 1;
- }
- /** Whether to re-render the watermark */
- var reRendering = (mutation, watermarkElement) => {
- let flag = false;
- if (mutation.removedNodes.length && watermarkElement) flag = Array.from(mutation.removedNodes).includes(watermarkElement);
- if (mutation.type === "attributes" && mutation.target === watermarkElement) flag = true;
- return flag;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/watermark/src/useClips.mjs
- var TEXT_ALIGN_RATIO_MAP = {
- left: [0, .5],
- start: [0, .5],
- center: [.5, 0],
- right: [1, -.5],
- end: [1, -.5]
- };
- function prepareCanvas(width, height, ratio = 1) {
- const canvas = document.createElement("canvas");
- const ctx = canvas.getContext("2d");
- const realWidth = width * ratio;
- const realHeight = height * ratio;
- canvas.setAttribute("width", `${realWidth}px`);
- canvas.setAttribute("height", `${realHeight}px`);
- ctx.save();
- return [
- ctx,
- canvas,
- realWidth,
- realHeight
- ];
- }
- /**
- * Get the clips of text content.
- * This is a lazy hook function since SSR no need this
- */
- function useClips() {
- function getClips(content, rotate, ratio, width, height, font, gapX, gapY, space) {
- const [ctx, canvas, contentWidth, contentHeight] = prepareCanvas(width, height, ratio);
- let baselineOffset = 0;
- if (content instanceof HTMLImageElement) ctx.drawImage(content, 0, 0, contentWidth, contentHeight);
- else {
- const { color, fontSize, fontStyle, fontWeight, fontFamily, textAlign, textBaseline } = font;
- const mergedFontSize = Number(fontSize) * ratio;
- ctx.font = `${fontStyle} normal ${fontWeight} ${mergedFontSize}px/${height}px ${fontFamily}`;
- ctx.fillStyle = color;
- ctx.textAlign = textAlign;
- ctx.textBaseline = textBaseline;
- const contents = isArray$1(content) ? content : [content];
- if (textBaseline !== "top" && contents[0]) {
- const argumentMetrics = ctx.measureText(contents[0]);
- ctx.textBaseline = "top";
- const topMetrics = ctx.measureText(contents[0]);
- baselineOffset = argumentMetrics.actualBoundingBoxAscent - topMetrics.actualBoundingBoxAscent;
- }
- contents?.forEach((item, index) => {
- const [alignRatio, spaceRatio] = TEXT_ALIGN_RATIO_MAP[textAlign];
- ctx.fillText(item ?? "", contentWidth * alignRatio + space * spaceRatio, index * (mergedFontSize + font.fontGap * ratio));
- });
- }
- const angle = Math.PI / 180 * Number(rotate);
- const maxSize = Math.max(width, height);
- const [rCtx, rCanvas, realMaxSize] = prepareCanvas(maxSize, maxSize, ratio);
- rCtx.translate(realMaxSize / 2, realMaxSize / 2);
- rCtx.rotate(angle);
- if (contentWidth > 0 && contentHeight > 0) rCtx.drawImage(canvas, -contentWidth / 2, -contentHeight / 2);
- function getRotatePos(x, y) {
- return [x * Math.cos(angle) - y * Math.sin(angle), x * Math.sin(angle) + y * Math.cos(angle)];
- }
- let left = 0;
- let right = 0;
- let top = 0;
- let bottom = 0;
- const halfWidth = contentWidth / 2;
- const halfHeight = contentHeight / 2;
- [
- [0 - halfWidth, 0 - halfHeight],
- [0 + halfWidth, 0 - halfHeight],
- [0 + halfWidth, 0 + halfHeight],
- [0 - halfWidth, 0 + halfHeight]
- ].forEach(([x, y]) => {
- const [targetX, targetY] = getRotatePos(x, y);
- left = Math.min(left, targetX);
- right = Math.max(right, targetX);
- top = Math.min(top, targetY);
- bottom = Math.max(bottom, targetY);
- });
- const cutLeft = left + realMaxSize / 2;
- const cutTop = top + realMaxSize / 2;
- const cutWidth = right - left;
- const cutHeight = bottom - top;
- const realGapX = gapX * ratio;
- const realGapY = gapY * ratio;
- const filledWidth = (cutWidth + realGapX) * 2;
- const filledHeight = cutHeight + realGapY;
- const [fCtx, fCanvas] = prepareCanvas(filledWidth, filledHeight);
- function drawImg(targetX = 0, targetY = 0) {
- fCtx.drawImage(rCanvas, cutLeft, cutTop, cutWidth, cutHeight, targetX, targetY + baselineOffset, cutWidth, cutHeight);
- }
- drawImg();
- drawImg(cutWidth + realGapX, -cutHeight / 2 - realGapY / 2);
- drawImg(cutWidth + realGapX, +cutHeight / 2 + realGapY / 2);
- return [
- fCanvas.toDataURL(),
- filledWidth / ratio,
- filledHeight / ratio
- ];
- }
- return getClips;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/watermark/index.mjs
- var ElWatermark = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElWatermark",
- __name: "watermark",
- props: watermarkProps,
- setup(__props) {
- const style = { position: "relative" };
- const props = __props;
- const fontGap = computed(() => props.font?.fontGap ?? 3);
- const color = computed(() => props.font?.color ?? "rgba(0,0,0,.15)");
- const fontSize = computed(() => props.font?.fontSize ?? 16);
- const fontWeight = computed(() => props.font?.fontWeight ?? "normal");
- const fontStyle = computed(() => props.font?.fontStyle ?? "normal");
- const fontFamily = computed(() => props.font?.fontFamily ?? "sans-serif");
- const textAlign = computed(() => props.font?.textAlign ?? "center");
- const textBaseline = computed(() => props.font?.textBaseline ?? "hanging");
- const gapX = computed(() => props.gap[0]);
- const gapY = computed(() => props.gap[1]);
- const gapXCenter = computed(() => gapX.value / 2);
- const gapYCenter = computed(() => gapY.value / 2);
- const offsetLeft = computed(() => props.offset?.[0] ?? gapXCenter.value);
- const offsetTop = computed(() => props.offset?.[1] ?? gapYCenter.value);
- const getMarkStyle = () => {
- const markStyle = {
- zIndex: props.zIndex,
- position: "absolute",
- left: 0,
- top: 0,
- width: "100%",
- height: "100%",
- pointerEvents: "none",
- backgroundRepeat: "repeat"
- };
- /** Calculate the style of the offset */
- let positionLeft = offsetLeft.value - gapXCenter.value;
- let positionTop = offsetTop.value - gapYCenter.value;
- if (positionLeft > 0) {
- markStyle.left = `${positionLeft}px`;
- markStyle.width = `calc(100% - ${positionLeft}px)`;
- positionLeft = 0;
- }
- if (positionTop > 0) {
- markStyle.top = `${positionTop}px`;
- markStyle.height = `calc(100% - ${positionTop}px)`;
- positionTop = 0;
- }
- markStyle.backgroundPosition = `${positionLeft}px ${positionTop}px`;
- return markStyle;
- };
- const containerRef = shallowRef(null);
- const watermarkRef = shallowRef();
- const stopObservation = ref(false);
- const destroyWatermark = () => {
- if (watermarkRef.value) {
- watermarkRef.value.remove();
- watermarkRef.value = void 0;
- }
- };
- const appendWatermark = (base64Url, markWidth) => {
- if (containerRef.value && watermarkRef.value) {
- stopObservation.value = true;
- watermarkRef.value.setAttribute("style", getStyleStr({
- ...getMarkStyle(),
- backgroundImage: `url('${base64Url}')`,
- backgroundSize: `${Math.floor(markWidth)}px`
- }));
- containerRef.value?.append(watermarkRef.value);
- setTimeout(() => {
- stopObservation.value = false;
- });
- }
- };
- /**
- * Get the width and height of the watermark. The default values are as follows
- * Image: [120, 64]; Content: It's calculated by content;
- */
- const getMarkSize = (ctx) => {
- let defaultWidth = 120;
- let defaultHeight = 64;
- let space = 0;
- const { image, content, width, height, rotate } = props;
- if (!image && ctx.measureText) {
- ctx.font = `${Number(fontSize.value)}px ${fontFamily.value}`;
- const contents = isArray$1(content) ? content : [content];
- let maxWidth = 0;
- let maxHeight = 0;
- contents.forEach((item) => {
- const { width, fontBoundingBoxAscent, fontBoundingBoxDescent, actualBoundingBoxAscent, actualBoundingBoxDescent } = ctx.measureText(item);
- const height = isUndefined(fontBoundingBoxAscent) ? actualBoundingBoxAscent + actualBoundingBoxDescent : fontBoundingBoxAscent + fontBoundingBoxDescent;
- if (width > maxWidth) maxWidth = Math.ceil(width);
- if (height > maxHeight) maxHeight = Math.ceil(height);
- });
- defaultWidth = maxWidth;
- defaultHeight = maxHeight * contents.length + (contents.length - 1) * fontGap.value;
- const angle = Math.PI / 180 * Number(rotate);
- space = Math.ceil(Math.abs(Math.sin(angle) * defaultHeight) / 2);
- defaultWidth += space;
- }
- return [
- width ?? defaultWidth,
- height ?? defaultHeight,
- space
- ];
- };
- const getClips = useClips();
- const renderWatermark = () => {
- const ctx = document.createElement("canvas").getContext("2d");
- const image = props.image;
- const content = props.content;
- const rotate = props.rotate;
- if (ctx) {
- if (!watermarkRef.value) watermarkRef.value = document.createElement("div");
- const ratio = getPixelRatio();
- const [markWidth, markHeight, space] = getMarkSize(ctx);
- const drawCanvas = (drawContent) => {
- const [textClips, clipWidth] = getClips(drawContent || "", rotate, ratio, markWidth, markHeight, {
- color: color.value,
- fontSize: fontSize.value,
- fontStyle: fontStyle.value,
- fontWeight: fontWeight.value,
- fontFamily: fontFamily.value,
- fontGap: fontGap.value,
- textAlign: textAlign.value,
- textBaseline: textBaseline.value
- }, gapX.value, gapY.value, space);
- appendWatermark(textClips, clipWidth);
- };
- if (image) {
- const img = new Image();
- img.onload = () => {
- drawCanvas(img);
- };
- img.onerror = () => {
- drawCanvas(content);
- };
- img.crossOrigin = "anonymous";
- img.referrerPolicy = "no-referrer";
- img.src = image;
- } else drawCanvas(content);
- }
- };
- onMounted(() => {
- renderWatermark();
- });
- watch(() => props, () => {
- renderWatermark();
- }, {
- deep: true,
- flush: "post"
- });
- onBeforeUnmount(() => {
- destroyWatermark();
- });
- const onMutate = (mutations) => {
- if (stopObservation.value) return;
- mutations.forEach((mutation) => {
- if (reRendering(mutation, watermarkRef.value)) {
- destroyWatermark();
- renderWatermark();
- }
- });
- };
- useMutationObserver(containerRef, onMutate, {
- attributes: true,
- subtree: true,
- childList: true
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "containerRef",
- ref: containerRef,
- style: normalizeStyle([style])
- }, [renderSlot(_ctx.$slots, "default")], 4);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/content.mjs
- var tourStrategies = ["absolute", "fixed"];
- var tourPlacements = [
- "top-start",
- "top-end",
- "top",
- "bottom-start",
- "bottom-end",
- "bottom",
- "left-start",
- "left-end",
- "left",
- "right-start",
- "right-end",
- "right"
- ];
- /**
- * @deprecated Removed after 3.0.0, Use `TourContentProps` instead.
- */
- var tourContentProps = buildProps({
- placement: {
- type: definePropType(String),
- values: tourPlacements,
- default: "bottom"
- },
- reference: {
- type: definePropType(Object),
- default: null
- },
- strategy: {
- type: definePropType(String),
- values: tourStrategies,
- default: "absolute"
- },
- offset: {
- type: Number,
- default: 10
- },
- showArrow: Boolean,
- zIndex: {
- type: Number,
- default: 2001
- }
- });
- var tourContentEmits = { close: () => true };
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/tour.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TourProps` instead.
- */
- var tourProps = buildProps({
- modelValue: Boolean,
- current: {
- type: Number,
- default: 0
- },
- showArrow: {
- type: Boolean,
- default: true
- },
- showClose: {
- type: Boolean,
- default: true
- },
- closeIcon: { type: iconPropType },
- placement: tourContentProps.placement,
- contentStyle: { type: definePropType([Object]) },
- mask: {
- type: definePropType([Boolean, Object]),
- default: true
- },
- gap: {
- type: definePropType(Object),
- default: () => ({
- offset: 6,
- radius: 2
- })
- },
- zIndex: { type: Number },
- scrollIntoViewOptions: {
- type: definePropType([Boolean, Object]),
- default: () => ({ block: "center" })
- },
- type: { type: definePropType(String) },
- appendTo: {
- type: teleportProps.to.type,
- default: "body"
- },
- closeOnPressEscape: {
- type: Boolean,
- default: true
- },
- targetAreaClickable: {
- type: Boolean,
- default: true
- }
- });
- var tourEmits = {
- [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
- ["update:current"]: (current) => isNumber(current),
- close: (current) => isNumber(current),
- finish: () => true,
- change: (current) => isNumber(current)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/step.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `TourStepProps` instead.
- */
- var tourStepProps = buildProps({
- target: { type: definePropType([
- String,
- Object,
- Function
- ]) },
- title: String,
- description: String,
- showClose: {
- type: Boolean,
- default: void 0
- },
- closeIcon: { type: iconPropType },
- showArrow: {
- type: Boolean,
- default: void 0
- },
- placement: tourContentProps.placement,
- mask: {
- type: definePropType([Boolean, Object]),
- default: void 0
- },
- contentStyle: { type: definePropType([Object]) },
- prevButtonProps: { type: definePropType(Object) },
- nextButtonProps: { type: definePropType(Object) },
- scrollIntoViewOptions: {
- type: definePropType([Boolean, Object]),
- default: void 0
- },
- type: { type: definePropType(String) }
- });
- var tourStepEmits = { close: () => true };
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/helper.mjs
- var useTarget = (target, open, gap, mergedMask, scrollIntoViewOptions) => {
- const posInfo = ref(null);
- const getTargetEl = () => {
- let targetEl;
- if (isString(target.value)) targetEl = document.querySelector(target.value);
- else if (isFunction$1(target.value)) targetEl = target.value();
- else targetEl = target.value;
- return targetEl;
- };
- const updatePosInfo = () => {
- const targetEl = getTargetEl();
- if (!targetEl || !open.value) {
- posInfo.value = null;
- return;
- }
- if (!isInViewPort(targetEl)) targetEl.scrollIntoView(scrollIntoViewOptions.value);
- const { left, top, width, height } = targetEl.getBoundingClientRect();
- posInfo.value = {
- left,
- top,
- width,
- height,
- radius: 0
- };
- };
- onMounted(() => {
- watch([open, target], () => {
- updatePosInfo();
- }, { immediate: true });
- window.addEventListener("resize", updatePosInfo);
- });
- onBeforeUnmount(() => {
- window.removeEventListener("resize", updatePosInfo);
- });
- const getGapOffset = (index) => (isArray$1(gap.value.offset) ? gap.value.offset[index] : gap.value.offset) ?? 6;
- const mergedPosInfo = computed(() => {
- if (!posInfo.value) return posInfo.value;
- const gapOffsetX = getGapOffset(0);
- const gapOffsetY = getGapOffset(1);
- const gapRadius = gap.value?.radius || 2;
- return {
- left: posInfo.value.left - gapOffsetX,
- top: posInfo.value.top - gapOffsetY,
- width: posInfo.value.width + gapOffsetX * 2,
- height: posInfo.value.height + gapOffsetY * 2,
- radius: gapRadius
- };
- });
- return {
- mergedPosInfo,
- triggerTarget: computed(() => {
- const targetEl = getTargetEl();
- if (!mergedMask.value || !targetEl || !window.DOMRect) return targetEl || void 0;
- return { getBoundingClientRect() {
- return window.DOMRect.fromRect({
- width: mergedPosInfo.value?.width || 0,
- height: mergedPosInfo.value?.height || 0,
- x: mergedPosInfo.value?.left || 0,
- y: mergedPosInfo.value?.top || 0
- });
- } };
- })
- };
- };
- var tourKey = Symbol("ElTour");
- function isInViewPort(element) {
- const viewWidth = window.innerWidth || document.documentElement.clientWidth;
- const viewHeight = window.innerHeight || document.documentElement.clientHeight;
- const { top, right, bottom, left } = element.getBoundingClientRect();
- return top >= 0 && left >= 0 && right <= viewWidth && bottom <= viewHeight;
- }
- var useFloating$1 = (referenceRef, contentRef, arrowRef, placement, strategy, offset$1, zIndex, showArrow) => {
- const x = ref();
- const y = ref();
- const middlewareData = ref({});
- const states = {
- x,
- y,
- placement,
- strategy,
- middlewareData
- };
- const middleware = computed(() => {
- const _middleware = [
- offset(unref(offset$1)),
- flip(),
- shift(),
- overflowMiddleware()
- ];
- if (unref(showArrow) && unref(arrowRef)) _middleware.push(arrow({ element: unref(arrowRef) }));
- return _middleware;
- });
- const update = async () => {
- if (!isClient) return;
- const referenceEl = unref(referenceRef);
- const contentEl = unref(contentRef);
- if (!referenceEl || !contentEl) return;
- const data = await computePosition(referenceEl, contentEl, {
- placement: unref(placement),
- strategy: unref(strategy),
- middleware: unref(middleware)
- });
- keysOf(states).forEach((key) => {
- states[key].value = data[key];
- });
- };
- const contentStyle = computed(() => {
- if (!unref(referenceRef)) return {
- position: "fixed",
- top: "50%",
- left: "50%",
- transform: "translate3d(-50%, -50%, 0)",
- maxWidth: "100vw",
- zIndex: unref(zIndex)
- };
- const { overflow } = unref(middlewareData);
- return {
- position: unref(strategy),
- zIndex: unref(zIndex),
- top: unref(y) != null ? `${unref(y)}px` : "",
- left: unref(x) != null ? `${unref(x)}px` : "",
- maxWidth: overflow?.maxWidth ? `${overflow?.maxWidth}px` : ""
- };
- });
- const arrowStyle = computed(() => {
- if (!unref(showArrow)) return {};
- const { arrow } = unref(middlewareData);
- return {
- left: arrow?.x != null ? `${arrow?.x}px` : "",
- top: arrow?.y != null ? `${arrow?.y}px` : ""
- };
- });
- let cleanup;
- onMounted(() => {
- const referenceEl = unref(referenceRef);
- const contentEl = unref(contentRef);
- if (referenceEl && contentEl) cleanup = autoUpdate(referenceEl, contentEl, update);
- watchEffect(() => {
- update();
- });
- });
- onBeforeUnmount(() => {
- cleanup && cleanup();
- });
- return {
- update,
- contentStyle,
- arrowStyle
- };
- };
- var overflowMiddleware = () => {
- return {
- name: "overflow",
- async fn(state) {
- const overflow = await detectOverflow(state);
- let overWidth = 0;
- if (overflow.left > 0) overWidth = overflow.left;
- if (overflow.right > 0) overWidth = overflow.right;
- return { data: { maxWidth: state.rects.floating.width - overWidth } };
- }
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/mask.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `MaskProps` instead.
- */
- var maskProps = buildProps({
- zIndex: {
- type: Number,
- default: 1001
- },
- visible: Boolean,
- fill: {
- type: String,
- default: "rgba(0,0,0,0.5)"
- },
- pos: { type: definePropType(Object) },
- targetAreaClickable: {
- type: Boolean,
- default: true
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/mask.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$8 = { style: {
- width: "100%",
- height: "100%"
- } };
- var _hoisted_2$4 = ["d"];
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/mask2.mjs
- var mask_default = /* @__PURE__ */ defineComponent({
- name: "ElTourMask",
- inheritAttrs: false,
- __name: "mask",
- props: maskProps,
- setup(__props) {
- const props = __props;
- const { ns } = inject(tourKey);
- const radius = computed(() => props.pos?.radius ?? 2);
- const roundInfo = computed(() => {
- const v = radius.value;
- const baseInfo = `a${v},${v} 0 0 1`;
- return {
- topRight: `${baseInfo} ${v},${v}`,
- bottomRight: `${baseInfo} ${-v},${v}`,
- bottomLeft: `${baseInfo} ${-v},${-v}`,
- topLeft: `${baseInfo} ${v},${-v}`
- };
- });
- const { width: windowWidth, height: windowHeight } = useWindowSize();
- const path = computed(() => {
- const width = windowWidth.value;
- const height = windowHeight.value;
- const info = roundInfo.value;
- const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
- const _radius = radius.value;
- return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
- });
- const maskStyle = computed(() => ({
- position: "fixed",
- left: 0,
- right: 0,
- top: 0,
- bottom: 0,
- zIndex: props.zIndex,
- pointerEvents: props.pos && props.targetAreaClickable ? "none" : "auto"
- }));
- const pathStyle = computed(() => ({
- fill: props.fill,
- pointerEvents: "auto",
- cursor: "auto"
- }));
- useLockscreen(toRef(props, "visible"), { ns });
- return (_ctx, _cache) => {
- return __props.visible ? (openBlock(), createElementBlock("div", mergeProps({
- key: 0,
- class: unref(ns).e("mask"),
- style: maskStyle.value
- }, _ctx.$attrs), [(openBlock(), createElementBlock("svg", _hoisted_1$8, [createBaseVNode("path", {
- class: normalizeClass(unref(ns).e("hollow")),
- style: normalizeStyle(pathStyle.value),
- d: path.value
- }, null, 14, _hoisted_2$4)]))], 16)) : createCommentVNode("v-if", true);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/content.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$7 = ["data-side"];
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/content2.mjs
- var content_default$1 = /* @__PURE__ */ defineComponent({
- name: "ElTourContent",
- __name: "content",
- props: tourContentProps,
- emits: tourContentEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const placement = ref(props.placement);
- const strategy = ref(props.strategy);
- const contentRef = ref(null);
- const arrowRef = ref(null);
- watch(() => props.placement, () => {
- placement.value = props.placement;
- });
- const { contentStyle, arrowStyle } = useFloating$1(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
- const side = computed(() => {
- return placement.value.split("-")[0];
- });
- const { ns } = inject(tourKey);
- const onCloseRequested = () => {
- emit("close");
- };
- const onFocusoutPrevented = (event) => {
- if (event.detail.focusReason === "pointer") event.preventDefault();
- };
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "contentRef",
- ref: contentRef,
- style: normalizeStyle(unref(contentStyle)),
- class: normalizeClass(unref(ns).e("content")),
- "data-side": side.value,
- tabindex: "-1"
- }, [createVNode(unref(focus_trap_default$1), {
- loop: "",
- trapped: "",
- "focus-start-el": "container",
- "focus-trap-el": contentRef.value || void 0,
- onReleaseRequested: onCloseRequested,
- onFocusoutPrevented
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["focus-trap-el"]), __props.showArrow ? (openBlock(), createElementBlock("span", {
- key: 0,
- ref_key: "arrowRef",
- ref: arrowRef,
- style: normalizeStyle(unref(arrowStyle)),
- class: normalizeClass(unref(ns).e("arrow"))
- }, null, 6)) : createCommentVNode("v-if", true)], 14, _hoisted_1$7);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/steps.mjs
- var steps_default = defineComponent({
- name: "ElTourSteps",
- props: { current: {
- type: Number,
- default: 0
- } },
- emits: ["update-total"],
- setup(props, { slots, emit }) {
- let cacheTotal = 0;
- return () => {
- const children = slots.default?.();
- const result = [];
- let total = 0;
- function filterSteps(children) {
- if (!isArray$1(children)) return;
- children.forEach((item) => {
- if ((item?.type || {})?.name === "ElTourStep") {
- result.push(item);
- total += 1;
- }
- });
- }
- if (children.length) filterSteps(flattedChildren(children[0]?.children));
- if (cacheTotal !== total) {
- cacheTotal = total;
- emit("update-total", total);
- }
- if (result.length) return result[props.current];
- return null;
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/tour2.mjs
- var tour_default = /* @__PURE__ */ defineComponent({
- name: "ElTour",
- inheritAttrs: false,
- __name: "tour",
- props: tourProps,
- emits: tourEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("tour");
- const total = ref(0);
- const currentStep = ref();
- const current = useVModel(props, "current", emit, { passive: true });
- const currentTarget = computed(() => currentStep.value?.target);
- const kls = computed(() => [ns.b(), mergedType.value === "primary" ? ns.m("primary") : ""]);
- const mergedPlacement = computed(() => currentStep.value?.placement || props.placement);
- const mergedContentStyle = computed(() => currentStep.value?.contentStyle ?? props.contentStyle);
- const mergedMask = computed(() => currentStep.value?.mask ?? props.mask);
- const mergedShowMask = computed(() => !!mergedMask.value && props.modelValue);
- const mergedMaskStyle = computed(() => isBoolean(mergedMask.value) ? void 0 : mergedMask.value);
- const mergedShowArrow = computed(() => !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow));
- const mergedScrollIntoViewOptions = computed(() => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions);
- const mergedType = computed(() => currentStep.value?.type ?? props.type);
- const { nextZIndex } = useZIndex();
- const nowZIndex = nextZIndex();
- const mergedZIndex = computed(() => props.zIndex ?? nowZIndex);
- const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
- watch(() => props.modelValue, (val) => {
- if (!val) current.value = 0;
- });
- const onEscClose = () => {
- if (props.closeOnPressEscape) {
- emit(UPDATE_MODEL_EVENT, false);
- emit("close", current.value);
- }
- };
- const onUpdateTotal = (val) => {
- total.value = val;
- };
- const slots = useSlots();
- provide(tourKey, {
- currentStep,
- current,
- total,
- showClose: toRef(props, "showClose"),
- closeIcon: toRef(props, "closeIcon"),
- mergedType,
- ns,
- slots,
- updateModelValue(modelValue) {
- emit(UPDATE_MODEL_EVENT, modelValue);
- },
- onClose() {
- emit("close", current.value);
- },
- onFinish() {
- emit("finish");
- },
- onChange() {
- emit(CHANGE_EVENT, current.value);
- }
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock(Fragment, null, [
- createVNode(unref(ElTeleport), { to: __props.appendTo }, {
- default: withCtx(() => [createBaseVNode("div", mergeProps({ class: kls.value }, _ctx.$attrs), [createVNode(mask_default, {
- visible: mergedShowMask.value,
- fill: mergedMaskStyle.value?.color,
- style: normalizeStyle(mergedMaskStyle.value?.style),
- pos: unref(pos),
- "z-index": mergedZIndex.value,
- "target-area-clickable": __props.targetAreaClickable
- }, null, 8, [
- "visible",
- "fill",
- "style",
- "pos",
- "z-index",
- "target-area-clickable"
- ]), __props.modelValue ? (openBlock(), createBlock(content_default$1, {
- key: unref(current),
- reference: unref(triggerTarget),
- placement: mergedPlacement.value,
- "show-arrow": mergedShowArrow.value,
- "z-index": mergedZIndex.value,
- style: normalizeStyle(mergedContentStyle.value),
- onClose: onEscClose
- }, {
- default: withCtx(() => [createVNode(unref(steps_default), {
- current: unref(current),
- onUpdateTotal
- }, {
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
- _: 3
- }, 8, ["current"])]),
- _: 3
- }, 8, [
- "reference",
- "placement",
- "show-arrow",
- "z-index",
- "style"
- ])) : createCommentVNode("v-if", true)], 16)]),
- _: 3
- }, 8, ["to"]),
- createCommentVNode(" just for IDE "),
- createCommentVNode("v-if", true)
- ], 64);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/step.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$6 = ["aria-label"];
- //#endregion
- //#region node_modules/element-plus/es/components/tour/src/step2.mjs
- var step_default = /* @__PURE__ */ defineComponent({
- name: "ElTourStep",
- __name: "step",
- props: tourStepProps,
- emits: tourStepEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const { Close } = CloseComponents;
- const { t } = useLocale();
- const { currentStep, current, total, showClose, closeIcon, mergedType, ns, slots: tourSlots, updateModelValue, onClose: tourOnClose, onFinish: tourOnFinish, onChange } = inject(tourKey);
- watch(props, (val) => {
- currentStep.value = val;
- }, { immediate: true });
- const mergedShowClose = computed(() => props.showClose ?? showClose.value);
- const mergedCloseIcon = computed(() => props.closeIcon ?? closeIcon.value ?? Close);
- const filterButtonProps = (btnProps) => {
- if (!btnProps) return;
- return omit(btnProps, ["children", "onClick"]);
- };
- const onPrev = () => {
- current.value -= 1;
- if (props.prevButtonProps?.onClick) props.prevButtonProps?.onClick();
- onChange();
- };
- const onNext = () => {
- if (current.value >= total.value - 1) onFinish();
- else current.value += 1;
- if (props.nextButtonProps?.onClick) props.nextButtonProps.onClick();
- onChange();
- };
- const onFinish = () => {
- onClose();
- tourOnFinish();
- };
- const onClose = () => {
- updateModelValue(false);
- tourOnClose();
- emit("close");
- };
- const handleKeydown = (e) => {
- if (e.target?.isContentEditable) return;
- switch (getEventCode(e)) {
- case EVENT_CODE.left:
- e.preventDefault();
- current.value > 0 && onPrev();
- break;
- case EVENT_CODE.right:
- e.preventDefault();
- onNext();
- break;
- }
- };
- onMounted(() => {
- window.addEventListener("keydown", handleKeydown);
- });
- onBeforeUnmount(() => {
- window.removeEventListener("keydown", handleKeydown);
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock(Fragment, null, [
- mergedShowClose.value ? (openBlock(), createElementBlock("button", {
- key: 0,
- "aria-label": unref(t)("el.tour.close"),
- class: normalizeClass(unref(ns).e("closebtn")),
- type: "button",
- onClick: onClose
- }, [createVNode(unref(ElIcon), { class: normalizeClass(unref(ns).e("close")) }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(mergedCloseIcon.value)))]),
- _: 1
- }, 8, ["class"])], 10, _hoisted_1$6)) : createCommentVNode("v-if", true),
- createBaseVNode("header", { class: normalizeClass([unref(ns).e("header"), { "show-close": unref(showClose) }]) }, [renderSlot(_ctx.$slots, "header", {}, () => [createBaseVNode("span", {
- role: "heading",
- class: normalizeClass(unref(ns).e("title"))
- }, toDisplayString(__props.title), 3)])], 2),
- createBaseVNode("div", { class: normalizeClass(unref(ns).e("body")) }, [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", null, toDisplayString(__props.description), 1)])], 2),
- createBaseVNode("footer", { class: normalizeClass(unref(ns).e("footer")) }, [createBaseVNode("div", { class: normalizeClass(unref(ns).b("indicators")) }, [unref(tourSlots).indicators ? (openBlock(), createBlock(resolveDynamicComponent(unref(tourSlots).indicators), {
- key: 0,
- current: unref(current),
- total: unref(total)
- }, null, 8, ["current", "total"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(total), (item, index) => {
- return openBlock(), createElementBlock("span", {
- key: item,
- class: normalizeClass([unref(ns).b("indicator"), unref(ns).is("active", index === unref(current))])
- }, null, 2);
- }), 128))], 2), createBaseVNode("div", { class: normalizeClass(unref(ns).b("buttons")) }, [unref(current) > 0 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
- key: 0,
- size: "small",
- type: unref(mergedType)
- }, filterButtonProps(__props.prevButtonProps), { onClick: onPrev }), {
- default: withCtx(() => [createTextVNode(toDisplayString(__props.prevButtonProps?.children ?? unref(t)("el.tour.previous")), 1)]),
- _: 1
- }, 16, ["type"])) : createCommentVNode("v-if", true), unref(current) <= unref(total) - 1 ? (openBlock(), createBlock(unref(ElButton), mergeProps({
- key: 1,
- size: "small",
- type: unref(mergedType) === "primary" ? "default" : "primary"
- }, filterButtonProps(__props.nextButtonProps), { onClick: onNext }), {
- default: withCtx(() => [createTextVNode(toDisplayString(__props.nextButtonProps?.children ?? (unref(current) === unref(total) - 1 ? unref(t)("el.tour.finish") : unref(t)("el.tour.next"))), 1)]),
- _: 1
- }, 16, ["type"])) : createCommentVNode("v-if", true)], 2)], 2)
- ], 64);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/tour/index.mjs
- var ElTour = withInstall(tour_default, { TourStep: step_default });
- var ElTourStep = withNoopInstall(step_default);
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/src/anchor.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AnchorProps` instead.
- */
- var anchorProps = buildProps({
- container: { type: definePropType([String, Object]) },
- offset: {
- type: Number,
- default: 0
- },
- bound: {
- type: Number,
- default: 15
- },
- duration: {
- type: Number,
- default: 300
- },
- marker: {
- type: Boolean,
- default: true
- },
- type: {
- type: definePropType(String),
- default: "default"
- },
- direction: {
- type: definePropType(String),
- default: "vertical"
- },
- selectScrollTop: Boolean
- });
- var anchorEmits = {
- change: (href) => isString(href),
- click: (e, href) => e instanceof MouseEvent && (isString(href) || isUndefined(href))
- };
- //#endregion
- //#region node_modules/element-plus/es/utils/dom/element.mjs
- var getElement = ((target) => {
- if (!isClient || target === "") return null;
- if (isString(target)) try {
- return document.querySelector(target);
- } catch {
- return null;
- }
- return target;
- });
- //#endregion
- //#region node_modules/element-plus/es/utils/throttleByRaf.mjs
- function throttleByRaf(cb) {
- let timer = 0;
- const throttle = (...args) => {
- if (timer) cAF(timer);
- timer = rAF(() => {
- cb(...args);
- timer = 0;
- });
- };
- throttle.cancel = () => {
- cAF(timer);
- timer = 0;
- };
- return throttle;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/src/constants.mjs
- var anchorKey = Symbol("anchor");
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/src/anchor2.mjs
- var anchor_default = /* @__PURE__ */ defineComponent({
- name: "ElAnchor",
- __name: "anchor",
- props: anchorProps,
- emits: anchorEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const slots = useSlots();
- const currentAnchor = ref("");
- const markerStyle = ref({});
- const anchorRef = ref(null);
- const markerRef = ref(null);
- const containerEl = ref();
- const links = {};
- let isScrolling = false;
- let currentScrollTop = 0;
- const ns = useNamespace("anchor");
- const cls = computed(() => [
- ns.b(),
- props.type === "underline" ? ns.m("underline") : "",
- ns.m(props.direction)
- ]);
- const addLink = (state) => {
- links[state.href] = state.el;
- };
- const removeLink = (href) => {
- delete links[href];
- };
- const setCurrentAnchor = (href) => {
- if (currentAnchor.value !== href) {
- currentAnchor.value = href;
- emit(CHANGE_EVENT, href);
- }
- };
- let clearAnimate = null;
- let currentTargetHref = "";
- const scrollToAnchor = (href) => {
- if (!containerEl.value) return;
- const target = getElement(href);
- if (!target) return;
- if (clearAnimate) {
- if (currentTargetHref === href) return;
- clearAnimate();
- }
- currentTargetHref = href;
- isScrolling = true;
- const scrollEle = getScrollElement(target, containerEl.value);
- const distance = getOffsetTopDistance(target, scrollEle);
- const max = scrollEle.scrollHeight - scrollEle.clientHeight;
- const to = Math.min(distance - props.offset, max);
- clearAnimate = animateScrollTo(containerEl.value, currentScrollTop, to, props.duration, () => {
- setTimeout(() => {
- isScrolling = false;
- currentTargetHref = "";
- }, 20);
- });
- };
- const scrollTo = (href) => {
- if (href) {
- setCurrentAnchor(href);
- scrollToAnchor(href);
- }
- };
- const handleClick = (e, href) => {
- emit("click", e, href);
- scrollTo(href);
- };
- const handleScroll = throttleByRaf(() => {
- if (containerEl.value) currentScrollTop = getScrollTop(containerEl.value);
- const currentHref = getCurrentHref();
- if (isScrolling || isUndefined(currentHref)) return;
- setCurrentAnchor(currentHref);
- });
- const getCurrentHref = () => {
- if (!containerEl.value) return;
- const scrollTop = getScrollTop(containerEl.value);
- const anchorTopList = [];
- for (const href of Object.keys(links)) {
- const target = getElement(href);
- if (!target) continue;
- const distance = getOffsetTopDistance(target, getScrollElement(target, containerEl.value));
- anchorTopList.push({
- top: distance - props.offset - props.bound,
- href
- });
- }
- anchorTopList.sort((prev, next) => prev.top - next.top);
- for (let i = 0; i < anchorTopList.length; i++) {
- const item = anchorTopList[i];
- const next = anchorTopList[i + 1];
- if (i === 0 && scrollTop === 0) return props.selectScrollTop ? item.href : "";
- if (item.top <= scrollTop && (!next || next.top > scrollTop)) return item.href;
- }
- };
- const getContainer = () => {
- const el = getElement(props.container);
- if (!el || isWindow(el)) containerEl.value = window;
- else containerEl.value = el;
- };
- useEventListener(containerEl, "scroll", handleScroll);
- const updateMarkerStyle = () => {
- nextTick(() => {
- if (!anchorRef.value || !markerRef.value || !currentAnchor.value) {
- markerStyle.value = {};
- return;
- }
- const currentLinkEl = links[currentAnchor.value];
- if (!currentLinkEl) {
- markerStyle.value = {};
- return;
- }
- const anchorRect = anchorRef.value.getBoundingClientRect();
- const markerRect = markerRef.value.getBoundingClientRect();
- const linkRect = currentLinkEl.getBoundingClientRect();
- if (props.direction === "horizontal") markerStyle.value = {
- left: `${linkRect.left - anchorRect.left}px`,
- width: `${linkRect.width}px`,
- opacity: 1
- };
- else markerStyle.value = {
- top: `${linkRect.top - anchorRect.top + (linkRect.height - markerRect.height) / 2}px`,
- opacity: 1
- };
- });
- };
- watch(currentAnchor, updateMarkerStyle);
- watch(() => slots.default?.(), updateMarkerStyle);
- onMounted(() => {
- getContainer();
- const hash = decodeURIComponent(window.location.hash);
- if (getElement(hash)) scrollTo(hash);
- else handleScroll();
- });
- watch(() => props.container, () => {
- getContainer();
- });
- provide(anchorKey, {
- ns,
- direction: props.direction,
- currentAnchor,
- addLink,
- removeLink,
- handleClick
- });
- __expose({ scrollTo });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "anchorRef",
- ref: anchorRef,
- class: normalizeClass(cls.value)
- }, [__props.marker ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref_key: "markerRef",
- ref: markerRef,
- class: normalizeClass(unref(ns).e("marker")),
- style: normalizeStyle(markerStyle.value)
- }, null, 6)) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("list")) }, [renderSlot(_ctx.$slots, "default")], 2)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/src/anchor-link.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `AnchorLinkProps` instead.
- */
- var anchorLinkProps = buildProps({
- title: String,
- href: String
- });
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/src/anchor-link.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$5 = ["href"];
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/src/anchor-link2.mjs
- var anchor_link_default = /* @__PURE__ */ defineComponent({
- name: "ElAnchorLink",
- __name: "anchor-link",
- props: anchorLinkProps,
- setup(__props) {
- const props = __props;
- const linkRef = ref(null);
- const { ns, direction, currentAnchor, addLink, removeLink, handleClick: contextHandleClick } = inject(anchorKey);
- const cls = computed(() => [ns.e("link"), ns.is("active", currentAnchor.value === props.href)]);
- const handleClick = (e) => {
- contextHandleClick(e, props.href);
- };
- watch(() => props.href, (val, oldVal) => {
- nextTick(() => {
- if (oldVal) removeLink(oldVal);
- if (val) addLink({
- href: val,
- el: linkRef.value
- });
- });
- });
- onMounted(() => {
- const { href } = props;
- if (href) addLink({
- href,
- el: linkRef.value
- });
- });
- onBeforeUnmount(() => {
- const { href } = props;
- if (href) removeLink(href);
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", { class: normalizeClass(unref(ns).e("item")) }, [createBaseVNode("a", {
- ref_key: "linkRef",
- ref: linkRef,
- class: normalizeClass(cls.value),
- href: __props.href,
- onClick: handleClick
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 10, _hoisted_1$5), _ctx.$slots["sub-link"] && unref(direction) === "vertical" ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("list"))
- }, [renderSlot(_ctx.$slots, "sub-link")], 2)) : createCommentVNode("v-if", true)], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/anchor/index.mjs
- var ElAnchor = withInstall(anchor_default, { AnchorLink: anchor_link_default });
- var ElAnchorLink = withNoopInstall(anchor_link_default);
- //#endregion
- //#region node_modules/element-plus/es/components/segmented/src/segmented.mjs
- var defaultProps = {
- label: "label",
- value: "value",
- disabled: "disabled"
- };
- /**
- * @deprecated Removed after 3.0.0, Use `SegmentedProps` instead.
- */
- var segmentedProps = buildProps({
- direction: {
- type: definePropType(String),
- default: "horizontal"
- },
- options: {
- type: definePropType(Array),
- default: () => []
- },
- modelValue: {
- type: [
- String,
- Number,
- Boolean
- ],
- default: void 0
- },
- props: {
- type: definePropType(Object),
- default: () => defaultProps
- },
- block: Boolean,
- size: useSizeProp,
- disabled: {
- type: Boolean,
- default: void 0
- },
- validateEvent: {
- type: Boolean,
- default: true
- },
- id: String,
- name: String,
- ...useAriaProps(["ariaLabel"])
- });
- var segmentedEmits = {
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
- [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
- };
- //#endregion
- //#region node_modules/element-plus/es/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$4 = [
- "id",
- "aria-label",
- "aria-labelledby"
- ];
- var _hoisted_2$3 = [
- "name",
- "disabled",
- "checked",
- "onChange"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/segmented/index.mjs
- var ElSegmented = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElSegmented",
- __name: "segmented",
- props: segmentedProps,
- emits: segmentedEmits,
- setup(__props, { emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("segmented");
- const segmentedId = useId();
- const segmentedSize = useFormSize();
- const _disabled = useFormDisabled();
- const { formItem } = useFormItem();
- const { inputId, isLabeledByFormItem } = useFormItemInputId(props, { formItemContext: formItem });
- const segmentedRef = ref(null);
- const activeElement = useActiveElement();
- const state = reactive({
- isInit: false,
- width: 0,
- height: 0,
- translateX: 0,
- translateY: 0,
- focusVisible: false
- });
- const handleChange = (evt, item) => {
- const value = getValue(item);
- emit(UPDATE_MODEL_EVENT, value);
- emit(CHANGE_EVENT, value);
- evt.target.checked = value === props.modelValue;
- };
- const aliasProps = computed(() => ({
- ...defaultProps,
- ...props.props
- }));
- const intoAny = (item) => item;
- const getValue = (item) => {
- return isObject$2(item) ? item[aliasProps.value.value] : item;
- };
- const getLabel = (item) => {
- return isObject$2(item) ? item[aliasProps.value.label] : item;
- };
- const getDisabled = (item) => {
- return !!(_disabled.value || (isObject$2(item) ? item[aliasProps.value.disabled] : false));
- };
- const getSelected = (item) => {
- return props.modelValue === getValue(item);
- };
- const getOption = (value) => {
- return props.options.find((item) => getValue(item) === value);
- };
- const getItemCls = (item) => {
- return [
- ns.e("item"),
- ns.is("selected", getSelected(item)),
- ns.is("disabled", getDisabled(item))
- ];
- };
- const updateSelect = () => {
- if (!segmentedRef.value) return;
- const selectedItem = segmentedRef.value.querySelector(".is-selected");
- const selectedItemInput = segmentedRef.value.querySelector(".is-selected input");
- if (!selectedItem || !selectedItemInput) {
- state.width = 0;
- state.height = 0;
- state.translateX = 0;
- state.translateY = 0;
- state.focusVisible = false;
- return;
- }
- state.isInit = true;
- if (props.direction === "vertical") {
- state.height = selectedItem.offsetHeight;
- state.translateY = selectedItem.offsetTop;
- } else {
- state.width = selectedItem.offsetWidth;
- state.translateX = selectedItem.offsetLeft;
- }
- try {
- state.focusVisible = selectedItemInput.matches(":focus-visible");
- } catch {}
- };
- const segmentedCls = computed(() => [
- ns.b(),
- ns.m(segmentedSize.value),
- ns.is("block", props.block)
- ]);
- const selectedStyle = computed(() => ({
- width: props.direction === "vertical" ? "100%" : `${state.width}px`,
- height: props.direction === "vertical" ? `${state.height}px` : "100%",
- transform: props.direction === "vertical" ? `translateY(${state.translateY}px)` : `translateX(${state.translateX}px)`,
- display: state.isInit ? "block" : "none"
- }));
- const selectedCls = computed(() => [
- ns.e("item-selected"),
- ns.is("disabled", getDisabled(getOption(props.modelValue))),
- ns.is("focus-visible", state.focusVisible)
- ]);
- const name = computed(() => {
- return props.name || segmentedId.value;
- });
- useResizeObserver(segmentedRef, updateSelect);
- watch(activeElement, updateSelect);
- watch(() => props.modelValue, () => {
- updateSelect();
- if (props.validateEvent) formItem?.validate?.("change").catch((err) => debugWarn(err));
- }, { flush: "post" });
- return (_ctx, _cache) => {
- return __props.options.length ? (openBlock(), createElementBlock("div", {
- key: 0,
- id: unref(inputId),
- ref_key: "segmentedRef",
- ref: segmentedRef,
- class: normalizeClass(segmentedCls.value),
- role: "radiogroup",
- "aria-label": !unref(isLabeledByFormItem) ? __props.ariaLabel || "segmented" : void 0,
- "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
- }, [createBaseVNode("div", { class: normalizeClass([unref(ns).e("group"), unref(ns).m(__props.direction)]) }, [createBaseVNode("div", {
- style: normalizeStyle(selectedStyle.value),
- class: normalizeClass(selectedCls.value)
- }, null, 6), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
- return openBlock(), createElementBlock("label", {
- key: index,
- class: normalizeClass(getItemCls(item))
- }, [createBaseVNode("input", {
- class: normalizeClass(unref(ns).e("item-input")),
- type: "radio",
- name: name.value,
- disabled: getDisabled(item),
- checked: getSelected(item),
- onChange: ($event) => handleChange($event, item)
- }, null, 42, _hoisted_2$3), createBaseVNode("div", { class: normalizeClass(unref(ns).e("item-label")) }, [renderSlot(_ctx.$slots, "default", { item: intoAny(item) }, () => [createTextVNode(toDisplayString(getLabel(item)), 1)])], 2)], 2);
- }), 128))], 2)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/mention/src/helper.mjs
- var filterOption = (pattern, option) => {
- const lowerCase = pattern.toLowerCase();
- return (option.label || option.value || "").toLowerCase().includes(lowerCase);
- };
- var getMentionCtx = (inputEl, prefix, split) => {
- const { selectionEnd } = inputEl;
- if (selectionEnd === null) return;
- const inputValue = inputEl.value;
- const prefixArray = castArray$1(prefix);
- let splitIndex = -1;
- let mentionCtx;
- for (let i = selectionEnd - 1; i >= 0; --i) {
- const char = inputValue[i];
- if (char === split || char === "\n" || char === "\r") {
- splitIndex = i;
- continue;
- }
- if (prefixArray.includes(char)) {
- const end = splitIndex === -1 ? selectionEnd : splitIndex;
- mentionCtx = {
- pattern: inputValue.slice(i + 1, end),
- start: i + 1,
- end,
- prefix: char,
- prefixIndex: i,
- splitIndex,
- selectionEnd
- };
- break;
- }
- }
- return mentionCtx;
- };
- /**
- * fork from textarea-caret-position
- * https://github.com/component/textarea-caret-position
- * The MIT License (MIT)
- * Copyright (c) 2015 Jonathan Ong me@jongleberry.com
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
- var getCursorPosition = (element, options = {
- debug: false,
- useSelectionEnd: false
- }) => {
- const selectionStart = element.selectionStart !== null ? element.selectionStart : 0;
- const selectionEnd = element.selectionEnd !== null ? element.selectionEnd : 0;
- const position = options.useSelectionEnd ? selectionEnd : selectionStart;
- const properties = [
- "direction",
- "boxSizing",
- "width",
- "height",
- "overflowX",
- "overflowY",
- "borderTopWidth",
- "borderRightWidth",
- "borderBottomWidth",
- "borderLeftWidth",
- "borderStyle",
- "paddingTop",
- "paddingRight",
- "paddingBottom",
- "paddingLeft",
- "fontStyle",
- "fontVariant",
- "fontWeight",
- "fontStretch",
- "fontSize",
- "fontSizeAdjust",
- "lineHeight",
- "fontFamily",
- "textAlign",
- "textTransform",
- "textIndent",
- "textDecoration",
- "letterSpacing",
- "wordSpacing",
- "tabSize",
- "MozTabSize"
- ];
- if (options.debug) {
- const el = document.querySelector("#input-textarea-caret-position-mirror-div");
- if (el?.parentNode) el.parentNode.removeChild(el);
- }
- const div = document.createElement("div");
- div.id = "input-textarea-caret-position-mirror-div";
- document.body.appendChild(div);
- const style = div.style;
- const computed = window.getComputedStyle(element);
- const isInput = element.nodeName === "INPUT";
- style.whiteSpace = isInput ? "nowrap" : "pre-wrap";
- if (!isInput) style.wordWrap = "break-word";
- style.position = "absolute";
- if (!options.debug) style.visibility = "hidden";
- properties.forEach((prop) => {
- if (isInput && prop === "lineHeight") if (computed.boxSizing === "border-box") {
- const height = Number.parseInt(computed.height);
- const outerHeight = Number.parseInt(computed.paddingTop) + Number.parseInt(computed.paddingBottom) + Number.parseInt(computed.borderTopWidth) + Number.parseInt(computed.borderBottomWidth);
- const targetHeight = outerHeight + Number.parseInt(computed.lineHeight);
- if (height > targetHeight) style.lineHeight = `${height - outerHeight}px`;
- else if (height === targetHeight) style.lineHeight = computed.lineHeight;
- else style.lineHeight = "0";
- } else style.lineHeight = computed.height;
- else style[prop] = computed[prop];
- });
- if (isFirefox()) {
- if (element.scrollHeight > Number.parseInt(computed.height)) style.overflowY = "scroll";
- } else style.overflow = "hidden";
- div.textContent = element.value.slice(0, Math.max(0, position));
- if (isInput && div.textContent) div.textContent = div.textContent.replace(/\s/g, "\xA0");
- const span = document.createElement("span");
- span.textContent = element.value.slice(Math.max(0, position)) || ".";
- span.style.position = "relative";
- span.style.left = `${-element.scrollLeft}px`;
- span.style.top = `${-element.scrollTop}px`;
- div.appendChild(span);
- const relativePosition = {
- top: span.offsetTop + Number.parseInt(computed.borderTopWidth),
- left: span.offsetLeft + Number.parseInt(computed.borderLeftWidth),
- height: Number.parseInt(computed.fontSize) * 1.5
- };
- if (options.debug) span.style.backgroundColor = "#aaa";
- else document.body.removeChild(div);
- if (relativePosition.left >= element.clientWidth) relativePosition.left = element.clientWidth;
- return relativePosition;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/mention/src/mention.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `MentionProps` instead.
- */
- var mentionProps = buildProps({
- ...inputProps,
- options: {
- type: definePropType(Array),
- default: () => []
- },
- prefix: {
- type: definePropType([String, Array]),
- default: "@",
- validator: (val) => {
- if (isString(val)) return val.length === 1;
- return val.every((v) => isString(v) && v.length === 1);
- }
- },
- split: {
- type: String,
- default: " ",
- validator: (val) => val.length === 1
- },
- filterOption: {
- type: definePropType([Boolean, Function]),
- default: () => filterOption,
- validator: (val) => {
- if (val === false) return true;
- return isFunction$1(val);
- }
- },
- placement: {
- type: definePropType(String),
- default: "bottom"
- },
- showArrow: Boolean,
- offset: {
- type: Number,
- default: 0
- },
- whole: Boolean,
- checkIsWhole: { type: definePropType(Function) },
- modelValue: String,
- loading: Boolean,
- popperClass: useTooltipContentProps.popperClass,
- popperStyle: useTooltipContentProps.popperStyle,
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- props: {
- type: definePropType(Object),
- default: () => mentionDefaultProps
- }
- });
- var mentionEmits = {
- [UPDATE_MODEL_EVENT]: (value) => isString(value),
- "whole-remove": (pattern, prefix) => isString(pattern) && isString(prefix),
- input: (value) => isString(value),
- search: (pattern, prefix) => isString(pattern) && isString(prefix),
- select: (option, prefix) => isObject$2(option) && isString(prefix),
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent
- };
- var mentionDefaultProps = {
- value: "value",
- label: "label",
- disabled: "disabled"
- };
- //#endregion
- //#region node_modules/element-plus/es/components/mention/src/mention-dropdown.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `MentionDropdownProps` instead.
- */
- var mentionDropdownProps = buildProps({
- options: {
- type: definePropType(Array),
- default: () => []
- },
- loading: Boolean,
- disabled: Boolean,
- contentId: String,
- ariaLabel: String
- });
- var mentionDropdownEmits = { select: (option) => isString(option.value) };
- //#endregion
- //#region node_modules/element-plus/es/components/mention/src/mention-dropdown.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$3 = [
- "id",
- "aria-disabled",
- "aria-selected",
- "onMousemove",
- "onClick"
- ];
- //#endregion
- //#region node_modules/element-plus/es/components/mention/src/mention-dropdown2.mjs
- var mention_dropdown_default = /* @__PURE__ */ defineComponent({
- name: "ElMentionDropdown",
- __name: "mention-dropdown",
- props: mentionDropdownProps,
- emits: mentionDropdownEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const ns = useNamespace("mention");
- const { t } = useLocale();
- const hoveringIndex = ref(-1);
- const scrollbarRef = ref();
- const optionRefs = ref();
- const dropdownRef = ref();
- const optionkls = (item, index) => [
- ns.be("dropdown", "item"),
- ns.is("hovering", hoveringIndex.value === index),
- ns.is("disabled", item.disabled || props.disabled)
- ];
- const handleSelect = (item) => {
- if (item.disabled || props.disabled) return;
- emit("select", item);
- };
- const handleMouseEnter = (index) => {
- hoveringIndex.value = index;
- };
- const filteredAllDisabled = computed(() => props.disabled || props.options.every((item) => item.disabled));
- const hoverOption = computed(() => props.options[hoveringIndex.value]);
- const selectHoverOption = () => {
- if (!hoverOption.value || hoverOption.value.disabled || props.disabled) return;
- emit("select", hoverOption.value);
- };
- const navigateOptions = (direction) => {
- const { options } = props;
- if (options.length === 0 || filteredAllDisabled.value) return;
- if (direction === "next") {
- hoveringIndex.value++;
- if (hoveringIndex.value === options.length) hoveringIndex.value = 0;
- } else if (direction === "prev") {
- hoveringIndex.value--;
- if (hoveringIndex.value < 0) hoveringIndex.value = options.length - 1;
- }
- const option = options[hoveringIndex.value];
- if (option.disabled) {
- navigateOptions(direction);
- return;
- }
- nextTick(() => scrollToOption(option));
- };
- const scrollToOption = (option) => {
- const { options } = props;
- const index = options.findIndex((item) => item.value === option.value);
- const target = optionRefs.value?.[index];
- if (target) {
- const menu = dropdownRef.value?.querySelector?.(`.${ns.be("dropdown", "wrap")}`);
- if (menu) scrollIntoView(menu, target);
- }
- scrollbarRef.value?.handleScroll();
- };
- const resetHoveringIndex = () => {
- if (filteredAllDisabled.value || props.options.length === 0) hoveringIndex.value = -1;
- else hoveringIndex.value = props.options.findIndex((item) => !item.disabled);
- };
- watch(() => props.options, resetHoveringIndex, { immediate: true });
- __expose({
- hoveringIndex,
- navigateOptions,
- selectHoverOption,
- hoverOption
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "dropdownRef",
- ref: dropdownRef,
- class: normalizeClass(unref(ns).b("dropdown"))
- }, [
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).be("dropdown", "header"))
- }, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
- withDirectives(createVNode(unref(ElScrollbar), {
- id: __props.contentId,
- ref_key: "scrollbarRef",
- ref: scrollbarRef,
- tag: "ul",
- "wrap-class": unref(ns).be("dropdown", "wrap"),
- "view-class": unref(ns).be("dropdown", "list"),
- role: "listbox",
- "aria-label": __props.ariaLabel,
- "aria-orientation": "vertical"
- }, {
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index) => {
- return openBlock(), createElementBlock("li", {
- id: `${__props.contentId}-${index}`,
- ref_for: true,
- ref_key: "optionRefs",
- ref: optionRefs,
- key: index,
- class: normalizeClass(optionkls(item, index)),
- role: "option",
- "aria-disabled": item.disabled || __props.disabled || void 0,
- "aria-selected": hoveringIndex.value === index,
- onMousemove: ($event) => handleMouseEnter(index),
- onClick: withModifiers(($event) => handleSelect(item), ["stop"])
- }, [renderSlot(_ctx.$slots, "label", {
- item,
- index
- }, () => [createBaseVNode("span", null, toDisplayString(item.label ?? item.value), 1)])], 42, _hoisted_1$3);
- }), 128))]),
- _: 3
- }, 8, [
- "id",
- "wrap-class",
- "view-class",
- "aria-label"
- ]), [[vShow, __props.options.length > 0 && !__props.loading]]),
- __props.loading ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(unref(ns).be("dropdown", "loading"))
- }, [renderSlot(_ctx.$slots, "loading", {}, () => [createTextVNode(toDisplayString(unref(t)("el.mention.loading")), 1)])], 2)) : createCommentVNode("v-if", true),
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
- key: 2,
- class: normalizeClass(unref(ns).be("dropdown", "footer"))
- }, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
- ], 2);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/mention/index.mjs
- var ElMention = withInstall(/* @__PURE__ */ defineComponent({
- name: "ElMention",
- inheritAttrs: false,
- __name: "mention",
- props: mentionProps,
- emits: mentionEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const passInputProps = computed(() => pick(props, Object.keys(inputProps)));
- const ns = useNamespace("mention");
- const disabled = useFormDisabled();
- const contentId = useId();
- const elInputRef = ref();
- const tooltipRef = ref();
- const dropdownRef = ref();
- const visible = ref(false);
- const cursorStyle = ref();
- const mentionCtx = ref();
- const computedPlacement = computed(() => props.showArrow ? props.placement : `${props.placement}-start`);
- const computedFallbackPlacements = computed(() => props.showArrow ? ["bottom", "top"] : ["bottom-start", "top-start"]);
- const aliasProps = computed(() => ({
- ...mentionDefaultProps,
- ...props.props
- }));
- const mapOption = (option) => {
- const base = {
- label: option[aliasProps.value.label],
- value: option[aliasProps.value.value],
- disabled: option[aliasProps.value.disabled]
- };
- return {
- ...option,
- ...base
- };
- };
- const options = computed(() => props.options.map(mapOption));
- const filteredOptions = computed(() => {
- const { filterOption } = props;
- if (!mentionCtx.value || !filterOption) return options.value;
- return options.value.filter((option) => filterOption(mentionCtx.value.pattern, option));
- });
- const dropdownVisible = computed(() => {
- return visible.value && (!!filteredOptions.value.length || props.loading);
- });
- const hoveringId = computed(() => {
- return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`;
- });
- const handleInputChange = (value) => {
- emit(UPDATE_MODEL_EVENT, value);
- emit(INPUT_EVENT, value);
- syncAfterCursorMove();
- };
- const handleInputKeyDown = (event) => {
- if (elInputRef.value?.isComposing) return;
- const code = getEventCode(event);
- switch (code) {
- case EVENT_CODE.left:
- case EVENT_CODE.right:
- syncAfterCursorMove();
- break;
- case EVENT_CODE.up:
- case EVENT_CODE.down:
- if (!visible.value) return;
- event.preventDefault();
- dropdownRef.value?.navigateOptions(code === EVENT_CODE.up ? "prev" : "next");
- break;
- case EVENT_CODE.enter:
- case EVENT_CODE.numpadEnter:
- if (!visible.value) {
- props.type !== "textarea" && syncAfterCursorMove();
- return;
- }
- event.preventDefault();
- if (dropdownRef.value?.hoverOption) dropdownRef.value?.selectHoverOption();
- else visible.value = false;
- break;
- case EVENT_CODE.esc:
- if (!visible.value) return;
- event.preventDefault();
- visible.value = false;
- break;
- case EVENT_CODE.backspace: if (props.whole && mentionCtx.value) {
- const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } = mentionCtx.value;
- const inputEl = getInputEl();
- if (!inputEl) return;
- const inputValue = inputEl.value;
- const matchOption = options.value.find((item) => item.value === pattern);
- if ((isFunction$1(props.checkIsWhole) ? props.checkIsWhole(pattern, prefix) : matchOption) && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {
- event.preventDefault();
- const newValue = inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1);
- emit(UPDATE_MODEL_EVENT, newValue);
- emit(INPUT_EVENT, newValue);
- emit("whole-remove", pattern, prefix);
- const newSelectionEnd = prefixIndex;
- nextTick(() => {
- inputEl.selectionStart = newSelectionEnd;
- inputEl.selectionEnd = newSelectionEnd;
- syncDropdownVisible();
- });
- }
- }
- }
- };
- const { wrapperRef } = useFocusController(elInputRef, {
- disabled,
- afterFocus() {
- syncAfterCursorMove();
- },
- beforeBlur(event) {
- return tooltipRef.value?.isFocusInsideContent(event);
- },
- afterBlur() {
- visible.value = false;
- }
- });
- const handleInputMouseDown = () => {
- syncAfterCursorMove();
- };
- const getOriginalOption = (mentionOption) => {
- return props.options.find((option) => {
- return mentionOption.value === option[aliasProps.value.value];
- });
- };
- const handleSelect = (item) => {
- if (!mentionCtx.value) return;
- const inputEl = getInputEl();
- if (!inputEl) return;
- const inputValue = inputEl.value;
- const { split } = props;
- const newEndPart = inputValue.slice(mentionCtx.value.end);
- const alreadySeparated = newEndPart.startsWith(split);
- const newMiddlePart = `${item.value}${alreadySeparated ? "" : split}`;
- const newValue = inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart;
- emit(UPDATE_MODEL_EVENT, newValue);
- emit(INPUT_EVENT, newValue);
- emit("select", getOriginalOption(item), mentionCtx.value.prefix);
- const newSelectionEnd = mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0);
- nextTick(() => {
- inputEl.selectionStart = newSelectionEnd;
- inputEl.selectionEnd = newSelectionEnd;
- inputEl.focus();
- syncDropdownVisible();
- });
- };
- const getInputEl = () => props.type === "textarea" ? elInputRef.value?.textarea : elInputRef.value?.input;
- const syncAfterCursorMove = () => {
- setTimeout(() => {
- syncCursor();
- syncDropdownVisible();
- nextTick(() => tooltipRef.value?.updatePopper());
- }, 0);
- };
- const syncCursor = () => {
- const inputEl = getInputEl();
- if (!inputEl) return;
- const caretPosition = getCursorPosition(inputEl);
- const inputRect = inputEl.getBoundingClientRect();
- const wrapperRect = wrapperRef.value.getBoundingClientRect();
- cursorStyle.value = {
- position: "absolute",
- width: 0,
- height: `${caretPosition.height}px`,
- left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,
- top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`
- };
- };
- const syncDropdownVisible = () => {
- const inputEl = getInputEl();
- if (document.activeElement !== inputEl) {
- visible.value = false;
- return;
- }
- const { prefix, split } = props;
- mentionCtx.value = getMentionCtx(inputEl, prefix, split);
- if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {
- visible.value = true;
- emit("search", mentionCtx.value.pattern, mentionCtx.value.prefix);
- return;
- }
- visible.value = false;
- };
- __expose({
- input: elInputRef,
- tooltip: tooltipRef,
- dropdownVisible
- });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "wrapperRef",
- ref: wrapperRef,
- class: normalizeClass(unref(ns).b())
- }, [createVNode(unref(ElInput), mergeProps(mergeProps(passInputProps.value, _ctx.$attrs), {
- ref_key: "elInputRef",
- ref: elInputRef,
- "model-value": __props.modelValue,
- disabled: unref(disabled),
- role: dropdownVisible.value ? "combobox" : void 0,
- "aria-activedescendant": dropdownVisible.value ? hoveringId.value || "" : void 0,
- "aria-controls": dropdownVisible.value ? unref(contentId) : void 0,
- "aria-expanded": dropdownVisible.value || void 0,
- "aria-label": __props.ariaLabel,
- "aria-autocomplete": dropdownVisible.value ? "none" : void 0,
- "aria-haspopup": dropdownVisible.value ? "listbox" : void 0,
- onInput: handleInputChange,
- onKeydown: handleInputKeyDown,
- onMousedown: handleInputMouseDown
- }), createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
- return {
- name,
- fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
- };
- })]), 1040, [
- "model-value",
- "disabled",
- "role",
- "aria-activedescendant",
- "aria-controls",
- "aria-expanded",
- "aria-label",
- "aria-autocomplete",
- "aria-haspopup"
- ]), createVNode(unref(ElTooltip), {
- ref_key: "tooltipRef",
- ref: tooltipRef,
- visible: dropdownVisible.value,
- "popper-class": [unref(ns).e("popper"), __props.popperClass],
- "popper-style": __props.popperStyle,
- "popper-options": __props.popperOptions,
- placement: computedPlacement.value,
- "fallback-placements": computedFallbackPlacements.value,
- effect: "light",
- pure: "",
- offset: __props.offset,
- "show-arrow": __props.showArrow
- }, {
- default: withCtx(() => [createBaseVNode("div", { style: normalizeStyle(cursorStyle.value) }, null, 4)]),
- content: withCtx(() => [createVNode(mention_dropdown_default, {
- ref_key: "dropdownRef",
- ref: dropdownRef,
- options: filteredOptions.value,
- disabled: unref(disabled),
- loading: __props.loading,
- "content-id": unref(contentId),
- "aria-label": __props.ariaLabel,
- onSelect: handleSelect,
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => elInputRef.value?.focus(), ["stop"]))
- }, createSlots({ _: 2 }, [renderList(_ctx.$slots, (_, name) => {
- return {
- name,
- fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))])
- };
- })]), 1032, [
- "options",
- "disabled",
- "loading",
- "content-id",
- "aria-label"
- ])]),
- _: 3
- }, 8, [
- "visible",
- "popper-class",
- "popper-style",
- "popper-options",
- "placement",
- "fallback-placements",
- "offset",
- "show-arrow"
- ])], 2);
- };
- }
- }));
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/splitter.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `SplitterProps` instead.
- */
- var splitterProps = buildProps({
- layout: {
- type: String,
- default: "horizontal",
- values: ["horizontal", "vertical"]
- },
- lazy: Boolean
- });
- var splitterEmits = {
- resizeStart: (index, sizes) => true,
- resize: (index, sizes) => true,
- resizeEnd: (index, sizes) => true,
- collapse: (index, type, sizes) => true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/split-panel.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `SplitterPanelProps` instead.
- */
- var splitterPanelProps = buildProps({
- min: { type: [String, Number] },
- max: { type: [String, Number] },
- size: { type: [String, Number] },
- resizable: {
- type: Boolean,
- default: true
- },
- collapsible: Boolean
- });
- var splitterPanelEmits = { "update:size": (value) => typeof value === "number" || typeof value === "string" };
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/hooks/useContainer.mjs
- function useContainer(layout) {
- const containerEl = ref();
- const { width, height } = useElementSize(containerEl);
- return {
- containerEl,
- containerSize: computed(() => {
- return layout.value === "horizontal" ? width.value : height.value;
- })
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/hooks/useSize.mjs
- function getPct(str) {
- return Number(str.slice(0, -1)) / 100;
- }
- function getPx(str) {
- return Number(str.slice(0, -2));
- }
- function isPct(itemSize) {
- return isString(itemSize) && itemSize.endsWith("%");
- }
- function isPx(itemSize) {
- return isString(itemSize) && itemSize.endsWith("px");
- }
- function useSize$1(panels, containerSize) {
- const propSizes = computed(() => panels.value.map((i) => i.size));
- const panelCounts = computed(() => panels.value.length);
- const percentSizes = ref([]);
- watch([
- propSizes,
- panelCounts,
- containerSize
- ], () => {
- let ptgList = [];
- let emptyCount = 0;
- for (let i = 0; i < panelCounts.value; i += 1) {
- const itemSize = panels.value[i]?.size;
- if (isPct(itemSize)) ptgList[i] = getPct(itemSize);
- else if (isPx(itemSize)) ptgList[i] = getPx(itemSize) / containerSize.value;
- else if (itemSize || itemSize === 0) {
- const num = Number(itemSize);
- if (!Number.isNaN(num)) ptgList[i] = num / containerSize.value;
- } else {
- emptyCount += 1;
- ptgList[i] = void 0;
- }
- }
- const totalPtg = ptgList.reduce((acc, ptg) => acc + (ptg || 0), 0);
- if (totalPtg > 1 || !emptyCount) {
- const scale = 1 / totalPtg;
- ptgList = ptgList.map((ptg) => ptg === void 0 ? 0 : ptg * scale);
- } else {
- const avgRest = (1 - totalPtg) / emptyCount;
- ptgList = ptgList.map((ptg) => ptg === void 0 ? avgRest : ptg);
- }
- percentSizes.value = ptgList;
- });
- const ptg2px = (ptg) => ptg * containerSize.value;
- return {
- percentSizes,
- pxSizes: computed(() => percentSizes.value.map(ptg2px))
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/hooks/useResize.mjs
- function useResize(panels, containerSize, pxSizes, lazy) {
- const ptg2px = (ptg) => ptg * containerSize.value || 0;
- function getLimitSize(str, defaultLimit) {
- if (isPct(str)) return ptg2px(getPct(str));
- else if (isPx(str)) return getPx(str);
- return str ?? defaultLimit;
- }
- const lazyOffset = ref(0);
- const movingIndex = ref(null);
- let cachePxSizes = [];
- let updatePanelSizes = NOOP;
- const limitSizes = computed(() => panels.value.map((item) => [item.min, item.max]));
- watch(lazy, () => {
- if (lazyOffset.value) {
- const mouseup = new MouseEvent("mouseup", { bubbles: true });
- window.dispatchEvent(mouseup);
- }
- });
- const onMoveStart = (index) => {
- lazyOffset.value = 0;
- movingIndex.value = {
- index,
- confirmed: false
- };
- cachePxSizes = pxSizes.value;
- };
- const onMoving = (index, offset) => {
- let confirmedIndex = null;
- if ((!movingIndex.value || !movingIndex.value.confirmed) && offset !== 0) {
- if (offset > 0) {
- confirmedIndex = index;
- movingIndex.value = {
- index,
- confirmed: true
- };
- } else for (let i = index; i >= 0; i -= 1) if (cachePxSizes[i] > 0) {
- confirmedIndex = i;
- movingIndex.value = {
- index: i,
- confirmed: true
- };
- break;
- }
- }
- const mergedIndex = confirmedIndex ?? movingIndex.value?.index ?? index;
- const numSizes = [...cachePxSizes];
- const nextIndex = mergedIndex + 1;
- const startMinSize = getLimitSize(limitSizes.value[mergedIndex][0], 0);
- const endMinSize = getLimitSize(limitSizes.value[nextIndex][0], 0);
- const startMaxSize = getLimitSize(limitSizes.value[mergedIndex][1], containerSize.value || 0);
- const endMaxSize = getLimitSize(limitSizes.value[nextIndex][1], containerSize.value || 0);
- let mergedOffset = offset;
- if (numSizes[mergedIndex] + mergedOffset < startMinSize) mergedOffset = startMinSize - numSizes[mergedIndex];
- if (numSizes[nextIndex] - mergedOffset < endMinSize) mergedOffset = numSizes[nextIndex] - endMinSize;
- if (numSizes[mergedIndex] + mergedOffset > startMaxSize) mergedOffset = startMaxSize - numSizes[mergedIndex];
- if (numSizes[nextIndex] - mergedOffset > endMaxSize) mergedOffset = numSizes[nextIndex] - endMaxSize;
- numSizes[mergedIndex] += mergedOffset;
- numSizes[nextIndex] -= mergedOffset;
- lazyOffset.value = mergedOffset;
- updatePanelSizes = () => {
- panels.value.forEach((panel, index) => {
- panel.size = numSizes[index];
- });
- updatePanelSizes = NOOP;
- };
- if (!lazy.value) updatePanelSizes();
- };
- const onMoveEnd = () => {
- if (lazy.value) updatePanelSizes();
- lazyOffset.value = 0;
- movingIndex.value = null;
- cachePxSizes = [];
- };
- const cacheCollapsedSize = [];
- const onCollapse = (index, type) => {
- if (!cacheCollapsedSize.length) cacheCollapsedSize.push(...pxSizes.value);
- const currentSizes = pxSizes.value;
- const currentIndex = type === "start" ? index : index + 1;
- const targetIndex = type === "start" ? index + 1 : index;
- const currentSize = currentSizes[currentIndex];
- const targetSize = currentSizes[targetIndex];
- if (currentSize !== 0 && targetSize !== 0) {
- currentSizes[currentIndex] = 0;
- currentSizes[targetIndex] += currentSize;
- cacheCollapsedSize[index] = currentSize;
- } else {
- const totalSize = currentSize + targetSize;
- const targetCacheCollapsedSize = cacheCollapsedSize[index];
- const currentCacheCollapsedSize = totalSize - targetCacheCollapsedSize;
- currentSizes[targetIndex] = targetCacheCollapsedSize;
- currentSizes[currentIndex] = currentCacheCollapsedSize;
- }
- panels.value.forEach((panel, index) => {
- panel.size = currentSizes[index];
- });
- };
- return {
- lazyOffset,
- onMoveStart,
- onMoving,
- onMoveEnd,
- movingIndex,
- onCollapse
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/type.mjs
- var splitterRootContextKey = Symbol("splitterRootContextKey");
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/splitter2.mjs
- var splitter_default = /* @__PURE__ */ defineComponent({
- name: "ElSplitter",
- __name: "splitter",
- props: splitterProps,
- emits: splitterEmits,
- setup(__props, { emit: __emit }) {
- const ns = useNamespace("splitter");
- const emits = __emit;
- const props = __props;
- const layout = toRef(props, "layout");
- const lazy = toRef(props, "lazy");
- const { containerEl, containerSize } = useContainer(layout);
- const { removeChild: unregisterPanel, children: panels, addChild: registerPanel, ChildrenSorter: PanelsSorter } = useOrderedChildren(getCurrentInstance(), "ElSplitterPanel");
- watch(panels, () => {
- movingIndex.value = null;
- panels.value.forEach((instance, index) => {
- instance.setIndex(index);
- });
- });
- const { percentSizes, pxSizes } = useSize$1(panels, containerSize);
- const { lazyOffset, movingIndex, onMoveStart, onMoving, onMoveEnd, onCollapse } = useResize(panels, containerSize, pxSizes, lazy);
- const splitterStyles = computed(() => {
- return { [ns.cssVarBlockName("bar-offset")]: lazy.value ? `${lazyOffset.value}px` : void 0 };
- });
- const onResizeStart = (index) => {
- onMoveStart(index);
- emits("resizeStart", index, pxSizes.value);
- };
- const onResize = (index, offset) => {
- onMoving(index, offset);
- if (!lazy.value) emits("resize", index, pxSizes.value);
- };
- const onResizeEnd = async (index) => {
- onMoveEnd();
- await nextTick();
- emits("resizeEnd", index, pxSizes.value);
- };
- const onCollapsible = (index, type) => {
- onCollapse(index, type);
- emits("collapse", index, type, pxSizes.value);
- };
- provide(splitterRootContextKey, reactive({
- panels,
- percentSizes,
- pxSizes,
- layout,
- lazy,
- movingIndex,
- containerSize,
- onMoveStart: onResizeStart,
- onMoving: onResize,
- onMoveEnd: onResizeEnd,
- onCollapse: onCollapsible,
- registerPanel,
- unregisterPanel
- }));
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- ref_key: "containerEl",
- ref: containerEl,
- class: normalizeClass([unref(ns).b(), unref(ns).e(layout.value)]),
- style: normalizeStyle(splitterStyles.value)
- }, [
- renderSlot(_ctx.$slots, "default"),
- createVNode(unref(PanelsSorter)),
- createCommentVNode(" Prevent iframe touch events from breaking "),
- unref(movingIndex) ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(ns).e("mask"), unref(ns).e(`mask-${layout.value}`)])
- }, null, 2)) : createCommentVNode("v-if", true)
- ], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/hooks/usePanel.mjs
- function getCollapsible(collapsible) {
- if (collapsible && isObject$2(collapsible)) return collapsible;
- return {
- start: !!collapsible,
- end: !!collapsible
- };
- }
- function isCollapsible(panel, size, nextPanel, nextSize) {
- if (panel?.collapsible.end && size > 0) return true;
- if (nextPanel?.collapsible.start && nextSize === 0 && size > 0) return true;
- return false;
- }
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/split-bar.mjs
- var split_bar_default = /* @__PURE__ */ defineComponent({
- name: "ElSplitterBar",
- __name: "split-bar",
- props: {
- index: {
- type: Number,
- required: true
- },
- layout: {
- type: String,
- values: ["horizontal", "vertical"],
- default: "horizontal"
- },
- resizable: {
- type: Boolean,
- default: true
- },
- lazy: Boolean,
- startCollapsible: Boolean,
- endCollapsible: Boolean
- },
- emits: [
- "moveStart",
- "moving",
- "moveEnd",
- "collapse"
- ],
- setup(__props, { emit: __emit }) {
- const ns = useNamespace("splitter-bar");
- const props = __props;
- const emit = __emit;
- const isHorizontal = computed(() => props.layout === "horizontal");
- const barWrapStyles = computed(() => {
- if (isHorizontal.value) return { width: 0 };
- return { height: 0 };
- });
- const draggerStyles = computed(() => {
- return {
- width: isHorizontal.value ? "16px" : "100%",
- height: isHorizontal.value ? "100%" : "16px",
- cursor: !props.resizable ? "auto" : isHorizontal.value ? "ew-resize" : "ns-resize",
- touchAction: "none"
- };
- });
- const draggerPseudoClass = computed(() => {
- const prefix = ns.e("dragger");
- return {
- [`${prefix}-horizontal`]: isHorizontal.value,
- [`${prefix}-vertical`]: !isHorizontal.value,
- [`${prefix}-active`]: !!startPos.value
- };
- });
- const startPos = ref(null);
- const onMousedown = (e) => {
- if (!props.resizable) return;
- startPos.value = [e.pageX, e.pageY];
- emit("moveStart", props.index);
- window.addEventListener("mouseup", onMouseUp);
- window.addEventListener("mousemove", onMouseMove);
- };
- const onTouchStart = (e) => {
- if (props.resizable && e.touches.length === 1) {
- e.preventDefault();
- const touch = e.touches[0];
- startPos.value = [touch.pageX, touch.pageY];
- emit("moveStart", props.index);
- window.addEventListener("touchend", onTouchEnd);
- window.addEventListener("touchmove", onTouchMove);
- }
- };
- const onMouseMove = (e) => {
- const { pageX, pageY } = e;
- const offsetX = pageX - startPos.value[0];
- const offsetY = pageY - startPos.value[1];
- const offset = isHorizontal.value ? offsetX : offsetY;
- emit("moving", props.index, offset);
- };
- const onTouchMove = (e) => {
- if (e.touches.length === 1) {
- e.preventDefault();
- const touch = e.touches[0];
- const offsetX = touch.pageX - startPos.value[0];
- const offsetY = touch.pageY - startPos.value[1];
- const offset = isHorizontal.value ? offsetX : offsetY;
- emit("moving", props.index, offset);
- }
- };
- const onMouseUp = () => {
- startPos.value = null;
- window.removeEventListener("mouseup", onMouseUp);
- window.removeEventListener("mousemove", onMouseMove);
- emit("moveEnd", props.index);
- };
- const onTouchEnd = () => {
- startPos.value = null;
- window.removeEventListener("touchend", onTouchEnd);
- window.removeEventListener("touchmove", onTouchMove);
- emit("moveEnd", props.index);
- };
- const StartIcon = computed(() => isHorizontal.value ? arrow_left_default : arrow_up_default);
- const EndIcon = computed(() => isHorizontal.value ? arrow_right_default : arrow_down_default);
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass([unref(ns).b()]),
- style: normalizeStyle(barWrapStyles.value)
- }, [
- __props.startCollapsible ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-start`)]),
- onClick: _cache[0] || (_cache[0] = ($event) => emit("collapse", __props.index, "start"))
- }, [renderSlot(_ctx.$slots, "start-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(StartIcon.value), { style: {
- "width": "12px",
- "height": "12px"
- } }))])], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- class: normalizeClass([
- unref(ns).e("dragger"),
- draggerPseudoClass.value,
- unref(ns).is("disabled", !__props.resizable),
- unref(ns).is("lazy", __props.resizable && __props.lazy)
- ]),
- style: normalizeStyle(draggerStyles.value),
- onMousedown,
- onTouchstart: onTouchStart
- }, null, 38),
- __props.endCollapsible ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass([unref(ns).e("collapse-icon"), unref(ns).e(`${__props.layout}-collapse-icon-end`)]),
- onClick: _cache[1] || (_cache[1] = ($event) => emit("collapse", __props.index, "end"))
- }, [renderSlot(_ctx.$slots, "end-collapsible", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(EndIcon.value), { style: {
- "width": "12px",
- "height": "12px"
- } }))])], 2)) : createCommentVNode("v-if", true)
- ], 6);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/split-panel.vue_vue_type_script_setup_true_lang.mjs
- var COMPONENT_NAME = "ElSplitterPanel";
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/src/split-panel2.mjs
- var split_panel_default = /* @__PURE__ */ defineComponent({
- name: COMPONENT_NAME,
- __name: "split-panel",
- props: splitterPanelProps,
- emits: splitterPanelEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const ns = useNamespace("splitter-panel");
- const props = __props;
- const emits = __emit;
- const splitterContext = inject(splitterRootContextKey);
- if (!splitterContext) throwError(COMPONENT_NAME, "usage: <el-splitter><el-splitter-panel /></el-splitter/>");
- const { panels, layout, lazy, containerSize, pxSizes } = toRefs(splitterContext);
- const { registerPanel, unregisterPanel, onCollapse, onMoveEnd, onMoveStart, onMoving } = splitterContext;
- const panelEl = ref();
- const instance = getCurrentInstance();
- const uid = instance.uid;
- const index = ref(0);
- const panel = computed(() => panels.value[index.value]);
- const setIndex = (val) => {
- index.value = val;
- };
- const panelSize = computed(() => {
- if (!panel.value) return 0;
- return pxSizes.value[index.value] ?? 0;
- });
- const nextSize = computed(() => {
- if (!panel.value) return 0;
- return pxSizes.value[index.value + 1] ?? 0;
- });
- const nextPanel = computed(() => {
- if (panel.value) return panels.value[index.value + 1];
- return null;
- });
- const isResizable = computed(() => {
- if (!nextPanel.value) return false;
- return props.resizable && nextPanel.value?.resizable && (panelSize.value !== 0 || !props.min) && (nextSize.value !== 0 || !nextPanel.value.min);
- });
- const isShowBar = computed(() => {
- if (!panel.value) return false;
- return index.value !== panels.value.length - 1;
- });
- const startCollapsible = computed(() => isCollapsible(panel.value, panelSize.value, nextPanel.value, nextSize.value));
- const endCollapsible = computed(() => isCollapsible(nextPanel.value, nextSize.value, panel.value, panelSize.value));
- function sizeToPx(str) {
- if (isPct(str)) return getPct(str) * containerSize.value || 0;
- else if (isPx(str)) return getPx(str);
- return str ?? 0;
- }
- let isSizeUpdating = false;
- watch(() => props.size, () => {
- if (!isSizeUpdating && panel.value) {
- if (!containerSize.value) {
- panel.value.size = props.size;
- return;
- }
- const size = sizeToPx(props.size);
- const maxSize = sizeToPx(props.max);
- const minSize = sizeToPx(props.min);
- const finalSize = Math.min(Math.max(size, minSize || 0), maxSize || size);
- if (finalSize !== size) emits("update:size", finalSize);
- panel.value.size = finalSize;
- }
- });
- watch(() => panel.value?.size, (val) => {
- if (val !== props.size) {
- isSizeUpdating = true;
- emits("update:size", val);
- nextTick(() => isSizeUpdating = false);
- }
- });
- watch(() => props.resizable, (val) => {
- if (panel.value) panel.value.resizable = val;
- });
- const _panel = reactive({
- uid,
- getVnode: () => instance.vnode,
- setIndex,
- ...props,
- collapsible: computed(() => getCollapsible(props.collapsible))
- });
- registerPanel(_panel);
- onBeforeUnmount(() => unregisterPanel(_panel));
- __expose({ splitterPanelRef: panelEl });
- return (_ctx, _cache) => {
- return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("div", mergeProps({
- ref_key: "panelEl",
- ref: panelEl,
- class: [unref(ns).b()],
- style: { flexBasis: `${panelSize.value}px` }
- }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16), isShowBar.value ? (openBlock(), createBlock(split_bar_default, {
- key: 0,
- index: index.value,
- layout: unref(layout),
- lazy: unref(lazy),
- resizable: isResizable.value,
- "start-collapsible": startCollapsible.value,
- "end-collapsible": endCollapsible.value,
- onMoveStart: unref(onMoveStart),
- onMoving: unref(onMoving),
- onMoveEnd: unref(onMoveEnd),
- onCollapse: unref(onCollapse)
- }, {
- "start-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "start-collapsible")]),
- "end-collapsible": withCtx(() => [renderSlot(_ctx.$slots, "end-collapsible")]),
- _: 3
- }, 8, [
- "index",
- "layout",
- "lazy",
- "resizable",
- "start-collapsible",
- "end-collapsible",
- "onMoveStart",
- "onMoving",
- "onMoveEnd",
- "onCollapse"
- ])) : createCommentVNode("v-if", true)], 64);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/splitter/index.mjs
- var ElSplitter = withInstall(splitter_default, { SplitPanel: split_panel_default });
- var ElSplitterPanel = withNoopInstall(split_panel_default);
- //#endregion
- //#region node_modules/element-plus/es/components/infinite-scroll/src/index.mjs
- var SCOPE$1 = "ElInfiniteScroll";
- var attributes = {
- delay: {
- type: Number,
- default: 200
- },
- distance: {
- type: Number,
- default: 0
- },
- disabled: {
- type: Boolean,
- default: false
- },
- immediate: {
- type: Boolean,
- default: true
- }
- };
- var getScrollOptions = (el, instance) => {
- return Object.entries(attributes).reduce((acm, [name, option]) => {
- const { type, default: defaultValue } = option;
- const attrVal = el.getAttribute(`infinite-scroll-${name}`);
- let value = instance[attrVal] ?? attrVal ?? defaultValue;
- value = value === "false" ? false : value;
- value = type(value);
- acm[name] = Number.isNaN(value) ? defaultValue : value;
- return acm;
- }, {});
- };
- var destroyObserver = (el) => {
- const { observer } = el[SCOPE$1];
- if (observer) {
- observer.disconnect();
- delete el[SCOPE$1].observer;
- }
- };
- var handleScroll = (el, cb) => {
- const { container, containerEl, instance, observer, lastScrollTop } = el[SCOPE$1];
- const { disabled, distance } = getScrollOptions(el, instance);
- const { clientHeight, scrollHeight, scrollTop } = containerEl;
- const delta = scrollTop - lastScrollTop;
- el[SCOPE$1].lastScrollTop = scrollTop;
- if (observer || disabled || delta < 0) return;
- let shouldTrigger = false;
- if (container === el) shouldTrigger = scrollHeight - (clientHeight + scrollTop) <= distance;
- else {
- const { clientTop, scrollHeight: height } = el;
- const offsetTop = getOffsetTopDistance(el, containerEl);
- shouldTrigger = scrollTop + clientHeight >= offsetTop + clientTop + height - distance;
- }
- if (shouldTrigger) cb.call(instance);
- };
- function checkFull(el, cb) {
- const { containerEl, instance } = el[SCOPE$1];
- const { disabled } = getScrollOptions(el, instance);
- if (disabled || containerEl.clientHeight === 0) return;
- if (containerEl.scrollHeight <= containerEl.clientHeight) cb.call(instance);
- else destroyObserver(el);
- }
- //#endregion
- //#region node_modules/element-plus/es/components/infinite-scroll/index.mjs
- var _InfiniteScroll = {
- async mounted(el, binding) {
- const { instance, value: cb } = binding;
- useDeprecated({
- scope: SCOPE$1,
- from: "the directive v-infinite-scroll",
- replacement: "the el-scrollbar infinite scroll",
- version: "3.0.0",
- ref: "https://element-plus.org/en-US/component/scrollbar#infinite-scroll"
- }, true);
- if (!isFunction$1(cb)) throwError(SCOPE$1, "'v-infinite-scroll' binding value must be a function");
- await nextTick();
- const { delay, immediate } = getScrollOptions(el, instance);
- const container = getScrollContainer(el, true);
- const containerEl = container === window ? document.documentElement : container;
- const onScroll = throttle(handleScroll.bind(null, el, cb), delay);
- if (!container) return;
- el[SCOPE$1] = {
- instance,
- container,
- containerEl,
- delay,
- cb,
- onScroll,
- lastScrollTop: containerEl.scrollTop
- };
- if (immediate) {
- const observer = new MutationObserver(throttle(checkFull.bind(null, el, cb), 50));
- el[SCOPE$1].observer = observer;
- observer.observe(el, {
- childList: true,
- subtree: true
- });
- checkFull(el, cb);
- }
- container.addEventListener("scroll", onScroll);
- },
- unmounted(el) {
- if (!el["ElInfiniteScroll"]) return;
- const { container, onScroll } = el[SCOPE$1];
- container?.removeEventListener("scroll", onScroll);
- destroyObserver(el);
- },
- async updated(el) {
- if (!el["ElInfiniteScroll"]) await nextTick();
- else {
- const { containerEl, cb, observer } = el[SCOPE$1];
- if (containerEl.clientHeight && observer) checkFull(el, cb);
- }
- }
- };
- _InfiniteScroll.install = (app) => {
- app.directive("InfiniteScroll", _InfiniteScroll);
- };
- var ElInfiniteScroll = _InfiniteScroll;
- //#endregion
- //#region node_modules/element-plus/es/components/loading/src/loading.mjs
- function createLoadingComponent(options, appContext) {
- let afterLeaveTimer;
- const afterLeaveFlag = ref(false);
- const data = reactive({
- ...options,
- originalPosition: "",
- originalOverflow: "",
- visible: false
- });
- function setText(text) {
- data.text = text;
- }
- function destroySelf() {
- const target = data.parent;
- const ns = vm.ns;
- if (!target.vLoadingAddClassList) {
- let loadingNumber = target.getAttribute("loading-number");
- loadingNumber = Number.parseInt(loadingNumber) - 1;
- if (!loadingNumber) {
- removeClass(target, ns.bm("parent", "relative"));
- target.removeAttribute("loading-number");
- } else target.setAttribute("loading-number", loadingNumber.toString());
- removeClass(target, ns.bm("parent", "hidden"));
- }
- removeElLoadingChild();
- loadingInstance.unmount();
- }
- function removeElLoadingChild() {
- vm.$el?.parentNode?.removeChild(vm.$el);
- }
- function close() {
- if (options.beforeClose && !options.beforeClose()) return;
- afterLeaveFlag.value = true;
- clearTimeout(afterLeaveTimer);
- afterLeaveTimer = setTimeout(handleAfterLeave, 400);
- data.visible = false;
- options.closed?.();
- }
- function handleAfterLeave() {
- if (!afterLeaveFlag.value) return;
- const target = data.parent;
- afterLeaveFlag.value = false;
- target.vLoadingAddClassList = void 0;
- destroySelf();
- }
- const loadingInstance = createApp(defineComponent({
- name: "ElLoading",
- setup(_, { expose }) {
- const { ns, zIndex } = useGlobalComponentSettings("loading");
- expose({
- ns,
- zIndex
- });
- return () => {
- const svg = data.spinner || data.svg;
- const spinner = h$1("svg", {
- class: "circular",
- viewBox: data.svgViewBox ? data.svgViewBox : "0 0 50 50",
- ...svg ? { innerHTML: svg } : {}
- }, [h$1("circle", {
- class: "path",
- cx: "25",
- cy: "25",
- r: "20",
- fill: "none"
- })]);
- const spinnerText = data.text ? h$1("p", { class: ns.b("text") }, [data.text]) : void 0;
- return h$1(Transition, {
- name: ns.b("fade"),
- onAfterLeave: handleAfterLeave
- }, { default: withCtx(() => [withDirectives(createVNode("div", {
- style: { backgroundColor: data.background || "" },
- class: [
- ns.b("mask"),
- data.customClass,
- ns.is("fullscreen", data.fullscreen)
- ]
- }, [h$1("div", { class: ns.b("spinner") }, [spinner, spinnerText])]), [[vShow, data.visible]])]) });
- };
- }
- }));
- Object.assign(loadingInstance._context, appContext ?? {});
- const vm = loadingInstance.mount(document.createElement("div"));
- return {
- ...toRefs(data),
- setText,
- removeElLoadingChild,
- close,
- handleAfterLeave,
- vm,
- get $el() {
- return vm.$el;
- }
- };
- }
- //#endregion
- //#region node_modules/element-plus/es/components/loading/src/service.mjs
- var fullscreenInstance = void 0;
- var Loading = function(options = {}, context) {
- if (!isClient) return void 0;
- const resolved = resolveOptions(options);
- if (resolved.fullscreen && fullscreenInstance) return fullscreenInstance;
- const instance = createLoadingComponent({
- ...resolved,
- closed: () => {
- resolved.closed?.();
- if (resolved.fullscreen) fullscreenInstance = void 0;
- }
- }, context ?? Loading._context);
- addStyle(resolved, resolved.parent, instance);
- addClassList(resolved, resolved.parent, instance);
- resolved.parent.vLoadingAddClassList = () => addClassList(resolved, resolved.parent, instance);
- /**
- * add loading-number to parent.
- * because if a fullscreen loading is triggered when somewhere
- * a v-loading.body was triggered before and it's parent is
- * document.body which with a margin , the fullscreen loading's
- * destroySelf function will remove 'el-loading-parent--relative',
- * and then the position of v-loading.body will be error.
- */
- let loadingNumber = resolved.parent.getAttribute("loading-number");
- if (!loadingNumber) loadingNumber = "1";
- else loadingNumber = `${Number.parseInt(loadingNumber) + 1}`;
- resolved.parent.setAttribute("loading-number", loadingNumber);
- resolved.parent.appendChild(instance.$el);
- nextTick(() => instance.visible.value = resolved.visible);
- if (resolved.fullscreen) fullscreenInstance = instance;
- return instance;
- };
- var resolveOptions = (options) => {
- let target;
- if (isString(options.target)) target = document.querySelector(options.target) ?? document.body;
- else target = options.target || document.body;
- return {
- parent: target === document.body || options.body ? document.body : target,
- background: options.background || "",
- svg: options.svg || "",
- svgViewBox: options.svgViewBox || "",
- spinner: options.spinner || false,
- text: options.text || "",
- fullscreen: target === document.body && (options.fullscreen ?? true),
- lock: options.lock ?? false,
- customClass: options.customClass || "",
- visible: options.visible ?? true,
- beforeClose: options.beforeClose,
- closed: options.closed,
- target
- };
- };
- var addStyle = async (options, parent, instance) => {
- const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex;
- const maskStyle = {};
- if (options.fullscreen) {
- instance.originalPosition.value = getStyle(document.body, "position");
- instance.originalOverflow.value = getStyle(document.body, "overflow");
- maskStyle.zIndex = nextZIndex();
- } else if (options.parent === document.body) {
- instance.originalPosition.value = getStyle(document.body, "position");
- /**
- * await dom render when visible is true in init,
- * because some component's height maybe 0.
- * e.g. el-table.
- */
- await nextTick();
- for (const property of ["top", "left"]) {
- const scroll = property === "top" ? "scrollTop" : "scrollLeft";
- maskStyle[property] = `${options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - Number.parseInt(getStyle(document.body, `margin-${property}`), 10)}px`;
- }
- for (const property of ["height", "width"]) maskStyle[property] = `${options.target.getBoundingClientRect()[property]}px`;
- } else instance.originalPosition.value = getStyle(parent, "position");
- for (const [key, value] of Object.entries(maskStyle)) instance.$el.style[key] = value;
- };
- var addClassList = (options, parent, instance) => {
- const ns = instance.vm.ns || instance.vm._.exposed.ns;
- if (![
- "absolute",
- "fixed",
- "sticky"
- ].includes(instance.originalPosition.value)) addClass(parent, ns.bm("parent", "relative"));
- else removeClass(parent, ns.bm("parent", "relative"));
- if (options.fullscreen && options.lock) addClass(parent, ns.bm("parent", "hidden"));
- else removeClass(parent, ns.bm("parent", "hidden"));
- };
- Loading._context = null;
- //#endregion
- //#region node_modules/element-plus/es/components/loading/src/directive.mjs
- var INSTANCE_KEY = Symbol("ElLoading");
- var getAttributeName = (name) => {
- return `element-loading-${hyphenate$1(name)}`;
- };
- var createInstance = (el, binding) => {
- const vm = binding.instance;
- const getBindingProp = (key) => isObject$2(binding.value) ? binding.value[key] : void 0;
- const resolveExpression = (key) => {
- return ref(isString(key) && vm?.[key] || key);
- };
- const getProp = (name) => resolveExpression(getBindingProp(name) || el.getAttribute(getAttributeName(name)));
- const fullscreen = getBindingProp("fullscreen") ?? binding.modifiers.fullscreen;
- const options = {
- text: getProp("text"),
- svg: getProp("svg"),
- svgViewBox: getProp("svgViewBox"),
- spinner: getProp("spinner"),
- background: getProp("background"),
- customClass: getProp("customClass"),
- fullscreen,
- target: getBindingProp("target") ?? (fullscreen ? void 0 : el),
- body: getBindingProp("body") ?? binding.modifiers.body,
- lock: getBindingProp("lock") ?? binding.modifiers.lock
- };
- const instance = Loading(options);
- instance._context = vLoading._context;
- el[INSTANCE_KEY] = {
- options,
- instance
- };
- };
- var updateOptions = (originalOptions, newOptions) => {
- for (const key of Object.keys(originalOptions)) if (isRef(originalOptions[key])) originalOptions[key].value = newOptions[key];
- };
- var vLoading = {
- mounted(el, binding) {
- if (binding.value) createInstance(el, binding);
- },
- updated(el, binding) {
- const instance = el[INSTANCE_KEY];
- if (!binding.value) {
- instance?.instance.close();
- el[INSTANCE_KEY] = null;
- return;
- }
- if (!instance) createInstance(el, binding);
- else updateOptions(instance.options, isObject$2(binding.value) ? binding.value : {
- text: el.getAttribute(getAttributeName("text")),
- svg: el.getAttribute(getAttributeName("svg")),
- svgViewBox: el.getAttribute(getAttributeName("svgViewBox")),
- spinner: el.getAttribute(getAttributeName("spinner")),
- background: el.getAttribute(getAttributeName("background")),
- customClass: el.getAttribute(getAttributeName("customClass"))
- });
- },
- unmounted(el) {
- el[INSTANCE_KEY]?.instance.close();
- el[INSTANCE_KEY] = null;
- }
- };
- vLoading._context = null;
- //#endregion
- //#region node_modules/element-plus/es/components/loading/index.mjs
- var ElLoading = {
- install(app) {
- Loading._context = app._context;
- vLoading._context = app._context;
- app.directive("loading", vLoading);
- app.config.globalProperties.$loading = Loading;
- },
- directive: vLoading,
- service: Loading
- };
- //#endregion
- //#region node_modules/element-plus/es/components/message/src/message.mjs
- var messageTypes = [
- "primary",
- "success",
- "info",
- "warning",
- "error"
- ];
- var messagePlacement = [
- "top",
- "top-left",
- "top-right",
- "bottom",
- "bottom-left",
- "bottom-right"
- ];
- var MESSAGE_DEFAULT_PLACEMENT = "top";
- var messageDefaults = mutable({
- customClass: "",
- dangerouslyUseHTMLString: false,
- duration: 3e3,
- icon: void 0,
- id: "",
- message: "",
- onClose: void 0,
- showClose: false,
- type: "info",
- plain: false,
- offset: 16,
- placement: void 0,
- zIndex: 0,
- grouping: false,
- repeatNum: 1,
- appendTo: isClient ? document.body : void 0
- });
- /**
- * @deprecated Removed after 3.0.0, Use `MessageProps` instead.
- */
- var messageProps = buildProps({
- customClass: {
- type: String,
- default: messageDefaults.customClass
- },
- dangerouslyUseHTMLString: {
- type: Boolean,
- default: messageDefaults.dangerouslyUseHTMLString
- },
- duration: {
- type: Number,
- default: messageDefaults.duration
- },
- icon: {
- type: iconPropType,
- default: messageDefaults.icon
- },
- id: {
- type: String,
- default: messageDefaults.id
- },
- message: {
- type: definePropType([
- String,
- Object,
- Function
- ]),
- default: messageDefaults.message
- },
- onClose: {
- type: definePropType(Function),
- default: messageDefaults.onClose
- },
- showClose: {
- type: Boolean,
- default: messageDefaults.showClose
- },
- type: {
- type: String,
- values: messageTypes,
- default: messageDefaults.type
- },
- plain: {
- type: Boolean,
- default: messageDefaults.plain
- },
- offset: {
- type: Number,
- default: messageDefaults.offset
- },
- placement: {
- type: String,
- values: messagePlacement,
- default: messageDefaults.placement
- },
- zIndex: {
- type: Number,
- default: messageDefaults.zIndex
- },
- grouping: {
- type: Boolean,
- default: messageDefaults.grouping
- },
- repeatNum: {
- type: Number,
- default: messageDefaults.repeatNum
- }
- });
- var messageEmits = { destroy: () => true };
- //#endregion
- //#region node_modules/element-plus/es/components/message/src/instance.mjs
- var placementInstances = shallowReactive({});
- var getOrCreatePlacementInstances = (placement) => {
- if (!placementInstances[placement]) placementInstances[placement] = shallowReactive([]);
- return placementInstances[placement];
- };
- var getInstance = (id, placement) => {
- const instances = placementInstances[placement] || [];
- const idx = instances.findIndex((instance) => instance.id === id);
- const current = instances[idx];
- let prev;
- if (idx > 0) prev = instances[idx - 1];
- return {
- current,
- prev
- };
- };
- var getLastOffset = (id, placement) => {
- const { prev } = getInstance(id, placement);
- if (!prev) return 0;
- return prev.vm.exposed.bottom.value;
- };
- var getOffsetOrSpace = (id, offset, placement) => {
- return (placementInstances[placement] || []).findIndex((instance) => instance.id === id) > 0 ? 16 : offset;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1$2 = ["id"];
- var _hoisted_2$2 = ["innerHTML"];
- //#endregion
- //#region node_modules/element-plus/es/components/message/src/message2.mjs
- var message_default = /* @__PURE__ */ defineComponent({
- name: "ElMessage",
- __name: "message",
- props: messageProps,
- emits: messageEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const { Close } = TypeComponents;
- const props = __props;
- const emit = __emit;
- const isStartTransition = ref(false);
- const { ns, zIndex } = useGlobalComponentSettings("message");
- const { currentZIndex, nextZIndex } = zIndex;
- const messageRef = ref();
- const visible = ref(false);
- const height = ref(0);
- let stopTimer = void 0;
- const badgeType = computed(() => props.type ? props.type === "error" ? "danger" : props.type : "info");
- const typeClass = computed(() => {
- const type = props.type;
- return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
- });
- const iconComponent = computed(() => props.icon || TypeComponentsMap[props.type] || "");
- const placement = computed(() => props.placement || "top");
- const lastOffset = computed(() => getLastOffset(props.id, placement.value));
- const offset = computed(() => {
- return getOffsetOrSpace(props.id, props.offset, placement.value) + lastOffset.value;
- });
- const bottom = computed(() => height.value + offset.value);
- const horizontalClass = computed(() => {
- if (placement.value.includes("left")) return ns.is("left");
- if (placement.value.includes("right")) return ns.is("right");
- return ns.is("center");
- });
- const verticalProperty = computed(() => placement.value.startsWith("top") ? "top" : "bottom");
- const customStyle = computed(() => ({
- [verticalProperty.value]: `${offset.value}px`,
- zIndex: currentZIndex.value
- }));
- function startTimer() {
- if (props.duration === 0) return;
- ({stop: stopTimer} = useTimeoutFn(() => {
- close();
- }, props.duration));
- }
- function clearTimer() {
- stopTimer?.();
- }
- function close() {
- visible.value = false;
- nextTick(() => {
- if (!isStartTransition.value) {
- props.onClose?.();
- emit("destroy");
- }
- });
- }
- function keydown(event) {
- if (getEventCode(event) === EVENT_CODE.esc) close();
- }
- onMounted(() => {
- startTimer();
- nextZIndex();
- visible.value = true;
- });
- watch(() => props.repeatNum, () => {
- clearTimer();
- startTimer();
- });
- useEventListener(document, "keydown", keydown);
- useResizeObserver(messageRef, () => {
- height.value = messageRef.value.getBoundingClientRect().height;
- });
- __expose({
- visible,
- bottom,
- close
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, {
- name: unref(ns).b("fade"),
- onBeforeEnter: _cache[0] || (_cache[0] = ($event) => isStartTransition.value = true),
- onBeforeLeave: __props.onClose,
- onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createBaseVNode("div", {
- id: __props.id,
- ref_key: "messageRef",
- ref: messageRef,
- class: normalizeClass([
- unref(ns).b(),
- { [unref(ns).m(__props.type)]: __props.type },
- unref(ns).is("closable", __props.showClose),
- unref(ns).is("plain", __props.plain),
- unref(ns).is("bottom", verticalProperty.value === "bottom"),
- horizontalClass.value,
- __props.customClass
- ]),
- style: normalizeStyle(customStyle.value),
- role: "alert",
- onMouseenter: clearTimer,
- onMouseleave: startTimer
- }, [
- __props.repeatNum > 1 ? (openBlock(), createBlock(unref(ElBadge), {
- key: 0,
- value: __props.repeatNum,
- type: badgeType.value,
- class: normalizeClass(unref(ns).e("badge"))
- }, null, 8, [
- "value",
- "type",
- "class"
- ])) : createCommentVNode("v-if", true),
- iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 1,
- class: normalizeClass([unref(ns).e("icon"), typeClass.value])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true),
- renderSlot(_ctx.$slots, "default", {}, () => [!__props.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", {
- key: 0,
- class: normalizeClass(unref(ns).e("content"))
- }, toDisplayString(__props.message), 3)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", {
- class: normalizeClass(unref(ns).e("content")),
- innerHTML: __props.message
- }, null, 10, _hoisted_2$2)], 2112))]),
- __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
- key: 2,
- class: normalizeClass(unref(ns).e("closeBtn")),
- onClick: withModifiers(close, ["stop"])
- }, {
- default: withCtx(() => [createVNode(unref(Close))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)
- ], 46, _hoisted_1$2), [[vShow, visible.value]])]),
- _: 3
- }, 8, ["name", "onBeforeLeave"]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/message/src/method.mjs
- var seed$1 = 1;
- var normalizeAppendTo = (normalized) => {
- if (!normalized.appendTo) normalized.appendTo = document.body;
- else if (isString(normalized.appendTo)) {
- let appendTo = document.querySelector(normalized.appendTo);
- if (!isElement$1(appendTo)) {
- debugWarn("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body.");
- appendTo = document.body;
- }
- normalized.appendTo = appendTo;
- }
- };
- var normalizePlacement = (normalized) => {
- if (!normalized.placement && isString(messageConfig.placement) && messageConfig.placement) normalized.placement = messageConfig.placement;
- if (!normalized.placement) normalized.placement = "top";
- if (!messagePlacement.includes(normalized.placement)) {
- debugWarn("ElMessage", `Invalid placement: ${normalized.placement}. Falling back to 'top'.`);
- normalized.placement = "top";
- }
- };
- var normalizeOptions = (params) => {
- const options = !params || isString(params) || isVNode(params) || isFunction$1(params) ? { message: params } : params;
- const normalized = {
- ...messageDefaults,
- ...options
- };
- normalizeAppendTo(normalized);
- normalizePlacement(normalized);
- if (isBoolean(messageConfig.grouping) && !normalized.grouping) normalized.grouping = messageConfig.grouping;
- if (isNumber(messageConfig.duration) && normalized.duration === 3e3) normalized.duration = messageConfig.duration;
- if (isNumber(messageConfig.offset) && normalized.offset === 16) normalized.offset = messageConfig.offset;
- if (isBoolean(messageConfig.showClose) && !normalized.showClose) normalized.showClose = messageConfig.showClose;
- if (isBoolean(messageConfig.plain) && !normalized.plain) normalized.plain = messageConfig.plain;
- return normalized;
- };
- var closeMessage = (instance) => {
- const instances = placementInstances[instance.props.placement || "top"];
- const idx = instances.indexOf(instance);
- if (idx === -1) return;
- instances.splice(idx, 1);
- const { handler } = instance;
- handler.close();
- };
- var createMessage = ({ appendTo, ...options }, context) => {
- const id = `message_${seed$1++}`;
- const userOnClose = options.onClose;
- const container = document.createElement("div");
- const props = {
- ...options,
- id,
- onClose: () => {
- userOnClose?.();
- closeMessage(instance);
- },
- onDestroy: () => {
- render(null, container);
- }
- };
- const vnode = createVNode(message_default, props, isFunction$1(props.message) || isVNode(props.message) ? { default: isFunction$1(props.message) ? props.message : () => props.message } : null);
- vnode.appContext = context || message._context;
- render(vnode, container);
- appendTo.appendChild(container.firstElementChild);
- const vm = vnode.component;
- const instance = {
- id,
- vnode,
- vm,
- handler: { close: () => {
- vm.exposed.close();
- } },
- props: vnode.component.props
- };
- return instance;
- };
- var message = (options = {}, context) => {
- if (!isClient) return { close: () => void 0 };
- const normalized = normalizeOptions(options);
- const instances = getOrCreatePlacementInstances(normalized.placement || "top");
- if (normalized.grouping && instances.length) {
- const instance = instances.find(({ vnode: vm }) => vm.props?.message === normalized.message);
- if (instance) {
- instance.props.repeatNum += 1;
- instance.props.type = normalized.type;
- return instance.handler;
- }
- }
- if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) return { close: () => void 0 };
- const instance = createMessage(normalized, context);
- instances.push(instance);
- return instance.handler;
- };
- messageTypes.forEach((type) => {
- message[type] = (options = {}, appContext) => {
- return message({
- ...normalizeOptions(options),
- type
- }, appContext);
- };
- });
- function closeAll$1(type) {
- for (const placement in placementInstances) if (hasOwn(placementInstances, placement)) {
- const instances = [...placementInstances[placement]];
- for (const instance of instances) if (!type || type === instance.props.type) instance.handler.close();
- }
- }
- function closeAllByPlacement(placement) {
- if (!placementInstances[placement]) return;
- [...placementInstances[placement]].forEach((instance) => instance.handler.close());
- }
- message.closeAll = closeAll$1;
- message.closeAllByPlacement = closeAllByPlacement;
- message._context = null;
- //#endregion
- //#region node_modules/element-plus/es/components/message/index.mjs
- var ElMessage = withInstallFunction(message, "$message");
- //#endregion
- //#region node_modules/element-plus/es/components/message-box/src/index.vue_vue_type_script_lang.mjs
- var index_vue_vue_type_script_lang_default = defineComponent({
- name: "ElMessageBox",
- directives: { TrapFocus },
- components: {
- ElButton,
- ElFocusTrap: focus_trap_default$1,
- ElInput,
- ElOverlay,
- ElIcon,
- ...TypeComponents
- },
- inheritAttrs: false,
- props: {
- buttonSize: {
- type: String,
- validator: isValidComponentSize
- },
- modal: {
- type: Boolean,
- default: true
- },
- lockScroll: {
- type: Boolean,
- default: true
- },
- showClose: {
- type: Boolean,
- default: true
- },
- closeOnClickModal: {
- type: Boolean,
- default: true
- },
- closeOnPressEscape: {
- type: Boolean,
- default: true
- },
- closeOnHashChange: {
- type: Boolean,
- default: true
- },
- center: Boolean,
- draggable: Boolean,
- overflow: Boolean,
- roundButton: Boolean,
- container: {
- type: String,
- default: "body"
- },
- boxType: {
- type: String,
- default: ""
- }
- },
- emits: ["vanish", "action"],
- setup(props, { emit }) {
- const { locale, zIndex, ns, size: btnSize } = useGlobalComponentSettings("message-box", computed(() => props.buttonSize));
- const { t } = locale;
- const { nextZIndex } = zIndex;
- const visible = ref(false);
- const state = reactive({
- autofocus: true,
- beforeClose: null,
- callback: null,
- cancelButtonText: "",
- cancelButtonClass: "",
- confirmButtonText: "",
- confirmButtonClass: "",
- cancelButtonType: "",
- confirmButtonType: "primary",
- customClass: "",
- customStyle: {},
- dangerouslyUseHTMLString: false,
- distinguishCancelAndClose: false,
- icon: "",
- closeIcon: "",
- inputPattern: null,
- inputPlaceholder: "",
- inputType: "text",
- inputValue: "",
- inputValidator: void 0,
- inputErrorMessage: "",
- message: "",
- modalFade: true,
- modalClass: "",
- showCancelButton: false,
- showConfirmButton: true,
- type: "",
- title: void 0,
- showInput: false,
- action: "",
- confirmButtonLoading: false,
- cancelButtonLoading: false,
- confirmButtonLoadingIcon: markRaw(loading_default),
- cancelButtonLoadingIcon: markRaw(loading_default),
- confirmButtonDisabled: false,
- editorErrorMessage: "",
- validateError: false,
- zIndex: nextZIndex()
- });
- const typeClass = computed(() => {
- const type = state.type;
- return { [ns.bm("icon", type)]: type && TypeComponentsMap[type] };
- });
- const contentId = useId();
- const inputId = useId();
- const iconComponent = computed(() => {
- const type = state.type;
- return state.icon || type && TypeComponentsMap[type] || "";
- });
- const hasMessage = computed(() => !!state.message);
- const rootRef = ref();
- const headerRef = ref();
- const focusStartRef = ref();
- const inputRef = ref();
- const confirmRef = ref();
- const confirmButtonClasses = computed(() => state.confirmButtonClass);
- watch(() => state.inputValue, async (val) => {
- await nextTick();
- if (props.boxType === "prompt" && val) validate();
- }, { immediate: true });
- watch(() => visible.value, (val) => {
- if (val) {
- if (props.boxType !== "prompt") if (state.autofocus) focusStartRef.value = confirmRef.value?.$el ?? rootRef.value;
- else focusStartRef.value = rootRef.value;
- state.zIndex = nextZIndex();
- }
- if (props.boxType !== "prompt") return;
- if (val) nextTick().then(() => {
- if (inputRef.value && inputRef.value.$el) if (state.autofocus) focusStartRef.value = getInputElement() ?? rootRef.value;
- else focusStartRef.value = rootRef.value;
- });
- else {
- state.editorErrorMessage = "";
- state.validateError = false;
- }
- });
- const { isDragging } = useDraggable(rootRef, headerRef, computed(() => props.draggable), computed(() => props.overflow));
- onMounted(async () => {
- await nextTick();
- if (props.closeOnHashChange) window.addEventListener("hashchange", doClose);
- });
- onBeforeUnmount(() => {
- if (props.closeOnHashChange) window.removeEventListener("hashchange", doClose);
- });
- function doClose() {
- if (!visible.value) return;
- visible.value = false;
- nextTick(() => {
- if (state.action) emit("action", state.action);
- });
- }
- const handleWrapperClick = () => {
- if (props.closeOnClickModal) handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
- };
- const overlayEvent = useSameTarget(handleWrapperClick);
- const handleInputEnter = (e) => {
- if (state.inputType !== "textarea" && !inputRef.value?.isComposing) {
- e.preventDefault();
- return handleAction("confirm");
- }
- };
- const handleAction = (action) => {
- if (props.boxType === "prompt" && action === "confirm" && !validate()) return;
- state.action = action;
- if (state.beforeClose) state.beforeClose?.(action, state, doClose);
- else doClose();
- };
- const validate = () => {
- if (props.boxType === "prompt") {
- const inputPattern = state.inputPattern;
- if (inputPattern && !inputPattern.test(state.inputValue || "")) {
- state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
- state.validateError = true;
- return false;
- }
- const inputValidator = state.inputValidator;
- if (isFunction$1(inputValidator)) {
- const validateResult = inputValidator(state.inputValue);
- if (validateResult === false) {
- state.editorErrorMessage = state.inputErrorMessage || t("el.messagebox.error");
- state.validateError = true;
- return false;
- }
- if (isString(validateResult)) {
- state.editorErrorMessage = validateResult;
- state.validateError = true;
- return false;
- }
- }
- }
- state.editorErrorMessage = "";
- state.validateError = false;
- return true;
- };
- const getInputElement = () => {
- const inputRefs = inputRef.value?.$refs;
- return inputRefs?.input ?? inputRefs?.textarea;
- };
- const handleClose = () => {
- handleAction("close");
- };
- const onCloseRequested = () => {
- if (props.closeOnPressEscape) handleClose();
- };
- if (props.lockScroll) useLockscreen(visible, { ns });
- return {
- ...toRefs(state),
- ns,
- overlayEvent,
- visible,
- hasMessage,
- typeClass,
- contentId,
- inputId,
- btnSize,
- iconComponent,
- confirmButtonClasses,
- rootRef,
- focusStartRef,
- headerRef,
- inputRef,
- isDragging,
- confirmRef,
- doClose,
- handleClose,
- onCloseRequested,
- handleWrapperClick,
- handleInputEnter,
- handleAction,
- t
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/message-box/src/index.mjs
- var _hoisted_1$1 = ["aria-label", "aria-describedby"];
- var _hoisted_2$1 = ["aria-label"];
- var _hoisted_3$1 = ["id"];
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- const _component_el_icon = resolveComponent("el-icon");
- const _component_el_input = resolveComponent("el-input");
- const _component_el_button = resolveComponent("el-button");
- const _component_el_focus_trap = resolveComponent("el-focus-trap");
- const _component_el_overlay = resolveComponent("el-overlay");
- return openBlock(), createBlock(Transition, {
- name: "fade-in-linear",
- onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("vanish")),
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createVNode(_component_el_overlay, {
- "z-index": _ctx.zIndex,
- "overlay-class": [_ctx.ns.is("message-box"), _ctx.modalClass],
- mask: _ctx.modal
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- role: "dialog",
- "aria-label": _ctx.title,
- "aria-modal": "true",
- "aria-describedby": !_ctx.showInput ? _ctx.contentId : void 0,
- class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),
- onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),
- onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),
- onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))
- }, [createVNode(_component_el_focus_trap, {
- loop: "",
- trapped: _ctx.visible,
- "focus-trap-el": _ctx.rootRef,
- "focus-start-el": _ctx.focusStartRef,
- onReleaseRequested: _ctx.onCloseRequested
- }, {
- default: withCtx(() => [createBaseVNode("div", {
- ref: "rootRef",
- class: normalizeClass([
- _ctx.ns.b(),
- _ctx.customClass,
- _ctx.ns.is("draggable", _ctx.draggable),
- _ctx.ns.is("dragging", _ctx.isDragging),
- { [_ctx.ns.m("center")]: _ctx.center }
- ]),
- style: normalizeStyle(_ctx.customStyle),
- tabindex: "-1",
- onClick: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"]))
- }, [
- _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock("div", {
- key: 0,
- ref: "headerRef",
- class: normalizeClass([_ctx.ns.e("header"), { "show-close": _ctx.showClose }])
- }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("title")) }, [_ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {
- key: 0,
- class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("span", null, toDisplayString(_ctx.title), 1)], 2), _ctx.showClose ? (openBlock(), createElementBlock("button", {
- key: 0,
- type: "button",
- class: normalizeClass(_ctx.ns.e("headerbtn")),
- "aria-label": _ctx.t("el.messagebox.close"),
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel")),
- onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"]))
- }, [createVNode(_component_el_icon, { class: normalizeClass(_ctx.ns.e("close")) }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.closeIcon || "close")))]),
- _: 1
- }, 8, ["class"])], 42, _hoisted_2$1)) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
- createBaseVNode("div", {
- id: _ctx.contentId,
- class: normalizeClass(_ctx.ns.e("content"))
- }, [createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("container")) }, [_ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {
- key: 0,
- class: normalizeClass([_ctx.ns.e("status"), _ctx.typeClass])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true), _ctx.hasMessage ? (openBlock(), createElementBlock("div", {
- key: 1,
- class: normalizeClass(_ctx.ns.e("message"))
- }, [renderSlot(_ctx.$slots, "default", {}, () => [!_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
- key: 0,
- for: _ctx.showInput ? _ctx.inputId : void 0,
- textContent: toDisplayString(_ctx.message)
- }, null, 8, ["for", "textContent"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? "label" : "p"), {
- key: 1,
- for: _ctx.showInput ? _ctx.inputId : void 0,
- innerHTML: _ctx.message
- }, null, 8, ["for", "innerHTML"]))])], 2)) : createCommentVNode("v-if", true)], 2), withDirectives(createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("input")) }, [createVNode(_component_el_input, {
- id: _ctx.inputId,
- ref: "inputRef",
- modelValue: _ctx.inputValue,
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),
- type: _ctx.inputType,
- placeholder: _ctx.inputPlaceholder,
- "aria-invalid": _ctx.validateError,
- class: normalizeClass({ invalid: _ctx.validateError }),
- onKeydown: withKeys(_ctx.handleInputEnter, ["enter"])
- }, null, 8, [
- "id",
- "modelValue",
- "type",
- "placeholder",
- "aria-invalid",
- "class",
- "onKeydown"
- ]), createBaseVNode("div", {
- class: normalizeClass(_ctx.ns.e("errormsg")),
- style: normalizeStyle({ visibility: !!_ctx.editorErrorMessage ? "visible" : "hidden" })
- }, toDisplayString(_ctx.editorErrorMessage), 7)], 2), [[vShow, _ctx.showInput]])], 10, _hoisted_3$1),
- createBaseVNode("div", { class: normalizeClass(_ctx.ns.e("btns")) }, [_ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {
- key: 0,
- type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
- text: _ctx.cancelButtonType === "text",
- loading: _ctx.cancelButtonLoading,
- "loading-icon": _ctx.cancelButtonLoadingIcon,
- class: normalizeClass([_ctx.cancelButtonClass]),
- round: _ctx.roundButton,
- size: _ctx.btnSize,
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction("cancel")),
- onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction("cancel"), ["prevent"]), ["enter"]))
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t("el.messagebox.cancel")), 1)]),
- _: 1
- }, 8, [
- "type",
- "text",
- "loading",
- "loading-icon",
- "class",
- "round",
- "size"
- ])) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_el_button, {
- ref: "confirmRef",
- type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
- text: _ctx.confirmButtonType === "text",
- loading: _ctx.confirmButtonLoading,
- "loading-icon": _ctx.confirmButtonLoadingIcon,
- class: normalizeClass([_ctx.confirmButtonClasses]),
- round: _ctx.roundButton,
- disabled: _ctx.confirmButtonDisabled,
- size: _ctx.btnSize,
- onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction("confirm")),
- onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction("confirm"), ["prevent"]), ["enter"]))
- }, {
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t("el.messagebox.confirm")), 1)]),
- _: 1
- }, 8, [
- "type",
- "text",
- "loading",
- "loading-icon",
- "class",
- "round",
- "disabled",
- "size"
- ]), [[vShow, _ctx.showConfirmButton]])], 2)
- ], 6)]),
- _: 3
- }, 8, [
- "trapped",
- "focus-trap-el",
- "focus-start-el",
- "onReleaseRequested"
- ])], 42, _hoisted_1$1)]),
- _: 3
- }, 8, [
- "z-index",
- "overlay-class",
- "mask"
- ]), [[vShow, _ctx.visible]])]),
- _: 3
- });
- }
- var src_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
- //#endregion
- //#region node_modules/element-plus/es/components/message-box/src/messageBox.mjs
- var messageInstance = /* @__PURE__ */ new Map();
- var getAppendToElement = (props) => {
- let appendTo = document.body;
- if (props.appendTo) {
- if (isString(props.appendTo)) appendTo = document.querySelector(props.appendTo);
- if (isElement$1(props.appendTo)) appendTo = props.appendTo;
- if (!isElement$1(appendTo)) {
- debugWarn("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body.");
- appendTo = document.body;
- }
- }
- return appendTo;
- };
- var initInstance = (props, container, appContext = null) => {
- const vnode = createVNode(src_default, props, isFunction$1(props.message) || isVNode(props.message) ? { default: isFunction$1(props.message) ? props.message : () => props.message } : null);
- vnode.appContext = appContext;
- render(vnode, container);
- getAppendToElement(props).appendChild(container.firstElementChild);
- return vnode.component;
- };
- var genContainer = () => {
- return document.createElement("div");
- };
- var showMessage = (options, appContext) => {
- const container = genContainer();
- options.onVanish = () => {
- render(null, container);
- messageInstance.delete(vm);
- };
- options.onAction = (action) => {
- const currentMsg = messageInstance.get(vm);
- let resolve;
- if (options.showInput) resolve = {
- value: vm.inputValue,
- action
- };
- else resolve = action;
- if (options.callback) options.callback(resolve, instance.proxy);
- else if (action === "cancel" || action === "close") if (options.distinguishCancelAndClose && action !== "cancel") currentMsg.reject("close");
- else currentMsg.reject("cancel");
- else currentMsg.resolve(resolve);
- };
- const instance = initInstance(options, container, appContext);
- const vm = instance.proxy;
- for (const prop in options) if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) if (prop === "closeIcon" && isObject$2(options[prop])) vm[prop] = markRaw(options[prop]);
- else vm[prop] = options[prop];
- vm.visible = true;
- return vm;
- };
- function MessageBox(options, appContext = null) {
- if (!isClient) return Promise.reject();
- let callback;
- if (isString(options) || isVNode(options)) options = { message: options };
- else callback = options.callback;
- return new Promise((resolve, reject) => {
- const vm = showMessage(options, appContext ?? MessageBox._context);
- messageInstance.set(vm, {
- options,
- callback,
- resolve,
- reject
- });
- });
- }
- var MESSAGE_BOX_VARIANTS = [
- "alert",
- "confirm",
- "prompt"
- ];
- var MESSAGE_BOX_DEFAULT_OPTS = {
- alert: {
- closeOnPressEscape: false,
- closeOnClickModal: false
- },
- confirm: { showCancelButton: true },
- prompt: {
- showCancelButton: true,
- showInput: true
- }
- };
- MESSAGE_BOX_VARIANTS.forEach((boxType) => {
- MessageBox[boxType] = messageBoxFactory(boxType);
- });
- function messageBoxFactory(boxType) {
- return (message, title, options, appContext) => {
- let titleOrOpts = "";
- if (isObject$2(title)) {
- options = title;
- titleOrOpts = "";
- } else if (isUndefined(title)) titleOrOpts = "";
- else titleOrOpts = title;
- return MessageBox(Object.assign({
- title: titleOrOpts,
- message,
- type: "",
- ...MESSAGE_BOX_DEFAULT_OPTS[boxType]
- }, options, { boxType }), appContext);
- };
- }
- MessageBox.close = () => {
- messageInstance.forEach((_, vm) => {
- vm.doClose();
- });
- messageInstance.clear();
- };
- MessageBox._context = null;
- //#endregion
- //#region node_modules/element-plus/es/components/message-box/index.mjs
- var _MessageBox = MessageBox;
- _MessageBox.install = (app) => {
- _MessageBox._context = app._context;
- app.config.globalProperties.$msgbox = _MessageBox;
- app.config.globalProperties.$messageBox = _MessageBox;
- app.config.globalProperties.$alert = _MessageBox.alert;
- app.config.globalProperties.$confirm = _MessageBox.confirm;
- app.config.globalProperties.$prompt = _MessageBox.prompt;
- };
- var ElMessageBox = _MessageBox;
- //#endregion
- //#region node_modules/element-plus/es/components/notification/src/notification.mjs
- var notificationTypes = [
- "primary",
- "success",
- "info",
- "warning",
- "error"
- ];
- /**
- * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.
- */
- var notificationProps = buildProps({
- customClass: {
- type: String,
- default: ""
- },
- dangerouslyUseHTMLString: Boolean,
- duration: {
- type: Number,
- default: 4500
- },
- icon: { type: iconPropType },
- id: {
- type: String,
- default: ""
- },
- message: {
- type: definePropType([
- String,
- Object,
- Function
- ]),
- default: ""
- },
- offset: {
- type: Number,
- default: 0
- },
- onClick: {
- type: definePropType(Function),
- default: () => void 0
- },
- onClose: {
- type: definePropType(Function),
- required: true
- },
- position: {
- type: String,
- values: [
- "top-right",
- "top-left",
- "bottom-right",
- "bottom-left"
- ],
- default: "top-right"
- },
- showClose: {
- type: Boolean,
- default: true
- },
- title: {
- type: String,
- default: ""
- },
- type: {
- type: String,
- values: [...notificationTypes, ""],
- default: ""
- },
- zIndex: Number,
- closeIcon: {
- type: iconPropType,
- default: close_default
- }
- });
- var notificationEmits = { destroy: () => true };
- //#endregion
- //#region node_modules/element-plus/es/components/notification/src/notification.vue_vue_type_script_setup_true_lang.mjs
- var _hoisted_1 = ["id"];
- var _hoisted_2 = ["textContent"];
- var _hoisted_3 = { key: 0 };
- var _hoisted_4 = ["innerHTML"];
- //#endregion
- //#region node_modules/element-plus/es/components/notification/src/notification2.mjs
- var notification_default = /* @__PURE__ */ defineComponent({
- name: "ElNotification",
- __name: "notification",
- props: notificationProps,
- emits: notificationEmits,
- setup(__props, { expose: __expose }) {
- const props = __props;
- const { ns, zIndex } = useGlobalComponentSettings("notification");
- const { nextZIndex, currentZIndex } = zIndex;
- const visible = ref(false);
- let timer = void 0;
- const typeClass = computed(() => {
- const type = props.type;
- return type && TypeComponentsMap[props.type] ? ns.m(type) : "";
- });
- const iconComponent = computed(() => {
- if (!props.type) return props.icon;
- return TypeComponentsMap[props.type] || props.icon;
- });
- const horizontalClass = computed(() => props.position.endsWith("right") ? "right" : "left");
- const verticalProperty = computed(() => props.position.startsWith("top") ? "top" : "bottom");
- const positionStyle = computed(() => {
- return {
- [verticalProperty.value]: `${props.offset}px`,
- zIndex: props.zIndex ?? currentZIndex.value
- };
- });
- function startTimer() {
- if (props.duration > 0) ({stop: timer} = useTimeoutFn(() => {
- if (visible.value) close();
- }, props.duration));
- }
- function clearTimer() {
- timer?.();
- }
- function close() {
- visible.value = false;
- }
- function onKeydown(event) {
- switch (getEventCode(event)) {
- case EVENT_CODE.delete:
- case EVENT_CODE.backspace:
- clearTimer();
- break;
- case EVENT_CODE.esc:
- if (visible.value) close();
- break;
- default:
- startTimer();
- break;
- }
- }
- onMounted(() => {
- startTimer();
- nextZIndex();
- visible.value = true;
- });
- useEventListener(document, "keydown", onKeydown);
- __expose({
- visible,
- close
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(Transition, {
- name: unref(ns).b("fade"),
- onBeforeLeave: __props.onClose,
- onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
- persisted: ""
- }, {
- default: withCtx(() => [withDirectives(createBaseVNode("div", {
- id: __props.id,
- class: normalizeClass([
- unref(ns).b(),
- __props.customClass,
- horizontalClass.value
- ]),
- style: normalizeStyle(positionStyle.value),
- role: "alert",
- onMouseenter: clearTimer,
- onMouseleave: startTimer,
- onClick: _cache[0] || (_cache[0] = (...args) => __props.onClick && __props.onClick(...args))
- }, [iconComponent.value ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass([unref(ns).e("icon"), typeClass.value])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(iconComponent.value)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true), createBaseVNode("div", { class: normalizeClass(unref(ns).e("group")) }, [
- createBaseVNode("h2", {
- class: normalizeClass(unref(ns).e("title")),
- textContent: toDisplayString(__props.title)
- }, null, 10, _hoisted_2),
- withDirectives(createBaseVNode("div", {
- class: normalizeClass(unref(ns).e("content")),
- style: normalizeStyle(!!__props.title ? void 0 : { margin: 0 })
- }, [renderSlot(_ctx.$slots, "default", {}, () => [!__props.dangerouslyUseHTMLString ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(__props.message), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "), createBaseVNode("p", { innerHTML: __props.message }, null, 8, _hoisted_4)], 2112))])], 6), [[vShow, __props.message]]),
- __props.showClose ? (openBlock(), createBlock(unref(ElIcon), {
- key: 0,
- class: normalizeClass(unref(ns).e("closeBtn")),
- onClick: withModifiers(close, ["stop"])
- }, {
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.closeIcon)))]),
- _: 1
- }, 8, ["class"])) : createCommentVNode("v-if", true)
- ], 2)], 46, _hoisted_1), [[vShow, visible.value]])]),
- _: 3
- }, 8, ["name", "onBeforeLeave"]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/notification/src/notify.mjs
- var notifications = {
- "top-left": [],
- "top-right": [],
- "bottom-left": [],
- "bottom-right": []
- };
- var GAP_SIZE = 16;
- var seed = 1;
- var notify = function(options = {}, context) {
- if (!isClient) return { close: () => void 0 };
- if (isString(options) || isVNode(options)) options = { message: options };
- const position = options.position || "top-right";
- let verticalOffset = options.offset || 0;
- notifications[position].forEach(({ vm }) => {
- verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE;
- });
- verticalOffset += GAP_SIZE;
- const id = `notification_${seed++}`;
- const userOnClose = options.onClose;
- const props = {
- ...options,
- offset: verticalOffset,
- id,
- onClose: () => {
- close(id, position, userOnClose);
- }
- };
- let appendTo = document.body;
- if (isElement$1(options.appendTo)) appendTo = options.appendTo;
- else if (isString(options.appendTo)) appendTo = document.querySelector(options.appendTo);
- if (!isElement$1(appendTo)) {
- debugWarn("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body.");
- appendTo = document.body;
- }
- const container = document.createElement("div");
- const vm = createVNode(notification_default, props, isFunction$1(props.message) ? props.message : isVNode(props.message) ? () => props.message : null);
- vm.appContext = isUndefined(context) ? notify._context : context;
- vm.props.onDestroy = () => {
- render(null, container);
- };
- render(vm, container);
- notifications[position].push({ vm });
- appendTo.appendChild(container.firstElementChild);
- return { close: () => {
- vm.component.exposed.visible.value = false;
- } };
- };
- notificationTypes.forEach((type) => {
- notify[type] = (options = {}, appContext) => {
- if (isString(options) || isVNode(options)) options = { message: options };
- return notify({
- ...options,
- type
- }, appContext);
- };
- });
- /**
- * This function gets called when user click `x` button or press `esc` or the time reached its limitation.
- * Emitted by transition@before-leave event so that we can fetch the current notification.offsetHeight, if this was called
- * by @after-leave the DOM element will be removed from the page thus we can no longer fetch the offsetHeight.
- * @param {String} id notification id to be closed
- * @param {Position} position the positioning strategy
- * @param {Function} userOnClose the callback called when close passed by user
- */
- function close(id, position, userOnClose) {
- const orientedNotifications = notifications[position];
- const idx = orientedNotifications.findIndex(({ vm }) => vm.component?.props.id === id);
- if (idx === -1) return;
- const { vm } = orientedNotifications[idx];
- if (!vm) return;
- userOnClose?.(vm);
- const removedHeight = vm.el.offsetHeight;
- const verticalPos = position.split("-")[0];
- orientedNotifications.splice(idx, 1);
- const len = orientedNotifications.length;
- if (len < 1) return;
- for (let i = idx; i < len; i++) {
- const { el, component } = orientedNotifications[i].vm;
- const pos = Number.parseInt(el.style[verticalPos], 10) - removedHeight - GAP_SIZE;
- component.props.offset = pos;
- }
- }
- function closeAll() {
- for (const orientedNotifications of Object.values(notifications)) orientedNotifications.forEach(({ vm }) => {
- vm.component.exposed.visible.value = false;
- });
- }
- function updateOffsets(position = "top-right") {
- let verticalOffset = notifications[position][0]?.vm.component?.props?.offset || 0;
- for (const { vm } of notifications[position]) {
- vm.component.props.offset = verticalOffset;
- verticalOffset += (vm.el?.offsetHeight || 0) + GAP_SIZE;
- }
- }
- notify.closeAll = closeAll;
- notify.updateOffsets = updateOffsets;
- notify._context = null;
- //#endregion
- //#region node_modules/element-plus/es/components/notification/index.mjs
- var ElNotification = withInstallFunction(notify, "$notify");
- //#endregion
- //#region node_modules/element-plus/es/components/popover/src/popover.mjs
- /**
- * @deprecated Removed after 3.0.0, Use `PopoverProps` instead.
- */
- var popoverProps = buildProps({
- trigger: useTooltipTriggerProps.trigger,
- triggerKeys: useTooltipTriggerProps.triggerKeys,
- placement: dropdownProps.placement,
- disabled: useTooltipTriggerProps.disabled,
- visible: useTooltipContentProps.visible,
- transition: useTooltipContentProps.transition,
- popperOptions: dropdownProps.popperOptions,
- tabindex: dropdownProps.tabindex,
- content: useTooltipContentProps.content,
- popperStyle: useTooltipContentProps.popperStyle,
- popperClass: useTooltipContentProps.popperClass,
- enterable: {
- ...useTooltipContentProps.enterable,
- default: true
- },
- effect: {
- ...useTooltipContentProps.effect,
- default: "light"
- },
- teleported: useTooltipContentProps.teleported,
- appendTo: useTooltipContentProps.appendTo,
- title: String,
- width: {
- type: [String, Number],
- default: 150
- },
- offset: {
- type: Number,
- default: void 0
- },
- showAfter: {
- type: Number,
- default: 0
- },
- hideAfter: {
- type: Number,
- default: 200
- },
- autoClose: {
- type: Number,
- default: 0
- },
- showArrow: {
- type: Boolean,
- default: true
- },
- persistent: {
- type: Boolean,
- default: true
- },
- "onUpdate:visible": { type: Function }
- });
- var popoverEmits = {
- "update:visible": (value) => isBoolean(value),
- "before-enter": () => true,
- "before-leave": () => true,
- "after-enter": () => true,
- "after-leave": () => true
- };
- /**
- * @description default values for PopoverProps
- */
- var popoverPropsDefaults = {
- trigger: "hover",
- triggerKeys: () => [
- EVENT_CODE.enter,
- EVENT_CODE.numpadEnter,
- EVENT_CODE.space
- ],
- placement: "bottom",
- visible: null,
- popperOptions: () => ({}),
- tabindex: 0,
- content: "",
- popperStyle: void 0,
- enterable: true,
- effect: "light",
- teleported: true,
- width: 150,
- offset: void 0,
- showAfter: 0,
- hideAfter: 200,
- autoClose: 0,
- showArrow: true,
- persistent: true
- };
- //#endregion
- //#region node_modules/element-plus/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs
- var updateEventKeyRaw = `onUpdate:visible`;
- //#endregion
- //#region node_modules/element-plus/es/components/popover/src/popover2.mjs
- var popover_default = /* @__PURE__ */ defineComponent({
- name: "ElPopover",
- __name: "popover",
- props: popoverProps,
- emits: popoverEmits,
- setup(__props, { expose: __expose, emit: __emit }) {
- const props = __props;
- const emit = __emit;
- const onUpdateVisible = computed(() => {
- return props[updateEventKeyRaw];
- });
- const ns = useNamespace("popover");
- const tooltipRef = ref();
- const popperRef = computed(() => {
- return unref(tooltipRef)?.popperRef;
- });
- const style = computed(() => {
- return [{ width: addUnit(props.width) }, props.popperStyle];
- });
- const kls = computed(() => {
- return [
- ns.b(),
- props.popperClass,
- { [ns.m("plain")]: !!props.content }
- ];
- });
- const gpuAcceleration = computed(() => {
- return props.transition === `${ns.namespace.value}-fade-in-linear`;
- });
- const hide = () => {
- tooltipRef.value?.hide();
- };
- const beforeEnter = () => {
- emit("before-enter");
- };
- const beforeLeave = () => {
- emit("before-leave");
- };
- const afterEnter = () => {
- emit("after-enter");
- };
- const afterLeave = () => {
- emit("update:visible", false);
- emit("after-leave");
- };
- __expose({
- popperRef,
- hide
- });
- return (_ctx, _cache) => {
- return openBlock(), createBlock(unref(ElTooltip), mergeProps({
- ref_key: "tooltipRef",
- ref: tooltipRef
- }, _ctx.$attrs, {
- trigger: __props.trigger,
- "trigger-keys": __props.triggerKeys,
- placement: __props.placement,
- disabled: __props.disabled,
- visible: __props.visible,
- transition: __props.transition,
- "popper-options": __props.popperOptions,
- tabindex: __props.tabindex,
- content: __props.content,
- offset: __props.offset,
- "show-after": __props.showAfter,
- "hide-after": __props.hideAfter,
- "auto-close": __props.autoClose,
- "show-arrow": __props.showArrow,
- "aria-label": __props.title,
- effect: __props.effect,
- enterable: __props.enterable,
- "popper-class": kls.value,
- "popper-style": style.value,
- teleported: __props.teleported,
- "append-to": __props.appendTo,
- persistent: __props.persistent,
- "gpu-acceleration": gpuAcceleration.value,
- "onUpdate:visible": onUpdateVisible.value,
- onBeforeShow: beforeEnter,
- onBeforeHide: beforeLeave,
- onShow: afterEnter,
- onHide: afterLeave
- }), {
- content: withCtx(() => [__props.title ? (openBlock(), createElementBlock("div", {
- key: 0,
- class: normalizeClass(unref(ns).e("title")),
- role: "title"
- }, toDisplayString(__props.title), 3)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default", { hide }, () => [createTextVNode(toDisplayString(__props.content), 1)])]),
- default: withCtx(() => [_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)]),
- _: 3
- }, 16, [
- "trigger",
- "trigger-keys",
- "placement",
- "disabled",
- "visible",
- "transition",
- "popper-options",
- "tabindex",
- "content",
- "offset",
- "show-after",
- "hide-after",
- "auto-close",
- "show-arrow",
- "aria-label",
- "effect",
- "enterable",
- "popper-class",
- "popper-style",
- "teleported",
- "append-to",
- "persistent",
- "gpu-acceleration",
- "onUpdate:visible"
- ]);
- };
- }
- });
- //#endregion
- //#region node_modules/element-plus/es/components/popover/src/directive.mjs
- var attachEvents = (el, binding) => {
- const popover = (binding.arg || binding.value)?.popperRef;
- if (popover) popover.triggerRef = el;
- };
- //#endregion
- //#region node_modules/element-plus/es/components/popover/index.mjs
- var ElPopoverDirective = withInstallDirective({
- mounted(el, binding) {
- attachEvents(el, binding);
- },
- updated(el, binding) {
- attachEvents(el, binding);
- }
- }, "popover");
- var ElPopover = withInstall(popover_default, { directive: ElPopoverDirective });
- //#endregion
- //#region node_modules/element-plus/es/version.mjs
- var version$1 = "2.13.5";
- //#endregion
- //#region node_modules/element-plus/es/make-installer.mjs
- var makeInstaller = (components = []) => {
- const install = (app, options) => {
- if (app[INSTALLED_KEY]) return;
- app[INSTALLED_KEY] = true;
- components.forEach((c) => app.use(c));
- if (options) provideGlobalConfig(options, app, true);
- };
- return {
- version: version$1,
- install
- };
- };
- //#endregion
- //#region node_modules/element-plus/es/component.mjs
- var component_default = [
- ElAffix,
- ElAlert,
- ElAutocomplete,
- ElAutoResizer,
- ElAvatar,
- ElAvatarGroup,
- ElBacktop,
- ElBadge,
- ElBreadcrumb,
- ElBreadcrumbItem,
- ElButton,
- ElButtonGroup,
- ElCalendar,
- ElCard,
- ElCarousel,
- ElCarouselItem,
- ElCascader,
- ElCascaderPanel,
- ElCheckTag,
- ElCheckbox,
- ElCheckboxButton,
- ElCheckboxGroup,
- ElCol,
- ElCollapse,
- ElCollapseItem,
- ElCollapseTransition,
- ElColorPickerPanel,
- ElColorPicker,
- ElConfigProvider,
- ElContainer,
- ElAside,
- ElFooter,
- ElHeader,
- ElMain,
- ElDatePicker,
- ElDatePickerPanel,
- ElDescriptions,
- ElDescriptionsItem,
- ElDialog,
- ElDivider,
- ElDrawer,
- ElDropdown,
- ElDropdownItem,
- ElDropdownMenu,
- ElEmpty,
- ElForm,
- ElFormItem,
- ElIcon,
- ElImage,
- ElImageViewer,
- ElInput,
- ElInputNumber,
- ElInputTag,
- ElLink,
- ElMenu,
- ElMenuItem,
- ElMenuItemGroup,
- ElSubMenu,
- ElPageHeader,
- ElPagination,
- ElPopconfirm,
- ElPopover,
- ElPopper,
- ElProgress,
- ElRadio,
- ElRadioButton,
- ElRadioGroup,
- ElRate,
- ElResult,
- ElRow,
- ElScrollbar,
- ElSelect,
- ElOption,
- ElOptionGroup,
- ElSelectV2,
- ElSkeleton,
- ElSkeletonItem,
- ElSlider,
- ElSpace,
- ElStatistic,
- ElCountdown,
- ElSteps,
- ElStep,
- ElSwitch,
- ElTable,
- ElTableColumn,
- ElTableV2,
- ElTabs,
- ElTabPane,
- ElTag,
- ElText,
- ElTimePicker,
- ElTimeSelect,
- ElTimeline,
- ElTimelineItem,
- ElTooltip,
- ElTransfer,
- ElTree,
- ElTreeSelect,
- ElTreeV2,
- ElUpload,
- ElWatermark,
- ElTour,
- ElTourStep,
- ElAnchor,
- ElAnchorLink,
- ElSegmented,
- ElMention,
- ElSplitter,
- ElSplitterPanel
- ];
- //#endregion
- //#region node_modules/element-plus/es/plugin.mjs
- var plugin_default = [
- ElInfiniteScroll,
- ElLoading,
- ElMessage,
- ElMessageBox,
- ElNotification,
- ElPopoverDirective
- ];
- //#endregion
- //#region node_modules/element-plus/es/defaults.mjs
- var defaults_default = makeInstaller([...component_default, ...plugin_default]);
- //#endregion
- //#region node_modules/element-plus/es/index.mjs
- var install = defaults_default.install;
- var version = defaults_default.version;
- var element_plus_default = defaults_default;
- //#endregion
- var dayjs = import_dayjs_min.default;
- export { BAR_MAP, BORDER_HORIZONTAL_WIDTH, CAROUSEL_ITEM_NAME, CASCADER_PANEL_INJECTION_KEY, CHANGE_EVENT, ClickOutside, picker_default as CommonPicker, CommonProps, DEFAULT_DIALOG_TRANSITION, DEFAULT_EMPTY_VALUES, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_STEP, DEFAULT_VALUE_ON_CLEAR, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DefaultProps, DynamicSizeGrid, DynamicSizeList, EVENT_CODE, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElAvatarGroup, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElColorPickerPanel, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDatePickerPanel, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputTag, ElLink, ElLoading, vLoading as ElLoadingDirective, vLoading, Loading as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, arrow_default as ElPopperArrow, content_default as ElPopperContent, trigger_default as ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, FIRST_KEYS, FIRST_LAST_KEYS, FORWARD_REF_INJECTION_KEY, FixedSizeGrid, FixedSizeList, GAP, ID_INJECTION_KEY, INPUT_EVENT, INSTALLED_KEY, IconComponentMap, IconMap, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, MENU_INJECTION_KEY, MESSAGE_DEFAULT_PLACEMENT, MINIMUM_INPUT_WIDTH, Mousewheel, NODE_INSTANCE_INJECTION_KEY, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, RIGHT_CHECK_CHANGE_EVENT, ROOT_COMMON_COLOR_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, RowAlign, RowJustify, SCOPE, SIZE_INJECTION_KEY, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TableV2, Alignment as TableV2Alignment, FixedDir as TableV2FixedDir, placeholderSign as TableV2Placeholder, SortOrder as TableV2SortOrder, panel_time_pick_default as TimePickPanel, TrapFocus, UPDATE_MODEL_EVENT, WEEK_DAYS, ZINDEX_INJECTION_KEY, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, ariaProps, arrowMiddleware, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarGroupContextKey, avatarGroupProps, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildLocaleContext, buildTimeList, buildTranslator, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxDefaultProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, checkboxPropsDefaults, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerEmits, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps, colorPickerProps, colorPickerPropsDefaults, columnAlignment, componentSizeMap, componentSizes, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, createModelToggleComposable, dateEquals, datePickTypes, datePickerPanelProps, datePickerProps, dayOrDaysToDate, dayjs, element_plus_default as default, defaultInitialZIndex, defaultNamespace, defaultProps, descriptionItemProps, descriptionProps, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, emptyValuesContextKey, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, getPositionDataWithUnit, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, inputPropsDefaults, inputTagEmits, inputTagProps, install, linkEmits, linkProps, localeContextKey, makeInstaller, makeList, mentionDefaultProps, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messagePlacement, messageProps, messageTypes, namespaceContextKey, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popoverPropsDefaults, popperArrowProps, popperArrowPropsDefaults, popperContentEmits, popperContentProps, popperContentPropsDefaults, popperCoreConfigProps, popperCoreConfigPropsDefaults, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioButtonPropsDefaults, radioDefaultProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioGroupPropsDefaults, radioProps, radioPropsBase, radioPropsDefaults, rangeArr, rateEmits, rateProps, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits, timelineItemProps, timelineProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, translate, treeEmits, treeProps, uploadBaseProps, uploadBasePropsDefaults, uploadContentProps, uploadContentPropsDefaults, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, uploadPropsDefaults, useAriaProps, useAttrs, useCalcInputWidth, useCascaderConfig, useComposition, useCursor, useDelayedRender, useDelayedToggle, useDelayedToggleProps, useDelayedTogglePropsDefaults, useDeprecated, useDialog, useDisabled, useDraggable, useEmptyValues, useEmptyValuesProps, useEscapeKeydown, useFloating, useFloatingProps, useFocus, useFocusController, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useForwardRef, useForwardRefDirective, useGetDerivedNamespace, useGlobalComponentSettings, useGlobalConfig, useGlobalSize, useId, useIdInjection, useLocale, useLockscreen, useModal, useModelToggle, useModelToggleEmits, useModelToggleProps, useNamespace, useOrderedChildren, usePopper, usePopperArrowProps, usePopperContainer, usePopperContainerId, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, usePreventGlobal, useProp, useSameTarget, useSize, useSizeProp, useSizeProps, useSpace, useTeleport, useThrottleRender, useTimeout, useTooltipContentProps, useTooltipContentPropsDefaults, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTooltipTriggerPropsDefaults, useTransitionFallthrough, useTransitionFallthroughEmits, useZIndex, vRepeatClick, valueEquals, version, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps, zIndexContextKey };
- //# sourceMappingURL=element-plus.js.map
|