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 _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0===i)return("string"===t?String:Number)(e);i=i.call(e,t||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{function e(e,t,i){var r,n,o=this,m={validationMessage:(r=tv4.errorCodes,_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(n={default:i.getString("This field is not valid.")},r.INVALID_TYPE,i.getString("Invalid type, expected {{ schema.type }}.")),r.ENUM_MISMATCH,i.getString("No enum match for: {{ viewValue }}.")),r.ANY_OF_MISSING,i.getString('Data does not match any schemas from "anyOf".')),r.ONE_OF_MISSING,i.getString('Data does not match any schemas from "oneOf".')),r.ONE_OF_MULTIPLE,i.getString('Data matches more than one schema from "oneOf".')),r.NOT_PASSED,i.getString('Data matches schema from "not".')),r.NUMBER_MULTIPLE_OF,i.getString("Value {{ viewValue }} is not a multiple of {{ schema.multipleOf }}.")),r.NUMBER_MINIMUM,i.getString("Value {{ viewValue }} is less than minimum {{ schema.minimum }}.")),r.NUMBER_MINIMUM_EXCLUSIVE,i.getString("Value {{ viewValue }} is equal to exclusive minimum {{ schema.exclusiveMinimum }}.")),r.NUMBER_MAXIMUM,i.getString("Value {{ viewValue }} is greater than maximum {{ schema.maximum }}.")),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(n,r.NUMBER_MAXIMUM_EXCLUSIVE,i.getString("Value {{ viewValue }} is equal to exclusive maximum {{ schema.exclusiveMaximum }}.")),r.NUMBER_NOT_A_NUMBER,i.getString("Value {{ viewValue }} is not a valid number.")),r.STRING_LENGTH_SHORT,i.getString("String is too short ({{ viewValue.length }} chars), minimum {{ schema.minLength }}.")),r.STRING_LENGTH_LONG,i.getString("String is too long ({{ viewValue.length }} chars), maximum {{ schema.maxLength }}.")),r.STRING_PATTERN,i.getString("String does not match pattern: {{ schema.pattern }}.")),r.OBJECT_PROPERTIES_MINIMUM,i.getString("Not enough properties defined, minimum {{ schema.minProperties }}.")),r.OBJECT_PROPERTIES_MAXIMUM,i.getString("Too many properties defined, maximum {{ schema.maxProperties }}.")),r.OBJECT_REQUIRED,i.getString("This field is required.")),r.OBJECT_ADDITIONAL_PROPERTIES,i.getString("Additional properties not allowed.")),r.OBJECT_DEPENDENCY_KEY,i.getString("Dependency failed - key must exist.")),(n=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(n,r.ARRAY_LENGTH_SHORT,i.getString("Array is too short ({{ value.length }}), minimum {{ schema.minItems }}.")),r.ARRAY_LENGTH_LONG,i.getString("Array is too long ({{ value.length }}), maximum {{ schema.maxItems }}.")),r.ARRAY_UNIQUE,i.getString("Array items are not unique.")),r.ARRAY_ADDITIONAL_ITEMS,i.getString("Additional items not allowed.")),r.FORMAT_CUSTOM,i.getString("Format validation failed.")),r.KEYWORD_CUSTOM,i.getString('Keyword failed: "{{ title }}".')),r.CIRCULAR_REFERENCE,i.getString("Circular $refs.")),r.UNKNOWN_PROPERTY,i.getString("Unknown property (not in schema)."))).number=n[r.NUMBER_NOT_A_NUMBER],n.required=n[r.OBJECT_REQUIRED],n.min=n[r.NUMBER_MINIMUM],n.max=n[r.NUMBER_MAXIMUM],n.maxlength=n[r.STRING_LENGTH_LONG],n.minlength=n[r.STRING_LENGTH_SHORT],n.pattern=n[r.STRING_PATTERN],n),validateOnRender:!0,formDefaults:{feedback:!1,disableSuccessState:!0}};function a(){o.render=!0,t(function(){o.render=!1})}_.assign(o,{form:["*"],options:m,$onChanges:function(e){e.inputForm&&(o.form=o.inputForm,a());e.inputOptions&&(o.options=_.merge({},m,o.inputOptions),a())}})}e.$inject=["$scope","$timeout","gettextCatalog"],angular.module("c8y.ui").component("c8ySchemaForm",{bindings:{schema:"<",model:"<",inputForm:"<?form",inputOptions:"<?options"},templateUrl:":::PLUGIN_PATH:::/ui/schemaForm/schemaForm.html",controller:e,controllerAs:"vm"})})();