@digi-frontend/dgate-api-documentation 1.0.82 → 1.0.84

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.
@@ -1,2 +1,2 @@
1
- import{__require as e}from"../node_modules/tiny-case/index.js";var r=e();export{r as t};
1
+ import{getDefaultExportFromCjs as o}from"./_commonjsHelpers.js";import{__require as r}from"../node_modules/toposort/index.js";var e=o(r());export{e as default};
2
2
  //# sourceMappingURL=index5.js.map
@@ -1,2 +1,2 @@
1
- import{getDefaultExportFromCjs as o}from"./_commonjsHelpers.js";import{__require as r}from"../node_modules/toposort/index.js";var e=o(r());export{e as default};
1
+ var e={exports:{}};export{e as __module};
2
2
  //# sourceMappingURL=index6.js.map
@@ -1,2 +1,2 @@
1
- var e={exports:{}};export{e as __module};
1
+ import{__require as e}from"../node_modules/tiny-case/index.js";var r=e();export{r as t};
2
2
  //# sourceMappingURL=index7.js.map
@@ -1,2 +1,2 @@
1
- import{__module as r}from"../../_virtual/index7.js";var e;function n(){if(e)return r.exports;function n(r,e){var n=r.length,t=new Array(n),o={},a=n,i=function(r){for(var e=new Map,n=0,t=r.length;n<t;n++){var o=r[n];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}(e),d=function(r){for(var e=new Map,n=0,t=r.length;n<t;n++)e.set(r[n],n);return e}(r);for(e.forEach((function(r){if(!d.has(r[0])||!d.has(r[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)o[a]||f(r[a],a,new Set);return t;function f(r,e,a){if(a.has(r)){var s;try{s=", node was:"+JSON.stringify(r)}catch(r){s=""}throw new Error("Cyclic dependency"+s)}if(!d.has(r))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(r));if(!o[e]){o[e]=!0;var u=i.get(r)||new Set;if(e=(u=Array.from(u)).length){a.add(r);do{var w=u[--e];f(w,d.get(w),a)}while(e);a.delete(r)}t[--n]=r}}}return e=1,r.exports=function(r){return n(function(r){for(var e=new Set,n=0,t=r.length;n<t;n++){var o=r[n];e.add(o[0]),e.add(o[1])}return Array.from(e)}(r),r)},r.exports.array=n,r.exports}export{n as __require};
1
+ import{__module as r}from"../../_virtual/index6.js";var e;function n(){if(e)return r.exports;function n(r,e){var n=r.length,t=new Array(n),o={},a=n,i=function(r){for(var e=new Map,n=0,t=r.length;n<t;n++){var o=r[n];e.has(o[0])||e.set(o[0],new Set),e.has(o[1])||e.set(o[1],new Set),e.get(o[0]).add(o[1])}return e}(e),d=function(r){for(var e=new Map,n=0,t=r.length;n<t;n++)e.set(r[n],n);return e}(r);for(e.forEach((function(r){if(!d.has(r[0])||!d.has(r[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));a--;)o[a]||f(r[a],a,new Set);return t;function f(r,e,a){if(a.has(r)){var s;try{s=", node was:"+JSON.stringify(r)}catch(r){s=""}throw new Error("Cyclic dependency"+s)}if(!d.has(r))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(r));if(!o[e]){o[e]=!0;var u=i.get(r)||new Set;if(e=(u=Array.from(u)).length){a.add(r);do{var w=u[--e];f(w,d.get(w),a)}while(e);a.delete(r)}t[--n]=r}}}return e=1,r.exports=function(r){return n(function(r){for(var e=new Set,n=0,t=r.length;n<t;n++){var o=r[n];e.add(o[0]),e.add(o[1])}return Array.from(e)}(r),r)},r.exports.array=n,r.exports}export{n as __require};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{p as e}from"../../_virtual/index4.js";import{t}from"../../_virtual/index5.js";import s from"../../_virtual/index6.js";const r=Object.prototype.toString,n=Error.prototype.toString,i=RegExp.prototype.toString,a="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",o=/^Symbol\((.*)\)(.*)$/;function l(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?`"${e}"`:e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return a.call(e).replace(o,"Symbol($1)");const l=r.call(e).slice(8,-1);return"Date"===l?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===l||e instanceof Error?"["+n.call(e)+"]":"RegExp"===l?i.call(e):null}function u(e,t){let s=l(e,t);return null!==s?s:JSON.stringify(e,(function(e,s){let r=l(this[e],t);return null!==r?r:s}),2)}function c(e){return null==e?[]:[].concat(e)}let h,p,d,f=/\$\{\s*(\w+)\s*\}/g;h=Symbol.toStringTag;class m{constructor(e,t,s,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[h]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=r,this.errors=[],this.inner=[],c(e).forEach((e=>{if(y.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}p=Symbol.hasInstance,d=Symbol.toStringTag;class y extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),"string"==typeof e?e.replace(f,((e,s)=>u(t[s]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,s,r,n){const i=new m(e,t,s,r);if(n)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[d]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,y)}static[p](e){return m[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let v={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:s,originalValue:r})=>{const n=null!=r&&r!==s?` (cast from the value \`${u(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${u(s,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${u(s,!0)}\``+n}},g={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},b={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F={isValue:"${path} field must be ${value}"},_={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},w={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},x={notType:e=>{const{path:t,value:s,spec:r}=e,n=r.types.length;if(Array.isArray(s)){if(s.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``;if(s.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``}return y.formatError(v.notType,e)}};Object.assign(Object.create(null),{mixed:v,string:g,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:b,object:_,array:w,boolean:F,tuple:x});const T=e=>e&&e.__isYupSchema__;class ${static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:r,otherwise:n}=t,i="function"==typeof s?s:(...e)=>e.every((e=>e===s));return new $(e,((e,t)=>{var s;let a=i(...e)?r:n;return null!=(s=null==a?void 0:a(t))?s:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(s,e,t);if(void 0===r||r===e)return e;if(!T(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const O="$",k=".";class E{constructor(t,s={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===O,this.isValue=this.key[0]===k,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?O:this.isValue?k:"";this.path=this.key.slice(r.length),this.getter=this.path&&e.getter(this.path,!0),this.map=s.map}getValue(e,t,s){let r=this.isContext?s:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}E.prototype.__isYupRef=!0;const S=e=>null==e;function j(e){function t({value:t,path:s="",options:r,originalValue:n,schema:i},a,o){const{name:l,test:u,params:c,message:h,skipAbsent:p}=e;let{parent:d,context:f,abortEarly:m=i.spec.abortEarly,disableStackTrace:v=i.spec.disableStackTrace}=r;function g(e){return E.isRef(e)?e.getValue(t,d,f):e}function b(e={}){const r=Object.assign({value:t,originalValue:n,label:i.spec.label,path:e.path||s,spec:i.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new y(y.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const F=m?a:o;let _={path:s,parent:d,type:l,from:r.from,createError:b,resolve:g,options:r,originalValue:n,schema:i};const w=e=>{y.isError(e)?F(e):e?o(null):F(b())},x=e=>{y.isError(e)?F(e):a(e)};if(p&&S(t))return w(!0);let T;try{var $;if(T=u.call(_,t,_),"function"==typeof(null==($=T)?void 0:$.then)){if(r.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(T).then(w,x)}}catch(e){return void x(e)}w(T)}return t.OPTIONS=e,t}function A(t,s,r,n=r){let i,a,o;return s?(e.forEach(s,((e,l,u)=>{let c=l?e.slice(1,e.length-1):e,h="tuple"===(t=t.resolve({context:n,parent:i,value:r})).type,p=u?parseInt(c,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${e}, in the path: ${s}. because there is no value at that index. `);i=r,r=r&&r[p],t=h?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${s}. (failed at: ${o} which is a type: "${t.type}")`);i=r,r=r&&r[c],t=t.fields[c]}a=c,o=l?"["+e+"]":"."+e})),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:s,schema:t}}class D extends Set{describe(){const e=[];for(const t of this.values())e.push(E.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new D(this.values())}merge(e,t){const s=this.clone();return e.forEach((e=>s.add(e))),t.forEach((e=>s.delete(e))),s}}function C(e,t=new Map){if(T(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let s;if(e instanceof Date)s=new Date(e.getTime()),t.set(e,s);else if(e instanceof RegExp)s=new RegExp(e),t.set(e,s);else if(Array.isArray(e)){s=new Array(e.length),t.set(e,s);for(let r=0;r<e.length;r++)s[r]=C(e[r],t)}else if(e instanceof Map){s=new Map,t.set(e,s);for(const[r,n]of e.entries())s.set(r,C(n,t))}else if(e instanceof Set){s=new Set,t.set(e,s);for(const r of e)s.add(C(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);s={},t.set(e,s);for(const[r,n]of Object.entries(e))s[r]=C(n,t)}return s}class V{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new D,this._blacklist=new D,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(v.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=C(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const r=Object.assign({},t.spec,s.spec);return s.spec=r,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce(((t,s)=>s.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,r,n;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(s=e.abortEarly)?s:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(n=e.disableStackTrace)?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,n=s._cast(e,t);if(!1!==t.assert&&!s.isType(n)){if(r&&S(n))return n;let i=u(e),a=u(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return n}_cast(e,t){let s=void 0===e?e:this.transforms.reduce(((t,s)=>s.call(this,t,e,this)),e);return void 0===s&&(s=this.getDefault(t)),s}_validate(e,t={},s,r){let{path:n,originalValue:i=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:n,value:o,originalValue:i,options:t,tests:l},s,(e=>{if(e.length)return r(e,o);this.runTests({path:n,value:o,originalValue:i,options:t,tests:this.tests},s,r)}))}runTests(e,t,s){let r=!1,{tests:n,value:i,originalValue:a,path:o,options:l}=e,u=e=>{r||(r=!0,t(e,i))},c=e=>{r||(r=!0,s(e,i))},h=n.length,p=[];if(!h)return c([]);let d={value:i,originalValue:a,path:o,options:l,schema:this};for(let e=0;e<n.length;e++){(0,n[e])(d,u,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--h<=0&&c(p)}))}}asNestedTest({key:e,index:t,parent:s,parentPath:r,originalParent:n,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let l=s[a];const u=Object.assign({},i,{strict:!0,parent:s,value:l,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,s)=>this.resolve(u)._validate(l,u,t,s)}validate(e,t){var s;let r=this.resolve(Object.assign({},t,{value:e})),n=null!=(s=null==t?void 0:t.disableStackTrace)?s:r.spec.disableStackTrace;return new Promise(((s,i)=>r._validate(e,t,((e,t)=>{y.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new y(e,t,void 0,void 0,n)):s(t)}))))}validateSync(e,t){var s;let r,n=this.resolve(Object.assign({},t,{value:e})),i=null!=(s=null==t?void 0:t.disableStackTrace)?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw y.isError(e)&&(e.value=t),e}),((t,s)=>{if(t.length)throw new y(t,e,void 0,void 0,i);r=s})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(y.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(y.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):C(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=j({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=j({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),s}optional(){return this.optionality(!0)}defined(e=v.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=v.notNull){return this.nullability(!1,e)}required(e=v.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=v.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let s=this.clone(),r=j(t),n=t.exclusive||t.name&&!0===s.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(n)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),s.tests.push(r),s}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let s=this.clone(),r=c(e).map((e=>new E(e)));return r.forEach((e=>{e.isSibling&&s.deps.push(e.key)})),s.conditions.push("function"==typeof t?new $(r,t):$.fromOptions(r,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=j({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=v.oneOf){let s=this.clone();return e.forEach((e=>{s._whitelist.add(e),s._blacklist.delete(e)})),s.internalTests.whiteList=j({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,s=t.resolveAll(this.resolve);return!!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}notOneOf(e,t=v.notOneOf){let s=this.clone();return e.forEach((e=>{s._blacklist.add(e),s._whitelist.delete(e)})),s.internalTests.blacklist=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,s=t.resolveAll(this.resolve);return!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:r,optional:n,nullable:i}=t.spec;return{meta:r,label:s,optional:n,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,s)=>s.findIndex((t=>t.name===e.name))===t))}}}V.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])V.prototype[`${e}At`]=function(t,s,r={}){const{parent:n,parentPath:i,schema:a}=A(this,t,s,r.context);return a[e](n&&n[i],Object.assign({},r,{parent:n,path:t}))};for(const e of["equals","is"])V.prototype[e]=V.prototype.oneOf;for(const e of["not","nope"])V.prototype[e]=V.prototype.notOneOf;const N=()=>!0;function z(e){return new P(e)}class P extends V{constructor(e){super("function"==typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:N},e))}}function q(){return new I}z.prototype=P.prototype;class I extends V{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>S(e)||!0===e})}isFalse(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>S(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}q.prototype=I.prototype;const M=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function R(e){var t,s;const r=M.exec(e);return r?{year:U(r[1]),month:U(r[2],1)-1,day:U(r[3],1),hour:U(r[4]),minute:U(r[5]),second:U(r[6]),millisecond:r[7]?U(r[7].substring(0,3)):0,precision:null!=(t=null==(s=r[7])?void 0:s.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:U(r[10]),minuteOffset:U(r[11])}:null}function U(e,t=0){return Number(e)||t}let Z=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,L=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,K=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),J=e=>S(e)||e===e.trim(),B={}.toString();function G(){return new H}class H extends V{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(!s.spec.coerce||s.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===B?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||v.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=g.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=g.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=g.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let s,r,n=!1;return t&&("object"==typeof t?({excludeEmptyString:n=!1,message:s,name:r}=t):s=t),this.test({name:r||"matches",message:s||g.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&n||-1!==t.search(e)})}email(e=g.email){return this.matches(Z,{name:"email",message:e,excludeEmptyString:!0})}url(e=g.url){return this.matches(Y,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=g.uuid){return this.matches(L,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,s,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:s}=e):r=e),this.matches(K,{name:"datetime",message:r||g.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||g.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const s=R(e);return!!s&&!!s.z}}).test({name:"datetime_precision",message:r||g.datetime_precision,params:{precision:s},skipAbsent:!0,test:e=>{if(!e||null==s)return!0;const t=R(e);return!!t&&t.precision===s}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=g.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:J})}lowercase(e=g.lowercase){return this.transform((e=>S(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toLowerCase()})}uppercase(e=g.uppercase){return this.transform((e=>S(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toUpperCase()})}}G.prototype=H.prototype;let Q=new Date("");class W extends V{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,s)=>!s.spec.coerce||s.isType(e)||null===e?e:(e=function(e){const t=R(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let s=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(s=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(s=0-s)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+s,t.second,t.millisecond)}(e),isNaN(e)?W.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let s;if(E.isRef(e))s=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=r}return s}min(e,t=b.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(s)}})}max(e,t=b.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(s)}})}}function X(e,t){let s=1/0;return e.some(((e,r)=>{var n;if(null!=(n=t.path)&&n.includes(e))return s=r,!0})),s}function ee(e){return(t,s)=>X(e,t)-X(e,s)}W.INVALID_DATE=Q,W.prototype;const te=(e,t,s)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return s.isType(r)?r:e};function se(e){if("fields"in e){const t={};for(const[s,r]of Object.entries(e.fields))t[s]=se(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=se(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(se)}):"optional"in e?e.optional():e}let re=e=>"[object Object]"===Object.prototype.toString.call(e);function ne(e,t){let s=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===s.indexOf(e)))}const ie=ee([]);function ae(e){return new oe(e)}class oe extends V{constructor(e){super({type:"object",check:e=>re(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ie,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var s;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let n=this.fields,i=null!=(s=t.stripUnknown)?s:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),o={},l=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),u=!1;for(const e of a){let s=n[e],a=e in r;if(s){let n,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,s=s.resolve({value:i,context:t.context,parent:o});let a=s instanceof V?s.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}n=t.__validating&&c?r[e]:s.cast(r[e],l),void 0!==n&&(o[e]=n)}else a&&!i&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(u=!0)}return u?o:r}_validate(e,t={},s,r){let{from:n=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...n],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,((e,n)=>{if(!a||!re(n))return void r(e,n);i=i||n;let o=[];for(let e of this._nodes){let s=this.fields[e];s&&!E.isRef(s)&&o.push(s.asNestedTest({options:t,key:e,parent:n,parentPath:t.path,originalParent:i}))}this.runTests({tests:o,value:n,originalValue:i,options:t},s,(t=>{r(t.sort(this._sortErrors).concat(e),n)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=s[e];s[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(s,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((s=>{var r;const n=this.fields[s];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(i):void 0})),t}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=function(t,r=[]){let n=[],i=new Set,a=new Set(r.map((([e,t])=>`${e}-${t}`)));function o(t,s){let r=e.split(t)[0];i.add(r),a.has(`${s}-${r}`)||n.push([s,r])}for(const e of Object.keys(t)){let s=t[e];i.add(e),E.isRef(s)&&s.isSibling?o(s.path,e):T(s)&&"deps"in s&&s.deps.forEach((t=>o(t,e)))}return s.array(Array.from(i),n).reverse()}(t,r),n._sortErrors=ee(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(e,t=[]){return this.clone().withMutation((s=>{let r=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),r)}))}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return se(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter((([t,s])=>e.includes(t)&&e.includes(s))))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(t,s,r){let n=e.getter(t,!0);return this.transform((i=>{if(!i)return i;let a=i;return((t,s)=>{const r=[...e.normalizePath(s)];if(1===r.length)return r[0]in t;let n=r.pop(),i=e.getter(e.join(r),!0)(t);return!(!i||!(n in i))})(i,t)&&(a=Object.assign({},i),r||delete a[t],a[s]=n(i)),a}))}json(){return this.transform(te)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_.exact,test(e){if(null==e)return!0;const t=ne(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const s=ne(this.schema,t);return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=_.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const s={};for(const r of Object.keys(t))s[e(r)]=t[r];return s}))}camelCase(){return this.transformKeys(t.camelCase)}snakeCase(){return this.transformKeys(t.snakeCase)}constantCase(){return this.transformKeys((e=>t.snakeCase(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[n]})),s.fields[n]=i.describe(t)}return s}}function le(e){return new ue(e)}ae.prototype=oe.prototype;class ue extends V{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let r=!1;const n=s.map(((e,s)=>{const n=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${s}]`}));return n!==e&&(r=!0),n}));return r?n:s}_validate(e,t={},s,r){var n;let i=this.innerType,a=null!=(n=t.recursive)?n:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,s,((n,o)=>{var l;if(!a||!i||!this._typeCheck(o))return void r(n,o);let u=new Array(o.length);for(let s=0;s<o.length;s++){var c;u[s]=i.asNestedTest({options:t,index:s,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},s,(e=>r(e.concat(n),o)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(te)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!T(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+u(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=w.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||w.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||w.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,s,r)=>!e(t,s,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var r;let n=e;null!=(r=n)&&r.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}function ce(e){return new pe(e)}function he(e){try{return e()}catch(e){if(y.isError(e))return Promise.reject(e);throw e}}le.prototype=ue.prototype;class pe{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let s=this.builder(e,t);if(!T(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new pe(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:s,parent:r,options:n}=e,i=r[null!=s?s:t];return this._resolve(i,Object.assign({},n,{value:i,parent:r})).asNestedTest(e)}validate(e,t){return he((()=>this._resolve(e,t).validate(e,t)))}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,s){return he((()=>this._resolve(t,s).validateAt(e,t,s)))}validateSyncAt(e,t,s){return this._resolve(t,s).validateSyncAt(e,t,s)}isValid(e,t){try{return this._resolve(e,t).isValid(e,t)}catch(e){if(y.isError(e))return Promise.resolve(!1);throw e}}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}}export{ue as ArraySchema,I as BooleanSchema,W as DateSchema,pe as LazySchema,P as MixedSchema,oe as ObjectSchema,V as Schema,H as StringSchema,y as ValidationError,le as array,q as bool,q as boolean,A as getIn,T as isSchema,ce as lazy,z as mixed,ae as object,u as printValue,G as string};
1
+ import{p as e}from"../../_virtual/index4.js";import{t}from"../../_virtual/index7.js";import s from"../../_virtual/index5.js";const r=Object.prototype.toString,n=Error.prototype.toString,i=RegExp.prototype.toString,a="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",o=/^Symbol\((.*)\)(.*)$/;function l(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?`"${e}"`:e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return a.call(e).replace(o,"Symbol($1)");const l=r.call(e).slice(8,-1);return"Date"===l?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===l||e instanceof Error?"["+n.call(e)+"]":"RegExp"===l?i.call(e):null}function u(e,t){let s=l(e,t);return null!==s?s:JSON.stringify(e,(function(e,s){let r=l(this[e],t);return null!==r?r:s}),2)}function c(e){return null==e?[]:[].concat(e)}let h,p,d,f=/\$\{\s*(\w+)\s*\}/g;h=Symbol.toStringTag;class m{constructor(e,t,s,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[h]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=r,this.errors=[],this.inner=[],c(e).forEach((e=>{if(y.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}p=Symbol.hasInstance,d=Symbol.toStringTag;class y extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),"string"==typeof e?e.replace(f,((e,s)=>u(t[s]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,s,r,n){const i=new m(e,t,s,r);if(n)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[d]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,y)}static[p](e){return m[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let v={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:s,originalValue:r})=>{const n=null!=r&&r!==s?` (cast from the value \`${u(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${u(s,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${u(s,!0)}\``+n}},g={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},b={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F={isValue:"${path} field must be ${value}"},_={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},w={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},x={notType:e=>{const{path:t,value:s,spec:r}=e,n=r.types.length;if(Array.isArray(s)){if(s.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``;if(s.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``}return y.formatError(v.notType,e)}};Object.assign(Object.create(null),{mixed:v,string:g,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:b,object:_,array:w,boolean:F,tuple:x});const T=e=>e&&e.__isYupSchema__;class ${static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:r,otherwise:n}=t,i="function"==typeof s?s:(...e)=>e.every((e=>e===s));return new $(e,((e,t)=>{var s;let a=i(...e)?r:n;return null!=(s=null==a?void 0:a(t))?s:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(s,e,t);if(void 0===r||r===e)return e;if(!T(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const O="$",k=".";class E{constructor(t,s={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===O,this.isValue=this.key[0]===k,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?O:this.isValue?k:"";this.path=this.key.slice(r.length),this.getter=this.path&&e.getter(this.path,!0),this.map=s.map}getValue(e,t,s){let r=this.isContext?s:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}E.prototype.__isYupRef=!0;const S=e=>null==e;function j(e){function t({value:t,path:s="",options:r,originalValue:n,schema:i},a,o){const{name:l,test:u,params:c,message:h,skipAbsent:p}=e;let{parent:d,context:f,abortEarly:m=i.spec.abortEarly,disableStackTrace:v=i.spec.disableStackTrace}=r;function g(e){return E.isRef(e)?e.getValue(t,d,f):e}function b(e={}){const r=Object.assign({value:t,originalValue:n,label:i.spec.label,path:e.path||s,spec:i.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new y(y.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const F=m?a:o;let _={path:s,parent:d,type:l,from:r.from,createError:b,resolve:g,options:r,originalValue:n,schema:i};const w=e=>{y.isError(e)?F(e):e?o(null):F(b())},x=e=>{y.isError(e)?F(e):a(e)};if(p&&S(t))return w(!0);let T;try{var $;if(T=u.call(_,t,_),"function"==typeof(null==($=T)?void 0:$.then)){if(r.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(T).then(w,x)}}catch(e){return void x(e)}w(T)}return t.OPTIONS=e,t}function A(t,s,r,n=r){let i,a,o;return s?(e.forEach(s,((e,l,u)=>{let c=l?e.slice(1,e.length-1):e,h="tuple"===(t=t.resolve({context:n,parent:i,value:r})).type,p=u?parseInt(c,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${e}, in the path: ${s}. because there is no value at that index. `);i=r,r=r&&r[p],t=h?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${s}. (failed at: ${o} which is a type: "${t.type}")`);i=r,r=r&&r[c],t=t.fields[c]}a=c,o=l?"["+e+"]":"."+e})),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:s,schema:t}}class D extends Set{describe(){const e=[];for(const t of this.values())e.push(E.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new D(this.values())}merge(e,t){const s=this.clone();return e.forEach((e=>s.add(e))),t.forEach((e=>s.delete(e))),s}}function C(e,t=new Map){if(T(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let s;if(e instanceof Date)s=new Date(e.getTime()),t.set(e,s);else if(e instanceof RegExp)s=new RegExp(e),t.set(e,s);else if(Array.isArray(e)){s=new Array(e.length),t.set(e,s);for(let r=0;r<e.length;r++)s[r]=C(e[r],t)}else if(e instanceof Map){s=new Map,t.set(e,s);for(const[r,n]of e.entries())s.set(r,C(n,t))}else if(e instanceof Set){s=new Set,t.set(e,s);for(const r of e)s.add(C(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);s={},t.set(e,s);for(const[r,n]of Object.entries(e))s[r]=C(n,t)}return s}class V{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new D,this._blacklist=new D,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(v.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=C(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const r=Object.assign({},t.spec,s.spec);return s.spec=r,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce(((t,s)=>s.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,r,n;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(s=e.abortEarly)?s:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(n=e.disableStackTrace)?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,n=s._cast(e,t);if(!1!==t.assert&&!s.isType(n)){if(r&&S(n))return n;let i=u(e),a=u(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return n}_cast(e,t){let s=void 0===e?e:this.transforms.reduce(((t,s)=>s.call(this,t,e,this)),e);return void 0===s&&(s=this.getDefault(t)),s}_validate(e,t={},s,r){let{path:n,originalValue:i=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:n,value:o,originalValue:i,options:t,tests:l},s,(e=>{if(e.length)return r(e,o);this.runTests({path:n,value:o,originalValue:i,options:t,tests:this.tests},s,r)}))}runTests(e,t,s){let r=!1,{tests:n,value:i,originalValue:a,path:o,options:l}=e,u=e=>{r||(r=!0,t(e,i))},c=e=>{r||(r=!0,s(e,i))},h=n.length,p=[];if(!h)return c([]);let d={value:i,originalValue:a,path:o,options:l,schema:this};for(let e=0;e<n.length;e++){(0,n[e])(d,u,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--h<=0&&c(p)}))}}asNestedTest({key:e,index:t,parent:s,parentPath:r,originalParent:n,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let l=s[a];const u=Object.assign({},i,{strict:!0,parent:s,value:l,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,s)=>this.resolve(u)._validate(l,u,t,s)}validate(e,t){var s;let r=this.resolve(Object.assign({},t,{value:e})),n=null!=(s=null==t?void 0:t.disableStackTrace)?s:r.spec.disableStackTrace;return new Promise(((s,i)=>r._validate(e,t,((e,t)=>{y.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new y(e,t,void 0,void 0,n)):s(t)}))))}validateSync(e,t){var s;let r,n=this.resolve(Object.assign({},t,{value:e})),i=null!=(s=null==t?void 0:t.disableStackTrace)?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw y.isError(e)&&(e.value=t),e}),((t,s)=>{if(t.length)throw new y(t,e,void 0,void 0,i);r=s})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(y.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(y.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):C(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=j({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=j({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),s}optional(){return this.optionality(!0)}defined(e=v.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=v.notNull){return this.nullability(!1,e)}required(e=v.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=v.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let s=this.clone(),r=j(t),n=t.exclusive||t.name&&!0===s.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(n)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),s.tests.push(r),s}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let s=this.clone(),r=c(e).map((e=>new E(e)));return r.forEach((e=>{e.isSibling&&s.deps.push(e.key)})),s.conditions.push("function"==typeof t?new $(r,t):$.fromOptions(r,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=j({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=v.oneOf){let s=this.clone();return e.forEach((e=>{s._whitelist.add(e),s._blacklist.delete(e)})),s.internalTests.whiteList=j({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,s=t.resolveAll(this.resolve);return!!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}notOneOf(e,t=v.notOneOf){let s=this.clone();return e.forEach((e=>{s._blacklist.add(e),s._whitelist.delete(e)})),s.internalTests.blacklist=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,s=t.resolveAll(this.resolve);return!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:r,optional:n,nullable:i}=t.spec;return{meta:r,label:s,optional:n,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,s)=>s.findIndex((t=>t.name===e.name))===t))}}}V.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])V.prototype[`${e}At`]=function(t,s,r={}){const{parent:n,parentPath:i,schema:a}=A(this,t,s,r.context);return a[e](n&&n[i],Object.assign({},r,{parent:n,path:t}))};for(const e of["equals","is"])V.prototype[e]=V.prototype.oneOf;for(const e of["not","nope"])V.prototype[e]=V.prototype.notOneOf;const N=()=>!0;function z(e){return new P(e)}class P extends V{constructor(e){super("function"==typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:N},e))}}function q(){return new I}z.prototype=P.prototype;class I extends V{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>S(e)||!0===e})}isFalse(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>S(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}q.prototype=I.prototype;const M=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function R(e){var t,s;const r=M.exec(e);return r?{year:U(r[1]),month:U(r[2],1)-1,day:U(r[3],1),hour:U(r[4]),minute:U(r[5]),second:U(r[6]),millisecond:r[7]?U(r[7].substring(0,3)):0,precision:null!=(t=null==(s=r[7])?void 0:s.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:U(r[10]),minuteOffset:U(r[11])}:null}function U(e,t=0){return Number(e)||t}let Z=/^[a-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00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,L=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,K=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),J=e=>S(e)||e===e.trim(),B={}.toString();function G(){return new H}class H extends V{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(!s.spec.coerce||s.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===B?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||v.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=g.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=g.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=g.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let s,r,n=!1;return t&&("object"==typeof t?({excludeEmptyString:n=!1,message:s,name:r}=t):s=t),this.test({name:r||"matches",message:s||g.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&n||-1!==t.search(e)})}email(e=g.email){return this.matches(Z,{name:"email",message:e,excludeEmptyString:!0})}url(e=g.url){return this.matches(Y,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=g.uuid){return this.matches(L,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,s,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:s}=e):r=e),this.matches(K,{name:"datetime",message:r||g.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||g.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const s=R(e);return!!s&&!!s.z}}).test({name:"datetime_precision",message:r||g.datetime_precision,params:{precision:s},skipAbsent:!0,test:e=>{if(!e||null==s)return!0;const t=R(e);return!!t&&t.precision===s}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=g.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:J})}lowercase(e=g.lowercase){return this.transform((e=>S(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toLowerCase()})}uppercase(e=g.uppercase){return this.transform((e=>S(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toUpperCase()})}}G.prototype=H.prototype;let Q=new Date("");class W extends V{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,s)=>!s.spec.coerce||s.isType(e)||null===e?e:(e=function(e){const t=R(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let s=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(s=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(s=0-s)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+s,t.second,t.millisecond)}(e),isNaN(e)?W.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let s;if(E.isRef(e))s=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=r}return s}min(e,t=b.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(s)}})}max(e,t=b.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(s)}})}}function X(e,t){let s=1/0;return e.some(((e,r)=>{var n;if(null!=(n=t.path)&&n.includes(e))return s=r,!0})),s}function ee(e){return(t,s)=>X(e,t)-X(e,s)}W.INVALID_DATE=Q,W.prototype;const te=(e,t,s)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return s.isType(r)?r:e};function se(e){if("fields"in e){const t={};for(const[s,r]of Object.entries(e.fields))t[s]=se(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=se(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(se)}):"optional"in e?e.optional():e}let re=e=>"[object Object]"===Object.prototype.toString.call(e);function ne(e,t){let s=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===s.indexOf(e)))}const ie=ee([]);function ae(e){return new oe(e)}class oe extends V{constructor(e){super({type:"object",check:e=>re(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ie,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var s;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let n=this.fields,i=null!=(s=t.stripUnknown)?s:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),o={},l=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),u=!1;for(const e of a){let s=n[e],a=e in r;if(s){let n,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,s=s.resolve({value:i,context:t.context,parent:o});let a=s instanceof V?s.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}n=t.__validating&&c?r[e]:s.cast(r[e],l),void 0!==n&&(o[e]=n)}else a&&!i&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(u=!0)}return u?o:r}_validate(e,t={},s,r){let{from:n=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...n],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,((e,n)=>{if(!a||!re(n))return void r(e,n);i=i||n;let o=[];for(let e of this._nodes){let s=this.fields[e];s&&!E.isRef(s)&&o.push(s.asNestedTest({options:t,key:e,parent:n,parentPath:t.path,originalParent:i}))}this.runTests({tests:o,value:n,originalValue:i,options:t},s,(t=>{r(t.sort(this._sortErrors).concat(e),n)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=s[e];s[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(s,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((s=>{var r;const n=this.fields[s];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(i):void 0})),t}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=function(t,r=[]){let n=[],i=new Set,a=new Set(r.map((([e,t])=>`${e}-${t}`)));function o(t,s){let r=e.split(t)[0];i.add(r),a.has(`${s}-${r}`)||n.push([s,r])}for(const e of Object.keys(t)){let s=t[e];i.add(e),E.isRef(s)&&s.isSibling?o(s.path,e):T(s)&&"deps"in s&&s.deps.forEach((t=>o(t,e)))}return s.array(Array.from(i),n).reverse()}(t,r),n._sortErrors=ee(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(e,t=[]){return this.clone().withMutation((s=>{let r=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),r)}))}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return se(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter((([t,s])=>e.includes(t)&&e.includes(s))))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(t,s,r){let n=e.getter(t,!0);return this.transform((i=>{if(!i)return i;let a=i;return((t,s)=>{const r=[...e.normalizePath(s)];if(1===r.length)return r[0]in t;let n=r.pop(),i=e.getter(e.join(r),!0)(t);return!(!i||!(n in i))})(i,t)&&(a=Object.assign({},i),r||delete a[t],a[s]=n(i)),a}))}json(){return this.transform(te)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_.exact,test(e){if(null==e)return!0;const t=ne(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const s=ne(this.schema,t);return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=_.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const s={};for(const r of Object.keys(t))s[e(r)]=t[r];return s}))}camelCase(){return this.transformKeys(t.camelCase)}snakeCase(){return this.transformKeys(t.snakeCase)}constantCase(){return this.transformKeys((e=>t.snakeCase(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[n]})),s.fields[n]=i.describe(t)}return s}}function le(e){return new ue(e)}ae.prototype=oe.prototype;class ue extends V{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let r=!1;const n=s.map(((e,s)=>{const n=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${s}]`}));return n!==e&&(r=!0),n}));return r?n:s}_validate(e,t={},s,r){var n;let i=this.innerType,a=null!=(n=t.recursive)?n:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,s,((n,o)=>{var l;if(!a||!i||!this._typeCheck(o))return void r(n,o);let u=new Array(o.length);for(let s=0;s<o.length;s++){var c;u[s]=i.asNestedTest({options:t,index:s,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},s,(e=>r(e.concat(n),o)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(te)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!T(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+u(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=w.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||w.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||w.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,s,r)=>!e(t,s,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var r;let n=e;null!=(r=n)&&r.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}function ce(e){return new pe(e)}function he(e){try{return e()}catch(e){if(y.isError(e))return Promise.reject(e);throw e}}le.prototype=ue.prototype;class pe{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let s=this.builder(e,t);if(!T(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new pe(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:s,parent:r,options:n}=e,i=r[null!=s?s:t];return this._resolve(i,Object.assign({},n,{value:i,parent:r})).asNestedTest(e)}validate(e,t){return he((()=>this._resolve(e,t).validate(e,t)))}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,s){return he((()=>this._resolve(t,s).validateAt(e,t,s)))}validateSyncAt(e,t,s){return this._resolve(t,s).validateSyncAt(e,t,s)}isValid(e,t){try{return this._resolve(e,t).isValid(e,t)}catch(e){if(y.isError(e))return Promise.resolve(!1);throw e}}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}}export{ue as ArraySchema,I as BooleanSchema,W as DateSchema,pe as LazySchema,P as MixedSchema,oe as ObjectSchema,V as Schema,H as StringSchema,y as ValidationError,le as array,q as bool,q as boolean,A as getIn,T as isSchema,ce as lazy,z as mixed,ae as object,u as printValue,G as string};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1,2 +1,2 @@
1
- import{j as e}from"../../../../../_virtual/jsx-runtime.js";import s from"../../../../components/SVGLoader/SVGLoader.js";import l from"../../../../assets/icons/DownArrow.svg.js";import i from"../../../../assets/icons/CopySticker.svg.js";import a from"../../../../assets/icons/RequestOption.svg.js";import t from"../../../../assets/icons/ArrowBack.svg.js";import{d}from"../../../../../_virtual/index.js";import{useState as r,useEffect as o}from"react";import{handleStatusColor as n}from"../../../../helpers/methodAccordion.helper.js";import{httpStatusCodes as c}from"../../../../constants/index.js";import h from"../../../../components/Tooltip/Tooltip.js";import{useSectionToggle as m,SectionEnum as v}from"../../../../context/SectionToggleContext.js";import{capitalizeFirstLetter as j}from"../../../../utils/index.js";const p=({data:p,setActiveType:x,setActiveItemData:u})=>{var b,N,y;const[f,C]=r("header"),{toggleSection:g}=m(),w=c.map((s=>({label:e.jsxs("div",{className:"statusCodeOptionContainer",children:[e.jsx("div",{className:"statusCodeOptionCircle",style:{backgroundColor:n(s)}}),e.jsx("span",{children:s})]}),value:s}))),[S,T]=r(null),[k,q]=r(w[4]),[O,R]=r({});return((null==p?void 0:p.parameters)||[]).filter((e=>{var s;return(null===(s=e.in)||void 0===s?void 0:s.toLowerCase())===f.toLowerCase()})),o((()=>{if(k&&k.value){const e=null==p?void 0:p.responses[k.value];R(null==e?void 0:e.headers)}}),[k]),e.jsxs("div",{className:"api-details-expanded",children:[e.jsxs("div",{className:"test-button",children:[e.jsx("button",{className:"back-button",onClick:()=>{g(p.api.apiSpecId,[{type:v.OVERVIEW,setTo:!0}],{resetOthers:!0,filterKeys:[v.RESOURCE]}),x("OVERVIEW"),u(p.api)},children:e.jsx(s,{src:t})}),e.jsx(h,{content:"Comming soon",children:e.jsx("button",{className:"disabled",children:"Test"})})]}),e.jsx("h3",{children:p.api.title}),e.jsx("h1",{className:"api-title",children:null==p?void 0:p.summary}),e.jsxs("div",{className:"url-box",children:[e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("span",{className:`method-label ${null===(b=null==p?void 0:p.method)||void 0===b?void 0:b.toLowerCase()}`,children:p.method}),e.jsx("span",{className:"url-text",children:null==p?void 0:p.path})]}),e.jsx("span",{className:"icon",onClick:()=>navigator.clipboard.writeText(null==p?void 0:p.path),children:e.jsx(s,{src:i})})]}),e.jsx("p",{className:"api-desc",children:(null==p?void 0:p.description)||"No Description"}),e.jsx("h3",{children:"Request"}),e.jsxs("div",{className:"request-section",children:[e.jsx("div",{className:"request-tabs",children:["header","path","query"].map((l=>e.jsxs("button",{className:"tab "+(f===l?"active":""),onClick:()=>C(l),children:[e.jsx(s,{src:a,className:"icon-left"}),e.jsx("span",{className:"tab-label",children:"requestBody"===l?"Request Body":l.charAt(0).toUpperCase()+l.slice(1)})]},l)))}),e.jsx("div",{className:"table-wrapper",children:e.jsxs("table",{className:"param-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"head-table-label",children:"Parameter Name"}),e.jsx("th",{className:"head-table-label",children:"Required"}),e.jsx("th",{className:"head-table-label",children:"Type"}),e.jsx("th",{className:"head-table-label",children:"Enum"}),e.jsx("th",{className:"head-table-label",children:"Description"})]})}),e.jsx("tbody",{children:null===(N=p.parameters)||void 0===N?void 0:N.filter((e=>{var s;return(null===(s=e.in)||void 0===s?void 0:s.toLowerCase())===f.toLowerCase()})).map(((i,a)=>{var t,d,r,o,n,c,h;return e.jsxs("tr",{children:[e.jsx("td",{children:i.name}),e.jsx("td",{children:i.required?"True":"False"}),e.jsxs("td",{style:{textTransform:"capitalize"},children:[e.jsx("span",{children:(null===(t=null==i?void 0:i.schema)||void 0===t?void 0:t.type)||"-"}),"array"===(null===(d=null==i?void 0:i.schema)||void 0===d?void 0:d.type)&&(null===(o=null===(r=null==i?void 0:i.schema)||void 0===r?void 0:r.items)||void 0===o?void 0:o.type)&&e.jsxs("span",{style:{color:"#616874",fontSize:"0.75rem"},children:["_",j(null===(c=null===(n=i.schema)||void 0===n?void 0:n.items)||void 0===c?void 0:c.type)]})]}),e.jsx("td",{children:Array.isArray(null===(h=i.schema)||void 0===h?void 0:h.enum)?i.schema.enum.join(" / "):"-"}),e.jsxs("td",{className:"desc-cell",children:[e.jsx("div",{className:"desc-text "+(S===a?"expanded":""),children:i.description||"No description"}),e.jsx("button",{className:"desc-toggle",onClick:()=>T(S===a?null:a),children:e.jsx(s,{src:l,className:S===a?"rotated":""})})]})]},a)}))})]})})]}),e.jsxs("div",{className:"response-section",children:[e.jsx("h3",{children:"Response"}),e.jsxs("div",{children:[e.jsx("div",{style:{height:"0.5rem",width:"7.5rem",marginLeft:"auto"},children:(null===(y=Object.keys((null==p?void 0:p.responses)||{}))||void 0===y?void 0:y.length)>0&&e.jsx("div",{className:"codeboxSection",children:e.jsx("div",{className:"codeboxHeader",children:e.jsx(d.SelectGroup,{size:"small",withSearch:!1,isMultiple:!1,clearable:!1,placeholder:"200",options:[{list:w}],value:k,onChange:e=>{q(e)}})})})}),e.jsxs("button",{className:"tab active ",children:[e.jsx(s,{src:a,className:"icon-left"}),"Header"]})]}),e.jsx("div",{className:"table-wrapper",children:e.jsxs("table",{className:"param-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"head-table-label",children:"Header Name"}),e.jsx("th",{className:"head-table-label",children:"Required"}),e.jsx("th",{className:"head-table-label",children:"Type"}),e.jsx("th",{className:"head-table-label",children:"Enum"}),e.jsx("th",{className:"head-table-label",children:"Description"})]})}),e.jsx("tbody",{children:!!O&&Object.keys(O)&&Object.keys(O).map((s=>{var l,i,a,t,d,r,o,n,c,h,m,v,p,x,u;return e.jsxs("tr",{children:[e.jsx("td",{children:s}),e.jsx("td",{children:null===(l=O[s])||void 0===l?void 0:l.required.toString()}),e.jsxs("td",{style:{textTransform:"capitalize"},children:[e.jsx("span",{children:(null===(a=null===(i=O[s])||void 0===i?void 0:i.schema)||void 0===a?void 0:a.type)||"-"}),"array"===(null===(d=null===(t=O[s])||void 0===t?void 0:t.schema)||void 0===d?void 0:d.type)&&(null===(n=null===(o=null===(r=O[s])||void 0===r?void 0:r.schema)||void 0===o?void 0:o.items)||void 0===n?void 0:n.type)&&e.jsxs("span",{style:{color:"#616874",fontSize:"0.75rem"},children:["_",j(null===(m=null===(h=null===(c=O[s])||void 0===c?void 0:c.schema)||void 0===h?void 0:h.items)||void 0===m?void 0:m.type)]})]}),e.jsx("td",{children:null===(x=null===(p=null===(v=O[s])||void 0===v?void 0:v.schema)||void 0===p?void 0:p.enum)||void 0===x?void 0:x.join("/")}),e.jsx("td",{children:null===(u=O[s])||void 0===u?void 0:u.description})]})}))})]})})]})]})};export{p as EndpointPage};
1
+ import{j as e}from"../../../../../_virtual/jsx-runtime.js";import s from"../../../../components/SVGLoader/SVGLoader.js";import l from"../../../../assets/icons/DownArrow.svg.js";import i from"../../../../assets/icons/CopySticker.svg.js";import a from"../../../../assets/icons/RequestOption.svg.js";import t from"../../../../assets/icons/ArrowBack.svg.js";import{d}from"../../../../../_virtual/index.js";import{useState as r,useMemo as o,useEffect as n}from"react";import{handleStatusColor as c}from"../../../../helpers/methodAccordion.helper.js";import{httpStatusCodes as h}from"../../../../constants/index.js";import m from"../../../../components/Tooltip/Tooltip.js";import{useSectionToggle as v,SectionEnum as u}from"../../../../context/SectionToggleContext.js";import{capitalizeFirstLetter as p}from"../../../../utils/index.js";const j=({data:j,setActiveType:x,setActiveItemData:b})=>{var N,y,f;const[C,g]=r("header"),{toggleSection:w}=v(),S=o((()=>{var e,s,l;const i=null===(l=null===(s=null===(e=j.api)||void 0===e?void 0:e.servers)||void 0===s?void 0:s.filter((e=>"/"!==e.url))[0])||void 0===l?void 0:l.url,a=null==j?void 0:j.path.split("/").slice(2);return`${i}${(null==a?void 0:a.length)?"/"+a.join("/"):""}`}),[j]),T=h.map((s=>({label:e.jsxs("div",{className:"statusCodeOptionContainer",children:[e.jsx("div",{className:"statusCodeOptionCircle",style:{backgroundColor:c(s)}}),e.jsx("span",{children:s})]}),value:s}))),[k,q]=r(null),[O,R]=r(T[4]),[A,E]=r({});return((null==j?void 0:j.parameters)||[]).filter((e=>{var s;return(null===(s=e.in)||void 0===s?void 0:s.toLowerCase())===C.toLowerCase()})),n((()=>{if(O&&O.value){const e=null==j?void 0:j.responses[O.value];E(null==e?void 0:e.headers)}}),[O]),e.jsxs("div",{className:"api-details-expanded",children:[e.jsxs("div",{className:"test-button",children:[e.jsx("button",{className:"back-button",onClick:()=>{w(j.api.apiSpecId,[{type:u.OVERVIEW,setTo:!0}],{resetOthers:!0,filterKeys:[u.RESOURCE]}),x("OVERVIEW"),b(j.api)},children:e.jsx(s,{src:t})}),e.jsx(m,{content:"Comming soon",children:e.jsx("button",{className:"disabled",children:"Test"})})]}),e.jsx("h3",{children:j.api.title}),e.jsx("h1",{className:"api-title",children:null==j?void 0:j.summary}),e.jsxs("div",{className:"url-box",children:[e.jsxs("div",{className:"url-box_text-container",children:[e.jsx("span",{className:`method-label ${null===(N=null==j?void 0:j.method)||void 0===N?void 0:N.toLowerCase()}`,children:j.method}),e.jsx("span",{className:"url-text",children:S})]}),e.jsx("span",{className:"copy-icon",onClick:()=>navigator.clipboard.writeText(S),children:e.jsx(s,{src:i})})]}),e.jsx("p",{className:"api-desc",children:(null==j?void 0:j.description)||"No Description"}),e.jsx("h3",{children:"Request"}),e.jsxs("div",{className:"request-section",children:[e.jsx("div",{className:"request-tabs",children:["header","path","query"].map((l=>e.jsxs("button",{className:"tab "+(C===l?"active":""),onClick:()=>g(l),children:[e.jsx(s,{src:a,className:"icon-left"}),e.jsx("span",{className:"tab-label",children:"requestBody"===l?"Request Body":l.charAt(0).toUpperCase()+l.slice(1)})]},l)))}),e.jsx("div",{className:"table-wrapper",children:e.jsxs("table",{className:"param-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"head-table-label",children:"Parameter Name"}),e.jsx("th",{className:"head-table-label",children:"Required"}),e.jsx("th",{className:"head-table-label",children:"Type"}),e.jsx("th",{className:"head-table-label",children:"Enum"}),e.jsx("th",{className:"head-table-label",children:"Description"})]})}),e.jsx("tbody",{children:null===(y=j.parameters)||void 0===y?void 0:y.filter((e=>{var s;return(null===(s=e.in)||void 0===s?void 0:s.toLowerCase())===C.toLowerCase()})).map(((i,a)=>{var t,d,r,o,n,c,h;return e.jsxs("tr",{children:[e.jsx("td",{children:i.name}),e.jsx("td",{children:i.required?"True":"False"}),e.jsxs("td",{style:{textTransform:"capitalize"},children:[e.jsx("span",{children:(null===(t=null==i?void 0:i.schema)||void 0===t?void 0:t.type)||"-"}),"array"===(null===(d=null==i?void 0:i.schema)||void 0===d?void 0:d.type)&&(null===(o=null===(r=null==i?void 0:i.schema)||void 0===r?void 0:r.items)||void 0===o?void 0:o.type)&&e.jsxs("span",{style:{color:"#616874",fontSize:"0.75rem"},children:["_",p(null===(c=null===(n=i.schema)||void 0===n?void 0:n.items)||void 0===c?void 0:c.type)]})]}),e.jsx("td",{children:Array.isArray(null===(h=i.schema)||void 0===h?void 0:h.enum)?i.schema.enum.join(" / "):"-"}),e.jsxs("td",{className:"desc-cell",children:[e.jsx("div",{className:"desc-text "+(k===a?"expanded":""),children:i.description||"No description"}),e.jsx("button",{className:"desc-toggle",onClick:()=>q(k===a?null:a),children:e.jsx(s,{src:l,className:k===a?"rotated":""})})]})]},a)}))})]})})]}),e.jsxs("div",{className:"response-section",children:[e.jsx("h3",{children:"Response"}),e.jsxs("div",{children:[e.jsx("div",{style:{height:"0.5rem",width:"7.5rem",marginLeft:"auto"},children:(null===(f=Object.keys((null==j?void 0:j.responses)||{}))||void 0===f?void 0:f.length)>0&&e.jsx("div",{className:"codeboxSection",children:e.jsx("div",{className:"codeboxHeader",children:e.jsx(d.SelectGroup,{size:"small",withSearch:!1,isMultiple:!1,clearable:!1,placeholder:"200",options:[{list:T}],value:O,onChange:e=>{R(e)}})})})}),e.jsxs("button",{className:"tab active ",children:[e.jsx(s,{src:a,className:"icon-left"}),"Header"]})]}),e.jsx("div",{className:"table-wrapper",children:e.jsxs("table",{className:"param-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"head-table-label",children:"Header Name"}),e.jsx("th",{className:"head-table-label",children:"Required"}),e.jsx("th",{className:"head-table-label",children:"Type"}),e.jsx("th",{className:"head-table-label",children:"Enum"}),e.jsx("th",{className:"head-table-label",children:"Description"})]})}),e.jsx("tbody",{children:!!A&&Object.keys(A)&&Object.keys(A).map((s=>{var l,i,a,t,d,r,o,n,c,h,m,v,u,j,x;return e.jsxs("tr",{children:[e.jsx("td",{children:s}),e.jsx("td",{children:null===(l=A[s])||void 0===l?void 0:l.required.toString()}),e.jsxs("td",{style:{textTransform:"capitalize"},children:[e.jsx("span",{children:(null===(a=null===(i=A[s])||void 0===i?void 0:i.schema)||void 0===a?void 0:a.type)||"-"}),"array"===(null===(d=null===(t=A[s])||void 0===t?void 0:t.schema)||void 0===d?void 0:d.type)&&(null===(n=null===(o=null===(r=A[s])||void 0===r?void 0:r.schema)||void 0===o?void 0:o.items)||void 0===n?void 0:n.type)&&e.jsxs("span",{style:{color:"#616874",fontSize:"0.75rem"},children:["_",p(null===(m=null===(h=null===(c=A[s])||void 0===c?void 0:c.schema)||void 0===h?void 0:h.items)||void 0===m?void 0:m.type)]})]}),e.jsx("td",{children:null===(j=null===(u=null===(v=A[s])||void 0===v?void 0:v.schema)||void 0===u?void 0:u.enum)||void 0===j?void 0:j.join("/")}),e.jsx("td",{children:null===(x=A[s])||void 0===x?void 0:x.description})]})}))})]})})]})]})};export{j as EndpointPage};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/layout/docsComponents/DocsContent/EndpointPage/index.tsx"],"sourcesContent":["import SVGLoader from '../../../../components/SVGLoader/SVGLoader'\nimport {\n ArrowBack,\n CopySticker,\n DownArrowIcon,\n RequestOption,\n} from '../../../../assets/icons/index'\nimport { SelectGroup } from 'digitinary-ui'\nimport { useEffect, useState } from 'react'\nimport { EndpointData, OverviewData } from 'src/layout/docsLayout'\nimport { handleStatusColor } from '../../../../helpers/methodAccordion.helper'\nimport { httpStatusCodes } from '../../../../constants/index'\nimport styles from '../../Codebox/style.module.scss'\nimport Tooltip from '../../../../components/Tooltip/Tooltip'\nimport './style.scss'\nimport { SectionEnum, useSectionToggle } from '../../../../../src/context/SectionToggleContext'\nimport { capitalizeFirstLetter } from '../../../../../src/utils'\n\nexport const EndpointPage = ({\n data,\n setActiveType,\n setActiveItemData,\n}: {\n data: EndpointData\n setActiveType: React.Dispatch<React.SetStateAction<'OVERVIEW' | 'ENDPOINT'>>\n setActiveItemData: React.Dispatch<React.SetStateAction<OverviewData | EndpointData>>\n}) => {\n const [activeTab, setActiveTab] = useState('header')\n const { toggleSection } = useSectionToggle()\n\n const httpStatusCodeOptions = httpStatusCodes.map((code) => ({\n label: (\n <div className={'statusCodeOptionContainer'}>\n <div\n className={'statusCodeOptionCircle'}\n style={{ backgroundColor: handleStatusColor(code) }}\n ></div>\n <span>{code}</span>\n </div>\n ),\n value: code,\n }))\n\n const [expanded, setExpanded] = useState(null)\n const [selectedResStatusCode, setSelectedResStatusCode] = useState(httpStatusCodeOptions[4])\n const [headersList, setHeadersList] = useState({})\n const requestTableData = (data?.parameters || []).filter(\n (param) => param.in?.toLowerCase() === activeTab.toLowerCase()\n )\n\n useEffect(() => {\n if (selectedResStatusCode && selectedResStatusCode.value) {\n const headerObj = data?.responses[selectedResStatusCode.value]\n setHeadersList(headerObj?.headers)\n }\n }, [selectedResStatusCode])\n\n // ? TODO: 'body' should be returned after discussing with PO\n\n return (\n <div className=\"api-details-expanded\">\n <div className=\"test-button\">\n <button\n className=\"back-button\"\n onClick={() => {\n toggleSection(data.api.apiSpecId, [{ type: SectionEnum.OVERVIEW, setTo: true }], {\n resetOthers: true,\n filterKeys: [SectionEnum.RESOURCE],\n })\n setActiveType('OVERVIEW')\n setActiveItemData(data.api)\n }}\n >\n <SVGLoader src={ArrowBack} />\n </button>\n\n <Tooltip content=\"Comming soon\">\n <button className=\"disabled\">Test</button>\n </Tooltip>\n </div>\n <h3>{data.api.title}</h3>\n <h1 className=\"api-title\">{data?.summary}</h1>\n <div className=\"url-box\">\n <div style={{ textAlign: 'center' }}>\n <span className={`method-label ${data?.method?.toLowerCase()}`}>{data.method}</span>\n <span className=\"url-text\">{data?.path}</span>\n </div>\n <span className=\"icon\" onClick={() => navigator.clipboard.writeText(data?.path)}>\n <SVGLoader src={CopySticker} />\n </span>\n </div>\n\n <p className=\"api-desc\">{data?.description || 'No Description'}</p>\n\n <h3>Request</h3>\n\n <div className=\"request-section\">\n <div className=\"request-tabs\">\n {['header', 'path', 'query'].map((tab) => (\n <button\n key={tab}\n className={`tab ${activeTab === tab ? 'active' : ''}`}\n onClick={() => setActiveTab(tab)}\n >\n <SVGLoader src={RequestOption} className=\"icon-left\" />\n <span className=\"tab-label\">\n {tab === 'requestBody'\n ? 'Request Body'\n : tab.charAt(0).toUpperCase() + tab.slice(1)}\n </span>\n </button>\n ))}\n </div>\n\n {\n <div className=\"table-wrapper\">\n <table className=\"param-table\">\n <thead>\n <tr>\n <th className=\"head-table-label\">Parameter Name</th>\n <th className=\"head-table-label\">Required</th>\n <th className=\"head-table-label\">Type</th>\n <th className=\"head-table-label\">Enum</th>\n <th className=\"head-table-label\">Description</th>\n </tr>\n </thead>\n <tbody>\n {data.parameters\n ?.filter((p) => p.in?.toLowerCase() === activeTab.toLowerCase())\n .map((row, index) => (\n <tr key={index}>\n <td>{row.name}</td>\n <td>{row.required ? 'True' : 'False'}</td>\n <td style={{ textTransform: 'capitalize' }}>\n <span>{row?.schema?.type || '-'}</span>\n {row?.schema?.type === 'array' && row?.schema?.items?.type && (\n <span style={{ color: '#616874', fontSize: '0.75rem' }}>\n _{capitalizeFirstLetter(row.schema?.items?.type)}\n </span>\n )}\n </td>\n <td>{Array.isArray(row.schema?.enum) ? row.schema.enum.join(' / ') : '-'}</td>\n <td className=\"desc-cell\">\n <div className={`desc-text ${expanded === index ? 'expanded' : ''}`}>\n {row.description || 'No description'}\n </div>\n <button\n className=\"desc-toggle\"\n onClick={() => setExpanded(expanded === index ? null : index)}\n >\n <SVGLoader\n src={DownArrowIcon}\n className={expanded === index ? 'rotated' : ''}\n />\n </button>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n }\n </div>\n\n <div className=\"response-section\">\n <h3>Response</h3>\n\n <div>\n <div style={{ height: '0.5rem', width: '7.5rem', marginLeft: 'auto' }}>\n {Object.keys(data?.responses || {})?.length > 0 && (\n <div className={'codeboxSection'}>\n <div className={`${'codeboxHeader'}`}>\n <SelectGroup\n size=\"small\"\n withSearch={false}\n isMultiple={false}\n clearable={false}\n placeholder=\"200\"\n options={[\n {\n list: httpStatusCodeOptions,\n },\n ]}\n value={selectedResStatusCode}\n onChange={(value) => {\n setSelectedResStatusCode(value)\n }}\n />\n </div>\n </div>\n )}\n </div>\n <button className=\"tab active \">\n <SVGLoader src={RequestOption} className=\"icon-left\" />\n Header\n </button>\n </div>\n\n <div className=\"table-wrapper\">\n <table className=\"param-table\">\n <thead>\n <tr>\n <th className=\"head-table-label\">Header Name</th>\n <th className=\"head-table-label\">Required</th>\n <th className=\"head-table-label\">Type</th>\n <th className=\"head-table-label\">Enum</th>\n <th className=\"head-table-label\">Description</th>\n </tr>\n </thead>\n <tbody>\n {!!headersList &&\n Object.keys(headersList) &&\n Object.keys(headersList).map((key) => (\n <tr>\n <td>{key}</td>\n <td>{headersList[key]?.required.toString()}</td>\n <td style={{ textTransform: 'capitalize' }}>\n <span>{headersList[key]?.schema?.type || '-'}</span>\n {headersList[key]?.schema?.type === 'array' &&\n headersList[key]?.schema?.items?.type && (\n <span style={{ color: '#616874', fontSize: '0.75rem' }}>\n _{capitalizeFirstLetter(headersList[key]?.schema?.items?.type)}\n </span>\n )}\n </td>\n <td>{headersList[key]?.schema?.enum?.join('/')}</td>\n <td>{headersList[key]?.description}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n </div>\n )\n}\n"],"names":["EndpointPage","data","setActiveType","setActiveItemData","activeTab","setActiveTab","useState","toggleSection","useSectionToggle","httpStatusCodeOptions","httpStatusCodes","map","code","label","_jsxs","jsxs","className","children","_jsx","style","backgroundColor","handleStatusColor","value","expanded","setExpanded","selectedResStatusCode","setSelectedResStatusCode","headersList","setHeadersList","parameters","filter","param","in","_a","toLowerCase","useEffect","headerObj","responses","headers","onClick","api","apiSpecId","type","SectionEnum","OVERVIEW","setTo","resetOthers","filterKeys","RESOURCE","SVGLoader","src","ArrowBack","Tooltip","content","jsx","title","summary","textAlign","method","path","navigator","clipboard","writeText","CopySticker","description","tab","RequestOption","charAt","toUpperCase","slice","_b","p","row","index","name","required","textTransform","schema","_d","_c","items","color","fontSize","capitalizeFirstLetter","_f","_e","Array","isArray","_g","enum","join","DownArrowIcon","height","width","marginLeft","Object","keys","length","SelectGroup","size","withSearch","isMultiple","clearable","placeholder","options","list","onChange","key","toString","_h","_k","_j","_p","_o","_q"],"mappings":"izBAkBO,MAAMA,EAAe,EAC1BC,OACAC,gBACAC,kCAMA,MAAOC,EAAWC,GAAgBC,EAAS,WACrCC,cAAEA,GAAkBC,IAEpBC,EAAwBC,EAAgBC,KAAKC,IAAU,CAC3DC,MACEC,EAAKC,KAAA,MAAA,CAAAC,UAAW,4BACdC,SAAA,CAAAC,MAAA,MAAA,CACEF,UAAW,yBACXG,MAAO,CAAEC,gBAAiBC,EAAkBT,MAE9CM,EAAAA,IAAO,OAAA,CAAAD,SAAAL,OAGXU,MAAOV,OAGFW,EAAUC,GAAelB,EAAS,OAClCmB,EAAuBC,GAA4BpB,EAASG,EAAsB,KAClFkB,EAAaC,GAAkBtB,EAAS,CAAE,GAcjD,QAb0BL,aAAI,EAAJA,EAAM4B,aAAc,IAAIC,QAC/CC,U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QAAhBgB,EAAAN,EAAYgF,UAAI,IAAA1E,OAAA,EAAAA,EAAE0C,SAASiC,aAChC9F,EAAAC,KAAA,KAAA,CAAII,MAAO,CAAEyD,cAAe,cAAc3D,SAAA,CACxCC,EAAAA,sBAA+B,QAAxB6D,EAAgB,QAAhBT,EAAA3C,EAAYgF,UAAI,IAAArC,OAAA,EAAAA,EAAEO,cAAM,IAAAE,OAAA,EAAAA,EAAErC,OAAQ,MACL,WAAX,QAAxB2C,EAAgB,QAAhBP,EAAAnD,EAAYgF,UAAI,IAAA7B,OAAA,EAAAA,EAAED,cAAM,IAAAQ,OAAA,EAAAA,EAAE3C,gBACzBmE,EAA0B,UAAR,QAAlBzB,EAAAzD,EAAYgF,UAAM,IAAAvB,OAAA,EAAAA,EAAAP,cAAQ,IAAAW,OAAA,EAAAA,EAAAR,4BAAOtC,OAC/B5B,EAAAA,aAAMK,MAAO,CAAE8D,MAAO,UAAWC,SAAU,WAAWjE,SAAA,CAAA,IAClDkE,YAAgD,QAA1B2B,EAAkB,QAAlBC,EAAApF,EAAYgF,UAAM,IAAAI,OAAA,EAAAA,EAAAlC,cAAQ,IAAAiC,OAAA,EAAAA,EAAA9B,4BAAOtC,YAIjExB,EAAAA,IAAA,KAAA,CAAAD,SAAmC,QAA9B+F,EAAwB,QAAxBC,YAAAtF,EAAYgF,yBAAM9B,cAAM,IAAAoC,OAAA,EAAAA,EAAExB,YAAI,IAAAuB,OAAA,EAAAA,EAAEtB,KAAK,OAC1CxE,EAAAA,IAAK,KAAA,CAAAD,SAAgB,QAAhBiG,EAAAvF,EAAYgF,UAAI,IAAAO,OAAA,EAAAA,EAAElD"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/layout/docsComponents/DocsContent/EndpointPage/index.tsx"],"sourcesContent":["import SVGLoader from '../../../../components/SVGLoader/SVGLoader'\nimport {\n ArrowBack,\n CopySticker,\n DownArrowIcon,\n RequestOption,\n} from '../../../../assets/icons/index'\nimport { SelectGroup } from 'digitinary-ui'\nimport { useEffect, useMemo, useState } from 'react'\nimport { EndpointData, OverviewData } from 'src/layout/docsLayout'\nimport { handleStatusColor } from '../../../../helpers/methodAccordion.helper'\nimport { httpStatusCodes } from '../../../../constants/index'\nimport styles from '../../Codebox/style.module.scss'\nimport Tooltip from '../../../../components/Tooltip/Tooltip'\nimport './style.scss'\nimport { SectionEnum, useSectionToggle } from '../../../../../src/context/SectionToggleContext'\nimport { capitalizeFirstLetter } from '../../../../../src/utils'\n\nexport const EndpointPage = ({\n data,\n setActiveType,\n setActiveItemData,\n}: {\n data: EndpointData\n setActiveType: React.Dispatch<React.SetStateAction<'OVERVIEW' | 'ENDPOINT'>>\n setActiveItemData: React.Dispatch<React.SetStateAction<OverviewData | EndpointData>>\n}) => {\n const [activeTab, setActiveTab] = useState('header')\n const { toggleSection } = useSectionToggle()\n const fullUrl = useMemo(() => {\n // env gateway url + api version(if appended) + context path\n const url = data.api?.servers?.filter((s) => s.url !== '/')[0]?.url\n const pathParts = data?.path.split('/').slice(2) // slice from index 2 to skip the first empty \"\" and \"comments\"\n const fullPath = !!pathParts?.length ? '/' + pathParts.join('/') : '' // this will contain the full path without the context path\n return `${url}${fullPath}`\n }, [data])\n\n const httpStatusCodeOptions = httpStatusCodes.map((code) => ({\n label: (\n <div className={'statusCodeOptionContainer'}>\n <div\n className={'statusCodeOptionCircle'}\n style={{ backgroundColor: handleStatusColor(code) }}\n ></div>\n <span>{code}</span>\n </div>\n ),\n value: code,\n }))\n\n const [expanded, setExpanded] = useState(null)\n const [selectedResStatusCode, setSelectedResStatusCode] = useState(httpStatusCodeOptions[4])\n const [headersList, setHeadersList] = useState({})\n const requestTableData = (data?.parameters || []).filter(\n (param) => param.in?.toLowerCase() === activeTab.toLowerCase()\n )\n\n useEffect(() => {\n if (selectedResStatusCode && selectedResStatusCode.value) {\n const headerObj = data?.responses[selectedResStatusCode.value]\n setHeadersList(headerObj?.headers)\n }\n }, [selectedResStatusCode])\n\n // ? TODO: 'body' should be returned after discussing with PO\n\n return (\n <div className=\"api-details-expanded\">\n <div className=\"test-button\">\n <button\n className=\"back-button\"\n onClick={() => {\n toggleSection(data.api.apiSpecId, [{ type: SectionEnum.OVERVIEW, setTo: true }], {\n resetOthers: true,\n filterKeys: [SectionEnum.RESOURCE],\n })\n setActiveType('OVERVIEW')\n setActiveItemData(data.api)\n }}\n >\n <SVGLoader src={ArrowBack} />\n </button>\n\n <Tooltip content=\"Comming soon\">\n <button className=\"disabled\">Test</button>\n </Tooltip>\n </div>\n <h3>{data.api.title}</h3>\n <h1 className=\"api-title\">{data?.summary}</h1>\n <div className=\"url-box\">\n <div className=\"url-box_text-container\">\n <span className={`method-label ${data?.method?.toLowerCase()}`}>{data.method}</span>\n <span className=\"url-text\">{fullUrl}</span>\n </div>\n <span className=\"copy-icon\" onClick={() => navigator.clipboard.writeText(fullUrl)}>\n <SVGLoader src={CopySticker} />\n </span>\n </div>\n\n <p className=\"api-desc\">{data?.description || 'No Description'}</p>\n\n <h3>Request</h3>\n\n <div className=\"request-section\">\n <div className=\"request-tabs\">\n {['header', 'path', 'query'].map((tab) => (\n <button\n key={tab}\n className={`tab ${activeTab === tab ? 'active' : ''}`}\n onClick={() => setActiveTab(tab)}\n >\n <SVGLoader src={RequestOption} className=\"icon-left\" />\n <span className=\"tab-label\">\n {tab === 'requestBody'\n ? 'Request Body'\n : tab.charAt(0).toUpperCase() + tab.slice(1)}\n </span>\n </button>\n ))}\n </div>\n\n {\n <div className=\"table-wrapper\">\n <table className=\"param-table\">\n <thead>\n <tr>\n <th className=\"head-table-label\">Parameter Name</th>\n <th className=\"head-table-label\">Required</th>\n <th className=\"head-table-label\">Type</th>\n <th className=\"head-table-label\">Enum</th>\n <th className=\"head-table-label\">Description</th>\n </tr>\n </thead>\n <tbody>\n {data.parameters\n ?.filter((p) => p.in?.toLowerCase() === activeTab.toLowerCase())\n .map((row, index) => (\n <tr key={index}>\n <td>{row.name}</td>\n <td>{row.required ? 'True' : 'False'}</td>\n <td style={{ textTransform: 'capitalize' }}>\n <span>{row?.schema?.type || '-'}</span>\n {row?.schema?.type === 'array' && row?.schema?.items?.type && (\n <span style={{ color: '#616874', fontSize: '0.75rem' }}>\n _{capitalizeFirstLetter(row.schema?.items?.type)}\n </span>\n )}\n </td>\n <td>{Array.isArray(row.schema?.enum) ? row.schema.enum.join(' / ') : '-'}</td>\n <td className=\"desc-cell\">\n <div className={`desc-text ${expanded === index ? 'expanded' : ''}`}>\n {row.description || 'No description'}\n </div>\n <button\n className=\"desc-toggle\"\n onClick={() => setExpanded(expanded === index ? null : index)}\n >\n <SVGLoader\n src={DownArrowIcon}\n className={expanded === index ? 'rotated' : ''}\n />\n </button>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n }\n </div>\n\n <div className=\"response-section\">\n <h3>Response</h3>\n\n <div>\n <div style={{ height: '0.5rem', width: '7.5rem', marginLeft: 'auto' }}>\n {Object.keys(data?.responses || {})?.length > 0 && (\n <div className={'codeboxSection'}>\n <div className={`${'codeboxHeader'}`}>\n <SelectGroup\n size=\"small\"\n withSearch={false}\n isMultiple={false}\n clearable={false}\n placeholder=\"200\"\n options={[\n {\n list: httpStatusCodeOptions,\n },\n ]}\n value={selectedResStatusCode}\n onChange={(value) => {\n setSelectedResStatusCode(value)\n }}\n />\n </div>\n </div>\n )}\n </div>\n <button className=\"tab active \">\n <SVGLoader src={RequestOption} className=\"icon-left\" />\n Header\n </button>\n </div>\n\n <div className=\"table-wrapper\">\n <table className=\"param-table\">\n <thead>\n <tr>\n <th className=\"head-table-label\">Header Name</th>\n <th className=\"head-table-label\">Required</th>\n <th className=\"head-table-label\">Type</th>\n <th className=\"head-table-label\">Enum</th>\n <th className=\"head-table-label\">Description</th>\n </tr>\n </thead>\n <tbody>\n {!!headersList &&\n Object.keys(headersList) &&\n Object.keys(headersList).map((key) => (\n <tr>\n <td>{key}</td>\n <td>{headersList[key]?.required.toString()}</td>\n <td style={{ textTransform: 'capitalize' }}>\n <span>{headersList[key]?.schema?.type || '-'}</span>\n {headersList[key]?.schema?.type === 'array' &&\n headersList[key]?.schema?.items?.type && (\n <span style={{ color: '#616874', fontSize: '0.75rem' }}>\n _{capitalizeFirstLetter(headersList[key]?.schema?.items?.type)}\n </span>\n )}\n </td>\n <td>{headersList[key]?.schema?.enum?.join('/')}</td>\n <td>{headersList[key]?.description}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </div>\n </div>\n )\n}\n"],"names":["EndpointPage","data","setActiveType","setActiveItemData","activeTab","setActiveTab","useState","toggleSection","useSectionToggle","fullUrl","useMemo","url","_c","_b","_a","api","servers","filter","s","pathParts","path","split","slice","length","join","httpStatusCodeOptions","httpStatusCodes","map","code","label","_jsxs","jsxs","className","children","_jsx","style","backgroundColor","handleStatusColor","value","expanded","setExpanded","selectedResStatusCode","setSelectedResStatusCode","headersList","setHeadersList","parameters","param","in","toLowerCase","useEffect","headerObj","responses","headers","onClick","apiSpecId","type","SectionEnum","OVERVIEW","setTo","resetOthers","filterKeys","RESOURCE","SVGLoader","src","ArrowBack","jsx","Tooltip","content","title","summary","method","navigator","clipboard","writeText","CopySticker","description","tab","RequestOption","charAt","toUpperCase","p","row","index","name","required","textTransform","schema","_d","items","color","fontSize","capitalizeFirstLetter","_f","_e","Array","isArray","_g","enum","DownArrowIcon","height","width","marginLeft","Object","keys","SelectGroup","size","withSearch","isMultiple","clearable","placeholder","options","list","onChange","key","toString","_h","_k","_j","_p","_o","_q"],"mappings":"8zBAkBO,MAAMA,EAAe,EAC1BC,OACAC,gBACAC,kCAMA,MAAOC,EAAWC,GAAgBC,EAAS,WACrCC,cAAEA,GAAkBC,IACpBC,EAAUC,GAAQ,eAEtB,MAAMC,EAA0D,QAApDC,EAAmB,QAAnBC,EAAU,QAAVC,EAAAb,EAAKc,WAAK,IAAAD,OAAA,EAAAA,EAAAE,eAAS,IAAAH,OAAA,EAAAA,EAAAI,QAAQC,GAAgB,MAAVA,EAAEP,MAAa,UAAI,IAAAC,OAAA,EAAAA,E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AAOjC,YAIjErB,EAAAA,IAAA,KAAA,CAAAD,SAAmC,QAA9BqF,EAAwB,QAAxBC,YAAA5E,EAAYsE,yBAAM3B,cAAM,IAAAiC,OAAA,EAAAA,EAAEtB,YAAI,IAAAqB,OAAA,EAAAA,EAAE9F,KAAK,OAC1CU,EAAAA,IAAK,KAAA,CAAAD,SAAgB,QAAhBuF,EAAA7E,EAAYsE,UAAI,IAAAO,OAAA,EAAAA,EAAE7C"}
package/dist/styles.css CHANGED
@@ -62,124 +62,6 @@
62
62
  }
63
63
  .containerTitleDrawer .closeIcon {
64
64
  cursor: pointer;
65
- }.apiInfoForm {
66
- display: grid;
67
- padding: 1.25rem 1.875rem;
68
- gap: 1.25rem;
69
- }
70
- .apiInfoForm .paramsTable .paramDescContainer {
71
- display: flex;
72
- }
73
- .apiInfoForm .paramsTable .paramDescContainer .paramDescContainer_separator {
74
- height: inherit;
75
- width: 1px;
76
- background-color: #d8dae5;
77
- }
78
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn) svg path {
79
- stroke-width: 0.1;
80
- }
81
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn {
82
- padding: 0;
83
- margin-right: 1.25rem;
84
- }
85
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) {
86
- display: flex;
87
- align-items: center;
88
- padding: 0;
89
- font-size: 0.875rem;
90
- }
91
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
92
- margin-block: auto;
93
- }
94
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg path {
95
- fill: #12131a;
96
- }
97
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn {
98
- padding: 0;
99
- border-width: 0 !important;
100
- }
101
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
102
- margin-block: auto;
103
- }
104
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg {
105
- width: 1.125rem;
106
- }
107
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) {
108
- margin-block: auto;
109
- }
110
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg {
111
- width: 1.125rem;
112
- }
113
- .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg path {
114
- fill: #3aaa35;
115
- }
116
- .apiInfoForm .paramsTable .externalDocsLink {
117
- font-size: 0.875rem;
118
- line-height: 1.25rem;
119
- cursor: pointer;
120
- align-self: center;
121
- margin-right: 2rem;
122
- }
123
- .apiInfoForm .paramsTable .editExternalDocs {
124
- display: flex;
125
- align-items: center;
126
- padding-right: 0.625rem;
127
- }
128
- .apiInfoForm .paramsTable .editExternalDocs svg {
129
- cursor: pointer;
130
- }
131
- .apiInfoForm .paramsTable .editExternalDocs svg path {
132
- fill: #12131a;
133
- }
134
- .apiInfoForm .paramsTable .editDescTooltipContent {
135
- display: flex;
136
- flex-direction: column;
137
- gap: 0.625rem;
138
- padding-bottom: 0.625rem;
139
- }
140
- .apiInfoForm .paramsTable .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
141
- margin-inline: 0.625rem;
142
- }
143
- .apiInfoForm .paramsTable .editDescTooltipContent .editDescTooltipContent_header {
144
- font-weight: 600;
145
- font-size: 0.875rem;
146
- line-height: 1.25rem;
147
- padding: 0.75rem 1.25rem;
148
- border-bottom: 1px solid #d8dae5;
149
- }
150
- .apiInfoForm .paramsTable :global(.requiredParam) :global(.headContainer)::after {
151
- content: "*";
152
- color: red;
153
- transform: translateX(0.125rem);
154
- }
155
- .apiInfoForm .apiDocRow {
156
- display: grid;
157
- grid-template-columns: 1fr 1fr;
158
- gap: 1.25rem;
159
- }
160
- .apiInfoForm .apiInfoForm_tagsChips {
161
- margin-top: -1.25rem;
162
- }
163
- .apiInfoForm .editDescTooltipContent {
164
- display: flex;
165
- flex-direction: column;
166
- gap: 0.625rem;
167
- padding-bottom: 0.625rem;
168
- }
169
- .apiInfoForm .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
170
- margin-inline: 0.625rem;
171
- }
172
- .apiInfoForm .editDescTooltipContent .editDescTooltipContent_header {
173
- font-weight: 600;
174
- font-size: 0.875rem;
175
- line-height: 1.25rem;
176
- padding: 0.75rem 1.25rem;
177
- border-bottom: 1px solid #d8dae5;
178
- }
179
- .apiInfoForm :global(.requiredParam) :global(.headContainer)::after {
180
- content: "*";
181
- color: red;
182
- transform: translateX(0.125rem);
183
65
  }.methodAccordion {
184
66
  border: none !important;
185
67
  box-shadow: none !important;
@@ -511,6 +393,124 @@
511
393
  }
512
394
  .methodAccordion.readOnly .methodSummaryContainer .methodExpandArrowContainer {
513
395
  background-color: #ebecf2;
396
+ }.apiInfoForm {
397
+ display: grid;
398
+ padding: 1.25rem 1.875rem;
399
+ gap: 1.25rem;
400
+ }
401
+ .apiInfoForm .paramsTable .paramDescContainer {
402
+ display: flex;
403
+ }
404
+ .apiInfoForm .paramsTable .paramDescContainer .paramDescContainer_separator {
405
+ height: inherit;
406
+ width: 1px;
407
+ background-color: #d8dae5;
408
+ }
409
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn) svg path {
410
+ stroke-width: 0.1;
411
+ }
412
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn {
413
+ padding: 0;
414
+ margin-right: 1.25rem;
415
+ }
416
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) {
417
+ display: flex;
418
+ align-items: center;
419
+ padding: 0;
420
+ font-size: 0.875rem;
421
+ }
422
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
423
+ margin-block: auto;
424
+ }
425
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg path {
426
+ fill: #12131a;
427
+ }
428
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn {
429
+ padding: 0;
430
+ border-width: 0 !important;
431
+ }
432
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
433
+ margin-block: auto;
434
+ }
435
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg {
436
+ width: 1.125rem;
437
+ }
438
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) {
439
+ margin-block: auto;
440
+ }
441
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg {
442
+ width: 1.125rem;
443
+ }
444
+ .apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg path {
445
+ fill: #3aaa35;
446
+ }
447
+ .apiInfoForm .paramsTable .externalDocsLink {
448
+ font-size: 0.875rem;
449
+ line-height: 1.25rem;
450
+ cursor: pointer;
451
+ align-self: center;
452
+ margin-right: 2rem;
453
+ }
454
+ .apiInfoForm .paramsTable .editExternalDocs {
455
+ display: flex;
456
+ align-items: center;
457
+ padding-right: 0.625rem;
458
+ }
459
+ .apiInfoForm .paramsTable .editExternalDocs svg {
460
+ cursor: pointer;
461
+ }
462
+ .apiInfoForm .paramsTable .editExternalDocs svg path {
463
+ fill: #12131a;
464
+ }
465
+ .apiInfoForm .paramsTable .editDescTooltipContent {
466
+ display: flex;
467
+ flex-direction: column;
468
+ gap: 0.625rem;
469
+ padding-bottom: 0.625rem;
470
+ }
471
+ .apiInfoForm .paramsTable .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
472
+ margin-inline: 0.625rem;
473
+ }
474
+ .apiInfoForm .paramsTable .editDescTooltipContent .editDescTooltipContent_header {
475
+ font-weight: 600;
476
+ font-size: 0.875rem;
477
+ line-height: 1.25rem;
478
+ padding: 0.75rem 1.25rem;
479
+ border-bottom: 1px solid #d8dae5;
480
+ }
481
+ .apiInfoForm .paramsTable :global(.requiredParam) :global(.headContainer)::after {
482
+ content: "*";
483
+ color: red;
484
+ transform: translateX(0.125rem);
485
+ }
486
+ .apiInfoForm .apiDocRow {
487
+ display: grid;
488
+ grid-template-columns: 1fr 1fr;
489
+ gap: 1.25rem;
490
+ }
491
+ .apiInfoForm .apiInfoForm_tagsChips {
492
+ margin-top: -1.25rem;
493
+ }
494
+ .apiInfoForm .editDescTooltipContent {
495
+ display: flex;
496
+ flex-direction: column;
497
+ gap: 0.625rem;
498
+ padding-bottom: 0.625rem;
499
+ }
500
+ .apiInfoForm .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
501
+ margin-inline: 0.625rem;
502
+ }
503
+ .apiInfoForm .editDescTooltipContent .editDescTooltipContent_header {
504
+ font-weight: 600;
505
+ font-size: 0.875rem;
506
+ line-height: 1.25rem;
507
+ padding: 0.75rem 1.25rem;
508
+ border-bottom: 1px solid #d8dae5;
509
+ }
510
+ .apiInfoForm :global(.requiredParam) :global(.headContainer)::after {
511
+ content: "*";
512
+ color: red;
513
+ transform: translateX(0.125rem);
514
514
  }.tooltip-custom-wrapper {
515
515
  display: flex;
516
516
  }
@@ -1557,11 +1557,12 @@ div.endBtnIcon {
1557
1557
  .api-docs-api-tree__endpoint--patch .api-docs-api-tree__endpoint-method {
1558
1558
  color: #58e2c2;
1559
1559
  }.api_docs_header {
1560
- height: 2.625rem;
1560
+ height: 3.125rem;
1561
1561
  background-color: #f0f1f2;
1562
1562
  display: flex;
1563
1563
  align-items: center;
1564
1564
  padding: 0 1rem;
1565
+ z-index: 1;
1565
1566
  }
1566
1567
  .api_docs_header .header_content {
1567
1568
  width: 100%;
@@ -1583,7 +1584,7 @@ div.endBtnIcon {
1583
1584
  line-height: 1.25rem;
1584
1585
  }
1585
1586
  .api_docs_header .search_filter_btn:hover:not(:disabled) {
1586
- color: #000000;
1587
+ color: #000000 !important;
1587
1588
  }
1588
1589
  .api_docs_header .search_filter_btn:hover {
1589
1590
  color: #000;
@@ -1616,14 +1617,14 @@ div.endBtnIcon {
1616
1617
  border: none !important;
1617
1618
  box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
1618
1619
  padding: 0.4rem;
1619
- width: 8.4875rem;
1620
- font-size: 0.8125rem;
1620
+ width: 10.4875rem;
1621
+ font-size: 1rem;
1621
1622
  font-weight: 400;
1622
1623
  line-height: 1.234rem;
1623
1624
  height: 2.25rem;
1624
1625
  }
1625
1626
  .api_docs_header .api_btn:hover:not(:disabled) {
1626
- color: #000000;
1627
+ color: #000000 !important;
1627
1628
  }
1628
1629
  .api_docs_header .api_btn svg {
1629
1630
  margin-right: 0.4075rem;
@@ -2252,60 +2253,70 @@ main .api-details-expanded h3 {
2252
2253
  margin-bottom: 0.5rem;
2253
2254
  }
2254
2255
  main .api-details-expanded .url-box {
2255
- height: 1.75rem;
2256
- justify-content: space-between;
2257
- background-color: #edf1fb !important;
2256
+ background-color: #edf1fb;
2257
+ padding: 0.375rem 0.75rem;
2258
+ border-radius: 0.5rem;
2259
+ display: flex;
2260
+ align-items: center;
2261
+ gap: 0.5rem;
2262
+ font-size: 14px;
2263
+ flex: 1;
2264
+ height: 2.8rem;
2265
+ margin-bottom: 1.5rem;
2266
+ overflow: hidden;
2267
+ }
2268
+ main .api-details-expanded .url-box_text-container {
2269
+ display: flex;
2270
+ align-items: center;
2271
+ flex: 1;
2272
+ overflow: hidden;
2258
2273
  }
2259
- main .api-details-expanded .url-text {
2274
+ main .api-details-expanded .url-box_text-container .url-text {
2260
2275
  color: #3b3f46;
2261
2276
  font-size: 1.25rem;
2262
- letter-spacing: 0px;
2263
2277
  line-height: 1.75rem;
2278
+ max-width: 100%;
2279
+ overflow: hidden;
2280
+ text-overflow: ellipsis;
2281
+ white-space: nowrap;
2282
+ flex: 1;
2264
2283
  }
2265
- main .api-details-expanded .method-label {
2266
- font-size: 0.924rem;
2267
- font-weight: 600;
2284
+ main .api-details-expanded .url-box_text-container .method-label {
2285
+ font-size: 1.25rem;
2268
2286
  padding: 0.125rem 0.5rem;
2269
2287
  border-radius: 0.375rem;
2270
2288
  text-transform: uppercase;
2271
2289
  color: #3aaa35;
2272
2290
  text-decoration: underline;
2273
2291
  }
2274
- main .api-details-expanded .method-label.get {
2292
+ main .api-details-expanded .url-box_text-container .method-label.get {
2275
2293
  color: #3a6cd1;
2276
2294
  }
2277
- main .api-details-expanded .method-label.post {
2295
+ main .api-details-expanded .url-box_text-container .method-label.post {
2278
2296
  color: #3aaa35;
2279
2297
  }
2280
- main .api-details-expanded .method-label.put {
2298
+ main .api-details-expanded .url-box_text-container .method-label.put {
2281
2299
  color: #faad14;
2282
2300
  }
2283
- main .api-details-expanded .method-label.patch {
2301
+ main .api-details-expanded .url-box_text-container .method-label.patch {
2284
2302
  color: #58e2c2;
2285
2303
  }
2286
- main .api-details-expanded .method-label.delete {
2304
+ main .api-details-expanded .url-box_text-container .method-label.delete {
2287
2305
  color: #da3f3f;
2288
2306
  }
2289
- main .api-details-expanded .method-label.head {
2307
+ main .api-details-expanded .url-box_text-container .method-label.head {
2290
2308
  color: #9461c9;
2291
2309
  }
2292
- main .api-details-expanded .method-label.trace {
2310
+ main .api-details-expanded .url-box_text-container .method-label.trace {
2293
2311
  color: #ffa28f;
2294
2312
  }
2295
- main .api-details-expanded .method-label.options {
2313
+ main .api-details-expanded .url-box_text-container .method-label.options {
2296
2314
  color: #495d97;
2297
2315
  }
2298
- main .api-details-expanded .url-box {
2299
- background-color: #f3f4f6;
2300
- padding: 0.375rem 0.75rem;
2301
- border-radius: 0.5rem;
2302
- display: flex;
2303
- align-items: center;
2304
- gap: 0.5rem;
2305
- font-size: 14px;
2306
- flex: 1;
2307
- height: 2.8rem;
2308
- margin-bottom: 1.5rem;
2316
+ main .api-details-expanded .url-box .copy-icon {
2317
+ cursor: pointer;
2318
+ width: 1.5rem;
2319
+ height: 1.5rem;
2309
2320
  }
2310
2321
  main .api-details-expanded .api-desc {
2311
2322
  color: #6b7280;
@@ -2426,9 +2437,4 @@ main .api-details-expanded .response-drop-test {
2426
2437
  justify-content: end !important;
2427
2438
  align-items: end !important;
2428
2439
  align-content: end !important;
2429
- }
2430
- main .api-details-expanded .copy-icon {
2431
- cursor: pointer;
2432
- width: 1.5rem;
2433
- height: 1.5rem;
2434
2440
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digi-frontend/dgate-api-documentation",
3
- "version": "1.0.82",
3
+ "version": "1.0.84",
4
4
  "main": "dist/src/index.js",
5
5
  "module": "dist/src/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -6,7 +6,7 @@ import {
6
6
  RequestOption,
7
7
  } from '../../../../assets/icons/index'
8
8
  import { SelectGroup } from 'digitinary-ui'
9
- import { useEffect, useState } from 'react'
9
+ import { useEffect, useMemo, useState } from 'react'
10
10
  import { EndpointData, OverviewData } from 'src/layout/docsLayout'
11
11
  import { handleStatusColor } from '../../../../helpers/methodAccordion.helper'
12
12
  import { httpStatusCodes } from '../../../../constants/index'
@@ -27,6 +27,13 @@ export const EndpointPage = ({
27
27
  }) => {
28
28
  const [activeTab, setActiveTab] = useState('header')
29
29
  const { toggleSection } = useSectionToggle()
30
+ const fullUrl = useMemo(() => {
31
+ // env gateway url + api version(if appended) + context path
32
+ const url = data.api?.servers?.filter((s) => s.url !== '/')[0]?.url
33
+ const pathParts = data?.path.split('/').slice(2) // slice from index 2 to skip the first empty "" and "comments"
34
+ const fullPath = !!pathParts?.length ? '/' + pathParts.join('/') : '' // this will contain the full path without the context path
35
+ return `${url}${fullPath}`
36
+ }, [data])
30
37
 
31
38
  const httpStatusCodeOptions = httpStatusCodes.map((code) => ({
32
39
  label: (
@@ -81,11 +88,11 @@ export const EndpointPage = ({
81
88
  <h3>{data.api.title}</h3>
82
89
  <h1 className="api-title">{data?.summary}</h1>
83
90
  <div className="url-box">
84
- <div style={{ textAlign: 'center' }}>
91
+ <div className="url-box_text-container">
85
92
  <span className={`method-label ${data?.method?.toLowerCase()}`}>{data.method}</span>
86
- <span className="url-text">{data?.path}</span>
93
+ <span className="url-text">{fullUrl}</span>
87
94
  </div>
88
- <span className="icon" onClick={() => navigator.clipboard.writeText(data?.path)}>
95
+ <span className="copy-icon" onClick={() => navigator.clipboard.writeText(fullUrl)}>
89
96
  <SVGLoader src={CopySticker} />
90
97
  </span>
91
98
  </div>
@@ -101,55 +101,7 @@ main {
101
101
  }
102
102
 
103
103
  .url-box {
104
- height: 1.75rem;
105
- justify-content: space-between;
106
- background-color: #edf1fb !important;
107
- }
108
-
109
- .url-text {
110
- color: #3b3f46;
111
- font-size: 1.25rem;
112
- letter-spacing: 0px;
113
- line-height: 1.75rem;
114
- }
115
-
116
- .method-label {
117
- font-size: 0.924rem;
118
- font-weight: 600;
119
- padding: 0.125rem 0.5rem;
120
- border-radius: 0.375rem;
121
- text-transform: uppercase;
122
- color: #3aaa35;
123
- text-decoration: underline;
124
-
125
- &.get {
126
- color: #3a6cd1;
127
- }
128
- &.post {
129
- color: #3aaa35;
130
- }
131
- &.put {
132
- color: #faad14;
133
- }
134
- &.patch {
135
- color: #58e2c2;
136
- }
137
- &.delete {
138
- color: #da3f3f;
139
- }
140
- &.head {
141
- color: #9461c9;
142
- }
143
- &.trace {
144
- color: #ffa28f;
145
- }
146
- &.options {
147
- color: #495d97;
148
- }
149
- }
150
-
151
- .url-box {
152
- background-color: #f3f4f6;
104
+ background-color: #edf1fb;
153
105
  padding: 0.375rem 0.75rem;
154
106
  border-radius: 0.5rem;
155
107
  display: flex;
@@ -159,6 +111,65 @@ main {
159
111
  flex: 1;
160
112
  height: 2.8rem;
161
113
  margin-bottom: 1.5rem;
114
+ overflow: hidden;
115
+
116
+ &_text-container {
117
+ display: flex;
118
+ align-items: center;
119
+ flex: 1;
120
+ overflow: hidden;
121
+
122
+ .url-text {
123
+ color: #3b3f46;
124
+ font-size: 1.25rem;
125
+ line-height: 1.75rem;
126
+ max-width: 100%;
127
+ overflow: hidden;
128
+ text-overflow: ellipsis;
129
+ white-space: nowrap;
130
+ flex: 1;
131
+ }
132
+
133
+ .method-label {
134
+ font-size: 1.25rem;
135
+ padding: 0.125rem 0.5rem;
136
+ border-radius: 0.375rem;
137
+ text-transform: uppercase;
138
+ color: #3aaa35;
139
+ text-decoration: underline;
140
+
141
+ &.get {
142
+ color: #3a6cd1;
143
+ }
144
+ &.post {
145
+ color: #3aaa35;
146
+ }
147
+ &.put {
148
+ color: #faad14;
149
+ }
150
+ &.patch {
151
+ color: #58e2c2;
152
+ }
153
+ &.delete {
154
+ color: #da3f3f;
155
+ }
156
+ &.head {
157
+ color: #9461c9;
158
+ }
159
+ &.trace {
160
+ color: #ffa28f;
161
+ }
162
+ &.options {
163
+ color: #495d97;
164
+ }
165
+ }
166
+ }
167
+
168
+ .copy-icon {
169
+ cursor: pointer;
170
+ width: 1.5rem;
171
+ height: 1.5rem;
172
+ }
162
173
  }
163
174
 
164
175
  .api-desc {
@@ -299,11 +310,5 @@ main {
299
310
  align-items: end !important;
300
311
  align-content: end !important;
301
312
  }
302
-
303
- .copy-icon {
304
- cursor: pointer;
305
- width: 1.5rem;
306
- height: 1.5rem;
307
- }
308
313
  }
309
314
  }
@@ -1,9 +1,10 @@
1
1
  .api_docs_header {
2
- height: 2.625rem;
2
+ height: 3.125rem;
3
3
  background-color: #f0f1f2;
4
4
  display: flex;
5
5
  align-items: center;
6
6
  padding: 0 1rem;
7
+ z-index: 1;
7
8
 
8
9
  .header_content {
9
10
  width: 100%;
@@ -27,7 +28,7 @@
27
28
  line-height: 1.25rem;
28
29
 
29
30
  &:hover:not(:disabled) {
30
- color: #000000;
31
+ color: #000000 !important;
31
32
  }
32
33
 
33
34
  &:hover {
@@ -67,14 +68,14 @@
67
68
  border: none !important;
68
69
  box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
69
70
  padding: 0.4rem;
70
- width: 8.4875rem;
71
- font-size: 0.8125rem;
71
+ width: 10.4875rem;
72
+ font-size: 1rem;
72
73
  font-weight: 400;
73
74
  line-height: 1.234rem;
74
75
  height: 2.25rem;
75
76
 
76
77
  &:hover:not(:disabled) {
77
- color: #000000;
78
+ color: #000000 !important;
78
79
  }
79
80
 
80
81
  svg {
package/variables.txt CHANGED
@@ -1,4 +1 @@
1
- export APP_VERSION=1.0.81
2
- export ECR_IMAGE=650046438355.dkr.ecr.eu-central-1.amazonaws.com/dgate-api-documentation:1.0.81-31104-develop
3
- export IMAGE_TAG=1.0.81-31104-develop
4
- export TARGET_ENV=dev
1
+ export APP_VERSION=1.0.83