@cniot/veaury
Version:
fork veaury库,解决在部分window老电脑报错的问题, Use React in Vue3 and Vue3 in React, And as perfect as possible!
2 lines (1 loc) • 45 kB
JavaScript
import React__default,{createElement,Fragment,version,Component,forwardRef,lazy,createContext,useContext}from"react";import{reactive,getCurrentInstance,h,Fragment as Fragment$1,Teleport,createApp,defineAsyncComponent,provide,inject,Text,Comment}from"vue";import ReactDOM,{createPortal}from"react-dom";function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}}function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==typeof e?e:String(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var r,n={},o=Object.keys(e),a=0;a<o.length;a++)r=o[a],0<=t.indexOf(r)||(n[r]=e[r]);return n}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),a=0;a<o.length;a++)r=o[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var originOptions={react:{componentWrap:"div",slotWrap:"div",componentWrapAttrs:{__use_react_component_wrap:"",style:{all:"unset"}},slotWrapAttrs:{__use_react_slot_wrap:"",style:{all:"unset"}},vueNamedSlotsKey:["node:"]},vue:{componentWrapHOC:function(t){return function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).portals;return createElement(Fragment,null,t,(void 0===e?[]:e).map(function(e){var t=e.Portal,e=e.key;return createElement(t,{key:e})}))}},componentWrapAttrs:{"data-use-vue-component-wrap":"",style:{all:"unset"}},slotWrapAttrs:{"data-use-vue-slot-wrap":"",style:{all:"unset"}}}};function setOptions(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{react:{},vue:{}},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:originOptions,r=2<arguments.length?arguments[2]:void 0,t=(e.vue||(e.vue={}),e.react||(e.react={}),[t,_objectSpread2(_objectSpread2({},e),{},{react:_objectSpread2(_objectSpread2(_objectSpread2({},t.react),e.react),{},{componentWrapAttrs:_objectSpread2(_objectSpread2({},t.react.componentWrapAttrs),e.react.componentWrapAttrs),slotWrapAttrs:_objectSpread2(_objectSpread2({},t.react.slotWrapAttrs),e.react.slotWrapAttrs)}),vue:_objectSpread2(_objectSpread2(_objectSpread2({},t.vue),e.vue),{},{componentWrapAttrs:_objectSpread2(_objectSpread2({},t.vue.componentWrapAttrs),e.vue.componentWrapAttrs),slotWrapAttrs:_objectSpread2(_objectSpread2({},t.vue.slotWrapAttrs),e.vue.slotWrapAttrs)})})]);return r&&t.unshift({}),Object.assign.apply(this,t)}var domMethods=["getElementById","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","querySelector","querySelectorAll"],domTopObject={Document:{},Element:{}};function overwriteDomMethods(i){Object.keys(domTopObject).forEach(function(e){domMethods.forEach(function(o){var a=window[e].prototype[o];domTopObject[e][o]=a,window[e].prototype[o]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=a.apply(this,t);return n&&(n.constructor!==NodeList||n.constructor===NodeList&&0<n.length)?n:Element.prototype[o].apply(i,t)}})})}function recoverDomMethods(){Object.keys(domTopObject).forEach(function(t){domMethods.forEach(function(e){window[t].prototype[e]=domTopObject[t][e]})})}var _excluded=["ref"],_excluded2=["key"],_excluded3=["hashList"],ReactMajorVersion=parseInt(version);function toRaws(e){return e}var FunctionComponentWrap=function(){function t(e){return _classCallCheck(this,t),_callSuper(this,t,[e])}return _inherits(t,Component),_createClass(t,[{key:"render",value:function(){var e=this.props.component,t=this.props.passedProps,t=(t.ref,_objectWithoutProperties(t,_excluded));return createElement(e,t,this.props.children)}}]),t}(),createReactContainer=function(p,_,f){var e=function(){function l(e){var t;return _classCallCheck(this,l),(t=_callSuper(this,l,[e])).state=_objectSpread2(_objectSpread2({},e),_.isSlots?{children:p}:{}),t.setRef=t.setRef.bind(_assertThisInitialized(t)),t.vueInReactCall=t.vueInReactCall.bind(_assertThisInitialized(t)),(t.__veauryVueWrapperRef__=f).__veauryVueInReactCall__=t.vueInReactCall,t}return _inherits(l,Component),_createClass(l,[{key:"reactPropsLinkToVueInstance",value:function(t){Object.keys(t).forEach(function(e){f[e]||(f[e]=t[e])}),Object.getOwnPropertyNames(t.__proto__).filter(function(e){return["constructor","render"].indexOf(e)<0}).forEach(function(e){f[e]||(f[e]=t[e])})}},{key:"setRef",value:function(e){var t=this;e&&(f.__veauryReactRef__=e,this.reactPropsLinkToVueInstance(e),Promise.resolve().then(function(){return t.reactPropsLinkToVueInstance(e)}),(this.setRef.current=e).__veauryVueWrapperRef__=f)}},{key:"createSlot",value:function(r){return{originVNode:r,inheritAttrs:!1,__fromReactSlot:!0,render:function(){var e,t;return 1===(null==(e=r=(r=(null==(t=this.$slots)||null==(e=t.default)?void 0:e.call(t))||r)instanceof Function?r(this):r)?void 0:e.length)&&null!=(t=r[0])&&t.data&&((e=this.$attrs).key,t=_objectWithoutProperties(e,_excluded2),r[0].props=_objectSpread2(_objectSpread2({},t),r[0].props)),r}}}},{key:"componentWillUnmount",value:function(){f.__veauryReactRef__&&(f.__veauryReactRef__.__veauryVueWrapperRef__=null,f.__veauryReactRef__=null)}},{key:"vueInReactCall",value:function(e){var r=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return(2<arguments.length?arguments[2]:void 0)&&e&&e[0]?e.map(function(e,t){return applyVueInReact(r.createSlot(e instanceof Function?e:[e]),_objectSpread2(_objectSpread2(_objectSpread2({},_),n),{},{isSlots:!0,wrapInstance:f})).render({key:(null==e||null==(e=e.data)?void 0:e.key)||t})}):applyVueInReact(this.createSlot(e),_objectSpread2(_objectSpread2(_objectSpread2({},_),n),{},{isSlots:!0,wrapInstance:f})).render()}},{key:"render",value:function(){var e,t,r,n=this,o=this.state,a=o.hashList,i=_objectWithoutProperties(o,_excluded3),u={},c={};for(e in i)t=e,r=void 0,i.hasOwnProperty(t)&&null!=i[t]&&(i[t].__slot?(i[t].reactSlot?i[t]=i[t].reactSlot:(r=i[t],_.defaultSlotsFormatter&&i[t].__trueChildren?(i[t].__top__=n.__veauryVueWrapperRef__,i[t]=_.defaultSlotsFormatter(i[t].__trueChildren,n.vueInReactCall,a),i[t]instanceof Array?i[t]=_toConsumableArray(i[t]):-1<["string","number"].indexOf(_typeof(i[t]))?i[t]=[i[t]]:"object"===_typeof(i[t])&&(i[t]=_objectSpread2({},i[t]))):i[t]=_objectSpread2({},applyVueInReact(n.createSlot(i[t]),_objectSpread2(_objectSpread2({},_),{},{isSlots:!0,wrapInstance:f})).render()),i[t].vueFunction=r),u[t]=i[t]):i[t].__scopedSlot&&(i[t]=i[t](n.createSlot),c[t]=i[t]));var s,o={};return o.ref=this.setRef,_.isSlots?this.state.children||this.props.children:(s=i,s=_objectSpread2(_objectSpread2(_objectSpread2({},s=_.defaultPropsFormatter?_.defaultPropsFormatter(i,this.vueInReactCall,a):s),u),c),Object.getPrototypeOf(p)!==Function.prototype&&("object"!==_typeof(p)||p.render)||l.catchVueRefs()?(Object.getPrototypeOf(p)===Function.prototype&&delete o.ref,createElement(p,_extends({},s,o))):createElement(FunctionComponentWrap,_extends({passedProps:s,component:p},o),s.children))}}],[{key:"catchVueRefs",value:function(){if(f.$parent)for(var e in f.$parent.$refs)if(f.$parent.$refs[e]===f)return!0;return!1}}]),l}();return _defineProperty(e,"displayName","applyReact_".concat(p.displayName||p.name||"Component")),e};function applyReactInVue(m){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return m.__esModule&&m.default&&(m=m.default),b.isSlots&&(m=m()),b=setOptions(b,void 0,!0),{originReactComponent:m,setup:function(e,t){var r,n,o,a;if(!b.isSlots)return r={},n=reactive({}),o=getCurrentInstance(),"function"==typeof(a=b.useInjectPropsFromWrapper||m.__veauryInjectPropsFromWrapper__)&&("function"!=typeof(a=a.call(o.proxy,e))?(Object.assign(n,a),r.__veauryInjectedProps__=n):o.proxy.__veauryInjectedComputed__=a),r},data:function(){return{VEAURY_Portals:[]}},created:function(){this.__veauryPortalKeyPool__=[],this.__veauryMaxPortalCount__=0},computed:{__veauryInjectedProps__:function(){var e;return null==(e=this.__veauryInjectedComputed__)?void 0:e.call(this)}},render:function(){var e=h(b.react.componentWrap,_objectSpread2({ref:"react"},b.react.componentWrapAttrs||{}),this.VEAURY_Portals.map(function(e){var t=e.Portal,e=e.key;return t(h,e)}));return this.__veauryCheckReactSlot__(this.$slots),e},methods:{__veauryCheckReactSlot__:function(i){var u=this;function c(e,t,r){return t[r]&&(e[r]=t[r],1)}Object.keys(i).forEach(function(e){try{var t,r,n,o=i[e],a=o.apply(u,o.__reactArgs||[{}]);(o.__trueChildren=a).forEach(function(e){e.children&&u.__veauryCheckReactSlot__(e.children)}),1!==a.length||c(o,r=a[0],"reactSlot")||c(o,r,"reactFunction")||r.type!==Fragment$1||1!==(null==(t=r.children)?void 0:t.length)||c(o,n=r.children[0],"reactSlot")||c(o,n,"reactFunction")}catch(e){}})},__veauryPushVuePortal__:function(e){var t=this.__veauryPortalKeyPool__.shift()||this.__veauryMaxPortalCount__++;this.VEAURY_Portals.push({Portal:e,key:t})},__veauryRemoveVuePortal__:function(r){var n,e=this.VEAURY_Portals.find(function(e,t){if(e.Portal===r)return n=t,!0});this.__veauryPortalKeyPool__.push(e.key),this.VEAURY_Portals.splice(n,1)},__veauryGetScopeSlot__:function(i,u,t){var c=this;function e(a){function e(){for(var e,t=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return i.reactFunction?i.reactFunction.apply(this,n):b.defaultSlotsFormatter?((e=i.apply(this,n)).__top__=c,(e=b.defaultSlotsFormatter(e,c.__veauryVueInReactCall__,u))instanceof Array||-1<_typeof(e).indexOf("string","number")?e=_toConsumableArray(e):"object"===_typeof(e)&&(e=_objectSpread2({},e)),e):applyVueInReact(a(function(){return i.apply(t,n)}),_objectSpread2(_objectSpread2({},b),{},{isSlots:!0,wrapInstance:c})).render()}return b.pureTransformer&&t?e.vueFunction=t:e.vueFunction=i,e}return e.__scopedSlot=!0,e},__veaurySyncUpdateProps__:function(e){this.__veauryReactInstance__&&this.__veauryReactInstance__.setState(e)},__veauryMountReactComponent__:function(e,t){var r,n,o=this,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i={},u=[],c=this.$.vnode.scopeId,s=(c&&(i[c]="",u.push(c)),{}),l={};if(!e||null!=t&&t.slot)for(var p in this.$slots||{})(function(t){var e;o.$slots.hasOwnProperty(t)&&null!=o.$slots[t]&&((e=b.react.vueNamedSlotsKey.find(function(e){return 0===t.indexOf(e)}))||"default"===t?(e=t.replace(new RegExp("^".concat(e)),""),s[e]=o.$slots[t],s[e].__slot=!0):l[t]=o.__veauryGetScopeSlot__(o.$slots[t],u,null==(e=o.$.vnode)||null==(e=e.children)?void 0:e[t]))})(p);(!e||null!=t&&t.slot)&&(n=_objectSpread2({},s),r=n.default,delete n.default),this.__veauryLast__=this.__veauryLast__||{},this.__veauryLast__.slot=this.__veauryLast__.slot||{},this.__veauryLast__.attrs=this.__veauryLast__.attrs||{};var _={slot:function(){o.__veauryLast__.slot=_objectSpread2(_objectSpread2(_objectSpread2({},r?{children:r}:{children:null}),n),l)},attrs:function(){o.__veauryLast__.attrs=o.$attrs}};if(t&&Object.keys(t).forEach(function(e){return _[e]()}),e){function f(){o.__veauryReactInstance__&&o.__veauryReactInstance__.setState(function(t){return Object.keys(t).forEach(function(e){b.isSlots&&"children"===e||delete t[e]}),_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},o.__veauryCache__),toRaws(o.__veauryInjectedProps__)),!b.isSlots&&o.__veauryLast__.slot),toRaws(o.__veauryLast__.attrs))}),o.__veauryCache__=null}!this.microTaskUpdate||this.__veauryCache__||this.$nextTick(function(){f(),o.microTaskUpdate=!1}),this.macroTaskUpdate&&(clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){clearTimeout(o.updateTimer),f(),o.macroTaskUpdate=!1})),this.__veauryCache__=_objectSpread2(_objectSpread2({},this.__veauryCache__||{}),_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},a),this.$attrs.class?{className:this.$attrs.class}:{}),_objectSpread2({},i)),{},{hashList:u},this.$attrs.style?{style:this.$attrs.style}:{})),this.macroTaskUpdate||this.microTaskUpdate||f()}else{_.slot(),_.attrs();var c=createReactContainer(m,b,this),d=createElement(c,_extends({},toRaws(this.$attrs),toRaws(this.__veauryInjectedProps__),{children:r},n,l,this.$attrs.class?{className:this.$attrs.class}:{},i,{hashList:u},this.$attrs.style?{style:this.$attrs.style}:{},{ref:function(e){return o.__veauryReactInstance__=e}})),y=this.$refs.react,v=b.wrapInstance;if(v)(v=b.wrapInstance).__veauryVueWrapperRef__=this;else for(var h=this.$parent;h;){if(h.parentReactWrapperRef){v=h.parentReactWrapperRef;break}if(h.reactWrapperRef){v=h.reactWrapperRef;break}h=h.$parent}v?(this.parentReactWrapperRef=v,this.reactPortal=function(){return createPortal(d,y)},v.pushReactPortal(this.reactPortal)):17<ReactMajorVersion?(void 0!==ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED&&(ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint=!0),this.__veauryReactApp__=ReactDOM.createRoot(y),this.__veauryReactApp__.render(d)):ReactDOM.render(d,y)}}},mounted:function(){var e=this;this.__VEAURY_IGNORE_STRANGE_UPDATE__=!0,Promise.resolve().then(function(){e.__VEAURY_IGNORE_STRANGE_UPDATE__=!1}),clearTimeout(this.updateTimer),this.__veauryMountReactComponent__()},beforeUnmount:function(){var e;clearTimeout(this.updateTimer),this.reactPortal?(overwriteDomMethods(this.$refs.react),null!=(e=this.parentReactWrapperRef)&&e.removeReactPortal(this.reactPortal)):(overwriteDomMethods(this.$refs.react),17<ReactMajorVersion?this.__veauryReactApp__.unmount():ReactDOM.unmountComponentAtNode(this.$refs.react)),recoverDomMethods()},updated:function(){this.__VEAURY_IGNORE_STRANGE_UPDATE__||this.__veauryMountReactComponent__(!0,{slot:!0})},inheritAttrs:!1,watch:{$attrs:{handler:function(){this.__veauryMountReactComponent__(!0,{attrs:!0})},deep:!0},__veauryInjectedProps__:{handler:function(){this.__veauryMountReactComponent__(!0,{attrs:!0})},deep:!0}}}}var REACT_ALL_HANDLERS=new Set(["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onChange","onInput","onInvalid","onReset","onSubmit","onError","onLoad","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onError","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onToggle"]);function lookupVueWrapperRef(e,t){for(var r=null==(e=t=(null==e?void 0:e._reactInternals)||(null==e?void 0:e._reactInternalFiber)||t)?void 0:e.return;r;){var n=r.stateNode;if(n=(null==n?void 0:n.parentVueWrapperRef)||(null==n?void 0:n.__veauryVueWrapperRef__))return n;r=r.return}}function createModifiers(e,t,r){var n={};return r.forEach(function(e){n[e]=!0}),e[("modelValue"===t?"model":t)+"Modifiers"]=n}function setVModel(e,t,r){var n=this,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"v-model",a=t;if(!(a instanceof Array))throw Error("[error:veaury] Parameter type error from '".concat(o,"', a single v-model is an array, such as [val, setter, argumentKey, modifiers] or [val, setter, modifiers]"));if("function"!=typeof a[1])throw Error("[error:veaury] Parameter type error from '".concat(o,"', a single v-model is an array, the second element of the array must be a setter function"));var i=a[1],u=("string"==typeof a[2]?(r=a[2],a[3]instanceof Array&&createModifiers(e,r,a[3])):a[2]instanceof Array&&createModifiers(e,r,a[2]),e["onUpdate:"+r]);e["onUpdate:"+r]="function"==typeof u?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.apply(n,t),i.apply(n,t)}:i,e[r]=a[0]}function parseVModel(a){var i=this,r={},u=_objectSpread2({},a);return Object.keys(a).forEach(function(n){var o,e=n.match(/^onUpdate-([^-]+)/);if(e)delete u[n],o=r["onUpdate:".concat(e[1])],r["onUpdate:".concat(e[1])]="function"==typeof o?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];o.apply(i,t),a[n].apply(i,t)}:a[n];else if(e=n.match(/^v-model($|:([^:]+)|-([^:]+))/))e=e[2]||e[3]||"modelValue",setVModel(r,a[n],e),delete u[n];else if("v-models"===n){if("object"!==_typeof(a[n])||a[n]instanceof Array)throw Error("[error:veaury] The parameter 'v-models' must be an object type, such as {[argumentKey]: singleVModel}");var t=a[n];Object.keys(t).forEach(function(e){setVModel(r,t[e],e,"v-models")}),delete u[n]}}),_objectSpread2(_objectSpread2({},u),r)}var _default=function(){function e(){_classCallCheck(this,e),_defineProperty(this,"pool",new Set)}return _createClass(e,[{key:"getRandomId",value:function(e){var t=e+(Math.random()+"").substr(2);return this.pool.has(t)?this.getRandomId(e):(this.pool.add(t),t)}}]),e}();function RenderReactNode(e,t){var r,e=e.node;if("function"==typeof e&&(e=e()),null!=(r=t)&&r.current||"function"==typeof t||null!=(r=t)&&r.toString().match(/^function/)||(t=null),-1<["string","number"].indexOf(_typeof(e)))return e;if(e instanceof Array){if(1!==e.length)return e;e=e[0]}return _objectSpread2(_objectSpread2({},e),{},{ref:t})}var Bridge=applyReactInVue(RenderReactNode);function WrapVue(e){return h(Bridge,{node:function(){return e.node}})}WrapVue.originReactComponent=forwardRef(RenderReactNode);var _excluded$1=["component","node"],_excluded2$1=["component","$slots","children","class","style"],_excluded3$1=["className","classname"],optionsName="veaury-options",random=new _default;function filterVueComponent(e,t){var r;return e="string"==typeof e&&t?null==(t=t.$)||null==(t=t.appContext)||null==(t=t.app)||null==(r=t.component)?void 0:r.call(t,e):e}function transferSlots(r){if(r)return Object.keys(r).forEach(function(e){var t=r[e];null!=t&&("function"==typeof t?(r[e]=t,r[e].reactFunction=t):(r[e]=function(){return t},r[e].reactSlot=t),t.vueFunction)&&(r[e].vueFunction=t.vueFunction)}),r}function VNodeBridge(e){var t;return null==(t=e.node)?void 0:t.call(e)}var VueContainer=forwardRef(function(e,t){var r,n=e.component,o=e.node,e=_objectWithoutProperties(e,_excluded$1);if(null==n&&null==o)return null;if(null!=o){if(o.$$typeof||"string"==typeof o||"number"==typeof o)return o;"function"!=typeof o&&(r=o,o=function(){return r})}var a,n=n||VNodeBridge,i=setOptions(e[optionsName]||{},void 0,!0),u=i.useInjectPropsFromWrapper||n.__veauryInjectPropsFromWrapper__;return i.isSlots||"function"==typeof u&&(a=u(e)),createElement(VueComponentLoader,_extends({},_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({component:n},o?{node:o}:{}),e),a),{},_defineProperty({},optionsName,i)),{ref:t}))}),VueComponentLoader=function(){function r(e){var t;return _classCallCheck(this,r),(t=_callSuper(this,r,[e])).state={portals:[]},t.__veauryPortalKeyPool__=[],t.__veauryMaxPortalCount__=0,t.__veauryCurrentVueComponent__=e.component,t.__veauryCreateVueInstance__=t.__veauryCreateVueInstance__.bind(_assertThisInitialized(t)),t.__veauryVueComponentContainer__=t.createVueComponentContainer(),t}return _inherits(r,Component),_createClass(r,[{key:"pushReactPortal",value:function(e){var t=this.state.portals,r=this.__veauryPortalKeyPool__.shift()||this.__veauryMaxPortalCount__++;t.push({Portal:e,key:r}),this.setState({portals:t})}},{key:"removeReactPortal",value:function(r){var n,e=this.state.portals,t=e.find(function(e,t){if(e.Portal===r)return n=t,!0});this.__veauryPortalKeyPool__.push(t.key),e.splice(n,1),this.__veauryVueRef__&&this.setState({portals:e})}},{key:"createVueComponentContainer",value:function(){var t=this,r={},e=this.props[optionsName];return e.isSlots?(Object.keys(this.props).forEach(function(e){REACT_ALL_HANDLERS.has(e)&&"function"==typeof t.props[e]&&(r[e]=t.props[e])}),e.vue.slotWrapAttrs&&(r=_objectSpread2(_objectSpread2({},r),e.vue.slotWrapAttrs))):e.vue.componentWrapAttrs&&(r=_objectSpread2(_objectSpread2({},r),e.vue.componentWrapAttrs)),e.vue.componentWrapHOC(createElement("div",_extends({},e.vue.componentWrapAttrs,{ref:this.__veauryCreateVueInstance__,key:null})),r)}},{key:"shouldComponentUpdate",value:function(e,t,r){var n,o,a,i,u=this;return e===this.props||(n=e.component,e[optionsName],o=void 0===(o=e["v-slots"])?null:o,a=e.children,e=_objectWithoutProperties(e,["component",optionsName,"v-slots","children"].map(_toPropertyKey)),this.__veauryCurrentVueComponent__!==n&&this.updateVueComponent(n),!!n.__fromReactSlot)||(this.__veauryVueInstance__?(a&&(o=o||{},"object"!==_typeof(a)||a instanceof Array||a.$$typeof?o.default=a:o=a),(i=this.__veauryVueInstance__.$data.$slots)&&Object.keys(i).forEach(function(e){delete i[e]}),o&&(i||(this.__veauryVueInstance__.$data.$slots={}),Object.assign(this.__veauryVueInstance__.$data.$slots,transferSlots(o))),Object.keys(this.__veauryVueInstance__.$data).forEach(function(e){"$slots"!==e&&delete u.__veauryVueInstance__.$data[e]}),this.__veauryVueInstance__&&Object.assign(this.__veauryVueInstance__.$data,parseVModel(e)),!0):void 0)}},{key:"componentWillUnmount",value:function(){this.vuePortal?this.parentVueWrapperRef.__veauryRemoveVuePortal__(this.vuePortal):(this.__veauryVueInstance__&&this.__veauryVueInstance__.$.appContext.app.unmount(),random.pool.delete(this.__veauryVueTargetId__))}},{key:"__veauryCreateVueInstance__",value:function(t){var r=this,p=this,e=this.props,_=(e.component,e[optionsName]),n=e.children,o=e["v-slots"],o=void 0===o?{}:o,e=_objectWithoutProperties(e,["component",optionsName,"children","v-slots"].map(_toPropertyKey));function a(e){this.__veauryVueInstance__||(this.__veauryVueInstance__=e)}n&&("object"!==_typeof(n)||n instanceof Array||n.$$typeof?o.default=n:o=n),(o=transferSlots(o))&&(e.$slots=o),a=a.bind(this);var i,u=_objectSpread2({},parseVModel(e)),c={data:function(){var e;return _.isSlots?{children:(null==p||null==(e=p.__veauryCurrentVueComponent__)?void 0:e.originVNode)||[]}:u},created:function(){this.reactWrapperRef=p,a(this)},methods:{reactInVueCall:function(e){return(2<arguments.length?arguments[2]:void 0)&&e&&e[0]?e.map(function(e,t){return h(WrapVue,{node:e,key:(null==e||null==(e=e.data)?void 0:e.key)||t})}):h(WrapVue,{node:e})},getScopedSlots:function(s,e){var t,l=this,r=(this.getScopedSlots.__scopeSlots||(this.getScopedSlots.__scopeSlots={}),_objectSpread2({},e));for(t in r)(function(u){var e,c;!r.hasOwnProperty(u)||null==(e=r[u])||(r[u]=(c=e,function(){for(var e,t,r,n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return c.vueFunction?c.vueFunction.apply(l,a):(r=c.reactSlot,n=c.reactFunction,r=r||(null==n?void 0:n.apply(l,a)),n=_.defaultSlotsFormatter,null!=(e=l.getScopedSlots.__scopeSlots[u])&&null!=(e=e.component)&&null!=(e=e.ctx)&&e.__veauryReactInstance__?(t=l.getScopedSlots.__scopeSlots[u],Promise.resolve().then(function(){var e;null!=(e=t)&&null!=(e=e.component)&&null!=(e=e.ctx)&&null!=(e=e.__veauryReactInstance__)&&e.setState({children:c.apply(l,a)})})):(t=n&&r?[n(r,l.reactInVueCall)]:s(applyReactInVue(function(){return c.apply(l,a)},_objectSpread2(_objectSpread2({},_),{},{isSlots:!0,wrapInstance:p}))),l.getScopedSlots.__scopeSlots[u]=t),c.reactFunction?t.reactFunction=c.reactFunction:c.reactSlot&&(t.reactSlot=c.reactSlot),t)}),r[u].reactFunction=e)})(t);return r}},mounted:function(){var e;t.removeAttribute("id"),p.__veauryVueRef__=null==(e=this.$refs)?void 0:e.use_vue_wrapper,null!=(e=this.$refs)&&e.use_vue_wrapper&&(this.$refs.use_vue_wrapper.reactWrapperRef=p)},beforeUnmount:function(){p.__veauryVueRef__=null,this.$refs.use_vue_wrapper.reactWrapperRef=null},render:function(){var e=this,t=this.$data,r=(t.component,t.$slots),n=(t.children,t.class),o=t.style,t=_objectWithoutProperties(t,_excluded2$1),a=this.getScopedSlots(h,_objectSpread2({},r)),r=t.className,i=t.classname,t=_objectWithoutProperties(t,_excluded3$1),u={};return Object.keys(a).forEach(function(e){var t=a[e];u[e]="function"==typeof t?t:function(){return t}}),h(filterVueComponent(p.__veauryCurrentVueComponent__,this),_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},t),n||r||i?{class:n||r||i}:{}),o?{style:o}:{}),{},{ref:"use_vue_wrapper"}),_objectSpread2({},_.isSlots&&this.children?{default:"function"==typeof this.children?this.children:function(){return e.children}}:_objectSpread2({},u)))}};t&&(i=random.getRandomId("__vue_wrapper_container_"),t.id=i,this.__veauryVueTargetId__=i,(n=_.wrapInstance)?(n=_.wrapInstance).reactWrapperRef=p:n=lookupVueWrapperRef(this),n&&document.getElementById(i)?(this.parentVueWrapperRef=n,this.vuePortal=function(e,t){return e(Teleport,{to:"#"+i,key:i},[e(Object.assign(c,{router:r._router}))])},n.__veauryPushVuePortal__(this.vuePortal)):(o=createApp(c),"function"==typeof _.beforeVueAppMount&&_.beforeVueAppMount(o),this.__veauryVueInstance__=o.mount(t)))}},{key:"updateVueComponent",value:function(e){this.__veauryVueInstance__&&(e.__fromReactSlot?this.__veauryVueInstance__.children="function"==typeof e.originVNode?e.originVNode:function(){return e.originVNode}:(this.__veauryCurrentVueComponent__=e,this.__veauryVueInstance__.$forceUpdate()))}},{key:"render",value:function(){return createElement(this.__veauryVueComponentContainer__,{portals:this.state.portals})}}]),r}();function applyVueInReact(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=(r||console.warn("Component must be passed in applyVueInReact!"),r.__esModule&&r.default&&(r=r.default),forwardRef(function(e,t){return createElement(VueContainer,_extends({},e,{component:r,ref:t},_defineProperty({},optionsName,n)))}));return e.originVueComponent=r,e}function lazyVueInReact(e,t){return lazy(function(){return e().then(function(e){return{default:applyVueInReact(e.default,t)}})})}function lazyReactInVue(e,t){function r(){return n().then(function(e){return applyReactInVue(e.default,t)})}var n=e;"object"===_typeof(e)&&(n=e.loader);return defineAsyncComponent("object"===_typeof(e)?_objectSpread2(_objectSpread2({},e),{},{loader:r}):r)}function injectPropsFromWrapper(e,t){return console.warn("[veaury warn]: HOC injectPropsFromWrapper is deprecated! Try using 'useInjectPropsFromWrapper' in the options of 'applyReactInVue' or 'applyVueInReact'!"),"function"!=typeof e?console.warn("[veaury warn]: parameter 'injectionHook' is not a function"):t.__veauryInjectPropsFromWrapper__=e,t}var _excluded$2=["children"];function createCrossingProviderForReactInVue(e){var r=createContext({});return[function(){return useContext(r)},applyReactInVue(function(e){var t=e.children,e=_objectWithoutProperties(e,_excluded$2);return createElement(r.Provider,{value:_objectSpread2({},e)},t)},{useInjectPropsFromWrapper:e}),r]}var random$1=new _default;function createCrossingProviderForVueInReact(e,r){return r=r||random$1.getRandomId("veauryCrossingProvide_"),[function(){return inject(r)},applyVueInReact({setup:function(e,t){return provide(r,t.attrs),function(){return h(t.slots.default)}}},{useInjectPropsFromWrapper:e})]}function createReactMissVue(e){var t=e.useVueInjection,e=e.beforeVueAppMount,t=_slicedToArray(createCrossingProviderForReactInVue(t),3),r=t[0],n=t[1],t=t[2];return[r,applyVueInReact(n,{beforeVueAppMount:e}),t]}function transformer(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=t.globalName,n=t.combinedOption,o=(t.transparentApi,applyReactInVue(e,n||{}));return o.install=function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).globalName;return r&&e.component(t||r,o),o},o}function toCamelCase(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function formatStyle(t){var r;return t?"string"==typeof t?(t=t.trim()).split(/\s*;\s*/).reduce(function(e,t){return t&&2===(t=t.split(/\s*:\s*/)).length&&Object.assign(e,_defineProperty({},toCamelCase(t[0]),t[1])),e},{}):"object"===_typeof(t)?(r={},Object.keys(t).forEach(function(e){r[toCamelCase(e)]=t[e]}),r):{}:{}}function formatClass(t){return t?t instanceof Array?t:"string"==typeof t?(t=t.trim()).split(/\s+/):"object"===_typeof(t)?Object.keys(t).filter(function(e){return!!t[e]}):[]:[]}var _excluded$3=["ref"];function getChildInfo(r,e,o,a,i){var t=r.props||{},t=(t.ref,_objectWithoutProperties(t,_excluded$3)),u={},n=(Object.keys(r.children||{}).forEach(function(t){var n=r.children[t],e=originOptions.react.vueNamedSlotsKey.find(function(e){return 0===t.indexOf(e)});e||"default"===t?(e=t.replace(new RegExp("^".concat(e)),"").replace(/^default$/,"children"),u[e]=a(n(),o,i)):u[t]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.__reactArgs=t,a(n.apply(this,t),o,i)}}),{}),c=formatStyle(t.style),s=Array.from(new Set(formatClass(t.class))).join(" ");return 0<Object.keys(c).length&&(n.style=c),""!==s&&(n.className=s),Object.assign(t,_objectSpread2(_objectSpread2({},n),u)),delete t.class,t}function isTextOwner(e){return e.type===Text}var random$2=new _default;function DirectiveHOC(e,t){var r;return 0<(null==(r=e.dirs)?void 0:r.length)?createElement(FakeDirective,{vnode:e},t):t}var FakeDirective=function(){function r(e){var t;return _classCallCheck(this,r),(t=_callSuper(this,r,[e])).state={prevVnode:null,savedDirectives:[],ref:null,prevProps:e},t}return _inherits(r,Component),_createClass(r,[{key:"findDirectiveName",value:function(e){var r=e.dir,n=-1;return[this.state.savedDirectives.find(function(e,t){if(e.dir===r)return n=t,!0}),n]}},{key:"doDirective",value:function(){var c=this,e=this.state,s=e.savedDirectives;if(!(l=e.ref)){for(var l=(this._reactInternals||this._reactInternalFiber).child;l&&5!==l.tag;)l=l.child;if(!l)return;l=l.stateNode}var p=this.props.vnode,e=p.dirs;e&&(e.forEach(function(e){var t,r,n,o,a,i,u;e&&(u=(t=_slicedToArray(c.findDirectiveName(e),2))[0],t=t[1],r=(a=e.dir).created,n=a.beforeMount,o=a.mounted,i=a.beforeUpdate,a=a.updated,u?(s[t]=_objectSpread2(_objectSpread2(_objectSpread2({},u),e),{},{oldValue:u.oldValue}),u=[l,s[t],p,c.state.prevVnode],null!=i&&i.apply(null,u),null!=a&&a.apply(null,u),s[t].oldValue=e.value):(s.push(e),i=[l,e,p,null],null!=r&&r.apply(null,i),null!=n&&n.apply(null,i),null!=o&&o.apply(null,i),e.oldValue=e.value))}),this.setState({prevVnode:_objectSpread2({},p),savedDirectives:s,ref:l}))}},{key:"componentDidMount",value:function(){this.doDirective()}},{key:"componentDidUpdate",value:function(e){e.vnode!==this.props.vnode&&this.doDirective()}},{key:"componentWillUnmount",value:function(){var a=this,i=this.props.vnode,e=this.state,u=e.savedDirectives,c=e.ref,s=e.prevVnode,e=i.dirs;e&&(e.forEach(function(e){var t,r,n,o;e&&(t=(o=_slicedToArray(a.findDirectiveName(e),2))[0],o=o[1],t)&&(r=(n=e.dir).beforeUnmount,n=n.unmounted,u[o]=_objectSpread2(_objectSpread2({},t),e),o=[c,t,i,s],null!=r&&r.apply(null,o),null!=n)&&n.apply(null,o)}),this.setState({prevVnode:_objectSpread2({},i),savedDirectives:u}))}},{key:"render",value:function(){var e=this.props;e.vnode;return e.children}}]),r}();function couldBeClass(e,t){var r;return"function"==typeof e&&(r=e.toString(),void 0!==e.prototype)&&e.prototype.constructor===e&&("class"==r.slice(0,5)||2<=Object.getOwnPropertyNames(e.prototype).length||!/^function\s+\(|^function\s+anonymous\(/.test(r)&&(!(!t||!/^function\s+[A-Z]/.test(r))||!!/\b\(this\b|\bthis[\.\[]\b/.test(r)&&(!(t&&!/classCallCheck\(this/.test(r))||/^function\sdefault_\d+\s*\(/.test(r))))}function resolveRef(o){var a,e;return"function"!=typeof(null==(e=o.type)?void 0:e.originReactComponent)||couldBeClass(null==(e=o.type)?void 0:e.originReactComponent)?((e=null==(e=o.ref)?void 0:e.r)&&"string"==typeof e&&(a=e,e=function(e){var t;e&&(o.ref.i.refs&&((t=_objectSpread2({},o.ref.i.refs))[a]=e,o.ref.i.refs=t),void 0!==(null==(t=o.ref.i.setupState)?void 0:t[a]))&&(o.ref.i.setupState[a]=e)},e=new Proxy(e,{get:function(e,t){return e[t]},set:function(e,t,r){var n;return null!=(n=o.ref.i.refs)&&n[a]&&((n=_objectSpread2({},o.ref.i.refs))[t]=r,o.ref.i.refs=n),r}})),e):null}function addScopeId(t,e){return!e||e instanceof Array&&0===e.length||("string"==typeof e&&(e=[e]),(t=_objectSpread2({},t)).props=_objectSpread2({},t.props),e.forEach(function(e){t.props[e]=""})),t}var _excluded$4=["style","class"];function takeVueDomInReact(e,t,r,n,o,a,i){var u,c,s;return"all"===t||t instanceof Array||(t=t?[t]:[]),e.type===Fragment$1?o(e.children,r,a):"string"==typeof e.type&&("all"===t||-1<t.indexOf(e.type))?(t=resolveRef(e),s=(c=e.props||{}).style,u=c.class,c=_objectSpread2(_objectSpread2({},_objectWithoutProperties(c,_excluded$4)),{},{style:formatStyle(s),className:Array.from(new Set(formatClass(u))).join(" ")},t?{ref:t}:{}),(s=e.children||c.children)&&((s=-1<["string","number"].indexOf(_typeof(s))?[s]:_toConsumableArray(s)).__top__=i),DirectiveHOC(e,addScopeId(React__default.createElement(e.type,c,o(s,r,a)),e.scopeId))):r([e],null,n)}function pureInterceptProps(){return 0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}}function setChildKey(e,t,r){return!((e=e instanceof Array&&1===e.length?e[0]:e)instanceof Array)&&null==e.key&&1<t.length&&((e=_objectSpread2({},e)).key="_key_".concat(r)),e}function getDistinguishReactOrVue(e){var l=e.reactComponents,p=e.domTags,e=e.division,_=void 0===e||e;return function a(i,u,c){var s;return i&&i.forEach?(s=[],i.forEach(function(e,t){if(e&&e.type!==Comment){if(null==(o=e.type)||!o.originReactComponent)return e.$$typeof||"string"==typeof e||"number"==typeof e?void s.push(e):isTextOwner(e)?void(""!==e.children.trim()&&s.push(e.children.trim())):void(e.type&&(addScopeId(o=setChildKey(takeVueDomInReact(e,p,u,_,a,c,i.__top__),i,t),e.scopeId),s.push(o)));var r,n,o=e.type.originReactComponent;addScopeId(r=setChildKey(r="all"===(l="all"===l||l instanceof Array?l:[l])||-1<l.indexOf(o)?(e.__top__=i.__top__,r=getChildInfo(e,"_key_".concat(t),u,a,c),n=resolveRef(e),e.children&&(e.children.__top__=i.__top__),DirectiveHOC(e,React__default.createElement(o,_objectSpread2(_objectSpread2(_objectSpread2({},pureInterceptProps(r,e,o)),e.__extraData||{}),n?{ref:n}:{})))):isTextOwner(e)?e.text:takeVueDomInReact(e,p,u,_,a,c),i,t),e.scopeId),s.push(r)}}),1===s.length?s[0]:s):i}}var NoWrapFunction=getDistinguishReactOrVue({reactComponents:"all",domTags:"all"});function applyPureReactInVue(e,t){return transformer(e,{combinedOption:_objectSpread2({pureTransformer:!0,defaultSlotsFormatter:NoWrapFunction,defaultPropsFormatter:function(t,o,a){var r={};return Object.keys(t).forEach(function(e){var n=t[e];n&&(n.vueFunction?(r[e]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return NoWrapFunction(n.vueFunction.apply(this,t),o,a)},Object.defineProperty(r[e],"length",{get:function(){return n.vueFunction.length}})):n.vueSlot&&(r[e]=NoWrapFunction(n.vueSlot,o,a)))}),Object.assign(t,r)}},t)})}var NoWrapFunction$1=getDistinguishReactOrVue({reactComponents:"all",domTags:"all"});function getReactNode(e){return e=(e=[e="function"==typeof e?e():e]).flat(1/0),NoWrapFunction$1(e,function(e){return React__default.createElement(VueContainer,{node:e})})}function transformer$1(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=(t.globalName,t.combinedOption);t.transparentApi;return applyVueInReact(e,r||{})}var _excluded$5=["ref","children","v-slots"];function getChildInfo$1(e,t,o,a,i){var e=e.props||{},r=(e.ref,e.children),n=e["v-slots"],u=void 0===n?{}:n,n=_objectWithoutProperties(e,_excluded$5),c=(r&&("object"!==_typeof(r)||r instanceof Array||r.$$typeof?u.default=r:u=r),null),e=(Object.keys(u||{}).forEach(function(e){var n=u[e];(c=c||{})[e]=function(){if("function"==typeof n){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n=n.apply(this,t)}return a(n,o,i)}}),{}),r=formatStyle(n.style),s=Array.from(new Set(formatClass(n.className))).join(" ");return 0<Object.keys(r).length&&(e.style=r),""!==s&&(e.class=s),Object.assign(n,_objectSpread2({},e)),delete n.className,{props:n=parseVModel(n),slots:c}}function resolveRef$1(t){var e=t.ref;if(e)return"object"===_typeof(e)?function(e){t.ref.current=e}:"function"==typeof e?e:void 0}var _excluded$6=["style","class","children"];function takeReactDomInVue(e,t,r,n,o,a){var i,u,c,s;return"all"===t||t instanceof Array||(t=t?[t]:[]),e.type===Fragment?o(null==(i=e.props)?void 0:i.children,r):"string"==typeof e.type&&("all"===t||-1<t.indexOf(e.type))?(i=resolveRef$1(e),s=(t=e.props||{}).style,c=t.class,u=t.children,t=_objectWithoutProperties(t,_excluded$6),c=Array.from(new Set(formatClass(c))).join(" "),s=formatStyle(s),t=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},t),0===Object.keys(s).length?{}:{style:s}),c?{className:c}:{}),i?{ref:i}:{}),0===Object.keys(t).length&&(t=null),(s=u)&&((s=-1<["string","number"].indexOf(_typeof(s))?[s]:s instanceof Array?_toConsumableArray(s):_objectSpread2({},s)).__top__=a),h(e.type,t,o(s,r))):r([e],null,n)}function getDistinguishReactOrVue$1(e){var c=e.vueComponents,s=e.domTags,e=e.division,l=void 0===e||e;return function o(a,i){if(null==a)return a;a instanceof Array||(a=[a]);var u=[];return a.forEach(function(e,t){if((null==(r=e.type)||!r.originVueComponent)&&e.type!==VueContainer)return e.__v_isVNode||"string"==typeof e||"number"==typeof e?void u.push(e):void(e.type&&(r=takeReactDomInVue(e,s,i,l,o,a.__top__),u.push(r)));var r=e.type.originVueComponent;if(e.type===VueContainer){if(!e.props.component)return void u.push(e.props.node);r=e.props.component,e=_objectSpread2({},e);var n=_objectSpread2({},e.props);delete n.component,e.props=n}r="all"===(c="all"===c||c instanceof Array?c:[c])||-1<c.indexOf(r)?((e=_objectSpread2({},e)).__top__=a.__top__,t=(n=getChildInfo$1(e,"_key_".concat(t),i,o)).props,n=n.slots,resolveRef$1(e),e.children&&(e.children.__top__=a.__top__),h(r,_objectSpread2({},t),n)):takeReactDomInVue(e,s,i,l,o),u.push(r)}),1===(u=u.flat(1/0)).length?u[0]:u}}var NoWrapFunction$2=getDistinguishReactOrVue$1({vueComponents:"all",domTags:"all"});function applyPureVueInReact(e,t){return transformer$1(e,{combinedOption:_objectSpread2({pureTransformer:!0,defaultSlotsFormatter:NoWrapFunction$2},t)})}var NoWrapFunction$3=getDistinguishReactOrVue$1({reactComponents:"all",domTags:"all"});function getVNode(e){return 1===(e=(e=[e="function"==typeof e?e():e]).flat(1/0)).length&&(e=e[0]),NoWrapFunction$3(e,function(e){return h(WrapVue,{node:e})})}function lazyReactInVue$1(e,t){function r(){return n().then(function(e){return applyPureReactInVue(e.default,t)})}var n=e;"object"===_typeof(e)&&(n=e.loader);return defineAsyncComponent("object"===_typeof(e)?_objectSpread2(_objectSpread2({},e),{},{loader:r}):r)}function lazyVueInReact$1(e,t){return lazy(function(){return e().then(function(e){return{default:applyPureVueInReact(e.default,t)}})})}var _excluded$7=["children"];function createCrossingProviderForReactInVue$1(e){var r=createContext({});return[function(){return useContext(r)},applyPureReactInVue(function(e){var t=e.children,e=_objectWithoutProperties(e,_excluded$7);return createElement(r.Provider,{value:_objectSpread2({},e)},t)},{useInjectPropsFromWrapper:e}),r]}var random$3=new _default;function createCrossingProviderForVueInReact$1(e,r){return r=r||random$3.getRandomId("veauryCrossingProvide_"),[function(){return inject(r)},applyPureVueInReact({setup:function(e,t){return provide(r,t.attrs),function(){return h(t.slots.default)}}},{useInjectPropsFromWrapper:e})]}export{REACT_ALL_HANDLERS,WrapVue as RenderReactNode,VueContainer,applyPureReactInVue,applyPureVueInReact,applyReactInVue,applyVueInReact,createCrossingProviderForReactInVue$1 as createCrossingProviderForPureReactInVue,createCrossingProviderForVueInReact$1 as createCrossingProviderForPureVueInReact,createCrossingProviderForReactInVue,createCrossingProviderForVueInReact,createReactMissVue,getReactNode,getVNode,injectPropsFromWrapper,lazyReactInVue$1 as lazyPureReactInVue,lazyVueInReact$1 as lazyPureVueInReact,lazyReactInVue,lazyVueInReact,setOptions as setVeauryOptions,originOptions as veauryOptions};