/**
  * kdu-class-component v7.2.6
  * (c) 2022 NKDuy
  * @license MIT
  */
import Kdu from"kdu";function reflectionIsSupported(){return"undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function copyReflectionMetadata(e,t){forwardMetadata(e,t),Object.getOwnPropertyNames(t.prototype).forEach(r=>{forwardMetadata(e.prototype,t.prototype,r)}),Object.getOwnPropertyNames(t).forEach(r=>{forwardMetadata(e,t,r)})}function forwardMetadata(e,t,r){(r?Reflect.getOwnMetadataKeys(t,r):Reflect.getOwnMetadataKeys(t)).forEach(o=>{var a=r?Reflect.getOwnMetadata(o,t,r):Reflect.getOwnMetadata(o,t);r?Reflect.defineMetadata(o,a,e,r):Reflect.defineMetadata(o,a,e)})}var fakeArray={__proto__:[]},hasProto=fakeArray instanceof Array;function createDecorator(e){return(t,r,o)=>{var a="function"==typeof t?t:t.constructor;a.__decorators__||(a.__decorators__=[]),"number"!=typeof o&&(o=void 0),a.__decorators__.push(t=>e(t,r,o))}}function mixins(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Kdu.extend({mixins:t})}function isPrimitive(e){var t=typeof e;return null==e||"object"!==t&&"function"!==t}function collectDataFromConstructor(e,t){var r=t.prototype._init;t.prototype._init=function(){var t=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||t.push(r);t.forEach(t=>{Object.defineProperty(this,t,{get:()=>e[t],set:r=>{e[t]=r},configurable:!0})})};var o=new t;t.prototype._init=r;var a={};return Object.keys(o).forEach(e=>{void 0!==o[e]&&(a[e]=o[e])}),a}var $internalHooks=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function componentFactory(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var r=e.prototype;Object.getOwnPropertyNames(r).forEach(function(e){if("constructor"!==e)if($internalHooks.indexOf(e)>-1)t[e]=r[e];else{var o=Object.getOwnPropertyDescriptor(r,e);void 0!==o.value?"function"==typeof o.value?(t.methods||(t.methods={}))[e]=o.value:(t.mixins||(t.mixins=[])).push({data:()=>({[e]:o.value})}):(o.get||o.set)&&((t.computed||(t.computed={}))[e]={get:o.get,set:o.set})}}),(t.mixins||(t.mixins=[])).push({data(){return collectDataFromConstructor(this,e)}});var o=e.__decorators__;o&&(o.forEach(e=>e(t)),delete e.__decorators__);var a=Object.getPrototypeOf(e.prototype),n=a instanceof Kdu?a.constructor:Kdu,c=n.extend(t);return forwardStaticMembers(c,e,n),reflectionIsSupported()&&copyReflectionMetadata(c,e),c}var shouldIgnore={prototype:!0,arguments:!0,callee:!0,caller:!0};function forwardStaticMembers(e,t,r){Object.getOwnPropertyNames(t).forEach(o=>{if(!shouldIgnore[o]){var a=Object.getOwnPropertyDescriptor(e,o);if(!a||a.configurable){var n=Object.getOwnPropertyDescriptor(t,o);if(!hasProto){if("cid"===o)return;var c=Object.getOwnPropertyDescriptor(r,o);if(!isPrimitive(n.value)&&c&&c.value===n.value)return}Object.defineProperty(e,o,n)}}})}function Component(e){return"function"==typeof e?componentFactory(e):function(t){return componentFactory(t,e)}}Component.registerHooks=function(e){$internalHooks.push(...e)};export default Component;export{createDecorator,mixins};