@remoteoss/json-schema-form 1.2.0 → 1.2.1

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/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- var us=Object.create;var xr=Object.defineProperty;var fs=Object.getOwnPropertyDescriptor;var ls=Object.getOwnPropertyNames;var cs=Object.getPrototypeOf,ps=Object.prototype.hasOwnProperty;var u=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var ds=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of ls(r))!ps.call(e,i)&&i!==t&&xr(e,i,{get:()=>r[i],enumerable:!(n=fs(r,i))||n.enumerable});return e};var q=(e,r,t)=>(t=e!=null?us(cs(e)):{},ds(r||!e||!e.__esModule?xr(t,"default",{value:e,enumerable:!0}):t,e));var K=u((Dm,Or)=>{"use strict";Or.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Le=u(A=>{"use strict";var g=K(),Me=()=>[{type:g.RANGE,from:48,to:57}],Sr=()=>[{type:g.CHAR,value:95},{type:g.RANGE,from:97,to:122},{type:g.RANGE,from:65,to:90}].concat(Me()),Er=()=>[{type:g.CHAR,value:9},{type:g.CHAR,value:10},{type:g.CHAR,value:11},{type:g.CHAR,value:12},{type:g.CHAR,value:13},{type:g.CHAR,value:32},{type:g.CHAR,value:160},{type:g.CHAR,value:5760},{type:g.RANGE,from:8192,to:8202},{type:g.CHAR,value:8232},{type:g.CHAR,value:8233},{type:g.CHAR,value:8239},{type:g.CHAR,value:8287},{type:g.CHAR,value:12288},{type:g.CHAR,value:65279}],hs=()=>[{type:g.CHAR,value:10},{type:g.CHAR,value:13},{type:g.CHAR,value:8232},{type:g.CHAR,value:8233}];A.words=()=>({type:g.SET,set:Sr(),not:!1});A.notWords=()=>({type:g.SET,set:Sr(),not:!0});A.ints=()=>({type:g.SET,set:Me(),not:!1});A.notInts=()=>({type:g.SET,set:Me(),not:!0});A.whitespace=()=>({type:g.SET,set:Er(),not:!1});A.notWhitespace=()=>({type:g.SET,set:Er(),not:!0});A.anyChar=()=>({type:g.SET,set:hs(),not:!0})});var Tr=u(Y=>{"use strict";var vr=K(),J=Le(),ms="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",gs={0:0,t:9,n:10,v:11,f:12,r:13};Y.strToChars=function(e){var r=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return e=e.replace(r,function(t,n,i,o,a,s,f,l){if(i)return t;var c=n?8:o?parseInt(o,16):a?parseInt(a,16):s?parseInt(s,8):f?ms.indexOf(f):gs[l],p=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(p)&&(p="\\"+p),p}),e};Y.tokenizeClass=(e,r)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,o;(i=n.exec(e))!=null;)if(i[1])t.push(J.words());else if(i[2])t.push(J.ints());else if(i[3])t.push(J.whitespace());else if(i[4])t.push(J.notWords());else if(i[5])t.push(J.notInts());else if(i[6])t.push(J.notWhitespace());else if(i[7])t.push({type:vr.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(o=i[12])t.push({type:vr.CHAR,value:o.charCodeAt(0)});else return[t,n.lastIndex];Y.error(r,"Unterminated character class")};Y.error=(e,r)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+r)}});var Ir=u(X=>{"use strict";var be=K();X.wordBoundary=()=>({type:be.POSITION,value:"b"});X.nonWordBoundary=()=>({type:be.POSITION,value:"B"});X.begin=()=>({type:be.POSITION,value:"^"});X.end=()=>({type:be.POSITION,value:"$"})});var qr=u((Hm,De)=>{"use strict";var F=Tr(),S=K(),w=Le(),xe=Ir();De.exports=e=>{var r=0,t,n,i={type:S.ROOT,stack:[]},o=i,a=i.stack,s=[],f=Ne=>{F.error(e,`Nothing to repeat at column ${Ne-1}`)},l=F.strToChars(e);for(t=l.length;r<t;)switch(n=l[r++],n){case"\\":switch(n=l[r++],n){case"b":a.push(xe.wordBoundary());break;case"B":a.push(xe.nonWordBoundary());break;case"w":a.push(w.words());break;case"W":a.push(w.notWords());break;case"d":a.push(w.ints());break;case"D":a.push(w.notInts());break;case"s":a.push(w.whitespace());break;case"S":a.push(w.notWhitespace());break;default:/\d/.test(n)?a.push({type:S.REFERENCE,value:parseInt(n,10)}):a.push({type:S.CHAR,value:n.charCodeAt(0)})}break;case"^":a.push(xe.begin());break;case"$":a.push(xe.end());break;case"[":var c;l[r]==="^"?(c=!0,r++):c=!1;var p=F.tokenizeClass(l.slice(r),e);r+=p[1],a.push({type:S.SET,set:p[0],not:c});break;case".":a.push(w.anyChar());break;case"(":var d={type:S.GROUP,stack:[],remember:!0};n=l[r],n==="?"&&(n=l[r+1],r+=2,n==="="?d.followedBy=!0:n==="!"?d.notFollowedBy=!0:n!==":"&&F.error(e,`Invalid group, character '${n}' after '?' at column ${r-1}`),d.remember=!1),a.push(d),s.push(o),o=d,a=d.stack;break;case")":s.length===0&&F.error(e,`Unmatched ) at column ${r-1}`),o=s.pop(),a=o.options?o.options[o.options.length-1]:o.stack;break;case"|":o.options||(o.options=[o.stack],delete o.stack);var h=[];o.options.push(h),a=h;break;case"{":var m=/^(\d+)(,(\d+)?)?\}/.exec(l.slice(r)),I,ye;m!==null?(a.length===0&&f(r),I=parseInt(m[1],10),ye=m[2]?m[3]?parseInt(m[3],10):1/0:I,r+=m[0].length,a.push({type:S.REPETITION,min:I,max:ye,value:a.pop()})):a.push({type:S.CHAR,value:123});break;case"?":a.length===0&&f(r),a.push({type:S.REPETITION,min:0,max:1,value:a.pop()});break;case"+":a.length===0&&f(r),a.push({type:S.REPETITION,min:1,max:1/0,value:a.pop()});break;case"*":a.length===0&&f(r),a.push({type:S.REPETITION,min:0,max:1/0,value:a.pop()});break;default:a.push({type:S.CHAR,value:n.charCodeAt(0)})}return s.length!==0&&F.error(e,"Unterminated group"),i};De.exports.types=S});var wr=u((zm,Ar)=>{"use strict";var P=class e{constructor(r,t){this.low=r,this.high=t,this.length=1+t-r}overlaps(r){return!(this.high<r.low||this.low>r.high)}touches(r){return!(this.high+1<r.low||this.low-1>r.high)}add(r){return new e(Math.min(this.low,r.low),Math.max(this.high,r.high))}subtract(r){return r.low<=this.low&&r.high>=this.high?[]:r.low>this.low&&r.high<this.high?[new e(this.low,r.low-1),new e(r.high+1,this.high)]:r.low<=this.low?[new e(r.high+1,this.high)]:[new e(this.low,r.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},Be=class e{constructor(r,t){this.ranges=[],this.length=0,r!=null&&this.add(r,t)}_update_length(){this.length=this.ranges.reduce((r,t)=>r+t.length,0)}add(r,t){var n=i=>{for(var o=0;o<this.ranges.length&&!i.touches(this.ranges[o]);)o++;for(var a=this.ranges.slice(0,o);o<this.ranges.length&&i.touches(this.ranges[o]);)i=i.add(this.ranges[o]),o++;a.push(i),this.ranges=a.concat(this.ranges.slice(o)),this._update_length()};return r instanceof e?r.ranges.forEach(n):(t==null&&(t=r),n(new P(r,t))),this}subtract(r,t){var n=i=>{for(var o=0;o<this.ranges.length&&!i.overlaps(this.ranges[o]);)o++;for(var a=this.ranges.slice(0,o);o<this.ranges.length&&i.overlaps(this.ranges[o]);)a=a.concat(this.ranges[o].subtract(i)),o++;this.ranges=a.concat(this.ranges.slice(o)),this._update_length()};return r instanceof e?r.ranges.forEach(n):(t==null&&(t=r),n(new P(r,t))),this}intersect(r,t){var n=[],i=o=>{for(var a=0;a<this.ranges.length&&!o.overlaps(this.ranges[a]);)a++;for(;a<this.ranges.length&&o.overlaps(this.ranges[a]);){var s=Math.max(this.ranges[a].low,o.low),f=Math.min(this.ranges[a].high,o.high);n.push(new P(s,f)),a++}};return r instanceof e?r.ranges.forEach(i):(t==null&&(t=r),i(new P(r,t))),this.ranges=n,this._update_length(),this}index(r){for(var t=0;t<this.ranges.length&&this.ranges[t].length<=r;)r-=this.ranges[t].length,t++;return this.ranges[t].low+r}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new e(this)}numbers(){return this.ranges.reduce((r,t)=>{for(var n=t.low;n<=t.high;)r.push(n),n++;return r},[])}subranges(){return this.ranges.map(r=>({low:r.low,high:r.high,length:1+r.high-r.low}))}};Ar.exports=Be});var jr=u((Gm,Cr)=>{"use strict";var Oe=qr(),Z=wr(),C=Oe.types;Cr.exports=class Q{constructor(r,t){if(this._setDefaults(r),r instanceof RegExp)this.ignoreCase=r.ignoreCase,this.multiline=r.multiline,r=r.source;else if(typeof r=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=Oe(r)}_setDefaults(r){this.max=r.max!=null?r.max:Q.prototype.max!=null?Q.prototype.max:100,this.defaultRange=r.defaultRange?r.defaultRange:this.defaultRange.clone(),r.randInt&&(this.randInt=r.randInt)}gen(){return this._gen(this.tokens,[])}_gen(r,t){var n,i,o,a,s;switch(r.type){case C.ROOT:case C.GROUP:if(r.followedBy||r.notFollowedBy)return"";for(r.remember&&r.groupNumber===void 0&&(r.groupNumber=t.push(null)-1),n=r.options?this._randSelect(r.options):r.stack,i="",a=0,s=n.length;a<s;a++)i+=this._gen(n[a],t);return r.remember&&(t[r.groupNumber]=i),i;case C.POSITION:return"";case C.SET:var f=this._expand(r);return f.length?String.fromCharCode(this._randSelect(f)):"";case C.REPETITION:for(o=this.randInt(r.min,r.max===1/0?r.min+this.max:r.max),i="",a=0;a<o;a++)i+=this._gen(r.value,t);return i;case C.REFERENCE:return t[r.value-1]||"";case C.CHAR:var l=this.ignoreCase&&this._randBool()?this._toOtherCase(r.value):r.value;return String.fromCharCode(l)}}_toOtherCase(r){return r+(97<=r&&r<=122?-32:65<=r&&r<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(r){return r instanceof Z?r.index(this.randInt(0,r.length-1)):r[this.randInt(0,r.length-1)]}_expand(r){if(r.type===Oe.types.CHAR)return new Z(r.value);if(r.type===Oe.types.RANGE)return new Z(r.from,r.to);{let t=new Z;for(let n=0;n<r.set.length;n++){let i=this._expand(r.set[n]);if(t.add(i),this.ignoreCase)for(let o=0;o<i.length;o++){let a=i.index(o),s=this._toOtherCase(a);a!==s&&t.add(s)}}return r.not?this.defaultRange.clone().subtract(t):this.defaultRange.clone().intersect(t)}}randInt(r,t){return r+Math.floor(Math.random()*(1+t-r))}get defaultRange(){return this._range=this._range||new Z(32,126)}set defaultRange(r){this._range=r}static randexp(r,t){var n;return typeof r=="string"&&(r=new RegExp(r,t)),r._randexp===void 0?(n=new Q(r,t),r._randexp=n):(n=r._randexp,n._setDefaults(r)),n.gen()}static sugar(){RegExp.prototype.gen=function(){return Q.randexp(this)}}}});var Ur=u((Zm,$r)=>{"use strict";var Ss=function(r){return Es(r)&&!vs(r)};function Es(e){return!!e&&typeof e=="object"}function vs(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||qs(e)}var Ts=typeof Symbol=="function"&&Symbol.for,Is=Ts?Symbol.for("react.element"):60103;function qs(e){return e.$$typeof===Is}function As(e){return Array.isArray(e)?[]:{}}function re(e,r){return r.clone!==!1&&r.isMergeableObject(e)?N(As(e),e,r):e}function ws(e,r,t){return e.concat(r).map(function(n){return re(n,t)})}function Cs(e,r){if(!r.customMerge)return N;var t=r.customMerge(e);return typeof t=="function"?t:N}function js(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[]}function Dr(e){return Object.keys(e).concat(js(e))}function Br(e,r){try{return r in e}catch{return!1}}function _s(e,r){return Br(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function Rs(e,r,t){var n={};return t.isMergeableObject(e)&&Dr(e).forEach(function(i){n[i]=re(e[i],t)}),Dr(r).forEach(function(i){_s(e,i)||(Br(e,i)&&t.isMergeableObject(r[i])?n[i]=Cs(i,t)(e[i],r[i],t):n[i]=re(r[i],t))}),n}function N(e,r,t){t=t||{},t.arrayMerge=t.arrayMerge||ws,t.isMergeableObject=t.isMergeableObject||Ss,t.cloneUnlessOtherwiseSpecified=re;var n=Array.isArray(r),i=Array.isArray(e),o=n===i;return o?n?t.arrayMerge(e,r,t):Rs(e,r,t):re(r,t)}N.all=function(r,t){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(n,i){return N(n,i,t)},{})};var Vs=N;$r.exports=Vs});var We=u((ny,gt)=>{"use strict";var fu=typeof global=="object"&&global&&global.Object===Object&&global;gt.exports=fu});var _=u((iy,yt)=>{"use strict";var lu=We(),cu=typeof self=="object"&&self&&self.Object===Object&&self,pu=lu||cu||Function("return this")();yt.exports=pu});var oe=u((oy,bt)=>{"use strict";var du=_(),hu=du.Symbol;bt.exports=hu});var Et=u((ay,St)=>{"use strict";var xt=oe(),Ot=Object.prototype,mu=Ot.hasOwnProperty,gu=Ot.toString,ae=xt?xt.toStringTag:void 0;function yu(e){var r=mu.call(e,ae),t=e[ae];try{e[ae]=void 0;var n=!0}catch{}var i=gu.call(e);return n&&(r?e[ae]=t:delete e[ae]),i}St.exports=yu});var Tt=u((sy,vt)=>{"use strict";var bu=Object.prototype,xu=bu.toString;function Ou(e){return xu.call(e)}vt.exports=Ou});var L=u((uy,At)=>{"use strict";var It=oe(),Su=Et(),Eu=Tt(),vu="[object Null]",Tu="[object Undefined]",qt=It?It.toStringTag:void 0;function Iu(e){return e==null?e===void 0?Tu:vu:qt&&qt in Object(e)?Su(e):Eu(e)}At.exports=Iu});var T=u((fy,wt)=>{"use strict";function qu(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}wt.exports=qu});var Te=u((ly,Ct)=>{"use strict";var Au=L(),wu=T(),Cu="[object AsyncFunction]",ju="[object Function]",_u="[object GeneratorFunction]",Ru="[object Proxy]";function Vu(e){if(!wu(e))return!1;var r=Au(e);return r==ju||r==_u||r==Cu||r==Ru}Ct.exports=Vu});var _t=u((cy,jt)=>{"use strict";var Ju=_(),Fu=Ju["__core-js_shared__"];jt.exports=Fu});var Jt=u((py,Vt)=>{"use strict";var ke=_t(),Rt=(function(){var e=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Pu(e){return!!Rt&&Rt in e}Vt.exports=Pu});var Pt=u((dy,Ft)=>{"use strict";var Nu=Function.prototype,Mu=Nu.toString;function Lu(e){if(e!=null){try{return Mu.call(e)}catch{}try{return e+""}catch{}}return""}Ft.exports=Lu});var Mt=u((hy,Nt)=>{"use strict";var Du=Te(),Bu=Jt(),$u=T(),Uu=Pt(),Hu=/[\\^$.*+?()[\]{}|]/g,zu=/^\[object .+?Constructor\]$/,Gu=Function.prototype,Wu=Object.prototype,ku=Gu.toString,Ku=Wu.hasOwnProperty,Yu=RegExp("^"+ku.call(Ku).replace(Hu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xu(e){if(!$u(e)||Bu(e))return!1;var r=Du(e)?Yu:zu;return r.test(Uu(e))}Nt.exports=Xu});var Dt=u((my,Lt)=>{"use strict";function Zu(e,r){return e?.[r]}Lt.exports=Zu});var Ie=u((gy,Bt)=>{"use strict";var Qu=Mt(),ef=Dt();function rf(e,r){var t=ef(e,r);return Qu(t)?t:void 0}Bt.exports=rf});var se=u((yy,$t)=>{"use strict";var tf=Ie(),nf=tf(Object,"create");$t.exports=nf});var zt=u((by,Ht)=>{"use strict";var Ut=se();function of(){this.__data__=Ut?Ut(null):{},this.size=0}Ht.exports=of});var Wt=u((xy,Gt)=>{"use strict";function af(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}Gt.exports=af});var Kt=u((Oy,kt)=>{"use strict";var sf=se(),uf="__lodash_hash_undefined__",ff=Object.prototype,lf=ff.hasOwnProperty;function cf(e){var r=this.__data__;if(sf){var t=r[e];return t===uf?void 0:t}return lf.call(r,e)?r[e]:void 0}kt.exports=cf});var Xt=u((Sy,Yt)=>{"use strict";var pf=se(),df=Object.prototype,hf=df.hasOwnProperty;function mf(e){var r=this.__data__;return pf?r[e]!==void 0:hf.call(r,e)}Yt.exports=mf});var Qt=u((Ey,Zt)=>{"use strict";var gf=se(),yf="__lodash_hash_undefined__";function bf(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=gf&&r===void 0?yf:r,this}Zt.exports=bf});var rn=u((vy,en)=>{"use strict";var xf=zt(),Of=Wt(),Sf=Kt(),Ef=Xt(),vf=Qt();function D(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}D.prototype.clear=xf;D.prototype.delete=Of;D.prototype.get=Sf;D.prototype.has=Ef;D.prototype.set=vf;en.exports=D});var nn=u((Ty,tn)=>{"use strict";function Tf(){this.__data__=[],this.size=0}tn.exports=Tf});var ue=u((Iy,on)=>{"use strict";function If(e,r){return e===r||e!==e&&r!==r}on.exports=If});var fe=u((qy,an)=>{"use strict";var qf=ue();function Af(e,r){for(var t=e.length;t--;)if(qf(e[t][0],r))return t;return-1}an.exports=Af});var un=u((Ay,sn)=>{"use strict";var wf=fe(),Cf=Array.prototype,jf=Cf.splice;function _f(e){var r=this.__data__,t=wf(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():jf.call(r,t,1),--this.size,!0}sn.exports=_f});var ln=u((wy,fn)=>{"use strict";var Rf=fe();function Vf(e){var r=this.__data__,t=Rf(r,e);return t<0?void 0:r[t][1]}fn.exports=Vf});var pn=u((Cy,cn)=>{"use strict";var Jf=fe();function Ff(e){return Jf(this.__data__,e)>-1}cn.exports=Ff});var hn=u((jy,dn)=>{"use strict";var Pf=fe();function Nf(e,r){var t=this.__data__,n=Pf(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}dn.exports=Nf});var le=u((_y,mn)=>{"use strict";var Mf=nn(),Lf=un(),Df=ln(),Bf=pn(),$f=hn();function B(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}B.prototype.clear=Mf;B.prototype.delete=Lf;B.prototype.get=Df;B.prototype.has=Bf;B.prototype.set=$f;mn.exports=B});var Ke=u((Ry,gn)=>{"use strict";var Uf=Ie(),Hf=_(),zf=Uf(Hf,"Map");gn.exports=zf});var xn=u((Vy,bn)=>{"use strict";var yn=rn(),Gf=le(),Wf=Ke();function kf(){this.size=0,this.__data__={hash:new yn,map:new(Wf||Gf),string:new yn}}bn.exports=kf});var Sn=u((Jy,On)=>{"use strict";function Kf(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}On.exports=Kf});var ce=u((Fy,En)=>{"use strict";var Yf=Sn();function Xf(e,r){var t=e.__data__;return Yf(r)?t[typeof r=="string"?"string":"hash"]:t.map}En.exports=Xf});var Tn=u((Py,vn)=>{"use strict";var Zf=ce();function Qf(e){var r=Zf(this,e).delete(e);return this.size-=r?1:0,r}vn.exports=Qf});var qn=u((Ny,In)=>{"use strict";var el=ce();function rl(e){return el(this,e).get(e)}In.exports=rl});var wn=u((My,An)=>{"use strict";var tl=ce();function nl(e){return tl(this,e).has(e)}An.exports=nl});var jn=u((Ly,Cn)=>{"use strict";var il=ce();function ol(e,r){var t=il(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}Cn.exports=ol});var qe=u((Dy,_n)=>{"use strict";var al=xn(),sl=Tn(),ul=qn(),fl=wn(),ll=jn();function $(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}$.prototype.clear=al;$.prototype.delete=sl;$.prototype.get=ul;$.prototype.has=fl;$.prototype.set=ll;_n.exports=$});var Vn=u((By,Rn)=>{"use strict";var cl="__lodash_hash_undefined__";function pl(e){return this.__data__.set(e,cl),this}Rn.exports=pl});var Fn=u(($y,Jn)=>{"use strict";function dl(e){return this.__data__.has(e)}Jn.exports=dl});var Ye=u((Uy,Pn)=>{"use strict";var hl=qe(),ml=Vn(),gl=Fn();function Ae(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new hl;++r<t;)this.add(e[r])}Ae.prototype.add=Ae.prototype.push=ml;Ae.prototype.has=gl;Pn.exports=Ae});var Mn=u((Hy,Nn)=>{"use strict";function yl(e,r,t,n){for(var i=e.length,o=t+(n?1:-1);n?o--:++o<i;)if(r(e[o],o,e))return o;return-1}Nn.exports=yl});var Dn=u((zy,Ln)=>{"use strict";function bl(e){return e!==e}Ln.exports=bl});var $n=u((Gy,Bn)=>{"use strict";function xl(e,r,t){for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}Bn.exports=xl});var Hn=u((Wy,Un)=>{"use strict";var Ol=Mn(),Sl=Dn(),El=$n();function vl(e,r,t){return r===r?El(e,r,t):Ol(e,Sl,t)}Un.exports=vl});var Xe=u((ky,zn)=>{"use strict";var Tl=Hn();function Il(e,r){var t=e==null?0:e.length;return!!t&&Tl(e,r,0)>-1}zn.exports=Il});var Ze=u((Ky,Gn)=>{"use strict";function ql(e,r,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(r,e[n]))return!0;return!1}Gn.exports=ql});var pe=u((Yy,Wn)=>{"use strict";function Al(e,r){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}Wn.exports=Al});var we=u((Xy,kn)=>{"use strict";function wl(e){return function(r){return e(r)}}kn.exports=wl});var Qe=u((Zy,Kn)=>{"use strict";function Cl(e,r){return e.has(r)}Kn.exports=Cl});var Xn=u((Qy,Yn)=>{"use strict";var jl=Ye(),_l=Xe(),Rl=Ze(),Vl=pe(),Jl=we(),Fl=Qe(),Pl=200;function Nl(e,r,t,n){var i=-1,o=_l,a=!0,s=e.length,f=[],l=r.length;if(!s)return f;t&&(r=Vl(r,Jl(t))),n?(o=Rl,a=!1):r.length>=Pl&&(o=Fl,a=!1,r=new jl(r));e:for(;++i<s;){var c=e[i],p=t==null?c:t(c);if(c=n||c!==0?c:0,a&&p===p){for(var d=l;d--;)if(r[d]===p)continue e;f.push(c)}else o(r,p,n)||f.push(c)}return f}Yn.exports=Nl});var Qn=u((eb,Zn)=>{"use strict";function Ml(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}Zn.exports=Ml});var R=u((rb,ei)=>{"use strict";function Ll(e){return e!=null&&typeof e=="object"}ei.exports=Ll});var ti=u((tb,ri)=>{"use strict";var Dl=L(),Bl=R(),$l="[object Arguments]";function Ul(e){return Bl(e)&&Dl(e)==$l}ri.exports=Ul});var Ce=u((nb,oi)=>{"use strict";var ni=ti(),Hl=R(),ii=Object.prototype,zl=ii.hasOwnProperty,Gl=ii.propertyIsEnumerable,Wl=ni((function(){return arguments})())?ni:function(e){return Hl(e)&&zl.call(e,"callee")&&!Gl.call(e,"callee")};oi.exports=Wl});var V=u((ib,ai)=>{"use strict";var kl=Array.isArray;ai.exports=kl});var li=u((ob,fi)=>{"use strict";var si=oe(),Kl=Ce(),Yl=V(),ui=si?si.isConcatSpreadable:void 0;function Xl(e){return Yl(e)||Kl(e)||!!(ui&&e&&e[ui])}fi.exports=Xl});var di=u((ab,pi)=>{"use strict";var Zl=Qn(),Ql=li();function ci(e,r,t,n,i){var o=-1,a=e.length;for(t||(t=Ql),i||(i=[]);++o<a;){var s=e[o];r>0&&t(s)?r>1?ci(s,r-1,t,n,i):Zl(i,s):n||(i[i.length]=s)}return i}pi.exports=ci});var er=u((sb,hi)=>{"use strict";function ec(e){return e}hi.exports=ec});var gi=u((ub,mi)=>{"use strict";function rc(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}mi.exports=rc});var xi=u((fb,bi)=>{"use strict";var tc=gi(),yi=Math.max;function nc(e,r,t){return r=yi(r===void 0?e.length-1:r,0),function(){for(var n=arguments,i=-1,o=yi(n.length-r,0),a=Array(o);++i<o;)a[i]=n[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=n[i];return s[r]=t(a),tc(e,this,s)}}bi.exports=nc});var Si=u((lb,Oi)=>{"use strict";function ic(e){return function(){return e}}Oi.exports=ic});var rr=u((cb,Ei)=>{"use strict";var oc=Ie(),ac=(function(){try{var e=oc(Object,"defineProperty");return e({},"",{}),e}catch{}})();Ei.exports=ac});var Ii=u((pb,Ti)=>{"use strict";var sc=Si(),vi=rr(),uc=er(),fc=vi?function(e,r){return vi(e,"toString",{configurable:!0,enumerable:!1,value:sc(r),writable:!0})}:uc;Ti.exports=fc});var Ai=u((db,qi)=>{"use strict";var lc=800,cc=16,pc=Date.now;function dc(e){var r=0,t=0;return function(){var n=pc(),i=cc-(n-t);if(t=n,i>0){if(++r>=lc)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}qi.exports=dc});var Ci=u((hb,wi)=>{"use strict";var hc=Ii(),mc=Ai(),gc=mc(hc);wi.exports=gc});var je=u((mb,ji)=>{"use strict";var yc=er(),bc=xi(),xc=Ci();function Oc(e,r){return xc(bc(e,r,yc),e+"")}ji.exports=Oc});var tr=u((gb,_i)=>{"use strict";var Sc=9007199254740991;function Ec(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Sc}_i.exports=Ec});var _e=u((yb,Ri)=>{"use strict";var vc=Te(),Tc=tr();function Ic(e){return e!=null&&Tc(e.length)&&!vc(e)}Ri.exports=Ic});var Re=u((bb,Vi)=>{"use strict";var qc=_e(),Ac=R();function wc(e){return Ac(e)&&qc(e)}Vi.exports=wc});var Pi=u((xb,Fi)=>{"use strict";var Cc=Xn(),jc=di(),_c=je(),Ji=Re(),Rc=_c(function(e,r){return Ji(e)?Cc(e,jc(r,1,Ji,!0)):[]});Fi.exports=Rc});var Ve=u((Ob,Ni)=>{"use strict";var Vc=L(),Jc=R(),Fc="[object Symbol]";function Pc(e){return typeof e=="symbol"||Jc(e)&&Vc(e)==Fc}Ni.exports=Pc});var Li=u((Sb,Mi)=>{"use strict";var Nc=V(),Mc=Ve(),Lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dc=/^\w*$/;function Bc(e,r){if(Nc(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Mc(e)?!0:Dc.test(e)||!Lc.test(e)||r!=null&&e in Object(r)}Mi.exports=Bc});var $i=u((Eb,Bi)=>{"use strict";var Di=qe(),$c="Expected a function";function nr(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError($c);var t=function(){var n=arguments,i=r?r.apply(this,n):n[0],o=t.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return t.cache=o.set(i,a)||o,a};return t.cache=new(nr.Cache||Di),t}nr.Cache=Di;Bi.exports=nr});var Hi=u((vb,Ui)=>{"use strict";var Uc=$i(),Hc=500;function zc(e){var r=Uc(e,function(n){return t.size===Hc&&t.clear(),n}),t=r.cache;return r}Ui.exports=zc});var Gi=u((Tb,zi)=>{"use strict";var Gc=Hi(),Wc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kc=/\\(\\)?/g,Kc=Gc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Wc,function(t,n,i,o){r.push(i?o.replace(kc,"$1"):n||t)}),r});zi.exports=Kc});var Zi=u((Ib,Xi)=>{"use strict";var Wi=oe(),Yc=pe(),Xc=V(),Zc=Ve(),Qc=1/0,ki=Wi?Wi.prototype:void 0,Ki=ki?ki.toString:void 0;function Yi(e){if(typeof e=="string")return e;if(Xc(e))return Yc(e,Yi)+"";if(Zc(e))return Ki?Ki.call(e):"";var r=e+"";return r=="0"&&1/e==-Qc?"-0":r}Xi.exports=Yi});var eo=u((qb,Qi)=>{"use strict";var ep=Zi();function rp(e){return e==null?"":ep(e)}Qi.exports=rp});var ir=u((Ab,ro)=>{"use strict";var tp=V(),np=Li(),ip=Gi(),op=eo();function ap(e,r){return tp(e)?e:np(e,r)?[e]:ip(op(e))}ro.exports=ap});var or=u((wb,to)=>{"use strict";var sp=Ve(),up=1/0;function fp(e){if(typeof e=="string"||sp(e))return e;var r=e+"";return r=="0"&&1/e==-up?"-0":r}to.exports=fp});var io=u((Cb,no)=>{"use strict";var lp=ir(),cp=or();function pp(e,r){r=lp(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[cp(r[t++])];return t&&t==n?e:void 0}no.exports=pp});var ao=u((jb,oo)=>{"use strict";var dp=io();function hp(e,r,t){var n=e==null?void 0:dp(e,r);return n===void 0?t:n}oo.exports=hp});var fo=u((_b,uo)=>{"use strict";var mp=Ye(),gp=Xe(),yp=Ze(),bp=pe(),xp=we(),so=Qe(),Op=Math.min;function Sp(e,r,t){for(var n=t?yp:gp,i=e[0].length,o=e.length,a=o,s=Array(o),f=1/0,l=[];a--;){var c=e[a];a&&r&&(c=bp(c,xp(r))),f=Op(c.length,f),s[a]=!t&&(r||i>=120&&c.length>=120)?new mp(a&&c):void 0}c=e[0];var p=-1,d=s[0];e:for(;++p<i&&l.length<f;){var h=c[p],m=r?r(h):h;if(h=t||h!==0?h:0,!(d?so(d,m):n(l,m,t))){for(a=o;--a;){var I=s[a];if(!(I?so(I,m):n(e[a],m,t)))continue e}d&&d.push(m),l.push(h)}}return l}uo.exports=Sp});var co=u((Rb,lo)=>{"use strict";var Ep=Re();function vp(e){return Ep(e)?e:[]}lo.exports=vp});var ho=u((Vb,po)=>{"use strict";var Tp=pe(),Ip=fo(),qp=je(),Ap=co(),wp=qp(function(e){var r=Tp(e,Ap);return r.length&&r[0]===e[0]?Ip(r):[]});po.exports=wp});var go=u((Jb,mo)=>{"use strict";var Cp=le();function jp(){this.__data__=new Cp,this.size=0}mo.exports=jp});var bo=u((Fb,yo)=>{"use strict";function _p(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}yo.exports=_p});var Oo=u((Pb,xo)=>{"use strict";function Rp(e){return this.__data__.get(e)}xo.exports=Rp});var Eo=u((Nb,So)=>{"use strict";function Vp(e){return this.__data__.has(e)}So.exports=Vp});var To=u((Mb,vo)=>{"use strict";var Jp=le(),Fp=Ke(),Pp=qe(),Np=200;function Mp(e,r){var t=this.__data__;if(t instanceof Jp){var n=t.__data__;if(!Fp||n.length<Np-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Pp(n)}return t.set(e,r),this.size=t.size,this}vo.exports=Mp});var qo=u((Lb,Io)=>{"use strict";var Lp=le(),Dp=go(),Bp=bo(),$p=Oo(),Up=Eo(),Hp=To();function U(e){var r=this.__data__=new Lp(e);this.size=r.size}U.prototype.clear=Dp;U.prototype.delete=Bp;U.prototype.get=$p;U.prototype.has=Up;U.prototype.set=Hp;Io.exports=U});var Je=u((Db,wo)=>{"use strict";var Ao=rr();function zp(e,r,t){r=="__proto__"&&Ao?Ao(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}wo.exports=zp});var ar=u((Bb,Co)=>{"use strict";var Gp=Je(),Wp=ue();function kp(e,r,t){(t!==void 0&&!Wp(e[r],t)||t===void 0&&!(r in e))&&Gp(e,r,t)}Co.exports=kp});var _o=u(($b,jo)=>{"use strict";function Kp(e){return function(r,t,n){for(var i=-1,o=Object(r),a=n(r),s=a.length;s--;){var f=a[e?s:++i];if(t(o[f],f,o)===!1)break}return r}}jo.exports=Kp});var Vo=u((Ub,Ro)=>{"use strict";var Yp=_o(),Xp=Yp();Ro.exports=Xp});var Mo=u((de,H)=>{"use strict";var Zp=_(),No=typeof de=="object"&&de&&!de.nodeType&&de,Jo=No&&typeof H=="object"&&H&&!H.nodeType&&H,Qp=Jo&&Jo.exports===No,Fo=Qp?Zp.Buffer:void 0,Po=Fo?Fo.allocUnsafe:void 0;function ed(e,r){if(r)return e.slice();var t=e.length,n=Po?Po(t):new e.constructor(t);return e.copy(n),n}H.exports=ed});var Do=u((Hb,Lo)=>{"use strict";var rd=_(),td=rd.Uint8Array;Lo.exports=td});var Uo=u((zb,$o)=>{"use strict";var Bo=Do();function nd(e){var r=new e.constructor(e.byteLength);return new Bo(r).set(new Bo(e)),r}$o.exports=nd});var zo=u((Gb,Ho)=>{"use strict";var id=Uo();function od(e,r){var t=r?id(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}Ho.exports=od});var Wo=u((Wb,Go)=>{"use strict";function ad(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}Go.exports=ad});var Yo=u((kb,Ko)=>{"use strict";var sd=T(),ko=Object.create,ud=(function(){function e(){}return function(r){if(!sd(r))return{};if(ko)return ko(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}})();Ko.exports=ud});var Zo=u((Kb,Xo)=>{"use strict";function fd(e,r){return function(t){return e(r(t))}}Xo.exports=fd});var sr=u((Yb,Qo)=>{"use strict";var ld=Zo(),cd=ld(Object.getPrototypeOf,Object);Qo.exports=cd});var ur=u((Xb,ea)=>{"use strict";var pd=Object.prototype;function dd(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||pd;return e===t}ea.exports=dd});var ta=u((Zb,ra)=>{"use strict";var hd=Yo(),md=sr(),gd=ur();function yd(e){return typeof e.constructor=="function"&&!gd(e)?hd(md(e)):{}}ra.exports=yd});var ia=u((Qb,na)=>{"use strict";function bd(){return!1}na.exports=bd});var fr=u((he,z)=>{"use strict";var xd=_(),Od=ia(),sa=typeof he=="object"&&he&&!he.nodeType&&he,oa=sa&&typeof z=="object"&&z&&!z.nodeType&&z,Sd=oa&&oa.exports===sa,aa=Sd?xd.Buffer:void 0,Ed=aa?aa.isBuffer:void 0,vd=Ed||Od;z.exports=vd});var la=u((ex,fa)=>{"use strict";var Td=L(),Id=sr(),qd=R(),Ad="[object Object]",wd=Function.prototype,Cd=Object.prototype,ua=wd.toString,jd=Cd.hasOwnProperty,_d=ua.call(Object);function Rd(e){if(!qd(e)||Td(e)!=Ad)return!1;var r=Id(e);if(r===null)return!0;var t=jd.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&ua.call(t)==_d}fa.exports=Rd});var pa=u((rx,ca)=>{"use strict";var Vd=L(),Jd=tr(),Fd=R(),Pd="[object Arguments]",Nd="[object Array]",Md="[object Boolean]",Ld="[object Date]",Dd="[object Error]",Bd="[object Function]",$d="[object Map]",Ud="[object Number]",Hd="[object Object]",zd="[object RegExp]",Gd="[object Set]",Wd="[object String]",kd="[object WeakMap]",Kd="[object ArrayBuffer]",Yd="[object DataView]",Xd="[object Float32Array]",Zd="[object Float64Array]",Qd="[object Int8Array]",eh="[object Int16Array]",rh="[object Int32Array]",th="[object Uint8Array]",nh="[object Uint8ClampedArray]",ih="[object Uint16Array]",oh="[object Uint32Array]",y={};y[Xd]=y[Zd]=y[Qd]=y[eh]=y[rh]=y[th]=y[nh]=y[ih]=y[oh]=!0;y[Pd]=y[Nd]=y[Kd]=y[Md]=y[Yd]=y[Ld]=y[Dd]=y[Bd]=y[$d]=y[Ud]=y[Hd]=y[zd]=y[Gd]=y[Wd]=y[kd]=!1;function ah(e){return Fd(e)&&Jd(e.length)&&!!y[Vd(e)]}ca.exports=ah});var ha=u((me,G)=>{"use strict";var sh=We(),da=typeof me=="object"&&me&&!me.nodeType&&me,ge=da&&typeof G=="object"&&G&&!G.nodeType&&G,uh=ge&&ge.exports===da,lr=uh&&sh.process,fh=(function(){try{var e=ge&&ge.require&&ge.require("util").types;return e||lr&&lr.binding&&lr.binding("util")}catch{}})();G.exports=fh});var cr=u((tx,ya)=>{"use strict";var lh=pa(),ch=we(),ma=ha(),ga=ma&&ma.isTypedArray,ph=ga?ch(ga):lh;ya.exports=ph});var pr=u((nx,ba)=>{"use strict";function dh(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}ba.exports=dh});var dr=u((ix,xa)=>{"use strict";var hh=Je(),mh=ue(),gh=Object.prototype,yh=gh.hasOwnProperty;function bh(e,r,t){var n=e[r];(!(yh.call(e,r)&&mh(n,t))||t===void 0&&!(r in e))&&hh(e,r,t)}xa.exports=bh});var Sa=u((ox,Oa)=>{"use strict";var xh=dr(),Oh=Je();function Sh(e,r,t,n){var i=!t;t||(t={});for(var o=-1,a=r.length;++o<a;){var s=r[o],f=n?n(t[s],e[s],s,t,e):void 0;f===void 0&&(f=e[s]),i?Oh(t,s,f):xh(t,s,f)}return t}Oa.exports=Sh});var va=u((ax,Ea)=>{"use strict";function Eh(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}Ea.exports=Eh});var Fe=u((sx,Ta)=>{"use strict";var vh=9007199254740991,Th=/^(?:0|[1-9]\d*)$/;function Ih(e,r){var t=typeof e;return r=r??vh,!!r&&(t=="number"||t!="symbol"&&Th.test(e))&&e>-1&&e%1==0&&e<r}Ta.exports=Ih});var qa=u((ux,Ia)=>{"use strict";var qh=va(),Ah=Ce(),wh=V(),Ch=fr(),jh=Fe(),_h=cr(),Rh=Object.prototype,Vh=Rh.hasOwnProperty;function Jh(e,r){var t=wh(e),n=!t&&Ah(e),i=!t&&!n&&Ch(e),o=!t&&!n&&!i&&_h(e),a=t||n||i||o,s=a?qh(e.length,String):[],f=s.length;for(var l in e)(r||Vh.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||jh(l,f)))&&s.push(l);return s}Ia.exports=Jh});var wa=u((fx,Aa)=>{"use strict";function Fh(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}Aa.exports=Fh});var ja=u((lx,Ca)=>{"use strict";var Ph=T(),Nh=ur(),Mh=wa(),Lh=Object.prototype,Dh=Lh.hasOwnProperty;function Bh(e){if(!Ph(e))return Mh(e);var r=Nh(e),t=[];for(var n in e)n=="constructor"&&(r||!Dh.call(e,n))||t.push(n);return t}Ca.exports=Bh});var hr=u((cx,_a)=>{"use strict";var $h=qa(),Uh=ja(),Hh=_e();function zh(e){return Hh(e)?$h(e,!0):Uh(e)}_a.exports=zh});var Va=u((px,Ra)=>{"use strict";var Gh=Sa(),Wh=hr();function kh(e){return Gh(e,Wh(e))}Ra.exports=kh});var La=u((dx,Ma)=>{"use strict";var Ja=ar(),Kh=Mo(),Yh=zo(),Xh=Wo(),Zh=ta(),Fa=Ce(),Pa=V(),Qh=Re(),em=fr(),rm=Te(),tm=T(),nm=la(),im=cr(),Na=pr(),om=Va();function am(e,r,t,n,i,o,a){var s=Na(e,t),f=Na(r,t),l=a.get(f);if(l){Ja(e,t,l);return}var c=o?o(s,f,t+"",e,r,a):void 0,p=c===void 0;if(p){var d=Pa(f),h=!d&&em(f),m=!d&&!h&&im(f);c=f,d||h||m?Pa(s)?c=s:Qh(s)?c=Xh(s):h?(p=!1,c=Kh(f,!0)):m?(p=!1,c=Yh(f,!0)):c=[]:nm(f)||Fa(f)?(c=s,Fa(s)?c=om(s):(!tm(s)||rm(s))&&(c=Zh(f))):p=!1}p&&(a.set(f,c),i(c,f,n,o,a),a.delete(f)),Ja(e,t,c)}Ma.exports=am});var mr=u((hx,Ba)=>{"use strict";var sm=qo(),um=ar(),fm=Vo(),lm=La(),cm=T(),pm=hr(),dm=pr();function Da(e,r,t,n,i){e!==r&&fm(r,function(o,a){if(i||(i=new sm),cm(o))lm(e,r,a,t,Da,n,i);else{var s=n?n(dm(e,a),o,a+"",e,r,i):void 0;s===void 0&&(s=o),um(e,a,s)}},pm)}Ba.exports=Da});var Ua=u((mx,$a)=>{"use strict";var hm=ue(),mm=_e(),gm=Fe(),ym=T();function bm(e,r,t){if(!ym(t))return!1;var n=typeof r;return(n=="number"?mm(t)&&gm(r,t.length):n=="string"&&r in t)?hm(t[r],e):!1}$a.exports=bm});var gr=u((gx,Ha)=>{"use strict";var xm=je(),Om=Ua();function Sm(e){return xm(function(r,t){var n=-1,i=t.length,o=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Om(t[0],t[1],a)&&(o=i<3?void 0:o,i=1),r=Object(r);++n<i;){var s=t[n];s&&e(r,s,n,o)}return r})}Ha.exports=Sm});var Ga=u((yx,za)=>{"use strict";var Em=mr(),vm=gr(),Tm=vm(function(e,r,t){Em(e,r,t)});za.exports=Tm});var ka=u((bx,Wa)=>{"use strict";var Im=mr(),qm=gr(),Am=qm(function(e,r,t,n){Im(e,r,t,n)});Wa.exports=Am});var Xa=u((xx,Ya)=>{"use strict";var wm=dr(),Cm=ir(),jm=Fe(),Ka=T(),_m=or();function Rm(e,r,t,n){if(!Ka(e))return e;r=Cm(r,e);for(var i=-1,o=r.length,a=o-1,s=e;s!=null&&++i<o;){var f=_m(r[i]),l=t;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=a){var c=s[f];l=n?n(c,f,s):void 0,l===void 0&&(l=Ka(c)?c:jm(r[i+1])?[]:{})}wm(s,f,l),s=s[f]}return e}Ya.exports=Rm});var Qa=u((Ox,Za)=>{"use strict";var Vm=Xa();function Jm(e,r,t){return e==null?e:Vm(e,r,t)}Za.exports=Jm});var Mr=q(jr(),1);function Rr(e){if(e===0)return 0;let r=e/1024;return Number.parseFloat(r.toFixed(2))}var ys=["if","then","else"];function _r(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ee(e,r){if(!(!e||!r)&&!(typeof e!="object"||typeof r!="object"))for(let[t,n]of Object.entries(r)){if(ys.includes(t))continue;let i=e[t];if(_r(n))_r(i)?ee(i,n):i!==n&&(e[t]=n);else if(i&&Array.isArray(n)){let o=i;for(let a of n)a&&typeof a=="object"?ee(o,n):t==="required"?o.find(s=>s===a)||o.push(a):e[t]=n}else e[t]!==n&&(e[t]=n)}}var Vr="yyyy-MM-dd";function Jr(e,r){let t=new Date(e).getTime(),n=new Date(r).getTime();return t<n?"LESSER":t>n?"GREATER":"EQUAL"}function bs(e,r){let t=Jr(e,r);return t==="GREATER"||t==="EQUAL"}function xs(e,r){let t=Jr(e,r);return t==="LESSER"||t==="EQUAL"}function Fr(e,r,t,n=[]){let i=typeof e=="string",o=e==="",a=e===void 0||e===null&&t.treatNullAsUndefined,s=o||a,f=[];if(!i||s||r["x-jsf-presentation"]===void 0)return f;let{minDate:l,maxDate:c}=r["x-jsf-presentation"];return l&&!bs(e,l)&&f.push({path:n,validation:"minDate",schema:r,value:e}),c&&!xs(e,c)&&f.push({path:n,validation:"maxDate",schema:r,value:e}),f}function Pr(e){return e["x-jsf-presentation"]?.inputType==="checkbox"}var Nr="Please acknowledge this field";function Lr(e,r,t,n){let i=e["x-jsf-presentation"];switch(t){case"type":return Os(e.type);case"required":return Pr(e)?Nr:"Required field";case"forbidden":return"Not allowed";case"const":return Pr(e)&&r===!1?Nr:`The only accepted value is ${JSON.stringify(e.const)}.`;case"enum":return`The option "${$e(r)}" is not valid.`;case"oneOf":return`The option "${$e(r)}" is not valid.`;case"anyOf":return`The option "${$e(r)}" is not valid.`;case"not":return"The value must not satisfy the provided schema";case"minLength":return`Please insert at least ${e.minLength} characters`;case"maxLength":return`Please insert up to ${e.maxLength} characters`;case"pattern":return`Must have a valid format. E.g. ${(0,Mr.randexp)(e.pattern||"")}`;case"format":if(e.format==="email")return"Please enter a valid email address";if(e.format==="date"){let o=new Date().toISOString().split("T")[0];return`Must be a valid date in ${Vr.toLowerCase()} format. e.g. ${o}`}return`Must be a valid ${e.format} format`;case"multipleOf":return`Must be a multiple of ${e.multipleOf}`;case"maximum":return`Must be smaller or equal to ${e.maximum}`;case"exclusiveMaximum":return`Must be smaller than ${e.exclusiveMaximum}`;case"minimum":return`Must be greater or equal to ${e.minimum}`;case"exclusiveMinimum":return`Must be greater than ${e.exclusiveMinimum}`;case"minDate":return`The date must be ${i?.minDate} or after.`;case"maxDate":return`The date must be ${i?.maxDate} or before.`;case"fileStructure":return"Not a valid file.";case"maxFileSize":{let o=i?.maxFileSize,a=typeof o=="number"?Rr(o):void 0;return`File size too large.${a?` The limit is ${a} MB.`:""}`}case"accept":{let o=i?.accept;return`Unsupported file format.${o?` The acceptable formats are ${o}.`:""}`}case"minItems":{let o=e.minItems===1?"item":"items";return`Must have at least ${e.minItems} ${o}`}case"maxItems":{let o=e.maxItems===1?"item":"items";return`Must have at most ${e.maxItems} ${o}`}case"uniqueItems":return"Items must be unique";case"contains":throw new Error('"contains" is not implemented yet');case"minContains":throw new Error('"minContains" is not implemented yet');case"maxContains":throw new Error('"maxContains" is not implemented yet');case"additionalProperties":return"Additional property is not allowed";case"json-logic":return n||"The value is not valid"}}function Os(e){if(Array.isArray(e))return`The value must be a ${e.map(t=>t==="integer"?"number":t).join(" or ")}`;switch(e){case"number":case"integer":return"The value must be a number";case"boolean":return"The value must be a boolean";case"null":return"The value must be null";case"string":return"The value must be a string";case"object":return"The value must be an object";case"array":return"The value must be an array";default:return e?`The value must be ${e}`:"Invalid value"}}function $e(e){return typeof e=="string"?e:JSON.stringify(e)}var zr=q(Ur(),1);function Js(e,r){let t={};return r.forEach((i,o)=>{t[i]=o}),e.sort((i,o)=>{let a=t[i.name]??1/0,s=t[o.name]??1/0;return a!==s?a-s:e.indexOf(i)-e.indexOf(o)})}function Ue(e,r){if(typeof e=="boolean")throw new TypeError("Schema must be an object");return e["x-jsf-order"]!==void 0?Js(r,e["x-jsf-order"]):r}function Fs(e,r,t){r.checkboxValue=t.const,t.type==="boolean"&&(r.checkboxValue=!0)}function Ps(e,r){if(e.options===void 0){let t=Ls(r);t&&(e.options=t,r.type==="array"&&(e.multiple=!0))}}function Ns(e,r,t,n){if(e.options===void 0){let i=$s(r,t,n);i&&(e.fields=i)}}function Ms(e,r){if(!e)return"text";switch(e){case"string":{let{oneOf:t,format:n}=r;return n==="email"?"email":n==="date"?"date":n==="data-url"?"file":t?"radio":"text"}case"number":case"integer":return"number";case"object":return"fieldset";case"array":{let{items:t}=r;return t?.properties?"group-array":"select"}case"boolean":return"checkbox";default:return"text"}}function Hr(e,r,t,n){let i=t["x-jsf-presentation"];if(i?.inputType)return i.inputType;if(n&&r!=="root")throw new Error(`Strict error: Missing inputType to field "${t.title}".
2
- You can fix the json schema or skip this error by calling createHeadlessForm(schema, { strictInputType: false })`);if(!t.type){if(t.items?.properties)return"group-array";if(t.properties)return"select"}return Ms(e||t.type||"string",t)}function Se(e){return e.filter(r=>r!==null&&typeof r=="object"&&r.const!==null).map(r=>{let t=r.title,n=r.const,o=r["x-jsf-presentation"]?.meta,a={label:t||"",value:n};o&&(a.meta=o);let{title:s,const:f,"x-jsf-presentation":l,...c}=r;return{...a,...c}})}function Ls(e){if(e.oneOf)return Se(e.oneOf||[]);if(e.items?.anyOf)return Se(e.items.anyOf);if(e.anyOf)return Se(e.anyOf);if(e.enum){let r=e.enum?.map(t=>({title:typeof t=="string"?t:JSON.stringify(t),const:t}))||[];return Se(r)}return null}function Ds(e,r,t){let n=[];for(let o in e.properties){let a=e.required?.includes(o)||!1,s=j({schema:e.properties[o],name:o,required:a,originalSchema:r.properties?.[o]||e.properties[o],strictInputType:t});s&&n.push(s)}return Ue(e,n)}function Bs(e,r,t){let n=[];if(typeof e.items!="object"||e.items===null)return[];if(e.items?.type==="object"){let o=e.items;for(let a in o.properties){let s=o.required?.includes(a)||!1,f=j({schema:o.properties[a],name:a,required:s,originalSchema:r,strictInputType:t});f&&(f.nameKey=a,n.push(f))}}else{let o=j({schema:e.items,name:"item",required:!1,originalSchema:r,strictInputType:t});o&&n.push(o)}return Ue(e.items,n)}function $s(e,r,t){return typeof e.properties=="object"&&e.properties!==null?Ds(e,r,t):typeof e.items=="object"&&e.items!==null?Bs(e,r,t):null}var Us=["title","type","x-jsf-errorMessage","x-jsf-presentation","oneOf","anyOf","properties"];function j({schema:e,name:r,required:t=!1,originalSchema:n,strictInputType:i=!1,type:o=void 0}){if(e===!1){let d=Hr(o,r,n,i),h=["fieldset","group-array"].includes(d);return{type:d,name:r,inputType:d,jsonType:"boolean",required:t,isVisible:!1,...h&&{fields:[]}}}if(typeof e=="boolean")return null;let a=n["x-jsf-presentation"]||{},s=e["x-jsf-presentation"]||{},f=(0,zr.default)(a,s,{arrayMerge:(d,h,m)=>h}),l=e["x-jsf-errorMessage"],c=Hr(o,r,e,i),p={...Object.entries(e).filter(([d])=>!Us.includes(d)).reduce((d,[h,m])=>({...d,[h]:m}),{}),name:r,inputType:c,type:c,jsonType:o||e.type,required:t,isVisible:!0,...l&&{errorMessage:l}};return c==="checkbox"&&Fs(c,p,e),e.title&&(p.label=e.title),Object.keys(f).length>0&&Object.entries(f).forEach(([d,h])=>{d!=="inputType"&&(p[d]=h)}),r!=="root"&&Ps(p,e),Ns(p,e,n),p}function E(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function v(e,r){if(typeof e!=typeof r)return!1;if(e===r)return!0;if(e===null||r===null)return!1;if(Array.isArray(e)&&Array.isArray(r))return e.length!==r.length?!1:e.every((t,n)=>v(t,r[n]));if(E(e)&&E(r)){let t=Object.keys(e).sort(),n=Object.keys(r).sort();return t.length!==n.length||!v(t,n)?!1:t.every(i=>v(e[i],r[i]))}return!1}function Gr(e){if(typeof structuredClone=="function")try{return structuredClone(e)}catch(r){console.warn("structuredClone failed, falling back to JSON method:",r)}try{return JSON.parse(JSON.stringify(e))}catch{throw new Error("Deep clone failed: Object may contain circular references or non-serializable values")}}function Wr(e,r,t,n,i){return Array.isArray(e)?[...Hs(r,e,i),...ks(r,e,i),...Ws(e,r,t,n,i),...Gs(r,e,t,n,i),...zs(r,e,t,n,i)]:[]}function Hs(e,r,t){let n=[],i=r.length;return e.maxItems!==void 0&&i>e.maxItems&&n.push({path:t,validation:"maxItems",schema:e,value:r}),e.minItems!==void 0&&i<e.minItems&&n.push({path:t,validation:"minItems",schema:e,value:r}),n}function zs(e,r,t,n,i){if(e.items===void 0)return[];let o=[],a=Array.isArray(e.prefixItems)?e.prefixItems.length:0;for(let[s,f]of r.slice(a).entries())o.push(...x(f,e.items,t,[...i,"items",s+a],n));return o}function Gs(e,r,t,n,i){if(!Array.isArray(e.prefixItems))return[];let o=[];for(let[a,s]of r.entries())a<e.prefixItems.length&&o.push(...x(s,e.prefixItems[a],t,[...i,"prefixItems",a],n));return o}function Ws(e,r,t,n,i){if(!("contains"in r))return[];let o=[],a=e.filter(s=>x(s,r.contains,t,[...i,"contains"],n).length===0).length;return r.minContains===void 0&&r.maxContains===void 0?a<1&&o.push({path:i,validation:"contains",schema:r,value:e}):(r.minContains!==void 0&&a<r.minContains&&o.push({path:i,validation:"minContains",schema:r,value:e}),r.maxContains!==void 0&&a>r.maxContains&&o.push({path:i,validation:"maxContains",schema:r,value:e})),o}function ks(e,r,t){if(e.uniqueItems!==!0)return[];let n=new Map;for(let i=0;i<r.length;i++){for(let o of n.values())if(v(r[i],o))return[{path:t,validation:"uniqueItems",schema:e,value:r[i]}];n.set(i,r[i])}return[]}function kr(e,r,t,n,i=[]){if(!r.allOf)return[];for(let o=0;o<r.allOf.length;o++){let a=r.allOf[o],s=x(e,a,t,[...i,"allOf",o],n);if(s.length>0)return s}return[]}function Kr(e,r,t,n,i=[]){if(!r.anyOf)return[];if(i.length!==0){for(let s of r.anyOf)if(x(e,s,t,i,n).length===0)return[];return[{path:i,validation:"anyOf",schema:r,value:e}]}let o=[];for(let s of r.anyOf){let f=x(e,s,t,i,n);f.length!==0&&o.push(f)}return o.length<r.anyOf.length?[]:o.flat().reverse()}function Yr(e,r,t,n,i=[]){if(!r.oneOf)return[];if(r.oneOf.length===0)return[];let o=0;for(let a=0;a<r.oneOf.length&&!(x(e,r.oneOf[a],t,i,n).length===0&&(o++,o>1));a++);return o===0?[{path:i,validation:"oneOf",schema:r,value:e}]:o>1?[{path:i,validation:"oneOf",schema:r,value:e}]:[]}function Xr(e,r,t,n,i=[]){return r.not===void 0?[]:typeof r.not=="boolean"?r.not?[{path:i,validation:"not",schema:r,value:e}]:[]:x(e,r.not,t,i,n).length===0?[{path:i,validation:"not",schema:r,value:e}]:[]}function Zr(e,r,t=[]){let n=typeof r.const<"u"?r.const:r.value;return n===void 0?[]:v(n,e)?[]:[{path:t,validation:"const",schema:r,value:e}]}function Qr(e,r,t=[]){return r.enum===void 0?[]:r.enum.some(n=>v(n,e))?[]:[{path:t,validation:"enum",schema:r,value:e}]}function et(e,r,t=[]){let n=r["x-jsf-presentation"],i=n?.inputType==="file",o=typeof n?.maxFileSize=="number"||typeof n?.accept=="string";if(!(i||o))return[];if(!Array.isArray(e))return[];if(e.length===0)return[];if(!e.every(l=>E(l)&&typeof l.name=="string"&&typeof l.size=="number"))return[{path:t,validation:"fileStructure",schema:r,value:e}];let f=e;if(typeof n?.maxFileSize=="number"){let l=n.maxFileSize*1024;if(f.some(p=>p.size>l))return[{path:t,validation:"maxFileSize",schema:r,value:e}]}if(typeof n?.accept=="string"&&n.accept.trim()!==""){let l=n.accept.toLowerCase().split(",").map(c=>c.trim()).filter(c=>c).map(c=>c.startsWith(".")?c:`.${c}`);if(l.length>0&&!f.some(p=>{let d=p.name.toLowerCase(),h=d.includes(".")?`.${d.split(".").pop()}`:"";return h!==""&&l.includes(h)}))return[{path:t,validation:"accept",schema:r,value:e}]}return[]}import M from"json-logic-js";function ve(e,r){let{validations:t,computedValues:n}=e;return{schema:{validations:t,computedValues:n},value:r}}function rt(e){return/\{\{.*?\}\}/.test(e)}function Ee(e={}){return Object.entries(e).reduce((r,[t,n])=>({...r,[t]:n??Number.NaN}),{})}function tt(e,r,t=[]){let n=e["x-jsf-logic-validations"];return!n||n.length===0?[]:n.map(i=>{let o=r?.schema?.validations?.[i],a=r?.value;if(!o)throw new Error(`[json-schema-form] json-logic error: "${e.title}" required validation "${i}" doesn't exist.`);if(M.apply(o.rule,Ee(a))===!1){let f=o.errorMessage;return f&&rt(f)&&(f=f.replace(/\{\{(.*?)\}\}/g,(l,c)=>{let p=c.trim(),d=r.schema.computedValues?.[p];return d?M.apply(d.rule,Ee(a)):M.apply({var:p},Ee(a))})),[{path:t,validation:"json-logic",customErrorMessage:f,schema:e,value:a}]}return[]}).flat()}function Ks(e,r,t){if(!r)throw new Error(`[json-schema-form] json-logic error: Computed value "${e}" doesn't exist`);return M.apply(r,Ee(t))}function nt(e,r,t){if(r){let n={};Object.entries(r).forEach(([i,o])=>{let a=Ks(i,o.rule,t);n[i]=a}),te(e,n)}return e}function te(e,r){function t(n){if(typeof n!="object")return;let i=n["x-jsf-logic-computedAttrs"];if(i&&Ys(n,r,i),typeof n.properties=="object")for(let o in n.properties)t(n.properties[o]);if(typeof n.if=="object"&&te(n.if,r),n.allOf&&n.allOf.length>0)for(let o of n.allOf)te(o,r);if(n.anyOf&&n.anyOf.length>0)for(let o of n.anyOf)te(o,r);if(n.oneOf&&n.oneOf.length>0)for(let o of n.oneOf)te(o,r);delete n["x-jsf-logic-computedAttrs"]}t(e)}function Ys(e,r,t){if(typeof e!="object")return;function n(o){return rt(o)?o.replace(/\{\{(.*?)\}\}/g,(a,s)=>{let f=s.trim();return r[f]||`{{${f}}}`}):r[o]}function i(o,a,s,f){if(typeof o!="object")return;let l=a;o[l]||(o[l]={}),Object.entries(s).forEach(([c,p])=>{typeof p=="string"?o[l][c]=n(p):i(o[l],c,p,f)})}for(let o in t){let a=o,s=t[o];typeof s=="string"?e[a]=n(s):typeof e=="object"&&i(e,a,s,r)}}function it(e){if(e)for(let[r,t]of Object.entries(e))M.add_operation(r,t)}function ot(e){if(e)for(let r of Object.keys(e))M.rm_operation(r)}function at(e,r,t=[]){let n=[],i=ne(r);return typeof e!="number"?[]:i!==void 0&&!["number","integer"].includes(i)?[]:(r.multipleOf!==void 0&&e%r.multipleOf!==0&&n.push({path:t,validation:"multipleOf",schema:r,value:e}),r.maximum!==void 0&&e>r.maximum&&n.push({path:t,validation:"maximum",schema:r,value:e}),r.exclusiveMaximum!==void 0&&e>=r.exclusiveMaximum&&n.push({path:t,validation:"exclusiveMaximum",schema:r,value:e}),r.minimum!==void 0&&e<r.minimum&&n.push({path:t,validation:"minimum",schema:r,value:e}),r.exclusiveMinimum!==void 0&&e<=r.exclusiveMinimum&&n.push({path:t,validation:"exclusiveMinimum",schema:r,value:e}),n)}function st(e,r,t,n,i=[]){if(typeof r=="object"&&r.properties&&E(e)){let o=[];for(let[a,s]of Object.entries(r.properties))o.push(...x(e[a],s,t,[...i,a],n));return o}return[]}var ut;(function(e){e["7bit"]="7bit",e["8bit"]="8bit",e.Base64="base64",e.Binary="binary",e.IETFToken="ietf-token",e.QuotedPrintable="quoted-printable",e.XToken="x-token"})(ut||(ut={}));var b;(function(e){e.Date="date",e.DateTime="date-time",e.Duration="duration",e.Email="email",e.Hostname="hostname",e.IDNEmail="idn-email",e.IDNHostname="idn-hostname",e.IPv4="ipv4",e.IPv6="ipv6",e.IRI="iri",e.IRIReference="iri-reference",e.JSONPointer="json-pointer",e.JSONPointerURIFragment="json-pointer-uri-fragment",e.RegEx="regex",e.RelativeJSONPointer="relative-json-pointer",e.Time="time",e.URI="uri",e.URIReference="uri-reference",e.URITemplate="uri-template",e.UUID="uuid"})(b||(b={}));var ft;(function(e){e.Array="array",e.Boolean="boolean",e.Integer="integer",e.Null="null",e.Number="number",e.Object="object",e.String="string"})(ft||(ft={}));var O={DATE_TIME:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,DATE:/^\d{4}-\d{2}-\d{2}$/,TIME:/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/,DURATION:/^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$/,EMAIL:/^[\w.!#$%&'*+/=?^`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,IDN_EMAIL:/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/,HOSTNAME:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i,IDN_HOSTNAME:/^[^\s._-].*[^\s._-]$/,IPV6_PART:/^[0-9a-f]{1,4}$/i,PROTOCOL:/^[a-z]+:/,URI_REFERENCE:/^\S*$/,UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,JSON_POINTER:/^(?:\/(?:[^~/]|~0|~1)*)*$/,JSON_POINTER_URI_FRAGMENT:/^#(?:\/(?:[\w\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER:/^(?:0|[1-9]\d*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,URI_TEMPLATE:/^(?:[!#$&'()*+,/:;=?@\w\-.~]|%[0-9a-f]{2}|\{[+#./;?&=,!@|]?(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?(?:,(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?)*\})*$/i},Xs={[b.DateTime]:e=>O.DATE_TIME.test(e),[b.Date]:e=>O.DATE.test(e),[b.Time]:e=>O.TIME.test(e),[b.Duration]:e=>O.DURATION.test(e),[b.Email]:e=>e.length<=254&&O.EMAIL.test(e),[b.IDNEmail]:e=>e.length<=254&&O.IDN_EMAIL.test(e),[b.Hostname]:e=>e.length>255?!1:e.split(".").every(t=>O.HOSTNAME.test(t)),[b.IDNHostname]:e=>e.length>255?!1:e.split(".").every(t=>t.length<=63&&O.IDN_HOSTNAME.test(t)),[b.IPv4]:e=>{let r=e.split(".");return r.length!==4?!1:r.every(t=>{let n=Number.parseInt(t,10);return n>=0&&n<=255&&t===n.toString()})},[b.IPv6]:e=>{let r=e.split(":");if(r.length>8)return!1;let t=!1;return r.every(n=>n===""?t?!1:(t=!0,!0):O.IPV6_PART.test(n))},[b.URI]:e=>{try{let r=new URL(e);return r.protocol!==""&&O.PROTOCOL.test(r.protocol)}catch{return!1}},[b.URIReference]:e=>{try{return e.startsWith("//")?O.URI_REFERENCE.test(e.slice(2)):(new URL(e,"http://example.com"),!0)}catch{return!1}},[b.IRI]:e=>{try{let r=new URL(e);return r.protocol!==""&&O.PROTOCOL.test(r.protocol)}catch{return!1}},[b.IRIReference]:e=>{try{return e.startsWith("//")?O.URI_REFERENCE.test(e.slice(2)):(new URL(e,"http://example.com"),!0)}catch{return!1}},[b.RegEx]:e=>{try{return new RegExp(e,"u"),!0}catch{return!1}},[b.UUID]:e=>O.UUID.test(e),[b.JSONPointer]:e=>O.JSON_POINTER.test(e),[b.JSONPointerURIFragment]:e=>O.JSON_POINTER_URI_FRAGMENT.test(e),[b.RelativeJSONPointer]:e=>O.RELATIVE_JSON_POINTER.test(e),[b.URITemplate]:e=>O.URI_TEMPLATE.test(e)};function lt(e,r,t=[]){let n=[];if(typeof e!="string")return n;let i=Xs[r.format];return i&&!i(e)&&n.push({path:t,validation:"format",schema:r,value:e}),n}function ct(e,r,t=[]){let n=[],i=ne(r);if(typeof e!="string")return[];if(i!==void 0&&i!=="string")return[];let o=[...new Intl.Segmenter().segment(e)].length;if(r.minLength!==void 0&&o<r.minLength&&n.push({path:t,validation:"minLength",schema:r,value:e}),r.maxLength!==void 0&&o>r.maxLength&&n.push({path:t,validation:"maxLength",schema:r,value:e}),r.pattern!==void 0&&(new RegExp(r.pattern).test(e)||n.push({path:t,validation:"pattern",schema:r,value:e})),r.format!==void 0){let a=lt(e,r,t);n.push(...a)}return n}function ne(e){if(typeof e=="boolean")return"boolean";if(e.type!==void 0)return e.type}function Zs(e,r,t=[]){let n=ne(r);if(n===void 0)return[];if(n==="null"&&e===null)return[];let i=e===null?"null":Array.isArray(e)?"array":typeof e;if(Array.isArray(n)){if(e===null&&n.includes("null"))return[];for(let o of n){if(o==="array"&&Array.isArray(e))return[];if(i==="number"&&o==="integer"&&Number.isInteger(e))return[];if(i===o||o==="null"&&e===null)return[]}}else{if(n==="array"&&Array.isArray(e))return[];if(i==="number"&&n==="integer"&&Number.isInteger(e))return[];if(i===n)return[]}return[{path:t,validation:"type",schema:r,value:e}]}function Qs(e,r,t={},n=[],i){return r?x(e,r,t,n,i):[]}function eu(e={}){return Object.keys(e).map(r=>({regex:new RegExp(r)}))}function x(e,r,t={},n=[],i){let o=i,a;if(!i&&r["x-jsf-logic"]){o=ve(r["x-jsf-logic"],e);let{validations:d,computedValues:h,...m}=r["x-jsf-logic"];a=m}let s=e===void 0||e===null&&t.treatNullAsUndefined,f=[];if(s)return[];if(typeof r=="boolean")return!r&&!t.allowForbiddenValues?[{path:n,validation:"forbidden",schema:r,value:e}]:[];let c=r["x-jsf-presentation"]?.inputType==="file",p=[];if(!c&&(p=Zs(e,r,n),p.length>0))return p;if(r.required&&E(e)){let d=r.required.filter(h=>{let m=e[h];return Array.isArray(m)?m.length===0:E(m)?Object.keys(m).length===0:m===void 0||m===null&&t.treatNullAsUndefined});for(let h of d)f.push({path:[...n,h],validation:"required",schema:r?.properties?.[h]||r,value:e})}if(r.additionalProperties===!1&&E(e)){let d=new Set(Object.keys(r.properties||{})),h=eu(r.patternProperties);for(let m of Object.keys(e)){let I=d.has(m),ye=h.some(({regex:Ne})=>Ne.test(m));!I&&!ye&&f.push({path:[...n,m],validation:"additionalProperties",schema:r,value:e[m]})}}return[...f,...Zr(e,r,n),...Qr(e,r,n),...st(e,r,t,o,n),...Wr(e,r,t,o,n),...ct(e,r,n),...at(e,r,n),...et(e,r,n),...Xr(e,r,t,o,n),...kr(e,r,t,o,n),...Kr(e,r,t,o,n),...Yr(e,r,t,o,n),...pt(e,r,t,o,n),...Fr(e,r,t,n),...Qs(e,a,t,n,o),...tt(r,o,n)]}function He(e,r,t,n,i=[]){return x(e,r,{...t,...typeof r=="boolean"?{allowForbiddenValues:!1}:{}},i,n).length===0}function pt(e,r,t,n,i=[]){if(r.if===void 0)return[];let o=He(e,r.if,t,n,i);return o&&r.then!==void 0?x(e,r.then,t,[...i,"then"],n):!o&&r.else!==void 0?x(e,r.else,t,[...i,"else"],n):[]}function ze({schema:e,values:r,options:t={}}){let n=e["x-jsf-logic"]?ve(e["x-jsf-logic"],r):void 0,i=Gr(e);return ie(i,r,t,n),n?.schema.computedValues&&(nt(i,n.schema.computedValues,r),ie(i,r,t,n)),i}function dt(e,r,t,n={},i){let o=He(e,t.if,n,i),a=!1;return o&&t.if?.required&&(a=t.if.required.some(f=>{if(!r.properties||!r.properties[f])return!1;let l=r.properties[f],c=e[f];return x(c,l,n).some(d=>d.validation==="type")})),{rule:t,matches:o&&!a}}function ie(e,r={},t={},n){if(!E(r))return;let i=[];typeof e.if<"u"&&i.push(dt(r,e,e,t,n)),(e.allOf??[]).filter(o=>typeof o.if<"u").forEach(o=>{let a=dt(r,e,o,t,n);i.push(a)});for(let{rule:o,matches:a}of i)a&&o.then?(ht(e,r,o.then,t,n),delete o.then):!a&&o.else&&(ht(e,r,o.else,t,n),delete o.else);if(e.properties){for(let[o,a]of Object.entries(e.properties))if(typeof a=="object"){let s=a;s.type==="object"&&ie(s,r[o],t,n),s.items&&ie(s.items,r[o],t,n)}}}function ht(e,r,t,n={},i){let o=t;ie(o,r,n,i),ee(e,o)}function Ge(e,r,t){let n=j({schema:r,name:"root",required:!0,originalSchema:t,strictInputType:!1})?.fields||[];for(let i of e){let o=n.find(a=>a.name===i.name);if(o){mt(i,o),ee(i,o);let a=r.properties?.[i.name];a&&typeof a=="object"&&i.fields&&a.type==="object"&&Ge(i.fields,a,t)}}}function mt(e,r){for(let[t]of Object.entries(e))r[t]?e[t]&&typeof e[t]=="object"&&!Array.isArray(e[t])&&r[t]&&typeof r[t]=="object"&&!Array.isArray(r[t])&&mt(e[t],r[t]):delete e[t]}function ru(e){let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(["allOf","anyOf","oneOf"].includes(n)){t+1<e.length&&typeof e[t+1]=="number"&&t++;continue}n==="then"||n==="else"||(n==="items"&&typeof e[t+1]=="number"?(t++,r.push(e[t])):r.push(n))}return r}function tu(e){if(e.length===0)return null;let r={};for(let t of e){let{path:n}=t;if(n.length===0){r[""]=t.message;continue}let i=ru(n),o=r;for(let a=0;a<i.length-1;a++){let s=i[a];if(typeof s=="number"){if(!Array.isArray(o))throw new TypeError(`Expected an array at path: ${i.slice(0,a).join(".")}`);o[s]||(o[s]={}),o=o[s]}else typeof i[a+1]=="number"?s in o||(o[s]=[]):(!(s in o)||typeof o[s]=="string")&&(o[s]={}),o=o[s]}if(i.length>0){let a=i[i.length-1];o[a]=t.message}}return r}function nu(e){return e.map(r=>{let{schema:t,value:n,validation:i,customErrorMessage:o}=r;return{...r,message:Lr(t,n,i,o)}})}function iu(e,r){return typeof r!="object"||!r||!e.length?e:e.map(t=>{let n=t.schema,i=n["x-jsf-errorMessage"]?.[t.validation];return n&&i?{...t,message:i}:t})}function ou(e,r,t={}){let n={},i=x(e,r,t),o=nu(i),a=iu(o,r),s=tu(a);return s&&(n.formErrors=s),n}function au(e){let{schema:r,originalSchema:t,strictInputType:n}=e;return j({schema:r,name:"root",required:!0,originalSchema:t,strictInputType:n})?.fields||[]}function su(e){if(Object.prototype.hasOwnProperty.call(e,"customProperties")&&console.error("[json-schema-form] `customProperties` is a deprecated option and it's not supported on json-schema-form v1"),e.customJsonLogicOps){if(typeof e.customJsonLogicOps!="object"||e.customJsonLogicOps===null)throw new TypeError("validationOptions.customJsonLogicOps must be an object.");for(let[r,t]of Object.entries(e.customJsonLogicOps))if(typeof t!="function")throw new TypeError(`Custom JSON Logic operator '${r}' must be a function, but received type '${typeof t}'.`)}}function uu(e,r={}){su(r);let t=r.initialValues||{},n=r.strictInputType||!1,i=ze({schema:e,values:t,options:r.legacyOptions}),o=au({schema:i,originalSchema:e,strictInputType:n});return{fields:o,isError:!1,error:null,handleValidation:f=>{let l=r?.customJsonLogicOps;try{it(l);let c=ze({schema:e,values:f,options:r.legacyOptions}),p=ou(f,c,r.legacyOptions);return Ge(o,c,e),p}finally{ot(l)}}}}var es=q(Pi(),1),k=q(ao(),1),W=q(ho(),1),rs=q(Ga(),1),br=q(ka(),1),Pe=q(Qa(),1);function ts(e){return e.replace(".",".properties.")}function ns(e){let{errorMessage:r,presentation:t,properties:n,...i}=e;return{...i,...t?{"x-jsf-presentation":t}:{},...r?{"x-jsf-errorMessage":r}:{}}}function is(e,r){return Array.isArray(r)?r:void 0}function Fm(e,r){let{if:t,then:n,else:i}=e;return(0,W.default)(t?.required||[],r).length>0||((0,W.default)(n?.required||[],r)||(0,W.default)(Object.keys(n?.properties||{}),r)).length>0||((0,W.default)(i?.required||[],r)||(0,W.default)(Object.keys(i?.properties||{}),r)).length>0}function os(e,r){if(!r)return{warnings:null};let t=[];return Object.entries(r).forEach(([i,o])=>{let a=ts(i),s=(0,k.default)(e.properties,a);if(!s){t.push({type:"FIELD_TO_CHANGE_NOT_FOUND",message:`Changing field "${i}" was ignored because it does not exist.`});return}let f=typeof o=="function"?o(s):o;if((0,br.default)(s,{...ns(f)},is),f.properties){let l=os((0,k.default)(e.properties,a),f.properties);l.warnings&&t.push(...l.warnings)}}),{warnings:t.flat()}}function as(e,r,t){if(!r||typeof e!="object"||e===null)return{warnings:null};let n=t?.parent;return typeof e=="object"&&e.properties&&Object.entries(e.properties).forEach(([i,o])=>{let a=n?`${n}.${i}`:i,s=r(a,o),f=ns(s);(0,br.default)((0,k.default)(e.properties,i),{...o,...f},is),o.properties&&as(o,r,{parent:i})}),{warnings:null}}function Pm(e,r){if(!r)return{warnings:null};let t=[],n=e["x-jsf-order"]||[],i=typeof r=="function"?r(n):r,o=(0,es.default)(n,i);return o.length>0&&t.push({type:"ORDER_MISSING_FIELDS",message:`Some fields got forgotten in the new order. They were automatically appended: ${o.join(", ")}`}),e["x-jsf-order"]=[...i,...o],{warnings:t}}function ss(e,r){if(!r)return{warnings:null};let t=[];return Object.entries(r).forEach(([i,o])=>{let a=ts(i);if(!o)return{warnings:null};if(o.properties){let l=(0,k.default)(e.properties,a);if(!l)return{warnings:null};let c=ss(l,o.properties);c.warnings&&t.push(...c.warnings)}if((0,k.default)(e.properties,a)){t.push({type:"FIELD_TO_CREATE_EXISTS",message:`Creating field "${i}" was ignored because it already exists.`});return}let f=(0,Pe.default)({},a,o);(0,rs.default)(e.properties,f)}),{warnings:t.flat()}}function Nm(e,r){if(!r)return{schema:e,warnings:null};let t={properties:{}};Object.entries(e).forEach(([o,a])=>{switch(o){case"properties":r.forEach(s=>{(0,Pe.default)(t.properties,s,a[s])});break;case"x-jsf-order":case"required":t[o]=a.filter(s=>r.includes(s));break;case"allOf":{let s=e[o]?.filter(f=>Fm(f,r));t[o]=s;break}case"x-jsf-logic":t[o]=a;break}});let n={};t.allOf?.length&&t.allOf.forEach(o=>{let{if:a,then:s,else:f}=o,l=e.allOf?.indexOf(o);n={...n,...yr(a,{fields:r,path:`allOf[${l}].if`}),...yr(s,{fields:r,path:`allOf[${l}].then`}),...yr(f,{fields:r,path:`allOf[${l}].else`})}});let i=[];return Object.keys(n).length>0&&(Object.entries(n).forEach(([o])=>{(0,Pe.default)(t.properties,o,e.properties?.[o])}),i.push({type:"PICK_MISSED_FIELD",message:`The picked fields are in conditionals that refeer other fields. They added automatically: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}. Check "meta" for more details.`,meta:n})),{schema:t,warnings:i}}function yr(e,{fields:r,path:t}){if(!e)return null;let n={};return e.required?.forEach(i=>{r.includes(i)||(n[i]={path:t})}),Object.entries(e.properties||[]).forEach(([i])=>{r.includes(i)||(n[i]={path:t})}),n}function Mm(e,r){let t=JSON.parse(JSON.stringify(e)),n=os(t,r.fields),i=as(t,r.allFields),o=ss(t,r.create),a=Nm(t,r.pick),s=a.schema,f=Pm(s,r.orderRoot);r.muteLogging||console.warn("json-schema-form modify(): We highly recommend you to handle/report the returned `warnings` as they highlight possible bugs in your modifications. To mute this log, pass `muteLogging: true` to the config.");let l=[n.warnings,i.warnings,o.warnings,a.warnings,f.warnings].flat().filter(Boolean);return{schema:s,warnings:l}}export{uu as createHeadlessForm,Mm as modify};
1
+ var us=Object.create;var xr=Object.defineProperty;var fs=Object.getOwnPropertyDescriptor;var ls=Object.getOwnPropertyNames;var cs=Object.getPrototypeOf,ps=Object.prototype.hasOwnProperty;var u=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var ds=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of ls(r))!ps.call(e,i)&&i!==t&&xr(e,i,{get:()=>r[i],enumerable:!(n=fs(r,i))||n.enumerable});return e};var q=(e,r,t)=>(t=e!=null?us(cs(e)):{},ds(r||!e||!e.__esModule?xr(t,"default",{value:e,enumerable:!0}):t,e));var K=u((Dm,Or)=>{"use strict";Or.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Le=u(A=>{"use strict";var g=K(),Me=()=>[{type:g.RANGE,from:48,to:57}],Sr=()=>[{type:g.CHAR,value:95},{type:g.RANGE,from:97,to:122},{type:g.RANGE,from:65,to:90}].concat(Me()),Er=()=>[{type:g.CHAR,value:9},{type:g.CHAR,value:10},{type:g.CHAR,value:11},{type:g.CHAR,value:12},{type:g.CHAR,value:13},{type:g.CHAR,value:32},{type:g.CHAR,value:160},{type:g.CHAR,value:5760},{type:g.RANGE,from:8192,to:8202},{type:g.CHAR,value:8232},{type:g.CHAR,value:8233},{type:g.CHAR,value:8239},{type:g.CHAR,value:8287},{type:g.CHAR,value:12288},{type:g.CHAR,value:65279}],hs=()=>[{type:g.CHAR,value:10},{type:g.CHAR,value:13},{type:g.CHAR,value:8232},{type:g.CHAR,value:8233}];A.words=()=>({type:g.SET,set:Sr(),not:!1});A.notWords=()=>({type:g.SET,set:Sr(),not:!0});A.ints=()=>({type:g.SET,set:Me(),not:!1});A.notInts=()=>({type:g.SET,set:Me(),not:!0});A.whitespace=()=>({type:g.SET,set:Er(),not:!1});A.notWhitespace=()=>({type:g.SET,set:Er(),not:!0});A.anyChar=()=>({type:g.SET,set:hs(),not:!0})});var Tr=u(Y=>{"use strict";var vr=K(),J=Le(),ms="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",gs={0:0,t:9,n:10,v:11,f:12,r:13};Y.strToChars=function(e){var r=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return e=e.replace(r,function(t,n,i,o,a,s,f,l){if(i)return t;var c=n?8:o?parseInt(o,16):a?parseInt(a,16):s?parseInt(s,8):f?ms.indexOf(f):gs[l],p=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(p)&&(p="\\"+p),p}),e};Y.tokenizeClass=(e,r)=>{for(var t=[],n=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,i,o;(i=n.exec(e))!=null;)if(i[1])t.push(J.words());else if(i[2])t.push(J.ints());else if(i[3])t.push(J.whitespace());else if(i[4])t.push(J.notWords());else if(i[5])t.push(J.notInts());else if(i[6])t.push(J.notWhitespace());else if(i[7])t.push({type:vr.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(o=i[12])t.push({type:vr.CHAR,value:o.charCodeAt(0)});else return[t,n.lastIndex];Y.error(r,"Unterminated character class")};Y.error=(e,r)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+r)}});var Ir=u(X=>{"use strict";var be=K();X.wordBoundary=()=>({type:be.POSITION,value:"b"});X.nonWordBoundary=()=>({type:be.POSITION,value:"B"});X.begin=()=>({type:be.POSITION,value:"^"});X.end=()=>({type:be.POSITION,value:"$"})});var qr=u((Hm,De)=>{"use strict";var F=Tr(),S=K(),w=Le(),xe=Ir();De.exports=e=>{var r=0,t,n,i={type:S.ROOT,stack:[]},o=i,a=i.stack,s=[],f=Ne=>{F.error(e,`Nothing to repeat at column ${Ne-1}`)},l=F.strToChars(e);for(t=l.length;r<t;)switch(n=l[r++],n){case"\\":switch(n=l[r++],n){case"b":a.push(xe.wordBoundary());break;case"B":a.push(xe.nonWordBoundary());break;case"w":a.push(w.words());break;case"W":a.push(w.notWords());break;case"d":a.push(w.ints());break;case"D":a.push(w.notInts());break;case"s":a.push(w.whitespace());break;case"S":a.push(w.notWhitespace());break;default:/\d/.test(n)?a.push({type:S.REFERENCE,value:parseInt(n,10)}):a.push({type:S.CHAR,value:n.charCodeAt(0)})}break;case"^":a.push(xe.begin());break;case"$":a.push(xe.end());break;case"[":var c;l[r]==="^"?(c=!0,r++):c=!1;var p=F.tokenizeClass(l.slice(r),e);r+=p[1],a.push({type:S.SET,set:p[0],not:c});break;case".":a.push(w.anyChar());break;case"(":var d={type:S.GROUP,stack:[],remember:!0};n=l[r],n==="?"&&(n=l[r+1],r+=2,n==="="?d.followedBy=!0:n==="!"?d.notFollowedBy=!0:n!==":"&&F.error(e,`Invalid group, character '${n}' after '?' at column ${r-1}`),d.remember=!1),a.push(d),s.push(o),o=d,a=d.stack;break;case")":s.length===0&&F.error(e,`Unmatched ) at column ${r-1}`),o=s.pop(),a=o.options?o.options[o.options.length-1]:o.stack;break;case"|":o.options||(o.options=[o.stack],delete o.stack);var h=[];o.options.push(h),a=h;break;case"{":var m=/^(\d+)(,(\d+)?)?\}/.exec(l.slice(r)),I,ye;m!==null?(a.length===0&&f(r),I=parseInt(m[1],10),ye=m[2]?m[3]?parseInt(m[3],10):1/0:I,r+=m[0].length,a.push({type:S.REPETITION,min:I,max:ye,value:a.pop()})):a.push({type:S.CHAR,value:123});break;case"?":a.length===0&&f(r),a.push({type:S.REPETITION,min:0,max:1,value:a.pop()});break;case"+":a.length===0&&f(r),a.push({type:S.REPETITION,min:1,max:1/0,value:a.pop()});break;case"*":a.length===0&&f(r),a.push({type:S.REPETITION,min:0,max:1/0,value:a.pop()});break;default:a.push({type:S.CHAR,value:n.charCodeAt(0)})}return s.length!==0&&F.error(e,"Unterminated group"),i};De.exports.types=S});var wr=u((zm,Ar)=>{"use strict";var P=class e{constructor(r,t){this.low=r,this.high=t,this.length=1+t-r}overlaps(r){return!(this.high<r.low||this.low>r.high)}touches(r){return!(this.high+1<r.low||this.low-1>r.high)}add(r){return new e(Math.min(this.low,r.low),Math.max(this.high,r.high))}subtract(r){return r.low<=this.low&&r.high>=this.high?[]:r.low>this.low&&r.high<this.high?[new e(this.low,r.low-1),new e(r.high+1,this.high)]:r.low<=this.low?[new e(r.high+1,this.high)]:[new e(this.low,r.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},Be=class e{constructor(r,t){this.ranges=[],this.length=0,r!=null&&this.add(r,t)}_update_length(){this.length=this.ranges.reduce((r,t)=>r+t.length,0)}add(r,t){var n=i=>{for(var o=0;o<this.ranges.length&&!i.touches(this.ranges[o]);)o++;for(var a=this.ranges.slice(0,o);o<this.ranges.length&&i.touches(this.ranges[o]);)i=i.add(this.ranges[o]),o++;a.push(i),this.ranges=a.concat(this.ranges.slice(o)),this._update_length()};return r instanceof e?r.ranges.forEach(n):(t==null&&(t=r),n(new P(r,t))),this}subtract(r,t){var n=i=>{for(var o=0;o<this.ranges.length&&!i.overlaps(this.ranges[o]);)o++;for(var a=this.ranges.slice(0,o);o<this.ranges.length&&i.overlaps(this.ranges[o]);)a=a.concat(this.ranges[o].subtract(i)),o++;this.ranges=a.concat(this.ranges.slice(o)),this._update_length()};return r instanceof e?r.ranges.forEach(n):(t==null&&(t=r),n(new P(r,t))),this}intersect(r,t){var n=[],i=o=>{for(var a=0;a<this.ranges.length&&!o.overlaps(this.ranges[a]);)a++;for(;a<this.ranges.length&&o.overlaps(this.ranges[a]);){var s=Math.max(this.ranges[a].low,o.low),f=Math.min(this.ranges[a].high,o.high);n.push(new P(s,f)),a++}};return r instanceof e?r.ranges.forEach(i):(t==null&&(t=r),i(new P(r,t))),this.ranges=n,this._update_length(),this}index(r){for(var t=0;t<this.ranges.length&&this.ranges[t].length<=r;)r-=this.ranges[t].length,t++;return this.ranges[t].low+r}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new e(this)}numbers(){return this.ranges.reduce((r,t)=>{for(var n=t.low;n<=t.high;)r.push(n),n++;return r},[])}subranges(){return this.ranges.map(r=>({low:r.low,high:r.high,length:1+r.high-r.low}))}};Ar.exports=Be});var jr=u((Gm,Cr)=>{"use strict";var Oe=qr(),Z=wr(),C=Oe.types;Cr.exports=class Q{constructor(r,t){if(this._setDefaults(r),r instanceof RegExp)this.ignoreCase=r.ignoreCase,this.multiline=r.multiline,r=r.source;else if(typeof r=="string")this.ignoreCase=t&&t.indexOf("i")!==-1,this.multiline=t&&t.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=Oe(r)}_setDefaults(r){this.max=r.max!=null?r.max:Q.prototype.max!=null?Q.prototype.max:100,this.defaultRange=r.defaultRange?r.defaultRange:this.defaultRange.clone(),r.randInt&&(this.randInt=r.randInt)}gen(){return this._gen(this.tokens,[])}_gen(r,t){var n,i,o,a,s;switch(r.type){case C.ROOT:case C.GROUP:if(r.followedBy||r.notFollowedBy)return"";for(r.remember&&r.groupNumber===void 0&&(r.groupNumber=t.push(null)-1),n=r.options?this._randSelect(r.options):r.stack,i="",a=0,s=n.length;a<s;a++)i+=this._gen(n[a],t);return r.remember&&(t[r.groupNumber]=i),i;case C.POSITION:return"";case C.SET:var f=this._expand(r);return f.length?String.fromCharCode(this._randSelect(f)):"";case C.REPETITION:for(o=this.randInt(r.min,r.max===1/0?r.min+this.max:r.max),i="",a=0;a<o;a++)i+=this._gen(r.value,t);return i;case C.REFERENCE:return t[r.value-1]||"";case C.CHAR:var l=this.ignoreCase&&this._randBool()?this._toOtherCase(r.value):r.value;return String.fromCharCode(l)}}_toOtherCase(r){return r+(97<=r&&r<=122?-32:65<=r&&r<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(r){return r instanceof Z?r.index(this.randInt(0,r.length-1)):r[this.randInt(0,r.length-1)]}_expand(r){if(r.type===Oe.types.CHAR)return new Z(r.value);if(r.type===Oe.types.RANGE)return new Z(r.from,r.to);{let t=new Z;for(let n=0;n<r.set.length;n++){let i=this._expand(r.set[n]);if(t.add(i),this.ignoreCase)for(let o=0;o<i.length;o++){let a=i.index(o),s=this._toOtherCase(a);a!==s&&t.add(s)}}return r.not?this.defaultRange.clone().subtract(t):this.defaultRange.clone().intersect(t)}}randInt(r,t){return r+Math.floor(Math.random()*(1+t-r))}get defaultRange(){return this._range=this._range||new Z(32,126)}set defaultRange(r){this._range=r}static randexp(r,t){var n;return typeof r=="string"&&(r=new RegExp(r,t)),r._randexp===void 0?(n=new Q(r,t),r._randexp=n):(n=r._randexp,n._setDefaults(r)),n.gen()}static sugar(){RegExp.prototype.gen=function(){return Q.randexp(this)}}}});var Ur=u((Zm,$r)=>{"use strict";var Ss=function(r){return Es(r)&&!vs(r)};function Es(e){return!!e&&typeof e=="object"}function vs(e){var r=Object.prototype.toString.call(e);return r==="[object RegExp]"||r==="[object Date]"||qs(e)}var Ts=typeof Symbol=="function"&&Symbol.for,Is=Ts?Symbol.for("react.element"):60103;function qs(e){return e.$$typeof===Is}function As(e){return Array.isArray(e)?[]:{}}function re(e,r){return r.clone!==!1&&r.isMergeableObject(e)?N(As(e),e,r):e}function ws(e,r,t){return e.concat(r).map(function(n){return re(n,t)})}function Cs(e,r){if(!r.customMerge)return N;var t=r.customMerge(e);return typeof t=="function"?t:N}function js(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(r){return Object.propertyIsEnumerable.call(e,r)}):[]}function Dr(e){return Object.keys(e).concat(js(e))}function Br(e,r){try{return r in e}catch{return!1}}function _s(e,r){return Br(e,r)&&!(Object.hasOwnProperty.call(e,r)&&Object.propertyIsEnumerable.call(e,r))}function Rs(e,r,t){var n={};return t.isMergeableObject(e)&&Dr(e).forEach(function(i){n[i]=re(e[i],t)}),Dr(r).forEach(function(i){_s(e,i)||(Br(e,i)&&t.isMergeableObject(r[i])?n[i]=Cs(i,t)(e[i],r[i],t):n[i]=re(r[i],t))}),n}function N(e,r,t){t=t||{},t.arrayMerge=t.arrayMerge||ws,t.isMergeableObject=t.isMergeableObject||Ss,t.cloneUnlessOtherwiseSpecified=re;var n=Array.isArray(r),i=Array.isArray(e),o=n===i;return o?n?t.arrayMerge(e,r,t):Rs(e,r,t):re(r,t)}N.all=function(r,t){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(n,i){return N(n,i,t)},{})};var Vs=N;$r.exports=Vs});var We=u((ny,gt)=>{"use strict";var fu=typeof global=="object"&&global&&global.Object===Object&&global;gt.exports=fu});var _=u((iy,yt)=>{"use strict";var lu=We(),cu=typeof self=="object"&&self&&self.Object===Object&&self,pu=lu||cu||Function("return this")();yt.exports=pu});var oe=u((oy,bt)=>{"use strict";var du=_(),hu=du.Symbol;bt.exports=hu});var Et=u((ay,St)=>{"use strict";var xt=oe(),Ot=Object.prototype,mu=Ot.hasOwnProperty,gu=Ot.toString,ae=xt?xt.toStringTag:void 0;function yu(e){var r=mu.call(e,ae),t=e[ae];try{e[ae]=void 0;var n=!0}catch{}var i=gu.call(e);return n&&(r?e[ae]=t:delete e[ae]),i}St.exports=yu});var Tt=u((sy,vt)=>{"use strict";var bu=Object.prototype,xu=bu.toString;function Ou(e){return xu.call(e)}vt.exports=Ou});var L=u((uy,At)=>{"use strict";var It=oe(),Su=Et(),Eu=Tt(),vu="[object Null]",Tu="[object Undefined]",qt=It?It.toStringTag:void 0;function Iu(e){return e==null?e===void 0?Tu:vu:qt&&qt in Object(e)?Su(e):Eu(e)}At.exports=Iu});var T=u((fy,wt)=>{"use strict";function qu(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}wt.exports=qu});var Te=u((ly,Ct)=>{"use strict";var Au=L(),wu=T(),Cu="[object AsyncFunction]",ju="[object Function]",_u="[object GeneratorFunction]",Ru="[object Proxy]";function Vu(e){if(!wu(e))return!1;var r=Au(e);return r==ju||r==_u||r==Cu||r==Ru}Ct.exports=Vu});var _t=u((cy,jt)=>{"use strict";var Ju=_(),Fu=Ju["__core-js_shared__"];jt.exports=Fu});var Jt=u((py,Vt)=>{"use strict";var ke=_t(),Rt=function(){var e=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pu(e){return!!Rt&&Rt in e}Vt.exports=Pu});var Pt=u((dy,Ft)=>{"use strict";var Nu=Function.prototype,Mu=Nu.toString;function Lu(e){if(e!=null){try{return Mu.call(e)}catch{}try{return e+""}catch{}}return""}Ft.exports=Lu});var Mt=u((hy,Nt)=>{"use strict";var Du=Te(),Bu=Jt(),$u=T(),Uu=Pt(),Hu=/[\\^$.*+?()[\]{}|]/g,zu=/^\[object .+?Constructor\]$/,Gu=Function.prototype,Wu=Object.prototype,ku=Gu.toString,Ku=Wu.hasOwnProperty,Yu=RegExp("^"+ku.call(Ku).replace(Hu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xu(e){if(!$u(e)||Bu(e))return!1;var r=Du(e)?Yu:zu;return r.test(Uu(e))}Nt.exports=Xu});var Dt=u((my,Lt)=>{"use strict";function Zu(e,r){return e?.[r]}Lt.exports=Zu});var Ie=u((gy,Bt)=>{"use strict";var Qu=Mt(),ef=Dt();function rf(e,r){var t=ef(e,r);return Qu(t)?t:void 0}Bt.exports=rf});var se=u((yy,$t)=>{"use strict";var tf=Ie(),nf=tf(Object,"create");$t.exports=nf});var zt=u((by,Ht)=>{"use strict";var Ut=se();function of(){this.__data__=Ut?Ut(null):{},this.size=0}Ht.exports=of});var Wt=u((xy,Gt)=>{"use strict";function af(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}Gt.exports=af});var Kt=u((Oy,kt)=>{"use strict";var sf=se(),uf="__lodash_hash_undefined__",ff=Object.prototype,lf=ff.hasOwnProperty;function cf(e){var r=this.__data__;if(sf){var t=r[e];return t===uf?void 0:t}return lf.call(r,e)?r[e]:void 0}kt.exports=cf});var Xt=u((Sy,Yt)=>{"use strict";var pf=se(),df=Object.prototype,hf=df.hasOwnProperty;function mf(e){var r=this.__data__;return pf?r[e]!==void 0:hf.call(r,e)}Yt.exports=mf});var Qt=u((Ey,Zt)=>{"use strict";var gf=se(),yf="__lodash_hash_undefined__";function bf(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=gf&&r===void 0?yf:r,this}Zt.exports=bf});var rn=u((vy,en)=>{"use strict";var xf=zt(),Of=Wt(),Sf=Kt(),Ef=Xt(),vf=Qt();function D(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}D.prototype.clear=xf;D.prototype.delete=Of;D.prototype.get=Sf;D.prototype.has=Ef;D.prototype.set=vf;en.exports=D});var nn=u((Ty,tn)=>{"use strict";function Tf(){this.__data__=[],this.size=0}tn.exports=Tf});var ue=u((Iy,on)=>{"use strict";function If(e,r){return e===r||e!==e&&r!==r}on.exports=If});var fe=u((qy,an)=>{"use strict";var qf=ue();function Af(e,r){for(var t=e.length;t--;)if(qf(e[t][0],r))return t;return-1}an.exports=Af});var un=u((Ay,sn)=>{"use strict";var wf=fe(),Cf=Array.prototype,jf=Cf.splice;function _f(e){var r=this.__data__,t=wf(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():jf.call(r,t,1),--this.size,!0}sn.exports=_f});var ln=u((wy,fn)=>{"use strict";var Rf=fe();function Vf(e){var r=this.__data__,t=Rf(r,e);return t<0?void 0:r[t][1]}fn.exports=Vf});var pn=u((Cy,cn)=>{"use strict";var Jf=fe();function Ff(e){return Jf(this.__data__,e)>-1}cn.exports=Ff});var hn=u((jy,dn)=>{"use strict";var Pf=fe();function Nf(e,r){var t=this.__data__,n=Pf(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}dn.exports=Nf});var le=u((_y,mn)=>{"use strict";var Mf=nn(),Lf=un(),Df=ln(),Bf=pn(),$f=hn();function B(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}B.prototype.clear=Mf;B.prototype.delete=Lf;B.prototype.get=Df;B.prototype.has=Bf;B.prototype.set=$f;mn.exports=B});var Ke=u((Ry,gn)=>{"use strict";var Uf=Ie(),Hf=_(),zf=Uf(Hf,"Map");gn.exports=zf});var xn=u((Vy,bn)=>{"use strict";var yn=rn(),Gf=le(),Wf=Ke();function kf(){this.size=0,this.__data__={hash:new yn,map:new(Wf||Gf),string:new yn}}bn.exports=kf});var Sn=u((Jy,On)=>{"use strict";function Kf(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}On.exports=Kf});var ce=u((Fy,En)=>{"use strict";var Yf=Sn();function Xf(e,r){var t=e.__data__;return Yf(r)?t[typeof r=="string"?"string":"hash"]:t.map}En.exports=Xf});var Tn=u((Py,vn)=>{"use strict";var Zf=ce();function Qf(e){var r=Zf(this,e).delete(e);return this.size-=r?1:0,r}vn.exports=Qf});var qn=u((Ny,In)=>{"use strict";var el=ce();function rl(e){return el(this,e).get(e)}In.exports=rl});var wn=u((My,An)=>{"use strict";var tl=ce();function nl(e){return tl(this,e).has(e)}An.exports=nl});var jn=u((Ly,Cn)=>{"use strict";var il=ce();function ol(e,r){var t=il(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}Cn.exports=ol});var qe=u((Dy,_n)=>{"use strict";var al=xn(),sl=Tn(),ul=qn(),fl=wn(),ll=jn();function $(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}$.prototype.clear=al;$.prototype.delete=sl;$.prototype.get=ul;$.prototype.has=fl;$.prototype.set=ll;_n.exports=$});var Vn=u((By,Rn)=>{"use strict";var cl="__lodash_hash_undefined__";function pl(e){return this.__data__.set(e,cl),this}Rn.exports=pl});var Fn=u(($y,Jn)=>{"use strict";function dl(e){return this.__data__.has(e)}Jn.exports=dl});var Ye=u((Uy,Pn)=>{"use strict";var hl=qe(),ml=Vn(),gl=Fn();function Ae(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new hl;++r<t;)this.add(e[r])}Ae.prototype.add=Ae.prototype.push=ml;Ae.prototype.has=gl;Pn.exports=Ae});var Mn=u((Hy,Nn)=>{"use strict";function yl(e,r,t,n){for(var i=e.length,o=t+(n?1:-1);n?o--:++o<i;)if(r(e[o],o,e))return o;return-1}Nn.exports=yl});var Dn=u((zy,Ln)=>{"use strict";function bl(e){return e!==e}Ln.exports=bl});var $n=u((Gy,Bn)=>{"use strict";function xl(e,r,t){for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}Bn.exports=xl});var Hn=u((Wy,Un)=>{"use strict";var Ol=Mn(),Sl=Dn(),El=$n();function vl(e,r,t){return r===r?El(e,r,t):Ol(e,Sl,t)}Un.exports=vl});var Xe=u((ky,zn)=>{"use strict";var Tl=Hn();function Il(e,r){var t=e==null?0:e.length;return!!t&&Tl(e,r,0)>-1}zn.exports=Il});var Ze=u((Ky,Gn)=>{"use strict";function ql(e,r,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(r,e[n]))return!0;return!1}Gn.exports=ql});var pe=u((Yy,Wn)=>{"use strict";function Al(e,r){for(var t=-1,n=e==null?0:e.length,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}Wn.exports=Al});var we=u((Xy,kn)=>{"use strict";function wl(e){return function(r){return e(r)}}kn.exports=wl});var Qe=u((Zy,Kn)=>{"use strict";function Cl(e,r){return e.has(r)}Kn.exports=Cl});var Xn=u((Qy,Yn)=>{"use strict";var jl=Ye(),_l=Xe(),Rl=Ze(),Vl=pe(),Jl=we(),Fl=Qe(),Pl=200;function Nl(e,r,t,n){var i=-1,o=_l,a=!0,s=e.length,f=[],l=r.length;if(!s)return f;t&&(r=Vl(r,Jl(t))),n?(o=Rl,a=!1):r.length>=Pl&&(o=Fl,a=!1,r=new jl(r));e:for(;++i<s;){var c=e[i],p=t==null?c:t(c);if(c=n||c!==0?c:0,a&&p===p){for(var d=l;d--;)if(r[d]===p)continue e;f.push(c)}else o(r,p,n)||f.push(c)}return f}Yn.exports=Nl});var Qn=u((eb,Zn)=>{"use strict";function Ml(e,r){for(var t=-1,n=r.length,i=e.length;++t<n;)e[i+t]=r[t];return e}Zn.exports=Ml});var R=u((rb,ei)=>{"use strict";function Ll(e){return e!=null&&typeof e=="object"}ei.exports=Ll});var ti=u((tb,ri)=>{"use strict";var Dl=L(),Bl=R(),$l="[object Arguments]";function Ul(e){return Bl(e)&&Dl(e)==$l}ri.exports=Ul});var Ce=u((nb,oi)=>{"use strict";var ni=ti(),Hl=R(),ii=Object.prototype,zl=ii.hasOwnProperty,Gl=ii.propertyIsEnumerable,Wl=ni(function(){return arguments}())?ni:function(e){return Hl(e)&&zl.call(e,"callee")&&!Gl.call(e,"callee")};oi.exports=Wl});var V=u((ib,ai)=>{"use strict";var kl=Array.isArray;ai.exports=kl});var li=u((ob,fi)=>{"use strict";var si=oe(),Kl=Ce(),Yl=V(),ui=si?si.isConcatSpreadable:void 0;function Xl(e){return Yl(e)||Kl(e)||!!(ui&&e&&e[ui])}fi.exports=Xl});var di=u((ab,pi)=>{"use strict";var Zl=Qn(),Ql=li();function ci(e,r,t,n,i){var o=-1,a=e.length;for(t||(t=Ql),i||(i=[]);++o<a;){var s=e[o];r>0&&t(s)?r>1?ci(s,r-1,t,n,i):Zl(i,s):n||(i[i.length]=s)}return i}pi.exports=ci});var er=u((sb,hi)=>{"use strict";function ec(e){return e}hi.exports=ec});var gi=u((ub,mi)=>{"use strict";function rc(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}mi.exports=rc});var xi=u((fb,bi)=>{"use strict";var tc=gi(),yi=Math.max;function nc(e,r,t){return r=yi(r===void 0?e.length-1:r,0),function(){for(var n=arguments,i=-1,o=yi(n.length-r,0),a=Array(o);++i<o;)a[i]=n[r+i];i=-1;for(var s=Array(r+1);++i<r;)s[i]=n[i];return s[r]=t(a),tc(e,this,s)}}bi.exports=nc});var Si=u((lb,Oi)=>{"use strict";function ic(e){return function(){return e}}Oi.exports=ic});var rr=u((cb,Ei)=>{"use strict";var oc=Ie(),ac=function(){try{var e=oc(Object,"defineProperty");return e({},"",{}),e}catch{}}();Ei.exports=ac});var Ii=u((pb,Ti)=>{"use strict";var sc=Si(),vi=rr(),uc=er(),fc=vi?function(e,r){return vi(e,"toString",{configurable:!0,enumerable:!1,value:sc(r),writable:!0})}:uc;Ti.exports=fc});var Ai=u((db,qi)=>{"use strict";var lc=800,cc=16,pc=Date.now;function dc(e){var r=0,t=0;return function(){var n=pc(),i=cc-(n-t);if(t=n,i>0){if(++r>=lc)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}qi.exports=dc});var Ci=u((hb,wi)=>{"use strict";var hc=Ii(),mc=Ai(),gc=mc(hc);wi.exports=gc});var je=u((mb,ji)=>{"use strict";var yc=er(),bc=xi(),xc=Ci();function Oc(e,r){return xc(bc(e,r,yc),e+"")}ji.exports=Oc});var tr=u((gb,_i)=>{"use strict";var Sc=9007199254740991;function Ec(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Sc}_i.exports=Ec});var _e=u((yb,Ri)=>{"use strict";var vc=Te(),Tc=tr();function Ic(e){return e!=null&&Tc(e.length)&&!vc(e)}Ri.exports=Ic});var Re=u((bb,Vi)=>{"use strict";var qc=_e(),Ac=R();function wc(e){return Ac(e)&&qc(e)}Vi.exports=wc});var Pi=u((xb,Fi)=>{"use strict";var Cc=Xn(),jc=di(),_c=je(),Ji=Re(),Rc=_c(function(e,r){return Ji(e)?Cc(e,jc(r,1,Ji,!0)):[]});Fi.exports=Rc});var Ve=u((Ob,Ni)=>{"use strict";var Vc=L(),Jc=R(),Fc="[object Symbol]";function Pc(e){return typeof e=="symbol"||Jc(e)&&Vc(e)==Fc}Ni.exports=Pc});var Li=u((Sb,Mi)=>{"use strict";var Nc=V(),Mc=Ve(),Lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dc=/^\w*$/;function Bc(e,r){if(Nc(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Mc(e)?!0:Dc.test(e)||!Lc.test(e)||r!=null&&e in Object(r)}Mi.exports=Bc});var $i=u((Eb,Bi)=>{"use strict";var Di=qe(),$c="Expected a function";function nr(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError($c);var t=function(){var n=arguments,i=r?r.apply(this,n):n[0],o=t.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return t.cache=o.set(i,a)||o,a};return t.cache=new(nr.Cache||Di),t}nr.Cache=Di;Bi.exports=nr});var Hi=u((vb,Ui)=>{"use strict";var Uc=$i(),Hc=500;function zc(e){var r=Uc(e,function(n){return t.size===Hc&&t.clear(),n}),t=r.cache;return r}Ui.exports=zc});var Gi=u((Tb,zi)=>{"use strict";var Gc=Hi(),Wc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kc=/\\(\\)?/g,Kc=Gc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Wc,function(t,n,i,o){r.push(i?o.replace(kc,"$1"):n||t)}),r});zi.exports=Kc});var Zi=u((Ib,Xi)=>{"use strict";var Wi=oe(),Yc=pe(),Xc=V(),Zc=Ve(),Qc=1/0,ki=Wi?Wi.prototype:void 0,Ki=ki?ki.toString:void 0;function Yi(e){if(typeof e=="string")return e;if(Xc(e))return Yc(e,Yi)+"";if(Zc(e))return Ki?Ki.call(e):"";var r=e+"";return r=="0"&&1/e==-Qc?"-0":r}Xi.exports=Yi});var eo=u((qb,Qi)=>{"use strict";var ep=Zi();function rp(e){return e==null?"":ep(e)}Qi.exports=rp});var ir=u((Ab,ro)=>{"use strict";var tp=V(),np=Li(),ip=Gi(),op=eo();function ap(e,r){return tp(e)?e:np(e,r)?[e]:ip(op(e))}ro.exports=ap});var or=u((wb,to)=>{"use strict";var sp=Ve(),up=1/0;function fp(e){if(typeof e=="string"||sp(e))return e;var r=e+"";return r=="0"&&1/e==-up?"-0":r}to.exports=fp});var io=u((Cb,no)=>{"use strict";var lp=ir(),cp=or();function pp(e,r){r=lp(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[cp(r[t++])];return t&&t==n?e:void 0}no.exports=pp});var ao=u((jb,oo)=>{"use strict";var dp=io();function hp(e,r,t){var n=e==null?void 0:dp(e,r);return n===void 0?t:n}oo.exports=hp});var fo=u((_b,uo)=>{"use strict";var mp=Ye(),gp=Xe(),yp=Ze(),bp=pe(),xp=we(),so=Qe(),Op=Math.min;function Sp(e,r,t){for(var n=t?yp:gp,i=e[0].length,o=e.length,a=o,s=Array(o),f=1/0,l=[];a--;){var c=e[a];a&&r&&(c=bp(c,xp(r))),f=Op(c.length,f),s[a]=!t&&(r||i>=120&&c.length>=120)?new mp(a&&c):void 0}c=e[0];var p=-1,d=s[0];e:for(;++p<i&&l.length<f;){var h=c[p],m=r?r(h):h;if(h=t||h!==0?h:0,!(d?so(d,m):n(l,m,t))){for(a=o;--a;){var I=s[a];if(!(I?so(I,m):n(e[a],m,t)))continue e}d&&d.push(m),l.push(h)}}return l}uo.exports=Sp});var co=u((Rb,lo)=>{"use strict";var Ep=Re();function vp(e){return Ep(e)?e:[]}lo.exports=vp});var ho=u((Vb,po)=>{"use strict";var Tp=pe(),Ip=fo(),qp=je(),Ap=co(),wp=qp(function(e){var r=Tp(e,Ap);return r.length&&r[0]===e[0]?Ip(r):[]});po.exports=wp});var go=u((Jb,mo)=>{"use strict";var Cp=le();function jp(){this.__data__=new Cp,this.size=0}mo.exports=jp});var bo=u((Fb,yo)=>{"use strict";function _p(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}yo.exports=_p});var Oo=u((Pb,xo)=>{"use strict";function Rp(e){return this.__data__.get(e)}xo.exports=Rp});var Eo=u((Nb,So)=>{"use strict";function Vp(e){return this.__data__.has(e)}So.exports=Vp});var To=u((Mb,vo)=>{"use strict";var Jp=le(),Fp=Ke(),Pp=qe(),Np=200;function Mp(e,r){var t=this.__data__;if(t instanceof Jp){var n=t.__data__;if(!Fp||n.length<Np-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Pp(n)}return t.set(e,r),this.size=t.size,this}vo.exports=Mp});var qo=u((Lb,Io)=>{"use strict";var Lp=le(),Dp=go(),Bp=bo(),$p=Oo(),Up=Eo(),Hp=To();function U(e){var r=this.__data__=new Lp(e);this.size=r.size}U.prototype.clear=Dp;U.prototype.delete=Bp;U.prototype.get=$p;U.prototype.has=Up;U.prototype.set=Hp;Io.exports=U});var Je=u((Db,wo)=>{"use strict";var Ao=rr();function zp(e,r,t){r=="__proto__"&&Ao?Ao(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}wo.exports=zp});var ar=u((Bb,Co)=>{"use strict";var Gp=Je(),Wp=ue();function kp(e,r,t){(t!==void 0&&!Wp(e[r],t)||t===void 0&&!(r in e))&&Gp(e,r,t)}Co.exports=kp});var _o=u(($b,jo)=>{"use strict";function Kp(e){return function(r,t,n){for(var i=-1,o=Object(r),a=n(r),s=a.length;s--;){var f=a[e?s:++i];if(t(o[f],f,o)===!1)break}return r}}jo.exports=Kp});var Vo=u((Ub,Ro)=>{"use strict";var Yp=_o(),Xp=Yp();Ro.exports=Xp});var Mo=u((de,H)=>{"use strict";var Zp=_(),No=typeof de=="object"&&de&&!de.nodeType&&de,Jo=No&&typeof H=="object"&&H&&!H.nodeType&&H,Qp=Jo&&Jo.exports===No,Fo=Qp?Zp.Buffer:void 0,Po=Fo?Fo.allocUnsafe:void 0;function ed(e,r){if(r)return e.slice();var t=e.length,n=Po?Po(t):new e.constructor(t);return e.copy(n),n}H.exports=ed});var Do=u((Hb,Lo)=>{"use strict";var rd=_(),td=rd.Uint8Array;Lo.exports=td});var Uo=u((zb,$o)=>{"use strict";var Bo=Do();function nd(e){var r=new e.constructor(e.byteLength);return new Bo(r).set(new Bo(e)),r}$o.exports=nd});var zo=u((Gb,Ho)=>{"use strict";var id=Uo();function od(e,r){var t=r?id(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}Ho.exports=od});var Wo=u((Wb,Go)=>{"use strict";function ad(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}Go.exports=ad});var Yo=u((kb,Ko)=>{"use strict";var sd=T(),ko=Object.create,ud=function(){function e(){}return function(r){if(!sd(r))return{};if(ko)return ko(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();Ko.exports=ud});var Zo=u((Kb,Xo)=>{"use strict";function fd(e,r){return function(t){return e(r(t))}}Xo.exports=fd});var sr=u((Yb,Qo)=>{"use strict";var ld=Zo(),cd=ld(Object.getPrototypeOf,Object);Qo.exports=cd});var ur=u((Xb,ea)=>{"use strict";var pd=Object.prototype;function dd(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||pd;return e===t}ea.exports=dd});var ta=u((Zb,ra)=>{"use strict";var hd=Yo(),md=sr(),gd=ur();function yd(e){return typeof e.constructor=="function"&&!gd(e)?hd(md(e)):{}}ra.exports=yd});var ia=u((Qb,na)=>{"use strict";function bd(){return!1}na.exports=bd});var fr=u((he,z)=>{"use strict";var xd=_(),Od=ia(),sa=typeof he=="object"&&he&&!he.nodeType&&he,oa=sa&&typeof z=="object"&&z&&!z.nodeType&&z,Sd=oa&&oa.exports===sa,aa=Sd?xd.Buffer:void 0,Ed=aa?aa.isBuffer:void 0,vd=Ed||Od;z.exports=vd});var la=u((ex,fa)=>{"use strict";var Td=L(),Id=sr(),qd=R(),Ad="[object Object]",wd=Function.prototype,Cd=Object.prototype,ua=wd.toString,jd=Cd.hasOwnProperty,_d=ua.call(Object);function Rd(e){if(!qd(e)||Td(e)!=Ad)return!1;var r=Id(e);if(r===null)return!0;var t=jd.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&ua.call(t)==_d}fa.exports=Rd});var pa=u((rx,ca)=>{"use strict";var Vd=L(),Jd=tr(),Fd=R(),Pd="[object Arguments]",Nd="[object Array]",Md="[object Boolean]",Ld="[object Date]",Dd="[object Error]",Bd="[object Function]",$d="[object Map]",Ud="[object Number]",Hd="[object Object]",zd="[object RegExp]",Gd="[object Set]",Wd="[object String]",kd="[object WeakMap]",Kd="[object ArrayBuffer]",Yd="[object DataView]",Xd="[object Float32Array]",Zd="[object Float64Array]",Qd="[object Int8Array]",eh="[object Int16Array]",rh="[object Int32Array]",th="[object Uint8Array]",nh="[object Uint8ClampedArray]",ih="[object Uint16Array]",oh="[object Uint32Array]",y={};y[Xd]=y[Zd]=y[Qd]=y[eh]=y[rh]=y[th]=y[nh]=y[ih]=y[oh]=!0;y[Pd]=y[Nd]=y[Kd]=y[Md]=y[Yd]=y[Ld]=y[Dd]=y[Bd]=y[$d]=y[Ud]=y[Hd]=y[zd]=y[Gd]=y[Wd]=y[kd]=!1;function ah(e){return Fd(e)&&Jd(e.length)&&!!y[Vd(e)]}ca.exports=ah});var ha=u((me,G)=>{"use strict";var sh=We(),da=typeof me=="object"&&me&&!me.nodeType&&me,ge=da&&typeof G=="object"&&G&&!G.nodeType&&G,uh=ge&&ge.exports===da,lr=uh&&sh.process,fh=function(){try{var e=ge&&ge.require&&ge.require("util").types;return e||lr&&lr.binding&&lr.binding("util")}catch{}}();G.exports=fh});var cr=u((tx,ya)=>{"use strict";var lh=pa(),ch=we(),ma=ha(),ga=ma&&ma.isTypedArray,ph=ga?ch(ga):lh;ya.exports=ph});var pr=u((nx,ba)=>{"use strict";function dh(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}ba.exports=dh});var dr=u((ix,xa)=>{"use strict";var hh=Je(),mh=ue(),gh=Object.prototype,yh=gh.hasOwnProperty;function bh(e,r,t){var n=e[r];(!(yh.call(e,r)&&mh(n,t))||t===void 0&&!(r in e))&&hh(e,r,t)}xa.exports=bh});var Sa=u((ox,Oa)=>{"use strict";var xh=dr(),Oh=Je();function Sh(e,r,t,n){var i=!t;t||(t={});for(var o=-1,a=r.length;++o<a;){var s=r[o],f=n?n(t[s],e[s],s,t,e):void 0;f===void 0&&(f=e[s]),i?Oh(t,s,f):xh(t,s,f)}return t}Oa.exports=Sh});var va=u((ax,Ea)=>{"use strict";function Eh(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}Ea.exports=Eh});var Fe=u((sx,Ta)=>{"use strict";var vh=9007199254740991,Th=/^(?:0|[1-9]\d*)$/;function Ih(e,r){var t=typeof e;return r=r??vh,!!r&&(t=="number"||t!="symbol"&&Th.test(e))&&e>-1&&e%1==0&&e<r}Ta.exports=Ih});var qa=u((ux,Ia)=>{"use strict";var qh=va(),Ah=Ce(),wh=V(),Ch=fr(),jh=Fe(),_h=cr(),Rh=Object.prototype,Vh=Rh.hasOwnProperty;function Jh(e,r){var t=wh(e),n=!t&&Ah(e),i=!t&&!n&&Ch(e),o=!t&&!n&&!i&&_h(e),a=t||n||i||o,s=a?qh(e.length,String):[],f=s.length;for(var l in e)(r||Vh.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||jh(l,f)))&&s.push(l);return s}Ia.exports=Jh});var wa=u((fx,Aa)=>{"use strict";function Fh(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}Aa.exports=Fh});var ja=u((lx,Ca)=>{"use strict";var Ph=T(),Nh=ur(),Mh=wa(),Lh=Object.prototype,Dh=Lh.hasOwnProperty;function Bh(e){if(!Ph(e))return Mh(e);var r=Nh(e),t=[];for(var n in e)n=="constructor"&&(r||!Dh.call(e,n))||t.push(n);return t}Ca.exports=Bh});var hr=u((cx,_a)=>{"use strict";var $h=qa(),Uh=ja(),Hh=_e();function zh(e){return Hh(e)?$h(e,!0):Uh(e)}_a.exports=zh});var Va=u((px,Ra)=>{"use strict";var Gh=Sa(),Wh=hr();function kh(e){return Gh(e,Wh(e))}Ra.exports=kh});var La=u((dx,Ma)=>{"use strict";var Ja=ar(),Kh=Mo(),Yh=zo(),Xh=Wo(),Zh=ta(),Fa=Ce(),Pa=V(),Qh=Re(),em=fr(),rm=Te(),tm=T(),nm=la(),im=cr(),Na=pr(),om=Va();function am(e,r,t,n,i,o,a){var s=Na(e,t),f=Na(r,t),l=a.get(f);if(l){Ja(e,t,l);return}var c=o?o(s,f,t+"",e,r,a):void 0,p=c===void 0;if(p){var d=Pa(f),h=!d&&em(f),m=!d&&!h&&im(f);c=f,d||h||m?Pa(s)?c=s:Qh(s)?c=Xh(s):h?(p=!1,c=Kh(f,!0)):m?(p=!1,c=Yh(f,!0)):c=[]:nm(f)||Fa(f)?(c=s,Fa(s)?c=om(s):(!tm(s)||rm(s))&&(c=Zh(f))):p=!1}p&&(a.set(f,c),i(c,f,n,o,a),a.delete(f)),Ja(e,t,c)}Ma.exports=am});var mr=u((hx,Ba)=>{"use strict";var sm=qo(),um=ar(),fm=Vo(),lm=La(),cm=T(),pm=hr(),dm=pr();function Da(e,r,t,n,i){e!==r&&fm(r,function(o,a){if(i||(i=new sm),cm(o))lm(e,r,a,t,Da,n,i);else{var s=n?n(dm(e,a),o,a+"",e,r,i):void 0;s===void 0&&(s=o),um(e,a,s)}},pm)}Ba.exports=Da});var Ua=u((mx,$a)=>{"use strict";var hm=ue(),mm=_e(),gm=Fe(),ym=T();function bm(e,r,t){if(!ym(t))return!1;var n=typeof r;return(n=="number"?mm(t)&&gm(r,t.length):n=="string"&&r in t)?hm(t[r],e):!1}$a.exports=bm});var gr=u((gx,Ha)=>{"use strict";var xm=je(),Om=Ua();function Sm(e){return xm(function(r,t){var n=-1,i=t.length,o=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Om(t[0],t[1],a)&&(o=i<3?void 0:o,i=1),r=Object(r);++n<i;){var s=t[n];s&&e(r,s,n,o)}return r})}Ha.exports=Sm});var Ga=u((yx,za)=>{"use strict";var Em=mr(),vm=gr(),Tm=vm(function(e,r,t){Em(e,r,t)});za.exports=Tm});var ka=u((bx,Wa)=>{"use strict";var Im=mr(),qm=gr(),Am=qm(function(e,r,t,n){Im(e,r,t,n)});Wa.exports=Am});var Xa=u((xx,Ya)=>{"use strict";var wm=dr(),Cm=ir(),jm=Fe(),Ka=T(),_m=or();function Rm(e,r,t,n){if(!Ka(e))return e;r=Cm(r,e);for(var i=-1,o=r.length,a=o-1,s=e;s!=null&&++i<o;){var f=_m(r[i]),l=t;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=a){var c=s[f];l=n?n(c,f,s):void 0,l===void 0&&(l=Ka(c)?c:jm(r[i+1])?[]:{})}wm(s,f,l),s=s[f]}return e}Ya.exports=Rm});var Qa=u((Ox,Za)=>{"use strict";var Vm=Xa();function Jm(e,r,t){return e==null?e:Vm(e,r,t)}Za.exports=Jm});var Mr=q(jr(),1);function Rr(e){if(e===0)return 0;let r=e/1024;return Number.parseFloat(r.toFixed(2))}var ys=["if","then","else"];function _r(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ee(e,r){if(!(!e||!r)&&!(typeof e!="object"||typeof r!="object"))for(let[t,n]of Object.entries(r)){if(ys.includes(t))continue;let i=e[t];if(_r(n))_r(i)?ee(i,n):i!==n&&(e[t]=n);else if(i&&Array.isArray(n)){let o=i;for(let a of n)a&&typeof a=="object"?ee(o,n):t==="required"?o.find(s=>s===a)||o.push(a):e[t]=n}else e[t]!==n&&(e[t]=n)}}var Vr="yyyy-MM-dd";function Jr(e,r){let t=new Date(e).getTime(),n=new Date(r).getTime();return t<n?"LESSER":t>n?"GREATER":"EQUAL"}function bs(e,r){let t=Jr(e,r);return t==="GREATER"||t==="EQUAL"}function xs(e,r){let t=Jr(e,r);return t==="LESSER"||t==="EQUAL"}function Fr(e,r,t,n=[]){let i=typeof e=="string",o=e==="",a=e===void 0||e===null&&t.treatNullAsUndefined,s=o||a,f=[];if(!i||s||r["x-jsf-presentation"]===void 0)return f;let{minDate:l,maxDate:c}=r["x-jsf-presentation"];return l&&!bs(e,l)&&f.push({path:n,validation:"minDate",schema:r,value:e}),c&&!xs(e,c)&&f.push({path:n,validation:"maxDate",schema:r,value:e}),f}function Pr(e){return e["x-jsf-presentation"]?.inputType==="checkbox"}var Nr="Please acknowledge this field";function Lr(e,r,t,n){let i=e["x-jsf-presentation"];switch(t){case"type":return Os(e.type);case"required":return Pr(e)?Nr:"Required field";case"forbidden":return"Not allowed";case"const":return Pr(e)&&r===!1?Nr:`The only accepted value is ${JSON.stringify(e.const)}.`;case"enum":return`The option "${$e(r)}" is not valid.`;case"oneOf":return`The option "${$e(r)}" is not valid.`;case"anyOf":return`The option "${$e(r)}" is not valid.`;case"not":return"The value must not satisfy the provided schema";case"minLength":return`Please insert at least ${e.minLength} characters`;case"maxLength":return`Please insert up to ${e.maxLength} characters`;case"pattern":return`Must have a valid format. E.g. ${(0,Mr.randexp)(e.pattern||"")}`;case"format":if(e.format==="email")return"Please enter a valid email address";if(e.format==="date"){let o=new Date().toISOString().split("T")[0];return`Must be a valid date in ${Vr.toLowerCase()} format. e.g. ${o}`}return`Must be a valid ${e.format} format`;case"multipleOf":return`Must be a multiple of ${e.multipleOf}`;case"maximum":return`Must be smaller or equal to ${e.maximum}`;case"exclusiveMaximum":return`Must be smaller than ${e.exclusiveMaximum}`;case"minimum":return`Must be greater or equal to ${e.minimum}`;case"exclusiveMinimum":return`Must be greater than ${e.exclusiveMinimum}`;case"minDate":return`The date must be ${i?.minDate} or after.`;case"maxDate":return`The date must be ${i?.maxDate} or before.`;case"fileStructure":return"Not a valid file.";case"maxFileSize":{let o=i?.maxFileSize,a=typeof o=="number"?Rr(o):void 0;return`File size too large.${a?` The limit is ${a} MB.`:""}`}case"accept":{let o=i?.accept;return`Unsupported file format.${o?` The acceptable formats are ${o}.`:""}`}case"minItems":{let o=e.minItems===1?"item":"items";return`Must have at least ${e.minItems} ${o}`}case"maxItems":{let o=e.maxItems===1?"item":"items";return`Must have at most ${e.maxItems} ${o}`}case"uniqueItems":return"Items must be unique";case"contains":throw new Error('"contains" is not implemented yet');case"minContains":throw new Error('"minContains" is not implemented yet');case"maxContains":throw new Error('"maxContains" is not implemented yet');case"additionalProperties":return"Additional property is not allowed";case"json-logic":return n||"The value is not valid"}}function Os(e){if(Array.isArray(e))return`The value must be a ${e.map(t=>t==="integer"?"number":t).join(" or ")}`;switch(e){case"number":case"integer":return"The value must be a number";case"boolean":return"The value must be a boolean";case"null":return"The value must be null";case"string":return"The value must be a string";case"object":return"The value must be an object";case"array":return"The value must be an array";default:return e?`The value must be ${e}`:"Invalid value"}}function $e(e){return typeof e=="string"?e:JSON.stringify(e)}var zr=q(Ur(),1);function Js(e,r){let t={};return r.forEach((i,o)=>{t[i]=o}),e.sort((i,o)=>{let a=t[i.name]??1/0,s=t[o.name]??1/0;return a!==s?a-s:e.indexOf(i)-e.indexOf(o)})}function Ue(e,r){if(typeof e=="boolean")throw new TypeError("Schema must be an object");return e["x-jsf-order"]!==void 0?Js(r,e["x-jsf-order"]):r}function Fs(e,r,t){r.checkboxValue=t.const,t.type==="boolean"&&(r.checkboxValue=!0)}function Ps(e,r){if(e.options===void 0){let t=Ls(r);t&&(e.options=t,r.type==="array"&&(e.multiple=!0))}}function Ns(e,r,t,n){if(e.options===void 0){let i=$s(r,t,n);i&&(e.fields=i)}}function Ms(e,r){if(!e)return"text";switch(e){case"string":{let{oneOf:t,format:n}=r;return n==="email"?"email":n==="date"?"date":n==="data-url"?"file":t?"radio":"text"}case"number":case"integer":return"number";case"object":return"fieldset";case"array":{let{items:t}=r;return t?.properties?"group-array":"select"}case"boolean":return"checkbox";default:return"text"}}function Hr(e,r,t,n){let i=t["x-jsf-presentation"];if(i?.inputType)return i.inputType;if(n&&r!=="root")throw new Error(`Strict error: Missing inputType to field "${t.title}".
2
+ You can fix the json schema or skip this error by calling createHeadlessForm(schema, { strictInputType: false })`);if(!t.type){if(t.items?.properties)return"group-array";if(t.properties)return"select"}return Ms(e||t.type||"string",t)}function Se(e){return e.filter(r=>r!==null&&typeof r=="object"&&r.const!==null).map(r=>{let t=r.title,n=r.const,o=r["x-jsf-presentation"]?.meta,a={label:t||"",value:n};o&&(a.meta=o);let{title:s,const:f,"x-jsf-presentation":l,...c}=r;return{...a,...c}})}function Ls(e){if(e.oneOf)return Se(e.oneOf||[]);if(e.items?.anyOf)return Se(e.items.anyOf);if(e.anyOf)return Se(e.anyOf);if(e.enum){let r=e.enum?.map(t=>({title:typeof t=="string"?t:JSON.stringify(t),const:t}))||[];return Se(r)}return null}function Ds(e,r,t){let n=[];for(let o in e.properties){let a=e.required?.includes(o)||!1,s=j({schema:e.properties[o],name:o,required:a,originalSchema:r.properties?.[o]||e.properties[o],strictInputType:t});s&&n.push(s)}return Ue(e,n)}function Bs(e,r,t){let n=[];if(typeof e.items!="object"||e.items===null)return[];if(e.items?.type==="object"){let o=e.items;for(let a in o.properties){let s=o.required?.includes(a)||!1,f=j({schema:o.properties[a],name:a,required:s,originalSchema:r,strictInputType:t});f&&(f.nameKey=a,n.push(f))}}else{let o=j({schema:e.items,name:"item",required:!1,originalSchema:r,strictInputType:t});o&&n.push(o)}return Ue(e.items,n)}function $s(e,r,t){return typeof e.properties=="object"&&e.properties!==null?Ds(e,r,t):typeof e.items=="object"&&e.items!==null?Bs(e,r,t):null}var Us=["title","type","x-jsf-errorMessage","x-jsf-presentation","oneOf","anyOf","properties"];function j({schema:e,name:r,required:t=!1,originalSchema:n,strictInputType:i=!1,type:o=void 0}){if(e===!1){let d=Hr(o,r,n,i),h=["fieldset","group-array"].includes(d);return{type:d,name:r,inputType:d,jsonType:"boolean",required:t,isVisible:!1,...h&&{fields:[]}}}if(typeof e=="boolean")return null;let a=n["x-jsf-presentation"]||{},s=e["x-jsf-presentation"]||{},f=(0,zr.default)(a,s,{arrayMerge:(d,h,m)=>h}),l=e["x-jsf-errorMessage"],c=Hr(o,r,e,i),p={...Object.entries(e).filter(([d])=>!Us.includes(d)).reduce((d,[h,m])=>({...d,[h]:m}),{}),name:r,inputType:c,type:c,jsonType:o||e.type,required:t,isVisible:!0,...l&&{errorMessage:l}};return c==="checkbox"&&Fs(c,p,e),e.title&&(p.label=e.title),Object.keys(f).length>0&&Object.entries(f).forEach(([d,h])=>{d!=="inputType"&&(p[d]=h)}),r!=="root"&&Ps(p,e),Ns(p,e,n),p}function E(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function v(e,r){if(typeof e!=typeof r)return!1;if(e===r)return!0;if(e===null||r===null)return!1;if(Array.isArray(e)&&Array.isArray(r))return e.length!==r.length?!1:e.every((t,n)=>v(t,r[n]));if(E(e)&&E(r)){let t=Object.keys(e).sort(),n=Object.keys(r).sort();return t.length!==n.length||!v(t,n)?!1:t.every(i=>v(e[i],r[i]))}return!1}function Gr(e){if(typeof structuredClone=="function")try{return structuredClone(e)}catch(r){console.warn("structuredClone failed, falling back to JSON method:",r)}try{return JSON.parse(JSON.stringify(e))}catch{throw new Error("Deep clone failed: Object may contain circular references or non-serializable values")}}function Wr(e,r,t,n,i){return Array.isArray(e)?[...Hs(r,e,i),...ks(r,e,i),...Ws(e,r,t,n,i),...Gs(r,e,t,n,i),...zs(r,e,t,n,i)]:[]}function Hs(e,r,t){let n=[],i=r.length;return e.maxItems!==void 0&&i>e.maxItems&&n.push({path:t,validation:"maxItems",schema:e,value:r}),e.minItems!==void 0&&i<e.minItems&&n.push({path:t,validation:"minItems",schema:e,value:r}),n}function zs(e,r,t,n,i){if(e.items===void 0)return[];let o=[],a=Array.isArray(e.prefixItems)?e.prefixItems.length:0;for(let[s,f]of r.slice(a).entries())o.push(...x(f,e.items,t,[...i,"items",s+a],n));return o}function Gs(e,r,t,n,i){if(!Array.isArray(e.prefixItems))return[];let o=[];for(let[a,s]of r.entries())a<e.prefixItems.length&&o.push(...x(s,e.prefixItems[a],t,[...i,"prefixItems",a],n));return o}function Ws(e,r,t,n,i){if(!("contains"in r))return[];let o=[],a=e.filter(s=>x(s,r.contains,t,[...i,"contains"],n).length===0).length;return r.minContains===void 0&&r.maxContains===void 0?a<1&&o.push({path:i,validation:"contains",schema:r,value:e}):(r.minContains!==void 0&&a<r.minContains&&o.push({path:i,validation:"minContains",schema:r,value:e}),r.maxContains!==void 0&&a>r.maxContains&&o.push({path:i,validation:"maxContains",schema:r,value:e})),o}function ks(e,r,t){if(e.uniqueItems!==!0)return[];let n=new Map;for(let i=0;i<r.length;i++){for(let o of n.values())if(v(r[i],o))return[{path:t,validation:"uniqueItems",schema:e,value:r[i]}];n.set(i,r[i])}return[]}function kr(e,r,t,n,i=[]){if(!r.allOf)return[];for(let o=0;o<r.allOf.length;o++){let a=r.allOf[o],s=x(e,a,t,[...i,"allOf",o],n);if(s.length>0)return s}return[]}function Kr(e,r,t,n,i=[]){if(!r.anyOf)return[];if(i.length!==0){for(let s of r.anyOf)if(x(e,s,t,i,n).length===0)return[];return[{path:i,validation:"anyOf",schema:r,value:e}]}let o=[];for(let s of r.anyOf){let f=x(e,s,t,i,n);f.length!==0&&o.push(f)}return o.length<r.anyOf.length?[]:o.flat().reverse()}function Yr(e,r,t,n,i=[]){if(!r.oneOf)return[];if(r.oneOf.length===0)return[];let o=0;for(let a=0;a<r.oneOf.length&&!(x(e,r.oneOf[a],t,i,n).length===0&&(o++,o>1));a++);return o===0?[{path:i,validation:"oneOf",schema:r,value:e}]:o>1?[{path:i,validation:"oneOf",schema:r,value:e}]:[]}function Xr(e,r,t,n,i=[]){return r.not===void 0?[]:typeof r.not=="boolean"?r.not?[{path:i,validation:"not",schema:r,value:e}]:[]:x(e,r.not,t,i,n).length===0?[{path:i,validation:"not",schema:r,value:e}]:[]}function Zr(e,r,t=[]){let n=typeof r.const<"u"?r.const:r.value;return n===void 0?[]:v(n,e)?[]:[{path:t,validation:"const",schema:r,value:e}]}function Qr(e,r,t=[]){return r.enum===void 0?[]:r.enum.some(n=>v(n,e))?[]:[{path:t,validation:"enum",schema:r,value:e}]}function et(e,r,t=[]){let n=r["x-jsf-presentation"],i=n?.inputType==="file",o=typeof n?.maxFileSize=="number"||typeof n?.accept=="string";if(!(i||o))return[];if(!Array.isArray(e))return[];if(e.length===0)return[];if(!e.every(l=>E(l)&&typeof l.name=="string"&&typeof l.size=="number"))return[{path:t,validation:"fileStructure",schema:r,value:e}];let f=e;if(typeof n?.maxFileSize=="number"){let l=n.maxFileSize*1024;if(f.some(p=>p.size>l))return[{path:t,validation:"maxFileSize",schema:r,value:e}]}if(typeof n?.accept=="string"&&n.accept.trim()!==""){let l=n.accept.toLowerCase().split(",").map(c=>c.trim()).filter(c=>c).map(c=>c.startsWith(".")?c:`.${c}`);if(l.length>0&&!f.some(p=>{let d=p.name.toLowerCase(),h=d.includes(".")?`.${d.split(".").pop()}`:"";return h!==""&&l.includes(h)}))return[{path:t,validation:"accept",schema:r,value:e}]}return[]}import M from"json-logic-js";function ve(e,r){let{validations:t,computedValues:n}=e;return{schema:{validations:t,computedValues:n},value:r}}function rt(e){return/\{\{.*?\}\}/.test(e)}function Ee(e={}){return Object.entries(e).reduce((r,[t,n])=>({...r,[t]:n??Number.NaN}),{})}function tt(e,r,t=[]){let n=e["x-jsf-logic-validations"];return!n||n.length===0?[]:n.map(i=>{let o=r?.schema?.validations?.[i],a=r?.value;if(!o)throw new Error(`[json-schema-form] json-logic error: "${e.title}" required validation "${i}" doesn't exist.`);if(M.apply(o.rule,Ee(a))===!1){let f=o.errorMessage;return f&&rt(f)&&(f=f.replace(/\{\{(.*?)\}\}/g,(l,c)=>{let p=c.trim(),d=r.schema.computedValues?.[p];return d?M.apply(d.rule,Ee(a)):M.apply({var:p},Ee(a))})),[{path:t,validation:"json-logic",customErrorMessage:f,schema:e,value:a}]}return[]}).flat()}function Ks(e,r,t){if(!r)throw new Error(`[json-schema-form] json-logic error: Computed value "${e}" doesn't exist`);return M.apply(r,Ee(t))}function nt(e,r,t){if(r){let n={};Object.entries(r).forEach(([i,o])=>{let a=Ks(i,o.rule,t);n[i]=a}),te(e,n)}return e}function te(e,r){function t(n){if(typeof n!="object")return;let i=n["x-jsf-logic-computedAttrs"];if(i&&Ys(n,r,i),typeof n.properties=="object")for(let o in n.properties)t(n.properties[o]);if(typeof n.if=="object"&&te(n.if,r),n.allOf&&n.allOf.length>0)for(let o of n.allOf)te(o,r);if(n.anyOf&&n.anyOf.length>0)for(let o of n.anyOf)te(o,r);if(n.oneOf&&n.oneOf.length>0)for(let o of n.oneOf)te(o,r);delete n["x-jsf-logic-computedAttrs"]}t(e)}function Ys(e,r,t){if(typeof e!="object")return;function n(o){return rt(o)?o.replace(/\{\{(.*?)\}\}/g,(a,s)=>{let f=s.trim();return r[f]||`{{${f}}}`}):r[o]}function i(o,a,s,f){if(typeof o!="object")return;let l=a;o[l]||(o[l]={}),Object.entries(s).forEach(([c,p])=>{typeof p=="string"?o[l][c]=n(p):i(o[l],c,p,f)})}for(let o in t){let a=o,s=t[o];typeof s=="string"?e[a]=n(s):typeof e=="object"&&i(e,a,s,r)}}function it(e){if(e)for(let[r,t]of Object.entries(e))M.add_operation(r,t)}function ot(e){if(e)for(let r of Object.keys(e))M.rm_operation(r)}function at(e,r,t=[]){let n=[],i=ne(r);return typeof e!="number"?[]:i!==void 0&&!["number","integer"].includes(i)?[]:(r.multipleOf!==void 0&&e%r.multipleOf!==0&&n.push({path:t,validation:"multipleOf",schema:r,value:e}),r.maximum!==void 0&&e>r.maximum&&n.push({path:t,validation:"maximum",schema:r,value:e}),r.exclusiveMaximum!==void 0&&e>=r.exclusiveMaximum&&n.push({path:t,validation:"exclusiveMaximum",schema:r,value:e}),r.minimum!==void 0&&e<r.minimum&&n.push({path:t,validation:"minimum",schema:r,value:e}),r.exclusiveMinimum!==void 0&&e<=r.exclusiveMinimum&&n.push({path:t,validation:"exclusiveMinimum",schema:r,value:e}),n)}function st(e,r,t,n,i=[]){if(typeof r=="object"&&r.properties&&E(e)){let o=[];for(let[a,s]of Object.entries(r.properties))o.push(...x(e[a],s,t,[...i,a],n));return o}return[]}var ut;(function(e){e["7bit"]="7bit",e["8bit"]="8bit",e.Base64="base64",e.Binary="binary",e.IETFToken="ietf-token",e.QuotedPrintable="quoted-printable",e.XToken="x-token"})(ut||(ut={}));var b;(function(e){e.Date="date",e.DateTime="date-time",e.Duration="duration",e.Email="email",e.Hostname="hostname",e.IDNEmail="idn-email",e.IDNHostname="idn-hostname",e.IPv4="ipv4",e.IPv6="ipv6",e.IRI="iri",e.IRIReference="iri-reference",e.JSONPointer="json-pointer",e.JSONPointerURIFragment="json-pointer-uri-fragment",e.RegEx="regex",e.RelativeJSONPointer="relative-json-pointer",e.Time="time",e.URI="uri",e.URIReference="uri-reference",e.URITemplate="uri-template",e.UUID="uuid"})(b||(b={}));var ft;(function(e){e.Array="array",e.Boolean="boolean",e.Integer="integer",e.Null="null",e.Number="number",e.Object="object",e.String="string"})(ft||(ft={}));var O={DATE_TIME:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,DATE:/^\d{4}-\d{2}-\d{2}$/,TIME:/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/,DURATION:/^P(?!$)(?:\d+Y)?(?:\d+M)?(?:\d+D)?(?:T(?=\d)(?:\d+H)?(?:\d+M)?(?:\d+S)?)?$/,EMAIL:/^[\w.!#$%&'*+/=?^`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,IDN_EMAIL:/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/,HOSTNAME:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i,IDN_HOSTNAME:/^[^\s._-].*[^\s._-]$/,IPV6_PART:/^[0-9a-f]{1,4}$/i,PROTOCOL:/^[a-z]+:/,URI_REFERENCE:/^\S*$/,UUID:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,JSON_POINTER:/^(?:\/(?:[^~/]|~0|~1)*)*$/,JSON_POINTER_URI_FRAGMENT:/^#(?:\/(?:[\w\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER:/^(?:0|[1-9]\d*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,URI_TEMPLATE:/^(?:[!#$&'()*+,/:;=?@\w\-.~]|%[0-9a-f]{2}|\{[+#./;?&=,!@|]?(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?(?:,(?:\w|%[0-9a-f]{2})+(?::[1-9]\d{0,3}|\*)?)*\})*$/i},Xs={[b.DateTime]:e=>O.DATE_TIME.test(e),[b.Date]:e=>O.DATE.test(e),[b.Time]:e=>O.TIME.test(e),[b.Duration]:e=>O.DURATION.test(e),[b.Email]:e=>e.length<=254&&O.EMAIL.test(e),[b.IDNEmail]:e=>e.length<=254&&O.IDN_EMAIL.test(e),[b.Hostname]:e=>e.length>255?!1:e.split(".").every(t=>O.HOSTNAME.test(t)),[b.IDNHostname]:e=>e.length>255?!1:e.split(".").every(t=>t.length<=63&&O.IDN_HOSTNAME.test(t)),[b.IPv4]:e=>{let r=e.split(".");return r.length!==4?!1:r.every(t=>{let n=Number.parseInt(t,10);return n>=0&&n<=255&&t===n.toString()})},[b.IPv6]:e=>{let r=e.split(":");if(r.length>8)return!1;let t=!1;return r.every(n=>n===""?t?!1:(t=!0,!0):O.IPV6_PART.test(n))},[b.URI]:e=>{try{let r=new URL(e);return r.protocol!==""&&O.PROTOCOL.test(r.protocol)}catch{return!1}},[b.URIReference]:e=>{try{return e.startsWith("//")?O.URI_REFERENCE.test(e.slice(2)):(new URL(e,"http://example.com"),!0)}catch{return!1}},[b.IRI]:e=>{try{let r=new URL(e);return r.protocol!==""&&O.PROTOCOL.test(r.protocol)}catch{return!1}},[b.IRIReference]:e=>{try{return e.startsWith("//")?O.URI_REFERENCE.test(e.slice(2)):(new URL(e,"http://example.com"),!0)}catch{return!1}},[b.RegEx]:e=>{try{return new RegExp(e,"u"),!0}catch{return!1}},[b.UUID]:e=>O.UUID.test(e),[b.JSONPointer]:e=>O.JSON_POINTER.test(e),[b.JSONPointerURIFragment]:e=>O.JSON_POINTER_URI_FRAGMENT.test(e),[b.RelativeJSONPointer]:e=>O.RELATIVE_JSON_POINTER.test(e),[b.URITemplate]:e=>O.URI_TEMPLATE.test(e)};function lt(e,r,t=[]){let n=[];if(typeof e!="string")return n;let i=Xs[r.format];return i&&!i(e)&&n.push({path:t,validation:"format",schema:r,value:e}),n}function ct(e,r,t=[]){let n=[],i=ne(r);if(typeof e!="string")return[];if(i!==void 0&&i!=="string")return[];let o=[...new Intl.Segmenter().segment(e)].length;if(r.minLength!==void 0&&o<r.minLength&&n.push({path:t,validation:"minLength",schema:r,value:e}),r.maxLength!==void 0&&o>r.maxLength&&n.push({path:t,validation:"maxLength",schema:r,value:e}),r.pattern!==void 0&&(new RegExp(r.pattern).test(e)||n.push({path:t,validation:"pattern",schema:r,value:e})),r.format!==void 0){let a=lt(e,r,t);n.push(...a)}return n}function ne(e){if(typeof e=="boolean")return"boolean";if(e.type!==void 0)return e.type}function Zs(e,r,t=[]){let n=ne(r);if(n===void 0)return[];if(n==="null"&&e===null)return[];let i=e===null?"null":Array.isArray(e)?"array":typeof e;if(Array.isArray(n)){if(e===null&&n.includes("null"))return[];for(let o of n){if(o==="array"&&Array.isArray(e))return[];if(i==="number"&&o==="integer"&&Number.isInteger(e))return[];if(i===o||o==="null"&&e===null)return[]}}else{if(n==="array"&&Array.isArray(e))return[];if(i==="number"&&n==="integer"&&Number.isInteger(e))return[];if(i===n)return[]}return[{path:t,validation:"type",schema:r,value:e}]}function Qs(e,r,t={},n=[],i){return r?x(e,r,t,n,i):[]}function eu(e={}){return Object.keys(e).map(r=>({regex:new RegExp(r)}))}function x(e,r,t={},n=[],i){let o=i,a;if(!i&&r["x-jsf-logic"]){o=ve(r["x-jsf-logic"],e);let{validations:d,computedValues:h,...m}=r["x-jsf-logic"];a=m}let s=e===void 0||e===null&&t.treatNullAsUndefined,f=[];if(s)return[];if(typeof r=="boolean")return!r&&!t.allowForbiddenValues?[{path:n,validation:"forbidden",schema:r,value:e}]:[];let c=r["x-jsf-presentation"]?.inputType==="file",p=[];if(!c&&(p=Zs(e,r,n),p.length>0))return p;if(r.required&&E(e)){let d=r.required.filter(h=>{let m=e[h];return Array.isArray(m)?m.length===0:E(m)?Object.keys(m).length===0:m===void 0||m===null&&t.treatNullAsUndefined});for(let h of d)f.push({path:[...n,h],validation:"required",schema:r?.properties?.[h]||r,value:e})}if(r.additionalProperties===!1&&E(e)){let d=new Set(Object.keys(r.properties||{})),h=eu(r.patternProperties);for(let m of Object.keys(e)){let I=d.has(m),ye=h.some(({regex:Ne})=>Ne.test(m));!I&&!ye&&f.push({path:[...n,m],validation:"additionalProperties",schema:r,value:e[m]})}}return[...f,...Zr(e,r,n),...Qr(e,r,n),...st(e,r,t,o,n),...Wr(e,r,t,o,n),...ct(e,r,n),...at(e,r,n),...et(e,r,n),...Xr(e,r,t,o,n),...kr(e,r,t,o,n),...Kr(e,r,t,o,n),...Yr(e,r,t,o,n),...pt(e,r,t,o,n),...Fr(e,r,t,n),...Qs(e,a,t,n,o),...tt(r,o,n)]}function He(e,r,t,n,i=[]){return x(e,r,{...t,...typeof r=="boolean"?{allowForbiddenValues:!1}:{}},i,n).length===0}function pt(e,r,t,n,i=[]){if(r.if===void 0)return[];let o=He(e,r.if,t,n,i);return o&&r.then!==void 0?x(e,r.then,t,[...i,"then"],n):!o&&r.else!==void 0?x(e,r.else,t,[...i,"else"],n):[]}function ze({schema:e,values:r,options:t={}}){let n=e["x-jsf-logic"]?ve(e["x-jsf-logic"],r):void 0,i=Gr(e);return ie(i,r,t,n),n?.schema.computedValues&&(nt(i,n.schema.computedValues,r),ie(i,r,t,n)),i}function dt(e,r,t,n={},i){let o=He(e,t.if,n,i),a=!1;return o&&t.if?.required&&(a=t.if.required.some(f=>{if(!r.properties||!r.properties[f])return!1;let l=r.properties[f],c=e[f];return x(c,l,n).some(d=>d.validation==="type")})),{rule:t,matches:o&&!a}}function ie(e,r={},t={},n){if(!E(r))return;let i=[];typeof e.if<"u"&&i.push(dt(r,e,e,t,n)),(e.allOf??[]).filter(o=>typeof o.if<"u").forEach(o=>{let a=dt(r,e,o,t,n);i.push(a)});for(let{rule:o,matches:a}of i)a&&o.then?(ht(e,r,o.then,t,n),delete o.then):!a&&o.else&&(ht(e,r,o.else,t,n),delete o.else);if(e.properties){for(let[o,a]of Object.entries(e.properties))if(typeof a=="object"){let s=a;s.type==="object"&&ie(s,r[o],t,n),s.items&&ie(s.items,r[o],t,n)}}}function ht(e,r,t,n={},i){let o=t;ie(o,r,n,i),ee(e,o)}function Ge(e,r,t){let n=j({schema:r,name:"root",required:!0,originalSchema:t,strictInputType:!1})?.fields||[];for(let i of e){let o=n.find(a=>a.name===i.name);if(o){mt(i,o),ee(i,o);let a=r.properties?.[i.name],s=t.properties?.[i.name];a&&typeof a=="object"&&i.fields&&a.type==="object"&&Ge(i.fields,a,s)}}}function mt(e,r){for(let[t]of Object.entries(e))r[t]?e[t]&&typeof e[t]=="object"&&!Array.isArray(e[t])&&r[t]&&typeof r[t]=="object"&&!Array.isArray(r[t])&&mt(e[t],r[t]):delete e[t]}function ru(e){let r=[];for(let t=0;t<e.length;t++){let n=e[t];if(["allOf","anyOf","oneOf"].includes(n)){t+1<e.length&&typeof e[t+1]=="number"&&t++;continue}n==="then"||n==="else"||(n==="items"&&typeof e[t+1]=="number"?(t++,r.push(e[t])):r.push(n))}return r}function tu(e){if(e.length===0)return null;let r={};for(let t of e){let{path:n}=t;if(n.length===0){r[""]=t.message;continue}let i=ru(n),o=r;for(let a=0;a<i.length-1;a++){let s=i[a];if(typeof s=="number"){if(!Array.isArray(o))throw new TypeError(`Expected an array at path: ${i.slice(0,a).join(".")}`);o[s]||(o[s]={}),o=o[s]}else typeof i[a+1]=="number"?s in o||(o[s]=[]):(!(s in o)||typeof o[s]=="string")&&(o[s]={}),o=o[s]}if(i.length>0){let a=i[i.length-1];o[a]=t.message}}return r}function nu(e){return e.map(r=>{let{schema:t,value:n,validation:i,customErrorMessage:o}=r;return{...r,message:Lr(t,n,i,o)}})}function iu(e,r){return typeof r!="object"||!r||!e.length?e:e.map(t=>{let n=t.schema,i=n["x-jsf-errorMessage"]?.[t.validation];return n&&i?{...t,message:i}:t})}function ou(e,r,t={}){let n={},i=x(e,r,t),o=nu(i),a=iu(o,r),s=tu(a);return s&&(n.formErrors=s),n}function au(e){let{schema:r,originalSchema:t,strictInputType:n}=e;return j({schema:r,name:"root",required:!0,originalSchema:t,strictInputType:n})?.fields||[]}function su(e){if(Object.prototype.hasOwnProperty.call(e,"customProperties")&&console.error("[json-schema-form] `customProperties` is a deprecated option and it's not supported on json-schema-form v1"),e.customJsonLogicOps){if(typeof e.customJsonLogicOps!="object"||e.customJsonLogicOps===null)throw new TypeError("validationOptions.customJsonLogicOps must be an object.");for(let[r,t]of Object.entries(e.customJsonLogicOps))if(typeof t!="function")throw new TypeError(`Custom JSON Logic operator '${r}' must be a function, but received type '${typeof t}'.`)}}function uu(e,r={}){su(r);let t=r.initialValues||{},n=r.strictInputType||!1,i=ze({schema:e,values:t,options:r.legacyOptions}),o=au({schema:i,originalSchema:e,strictInputType:n});return{fields:o,isError:!1,error:null,handleValidation:f=>{let l=r?.customJsonLogicOps;try{it(l);let c=ze({schema:e,values:f,options:r.legacyOptions}),p=ou(f,c,r.legacyOptions);return Ge(o,c,e),p}finally{ot(l)}}}}var es=q(Pi(),1),k=q(ao(),1),W=q(ho(),1),rs=q(Ga(),1),br=q(ka(),1),Pe=q(Qa(),1);function ts(e){return e.replaceAll(".",".properties.")}function ns(e){let{errorMessage:r,presentation:t,properties:n,...i}=e;return{...i,...t?{"x-jsf-presentation":t}:{},...r?{"x-jsf-errorMessage":r}:{}}}function is(e,r){return Array.isArray(r)?r:void 0}function Fm(e,r){let{if:t,then:n,else:i}=e;return(0,W.default)(t?.required||[],r).length>0||((0,W.default)(n?.required||[],r)||(0,W.default)(Object.keys(n?.properties||{}),r)).length>0||((0,W.default)(i?.required||[],r)||(0,W.default)(Object.keys(i?.properties||{}),r)).length>0}function os(e,r){if(!r)return{warnings:null};let t=[];return Object.entries(r).forEach(([i,o])=>{let a=ts(i),s=(0,k.default)(e.properties,a);if(!s){t.push({type:"FIELD_TO_CHANGE_NOT_FOUND",message:`Changing field "${i}" was ignored because it does not exist.`});return}let f=typeof o=="function"?o(s):o;if((0,br.default)(s,{...ns(f)},is),f.properties){let l=os((0,k.default)(e.properties,a),f.properties);l.warnings&&t.push(...l.warnings)}}),{warnings:t.flat()}}function as(e,r,t){if(!r||typeof e!="object"||e===null)return{warnings:null};let n=t?.parent;return typeof e=="object"&&e.properties&&Object.entries(e.properties).forEach(([i,o])=>{let a=n?`${n}.${i}`:i,s=r(a,o),f=ns(s);(0,br.default)((0,k.default)(e.properties,i),{...o,...f},is),o.properties&&as(o,r,{parent:i})}),{warnings:null}}function Pm(e,r){if(!r)return{warnings:null};let t=[],n=e["x-jsf-order"]||[],i=typeof r=="function"?r(n):r,o=(0,es.default)(n,i);return o.length>0&&t.push({type:"ORDER_MISSING_FIELDS",message:`Some fields got forgotten in the new order. They were automatically appended: ${o.join(", ")}`}),e["x-jsf-order"]=[...i,...o],{warnings:t}}function ss(e,r){if(!r)return{warnings:null};let t=[];return Object.entries(r).forEach(([i,o])=>{let a=ts(i);if(!o)return{warnings:null};if(o.properties){let l=(0,k.default)(e.properties,a);if(!l)return{warnings:null};let c=ss(l,o.properties);c.warnings&&t.push(...c.warnings)}if((0,k.default)(e.properties,a)){t.push({type:"FIELD_TO_CREATE_EXISTS",message:`Creating field "${i}" was ignored because it already exists.`});return}let f=(0,Pe.default)({},a,o);(0,rs.default)(e.properties,f)}),{warnings:t.flat()}}function Nm(e,r){if(!r)return{schema:e,warnings:null};let t={properties:{}};Object.entries(e).forEach(([o,a])=>{switch(o){case"properties":r.forEach(s=>{(0,Pe.default)(t.properties,s,a[s])});break;case"x-jsf-order":case"required":t[o]=a.filter(s=>r.includes(s));break;case"allOf":{let s=e[o]?.filter(f=>Fm(f,r));t[o]=s;break}case"x-jsf-logic":t[o]=a;break}});let n={};t.allOf?.length&&t.allOf.forEach(o=>{let{if:a,then:s,else:f}=o,l=e.allOf?.indexOf(o);n={...n,...yr(a,{fields:r,path:`allOf[${l}].if`}),...yr(s,{fields:r,path:`allOf[${l}].then`}),...yr(f,{fields:r,path:`allOf[${l}].else`})}});let i=[];return Object.keys(n).length>0&&(Object.entries(n).forEach(([o])=>{(0,Pe.default)(t.properties,o,e.properties?.[o])}),i.push({type:"PICK_MISSED_FIELD",message:`The picked fields are in conditionals that refeer other fields. They added automatically: ${Object.keys(n).map(o=>`"${o}"`).join(", ")}. Check "meta" for more details.`,meta:n})),{schema:t,warnings:i}}function yr(e,{fields:r,path:t}){if(!e)return null;let n={};return e.required?.forEach(i=>{r.includes(i)||(n[i]={path:t})}),Object.entries(e.properties||[]).forEach(([i])=>{r.includes(i)||(n[i]={path:t})}),n}function Mm(e,r){let t=JSON.parse(JSON.stringify(e)),n=os(t,r.fields),i=as(t,r.allFields),o=ss(t,r.create),a=Nm(t,r.pick),s=a.schema,f=Pm(s,r.orderRoot);r.muteLogging||console.warn("json-schema-form modify(): We highly recommend you to handle/report the returned `warnings` as they highlight possible bugs in your modifications. To mute this log, pass `muteLogging: true` to the config.");let l=[n.warnings,i.warnings,o.warnings,a.warnings,f.warnings].flat().filter(Boolean);return{schema:s,warnings:l}}export{uu as createHeadlessForm,Mm as modify};
3
3
  //# sourceMappingURL=index.mjs.map