Table.js 169 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926
  1. import { a$ as $n, aD as ft, d as g, P as ie, c as te, b0 as wn, b1 as pl, b2 as ml, b3 as Ut, b4 as lt, b5 as vl, p as Pt, q as Gt, b6 as hl, _ as G, g as In, m as Pn, b7 as gl, r as Dt, b8 as xl, b9 as Jt, ba as bl, bb as yl, u as Kt, ar as En, ak as Tn, bc as Cl, a3 as Be, j as qe, a4 as se, a1 as De, a2 as Ke, M as qt, L as Yt, bd as Qt, be as Zt, b as Sl, bf as $l, bg as wl, bh as Il, bi as Pl, bj as El, n as ze, bk as Ft, am as Rn, ac as Tl, h as Te, s as Rl, a as We, w as rt, R as On, bl as en, bm as tn, bn as Ol, x as Ve, bo as nn, bp as Nl, a0 as Bl, bq as zl, z as kl, aG as pt, aQ as Nn, br as _l, bs as mt, aS as Dl, bt as Kl, bu as Fl, a9 as Al, K as Bn, f as Ye, bv as Ml, bw as Hl, bx as jl, U as ln, by as Ll, V as on, t as Wl, ai as ot, ag as Vl, i as zn, al as Xl, o as Ul, aw as Gl } from "./index2.js";
  2. import { defineComponent as ue, createVNode as u, ref as pe, computed as C, createTextVNode as At, toRef as xe, provide as Me, inject as He, shallowRef as ce, onMounted as et, watch as Fe, isVNode as ut, Text as Jl, onUnmounted as ql, watchEffect as Re, getCurrentInstance as Yl, Fragment as Xe, onBeforeUnmount as tt, reactive as Qe, onActivated as Ql, nextTick as at, toRefs as $t, onUpdated as Zl } from "vue";
  3. import { c as eo, u as to, a as wt, b as no, d as lo } from "./useMaxLevel.js";
  4. import { R as kn } from "./index9.js";
  5. import { T as oo } from "./index10.js";
  6. import { s as ro } from "./scrollTo.js";
  7. const ao = (e) => ({
  8. // FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
  9. // And Typography use this to generate link style which should not do this.
  10. color: e.colorLink,
  11. textDecoration: "none",
  12. outline: "none",
  13. cursor: "pointer",
  14. transition: `color ${e.motionDurationSlow}`,
  15. "&:focus, &:hover": {
  16. color: e.colorLinkHover
  17. },
  18. "&:active": {
  19. color: e.colorLinkActive
  20. }
  21. });
  22. function io(e) {
  23. for (var t = -1, l = e == null ? 0 : e.length, n = {}; ++t < l; ) {
  24. var o = e[t];
  25. n[o[0]] = o[1];
  26. }
  27. return n;
  28. }
  29. const so = ue({
  30. name: "MiniSelect",
  31. compatConfig: {
  32. MODE: 3
  33. },
  34. inheritAttrs: !1,
  35. props: $n(),
  36. Option: ft.Option,
  37. setup(e, t) {
  38. let {
  39. attrs: l,
  40. slots: n
  41. } = t;
  42. return () => {
  43. const o = g(g(g({}, e), {
  44. size: "small"
  45. }), l);
  46. return u(ft, o, n);
  47. };
  48. }
  49. }), co = ue({
  50. name: "MiddleSelect",
  51. inheritAttrs: !1,
  52. props: $n(),
  53. Option: ft.Option,
  54. setup(e, t) {
  55. let {
  56. attrs: l,
  57. slots: n
  58. } = t;
  59. return () => {
  60. const o = g(g(g({}, e), {
  61. size: "middle"
  62. }), l);
  63. return u(ft, o, n);
  64. };
  65. }
  66. }), je = ue({
  67. compatConfig: {
  68. MODE: 3
  69. },
  70. name: "Pager",
  71. inheritAttrs: !1,
  72. props: {
  73. rootPrefixCls: String,
  74. page: Number,
  75. active: {
  76. type: Boolean,
  77. default: void 0
  78. },
  79. last: {
  80. type: Boolean,
  81. default: void 0
  82. },
  83. locale: ie.object,
  84. showTitle: {
  85. type: Boolean,
  86. default: void 0
  87. },
  88. itemRender: {
  89. type: Function,
  90. default: () => {
  91. }
  92. },
  93. onClick: {
  94. type: Function
  95. },
  96. onKeypress: {
  97. type: Function
  98. }
  99. },
  100. eimt: ["click", "keypress"],
  101. setup(e, t) {
  102. let {
  103. emit: l,
  104. attrs: n
  105. } = t;
  106. const o = () => {
  107. l("click", e.page);
  108. }, r = (a) => {
  109. l("keypress", a, o, e.page);
  110. };
  111. return () => {
  112. const {
  113. showTitle: a,
  114. page: i,
  115. itemRender: s
  116. } = e, {
  117. class: p,
  118. style: c
  119. } = n, f = `${e.rootPrefixCls}-item`, x = te(f, `${f}-${e.page}`, {
  120. [`${f}-active`]: e.active,
  121. [`${f}-disabled`]: !e.page
  122. }, p);
  123. return u("li", {
  124. onClick: o,
  125. onKeypress: r,
  126. title: a ? String(i) : null,
  127. tabindex: "0",
  128. class: x,
  129. style: c
  130. }, [s({
  131. page: i,
  132. type: "page",
  133. originalElement: u("a", {
  134. rel: "nofollow"
  135. }, [i])
  136. })]);
  137. };
  138. }
  139. }), Le = {
  140. ZERO: 48,
  141. NINE: 57,
  142. NUMPAD_ZERO: 96,
  143. NUMPAD_NINE: 105,
  144. BACKSPACE: 8,
  145. DELETE: 46,
  146. ENTER: 13,
  147. ARROW_UP: 38,
  148. ARROW_DOWN: 40
  149. }, uo = ue({
  150. compatConfig: {
  151. MODE: 3
  152. },
  153. props: {
  154. disabled: {
  155. type: Boolean,
  156. default: void 0
  157. },
  158. changeSize: Function,
  159. quickGo: Function,
  160. selectComponentClass: ie.any,
  161. current: Number,
  162. pageSizeOptions: ie.array.def(["10", "20", "50", "100"]),
  163. pageSize: Number,
  164. buildOptionText: Function,
  165. locale: ie.object,
  166. rootPrefixCls: String,
  167. selectPrefixCls: String,
  168. goButton: ie.any
  169. },
  170. setup(e) {
  171. const t = pe(""), l = C(() => !t.value || isNaN(t.value) ? void 0 : Number(t.value)), n = (s) => `${s.value} ${e.locale.items_per_page}`, o = (s) => {
  172. const {
  173. value: p
  174. } = s.target;
  175. t.value !== p && (t.value = p);
  176. }, r = (s) => {
  177. const {
  178. goButton: p,
  179. quickGo: c,
  180. rootPrefixCls: f
  181. } = e;
  182. if (!(p || t.value === ""))
  183. if (s.relatedTarget && (s.relatedTarget.className.indexOf(`${f}-item-link`) >= 0 || s.relatedTarget.className.indexOf(`${f}-item`) >= 0)) {
  184. t.value = "";
  185. return;
  186. } else
  187. c(l.value), t.value = "";
  188. }, a = (s) => {
  189. t.value !== "" && (s.keyCode === Le.ENTER || s.type === "click") && (e.quickGo(l.value), t.value = "");
  190. }, i = C(() => {
  191. const {
  192. pageSize: s,
  193. pageSizeOptions: p
  194. } = e;
  195. return p.some((c) => c.toString() === s.toString()) ? p : p.concat([s.toString()]).sort((c, f) => {
  196. const x = isNaN(Number(c)) ? 0 : Number(c), $ = isNaN(Number(f)) ? 0 : Number(f);
  197. return x - $;
  198. });
  199. });
  200. return () => {
  201. const {
  202. rootPrefixCls: s,
  203. locale: p,
  204. changeSize: c,
  205. quickGo: f,
  206. goButton: x,
  207. selectComponentClass: $,
  208. selectPrefixCls: b,
  209. pageSize: m,
  210. disabled: v
  211. } = e, h = `${s}-options`;
  212. let y = null, d = null, E = null;
  213. if (!c && !f)
  214. return null;
  215. if (c && $) {
  216. const O = e.buildOptionText || n, z = i.value.map((S, H) => u($.Option, {
  217. key: H,
  218. value: S
  219. }, {
  220. default: () => [O({
  221. value: S
  222. })]
  223. }));
  224. y = u($, {
  225. disabled: v,
  226. prefixCls: b,
  227. showSearch: !1,
  228. class: `${h}-size-changer`,
  229. optionLabelProp: "children",
  230. value: (m || i.value[0]).toString(),
  231. onChange: (S) => c(Number(S)),
  232. getPopupContainer: (S) => S.parentNode
  233. }, {
  234. default: () => [z]
  235. });
  236. }
  237. return f && (x && (E = typeof x == "boolean" ? u("button", {
  238. type: "button",
  239. onClick: a,
  240. onKeyup: a,
  241. disabled: v,
  242. class: `${h}-quick-jumper-button`
  243. }, [p.jump_to_confirm]) : u("span", {
  244. onClick: a,
  245. onKeyup: a
  246. }, [x])), d = u("div", {
  247. class: `${h}-quick-jumper`
  248. }, [p.jump_to, u(wn, {
  249. disabled: v,
  250. type: "text",
  251. value: t.value,
  252. onInput: o,
  253. onChange: o,
  254. onKeyup: a,
  255. onBlur: r
  256. }, null), p.page, E])), u("li", {
  257. class: `${h}`
  258. }, [y, d]);
  259. };
  260. }
  261. });
  262. var fo = function(e, t) {
  263. var l = {};
  264. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  265. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  266. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  267. return l;
  268. };
  269. function po(e) {
  270. return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
  271. }
  272. function mo(e) {
  273. let {
  274. originalElement: t
  275. } = e;
  276. return t;
  277. }
  278. function ke(e, t, l) {
  279. const n = typeof e == "undefined" ? t.statePageSize : e;
  280. return Math.floor((l.total - 1) / n) + 1;
  281. }
  282. const vo = ue({
  283. compatConfig: {
  284. MODE: 3
  285. },
  286. name: "Pagination",
  287. mixins: [pl],
  288. inheritAttrs: !1,
  289. props: {
  290. disabled: {
  291. type: Boolean,
  292. default: void 0
  293. },
  294. prefixCls: ie.string.def("rc-pagination"),
  295. selectPrefixCls: ie.string.def("rc-select"),
  296. current: Number,
  297. defaultCurrent: ie.number.def(1),
  298. total: ie.number.def(0),
  299. pageSize: Number,
  300. defaultPageSize: ie.number.def(10),
  301. hideOnSinglePage: {
  302. type: Boolean,
  303. default: !1
  304. },
  305. showSizeChanger: {
  306. type: Boolean,
  307. default: void 0
  308. },
  309. showLessItems: {
  310. type: Boolean,
  311. default: !1
  312. },
  313. // showSizeChange: PropTypes.func.def(noop),
  314. selectComponentClass: ie.any,
  315. showPrevNextJumpers: {
  316. type: Boolean,
  317. default: !0
  318. },
  319. showQuickJumper: ie.oneOfType([ie.looseBool, ie.object]).def(!1),
  320. showTitle: {
  321. type: Boolean,
  322. default: !0
  323. },
  324. pageSizeOptions: ie.arrayOf(ie.oneOfType([ie.number, ie.string])),
  325. buildOptionText: Function,
  326. showTotal: Function,
  327. simple: {
  328. type: Boolean,
  329. default: void 0
  330. },
  331. locale: ie.object.def(ml),
  332. itemRender: ie.func.def(mo),
  333. prevIcon: ie.any,
  334. nextIcon: ie.any,
  335. jumpPrevIcon: ie.any,
  336. jumpNextIcon: ie.any,
  337. totalBoundaryShowSizeChanger: ie.number.def(50)
  338. },
  339. data() {
  340. const e = this.$props;
  341. let t = Ut([this.current, this.defaultCurrent]);
  342. const l = Ut([this.pageSize, this.defaultPageSize]);
  343. return t = Math.min(t, ke(l, void 0, e)), {
  344. stateCurrent: t,
  345. stateCurrentInputValue: t,
  346. statePageSize: l
  347. };
  348. },
  349. watch: {
  350. current(e) {
  351. this.setState({
  352. stateCurrent: e,
  353. stateCurrentInputValue: e
  354. });
  355. },
  356. pageSize(e) {
  357. const t = {};
  358. let l = this.stateCurrent;
  359. const n = ke(e, this.$data, this.$props);
  360. l = l > n ? n : l, lt(this, "current") || (t.stateCurrent = l, t.stateCurrentInputValue = l), t.statePageSize = e, this.setState(t);
  361. },
  362. stateCurrent(e, t) {
  363. this.$nextTick(() => {
  364. if (this.$refs.paginationNode) {
  365. const l = this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);
  366. l && document.activeElement === l && l.blur();
  367. }
  368. });
  369. },
  370. total() {
  371. const e = {}, t = ke(this.pageSize, this.$data, this.$props);
  372. if (lt(this, "current")) {
  373. const l = Math.min(this.current, t);
  374. e.stateCurrent = l, e.stateCurrentInputValue = l;
  375. } else {
  376. let l = this.stateCurrent;
  377. l === 0 && t > 0 ? l = 1 : l = Math.min(this.stateCurrent, t), e.stateCurrent = l;
  378. }
  379. this.setState(e);
  380. }
  381. },
  382. methods: {
  383. getJumpPrevPage() {
  384. return Math.max(1, this.stateCurrent - (this.showLessItems ? 3 : 5));
  385. },
  386. getJumpNextPage() {
  387. return Math.min(ke(void 0, this.$data, this.$props), this.stateCurrent + (this.showLessItems ? 3 : 5));
  388. },
  389. getItemIcon(e, t) {
  390. const {
  391. prefixCls: l
  392. } = this.$props;
  393. return vl(this, e, this.$props) || u("button", {
  394. type: "button",
  395. "aria-label": t,
  396. class: `${l}-item-link`
  397. }, null);
  398. },
  399. getValidValue(e) {
  400. const t = e.target.value, l = ke(void 0, this.$data, this.$props), {
  401. stateCurrentInputValue: n
  402. } = this.$data;
  403. let o;
  404. return t === "" ? o = t : isNaN(Number(t)) ? o = n : t >= l ? o = l : o = Number(t), o;
  405. },
  406. isValid(e) {
  407. return po(e) && e !== this.stateCurrent;
  408. },
  409. shouldDisplayQuickJumper() {
  410. const {
  411. showQuickJumper: e,
  412. pageSize: t,
  413. total: l
  414. } = this.$props;
  415. return l <= t ? !1 : e;
  416. },
  417. // calculatePage (p) {
  418. // let pageSize = p
  419. // if (typeof pageSize === 'undefined') {
  420. // pageSize = this.statePageSize
  421. // }
  422. // return Math.floor((this.total - 1) / pageSize) + 1
  423. // },
  424. handleKeyDown(e) {
  425. (e.keyCode === Le.ARROW_UP || e.keyCode === Le.ARROW_DOWN) && e.preventDefault();
  426. },
  427. handleKeyUp(e) {
  428. const t = this.getValidValue(e), l = this.stateCurrentInputValue;
  429. t !== l && this.setState({
  430. stateCurrentInputValue: t
  431. }), e.keyCode === Le.ENTER ? this.handleChange(t) : e.keyCode === Le.ARROW_UP ? this.handleChange(t - 1) : e.keyCode === Le.ARROW_DOWN && this.handleChange(t + 1);
  432. },
  433. changePageSize(e) {
  434. let t = this.stateCurrent;
  435. const l = t, n = ke(e, this.$data, this.$props);
  436. t = t > n ? n : t, n === 0 && (t = this.stateCurrent), typeof e == "number" && (lt(this, "pageSize") || this.setState({
  437. statePageSize: e
  438. }), lt(this, "current") || this.setState({
  439. stateCurrent: t,
  440. stateCurrentInputValue: t
  441. })), this.__emit("update:pageSize", e), t !== l && this.__emit("update:current", t), this.__emit("showSizeChange", t, e), this.__emit("change", t, e);
  442. },
  443. handleChange(e) {
  444. const {
  445. disabled: t
  446. } = this.$props;
  447. let l = e;
  448. if (this.isValid(l) && !t) {
  449. const n = ke(void 0, this.$data, this.$props);
  450. return l > n ? l = n : l < 1 && (l = 1), lt(this, "current") || this.setState({
  451. stateCurrent: l,
  452. stateCurrentInputValue: l
  453. }), this.__emit("update:current", l), this.__emit("change", l, this.statePageSize), l;
  454. }
  455. return this.stateCurrent;
  456. },
  457. prev() {
  458. this.hasPrev() && this.handleChange(this.stateCurrent - 1);
  459. },
  460. next() {
  461. this.hasNext() && this.handleChange(this.stateCurrent + 1);
  462. },
  463. jumpPrev() {
  464. this.handleChange(this.getJumpPrevPage());
  465. },
  466. jumpNext() {
  467. this.handleChange(this.getJumpNextPage());
  468. },
  469. hasPrev() {
  470. return this.stateCurrent > 1;
  471. },
  472. hasNext() {
  473. return this.stateCurrent < ke(void 0, this.$data, this.$props);
  474. },
  475. getShowSizeChanger() {
  476. const {
  477. showSizeChanger: e,
  478. total: t,
  479. totalBoundaryShowSizeChanger: l
  480. } = this.$props;
  481. return typeof e != "undefined" ? e : t > l;
  482. },
  483. runIfEnter(e, t) {
  484. if (e.key === "Enter" || e.charCode === 13) {
  485. e.preventDefault();
  486. for (var l = arguments.length, n = new Array(l > 2 ? l - 2 : 0), o = 2; o < l; o++)
  487. n[o - 2] = arguments[o];
  488. t(...n);
  489. }
  490. },
  491. runIfEnterPrev(e) {
  492. this.runIfEnter(e, this.prev);
  493. },
  494. runIfEnterNext(e) {
  495. this.runIfEnter(e, this.next);
  496. },
  497. runIfEnterJumpPrev(e) {
  498. this.runIfEnter(e, this.jumpPrev);
  499. },
  500. runIfEnterJumpNext(e) {
  501. this.runIfEnter(e, this.jumpNext);
  502. },
  503. handleGoTO(e) {
  504. (e.keyCode === Le.ENTER || e.type === "click") && this.handleChange(this.stateCurrentInputValue);
  505. },
  506. renderPrev(e) {
  507. const {
  508. itemRender: t
  509. } = this.$props, l = t({
  510. page: e,
  511. type: "prev",
  512. originalElement: this.getItemIcon("prevIcon", "prev page")
  513. }), n = !this.hasPrev();
  514. return Pt(l) ? Gt(l, n ? {
  515. disabled: n
  516. } : {}) : l;
  517. },
  518. renderNext(e) {
  519. const {
  520. itemRender: t
  521. } = this.$props, l = t({
  522. page: e,
  523. type: "next",
  524. originalElement: this.getItemIcon("nextIcon", "next page")
  525. }), n = !this.hasNext();
  526. return Pt(l) ? Gt(l, n ? {
  527. disabled: n
  528. } : {}) : l;
  529. }
  530. },
  531. render() {
  532. const {
  533. prefixCls: e,
  534. disabled: t,
  535. hideOnSinglePage: l,
  536. total: n,
  537. locale: o,
  538. showQuickJumper: r,
  539. showLessItems: a,
  540. showTitle: i,
  541. showTotal: s,
  542. simple: p,
  543. itemRender: c,
  544. showPrevNextJumpers: f,
  545. jumpPrevIcon: x,
  546. jumpNextIcon: $,
  547. selectComponentClass: b,
  548. selectPrefixCls: m,
  549. pageSizeOptions: v
  550. } = this.$props, {
  551. stateCurrent: h,
  552. statePageSize: y
  553. } = this, d = hl(this.$attrs).extraAttrs, {
  554. class: E
  555. } = d, O = fo(d, ["class"]);
  556. if (l === !0 && this.total <= y)
  557. return null;
  558. const z = ke(void 0, this.$data, this.$props), S = [];
  559. let H = null, T = null, R = null, k = null, B = null;
  560. const M = r && r.goButton, J = a ? 1 : 2, Z = h - 1 > 0 ? h - 1 : 0, ee = h + 1 < z ? h + 1 : z, fe = this.hasPrev(), le = this.hasNext();
  561. if (p)
  562. return M && (typeof M == "boolean" ? B = u("button", {
  563. type: "button",
  564. onClick: this.handleGoTO,
  565. onKeyup: this.handleGoTO
  566. }, [o.jump_to_confirm]) : B = u("span", {
  567. onClick: this.handleGoTO,
  568. onKeyup: this.handleGoTO
  569. }, [M]), B = u("li", {
  570. title: i ? `${o.jump_to}${h}/${z}` : null,
  571. class: `${e}-simple-pager`
  572. }, [B])), u("ul", G({
  573. class: te(`${e} ${e}-simple`, {
  574. [`${e}-disabled`]: t
  575. }, E)
  576. }, O), [u("li", {
  577. title: i ? o.prev_page : null,
  578. onClick: this.prev,
  579. tabindex: fe ? 0 : null,
  580. onKeypress: this.runIfEnterPrev,
  581. class: te(`${e}-prev`, {
  582. [`${e}-disabled`]: !fe
  583. }),
  584. "aria-disabled": !fe
  585. }, [this.renderPrev(Z)]), u("li", {
  586. title: i ? `${h}/${z}` : null,
  587. class: `${e}-simple-pager`
  588. }, [u(wn, {
  589. type: "text",
  590. value: this.stateCurrentInputValue,
  591. disabled: t,
  592. onKeydown: this.handleKeyDown,
  593. onKeyup: this.handleKeyUp,
  594. onInput: this.handleKeyUp,
  595. onChange: this.handleKeyUp,
  596. size: "3"
  597. }, null), u("span", {
  598. class: `${e}-slash`
  599. }, [At("/")]), z]), u("li", {
  600. title: i ? o.next_page : null,
  601. onClick: this.next,
  602. tabindex: le ? 0 : null,
  603. onKeypress: this.runIfEnterNext,
  604. class: te(`${e}-next`, {
  605. [`${e}-disabled`]: !le
  606. }),
  607. "aria-disabled": !le
  608. }, [this.renderNext(ee)]), B]);
  609. if (z <= 3 + J * 2) {
  610. const K = {
  611. locale: o,
  612. rootPrefixCls: e,
  613. showTitle: i,
  614. itemRender: c,
  615. onClick: this.handleChange,
  616. onKeypress: this.runIfEnter
  617. };
  618. z || S.push(u(je, G(G({}, K), {}, {
  619. key: "noPager",
  620. page: 1,
  621. class: `${e}-item-disabled`
  622. }), null));
  623. for (let N = 1; N <= z; N += 1) {
  624. const A = h === N;
  625. S.push(u(je, G(G({}, K), {}, {
  626. key: N,
  627. page: N,
  628. active: A
  629. }), null));
  630. }
  631. } else {
  632. const K = a ? o.prev_3 : o.prev_5, N = a ? o.next_3 : o.next_5;
  633. f && (H = u("li", {
  634. title: this.showTitle ? K : null,
  635. key: "prev",
  636. onClick: this.jumpPrev,
  637. tabindex: "0",
  638. onKeypress: this.runIfEnterJumpPrev,
  639. class: te(`${e}-jump-prev`, {
  640. [`${e}-jump-prev-custom-icon`]: !!x
  641. })
  642. }, [c({
  643. page: this.getJumpPrevPage(),
  644. type: "jump-prev",
  645. originalElement: this.getItemIcon("jumpPrevIcon", "prev page")
  646. })]), T = u("li", {
  647. title: this.showTitle ? N : null,
  648. key: "next",
  649. tabindex: "0",
  650. onClick: this.jumpNext,
  651. onKeypress: this.runIfEnterJumpNext,
  652. class: te(`${e}-jump-next`, {
  653. [`${e}-jump-next-custom-icon`]: !!$
  654. })
  655. }, [c({
  656. page: this.getJumpNextPage(),
  657. type: "jump-next",
  658. originalElement: this.getItemIcon("jumpNextIcon", "next page")
  659. })])), k = u(je, {
  660. locale: o,
  661. last: !0,
  662. rootPrefixCls: e,
  663. onClick: this.handleChange,
  664. onKeypress: this.runIfEnter,
  665. key: z,
  666. page: z,
  667. active: !1,
  668. showTitle: i,
  669. itemRender: c
  670. }, null), R = u(je, {
  671. locale: o,
  672. rootPrefixCls: e,
  673. onClick: this.handleChange,
  674. onKeypress: this.runIfEnter,
  675. key: 1,
  676. page: 1,
  677. active: !1,
  678. showTitle: i,
  679. itemRender: c
  680. }, null);
  681. let A = Math.max(1, h - J), F = Math.min(h + J, z);
  682. h - 1 <= J && (F = 1 + J * 2), z - h <= J && (A = z - J * 2);
  683. for (let oe = A; oe <= F; oe += 1) {
  684. const V = h === oe;
  685. S.push(u(je, {
  686. locale: o,
  687. rootPrefixCls: e,
  688. onClick: this.handleChange,
  689. onKeypress: this.runIfEnter,
  690. key: oe,
  691. page: oe,
  692. active: V,
  693. showTitle: i,
  694. itemRender: c
  695. }, null));
  696. }
  697. h - 1 >= J * 2 && h !== 3 && (S[0] = u(je, {
  698. locale: o,
  699. rootPrefixCls: e,
  700. onClick: this.handleChange,
  701. onKeypress: this.runIfEnter,
  702. key: A,
  703. page: A,
  704. class: `${e}-item-after-jump-prev`,
  705. active: !1,
  706. showTitle: this.showTitle,
  707. itemRender: c
  708. }, null), S.unshift(H)), z - h >= J * 2 && h !== z - 2 && (S[S.length - 1] = u(je, {
  709. locale: o,
  710. rootPrefixCls: e,
  711. onClick: this.handleChange,
  712. onKeypress: this.runIfEnter,
  713. key: F,
  714. page: F,
  715. class: `${e}-item-before-jump-next`,
  716. active: !1,
  717. showTitle: this.showTitle,
  718. itemRender: c
  719. }, null), S.push(T)), A !== 1 && S.unshift(R), F !== z && S.push(k);
  720. }
  721. let L = null;
  722. s && (L = u("li", {
  723. class: `${e}-total-text`
  724. }, [s(n, [n === 0 ? 0 : (h - 1) * y + 1, h * y > n ? n : h * y])]));
  725. const j = !fe || !z, q = !le || !z, w = this.buildOptionText || this.$slots.buildOptionText;
  726. return u("ul", G(G({
  727. unselectable: "on",
  728. ref: "paginationNode"
  729. }, O), {}, {
  730. class: te({
  731. [`${e}`]: !0,
  732. [`${e}-disabled`]: t
  733. }, E)
  734. }), [L, u("li", {
  735. title: i ? o.prev_page : null,
  736. onClick: this.prev,
  737. tabindex: j ? null : 0,
  738. onKeypress: this.runIfEnterPrev,
  739. class: te(`${e}-prev`, {
  740. [`${e}-disabled`]: j
  741. }),
  742. "aria-disabled": j
  743. }, [this.renderPrev(Z)]), S, u("li", {
  744. title: i ? o.next_page : null,
  745. onClick: this.next,
  746. tabindex: q ? null : 0,
  747. onKeypress: this.runIfEnterNext,
  748. class: te(`${e}-next`, {
  749. [`${e}-disabled`]: q
  750. }),
  751. "aria-disabled": q
  752. }, [this.renderNext(ee)]), u(uo, {
  753. disabled: t,
  754. locale: o,
  755. rootPrefixCls: e,
  756. selectComponentClass: b,
  757. selectPrefixCls: m,
  758. changeSize: this.getShowSizeChanger() ? this.changePageSize : null,
  759. current: h,
  760. pageSize: y,
  761. pageSizeOptions: v,
  762. buildOptionText: w || null,
  763. quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null,
  764. goButton: M
  765. }, null)]);
  766. }
  767. }), ho = (e) => {
  768. const {
  769. componentCls: t
  770. } = e;
  771. return {
  772. [`${t}-disabled`]: {
  773. "&, &:hover": {
  774. cursor: "not-allowed",
  775. [`${t}-item-link`]: {
  776. color: e.colorTextDisabled,
  777. cursor: "not-allowed"
  778. }
  779. },
  780. "&:focus-visible": {
  781. cursor: "not-allowed",
  782. [`${t}-item-link`]: {
  783. color: e.colorTextDisabled,
  784. cursor: "not-allowed"
  785. }
  786. }
  787. },
  788. [`&${t}-disabled`]: {
  789. cursor: "not-allowed",
  790. [`&${t}-mini`]: {
  791. [`
  792. &:hover ${t}-item:not(${t}-item-active),
  793. &:active ${t}-item:not(${t}-item-active),
  794. &:hover ${t}-item-link,
  795. &:active ${t}-item-link
  796. `]: {
  797. backgroundColor: "transparent"
  798. }
  799. },
  800. [`${t}-item`]: {
  801. cursor: "not-allowed",
  802. "&:hover, &:active": {
  803. backgroundColor: "transparent"
  804. },
  805. a: {
  806. color: e.colorTextDisabled,
  807. backgroundColor: "transparent",
  808. border: "none",
  809. cursor: "not-allowed"
  810. },
  811. "&-active": {
  812. borderColor: e.colorBorder,
  813. backgroundColor: e.paginationItemDisabledBgActive,
  814. "&:hover, &:active": {
  815. backgroundColor: e.paginationItemDisabledBgActive
  816. },
  817. a: {
  818. color: e.paginationItemDisabledColorActive
  819. }
  820. }
  821. },
  822. [`${t}-item-link`]: {
  823. color: e.colorTextDisabled,
  824. cursor: "not-allowed",
  825. "&:hover, &:active": {
  826. backgroundColor: "transparent"
  827. },
  828. [`${t}-simple&`]: {
  829. backgroundColor: "transparent",
  830. "&:hover, &:active": {
  831. backgroundColor: "transparent"
  832. }
  833. }
  834. },
  835. [`${t}-simple-pager`]: {
  836. color: e.colorTextDisabled
  837. },
  838. [`${t}-jump-prev, ${t}-jump-next`]: {
  839. [`${t}-item-link-icon`]: {
  840. opacity: 0
  841. },
  842. [`${t}-item-ellipsis`]: {
  843. opacity: 1
  844. }
  845. }
  846. },
  847. [`&${t}-simple`]: {
  848. [`${t}-prev, ${t}-next`]: {
  849. [`&${t}-disabled ${t}-item-link`]: {
  850. "&:hover, &:active": {
  851. backgroundColor: "transparent"
  852. }
  853. }
  854. }
  855. }
  856. };
  857. }, go = (e) => {
  858. const {
  859. componentCls: t
  860. } = e;
  861. return {
  862. [`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]: {
  863. height: e.paginationItemSizeSM,
  864. lineHeight: `${e.paginationItemSizeSM}px`
  865. },
  866. [`&${t}-mini ${t}-item`]: {
  867. minWidth: e.paginationItemSizeSM,
  868. height: e.paginationItemSizeSM,
  869. margin: 0,
  870. lineHeight: `${e.paginationItemSizeSM - 2}px`
  871. },
  872. [`&${t}-mini ${t}-item:not(${t}-item-active)`]: {
  873. backgroundColor: "transparent",
  874. borderColor: "transparent",
  875. "&:hover": {
  876. backgroundColor: e.colorBgTextHover
  877. },
  878. "&:active": {
  879. backgroundColor: e.colorBgTextActive
  880. }
  881. },
  882. [`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]: {
  883. minWidth: e.paginationItemSizeSM,
  884. height: e.paginationItemSizeSM,
  885. margin: 0,
  886. lineHeight: `${e.paginationItemSizeSM}px`,
  887. [`&:hover ${t}-item-link`]: {
  888. backgroundColor: e.colorBgTextHover
  889. },
  890. [`&:active ${t}-item-link`]: {
  891. backgroundColor: e.colorBgTextActive
  892. },
  893. [`&${t}-disabled:hover ${t}-item-link`]: {
  894. backgroundColor: "transparent"
  895. }
  896. },
  897. [`
  898. &${t}-mini ${t}-prev ${t}-item-link,
  899. &${t}-mini ${t}-next ${t}-item-link
  900. `]: {
  901. backgroundColor: "transparent",
  902. borderColor: "transparent",
  903. "&::after": {
  904. height: e.paginationItemSizeSM,
  905. lineHeight: `${e.paginationItemSizeSM}px`
  906. }
  907. },
  908. [`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]: {
  909. height: e.paginationItemSizeSM,
  910. marginInlineEnd: 0,
  911. lineHeight: `${e.paginationItemSizeSM}px`
  912. },
  913. [`&${t}-mini ${t}-options`]: {
  914. marginInlineStart: e.paginationMiniOptionsMarginInlineStart,
  915. "&-size-changer": {
  916. top: e.paginationMiniOptionsSizeChangerTop
  917. },
  918. "&-quick-jumper": {
  919. height: e.paginationItemSizeSM,
  920. lineHeight: `${e.paginationItemSizeSM}px`,
  921. input: g(g({}, xl(e)), {
  922. width: e.paginationMiniQuickJumperInputWidth,
  923. height: e.controlHeightSM
  924. })
  925. }
  926. }
  927. };
  928. }, xo = (e) => {
  929. const {
  930. componentCls: t
  931. } = e;
  932. return {
  933. [`
  934. &${t}-simple ${t}-prev,
  935. &${t}-simple ${t}-next
  936. `]: {
  937. height: e.paginationItemSizeSM,
  938. lineHeight: `${e.paginationItemSizeSM}px`,
  939. verticalAlign: "top",
  940. [`${t}-item-link`]: {
  941. height: e.paginationItemSizeSM,
  942. backgroundColor: "transparent",
  943. border: 0,
  944. "&:hover": {
  945. backgroundColor: e.colorBgTextHover
  946. },
  947. "&:active": {
  948. backgroundColor: e.colorBgTextActive
  949. },
  950. "&::after": {
  951. height: e.paginationItemSizeSM,
  952. lineHeight: `${e.paginationItemSizeSM}px`
  953. }
  954. }
  955. },
  956. [`&${t}-simple ${t}-simple-pager`]: {
  957. display: "inline-block",
  958. height: e.paginationItemSizeSM,
  959. marginInlineEnd: e.marginXS,
  960. input: {
  961. boxSizing: "border-box",
  962. height: "100%",
  963. marginInlineEnd: e.marginXS,
  964. padding: `0 ${e.paginationItemPaddingInline}px`,
  965. textAlign: "center",
  966. backgroundColor: e.paginationItemInputBg,
  967. border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
  968. borderRadius: e.borderRadius,
  969. outline: "none",
  970. transition: `border-color ${e.motionDurationMid}`,
  971. color: "inherit",
  972. "&:hover": {
  973. borderColor: e.colorPrimary
  974. },
  975. "&:focus": {
  976. borderColor: e.colorPrimaryHover,
  977. boxShadow: `${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
  978. },
  979. "&[disabled]": {
  980. color: e.colorTextDisabled,
  981. backgroundColor: e.colorBgContainerDisabled,
  982. borderColor: e.colorBorder,
  983. cursor: "not-allowed"
  984. }
  985. }
  986. }
  987. };
  988. }, bo = (e) => {
  989. const {
  990. componentCls: t
  991. } = e;
  992. return {
  993. [`${t}-jump-prev, ${t}-jump-next`]: {
  994. outline: 0,
  995. [`${t}-item-container`]: {
  996. position: "relative",
  997. [`${t}-item-link-icon`]: {
  998. color: e.colorPrimary,
  999. fontSize: e.fontSizeSM,
  1000. opacity: 0,
  1001. transition: `all ${e.motionDurationMid}`,
  1002. "&-svg": {
  1003. top: 0,
  1004. insetInlineEnd: 0,
  1005. bottom: 0,
  1006. insetInlineStart: 0,
  1007. margin: "auto"
  1008. }
  1009. },
  1010. [`${t}-item-ellipsis`]: {
  1011. position: "absolute",
  1012. top: 0,
  1013. insetInlineEnd: 0,
  1014. bottom: 0,
  1015. insetInlineStart: 0,
  1016. display: "block",
  1017. margin: "auto",
  1018. color: e.colorTextDisabled,
  1019. fontFamily: "Arial, Helvetica, sans-serif",
  1020. letterSpacing: e.paginationEllipsisLetterSpacing,
  1021. textAlign: "center",
  1022. textIndent: e.paginationEllipsisTextIndent,
  1023. opacity: 1,
  1024. transition: `all ${e.motionDurationMid}`
  1025. }
  1026. },
  1027. "&:hover": {
  1028. [`${t}-item-link-icon`]: {
  1029. opacity: 1
  1030. },
  1031. [`${t}-item-ellipsis`]: {
  1032. opacity: 0
  1033. }
  1034. },
  1035. "&:focus-visible": g({
  1036. [`${t}-item-link-icon`]: {
  1037. opacity: 1
  1038. },
  1039. [`${t}-item-ellipsis`]: {
  1040. opacity: 0
  1041. }
  1042. }, Jt(e))
  1043. },
  1044. [`
  1045. ${t}-prev,
  1046. ${t}-jump-prev,
  1047. ${t}-jump-next
  1048. `]: {
  1049. marginInlineEnd: e.marginXS
  1050. },
  1051. [`
  1052. ${t}-prev,
  1053. ${t}-next,
  1054. ${t}-jump-prev,
  1055. ${t}-jump-next
  1056. `]: {
  1057. display: "inline-block",
  1058. minWidth: e.paginationItemSize,
  1059. height: e.paginationItemSize,
  1060. color: e.colorText,
  1061. fontFamily: e.paginationFontFamily,
  1062. lineHeight: `${e.paginationItemSize}px`,
  1063. textAlign: "center",
  1064. verticalAlign: "middle",
  1065. listStyle: "none",
  1066. borderRadius: e.borderRadius,
  1067. cursor: "pointer",
  1068. transition: `all ${e.motionDurationMid}`
  1069. },
  1070. [`${t}-prev, ${t}-next`]: {
  1071. fontFamily: "Arial, Helvetica, sans-serif",
  1072. outline: 0,
  1073. button: {
  1074. color: e.colorText,
  1075. cursor: "pointer",
  1076. userSelect: "none"
  1077. },
  1078. [`${t}-item-link`]: {
  1079. display: "block",
  1080. width: "100%",
  1081. height: "100%",
  1082. padding: 0,
  1083. fontSize: e.fontSizeSM,
  1084. textAlign: "center",
  1085. backgroundColor: "transparent",
  1086. border: `${e.lineWidth}px ${e.lineType} transparent`,
  1087. borderRadius: e.borderRadius,
  1088. outline: "none",
  1089. transition: `all ${e.motionDurationMid}`
  1090. },
  1091. [`&:focus-visible ${t}-item-link`]: g({}, Jt(e)),
  1092. [`&:hover ${t}-item-link`]: {
  1093. backgroundColor: e.colorBgTextHover
  1094. },
  1095. [`&:active ${t}-item-link`]: {
  1096. backgroundColor: e.colorBgTextActive
  1097. },
  1098. [`&${t}-disabled:hover`]: {
  1099. [`${t}-item-link`]: {
  1100. backgroundColor: "transparent"
  1101. }
  1102. }
  1103. },
  1104. [`${t}-slash`]: {
  1105. marginInlineEnd: e.paginationSlashMarginInlineEnd,
  1106. marginInlineStart: e.paginationSlashMarginInlineStart
  1107. },
  1108. [`${t}-options`]: {
  1109. display: "inline-block",
  1110. marginInlineStart: e.margin,
  1111. verticalAlign: "middle",
  1112. "&-size-changer.-select": {
  1113. display: "inline-block",
  1114. width: "auto"
  1115. },
  1116. "&-quick-jumper": {
  1117. display: "inline-block",
  1118. height: e.controlHeight,
  1119. marginInlineStart: e.marginXS,
  1120. lineHeight: `${e.controlHeight}px`,
  1121. verticalAlign: "top",
  1122. input: g(g({}, bl(e)), {
  1123. width: e.controlHeightLG * 1.25,
  1124. height: e.controlHeight,
  1125. boxSizing: "border-box",
  1126. margin: 0,
  1127. marginInlineStart: e.marginXS,
  1128. marginInlineEnd: e.marginXS
  1129. })
  1130. }
  1131. }
  1132. };
  1133. }, yo = (e) => {
  1134. const {
  1135. componentCls: t
  1136. } = e;
  1137. return {
  1138. [`${t}-item`]: g(g({
  1139. display: "inline-block",
  1140. minWidth: e.paginationItemSize,
  1141. height: e.paginationItemSize,
  1142. marginInlineEnd: e.marginXS,
  1143. fontFamily: e.paginationFontFamily,
  1144. lineHeight: `${e.paginationItemSize - 2}px`,
  1145. textAlign: "center",
  1146. verticalAlign: "middle",
  1147. listStyle: "none",
  1148. backgroundColor: "transparent",
  1149. border: `${e.lineWidth}px ${e.lineType} transparent`,
  1150. borderRadius: e.borderRadius,
  1151. outline: 0,
  1152. cursor: "pointer",
  1153. userSelect: "none",
  1154. a: {
  1155. display: "block",
  1156. padding: `0 ${e.paginationItemPaddingInline}px`,
  1157. color: e.colorText,
  1158. transition: "none",
  1159. "&:hover": {
  1160. textDecoration: "none"
  1161. }
  1162. },
  1163. [`&:not(${t}-item-active)`]: {
  1164. "&:hover": {
  1165. transition: `all ${e.motionDurationMid}`,
  1166. backgroundColor: e.colorBgTextHover
  1167. },
  1168. "&:active": {
  1169. backgroundColor: e.colorBgTextActive
  1170. }
  1171. }
  1172. }, yl(e)), {
  1173. "&-active": {
  1174. fontWeight: e.paginationFontWeightActive,
  1175. backgroundColor: e.paginationItemBgActive,
  1176. borderColor: e.colorPrimary,
  1177. a: {
  1178. color: e.colorPrimary
  1179. },
  1180. "&:hover": {
  1181. borderColor: e.colorPrimaryHover
  1182. },
  1183. "&:hover a": {
  1184. color: e.colorPrimaryHover
  1185. }
  1186. }
  1187. })
  1188. };
  1189. }, Co = (e) => {
  1190. const {
  1191. componentCls: t
  1192. } = e;
  1193. return {
  1194. [t]: g(g(g(g(g(g(g(g({}, Dt(e)), {
  1195. "ul, ol": {
  1196. margin: 0,
  1197. padding: 0,
  1198. listStyle: "none"
  1199. },
  1200. "&::after": {
  1201. display: "block",
  1202. clear: "both",
  1203. height: 0,
  1204. overflow: "hidden",
  1205. visibility: "hidden",
  1206. content: '""'
  1207. },
  1208. [`${t}-total-text`]: {
  1209. display: "inline-block",
  1210. height: e.paginationItemSize,
  1211. marginInlineEnd: e.marginXS,
  1212. lineHeight: `${e.paginationItemSize - 2}px`,
  1213. verticalAlign: "middle"
  1214. }
  1215. }), yo(e)), bo(e)), xo(e)), go(e)), ho(e)), {
  1216. // media query style
  1217. [`@media only screen and (max-width: ${e.screenLG}px)`]: {
  1218. [`${t}-item`]: {
  1219. "&-after-jump-prev, &-before-jump-next": {
  1220. display: "none"
  1221. }
  1222. }
  1223. },
  1224. [`@media only screen and (max-width: ${e.screenSM}px)`]: {
  1225. [`${t}-options`]: {
  1226. display: "none"
  1227. }
  1228. }
  1229. }),
  1230. // rtl style
  1231. [`&${e.componentCls}-rtl`]: {
  1232. direction: "rtl"
  1233. }
  1234. };
  1235. }, So = (e) => {
  1236. const {
  1237. componentCls: t
  1238. } = e;
  1239. return {
  1240. [`${t}${t}-disabled`]: {
  1241. "&, &:hover": {
  1242. [`${t}-item-link`]: {
  1243. borderColor: e.colorBorder
  1244. }
  1245. },
  1246. "&:focus-visible": {
  1247. [`${t}-item-link`]: {
  1248. borderColor: e.colorBorder
  1249. }
  1250. },
  1251. [`${t}-item, ${t}-item-link`]: {
  1252. backgroundColor: e.colorBgContainerDisabled,
  1253. borderColor: e.colorBorder,
  1254. [`&:hover:not(${t}-item-active)`]: {
  1255. backgroundColor: e.colorBgContainerDisabled,
  1256. borderColor: e.colorBorder,
  1257. a: {
  1258. color: e.colorTextDisabled
  1259. }
  1260. },
  1261. [`&${t}-item-active`]: {
  1262. backgroundColor: e.paginationItemDisabledBgActive
  1263. }
  1264. },
  1265. [`${t}-prev, ${t}-next`]: {
  1266. "&:hover button": {
  1267. backgroundColor: e.colorBgContainerDisabled,
  1268. borderColor: e.colorBorder,
  1269. color: e.colorTextDisabled
  1270. },
  1271. [`${t}-item-link`]: {
  1272. backgroundColor: e.colorBgContainerDisabled,
  1273. borderColor: e.colorBorder
  1274. }
  1275. }
  1276. },
  1277. [t]: {
  1278. [`${t}-prev, ${t}-next`]: {
  1279. "&:hover button": {
  1280. borderColor: e.colorPrimaryHover,
  1281. backgroundColor: e.paginationItemBg
  1282. },
  1283. [`${t}-item-link`]: {
  1284. backgroundColor: e.paginationItemLinkBg,
  1285. borderColor: e.colorBorder
  1286. },
  1287. [`&:hover ${t}-item-link`]: {
  1288. borderColor: e.colorPrimary,
  1289. backgroundColor: e.paginationItemBg,
  1290. color: e.colorPrimary
  1291. },
  1292. [`&${t}-disabled`]: {
  1293. [`${t}-item-link`]: {
  1294. borderColor: e.colorBorder,
  1295. color: e.colorTextDisabled
  1296. }
  1297. }
  1298. },
  1299. [`${t}-item`]: {
  1300. backgroundColor: e.paginationItemBg,
  1301. border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
  1302. [`&:hover:not(${t}-item-active)`]: {
  1303. borderColor: e.colorPrimary,
  1304. backgroundColor: e.paginationItemBg,
  1305. a: {
  1306. color: e.colorPrimary
  1307. }
  1308. },
  1309. "&-active": {
  1310. borderColor: e.colorPrimary
  1311. }
  1312. }
  1313. }
  1314. };
  1315. }, $o = In("Pagination", (e) => {
  1316. const t = Pn(e, {
  1317. paginationItemSize: e.controlHeight,
  1318. paginationFontFamily: e.fontFamily,
  1319. paginationItemBg: e.colorBgContainer,
  1320. paginationItemBgActive: e.colorBgContainer,
  1321. paginationFontWeightActive: e.fontWeightStrong,
  1322. paginationItemSizeSM: e.controlHeightSM,
  1323. paginationItemInputBg: e.colorBgContainer,
  1324. paginationMiniOptionsSizeChangerTop: 0,
  1325. paginationItemDisabledBgActive: e.controlItemBgActiveDisabled,
  1326. paginationItemDisabledColorActive: e.colorTextDisabled,
  1327. paginationItemLinkBg: e.colorBgContainer,
  1328. inputOutlineOffset: "0 0",
  1329. paginationMiniOptionsMarginInlineStart: e.marginXXS / 2,
  1330. paginationMiniQuickJumperInputWidth: e.controlHeightLG * 1.1,
  1331. paginationItemPaddingInline: e.marginXXS * 1.5,
  1332. paginationEllipsisLetterSpacing: e.marginXXS / 2,
  1333. paginationSlashMarginInlineStart: e.marginXXS,
  1334. paginationSlashMarginInlineEnd: e.marginSM,
  1335. paginationEllipsisTextIndent: "0.13em"
  1336. // magic for ui experience
  1337. }, gl(e));
  1338. return [Co(t), e.wireframe && So(t)];
  1339. });
  1340. var wo = function(e, t) {
  1341. var l = {};
  1342. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  1343. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  1344. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  1345. return l;
  1346. };
  1347. const Io = () => ({
  1348. total: Number,
  1349. defaultCurrent: Number,
  1350. disabled: Be(),
  1351. current: Number,
  1352. defaultPageSize: Number,
  1353. pageSize: Number,
  1354. hideOnSinglePage: Be(),
  1355. showSizeChanger: Be(),
  1356. pageSizeOptions: qe(),
  1357. buildOptionText: se(),
  1358. showQuickJumper: De([Boolean, Object]),
  1359. showTotal: se(),
  1360. size: Ke(),
  1361. simple: Be(),
  1362. locale: Object,
  1363. prefixCls: String,
  1364. selectPrefixCls: String,
  1365. totalBoundaryShowSizeChanger: Number,
  1366. selectComponentClass: String,
  1367. itemRender: se(),
  1368. role: String,
  1369. responsive: Boolean,
  1370. showLessItems: Be(),
  1371. onChange: se(),
  1372. onShowSizeChange: se(),
  1373. "onUpdate:current": se(),
  1374. "onUpdate:pageSize": se()
  1375. }), Po = ue({
  1376. compatConfig: {
  1377. MODE: 3
  1378. },
  1379. name: "APagination",
  1380. inheritAttrs: !1,
  1381. props: Io(),
  1382. // emits: ['change', 'showSizeChange', 'update:current', 'update:pageSize'],
  1383. setup(e, t) {
  1384. let {
  1385. slots: l,
  1386. attrs: n
  1387. } = t;
  1388. const {
  1389. prefixCls: o,
  1390. configProvider: r,
  1391. direction: a,
  1392. size: i
  1393. } = Kt("pagination", e), [s, p] = $o(o), c = C(() => r.getPrefixCls("select", e.selectPrefixCls)), f = En(), [x] = Tn("Pagination", Cl, xe(e, "locale")), $ = (b) => {
  1394. const m = u("span", {
  1395. class: `${b}-item-ellipsis`
  1396. }, [At("•••")]), v = u("button", {
  1397. class: `${b}-item-link`,
  1398. type: "button",
  1399. tabindex: -1
  1400. }, [a.value === "rtl" ? u(qt, null, null) : u(Yt, null, null)]), h = u("button", {
  1401. class: `${b}-item-link`,
  1402. type: "button",
  1403. tabindex: -1
  1404. }, [a.value === "rtl" ? u(Yt, null, null) : u(qt, null, null)]), y = u("a", {
  1405. rel: "nofollow",
  1406. class: `${b}-item-link`
  1407. }, [u("div", {
  1408. class: `${b}-item-container`
  1409. }, [a.value === "rtl" ? u(Qt, {
  1410. class: `${b}-item-link-icon`
  1411. }, null) : u(Zt, {
  1412. class: `${b}-item-link-icon`
  1413. }, null), m])]), d = u("a", {
  1414. rel: "nofollow",
  1415. class: `${b}-item-link`
  1416. }, [u("div", {
  1417. class: `${b}-item-container`
  1418. }, [a.value === "rtl" ? u(Zt, {
  1419. class: `${b}-item-link-icon`
  1420. }, null) : u(Qt, {
  1421. class: `${b}-item-link-icon`
  1422. }, null), m])]);
  1423. return {
  1424. prevIcon: v,
  1425. nextIcon: h,
  1426. jumpPrevIcon: y,
  1427. jumpNextIcon: d
  1428. };
  1429. };
  1430. return () => {
  1431. var b;
  1432. const {
  1433. itemRender: m = l.itemRender,
  1434. buildOptionText: v = l.buildOptionText,
  1435. selectComponentClass: h,
  1436. responsive: y
  1437. } = e, d = wo(e, ["itemRender", "buildOptionText", "selectComponentClass", "responsive"]), E = i.value === "small" || !!(!((b = f.value) === null || b === void 0) && b.xs && !i.value && y), O = g(g(g(g(g({}, d), $(o.value)), {
  1438. prefixCls: o.value,
  1439. selectPrefixCls: c.value,
  1440. selectComponentClass: h || (E ? so : co),
  1441. locale: x.value,
  1442. buildOptionText: v
  1443. }), n), {
  1444. class: te({
  1445. [`${o.value}-mini`]: E,
  1446. [`${o.value}-rtl`]: a.value === "rtl"
  1447. }, n.class, p.value),
  1448. itemRender: m
  1449. });
  1450. return s(u(vo, O, null));
  1451. };
  1452. }
  1453. }), Eo = Sl(Po), _n = Symbol("TableContextProps"), To = (e) => {
  1454. Me(_n, e);
  1455. }, Ae = () => He(_n, {}), Ro = "RC_TABLE_KEY";
  1456. function Dn(e) {
  1457. return e == null ? [] : Array.isArray(e) ? e : [e];
  1458. }
  1459. function Kn(e, t) {
  1460. if (!t && typeof t != "number")
  1461. return e;
  1462. const l = Dn(t);
  1463. let n = e;
  1464. for (let o = 0; o < l.length; o += 1) {
  1465. if (!n)
  1466. return null;
  1467. const r = l[o];
  1468. n = n[r];
  1469. }
  1470. return n;
  1471. }
  1472. function ht(e) {
  1473. const t = [], l = {};
  1474. return e.forEach((n) => {
  1475. const {
  1476. key: o,
  1477. dataIndex: r
  1478. } = n || {};
  1479. let a = o || Dn(r).join("-") || Ro;
  1480. for (; l[a]; )
  1481. a = `${a}_next`;
  1482. l[a] = !0, t.push(a);
  1483. }), t;
  1484. }
  1485. function Oo() {
  1486. const e = {};
  1487. function t(r, a) {
  1488. a && Object.keys(a).forEach((i) => {
  1489. const s = a[i];
  1490. s && typeof s == "object" ? (r[i] = r[i] || {}, t(r[i], s)) : r[i] = s;
  1491. });
  1492. }
  1493. for (var l = arguments.length, n = new Array(l), o = 0; o < l; o++)
  1494. n[o] = arguments[o];
  1495. return n.forEach((r) => {
  1496. t(e, r);
  1497. }), e;
  1498. }
  1499. function Et(e) {
  1500. return e != null;
  1501. }
  1502. const Fn = Symbol("SlotsContextProps"), No = (e) => {
  1503. Me(Fn, e);
  1504. }, Mt = () => He(Fn, C(() => ({}))), An = Symbol("ContextProps"), Bo = (e) => {
  1505. Me(An, e);
  1506. }, zo = () => He(An, {
  1507. onResizeColumn: () => {
  1508. }
  1509. }), Ze = "RC_TABLE_INTERNAL_COL_DEFINE", Mn = Symbol("HoverContextProps"), ko = (e) => {
  1510. Me(Mn, e);
  1511. }, _o = () => He(Mn, {
  1512. startRow: ce(-1),
  1513. endRow: ce(-1),
  1514. onHover() {
  1515. }
  1516. }), Tt = ce(!1), Do = () => {
  1517. et(() => {
  1518. Tt.value = Tt.value || $l("position", "sticky");
  1519. });
  1520. }, Ko = () => Tt;
  1521. var Fo = function(e, t) {
  1522. var l = {};
  1523. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  1524. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  1525. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  1526. return l;
  1527. };
  1528. function Ao(e, t, l, n) {
  1529. const o = e + t - 1;
  1530. return e <= n && o >= l;
  1531. }
  1532. function Mo(e) {
  1533. return e && typeof e == "object" && !Array.isArray(e) && !ut(e);
  1534. }
  1535. const Ht = ue({
  1536. name: "Cell",
  1537. props: ["prefixCls", "record", "index", "renderIndex", "dataIndex", "customRender", "component", "colSpan", "rowSpan", "fixLeft", "fixRight", "firstFixLeft", "lastFixLeft", "firstFixRight", "lastFixRight", "appendNode", "additionalProps", "ellipsis", "align", "rowType", "isSticky", "column", "cellType", "transformCellText"],
  1538. setup(e, t) {
  1539. let {
  1540. slots: l
  1541. } = t;
  1542. const n = Mt(), {
  1543. onHover: o,
  1544. startRow: r,
  1545. endRow: a
  1546. } = _o(), i = C(() => {
  1547. var m, v, h, y;
  1548. return (h = (m = e.colSpan) !== null && m !== void 0 ? m : (v = e.additionalProps) === null || v === void 0 ? void 0 : v.colSpan) !== null && h !== void 0 ? h : (y = e.additionalProps) === null || y === void 0 ? void 0 : y.colspan;
  1549. }), s = C(() => {
  1550. var m, v, h, y;
  1551. return (h = (m = e.rowSpan) !== null && m !== void 0 ? m : (v = e.additionalProps) === null || v === void 0 ? void 0 : v.rowSpan) !== null && h !== void 0 ? h : (y = e.additionalProps) === null || y === void 0 ? void 0 : y.rowspan;
  1552. }), p = wl(() => {
  1553. const {
  1554. index: m
  1555. } = e;
  1556. return Ao(m, s.value || 1, r.value, a.value);
  1557. }), c = Ko(), f = (m, v) => {
  1558. var h;
  1559. const {
  1560. record: y,
  1561. index: d,
  1562. additionalProps: E
  1563. } = e;
  1564. y && o(d, d + v - 1), (h = E == null ? void 0 : E.onMouseenter) === null || h === void 0 || h.call(E, m);
  1565. }, x = (m) => {
  1566. var v;
  1567. const {
  1568. record: h,
  1569. additionalProps: y
  1570. } = e;
  1571. h && o(-1, -1), (v = y == null ? void 0 : y.onMouseleave) === null || v === void 0 || v.call(y, m);
  1572. }, $ = (m) => {
  1573. const v = Tl(m)[0];
  1574. return ut(v) ? v.type === Jl ? v.children : Array.isArray(v.children) ? $(v.children) : void 0 : v;
  1575. }, b = ce(null);
  1576. return Fe([p, () => e.prefixCls, b], () => {
  1577. const m = Il(b.value);
  1578. m && (p.value ? Pl(m, `${e.prefixCls}-cell-row-hover`) : El(m, `${e.prefixCls}-cell-row-hover`));
  1579. }), () => {
  1580. var m, v, h, y, d, E;
  1581. const {
  1582. prefixCls: O,
  1583. record: z,
  1584. index: S,
  1585. renderIndex: H,
  1586. dataIndex: T,
  1587. customRender: R,
  1588. component: k = "td",
  1589. fixLeft: B,
  1590. fixRight: M,
  1591. firstFixLeft: J,
  1592. lastFixLeft: Z,
  1593. firstFixRight: ee,
  1594. lastFixRight: fe,
  1595. appendNode: le = (m = l.appendNode) === null || m === void 0 ? void 0 : m.call(l),
  1596. additionalProps: L = {},
  1597. ellipsis: j,
  1598. align: q,
  1599. rowType: w,
  1600. isSticky: K,
  1601. column: N = {},
  1602. cellType: A
  1603. } = e, F = `${O}-cell`;
  1604. let oe, V;
  1605. const ge = (v = l.default) === null || v === void 0 ? void 0 : v.call(l);
  1606. if (Et(ge) || A === "header")
  1607. V = ge;
  1608. else {
  1609. const ae = Kn(z, T);
  1610. if (V = ae, R) {
  1611. const I = R({
  1612. text: ae,
  1613. value: ae,
  1614. record: z,
  1615. index: S,
  1616. renderIndex: H,
  1617. column: N.__originColumn__
  1618. });
  1619. Mo(I) ? (process.env.NODE_ENV !== "production" && ze(!1, "`columns.customRender` return cell props is deprecated with perf issue, please use `customCell` instead."), V = I.children, oe = I.props) : V = I;
  1620. }
  1621. if (!(Ze in N) && A === "body" && n.value.bodyCell && !(!((h = N.slots) === null || h === void 0) && h.customRender)) {
  1622. const I = Ft(n.value, "bodyCell", {
  1623. text: ae,
  1624. value: ae,
  1625. record: z,
  1626. index: S,
  1627. column: N.__originColumn__
  1628. }, () => {
  1629. const P = V === void 0 ? ae : V;
  1630. return [typeof P == "object" && Pt(P) || typeof P != "object" ? P : null];
  1631. });
  1632. V = Rn(I);
  1633. }
  1634. e.transformCellText && (V = e.transformCellText({
  1635. text: V,
  1636. record: z,
  1637. index: S,
  1638. column: N.__originColumn__
  1639. }));
  1640. }
  1641. typeof V == "object" && !Array.isArray(V) && !ut(V) && (V = null), j && (Z || ee) && (V = u("span", {
  1642. class: `${F}-content`
  1643. }, [V])), Array.isArray(V) && V.length === 1 && (V = V[0]);
  1644. const be = oe || {}, {
  1645. colSpan: Se,
  1646. rowSpan: Ee,
  1647. style: Oe,
  1648. class: ye
  1649. } = be, $e = Fo(be, ["colSpan", "rowSpan", "style", "class"]), _ = (y = Se !== void 0 ? Se : i.value) !== null && y !== void 0 ? y : 1, Y = (d = Ee !== void 0 ? Ee : s.value) !== null && d !== void 0 ? d : 1;
  1650. if (_ === 0 || Y === 0)
  1651. return null;
  1652. const D = {}, W = typeof B == "number" && c.value, X = typeof M == "number" && c.value;
  1653. W && (D.position = "sticky", D.left = `${B}px`), X && (D.position = "sticky", D.right = `${M}px`);
  1654. const re = {};
  1655. q && (re.textAlign = q);
  1656. let U;
  1657. const ne = j === !0 ? {
  1658. showTitle: !0
  1659. } : j;
  1660. ne && (ne.showTitle || w === "header") && (typeof V == "string" || typeof V == "number" ? U = V.toString() : ut(V) && (U = $([V])));
  1661. const he = g(g(g({
  1662. title: U
  1663. }, $e), L), {
  1664. colSpan: _ !== 1 ? _ : null,
  1665. rowSpan: Y !== 1 ? Y : null,
  1666. class: te(F, {
  1667. [`${F}-fix-left`]: W && c.value,
  1668. [`${F}-fix-left-first`]: J && c.value,
  1669. [`${F}-fix-left-last`]: Z && c.value,
  1670. [`${F}-fix-right`]: X && c.value,
  1671. [`${F}-fix-right-first`]: ee && c.value,
  1672. [`${F}-fix-right-last`]: fe && c.value,
  1673. [`${F}-ellipsis`]: j,
  1674. [`${F}-with-append`]: le,
  1675. [`${F}-fix-sticky`]: (W || X) && K && c.value
  1676. }, L.class, ye),
  1677. onMouseenter: (ae) => {
  1678. f(ae, Y);
  1679. },
  1680. onMouseleave: x,
  1681. style: [L.style, re, D, Oe]
  1682. });
  1683. return u(k, G(G({}, he), {}, {
  1684. ref: b
  1685. }), {
  1686. default: () => [le, V, (E = l.dragHandle) === null || E === void 0 ? void 0 : E.call(l)]
  1687. });
  1688. };
  1689. }
  1690. });
  1691. function Hn(e, t, l, n, o) {
  1692. const r = l[e] || {}, a = l[t] || {};
  1693. let i, s;
  1694. r.fixed === "left" ? i = n.left[e] : a.fixed === "right" && (s = n.right[t]);
  1695. let p = !1, c = !1, f = !1, x = !1;
  1696. const $ = l[t + 1], b = l[e - 1];
  1697. return o === "rtl" ? i !== void 0 ? x = !(b && b.fixed === "left") : s !== void 0 && (f = !($ && $.fixed === "right")) : i !== void 0 ? p = !($ && $.fixed === "left") : s !== void 0 && (c = !(b && b.fixed === "right")), {
  1698. fixLeft: i,
  1699. fixRight: s,
  1700. lastFixLeft: p,
  1701. firstFixRight: c,
  1702. lastFixRight: f,
  1703. firstFixLeft: x,
  1704. isSticky: n.isSticky
  1705. };
  1706. }
  1707. const rn = {
  1708. mouse: {
  1709. start: "mousedown",
  1710. move: "mousemove",
  1711. stop: "mouseup"
  1712. },
  1713. touch: {
  1714. start: "touchstart",
  1715. move: "touchmove",
  1716. stop: "touchend"
  1717. }
  1718. }, an = 50, Ho = ue({
  1719. compatConfig: {
  1720. MODE: 3
  1721. },
  1722. name: "DragHandle",
  1723. props: {
  1724. prefixCls: String,
  1725. width: {
  1726. type: Number,
  1727. required: !0
  1728. },
  1729. minWidth: {
  1730. type: Number,
  1731. default: an
  1732. },
  1733. maxWidth: {
  1734. type: Number,
  1735. default: 1 / 0
  1736. },
  1737. column: {
  1738. type: Object,
  1739. default: void 0
  1740. }
  1741. },
  1742. setup(e) {
  1743. let t = 0, l = {
  1744. remove: () => {
  1745. }
  1746. }, n = {
  1747. remove: () => {
  1748. }
  1749. };
  1750. const o = () => {
  1751. l.remove(), n.remove();
  1752. };
  1753. ql(() => {
  1754. o();
  1755. }), Re(() => {
  1756. Te(!isNaN(e.width), "Table", "width must be a number when use resizable");
  1757. });
  1758. const {
  1759. onResizeColumn: r
  1760. } = zo(), a = C(() => typeof e.minWidth == "number" && !isNaN(e.minWidth) ? e.minWidth : an), i = C(() => typeof e.maxWidth == "number" && !isNaN(e.maxWidth) ? e.maxWidth : 1 / 0), s = Yl();
  1761. let p = 0;
  1762. const c = ce(!1);
  1763. let f;
  1764. const x = (d) => {
  1765. let E = 0;
  1766. d.touches ? d.touches.length ? E = d.touches[0].pageX : E = d.changedTouches[0].pageX : E = d.pageX;
  1767. const O = t - E;
  1768. let z = Math.max(p - O, a.value);
  1769. z = Math.min(z, i.value), rt.cancel(f), f = rt(() => {
  1770. r(z, e.column.__originColumn__);
  1771. });
  1772. }, $ = (d) => {
  1773. x(d);
  1774. }, b = (d) => {
  1775. c.value = !1, x(d), o();
  1776. }, m = (d, E) => {
  1777. c.value = !0, o(), p = s.vnode.el.parentNode.getBoundingClientRect().width, !(d instanceof MouseEvent && d.which !== 1) && (d.stopPropagation && d.stopPropagation(), t = d.touches ? d.touches[0].pageX : d.pageX, l = We(document.documentElement, E.move, $), n = We(document.documentElement, E.stop, b));
  1778. }, v = (d) => {
  1779. d.stopPropagation(), d.preventDefault(), m(d, rn.mouse);
  1780. }, h = (d) => {
  1781. d.stopPropagation(), d.preventDefault(), m(d, rn.touch);
  1782. }, y = (d) => {
  1783. d.stopPropagation(), d.preventDefault();
  1784. };
  1785. return () => {
  1786. const {
  1787. prefixCls: d
  1788. } = e, E = {
  1789. [Rl ? "onTouchstartPassive" : "onTouchstart"]: (O) => h(O)
  1790. };
  1791. return u("div", G(G({
  1792. class: `${d}-resize-handle ${c.value ? "dragging" : ""}`,
  1793. onMousedown: v
  1794. }, E), {}, {
  1795. onClick: y
  1796. }), [u("div", {
  1797. class: `${d}-resize-handle-line`
  1798. }, null)]);
  1799. };
  1800. }
  1801. }), jo = ue({
  1802. name: "HeaderRow",
  1803. props: ["cells", "stickyOffsets", "flattenColumns", "rowComponent", "cellComponent", "index", "customHeaderRow"],
  1804. setup(e) {
  1805. const t = Ae();
  1806. return () => {
  1807. const {
  1808. prefixCls: l,
  1809. direction: n
  1810. } = t, {
  1811. cells: o,
  1812. stickyOffsets: r,
  1813. flattenColumns: a,
  1814. rowComponent: i,
  1815. cellComponent: s,
  1816. customHeaderRow: p,
  1817. index: c
  1818. } = e;
  1819. let f;
  1820. p && (f = p(o.map(($) => $.column), c));
  1821. const x = ht(o.map(($) => $.column));
  1822. return u(i, f, {
  1823. default: () => [o.map(($, b) => {
  1824. const {
  1825. column: m
  1826. } = $, v = Hn($.colStart, $.colEnd, a, r, n);
  1827. let h;
  1828. m && m.customHeaderCell && (h = $.column.customHeaderCell(m));
  1829. const y = m;
  1830. return u(Ht, G(G(G({}, $), {}, {
  1831. cellType: "header",
  1832. ellipsis: m.ellipsis,
  1833. align: m.align,
  1834. component: s,
  1835. prefixCls: l,
  1836. key: x[b]
  1837. }, v), {}, {
  1838. additionalProps: h,
  1839. rowType: "header",
  1840. column: m
  1841. }), {
  1842. default: () => m.title,
  1843. dragHandle: () => y.resizable ? u(Ho, {
  1844. prefixCls: l,
  1845. width: y.width,
  1846. minWidth: y.minWidth,
  1847. maxWidth: y.maxWidth,
  1848. column: y
  1849. }, null) : null
  1850. });
  1851. })]
  1852. });
  1853. };
  1854. }
  1855. });
  1856. function Lo(e) {
  1857. const t = [];
  1858. function l(o, r) {
  1859. let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
  1860. t[a] = t[a] || [];
  1861. let i = r;
  1862. return o.filter(Boolean).map((p) => {
  1863. const c = {
  1864. key: p.key,
  1865. class: te(p.className, p.class),
  1866. // children: column.title,
  1867. column: p,
  1868. colStart: i
  1869. };
  1870. let f = 1;
  1871. const x = p.children;
  1872. return x && x.length > 0 && (f = l(x, i, a + 1).reduce(($, b) => $ + b, 0), c.hasSubColumns = !0), "colSpan" in p && ({
  1873. colSpan: f
  1874. } = p), "rowSpan" in p && (c.rowSpan = p.rowSpan), c.colSpan = f, c.colEnd = c.colStart + f - 1, t[a].push(c), i += f, f;
  1875. });
  1876. }
  1877. l(e, 0);
  1878. const n = t.length;
  1879. for (let o = 0; o < n; o += 1)
  1880. t[o].forEach((r) => {
  1881. !("rowSpan" in r) && !r.hasSubColumns && (r.rowSpan = n - o);
  1882. });
  1883. return t;
  1884. }
  1885. const sn = ue({
  1886. name: "TableHeader",
  1887. inheritAttrs: !1,
  1888. props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow"],
  1889. setup(e) {
  1890. const t = Ae(), l = C(() => Lo(e.columns));
  1891. return () => {
  1892. const {
  1893. prefixCls: n,
  1894. getComponent: o
  1895. } = t, {
  1896. stickyOffsets: r,
  1897. flattenColumns: a,
  1898. customHeaderRow: i
  1899. } = e, s = o(["header", "wrapper"], "thead"), p = o(["header", "row"], "tr"), c = o(["header", "cell"], "th");
  1900. return u(s, {
  1901. class: `${n}-thead`
  1902. }, {
  1903. default: () => [l.value.map((f, x) => u(jo, {
  1904. key: x,
  1905. flattenColumns: a,
  1906. cells: f,
  1907. stickyOffsets: r,
  1908. rowComponent: p,
  1909. cellComponent: c,
  1910. customHeaderRow: i,
  1911. index: x
  1912. }, null))]
  1913. });
  1914. };
  1915. }
  1916. }), jn = Symbol("ExpandedRowProps"), Wo = (e) => {
  1917. Me(jn, e);
  1918. }, Vo = () => He(jn, {}), Ln = ue({
  1919. name: "ExpandedRow",
  1920. inheritAttrs: !1,
  1921. props: ["prefixCls", "component", "cellComponent", "expanded", "colSpan", "isEmpty"],
  1922. setup(e, t) {
  1923. let {
  1924. slots: l,
  1925. attrs: n
  1926. } = t;
  1927. const o = Ae(), r = Vo(), {
  1928. fixHeader: a,
  1929. fixColumn: i,
  1930. componentWidth: s,
  1931. horizonScroll: p
  1932. } = r;
  1933. return () => {
  1934. const {
  1935. prefixCls: c,
  1936. component: f,
  1937. cellComponent: x,
  1938. expanded: $,
  1939. colSpan: b,
  1940. isEmpty: m
  1941. } = e;
  1942. return u(f, {
  1943. class: n.class,
  1944. style: {
  1945. display: $ ? null : "none"
  1946. }
  1947. }, {
  1948. default: () => [u(Ht, {
  1949. component: x,
  1950. prefixCls: c,
  1951. colSpan: b
  1952. }, {
  1953. default: () => {
  1954. var v;
  1955. let h = (v = l.default) === null || v === void 0 ? void 0 : v.call(l);
  1956. return (m ? p.value : i.value) && (h = u("div", {
  1957. style: {
  1958. width: `${s.value - (a.value ? o.scrollbarSize : 0)}px`,
  1959. position: "sticky",
  1960. left: 0,
  1961. overflow: "hidden"
  1962. },
  1963. class: `${c}-expanded-row-fixed`
  1964. }, [h])), h;
  1965. }
  1966. })]
  1967. });
  1968. };
  1969. }
  1970. }), Xo = ue({
  1971. name: "MeasureCell",
  1972. props: ["columnKey"],
  1973. setup(e, t) {
  1974. let {
  1975. emit: l
  1976. } = t;
  1977. const n = pe();
  1978. return et(() => {
  1979. n.value && l("columnResize", e.columnKey, n.value.offsetWidth);
  1980. }), () => u(On, {
  1981. onResize: (o) => {
  1982. let {
  1983. offsetWidth: r
  1984. } = o;
  1985. l("columnResize", e.columnKey, r);
  1986. }
  1987. }, {
  1988. default: () => [u("td", {
  1989. ref: n,
  1990. style: {
  1991. padding: 0,
  1992. border: 0,
  1993. height: 0
  1994. }
  1995. }, [u("div", {
  1996. style: {
  1997. height: 0,
  1998. overflow: "hidden"
  1999. }
  2000. }, [At(" ")])])]
  2001. });
  2002. }
  2003. }), Wn = Symbol("BodyContextProps"), Uo = (e) => {
  2004. Me(Wn, e);
  2005. }, Vn = () => He(Wn, {}), Go = ue({
  2006. name: "BodyRow",
  2007. inheritAttrs: !1,
  2008. props: ["record", "index", "renderIndex", "recordKey", "expandedKeys", "rowComponent", "cellComponent", "customRow", "rowExpandable", "indent", "rowKey", "getRowKey", "childrenColumnName"],
  2009. setup(e, t) {
  2010. let {
  2011. attrs: l
  2012. } = t;
  2013. const n = Ae(), o = Vn(), r = ce(!1), a = C(() => e.expandedKeys && e.expandedKeys.has(e.recordKey));
  2014. Re(() => {
  2015. a.value && (r.value = !0);
  2016. });
  2017. const i = C(() => o.expandableType === "row" && (!e.rowExpandable || e.rowExpandable(e.record))), s = C(() => o.expandableType === "nest"), p = C(() => e.childrenColumnName && e.record && e.record[e.childrenColumnName]), c = C(() => i.value || s.value), f = (v, h) => {
  2018. o.onTriggerExpand(v, h);
  2019. }, x = C(() => {
  2020. var v;
  2021. return ((v = e.customRow) === null || v === void 0 ? void 0 : v.call(e, e.record, e.index)) || {};
  2022. }), $ = function(v) {
  2023. var h, y;
  2024. o.expandRowByClick && c.value && f(e.record, v);
  2025. for (var d = arguments.length, E = new Array(d > 1 ? d - 1 : 0), O = 1; O < d; O++)
  2026. E[O - 1] = arguments[O];
  2027. (y = (h = x.value) === null || h === void 0 ? void 0 : h.onClick) === null || y === void 0 || y.call(h, v, ...E);
  2028. }, b = C(() => {
  2029. const {
  2030. record: v,
  2031. index: h,
  2032. indent: y
  2033. } = e, {
  2034. rowClassName: d
  2035. } = o;
  2036. return typeof d == "string" ? d : typeof d == "function" ? d(v, h, y) : "";
  2037. }), m = C(() => ht(o.flattenColumns));
  2038. return () => {
  2039. const {
  2040. class: v,
  2041. style: h
  2042. } = l, {
  2043. record: y,
  2044. index: d,
  2045. rowKey: E,
  2046. indent: O = 0,
  2047. rowComponent: z,
  2048. cellComponent: S
  2049. } = e, {
  2050. prefixCls: H,
  2051. fixedInfoList: T,
  2052. transformCellText: R
  2053. } = n, {
  2054. flattenColumns: k,
  2055. expandedRowClassName: B,
  2056. indentSize: M,
  2057. expandIcon: J,
  2058. expandedRowRender: Z,
  2059. expandIconColumnIndex: ee
  2060. } = o, fe = u(z, G(G({}, x.value), {}, {
  2061. "data-row-key": E,
  2062. class: te(v, `${H}-row`, `${H}-row-level-${O}`, b.value, x.value.class),
  2063. style: [h, x.value.style],
  2064. onClick: $
  2065. }), {
  2066. default: () => [k.map((L, j) => {
  2067. const {
  2068. customRender: q,
  2069. dataIndex: w,
  2070. className: K
  2071. } = L, N = m[j], A = T[j];
  2072. let F;
  2073. L.customCell && (F = L.customCell(y, d, L));
  2074. const oe = j === (ee || 0) && s.value ? u(Xe, null, [u("span", {
  2075. style: {
  2076. paddingLeft: `${M * O}px`
  2077. },
  2078. class: `${H}-row-indent indent-level-${O}`
  2079. }, null), J({
  2080. prefixCls: H,
  2081. expanded: a.value,
  2082. expandable: p.value,
  2083. record: y,
  2084. onExpand: f
  2085. })]) : null;
  2086. return u(Ht, G(G({
  2087. cellType: "body",
  2088. class: K,
  2089. ellipsis: L.ellipsis,
  2090. align: L.align,
  2091. component: S,
  2092. prefixCls: H,
  2093. key: N,
  2094. record: y,
  2095. index: d,
  2096. renderIndex: e.renderIndex,
  2097. dataIndex: w,
  2098. customRender: q
  2099. }, A), {}, {
  2100. additionalProps: F,
  2101. column: L,
  2102. transformCellText: R,
  2103. appendNode: oe
  2104. }), null);
  2105. })]
  2106. });
  2107. let le;
  2108. if (i.value && (r.value || a.value)) {
  2109. const L = Z({
  2110. record: y,
  2111. index: d,
  2112. indent: O + 1,
  2113. expanded: a.value
  2114. }), j = B && B(y, d, O);
  2115. le = u(Ln, {
  2116. expanded: a.value,
  2117. class: te(`${H}-expanded-row`, `${H}-expanded-row-level-${O + 1}`, j),
  2118. prefixCls: H,
  2119. component: z,
  2120. cellComponent: S,
  2121. colSpan: k.length,
  2122. isEmpty: !1
  2123. }, {
  2124. default: () => [L]
  2125. });
  2126. }
  2127. return u(Xe, null, [fe, le]);
  2128. };
  2129. }
  2130. });
  2131. function Xn(e, t, l, n, o, r) {
  2132. const a = [];
  2133. a.push({
  2134. record: e,
  2135. indent: t,
  2136. index: r
  2137. });
  2138. const i = o(e), s = n == null ? void 0 : n.has(i);
  2139. if (e && Array.isArray(e[l]) && s)
  2140. for (let p = 0; p < e[l].length; p += 1) {
  2141. const c = Xn(e[l][p], t + 1, l, n, o, p);
  2142. a.push(...c);
  2143. }
  2144. return a;
  2145. }
  2146. function Jo(e, t, l, n) {
  2147. return C(() => {
  2148. const r = t.value, a = l.value, i = e.value;
  2149. if (a != null && a.size) {
  2150. const s = [];
  2151. for (let p = 0; p < (i == null ? void 0 : i.length); p += 1) {
  2152. const c = i[p];
  2153. s.push(...Xn(c, 0, r, a, n.value, p));
  2154. }
  2155. return s;
  2156. }
  2157. return i == null ? void 0 : i.map((s, p) => ({
  2158. record: s,
  2159. indent: 0,
  2160. index: p
  2161. }));
  2162. });
  2163. }
  2164. const Un = Symbol("ResizeContextProps"), qo = (e) => {
  2165. Me(Un, e);
  2166. }, Yo = () => He(Un, {
  2167. onColumnResize: () => {
  2168. }
  2169. }), Qo = ue({
  2170. name: "TableBody",
  2171. props: ["data", "getRowKey", "measureColumnWidth", "expandedKeys", "customRow", "rowExpandable", "childrenColumnName"],
  2172. setup(e, t) {
  2173. let {
  2174. slots: l
  2175. } = t;
  2176. const n = Yo(), o = Ae(), r = Vn(), a = Jo(xe(e, "data"), xe(e, "childrenColumnName"), xe(e, "expandedKeys"), xe(e, "getRowKey")), i = ce(-1), s = ce(-1);
  2177. let p;
  2178. return ko({
  2179. startRow: i,
  2180. endRow: s,
  2181. onHover: (c, f) => {
  2182. clearTimeout(p), p = setTimeout(() => {
  2183. i.value = c, s.value = f;
  2184. }, 100);
  2185. }
  2186. }), () => {
  2187. var c;
  2188. const {
  2189. data: f,
  2190. getRowKey: x,
  2191. measureColumnWidth: $,
  2192. expandedKeys: b,
  2193. customRow: m,
  2194. rowExpandable: v,
  2195. childrenColumnName: h
  2196. } = e, {
  2197. onColumnResize: y
  2198. } = n, {
  2199. prefixCls: d,
  2200. getComponent: E
  2201. } = o, {
  2202. flattenColumns: O
  2203. } = r, z = E(["body", "wrapper"], "tbody"), S = E(["body", "row"], "tr"), H = E(["body", "cell"], "td");
  2204. let T;
  2205. f.length ? T = a.value.map((k, B) => {
  2206. const {
  2207. record: M,
  2208. indent: J,
  2209. index: Z
  2210. } = k, ee = x(M, B);
  2211. return u(Go, {
  2212. key: ee,
  2213. rowKey: ee,
  2214. record: M,
  2215. recordKey: ee,
  2216. index: B,
  2217. renderIndex: Z,
  2218. rowComponent: S,
  2219. cellComponent: H,
  2220. expandedKeys: b,
  2221. customRow: m,
  2222. getRowKey: x,
  2223. rowExpandable: v,
  2224. childrenColumnName: h,
  2225. indent: J
  2226. }, null);
  2227. }) : T = u(Ln, {
  2228. expanded: !0,
  2229. class: `${d}-placeholder`,
  2230. prefixCls: d,
  2231. component: S,
  2232. cellComponent: H,
  2233. colSpan: O.length,
  2234. isEmpty: !0
  2235. }, {
  2236. default: () => [(c = l.emptyNode) === null || c === void 0 ? void 0 : c.call(l)]
  2237. });
  2238. const R = ht(O);
  2239. return u(z, {
  2240. class: `${d}-tbody`
  2241. }, {
  2242. default: () => [$ && u("tr", {
  2243. "aria-hidden": "true",
  2244. class: `${d}-measure-row`,
  2245. style: {
  2246. height: 0,
  2247. fontSize: 0
  2248. }
  2249. }, [R.map((k) => u(Xo, {
  2250. key: k,
  2251. columnKey: k,
  2252. onColumnResize: y
  2253. }, null))]), T]
  2254. });
  2255. };
  2256. }
  2257. }), _e = {};
  2258. var Zo = function(e, t) {
  2259. var l = {};
  2260. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  2261. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  2262. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  2263. return l;
  2264. };
  2265. function Rt(e) {
  2266. return e.reduce((t, l) => {
  2267. const {
  2268. fixed: n
  2269. } = l, o = n === !0 ? "left" : n, r = l.children;
  2270. return r && r.length > 0 ? [...t, ...Rt(r).map((a) => g({
  2271. fixed: o
  2272. }, a))] : [...t, g(g({}, l), {
  2273. fixed: o
  2274. })];
  2275. }, []);
  2276. }
  2277. function er(e) {
  2278. let t = !0;
  2279. for (let n = 0; n < e.length; n += 1) {
  2280. const o = e[n];
  2281. if (t && o.fixed !== "left")
  2282. t = !1;
  2283. else if (!t && o.fixed === "left") {
  2284. ze(!1, `Index ${n - 1} of \`columns\` missing \`fixed='left'\` prop.`);
  2285. break;
  2286. }
  2287. }
  2288. let l = !0;
  2289. for (let n = e.length - 1; n >= 0; n -= 1) {
  2290. const o = e[n];
  2291. if (l && o.fixed !== "right")
  2292. l = !1;
  2293. else if (!l && o.fixed === "right") {
  2294. ze(!1, `Index ${n + 1} of \`columns\` missing \`fixed='right'\` prop.`);
  2295. break;
  2296. }
  2297. }
  2298. }
  2299. function tr(e) {
  2300. return e.map((t) => {
  2301. const {
  2302. fixed: l
  2303. } = t, n = Zo(t, ["fixed"]);
  2304. let o = l;
  2305. return l === "left" ? o = "right" : l === "right" && (o = "left"), g({
  2306. fixed: o
  2307. }, n);
  2308. });
  2309. }
  2310. function nr(e, t) {
  2311. let {
  2312. prefixCls: l,
  2313. columns: n,
  2314. // children,
  2315. expandable: o,
  2316. expandedKeys: r,
  2317. getRowKey: a,
  2318. onTriggerExpand: i,
  2319. expandIcon: s,
  2320. rowExpandable: p,
  2321. expandIconColumnIndex: c,
  2322. direction: f,
  2323. expandRowByClick: x,
  2324. expandColumnWidth: $,
  2325. expandFixed: b
  2326. } = e;
  2327. const m = Mt(), v = C(() => {
  2328. if (o.value) {
  2329. let d = n.value.slice();
  2330. if (process.env.NODE_ENV !== "production" && c.value >= 0 && ze(!1, "`expandIconColumnIndex` is deprecated. Please use `Table.EXPAND_COLUMN` in `columns` instead."), !d.includes(_e)) {
  2331. const M = c.value || 0;
  2332. M >= 0 && d.splice(M, 0, _e);
  2333. }
  2334. process.env.NODE_ENV !== "production" && d.filter((M) => M === _e).length > 1 && ze(!1, "There exist more than one `EXPAND_COLUMN` in `columns`.");
  2335. const E = d.indexOf(_e);
  2336. d = d.filter((M, J) => M !== _e || J === E);
  2337. const O = n.value[E];
  2338. let z;
  2339. (b.value === "left" || b.value) && !c.value ? z = "left" : (b.value === "right" || b.value) && c.value === n.value.length ? z = "right" : z = O ? O.fixed : null;
  2340. const S = r.value, H = p.value, T = s.value, R = l.value, k = x.value, B = {
  2341. [Ze]: {
  2342. class: `${l.value}-expand-icon-col`,
  2343. columnType: "EXPAND_COLUMN"
  2344. },
  2345. title: Ft(m.value, "expandColumnTitle", {}, () => [""]),
  2346. fixed: z,
  2347. class: `${l.value}-row-expand-icon-cell`,
  2348. width: $.value,
  2349. customRender: (M) => {
  2350. let {
  2351. record: J,
  2352. index: Z
  2353. } = M;
  2354. const ee = a.value(J, Z), fe = S.has(ee), le = H ? H(J) : !0, L = T({
  2355. prefixCls: R,
  2356. expanded: fe,
  2357. expandable: le,
  2358. record: J,
  2359. onExpand: i
  2360. });
  2361. return k ? u("span", {
  2362. onClick: (j) => j.stopPropagation()
  2363. }, [L]) : L;
  2364. }
  2365. };
  2366. return d.map((M) => M === _e ? B : M);
  2367. }
  2368. return process.env.NODE_ENV !== "production" && n.value.includes(_e) && ze(!1, "`expandable` is not config but there exist `EXPAND_COLUMN` in `columns`."), n.value.filter((d) => d !== _e);
  2369. }), h = C(() => {
  2370. let d = v.value;
  2371. return t.value && (d = t.value(d)), d.length || (d = [{
  2372. customRender: () => null
  2373. }]), d;
  2374. }), y = C(() => f.value === "rtl" ? tr(Rt(h.value)) : Rt(h.value));
  2375. return process.env.NODE_ENV !== "production" && Re(() => {
  2376. setTimeout(() => {
  2377. er(y.value);
  2378. });
  2379. }), [h, y];
  2380. }
  2381. function Gn(e) {
  2382. const t = ce(e);
  2383. let l;
  2384. const n = ce([]);
  2385. function o(r) {
  2386. n.value.push(r), rt.cancel(l), l = rt(() => {
  2387. const a = n.value;
  2388. n.value = [], a.forEach((i) => {
  2389. t.value = i(t.value);
  2390. });
  2391. });
  2392. }
  2393. return tt(() => {
  2394. rt.cancel(l);
  2395. }), [t, o];
  2396. }
  2397. function lr(e) {
  2398. const t = pe(null), l = pe();
  2399. function n() {
  2400. clearTimeout(l.value);
  2401. }
  2402. function o(a) {
  2403. t.value = a, n(), l.value = setTimeout(() => {
  2404. t.value = null, l.value = void 0;
  2405. }, 100);
  2406. }
  2407. function r() {
  2408. return t.value;
  2409. }
  2410. return tt(() => {
  2411. n();
  2412. }), [o, r];
  2413. }
  2414. function or(e, t, l) {
  2415. return C(() => {
  2416. const o = [], r = [];
  2417. let a = 0, i = 0;
  2418. const s = e.value, p = t.value, c = l.value;
  2419. for (let f = 0; f < p; f += 1)
  2420. if (c === "rtl") {
  2421. r[f] = i, i += s[f] || 0;
  2422. const x = p - f - 1;
  2423. o[x] = a, a += s[x] || 0;
  2424. } else {
  2425. o[f] = a, a += s[f] || 0;
  2426. const x = p - f - 1;
  2427. r[x] = i, i += s[x] || 0;
  2428. }
  2429. return {
  2430. left: o,
  2431. right: r
  2432. };
  2433. });
  2434. }
  2435. var rr = function(e, t) {
  2436. var l = {};
  2437. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  2438. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  2439. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  2440. return l;
  2441. };
  2442. function Jn(e) {
  2443. let {
  2444. colWidths: t,
  2445. columns: l,
  2446. columCount: n
  2447. } = e;
  2448. const o = [], r = n || l.length;
  2449. let a = !1;
  2450. for (let i = r - 1; i >= 0; i -= 1) {
  2451. const s = t[i], p = l && l[i], c = p && p[Ze];
  2452. if (s || c || a) {
  2453. const f = c || {}, x = rr(f, ["columnType"]);
  2454. o.unshift(u("col", G({
  2455. key: i,
  2456. style: {
  2457. width: typeof s == "number" ? `${s}px` : s
  2458. }
  2459. }, x), null)), a = !0;
  2460. }
  2461. }
  2462. return u("colgroup", null, [o]);
  2463. }
  2464. function Ot(e, t) {
  2465. let {
  2466. slots: l
  2467. } = t;
  2468. var n;
  2469. return u("div", null, [(n = l.default) === null || n === void 0 ? void 0 : n.call(l)]);
  2470. }
  2471. Ot.displayName = "Panel";
  2472. let ar = 0;
  2473. const ir = ue({
  2474. name: "TableSummary",
  2475. props: ["fixed"],
  2476. setup(e, t) {
  2477. let {
  2478. slots: l
  2479. } = t;
  2480. const n = Ae(), o = `table-summary-uni-key-${++ar}`, r = C(() => e.fixed === "" || e.fixed);
  2481. return Re(() => {
  2482. n.summaryCollect(o, r.value);
  2483. }), tt(() => {
  2484. n.summaryCollect(o, !1);
  2485. }), () => {
  2486. var a;
  2487. return (a = l.default) === null || a === void 0 ? void 0 : a.call(l);
  2488. };
  2489. }
  2490. }), qn = Symbol("SummaryContextProps"), sr = (e) => {
  2491. Me(qn, e);
  2492. }, aa = () => He(qn, {}), ct = ue({
  2493. name: "TableFooter",
  2494. inheritAttrs: !1,
  2495. props: ["stickyOffsets", "flattenColumns"],
  2496. setup(e, t) {
  2497. let {
  2498. slots: l
  2499. } = t;
  2500. const n = Ae();
  2501. return sr(Qe({
  2502. stickyOffsets: xe(e, "stickyOffsets"),
  2503. flattenColumns: xe(e, "flattenColumns"),
  2504. scrollColumnIndex: C(() => {
  2505. const o = e.flattenColumns.length - 1, r = e.flattenColumns[o];
  2506. return r != null && r.scrollbar ? o : null;
  2507. })
  2508. })), () => {
  2509. var o;
  2510. const {
  2511. prefixCls: r
  2512. } = n;
  2513. return u("tfoot", {
  2514. class: `${r}-summary`
  2515. }, [(o = l.default) === null || o === void 0 ? void 0 : o.call(l)]);
  2516. };
  2517. }
  2518. }), ia = ir;
  2519. function cr(e) {
  2520. let {
  2521. prefixCls: t,
  2522. record: l,
  2523. onExpand: n,
  2524. expanded: o,
  2525. expandable: r
  2526. } = e;
  2527. const a = `${t}-row-expand-icon`;
  2528. if (!r)
  2529. return u("span", {
  2530. class: [a, `${t}-row-spaced`]
  2531. }, null);
  2532. const i = (s) => {
  2533. n(l, s), s.stopPropagation();
  2534. };
  2535. return u("span", {
  2536. class: {
  2537. [a]: !0,
  2538. [`${t}-row-expanded`]: o,
  2539. [`${t}-row-collapsed`]: !o
  2540. },
  2541. onClick: i
  2542. }, null);
  2543. }
  2544. function ur(e, t, l) {
  2545. const n = [];
  2546. function o(r) {
  2547. (r || []).forEach((a, i) => {
  2548. n.push(t(a, i)), o(a[l]);
  2549. });
  2550. }
  2551. return o(e), n;
  2552. }
  2553. const dr = ue({
  2554. name: "StickyScrollBar",
  2555. inheritAttrs: !1,
  2556. props: ["offsetScroll", "container", "scrollBodyRef", "scrollBodySizeInfo"],
  2557. emits: ["scroll"],
  2558. setup(e, t) {
  2559. let {
  2560. emit: l,
  2561. expose: n
  2562. } = t;
  2563. const o = Ae(), r = ce(0), a = ce(0), i = ce(0);
  2564. Re(() => {
  2565. r.value = e.scrollBodySizeInfo.scrollWidth || 0, a.value = e.scrollBodySizeInfo.clientWidth || 0, i.value = r.value && a.value * (a.value / r.value);
  2566. }, {
  2567. flush: "post"
  2568. });
  2569. const s = ce(), [p, c] = Gn({
  2570. scrollLeft: 0,
  2571. isHiddenScrollBar: !0
  2572. }), f = pe({
  2573. delta: 0,
  2574. x: 0
  2575. }), x = ce(!1), $ = () => {
  2576. x.value = !1;
  2577. }, b = (S) => {
  2578. f.value = {
  2579. delta: S.pageX - p.value.scrollLeft,
  2580. x: 0
  2581. }, x.value = !0, S.preventDefault();
  2582. }, m = (S) => {
  2583. const {
  2584. buttons: H
  2585. } = S || (window == null ? void 0 : window.event);
  2586. if (!x.value || H === 0) {
  2587. x.value && (x.value = !1);
  2588. return;
  2589. }
  2590. let T = f.value.x + S.pageX - f.value.x - f.value.delta;
  2591. T <= 0 && (T = 0), T + i.value >= a.value && (T = a.value - i.value), l("scroll", {
  2592. scrollLeft: T / a.value * (r.value + 2)
  2593. }), f.value.x = S.pageX;
  2594. }, v = () => {
  2595. if (!e.scrollBodyRef.value)
  2596. return;
  2597. const S = tn(e.scrollBodyRef.value).top, H = S + e.scrollBodyRef.value.offsetHeight, T = e.container === window ? document.documentElement.scrollTop + window.innerHeight : tn(e.container).top + e.container.clientHeight;
  2598. H - en() <= T || S >= T - e.offsetScroll ? c((R) => g(g({}, R), {
  2599. isHiddenScrollBar: !0
  2600. })) : c((R) => g(g({}, R), {
  2601. isHiddenScrollBar: !1
  2602. }));
  2603. };
  2604. n({
  2605. setScrollLeft: (S) => {
  2606. c((H) => g(g({}, H), {
  2607. scrollLeft: S / r.value * a.value || 0
  2608. }));
  2609. }
  2610. });
  2611. let y = null, d = null, E = null, O = null;
  2612. et(() => {
  2613. y = We(document.body, "mouseup", $, !1), d = We(document.body, "mousemove", m, !1), E = We(window, "resize", v, !1);
  2614. }), Ql(() => {
  2615. at(() => {
  2616. v();
  2617. });
  2618. }), et(() => {
  2619. setTimeout(() => {
  2620. Fe([i, x], () => {
  2621. v();
  2622. }, {
  2623. immediate: !0,
  2624. flush: "post"
  2625. });
  2626. });
  2627. }), Fe(() => e.container, () => {
  2628. O == null || O.remove(), O = We(e.container, "scroll", v, !1);
  2629. }, {
  2630. immediate: !0,
  2631. flush: "post"
  2632. }), tt(() => {
  2633. y == null || y.remove(), d == null || d.remove(), O == null || O.remove(), E == null || E.remove();
  2634. }), Fe(() => g({}, p.value), (S, H) => {
  2635. S.isHiddenScrollBar !== (H == null ? void 0 : H.isHiddenScrollBar) && !S.isHiddenScrollBar && c((T) => {
  2636. const R = e.scrollBodyRef.value;
  2637. return R ? g(g({}, T), {
  2638. scrollLeft: R.scrollLeft / R.scrollWidth * R.clientWidth
  2639. }) : T;
  2640. });
  2641. }, {
  2642. immediate: !0
  2643. });
  2644. const z = en();
  2645. return () => {
  2646. if (r.value <= a.value || !i.value || p.value.isHiddenScrollBar)
  2647. return null;
  2648. const {
  2649. prefixCls: S
  2650. } = o;
  2651. return u("div", {
  2652. style: {
  2653. height: `${z}px`,
  2654. width: `${a.value}px`,
  2655. bottom: `${e.offsetScroll}px`
  2656. },
  2657. class: `${S}-sticky-scroll`
  2658. }, [u("div", {
  2659. onMousedown: b,
  2660. ref: s,
  2661. class: te(`${S}-sticky-scroll-bar`, {
  2662. [`${S}-sticky-scroll-bar-active`]: x.value
  2663. }),
  2664. style: {
  2665. width: `${i.value}px`,
  2666. transform: `translate3d(${p.value.scrollLeft}px, 0, 0)`
  2667. }
  2668. }, null)]);
  2669. };
  2670. }
  2671. }), cn = Ol() ? window : null;
  2672. function fr(e, t) {
  2673. return C(() => {
  2674. const {
  2675. offsetHeader: l = 0,
  2676. offsetSummary: n = 0,
  2677. offsetScroll: o = 0,
  2678. getContainer: r = () => cn
  2679. } = typeof e.value == "object" ? e.value : {}, a = r() || cn, i = !!e.value;
  2680. return {
  2681. isSticky: i,
  2682. stickyClassName: i ? `${t.value}-sticky-holder` : "",
  2683. offsetHeader: l,
  2684. offsetSummary: n,
  2685. offsetScroll: o,
  2686. container: a
  2687. };
  2688. });
  2689. }
  2690. function pr(e, t) {
  2691. return C(() => {
  2692. const l = [], n = e.value, o = t.value;
  2693. for (let r = 0; r < o; r += 1) {
  2694. const a = n[r];
  2695. if (a !== void 0)
  2696. l[r] = a;
  2697. else
  2698. return null;
  2699. }
  2700. return l;
  2701. });
  2702. }
  2703. const un = ue({
  2704. name: "FixedHolder",
  2705. inheritAttrs: !1,
  2706. props: ["columns", "flattenColumns", "stickyOffsets", "customHeaderRow", "noData", "maxContentScroll", "colWidths", "columCount", "direction", "fixHeader", "stickyTopOffset", "stickyBottomOffset", "stickyClassName"],
  2707. emits: ["scroll"],
  2708. setup(e, t) {
  2709. let {
  2710. attrs: l,
  2711. slots: n,
  2712. emit: o
  2713. } = t;
  2714. const r = Ae(), a = C(() => r.isSticky && !e.fixHeader ? 0 : r.scrollbarSize), i = pe(), s = (m) => {
  2715. const {
  2716. currentTarget: v,
  2717. deltaX: h
  2718. } = m;
  2719. h && (o("scroll", {
  2720. currentTarget: v,
  2721. scrollLeft: v.scrollLeft + h
  2722. }), m.preventDefault());
  2723. }, p = pe();
  2724. et(() => {
  2725. at(() => {
  2726. p.value = We(i.value, "wheel", s);
  2727. });
  2728. }), tt(() => {
  2729. var m;
  2730. (m = p.value) === null || m === void 0 || m.remove();
  2731. });
  2732. const c = C(() => e.flattenColumns.every((m) => m.width && m.width !== 0 && m.width !== "0px")), f = pe([]), x = pe([]);
  2733. Re(() => {
  2734. const m = e.flattenColumns[e.flattenColumns.length - 1], v = {
  2735. fixed: m ? m.fixed : null,
  2736. scrollbar: !0,
  2737. customHeaderCell: () => ({
  2738. class: `${r.prefixCls}-cell-scrollbar`
  2739. })
  2740. };
  2741. f.value = a.value ? [...e.columns, v] : e.columns, x.value = a.value ? [...e.flattenColumns, v] : e.flattenColumns;
  2742. });
  2743. const $ = C(() => {
  2744. const {
  2745. stickyOffsets: m,
  2746. direction: v
  2747. } = e, {
  2748. right: h,
  2749. left: y
  2750. } = m;
  2751. return g(g({}, m), {
  2752. left: v === "rtl" ? [...y.map((d) => d + a.value), 0] : y,
  2753. right: v === "rtl" ? h : [...h.map((d) => d + a.value), 0],
  2754. isSticky: r.isSticky
  2755. });
  2756. }), b = pr(xe(e, "colWidths"), xe(e, "columCount"));
  2757. return () => {
  2758. var m;
  2759. const {
  2760. noData: v,
  2761. columCount: h,
  2762. stickyTopOffset: y,
  2763. stickyBottomOffset: d,
  2764. stickyClassName: E,
  2765. maxContentScroll: O
  2766. } = e, {
  2767. isSticky: z
  2768. } = r;
  2769. return u("div", {
  2770. style: g({
  2771. overflow: "hidden"
  2772. }, z ? {
  2773. top: `${y}px`,
  2774. bottom: `${d}px`
  2775. } : {}),
  2776. ref: i,
  2777. class: te(l.class, {
  2778. [E]: !!E
  2779. })
  2780. }, [u("table", {
  2781. style: {
  2782. tableLayout: "fixed",
  2783. visibility: v || b.value ? null : "hidden"
  2784. }
  2785. }, [(!v || !O || c.value) && u(Jn, {
  2786. colWidths: b.value ? [...b.value, a.value] : [],
  2787. columCount: h + 1,
  2788. columns: x.value
  2789. }, null), (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g(g({}, e), {
  2790. stickyOffsets: $.value,
  2791. columns: f.value,
  2792. flattenColumns: x.value
  2793. }))])]);
  2794. };
  2795. }
  2796. });
  2797. function dn(e) {
  2798. for (var t = arguments.length, l = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
  2799. l[n - 1] = arguments[n];
  2800. return Qe(io(l.map((o) => [o, xe(e, o)])));
  2801. }
  2802. const mr = [], vr = {}, Nt = "rc-table-internal-hook", hr = ue({
  2803. name: "VcTable",
  2804. inheritAttrs: !1,
  2805. props: ["prefixCls", "data", "columns", "rowKey", "tableLayout", "scroll", "rowClassName", "title", "footer", "id", "showHeader", "components", "customRow", "customHeaderRow", "direction", "expandFixed", "expandColumnWidth", "expandedRowKeys", "defaultExpandedRowKeys", "expandedRowRender", "expandRowByClick", "expandIcon", "onExpand", "onExpandedRowsChange", "onUpdate:expandedRowKeys", "defaultExpandAllRows", "indentSize", "expandIconColumnIndex", "expandedRowClassName", "childrenColumnName", "rowExpandable", "sticky", "transformColumns", "internalHooks", "internalRefs", "canExpandable", "onUpdateInternalRefs", "transformCellText"],
  2806. emits: ["expand", "expandedRowsChange", "updateInternalRefs", "update:expandedRowKeys"],
  2807. setup(e, t) {
  2808. let {
  2809. attrs: l,
  2810. slots: n,
  2811. emit: o
  2812. } = t;
  2813. const r = C(() => e.data || mr), a = C(() => !!r.value.length), i = C(() => Oo(e.components, {})), s = (I, P) => Kn(i.value, I) || P, p = C(() => {
  2814. const I = e.rowKey;
  2815. return typeof I == "function" ? I : (P) => {
  2816. const Q = P && P[I];
  2817. return process.env.NODE_ENV !== "production" && ze(Q !== void 0, "Each record in table should have a unique `key` prop, or set `rowKey` to an unique primary key."), Q;
  2818. };
  2819. }), c = C(() => e.expandIcon || cr), f = C(() => e.childrenColumnName || "children"), x = C(() => e.expandedRowRender ? "row" : e.canExpandable || r.value.some((I) => I && typeof I == "object" && I[f.value]) ? "nest" : !1), $ = ce([]);
  2820. Re(() => {
  2821. e.defaultExpandedRowKeys && ($.value = e.defaultExpandedRowKeys), e.defaultExpandAllRows && ($.value = ur(r.value, p.value, f.value));
  2822. })();
  2823. const m = C(() => new Set(e.expandedRowKeys || $.value || [])), v = (I) => {
  2824. const P = p.value(I, r.value.indexOf(I));
  2825. let Q;
  2826. const de = m.value.has(P);
  2827. de ? (m.value.delete(P), Q = [...m.value]) : Q = [...m.value, P], $.value = Q, o("expand", !de, I), o("update:expandedRowKeys", Q), o("expandedRowsChange", Q);
  2828. };
  2829. process.env.NODE_ENV !== "production" && e.expandedRowRender && r.value.some((I) => Array.isArray(I == null ? void 0 : I[f.value])) && ze(!1, "`expandedRowRender` should not use with nested Table");
  2830. const h = pe(0), [y, d] = nr(g(g({}, $t(e)), {
  2831. // children,
  2832. expandable: C(() => !!e.expandedRowRender),
  2833. expandedKeys: m,
  2834. getRowKey: p,
  2835. onTriggerExpand: v,
  2836. expandIcon: c
  2837. }), C(() => e.internalHooks === Nt ? e.transformColumns : null)), E = C(() => ({
  2838. columns: y.value,
  2839. flattenColumns: d.value
  2840. })), O = pe(), z = pe(), S = pe(), H = pe({
  2841. scrollWidth: 0,
  2842. clientWidth: 0
  2843. }), T = pe(), [R, k] = Ve(!1), [B, M] = Ve(!1), [J, Z] = Gn(/* @__PURE__ */ new Map()), ee = C(() => ht(d.value)), fe = C(() => ee.value.map((I) => J.value.get(I))), le = C(() => d.value.length), L = or(fe, le, xe(e, "direction")), j = C(() => e.scroll && Et(e.scroll.y)), q = C(() => e.scroll && Et(e.scroll.x) || !!e.expandFixed), w = C(() => q.value && d.value.some((I) => {
  2844. let {
  2845. fixed: P
  2846. } = I;
  2847. return P;
  2848. })), K = pe(), N = fr(xe(e, "sticky"), xe(e, "prefixCls")), A = Qe({}), F = C(() => {
  2849. const I = Object.values(A)[0];
  2850. return (j.value || N.value.isSticky) && I;
  2851. }), oe = (I, P) => {
  2852. P ? A[I] = P : delete A[I];
  2853. }, V = pe({}), ge = pe({}), be = pe({});
  2854. Re(() => {
  2855. j.value && (ge.value = {
  2856. overflowY: "scroll",
  2857. maxHeight: nn(e.scroll.y)
  2858. }), q.value && (V.value = {
  2859. overflowX: "auto"
  2860. }, j.value || (ge.value = {
  2861. overflowY: "hidden"
  2862. }), be.value = {
  2863. width: e.scroll.x === !0 ? "auto" : nn(e.scroll.x),
  2864. minWidth: "100%"
  2865. });
  2866. });
  2867. const Se = (I, P) => {
  2868. zl(O.value) && Z((Q) => {
  2869. if (Q.get(I) !== P) {
  2870. const de = new Map(Q);
  2871. return de.set(I, P), de;
  2872. }
  2873. return Q;
  2874. });
  2875. }, [Ee, Oe] = lr();
  2876. function ye(I, P) {
  2877. if (!P)
  2878. return;
  2879. if (typeof P == "function") {
  2880. P(I);
  2881. return;
  2882. }
  2883. const Q = P.$el || P;
  2884. Q.scrollLeft !== I && (Q.scrollLeft = I);
  2885. }
  2886. const $e = (I) => {
  2887. let {
  2888. currentTarget: P,
  2889. scrollLeft: Q
  2890. } = I;
  2891. var de;
  2892. const we = e.direction === "rtl", me = typeof Q == "number" ? Q : P.scrollLeft, Ce = P || vr;
  2893. if ((!Oe() || Oe() === Ce) && (Ee(Ce), ye(me, z.value), ye(me, S.value), ye(me, T.value), ye(me, (de = K.value) === null || de === void 0 ? void 0 : de.setScrollLeft)), P) {
  2894. const {
  2895. scrollWidth: ve,
  2896. clientWidth: Pe
  2897. } = P;
  2898. we ? (k(-me < ve - Pe), M(-me > 0)) : (k(me > 0), M(me < ve - Pe));
  2899. }
  2900. }, _ = () => {
  2901. q.value && S.value ? $e({
  2902. currentTarget: S.value
  2903. }) : (k(!1), M(!1));
  2904. };
  2905. let Y;
  2906. const D = (I) => {
  2907. I !== h.value && (_(), h.value = O.value ? O.value.offsetWidth : I);
  2908. }, W = (I) => {
  2909. let {
  2910. width: P
  2911. } = I;
  2912. if (clearTimeout(Y), h.value === 0) {
  2913. D(P);
  2914. return;
  2915. }
  2916. Y = setTimeout(() => {
  2917. D(P);
  2918. }, 100);
  2919. };
  2920. Fe([q, () => e.data, () => e.columns], () => {
  2921. q.value && _();
  2922. }, {
  2923. flush: "post"
  2924. });
  2925. const [X, re] = Ve(0);
  2926. Do(), et(() => {
  2927. at(() => {
  2928. var I, P;
  2929. _(), re(Nl(S.value).width), H.value = {
  2930. scrollWidth: ((I = S.value) === null || I === void 0 ? void 0 : I.scrollWidth) || 0,
  2931. clientWidth: ((P = S.value) === null || P === void 0 ? void 0 : P.clientWidth) || 0
  2932. };
  2933. });
  2934. }), Zl(() => {
  2935. at(() => {
  2936. var I, P;
  2937. const Q = ((I = S.value) === null || I === void 0 ? void 0 : I.scrollWidth) || 0, de = ((P = S.value) === null || P === void 0 ? void 0 : P.clientWidth) || 0;
  2938. (H.value.scrollWidth !== Q || H.value.clientWidth !== de) && (H.value = {
  2939. scrollWidth: Q,
  2940. clientWidth: de
  2941. });
  2942. });
  2943. }), Re(() => {
  2944. e.internalHooks === Nt && e.internalRefs && e.onUpdateInternalRefs({
  2945. body: S.value ? S.value.$el || S.value : null
  2946. });
  2947. }, {
  2948. flush: "post"
  2949. });
  2950. const U = C(() => e.tableLayout ? e.tableLayout : w.value ? e.scroll.x === "max-content" ? "auto" : "fixed" : j.value || N.value.isSticky || d.value.some((I) => {
  2951. let {
  2952. ellipsis: P
  2953. } = I;
  2954. return P;
  2955. }) ? "fixed" : "auto"), ne = () => {
  2956. var I;
  2957. return a.value ? null : ((I = n.emptyText) === null || I === void 0 ? void 0 : I.call(n)) || "No Data";
  2958. };
  2959. To(Qe(g(g({}, $t(dn(e, "prefixCls", "direction", "transformCellText"))), {
  2960. getComponent: s,
  2961. scrollbarSize: X,
  2962. fixedInfoList: C(() => d.value.map((I, P) => Hn(P, P, d.value, L.value, e.direction))),
  2963. isSticky: C(() => N.value.isSticky),
  2964. summaryCollect: oe
  2965. }))), Uo(Qe(g(g({}, $t(dn(e, "rowClassName", "expandedRowClassName", "expandRowByClick", "expandedRowRender", "expandIconColumnIndex", "indentSize"))), {
  2966. columns: y,
  2967. flattenColumns: d,
  2968. tableLayout: U,
  2969. expandIcon: c,
  2970. expandableType: x,
  2971. onTriggerExpand: v
  2972. }))), qo({
  2973. onColumnResize: Se
  2974. }), Wo({
  2975. componentWidth: h,
  2976. fixHeader: j,
  2977. fixColumn: w,
  2978. horizonScroll: q
  2979. });
  2980. const he = () => u(Qo, {
  2981. data: r.value,
  2982. measureColumnWidth: j.value || q.value || N.value.isSticky,
  2983. expandedKeys: m.value,
  2984. rowExpandable: e.rowExpandable,
  2985. getRowKey: p.value,
  2986. customRow: e.customRow,
  2987. childrenColumnName: f.value
  2988. }, {
  2989. emptyNode: ne
  2990. }), ae = () => u(Jn, {
  2991. colWidths: d.value.map((I) => {
  2992. let {
  2993. width: P
  2994. } = I;
  2995. return P;
  2996. }),
  2997. columns: d.value
  2998. }, null);
  2999. return () => {
  3000. var I;
  3001. const {
  3002. prefixCls: P,
  3003. scroll: Q,
  3004. tableLayout: de,
  3005. direction: we,
  3006. // Additional Part
  3007. title: me = n.title,
  3008. footer: Ce = n.footer,
  3009. // Customize
  3010. id: ve,
  3011. showHeader: Pe,
  3012. customHeaderRow: Ie
  3013. } = e, {
  3014. isSticky: nt,
  3015. offsetHeader: st,
  3016. offsetSummary: il,
  3017. offsetScroll: sl,
  3018. stickyClassName: cl,
  3019. container: ul
  3020. } = N.value, Lt = s(["table"], "table"), xt = s(["body"]), Ge = (I = n.summary) === null || I === void 0 ? void 0 : I.call(n, {
  3021. pageData: r.value
  3022. });
  3023. let bt = () => null;
  3024. const yt = {
  3025. colWidths: fe.value,
  3026. columCount: d.value.length,
  3027. stickyOffsets: L.value,
  3028. customHeaderRow: Ie,
  3029. fixHeader: j.value,
  3030. scroll: Q
  3031. };
  3032. if (process.env.NODE_ENV !== "production" && typeof xt == "function" && a.value && !j.value && ze(!1, "`components.body` with render props is only work on `scroll.y`."), j.value || nt) {
  3033. let Ct = () => null;
  3034. typeof xt == "function" ? (Ct = () => xt(r.value, {
  3035. scrollbarSize: X.value,
  3036. ref: S,
  3037. onScroll: $e
  3038. }), yt.colWidths = d.value.map((Je, fl) => {
  3039. let {
  3040. width: Xt
  3041. } = Je;
  3042. const St = fl === y.value.length - 1 ? Xt - X.value : Xt;
  3043. return typeof St == "number" && !Number.isNaN(St) ? St : (ze(!1, "When use `components.body` with render props. Each column should have a fixed `width` value."), 0);
  3044. })) : Ct = () => u("div", {
  3045. style: g(g({}, V.value), ge.value),
  3046. onScroll: $e,
  3047. ref: S,
  3048. class: te(`${P}-body`)
  3049. }, [u(Lt, {
  3050. style: g(g({}, be.value), {
  3051. tableLayout: U.value
  3052. })
  3053. }, {
  3054. default: () => [ae(), he(), !F.value && Ge && u(ct, {
  3055. stickyOffsets: L.value,
  3056. flattenColumns: d.value
  3057. }, {
  3058. default: () => [Ge]
  3059. })]
  3060. })]);
  3061. const Vt = g(g(g({
  3062. noData: !r.value.length,
  3063. maxContentScroll: q.value && Q.x === "max-content"
  3064. }, yt), E.value), {
  3065. direction: we,
  3066. stickyClassName: cl,
  3067. onScroll: $e
  3068. });
  3069. bt = () => u(Xe, null, [Pe !== !1 && u(un, G(G({}, Vt), {}, {
  3070. stickyTopOffset: st,
  3071. class: `${P}-header`,
  3072. ref: z
  3073. }), {
  3074. default: (Je) => u(Xe, null, [u(sn, Je, null), F.value === "top" && u(ct, Je, {
  3075. default: () => [Ge]
  3076. })])
  3077. }), Ct(), F.value && F.value !== "top" && u(un, G(G({}, Vt), {}, {
  3078. stickyBottomOffset: il,
  3079. class: `${P}-summary`,
  3080. ref: T
  3081. }), {
  3082. default: (Je) => u(ct, Je, {
  3083. default: () => [Ge]
  3084. })
  3085. }), nt && S.value && u(dr, {
  3086. ref: K,
  3087. offsetScroll: sl,
  3088. scrollBodyRef: S,
  3089. onScroll: $e,
  3090. container: ul,
  3091. scrollBodySizeInfo: H.value
  3092. }, null)]);
  3093. } else
  3094. bt = () => u("div", {
  3095. style: g(g({}, V.value), ge.value),
  3096. class: te(`${P}-content`),
  3097. onScroll: $e,
  3098. ref: S
  3099. }, [u(Lt, {
  3100. style: g(g({}, be.value), {
  3101. tableLayout: U.value
  3102. })
  3103. }, {
  3104. default: () => [ae(), Pe !== !1 && u(sn, G(G({}, yt), E.value), null), he(), Ge && u(ct, {
  3105. stickyOffsets: L.value,
  3106. flattenColumns: d.value
  3107. }, {
  3108. default: () => [Ge]
  3109. })]
  3110. })]);
  3111. const dl = Bl(l, {
  3112. aria: !0,
  3113. data: !0
  3114. }), Wt = () => u("div", G(G({}, dl), {}, {
  3115. class: te(P, {
  3116. [`${P}-rtl`]: we === "rtl",
  3117. [`${P}-ping-left`]: R.value,
  3118. [`${P}-ping-right`]: B.value,
  3119. [`${P}-layout-fixed`]: de === "fixed",
  3120. [`${P}-fixed-header`]: j.value,
  3121. /** No used but for compatible */
  3122. [`${P}-fixed-column`]: w.value,
  3123. [`${P}-scroll-horizontal`]: q.value,
  3124. [`${P}-has-fix-left`]: d.value[0] && d.value[0].fixed,
  3125. [`${P}-has-fix-right`]: d.value[le.value - 1] && d.value[le.value - 1].fixed === "right",
  3126. [l.class]: l.class
  3127. }),
  3128. style: l.style,
  3129. id: ve,
  3130. ref: O
  3131. }), [me && u(Ot, {
  3132. class: `${P}-title`
  3133. }, {
  3134. default: () => [me(r.value)]
  3135. }), u("div", {
  3136. class: `${P}-container`
  3137. }, [bt()]), Ce && u(Ot, {
  3138. class: `${P}-footer`
  3139. }, {
  3140. default: () => [Ce(r.value)]
  3141. })]);
  3142. return q.value ? u(On, {
  3143. onResize: W
  3144. }, {
  3145. default: Wt
  3146. }) : Wt();
  3147. };
  3148. }
  3149. });
  3150. function gr() {
  3151. const e = g({}, arguments.length <= 0 ? void 0 : arguments[0]);
  3152. for (let t = 1; t < arguments.length; t++) {
  3153. const l = t < 0 || arguments.length <= t ? void 0 : arguments[t];
  3154. l && Object.keys(l).forEach((n) => {
  3155. const o = l[n];
  3156. o !== void 0 && (e[n] = o);
  3157. });
  3158. }
  3159. return e;
  3160. }
  3161. const Bt = 10;
  3162. function xr(e, t) {
  3163. const l = {
  3164. current: e.current,
  3165. pageSize: e.pageSize
  3166. };
  3167. return Object.keys(t && typeof t == "object" ? t : {}).forEach((o) => {
  3168. const r = e[o];
  3169. typeof r != "function" && (l[o] = r);
  3170. }), l;
  3171. }
  3172. function br(e, t, l) {
  3173. const n = C(() => t.value && typeof t.value == "object" ? t.value : {}), o = C(() => n.value.total || 0), [r, a] = Ve(() => ({
  3174. current: "defaultCurrent" in n.value ? n.value.defaultCurrent : 1,
  3175. pageSize: "defaultPageSize" in n.value ? n.value.defaultPageSize : Bt
  3176. })), i = C(() => {
  3177. const c = gr(r.value, n.value, {
  3178. total: o.value > 0 ? o.value : e.value
  3179. }), f = Math.ceil((o.value || e.value) / c.pageSize);
  3180. return c.current > f && (c.current = f || 1), c;
  3181. }), s = (c, f) => {
  3182. t.value !== !1 && a({
  3183. current: c != null ? c : 1,
  3184. pageSize: f || i.value.pageSize
  3185. });
  3186. }, p = (c, f) => {
  3187. var x, $;
  3188. t.value && (($ = (x = n.value).onChange) === null || $ === void 0 || $.call(x, c, f)), s(c, f), l(c, f || i.value.pageSize);
  3189. };
  3190. return [C(() => t.value === !1 ? {} : g(g({}, i.value), {
  3191. onChange: p
  3192. })), s];
  3193. }
  3194. function yr(e, t, l) {
  3195. const n = ce({});
  3196. Fe([e, t, l], () => {
  3197. const r = /* @__PURE__ */ new Map(), a = l.value, i = t.value;
  3198. function s(p) {
  3199. p.forEach((c, f) => {
  3200. const x = a(c, f);
  3201. r.set(x, c), c && typeof c == "object" && i in c && s(c[i] || []);
  3202. });
  3203. }
  3204. s(e.value), n.value = {
  3205. kvMap: r
  3206. };
  3207. }, {
  3208. deep: !0,
  3209. immediate: !0
  3210. });
  3211. function o(r) {
  3212. return n.value.kvMap.get(r);
  3213. }
  3214. return [o];
  3215. }
  3216. const Ne = {}, fn = "SELECT_ALL", pn = "SELECT_INVERT", mn = "SELECT_NONE", Cr = [];
  3217. function Yn(e, t) {
  3218. let l = [];
  3219. return (t || []).forEach((n) => {
  3220. l.push(n), n && typeof n == "object" && e in n && (l = [...l, ...Yn(e, n[e])]);
  3221. }), l;
  3222. }
  3223. function Sr(e, t) {
  3224. const l = C(() => {
  3225. const T = e.value || {}, {
  3226. checkStrictly: R = !0
  3227. } = T;
  3228. return g(g({}, T), {
  3229. checkStrictly: R
  3230. });
  3231. }), [n, o] = kl(l.value.selectedRowKeys || l.value.defaultSelectedRowKeys || Cr, {
  3232. value: C(() => l.value.selectedRowKeys)
  3233. }), r = ce(/* @__PURE__ */ new Map()), a = (T) => {
  3234. if (l.value.preserveSelectedRowKeys) {
  3235. const R = /* @__PURE__ */ new Map();
  3236. T.forEach((k) => {
  3237. let B = t.getRecordByKey(k);
  3238. !B && r.value.has(k) && (B = r.value.get(k)), R.set(k, B);
  3239. }), r.value = R;
  3240. }
  3241. };
  3242. Re(() => {
  3243. a(n.value);
  3244. });
  3245. const i = C(() => l.value.checkStrictly ? null : eo(t.data.value, {
  3246. externalGetKey: t.getRowKey.value,
  3247. childrenPropName: t.childrenColumnName.value
  3248. }).keyEntities), s = C(() => Yn(t.childrenColumnName.value, t.pageData.value)), p = C(() => {
  3249. const T = /* @__PURE__ */ new Map(), R = t.getRowKey.value, k = l.value.getCheckboxProps;
  3250. return s.value.forEach((B, M) => {
  3251. const J = R(B, M), Z = (k ? k(B) : null) || {};
  3252. T.set(J, Z), process.env.NODE_ENV !== "production" && ("checked" in Z || "defaultChecked" in Z) && Te(!1, "Table", "Do not set `checked` or `defaultChecked` in `getCheckboxProps`. Please use `selectedRowKeys` instead.");
  3253. }), T;
  3254. }), {
  3255. maxLevel: c,
  3256. levelEntities: f
  3257. } = to(i), x = (T) => {
  3258. var R;
  3259. return !!(!((R = p.value.get(t.getRowKey.value(T))) === null || R === void 0) && R.disabled);
  3260. }, $ = C(() => {
  3261. if (l.value.checkStrictly)
  3262. return [n.value || [], []];
  3263. const {
  3264. checkedKeys: T,
  3265. halfCheckedKeys: R
  3266. } = wt(n.value, !0, i.value, c.value, f.value, x);
  3267. return [T || [], R];
  3268. }), b = C(() => $.value[0]), m = C(() => $.value[1]), v = C(() => {
  3269. const T = l.value.type === "radio" ? b.value.slice(0, 1) : b.value;
  3270. return new Set(T);
  3271. }), h = C(() => l.value.type === "radio" ? /* @__PURE__ */ new Set() : new Set(m.value)), [y, d] = Ve(null), E = (T) => {
  3272. let R, k;
  3273. a(T);
  3274. const {
  3275. preserveSelectedRowKeys: B,
  3276. onChange: M
  3277. } = l.value, {
  3278. getRecordByKey: J
  3279. } = t;
  3280. B ? (R = T, k = T.map((Z) => r.value.get(Z))) : (R = [], k = [], T.forEach((Z) => {
  3281. const ee = J(Z);
  3282. ee !== void 0 && (R.push(Z), k.push(ee));
  3283. })), o(R), M == null || M(R, k);
  3284. }, O = (T, R, k, B) => {
  3285. const {
  3286. onSelect: M
  3287. } = l.value, {
  3288. getRecordByKey: J
  3289. } = t || {};
  3290. if (M) {
  3291. const Z = k.map((ee) => J(ee));
  3292. M(J(T), R, Z, B);
  3293. }
  3294. E(k);
  3295. }, z = C(() => {
  3296. const {
  3297. onSelectInvert: T,
  3298. onSelectNone: R,
  3299. selections: k,
  3300. hideSelectAll: B
  3301. } = l.value, {
  3302. data: M,
  3303. pageData: J,
  3304. getRowKey: Z,
  3305. locale: ee
  3306. } = t;
  3307. return !k || B ? null : (k === !0 ? [fn, pn, mn] : k).map((le) => le === fn ? {
  3308. key: "all",
  3309. text: ee.value.selectionAll,
  3310. onSelect() {
  3311. E(M.value.map((L, j) => Z.value(L, j)).filter((L) => {
  3312. const j = p.value.get(L);
  3313. return !(j != null && j.disabled) || v.value.has(L);
  3314. }));
  3315. }
  3316. } : le === pn ? {
  3317. key: "invert",
  3318. text: ee.value.selectInvert,
  3319. onSelect() {
  3320. const L = new Set(v.value);
  3321. J.value.forEach((q, w) => {
  3322. const K = Z.value(q, w), N = p.value.get(K);
  3323. N != null && N.disabled || (L.has(K) ? L.delete(K) : L.add(K));
  3324. });
  3325. const j = Array.from(L);
  3326. T && (Te(!1, "Table", "`onSelectInvert` will be removed in future. Please use `onChange` instead."), T(j)), E(j);
  3327. }
  3328. } : le === mn ? {
  3329. key: "none",
  3330. text: ee.value.selectNone,
  3331. onSelect() {
  3332. R == null || R(), E(Array.from(v.value).filter((L) => {
  3333. const j = p.value.get(L);
  3334. return j == null ? void 0 : j.disabled;
  3335. }));
  3336. }
  3337. } : le);
  3338. }), S = C(() => s.value.length);
  3339. return [(T) => {
  3340. var R;
  3341. const {
  3342. onSelectAll: k,
  3343. onSelectMultiple: B,
  3344. columnWidth: M,
  3345. type: J,
  3346. fixed: Z,
  3347. renderCell: ee,
  3348. hideSelectAll: fe,
  3349. checkStrictly: le
  3350. } = l.value, {
  3351. prefixCls: L,
  3352. getRecordByKey: j,
  3353. getRowKey: q,
  3354. expandType: w,
  3355. getPopupContainer: K
  3356. } = t;
  3357. if (!e.value)
  3358. return process.env.NODE_ENV !== "production" && Te(!T.includes(Ne), "Table", "`rowSelection` is not config but `SELECTION_COLUMN` exists in the `columns`."), T.filter((D) => D !== Ne);
  3359. let N = T.slice();
  3360. const A = new Set(v.value), F = s.value.map(q.value).filter((D) => !p.value.get(D).disabled), oe = F.every((D) => A.has(D)), V = F.some((D) => A.has(D)), ge = () => {
  3361. const D = [];
  3362. oe ? F.forEach((X) => {
  3363. A.delete(X), D.push(X);
  3364. }) : F.forEach((X) => {
  3365. A.has(X) || (A.add(X), D.push(X));
  3366. });
  3367. const W = Array.from(A);
  3368. k == null || k(!oe, W.map((X) => j(X)), D.map((X) => j(X))), E(W);
  3369. };
  3370. let be;
  3371. if (J !== "radio") {
  3372. let D;
  3373. if (z.value) {
  3374. const ne = u(pt, {
  3375. getPopupContainer: K.value
  3376. }, {
  3377. default: () => [z.value.map((he, ae) => {
  3378. const {
  3379. key: I,
  3380. text: P,
  3381. onSelect: Q
  3382. } = he;
  3383. return u(pt.Item, {
  3384. key: I || ae,
  3385. onClick: () => {
  3386. Q == null || Q(F);
  3387. }
  3388. }, {
  3389. default: () => [P]
  3390. });
  3391. })]
  3392. });
  3393. D = u("div", {
  3394. class: `${L.value}-selection-extra`
  3395. }, [u(Nn, {
  3396. overlay: ne,
  3397. getPopupContainer: K.value
  3398. }, {
  3399. default: () => [u("span", null, [u(_l, null, null)])]
  3400. })]);
  3401. }
  3402. const W = s.value.map((ne, he) => {
  3403. const ae = q.value(ne, he), I = p.value.get(ae) || {};
  3404. return g({
  3405. checked: A.has(ae)
  3406. }, I);
  3407. }).filter((ne) => {
  3408. let {
  3409. disabled: he
  3410. } = ne;
  3411. return he;
  3412. }), X = !!W.length && W.length === S.value, re = X && W.every((ne) => {
  3413. let {
  3414. checked: he
  3415. } = ne;
  3416. return he;
  3417. }), U = X && W.some((ne) => {
  3418. let {
  3419. checked: he
  3420. } = ne;
  3421. return he;
  3422. });
  3423. be = !fe && u("div", {
  3424. class: `${L.value}-selection`
  3425. }, [u(mt, {
  3426. checked: X ? re : !!S.value && oe,
  3427. indeterminate: X ? !re && U : !oe && V,
  3428. onChange: ge,
  3429. disabled: S.value === 0 || X,
  3430. "aria-label": D ? "Custom selection" : "Select all",
  3431. skipGroup: !0
  3432. }, null), D]);
  3433. }
  3434. let Se;
  3435. J === "radio" ? Se = (D) => {
  3436. let {
  3437. record: W,
  3438. index: X
  3439. } = D;
  3440. const re = q.value(W, X), U = A.has(re);
  3441. return {
  3442. node: u(kn, G(G({}, p.value.get(re)), {}, {
  3443. checked: U,
  3444. onClick: (ne) => ne.stopPropagation(),
  3445. onChange: (ne) => {
  3446. A.has(re) || O(re, !0, [re], ne.nativeEvent);
  3447. }
  3448. }), null),
  3449. checked: U
  3450. };
  3451. } : Se = (D) => {
  3452. let {
  3453. record: W,
  3454. index: X
  3455. } = D;
  3456. var re;
  3457. const U = q.value(W, X), ne = A.has(U), he = h.value.has(U), ae = p.value.get(U);
  3458. let I;
  3459. return w.value === "nest" ? (I = he, Te(typeof (ae == null ? void 0 : ae.indeterminate) != "boolean", "Table", "set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")) : I = (re = ae == null ? void 0 : ae.indeterminate) !== null && re !== void 0 ? re : he, {
  3460. node: u(mt, G(G({}, ae), {}, {
  3461. indeterminate: I,
  3462. checked: ne,
  3463. skipGroup: !0,
  3464. onClick: (P) => P.stopPropagation(),
  3465. onChange: (P) => {
  3466. let {
  3467. nativeEvent: Q
  3468. } = P;
  3469. const {
  3470. shiftKey: de
  3471. } = Q;
  3472. let we = -1, me = -1;
  3473. if (de && le) {
  3474. const Ce = /* @__PURE__ */ new Set([y.value, U]);
  3475. F.some((ve, Pe) => {
  3476. if (Ce.has(ve))
  3477. if (we === -1)
  3478. we = Pe;
  3479. else
  3480. return me = Pe, !0;
  3481. return !1;
  3482. });
  3483. }
  3484. if (me !== -1 && we !== me && le) {
  3485. const Ce = F.slice(we, me + 1), ve = [];
  3486. ne ? Ce.forEach((Ie) => {
  3487. A.has(Ie) && (ve.push(Ie), A.delete(Ie));
  3488. }) : Ce.forEach((Ie) => {
  3489. A.has(Ie) || (ve.push(Ie), A.add(Ie));
  3490. });
  3491. const Pe = Array.from(A);
  3492. B == null || B(!ne, Pe.map((Ie) => j(Ie)), ve.map((Ie) => j(Ie))), E(Pe);
  3493. } else {
  3494. const Ce = b.value;
  3495. if (le) {
  3496. const ve = ne ? no(Ce, U) : lo(Ce, U);
  3497. O(U, !ne, ve, Q);
  3498. } else {
  3499. const ve = wt([...Ce, U], !0, i.value, c.value, f.value, x), {
  3500. checkedKeys: Pe,
  3501. halfCheckedKeys: Ie
  3502. } = ve;
  3503. let nt = Pe;
  3504. if (ne) {
  3505. const st = new Set(Pe);
  3506. st.delete(U), nt = wt(Array.from(st), {
  3507. checked: !1,
  3508. halfCheckedKeys: Ie
  3509. }, i.value, c.value, f.value, x).checkedKeys;
  3510. }
  3511. O(U, !ne, nt, Q);
  3512. }
  3513. }
  3514. d(U);
  3515. }
  3516. }), null),
  3517. checked: ne
  3518. };
  3519. };
  3520. const Ee = (D) => {
  3521. let {
  3522. record: W,
  3523. index: X
  3524. } = D;
  3525. const {
  3526. node: re,
  3527. checked: U
  3528. } = Se({
  3529. record: W,
  3530. index: X
  3531. });
  3532. return ee ? ee(U, W, X, re) : re;
  3533. };
  3534. if (!N.includes(Ne))
  3535. if (N.findIndex((D) => {
  3536. var W;
  3537. return ((W = D[Ze]) === null || W === void 0 ? void 0 : W.columnType) === "EXPAND_COLUMN";
  3538. }) === 0) {
  3539. const [D, ...W] = N;
  3540. N = [D, Ne, ...W];
  3541. } else
  3542. N = [Ne, ...N];
  3543. const Oe = N.indexOf(Ne);
  3544. process.env.NODE_ENV !== "production" && N.filter((D) => D === Ne).length > 1 && Te(!1, "Table", "Multiple `SELECTION_COLUMN` exist in `columns`."), N = N.filter((D, W) => D !== Ne || W === Oe);
  3545. const ye = N[Oe - 1], $e = N[Oe + 1];
  3546. let _ = Z;
  3547. _ === void 0 && (($e == null ? void 0 : $e.fixed) !== void 0 ? _ = $e.fixed : (ye == null ? void 0 : ye.fixed) !== void 0 && (_ = ye.fixed)), _ && ye && ((R = ye[Ze]) === null || R === void 0 ? void 0 : R.columnType) === "EXPAND_COLUMN" && ye.fixed === void 0 && (ye.fixed = _);
  3548. const Y = {
  3549. fixed: _,
  3550. width: M,
  3551. className: `${L.value}-selection-column`,
  3552. title: l.value.columnTitle || be,
  3553. customRender: Ee,
  3554. [Ze]: {
  3555. class: `${L.value}-selection-col`
  3556. }
  3557. };
  3558. return N.map((D) => D === Ne ? Y : D);
  3559. }, v];
  3560. }
  3561. var $r = function(e, t) {
  3562. var l = {};
  3563. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (l[n] = e[n]);
  3564. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  3565. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (l[n[o]] = e[n[o]]);
  3566. return l;
  3567. };
  3568. function Ue(e, t) {
  3569. return "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex : t;
  3570. }
  3571. function it(e, t) {
  3572. return t ? `${t}-${e}` : `${e}`;
  3573. }
  3574. function jt(e, t) {
  3575. return typeof e == "function" ? e(t) : e;
  3576. }
  3577. function Qn() {
  3578. let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  3579. const t = Rn(e), l = [];
  3580. return t.forEach((n) => {
  3581. var o, r, a, i;
  3582. if (!n)
  3583. return;
  3584. const s = n.key, p = ((o = n.props) === null || o === void 0 ? void 0 : o.style) || {}, c = ((r = n.props) === null || r === void 0 ? void 0 : r.class) || "", f = n.props || {};
  3585. for (const [v, h] of Object.entries(f))
  3586. f[Dl(v)] = h;
  3587. const x = n.children || {}, {
  3588. default: $
  3589. } = x, b = $r(x, ["default"]), m = g(g(g({}, b), f), {
  3590. style: p,
  3591. class: c
  3592. });
  3593. if (s && (m.key = s), !((a = n.type) === null || a === void 0) && a.__ANT_TABLE_COLUMN_GROUP)
  3594. m.children = Qn(typeof $ == "function" ? $() : $);
  3595. else {
  3596. const v = (i = n.children) === null || i === void 0 ? void 0 : i.default;
  3597. m.customRender = m.customRender || v;
  3598. }
  3599. l.push(m);
  3600. }), l;
  3601. }
  3602. const dt = "ascend", It = "descend";
  3603. function vt(e) {
  3604. return typeof e.sorter == "object" && typeof e.sorter.multiple == "number" ? e.sorter.multiple : !1;
  3605. }
  3606. function vn(e) {
  3607. return typeof e == "function" ? e : e && typeof e == "object" && e.compare ? e.compare : !1;
  3608. }
  3609. function wr(e, t) {
  3610. return t ? e[e.indexOf(t) + 1] : e[0];
  3611. }
  3612. function zt(e, t, l) {
  3613. let n = [];
  3614. function o(r, a) {
  3615. n.push({
  3616. column: r,
  3617. key: Ue(r, a),
  3618. multiplePriority: vt(r),
  3619. sortOrder: r.sortOrder
  3620. });
  3621. }
  3622. return (e || []).forEach((r, a) => {
  3623. const i = it(a, l);
  3624. r.children ? ("sortOrder" in r && o(r, i), n = [...n, ...zt(r.children, t, i)]) : r.sorter && ("sortOrder" in r ? o(r, i) : t && r.defaultSortOrder && n.push({
  3625. column: r,
  3626. key: Ue(r, i),
  3627. multiplePriority: vt(r),
  3628. sortOrder: r.defaultSortOrder
  3629. }));
  3630. }), n;
  3631. }
  3632. function Zn(e, t, l, n, o, r, a, i) {
  3633. return (t || []).map((s, p) => {
  3634. const c = it(p, i);
  3635. let f = s;
  3636. if (f.sorter) {
  3637. const x = f.sortDirections || o, $ = f.showSorterTooltip === void 0 ? a : f.showSorterTooltip, b = Ue(f, c), m = l.find((T) => {
  3638. let {
  3639. key: R
  3640. } = T;
  3641. return R === b;
  3642. }), v = m ? m.sortOrder : null, h = wr(x, v), y = x.includes(dt) && u(Kl, {
  3643. class: te(`${e}-column-sorter-up`, {
  3644. active: v === dt
  3645. }),
  3646. role: "presentation"
  3647. }, null), d = x.includes(It) && u(Fl, {
  3648. role: "presentation",
  3649. class: te(`${e}-column-sorter-down`, {
  3650. active: v === It
  3651. })
  3652. }, null), {
  3653. cancelSort: E,
  3654. triggerAsc: O,
  3655. triggerDesc: z
  3656. } = r || {};
  3657. let S = E;
  3658. h === It ? S = z : h === dt && (S = O);
  3659. const H = typeof $ == "object" ? $ : {
  3660. title: S
  3661. };
  3662. f = g(g({}, f), {
  3663. className: te(f.className, {
  3664. [`${e}-column-sort`]: v
  3665. }),
  3666. title: (T) => {
  3667. const R = u("div", {
  3668. class: `${e}-column-sorters`
  3669. }, [u("span", {
  3670. class: `${e}-column-title`
  3671. }, [jt(s.title, T)]), u("span", {
  3672. class: te(`${e}-column-sorter`, {
  3673. [`${e}-column-sorter-full`]: !!(y && d)
  3674. })
  3675. }, [u("span", {
  3676. class: `${e}-column-sorter-inner`
  3677. }, [y, d])])]);
  3678. return $ ? u(Al, H, {
  3679. default: () => [R]
  3680. }) : R;
  3681. },
  3682. customHeaderCell: (T) => {
  3683. const R = s.customHeaderCell && s.customHeaderCell(T) || {}, k = R.onClick, B = R.onKeydown;
  3684. return R.onClick = (M) => {
  3685. n({
  3686. column: s,
  3687. key: b,
  3688. sortOrder: h,
  3689. multiplePriority: vt(s)
  3690. }), k && k(M);
  3691. }, R.onKeydown = (M) => {
  3692. M.keyCode === Bn.ENTER && (n({
  3693. column: s,
  3694. key: b,
  3695. sortOrder: h,
  3696. multiplePriority: vt(s)
  3697. }), B == null || B(M));
  3698. }, v && (R["aria-sort"] = v === "ascend" ? "ascending" : "descending"), R.class = te(R.class, `${e}-column-has-sorters`), R.tabindex = 0, R;
  3699. }
  3700. });
  3701. }
  3702. return "children" in f && (f = g(g({}, f), {
  3703. children: Zn(e, f.children, l, n, o, r, a, c)
  3704. })), f;
  3705. });
  3706. }
  3707. function hn(e) {
  3708. const {
  3709. column: t,
  3710. sortOrder: l
  3711. } = e;
  3712. return {
  3713. column: t,
  3714. order: l,
  3715. field: t.dataIndex,
  3716. columnKey: t.key
  3717. };
  3718. }
  3719. function gn(e) {
  3720. const t = e.filter((l) => {
  3721. let {
  3722. sortOrder: n
  3723. } = l;
  3724. return n;
  3725. }).map(hn);
  3726. return t.length === 0 && e.length ? g(g({}, hn(e[e.length - 1])), {
  3727. column: void 0
  3728. }) : t.length <= 1 ? t[0] || {} : t;
  3729. }
  3730. function kt(e, t, l) {
  3731. const n = t.slice().sort((a, i) => i.multiplePriority - a.multiplePriority), o = e.slice(), r = n.filter((a) => {
  3732. let {
  3733. column: {
  3734. sorter: i
  3735. },
  3736. sortOrder: s
  3737. } = a;
  3738. return vn(i) && s;
  3739. });
  3740. return r.length ? o.sort((a, i) => {
  3741. for (let s = 0; s < r.length; s += 1) {
  3742. const p = r[s], {
  3743. column: {
  3744. sorter: c
  3745. },
  3746. sortOrder: f
  3747. } = p, x = vn(c);
  3748. if (x && f) {
  3749. const $ = x(a, i, f);
  3750. if ($ !== 0)
  3751. return f === dt ? $ : -$;
  3752. }
  3753. }
  3754. return 0;
  3755. }).map((a) => {
  3756. const i = a[l];
  3757. return i ? g(g({}, a), {
  3758. [l]: kt(i, t, l)
  3759. }) : a;
  3760. }) : o;
  3761. }
  3762. function Ir(e) {
  3763. let {
  3764. prefixCls: t,
  3765. mergedColumns: l,
  3766. onSorterChange: n,
  3767. sortDirections: o,
  3768. tableLocale: r,
  3769. showSorterTooltip: a
  3770. } = e;
  3771. const [i, s] = Ve(zt(l.value, !0)), p = C(() => {
  3772. let b = !0;
  3773. const m = zt(l.value, !1);
  3774. if (!m.length)
  3775. return i.value;
  3776. const v = [];
  3777. function h(d) {
  3778. b ? v.push(d) : v.push(g(g({}, d), {
  3779. sortOrder: null
  3780. }));
  3781. }
  3782. let y = null;
  3783. return m.forEach((d) => {
  3784. y === null ? (h(d), d.sortOrder && (d.multiplePriority === !1 ? b = !1 : y = !0)) : (y && d.multiplePriority !== !1 || (b = !1), h(d));
  3785. }), v;
  3786. }), c = C(() => {
  3787. const b = p.value.map((m) => {
  3788. let {
  3789. column: v,
  3790. sortOrder: h
  3791. } = m;
  3792. return {
  3793. column: v,
  3794. order: h
  3795. };
  3796. });
  3797. return {
  3798. sortColumns: b,
  3799. // Legacy
  3800. sortColumn: b[0] && b[0].column,
  3801. sortOrder: b[0] && b[0].order
  3802. };
  3803. });
  3804. function f(b) {
  3805. let m;
  3806. b.multiplePriority === !1 || !p.value.length || p.value[0].multiplePriority === !1 ? m = [b] : m = [...p.value.filter((v) => {
  3807. let {
  3808. key: h
  3809. } = v;
  3810. return h !== b.key;
  3811. }), b], s(m), n(gn(m), m);
  3812. }
  3813. const x = (b) => Zn(t.value, b, p.value, f, o.value, r.value, a.value), $ = C(() => gn(p.value));
  3814. return [x, p, c, $];
  3815. }
  3816. const Pr = (e) => {
  3817. const {
  3818. keyCode: t
  3819. } = e;
  3820. t === Bn.ENTER && e.stopPropagation();
  3821. }, Er = (e, t) => {
  3822. let {
  3823. slots: l
  3824. } = t;
  3825. var n;
  3826. return u("div", {
  3827. onClick: (o) => o.stopPropagation(),
  3828. onKeydown: Pr
  3829. }, [(n = l.default) === null || n === void 0 ? void 0 : n.call(l)]);
  3830. }, xn = ue({
  3831. compatConfig: {
  3832. MODE: 3
  3833. },
  3834. name: "FilterSearch",
  3835. inheritAttrs: !1,
  3836. props: {
  3837. value: Ke(),
  3838. onChange: se(),
  3839. filterSearch: De([Boolean, Function]),
  3840. tablePrefixCls: Ke(),
  3841. locale: Ye()
  3842. },
  3843. setup(e) {
  3844. return () => {
  3845. const {
  3846. value: t,
  3847. onChange: l,
  3848. filterSearch: n,
  3849. tablePrefixCls: o,
  3850. locale: r
  3851. } = e;
  3852. return n ? u("div", {
  3853. class: `${o}-filter-dropdown-search`
  3854. }, [u(Ml, {
  3855. placeholder: r.filterSearchPlaceholder,
  3856. onChange: l,
  3857. value: t,
  3858. htmlSize: 1,
  3859. class: `${o}-filter-dropdown-search-input`
  3860. }, {
  3861. prefix: () => u(Hl, null, null)
  3862. })]) : null;
  3863. };
  3864. }
  3865. });
  3866. function bn(e, t) {
  3867. let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  3868. const n = /* @__PURE__ */ new Set();
  3869. function o(r, a) {
  3870. let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
  3871. const s = n.has(r);
  3872. if (jl(!s, "Warning: There may be circular references"), s)
  3873. return !1;
  3874. if (r === a)
  3875. return !0;
  3876. if (l && i > 1)
  3877. return !1;
  3878. n.add(r);
  3879. const p = i + 1;
  3880. if (Array.isArray(r)) {
  3881. if (!Array.isArray(a) || r.length !== a.length)
  3882. return !1;
  3883. for (let c = 0; c < r.length; c++)
  3884. if (!o(r[c], a[c], p))
  3885. return !1;
  3886. return !0;
  3887. }
  3888. if (r && a && typeof r == "object" && typeof a == "object") {
  3889. const c = Object.keys(r);
  3890. return c.length !== Object.keys(a).length ? !1 : c.every((f) => o(r[f], a[f], p));
  3891. }
  3892. return !1;
  3893. }
  3894. return o(e, t);
  3895. }
  3896. const {
  3897. SubMenu: Tr,
  3898. Item: Rr
  3899. } = pt;
  3900. function Or(e) {
  3901. return e.some((t) => {
  3902. let {
  3903. children: l
  3904. } = t;
  3905. return l && l.length > 0;
  3906. });
  3907. }
  3908. function el(e, t) {
  3909. return typeof t == "string" || typeof t == "number" ? t == null ? void 0 : t.toString().toLowerCase().includes(e.trim().toLowerCase()) : !1;
  3910. }
  3911. function tl(e) {
  3912. let {
  3913. filters: t,
  3914. prefixCls: l,
  3915. filteredKeys: n,
  3916. filterMultiple: o,
  3917. searchValue: r,
  3918. filterSearch: a
  3919. } = e;
  3920. return t.map((i, s) => {
  3921. const p = String(i.value);
  3922. if (i.children)
  3923. return u(Tr, {
  3924. key: p || s,
  3925. title: i.text,
  3926. popupClassName: `${l}-dropdown-submenu`
  3927. }, {
  3928. default: () => [tl({
  3929. filters: i.children,
  3930. prefixCls: l,
  3931. filteredKeys: n,
  3932. filterMultiple: o,
  3933. searchValue: r,
  3934. filterSearch: a
  3935. })]
  3936. });
  3937. const c = o ? mt : kn, f = u(Rr, {
  3938. key: i.value !== void 0 ? p : s
  3939. }, {
  3940. default: () => [u(c, {
  3941. checked: n.includes(p)
  3942. }, null), u("span", null, [i.text])]
  3943. });
  3944. return r.trim() ? typeof a == "function" ? a(r, i) ? f : void 0 : el(r, i.text) ? f : void 0 : f;
  3945. });
  3946. }
  3947. const Nr = ue({
  3948. name: "FilterDropdown",
  3949. props: ["tablePrefixCls", "prefixCls", "dropdownPrefixCls", "column", "filterState", "filterMultiple", "filterMode", "filterSearch", "columnKey", "triggerFilter", "locale", "getPopupContainer"],
  3950. setup(e, t) {
  3951. let {
  3952. slots: l
  3953. } = t;
  3954. const n = Mt(), o = C(() => {
  3955. var w;
  3956. return (w = e.filterMode) !== null && w !== void 0 ? w : "menu";
  3957. }), r = C(() => {
  3958. var w;
  3959. return (w = e.filterSearch) !== null && w !== void 0 ? w : !1;
  3960. }), a = C(() => e.column.filterDropdownOpen || e.column.filterDropdownVisible), i = C(() => e.column.onFilterDropdownOpenChange || e.column.onFilterDropdownVisibleChange);
  3961. process.env.NODE_ENV !== "production" && [["filterDropdownVisible", "filterDropdownOpen", e.column.filterDropdownVisible], ["onFilterDropdownVisibleChange", "onFilterDropdownOpenChange", e.column.onFilterDropdownVisibleChange]].forEach((w) => {
  3962. let [K, N, A] = w;
  3963. Te(A == null, "Table", `\`${K}\` is deprecated. Please use \`${N}\` instead.`);
  3964. });
  3965. const s = ce(!1), p = C(() => {
  3966. var w;
  3967. return !!(e.filterState && (!((w = e.filterState.filteredKeys) === null || w === void 0) && w.length || e.filterState.forceFiltered));
  3968. }), c = C(() => {
  3969. var w;
  3970. return gt((w = e.column) === null || w === void 0 ? void 0 : w.filters);
  3971. }), f = C(() => {
  3972. const {
  3973. filterDropdown: w,
  3974. slots: K = {},
  3975. customFilterDropdown: N
  3976. } = e.column;
  3977. return w || K.filterDropdown && n.value[K.filterDropdown] || N && n.value.customFilterDropdown;
  3978. }), x = C(() => {
  3979. const {
  3980. filterIcon: w,
  3981. slots: K = {}
  3982. } = e.column;
  3983. return w || K.filterIcon && n.value[K.filterIcon] || n.value.customFilterIcon;
  3984. }), $ = (w) => {
  3985. var K;
  3986. s.value = w, (K = i.value) === null || K === void 0 || K.call(i, w);
  3987. }, b = C(() => typeof a.value == "boolean" ? a.value : s.value), m = C(() => {
  3988. var w;
  3989. return (w = e.filterState) === null || w === void 0 ? void 0 : w.filteredKeys;
  3990. }), v = ce([]), h = (w) => {
  3991. let {
  3992. selectedKeys: K
  3993. } = w;
  3994. v.value = K;
  3995. }, y = (w, K) => {
  3996. let {
  3997. node: N,
  3998. checked: A
  3999. } = K;
  4000. e.filterMultiple ? h({
  4001. selectedKeys: w
  4002. }) : h({
  4003. selectedKeys: A && N.key ? [N.key] : []
  4004. });
  4005. };
  4006. Fe(m, () => {
  4007. s.value && h({
  4008. selectedKeys: m.value || []
  4009. });
  4010. }, {
  4011. immediate: !0
  4012. });
  4013. const d = ce([]), E = ce(), O = (w) => {
  4014. E.value = setTimeout(() => {
  4015. d.value = w;
  4016. });
  4017. }, z = () => {
  4018. clearTimeout(E.value);
  4019. };
  4020. tt(() => {
  4021. clearTimeout(E.value);
  4022. });
  4023. const S = ce(""), H = (w) => {
  4024. const {
  4025. value: K
  4026. } = w.target;
  4027. S.value = K;
  4028. };
  4029. Fe(s, () => {
  4030. s.value || (S.value = "");
  4031. });
  4032. const T = (w) => {
  4033. const {
  4034. column: K,
  4035. columnKey: N,
  4036. filterState: A
  4037. } = e, F = w && w.length ? w : null;
  4038. if (F === null && (!A || !A.filteredKeys) || bn(F, A == null ? void 0 : A.filteredKeys, !0))
  4039. return null;
  4040. e.triggerFilter({
  4041. column: K,
  4042. key: N,
  4043. filteredKeys: F
  4044. });
  4045. }, R = () => {
  4046. $(!1), T(v.value);
  4047. }, k = function() {
  4048. let {
  4049. confirm: w,
  4050. closeDropdown: K
  4051. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
  4052. confirm: !1,
  4053. closeDropdown: !1
  4054. };
  4055. w && T([]), K && $(!1), S.value = "", e.column.filterResetToDefaultFilteredValue ? v.value = (e.column.defaultFilteredValue || []).map((N) => String(N)) : v.value = [];
  4056. }, B = function() {
  4057. let {
  4058. closeDropdown: w
  4059. } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
  4060. closeDropdown: !0
  4061. };
  4062. w && $(!1), T(v.value);
  4063. }, M = (w) => {
  4064. w && m.value !== void 0 && (v.value = m.value || []), $(w), !w && !f.value && R();
  4065. }, {
  4066. direction: J
  4067. } = Kt("", e), Z = (w) => {
  4068. if (w.target.checked) {
  4069. const K = c.value;
  4070. v.value = K;
  4071. } else
  4072. v.value = [];
  4073. }, ee = (w) => {
  4074. let {
  4075. filters: K
  4076. } = w;
  4077. return (K || []).map((N, A) => {
  4078. const F = String(N.value), oe = {
  4079. title: N.text,
  4080. key: N.value !== void 0 ? F : A
  4081. };
  4082. return N.children && (oe.children = ee({
  4083. filters: N.children
  4084. })), oe;
  4085. });
  4086. }, fe = (w) => {
  4087. var K;
  4088. return g(g({}, w), {
  4089. text: w.title,
  4090. value: w.key,
  4091. children: ((K = w.children) === null || K === void 0 ? void 0 : K.map((N) => fe(N))) || []
  4092. });
  4093. }, le = C(() => ee({
  4094. filters: e.column.filters
  4095. })), L = C(() => te({
  4096. [`${e.dropdownPrefixCls}-menu-without-submenu`]: !Or(e.column.filters || [])
  4097. })), j = () => {
  4098. const w = v.value, {
  4099. column: K,
  4100. locale: N,
  4101. tablePrefixCls: A,
  4102. filterMultiple: F,
  4103. dropdownPrefixCls: oe,
  4104. getPopupContainer: V,
  4105. prefixCls: ge
  4106. } = e;
  4107. return (K.filters || []).length === 0 ? u(on, {
  4108. image: on.PRESENTED_IMAGE_SIMPLE,
  4109. description: N.filterEmptyText,
  4110. imageStyle: {
  4111. height: 24
  4112. },
  4113. style: {
  4114. margin: 0,
  4115. padding: "16px 0"
  4116. }
  4117. }, null) : o.value === "tree" ? u(Xe, null, [u(xn, {
  4118. filterSearch: r.value,
  4119. value: S.value,
  4120. onChange: H,
  4121. tablePrefixCls: A,
  4122. locale: N
  4123. }, null), u("div", {
  4124. class: `${A}-filter-dropdown-tree`
  4125. }, [F ? u(mt, {
  4126. class: `${A}-filter-dropdown-checkall`,
  4127. onChange: Z,
  4128. checked: w.length === c.value.length,
  4129. indeterminate: w.length > 0 && w.length < c.value.length
  4130. }, {
  4131. default: () => [N.filterCheckall]
  4132. }) : null, u(oo, {
  4133. checkable: !0,
  4134. selectable: !1,
  4135. blockNode: !0,
  4136. multiple: F,
  4137. checkStrictly: !F,
  4138. class: `${oe}-menu`,
  4139. onCheck: y,
  4140. checkedKeys: w,
  4141. selectedKeys: w,
  4142. showIcon: !1,
  4143. treeData: le.value,
  4144. autoExpandParent: !0,
  4145. defaultExpandAll: !0,
  4146. filterTreeNode: S.value.trim() ? (be) => typeof r.value == "function" ? r.value(S.value, fe(be)) : el(S.value, be.title) : void 0
  4147. }, null)])]) : u(Xe, null, [u(xn, {
  4148. filterSearch: r.value,
  4149. value: S.value,
  4150. onChange: H,
  4151. tablePrefixCls: A,
  4152. locale: N
  4153. }, null), u(pt, {
  4154. multiple: F,
  4155. prefixCls: `${oe}-menu`,
  4156. class: L.value,
  4157. onClick: z,
  4158. onSelect: h,
  4159. onDeselect: h,
  4160. selectedKeys: w,
  4161. getPopupContainer: V,
  4162. openKeys: d.value,
  4163. onOpenChange: O
  4164. }, {
  4165. default: () => tl({
  4166. filters: K.filters || [],
  4167. filterSearch: r.value,
  4168. prefixCls: ge,
  4169. filteredKeys: v.value,
  4170. filterMultiple: F,
  4171. searchValue: S.value
  4172. })
  4173. })]);
  4174. }, q = C(() => {
  4175. const w = v.value;
  4176. return e.column.filterResetToDefaultFilteredValue ? bn((e.column.defaultFilteredValue || []).map((K) => String(K)), w, !0) : w.length === 0;
  4177. });
  4178. return () => {
  4179. var w;
  4180. const {
  4181. tablePrefixCls: K,
  4182. prefixCls: N,
  4183. column: A,
  4184. dropdownPrefixCls: F,
  4185. locale: oe,
  4186. getPopupContainer: V
  4187. } = e;
  4188. let ge;
  4189. typeof f.value == "function" ? ge = f.value({
  4190. prefixCls: `${F}-custom`,
  4191. setSelectedKeys: (Ee) => h({
  4192. selectedKeys: Ee
  4193. }),
  4194. selectedKeys: v.value,
  4195. confirm: B,
  4196. clearFilters: k,
  4197. filters: A.filters,
  4198. visible: b.value,
  4199. column: A.__originColumn__,
  4200. close: () => {
  4201. $(!1);
  4202. }
  4203. }) : f.value ? ge = f.value : ge = u(Xe, null, [j(), u("div", {
  4204. class: `${N}-dropdown-btns`
  4205. }, [u(ln, {
  4206. type: "link",
  4207. size: "small",
  4208. disabled: q.value,
  4209. onClick: () => k()
  4210. }, {
  4211. default: () => [oe.filterReset]
  4212. }), u(ln, {
  4213. type: "primary",
  4214. size: "small",
  4215. onClick: R
  4216. }, {
  4217. default: () => [oe.filterConfirm]
  4218. })])]);
  4219. const be = u(Er, {
  4220. class: `${N}-dropdown`
  4221. }, {
  4222. default: () => [ge]
  4223. });
  4224. let Se;
  4225. return typeof x.value == "function" ? Se = x.value({
  4226. filtered: p.value,
  4227. column: A.__originColumn__
  4228. }) : x.value ? Se = x.value : Se = u(Ll, null, null), u("div", {
  4229. class: `${N}-column`
  4230. }, [u("span", {
  4231. class: `${K}-column-title`
  4232. }, [(w = l.default) === null || w === void 0 ? void 0 : w.call(l)]), u(Nn, {
  4233. overlay: be,
  4234. trigger: ["click"],
  4235. open: b.value,
  4236. onOpenChange: M,
  4237. getPopupContainer: V,
  4238. placement: J.value === "rtl" ? "bottomLeft" : "bottomRight"
  4239. }, {
  4240. default: () => [u("span", {
  4241. role: "button",
  4242. tabindex: -1,
  4243. class: te(`${N}-trigger`, {
  4244. active: p.value
  4245. }),
  4246. onClick: (Ee) => {
  4247. Ee.stopPropagation();
  4248. }
  4249. }, [Se])]
  4250. })]);
  4251. };
  4252. }
  4253. });
  4254. function _t(e, t, l) {
  4255. let n = [];
  4256. return (e || []).forEach((o, r) => {
  4257. var a, i;
  4258. const s = it(r, l), p = o.filterDropdown || ((a = o == null ? void 0 : o.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || o.customFilterDropdown;
  4259. if (o.filters || p || "onFilter" in o)
  4260. if ("filteredValue" in o) {
  4261. let c = o.filteredValue;
  4262. p || (c = (i = c == null ? void 0 : c.map(String)) !== null && i !== void 0 ? i : c), n.push({
  4263. column: o,
  4264. key: Ue(o, s),
  4265. filteredKeys: c,
  4266. forceFiltered: o.filtered
  4267. });
  4268. } else
  4269. n.push({
  4270. column: o,
  4271. key: Ue(o, s),
  4272. filteredKeys: t && o.defaultFilteredValue ? o.defaultFilteredValue : void 0,
  4273. forceFiltered: o.filtered
  4274. });
  4275. "children" in o && (n = [...n, ..._t(o.children, t, s)]);
  4276. }), n;
  4277. }
  4278. function nl(e, t, l, n, o, r, a, i) {
  4279. return l.map((s, p) => {
  4280. var c;
  4281. const f = it(p, i), {
  4282. filterMultiple: x = !0,
  4283. filterMode: $,
  4284. filterSearch: b
  4285. } = s;
  4286. let m = s;
  4287. const v = s.filterDropdown || ((c = s == null ? void 0 : s.slots) === null || c === void 0 ? void 0 : c.filterDropdown) || s.customFilterDropdown;
  4288. if (m.filters || v) {
  4289. const h = Ue(m, f), y = n.find((d) => {
  4290. let {
  4291. key: E
  4292. } = d;
  4293. return h === E;
  4294. });
  4295. m = g(g({}, m), {
  4296. title: (d) => u(Nr, {
  4297. tablePrefixCls: e,
  4298. prefixCls: `${e}-filter`,
  4299. dropdownPrefixCls: t,
  4300. column: m,
  4301. columnKey: h,
  4302. filterState: y,
  4303. filterMultiple: x,
  4304. filterMode: $,
  4305. filterSearch: b,
  4306. triggerFilter: r,
  4307. locale: o,
  4308. getPopupContainer: a
  4309. }, {
  4310. default: () => [jt(s.title, d)]
  4311. })
  4312. });
  4313. }
  4314. return "children" in m && (m = g(g({}, m), {
  4315. children: nl(e, t, m.children, n, o, r, a, f)
  4316. })), m;
  4317. });
  4318. }
  4319. function gt(e) {
  4320. let t = [];
  4321. return (e || []).forEach((l) => {
  4322. let {
  4323. value: n,
  4324. children: o
  4325. } = l;
  4326. t.push(n), o && (t = [...t, ...gt(o)]);
  4327. }), t;
  4328. }
  4329. function yn(e) {
  4330. const t = {};
  4331. return e.forEach((l) => {
  4332. let {
  4333. key: n,
  4334. filteredKeys: o,
  4335. column: r
  4336. } = l;
  4337. var a;
  4338. const i = r.filterDropdown || ((a = r == null ? void 0 : r.slots) === null || a === void 0 ? void 0 : a.filterDropdown) || r.customFilterDropdown, {
  4339. filters: s
  4340. } = r;
  4341. if (i)
  4342. t[n] = o || null;
  4343. else if (Array.isArray(o)) {
  4344. const p = gt(s);
  4345. t[n] = p.filter((c) => o.includes(String(c)));
  4346. } else
  4347. t[n] = null;
  4348. }), t;
  4349. }
  4350. function Cn(e, t) {
  4351. return t.reduce((l, n) => {
  4352. const {
  4353. column: {
  4354. onFilter: o,
  4355. filters: r
  4356. },
  4357. filteredKeys: a
  4358. } = n;
  4359. return o && a && a.length ? l.filter((i) => a.some((s) => {
  4360. const p = gt(r), c = p.findIndex((x) => String(x) === String(s)), f = c !== -1 ? p[c] : s;
  4361. return o(f, i);
  4362. })) : l;
  4363. }, e);
  4364. }
  4365. function ll(e) {
  4366. return e.flatMap((t) => "children" in t ? [t, ...ll(t.children || [])] : [t]);
  4367. }
  4368. function Br(e) {
  4369. let {
  4370. prefixCls: t,
  4371. dropdownPrefixCls: l,
  4372. mergedColumns: n,
  4373. locale: o,
  4374. onFilterChange: r,
  4375. getPopupContainer: a
  4376. } = e;
  4377. const i = C(() => ll(n.value)), [s, p] = Ve(_t(i.value, !0)), c = C(() => {
  4378. const b = _t(i.value, !1);
  4379. if (b.length === 0)
  4380. return b;
  4381. let m = !0, v = !0;
  4382. if (b.forEach((h) => {
  4383. let {
  4384. filteredKeys: y
  4385. } = h;
  4386. y !== void 0 ? m = !1 : v = !1;
  4387. }), m) {
  4388. const h = (i.value || []).map((y, d) => Ue(y, it(d)));
  4389. return s.value.filter((y) => {
  4390. let {
  4391. key: d
  4392. } = y;
  4393. return h.includes(d);
  4394. }).map((y) => {
  4395. const d = i.value[h.findIndex((E) => E === y.key)];
  4396. return g(g({}, y), {
  4397. column: g(g({}, y.column), d),
  4398. forceFiltered: d.filtered
  4399. });
  4400. });
  4401. }
  4402. return Te(v, "Table", "Columns should all contain `filteredValue` or not contain `filteredValue`."), b;
  4403. }), f = C(() => yn(c.value)), x = (b) => {
  4404. const m = c.value.filter((v) => {
  4405. let {
  4406. key: h
  4407. } = v;
  4408. return h !== b.key;
  4409. });
  4410. m.push(b), p(m), r(yn(m), m);
  4411. };
  4412. return [(b) => nl(t.value, l.value, b, c.value, o.value, x, a.value), c, f];
  4413. }
  4414. function ol(e, t) {
  4415. return e.map((l) => {
  4416. const n = g({}, l);
  4417. return n.title = jt(n.title, t), "children" in n && (n.children = ol(n.children, t)), n;
  4418. });
  4419. }
  4420. function zr(e) {
  4421. return [(l) => ol(l, e.value)];
  4422. }
  4423. function kr(e) {
  4424. return function(l) {
  4425. let {
  4426. prefixCls: n,
  4427. onExpand: o,
  4428. record: r,
  4429. expanded: a,
  4430. expandable: i
  4431. } = l;
  4432. const s = `${n}-row-expand-icon`;
  4433. return u("button", {
  4434. type: "button",
  4435. onClick: (p) => {
  4436. o(r, p), p.stopPropagation();
  4437. },
  4438. class: te(s, {
  4439. [`${s}-spaced`]: !i,
  4440. [`${s}-expanded`]: i && a,
  4441. [`${s}-collapsed`]: i && !a
  4442. }),
  4443. "aria-label": a ? e.collapse : e.expand,
  4444. "aria-expanded": a
  4445. }, null);
  4446. };
  4447. }
  4448. function rl(e, t) {
  4449. const l = t.value;
  4450. return e.map((n) => {
  4451. var o;
  4452. if (n === Ne || n === _e) return n;
  4453. const r = g({}, n), {
  4454. slots: a = {}
  4455. } = r;
  4456. return r.__originColumn__ = n, Te(!("slots" in r), "Table", "`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."), Object.keys(a).forEach((i) => {
  4457. const s = a[i];
  4458. r[i] === void 0 && l[s] && (r[i] = l[s]);
  4459. }), t.value.headerCell && !(!((o = n.slots) === null || o === void 0) && o.title) && (r.title = Ft(t.value, "headerCell", {
  4460. title: n.title,
  4461. column: n
  4462. }, () => [n.title])), "children" in r && Array.isArray(r.children) && (r.children = rl(r.children, t)), r;
  4463. });
  4464. }
  4465. function _r(e) {
  4466. return [(l) => rl(l, e)];
  4467. }
  4468. const Dr = (e) => {
  4469. const {
  4470. componentCls: t
  4471. } = e, l = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`, n = (o, r, a) => ({
  4472. [`&${t}-${o}`]: {
  4473. [`> ${t}-container`]: {
  4474. [`> ${t}-content, > ${t}-body`]: {
  4475. "> table > tbody > tr > td": {
  4476. [`> ${t}-expanded-row-fixed`]: {
  4477. margin: `-${r}px -${a + e.lineWidth}px`
  4478. }
  4479. }
  4480. }
  4481. }
  4482. }
  4483. });
  4484. return {
  4485. [`${t}-wrapper`]: {
  4486. [`${t}${t}-bordered`]: g(g(g({
  4487. // ============================ Title =============================
  4488. [`> ${t}-title`]: {
  4489. border: l,
  4490. borderBottom: 0
  4491. },
  4492. // ============================ Content ============================
  4493. [`> ${t}-container`]: {
  4494. borderInlineStart: l,
  4495. [`
  4496. > ${t}-content,
  4497. > ${t}-header,
  4498. > ${t}-body,
  4499. > ${t}-summary
  4500. `]: {
  4501. "> table": {
  4502. // ============================= Cell =============================
  4503. "\n > thead > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ": {
  4504. borderInlineEnd: l
  4505. },
  4506. // ============================ Header ============================
  4507. "> thead": {
  4508. "> tr:not(:last-child) > th": {
  4509. borderBottom: l
  4510. },
  4511. "> tr > th::before": {
  4512. backgroundColor: "transparent !important"
  4513. }
  4514. },
  4515. // Fixed right should provides additional border
  4516. "\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ": {
  4517. [`> ${t}-cell-fix-right-first::after`]: {
  4518. borderInlineEnd: l
  4519. }
  4520. },
  4521. // ========================== Expandable ==========================
  4522. "> tbody > tr > td": {
  4523. [`> ${t}-expanded-row-fixed`]: {
  4524. margin: `-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal + e.lineWidth}px`,
  4525. "&::after": {
  4526. position: "absolute",
  4527. top: 0,
  4528. insetInlineEnd: e.lineWidth,
  4529. bottom: 0,
  4530. borderInlineEnd: l,
  4531. content: '""'
  4532. }
  4533. }
  4534. }
  4535. }
  4536. },
  4537. [`
  4538. > ${t}-content,
  4539. > ${t}-header
  4540. `]: {
  4541. "> table": {
  4542. borderTop: l
  4543. }
  4544. }
  4545. },
  4546. // ============================ Scroll ============================
  4547. [`&${t}-scroll-horizontal`]: {
  4548. [`> ${t}-container > ${t}-body`]: {
  4549. "> table > tbody": {
  4550. [`
  4551. > tr${t}-expanded-row,
  4552. > tr${t}-placeholder
  4553. `]: {
  4554. "> td": {
  4555. borderInlineEnd: 0
  4556. }
  4557. }
  4558. }
  4559. }
  4560. }
  4561. }, n("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle)), n("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall)), {
  4562. // ============================ Footer ============================
  4563. [`> ${t}-footer`]: {
  4564. border: l,
  4565. borderTop: 0
  4566. }
  4567. }),
  4568. // ============================ Nested ============================
  4569. [`${t}-cell`]: {
  4570. [`${t}-container:first-child`]: {
  4571. // :first-child to avoid the case when bordered and title is set
  4572. borderTop: 0
  4573. },
  4574. // https://github.com/ant-design/ant-design/issues/35577
  4575. "&-scrollbar:not([rowspan])": {
  4576. boxShadow: `0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`
  4577. }
  4578. }
  4579. }
  4580. };
  4581. }, Kr = (e) => {
  4582. const {
  4583. componentCls: t
  4584. } = e;
  4585. return {
  4586. [`${t}-wrapper`]: {
  4587. [`${t}-cell-ellipsis`]: g(g({}, Wl), {
  4588. wordBreak: "keep-all",
  4589. // Fixed first or last should special process
  4590. [`
  4591. &${t}-cell-fix-left-last,
  4592. &${t}-cell-fix-right-first
  4593. `]: {
  4594. overflow: "visible",
  4595. [`${t}-cell-content`]: {
  4596. display: "block",
  4597. overflow: "hidden",
  4598. textOverflow: "ellipsis"
  4599. }
  4600. },
  4601. [`${t}-column-title`]: {
  4602. overflow: "hidden",
  4603. textOverflow: "ellipsis",
  4604. wordBreak: "keep-all"
  4605. }
  4606. })
  4607. }
  4608. };
  4609. }, Fr = (e) => {
  4610. const {
  4611. componentCls: t
  4612. } = e;
  4613. return {
  4614. [`${t}-wrapper`]: {
  4615. [`${t}-tbody > tr${t}-placeholder`]: {
  4616. textAlign: "center",
  4617. color: e.colorTextDisabled,
  4618. "&:hover > td": {
  4619. background: e.colorBgContainer
  4620. }
  4621. }
  4622. }
  4623. };
  4624. }, Ar = (e) => {
  4625. const {
  4626. componentCls: t,
  4627. antCls: l,
  4628. controlInteractiveSize: n,
  4629. motionDurationSlow: o,
  4630. lineWidth: r,
  4631. paddingXS: a,
  4632. lineType: i,
  4633. tableBorderColor: s,
  4634. tableExpandIconBg: p,
  4635. tableExpandColumnWidth: c,
  4636. borderRadius: f,
  4637. fontSize: x,
  4638. fontSizeSM: $,
  4639. lineHeight: b,
  4640. tablePaddingVertical: m,
  4641. tablePaddingHorizontal: v,
  4642. tableExpandedRowBg: h,
  4643. paddingXXS: y
  4644. } = e, d = n / 2 - r, E = d * 2 + r * 3, O = `${r}px ${i} ${s}`, z = y - r;
  4645. return {
  4646. [`${t}-wrapper`]: {
  4647. [`${t}-expand-icon-col`]: {
  4648. width: c
  4649. },
  4650. [`${t}-row-expand-icon-cell`]: {
  4651. textAlign: "center",
  4652. [`${t}-row-expand-icon`]: {
  4653. display: "inline-flex",
  4654. float: "none",
  4655. verticalAlign: "sub"
  4656. }
  4657. },
  4658. [`${t}-row-indent`]: {
  4659. height: 1,
  4660. float: "left"
  4661. },
  4662. [`${t}-row-expand-icon`]: g(g({}, ao(e)), {
  4663. position: "relative",
  4664. float: "left",
  4665. boxSizing: "border-box",
  4666. width: E,
  4667. height: E,
  4668. padding: 0,
  4669. color: "inherit",
  4670. lineHeight: `${E}px`,
  4671. background: p,
  4672. border: O,
  4673. borderRadius: f,
  4674. transform: `scale(${n / E})`,
  4675. transition: `all ${o}`,
  4676. userSelect: "none",
  4677. "&:focus, &:hover, &:active": {
  4678. borderColor: "currentcolor"
  4679. },
  4680. "&::before, &::after": {
  4681. position: "absolute",
  4682. background: "currentcolor",
  4683. transition: `transform ${o} ease-out`,
  4684. content: '""'
  4685. },
  4686. "&::before": {
  4687. top: d,
  4688. insetInlineEnd: z,
  4689. insetInlineStart: z,
  4690. height: r
  4691. },
  4692. "&::after": {
  4693. top: z,
  4694. bottom: z,
  4695. insetInlineStart: d,
  4696. width: r,
  4697. transform: "rotate(90deg)"
  4698. },
  4699. // Motion effect
  4700. "&-collapsed::before": {
  4701. transform: "rotate(-180deg)"
  4702. },
  4703. "&-collapsed::after": {
  4704. transform: "rotate(0deg)"
  4705. },
  4706. "&-spaced": {
  4707. "&::before, &::after": {
  4708. display: "none",
  4709. content: "none"
  4710. },
  4711. background: "transparent",
  4712. border: 0,
  4713. visibility: "hidden"
  4714. }
  4715. }),
  4716. [`${t}-row-indent + ${t}-row-expand-icon`]: {
  4717. marginTop: (x * b - r * 3) / 2 - Math.ceil(($ * 1.4 - r * 3) / 2),
  4718. marginInlineEnd: a
  4719. },
  4720. [`tr${t}-expanded-row`]: {
  4721. "&, &:hover": {
  4722. "> td": {
  4723. background: h
  4724. }
  4725. },
  4726. // https://github.com/ant-design/ant-design/issues/25573
  4727. [`${l}-descriptions-view`]: {
  4728. display: "flex",
  4729. table: {
  4730. flex: "auto",
  4731. width: "auto"
  4732. }
  4733. }
  4734. },
  4735. // With fixed
  4736. [`${t}-expanded-row-fixed`]: {
  4737. position: "relative",
  4738. margin: `-${m}px -${v}px`,
  4739. padding: `${m}px ${v}px`
  4740. }
  4741. }
  4742. };
  4743. }, Mr = (e) => {
  4744. const {
  4745. componentCls: t,
  4746. antCls: l,
  4747. iconCls: n,
  4748. tableFilterDropdownWidth: o,
  4749. tableFilterDropdownSearchWidth: r,
  4750. paddingXXS: a,
  4751. paddingXS: i,
  4752. colorText: s,
  4753. lineWidth: p,
  4754. lineType: c,
  4755. tableBorderColor: f,
  4756. tableHeaderIconColor: x,
  4757. fontSizeSM: $,
  4758. tablePaddingHorizontal: b,
  4759. borderRadius: m,
  4760. motionDurationSlow: v,
  4761. colorTextDescription: h,
  4762. colorPrimary: y,
  4763. tableHeaderFilterActiveBg: d,
  4764. colorTextDisabled: E,
  4765. tableFilterDropdownBg: O,
  4766. tableFilterDropdownHeight: z,
  4767. controlItemBgHover: S,
  4768. controlItemBgActive: H,
  4769. boxShadowSecondary: T
  4770. } = e, R = `${l}-dropdown`, k = `${t}-filter-dropdown`, B = `${l}-tree`, M = `${p}px ${c} ${f}`;
  4771. return [
  4772. {
  4773. [`${t}-wrapper`]: {
  4774. [`${t}-filter-column`]: {
  4775. display: "flex",
  4776. justifyContent: "space-between"
  4777. },
  4778. [`${t}-filter-trigger`]: {
  4779. position: "relative",
  4780. display: "flex",
  4781. alignItems: "center",
  4782. marginBlock: -a,
  4783. marginInline: `${a}px ${-b / 2}px`,
  4784. padding: `0 ${a}px`,
  4785. color: x,
  4786. fontSize: $,
  4787. borderRadius: m,
  4788. cursor: "pointer",
  4789. transition: `all ${v}`,
  4790. "&:hover": {
  4791. color: h,
  4792. background: d
  4793. },
  4794. "&.active": {
  4795. color: y
  4796. }
  4797. }
  4798. }
  4799. },
  4800. {
  4801. // Dropdown
  4802. [`${l}-dropdown`]: {
  4803. [k]: g(g({}, Dt(e)), {
  4804. minWidth: o,
  4805. backgroundColor: O,
  4806. borderRadius: m,
  4807. boxShadow: T,
  4808. // Reset menu
  4809. [`${R}-menu`]: {
  4810. // https://github.com/ant-design/ant-design/issues/4916
  4811. // https://github.com/ant-design/ant-design/issues/19542
  4812. maxHeight: z,
  4813. overflowX: "hidden",
  4814. border: 0,
  4815. boxShadow: "none",
  4816. "&:empty::after": {
  4817. display: "block",
  4818. padding: `${i}px 0`,
  4819. color: E,
  4820. fontSize: $,
  4821. textAlign: "center",
  4822. content: '"Not Found"'
  4823. }
  4824. },
  4825. [`${k}-tree`]: {
  4826. paddingBlock: `${i}px 0`,
  4827. paddingInline: i,
  4828. [B]: {
  4829. padding: 0
  4830. },
  4831. [`${B}-treenode ${B}-node-content-wrapper:hover`]: {
  4832. backgroundColor: S
  4833. },
  4834. [`${B}-treenode-checkbox-checked ${B}-node-content-wrapper`]: {
  4835. "&, &:hover": {
  4836. backgroundColor: H
  4837. }
  4838. }
  4839. },
  4840. [`${k}-search`]: {
  4841. padding: i,
  4842. borderBottom: M,
  4843. "&-input": {
  4844. input: {
  4845. minWidth: r
  4846. },
  4847. [n]: {
  4848. color: E
  4849. }
  4850. }
  4851. },
  4852. [`${k}-checkall`]: {
  4853. width: "100%",
  4854. marginBottom: a,
  4855. marginInlineStart: a
  4856. },
  4857. // Operation
  4858. [`${k}-btns`]: {
  4859. display: "flex",
  4860. justifyContent: "space-between",
  4861. padding: `${i - p}px ${i}px`,
  4862. overflow: "hidden",
  4863. backgroundColor: "inherit",
  4864. borderTop: M
  4865. }
  4866. })
  4867. }
  4868. },
  4869. // Dropdown Menu & SubMenu
  4870. {
  4871. // submenu of table filter dropdown
  4872. [`${l}-dropdown ${k}, ${k}-submenu`]: {
  4873. // Checkbox
  4874. [`${l}-checkbox-wrapper + span`]: {
  4875. paddingInlineStart: i,
  4876. color: s
  4877. },
  4878. "> ul": {
  4879. maxHeight: "calc(100vh - 130px)",
  4880. overflowX: "hidden",
  4881. overflowY: "auto"
  4882. }
  4883. }
  4884. }
  4885. ];
  4886. }, Hr = (e) => {
  4887. const {
  4888. componentCls: t,
  4889. lineWidth: l,
  4890. colorSplit: n,
  4891. motionDurationSlow: o,
  4892. zIndexTableFixed: r,
  4893. tableBg: a,
  4894. zIndexTableSticky: i
  4895. } = e, s = n;
  4896. return {
  4897. [`${t}-wrapper`]: {
  4898. [`
  4899. ${t}-cell-fix-left,
  4900. ${t}-cell-fix-right
  4901. `]: {
  4902. position: "sticky !important",
  4903. zIndex: r,
  4904. background: a
  4905. },
  4906. [`
  4907. ${t}-cell-fix-left-first::after,
  4908. ${t}-cell-fix-left-last::after
  4909. `]: {
  4910. position: "absolute",
  4911. top: 0,
  4912. right: {
  4913. _skip_check_: !0,
  4914. value: 0
  4915. },
  4916. bottom: -l,
  4917. width: 30,
  4918. transform: "translateX(100%)",
  4919. transition: `box-shadow ${o}`,
  4920. content: '""',
  4921. pointerEvents: "none"
  4922. },
  4923. [`${t}-cell-fix-left-all::after`]: {
  4924. display: "none"
  4925. },
  4926. [`
  4927. ${t}-cell-fix-right-first::after,
  4928. ${t}-cell-fix-right-last::after
  4929. `]: {
  4930. position: "absolute",
  4931. top: 0,
  4932. bottom: -l,
  4933. left: {
  4934. _skip_check_: !0,
  4935. value: 0
  4936. },
  4937. width: 30,
  4938. transform: "translateX(-100%)",
  4939. transition: `box-shadow ${o}`,
  4940. content: '""',
  4941. pointerEvents: "none"
  4942. },
  4943. [`${t}-container`]: {
  4944. "&::before, &::after": {
  4945. position: "absolute",
  4946. top: 0,
  4947. bottom: 0,
  4948. zIndex: i + 1,
  4949. width: 30,
  4950. transition: `box-shadow ${o}`,
  4951. content: '""',
  4952. pointerEvents: "none"
  4953. },
  4954. "&::before": {
  4955. insetInlineStart: 0
  4956. },
  4957. "&::after": {
  4958. insetInlineEnd: 0
  4959. }
  4960. },
  4961. [`${t}-ping-left`]: {
  4962. [`&:not(${t}-has-fix-left) ${t}-container`]: {
  4963. position: "relative",
  4964. "&::before": {
  4965. boxShadow: `inset 10px 0 8px -8px ${s}`
  4966. }
  4967. },
  4968. [`
  4969. ${t}-cell-fix-left-first::after,
  4970. ${t}-cell-fix-left-last::after
  4971. `]: {
  4972. boxShadow: `inset 10px 0 8px -8px ${s}`
  4973. },
  4974. [`${t}-cell-fix-left-last::before`]: {
  4975. backgroundColor: "transparent !important"
  4976. }
  4977. },
  4978. [`${t}-ping-right`]: {
  4979. [`&:not(${t}-has-fix-right) ${t}-container`]: {
  4980. position: "relative",
  4981. "&::after": {
  4982. boxShadow: `inset -10px 0 8px -8px ${s}`
  4983. }
  4984. },
  4985. [`
  4986. ${t}-cell-fix-right-first::after,
  4987. ${t}-cell-fix-right-last::after
  4988. `]: {
  4989. boxShadow: `inset -10px 0 8px -8px ${s}`
  4990. }
  4991. }
  4992. }
  4993. };
  4994. }, jr = (e) => {
  4995. const {
  4996. componentCls: t,
  4997. antCls: l
  4998. } = e;
  4999. return {
  5000. [`${t}-wrapper`]: {
  5001. // ========================== Pagination ==========================
  5002. [`${t}-pagination${l}-pagination`]: {
  5003. margin: `${e.margin}px 0`
  5004. },
  5005. [`${t}-pagination`]: {
  5006. display: "flex",
  5007. flexWrap: "wrap",
  5008. rowGap: e.paddingXS,
  5009. "> *": {
  5010. flex: "none"
  5011. },
  5012. "&-left": {
  5013. justifyContent: "flex-start"
  5014. },
  5015. "&-center": {
  5016. justifyContent: "center"
  5017. },
  5018. "&-right": {
  5019. justifyContent: "flex-end"
  5020. }
  5021. }
  5022. }
  5023. };
  5024. }, Lr = (e) => {
  5025. const {
  5026. componentCls: t,
  5027. tableRadius: l
  5028. } = e;
  5029. return {
  5030. [`${t}-wrapper`]: {
  5031. [t]: {
  5032. // https://github.com/ant-design/ant-design/issues/39115#issuecomment-1362314574
  5033. [`${t}-title, ${t}-header`]: {
  5034. borderRadius: `${l}px ${l}px 0 0`
  5035. },
  5036. [`${t}-title + ${t}-container`]: {
  5037. borderStartStartRadius: 0,
  5038. borderStartEndRadius: 0,
  5039. table: {
  5040. borderRadius: 0,
  5041. "> thead > tr:first-child": {
  5042. "th:first-child": {
  5043. borderRadius: 0
  5044. },
  5045. "th:last-child": {
  5046. borderRadius: 0
  5047. }
  5048. }
  5049. }
  5050. },
  5051. "&-container": {
  5052. borderStartStartRadius: l,
  5053. borderStartEndRadius: l,
  5054. "table > thead > tr:first-child": {
  5055. "> *:first-child": {
  5056. borderStartStartRadius: l
  5057. },
  5058. "> *:last-child": {
  5059. borderStartEndRadius: l
  5060. }
  5061. }
  5062. },
  5063. "&-footer": {
  5064. borderRadius: `0 0 ${l}px ${l}px`
  5065. }
  5066. }
  5067. }
  5068. };
  5069. }, Wr = (e) => {
  5070. const {
  5071. componentCls: t
  5072. } = e;
  5073. return {
  5074. [`${t}-wrapper-rtl`]: {
  5075. direction: "rtl",
  5076. table: {
  5077. direction: "rtl"
  5078. },
  5079. [`${t}-pagination-left`]: {
  5080. justifyContent: "flex-end"
  5081. },
  5082. [`${t}-pagination-right`]: {
  5083. justifyContent: "flex-start"
  5084. },
  5085. [`${t}-row-expand-icon`]: {
  5086. "&::after": {
  5087. transform: "rotate(-90deg)"
  5088. },
  5089. "&-collapsed::before": {
  5090. transform: "rotate(180deg)"
  5091. },
  5092. "&-collapsed::after": {
  5093. transform: "rotate(0deg)"
  5094. }
  5095. }
  5096. }
  5097. };
  5098. }, Vr = (e) => {
  5099. const {
  5100. componentCls: t,
  5101. antCls: l,
  5102. iconCls: n,
  5103. fontSizeIcon: o,
  5104. paddingXS: r,
  5105. tableHeaderIconColor: a,
  5106. tableHeaderIconColorHover: i
  5107. } = e;
  5108. return {
  5109. [`${t}-wrapper`]: {
  5110. // ========================== Selections ==========================
  5111. [`${t}-selection-col`]: {
  5112. width: e.tableSelectionColumnWidth
  5113. },
  5114. [`${t}-bordered ${t}-selection-col`]: {
  5115. width: e.tableSelectionColumnWidth + r * 2
  5116. },
  5117. [`
  5118. table tr th${t}-selection-column,
  5119. table tr td${t}-selection-column
  5120. `]: {
  5121. paddingInlineEnd: e.paddingXS,
  5122. paddingInlineStart: e.paddingXS,
  5123. textAlign: "center",
  5124. [`${l}-radio-wrapper`]: {
  5125. marginInlineEnd: 0
  5126. }
  5127. },
  5128. [`table tr th${t}-selection-column${t}-cell-fix-left`]: {
  5129. zIndex: e.zIndexTableFixed + 1
  5130. },
  5131. [`table tr th${t}-selection-column::after`]: {
  5132. backgroundColor: "transparent !important"
  5133. },
  5134. [`${t}-selection`]: {
  5135. position: "relative",
  5136. display: "inline-flex",
  5137. flexDirection: "column"
  5138. },
  5139. [`${t}-selection-extra`]: {
  5140. position: "absolute",
  5141. top: 0,
  5142. zIndex: 1,
  5143. cursor: "pointer",
  5144. transition: `all ${e.motionDurationSlow}`,
  5145. marginInlineStart: "100%",
  5146. paddingInlineStart: `${e.tablePaddingHorizontal / 4}px`,
  5147. [n]: {
  5148. color: a,
  5149. fontSize: o,
  5150. verticalAlign: "baseline",
  5151. "&:hover": {
  5152. color: i
  5153. }
  5154. }
  5155. }
  5156. }
  5157. };
  5158. }, Xr = (e) => {
  5159. const {
  5160. componentCls: t
  5161. } = e, l = (n, o, r, a) => ({
  5162. [`${t}${t}-${n}`]: {
  5163. fontSize: a,
  5164. [`
  5165. ${t}-title,
  5166. ${t}-footer,
  5167. ${t}-thead > tr > th,
  5168. ${t}-tbody > tr > td,
  5169. tfoot > tr > th,
  5170. tfoot > tr > td
  5171. `]: {
  5172. padding: `${o}px ${r}px`
  5173. },
  5174. [`${t}-filter-trigger`]: {
  5175. marginInlineEnd: `-${r / 2}px`
  5176. },
  5177. [`${t}-expanded-row-fixed`]: {
  5178. margin: `-${o}px -${r}px`
  5179. },
  5180. [`${t}-tbody`]: {
  5181. // ========================= Nest Table ===========================
  5182. [`${t}-wrapper:only-child ${t}`]: {
  5183. marginBlock: `-${o}px`,
  5184. marginInline: `${e.tableExpandColumnWidth - r}px -${r}px`
  5185. }
  5186. },
  5187. // https://github.com/ant-design/ant-design/issues/35167
  5188. [`${t}-selection-column`]: {
  5189. paddingInlineStart: `${r / 4}px`
  5190. }
  5191. }
  5192. });
  5193. return {
  5194. [`${t}-wrapper`]: g(g({}, l("middle", e.tablePaddingVerticalMiddle, e.tablePaddingHorizontalMiddle, e.tableFontSizeMiddle)), l("small", e.tablePaddingVerticalSmall, e.tablePaddingHorizontalSmall, e.tableFontSizeSmall))
  5195. };
  5196. }, Ur = (e) => {
  5197. const {
  5198. componentCls: t
  5199. } = e;
  5200. return {
  5201. [`${t}-wrapper ${t}-resize-handle`]: {
  5202. position: "absolute",
  5203. top: 0,
  5204. height: "100% !important",
  5205. bottom: 0,
  5206. left: " auto !important",
  5207. right: " -8px",
  5208. cursor: "col-resize",
  5209. touchAction: "none",
  5210. userSelect: "auto",
  5211. width: "16px",
  5212. zIndex: 1,
  5213. "&-line": {
  5214. display: "block",
  5215. width: "1px",
  5216. marginLeft: "7px",
  5217. height: "100% !important",
  5218. backgroundColor: e.colorPrimary,
  5219. opacity: 0
  5220. },
  5221. "&:hover &-line": {
  5222. opacity: 1
  5223. }
  5224. },
  5225. [`${t}-wrapper ${t}-resize-handle.dragging`]: {
  5226. overflow: "hidden",
  5227. [`${t}-resize-handle-line`]: {
  5228. opacity: 1
  5229. },
  5230. "&:before": {
  5231. position: "absolute",
  5232. top: 0,
  5233. bottom: 0,
  5234. content: '" "',
  5235. width: "200vw",
  5236. transform: "translateX(-50%)",
  5237. opacity: 0
  5238. }
  5239. }
  5240. };
  5241. }, Gr = (e) => {
  5242. const {
  5243. componentCls: t,
  5244. marginXXS: l,
  5245. fontSizeIcon: n,
  5246. tableHeaderIconColor: o,
  5247. tableHeaderIconColorHover: r
  5248. } = e;
  5249. return {
  5250. [`${t}-wrapper`]: {
  5251. [`${t}-thead th${t}-column-has-sorters`]: {
  5252. outline: "none",
  5253. cursor: "pointer",
  5254. transition: `all ${e.motionDurationSlow}`,
  5255. "&:hover": {
  5256. background: e.tableHeaderSortHoverBg,
  5257. "&::before": {
  5258. backgroundColor: "transparent !important"
  5259. }
  5260. },
  5261. "&:focus-visible": {
  5262. color: e.colorPrimary
  5263. },
  5264. // https://github.com/ant-design/ant-design/issues/30969
  5265. [`
  5266. &${t}-cell-fix-left:hover,
  5267. &${t}-cell-fix-right:hover
  5268. `]: {
  5269. background: e.tableFixedHeaderSortActiveBg
  5270. }
  5271. },
  5272. [`${t}-thead th${t}-column-sort`]: {
  5273. background: e.tableHeaderSortBg,
  5274. "&::before": {
  5275. backgroundColor: "transparent !important"
  5276. }
  5277. },
  5278. [`td${t}-column-sort`]: {
  5279. background: e.tableBodySortBg
  5280. },
  5281. [`${t}-column-title`]: {
  5282. position: "relative",
  5283. zIndex: 1,
  5284. flex: 1
  5285. },
  5286. [`${t}-column-sorters`]: {
  5287. display: "flex",
  5288. flex: "auto",
  5289. alignItems: "center",
  5290. justifyContent: "space-between",
  5291. "&::after": {
  5292. position: "absolute",
  5293. inset: 0,
  5294. width: "100%",
  5295. height: "100%",
  5296. content: '""'
  5297. }
  5298. },
  5299. [`${t}-column-sorter`]: {
  5300. marginInlineStart: l,
  5301. color: o,
  5302. fontSize: 0,
  5303. transition: `color ${e.motionDurationSlow}`,
  5304. "&-inner": {
  5305. display: "inline-flex",
  5306. flexDirection: "column",
  5307. alignItems: "center"
  5308. },
  5309. "&-up, &-down": {
  5310. fontSize: n,
  5311. "&.active": {
  5312. color: e.colorPrimary
  5313. }
  5314. },
  5315. [`${t}-column-sorter-up + ${t}-column-sorter-down`]: {
  5316. marginTop: "-0.3em"
  5317. }
  5318. },
  5319. [`${t}-column-sorters:hover ${t}-column-sorter`]: {
  5320. color: r
  5321. }
  5322. }
  5323. };
  5324. }, Jr = (e) => {
  5325. const {
  5326. componentCls: t,
  5327. opacityLoading: l,
  5328. tableScrollThumbBg: n,
  5329. tableScrollThumbBgHover: o,
  5330. tableScrollThumbSize: r,
  5331. tableScrollBg: a,
  5332. zIndexTableSticky: i
  5333. } = e, s = `${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;
  5334. return {
  5335. [`${t}-wrapper`]: {
  5336. [`${t}-sticky`]: {
  5337. "&-holder": {
  5338. position: "sticky",
  5339. zIndex: i,
  5340. background: e.colorBgContainer
  5341. },
  5342. "&-scroll": {
  5343. position: "sticky",
  5344. bottom: 0,
  5345. height: `${r}px !important`,
  5346. zIndex: i,
  5347. display: "flex",
  5348. alignItems: "center",
  5349. background: a,
  5350. borderTop: s,
  5351. opacity: l,
  5352. "&:hover": {
  5353. transformOrigin: "center bottom"
  5354. },
  5355. // fake scrollbar style of sticky
  5356. "&-bar": {
  5357. height: r,
  5358. backgroundColor: n,
  5359. borderRadius: 100,
  5360. transition: `all ${e.motionDurationSlow}, transform none`,
  5361. position: "absolute",
  5362. bottom: 0,
  5363. "&:hover, &-active": {
  5364. backgroundColor: o
  5365. }
  5366. }
  5367. }
  5368. }
  5369. }
  5370. };
  5371. }, Sn = (e) => {
  5372. const {
  5373. componentCls: t,
  5374. lineWidth: l,
  5375. tableBorderColor: n
  5376. } = e, o = `${l}px ${e.lineType} ${n}`;
  5377. return {
  5378. [`${t}-wrapper`]: {
  5379. [`${t}-summary`]: {
  5380. position: "relative",
  5381. zIndex: e.zIndexTableFixed,
  5382. background: e.tableBg,
  5383. "> tr": {
  5384. "> th, > td": {
  5385. borderBottom: o
  5386. }
  5387. }
  5388. },
  5389. [`div${t}-summary`]: {
  5390. boxShadow: `0 -${l}px 0 ${n}`
  5391. }
  5392. }
  5393. };
  5394. }, qr = (e) => {
  5395. const {
  5396. componentCls: t,
  5397. fontWeightStrong: l,
  5398. tablePaddingVertical: n,
  5399. tablePaddingHorizontal: o,
  5400. lineWidth: r,
  5401. lineType: a,
  5402. tableBorderColor: i,
  5403. tableFontSize: s,
  5404. tableBg: p,
  5405. tableRadius: c,
  5406. tableHeaderTextColor: f,
  5407. motionDurationMid: x,
  5408. tableHeaderBg: $,
  5409. tableHeaderCellSplitColor: b,
  5410. tableRowHoverBg: m,
  5411. tableSelectedRowBg: v,
  5412. tableSelectedRowHoverBg: h,
  5413. tableFooterTextColor: y,
  5414. tableFooterBg: d,
  5415. paddingContentVerticalLG: E
  5416. } = e, O = `${r}px ${a} ${i}`;
  5417. return {
  5418. [`${t}-wrapper`]: g(g({
  5419. clear: "both",
  5420. maxWidth: "100%"
  5421. }, Vl()), {
  5422. [t]: g(g({}, Dt(e)), {
  5423. fontSize: s,
  5424. background: p,
  5425. borderRadius: `${c}px ${c}px 0 0`
  5426. }),
  5427. // https://github.com/ant-design/ant-design/issues/17611
  5428. table: {
  5429. width: "100%",
  5430. textAlign: "start",
  5431. borderRadius: `${c}px ${c}px 0 0`,
  5432. borderCollapse: "separate",
  5433. borderSpacing: 0
  5434. },
  5435. // ============================= Cell =============================
  5436. [`
  5437. ${t}-thead > tr > th,
  5438. ${t}-tbody > tr > td,
  5439. tfoot > tr > th,
  5440. tfoot > tr > td
  5441. `]: {
  5442. position: "relative",
  5443. padding: `${E}px ${o}px`,
  5444. overflowWrap: "break-word"
  5445. },
  5446. // ============================ Title =============================
  5447. [`${t}-title`]: {
  5448. padding: `${n}px ${o}px`
  5449. },
  5450. // ============================ Header ============================
  5451. [`${t}-thead`]: {
  5452. "\n > tr > th,\n > tr > td\n ": {
  5453. position: "relative",
  5454. color: f,
  5455. fontWeight: l,
  5456. textAlign: "start",
  5457. background: $,
  5458. borderBottom: O,
  5459. transition: `background ${x} ease`,
  5460. "&[colspan]:not([colspan='1'])": {
  5461. textAlign: "center"
  5462. },
  5463. [`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]: {
  5464. position: "absolute",
  5465. top: "50%",
  5466. insetInlineEnd: 0,
  5467. width: 1,
  5468. height: "1.6em",
  5469. backgroundColor: b,
  5470. transform: "translateY(-50%)",
  5471. transition: `background-color ${x}`,
  5472. content: '""'
  5473. }
  5474. },
  5475. "> tr:not(:last-child) > th[colspan]": {
  5476. borderBottom: 0
  5477. }
  5478. },
  5479. // ============================ Body ============================
  5480. // Borderless Table has unique hover style, which would be implemented with `borderTop`.
  5481. [`${t}:not(${t}-bordered)`]: {
  5482. [`${t}-tbody`]: {
  5483. "> tr": {
  5484. "> td": {
  5485. borderTop: O,
  5486. borderBottom: "transparent"
  5487. },
  5488. "&:last-child > td": {
  5489. borderBottom: O
  5490. },
  5491. [`&:first-child > td,
  5492. &${t}-measure-row + tr > td`]: {
  5493. borderTop: "none",
  5494. borderTopColor: "transparent"
  5495. }
  5496. }
  5497. }
  5498. },
  5499. // Bordered Table remains simple `borderBottom`.
  5500. // Ref issue: https://github.com/ant-design/ant-design/issues/38724
  5501. [`${t}${t}-bordered`]: {
  5502. [`${t}-tbody`]: {
  5503. "> tr": {
  5504. "> td": {
  5505. borderBottom: O
  5506. }
  5507. }
  5508. }
  5509. },
  5510. [`${t}-tbody`]: {
  5511. "> tr": {
  5512. "> td": {
  5513. transition: `background ${x}, border-color ${x}`,
  5514. // ========================= Nest Table ===========================
  5515. [`
  5516. > ${t}-wrapper:only-child,
  5517. > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
  5518. `]: {
  5519. [t]: {
  5520. marginBlock: `-${n}px`,
  5521. marginInline: `${e.tableExpandColumnWidth - o}px -${o}px`,
  5522. [`${t}-tbody > tr:last-child > td`]: {
  5523. borderBottom: 0,
  5524. "&:first-child, &:last-child": {
  5525. borderRadius: 0
  5526. }
  5527. }
  5528. }
  5529. }
  5530. },
  5531. [`
  5532. &${t}-row:hover > td,
  5533. > td${t}-cell-row-hover
  5534. `]: {
  5535. background: m
  5536. },
  5537. [`&${t}-row-selected`]: {
  5538. "> td": {
  5539. background: v
  5540. },
  5541. "&:hover > td": {
  5542. background: h
  5543. }
  5544. }
  5545. }
  5546. },
  5547. // ============================ Footer ============================
  5548. [`${t}-footer`]: {
  5549. padding: `${n}px ${o}px`,
  5550. color: y,
  5551. background: d
  5552. }
  5553. })
  5554. };
  5555. }, Yr = In("Table", (e) => {
  5556. const {
  5557. controlItemBgActive: t,
  5558. controlItemBgActiveHover: l,
  5559. colorTextPlaceholder: n,
  5560. colorTextHeading: o,
  5561. colorSplit: r,
  5562. colorBorderSecondary: a,
  5563. fontSize: i,
  5564. padding: s,
  5565. paddingXS: p,
  5566. paddingSM: c,
  5567. controlHeight: f,
  5568. colorFillAlter: x,
  5569. colorIcon: $,
  5570. colorIconHover: b,
  5571. opacityLoading: m,
  5572. colorBgContainer: v,
  5573. borderRadiusLG: h,
  5574. colorFillContent: y,
  5575. colorFillSecondary: d,
  5576. controlInteractiveSize: E
  5577. } = e, O = new ot($), z = new ot(b), S = t, H = 2, T = new ot(d).onBackground(v).toHexString(), R = new ot(y).onBackground(v).toHexString(), k = new ot(x).onBackground(v).toHexString(), B = Pn(e, {
  5578. tableFontSize: i,
  5579. tableBg: v,
  5580. tableRadius: h,
  5581. tablePaddingVertical: s,
  5582. tablePaddingHorizontal: s,
  5583. tablePaddingVerticalMiddle: c,
  5584. tablePaddingHorizontalMiddle: p,
  5585. tablePaddingVerticalSmall: p,
  5586. tablePaddingHorizontalSmall: p,
  5587. tableBorderColor: a,
  5588. tableHeaderTextColor: o,
  5589. tableHeaderBg: k,
  5590. tableFooterTextColor: o,
  5591. tableFooterBg: k,
  5592. tableHeaderCellSplitColor: a,
  5593. tableHeaderSortBg: T,
  5594. tableHeaderSortHoverBg: R,
  5595. tableHeaderIconColor: O.clone().setAlpha(O.getAlpha() * m).toRgbString(),
  5596. tableHeaderIconColorHover: z.clone().setAlpha(z.getAlpha() * m).toRgbString(),
  5597. tableBodySortBg: k,
  5598. tableFixedHeaderSortActiveBg: T,
  5599. tableHeaderFilterActiveBg: y,
  5600. tableFilterDropdownBg: v,
  5601. tableRowHoverBg: k,
  5602. tableSelectedRowBg: S,
  5603. tableSelectedRowHoverBg: l,
  5604. zIndexTableFixed: H,
  5605. zIndexTableSticky: H + 1,
  5606. tableFontSizeMiddle: i,
  5607. tableFontSizeSmall: i,
  5608. tableSelectionColumnWidth: f,
  5609. tableExpandIconBg: v,
  5610. tableExpandColumnWidth: E + 2 * e.padding,
  5611. tableExpandedRowBg: x,
  5612. // Dropdown
  5613. tableFilterDropdownWidth: 120,
  5614. tableFilterDropdownHeight: 264,
  5615. tableFilterDropdownSearchWidth: 140,
  5616. // Virtual Scroll Bar
  5617. tableScrollThumbSize: 8,
  5618. tableScrollThumbBg: n,
  5619. tableScrollThumbBgHover: o,
  5620. tableScrollBg: r
  5621. });
  5622. return [qr(B), jr(B), Sn(B), Gr(B), Mr(B), Dr(B), Lr(B), Ar(B), Sn(B), Fr(B), Vr(B), Hr(B), Jr(B), Kr(B), Xr(B), Ur(B), Wr(B)];
  5623. }), Qr = [], al = () => ({
  5624. prefixCls: Ke(),
  5625. columns: qe(),
  5626. rowKey: De([String, Function]),
  5627. tableLayout: Ke(),
  5628. rowClassName: De([String, Function]),
  5629. title: se(),
  5630. footer: se(),
  5631. id: Ke(),
  5632. showHeader: Be(),
  5633. components: Ye(),
  5634. customRow: se(),
  5635. customHeaderRow: se(),
  5636. direction: Ke(),
  5637. expandFixed: De([Boolean, String]),
  5638. expandColumnWidth: Number,
  5639. expandedRowKeys: qe(),
  5640. defaultExpandedRowKeys: qe(),
  5641. expandedRowRender: se(),
  5642. expandRowByClick: Be(),
  5643. expandIcon: se(),
  5644. onExpand: se(),
  5645. onExpandedRowsChange: se(),
  5646. "onUpdate:expandedRowKeys": se(),
  5647. defaultExpandAllRows: Be(),
  5648. indentSize: Number,
  5649. /** @deprecated Please use `EXPAND_COLUMN` in `columns` directly */
  5650. expandIconColumnIndex: Number,
  5651. showExpandColumn: Be(),
  5652. expandedRowClassName: se(),
  5653. childrenColumnName: Ke(),
  5654. rowExpandable: se(),
  5655. sticky: De([Boolean, Object]),
  5656. dropdownPrefixCls: String,
  5657. dataSource: qe(),
  5658. pagination: De([Boolean, Object]),
  5659. loading: De([Boolean, Object]),
  5660. size: Ke(),
  5661. bordered: Be(),
  5662. locale: Ye(),
  5663. onChange: se(),
  5664. onResizeColumn: se(),
  5665. rowSelection: Ye(),
  5666. getPopupContainer: se(),
  5667. scroll: Ye(),
  5668. sortDirections: qe(),
  5669. showSorterTooltip: De([Boolean, Object], !0),
  5670. transformCellText: se()
  5671. }), Zr = ue({
  5672. name: "InternalTable",
  5673. inheritAttrs: !1,
  5674. props: zn(g(g({}, al()), {
  5675. contextSlots: Ye()
  5676. }), {
  5677. rowKey: "key"
  5678. }),
  5679. setup(e, t) {
  5680. let {
  5681. attrs: l,
  5682. slots: n,
  5683. expose: o,
  5684. emit: r
  5685. } = t;
  5686. Te(!(typeof e.rowKey == "function" && e.rowKey.length > 1), "Table", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."), No(C(() => e.contextSlots)), Bo({
  5687. onResizeColumn: (_, Y) => {
  5688. r("resizeColumn", _, Y);
  5689. }
  5690. });
  5691. const a = En(), i = C(() => {
  5692. const _ = new Set(Object.keys(a.value).filter((Y) => a.value[Y]));
  5693. return e.columns.filter((Y) => !Y.responsive || Y.responsive.some((D) => _.has(D)));
  5694. }), {
  5695. size: s,
  5696. renderEmpty: p,
  5697. direction: c,
  5698. prefixCls: f,
  5699. configProvider: x
  5700. } = Kt("table", e), [$, b] = Yr(f), m = C(() => {
  5701. var _;
  5702. return e.transformCellText || ((_ = x.transformCellText) === null || _ === void 0 ? void 0 : _.value);
  5703. }), [v] = Tn("Table", Xl.Table, xe(e, "locale")), h = C(() => e.dataSource || Qr), y = C(() => x.getPrefixCls("dropdown", e.dropdownPrefixCls)), d = C(() => e.childrenColumnName || "children"), E = C(() => h.value.some((_) => _ == null ? void 0 : _[d.value]) ? "nest" : e.expandedRowRender ? "row" : null), O = Qe({
  5704. body: null
  5705. }), z = (_) => {
  5706. g(O, _);
  5707. }, S = C(() => typeof e.rowKey == "function" ? e.rowKey : (_) => _ == null ? void 0 : _[e.rowKey]), [H] = yr(h, d, S), T = {}, R = function(_, Y) {
  5708. let D = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  5709. const {
  5710. pagination: W,
  5711. scroll: X,
  5712. onChange: re
  5713. } = e, U = g(g({}, T), _);
  5714. D && (T.resetPagination(), U.pagination.current && (U.pagination.current = 1), W && W.onChange && W.onChange(1, U.pagination.pageSize)), X && X.scrollToFirstRowOnChange !== !1 && O.body && ro(0, {
  5715. getContainer: () => O.body
  5716. }), re == null || re(U.pagination, U.filters, U.sorter, {
  5717. currentDataSource: Cn(kt(h.value, U.sorterStates, d.value), U.filterStates),
  5718. action: Y
  5719. });
  5720. }, k = (_, Y) => {
  5721. R({
  5722. sorter: _,
  5723. sorterStates: Y
  5724. }, "sort", !1);
  5725. }, [B, M, J, Z] = Ir({
  5726. prefixCls: f,
  5727. mergedColumns: i,
  5728. onSorterChange: k,
  5729. sortDirections: C(() => e.sortDirections || ["ascend", "descend"]),
  5730. tableLocale: v,
  5731. showSorterTooltip: xe(e, "showSorterTooltip")
  5732. }), ee = C(() => kt(h.value, M.value, d.value)), fe = (_, Y) => {
  5733. R({
  5734. filters: _,
  5735. filterStates: Y
  5736. }, "filter", !0);
  5737. }, [le, L, j] = Br({
  5738. prefixCls: f,
  5739. locale: v,
  5740. dropdownPrefixCls: y,
  5741. mergedColumns: i,
  5742. onFilterChange: fe,
  5743. getPopupContainer: xe(e, "getPopupContainer")
  5744. }), q = C(() => Cn(ee.value, L.value)), [w] = _r(xe(e, "contextSlots")), K = C(() => {
  5745. const _ = {}, Y = j.value;
  5746. return Object.keys(Y).forEach((D) => {
  5747. Y[D] !== null && (_[D] = Y[D]);
  5748. }), g(g({}, J.value), {
  5749. filters: _
  5750. });
  5751. }), [N] = zr(K), A = (_, Y) => {
  5752. R({
  5753. pagination: g(g({}, T.pagination), {
  5754. current: _,
  5755. pageSize: Y
  5756. })
  5757. }, "paginate");
  5758. }, [F, oe] = br(C(() => q.value.length), xe(e, "pagination"), A);
  5759. Re(() => {
  5760. T.sorter = Z.value, T.sorterStates = M.value, T.filters = j.value, T.filterStates = L.value, T.pagination = e.pagination === !1 ? {} : xr(F.value, e.pagination), T.resetPagination = oe;
  5761. });
  5762. const V = C(() => {
  5763. if (e.pagination === !1 || !F.value.pageSize)
  5764. return q.value;
  5765. const {
  5766. current: _ = 1,
  5767. total: Y,
  5768. pageSize: D = Bt
  5769. } = F.value;
  5770. return Te(_ > 0, "Table", "`current` should be positive number."), q.value.length < Y ? q.value.length > D ? q.value.slice((_ - 1) * D, _ * D) : q.value : q.value.slice((_ - 1) * D, _ * D);
  5771. });
  5772. Re(() => {
  5773. at(() => {
  5774. const {
  5775. total: _,
  5776. pageSize: Y = Bt
  5777. } = F.value;
  5778. q.value.length < _ && q.value.length > Y && Te(!1, "Table", "`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.");
  5779. });
  5780. }, {
  5781. flush: "post"
  5782. });
  5783. const ge = C(() => e.showExpandColumn === !1 ? -1 : E.value === "nest" && e.expandIconColumnIndex === void 0 ? e.rowSelection ? 1 : 0 : e.expandIconColumnIndex > 0 && e.rowSelection ? e.expandIconColumnIndex - 1 : e.expandIconColumnIndex), be = pe();
  5784. Fe(() => e.rowSelection, () => {
  5785. be.value = e.rowSelection ? g({}, e.rowSelection) : e.rowSelection;
  5786. }, {
  5787. deep: !0,
  5788. immediate: !0
  5789. });
  5790. const [Se, Ee] = Sr(be, {
  5791. prefixCls: f,
  5792. data: q,
  5793. pageData: V,
  5794. getRowKey: S,
  5795. getRecordByKey: H,
  5796. expandType: E,
  5797. childrenColumnName: d,
  5798. locale: v,
  5799. getPopupContainer: C(() => e.getPopupContainer)
  5800. }), Oe = (_, Y, D) => {
  5801. let W;
  5802. const {
  5803. rowClassName: X
  5804. } = e;
  5805. return typeof X == "function" ? W = te(X(_, Y, D)) : W = te(X), te({
  5806. [`${f.value}-row-selected`]: Ee.value.has(S.value(_, Y))
  5807. }, W);
  5808. };
  5809. o({
  5810. selectedKeySet: Ee
  5811. });
  5812. const ye = C(() => typeof e.indentSize == "number" ? e.indentSize : 15), $e = (_) => N(Se(le(B(w(_)))));
  5813. return () => {
  5814. var _;
  5815. const {
  5816. expandIcon: Y = n.expandIcon || kr(v.value),
  5817. pagination: D,
  5818. loading: W,
  5819. bordered: X
  5820. } = e;
  5821. let re, U;
  5822. if (D !== !1 && (!((_ = F.value) === null || _ === void 0) && _.total)) {
  5823. let I;
  5824. F.value.size ? I = F.value.size : I = s.value === "small" || s.value === "middle" ? "small" : void 0;
  5825. const P = (we) => u(Eo, G(G({}, F.value), {}, {
  5826. class: [`${f.value}-pagination ${f.value}-pagination-${we}`, F.value.class],
  5827. size: I
  5828. }), null), Q = c.value === "rtl" ? "left" : "right", {
  5829. position: de
  5830. } = F.value;
  5831. if (de !== null && Array.isArray(de)) {
  5832. const we = de.find((ve) => ve.includes("top")), me = de.find((ve) => ve.includes("bottom")), Ce = de.every((ve) => `${ve}` == "none");
  5833. !we && !me && !Ce && (U = P(Q)), we && (re = P(we.toLowerCase().replace("top", ""))), me && (U = P(me.toLowerCase().replace("bottom", "")));
  5834. } else
  5835. U = P(Q);
  5836. }
  5837. let ne;
  5838. typeof W == "boolean" ? ne = {
  5839. spinning: W
  5840. } : typeof W == "object" && (ne = g({
  5841. spinning: !0
  5842. }, W));
  5843. const he = te(`${f.value}-wrapper`, {
  5844. [`${f.value}-wrapper-rtl`]: c.value === "rtl"
  5845. }, l.class, b.value), ae = Ul(e, ["columns"]);
  5846. return $(u("div", {
  5847. class: he,
  5848. style: l.style
  5849. }, [u(Gl, G({
  5850. spinning: !1
  5851. }, ne), {
  5852. default: () => [re, u(hr, G(G(G({}, l), ae), {}, {
  5853. expandedRowKeys: e.expandedRowKeys,
  5854. defaultExpandedRowKeys: e.defaultExpandedRowKeys,
  5855. expandIconColumnIndex: ge.value,
  5856. indentSize: ye.value,
  5857. expandIcon: Y,
  5858. columns: i.value,
  5859. direction: c.value,
  5860. prefixCls: f.value,
  5861. class: te({
  5862. [`${f.value}-middle`]: s.value === "middle",
  5863. [`${f.value}-small`]: s.value === "small",
  5864. [`${f.value}-bordered`]: X,
  5865. [`${f.value}-empty`]: h.value.length === 0
  5866. }),
  5867. data: V.value,
  5868. rowKey: S.value,
  5869. rowClassName: Oe,
  5870. internalHooks: Nt,
  5871. internalRefs: O,
  5872. onUpdateInternalRefs: z,
  5873. transformColumns: $e,
  5874. transformCellText: m.value
  5875. }), g(g({}, n), {
  5876. emptyText: () => {
  5877. var I, P;
  5878. return ((I = n.emptyText) === null || I === void 0 ? void 0 : I.call(n)) || ((P = e.locale) === null || P === void 0 ? void 0 : P.emptyText) || p("Table");
  5879. }
  5880. })), U]
  5881. })]));
  5882. };
  5883. }
  5884. }), sa = ue({
  5885. name: "ATable",
  5886. inheritAttrs: !1,
  5887. props: zn(al(), {
  5888. rowKey: "key"
  5889. }),
  5890. slots: Object,
  5891. setup(e, t) {
  5892. let {
  5893. attrs: l,
  5894. slots: n,
  5895. expose: o
  5896. } = t;
  5897. const r = pe();
  5898. return o({
  5899. table: r
  5900. }), () => {
  5901. var a;
  5902. const i = e.columns || Qn((a = n.default) === null || a === void 0 ? void 0 : a.call(n));
  5903. return u(Zr, G(G(G({
  5904. ref: r
  5905. }, l), e), {}, {
  5906. columns: i || [],
  5907. expandedRowRender: n.expandedRowRender || e.expandedRowRender,
  5908. contextSlots: g({}, n)
  5909. }), n);
  5910. };
  5911. }
  5912. });
  5913. export {
  5914. Ht as C,
  5915. _e as E,
  5916. ia as F,
  5917. fn as S,
  5918. sa as T,
  5919. aa as a,
  5920. pn as b,
  5921. mn as c,
  5922. Ne as d,
  5923. Hn as g,
  5924. al as t,
  5925. Ae as u
  5926. };