Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-formly

Package Overview
Dependencies
Maintainers
2
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-formly - npm Package Compare versions

Comparing version 7.0.1 to 7.1.0

.gitattributes

6

dist/formly.min.js

@@ -1,4 +0,4 @@

//! angular-formly version 7.0.1 built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò)
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("api-check"),require("angular")):"function"==typeof define&&define.amd?define(["api-check","angular"],t):"object"==typeof exports?exports.ngFormly=t(require("api-check"),require("angular")):e.ngFormly=t(e.apiCheck,e.angular)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=o(r);t["default"]=i["default"],e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(18);o.version||(o=window.angular),t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n,o,r){return y["default"].isFunction(t)?t(o,n,e,r):e.$eval(t,y["default"].extend({$viewValue:o,$modelValue:n},r))}function i(e,t,n){if(t.id)return t.id;var o=t.type;return!o&&t.template?o="template":!o&&t.templateUrl&&(o="templateUrl"),[e,o,t.key,n].join("_")}function a(e){return y["default"].forEach(arguments,function(t,n){n&&y["default"].forEach(t,function(t,n){y["default"].isDefined(e[n])?l(e[n],t)&&a(e[n],t):e[n]=y["default"].copy(t)})}),e}function l(e,t){return y["default"].isObject(e)&&y["default"].isObject(t)&&Object.getPrototypeOf(e)===Object.getPrototypeOf(t)}function f(e,t){if(e.prop||(e=y["default"].element(e)),e.prop("nodeName")===t.toUpperCase())return e;for(var n=e.children(),o=0;n&&o<n.length;o++){var r=f(n[o],t);if(r)return r}}function s(e){return e&&!y["default"].isArray(e)?e=[e]:e||(e=[]),e}function u(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(){var e=arguments;t.forEach(function(t){return t.apply(null,e)})}}function p(e,t,n){return n&&(e=e[n],t=t[n]),t&&e?(y["default"].forEach(t,function(t){-1===e.indexOf(t)&&e.push(t)}),e):t?t:e}function d(e,t){return y["default"].isString(e)&&y["default"].isString(t)?e.length>=t.length&&e.substring(0,t.length)===t:!1}function c(e,t){return y["default"].isString(e)&&y["default"].isString(t)?e.length>=t.length&&-1!==e.indexOf(t):!1}Object.defineProperty(t,"__esModule",{value:!0});var m=n(1),y=o(m);t["default"]={formlyEval:r,getFieldId:i,reverseDeepMerge:a,findByNodeName:f,arrayify:s,extendFunction:u,extendArray:p,startsWith:d,contains:c},e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]="https://github.com/formly-js/angular-formly/blob/7.0.1/other/ERRORS_AND_WARNINGS.md#",e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{restrict:"A",require:"ngModel",link:function(t,n,o,r){function i(e,t,n){l(t,n),t=a["default"].isObject(t)?t.expression:t,p?f(t,n,e):s(t,n,e)}function l(n,o){var i=n.message;i&&(u.validation.messages[o]=function(){return e.formlyEval(t,i,r.$modelValue,r.$viewValue)})}function f(n,o,i){var a=i?"$asyncValidators":"$validators";r[a][o]=function(o,r){return e.formlyEval(t,n,o,r)}}function s(n,o,i){var a=void 0;r.$parsers.unshift(function(l){var f=e.formlyEval(t,n,r.$modelValue,l);return i?(r.$pending=r.$pending||{},r.$pending[o]=!0,a=f,f.then(function(){a===f&&r.$setValidity(o,!0)})["catch"](function(){a===f&&r.$setValidity(o,!1)})["finally"](function(){var e=r.$pending||{};1===Object.keys(e).length?delete r.$pending:delete r.$pending[o]})):r.$setValidity(o,f),l})}var u=t.options;u.validation.messages=u.validation.messages||{},a["default"].forEach(u.validation.messages,function(n,o){u.validation.messages[o]=function(){return e.formlyEval(t,n,r.$modelValue,r.$viewValue)}});var p=r.hasOwnProperty("$validators")&&!o.hasOwnProperty("useParsers");a["default"].forEach(u.validators,i.bind(null,!1)),a["default"].forEach(u.asyncValidators,i.bind(null,!0))}}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["formlyUtil"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,o,i,f,u,d,c,m){function y(e,n,o,r,i){function a(){n(function(){var n=e.options,r=l();s["default"].forEach(n.expressionProperties,function(i,a){var l=o(a).assign,f=t.when(d.formlyEval(e,i,r,r));f.then(function(e){l(n,e)})})},0,!1)}function l(t){return e.model&&e.options.key?(s["default"].isDefined(t)&&(e.model[e.options.key]=t),e.model[e.options.key]):void 0}function u(t){d.reverseDeepMerge(t,{originalModel:t.model,extras:{},data:{},templateOptions:{},validation:{}}),e.to=e.options.templateOptions,e.formOptions=e.formOptions||{}}function p(){if(s["default"].isFunction(f.extras.getFieldId))e.id=f.extras.getFieldId(e.options,e.model,e);else{var t=e.form&&e.form.$name||e.formId;e.id=d.getFieldId(t,e.options,e.index)}e.options.id=e.id,e.name=e.options.name||e.options.id,e.options.name=e.name}function c(){s["default"].isDefined(e.options.defaultValue)&&!s["default"].isDefined(e.model[e.options.key])&&(e.model[e.options.key]=e.options.defaultValue)}function m(){e.options.initialValue=e.model&&e.model[e.options.key]}function y(e,t){t&&h(e,t.defaultOptions);var n=j(e.optionsTypes).reverse();s["default"].forEach(n,function(t){h(e,f.getType(t,!0,e).defaultOptions)})}function h(t,n){n&&(s["default"].isFunction(n)&&(n=n(t,e)),d.reverseDeepMerge(t,n))}function v(e,t){var n=e.key||t||0;s["default"].extend(e,{key:n,value:e.value||l,runExpressions:a,resetModel:b,updateInitialValue:x})}function b(){e.model[e.options.key]=e.options.initialValue,e.options.formControl&&(s["default"].isArray(e.options.formControl)?s["default"].forEach(e.options.formControl,function(e){O(e,!0)}):O(e.options.formControl))}function O(t,n){n||t.$setViewValue(e.model[e.options.key]),t.$render(),t.$setUntouched&&t.$setUntouched(),t.$setPristine(),e.$root.$$phase||e.$digest()}function x(){e.options.initialValue=e.model[e.options.key]}function E(e){e.validation.messages=e.validation.messages||{},s["default"].forEach(i.messages,function(t,n){e.validation.messages[n]||(e.validation.messages[n]=function(e,n,o){return d.formlyEval(o,t,n,e)})})}function $(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s["default"].forEach([n.controller,t.controller],function(t){t&&r(t,{$scope:e})})}function k(){e.options.options=e.options.options||{},e.options.options.formState=e.formState}if(e.options.fieldGroup)return void k();var A=g(e.options);u(e.options),y(e.options,A),v(e.options,e.index),w(e.options),p(),c(),m(),a(),E(e.options),$(e,e.options,A)}function h(e,o,u,p){function c(){A(e.options),o.addClass("formly-field-group");var t="";e.options.elementAttributes&&(t=Object.keys(e.options.elementAttributes).map(function(t){return t+'="'+e.options.elementAttributes[t]+'"'}).join(" "));var n="model";e.options.form=e.form,e.options.key&&(n="model['"+e.options.key+"']"),x('\n <formly-form model="'+n+'"\n fields="options.fieldGroup"\n options="options.options"\n form="options.form"\n class="'+e.options.className+'"\n '+t+"\n is-field-group>\n </formly-form>\n ")}function y(){e.options.elementAttributes&&o.attr(e.options.elementAttributes)}function h(){e.options.className&&o.addClass(e.options.className),e.options.type&&o.addClass("formly-field-"+e.options.type)}function x(t){return o.html(v(t)),n(o.contents())(e),t}function $(t){function n(t){var n=/\{\{(.*?)}}/,r=n.exec(t);r&&(t=i(t)(e)),o(t)}function o(t){e.$watch('form["'+t+'"]',function(t){t&&(T>1?(e.options.formControl||(e.options.formControl=[]),e.options.formControl.push(t)):e.options.formControl=t,e.fc=e.options.formControl,y(),u(),p(),c())})}function u(){y=e.$watch(function(){var t=f.extras.errorExistsAndShouldBeVisibleExpression,n=e.options,o=e.fc;if(o.$invalid){if("boolean"==typeof n.validation.show)return n.validation.show;if(t)return d.formlyEval(e,t,o.$modelValue,o.$viewValue);var r=s["default"].isUndefined(o.$touched)&&o.$dirty;return e.fc.$touched||r}return!1},function(t){e.options.validation.errorExistsAndShouldBeVisible=t,e.showError=t})}function p(){m("parsers")}function c(){m("formatters");var t=e.fc,n=e.form.$pristine;e.options.formatters&&!function(){var o=t.$modelValue;t.$formatters.forEach(function(e){o=e(o)}),t.$setViewValue(o),t.$render(),t.$setPristine(),n&&e.form.$setPristine()}()}function m(t){function n(r){if(!r)return[];s["default"].isString(r)&&(r=f.getType(r,!0,e.options));var i=[];return r["extends"]&&(i=d.extendArray(i,n(r["extends"]))),i=d.extendArray(i,l(r,t,[])),i=d.extendArray(i,o(a(r)))}function o(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=[];return s["default"].forEach(s["default"].copy(j(e)).reverse(),function(e){t=d.extendArray(t,n(e))}),t}function i(t){function n(n){var o=e.options.value();return d.formlyEval(e,t,o,n)}return n[u]=t,n}var u="originalParser";"formatters"===t&&(u="originalFormatter");var p=n(M);p=d.extendArray(p,o(e.options.optionsTypes)),p=d.extendArray(p,e.options[t]),s["default"].forEach(p,function(e,t){p[t]=i(e)});var c=e.fc;s["default"].isArray(c)||(c=[c]),s["default"].forEach(c,function(e){var n;e["$"+t]=(n=e["$"+t]).concat.apply(n,r(p))})}var y=s["default"].noop;if(!e.options.noFormControl){var h=s["default"].element("<div>"+t+"</div>"),v=h[0].querySelectorAll("[ng-model],[data-ng-model]");v.length&&s["default"].forEach(v,function(e){T++,n(e.getAttribute("name"))})}}function k(){M&&M.link&&M.link.apply(_,C),e.options.link&&e.options.link.apply(_,C)}function w(n){return function(o){var r=t.when(o);return s["default"].forEach(n,function(n){r=r.then(function(o){return t.when(n(o,e.options,e)).then(function(e){return s["default"].isString(e)?e:v(e)})})}),r}}if(e.options.fieldGroup)return void c();!p&&e.options.model&&e.$watch("options.model",function(){return e.options.runExpressions()},!0),y(),h();var M=g(e.options),C=arguments,_=this,T=0,F=b(e.options,e.formOptions);O(e.options).then(w(F.preWrapper)).then(E(e.options,e.formOptions)).then(w(F.postWrapper)).then(x).then($).then(k)["catch"](function(t){m("there-was-a-problem-setting-the-template-for-this-field","There was a problem setting the template for this field ",e.options,t)})}function v(e){var t=s["default"].element("<a></a>");return t.append(e).html()}function g(e){return e.type&&f.getType(e.type)}function b(e,t){function n(e){var t=e||{},n=t.preWrapper,i=void 0===n?[]:n,a=t.postWrapper,l=void 0===a?[]:a;o=o.concat(i),r=r.concat(l)}var o=[],r=[];return n(e.templateManipulators),n(t.templateManipulators),n(f.templateManipulators),{preWrapper:o,postWrapper:r}}function O(e){function t(t,n){return s["default"].isDefined(e[t])?e[t]:n&&s["default"].isDefined(n[t])?n[t]:void 0}var n=f.getType(e.type,!0,e),o=t("template",n),r=t("templateUrl",n);if(s["default"].isUndefined(o)&&!r)throw c.getFieldError("type-type-has-no-template","Type '"+e.type+"' has no template. On element:",e);return x(r||o,s["default"].isUndefined(o),e)}function x(n,r,i){var a=void 0;if(a=s["default"].isFunction(n)?t.when(n(i)):t.when(n),!r)return a;var l=function(){var t={cache:o};return{v:a.then(function(n){return e.get(n,t)}).then(function(e){return e.data})["catch"](function(e){m("problem-loading-template-for-templateurl","Problem loading template for "+n,e)})}}();return"object"==typeof l?l.v:void 0}function E(e,n){var o=k(e,n);return function(n){if(!o.length)return t.when(n);o.forEach(function(t){c.checkWrapper(t,e),M(t,e)});var r=o.map(function(e){return x(e.template||e.templateUrl,!e.template)});return t.all(r).then(function(e){e.forEach(function(e,t){c.checkWrapperTemplate(e,o[t])}),e.reverse();var t=e.shift();return e.forEach(function(e){t=$(t,e)}),$(t,n)})}}function $(e,t){var n=s["default"].element("<a></a>");n.append(e);var o=n.find("formly-transclude");return o.length||(o=d.findByNodeName(n,"formly-transclude")),o.replaceWith(t),n.html()}function k(e,t){var n=e.wrapper;if(null===n)return[];n=n?j(n).map(f.getWrapper):j(f.getWrapperByType(e.type));var o=f.getType(e.type,!0,e);if(o&&o.wrapper){var r=j(o.wrapper).map(f.getWrapper);n=n.concat(r)}if(t.wrapper){var i=j(t.wrapper).map(f.getWrapper);n=n.concat(i)}var a=f.getWrapper();return a&&n.push(a),n}function w(e){u["throw"](u.formlyFieldOptions,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"});var t=e.type&&f.getType(e.type);t&&M(t,e,!0),e.expressionProperties&&e.expressionProperties.hide&&m("dont-use-expressionproperties.hide-use-hideexpression-instead","You have specified `hide` in `expressionProperties`. Use `hideExpression` instead",e)}function A(e){u["throw"](u.fieldGroup,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"})}function M(e,t,n){var o=e.apiCheck,r=e.apiCheckInstance,i=e.apiCheckFunction,a=e.apiCheckOptions;C(o,r,i,a,t),n&&t.type&&s["default"].forEach(f.getTypeHeritage(t.type),function(e){C(e.apiCheck,e.apiCheckInstance,e.apiCheckFunction,e.apiCheckOptions,t)})}function C(e,t,n,o,r){if(e){var i=t||f.extras.apiCheckInstance||u;if(!i.config.disabled&&!p["default"].globalConfig.disabled){var a=n||"warn",l=e(i);s["default"].forEach(l,function(e,t){var n=i.shape(e),l=s["default"].extend({prefix:"formly-field type "+r.type+" for property "+t,url:u.config.output.docsBaseUrl+"formly-field-type-apicheck-failed"},o);i[a](n,r[t],l)})}}}var j=d.arrayify;return y.$inject=["$scope","$timeout","$parse","$controller","formlyValidationMessages"],{restrict:"AE",transclude:!0,require:"?^formlyForm",scope:{options:"=",model:"=",originalModel:"=?",formId:"@",index:"=?",fields:"=?",formState:"=?",formOptions:"=?",form:"=?"},controller:y,link:h}}function a(e){return l(e,"optionsTypes",[])}function l(e,t,n){return e.defaultOptions&&e.defaultOptions[t]||n}Object.defineProperty(t,"__esModule",{value:!0});var f=n(1),s=o(f),u=n(4),p=o(u);t["default"]=i,i.$inject=["$http","$q","$compile","$templateCache","$interpolate","formlyConfig","formlyApiCheck","formlyUtil","formlyUsability","formlyWarn"],e.exports=t["default"]},function(e,t){"use strict";function n(e,t){return{restrict:"A",link:function(n,o,r){var i=null,a=o[0],l=t[0];r.$observe("formlyFocus",function(t){"true"===t?e(function(){i=l.activeElement,a.focus()},~~r.focusWait):"false"===t&&l.activeElement===a&&(a.blur(),r.hasOwnProperty("refocus")&&i&&i.focus())})}}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,n.$inject=["$timeout","$document"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,o,i){function l(t,n){function r(){return n.rootEl||"ng-form"}function a(){return n.fieldRootEl||"div"}function l(){return n.hideDirective||o.extras.defaultHideDirective||"ng-if"}function s(){return n.trackBy?"track by "+n.trackBy:""}function u(){var t=v,o=n.bindName;if(o){if(f["default"].version.minor<3)throw e.getFormlyError("bind-name attribute on formly-form not allowed in < angular 1.3");t=i.startSymbol()+"::'formly_' + "+o+i.endSymbol()}return t}function d(){return n.transcludeClass||""}function m(e){var t=["model","form","fields","options","name","role","class","data-model","data-form","data-fields","data-options","data-name"],n=[];return f["default"].forEach(e,function(e){var o=e.nodeName,r=e.value;"undefined"!==o&&-1===t.indexOf(o)&&n.push(p(o)+'="'+r+'"')}),n.join(" ")}var y=r(),h=a(),v="formly_"+c++,g="";return n.hasOwnProperty("isFieldGroup")&&t.parent().parent().hasClass("formly")&&(g=m(t.parent().parent()[0].attributes)),"\n <"+y+' class="formly"\n name="'+u()+'"\n role="form" '+g+">\n <"+h+' formly-field\n ng-repeat="field in fields '+s()+'"\n '+l()+'="!field.hide"\n class="formly-field"\n options="field"\n model="field.model || model"\n original-model="model"\n fields="fields"\n form="theFormlyForm"\n form-id="'+u()+'"\n form-state="options.formState"\n form-options="options"\n index="$index">\n </'+h+'>\n <div ng-transclude class="'+d()+'"></div>\n </'+y+">\n "}function s(t,n,i){function l(){f["default"].forEach(t.fields,function(e,n){var o=e.model||t.model;if(e.runExpressions&&e.runExpressions(),e.hideExpression){var r=o[e.key];e.hide=E(e.hideExpression,r,e,n)}e.extras&&e.extras.validateOnModelChange&&e.formControl&&e.formControl.$validate()})}function s(){t.fields=t.fields||[];var n=t.options.fieldTransform||o.extras.fieldTransform;if(n&&(t.fields=n(t.fields,t.model,t.options,t.form),!t.fields))throw e.getFormlyError("fieldTransform must return an array of fields");m(),f["default"].forEach(t.fields,v),f["default"].forEach(t.fields,g)}function u(){n["throw"]([n.formOptionsApi.optional],[t.options],{prefix:"formly-form options check"}),t.options=t.options||{},t.options.formState=t.options.formState||{},f["default"].extend(t.options,{updateInitialValue:p,resetModel:c})}function p(){f["default"].forEach(t.fields,function(e){d(e)&&e.options?e.options.updateInitialValue():e.updateInitialValue()})}function c(){f["default"].forEach(t.fields,function(e){d(e)&&e.options?e.options.resetModel():e.resetModel&&e.resetModel()})}function m(){var e=[t.model];t.options.formState&&e.push(t.options.formState),f["default"].forEach(t.fields,function(n){var o=y(n);n.model&&o&&-1===e.indexOf(n.model)&&(t.$watch(function(){return n.model},l,!0),e.push(n.model))})}function y(n){var o=!0;if(f["default"].isString(n.model)){var r=n.model,i=t.fields.indexOf(n);if(o=!h(r),n.model=E(r,void 0,n,i),!n.model)throw e.getFieldError("field-model-must-be-initialized","Field model must be initialized. When specifying a model as a string for a field, the result of the expression must have been initialized ahead of time.",n)}return o}function h(e){return["model","formState"].some(function(t){return i.startsWith(e,t+".")||i.startsWith(e,t+"[")})}function v(e,t){d(e)||(e.key=e.key||t||0)}function g(n,o){if(!d(n)&&f["default"].isDefined(n.watcher)){var r=n.watcher;f["default"].isArray(r)||(r=[r]),f["default"].forEach(r,function(r){if(!f["default"].isDefined(r.listener))throw e.getFieldError("all-field-watchers-must-have-a-listener","All field watchers must have a listener",n);var i=b(r,n,o),a=O(r,n,o),l=r.type||"$watch";r.stopWatching=t[l](i,a,r.watchDeep)})}}function b(e,t,n){var o=e.expression||"model['"+t.key+"']";return f["default"].isFunction(o)&&!function(){var i=o;o=function(){var t=x.apply(void 0,[e,n].concat(a.call(arguments)));return i.apply(void 0,r(t))},o.displayName="Formly Watch Expression for field for "+t.key}(),o}function O(e,t,n){var o=e.listener;return f["default"].isFunction(o)&&!function(){var i=o;o=function(){var t=x.apply(void 0,[e,n].concat(a.call(arguments)));return i.apply(void 0,r(t))},o.displayName="Formly Watch Listener for field for "+t.key}(),o}function x(e,n){for(var o=arguments.length,r=Array(o>2?o-2:0),i=2;o>i;i++)r[i-2]=arguments[i];return[t.fields[n]].concat(r,[e.stopWatching])}function E(e,n,o,r){var a=$(o,r);return i.formlyEval(t,e,n,n,a)}function $(e,n){return{options:e,index:n,formState:t.options.formState,formId:t.formId}}u(),t.model=t.model||{},s(),t.$watch("model",l,!0),t.options.formState&&t.$watch("options.formState",l,!0)}function u(e,r,i){function a(){var a=i.name;if(e.formId=a,e.theFormlyForm=e[a],i.form){var l=n(i.form),f=l.assign,s=l(e.$parent);s?(e.theFormlyForm=s,e[a]&&e.theFormlyForm.$removeControl(e[a]),r.removeData("$formController")):f(e.$parent,e[a])}e.theFormlyForm||o.disableWarnings||t("formly-form-has-no-formcontroller","Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work",r,e)}function l(){var t=o.extras.removeChromeAutoComplete===!0,n=e.options&&e.options.removeChromeAutoComplete===!1,i=e.options&&e.options.removeChromeAutoComplete===!0;if(t&&!n||i){var a=document.createElement("input");a.setAttribute("autocomplete","address-level4"),a.setAttribute("hidden","true"),r[0].appendChild(a)}}a(),l()}function p(e){return e?e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):""}function d(e){return e&&!!e.fieldGroup}var c=1;return s.$inject=["$scope","formlyApiCheck","formlyUtil"],{restrict:"AE",template:l,replace:!0,transclude:!0,scope:{fields:"=",model:"=",form:"=?",options:"=?"},controller:s,link:u}}Object.defineProperty(t,"__esModule",{value:!0});var a=Array.prototype.slice,l=n(1),f=o(l);t["default"]=i,i.$inject=["formlyUsability","formlyWarn","$parse","formlyConfig","$interpolate"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=o(r),a=n(10),l=o(a),f=n(3),s=o(f),u=n(12),p=o(u),d=n(11),c=o(d),m=n(13),y=o(m),h=n(16),v=o(h),g=n(17),b=o(g),O=n(5),x=o(O),E=n(6),$=o(E),k=n(7),w=o(k),A=n(8),M=o(A),C=n(15),j=o(C),_=n(14),T=o(_),F="formly";t["default"]=F;var W=i["default"].module(F,[]);W.constant("formlyApiCheck",l["default"]),W.constant("formlyErrorAndWarningsUrlPrefix",s["default"]),W.constant("formlyVersion","7.0.1"),W.provider("formlyUsability",p["default"]),W.provider("formlyConfig",c["default"]),W.factory("formlyValidationMessages",y["default"]),W.factory("formlyUtil",v["default"]),W.factory("formlyWarn",b["default"]),W.directive("formlyCustomValidation",x["default"]),W.directive("formlyField",$["default"]),W.directive("formlyFocus",w["default"]),W.directive("formlyForm",M["default"]),W.run(j["default"]),W.run(T["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(n,r,i,a){var l=a&&a.hasOwnProperty(r),f=e.some(function(e){return a&&a.hasOwnProperty(e)});return f||l?l?t(n,r,i,a):void 0:s.utils.getError(r,i,o)}a["default"].isArray(e)||(e=[e]);var o="specified if these are not specified: `"+e.join(", ")+"` (otherwise it's optional)";return n.type=o,s.utils.checkerHelpers.setupChecker(n)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i),l=n(4),f=o(l),s=f["default"]({output:{prefix:"angular-formly:",docsBaseUrl:n(3)}}),u=s.oneOfType([s.string,s.func]),p=s.typeOrArrayOf(s.string).nullable,d=s.func,c=s.shape.onlyIf("apiCheck",s.func.withProperties({warn:s.func,"throw":s.func,shape:s.func})),m=s.shape.onlyIf("apiCheck",s.oneOf(["throw","warn"])),y=s.shape({name:r("types",s.string).optional,template:s.shape.ifNot("templateUrl",s.string).optional,templateUrl:s.shape.ifNot("template",s.string).optional,types:s.typeOrArrayOf(s.string).optional,overwriteOk:s.bool.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional}).strict,h=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),v=s.oneOfType([s.string,s.object]),g=s.shape({preWrapper:s.arrayOf(s.func).nullable.optional,postWrapper:s.arrayOf(s.func).nullable.optional}).strict.nullable,b=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),O={$$hashKey:s.any.optional,type:s.shape.ifNot(["template","templateUrl"],s.string).optional,template:s.shape.ifNot(["type","templateUrl"],s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot(["type","template"],s.oneOfType([s.string,s.func])).optional,key:s.oneOfType([s.string,s.number]).optional,model:v.optional,originalModel:v.optional,className:s.string.optional,id:s.string.optional,name:s.string.optional,expressionProperties:h.optional,extras:s.shape({validateOnModelChange:s.bool.optional,skipNgModelAttrsManipulator:s.oneOfType([s.string,s.bool]).optional}).strict.optional,data:s.object.optional,templateOptions:s.object.optional,wrapper:p.optional,modelOptions:s.shape({updateOn:s.string.optional,debounce:s.oneOfType([s.objectOf(s.number),s.number]).optional,allowInvalid:s.bool.optional,getterSetter:s.bool.optional,timezone:s.string.optional}).optional,watcher:s.typeOrArrayOf(s.shape({expression:u.optional,listener:u})).optional,validators:b.optional,asyncValidators:b.optional,parsers:s.arrayOf(u).optional,formatters:s.arrayOf(u).optional,noFormControl:s.bool.optional,hide:s.bool.optional,hideExpression:u.optional,ngModelElAttrs:s.objectOf(s.string).optional,ngModelAttrs:s.objectOf(s.shape({statement:s.shape.ifNot(["value","attribute","bound","boolean"],s.any).optional,value:s.shape.ifNot("statement",s.any).optional,attribute:s.shape.ifNot("statement",s.any).optional,bound:s.shape.ifNot("statement",s.any).optional,"boolean":s.shape.ifNot("statement",s.any).optional}).strict).optional,elementAttributes:s.objectOf(s.string).optional,optionsTypes:s.typeOrArrayOf(s.string).optional,link:s.func.optional,controller:s.oneOfType([s.string,s.func,s.array]).optional,validation:s.shape({show:s.bool.nullable.optional,messages:s.objectOf(u).optional,errorExistsAndShouldBeVisible:s.bool.optional}).optional,formControl:s.typeOrArrayOf(s.object).optional,value:s.func.optional,runExpressions:s.func.optional,templateManipulators:g.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,initialValue:s.any.optional,defaultValue:s.any.optional},x=s.shape(O).strict,E=s.shape({formState:s.object.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,removeChromeAutoComplete:s.bool.optional,templateManipulators:g.optional,wrapper:p.optional,fieldTransform:s.func.optional,data:s.object.optional}).strict,$=s.shape({$$hashKey:s.any.optional,key:s.oneOfType([s.string,s.number]).optional,fieldGroup:s.arrayOf(s.oneOfType([x,s.object])),className:s.string.optional,options:E.optional,hide:s.bool.optional,hideExpression:u.optional,data:s.object.optional,model:v.optional,form:s.object.optional,elementAttributes:s.objectOf(s.string).optional}).strict,k=a["default"].copy(O);k.key=s.string.optional;var w=s.shape({name:s.string,template:s.shape.ifNot("templateUrl",s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot("template",s.oneOfType([s.string,s.func])).optional,controller:s.oneOfType([s.func,s.string,s.array]).optional,link:s.func.optional,defaultOptions:s.oneOfType([s.func,s.shape(k)]).optional,"extends":s.string.optional,wrapper:p.optional,data:s.object.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional,overwriteOk:s.bool.optional}).strict;a["default"].extend(s,{formlyTypeOptions:w,formlyFieldOptions:x,formlyExpression:u,formlyWrapperType:y,fieldGroup:$,formOptionsApi:E}),t["default"]=s,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n){function o(e){if(!l["default"].isArray(e)){if(l["default"].isObject(e))return i(e),e["extends"]&&a(e),M[e.name]=e,M[e.name];throw T("You must provide an object or array for setType. You provided: "+JSON.stringify(arguments))}var t=function(){var t=[];return l["default"].forEach(e,function(e){t.push(o(e))}),{v:t}}();return"object"==typeof t?t.v:void 0}function i(e){n["throw"](n.formlyTypeOptions,e,{prefix:"formlyConfig.setType",url:"settype-validation-failed"}),e.overwriteOk?e.overwriteOk=void 0:O(e.name,M,e,"types")}function a(e){var t=c(e["extends"],!0,e);u(e,t),p(e,t),d(e,t),s["default"].reverseDeepMerge(e,t),f(e,t)}function f(e,t){e.template&&t.templateUrl?delete e.templateUrl:e.templateUrl&&t.template&&delete e.template}function u(e,t){var n=t.controller;if(l["default"].isDefined(n)){var o=e.controller;l["default"].isDefined(o)?(e.controller=function(e,t){t(n,{$scope:e}),t(o,{$scope:e})},e.controller.$inject=["$scope","$controller"]):e.controller=n}}function p(e,t){var n=t.link;if(l["default"].isDefined(n)){var o=e.link;l["default"].isDefined(o)?e.link=function(){n.apply(void 0,arguments),o.apply(void 0,arguments)}:e.link=n}}function d(e,t){var n=t.defaultOptions;if(l["default"].isDefined(n)){var o=e.defaultOptions,r=l["default"].isFunction(o),i=l["default"].isFunction(n);i?e.defaultOptions=function(e,t){var i=n(e,t),a={};s["default"].reverseDeepMerge(a,e,i);var l=o;return r&&(l=l(a,t)),s["default"].reverseDeepMerge(i,l),i}:r&&(e.defaultOptions=function(e,t){var r={};return s["default"].reverseDeepMerge(r,e,n),o(r,t)})}}function c(e,t,n){if(!e)return void 0;var o=M[e];if(o||t!==!0)return o;throw T('There is no type by the name of "'+e+'": '+JSON.stringify(n))}function m(e){var t=[],n=e;for(l["default"].isString(n)&&(n=c(e)),e=n["extends"];e;)n=c(e),t.push(n),e=n["extends"];return t}function y(e,t){for(var n=!0;n;){var o=e,r=t;if(n=!1,l["default"].isArray(o))return o.map(function(e){return y(e)});if(l["default"].isObject(o))return o.types=h(o),o.name=v(o,r),g(o),C[o.name]=o,o;l["default"].isString(o)&&(e={template:o,name:r},t=void 0,n=!0)}}function h(e){return l["default"].isString(e.types)?[e.types]:l["default"].isDefined(e.types)?e.types:[]}function v(e,t){return e.name||t||e.types.join(" ")||j}function g(t){e.checkWrapper(t),t.template&&e.checkWrapperTemplate(t.template,t),t.overwriteOk?delete t.overwriteOk:O(t.name,C,t,"templateWrappers"),b(t)}function b(e){var t=!l["default"].isArray(e.types)||!e.types.every(l["default"].isString);if(t)throw T("Attempted to create a template wrapper with types that is not a string or an array of strings")}function O(e,t,n,o){t.hasOwnProperty(e)&&w("overwriting-types-or-wrappers",["Attempting to overwrite "+e+" on "+o+" which is currently",JSON.stringify(t[e])+" with "+JSON.stringify(n),'To supress this warning, specify the property "overwriteOk: true"'].join(" "))}function x(e){return C[e||j]}function E(e){var t=[];for(var n in C)C.hasOwnProperty(n)&&C[n].types&&-1!==C[n].types.indexOf(e)&&t.push(C[n]);return t}function $(e){var t=C[e];return delete C[e],t}function k(e){var t=E(e);return t?l["default"].isArray(t)?(t.forEach(function(e){return $(e.name)}),t):$(t.name):void 0}function w(){if(!_.disableWarnings&&console.warn){var e=Array.prototype.slice.call(arguments),n=e.shift();e.unshift("Formly Warning:"),e.push(""+t+n),console.warn.apply(console,r(e))}}var A=this,M={},C={},j="default",_=this,T=e.getFormlyError;l["default"].extend(this,{setType:o,getType:c,getTypeHeritage:m,setWrapper:y,getWrapper:x,getWrapperByType:E,removeWrapperByName:$,removeWrappersForType:k,disableWarnings:!1,extras:{disableNgModelAttrsManipulator:!1,ngModelAttrsManipulatorPreferUnbound:!1,removeChromeAutoComplete:!1,defaultHideDirective:"ng-if",getFieldId:null,explicitAsync:!1},templateManipulators:{preWrapper:[],postWrapper:[]},$get:function(){return A}})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=o(a),f=n(2),s=o(f);t["default"]=i,i.$inject=["formlyUsabilityProvider","formlyErrorAndWarningsUrlPrefix","formlyApiCheck"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(e,t,n){return arguments.length<3&&(n=t,t=e,e=null),new Error(r(e,t)+(" Field definition: "+a["default"].toJson(n)))}function o(e,t){return t||(t=e,e=null),new Error(r(e,t))}function r(e,n){var o="";return null!==e&&(o=""+t+e),"Formly Error: "+n+". "+o}function i(t){e["throw"](e.formlyWrapperType,t,{prefix:"formlyConfig.setWrapper",urlSuffix:"setwrapper-validation-failed"})}function l(e,t){var n="<formly-transclude></formly-transclude>";if(-1===e.indexOf(n))throw o('Template wrapper templates must use "'+n+'" somewhere in them. This one does not have "<formly-transclude></formly-transclude>" in it: '+e+"\nAdditional information: "+JSON.stringify(t));
}var f=this;a["default"].extend(this,{getFormlyError:o,getFieldError:n,checkWrapper:i,checkWrapperTemplate:l,getErrorMessage:r,$get:function(){return f}})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["formlyApiCheck","formlyErrorAndWarningsUrlPrefix"],e.exports=t["default"]},function(e,t){"use strict";function n(){function e(e,t,r,i,a){o.messages[e]=n(t,r,i,a)}function t(e,t){o.messages[e]=function(){return t}}function n(e,t,n,o){return function(r,i,a){return a.options.templateOptions[e]?t+" "+a.options.templateOptions[e]+" "+n:o}}var o={addTemplateOptionValueMessage:e,addStringMessage:t,messages:{}};return o}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){e&&e.get&&!function(){var t=e.get(0),n=t.createElement("div");n.innerHTML="<!--[if lt IE 9]><i></i><![endif]-->";var o=1===n.getElementsByTagName("i").length;if(o){var r=["formly-field","formly-form","formly-custom-validation","formly-focus","formly-transpose"];a["default"].forEach(r,function(e){t.createElement(e)})}}()}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["$document"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(e,n,r){function i(){(a["default"].isDefined(n.validators)||a["default"].isDefined(n.validation.messages))&&u(g,"formly-custom-validation","")}function l(){d(n.key)&&p(g,"ng-model","model."+n.key)}function c(){a["default"].isDefined(n.modelOptions)&&(u(g,"ng-model-options","options.modelOptions"),n.modelOptions.getterSetter&&p(g,"ng-model","options.value"))}function m(){if(n.templateOptions||n.expressionProperties){var e=n.templateOptions||{},o=n.expressionProperties||{},r=f();a["default"].extend(r,n.ngModelAttrs),a["default"].forEach(r,function(r,i){var l=void 0,f=void 0,p="options.templateOptions['"+i+"']",d=e[i],c=s(o,i),m=a["default"].isDefined(d),y=a["default"].isDefined(c);if(r.value)f=r.value,l=i;else if(r.statement&&m)if(f=r.statement,a["default"].isString(e[i]))l="$eval("+p+")";else{if(!a["default"].isFunction(e[i]))throw new Error("options.templateOptions."+i+" must be a string or function: "+JSON.stringify(n));l=p+"(model[options.key], options, this, $event)"}else r.bound&&y?(f=r.bound,l=p):(r.attribute||r["boolean"])&&y?(f=r.attribute||r["boolean"],l=""+t.startSymbol()+p+t.endSymbol()):r.attribute&&m?(f=r.attribute,l=d):r["boolean"]?m&&!y&&d&&(f=r["boolean"],l=!0):r.bound&&m&&(f=r.bound,l=p);a["default"].isDefined(f)&&a["default"].isDefined(l)&&u(g,f,l)})}}function y(){a["default"].forEach(n.ngModelElAttrs,function(e,t){p(g,t,e)})}var h=document.createElement("div"),v=n.extras&&n.extras.skipNgModelAttrsManipulator;if(v===!0)return e;h.innerHTML=e;var g=o(h,v);return g&&g.length?(u(g,"id",r.id),u(g,"name",r.name||r.id),i(),l(),c(),m(),y(),h.innerHTML):e}function o(e,t){var n=a["default"].isString(t)?":not("+t+")":"",o=":not([formly-skip-ng-model-attrs-manipulator])",i="[ng-model]"+n+o+", [data-ng-model]"+n+o;try{return e.querySelectorAll(i)}catch(l){return r(e,t)}}function r(e,t){var n=e.querySelectorAll("[ng-model], [data-ng-model]"),o=[];o.item=function(e){return this[e]};for(var r=0;r<n.length;r++){var l=n[r];l.hasAttribute("formly-skip-ng-model-attrs-manipulator")||a["default"].isString(t)&&i(l,t)||o.push(l)}return o}function i(e,t){var n=document.createElement("div");return n.innerHTML=e.outerHTML,n.querySelector(t)}function f(){var t={focus:{attribute:"formly-focus"}},n=[],o=["required","disabled"],r=["pattern","minlength"],i=["change","keydown","keyup","keypress","click","focus","blur"],l=["placeholder","min","max","tabindex","type"];return e.extras.ngModelAttrsManipulatorPreferUnbound?r.push("maxlength"):n.push("maxlength"),a["default"].forEach(n,function(e){t[e]={bound:"ng-"+e}}),a["default"].forEach(o,function(e){t[e]={"boolean":e,bound:"ng-"+e}}),a["default"].forEach(r,function(e){t[e]={attribute:e,bound:"ng-"+e}}),a["default"].forEach(i,function(e){var n="on"+e.substr(0,1).toUpperCase()+e.substr(1);t[n]={statement:"ng-"+e}}),a["default"].forEach(l,function(e){t[e]={attribute:e}}),t}function s(e,t){return e["templateOptions."+t]||e["templateOptions['"+t+"']"]||e['templateOptions["'+t+'"]']}function u(e,t,n){a["default"].forEach(e,function(e){e.getAttribute(t)||e.setAttribute(t,n)})}function p(e,t,n){a["default"].forEach(e,function(e){e.setAttribute(t,n)})}function d(e){return l.contains(e,".")||l.contains(e,"[")&&l.contains(e,"]")}e.extras.disableNgModelAttrsManipulator||e.templateManipulators.preWrapper.push(n)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i),l=n(2);t["default"]=r,r.$inject=["formlyConfig","$interpolate"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(){return a["default"]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=o(i);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t,o){return function(){if(!e.disableWarnings){var r=Array.prototype.slice.call(arguments),i=r.shift();r.unshift("Formly Warning:"),r.push(""+t+i),o.warn.apply(o,n(r))}}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,o.$inject=["formlyConfig","formlyErrorAndWarningsUrlPrefix","$log"],e.exports=t["default"]},function(e,n){e.exports=t}])});
//! angular-formly version 7.1.0 built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò)
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("api-check"),require("angular")):"function"==typeof define&&define.amd?define(["api-check","angular"],t):"object"==typeof exports?exports.ngFormly=t(require("api-check"),require("angular")):e.ngFormly=t(e.apiCheck,e.angular)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=o(r);t["default"]=i["default"],e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(18);o.version||(o=window.angular),t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n,o,r){return y["default"].isFunction(t)?t(o,n,e,r):e.$eval(t,y["default"].extend({$viewValue:o,$modelValue:n},r))}function i(e,t,n){if(t.id)return t.id;var o=t.type;return!o&&t.template?o="template":!o&&t.templateUrl&&(o="templateUrl"),[e,o,t.key,n].join("_")}function a(e){return y["default"].forEach(arguments,function(t,n){n&&y["default"].forEach(t,function(t,n){y["default"].isDefined(e[n])?l(e[n],t)&&a(e[n],t):e[n]=y["default"].copy(t)})}),e}function l(e,t){return y["default"].isObject(e)&&y["default"].isObject(t)&&Object.getPrototypeOf(e)===Object.getPrototypeOf(t)}function f(e,t){if(e.prop||(e=y["default"].element(e)),e.prop("nodeName")===t.toUpperCase())return e;for(var n=e.children(),o=0;n&&o<n.length;o++){var r=f(n[o],t);if(r)return r}}function s(e){return e&&!y["default"].isArray(e)?e=[e]:e||(e=[]),e}function u(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(){var e=arguments;t.forEach(function(t){return t.apply(null,e)})}}function p(e,t,n){return n&&(e=e[n],t=t[n]),t&&e?(y["default"].forEach(t,function(t){-1===e.indexOf(t)&&e.push(t)}),e):t?t:e}function d(e,t){return y["default"].isString(e)&&y["default"].isString(t)?e.length>=t.length&&e.substring(0,t.length)===t:!1}function c(e,t){return y["default"].isString(e)&&y["default"].isString(t)?e.length>=t.length&&-1!==e.indexOf(t):!1}Object.defineProperty(t,"__esModule",{value:!0});var m=n(1),y=o(m);t["default"]={formlyEval:r,getFieldId:i,reverseDeepMerge:a,findByNodeName:f,arrayify:s,extendFunction:u,extendArray:p,startsWith:d,contains:c},e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]="https://github.com/formly-js/angular-formly/blob/7.1.0/other/ERRORS_AND_WARNINGS.md#",e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{restrict:"A",require:"ngModel",link:function(t,n,o,r){function i(e,t,n){l(t,n),t=a["default"].isObject(t)?t.expression:t,p?f(t,n,e):s(t,n,e)}function l(n,o){var i=n.message;i&&(u.validation.messages[o]=function(){return e.formlyEval(t,i,r.$modelValue,r.$viewValue)})}function f(n,o,i){var a=i?"$asyncValidators":"$validators";r[a][o]=function(o,r){return e.formlyEval(t,n,o,r)}}function s(n,o,i){var a=void 0;r.$parsers.unshift(function(l){var f=e.formlyEval(t,n,r.$modelValue,l);return i?(r.$pending=r.$pending||{},r.$pending[o]=!0,a=f,f.then(function(){a===f&&r.$setValidity(o,!0)})["catch"](function(){a===f&&r.$setValidity(o,!1)})["finally"](function(){var e=r.$pending||{};1===Object.keys(e).length?delete r.$pending:delete r.$pending[o]})):r.$setValidity(o,f),l})}var u=t.options;u.validation.messages=u.validation.messages||{},a["default"].forEach(u.validation.messages,function(n,o){u.validation.messages[o]=function(){return e.formlyEval(t,n,r.$modelValue,r.$viewValue)}});var p=r.hasOwnProperty("$validators")&&!o.hasOwnProperty("useParsers");a["default"].forEach(u.validators,i.bind(null,!1)),a["default"].forEach(u.asyncValidators,i.bind(null,!0))}}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["formlyUtil"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,o,i,f,u,d,c,m){function y(e,n,o,r,i){function a(){n(function(){var n=e.options,r=l();s["default"].forEach(n.expressionProperties,function(i,a){var l=o(a).assign,f=t.when(d.formlyEval(e,i,r,r));f.then(function(e){l(n,e)})})},0,!1)}function l(t){return e.model&&e.options.key?(s["default"].isDefined(t)&&(e.model[e.options.key]=t),e.model[e.options.key]):void 0}function u(t){d.reverseDeepMerge(t,{originalModel:t.model,extras:{},data:{},templateOptions:{},validation:{}}),e.to=e.options.templateOptions,e.formOptions=e.formOptions||{}}function p(){if(s["default"].isFunction(f.extras.getFieldId))e.id=f.extras.getFieldId(e.options,e.model,e);else{var t=e.form&&e.form.$name||e.formId;e.id=d.getFieldId(t,e.options,e.index)}e.options.id=e.id,e.name=e.options.name||e.options.id,e.options.name=e.name}function c(){s["default"].isDefined(e.options.defaultValue)&&!s["default"].isDefined(e.model[e.options.key])&&(e.model[e.options.key]=e.options.defaultValue)}function m(){e.options.initialValue=e.model&&e.model[e.options.key]}function y(e,t){t&&h(e,t.defaultOptions);var n=j(e.optionsTypes).reverse();s["default"].forEach(n,function(t){h(e,f.getType(t,!0,e).defaultOptions)})}function h(t,n){n&&(s["default"].isFunction(n)&&(n=n(t,e)),d.reverseDeepMerge(t,n))}function v(e,t){var n=e.key||t||0;s["default"].extend(e,{key:n,value:e.value||l,runExpressions:a,resetModel:b,updateInitialValue:x})}function b(){e.model[e.options.key]=e.options.initialValue,e.options.formControl&&(s["default"].isArray(e.options.formControl)?s["default"].forEach(e.options.formControl,function(e){O(e,!0)}):O(e.options.formControl))}function O(t,n){n||t.$setViewValue(e.model[e.options.key]),t.$render(),t.$setUntouched&&t.$setUntouched(),t.$setPristine(),e.$root.$$phase||e.$digest()}function x(){e.options.initialValue=e.model[e.options.key]}function E(e){e.validation.messages=e.validation.messages||{},s["default"].forEach(i.messages,function(t,n){e.validation.messages[n]||(e.validation.messages[n]=function(e,n,o){return d.formlyEval(o,t,n,e)})})}function A(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s["default"].forEach([n.controller,t.controller],function(t){t&&r(t,{$scope:e})})}function $(){e.options.options=e.options.options||{},e.options.options.formState=e.formState}if(e.options.fieldGroup)return void $();var w=g(e.options);u(e.options),y(e.options,w),v(e.options,e.index),k(e.options),p(),c(),m(),a(),E(e.options),A(e,e.options,w)}function h(e,o,u,p){function c(){w(e.options),o.addClass("formly-field-group");var t="";e.options.elementAttributes&&(t=Object.keys(e.options.elementAttributes).map(function(t){return t+'="'+e.options.elementAttributes[t]+'"'}).join(" "));var n="model";e.options.form=e.form,e.options.key&&(n="model['"+e.options.key+"']"),x('\n <formly-form model="'+n+'"\n fields="options.fieldGroup"\n options="options.options"\n form="options.form"\n class="'+e.options.className+'"\n '+t+"\n is-field-group>\n </formly-form>\n ")}function y(){e.options.elementAttributes&&o.attr(e.options.elementAttributes)}function h(){e.options.className&&o.addClass(e.options.className),e.options.type&&o.addClass("formly-field-"+e.options.type)}function x(t){return o.html(v(t)),n(o.contents())(e),t}function A(t){function n(t){var n=/\{\{(.*?)}}/,r=n.exec(t);r&&(t=i(t)(e)),o(t)}function o(t){e.$watch('form["'+t+'"]',function(t){t&&(_>1?(e.options.formControl||(e.options.formControl=[]),e.options.formControl.push(t)):e.options.formControl=t,e.fc=e.options.formControl,y(),u(),p(),c())})}function u(){y=e.$watch(function(){var t=f.extras.errorExistsAndShouldBeVisibleExpression,n=e.options,o=e.fc;if(o.$invalid){if("boolean"==typeof n.validation.show)return n.validation.show;if(t)return d.formlyEval(e,t,o.$modelValue,o.$viewValue);var r=s["default"].isUndefined(o.$touched)&&o.$dirty;return e.fc.$touched||r}return!1},function(t){e.options.validation.errorExistsAndShouldBeVisible=t,e.showError=t})}function p(){m("parsers")}function c(){m("formatters");var t=e.fc,n=e.form.$pristine;e.options.formatters&&!function(){var o=t.$modelValue;t.$formatters.forEach(function(e){o=e(o)}),t.$setViewValue(o),t.$render(),t.$setPristine(),n&&e.form.$setPristine()}()}function m(t){function n(r){if(!r)return[];s["default"].isString(r)&&(r=f.getType(r,!0,e.options));var i=[];return r["extends"]&&(i=d.extendArray(i,n(r["extends"]))),i=d.extendArray(i,l(r,t,[])),i=d.extendArray(i,o(a(r)))}function o(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=[];return s["default"].forEach(s["default"].copy(j(e)).reverse(),function(e){t=d.extendArray(t,n(e))}),t}function i(t){function n(n){var o=e.options.value();return d.formlyEval(e,t,o,n)}return n[u]=t,n}var u="originalParser";"formatters"===t&&(u="originalFormatter");var p=n(M);p=d.extendArray(p,o(e.options.optionsTypes)),p=d.extendArray(p,e.options[t]),s["default"].forEach(p,function(e,t){p[t]=i(e)});var c=e.fc;s["default"].isArray(c)||(c=[c]),s["default"].forEach(c,function(e){var n;e["$"+t]=(n=e["$"+t]).concat.apply(n,r(p))})}var y=s["default"].noop;if(!e.options.noFormControl){var h=s["default"].element("<div>"+t+"</div>"),v=h[0].querySelectorAll("[ng-model],[data-ng-model]");v.length&&s["default"].forEach(v,function(e){_++,n(e.getAttribute("name"))})}}function $(){M&&M.link&&M.link.apply(T,C),e.options.link&&e.options.link.apply(T,C)}function k(n){return function(o){var r=t.when(o);return s["default"].forEach(n,function(n){r=r.then(function(o){return t.when(n(o,e.options,e)).then(function(e){return s["default"].isString(e)?e:v(e)})})}),r}}if(e.options.fieldGroup)return void c();!p&&e.options.model&&e.$watch("options.model",function(){return e.options.runExpressions()},!0),y(),h();var M=g(e.options),C=arguments,T=this,_=0,F=b(e.options,e.formOptions);O(e.options).then(k(F.preWrapper)).then(E(e.options,e.formOptions)).then(k(F.postWrapper)).then(x).then(A).then($)["catch"](function(t){m("there-was-a-problem-setting-the-template-for-this-field","There was a problem setting the template for this field ",e.options,t)})}function v(e){var t=s["default"].element("<a></a>");return t.append(e).html()}function g(e){return e.type&&f.getType(e.type)}function b(e,t){function n(e){var t=e||{},n=t.preWrapper,i=void 0===n?[]:n,a=t.postWrapper,l=void 0===a?[]:a;o=o.concat(i),r=r.concat(l)}var o=[],r=[];return n(e.templateManipulators),n(t.templateManipulators),n(f.templateManipulators),{preWrapper:o,postWrapper:r}}function O(e){function t(t,n){return s["default"].isDefined(e[t])?e[t]:n&&s["default"].isDefined(n[t])?n[t]:void 0}var n=f.getType(e.type,!0,e),o=t("template",n),r=t("templateUrl",n);if(s["default"].isUndefined(o)&&!r)throw c.getFieldError("type-type-has-no-template","Type '"+e.type+"' has no template. On element:",e);return x(r||o,s["default"].isUndefined(o),e)}function x(n,r,i){var a=void 0;if(a=s["default"].isFunction(n)?t.when(n(i)):t.when(n),!r)return a;var l=function(){var t={cache:o};return{v:a.then(function(n){return e.get(n,t)}).then(function(e){return e.data})["catch"](function(e){m("problem-loading-template-for-templateurl","Problem loading template for "+n,e)})}}();return"object"==typeof l?l.v:void 0}function E(e,n){var o=$(e,n);return function(n){if(!o.length)return t.when(n);o.forEach(function(t){c.checkWrapper(t,e),M(t,e)});var r=o.map(function(e){return x(e.template||e.templateUrl,!e.template)});return t.all(r).then(function(e){e.forEach(function(e,t){c.checkWrapperTemplate(e,o[t])}),e.reverse();var t=e.shift();return e.forEach(function(e){t=A(t,e)}),A(t,n)})}}function A(e,t){var n=s["default"].element("<a></a>");n.append(e);var o=n.find("formly-transclude");return o.length||(o=d.findByNodeName(n,"formly-transclude")),o.replaceWith(t),n.html()}function $(e,t){var n=e.wrapper;if(null===n)return[];n=n?j(n).map(f.getWrapper):j(f.getWrapperByType(e.type));var o=f.getType(e.type,!0,e);if(o&&o.wrapper){var r=j(o.wrapper).map(f.getWrapper);n=n.concat(r)}if(t.wrapper){var i=j(t.wrapper).map(f.getWrapper);n=n.concat(i)}var a=f.getWrapper();return a&&n.push(a),n}function k(e){u["throw"](u.formlyFieldOptions,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"});var t=e.type&&f.getType(e.type);t&&M(t,e,!0),e.expressionProperties&&e.expressionProperties.hide&&m("dont-use-expressionproperties.hide-use-hideexpression-instead","You have specified `hide` in `expressionProperties`. Use `hideExpression` instead",e)}function w(e){u["throw"](u.fieldGroup,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"})}function M(e,t,n){var o=e.apiCheck,r=e.apiCheckInstance,i=e.apiCheckFunction,a=e.apiCheckOptions;C(o,r,i,a,t),n&&t.type&&s["default"].forEach(f.getTypeHeritage(t.type),function(e){C(e.apiCheck,e.apiCheckInstance,e.apiCheckFunction,e.apiCheckOptions,t)})}function C(e,t,n,o,r){if(e){var i=t||f.extras.apiCheckInstance||u;if(!i.config.disabled&&!p["default"].globalConfig.disabled){var a=n||"warn",l=e(i);s["default"].forEach(l,function(e,t){var n=i.shape(e),l=s["default"].extend({prefix:"formly-field type "+r.type+" for property "+t,url:u.config.output.docsBaseUrl+"formly-field-type-apicheck-failed"},o);i[a](n,r[t],l)})}}}var j=d.arrayify;return y.$inject=["$scope","$timeout","$parse","$controller","formlyValidationMessages"],{restrict:"AE",transclude:!0,require:"?^formlyForm",scope:{options:"=",model:"=",originalModel:"=?",formId:"@",index:"=?",fields:"=?",formState:"=?",formOptions:"=?",form:"=?"},controller:y,link:h}}function a(e){return l(e,"optionsTypes",[])}function l(e,t,n){return e.defaultOptions&&e.defaultOptions[t]||n}Object.defineProperty(t,"__esModule",{value:!0});var f=n(1),s=o(f),u=n(4),p=o(u);t["default"]=i,i.$inject=["$http","$q","$compile","$templateCache","$interpolate","formlyConfig","formlyApiCheck","formlyUtil","formlyUsability","formlyWarn"],e.exports=t["default"]},function(e,t){"use strict";function n(e,t){return{restrict:"A",link:function(n,o,r){var i=null,a=o[0],l=t[0];r.$observe("formlyFocus",function(t){"true"===t?e(function(){i=l.activeElement,a.focus()},~~r.focusWait):"false"===t&&l.activeElement===a&&(a.blur(),r.hasOwnProperty("refocus")&&i&&i.focus())})}}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,n.$inject=["$timeout","$document"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n,o,i){function l(t,n){function r(){return n.rootEl||"ng-form"}function a(){return n.fieldRootEl||"div"}function l(){return n.hideDirective||o.extras.defaultHideDirective||"ng-if"}function s(){return n.trackBy?"track by "+n.trackBy:""}function u(){var t=v,o=n.bindName;if(o){if(f["default"].version.minor<3)throw e.getFormlyError("bind-name attribute on formly-form not allowed in < angular 1.3");t=i.startSymbol()+"::'formly_' + "+o+i.endSymbol()}return t}function d(){return n.transcludeClass||""}function m(e){var t=["model","form","fields","options","name","role","class","data-model","data-form","data-fields","data-options","data-name"],n=[];return f["default"].forEach(e,function(e){var o=e.nodeName,r=e.value;"undefined"!==o&&-1===t.indexOf(o)&&n.push(p(o)+'="'+r+'"')}),n.join(" ")}var y=r(),h=a(),v="formly_"+c++,g="";return n.hasOwnProperty("isFieldGroup")&&t.parent().parent().hasClass("formly")&&(g=m(t.parent().parent()[0].attributes)),"\n <"+y+' class="formly"\n name="'+u()+'"\n role="form" '+g+">\n <"+h+' formly-field\n ng-repeat="field in fields '+s()+'"\n '+l()+'="!field.hide"\n class="formly-field"\n options="field"\n model="field.model || model"\n original-model="model"\n fields="fields"\n form="theFormlyForm"\n form-id="'+u()+'"\n form-state="options.formState"\n form-options="options"\n index="$index">\n </'+h+'>\n <div ng-transclude class="'+d()+'"></div>\n </'+y+">\n "}function s(n,i,l){function s(){f["default"].forEach(n.fields,function(e,t){var o=e.model||n.model;if(e.runExpressions&&e.runExpressions(),e.hideExpression){var r=o[e.key];e.hide=$(e.hideExpression,r,e,t)}e.extras&&e.extras.validateOnModelChange&&e.formControl&&e.formControl.$validate()})}function u(){n.fields=n.fields||[],p(n.options);var t=n.options.fieldTransform||o.extras.fieldTransform;f["default"].isArray(t)||(t=[t]),f["default"].forEach(t,function(t){if(t&&(n.fields=t(n.fields,n.model,n.options,n.form),!n.fields))throw e.getFormlyError("fieldTransform must return an array of fields")}),h(),f["default"].forEach(n.fields,b),f["default"].forEach(n.fields,O)}function p(e){o.extras.fieldTransform&&f["default"].isFunction(o.extras.fieldTransform)?t("fieldtransform-as-a-function-deprecated","fieldTransform as a function has been deprecated.","Attempted for formlyConfig.extras: "+o.extras.fieldTransform.name,o.extras):e.fieldTransform&&f["default"].isFunction(e.fieldTransform)&&t("fieldtransform-as-a-function-deprecated","fieldTransform as a function has been deprecated.","Attempted for form",e)}function c(){i["throw"]([i.formOptionsApi.optional],[n.options],{prefix:"formly-form options check"}),n.options=n.options||{},n.options.formState=n.options.formState||{},f["default"].extend(n.options,{updateInitialValue:m,resetModel:y})}function m(){f["default"].forEach(n.fields,function(e){d(e)&&e.options?e.options.updateInitialValue():e.updateInitialValue()})}function y(){f["default"].forEach(n.fields,function(e){d(e)&&e.options?e.options.resetModel():e.resetModel&&e.resetModel()})}function h(){var e=[n.model];n.options.formState&&e.push(n.options.formState),f["default"].forEach(n.fields,function(t){var o=v(t);t.model&&o&&-1===e.indexOf(t.model)&&(n.$watch(function(){return t.model},s,!0),e.push(t.model))})}function v(t){var o=!0;if(f["default"].isString(t.model)){var r=t.model,i=n.fields.indexOf(t);if(o=!g(r),t.model=$(r,void 0,t,i),!t.model)throw e.getFieldError("field-model-must-be-initialized","Field model must be initialized. When specifying a model as a string for a field, the result of the expression must have been initialized ahead of time.",t)}return o}function g(e){return["model","formState"].some(function(t){return l.startsWith(e,t+".")||l.startsWith(e,t+"[")})}function b(e,t){d(e)||(e.key=e.key||t||0)}function O(t,o){if(!d(t)&&f["default"].isDefined(t.watcher)){var r=t.watcher;f["default"].isArray(r)||(r=[r]),f["default"].forEach(r,function(r){if(!f["default"].isDefined(r.listener))throw e.getFieldError("all-field-watchers-must-have-a-listener","All field watchers must have a listener",t);var i=x(r,t,o),a=E(r,t,o),l=r.type||"$watch";r.stopWatching=n[l](i,a,r.watchDeep)})}}function x(e,t,n){var o=e.expression||"model['"+t.key+"']";return f["default"].isFunction(o)&&!function(){var i=o;o=function(){var t=A.apply(void 0,[e,n].concat(a.call(arguments)));return i.apply(void 0,r(t))},o.displayName="Formly Watch Expression for field for "+t.key}(),o}function E(e,t,n){var o=e.listener;return f["default"].isFunction(o)&&!function(){var i=o;o=function(){var t=A.apply(void 0,[e,n].concat(a.call(arguments)));return i.apply(void 0,r(t))},o.displayName="Formly Watch Listener for field for "+t.key}(),o}function A(e,t){for(var o=arguments.length,r=Array(o>2?o-2:0),i=2;o>i;i++)r[i-2]=arguments[i];return[n.fields[t]].concat(r,[e.stopWatching])}function $(e,t,o,r){var i=k(o,r);return l.formlyEval(n,e,t,t,i)}function k(e,t){return{options:e,index:t,formState:n.options.formState,formId:n.formId}}c(),n.model=n.model||{},u(),n.$watch("model",s,!0),n.options.formState&&n.$watch("options.formState",s,!0)}function u(e,r,i){function a(){var a=i.name;if(e.formId=a,e.theFormlyForm=e[a],i.form){var l=n(i.form),f=l.assign,s=l(e.$parent);s?(e.theFormlyForm=s,e[a]&&e.theFormlyForm.$removeControl(e[a]),r.removeData("$formController")):f(e.$parent,e[a])}e.theFormlyForm||o.disableWarnings||t("formly-form-has-no-formcontroller","Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work",r,e)}function l(){var t=o.extras.removeChromeAutoComplete===!0,n=e.options&&e.options.removeChromeAutoComplete===!1,i=e.options&&e.options.removeChromeAutoComplete===!0;if(t&&!n||i){var a=document.createElement("input");a.setAttribute("autocomplete","address-level4"),a.setAttribute("hidden","true"),r[0].appendChild(a)}}a(),l()}function p(e){return e?e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):""}function d(e){return e&&!!e.fieldGroup}var c=1;return s.$inject=["$scope","formlyApiCheck","formlyUtil"],{restrict:"AE",template:l,replace:!0,transclude:!0,scope:{fields:"=",model:"=",form:"=?",options:"=?"},controller:s,link:u}}Object.defineProperty(t,"__esModule",{value:!0});var a=Array.prototype.slice,l=n(1),f=o(l);t["default"]=i,i.$inject=["formlyUsability","formlyWarn","$parse","formlyConfig","$interpolate"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=o(r),a=n(10),l=o(a),f=n(3),s=o(f),u=n(12),p=o(u),d=n(11),c=o(d),m=n(13),y=o(m),h=n(16),v=o(h),g=n(17),b=o(g),O=n(5),x=o(O),E=n(6),A=o(E),$=n(7),k=o($),w=n(8),M=o(w),C=n(15),j=o(C),T=n(14),_=o(T),F="formly";t["default"]=F;var W=i["default"].module(F,[]);W.constant("formlyApiCheck",l["default"]),W.constant("formlyErrorAndWarningsUrlPrefix",s["default"]),W.constant("formlyVersion","7.1.0"),W.provider("formlyUsability",p["default"]),W.provider("formlyConfig",c["default"]),W.factory("formlyValidationMessages",y["default"]),W.factory("formlyUtil",v["default"]),W.factory("formlyWarn",b["default"]),W.directive("formlyCustomValidation",x["default"]),W.directive("formlyField",A["default"]),W.directive("formlyFocus",k["default"]),W.directive("formlyForm",M["default"]),W.run(j["default"]),W.run(_["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(n,r,i,a){var l=a&&a.hasOwnProperty(r),f=e.some(function(e){return a&&a.hasOwnProperty(e)});return f||l?l?t(n,r,i,a):void 0:s.utils.getError(r,i,o)}a["default"].isArray(e)||(e=[e]);var o="specified if these are not specified: `"+e.join(", ")+"` (otherwise it's optional)";return n.type=o,s.utils.checkerHelpers.setupChecker(n)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i),l=n(4),f=o(l),s=f["default"]({output:{prefix:"angular-formly:",docsBaseUrl:n(3)}}),u=s.oneOfType([s.string,s.func]),p=s.typeOrArrayOf(s.string).nullable,d=s.func,c=s.shape.onlyIf("apiCheck",s.func.withProperties({warn:s.func,"throw":s.func,shape:s.func})),m=s.shape.onlyIf("apiCheck",s.oneOf(["throw","warn"])),y=s.shape({name:r("types",s.string).optional,template:s.shape.ifNot("templateUrl",s.string).optional,templateUrl:s.shape.ifNot("template",s.string).optional,types:s.typeOrArrayOf(s.string).optional,overwriteOk:s.bool.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional}).strict,h=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),v=s.oneOfType([s.string,s.object]),g=s.shape({preWrapper:s.arrayOf(s.func).nullable.optional,postWrapper:s.arrayOf(s.func).nullable.optional}).strict.nullable,b=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),O={$$hashKey:s.any.optional,type:s.shape.ifNot(["template","templateUrl"],s.string).optional,template:s.shape.ifNot(["type","templateUrl"],s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot(["type","template"],s.oneOfType([s.string,s.func])).optional,key:s.oneOfType([s.string,s.number]).optional,model:v.optional,originalModel:v.optional,className:s.string.optional,id:s.string.optional,name:s.string.optional,expressionProperties:h.optional,extras:s.shape({validateOnModelChange:s.bool.optional,skipNgModelAttrsManipulator:s.oneOfType([s.string,s.bool]).optional}).strict.optional,data:s.object.optional,templateOptions:s.object.optional,wrapper:p.optional,modelOptions:s.shape({updateOn:s.string.optional,debounce:s.oneOfType([s.objectOf(s.number),s.number]).optional,allowInvalid:s.bool.optional,getterSetter:s.bool.optional,timezone:s.string.optional}).optional,watcher:s.typeOrArrayOf(s.shape({expression:u.optional,listener:u})).optional,validators:b.optional,asyncValidators:b.optional,parsers:s.arrayOf(u).optional,formatters:s.arrayOf(u).optional,noFormControl:s.bool.optional,hide:s.bool.optional,hideExpression:u.optional,ngModelElAttrs:s.objectOf(s.string).optional,ngModelAttrs:s.objectOf(s.shape({statement:s.shape.ifNot(["value","attribute","bound","boolean"],s.any).optional,value:s.shape.ifNot("statement",s.any).optional,attribute:s.shape.ifNot("statement",s.any).optional,bound:s.shape.ifNot("statement",s.any).optional,"boolean":s.shape.ifNot("statement",s.any).optional}).strict).optional,elementAttributes:s.objectOf(s.string).optional,optionsTypes:s.typeOrArrayOf(s.string).optional,link:s.func.optional,controller:s.oneOfType([s.string,s.func,s.array]).optional,validation:s.shape({show:s.bool.nullable.optional,messages:s.objectOf(u).optional,errorExistsAndShouldBeVisible:s.bool.optional}).optional,formControl:s.typeOrArrayOf(s.object).optional,value:s.func.optional,runExpressions:s.func.optional,templateManipulators:g.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,initialValue:s.any.optional,defaultValue:s.any.optional},x=s.shape(O).strict,E=s.shape({formState:s.object.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,removeChromeAutoComplete:s.bool.optional,templateManipulators:g.optional,wrapper:p.optional,fieldTransform:s.oneOfType([s.func,s.array]).optional,data:s.object.optional}).strict,A=s.shape({$$hashKey:s.any.optional,key:s.oneOfType([s.string,s.number]).optional,fieldGroup:s.arrayOf(s.oneOfType([x,s.object])),className:s.string.optional,options:E.optional,hide:s.bool.optional,hideExpression:u.optional,data:s.object.optional,model:v.optional,form:s.object.optional,elementAttributes:s.objectOf(s.string).optional}).strict,$=a["default"].copy(O);$.key=s.string.optional;var k=s.shape({name:s.string,template:s.shape.ifNot("templateUrl",s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot("template",s.oneOfType([s.string,s.func])).optional,controller:s.oneOfType([s.func,s.string,s.array]).optional,link:s.func.optional,defaultOptions:s.oneOfType([s.func,s.shape($)]).optional,"extends":s.string.optional,wrapper:p.optional,data:s.object.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional,overwriteOk:s.bool.optional}).strict;a["default"].extend(s,{formlyTypeOptions:k,formlyFieldOptions:x,formlyExpression:u,formlyWrapperType:y,fieldGroup:A,formOptionsApi:E}),t["default"]=s,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t,n){function o(e){if(!l["default"].isArray(e)){if(l["default"].isObject(e))return i(e),e["extends"]&&a(e),M[e.name]=e,M[e.name];throw _("You must provide an object or array for setType. You provided: "+JSON.stringify(arguments))}var t=function(){var t=[];return l["default"].forEach(e,function(e){t.push(o(e))}),{v:t}}();return"object"==typeof t?t.v:void 0}function i(e){n["throw"](n.formlyTypeOptions,e,{prefix:"formlyConfig.setType",url:"settype-validation-failed"}),e.overwriteOk?e.overwriteOk=void 0:O(e.name,M,e,"types")}function a(e){var t=c(e["extends"],!0,e);u(e,t),p(e,t),d(e,t),s["default"].reverseDeepMerge(e,t),f(e,t)}function f(e,t){e.template&&t.templateUrl?delete e.templateUrl:e.templateUrl&&t.template&&delete e.template}function u(e,t){var n=t.controller;if(l["default"].isDefined(n)){var o=e.controller;l["default"].isDefined(o)?(e.controller=function(e,t){t(n,{$scope:e}),t(o,{$scope:e})},e.controller.$inject=["$scope","$controller"]):e.controller=n}}function p(e,t){var n=t.link;if(l["default"].isDefined(n)){var o=e.link;l["default"].isDefined(o)?e.link=function(){n.apply(void 0,arguments),o.apply(void 0,arguments)}:e.link=n}}function d(e,t){var n=t.defaultOptions;if(l["default"].isDefined(n)){var o=e.defaultOptions,r=l["default"].isFunction(o),i=l["default"].isFunction(n);i?e.defaultOptions=function(e,t){var i=n(e,t),a={};s["default"].reverseDeepMerge(a,e,i);var l=o;return r&&(l=l(a,t)),s["default"].reverseDeepMerge(i,l),i}:r&&(e.defaultOptions=function(e,t){var r={};return s["default"].reverseDeepMerge(r,e,n),o(r,t)})}}function c(e,t,n){if(!e)return void 0;var o=M[e];if(o||t!==!0)return o;throw _('There is no type by the name of "'+e+'": '+JSON.stringify(n))}function m(e){var t=[],n=e;for(l["default"].isString(n)&&(n=c(e)),e=n["extends"];e;)n=c(e),t.push(n),e=n["extends"];return t}function y(e,t){for(var n=!0;n;){var o=e,r=t;if(n=!1,l["default"].isArray(o))return o.map(function(e){return y(e)});if(l["default"].isObject(o))return o.types=h(o),o.name=v(o,r),g(o),C[o.name]=o,o;l["default"].isString(o)&&(e={template:o,name:r},t=void 0,n=!0)}}function h(e){return l["default"].isString(e.types)?[e.types]:l["default"].isDefined(e.types)?e.types:[]}function v(e,t){return e.name||t||e.types.join(" ")||j}function g(t){e.checkWrapper(t),t.template&&e.checkWrapperTemplate(t.template,t),t.overwriteOk?delete t.overwriteOk:O(t.name,C,t,"templateWrappers"),b(t)}function b(e){var t=!l["default"].isArray(e.types)||!e.types.every(l["default"].isString);if(t)throw _("Attempted to create a template wrapper with types that is not a string or an array of strings")}function O(e,t,n,o){t.hasOwnProperty(e)&&k("overwriting-types-or-wrappers",["Attempting to overwrite "+e+" on "+o+" which is currently",JSON.stringify(t[e])+" with "+JSON.stringify(n),'To supress this warning, specify the property "overwriteOk: true"'].join(" "))}function x(e){return C[e||j]}function E(e){var t=[];for(var n in C)C.hasOwnProperty(n)&&C[n].types&&-1!==C[n].types.indexOf(e)&&t.push(C[n]);return t}function A(e){var t=C[e];return delete C[e],t}function $(e){var t=E(e);return t?l["default"].isArray(t)?(t.forEach(function(e){return A(e.name)}),t):A(t.name):void 0}function k(){if(!T.disableWarnings&&console.warn){var e=Array.prototype.slice.call(arguments),n=e.shift();e.unshift("Formly Warning:"),e.push(""+t+n),console.warn.apply(console,r(e))}}var w=this,M={},C={},j="default",T=this,_=e.getFormlyError;l["default"].extend(this,{setType:o,getType:c,getTypeHeritage:m,setWrapper:y,getWrapper:x,getWrapperByType:E,removeWrapperByName:A,removeWrappersForType:$,disableWarnings:!1,extras:{disableNgModelAttrsManipulator:!1,ngModelAttrsManipulatorPreferUnbound:!1,removeChromeAutoComplete:!1,defaultHideDirective:"ng-if",getFieldId:null,explicitAsync:!1},templateManipulators:{preWrapper:[],postWrapper:[]},$get:function(){return w}})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=o(a),f=n(2),s=o(f);t["default"]=i,i.$inject=["formlyUsabilityProvider","formlyErrorAndWarningsUrlPrefix","formlyApiCheck"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){
function n(e,t,n){return arguments.length<3&&(n=t,t=e,e=null),new Error(r(e,t)+(" Field definition: "+a["default"].toJson(n)))}function o(e,t){return t||(t=e,e=null),new Error(r(e,t))}function r(e,n){var o="";return null!==e&&(o=""+t+e),"Formly Error: "+n+". "+o}function i(t){e["throw"](e.formlyWrapperType,t,{prefix:"formlyConfig.setWrapper",urlSuffix:"setwrapper-validation-failed"})}function l(e,t){var n="<formly-transclude></formly-transclude>";if(-1===e.indexOf(n))throw o('Template wrapper templates must use "'+n+'" somewhere in them. This one does not have "<formly-transclude></formly-transclude>" in it: '+e+"\nAdditional information: "+JSON.stringify(t))}var f=this;a["default"].extend(this,{getFormlyError:o,getFieldError:n,checkWrapper:i,checkWrapperTemplate:l,getErrorMessage:r,$get:function(){return f}})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["formlyApiCheck","formlyErrorAndWarningsUrlPrefix"],e.exports=t["default"]},function(e,t){"use strict";function n(){function e(e,t,r,i,a){o.messages[e]=n(t,r,i,a)}function t(e,t){o.messages[e]=function(){return t}}function n(e,t,n,o){return function(r,i,a){return a.options.templateOptions[e]?t+" "+a.options.templateOptions[e]+" "+n:o}}var o={addTemplateOptionValueMessage:e,addStringMessage:t,messages:{}};return o}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){e&&e.get&&!function(){var t=e.get(0),n=t.createElement("div");n.innerHTML="<!--[if lt IE 9]><i></i><![endif]-->";var o=1===n.getElementsByTagName("i").length;if(o){var r=["formly-field","formly-form","formly-custom-validation","formly-focus","formly-transpose"];a["default"].forEach(r,function(e){t.createElement(e)})}}()}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["$document"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(e,n,r){function i(){(a["default"].isDefined(n.validators)||a["default"].isDefined(n.validation.messages))&&u(g,"formly-custom-validation","")}function l(){d(n.key)&&p(g,"ng-model","model."+n.key)}function c(){a["default"].isDefined(n.modelOptions)&&(u(g,"ng-model-options","options.modelOptions"),n.modelOptions.getterSetter&&p(g,"ng-model","options.value"))}function m(){if(n.templateOptions||n.expressionProperties){var e=n.templateOptions||{},o=n.expressionProperties||{},r=f();a["default"].extend(r,n.ngModelAttrs),a["default"].forEach(r,function(r,i){var l=void 0,f=void 0,p="options.templateOptions['"+i+"']",d=e[i],c=s(o,i),m=a["default"].isDefined(d),y=a["default"].isDefined(c);if(r.value)f=r.value,l=i;else if(r.statement&&m)if(f=r.statement,a["default"].isString(e[i]))l="$eval("+p+")";else{if(!a["default"].isFunction(e[i]))throw new Error("options.templateOptions."+i+" must be a string or function: "+JSON.stringify(n));l=p+"(model[options.key], options, this, $event)"}else r.bound&&y?(f=r.bound,l=p):(r.attribute||r["boolean"])&&y?(f=r.attribute||r["boolean"],l=""+t.startSymbol()+p+t.endSymbol()):r.attribute&&m?(f=r.attribute,l=d):r["boolean"]?m&&!y&&d&&(f=r["boolean"],l=!0):r.bound&&m&&(f=r.bound,l=p);a["default"].isDefined(f)&&a["default"].isDefined(l)&&u(g,f,l)})}}function y(){a["default"].forEach(n.ngModelElAttrs,function(e,t){p(g,t,e)})}var h=document.createElement("div"),v=n.extras&&n.extras.skipNgModelAttrsManipulator;if(v===!0)return e;h.innerHTML=e;var g=o(h,v);return g&&g.length?(u(g,"id",r.id),u(g,"name",r.name||r.id),i(),l(),c(),m(),y(),h.innerHTML):e}function o(e,t){var n=a["default"].isString(t)?":not("+t+")":"",o=":not([formly-skip-ng-model-attrs-manipulator])",i="[ng-model]"+n+o+", [data-ng-model]"+n+o;try{return e.querySelectorAll(i)}catch(l){return r(e,t)}}function r(e,t){var n=e.querySelectorAll("[ng-model], [data-ng-model]"),o=[];o.item=function(e){return this[e]};for(var r=0;r<n.length;r++){var l=n[r];l.hasAttribute("formly-skip-ng-model-attrs-manipulator")||a["default"].isString(t)&&i(l,t)||o.push(l)}return o}function i(e,t){var n=document.createElement("div");return n.innerHTML=e.outerHTML,n.querySelector(t)}function f(){var t={focus:{attribute:"formly-focus"}},n=[],o=["required","disabled"],r=["pattern","minlength"],i=["change","keydown","keyup","keypress","click","focus","blur"],l=["placeholder","min","max","tabindex","type"];return e.extras.ngModelAttrsManipulatorPreferUnbound?r.push("maxlength"):n.push("maxlength"),a["default"].forEach(n,function(e){t[e]={bound:"ng-"+e}}),a["default"].forEach(o,function(e){t[e]={"boolean":e,bound:"ng-"+e}}),a["default"].forEach(r,function(e){t[e]={attribute:e,bound:"ng-"+e}}),a["default"].forEach(i,function(e){var n="on"+e.substr(0,1).toUpperCase()+e.substr(1);t[n]={statement:"ng-"+e}}),a["default"].forEach(l,function(e){t[e]={attribute:e}}),t}function s(e,t){return e["templateOptions."+t]||e["templateOptions['"+t+"']"]||e['templateOptions["'+t+'"]']}function u(e,t,n){a["default"].forEach(e,function(e){e.getAttribute(t)||e.setAttribute(t,n)})}function p(e,t,n){a["default"].forEach(e,function(e){e.setAttribute(t,n)})}function d(e){return l.contains(e,".")||l.contains(e,"[")&&l.contains(e,"]")}e.extras.disableNgModelAttrsManipulator||e.templateManipulators.preWrapper.push(n)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i),l=n(2);t["default"]=r,r.$inject=["formlyConfig","$interpolate"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(){return a["default"]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),a=o(i);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t,o){return function(){if(!e.disableWarnings){var r=Array.prototype.slice.call(arguments),i=r.shift();r.unshift("Formly Warning:"),r.push(""+t+i),o.warn.apply(o,n(r))}}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,o.$inject=["formlyConfig","formlyErrorAndWarningsUrlPrefix","$log"],e.exports=t["default"]},function(e,n){e.exports=t}])});
//# sourceMappingURL=formly.min.js.map
{
"name": "angular-formly",
"version": "7.0.1",
"version": "7.1.0",
"author": "Astrism <astrisms@gmail.com>",

@@ -5,0 +5,0 @@ "contributors": [

@@ -55,2 +55,6 @@ <img src="https://raw.githubusercontent.com/formly-js/angular-formly/master/other/logo/angular-formly-logo-64px.png" alt="angular-formly logo" title="angular-formly" align="right" width="64" height="64" />

## Plugins
Find all the plugins at [docs.angular-formly.com/page/plugins](http://docs.angular-formly.com/page/plugins)
## Getting Help

@@ -57,0 +61,0 @@

@@ -136,11 +136,20 @@ import angular from 'angular-fix';

$scope.fields = $scope.fields || [];
const fieldTransform = $scope.options.fieldTransform || formlyConfig.extras.fieldTransform;
if (fieldTransform) {
$scope.fields = fieldTransform($scope.fields, $scope.model, $scope.options, $scope.form);
if (!$scope.fields) {
throw formlyUsability.getFormlyError('fieldTransform must return an array of fields');
}
checkDeprecatedOptions($scope.options);
let fieldTransforms = $scope.options.fieldTransform || formlyConfig.extras.fieldTransform;
if (!angular.isArray(fieldTransforms)) {
fieldTransforms = [fieldTransforms];
}
angular.forEach(fieldTransforms, function transformFields(fieldTransform) {
if (fieldTransform) {
$scope.fields = fieldTransform($scope.fields, $scope.model, $scope.options, $scope.form);
if (!$scope.fields) {
throw formlyUsability.getFormlyError('fieldTransform must return an array of fields');
}
}
});
setupModels();

@@ -152,2 +161,19 @@

function checkDeprecatedOptions(options) {
if (formlyConfig.extras.fieldTransform && angular.isFunction(formlyConfig.extras.fieldTransform)) {
formlyWarn(
'fieldtransform-as-a-function-deprecated',
'fieldTransform as a function has been deprecated.',
`Attempted for formlyConfig.extras: ${formlyConfig.extras.fieldTransform.name}`,
formlyConfig.extras
);
} else if (options.fieldTransform && angular.isFunction(options.fieldTransform)) {
formlyWarn(
'fieldtransform-as-a-function-deprecated',
'fieldTransform as a function has been deprecated.',
`Attempted for form`,
options
);
}
}

@@ -154,0 +180,0 @@ function setupOptions() {

@@ -9,3 +9,3 @@ /* eslint no-shadow:0 */

const {getNewField, input, basicForm} = testUtils;
const {getNewField, input, basicForm, shouldWarnWithLog} = testUtils;

@@ -763,2 +763,29 @@ describe('formly-form', () => {

it(`should give a deprecation warning when formlyConfig.extras.fieldTransform is a function rather than an array`, inject(($log) => {
shouldWarnWithLog(
$log,
[
'Formly Warning:',
'fieldTransform as a function has been deprecated.',
/Attempted for formlyConfig.extras/
],
compileAndDigest
);
}));
it(`should give a deprecation warning when options.fieldTransform function rather than an array`, inject(($log) => {
formlyConfig.extras.fieldTransform = undefined;
scope.fields = [getNewField()];
scope.options.fieldTransform = fields => fields;
shouldWarnWithLog(
$log,
[
'Formly Warning:',
'fieldTransform as a function has been deprecated.',
'Attempted for form'
],
compileAndDigest
);
}));
it(`should throw an error if something is passed in and nothing is returned`, () => {

@@ -783,2 +810,16 @@ scope.fields = [getNewField()];

it(`should allow you to use an array of transform functions`, () => {
scope.fields = [getNewField({
customThing: 'foo',
otherCustomThing: {
whatever: '|-o-|'
}})];
scope.options.fieldTransform = [fieldTransform];
expect(() => compileAndDigest()).to.not.throw();
const field = scope.fields[0];
expect(field).to.have.deep.property('data.customThing');
expect(field).to.have.deep.property('data.otherCustomThing');
});
function doExpectations(spy) {

@@ -785,0 +826,0 @@ const originalFields = [{

@@ -161,3 +161,2 @@ import angular from 'angular-fix';

const formOptionsApi = apiCheck.shape({

@@ -170,3 +169,5 @@ formState: apiCheck.object.optional,

wrapper: specifyWrapperType.optional,
fieldTransform: apiCheck.func.optional,
fieldTransform: apiCheck.oneOfType([
apiCheck.func, apiCheck.array
]).optional,
data: apiCheck.object.optional

@@ -173,0 +174,0 @@ }).strict;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc