@digi-frontend/dgate-api-documentation 1.0.54 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.js +1 -1
- package/dist/_virtual/index20.js +2 -0
- package/dist/_virtual/index20.js.map +1 -0
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index7.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/_virtual/index9.js +1 -1
- package/dist/node_modules/dom-serializer/lib/index.js +1 -1
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js +1 -1
- package/dist/node_modules/domelementtype/lib/index.js +1 -1
- package/dist/node_modules/domhandler/lib/index.js +1 -1
- package/dist/node_modules/domutils/lib/index.js +1 -1
- package/dist/node_modules/fast-json-stable-stringify/index.js +2 -0
- package/dist/node_modules/fast-json-stable-stringify/index.js.map +1 -0
- package/dist/node_modules/formik/dist/formik.esm.js +1 -1
- package/dist/node_modules/html-dom-parser/lib/index.js +1 -1
- package/dist/node_modules/html-react-parser/esm/index.mjs.js +1 -1
- package/dist/node_modules/html-react-parser/esm/index.mjs.js.map +1 -1
- package/dist/node_modules/html-react-parser/lib/index.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-property/lib/index.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/src/assets/icons/CloseIcon.svg.js +2 -0
- package/dist/src/assets/icons/CloseIcon.svg.js.map +1 -0
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
- package/dist/src/components/dialog/index.js +1 -1
- package/dist/src/components/dialog/index.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js +1 -1
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js +2 -0
- package/dist/src/layout/docsComponents/DocsContent/OverviewPage/index.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js +1 -1
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js.map +1 -1
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js +1 -1
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js.map +1 -1
- package/dist/src/layout/docsLayout.js +1 -1
- package/dist/src/layout/docsLayout.js.map +1 -1
- package/dist/styles.css +511 -510
- package/dist/types/components/dialog/dialog.d.ts +2 -0
- package/dist/types/components/dialog/index.d.ts +1 -1
- package/dist/types/layout/docsComponents/DocsContent/DocsContent.d.ts +2 -1
- package/dist/types/layout/docsComponents/DocsContent/OverviewPage/index.d.ts +9 -0
- package/dist/types/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +3 -1
- package/dist/types/layout/docsLayout.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/InfoForm/InfoForm.tsx +16 -16
- package/src/components/MethodAccordion/MethodAccordion.tsx +33 -15
- package/src/components/dialog/dialog.ts +3 -0
- package/src/components/dialog/index.tsx +7 -8
- package/src/layout/docsComponents/DocsContent/DocsContent.tsx +5 -2
- package/src/layout/docsComponents/DocsContent/{TagPage → OverviewPage}/index.tsx +17 -4
- package/src/layout/docsComponents/DocsContent/{TagPage → OverviewPage}/style.scss +1 -0
- package/src/layout/docsComponents/DocsHeader/DocsHeader.tsx +1 -4
- package/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.tsx +12 -1
- package/src/layout/docsLayout.tsx +7 -1
package/dist/_virtual/index10.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{getDefaultExportFromCjs as r}from"./_commonjsHelpers.js";import{__require as e}from"../node_modules/html-react-parser/lib/index.js";var o=r(e());export{o as default};
|
|
2
2
|
//# sourceMappingURL=index10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index20.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__require as
|
|
1
|
+
import{getDefaultExportFromCjs as s}from"./_commonjsHelpers.js";import{__require as e}from"../node_modules/fast-json-stable-stringify/index.js";var o=s(e());export{o as default};
|
|
2
2
|
//# sourceMappingURL=index3.js.map
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__require as r}from"../node_modules/property-expr/index.js";var e=r();export{e as p};
|
|
2
2
|
//# sourceMappingURL=index5.js.map
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=
|
|
1
|
+
import{getDefaultExportFromCjs as o}from"./_commonjsHelpers.js";import{__require as r}from"../node_modules/toposort/index.js";var e=o(r());export{e as default};
|
|
2
2
|
//# sourceMappingURL=index6.js.map
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var e={exports:{}};export{e as __module};
|
|
2
2
|
//# sourceMappingURL=index7.js.map
|
package/dist/_virtual/index8.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{getDefaultExportFromCjs as e}from"./_commonjsHelpers.js";import{__require as r}from"../node_modules/react-fast-compare/index.js";var o=e(r());export{o as default};
|
|
2
2
|
//# sourceMappingURL=index8.js.map
|
package/dist/_virtual/index9.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var e={exports:{}};export{e as __module};
|
|
2
2
|
//# sourceMappingURL=index9.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../_virtual/index19.js";import{__require as t}from"../../domelementtype/lib/index.js";import{__require as n}from"../node_modules/entities/lib/index.js";import{__require as r}from"./foreignNames.js";var a;function o(){if(a)return e;a=1;var o=e&&e.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)},i=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var a=Object.getOwnPropertyDescriptor(t,n);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,a)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),c=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return c(t,e),t};Object.defineProperty(e,"__esModule",{value:!0}),e.render=void 0;var u=l(t()),s=n(),d=r(),m=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function f(e){return e.replace(/"/g,""")}var p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function v(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),r="",a=0;a<n.length;a++)r+=g(n[a],t);return r}function g(e,t){switch(e.type){case u.Root:return v(e.children,t);case u.Doctype:case u.Directive:return"<".concat(e.data,">");case u.Comment:return function(e){return"\x3c!--".concat(e.data,"--\x3e")}(e);case u.CDATA:return function(e){return"<![CDATA[".concat(e.children[0].data,"]]>")}(e);case u.Script:case u.Style:case u.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=d.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&b.has(e.parent.name)&&(t=o(o({},t),{xmlMode:!1})));!t.xmlMode&&x.has(e.name)&&(t=o(o({},t),{xmlMode:"foreign"}));var r="<".concat(e.name),a=function(e,t){var n;if(e){var r=!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)?f:t.xmlMode||"utf8"!==t.encodeEntities?s.encodeXML:s.escapeAttribute;return Object.keys(e).map((function(n){var a,o,i=null!==(a=e[n])&&void 0!==a?a:"";return"foreign"===t.xmlMode&&(n=null!==(o=d.attributeNames.get(n))&&void 0!==o?o:n),t.emptyAttrs||t.xmlMode||""!==i?"".concat(n,'="').concat(r(i),'"'):n})).join(" ")}}(e.attribs,t);a&&(r+=" ".concat(a));0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&p.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=v(e.children,t)),!t.xmlMode&&p.has(e.name)||(r+="</".concat(e.name,">")));return r}(e,t);case u.Text:return function(e,t){var n,r=e.data||"";!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)||!t.xmlMode&&e.parent&&m.has(e.parent.name)||(r=t.xmlMode||"utf8"!==t.encodeEntities?(0,s.encodeXML)(r):(0,s.escapeText)(r));return r}(e,t)}}e.render=v,e.default=v;var b=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),x=new Set(["svg","math"]);return e}export{o as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../../../_virtual/index20.js";import{__require as t}from"./decode.js";import{__require as r}from"./encode.js";import{__require as n}from"./escape.js";var o;function c(){return o||(o=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLAttribute=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.DecodingMode=e.EntityDecoder=e.encodeHTML5=e.encodeHTML4=e.encodeNonAsciiHTML=e.encodeHTML=e.escapeText=e.escapeAttribute=e.escapeUTF8=e.escape=e.encodeXML=e.encode=e.decodeStrict=e.decode=e.EncodingMode=e.EntityLevel=void 0;var o,c,d=t(),i=r(),u=n();function M(e,t){if(void 0===t&&(t=o.XML),("number"==typeof t?t:t.level)===o.HTML){var r="object"==typeof t?t.mode:void 0;return(0,d.decodeHTML)(e,r)}return(0,d.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(o=e.EntityLevel||(e.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(c=e.EncodingMode||(e.EncodingMode={})),e.decode=M,e.decodeStrict=function(e,t){var r;void 0===t&&(t=o.XML);var n="number"==typeof t?{level:t}:t;return null!==(r=n.mode)&&void 0!==r||(n.mode=d.DecodingMode.Strict),M(e,n)},e.encode=function(e,t){void 0===t&&(t=o.XML);var r="number"==typeof t?{level:t}:t;return r.mode===c.UTF8?(0,u.escapeUTF8)(e):r.mode===c.Attribute?(0,u.escapeAttribute)(e):r.mode===c.Text?(0,u.escapeText)(e):r.level===o.HTML?r.mode===c.ASCII?(0,i.encodeNonAsciiHTML)(e):(0,i.encodeHTML)(e):(0,u.encodeXML)(e)};var L=n();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return L.encodeXML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return L.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return L.escapeUTF8}}),Object.defineProperty(e,"escapeAttribute",{enumerable:!0,get:function(){return L.escapeAttribute}}),Object.defineProperty(e,"escapeText",{enumerable:!0,get:function(){return L.escapeText}});var f=r();Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return f.encodeNonAsciiHTML}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return f.encodeHTML}});var b=t();Object.defineProperty(e,"EntityDecoder",{enumerable:!0,get:function(){return b.EntityDecoder}}),Object.defineProperty(e,"DecodingMode",{enumerable:!0,get:function(){return b.DecodingMode}}),Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return b.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return b.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return b.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTMLAttribute",{enumerable:!0,get:function(){return b.decodeHTMLAttribute}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return b.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return b.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return b.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return b.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return b.decodeXML}})}(e)),e}export{c as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../_virtual/index15.js";var t;function o(){return t||(t=1,o=e,Object.defineProperty(o,"__esModule",{value:!0}),o.Doctype=o.CDATA=o.Tag=o.Style=o.Script=o.Comment=o.Directive=o.Text=o.Root=o.isTag=o.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(i=o.ElementType||(o.ElementType={})),o.isTag=function(e){return e.type===i.Tag||e.type===i.Script||e.type===i.Style},o.Root=i.Root,o.Text=i.Text,o.Directive=i.Directive,o.Comment=i.Comment,o.Script=i.Script,o.Style=i.Style,o.Tag=i.Tag,o.CDATA=i.CDATA,o.Doctype=i.Doctype),e;var o,i}export{o as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as t}from"../../../_virtual/
|
|
1
|
+
import{__exports as t}from"../../../_virtual/index13.js";import{__require as e}from"../../domelementtype/lib/index.js";import{__require as n}from"./node.js";var o;function i(){return o||(o=1,function(o){var i=t&&t.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),s=t&&t.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||i(e,t,n)};Object.defineProperty(o,"__esModule",{value:!0}),o.DomHandler=void 0;var r=e(),a=n();s(n(),o);var d={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function t(t,e,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof e&&(n=e,e=d),"object"==typeof t&&(e=t,t=void 0),this.callback=null!=t?t:null,this.options=null!=e?e:d,this.elementCB=null!=n?n:null}return t.prototype.onparserinit=function(t){this.parser=t},t.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(t){this.handleCallback(t)},t.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},t.prototype.onopentag=function(t,e){var n=this.options.xmlMode?r.ElementType.Tag:void 0,o=new a.Element(t,e,void 0,n);this.addNode(o),this.tagStack.push(o)},t.prototype.ontext=function(t){var e=this.lastNode;if(e&&e.type===r.ElementType.Text)e.data+=t,this.options.withEndIndices&&(e.endIndex=this.parser.endIndex);else{var n=new a.Text(t);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment)this.lastNode.data+=t;else{var e=new a.Comment(t);this.addNode(e),this.lastNode=e}},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var t=new a.Text(""),e=new a.CDATA([t]);this.addNode(e),t.parent=e,this.lastNode=t},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(t,e){var n=new a.ProcessingInstruction(t,e);this.addNode(n)},t.prototype.handleCallback=function(t){if("function"==typeof this.callback)this.callback(t,this.dom);else if(t)throw t},t.prototype.addNode=function(t){var e=this.tagStack[this.tagStack.length-1],n=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),n&&(t.prev=n,n.next=t),t.parent=e,this.lastNode=null},t}();o.DomHandler=l,o.default=l}(t)),t}export{i as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../_virtual/index17.js";import{__require as r}from"./stringify.js";import{__require as t}from"./traversal.js";import{__require as i}from"./manipulation.js";import{__require as n}from"./querying.js";import{__require as o}from"./legacy.js";import{__require as u}from"./helpers.js";import{__require as s}from"./feeds.js";import{__require as a}from"../../domhandler/lib/index.js";var m;function f(){return m||(m=1,function(m){var f=e&&e.__createBinding||(Object.create?function(e,r,t,i){void 0===i&&(i=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,i,n)}:function(e,r,t,i){void 0===i&&(i=t),e[i]=r[t]}),c=e&&e.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||f(r,e,t)};Object.defineProperty(m,"__esModule",{value:!0}),m.hasChildren=m.isDocument=m.isComment=m.isText=m.isCDATA=m.isTag=void 0,c(r(),m),c(t(),m),c(i(),m),c(n(),m),c(o(),m),c(u(),m),c(s(),m);var _=a();Object.defineProperty(m,"isTag",{enumerable:!0,get:function(){return _.isTag}}),Object.defineProperty(m,"isCDATA",{enumerable:!0,get:function(){return _.isCDATA}}),Object.defineProperty(m,"isText",{enumerable:!0,get:function(){return _.isText}}),Object.defineProperty(m,"isComment",{enumerable:!0,get:function(){return _.isComment}}),Object.defineProperty(m,"isDocument",{enumerable:!0,get:function(){return _.isDocument}}),Object.defineProperty(m,"hasChildren",{enumerable:!0,get:function(){return _.hasChildren}})}(e)),e}export{f as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var r,n;function t(){return n?r:(n=1,r=function(r,n){n||(n={}),"function"==typeof n&&(n={cmp:n});var t,e="boolean"==typeof n.cycles&&n.cycles,i=n.cmp&&(t=n.cmp,function(r){return function(n,e){var i={key:n,value:r[n]},u={key:e,value:r[e]};return t(i,u)}}),u=[];return function r(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0!==n){if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);var t,o;if(Array.isArray(n)){for(o="[",t=0;t<n.length;t++)t&&(o+=","),o+=r(n[t])||"null";return o+"]"}if(null===n)return"null";if(-1!==u.indexOf(n)){if(e)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var f=u.push(n)-1,c=Object.keys(n).sort(i&&i(n));for(o="",t=0;t<c.length;t++){var l=c[t],y=r(n[l]);y&&(o&&(o+=","),o+=JSON.stringify(l)+":"+y)}return u.splice(f,1),"{"+o+"}"}}(r)})}export{t as __require};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/fast-json-stable-stringify/index.js"],"sourcesContent":["'use strict';\n\nmodule.exports = function (data, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (node) {\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n if (node === undefined) return;\n if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';\n if (typeof node !== 'object') return JSON.stringify(node);\n\n var i, out;\n if (Array.isArray(node)) {\n out = '[';\n for (i = 0; i < node.length; i++) {\n if (i) out += ',';\n out += stringify(node[i]) || 'null';\n }\n return out + ']';\n }\n\n if (node === null) return 'null';\n\n if (seen.indexOf(node) !== -1) {\n if (cycles) return JSON.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n\n var seenIndex = seen.push(node) - 1;\n var keys = Object.keys(node).sort(cmp && cmp(node));\n out = '';\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node[key]);\n\n if (!value) continue;\n if (out) out += ',';\n out += JSON.stringify(key) + ':' + value;\n }\n seen.splice(seenIndex, 1);\n return '{' + out + '}';\n })(data);\n};\n"],"names":["fastJsonStableStringify","data","opts","cmp","f","cycles","node","a","b","aobj","key","value","bobj","seen","stringify","toJSON","undefined","isFinite","JSON","i","out","Array","isArray","length","indexOf","TypeError","seenIndex","push","keys","Object","sort","splice"],"mappings":"qCAEAA,EAAiB,SAAUC,EAAMC,GACxBA,IAAMA,EAAO,IACE,mBAATA,IAAqBA,EAAO,CAAEC,IAAKD,IAC9C,IAEiCE,EAF7BC,EAAiC,kBAAhBH,EAAKG,QAAwBH,EAAKG,OAEnDF,EAAMD,EAAKC,MAAkBC,EAQ9BF,EAAKC,IAPG,SAAUG,GACb,OAAO,SAAUC,EAAGC,GAChB,IAAIC,EAAO,CAAEC,IAAKH,EAAGI,MAAOL,EAAKC,IAC7BK,EAAO,CAAEF,IAAKF,EAAGG,MAAOL,EAAKE,IACjC,OAAOJ,EAAEK,EAAMG,MAKvBC,EAAO,GACX,OAAO,SAAUC,EAAWR,GAKxB,GAJIA,GAAQA,EAAKS,QAAiC,mBAAhBT,EAAKS,SACnCT,EAAOA,EAAKS,eAGHC,IAATV,EAAJ,CACA,GAAmB,iBAARA,EAAkB,OAAOW,SAASX,GAAQ,GAAKA,EAAO,OACjE,GAAoB,iBAATA,EAAmB,OAAOY,KAAKJ,UAAUR,GAEpD,IAAIa,EAAGC,EACP,GAAIC,MAAMC,QAAQhB,GAAO,CAErB,IADAc,EAAM,IACDD,EAAI,EAAGA,EAAIb,EAAKiB,OAAQJ,IACrBA,IAAGC,GAAO,KACdA,GAAON,EAAUR,EAAKa,KAAO,OAEjC,OAAOC,EAAM,GACzB,CAEQ,GAAa,OAATd,EAAe,MAAO,OAE1B,IAA4B,IAAxBO,EAAKW,QAAQlB,GAAc,CAC3B,GAAID,EAAQ,OAAOa,KAAKJ,UAAU,aAClC,MAAM,IAAIW,UAAU,wCAChC,CAEQ,IAAIC,EAAYb,EAAKc,KAAKrB,GAAQ,EAC9BsB,EAAOC,OAAOD,KAAKtB,GAAMwB,KAAK3B,GAAOA,EAAIG,IAE7C,IADAc,EAAM,GACDD,EAAI,EAAGA,EAAIS,EAAKL,OAAQJ,IAAK,CAC9B,IAAIT,EAAMkB,EAAKT,GACXR,EAAQG,EAAUR,EAAKI,IAEtBC,IACDS,IAAKA,GAAO,KAChBA,GAAOF,KAAKJ,UAAUJ,GAAO,IAAMC,EAC/C,CAEQ,OADAE,EAAKkB,OAAOL,EAAW,GAChB,IAAMN,EAAM,GAjCK,CAkC3B,CAvCM,CAuCJnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"../node_modules/deepmerge/dist/es.js";import t from"../../lodash-es/isPlainObject.js";import r from"../../lodash-es/cloneDeep.js";import{useRef as n,useEffect as i,useState as a,useCallback as o,useMemo as u,createContext as l,useContext as c,useLayoutEffect as s,forwardRef as d,createElement as f,Children as v,Component as p}from"react";import h from"../../../_virtual/index7.js";import m from"../../tiny-warning/dist/tiny-warning.esm.js";import y from"../../lodash-es/clone.js";import E from"../../lodash-es/toPath.js";import"../../../_virtual/hoist-non-react-statics.cjs.js";function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}function T(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _=l(void 0);_.displayName="FormikContext";var b=_.Provider;function A(){var e=c(_);return e||("production"!==process.env.NODE_ENV?m(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):m(!1)),e}_.Consumer;var O=function(e){return Array.isArray(e)&&0===e.length},F=function(e){return"function"==typeof e},I=function(e){return null!==e&&"object"==typeof e},R=function(e){return String(Math.floor(Number(e)))===e},D=function(e){return"[object String]"===Object.prototype.toString.call(e)},V=function(e){return 0===v.count(e)},k=function(e){return I(e)&&F(e.then)};function w(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function N(e,t,r,n){void 0===n&&(n=0);for(var i=E(t);e&&n<i.length;)e=e[i[n++]];return n===i.length||e?void 0===e?r:e:r}function L(e,t,r){for(var n=y(e),i=n,a=0,o=E(t);a<o.length-1;a++){var u=o[a],l=N(e,o.slice(0,a+1));if(l&&(I(l)||Array.isArray(l)))i=i[u]=y(l);else{var c=o[a+1];i=i[u]=R(c)&&Number(c)>=0?[]:{}}}return(0===a?e:i)[o[a]]===r?e:(void 0===r?delete i[o[a]]:i[o[a]]=r,0===a&&void 0===r&&delete n[o[a]],n)}function P(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];I(u)?r.get(u)||(r.set(u,!0),n[o]=Array.isArray(u)?[]:{},P(u,t,r,n[o])):n[o]=t}return n}var M={},C={};function U(t){var l=t.validateOnChange,c=void 0===l||l,s=t.validateOnBlur,d=void 0===s||s,f=t.validateOnMount,v=void 0!==f&&f,p=t.isInitialValid,y=t.enableReinitialize,E=void 0!==y&&y,g=t.onSubmit,_=T(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),b=S({validateOnChange:c,validateOnBlur:d,validateOnMount:v,onSubmit:g},_),A=n(b.initialValues),O=n(b.initialErrors||M),R=n(b.initialTouched||C),V=n(b.initialStatus),U=n(!1),G=n({});"production"!==process.env.NODE_ENV&&i((function(){void 0!==p&&("production"!==process.env.NODE_ENV?m(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):m(!1))}),[]),i((function(){return U.current=!0,function(){U.current=!1}}),[]);var W=a(0)[1],Y=n({values:r(b.initialValues),errors:r(b.initialErrors)||M,touched:r(b.initialTouched)||C,status:r(b.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),z=Y.current,q=o((function(e){var t=Y.current;Y.current=function(e,t){switch(t.type){case"SET_VALUES":return S({},e,{values:t.payload});case"SET_TOUCHED":return S({},e,{touched:t.payload});case"SET_ERRORS":return h(e.errors,t.payload)?e:S({},e,{errors:t.payload});case"SET_STATUS":return S({},e,{status:t.payload});case"SET_ISSUBMITTING":return S({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return S({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return S({},e,{values:L(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return S({},e,{touched:L(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return S({},e,{errors:L(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return S({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return S({},e,{touched:P(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return S({},e,{isSubmitting:!1});default:return e}}(t,e),t!==Y.current&&W((function(e){return e+1}))}),[]),J=o((function(e,t){return new Promise((function(r,n){var i=b.validate(e,t);null==i?r(M):k(i)?i.then((function(e){r(e||M)}),(function(e){"production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",e),n(e)})):r(i)}))}),[b.validate]),Q=o((function(e,t){var r=b.validationSchema,n=F(r)?r(t):r,i=t&&n.validateAt?n.validateAt(t,e):x(e,n);return new Promise((function(e,t){i.then((function(){e(M)}),(function(r){"ValidationError"===r.name?e(B(r)):("production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",r),t(r))}))}))}),[b.validationSchema]),X=o((function(e,t){return new Promise((function(r){return r(G.current[e].validate(t))}))}),[]),Z=o((function(e){var t=Object.keys(G.current).filter((function(e){return F(G.current[e].validate)})),r=t.length>0?t.map((function(t){return X(t,N(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(e=L(e,t[n],r)),e}),{})}))}),[X]),$=o((function(t){return Promise.all([Z(t),b.validationSchema?Q(t):{},b.validate?J(t):{}]).then((function(t){var r=t[0],n=t[1],i=t[2];return e.all([r,n,i],{arrayMerge:H})}))}),[b.validate,b.validationSchema,Z,J,Q]),ee=K((function(e){return void 0===e&&(e=z.values),q({type:"SET_ISVALIDATING",payload:!0}),$(e).then((function(e){return U.current&&(q({type:"SET_ISVALIDATING",payload:!1}),q({type:"SET_ERRORS",payload:e})),e}))}));i((function(){v&&!0===U.current&&h(A.current,b.initialValues)&&ee(A.current)}),[v,ee]);var te=o((function(e){var t=e&&e.values?e.values:A.current,r=e&&e.errors?e.errors:O.current?O.current:b.initialErrors||{},n=e&&e.touched?e.touched:R.current?R.current:b.initialTouched||{},i=e&&e.status?e.status:V.current?V.current:b.initialStatus;A.current=t,O.current=r,R.current=n,V.current=i;var a=function(){q({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(b.onReset){var o=b.onReset(z.values,Te);k(o)?o.then(a):a()}else a()}),[b.initialErrors,b.initialStatus,b.initialTouched,b.onReset]);i((function(){!0!==U.current||h(A.current,b.initialValues)||E&&(A.current=b.initialValues,te(),v&&ee(A.current))}),[E,b.initialValues,te,v,ee]),i((function(){E&&!0===U.current&&!h(O.current,b.initialErrors)&&(O.current=b.initialErrors||M,q({type:"SET_ERRORS",payload:b.initialErrors||M}))}),[E,b.initialErrors]),i((function(){E&&!0===U.current&&!h(R.current,b.initialTouched)&&(R.current=b.initialTouched||C,q({type:"SET_TOUCHED",payload:b.initialTouched||C}))}),[E,b.initialTouched]),i((function(){E&&!0===U.current&&!h(V.current,b.initialStatus)&&(V.current=b.initialStatus,q({type:"SET_STATUS",payload:b.initialStatus}))}),[E,b.initialStatus,b.initialTouched]);var re=K((function(e){if(G.current[e]&&F(G.current[e].validate)){var t=N(z.values,e),r=G.current[e].validate(t);return k(r)?(q({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),q({type:"SET_ISVALIDATING",payload:!1})}))):(q({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return b.validationSchema?(q({type:"SET_ISVALIDATING",payload:!0}),Q(z.values,e).then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:N(t,e)}}),q({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),ne=o((function(e,t){var r=t.validate;G.current[e]={validate:r}}),[]),ie=o((function(e){delete G.current[e]}),[]),ae=K((function(e,t){return q({type:"SET_TOUCHED",payload:e}),(void 0===t?d:t)?ee(z.values):Promise.resolve()})),oe=o((function(e){q({type:"SET_ERRORS",payload:e})}),[]),ue=K((function(e,t){var r=F(e)?e(z.values):e;return q({type:"SET_VALUES",payload:r}),(void 0===t?c:t)?ee(r):Promise.resolve()})),le=o((function(e,t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),ce=K((function(e,t,r){return q({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?c:r)?ee(L(z.values,e,t)):Promise.resolve()})),se=o((function(e,t){var r,n=t,i=e;if(!D(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,u=a.name,l=a.id,c=a.value,s=a.checked,d=a.outerHTML,f=a.options,v=a.multiple;(n=t||(u||l))||"production"===process.env.NODE_ENV||j({htmlContent:d,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),i=/number|range/.test(o)?(r=parseFloat(c),isNaN(r)?"":r):/checkbox/.test(o)?function(e,t,r){if("boolean"==typeof e)return Boolean(t);var n=[],i=!1,a=-1;if(Array.isArray(e))n=e,i=(a=e.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(t);if(t&&r&&!i)return n.concat(r);if(!i)return n;return n.slice(0,a).concat(n.slice(a+1))}(N(z.values,n),s,c):f&&v?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):c}n&&ce(n,i)}),[ce,z.values]),de=K((function(e){if(D(e))return function(t){return se(t,e)};se(e)})),fe=K((function(e,t,r){return void 0===t&&(t=!0),q({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===r?d:r)?ee(z.values):Promise.resolve()})),ve=o((function(e,t){e.persist&&e.persist();var r=e.target,n=r.name,i=r.id,a=r.outerHTML,o=t||(n||i);o||"production"===process.env.NODE_ENV||j({htmlContent:a,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),fe(o,!0)}),[fe]),pe=K((function(e){if(D(e))return function(t){return ve(t,e)};ve(e)})),he=o((function(e){F(e)?q({type:"SET_FORMIK_STATE",payload:e}):q({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),me=o((function(e){q({type:"SET_STATUS",payload:e})}),[]),ye=o((function(e){q({type:"SET_ISSUBMITTING",payload:e})}),[]),Ee=K((function(){return q({type:"SUBMIT_ATTEMPT"}),ee().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var r;try{if(void 0===(r=ge()))return}catch(e){throw e}return Promise.resolve(r).then((function(e){return U.current&&q({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(U.current)throw q({type:"SUBMIT_FAILURE"}),e}))}if(U.current&&(q({type:"SUBMIT_FAILURE"}),t))throw e}))})),Se=K((function(e){if(e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),"production"!==process.env.NODE_ENV&&"undefined"!=typeof document){var t=w();null!==t&&t instanceof HTMLButtonElement&&(t.attributes&&t.attributes.getNamedItem("type")||("production"!==process.env.NODE_ENV?m(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):m(!1)))}Ee().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Te={resetForm:te,validateForm:ee,validateField:re,setErrors:oe,setFieldError:le,setFieldTouched:fe,setFieldValue:ce,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,setFormikState:he,submitForm:Ee},ge=K((function(){return g(z.values,Te)})),_e=K((function(e){e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),te()})),be=o((function(e){return{value:N(z.values,e),error:N(z.errors,e),touched:!!N(z.touched,e),initialValue:N(A.current,e),initialTouched:!!N(R.current,e),initialError:N(O.current,e)}}),[z.errors,z.touched,z.values]),Ae=o((function(e){return{setValue:function(t,r){return ce(e,t,r)},setTouched:function(t,r){return fe(e,t,r)},setError:function(t){return le(e,t)}}}),[ce,fe,le]),Oe=o((function(e){var t=I(e),r=t?e.name:e,n=N(z.values,r),i={name:r,value:n,onChange:de,onBlur:pe};if(t){var a=e.type,o=e.value,u=e.as,l=e.multiple;"checkbox"===a?void 0===o?i.checked=!!n:(i.checked=!(!Array.isArray(n)||!~n.indexOf(o)),i.value=o):"radio"===a?(i.checked=n===o,i.value=o):"select"===u&&l&&(i.value=i.value||[],i.multiple=!0)}return i}),[pe,de,z.values]),Fe=u((function(){return!h(A.current,z.values)}),[A.current,z.values]),Ie=u((function(){return void 0!==p?Fe?z.errors&&0===Object.keys(z.errors).length:!1!==p&&F(p)?p(b):p:z.errors&&0===Object.keys(z.errors).length}),[p,Fe,z.errors,b]);return S({},z,{initialValues:A.current,initialErrors:O.current,initialTouched:R.current,initialStatus:V.current,handleBlur:pe,handleChange:de,handleReset:_e,handleSubmit:Se,resetForm:te,setErrors:oe,setFormikState:he,setFieldTouched:fe,setFieldValue:ce,setFieldError:le,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,submitForm:Ee,validateForm:ee,validateField:re,isValid:Ie,dirty:Fe,unregisterField:ie,registerField:ne,getFieldProps:Oe,getFieldMeta:be,getFieldHelpers:Ae,validateOnBlur:d,validateOnChange:c,validateOnMount:v})}function j(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+"\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#"+r+"\n ")}function B(e){var t={};if(e.inner){if(0===e.inner.length)return L(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a;N(t,o.path)||(t=L(t,o.path,o.message))}}return t}function x(e,t,r,n){void 0===r&&(r=!1);var i=G(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:n||i})}function G(e){var r=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=String(n);!0===Array.isArray(e[i])?r[i]=e[i].map((function(e){return!0===Array.isArray(e)||t(e)?G(e):""!==e?e:void 0})):t(e[i])?r[i]=G(e[i]):r[i]=""!==e[i]?e[i]:void 0}return r}function H(t,r,n){var i=t.slice();return r.forEach((function(r,a){if(void 0===i[a]){var o=!1!==n.clone&&n.isMergeableObject(r);i[a]=o?e(Array.isArray(r)?[]:{},r,n):r}else n.isMergeableObject(r)?i[a]=e(t[a],r,n):-1===t.indexOf(r)&&i.push(r)})),i}var W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s:i;function K(e){var t=n(e);return W((function(){t.current=e})),o((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current.apply(void 0,r)}),[])}var Y=d((function(e,t){var r=e.action,n=T(e,["action"]),i=null!=r?r:"#",a=A(),o=a.handleReset,u=a.handleSubmit;return f("form",S({onSubmit:u,ref:t,onReset:o,action:i},n))}));Y.displayName="Form";var z=function(e,t,r){var n=X(e),i=n[t];return n.splice(t,1),n.splice(r,0,i),n},q=function(e,t,r){var n=X(e),i=n[t];return n[t]=n[r],n[r]=i,n},J=function(e,t,r){var n=X(e);return n.splice(t,0,r),n},Q=function(e,t,r){var n=X(e);return n[t]=r,n},X=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(S({},e,{length:t+1}))}return[]},Z=function(e,t){var r="function"==typeof e?e:t;return function(e){if(Array.isArray(e)||I(e)){var t=X(e);return r(t)}return e}};(function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)((function(n){var i=Z(r,e),o=Z(t,e),u=L(n.values,a,e(N(n.values,a))),l=r?i(N(n.errors,a)):void 0,c=t?o(N(n.touched,a)):void 0;return O(l)&&(l=void 0),O(c)&&(c=void 0),S({},n,{values:u,errors:r?L(n.errors,a,l):n.errors,touched:t?L(n.touched,a,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(X(t),[r(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(r){return q(r,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(r){return z(r,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(r){return J(r,e,t)}),(function(t){return J(t,e,null)}),(function(t){return J(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(r){return Q(r,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t=n.length,n}),(function(e){return e?[null].concat(e):[null]}),(function(e){return e?[null].concat(e):[null]})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(g(n)),n.pop=n.pop.bind(g(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!h(N(e.formik.values,e.name),N(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},a.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?X(r):[];return t||(t=n[e]),F(n.splice)&&n.splice(e,1),F(n.every)&&n.every((function(e){return void 0===e}))?[]:n}),!0,!0),t},a.pop=function(){var e;return this.updateArrayField((function(t){var r=t.slice();return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},a.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,r=t.component,n=t.render,i=t.children,a=t.name,o=S({},e,{form:T(t.formik,["validate","validationSchema"]),name:a});return r?f(r,o):n?n(o):i?"function"==typeof i?i(o):V(i)?null:v.only(i):null},i}(p)).defaultProps={validateOnChange:!0};export{Y as Form,_ as FormikContext,b as FormikProvider,w as getActiveElement,N as getIn,J as insert,O as isEmptyArray,V as isEmptyChildren,F as isFunction,R as isInteger,I as isObject,k as isPromise,D as isString,z as move,G as prepareDataForValidation,Q as replace,L as setIn,P as setNestedObjectValues,q as swap,U as useFormik,A as useFormikContext,x as validateYupSchema,B as yupToFormErrors};
|
|
1
|
+
import e from"../node_modules/deepmerge/dist/es.js";import t from"../../lodash-es/isPlainObject.js";import r from"../../lodash-es/cloneDeep.js";import{useRef as n,useEffect as i,useState as a,useCallback as o,useMemo as u,createContext as l,useContext as c,useLayoutEffect as s,forwardRef as d,createElement as f,Children as v,Component as p}from"react";import h from"../../../_virtual/index8.js";import m from"../../tiny-warning/dist/tiny-warning.esm.js";import y from"../../lodash-es/clone.js";import E from"../../lodash-es/toPath.js";import"../../../_virtual/hoist-non-react-statics.cjs.js";function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}function T(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _=l(void 0);_.displayName="FormikContext";var b=_.Provider;function A(){var e=c(_);return e||("production"!==process.env.NODE_ENV?m(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):m(!1)),e}_.Consumer;var O=function(e){return Array.isArray(e)&&0===e.length},F=function(e){return"function"==typeof e},I=function(e){return null!==e&&"object"==typeof e},R=function(e){return String(Math.floor(Number(e)))===e},D=function(e){return"[object String]"===Object.prototype.toString.call(e)},V=function(e){return 0===v.count(e)},k=function(e){return I(e)&&F(e.then)};function w(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function N(e,t,r,n){void 0===n&&(n=0);for(var i=E(t);e&&n<i.length;)e=e[i[n++]];return n===i.length||e?void 0===e?r:e:r}function L(e,t,r){for(var n=y(e),i=n,a=0,o=E(t);a<o.length-1;a++){var u=o[a],l=N(e,o.slice(0,a+1));if(l&&(I(l)||Array.isArray(l)))i=i[u]=y(l);else{var c=o[a+1];i=i[u]=R(c)&&Number(c)>=0?[]:{}}}return(0===a?e:i)[o[a]]===r?e:(void 0===r?delete i[o[a]]:i[o[a]]=r,0===a&&void 0===r&&delete n[o[a]],n)}function P(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];I(u)?r.get(u)||(r.set(u,!0),n[o]=Array.isArray(u)?[]:{},P(u,t,r,n[o])):n[o]=t}return n}var M={},C={};function U(t){var l=t.validateOnChange,c=void 0===l||l,s=t.validateOnBlur,d=void 0===s||s,f=t.validateOnMount,v=void 0!==f&&f,p=t.isInitialValid,y=t.enableReinitialize,E=void 0!==y&&y,g=t.onSubmit,_=T(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),b=S({validateOnChange:c,validateOnBlur:d,validateOnMount:v,onSubmit:g},_),A=n(b.initialValues),O=n(b.initialErrors||M),R=n(b.initialTouched||C),V=n(b.initialStatus),U=n(!1),G=n({});"production"!==process.env.NODE_ENV&&i((function(){void 0!==p&&("production"!==process.env.NODE_ENV?m(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):m(!1))}),[]),i((function(){return U.current=!0,function(){U.current=!1}}),[]);var W=a(0)[1],Y=n({values:r(b.initialValues),errors:r(b.initialErrors)||M,touched:r(b.initialTouched)||C,status:r(b.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),z=Y.current,q=o((function(e){var t=Y.current;Y.current=function(e,t){switch(t.type){case"SET_VALUES":return S({},e,{values:t.payload});case"SET_TOUCHED":return S({},e,{touched:t.payload});case"SET_ERRORS":return h(e.errors,t.payload)?e:S({},e,{errors:t.payload});case"SET_STATUS":return S({},e,{status:t.payload});case"SET_ISSUBMITTING":return S({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return S({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return S({},e,{values:L(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return S({},e,{touched:L(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return S({},e,{errors:L(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return S({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return S({},e,{touched:P(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return S({},e,{isSubmitting:!1});default:return e}}(t,e),t!==Y.current&&W((function(e){return e+1}))}),[]),J=o((function(e,t){return new Promise((function(r,n){var i=b.validate(e,t);null==i?r(M):k(i)?i.then((function(e){r(e||M)}),(function(e){"production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",e),n(e)})):r(i)}))}),[b.validate]),Q=o((function(e,t){var r=b.validationSchema,n=F(r)?r(t):r,i=t&&n.validateAt?n.validateAt(t,e):x(e,n);return new Promise((function(e,t){i.then((function(){e(M)}),(function(r){"ValidationError"===r.name?e(B(r)):("production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",r),t(r))}))}))}),[b.validationSchema]),X=o((function(e,t){return new Promise((function(r){return r(G.current[e].validate(t))}))}),[]),Z=o((function(e){var t=Object.keys(G.current).filter((function(e){return F(G.current[e].validate)})),r=t.length>0?t.map((function(t){return X(t,N(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(e){return e.reduce((function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(e=L(e,t[n],r)),e}),{})}))}),[X]),$=o((function(t){return Promise.all([Z(t),b.validationSchema?Q(t):{},b.validate?J(t):{}]).then((function(t){var r=t[0],n=t[1],i=t[2];return e.all([r,n,i],{arrayMerge:H})}))}),[b.validate,b.validationSchema,Z,J,Q]),ee=K((function(e){return void 0===e&&(e=z.values),q({type:"SET_ISVALIDATING",payload:!0}),$(e).then((function(e){return U.current&&(q({type:"SET_ISVALIDATING",payload:!1}),q({type:"SET_ERRORS",payload:e})),e}))}));i((function(){v&&!0===U.current&&h(A.current,b.initialValues)&&ee(A.current)}),[v,ee]);var te=o((function(e){var t=e&&e.values?e.values:A.current,r=e&&e.errors?e.errors:O.current?O.current:b.initialErrors||{},n=e&&e.touched?e.touched:R.current?R.current:b.initialTouched||{},i=e&&e.status?e.status:V.current?V.current:b.initialStatus;A.current=t,O.current=r,R.current=n,V.current=i;var a=function(){q({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:r,touched:n,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(b.onReset){var o=b.onReset(z.values,Te);k(o)?o.then(a):a()}else a()}),[b.initialErrors,b.initialStatus,b.initialTouched,b.onReset]);i((function(){!0!==U.current||h(A.current,b.initialValues)||E&&(A.current=b.initialValues,te(),v&&ee(A.current))}),[E,b.initialValues,te,v,ee]),i((function(){E&&!0===U.current&&!h(O.current,b.initialErrors)&&(O.current=b.initialErrors||M,q({type:"SET_ERRORS",payload:b.initialErrors||M}))}),[E,b.initialErrors]),i((function(){E&&!0===U.current&&!h(R.current,b.initialTouched)&&(R.current=b.initialTouched||C,q({type:"SET_TOUCHED",payload:b.initialTouched||C}))}),[E,b.initialTouched]),i((function(){E&&!0===U.current&&!h(V.current,b.initialStatus)&&(V.current=b.initialStatus,q({type:"SET_STATUS",payload:b.initialStatus}))}),[E,b.initialStatus,b.initialTouched]);var re=K((function(e){if(G.current[e]&&F(G.current[e].validate)){var t=N(z.values,e),r=G.current[e].validate(t);return k(r)?(q({type:"SET_ISVALIDATING",payload:!0}),r.then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),q({type:"SET_ISVALIDATING",payload:!1})}))):(q({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return b.validationSchema?(q({type:"SET_ISVALIDATING",payload:!0}),Q(z.values,e).then((function(e){return e})).then((function(t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:N(t,e)}}),q({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),ne=o((function(e,t){var r=t.validate;G.current[e]={validate:r}}),[]),ie=o((function(e){delete G.current[e]}),[]),ae=K((function(e,t){return q({type:"SET_TOUCHED",payload:e}),(void 0===t?d:t)?ee(z.values):Promise.resolve()})),oe=o((function(e){q({type:"SET_ERRORS",payload:e})}),[]),ue=K((function(e,t){var r=F(e)?e(z.values):e;return q({type:"SET_VALUES",payload:r}),(void 0===t?c:t)?ee(r):Promise.resolve()})),le=o((function(e,t){q({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),ce=K((function(e,t,r){return q({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?c:r)?ee(L(z.values,e,t)):Promise.resolve()})),se=o((function(e,t){var r,n=t,i=e;if(!D(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,u=a.name,l=a.id,c=a.value,s=a.checked,d=a.outerHTML,f=a.options,v=a.multiple;(n=t||(u||l))||"production"===process.env.NODE_ENV||j({htmlContent:d,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),i=/number|range/.test(o)?(r=parseFloat(c),isNaN(r)?"":r):/checkbox/.test(o)?function(e,t,r){if("boolean"==typeof e)return Boolean(t);var n=[],i=!1,a=-1;if(Array.isArray(e))n=e,i=(a=e.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(t);if(t&&r&&!i)return n.concat(r);if(!i)return n;return n.slice(0,a).concat(n.slice(a+1))}(N(z.values,n),s,c):f&&v?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):c}n&&ce(n,i)}),[ce,z.values]),de=K((function(e){if(D(e))return function(t){return se(t,e)};se(e)})),fe=K((function(e,t,r){return void 0===t&&(t=!0),q({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===r?d:r)?ee(z.values):Promise.resolve()})),ve=o((function(e,t){e.persist&&e.persist();var r=e.target,n=r.name,i=r.id,a=r.outerHTML,o=t||(n||i);o||"production"===process.env.NODE_ENV||j({htmlContent:a,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),fe(o,!0)}),[fe]),pe=K((function(e){if(D(e))return function(t){return ve(t,e)};ve(e)})),he=o((function(e){F(e)?q({type:"SET_FORMIK_STATE",payload:e}):q({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),me=o((function(e){q({type:"SET_STATUS",payload:e})}),[]),ye=o((function(e){q({type:"SET_ISSUBMITTING",payload:e})}),[]),Ee=K((function(){return q({type:"SUBMIT_ATTEMPT"}),ee().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var r;try{if(void 0===(r=ge()))return}catch(e){throw e}return Promise.resolve(r).then((function(e){return U.current&&q({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(U.current)throw q({type:"SUBMIT_FAILURE"}),e}))}if(U.current&&(q({type:"SUBMIT_FAILURE"}),t))throw e}))})),Se=K((function(e){if(e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),"production"!==process.env.NODE_ENV&&"undefined"!=typeof document){var t=w();null!==t&&t instanceof HTMLButtonElement&&(t.attributes&&t.attributes.getNamedItem("type")||("production"!==process.env.NODE_ENV?m(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):m(!1)))}Ee().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Te={resetForm:te,validateForm:ee,validateField:re,setErrors:oe,setFieldError:le,setFieldTouched:fe,setFieldValue:ce,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,setFormikState:he,submitForm:Ee},ge=K((function(){return g(z.values,Te)})),_e=K((function(e){e&&e.preventDefault&&F(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&F(e.stopPropagation)&&e.stopPropagation(),te()})),be=o((function(e){return{value:N(z.values,e),error:N(z.errors,e),touched:!!N(z.touched,e),initialValue:N(A.current,e),initialTouched:!!N(R.current,e),initialError:N(O.current,e)}}),[z.errors,z.touched,z.values]),Ae=o((function(e){return{setValue:function(t,r){return ce(e,t,r)},setTouched:function(t,r){return fe(e,t,r)},setError:function(t){return le(e,t)}}}),[ce,fe,le]),Oe=o((function(e){var t=I(e),r=t?e.name:e,n=N(z.values,r),i={name:r,value:n,onChange:de,onBlur:pe};if(t){var a=e.type,o=e.value,u=e.as,l=e.multiple;"checkbox"===a?void 0===o?i.checked=!!n:(i.checked=!(!Array.isArray(n)||!~n.indexOf(o)),i.value=o):"radio"===a?(i.checked=n===o,i.value=o):"select"===u&&l&&(i.value=i.value||[],i.multiple=!0)}return i}),[pe,de,z.values]),Fe=u((function(){return!h(A.current,z.values)}),[A.current,z.values]),Ie=u((function(){return void 0!==p?Fe?z.errors&&0===Object.keys(z.errors).length:!1!==p&&F(p)?p(b):p:z.errors&&0===Object.keys(z.errors).length}),[p,Fe,z.errors,b]);return S({},z,{initialValues:A.current,initialErrors:O.current,initialTouched:R.current,initialStatus:V.current,handleBlur:pe,handleChange:de,handleReset:_e,handleSubmit:Se,resetForm:te,setErrors:oe,setFormikState:he,setFieldTouched:fe,setFieldValue:ce,setFieldError:le,setStatus:me,setSubmitting:ye,setTouched:ae,setValues:ue,submitForm:Ee,validateForm:ee,validateField:re,isValid:Ie,dirty:Fe,unregisterField:ie,registerField:ne,getFieldProps:Oe,getFieldMeta:be,getFieldHelpers:Ae,validateOnBlur:d,validateOnChange:c,validateOnMount:v})}function j(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+"\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#"+r+"\n ")}function B(e){var t={};if(e.inner){if(0===e.inner.length)return L(t,e.path,e.message);var r=e.inner,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a;N(t,o.path)||(t=L(t,o.path,o.message))}}return t}function x(e,t,r,n){void 0===r&&(r=!1);var i=G(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:n||i})}function G(e){var r=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=String(n);!0===Array.isArray(e[i])?r[i]=e[i].map((function(e){return!0===Array.isArray(e)||t(e)?G(e):""!==e?e:void 0})):t(e[i])?r[i]=G(e[i]):r[i]=""!==e[i]?e[i]:void 0}return r}function H(t,r,n){var i=t.slice();return r.forEach((function(r,a){if(void 0===i[a]){var o=!1!==n.clone&&n.isMergeableObject(r);i[a]=o?e(Array.isArray(r)?[]:{},r,n):r}else n.isMergeableObject(r)?i[a]=e(t[a],r,n):-1===t.indexOf(r)&&i.push(r)})),i}var W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s:i;function K(e){var t=n(e);return W((function(){t.current=e})),o((function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.current.apply(void 0,r)}),[])}var Y=d((function(e,t){var r=e.action,n=T(e,["action"]),i=null!=r?r:"#",a=A(),o=a.handleReset,u=a.handleSubmit;return f("form",S({onSubmit:u,ref:t,onReset:o,action:i},n))}));Y.displayName="Form";var z=function(e,t,r){var n=X(e),i=n[t];return n.splice(t,1),n.splice(r,0,i),n},q=function(e,t,r){var n=X(e),i=n[t];return n[t]=n[r],n[r]=i,n},J=function(e,t,r){var n=X(e);return n.splice(t,0,r),n},Q=function(e,t,r){var n=X(e);return n[t]=r,n},X=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(S({},e,{length:t+1}))}return[]},Z=function(e,t){var r="function"==typeof e?e:t;return function(e){if(Array.isArray(e)||I(e)){var t=X(e);return r(t)}return e}};(function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)((function(n){var i=Z(r,e),o=Z(t,e),u=L(n.values,a,e(N(n.values,a))),l=r?i(N(n.errors,a)):void 0,c=t?o(N(n.touched,a)):void 0;return O(l)&&(l=void 0),O(c)&&(c=void 0),S({},n,{values:u,errors:r?L(n.errors,a,l):n.errors,touched:t?L(n.touched,a,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(X(t),[r(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(r){return q(r,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(r){return z(r,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(r){return J(r,e,t)}),(function(t){return J(t,e,null)}),(function(t){return J(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(r){return Q(r,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(r){var n=r?[e].concat(r):[e];return t=n.length,n}),(function(e){return e?[null].concat(e):[null]}),(function(e){return e?[null].concat(e):[null]})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(g(n)),n.pop=n.pop.bind(g(n)),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!h(N(e.formik.values,e.name),N(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},a.remove=function(e){var t;return this.updateArrayField((function(r){var n=r?X(r):[];return t||(t=n[e]),F(n.splice)&&n.splice(e,1),F(n.every)&&n.every((function(e){return void 0===e}))?[]:n}),!0,!0),t},a.pop=function(){var e;return this.updateArrayField((function(t){var r=t.slice();return e||(e=r&&r.pop&&r.pop()),r}),!0,!0),e},a.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,r=t.component,n=t.render,i=t.children,a=t.name,o=S({},e,{form:T(t.formik,["validate","validationSchema"]),name:a});return r?f(r,o):n?n(o):i?"function"==typeof i?i(o):V(i)?null:v.only(i):null},i}(p)).defaultProps={validateOnChange:!0};export{Y as Form,_ as FormikContext,b as FormikProvider,w as getActiveElement,N as getIn,J as insert,O as isEmptyArray,V as isEmptyChildren,F as isFunction,R as isInteger,I as isObject,k as isPromise,D as isString,z as move,G as prepareDataForValidation,Q as replace,L as setIn,P as setNestedObjectValues,q as swap,U as useFormik,A as useFormikContext,x as validateYupSchema,B as yupToFormErrors};
|
|
2
2
|
//# sourceMappingURL=formik.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../_virtual/index12.js";import{__require as r}from"./server/html-to-dom.js";import{__require as t}from"./types.js";var o;function n(){return o||(o=1,function(o){var n=e&&e.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var n=Object.getOwnPropertyDescriptor(r,t);n&&!("get"in n?!r.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,n)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),i=e&&e.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||n(r,e,t)},u=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var a=r();Object.defineProperty(o,"default",{enumerable:!0,get:function(){return u(a).default}}),i(t(),o)}(e)),e}export{n as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import a from"../../../_virtual/
|
|
1
|
+
import a from"../../../_virtual/index10.js";var r=a.default||a;export{r as default};
|
|
2
2
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/html-react-parser/esm/index.mjs"],"sourcesContent":["import HTMLReactParser from '../lib/index.js';\n\nexport {\n attributesToProps,\n Comment,\n domToReact,\n Element,\n htmlToDOM,\n ProcessingInstruction,\n Text,\n} from '../lib/index.js';\n\nexport default HTMLReactParser.default || HTMLReactParser;\n"],"names":["parse","HTMLReactParser","default"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../node_modules/html-react-parser/esm/index.mjs"],"sourcesContent":["import HTMLReactParser from '../lib/index.js';\n\nexport {\n attributesToProps,\n Comment,\n domToReact,\n Element,\n htmlToDOM,\n ProcessingInstruction,\n Text,\n} from '../lib/index.js';\n\nexport default HTMLReactParser.default || HTMLReactParser;\n"],"names":["parse","HTMLReactParser","default"],"mappings":"4CAYA,IAAAA,EAAeC,EAAgBC,SAAWD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../_virtual/index11.js";import{__require as t}from"../../html-dom-parser/lib/index.js";import{__require as r}from"./attributes-to-props.js";import{__require as o}from"./dom-to-react.js";import{__require as n}from"../../domhandler/lib/index.js";var i;function u(){return i||(i=1,function(i){var u=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.htmlToDOM=i.domToReact=i.attributesToProps=i.Text=i.ProcessingInstruction=i.Element=i.Comment=void 0,i.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,m.default)((0,a.default)(e,(null==t?void 0:t.htmlparser2)||l),t)};var a=u(t());i.htmlToDOM=a.default;var s=u(r());i.attributesToProps=s.default;var m=u(o());i.domToReact=m.default;var f=n();Object.defineProperty(i,"Comment",{enumerable:!0,get:function(){return f.Comment}}),Object.defineProperty(i,"Element",{enumerable:!0,get:function(){return f.Element}}),Object.defineProperty(i,"ProcessingInstruction",{enumerable:!0,get:function(){return f.ProcessingInstruction}}),Object.defineProperty(i,"Text",{enumerable:!0,get:function(){return f.Text}});var l={lowerCaseAttributeNames:!1}}(e)),e}export{u as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../../_virtual/index16.js";import{__require as r}from"./Parser.js";import{__require as t}from"../../../domhandler/lib/index.js";import{__require as n}from"./Tokenizer.js";import{__require as o}from"../../../domelementtype/lib/index.js";import{__require as u}from"../../../domutils/lib/index.js";var i;function a(){return i||(i=1,function(i){var a,c=e&&e.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,o)}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),l=e&&e.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),f=e&&e.__importStar||(a=function(e){return a=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r},a(e)},function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t=a(e),n=0;n<t.length;n++)"default"!==t[n]&&c(r,e,t[n]);return l(r,e),r}),d=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomUtils=i.getFeed=i.ElementType=i.QuoteType=i.Tokenizer=i.DefaultHandler=i.DomHandler=i.Parser=void 0,i.parseDocument=b,i.parseDOM=j,i.createDocumentStream=function(e,r,t){const n=new p.DomHandler((r=>e(r,n.root)),r,t);return new m.Parser(n,r)},i.createDomStream=function(e,r,t){const n=new p.DomHandler(e,r,t);return new m.Parser(n,r)},i.parseFeed=function(e,r=v){return(0,P.getFeed)(j(e,r))};const m=r();var s=r();Object.defineProperty(i,"Parser",{enumerable:!0,get:function(){return s.Parser}});const p=t();var _=t();function b(e,r){const t=new p.DomHandler(void 0,r);return new m.Parser(t,r).end(e),t.root}function j(e,r){return b(e,r).children}Object.defineProperty(i,"DomHandler",{enumerable:!0,get:function(){return _.DomHandler}}),Object.defineProperty(i,"DefaultHandler",{enumerable:!0,get:function(){return _.DomHandler}});var y=n();Object.defineProperty(i,"Tokenizer",{enumerable:!0,get:function(){return d(y).default}}),Object.defineProperty(i,"QuoteType",{enumerable:!0,get:function(){return y.QuoteType}}),i.ElementType=f(o());const P=u();var g=u();Object.defineProperty(i,"getFeed",{enumerable:!0,get:function(){return g.getFeed}});const v={xmlMode:!0};i.DomUtils=f(u())}(e)),e}export{a as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__module as r}from"../../_virtual/
|
|
1
|
+
import{__module as r}from"../../_virtual/index9.js";import{__require as e}from"./cjs/react-is.production.min.js";import{__require as o}from"./cjs/react-is.development.js";var s;function t(){return s||(s=1,"production"===process.env.NODE_ENV?r.exports=e():r.exports=o()),r.exports}export{t as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/
|
|
1
|
+
import{__exports as e}from"../../../_virtual/index14.js";import{__require as t}from"./possibleStandardNamesOptimized.js";var r;function n(){if(r)return e;r=1;function n(e,t,r,n,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new n(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new n(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new n(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new n(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new n(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new n(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new n(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new n(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new n(e,5,!1,e.toLowerCase(),null,!1,!1)}));const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(a,i);o[t]=new n(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(a,i);o[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(a,i);o[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new n(e,1,!1,e.toLowerCase(),null,!1,!1)}));o.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new n(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:l,SAME:s,possibleStandardNames:c}=t(),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const r=c[t];return r===s?e[t]=t:r===l?e[t.toLowerCase()]=t:e[t]=r,e}),{});return e.BOOLEAN=3,e.BOOLEANISH_STRING=2,e.NUMERIC=5,e.OVERLOADED_BOOLEAN=4,e.POSITIVE_NUMERIC=6,e.RESERVED=0,e.STRING=1,e.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},e.isCustomAttribute=u,e.possibleStandardNames=p,e}export{n as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__exports as r}from"../../../_virtual/
|
|
1
|
+
import{__exports as r}from"../../../_virtual/index18.js";import{__require as e}from"../../inline-style-parser/index.js";var t;function n(){if(t)return r;t=1;var n=r&&r.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r,e){var t=null;if(!r||"string"!=typeof r)return t;var n=(0,u.default)(r),i="function"==typeof e;return n.forEach((function(r){if("declaration"===r.type){var n=r.property,u=r.value;i?e(n,u,r):u&&((t=t||{})[n]=u)}})),t};var u=n(e());return r}export{n as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__module as r}from"../../_virtual/
|
|
1
|
+
import{__module as r}from"../../_virtual/index7.js";var e;function n(){if(e)return r.exports;function n(r,e){var n=r.length,t=new Array(n),o={},a=n,i=function(r){for(var e=new Map,n=0,t=r.length;n<t;n++){var o=r[n];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}(e),d=function(r){for(var e=new Map,n=0,t=r.length;n<t;n++)e.set(r[n],n);return e}(r);for(e.forEach((function(r){if(!d.has(r[0])||!d.has(r[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)o[a]||f(r[a],a,new Set);return t;function f(r,e,a){if(a.has(r)){var s;try{s=", node was:"+JSON.stringify(r)}catch(r){s=""}throw new Error("Cyclic dependency"+s)}if(!d.has(r))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(r));if(!o[e]){o[e]=!0;var u=i.get(r)||new Set;if(e=(u=Array.from(u)).length){a.add(r);do{var w=u[--e];f(w,d.get(w),a)}while(e);a.delete(r)}t[--n]=r}}}return e=1,r.exports=function(r){return n(function(r){for(var e=new Set,n=0,t=r.length;n<t;n++){var o=r[n];e.add(o[0]),e.add(o[1])}return Array.from(e)}(r),r)},r.exports.array=n,r.exports}export{n as __require};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e}from"../../_virtual/index3.js";import{t}from"../../_virtual/index4.js";import s from"../../_virtual/index5.js";const r=Object.prototype.toString,n=Error.prototype.toString,i=RegExp.prototype.toString,a="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",o=/^Symbol\((.*)\)(.*)$/;function l(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?`"${e}"`:e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return a.call(e).replace(o,"Symbol($1)");const l=r.call(e).slice(8,-1);return"Date"===l?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===l||e instanceof Error?"["+n.call(e)+"]":"RegExp"===l?i.call(e):null}function u(e,t){let s=l(e,t);return null!==s?s:JSON.stringify(e,(function(e,s){let r=l(this[e],t);return null!==r?r:s}),2)}function c(e){return null==e?[]:[].concat(e)}let h,p,d,f=/\$\{\s*(\w+)\s*\}/g;h=Symbol.toStringTag;class m{constructor(e,t,s,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[h]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=r,this.errors=[],this.inner=[],c(e).forEach((e=>{if(y.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}p=Symbol.hasInstance,d=Symbol.toStringTag;class y extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),"string"==typeof e?e.replace(f,((e,s)=>u(t[s]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,s,r,n){const i=new m(e,t,s,r);if(n)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[d]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,y)}static[p](e){return m[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let v={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:s,originalValue:r})=>{const n=null!=r&&r!==s?` (cast from the value \`${u(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${u(s,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${u(s,!0)}\``+n}},g={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},b={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F={isValue:"${path} field must be ${value}"},_={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},w={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},x={notType:e=>{const{path:t,value:s,spec:r}=e,n=r.types.length;if(Array.isArray(s)){if(s.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``;if(s.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``}return y.formatError(v.notType,e)}};Object.assign(Object.create(null),{mixed:v,string:g,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:b,object:_,array:w,boolean:F,tuple:x});const T=e=>e&&e.__isYupSchema__;class ${static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:r,otherwise:n}=t,i="function"==typeof s?s:(...e)=>e.every((e=>e===s));return new $(e,((e,t)=>{var s;let a=i(...e)?r:n;return null!=(s=null==a?void 0:a(t))?s:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(s,e,t);if(void 0===r||r===e)return e;if(!T(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const O="$",k=".";class E{constructor(t,s={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===O,this.isValue=this.key[0]===k,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?O:this.isValue?k:"";this.path=this.key.slice(r.length),this.getter=this.path&&e.getter(this.path,!0),this.map=s.map}getValue(e,t,s){let r=this.isContext?s:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}E.prototype.__isYupRef=!0;const S=e=>null==e;function j(e){function t({value:t,path:s="",options:r,originalValue:n,schema:i},a,o){const{name:l,test:u,params:c,message:h,skipAbsent:p}=e;let{parent:d,context:f,abortEarly:m=i.spec.abortEarly,disableStackTrace:v=i.spec.disableStackTrace}=r;function g(e){return E.isRef(e)?e.getValue(t,d,f):e}function b(e={}){const r=Object.assign({value:t,originalValue:n,label:i.spec.label,path:e.path||s,spec:i.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new y(y.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const F=m?a:o;let _={path:s,parent:d,type:l,from:r.from,createError:b,resolve:g,options:r,originalValue:n,schema:i};const w=e=>{y.isError(e)?F(e):e?o(null):F(b())},x=e=>{y.isError(e)?F(e):a(e)};if(p&&S(t))return w(!0);let T;try{var $;if(T=u.call(_,t,_),"function"==typeof(null==($=T)?void 0:$.then)){if(r.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(T).then(w,x)}}catch(e){return void x(e)}w(T)}return t.OPTIONS=e,t}function A(t,s,r,n=r){let i,a,o;return s?(e.forEach(s,((e,l,u)=>{let c=l?e.slice(1,e.length-1):e,h="tuple"===(t=t.resolve({context:n,parent:i,value:r})).type,p=u?parseInt(c,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${e}, in the path: ${s}. because there is no value at that index. `);i=r,r=r&&r[p],t=h?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${s}. (failed at: ${o} which is a type: "${t.type}")`);i=r,r=r&&r[c],t=t.fields[c]}a=c,o=l?"["+e+"]":"."+e})),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:s,schema:t}}class D extends Set{describe(){const e=[];for(const t of this.values())e.push(E.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new D(this.values())}merge(e,t){const s=this.clone();return e.forEach((e=>s.add(e))),t.forEach((e=>s.delete(e))),s}}function C(e,t=new Map){if(T(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let s;if(e instanceof Date)s=new Date(e.getTime()),t.set(e,s);else if(e instanceof RegExp)s=new RegExp(e),t.set(e,s);else if(Array.isArray(e)){s=new Array(e.length),t.set(e,s);for(let r=0;r<e.length;r++)s[r]=C(e[r],t)}else if(e instanceof Map){s=new Map,t.set(e,s);for(const[r,n]of e.entries())s.set(r,C(n,t))}else if(e instanceof Set){s=new Set,t.set(e,s);for(const r of e)s.add(C(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);s={},t.set(e,s);for(const[r,n]of Object.entries(e))s[r]=C(n,t)}return s}class V{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new D,this._blacklist=new D,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(v.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=C(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const r=Object.assign({},t.spec,s.spec);return s.spec=r,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce(((t,s)=>s.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,r,n;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(s=e.abortEarly)?s:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(n=e.disableStackTrace)?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,n=s._cast(e,t);if(!1!==t.assert&&!s.isType(n)){if(r&&S(n))return n;let i=u(e),a=u(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return n}_cast(e,t){let s=void 0===e?e:this.transforms.reduce(((t,s)=>s.call(this,t,e,this)),e);return void 0===s&&(s=this.getDefault(t)),s}_validate(e,t={},s,r){let{path:n,originalValue:i=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:n,value:o,originalValue:i,options:t,tests:l},s,(e=>{if(e.length)return r(e,o);this.runTests({path:n,value:o,originalValue:i,options:t,tests:this.tests},s,r)}))}runTests(e,t,s){let r=!1,{tests:n,value:i,originalValue:a,path:o,options:l}=e,u=e=>{r||(r=!0,t(e,i))},c=e=>{r||(r=!0,s(e,i))},h=n.length,p=[];if(!h)return c([]);let d={value:i,originalValue:a,path:o,options:l,schema:this};for(let e=0;e<n.length;e++){(0,n[e])(d,u,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--h<=0&&c(p)}))}}asNestedTest({key:e,index:t,parent:s,parentPath:r,originalParent:n,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let l=s[a];const u=Object.assign({},i,{strict:!0,parent:s,value:l,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,s)=>this.resolve(u)._validate(l,u,t,s)}validate(e,t){var s;let r=this.resolve(Object.assign({},t,{value:e})),n=null!=(s=null==t?void 0:t.disableStackTrace)?s:r.spec.disableStackTrace;return new Promise(((s,i)=>r._validate(e,t,((e,t)=>{y.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new y(e,t,void 0,void 0,n)):s(t)}))))}validateSync(e,t){var s;let r,n=this.resolve(Object.assign({},t,{value:e})),i=null!=(s=null==t?void 0:t.disableStackTrace)?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw y.isError(e)&&(e.value=t),e}),((t,s)=>{if(t.length)throw new y(t,e,void 0,void 0,i);r=s})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(y.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(y.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):C(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=j({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=j({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),s}optional(){return this.optionality(!0)}defined(e=v.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=v.notNull){return this.nullability(!1,e)}required(e=v.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=v.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let s=this.clone(),r=j(t),n=t.exclusive||t.name&&!0===s.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(n)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),s.tests.push(r),s}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let s=this.clone(),r=c(e).map((e=>new E(e)));return r.forEach((e=>{e.isSibling&&s.deps.push(e.key)})),s.conditions.push("function"==typeof t?new $(r,t):$.fromOptions(r,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=j({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=v.oneOf){let s=this.clone();return e.forEach((e=>{s._whitelist.add(e),s._blacklist.delete(e)})),s.internalTests.whiteList=j({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,s=t.resolveAll(this.resolve);return!!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}notOneOf(e,t=v.notOneOf){let s=this.clone();return e.forEach((e=>{s._blacklist.add(e),s._whitelist.delete(e)})),s.internalTests.blacklist=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,s=t.resolveAll(this.resolve);return!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:r,optional:n,nullable:i}=t.spec;return{meta:r,label:s,optional:n,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,s)=>s.findIndex((t=>t.name===e.name))===t))}}}V.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])V.prototype[`${e}At`]=function(t,s,r={}){const{parent:n,parentPath:i,schema:a}=A(this,t,s,r.context);return a[e](n&&n[i],Object.assign({},r,{parent:n,path:t}))};for(const e of["equals","is"])V.prototype[e]=V.prototype.oneOf;for(const e of["not","nope"])V.prototype[e]=V.prototype.notOneOf;const N=()=>!0;function z(e){return new P(e)}class P extends V{constructor(e){super("function"==typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:N},e))}}function q(){return new I}z.prototype=P.prototype;class I extends V{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>S(e)||!0===e})}isFalse(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>S(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}q.prototype=I.prototype;const M=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function R(e){var t,s;const r=M.exec(e);return r?{year:U(r[1]),month:U(r[2],1)-1,day:U(r[3],1),hour:U(r[4]),minute:U(r[5]),second:U(r[6]),millisecond:r[7]?U(r[7].substring(0,3)):0,precision:null!=(t=null==(s=r[7])?void 0:s.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:U(r[10]),minuteOffset:U(r[11])}:null}function U(e,t=0){return Number(e)||t}let Z=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,L=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,K=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),J=e=>S(e)||e===e.trim(),B={}.toString();function G(){return new H}class H extends V{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(!s.spec.coerce||s.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===B?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||v.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=g.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=g.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=g.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let s,r,n=!1;return t&&("object"==typeof t?({excludeEmptyString:n=!1,message:s,name:r}=t):s=t),this.test({name:r||"matches",message:s||g.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&n||-1!==t.search(e)})}email(e=g.email){return this.matches(Z,{name:"email",message:e,excludeEmptyString:!0})}url(e=g.url){return this.matches(Y,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=g.uuid){return this.matches(L,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,s,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:s}=e):r=e),this.matches(K,{name:"datetime",message:r||g.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||g.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const s=R(e);return!!s&&!!s.z}}).test({name:"datetime_precision",message:r||g.datetime_precision,params:{precision:s},skipAbsent:!0,test:e=>{if(!e||null==s)return!0;const t=R(e);return!!t&&t.precision===s}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=g.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:J})}lowercase(e=g.lowercase){return this.transform((e=>S(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toLowerCase()})}uppercase(e=g.uppercase){return this.transform((e=>S(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toUpperCase()})}}G.prototype=H.prototype;let Q=new Date("");class W extends V{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,s)=>!s.spec.coerce||s.isType(e)||null===e?e:(e=function(e){const t=R(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let s=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(s=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(s=0-s)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+s,t.second,t.millisecond)}(e),isNaN(e)?W.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let s;if(E.isRef(e))s=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=r}return s}min(e,t=b.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(s)}})}max(e,t=b.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(s)}})}}function X(e,t){let s=1/0;return e.some(((e,r)=>{var n;if(null!=(n=t.path)&&n.includes(e))return s=r,!0})),s}function ee(e){return(t,s)=>X(e,t)-X(e,s)}W.INVALID_DATE=Q,W.prototype;const te=(e,t,s)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return s.isType(r)?r:e};function se(e){if("fields"in e){const t={};for(const[s,r]of Object.entries(e.fields))t[s]=se(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=se(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(se)}):"optional"in e?e.optional():e}let re=e=>"[object Object]"===Object.prototype.toString.call(e);function ne(e,t){let s=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===s.indexOf(e)))}const ie=ee([]);function ae(e){return new oe(e)}class oe extends V{constructor(e){super({type:"object",check:e=>re(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ie,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var s;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let n=this.fields,i=null!=(s=t.stripUnknown)?s:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),o={},l=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),u=!1;for(const e of a){let s=n[e],a=e in r;if(s){let n,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,s=s.resolve({value:i,context:t.context,parent:o});let a=s instanceof V?s.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}n=t.__validating&&c?r[e]:s.cast(r[e],l),void 0!==n&&(o[e]=n)}else a&&!i&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(u=!0)}return u?o:r}_validate(e,t={},s,r){let{from:n=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...n],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,((e,n)=>{if(!a||!re(n))return void r(e,n);i=i||n;let o=[];for(let e of this._nodes){let s=this.fields[e];s&&!E.isRef(s)&&o.push(s.asNestedTest({options:t,key:e,parent:n,parentPath:t.path,originalParent:i}))}this.runTests({tests:o,value:n,originalValue:i,options:t},s,(t=>{r(t.sort(this._sortErrors).concat(e),n)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=s[e];s[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(s,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((s=>{var r;const n=this.fields[s];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(i):void 0})),t}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=function(t,r=[]){let n=[],i=new Set,a=new Set(r.map((([e,t])=>`${e}-${t}`)));function o(t,s){let r=e.split(t)[0];i.add(r),a.has(`${s}-${r}`)||n.push([s,r])}for(const e of Object.keys(t)){let s=t[e];i.add(e),E.isRef(s)&&s.isSibling?o(s.path,e):T(s)&&"deps"in s&&s.deps.forEach((t=>o(t,e)))}return s.array(Array.from(i),n).reverse()}(t,r),n._sortErrors=ee(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(e,t=[]){return this.clone().withMutation((s=>{let r=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),r)}))}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return se(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter((([t,s])=>e.includes(t)&&e.includes(s))))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(t,s,r){let n=e.getter(t,!0);return this.transform((i=>{if(!i)return i;let a=i;return((t,s)=>{const r=[...e.normalizePath(s)];if(1===r.length)return r[0]in t;let n=r.pop(),i=e.getter(e.join(r),!0)(t);return!(!i||!(n in i))})(i,t)&&(a=Object.assign({},i),r||delete a[t],a[s]=n(i)),a}))}json(){return this.transform(te)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_.exact,test(e){if(null==e)return!0;const t=ne(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const s=ne(this.schema,t);return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=_.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const s={};for(const r of Object.keys(t))s[e(r)]=t[r];return s}))}camelCase(){return this.transformKeys(t.camelCase)}snakeCase(){return this.transformKeys(t.snakeCase)}constantCase(){return this.transformKeys((e=>t.snakeCase(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[n]})),s.fields[n]=i.describe(t)}return s}}function le(e){return new ue(e)}ae.prototype=oe.prototype;class ue extends V{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let r=!1;const n=s.map(((e,s)=>{const n=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${s}]`}));return n!==e&&(r=!0),n}));return r?n:s}_validate(e,t={},s,r){var n;let i=this.innerType,a=null!=(n=t.recursive)?n:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,s,((n,o)=>{var l;if(!a||!i||!this._typeCheck(o))return void r(n,o);let u=new Array(o.length);for(let s=0;s<o.length;s++){var c;u[s]=i.asNestedTest({options:t,index:s,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},s,(e=>r(e.concat(n),o)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(te)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!T(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+u(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=w.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||w.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||w.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,s,r)=>!e(t,s,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var r;let n=e;null!=(r=n)&&r.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}function ce(e){return new pe(e)}function he(e){try{return e()}catch(e){if(y.isError(e))return Promise.reject(e);throw e}}le.prototype=ue.prototype;class pe{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let s=this.builder(e,t);if(!T(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new pe(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:s,parent:r,options:n}=e,i=r[null!=s?s:t];return this._resolve(i,Object.assign({},n,{value:i,parent:r})).asNestedTest(e)}validate(e,t){return he((()=>this._resolve(e,t).validate(e,t)))}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,s){return he((()=>this._resolve(t,s).validateAt(e,t,s)))}validateSyncAt(e,t,s){return this._resolve(t,s).validateSyncAt(e,t,s)}isValid(e,t){try{return this._resolve(e,t).isValid(e,t)}catch(e){if(y.isError(e))return Promise.resolve(!1);throw e}}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}}export{ue as ArraySchema,I as BooleanSchema,W as DateSchema,pe as LazySchema,P as MixedSchema,oe as ObjectSchema,V as Schema,H as StringSchema,y as ValidationError,le as array,q as bool,q as boolean,A as getIn,T as isSchema,ce as lazy,z as mixed,ae as object,u as printValue,G as string};
|
|
1
|
+
import{p as e}from"../../_virtual/index5.js";import{t}from"../../_virtual/index4.js";import s from"../../_virtual/index6.js";const r=Object.prototype.toString,n=Error.prototype.toString,i=RegExp.prototype.toString,a="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",o=/^Symbol\((.*)\)(.*)$/;function l(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?`"${e}"`:e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return a.call(e).replace(o,"Symbol($1)");const l=r.call(e).slice(8,-1);return"Date"===l?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===l||e instanceof Error?"["+n.call(e)+"]":"RegExp"===l?i.call(e):null}function u(e,t){let s=l(e,t);return null!==s?s:JSON.stringify(e,(function(e,s){let r=l(this[e],t);return null!==r?r:s}),2)}function c(e){return null==e?[]:[].concat(e)}let h,p,d,f=/\$\{\s*(\w+)\s*\}/g;h=Symbol.toStringTag;class m{constructor(e,t,s,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[h]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=r,this.errors=[],this.inner=[],c(e).forEach((e=>{if(y.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}p=Symbol.hasInstance,d=Symbol.toStringTag;class y extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),"string"==typeof e?e.replace(f,((e,s)=>u(t[s]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,s,r,n){const i=new m(e,t,s,r);if(n)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[d]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,y)}static[p](e){return m[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let v={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:s,originalValue:r})=>{const n=null!=r&&r!==s?` (cast from the value \`${u(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${u(s,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${u(s,!0)}\``+n}},g={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},b={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F={isValue:"${path} field must be ${value}"},_={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},w={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},x={notType:e=>{const{path:t,value:s,spec:r}=e,n=r.types.length;if(Array.isArray(s)){if(s.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``;if(s.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``}return y.formatError(v.notType,e)}};Object.assign(Object.create(null),{mixed:v,string:g,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:b,object:_,array:w,boolean:F,tuple:x});const T=e=>e&&e.__isYupSchema__;class ${static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:r,otherwise:n}=t,i="function"==typeof s?s:(...e)=>e.every((e=>e===s));return new $(e,((e,t)=>{var s;let a=i(...e)?r:n;return null!=(s=null==a?void 0:a(t))?s:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(s,e,t);if(void 0===r||r===e)return e;if(!T(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const O="$",k=".";class E{constructor(t,s={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===O,this.isValue=this.key[0]===k,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?O:this.isValue?k:"";this.path=this.key.slice(r.length),this.getter=this.path&&e.getter(this.path,!0),this.map=s.map}getValue(e,t,s){let r=this.isContext?s:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}E.prototype.__isYupRef=!0;const S=e=>null==e;function j(e){function t({value:t,path:s="",options:r,originalValue:n,schema:i},a,o){const{name:l,test:u,params:c,message:h,skipAbsent:p}=e;let{parent:d,context:f,abortEarly:m=i.spec.abortEarly,disableStackTrace:v=i.spec.disableStackTrace}=r;function g(e){return E.isRef(e)?e.getValue(t,d,f):e}function b(e={}){const r=Object.assign({value:t,originalValue:n,label:i.spec.label,path:e.path||s,spec:i.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new y(y.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const F=m?a:o;let _={path:s,parent:d,type:l,from:r.from,createError:b,resolve:g,options:r,originalValue:n,schema:i};const w=e=>{y.isError(e)?F(e):e?o(null):F(b())},x=e=>{y.isError(e)?F(e):a(e)};if(p&&S(t))return w(!0);let T;try{var $;if(T=u.call(_,t,_),"function"==typeof(null==($=T)?void 0:$.then)){if(r.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(T).then(w,x)}}catch(e){return void x(e)}w(T)}return t.OPTIONS=e,t}function A(t,s,r,n=r){let i,a,o;return s?(e.forEach(s,((e,l,u)=>{let c=l?e.slice(1,e.length-1):e,h="tuple"===(t=t.resolve({context:n,parent:i,value:r})).type,p=u?parseInt(c,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${e}, in the path: ${s}. because there is no value at that index. `);i=r,r=r&&r[p],t=h?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${s}. (failed at: ${o} which is a type: "${t.type}")`);i=r,r=r&&r[c],t=t.fields[c]}a=c,o=l?"["+e+"]":"."+e})),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:s,schema:t}}class D extends Set{describe(){const e=[];for(const t of this.values())e.push(E.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new D(this.values())}merge(e,t){const s=this.clone();return e.forEach((e=>s.add(e))),t.forEach((e=>s.delete(e))),s}}function C(e,t=new Map){if(T(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let s;if(e instanceof Date)s=new Date(e.getTime()),t.set(e,s);else if(e instanceof RegExp)s=new RegExp(e),t.set(e,s);else if(Array.isArray(e)){s=new Array(e.length),t.set(e,s);for(let r=0;r<e.length;r++)s[r]=C(e[r],t)}else if(e instanceof Map){s=new Map,t.set(e,s);for(const[r,n]of e.entries())s.set(r,C(n,t))}else if(e instanceof Set){s=new Set,t.set(e,s);for(const r of e)s.add(C(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);s={},t.set(e,s);for(const[r,n]of Object.entries(e))s[r]=C(n,t)}return s}class V{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new D,this._blacklist=new D,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(v.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=C(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const r=Object.assign({},t.spec,s.spec);return s.spec=r,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce(((t,s)=>s.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,r,n;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(s=e.abortEarly)?s:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(n=e.disableStackTrace)?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,n=s._cast(e,t);if(!1!==t.assert&&!s.isType(n)){if(r&&S(n))return n;let i=u(e),a=u(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return n}_cast(e,t){let s=void 0===e?e:this.transforms.reduce(((t,s)=>s.call(this,t,e,this)),e);return void 0===s&&(s=this.getDefault(t)),s}_validate(e,t={},s,r){let{path:n,originalValue:i=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:n,value:o,originalValue:i,options:t,tests:l},s,(e=>{if(e.length)return r(e,o);this.runTests({path:n,value:o,originalValue:i,options:t,tests:this.tests},s,r)}))}runTests(e,t,s){let r=!1,{tests:n,value:i,originalValue:a,path:o,options:l}=e,u=e=>{r||(r=!0,t(e,i))},c=e=>{r||(r=!0,s(e,i))},h=n.length,p=[];if(!h)return c([]);let d={value:i,originalValue:a,path:o,options:l,schema:this};for(let e=0;e<n.length;e++){(0,n[e])(d,u,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--h<=0&&c(p)}))}}asNestedTest({key:e,index:t,parent:s,parentPath:r,originalParent:n,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let l=s[a];const u=Object.assign({},i,{strict:!0,parent:s,value:l,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,s)=>this.resolve(u)._validate(l,u,t,s)}validate(e,t){var s;let r=this.resolve(Object.assign({},t,{value:e})),n=null!=(s=null==t?void 0:t.disableStackTrace)?s:r.spec.disableStackTrace;return new Promise(((s,i)=>r._validate(e,t,((e,t)=>{y.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new y(e,t,void 0,void 0,n)):s(t)}))))}validateSync(e,t){var s;let r,n=this.resolve(Object.assign({},t,{value:e})),i=null!=(s=null==t?void 0:t.disableStackTrace)?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw y.isError(e)&&(e.value=t),e}),((t,s)=>{if(t.length)throw new y(t,e,void 0,void 0,i);r=s})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(y.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(y.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):C(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=j({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=j({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),s}optional(){return this.optionality(!0)}defined(e=v.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=v.notNull){return this.nullability(!1,e)}required(e=v.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=v.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let s=this.clone(),r=j(t),n=t.exclusive||t.name&&!0===s.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(n)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),s.tests.push(r),s}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let s=this.clone(),r=c(e).map((e=>new E(e)));return r.forEach((e=>{e.isSibling&&s.deps.push(e.key)})),s.conditions.push("function"==typeof t?new $(r,t):$.fromOptions(r,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=j({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=v.oneOf){let s=this.clone();return e.forEach((e=>{s._whitelist.add(e),s._blacklist.delete(e)})),s.internalTests.whiteList=j({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,s=t.resolveAll(this.resolve);return!!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}notOneOf(e,t=v.notOneOf){let s=this.clone();return e.forEach((e=>{s._blacklist.add(e),s._whitelist.delete(e)})),s.internalTests.blacklist=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,s=t.resolveAll(this.resolve);return!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:r,optional:n,nullable:i}=t.spec;return{meta:r,label:s,optional:n,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,s)=>s.findIndex((t=>t.name===e.name))===t))}}}V.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])V.prototype[`${e}At`]=function(t,s,r={}){const{parent:n,parentPath:i,schema:a}=A(this,t,s,r.context);return a[e](n&&n[i],Object.assign({},r,{parent:n,path:t}))};for(const e of["equals","is"])V.prototype[e]=V.prototype.oneOf;for(const e of["not","nope"])V.prototype[e]=V.prototype.notOneOf;const N=()=>!0;function z(e){return new P(e)}class P extends V{constructor(e){super("function"==typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:N},e))}}function q(){return new I}z.prototype=P.prototype;class I extends V{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>S(e)||!0===e})}isFalse(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>S(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}q.prototype=I.prototype;const M=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function R(e){var t,s;const r=M.exec(e);return r?{year:U(r[1]),month:U(r[2],1)-1,day:U(r[3],1),hour:U(r[4]),minute:U(r[5]),second:U(r[6]),millisecond:r[7]?U(r[7].substring(0,3)):0,precision:null!=(t=null==(s=r[7])?void 0:s.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:U(r[10]),minuteOffset:U(r[11])}:null}function U(e,t=0){return Number(e)||t}let Z=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,L=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,K=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),J=e=>S(e)||e===e.trim(),B={}.toString();function G(){return new H}class H extends V{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(!s.spec.coerce||s.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===B?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||v.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=g.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=g.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=g.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let s,r,n=!1;return t&&("object"==typeof t?({excludeEmptyString:n=!1,message:s,name:r}=t):s=t),this.test({name:r||"matches",message:s||g.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&n||-1!==t.search(e)})}email(e=g.email){return this.matches(Z,{name:"email",message:e,excludeEmptyString:!0})}url(e=g.url){return this.matches(Y,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=g.uuid){return this.matches(L,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,s,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:s}=e):r=e),this.matches(K,{name:"datetime",message:r||g.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||g.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const s=R(e);return!!s&&!!s.z}}).test({name:"datetime_precision",message:r||g.datetime_precision,params:{precision:s},skipAbsent:!0,test:e=>{if(!e||null==s)return!0;const t=R(e);return!!t&&t.precision===s}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=g.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:J})}lowercase(e=g.lowercase){return this.transform((e=>S(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toLowerCase()})}uppercase(e=g.uppercase){return this.transform((e=>S(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toUpperCase()})}}G.prototype=H.prototype;let Q=new Date("");class W extends V{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,s)=>!s.spec.coerce||s.isType(e)||null===e?e:(e=function(e){const t=R(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let s=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(s=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(s=0-s)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+s,t.second,t.millisecond)}(e),isNaN(e)?W.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let s;if(E.isRef(e))s=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=r}return s}min(e,t=b.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(s)}})}max(e,t=b.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(s)}})}}function X(e,t){let s=1/0;return e.some(((e,r)=>{var n;if(null!=(n=t.path)&&n.includes(e))return s=r,!0})),s}function ee(e){return(t,s)=>X(e,t)-X(e,s)}W.INVALID_DATE=Q,W.prototype;const te=(e,t,s)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return s.isType(r)?r:e};function se(e){if("fields"in e){const t={};for(const[s,r]of Object.entries(e.fields))t[s]=se(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=se(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(se)}):"optional"in e?e.optional():e}let re=e=>"[object Object]"===Object.prototype.toString.call(e);function ne(e,t){let s=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===s.indexOf(e)))}const ie=ee([]);function ae(e){return new oe(e)}class oe extends V{constructor(e){super({type:"object",check:e=>re(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ie,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var s;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let n=this.fields,i=null!=(s=t.stripUnknown)?s:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),o={},l=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),u=!1;for(const e of a){let s=n[e],a=e in r;if(s){let n,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,s=s.resolve({value:i,context:t.context,parent:o});let a=s instanceof V?s.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}n=t.__validating&&c?r[e]:s.cast(r[e],l),void 0!==n&&(o[e]=n)}else a&&!i&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(u=!0)}return u?o:r}_validate(e,t={},s,r){let{from:n=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...n],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,((e,n)=>{if(!a||!re(n))return void r(e,n);i=i||n;let o=[];for(let e of this._nodes){let s=this.fields[e];s&&!E.isRef(s)&&o.push(s.asNestedTest({options:t,key:e,parent:n,parentPath:t.path,originalParent:i}))}this.runTests({tests:o,value:n,originalValue:i,options:t},s,(t=>{r(t.sort(this._sortErrors).concat(e),n)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=s[e];s[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(s,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((s=>{var r;const n=this.fields[s];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(i):void 0})),t}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=function(t,r=[]){let n=[],i=new Set,a=new Set(r.map((([e,t])=>`${e}-${t}`)));function o(t,s){let r=e.split(t)[0];i.add(r),a.has(`${s}-${r}`)||n.push([s,r])}for(const e of Object.keys(t)){let s=t[e];i.add(e),E.isRef(s)&&s.isSibling?o(s.path,e):T(s)&&"deps"in s&&s.deps.forEach((t=>o(t,e)))}return s.array(Array.from(i),n).reverse()}(t,r),n._sortErrors=ee(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(e,t=[]){return this.clone().withMutation((s=>{let r=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),r)}))}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return se(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter((([t,s])=>e.includes(t)&&e.includes(s))))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(t,s,r){let n=e.getter(t,!0);return this.transform((i=>{if(!i)return i;let a=i;return((t,s)=>{const r=[...e.normalizePath(s)];if(1===r.length)return r[0]in t;let n=r.pop(),i=e.getter(e.join(r),!0)(t);return!(!i||!(n in i))})(i,t)&&(a=Object.assign({},i),r||delete a[t],a[s]=n(i)),a}))}json(){return this.transform(te)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_.exact,test(e){if(null==e)return!0;const t=ne(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const s=ne(this.schema,t);return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=_.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const s={};for(const r of Object.keys(t))s[e(r)]=t[r];return s}))}camelCase(){return this.transformKeys(t.camelCase)}snakeCase(){return this.transformKeys(t.snakeCase)}constantCase(){return this.transformKeys((e=>t.snakeCase(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[n]})),s.fields[n]=i.describe(t)}return s}}function le(e){return new ue(e)}ae.prototype=oe.prototype;class ue extends V{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let r=!1;const n=s.map(((e,s)=>{const n=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${s}]`}));return n!==e&&(r=!0),n}));return r?n:s}_validate(e,t={},s,r){var n;let i=this.innerType,a=null!=(n=t.recursive)?n:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,s,((n,o)=>{var l;if(!a||!i||!this._typeCheck(o))return void r(n,o);let u=new Array(o.length);for(let s=0;s<o.length;s++){var c;u[s]=i.asNestedTest({options:t,index:s,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},s,(e=>r(e.concat(n),o)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(te)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!T(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+u(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=w.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||w.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||w.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,s,r)=>!e(t,s,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var r;let n=e;null!=(r=n)&&r.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}function ce(e){return new pe(e)}function he(e){try{return e()}catch(e){if(y.isError(e))return Promise.reject(e);throw e}}le.prototype=ue.prototype;class pe{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let s=this.builder(e,t);if(!T(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new pe(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:s,parent:r,options:n}=e,i=r[null!=s?s:t];return this._resolve(i,Object.assign({},n,{value:i,parent:r})).asNestedTest(e)}validate(e,t){return he((()=>this._resolve(e,t).validate(e,t)))}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,s){return he((()=>this._resolve(t,s).validateAt(e,t,s)))}validateSyncAt(e,t,s){return this._resolve(t,s).validateSyncAt(e,t,s)}isValid(e,t){try{return this._resolve(e,t).isValid(e,t)}catch(e){if(y.isError(e))return Promise.resolve(!1);throw e}}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}}export{ue as ArraySchema,I as BooleanSchema,W as DateSchema,pe as LazySchema,P as MixedSchema,oe as ObjectSchema,V as Schema,H as StringSchema,y as ValidationError,le as array,q as bool,q as boolean,A as getIn,T as isSchema,ce as lazy,z as mixed,ae as object,u as printValue,G as string};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseIcon.svg.js","sources":["../../../../src/assets/icons/CloseIcon.svg"],"sourcesContent":["export default \"2e10bbdb265df50e.svg\""],"names":["CloseIcon"],"mappings":"AAAA,IAAeA,EAAA"}
|