import{c as r,w as t,s as o,_ as e,m as i,d as n,e as p}from"./index-d9fc8538.js";import"react";import"react-dom";import"stream";import"string_decoder";import"events";import"timers";import"util";import"url";import"http";import"https";import"buffer";import"path";import"querystring";import"assert";import"os";import"fs";import"child_process";import"antd";import"crypto";var a=i((function(r){var t=r.href,o=r.request,e=r.target,i=r.buttonProps,a=n(r,["href","request","target","buttonProps"]),s=t;if(!s){var m=o||{},u=m.url,f=m.params;if(!u)throw new Error("uiType 为 'a' 的 button 必须配置 href 或 request: { url: string; params?: any; } 属性。"+JSON.stringify(r));var c=Object.entries(function(r){var t,o={};if(null==r||""===r)return o;for(var e in r)null===r[e]||void 0===r[e]||""===r[e]||r[e]instanceof Array&&0===(null===(t=r[e])||void 0===t?void 0:t.length)||(o[e]=r[e]);return o}(f)).map((function(r){var t=r[0],o=r[1];return encodeURIComponent(t)+"="+encodeURIComponent(o)})).join("&");s=~u.indexOf("?")?u+"&"+c:u+"?"+c}return p(p({},a),{buttonProps:p(p({},i||{}),{href:s,target:e})})})),s=r(t,a,o)(e);export default s;export{a as mapAButtonProps};
