@xto/feedback 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Alert/index.d.ts +16 -0
- package/es/Alert/index.vue.d.ts +36 -0
- package/es/Alert/types.d.ts +50 -0
- package/es/Backtop/index.d.ts +12 -0
- package/es/Backtop/index.vue.d.ts +33 -0
- package/es/Backtop/types.d.ts +33 -0
- package/es/Drawer/index.d.ts +24 -0
- package/es/Drawer/index.vue.d.ts +54 -0
- package/es/Drawer/types.d.ts +78 -0
- package/es/DrawerForm/index.d.ts +2 -0
- package/es/DrawerForm/index.vue.d.ts +67 -0
- package/es/DrawerForm/types.d.ts +48 -0
- package/es/Message/index.d.ts +68 -0
- package/es/Message/index.vue.d.ts +33 -0
- package/es/Message/message.d.ts +5 -0
- package/es/Message/types.d.ts +88 -0
- package/es/MessageBox/index.d.ts +9 -0
- package/es/MessageBox/messageBox.d.ts +5 -0
- package/es/MessageBox/types.d.ts +38 -0
- package/es/Modal/index.d.ts +38 -0
- package/es/Modal/index.vue.d.ts +65 -0
- package/es/Modal/types.d.ts +75 -0
- package/es/Notification/index.d.ts +10 -0
- package/es/Notification/notification.d.ts +5 -0
- package/es/Notification/types.d.ts +29 -0
- package/es/Popconfirm/index.d.ts +43 -0
- package/es/Popconfirm/index.vue.d.ts +48 -0
- package/es/Popconfirm/types.d.ts +94 -0
- package/es/Result/index.d.ts +13 -0
- package/es/Result/index.vue.d.ts +35 -0
- package/es/Timeline/TimelineItem.vue.d.ts +32 -0
- package/es/Timeline/index.d.ts +2 -0
- package/es/Timeline/index.vue.d.ts +17 -0
- package/es/Tooltip/index.d.ts +23 -0
- package/es/Tooltip/index.vue.d.ts +55 -0
- package/es/Tooltip/types.d.ts +81 -0
- package/es/index.d.ts +23 -0
- package/es/index.mjs +47 -47
- package/lib/index.cjs +1 -1
- package/package.json +8 -7
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("@xto/core"),Z={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",heading:"M4 6h16M4 12h8m-8 6h16",bold:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",italic:"M10 4h4m-2 0v16m-4 0h8",strikethrough:"M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z","list-bullet":"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12","list-number":"M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12","link-text":"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","image-insert":"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z","code-inline":"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4","divider-h":"M4 12h16",quote:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z","code-block":"M4 4h16v16H4z M8 8h8M8 12h8M8 16h4","sort-up":"M12 5v14m-7-7l7-7 7 7","sort-down":"M12 19V5m7 7l-7 7-7-7","chevron-down":"M6 9l6 6 6-6","chevron-right":"M9 18l6-6-6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","move-up":"M5 15l7-7 7 7","move-down":"M19 9l-7 7-7-7","back-top":"M12 19V5m-7 7l7-7 7 7","dropdown-arrow":"M6 9l6 6 6-6","close-circle":"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z","close-bold":"M6 18L18 6M6 6l12 12","check-circle":"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","info-circle":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z","warning-circle":"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z","back-arrow":"M19 12H5m0 0l7 7m-7-7l7-7","d-arrow-left":"M11 17l-5-5 5-5M18 17l-5-5 5-5","d-arrow-right":"M6 7l5 5-5 5M13 7l5 5-5 5",left:"M15 19l-7-7 7-7",right:"M9 5l7 7-7 7",down:"M19 9l-7 7-7-7",up:"M5 15l7-7 7 7"};function G(t){return t in Z}const J=["aria-hidden","aria-label"],Q=["stroke-width"],_=["d"],E=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(t,{expose:n}){const o=t,r=x.useNamespace("icon"),a=e.computed(()=>typeof o.size=="number"?`${o.size}px`:o.size),s=e.computed(()=>({width:a.value,height:a.value,color:o.color})),m=e.computed(()=>({strokeWidth:o.strokeWidth})),p=e.computed(()=>[r.b(),r.is("spin",o.spin)]),u=e.computed(()=>o.name&&G(o.name)?Z[o.name]:"");return n({iconSize:a,iconStyle:s,iconPath:u}),(i,k)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(p.value),style:e.normalizeStyle(s.value),"aria-hidden":!t.name,"aria-label":t.name,role:"img"},[u.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":t.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(m.value),"aria-hidden":"true"},[e.createElementVNode("path",{d:u.value},null,8,_)],12,Q)):e.renderSlot(i.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(t.name),1)])],14,J))}}),ee=e.defineComponent({name:"XModal",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},title:{default:""},width:{default:"50%"},top:{default:"15vh"},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},center:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","update:open","close","open","ok","cancel"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("modal"),{next:s}=x.useZIndex(),m=e.ref(s()),p=e.computed({get:()=>o.modelValue!==void 0?o.modelValue:o.open!==void 0?o.open:!1,set:d=>{o.modelValue!==void 0&&r("update:modelValue",d),o.open!==void 0&&r("update:open",d),o.modelValue===void 0&&o.open===void 0&&r("update:modelValue",d)}}),u=e.ref(),i=()=>{p.value=!1,r("cancel"),r("close")},k=()=>{r("ok")},h=()=>{o.closeOnClickModal&&o.modal&&i()};x.useEscape(()=>{o.closeOnPressEscape&&p.value&&i()}),e.watch(()=>[o.modelValue,o.open],([d,l])=>{(d!==void 0?d:l)&&(m.value=s(),r("open"))},{immediate:!0});const M=e.computed(()=>({paddingTop:o.top})),f=e.computed(()=>({width:typeof o.width=="number"?`${o.width}px`:o.width,zIndex:m.value}));return(d,l)=>{const v=e.resolveComponent("x-button");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"x-modal-fade"},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("wrapper")),style:e.normalizeStyle(M.value),onClick:h},[e.createElementVNode("div",{ref_key:"modalRef",ref:u,class:e.normalizeClass(e.unref(a).b()),style:e.normalizeStyle(f.value),onClick:l[0]||(l[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("header"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(a).e("close")),onClick:i},[e.createVNode(e.unref(E),{name:"close",size:16})],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("body"))},[e.renderSlot(d.$slots,"default")],2),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("footer"))},[e.renderSlot(d.$slots,"footer",{ok:k,cancel:i})],2)):d.$slots.footer?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("footer"))},[e.createVNode(v,{onClick:i},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(v,{type:"primary",style:{"margin-left":"8px"},onClick:k},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("确定",-1)])]),_:1})],2))],6)],6)):e.createCommentVNode("",!0)]),_:3})])}}}),te=e.defineComponent({name:"XDrawer",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:""},placement:{default:void 0},direction:{default:"rtl"},width:{default:void 0},size:{default:"30%"},withHeader:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},destroyOnClose:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:modelValue","close","open"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("drawer"),s=e.ref(2e3),m=()=>{r("update:modelValue",!1),r("close")},p=()=>{o.closeOnClickModal&&m()},u=h=>{h.key==="Escape"&&o.modelValue&&m()};e.watch(()=>o.modelValue,h=>{h?(s.value=2e3+Math.floor(Math.random()*100),r("open"),document.addEventListener("keydown",u)):document.removeEventListener("keydown",u)});const i=e.computed(()=>({zIndex:s.value})),k=e.computed(()=>{const h=o.direction??o.placement??"rtl",M=o.size??o.width??"30%",f=typeof M=="number"?`${M}px`:M;return{ltr:{width:f,height:"100%"},rtl:{width:f,height:"100%"},ttb:{width:"100%",height:f},btt:{width:"100%",height:f}}[h]});return(h,M)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"x-drawer-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).e("overlay"),{[e.unref(a).em("overlay","no-modal")]:!t.modal}]),style:e.normalizeStyle(i.value),onClick:p},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).b(),e.unref(a).m(t.direction??t.placement??"rtl")]),style:e.normalizeStyle(k.value),onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},[t.withHeader?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("header"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(h.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(a).e("close")),onClick:m},[e.createVNode(e.unref(E),{name:"close",size:18})],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).e("body"),h.$slots.footer&&e.unref(a).em("body","has-footer")])},[e.renderSlot(h.$slots,"default")],2),h.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("footer"))},[e.renderSlot(h.$slots,"footer")],2)):e.createCommentVNode("",!0)],6)],6),[[e.vShow,t.modelValue]])]),_:3})]))}}),oe={key:0,class:"required-mark"},ae=["value","placeholder","disabled","onInput"],le=["value","placeholder","disabled","onInput"],ne=["value","placeholder","disabled","onInput"],se=["value","disabled","onChange"],re=["value"],ie=["disabled","onClick"],ce=e.defineComponent({name:"XDrawerForm",__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:"配置"},size:{default:"400px"},fields:{default:()=>[]},formData:{default:()=>({})},showConfirm:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},confirmText:{default:"确认"},cancelText:{default:"取消"},disabled:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","confirm","cancel","close","field-change"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("drawer-form"),s=e.ref({}),m=e.ref({});e.computed(()=>[a.b()]),e.watch(()=>o.formData,f=>{s.value={...f}},{immediate:!0,deep:!0});const p=e.computed(()=>typeof o.size=="number"?`${o.size}px`:o.size),u=()=>{r("update:modelValue",!1),r("close")},i=()=>{r("cancel"),u()},k=()=>{h()&&(r("confirm",s.value),u())},h=()=>{m.value={};for(const f of o.fields){if(f.required){const d=s.value[f.name];if(d==null||d===""){m.value[f.name]=`${f.label}为必填项`;continue}}if(f.rules)for(const d of f.rules){const l=s.value[f.name];d.type==="email"&&l&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)&&(m.value[f.name]=d.message),d.type==="minLength"&&l&&l.length<d.min&&(m.value[f.name]=d.message)}}return Object.keys(m.value).length===0},M=(f,d)=>{s.value[f]=d,r("field-change",f,d)};return(f,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"drawer-form-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("overlay")),onClick:u},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).b()),style:e.normalizeStyle({width:p.value}),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("header"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},e.toDisplayString(t.title),3),e.createElementVNode("button",{class:e.normalizeClass(e.unref(a).e("close")),onClick:u},[e.createVNode(e.unref(E),{name:"close",size:16})],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("body"))},[!t.destroyOnClose||t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("form"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fields,l=>(e.openBlock(),e.createElementBlock("div",{key:l.name,class:e.normalizeClass(e.unref(a).e("field"))},[e.createElementVNode("label",{class:e.normalizeClass(e.unref(a).e("label"))},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",oe,"*")):e.createCommentVNode("",!0)],2),l.type==="input"?(e.openBlock(),e.createElementBlock("input",{key:0,class:e.normalizeClass([e.unref(a).e("input"),{"has-error":m.value[l.name]}]),value:s.value[l.name],placeholder:l.placeholder,disabled:t.disabled||l.disabled,onInput:v=>M(l.name,v.target.value)},null,42,ae)):l.type==="textarea"?(e.openBlock(),e.createElementBlock("textarea",{key:1,class:e.normalizeClass([e.unref(a).e("textarea"),{"has-error":m.value[l.name]}]),value:s.value[l.name],placeholder:l.placeholder,disabled:t.disabled||l.disabled,rows:"4",onInput:v=>M(l.name,v.target.value)},null,42,le)):l.type==="number"?(e.openBlock(),e.createElementBlock("input",{key:2,type:"number",class:e.normalizeClass([e.unref(a).e("input"),{"has-error":m.value[l.name]}]),value:s.value[l.name],placeholder:l.placeholder,disabled:t.disabled||l.disabled,onInput:v=>M(l.name,Number(v.target.value))},null,42,ne)):l.type==="select"?(e.openBlock(),e.createElementBlock("select",{key:3,class:e.normalizeClass([e.unref(a).e("select"),{"has-error":m.value[l.name]}]),value:s.value[l.name],disabled:t.disabled||l.disabled,onChange:v=>M(l.name,v.target.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,v=>(e.openBlock(),e.createElementBlock("option",{key:v.value,value:v.value},e.toDisplayString(v.label),9,re))),128))],42,se)):l.type==="switch"?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(e.unref(a).e("switch"))},[e.createElementVNode("button",{class:e.normalizeClass(["switch-btn",{"is-on":s.value[l.name]}]),disabled:t.disabled||l.disabled,onClick:v=>M(l.name,!s.value[l.name])},e.toDisplayString(s.value[l.name]?"开启":"关闭"),11,ie)],2)):e.createCommentVNode("",!0),m.value[l.name]?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(e.unref(a).e("error"))},e.toDisplayString(m.value[l.name]),3)):e.createCommentVNode("",!0)],2))),128))],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("footer"))},[t.showCancel?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(a).e("cancel")),onClick:i},e.toDisplayString(t.cancelText),3)):e.createCommentVNode("",!0),t.showConfirm?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(a).e("confirm")),onClick:k},e.toDisplayString(t.confirmText),3)):e.createCommentVNode("",!0)],2)],6)],2),[[e.vShow,t.modelValue]])]),_:1})]))}}),me=e.defineComponent({name:"XAlert",__name:"index",props:{type:{default:"info"},title:{default:""},description:{},closable:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},center:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("alert"),s=e.ref(!0),m={success:"check",warning:"warning",error:"close-circle",info:"info"},p=e.computed(()=>[a.b(),a.m(o.type),a.is("center",o.center),a.is("with-description",o.description)]),u=i=>{s.value=!1,r("close",i)};return(i,k)=>(e.openBlock(),e.createBlock(e.Transition,{name:"x-alert-fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(p.value)},[t.showIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("icon"))},[e.createVNode(e.unref(E),{name:m[t.type],size:16},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[t.title||i.$slots.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||i.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("description"))},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0)],2),t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(a).e("close")),onClick:u},[e.createVNode(e.unref(E),{name:"close",size:14})],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]),_:3}))}}),de=e.defineComponent({name:"XTooltip",__name:"index",props:{content:{default:""},placement:{default:"top"},effect:{default:"dark"},disabled:{type:Boolean,default:!1},offset:{default:8},transition:{default:"fade"},visibleArrow:{type:Boolean,default:!0},trigger:{default:"hover"},openDelay:{default:0},closeDelay:{default:0}},emits:["update:visible","show","hide"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("tooltip"),s=e.ref(!1),m=e.ref(),p=e.ref();let u,i;const k=e.ref({}),h=()=>{if(!m.value||!p.value)return;const C=m.value.getBoundingClientRect(),N=p.value;N.style.visibility="hidden",N.style.display="block";const V=N.offsetWidth,S=N.offsetHeight,T=o.offset,X=window.innerWidth,F=window.innerHeight;let z=0,B=0,$=o.placement;switch(o.placement){case"top":z=C.top-S-T,B=C.left+(C.width-V)/2;break;case"bottom":z=C.bottom+T,B=C.left+(C.width-V)/2;break;case"left":z=C.top+(C.height-S)/2,B=C.left-V-T;break;case"right":z=C.top+(C.height-S)/2,B=C.right+T;break}o.placement==="top"&&z<0?($="bottom",z=C.bottom+T):o.placement==="bottom"&&z+S>F?($="top",z=C.top-S-T):o.placement==="left"&&B<0?($="right",B=C.right+T):o.placement==="right"&&B+V>X&&($="left",B=C.left-V-T),B<8&&(B=8),B+V>X-8&&(B=X-V-8),z<8&&(z=8),z+S>F-8&&(z=F-S-8),k.value={position:"fixed",top:`${z}px`,left:`${B}px`,visibility:"visible",zIndex:"2000"},M.value=$},M=e.ref(o.placement),f=()=>{o.disabled||(clearTimeout(i),u=setTimeout(()=>{s.value=!0,r("update:visible",!0),r("show"),e.nextTick(()=>{h()})},o.openDelay))},d=()=>{clearTimeout(u),i=setTimeout(()=>{s.value=!1,r("update:visible",!1),r("hide")},o.closeDelay)},l=()=>{s.value?d():f()},v=()=>{o.trigger==="hover"&&f()},c=()=>{o.trigger==="hover"&&d()},g=()=>{o.trigger==="click"&&l()},L=()=>{o.trigger==="focus"&&f()},w=()=>{o.trigger==="focus"&&d()},b=C=>{var N,V;o.trigger==="click"&&!((N=m.value)!=null&&N.contains(C.target))&&!((V=p.value)!=null&&V.contains(C.target))&&d()},y=()=>{s.value&&h()};e.watch(s,C=>{C?e.nextTick(()=>{h(),o.trigger==="click"&&document.addEventListener("click",b),window.addEventListener("scroll",y,!0),window.addEventListener("resize",y)}):(document.removeEventListener("click",b),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y))}),e.onUnmounted(()=>{clearTimeout(u),clearTimeout(i),document.removeEventListener("click",b),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y)});const P=e.computed(()=>[a.b(),a.m(o.effect)]),R=e.computed(()=>[a.e("arrow"),a.e(`arrow-${M.value}`)]);return(C,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).e("wrapper"))},[e.createElementVNode("div",{ref_key:"triggerRef",ref:m,class:e.normalizeClass(e.unref(a).e("trigger")),onMouseenter:v,onMouseleave:c,onClick:g,onFocus:L,onBlur:w},[e.renderSlot(C.$slots,"default")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:`x-tooltip-${t.transition}`},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"tooltipRef",ref:p,class:e.normalizeClass(P.value),style:e.normalizeStyle(k.value),onMouseenter:v,onMouseleave:c},[e.renderSlot(C.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)]),t.visibleArrow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(R.value)},null,2)):e.createCommentVNode("",!0)],38),[[e.vShow,s.value]])]),_:3},8,["name"])]))],2))}}),ue={class:"x-popconfirm-wrapper"},he={class:"x-popconfirm__main"},fe={class:"x-popconfirm__title"},pe={class:"x-popconfirm__action"},ve=e.defineComponent({name:"XPopconfirm",__name:"index",props:{title:{default:""},confirmButtonText:{default:"确定"},cancelButtonText:{default:"取消"},confirmButtonType:{default:"primary"},cancelButtonType:{default:"default"},icon:{default:""},iconColor:{default:"#faad14"},hideIcon:{type:Boolean,default:!1},hideCancelButton:{type:Boolean,default:!1},hideConfirmButton:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},width:{default:200},placement:{default:"top"},offset:{default:12},showArrow:{type:Boolean,default:!0}},emits:["confirm","cancel"],setup(t,{emit:n}){const o=t,r=n,a=e.ref(!1),s=e.ref(null),m=e.ref(null),p=e.ref({}),u=()=>{if(!s.value||!m.value)return;const c=s.value.getBoundingClientRect(),g=m.value.getBoundingClientRect(),L=o.placement,w=o.offset;let b=0,y=0;switch(L){case"top":b=c.top-g.height-w,y=c.left+(c.width-g.width)/2;break;case"top-start":b=c.top-g.height-w,y=c.left;break;case"top-end":b=c.top-g.height-w,y=c.right-g.width;break;case"bottom":b=c.bottom+w,y=c.left+(c.width-g.width)/2;break;case"bottom-start":b=c.bottom+w,y=c.left;break;case"bottom-end":b=c.bottom+w,y=c.right-g.width;break;case"left":b=c.top+(c.height-g.height)/2,y=c.left-g.width-w;break;case"left-start":b=c.top,y=c.left-g.width-w;break;case"left-end":b=c.bottom-g.height,y=c.left-g.width-w;break;case"right":b=c.top+(c.height-g.height)/2,y=c.right+w;break;case"right-start":b=c.top,y=c.right+w;break;case"right-end":b=c.bottom-g.height,y=c.right+w;break;default:b=c.top-g.height-w,y=c.left+(c.width-g.width)/2}const P=window.innerWidth,R=window.innerHeight;y<0&&(y=10),y+g.width>P&&(y=P-g.width-10),b<0&&(b=10),b+g.height>R&&(b=R-g.height-10),p.value={position:"fixed",top:`${b}px`,left:`${y}px`,zIndex:"2000"}},i=c=>{var g,L;a.value&&((g=s.value)!=null&&g.contains(c.target)||(L=m.value)!=null&&L.contains(c.target)||(a.value=!1))},k=c=>{o.disabled||(c.stopPropagation(),a.value=!a.value,a.value&&setTimeout(u,0))},h=()=>{a.value=!1,r("confirm")},M=()=>{a.value=!1,r("cancel")},f=()=>{a.value&&u()},d=()=>{a.value&&u()};e.watch(a,c=>{c?(setTimeout(u,0),document.addEventListener("click",i),window.addEventListener("scroll",f,!0),window.addEventListener("resize",d)):(document.removeEventListener("click",i),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",d))}),e.onUnmounted(()=>{document.removeEventListener("click",i),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",d)});const l=e.computed(()=>({width:typeof o.width=="number"?`${o.width}px`:o.width})),v=e.computed(()=>{const c=o.placement,g={};switch(c){case"top":case"top-start":case"top-end":g.bottom="-6px",g.transform="rotate(45deg)";break;case"bottom":case"bottom-start":case"bottom-end":g.top="-6px",g.transform="rotate(225deg)";break;case"left":case"left-start":case"left-end":g.right="-6px",g.transform="rotate(315deg)";break;case"right":case"right-start":case"right-end":g.left="-6px",g.transform="rotate(135deg)";break}return g});return(c,g)=>(e.openBlock(),e.createElementBlock("span",ue,[e.createElementVNode("span",{ref_key:"triggerRef",ref:s,class:"x-popconfirm-trigger",onClick:k},[e.renderSlot(c.$slots,"default")],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"x-popconfirm-fade"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popperRef",ref:m,class:"x-popconfirm",style:e.normalizeStyle({...p.value,...l.value}),onClick:g[0]||(g[0]=e.withModifiers(()=>{},["stop"]))},[t.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,class:"x-popconfirm__arrow",style:e.normalizeStyle(v.value)},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",he,[t.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:"x-popconfirm__icon",style:e.normalizeStyle({color:t.iconColor})},[e.renderSlot(c.$slots,"icon",{},()=>[e.createTextVNode(e.toDisplayString(t.icon||"⚠"),1)])],4)),e.createElementVNode("div",fe,[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])]),e.createElementVNode("div",pe,[t.hideCancelButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"x-button p-button--default p-button--small",onClick:M},e.toDisplayString(t.cancelButtonText),1)),t.hideConfirmButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["x-button x-button--small",`x-button--${t.confirmButtonType}`]),onClick:h},e.toDisplayString(t.confirmButtonText),3))])],4)):e.createCommentVNode("",!0)]),_:3})]))]))}}),ge=e.defineComponent({name:"XBacktop",__name:"index",props:{visibilityHeight:{default:200},right:{default:40},bottom:{default:40}},emits:["click"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("backtop"),s=e.ref(!1),m=()=>{const i=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0;s.value=i>=o.visibilityHeight},p=i=>{window.scrollTo({top:0,behavior:"smooth"}),r("click",i)},u=e.computed(()=>({right:`${o.right}px`,bottom:`${o.bottom}px`}));return e.onMounted(()=>{window.addEventListener("scroll",m,{passive:!0,capture:!0}),setTimeout(m,100)}),e.onUnmounted(()=>{window.removeEventListener("scroll",m,!0)}),(i,k)=>(e.openBlock(),e.createBlock(e.Transition,{name:"x-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).b()),style:e.normalizeStyle(u.value),onClick:p},[e.renderSlot(i.$slots,"default",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("icon"))},[e.createVNode(e.unref(E),{name:"back-top",size:20})],2)])],6),[[e.vShow,s.value]])]),_:3}))}}),Me=e.defineComponent({name:"XResult",__name:"index",props:{status:{default:"info"},title:{default:""},subTitle:{default:""},icon:{}},setup(t){const n=t,o=x.useNamespace("result"),r=e.computed(()=>n.icon?n.icon:{success:"check-circle",warning:"warning",error:"close-circle",info:"info-circle"}[n.status]);return(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).m(t.status)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("icon"))},[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(e.unref(E),{name:r.value,size:72},null,8,["name"])])],2),t.title||a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("title"))},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.subTitle||a.$slots.subTitle?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("subtitle"))},[e.renderSlot(a.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)])],2)):e.createCommentVNode("",!0),a.$slots.extra?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(o).e("extra"))},[e.renderSlot(a.$slots,"extra")],2)):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(o).e("content"))},[e.renderSlot(a.$slots,"default")],2)):e.createCommentVNode("",!0)],2))}}),ke=e.defineComponent({name:"XTimeline",__name:"index",setup(t){const n=x.useNamespace("timeline");return(o,r)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(n).b())},[e.renderSlot(o.$slots,"default")],2))}}),ye=e.defineComponent({name:"XTimelineItem",__name:"TimelineItem",props:{timestamp:{},placement:{default:"bottom"},type:{default:"primary"},color:{},size:{default:"normal"},icon:{},hollow:{type:Boolean,default:!1}},setup(t){const n=x.useNamespace("timeline-item");return(o,r)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([e.unref(n).b(),e.unref(n).m(t.placement)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("tail"))},null,2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(n).e("node"),e.unref(n).m(t.type),e.unref(n).is("hollow",t.hollow)]),style:e.normalizeStyle(t.color?{backgroundColor:t.color,borderColor:t.color}:void 0)},[e.renderSlot(o.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("icon"))},e.toDisplayString(t.icon),3)):e.createCommentVNode("",!0)])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper"))},[t.timestamp&&t.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("timestamp"))},e.toDisplayString(t.timestamp),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),t.timestamp&&t.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).e("timestamp"))},e.toDisplayString(t.timestamp),3)):e.createCommentVNode("",!0)],2)],2))}}),Ce=e.defineComponent({name:"XMessage",__name:"index",props:{message:{default:""},type:{default:"info"},duration:{default:3e3},showClose:{type:Boolean,default:!1},center:{type:Boolean,default:!1},offset:{default:20},customClass:{},onClose:{}},emits:["close","destroy"],setup(t,{expose:n,emit:o}){const r=t,a=o,s=x.useNamespace("message"),m=e.ref(!1),p=e.ref(x.nextMessageZIndex()),u={success:"check",warning:"warning",error:"close-circle",info:"info"},i=e.computed(()=>[s.b(),s.m(r.type),s.is("center",r.center),s.is("closable",r.showClose),r.customClass]),k=e.computed(()=>({top:`${r.offset}px`,zIndex:p.value}));let h=null;const M=()=>{r.duration>0&&(h=setTimeout(()=>{d()},r.duration))},f=()=>{h&&(clearTimeout(h),h=null)},d=()=>{var v;m.value=!1,(v=r.onClose)==null||v.call(r),a("close")},l=()=>{a("destroy")};return e.onMounted(()=>{M(),m.value=!0}),e.onUnmounted(()=>{f()}),n({close:d}),(v,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"x-message-fade",onAfterLeave:l},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value),style:e.normalizeStyle(k.value),onMouseenter:f,onMouseleave:M},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(s).e("icon"))},[e.createVNode(e.unref(E),{name:u[t.type],size:16},null,8,["name"])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(s).e("content"))},[e.renderSlot(v.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)])],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(s).e("close")),onClick:d},[e.createVNode(e.unref(E),{name:"close",size:14})],2)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3}))}}),I=[];let be=1;const we=()=>{I.slice().forEach(t=>t.close())};function K(t){const n=be++,o=document.createElement("div");document.body.appendChild(o);const r={success:{bg:"#f0f9eb",border:"#67c23a",iconPath:"M5 13l4 4L19 7"},warning:{bg:"#fdf6ec",border:"#e6a23c",iconPath:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},error:{bg:"#fef0f0",border:"#f56c6c",iconPath:"M6 18L18 6M6 6l12 12"},info:{bg:"#f4f4f5",border:"#909399",iconPath:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}},a=t.type||"info",s=r[a]||r.info,m=e.reactive({visible:!1,offset:t.offset??20});let p=t.offset??20;I.forEach(l=>{const v=l.container.firstElementChild;v&&v.offsetHeight&&(p+=v.offsetHeight+16)}),m.offset=p;let u=null,i=!1;const k=()=>{i||(m.visible=!1,setTimeout(()=>{if(i)return;i=!0;const l=I.findIndex(v=>v.id===n);l!==-1&&I.splice(l,1);try{f.unmount()}catch{}o.parentNode&&o.parentNode.removeChild(o)},300))},h=()=>{const l=t.duration??3e3;l>0&&(u=setTimeout(k,l))},M=()=>{u&&(clearTimeout(u),u=null)},f=e.createApp({render(){if(!m.visible)return null;const l=[e.h("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginRight:"10px",color:s.border}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:s.iconPath})])]),e.h("span",{style:{flex:"1",fontSize:"14px",color:"#606266",lineHeight:"1.4"}},t.message||"")];return t.showClose&&l.push(e.h("button",{style:{position:"absolute",top:"50%",right:"12px",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",color:"#909399",padding:"0",display:"flex",alignItems:"center",justifyContent:"center"},onClick:v=>{v.stopPropagation(),k()}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:"M6 18L18 6M6 6l12 12"})])])),e.h("div",{class:["x-message",`x-message--${a}`,t.center?"is-center":"",t.showClose?"is-closable":""],style:{position:"fixed",left:"50%",top:`${m.offset}px`,transform:"translateX(-50%)",display:"flex",alignItems:"center",padding:t.showClose?"12px 40px 12px 16px":"12px 16px",borderRadius:"4px",boxShadow:"0 2px 12px rgba(0,0,0,0.1)",minWidth:"280px",maxWidth:"480px",backgroundColor:s.bg,border:`1px solid ${s.border}`,zIndex:2e3+n,transition:"opacity 0.3s, transform 0.3s"},onMouseenter:M,onMouseleave:h},l)}});f.mount(o),e.nextTick(()=>{m.visible=!0,h()});const d={id:n,app:f,container:o,close:k};return I.push(d),{close:k}}function xe(t){return K(typeof t=="string"?{message:t}:t)}const O=t=>n=>K({...typeof n=="string"?{message:n}:n,type:t}),q=Object.assign(xe,{info:O("info"),success:O("success"),warning:O("warning"),error:O("error"),closeAll:we}),ze=q,Be=Ce,Ve={install(t){t.config.globalProperties.$message=q,t.provide("message",q)}},A=[],Ee=()=>{A.slice().forEach(t=>t.close())},Ne={success:{iconPath:"M5 13l4 4L19 7",color:"#67c23a"},warning:{iconPath:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",color:"#e6a23c"},error:{iconPath:"M6 18L18 6M6 6l12 12",color:"#f56c6c"},info:{iconPath:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",color:"#909399"}};function j(t){return new Promise(n=>{const o=document.createElement("div");document.body.appendChild(o);let r=!1;const a=e.defineComponent({name:"TMessageBox",setup(){const p=e.ref(!1),u=e.ref(t.inputValue??""),i=e.ref(""),k=2e3+A.length+1,h=v=>{r||(r=!0,p.value=!1,setTimeout(()=>{const c=A.findIndex(g=>g.container===o);c!==-1&&A.splice(c,1);try{s.unmount()}catch{}o.parentNode&&o.parentNode.removeChild(o),n({action:v,value:v==="confirm"?u.value:void 0})},300))},M=()=>{if(t.showInput&&t.inputPattern&&!t.inputPattern.test(u.value)){i.value=t.inputErrorMessage||"输入格式不正确";return}i.value="",h("confirm")},f=()=>{h("cancel")},d=()=>{h("close")},l=()=>{t.closeOnClickModal!==!1&&d()};return e.nextTick(()=>{p.value=!0}),{visible:p,inputValue:u,inputError:i,zIndex:k,handleConfirm:M,handleCancel:f,handleClose:d,handleMaskClick:l}},render(){if(!this.visible)return null;const p=t.type,u=p?Ne[p]:null,i=[];u&&i.push(e.h("span",{class:"x-message-box__icon",style:{color:u.color,marginRight:"10px",display:"flex",alignItems:"center"}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:u.iconPath})])])),i.push(e.h("span",{class:"x-message-box__title"},t.title||"提示")),t.showClose!==!1&&i.push(e.h("button",{class:"x-message-box__close",onClick:this.handleClose,style:{display:"flex",alignItems:"center",justifyContent:"center"}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:"M6 18L18 6M6 6l12 12"})])]));const k=[];k.push(e.h("div",{class:"x-message-box__content"},t.message||"")),t.showInput&&k.push(e.h("div",{class:"x-message-box__input",style:{marginTop:"12px"}},[e.h("input",{class:["x-message-box__input-inner",this.inputError?"is-error":""].filter(Boolean),type:t.inputType||"text",placeholder:t.inputPlaceholder||"请输入",value:this.inputValue,onInput:M=>{this.inputValue=M.target.value,this.inputError=""},onKeyup:M=>{M.key==="Enter"&&this.handleConfirm()}}),this.inputError?e.h("div",{class:"x-message-box__error",style:{color:"#f56c6c",fontSize:"12px",marginTop:"4px"}},this.inputError):null]));const h=[];return t.showCancelButton&&h.push(e.h("button",{class:"x-button p-button--default",onClick:this.handleCancel},t.cancelButtonText||"取消")),t.showConfirmButton!==!1&&h.push(e.h("button",{class:"x-button p-button--primary",onClick:this.handleConfirm,style:{marginLeft:"10px"}},t.confirmButtonText||"确定")),e.h("div",{class:["x-message-box-wrapper",t.center?"is-center":""],style:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:this.zIndex},onClick:this.handleMaskClick},[e.h("div",{class:["x-message-box",t.customClass],style:{backgroundColor:"#fff",borderRadius:"4px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",minWidth:"300px",maxWidth:"500px"},onClick:M=>M.stopPropagation()},[e.h("div",{class:"x-message-box__header",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #eee"}},i),e.h("div",{class:"x-message-box__body",style:{padding:"20px",fontSize:"14px",color:"#606266"}},k),e.h("div",{class:"x-message-box__footer",style:{padding:"10px 20px 16px",textAlign:"right"}},h)])])}}),s=e.createApp(a);s.mount(o);const m={app:s,container:o,close:()=>{var u;const p=(u=s._instance)==null?void 0:u.proxy;p!=null&&p.handleClose&&p.handleClose()}};A.push(m)})}async function Te(t,n,o){return j({message:t,title:n,...o,showConfirmButton:!0,showCancelButton:!1})}async function Se(t,n,o){return j({message:t,title:n,...o,showConfirmButton:!0,showCancelButton:!0})}async function Le(t,n,o){return j({message:t,title:n,...o,showInput:!0,showConfirmButton:!0,showCancelButton:!0})}function He(t){return j(t)}const H=Object.assign(He,{alert:Te,confirm:Se,prompt:Le,closeAll:Ee}),$e=H,Ie={install(t){t.config.globalProperties.$msgbox=H,t.config.globalProperties.$alert=H.alert,t.config.globalProperties.$confirm=H.confirm,t.config.globalProperties.$prompt=H.prompt,t.provide("messageBox",H)}},D=[];let Ae=1;const De=()=>{D.slice().forEach(t=>t.close())},Pe={success:{iconPath:"M5 13l4 4L19 7",color:"#67c23a"},warning:{iconPath:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",color:"#e6a23c"},error:{iconPath:"M6 18L18 6M6 6l12 12",color:"#f56c6c"},info:{iconPath:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",color:"#909399"}},Re=(t,n)=>{const o=D.filter(a=>a.position===t);let r=16;for(const a of o)if(a.id<n){const s=a.container.firstElementChild;s&&(r+=s.offsetHeight+16)}return r},Oe=(t,n)=>{const o={position:"fixed",width:"330px",zIndex:"2010"};switch(t){case"top-right":o.top=`${n}px`,o.right="16px";break;case"top-left":o.top=`${n}px`,o.left="16px";break;case"bottom-right":o.bottom=`${n}px`,o.right="16px";break;case"bottom-left":o.bottom=`${n}px`,o.left="16px";break;default:o.top=`${n}px`,o.right="16px"}return o};function Y(t){const n=Ae++,o=t.position||"top-right",r=document.createElement("div");document.body.appendChild(r);let a=null,s=!1;const m=e.defineComponent({name:"TNotification",setup(){const i=e.ref(!1),k=()=>{s||(s=!0,i.value=!1,setTimeout(()=>{var v;const l=D.findIndex(c=>c.id===n);l!==-1&&D.splice(l,1),a&&clearTimeout(a),(v=t.onClose)==null||v.call(t);try{p.unmount()}catch{}r.parentNode&&r.parentNode.removeChild(r)},300))},h=()=>{const l=t.duration??4500;l>0&&(a=setTimeout(k,l))},M=()=>{a&&(clearTimeout(a),a=null)},f=e.computed(()=>(t.offset??0)+Re(o,n)),d=e.computed(()=>Oe(o,f.value));return e.nextTick(()=>{i.value=!0,h()}),{visible:i,close:k,positionStyles:d,startTimer:h,clearTimer:M}},render(){if(!this.visible)return null;const i=t.type,k=i?Pe[i]:null,h=[];t.title&&h.push(e.h("div",{class:"x-notification__title",style:{fontWeight:"600",fontSize:"16px",color:"#303133",marginBottom:t.message?"6px":"0"}},t.title)),t.message&&(t.dangerouslyUseHTMLString?h.push(e.h("div",{class:"x-notification__content",style:{fontSize:"14px",color:"#606266",lineHeight:"1.5"},innerHTML:t.message})):h.push(e.h("div",{class:"x-notification__content",style:{fontSize:"14px",color:"#606266",lineHeight:"1.5"}},t.message)));const M=[];return k&&M.push(e.h("div",{class:"x-notification__icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",marginRight:"12px",color:k.color}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:k.iconPath})])])),M.push(e.h("div",{class:"x-notification__main",style:{flex:"1"}},h)),t.showClose!==!1&&M.push(e.h("button",{class:"x-notification__close",style:{position:"absolute",top:"18px",right:"15px",background:"none",border:"none",cursor:"pointer",color:"#909399",padding:"0",display:"flex",alignItems:"center",justifyContent:"center"},onClick:f=>{f.stopPropagation(),this.close()}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:"M6 18L18 6M6 6l12 12"})])])),e.h("div",{class:["x-notification",t.customClass],style:{...this.positionStyles,display:"flex",alignItems:"flex-start",padding:"14px 26px 14px 13px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",transition:"opacity 0.3s, transform 0.3s",boxSizing:"border-box"},onMouseenter:this.clearTimer,onMouseleave:this.startTimer},M)}}),p=e.createApp(m);p.mount(r);const u={id:n,app:p,container:r,position:o,close:()=>{var k;const i=(k=p._instance)==null?void 0:k.proxy;i!=null&&i.close&&i.close()}};return D.push(u),{close:u.close}}function We(t){return Y(typeof t=="string"?{message:t}:t)}const W=t=>n=>Y({...typeof n=="string"?{message:n}:n,type:t}),U=Object.assign(We,{info:W("info"),success:W("success"),warning:W("warning"),error:W("error"),closeAll:De}),je=U,Xe={install(t){t.config.globalProperties.$notify=U,t.provide("notification",U)}};exports.Alert=me;exports.Backtop=ge;exports.Drawer=te;exports.DrawerForm=ce;exports.Message=ze;exports.MessageBox=$e;exports.MessageComponent=Be;exports.Modal=ee;exports.Notification=je;exports.Popconfirm=ve;exports.Result=Me;exports.TMessage=Ve;exports.TMessageBox=Ie;exports.TNotification=Xe;exports.Timeline=ke;exports.TimelineItem=ye;exports.Tooltip=de;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("@xto/core"),Z={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",heading:"M4 6h16M4 12h8m-8 6h16",bold:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",italic:"M10 4h4m-2 0v16m-4 0h8",strikethrough:"M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z","list-bullet":"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12","list-number":"M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12","link-text":"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","image-insert":"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z","code-inline":"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4","divider-h":"M4 12h16",quote:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z","code-block":"M4 4h16v16H4z M8 8h8M8 12h8M8 16h4","sort-up":"M12 5v14m-7-7l7-7 7 7","sort-down":"M12 19V5m7 7l-7 7-7-7","chevron-down":"M6 9l6 6 6-6","chevron-right":"M9 18l6-6-6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","move-up":"M5 15l7-7 7 7","move-down":"M19 9l-7 7-7-7","back-top":"M12 19V5m-7 7l7-7 7 7","dropdown-arrow":"M6 9l6 6 6-6","close-circle":"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z","close-bold":"M6 18L18 6M6 6l12 12","check-circle":"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","info-circle":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z","warning-circle":"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z","back-arrow":"M19 12H5m0 0l7 7m-7-7l7-7","d-arrow-left":"M11 17l-5-5 5-5M18 17l-5-5 5-5","d-arrow-right":"M6 7l5 5-5 5M13 7l5 5-5 5",left:"M15 19l-7-7 7-7",right:"M9 5l7 7-7 7",down:"M19 9l-7 7-7-7",up:"M5 15l7-7 7 7"};function G(t){return t in Z}const J=["aria-hidden","aria-label"],Q=["stroke-width"],_=["d"],E=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(t,{expose:n}){const o=t,r=x.useNamespace("icon"),a=e.computed(()=>typeof o.size=="number"?`${o.size}px`:o.size),s=e.computed(()=>({width:a.value,height:a.value,color:o.color})),m=e.computed(()=>({strokeWidth:o.strokeWidth})),p=e.computed(()=>[r.b(),r.is("spin",o.spin)]),u=e.computed(()=>o.name&&G(o.name)?Z[o.name]:"");return n({iconSize:a,iconStyle:s,iconPath:u}),(i,k)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(p.value),style:e.normalizeStyle(s.value),"aria-hidden":!t.name,"aria-label":t.name,role:"img"},[u.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":t.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(m.value),"aria-hidden":"true"},[e.createElementVNode("path",{d:u.value},null,8,_)],12,Q)):e.renderSlot(i.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(t.name),1)])],14,J))}}),ee=e.defineComponent({name:"XModal",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},title:{default:""},width:{default:"50%"},top:{default:"15vh"},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},center:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","update:open","close","open","ok","cancel"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("modal"),{next:s}=x.useZIndex(),m=e.ref(s()),p=e.computed({get:()=>o.modelValue!==void 0?o.modelValue:o.open!==void 0?o.open:!1,set:d=>{o.modelValue!==void 0&&r("update:modelValue",d),o.open!==void 0&&r("update:open",d),o.modelValue===void 0&&o.open===void 0&&r("update:modelValue",d)}}),u=e.ref(),i=()=>{p.value=!1,r("cancel"),r("close")},k=()=>{r("ok")},h=()=>{o.closeOnClickModal&&o.modal&&i()};x.useEscape(()=>{o.closeOnPressEscape&&p.value&&i()}),e.watch(()=>[o.modelValue,o.open],([d,l])=>{(d!==void 0?d:l)&&(m.value=s(),r("open"))},{immediate:!0});const M=e.computed(()=>({paddingTop:o.top})),f=e.computed(()=>({width:typeof o.width=="number"?`${o.width}px`:o.width,zIndex:m.value}));return(d,l)=>{const v=e.resolveComponent("x-button");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"x-modal-fade"},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("wrapper")),style:e.normalizeStyle(M.value),onClick:h},[e.createElementVNode("div",{ref_key:"modalRef",ref:u,class:e.normalizeClass(e.unref(a).b()),style:e.normalizeStyle(f.value),onClick:l[0]||(l[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("header"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(a).e("close")),onClick:i},[e.createVNode(e.unref(E),{name:"close",size:16})],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("body"))},[e.renderSlot(d.$slots,"default")],2),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("footer"))},[e.renderSlot(d.$slots,"footer",{ok:k,cancel:i})],2)):d.$slots.footer?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("footer"))},[e.createVNode(v,{onClick:i},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(v,{type:"primary",style:{"margin-left":"8px"},onClick:k},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode("确定",-1)])]),_:1})],2))],6)],6)):e.createCommentVNode("",!0)]),_:3})])}}}),te=e.defineComponent({name:"XDrawer",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:""},placement:{default:void 0},direction:{default:"rtl"},width:{default:void 0},size:{default:"30%"},withHeader:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},destroyOnClose:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:modelValue","close","open"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("drawer"),s=e.ref(2e3),m=()=>{r("update:modelValue",!1),r("close")},p=()=>{o.closeOnClickModal&&m()},u=h=>{h.key==="Escape"&&o.modelValue&&m()};e.watch(()=>o.modelValue,h=>{h?(s.value=2e3+Math.floor(Math.random()*100),r("open"),document.addEventListener("keydown",u)):document.removeEventListener("keydown",u)});const i=e.computed(()=>({zIndex:s.value})),k=e.computed(()=>{const h=o.direction??o.placement??"rtl",M=o.size??o.width??"30%",f=typeof M=="number"?`${M}px`:M;return{ltr:{width:f,height:"100%"},rtl:{width:f,height:"100%"},ttb:{width:"100%",height:f},btt:{width:"100%",height:f}}[h]});return(h,M)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"x-drawer-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).e("overlay"),{[e.unref(a).em("overlay","no-modal")]:!t.modal}]),style:e.normalizeStyle(i.value),onClick:p},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).b(),e.unref(a).m(t.direction??t.placement??"rtl")]),style:e.normalizeStyle(k.value),onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},[t.withHeader?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("header"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(h.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(a).e("close")),onClick:m},[e.createVNode(e.unref(E),{name:"close",size:18})],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).e("body"),h.$slots.footer&&e.unref(a).em("body","has-footer")])},[e.renderSlot(h.$slots,"default")],2),h.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("footer"))},[e.renderSlot(h.$slots,"footer")],2)):e.createCommentVNode("",!0)],6)],6),[[e.vShow,t.modelValue]])]),_:3})]))}}),oe={key:0,class:"required-mark"},ae=["value","placeholder","disabled","onInput"],le=["value","placeholder","disabled","onInput"],ne=["value","placeholder","disabled","onInput"],se=["value","disabled","onChange"],re=["value"],ie=["disabled","onClick"],ce=e.defineComponent({name:"XDrawerForm",__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:"配置"},size:{default:"400px"},fields:{default:()=>[]},formData:{default:()=>({})},showConfirm:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},confirmText:{default:"确认"},cancelText:{default:"取消"},disabled:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1}},emits:["update:modelValue","confirm","cancel","close","field-change"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("drawer-form"),s=e.ref({}),m=e.ref({});e.computed(()=>[a.b()]),e.watch(()=>o.formData,f=>{s.value={...f}},{immediate:!0,deep:!0});const p=e.computed(()=>typeof o.size=="number"?`${o.size}px`:o.size),u=()=>{r("update:modelValue",!1),r("close")},i=()=>{r("cancel"),u()},k=()=>{h()&&(r("confirm",s.value),u())},h=()=>{m.value={};for(const f of o.fields){if(f.required){const d=s.value[f.name];if(d==null||d===""){m.value[f.name]=`${f.label}为必填项`;continue}}if(f.rules)for(const d of f.rules){const l=s.value[f.name];d.type==="email"&&l&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)&&(m.value[f.name]=d.message),d.type==="minLength"&&l&&l.length<d.min&&(m.value[f.name]=d.message)}}return Object.keys(m.value).length===0},M=(f,d)=>{s.value[f]=d,r("field-change",f,d)};return(f,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"drawer-form-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("overlay")),onClick:u},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).b()),style:e.normalizeStyle({width:p.value}),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("header"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("title"))},e.toDisplayString(t.title),3),e.createElementVNode("button",{class:e.normalizeClass(e.unref(a).e("close")),onClick:u},[e.createVNode(e.unref(E),{name:"close",size:16})],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("body"))},[!t.destroyOnClose||t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("form"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fields,l=>(e.openBlock(),e.createElementBlock("div",{key:l.name,class:e.normalizeClass(e.unref(a).e("field"))},[e.createElementVNode("label",{class:e.normalizeClass(e.unref(a).e("label"))},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),l.required?(e.openBlock(),e.createElementBlock("span",oe,"*")):e.createCommentVNode("",!0)],2),l.type==="input"?(e.openBlock(),e.createElementBlock("input",{key:0,class:e.normalizeClass([e.unref(a).e("input"),{"has-error":m.value[l.name]}]),value:s.value[l.name],placeholder:l.placeholder,disabled:t.disabled||l.disabled,onInput:v=>M(l.name,v.target.value)},null,42,ae)):l.type==="textarea"?(e.openBlock(),e.createElementBlock("textarea",{key:1,class:e.normalizeClass([e.unref(a).e("textarea"),{"has-error":m.value[l.name]}]),value:s.value[l.name],placeholder:l.placeholder,disabled:t.disabled||l.disabled,rows:"4",onInput:v=>M(l.name,v.target.value)},null,42,le)):l.type==="number"?(e.openBlock(),e.createElementBlock("input",{key:2,type:"number",class:e.normalizeClass([e.unref(a).e("input"),{"has-error":m.value[l.name]}]),value:s.value[l.name],placeholder:l.placeholder,disabled:t.disabled||l.disabled,onInput:v=>M(l.name,Number(v.target.value))},null,42,ne)):l.type==="select"?(e.openBlock(),e.createElementBlock("select",{key:3,class:e.normalizeClass([e.unref(a).e("select"),{"has-error":m.value[l.name]}]),value:s.value[l.name],disabled:t.disabled||l.disabled,onChange:v=>M(l.name,v.target.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,v=>(e.openBlock(),e.createElementBlock("option",{key:v.value,value:v.value},e.toDisplayString(v.label),9,re))),128))],42,se)):l.type==="switch"?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(e.unref(a).e("switch"))},[e.createElementVNode("button",{class:e.normalizeClass(["switch-btn",{"is-on":s.value[l.name]}]),disabled:t.disabled||l.disabled,onClick:v=>M(l.name,!s.value[l.name])},e.toDisplayString(s.value[l.name]?"开启":"关闭"),11,ie)],2)):e.createCommentVNode("",!0),m.value[l.name]?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(e.unref(a).e("error"))},e.toDisplayString(m.value[l.name]),3)):e.createCommentVNode("",!0)],2))),128))],2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("footer"))},[t.showCancel?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(a).e("cancel")),onClick:i},e.toDisplayString(t.cancelText),3)):e.createCommentVNode("",!0),t.showConfirm?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(a).e("confirm")),onClick:k},e.toDisplayString(t.confirmText),3)):e.createCommentVNode("",!0)],2)],6)],2),[[e.vShow,t.modelValue]])]),_:1})]))}}),me=e.defineComponent({name:"XAlert",__name:"index",props:{type:{default:"info"},title:{default:""},description:{},closable:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},center:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("alert"),s=e.ref(!0),m={success:"check",warning:"warning",error:"close-circle",info:"info"},p=e.computed(()=>[a.b(),a.m(o.type),a.is("center",o.center),a.is("with-description",!!o.description)]),u=i=>{s.value=!1,r("close",i)};return(i,k)=>(e.openBlock(),e.createBlock(e.Transition,{name:"x-alert-fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(p.value)},[t.showIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("icon"))},[e.createVNode(e.unref(E),{name:m[t.type],size:16},null,8,["name"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[t.title||i.$slots.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("title"))},[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.description||i.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(a).e("description"))},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0)],2),t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(a).e("close")),onClick:u},[e.createVNode(e.unref(E),{name:"close",size:14})],2)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]),_:3}))}}),de=e.defineComponent({name:"XTooltip",__name:"index",props:{content:{default:""},placement:{default:"top"},effect:{default:"dark"},disabled:{type:Boolean,default:!1},offset:{default:8},transition:{default:"fade"},visibleArrow:{type:Boolean,default:!0},trigger:{default:"hover"},openDelay:{default:0},closeDelay:{default:0}},emits:["update:visible","show","hide"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("tooltip"),s=e.ref(!1),m=e.ref(),p=e.ref();let u,i;const k=e.ref({}),h=()=>{if(!m.value||!p.value)return;const C=m.value.getBoundingClientRect(),N=p.value;N.style.visibility="hidden",N.style.display="block";const V=N.offsetWidth,S=N.offsetHeight,T=o.offset,X=window.innerWidth,F=window.innerHeight;let z=0,B=0,$=o.placement;switch(o.placement){case"top":z=C.top-S-T,B=C.left+(C.width-V)/2;break;case"bottom":z=C.bottom+T,B=C.left+(C.width-V)/2;break;case"left":z=C.top+(C.height-S)/2,B=C.left-V-T;break;case"right":z=C.top+(C.height-S)/2,B=C.right+T;break}o.placement==="top"&&z<0?($="bottom",z=C.bottom+T):o.placement==="bottom"&&z+S>F?($="top",z=C.top-S-T):o.placement==="left"&&B<0?($="right",B=C.right+T):o.placement==="right"&&B+V>X&&($="left",B=C.left-V-T),B<8&&(B=8),B+V>X-8&&(B=X-V-8),z<8&&(z=8),z+S>F-8&&(z=F-S-8),k.value={position:"fixed",top:`${z}px`,left:`${B}px`,visibility:"visible",zIndex:"2000"},M.value=$},M=e.ref(o.placement),f=()=>{o.disabled||(clearTimeout(i),u=setTimeout(()=>{s.value=!0,r("update:visible",!0),r("show"),e.nextTick(()=>{h()})},o.openDelay))},d=()=>{clearTimeout(u),i=setTimeout(()=>{s.value=!1,r("update:visible",!1),r("hide")},o.closeDelay)},l=()=>{s.value?d():f()},v=()=>{o.trigger==="hover"&&f()},c=()=>{o.trigger==="hover"&&d()},g=()=>{o.trigger==="click"&&l()},L=()=>{o.trigger==="focus"&&f()},w=()=>{o.trigger==="focus"&&d()},b=C=>{var N,V;o.trigger==="click"&&!((N=m.value)!=null&&N.contains(C.target))&&!((V=p.value)!=null&&V.contains(C.target))&&d()},y=()=>{s.value&&h()};e.watch(s,C=>{C?e.nextTick(()=>{h(),o.trigger==="click"&&document.addEventListener("click",b),window.addEventListener("scroll",y,!0),window.addEventListener("resize",y)}):(document.removeEventListener("click",b),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y))}),e.onUnmounted(()=>{clearTimeout(u),clearTimeout(i),document.removeEventListener("click",b),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y)});const P=e.computed(()=>[a.b(),a.m(o.effect)]),R=e.computed(()=>[a.e("arrow"),a.e(`arrow-${M.value}`)]);return(C,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).e("wrapper"))},[e.createElementVNode("div",{ref_key:"triggerRef",ref:m,class:e.normalizeClass(e.unref(a).e("trigger")),onMouseenter:v,onMouseleave:c,onClick:g,onFocus:L,onBlur:w},[e.renderSlot(C.$slots,"default")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:`x-tooltip-${t.transition}`},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"tooltipRef",ref:p,class:e.normalizeClass(P.value),style:e.normalizeStyle(k.value),onMouseenter:v,onMouseleave:c},[e.renderSlot(C.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)]),t.visibleArrow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(R.value)},null,2)):e.createCommentVNode("",!0)],38),[[e.vShow,s.value]])]),_:3},8,["name"])]))],2))}}),ue={class:"x-popconfirm-wrapper"},he={class:"x-popconfirm__main"},fe={class:"x-popconfirm__title"},pe={class:"x-popconfirm__action"},ve=e.defineComponent({name:"XPopconfirm",__name:"index",props:{title:{default:""},confirmButtonText:{default:"确定"},cancelButtonText:{default:"取消"},confirmButtonType:{default:"primary"},cancelButtonType:{default:"default"},icon:{default:""},iconColor:{default:"#faad14"},hideIcon:{type:Boolean,default:!1},hideCancelButton:{type:Boolean,default:!1},hideConfirmButton:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},width:{default:200},placement:{default:"top"},offset:{default:12},showArrow:{type:Boolean,default:!0}},emits:["confirm","cancel"],setup(t,{emit:n}){const o=t,r=n,a=e.ref(!1),s=e.ref(null),m=e.ref(null),p=e.ref({}),u=()=>{if(!s.value||!m.value)return;const c=s.value.getBoundingClientRect(),g=m.value.getBoundingClientRect(),L=o.placement,w=o.offset;let b=0,y=0;switch(L){case"top":b=c.top-g.height-w,y=c.left+(c.width-g.width)/2;break;case"top-start":b=c.top-g.height-w,y=c.left;break;case"top-end":b=c.top-g.height-w,y=c.right-g.width;break;case"bottom":b=c.bottom+w,y=c.left+(c.width-g.width)/2;break;case"bottom-start":b=c.bottom+w,y=c.left;break;case"bottom-end":b=c.bottom+w,y=c.right-g.width;break;case"left":b=c.top+(c.height-g.height)/2,y=c.left-g.width-w;break;case"left-start":b=c.top,y=c.left-g.width-w;break;case"left-end":b=c.bottom-g.height,y=c.left-g.width-w;break;case"right":b=c.top+(c.height-g.height)/2,y=c.right+w;break;case"right-start":b=c.top,y=c.right+w;break;case"right-end":b=c.bottom-g.height,y=c.right+w;break;default:b=c.top-g.height-w,y=c.left+(c.width-g.width)/2}const P=window.innerWidth,R=window.innerHeight;y<0&&(y=10),y+g.width>P&&(y=P-g.width-10),b<0&&(b=10),b+g.height>R&&(b=R-g.height-10),p.value={position:"fixed",top:`${b}px`,left:`${y}px`,zIndex:"2000"}},i=c=>{var g,L;a.value&&((g=s.value)!=null&&g.contains(c.target)||(L=m.value)!=null&&L.contains(c.target)||(a.value=!1))},k=c=>{o.disabled||(c.stopPropagation(),a.value=!a.value,a.value&&setTimeout(u,0))},h=()=>{a.value=!1,r("confirm")},M=()=>{a.value=!1,r("cancel")},f=()=>{a.value&&u()},d=()=>{a.value&&u()};e.watch(a,c=>{c?(setTimeout(u,0),document.addEventListener("click",i),window.addEventListener("scroll",f,!0),window.addEventListener("resize",d)):(document.removeEventListener("click",i),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",d))}),e.onUnmounted(()=>{document.removeEventListener("click",i),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",d)});const l=e.computed(()=>({width:typeof o.width=="number"?`${o.width}px`:o.width})),v=e.computed(()=>{const c=o.placement,g={};switch(c){case"top":case"top-start":case"top-end":g.bottom="-6px",g.transform="rotate(45deg)";break;case"bottom":case"bottom-start":case"bottom-end":g.top="-6px",g.transform="rotate(225deg)";break;case"left":case"left-start":case"left-end":g.right="-6px",g.transform="rotate(315deg)";break;case"right":case"right-start":case"right-end":g.left="-6px",g.transform="rotate(135deg)";break}return g});return(c,g)=>(e.openBlock(),e.createElementBlock("span",ue,[e.createElementVNode("span",{ref_key:"triggerRef",ref:s,class:"x-popconfirm-trigger",onClick:k},[e.renderSlot(c.$slots,"default")],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"x-popconfirm-fade"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"popperRef",ref:m,class:"x-popconfirm",style:e.normalizeStyle({...p.value,...l.value}),onClick:g[0]||(g[0]=e.withModifiers(()=>{},["stop"]))},[t.showArrow?(e.openBlock(),e.createElementBlock("span",{key:0,class:"x-popconfirm__arrow",style:e.normalizeStyle(v.value)},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",he,[t.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",{key:0,class:"x-popconfirm__icon",style:e.normalizeStyle({color:t.iconColor})},[e.renderSlot(c.$slots,"icon",{},()=>[e.createTextVNode(e.toDisplayString(t.icon||"⚠"),1)])],4)),e.createElementVNode("div",fe,[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])])]),e.createElementVNode("div",pe,[t.hideCancelButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"x-button p-button--default p-button--small",onClick:M},e.toDisplayString(t.cancelButtonText),1)),t.hideConfirmButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["x-button x-button--small",`x-button--${t.confirmButtonType}`]),onClick:h},e.toDisplayString(t.confirmButtonText),3))])],4)):e.createCommentVNode("",!0)]),_:3})]))]))}}),ge=e.defineComponent({name:"XBacktop",__name:"index",props:{visibilityHeight:{default:200},right:{default:40},bottom:{default:40}},emits:["click"],setup(t,{emit:n}){const o=t,r=n,a=x.useNamespace("backtop"),s=e.ref(!1),m=()=>{const i=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0;s.value=i>=o.visibilityHeight},p=i=>{window.scrollTo({top:0,behavior:"smooth"}),r("click",i)},u=e.computed(()=>({right:`${o.right}px`,bottom:`${o.bottom}px`}));return e.onMounted(()=>{window.addEventListener("scroll",m,{passive:!0,capture:!0}),setTimeout(m,100)}),e.onUnmounted(()=>{window.removeEventListener("scroll",m,!0)}),(i,k)=>(e.openBlock(),e.createBlock(e.Transition,{name:"x-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).b()),style:e.normalizeStyle(u.value),onClick:p},[e.renderSlot(i.$slots,"default",{},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("icon"))},[e.createVNode(e.unref(E),{name:"back-top",size:20})],2)])],6),[[e.vShow,s.value]])]),_:3}))}}),Me=e.defineComponent({name:"XResult",__name:"index",props:{status:{default:"info"},title:{default:""},subTitle:{default:""},icon:{}},setup(t){const n=t,o=x.useNamespace("result"),r=e.computed(()=>n.icon?n.icon:{success:"check-circle",warning:"warning",error:"close-circle",info:"info-circle"}[n.status]);return(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b(),e.unref(o).m(t.status)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("icon"))},[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(e.unref(E),{name:r.value,size:72},null,8,["name"])])],2),t.title||a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).e("title"))},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),t.subTitle||a.$slots.subTitle?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("subtitle"))},[e.renderSlot(a.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)])],2)):e.createCommentVNode("",!0),a.$slots.extra?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(o).e("extra"))},[e.renderSlot(a.$slots,"extra")],2)):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(e.unref(o).e("content"))},[e.renderSlot(a.$slots,"default")],2)):e.createCommentVNode("",!0)],2))}}),ke=e.defineComponent({name:"XTimeline",__name:"index",setup(t){const n=x.useNamespace("timeline");return(o,r)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(e.unref(n).b())},[e.renderSlot(o.$slots,"default")],2))}}),ye=e.defineComponent({name:"XTimelineItem",__name:"TimelineItem",props:{timestamp:{},placement:{default:"bottom"},type:{default:"primary"},color:{},size:{default:"normal"},icon:{},hollow:{type:Boolean,default:!1}},setup(t){const n=x.useNamespace("timeline-item");return(o,r)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([e.unref(n).b(),e.unref(n).m(t.placement)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("tail"))},null,2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(n).e("node"),e.unref(n).m(t.type),e.unref(n).is("hollow",t.hollow)]),style:e.normalizeStyle(t.color?{backgroundColor:t.color,borderColor:t.color}:void 0)},[e.renderSlot(o.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("icon"))},e.toDisplayString(t.icon),3)):e.createCommentVNode("",!0)])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper"))},[t.timestamp&&t.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("timestamp"))},e.toDisplayString(t.timestamp),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("content"))},[e.renderSlot(o.$slots,"default")],2),t.timestamp&&t.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).e("timestamp"))},e.toDisplayString(t.timestamp),3)):e.createCommentVNode("",!0)],2)],2))}}),Ce=e.defineComponent({name:"XMessage",__name:"index",props:{message:{default:""},type:{default:"info"},duration:{default:3e3},showClose:{type:Boolean,default:!1},center:{type:Boolean,default:!1},offset:{default:20},customClass:{},onClose:{}},emits:["close","destroy"],setup(t,{expose:n,emit:o}){const r=t,a=o,s=x.useNamespace("message"),m=e.ref(!1),p=e.ref(x.nextMessageZIndex()),u={success:"check",warning:"warning",error:"close-circle",info:"info"},i=e.computed(()=>[s.b(),s.m(r.type),s.is("center",r.center),s.is("closable",r.showClose),r.customClass]),k=e.computed(()=>({top:`${r.offset}px`,zIndex:p.value}));let h=null;const M=()=>{r.duration>0&&(h=setTimeout(()=>{d()},r.duration))},f=()=>{h&&(clearTimeout(h),h=null)},d=()=>{var v;m.value=!1,(v=r.onClose)==null||v.call(r),a("close")},l=()=>{a("destroy")};return e.onMounted(()=>{M(),m.value=!0}),e.onUnmounted(()=>{f()}),n({close:d}),(v,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"x-message-fade",onAfterLeave:l},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value),style:e.normalizeStyle(k.value),onMouseenter:f,onMouseleave:M},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(s).e("icon"))},[e.createVNode(e.unref(E),{name:u[t.type],size:16},null,8,["name"])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(s).e("content"))},[e.renderSlot(v.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)])],2),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(e.unref(s).e("close")),onClick:d},[e.createVNode(e.unref(E),{name:"close",size:14})],2)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3}))}}),I=[];let be=1;const we=()=>{I.slice().forEach(t=>t.close())};function K(t){const n=be++,o=document.createElement("div");document.body.appendChild(o);const r={success:{bg:"#f0f9eb",border:"#67c23a",iconPath:"M5 13l4 4L19 7"},warning:{bg:"#fdf6ec",border:"#e6a23c",iconPath:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},error:{bg:"#fef0f0",border:"#f56c6c",iconPath:"M6 18L18 6M6 6l12 12"},info:{bg:"#f4f4f5",border:"#909399",iconPath:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}},a=t.type||"info",s=r[a]||r.info,m=e.reactive({visible:!1,offset:t.offset??20});let p=t.offset??20;I.forEach(l=>{const v=l.container.firstElementChild;v&&v.offsetHeight&&(p+=v.offsetHeight+16)}),m.offset=p;let u=null,i=!1;const k=()=>{i||(m.visible=!1,setTimeout(()=>{if(i)return;i=!0;const l=I.findIndex(v=>v.id===n);l!==-1&&I.splice(l,1);try{f.unmount()}catch{}o.parentNode&&o.parentNode.removeChild(o)},300))},h=()=>{const l=t.duration??3e3;l>0&&(u=setTimeout(k,l))},M=()=>{u&&(clearTimeout(u),u=null)},f=e.createApp({render(){if(!m.visible)return null;const l=[e.h("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginRight:"10px",color:s.border}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:s.iconPath})])]),e.h("span",{style:{flex:"1",fontSize:"14px",color:"#606266",lineHeight:"1.4"}},t.message||"")];return t.showClose&&l.push(e.h("button",{style:{position:"absolute",top:"50%",right:"12px",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",color:"#909399",padding:"0",display:"flex",alignItems:"center",justifyContent:"center"},onClick:v=>{v.stopPropagation(),k()}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:"M6 18L18 6M6 6l12 12"})])])),e.h("div",{class:["x-message",`x-message--${a}`,t.center?"is-center":"",t.showClose?"is-closable":""],style:{position:"fixed",left:"50%",top:`${m.offset}px`,transform:"translateX(-50%)",display:"flex",alignItems:"center",padding:t.showClose?"12px 40px 12px 16px":"12px 16px",borderRadius:"4px",boxShadow:"0 2px 12px rgba(0,0,0,0.1)",minWidth:"280px",maxWidth:"480px",backgroundColor:s.bg,border:`1px solid ${s.border}`,zIndex:2e3+n,transition:"opacity 0.3s, transform 0.3s"},onMouseenter:M,onMouseleave:h},l)}});f.mount(o),e.nextTick(()=>{m.visible=!0,h()});const d={id:n,app:f,container:o,close:k};return I.push(d),{close:k}}function xe(t){return K(typeof t=="string"?{message:t}:t)}const O=t=>n=>K({...typeof n=="string"?{message:n}:n,type:t}),q=Object.assign(xe,{info:O("info"),success:O("success"),warning:O("warning"),error:O("error"),closeAll:we}),ze=Ce,Be={install(t){t.config.globalProperties.$message=q,t.provide("message",q)}},A=[],Ve=()=>{A.slice().forEach(t=>t.close())},Ee={success:{iconPath:"M5 13l4 4L19 7",color:"#67c23a"},warning:{iconPath:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",color:"#e6a23c"},error:{iconPath:"M6 18L18 6M6 6l12 12",color:"#f56c6c"},info:{iconPath:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",color:"#909399"}};function j(t){return new Promise(n=>{const o=document.createElement("div");document.body.appendChild(o);let r=!1;const a=e.defineComponent({name:"TMessageBox",setup(){const p=e.ref(!1),u=e.ref(t.inputValue??""),i=e.ref(""),k=2e3+A.length+1,h=v=>{r||(r=!0,p.value=!1,setTimeout(()=>{const c=A.findIndex(g=>g.container===o);c!==-1&&A.splice(c,1);try{s.unmount()}catch{}o.parentNode&&o.parentNode.removeChild(o),n({action:v,value:v==="confirm"?u.value:void 0})},300))},M=()=>{if(t.showInput&&t.inputPattern&&!t.inputPattern.test(u.value)){i.value=t.inputErrorMessage||"输入格式不正确";return}i.value="",h("confirm")},f=()=>{h("cancel")},d=()=>{h("close")},l=()=>{t.closeOnClickModal!==!1&&d()};return e.nextTick(()=>{p.value=!0}),{visible:p,inputValue:u,inputError:i,zIndex:k,handleConfirm:M,handleCancel:f,handleClose:d,handleMaskClick:l}},render(){if(!this.visible)return null;const p=t.type,u=p?Ee[p]:null,i=[];u&&i.push(e.h("span",{class:"x-message-box__icon",style:{color:u.color,marginRight:"10px",display:"flex",alignItems:"center"}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:u.iconPath})])])),i.push(e.h("span",{class:"x-message-box__title"},t.title||"提示")),t.showClose!==!1&&i.push(e.h("button",{class:"x-message-box__close",onClick:this.handleClose,style:{display:"flex",alignItems:"center",justifyContent:"center"}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:"M6 18L18 6M6 6l12 12"})])]));const k=[];k.push(e.h("div",{class:"x-message-box__content"},t.message||"")),t.showInput&&k.push(e.h("div",{class:"x-message-box__input",style:{marginTop:"12px"}},[e.h("input",{class:["x-message-box__input-inner",this.inputError?"is-error":""].filter(Boolean),type:t.inputType||"text",placeholder:t.inputPlaceholder||"请输入",value:this.inputValue,onInput:M=>{this.inputValue=M.target.value,this.inputError=""},onKeyup:M=>{M.key==="Enter"&&this.handleConfirm()}}),this.inputError?e.h("div",{class:"x-message-box__error",style:{color:"#f56c6c",fontSize:"12px",marginTop:"4px"}},this.inputError):null]));const h=[];return t.showCancelButton&&h.push(e.h("button",{class:"x-button p-button--default",onClick:this.handleCancel},t.cancelButtonText||"取消")),t.showConfirmButton!==!1&&h.push(e.h("button",{class:"x-button p-button--primary",onClick:this.handleConfirm,style:{marginLeft:"10px"}},t.confirmButtonText||"确定")),e.h("div",{class:["x-message-box-wrapper",t.center?"is-center":""],style:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:this.zIndex},onClick:this.handleMaskClick},[e.h("div",{class:["x-message-box",t.customClass],style:{backgroundColor:"#fff",borderRadius:"4px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",minWidth:"300px",maxWidth:"500px"},onClick:M=>M.stopPropagation()},[e.h("div",{class:"x-message-box__header",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #eee"}},i),e.h("div",{class:"x-message-box__body",style:{padding:"20px",fontSize:"14px",color:"#606266"}},k),e.h("div",{class:"x-message-box__footer",style:{padding:"10px 20px 16px",textAlign:"right"}},h)])])}}),s=e.createApp(a);s.mount(o);const m={app:s,container:o,close:()=>{var u;const p=(u=s._instance)==null?void 0:u.proxy;p!=null&&p.handleClose&&p.handleClose()}};A.push(m)})}async function Ne(t,n,o){return j({message:t,title:n,...o,showConfirmButton:!0,showCancelButton:!1})}async function Te(t,n,o){return j({message:t,title:n,...o,showConfirmButton:!0,showCancelButton:!0})}async function Se(t,n,o){return j({message:t,title:n,...o,showInput:!0,showConfirmButton:!0,showCancelButton:!0})}function Le(t){return j(t)}const H=Object.assign(Le,{alert:Ne,confirm:Te,prompt:Se,closeAll:Ve}),He={install(t){t.config.globalProperties.$msgbox=H,t.config.globalProperties.$alert=H.alert,t.config.globalProperties.$confirm=H.confirm,t.config.globalProperties.$prompt=H.prompt,t.provide("messageBox",H)}},D=[];let $e=1;const Ie=()=>{D.slice().forEach(t=>t.close())},Ae={success:{iconPath:"M5 13l4 4L19 7",color:"#67c23a"},warning:{iconPath:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",color:"#e6a23c"},error:{iconPath:"M6 18L18 6M6 6l12 12",color:"#f56c6c"},info:{iconPath:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",color:"#909399"}},De=(t,n)=>{const o=D.filter(a=>a.position===t);let r=16;for(const a of o)if(a.id<n){const s=a.container.firstElementChild;s&&(r+=s.offsetHeight+16)}return r},Pe=(t,n)=>{const o={position:"fixed",width:"330px",zIndex:"2010"};switch(t){case"top-right":o.top=`${n}px`,o.right="16px";break;case"top-left":o.top=`${n}px`,o.left="16px";break;case"bottom-right":o.bottom=`${n}px`,o.right="16px";break;case"bottom-left":o.bottom=`${n}px`,o.left="16px";break;default:o.top=`${n}px`,o.right="16px"}return o};function Y(t){const n=$e++,o=t.position||"top-right",r=document.createElement("div");document.body.appendChild(r);let a=null,s=!1;const m=e.defineComponent({name:"TNotification",setup(){const i=e.ref(!1),k=()=>{s||(s=!0,i.value=!1,setTimeout(()=>{var v;const l=D.findIndex(c=>c.id===n);l!==-1&&D.splice(l,1),a&&clearTimeout(a),(v=t.onClose)==null||v.call(t);try{p.unmount()}catch{}r.parentNode&&r.parentNode.removeChild(r)},300))},h=()=>{const l=t.duration??4500;l>0&&(a=setTimeout(k,l))},M=()=>{a&&(clearTimeout(a),a=null)},f=e.computed(()=>(t.offset??0)+De(o,n)),d=e.computed(()=>Pe(o,f.value));return e.nextTick(()=>{i.value=!0,h()}),{visible:i,close:k,positionStyles:d,startTimer:h,clearTimer:M}},render(){if(!this.visible)return null;const i=t.type,k=i?Ae[i]:null,h=[];t.title&&h.push(e.h("div",{class:"x-notification__title",style:{fontWeight:"600",fontSize:"16px",color:"#303133",marginBottom:t.message?"6px":"0"}},t.title)),t.message&&(t.dangerouslyUseHTMLString?h.push(e.h("div",{class:"x-notification__content",style:{fontSize:"14px",color:"#606266",lineHeight:"1.5"},innerHTML:t.message})):h.push(e.h("div",{class:"x-notification__content",style:{fontSize:"14px",color:"#606266",lineHeight:"1.5"}},t.message)));const M=[];return k&&M.push(e.h("div",{class:"x-notification__icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",marginRight:"12px",color:k.color}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:k.iconPath})])])),M.push(e.h("div",{class:"x-notification__main",style:{flex:"1"}},h)),t.showClose!==!1&&M.push(e.h("button",{class:"x-notification__close",style:{position:"absolute",top:"18px",right:"15px",background:"none",border:"none",cursor:"pointer",color:"#909399",padding:"0",display:"flex",alignItems:"center",justifyContent:"center"},onClick:f=>{f.stopPropagation(),this.close()}},[e.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},[e.h("path",{d:"M6 18L18 6M6 6l12 12"})])])),e.h("div",{class:["x-notification",t.customClass],style:{...this.positionStyles,display:"flex",alignItems:"flex-start",padding:"14px 26px 14px 13px",borderRadius:"8px",backgroundColor:"#fff",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",transition:"opacity 0.3s, transform 0.3s",boxSizing:"border-box"},onMouseenter:this.clearTimer,onMouseleave:this.startTimer},M)}}),p=e.createApp(m);p.mount(r);const u={id:n,app:p,container:r,position:o,close:()=>{var k;const i=(k=p._instance)==null?void 0:k.proxy;i!=null&&i.close&&i.close()}};return D.push(u),{close:u.close}}function Re(t){return Y(typeof t=="string"?{message:t}:t)}const W=t=>n=>Y({...typeof n=="string"?{message:n}:n,type:t}),U=Object.assign(Re,{info:W("info"),success:W("success"),warning:W("warning"),error:W("error"),closeAll:Ie}),Oe={install(t){t.config.globalProperties.$notify=U,t.provide("notification",U)}};exports.Alert=me;exports.Backtop=ge;exports.Drawer=te;exports.DrawerForm=ce;exports.Message=q;exports.MessageBox=H;exports.MessageComponent=ze;exports.Modal=ee;exports.Notification=U;exports.Popconfirm=ve;exports.Result=Me;exports.TMessage=Be;exports.TMessageBox=He;exports.TNotification=Oe;exports.Timeline=ke;exports.TimelineItem=ye;exports.Tooltip=de;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xto/feedback",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Xto Feedback - Feedback components",
|
|
5
5
|
"homepage": "https://jinguchu.github.io/xto-ui/",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "vite build"
|
|
31
|
+
},
|
|
29
32
|
"dependencies": {
|
|
30
33
|
"@xto/core": "^1.2.4",
|
|
31
34
|
"@xto/base": "^1.4.1"
|
|
@@ -36,13 +39,11 @@
|
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
38
41
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
42
|
+
"@xto/build": "workspace:*",
|
|
39
43
|
"typescript": "^5.4.2",
|
|
40
44
|
"vite": "^5.2.0",
|
|
45
|
+
"vite-plugin-dts": "^4.5.4",
|
|
41
46
|
"vitest": "^1.4.0",
|
|
42
|
-
"vue": "^3.4.21"
|
|
43
|
-
"@xto/build": "0.1.0"
|
|
44
|
-
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "vite build"
|
|
47
|
+
"vue": "^3.4.21"
|
|
47
48
|
}
|
|
48
|
-
}
|
|
49
|
+
}
|