const e=require("../util.js"),t=require("../classNames.js"),n=require("../isValid.js"),r=require("./initDefaultProps.js");let i=require("vue");var a=t=>{let n=Object.keys(t),r={},i={},a={};for(let o=0,s=n.length;o<s;o++){let s=n[o];e.isOn(s)?(r[s[2].toLowerCase()+s.slice(3)]=t[s],i[s]=t[s]):a[s]=t[s]}return{onEvents:i,events:r,extraAttrs:a}},o=(t=``,n=!1)=>{let r={},i=/;(?![^(]*\))/g,a=/:(.+)/;return typeof t==`object`?t:(t.split(i).forEach(t=>{if(t){let i=t.split(a);if(i.length>1){let t=n?e.camelize(i[0].trim()):i[0].trim();r[t]=i[1].trim()}}}),r)},s=(e,t)=>e[t]!==void 0,c=Symbol(`skipFlatten`),l=(e=[],t=!0)=>{let r=Array.isArray(e)?e:[e],a=[];return r.forEach(e=>{Array.isArray(e)?a.push(...l(e,t)):e&&e.type===i.Fragment?e.key===c?a.push(e):a.push(...l(e.children,t)):e&&(0,i.isVNode)(e)?t&&!y(e)?a.push(e):t||a.push(e):n.default(e)&&a.push(e)}),a},u=(e,t=`default`,n={})=>(0,i.isVNode)(e)?e.type===i.Fragment?t==="default"?l(e.children):[]:e.children&&e.children[t]?l(e.children[t](n)):[]:l(e.$slots[t]&&e.$slots[t](n)),d=e=>{let t=e?.vnode?.el||e&&(e.$el||e);for(;t&&!t.tagName;)t=t.nextSibling;return t},f=t=>{let n={};if(t.$&&t.$.vnode){let r=t.$.vnode.props||{};Object.keys(t.$props).forEach(i=>{let a=t.$props[i],o=e.hyphenate(i);(a!==void 0||o in r)&&(n[i]=a)})}else if((0,i.isVNode)(t)&&typeof t.type==`object`){let r=t.props||{},i={};Object.keys(r).forEach(t=>{i[e.camelize(t)]=r[t]});let a=t.type.props||{};Object.keys(a).forEach(t=>{let r=e.resolvePropValue(a,i,t,i[t]);(r!==void 0||t in i)&&(n[t]=r)})}return n},p=(e,t=`default`,n=e,r=!0)=>{let a;if(e.$){let i=e[t];if(i!==void 0)return typeof i==`function`&&r?i(n):i;a=e.$slots[t],a=r&&a?a(n):a}else if((0,i.isVNode)(e)){let o=e.props&&e.props[t];if(o!==void 0&&e.props!==null)return typeof o==`function`&&r?o(n):o;e.type===i.Fragment?a=e.children:e.children&&e.children[t]&&(a=e.children[t],a=r&&a?a(n):a)}return Array.isArray(a)&&(a=l(a),a=a.length===1?a[0]:a,a=a.length===0?void 0:a),a};function m(e={},t=!0){let n={};return n=e.$?{...n,...e.$attrs}:{...n,...e.props},a(n)[t?`onEvents`:`events`]}function h(e){let n=(((0,i.isVNode)(e)?e.props:e.$attrs)||{}).class||{},r={};return typeof n==`string`?n.split(` `).forEach(e=>{r[e.trim()]=!0}):Array.isArray(n)?t.default(n).split(` `).forEach(e=>{r[e.trim()]=!0}):r={...r,...n},r}function g(t,n){let r=(((0,i.isVNode)(t)?t.props:t.$attrs)||{}).style||{};if(typeof r==`string`)r=o(r,n);else if(n&&r){let t={};return Object.keys(r).forEach(n=>t[e.camelize(n)]=r[n]),t}return r}function _(e){return e.length===1&&e[0].type===i.Fragment}function v(e){return e==null||e===``||Array.isArray(e)&&e.length===0}function y(e){return e&&(e.type===i.Comment||e.type===i.Fragment&&e.children.length===0||e.type===i.Text&&e.children.trim()===``)}function b(e){return e&&e.type===i.Text}function x(e=[]){let t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...e):e?.type===i.Fragment?t.push(...x(e.children)):t.push(e)}),t.filter(e=>!y(e))}function S(e){if(e){let t=x(e);return t.length?t:void 0}else return e}function C(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!=`symbol`}function w(e,t,n=`default`){return t[n]??e[n]?.()}exports.camelize=e.camelize,exports.default=s,exports.hasProp=s,exports.filterEmpty=x,exports.filterEmptyWithUndefined=S,exports.findDOMNode=d,exports.flattenChildren=l,exports.getClass=h,exports.getComponent=p,exports.getEvents=m,exports.getOptionProps=f,exports.getPropsSlot=w,exports.getSlot=u,exports.getStyle=g,exports.initDefaultProps=r.default,exports.isEmptyContent=v,exports.isEmptyElement=y,exports.isFragment=_,exports.isStringElement=b,exports.isValidElement=C,exports.parseStyleText=o,exports.skipFlattenKey=c,exports.splitAttrs=a;