jamespot-user-api 1.0.166 → 1.0.167

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.
Files changed (126) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +11 -11
  3. package/documentation/classes/AdminStoreApi.html +1 -1
  4. package/documentation/classes/AdminUtilsApi.html +1 -1
  5. package/documentation/classes/JApplicationApi.html +8 -8
  6. package/documentation/classes/JArticleApi.html +1 -1
  7. package/documentation/classes/JAssetReservation.html +1 -1
  8. package/documentation/classes/JAudienceApi.html +2 -2
  9. package/documentation/classes/JBaseApi.html +1 -1
  10. package/documentation/classes/JBbbApi.html +1 -0
  11. package/documentation/classes/JBookmarkApi.html +1 -1
  12. package/documentation/classes/JBusinessNetworkingApi.html +1 -1
  13. package/documentation/classes/JCommunityApi.html +1 -1
  14. package/documentation/classes/JDiapazoneApi.html +1 -1
  15. package/documentation/classes/JFaqApi.html +1 -1
  16. package/documentation/classes/JFileApi.html +5 -5
  17. package/documentation/classes/JFilebankApi.html +1 -1
  18. package/documentation/classes/JGlobalApi.html +1 -1
  19. package/documentation/classes/JGroupApi.html +14 -14
  20. package/documentation/classes/JIAApi.html +1 -1
  21. package/documentation/classes/JLandApi.html +1 -1
  22. package/documentation/classes/JMessengerApi.html +1 -1
  23. package/documentation/classes/JObjectApi.html +1 -1
  24. package/documentation/classes/JSearchApi.html +6 -6
  25. package/documentation/classes/JShareApi.html +1 -1
  26. package/documentation/classes/JSocialActionApi.html +1 -1
  27. package/documentation/classes/JTaxonomyApi.html +2 -2
  28. package/documentation/classes/JUserApi.html +7 -7
  29. package/documentation/classes/JWedocApi.html +1 -1
  30. package/documentation/classes/JWidgetApi.html +1 -1
  31. package/documentation/classes/JamespotUserApi.html +1 -1
  32. package/documentation/classes/Network.html +1 -1
  33. package/documentation/classes/TVDisplayApi.html +1 -1
  34. package/documentation/classes/WindowBrowser.html +1 -1
  35. package/documentation/enums/Format.html +1 -0
  36. package/documentation/enums/GroupModerateStatus.html +1 -1
  37. package/documentation/enums/StudioApplicationStatus.html +1 -1
  38. package/documentation/enums/WidgetsName.html +1 -0
  39. package/documentation/index.html +1 -1
  40. package/documentation/interfaces/AccessRightObject.html +1 -1
  41. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  42. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  43. package/documentation/interfaces/ApiWrapper.html +1 -1
  44. package/documentation/interfaces/BaseMessage.html +1 -1
  45. package/documentation/interfaces/Category.html +1 -1
  46. package/documentation/interfaces/FileBankProps.html +1 -1
  47. package/documentation/interfaces/FolderProps.html +1 -1
  48. package/documentation/interfaces/ListFilterSpec.html +1 -1
  49. package/documentation/interfaces/OF.html +1 -1
  50. package/documentation/interfaces/ObjectListProps.html +1 -1
  51. package/documentation/interfaces/PagingResults.html +1 -1
  52. package/documentation/interfaces/RootFolderProps.html +1 -1
  53. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  54. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  55. package/documentation/interfaces/SearchConfig.html +1 -1
  56. package/documentation/interfaces/SearchFacetModel.html +1 -1
  57. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  58. package/documentation/interfaces/SearchQuery.html +1 -1
  59. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  60. package/documentation/interfaces/SearchQueryOption.html +1 -1
  61. package/documentation/interfaces/SearchQueryResult.html +1 -1
  62. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  63. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  64. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  65. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  66. package/documentation/interfaces/SpotProps.html +1 -1
  67. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  68. package/documentation/interfaces/WidgetType.html +1 -0
  69. package/documentation/interfaces/WindowInterface.html +1 -1
  70. package/documentation/modules.html +8 -12
  71. package/jest.config.ts +3 -2
  72. package/lib/jamespot-user-api.js +1 -1
  73. package/lib/jamespot-user-api.js.map +1 -1
  74. package/lib/jest.config.d.ts +1 -0
  75. package/lib/jest.config.vm.d.ts +1 -0
  76. package/lib/src/apis/article/article.d.ts +10 -7
  77. package/lib/src/apis/assetReservation/assetReservation.d.ts +4 -4
  78. package/lib/src/apis/bbb/bbb.d.ts +7 -0
  79. package/lib/src/apis/bbb/bbb.mock.d.ts +3 -0
  80. package/lib/src/apis/bbb/bbb.test.d.ts +1 -0
  81. package/lib/src/apis/bookmark/bookmark.d.ts +11 -11
  82. package/lib/src/apis/businessNetworking/businessNetworking.d.ts +2 -2
  83. package/lib/src/apis/community.d.ts +2 -2
  84. package/lib/src/apis/faq/faq.d.ts +15 -15
  85. package/lib/src/apis/file/file.d.ts +4 -4
  86. package/lib/src/apis/group/group.d.ts +18 -5
  87. package/lib/src/apis/index.d.ts +1 -0
  88. package/lib/src/apis/jamespotUserApi.d.ts +2 -0
  89. package/lib/src/apis/mediaLibrary/mediaLibrary.d.ts +1 -1
  90. package/lib/src/apis/search/search.d.ts +5 -2
  91. package/lib/src/apis/socialAction/socialAction.d.ts +4 -4
  92. package/lib/src/apis/taxonomy/taxonomy.d.ts +26 -2
  93. package/lib/src/apis/taxonomy/types.d.ts +2 -2
  94. package/lib/src/apis/user/user.d.ts +937 -8
  95. package/lib/src/apis/user/user.mock.d.ts +3 -2
  96. package/lib/src/types/article.d.ts +152945 -48
  97. package/lib/src/types/asei.d.ts +1 -1
  98. package/lib/src/types/assetReservation.d.ts +1 -1
  99. package/lib/src/types/autocomplete.d.ts +261 -9
  100. package/lib/src/types/bbb.d.ts +39 -0
  101. package/lib/src/types/businessContact.d.ts +18 -0
  102. package/lib/src/types/faq.d.ts +4 -5
  103. package/lib/src/types/file.d.ts +2 -2
  104. package/lib/src/types/group.d.ts +34 -5
  105. package/lib/src/types/hook.d.ts +6 -6
  106. package/lib/src/types/index.d.ts +2 -0
  107. package/lib/src/types/mediaLibrary.d.ts +2 -2
  108. package/lib/src/types/meeting.d.ts +1 -1
  109. package/lib/src/types/pollSurvey.d.ts +1 -1
  110. package/lib/src/types/quizz.d.ts +1 -1
  111. package/lib/src/types/search.d.ts +2 -1
  112. package/lib/src/types/socialEvent.d.ts +1 -1
  113. package/lib/src/types/support.d.ts +1 -1
  114. package/lib/src/types/surveyDate.d.ts +1 -1
  115. package/lib/src/types/tvDisplay.d.ts +2 -2
  116. package/lib/src/types/user.d.ts +0 -114
  117. package/lib/src/types/utils.d.ts +330 -55
  118. package/lib/src/types/widgets.d.ts +94410 -227
  119. package/lib/src/util/Test.d.ts +3640 -4
  120. package/lib/src/util/object.d.ts +2 -2
  121. package/package.json +1 -1
  122. package/phpunitMock/bigBlueButtonGetPublicWebinarData-success.json +10 -0
  123. package/phpunitMock/bigBlueButtonPublicWebinarFullname-success.json +9 -0
  124. package/phpunitMock/businessContactQueryList-default.json +54 -0
  125. package/phpunitMock/widgetCheckListRespond-article.json +1 -1
  126. package/documentation/interfaces/BaseAutocomplete.html +0 -1
package/jest.config.ts CHANGED
@@ -10,10 +10,11 @@ const Config = {
10
10
  collectCoverage: true,
11
11
  coverageThreshold: {
12
12
  global: {
13
- statements: 94.52,
14
- functions: 85.17,
13
+ statements: 94,
14
+ functions: 84,
15
15
  },
16
16
  },
17
+ coveragePathIgnorePatterns: ['/types/', 'Test.ts'],
17
18
  moduleNameMapper: {
18
19
  '^@phpunitMock/(.*)$': '<rootDir>/phpunitMock/$1',
19
20
  },
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e,t={d:(e,s)=>{for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},s={};t.r(s),t.d(s,{ACCESS_REQUEST_ACCEPT:()=>Jn,ACCESS_REQUEST_DENY:()=>Kn,AdminLicenseApi:()=>r,AdminStoreApi:()=>i,AdminUtilsApi:()=>a,GroupModerateStatus:()=>gs,JApplicationApi:()=>o,JArticleApi:()=>Q,JAssetReservation:()=>X,JAudienceApi:()=>ee,JBaseApi:()=>n,JBookmarkApi:()=>te,JBusinessNetworkingApi:()=>se,JCommunityApi:()=>ne,JDiapazoneApi:()=>re,JFaqApi:()=>oe,JFileApi:()=>ae,JFilebankApi:()=>ce,JGlobalApi:()=>ue,JGroupApi:()=>pe,JIAApi:()=>Ms,JLandApi:()=>xs,JMessengerApi:()=>js,JObjectApi:()=>Ps,JSearchApi:()=>Os,JShareApi:()=>Rs,JSocialActionApi:()=>Is,JTaxonomyApi:()=>As,JUserApi:()=>Cs,JWedocApi:()=>Ts,JWidgetApi:()=>Us,JamespotUserApi:()=>Ds,JamespotUserApiInstance:()=>Hn,Network:()=>M,StudioApplicationStatus:()=>e,TVDisplayApi:()=>Fs,UserLevel:()=>en,WindowBrowser:()=>$s,api:()=>Yn,businessContactSchema:()=>fn,combineFormat:()=>z,deepEqual:()=>q,default:()=>Qn,extensions:()=>x,extractTaxonomiesFromObject:()=>W,extractTaxonomiesFromObjectAndMapProperty:()=>J,extractTaxonomiesFromObjectAndMapUri:()=>K,fileCropConfigSchema:()=>Cn,formatImgUrl:()=>w,getArgs:()=>y,getExtensionFromName:()=>A,getFileExtensionFromMimetype:()=>S,getFileFamily:()=>E,getFileFamilyFromName:()=>R,getFormat:()=>_,getFrom:()=>f,getMimetypeFromExtension:()=>O,getMimetypeFromName:()=>C,getSize:()=>v,getTimestamp:()=>g,getUri:()=>h,getUrl:()=>b,imageSizeSchema:()=>An,jEnsure:()=>d,jFileLittleCropSchema:()=>Rn,jFileLittleSchema:()=>Tn,jFileRenditionSchema:()=>Zn,jObjectBaseSchema:()=>wn,jObjectListSchema:()=>jn,jObjectLittleSchema:()=>kn,jUserListSchema:()=>sn,jUserLittleSchema:()=>tn,jUserValuesSchema:()=>dn,jUserViewSchema:()=>rn,mediaLibraryFilesStatsSchema:()=>zn,mediaLibraryFolderStatsSchema:()=>Vn,mediaLibraryStatsSchema:()=>Wn,mimetypeToExt:()=>j,mimetypes:()=>k,network:()=>Gn,objectTimestamp:()=>T,padStartTwoDigits:()=>m,prepareGroupForUpdate:()=>G,removeIfStartsWith:()=>p,replacePropertiesWithTypes:()=>B,resolveFileFamily:()=>N,resolveFileMimetype:()=>P,resolveFilePath:()=>F,resolveFileUrl:()=>L,rightsSchema:()=>qs,suffixIfDoesNotExist:()=>l,uploadConfigSchema:()=>Sn,userDefaultFieldsTypeSchema:()=>un,userDirectoryConfigurationSchema:()=>gn,userDownloadSchema:()=>En,userFieldSchema:()=>pn,userFieldsConfigurationTypeSchema:()=>ln,userFieldsSchema:()=>mn,userMapModelSchema:()=>on,userModelSchema:()=>vn,userSchema:()=>bn,userValuesSchema:()=>hn,userlevelSpotShema:()=>vs,validateIsFormatFileLittle:()=>Fn,validateIsFormatHookListType:()=>Bn,validateIsFormatObjectList:()=>On,validateIsFormatObjectLittle:()=>xn,validateIsFormatRights:()=>Bs,validateIsFormatUserDirectoryConfiguration:()=>yn,validateIsFormatUserLevelSpot:()=>_s,validateIsFormatUserList:()=>nn,validateIsFormatUserMapModel:()=>cn,validateIsFormatUserModel:()=>_n,validateIsFormatUserView:()=>an,widgetActiveValueSchema:()=>Hs,widgetDatePickerValueSchema:()=>Gs,widgetDateValueSchema:()=>Js,widgetDatetimeValueSchema:()=>Ks,widgetEmailValueSchema:()=>Qs,widgetNumberValueSchema:()=>Ws,widgetTextValueSchema:()=>zs,widgetTextareaValueSchema:()=>Vs,widgetUrlValueSchema:()=>Ys,widgetsValueSchema:()=>Xs});class n{constructor(e){this.jApi=e,this.network=e.network}}class r extends n{getLicenseUserStatistics(){return this.network.post({o:"licenseManager",f:"userStatistics"})}assignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"assignLicense",uri:e})}unAssignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"unassignLicense",uri:e})}getAssignmentMode(e){return this.network.post({o:"licenseManager",f:"getAssignmentMode",type:e})}setAssignmentMode(e,t){return this.network.postCSRF({o:"licenseManager",f:"setAssignmentMode",value:t,type:e})}assignPossiblesLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"assignPossiblesLicenses",type:e})}unAssignUnusedLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"unassignUnusedLicenses",type:e})}optimizeLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"optimizeLicenses",type:e})}getObjectsWithoutLicense(e,t){return this.network.post({o:"licenseManager",f:"countObjectsWithoutLicense",type:e,filter:t})}getLicensesNotAssigned(e){return this.network.post({o:"licenseManager",f:"countLicensesNotAssigned",type:e})}getLicensesAssigned(e){return this.network.post({o:"licenseManager",f:"getLicensesAssigned",type:e})}}class i extends n{getItem(e){return this.network.post({o:"adminStore",f:"getItem",uri:e})}checkoutBilling(e){return this.network.postCSRF({o:"adminStore",f:"checkoutBilling",uri:e})}checkoutFinalize(e){return this.network.postCSRF({o:"adminStore",f:"checkoutFinalize",uri:e})}}class a extends n{getApps(){return this.network.post({o:"admin",f:"apps"})}}!function(e){e.local="local",e.installed="installed",e.autosaved="autosaved",e.saved="saved"}(e||(e={}));class o extends n{list(){return this.network.post({o:"studio",f:"list"})}get(e,t){return this.network.post({o:"studio",f:"get",idApp:e,status:t})}install(e){return this.network.postCSRF({o:"studio",f:"install",value:e})}suspend(e){return this.network.postCSRF({o:"studio",f:"suspend",idApp:e})}restart(e){return this.network.postCSRF({o:"studio",f:"restart",idApp:e})}save(t,s,n){if(n===e.saved||n===e.autosaved)return this.network.postCSRF({o:"studio",f:"save",idApp:t,value:s,status:n});throw"Invalid status value"}delete(e,t){return s=this,n=void 0,i=function*(){return this.network.postCSRF({o:"studio",f:"delete",idApp:e,status:t}).then((e=>{if(0===e.error)return e.messages;throw e.messages}))},new((r=void 0)||(r=Promise))((function(e,t){function a(e){try{c(i.next(e))}catch(e){t(e)}}function o(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var s;t.done?e(t.value):(s=t.value,s instanceof r?s:new r((function(e){e(s)}))).then(a,o)}c((i=i.apply(s,n||[])).next())}));var s,n,r,i}cssClassList(){return this.network.post({o:"studio",f:"icons"})}}function c(e){const t=e;return t&&"number"==typeof t.id&&"number"==typeof t.targetId}const u={bookmarkLink:c},d={isBookmarkLink:function(e){return"targetId"in e&&!!e.targetId},isBookmarkCustom:function(e){const t=e;return void 0!==t.bookmarkLabel||void 0!==t.bookmarkMeta||void 0!==t.bookmarkUrl},isBookmarkRawList:c,isTVChannelType:function(e,t){return"tvChannelType"in e&&e.tvChannelType===t},objectIsType:function(e,t){return null!=t&&u[e](t)},isStandardApiError:e=>"object"==typeof e&&null!==e&&"error"in e&&"errorMsg"in e&&"messages"in e&&"number"==typeof e.error&&"string"==typeof e.errorMsg&&Array.isArray(e.messages),isAbortApiError:e=>null!==e&&"object"==typeof e&&"error"in e&&"aborted"in e&&-1===e.error&&!0===e.aborted};function l(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function p(e,t){return e&&e.startsWith(t)?e.split("").slice(t.length).join(""):e}function m(e){return e.toString().padStart(2,"0")}function h(e){return"uri"in e&&e.uri?e.uri:`${e.type}/${e.recordId}`}function f(e){return p(l(e.from,"/"),"/")||""}function g(e){return e.timestamp?`?_=${e.timestamp}`:""}function y(e){const t=[];return"timestamp"in e&&e.timestamp&&t.push(`_=${e.timestamp}`),"iconColor"in e&&e.iconColor&&t.push(`color=${e.iconColor}`),t.length?"?"+t.join("&"):""}function v(e,t=2){return"size"in e&&e.size?e.size:"width"in e&&e.width&&"height"in e&&e.height?`${e.width*t}x${e.height*t}`:""}function _(e){return e.format||"png"}function b(e){try{return new URL(e)}catch(e){}try{return new URL(window.location.origin+"/"+p(e,"/"))}catch(e){}}function w(e,t=2){if("url"in e&&e.url){const t=b(e.url);if(t)return"timestamp"in e&&e.timestamp&&!t.searchParams.has("_")&&t.searchParams.append("_",e.timestamp.toString()),t.toString()}return`/${f(e)}${v(e,t)}/${h(e)}.${_(e)}${y(e)}`}const k=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pdf","application/zip","application/illustrator","application/postscript","application/vnd.ms-opentype","application/x-font-ttf","application/octet-stream","audio/mp3","audio/mpeg","font/ttf","font/otf","image/jpeg","image/jpg","image/png","image/gif","image/vnd.adobe.photoshop","image/svg+xml","text/plain","text/csv","video/mp4","video/webm"],x=["docx","xlsx","csv","pptx","pdf","zip","ai","mp3","mpeg","ttf","otf","jpg","jpeg","png","gif","psd","svg","txt","mp4","odt","webm"],j={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.oasis.opendocument.text":"odt","application/pdf":"pdf","application/zip":"zip","application/x-zip-compressed":"zip","application/illustrator":"ai","application/postscript":"ai","audio/mp3":"mp3","audio/mpeg":"mpeg","font/ttf":"ttf","font/otf":"otf","image/jpeg":"jpeg","image/jpg":"jpg","image/png":"png","image/gif":"gif","application/x-font-ttf":"ttf","application/vnd.ms-opentype":"otf","image/vnd.adobe.photoshop":"psd","image/svg+xml":"svg","text/plain":"txt","text/csv":"xlsx","video/mp4":"mp4","video/webm":"mp4"},O=e=>Object.keys(j).find((t=>j[t]===e)),S=e=>{var t;return null!==(t=j[e])&&void 0!==t?t:void 0};function A(e){const t=String(e).split(".").pop();return x.find((e=>e===t))}const C=e=>{var t;const s=A(e);return null!==(t=O(s))&&void 0!==t?t:"application/octet-stream"},T=e=>e?(new Date(e).getTime()/1e3).toFixed(0):void 0,F=(e,t="fitx80")=>{const s=N(e),n=T(e.dateModified);switch(s){default:return;case"video":return`/media/${e.id}.mp4?stream=true`+(n?`&_=${n}`:"");case"audio":return`/media/${e.id}.mp3`+(n?`?_=${n}`:"");case"gif":return w({timestamp:n,size:t,from:"imagecache",uri:e.uri,format:"gif"});case"image":return w({timestamp:n,size:t,from:"imagecache",uri:e.uri})}},R=e=>{const t=A(e);return void 0!==t?E(O(t)):"application"},Z=e=>-1!==["image/vnd","image/svg","image/heic"].findIndex((t=>e.startsWith(t)));function E(e){return e&&e.startsWith("folder/")?"folder":null==e||Z(e)?"application":e.startsWith("image/gif")?"gif":e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e.startsWith("font/")||e.startsWith("application/x-font-ttf")||e.startsWith("application/vnd.ms-opentype")?"font":e.startsWith("text/")?"text":"application"}const L=(e,t,s="rr")=>"ng"===s?`/ng/file/${e}/${t}`:`/ng/rr/file/${e}/${t}`,P=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?C(e.title):e.mimetype,N=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?R(e.title):E(e.mimetype);var I=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class M{constructor(e,t="api-front"){this.window=e,this.action=t}static _formatPostOptions(e){const t=e?{body:JSON.stringify(e)}:void 0;return Object.assign({method:"POST",credentials:"same-origin"},t)}getUrl(e,t){return I(this,void 0,void 0,(function*(){const s=yield this.window.getBackendUrl();let n;try{n=new URL(`/${this.action}/${e}/${t}`,s).href}catch(r){n=`${s}/${this.action}/${e}/${t}`}return n}))}getHostname(){return I(this,void 0,void 0,(function*(){const e=(yield this.window.getBackendUrl()).split("//");return e.length>1?e[1]:e[0]}))}fetch(e,t){var{o:s,f:n}=e,r=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["o","f"]);return I(this,void 0,void 0,(function*(){void 0===t&&(t=null);const e=yield this.getUrl(s,n);return this.window.fetch(e,Object.assign(Object.assign({},M._formatPostOptions(r)),{signal:t}))}))}post(e,t){return this.fetch(e,t).then((e=>e.json())).then((e=>{if(0===e.error)return e;throw{error:e.error,errorMsg:e.errorMsg,messages:e.messages}})).catch((e=>{if(t&&t.aborted)throw{error:-1,aborted:!0};throw e}))}postFile(e){return I(this,void 0,void 0,(function*(){const t=yield this.getUrl("file","create");if(e.append("format","raw-little"),!e.has("token")){const{result:t}=yield this.token();e.append("token",t)}const s=e.get("token");return s&&"string"==typeof s?this.window.fetch(t,{method:"POST",credentials:"same-origin",body:e}).then((e=>e.json())).then((e=>({response:e,token:s}))):Promise.reject("Missing token")}))}postCSRF(e){return this.tokenCSRF().then((t=>this.post(Object.assign(e,{tokenCSRF:t.result}))))}postToken(e){return this.token().then((t=>this.post(Object.assign(e,{token:t.result}))))}maybePostToken(e){return"token"in e&&e.token?this.post(e):this.postToken(e)}token(){return this.post({o:"misc",f:"token"})}tokenCSRF(){return this.post({o:"misc",f:"tokenCSRF"})}}const U=Array.isArray,D=Object.keys,$=Object.prototype.hasOwnProperty;function q(e,t,s){const n=null==s?void 0:s.map((e=>e.split(".")));if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const r=U(e),i=U(t);let a,o,c;if(r&&i){if(o=e.length,o!==t.length)return!1;for(a=o;0!=a--;)if(!q(e[a],t[a],s))return!1;return!0}if(r!==i)return!1;const u=e instanceof Date,d=t instanceof Date;if(u!==d)return!1;if(u&&d)return e.getTime()===t.getTime();const l=e instanceof RegExp,p=t instanceof RegExp;if(l!==p)return!1;if(l&&p)return e.toString()===t.toString();const m=D(e).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e)))));if(o=m.length,o!==D(t).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e))))).length)return!1;for(a=o;0!=a--;)if(!$.call(t,m[a]))return!1;for(a=o;0!=a--;)if(c=m[a],!("_owner"===c&&e.$$typeof||q(e[c],t[c],null==n?void 0:n.filter((e=>e.length>1&&e[0]===c)).map((e=>e.splice(1).join("."))))))return!1;return!0}return e!=e&&t!=t}function B(e,t){if(Array.isArray(e))return e.map((e=>B(e,t)));if("object"==typeof e&&null!==e){let s={};return Object.keys(e).forEach((n=>{s=Object.assign(Object.assign({},s),{[n]:n&&t.includes(n)?typeof e[n]:B(e[n],t)})})),s}return e}const z=(e,t)=>Array.isArray(t)&&t.length?e+","+t.join(","):e;function V(e){return e.startsWith("tag_")||"tags"===e}function W(e){return Object.fromEntries(Object.entries(e).filter((([e])=>V(e))))}function J(e,t,s){return Object.fromEntries(Object.entries(e).filter((([e])=>V(e))).map((([e,n])=>{const r=Array.isArray(n)?n.map((e=>"object"==typeof e&&e&&t in e?e[t]:e)):n;return[e,s?s(r):r]})))}function K(e){return J(e,"uri")}const G=e=>{var t;let s={};"_errors"in e&&(s._errors=e._errors),"_options"in e&&(s._options=e._options),"title"in e&&(s.title=e.title),"description"in e&&(s.description=e.description),"activity"in e&&(s.activity=e.activity),"image"in e&&(s.image=e.image),"uri"in e&&(s.uri=e.uri),"type"in e&&(s.type=e.type),"edito"in e&&(s.edito=e.edito),"category"in e&&(s.category=e.category.toString()),"commentLevel"in e&&(s.commentLevel=e.commentLevel),"_options"in e&&(null===(t=e._options)||void 0===t?void 0:t.custom_widgets)&&(s.custom_widgets=Array.isArray(e._options.custom_widgets)?{}:e._options.custom_widgets),"displayType"in e&&(s.displayType=e.displayType),"language"in e&&(s.language=e.language),"edit_access"in e&&(s.edit_access=e.edit_access),"lock_mail"in e&&(s.lock_mail=e.lock_mail),"fileSyncEnabled"in e&&(s.fileSyncEnabled=e.fileSyncEnabled),"fileSyncVersioningType"in e&&(s.fileSyncVersioningType=e.fileSyncVersioningType),"fileBankQuota"in e&&(s.fileBankQuota=e.fileBankQuota),"idCommunity"in e&&(s.idCommunity=e.idCommunity),"lastRssExecution"in e&&(s.lastRssExecution=e.lastRssExecution),"mail_comment"in e&&(s.mail_comment=e.mail_comment),"mail_frequency"in e&&(s.mail_frequency=e.mail_frequency),"mail_spotit"in e&&(s.mail_spotit=e.mail_spotit),"mail_subscriber"in e&&(s.mail_subscriber=e.mail_subscriber),"notifyFolder"in e&&(s.notifyFolder=e.notifyFolder),"nounsubscribe"in e&&(s.nounsubscribe=e.nounsubscribe),"privacy"in e&&(s.privacy=e.privacy),"publishFolder"in e&&(s.publishFolder=e.publishFolder),"rss_access"in e&&(s.rss_access=e.rss_access),"rss_feed"in e&&(s.rss_feed=e.rss_feed&&Array.isArray(e.rss_feed)?JSON.stringify(e.rss_feed.map((e=>{var{_user:t}=e,s=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["_user"]);return Object.assign(Object.assign({},s),{idUser:null==t?void 0:t.id})}))):"[]"),"rss_key"in e&&(s.rss_key=e.rss_key),"spot_right_user"in e&&(s.spot_right_user=e.spot_right_user),"spotBanner"in e&&(s.spotBanner=e.spotBanner),"spotDefaultPublishType"in e&&(s.spotDefaultPublishType=e.spotDefaultPublishType),"user_level_signup"in e&&(s.user_level_signup=e.user_level_signup),"useTeaser"in e&&(s.useTeaser=e.useTeaser),"widgets"in e&&(s.widgets=e.widgets);const n=W(e);if(s=Object.assign(Object.assign({},s),n),H(e,s))return s;throw new Error},H=(e,t)=>{const s=["id","mainType","dateCreation","dateModified","_url","o2apLinksSources"],n=["custom_widgets"],r=Object.keys(e),i=Object.keys(t),a=r.filter((e=>!i.includes(e)&&!s.includes(e))),o=i.filter((e=>!r.includes(e)&&!n.includes(e))),c=[...a.map((e=>"- "+e)),...o.map((e=>"+ "+e))];if(a.length>0||o.length>0)throw new Error(`prepareGroupForUpdate :: Wrong group mapping | Diff : ${JSON.stringify(c)}`);return!0};class Q extends n{list(e){var t,s;return this.network.post(Object.assign(Object.assign({o:"objectList",f:"jamespotArticleQueryList"},e),{format:z(null!==(t=e.format)&&void 0!==t?t:"raw-list",null!==(s=e.formatExtend)&&void 0!==s?s:[])}))}get(e,t){var s,n;return this.network.post(Object.assign(Object.assign({o:"article",f:"get"},e),{format:z(null!==(s=e.format)&&void 0!==s?s:"raw-view",null!==(n=e.formatExtend)&&void 0!==n?n:[])}),t)}create(e,t){return this.network.maybePostToken(Object.assign({o:"article",f:"create",format:null!=t?t:"raw-list"},e))}update(e){return this.network.post(Object.assign(Object.assign({format:"raw-list"},e),{o:"article",f:"update"}))}delete(e){return this.network.postCSRF({o:"article",f:"delete",idArticle:e})}count(e){return this.network.post({o:"article",f:"count",type:e})}getAttachments(e,t,s){return this.network.post({o:"article",f:"getAttachment",idArticle:e,type:t,format:s})}permalink(e){return this.network.post({o:"article",f:"permalink",permalinkId:e})}saveAsDraft(e,t,s){return this.network.post({o:"article",f:"saveAsDraft",form:e,contentType:t,idDraft:s})}getComments(e,t){var s,n;return this.network.post(Object.assign(Object.assign({o:"article",f:"getComments"},e),{attachments:null!==(s=e.attachment)&&void 0!==s&&s,limits:null!==(n=e.limits)&&void 0!==n?n:{start:0,max:1e4},format:null!=t?t:"raw-little"}))}addComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"addComment"},e),{alertAuthor:Number(e.alertAuthor),sendAlert:Number(e.sendAlert),type:"comment",format:null!=t?t:"raw-little"}))}updateComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"updateComment"},e),{format:null!=t?t:"raw-little"}))}deleteComment(e){return this.network.postCSRF({o:"comment",f:"delete",idComment:e})}getRead(e){return this.network.post({o:"article",f:"getRead",uri:e})}}var Y=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s};class X extends n{configuration(){return this.network.post({o:"assetReservation",f:"configuration"})}createReservation(e){return this.network.postCSRF(Object.assign({o:"assetReservation",f:"createReservation",format:"raw-list"},e))}getReservations(e){var{format:t="raw-list"}=e,s=Y(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"getReservations",format:t},s))}cancelReservation(e){return this.network.post({o:"assetReservation",f:"cancelReservation",format:"raw-list",idArticle:e})}bookByDate(e){var{format:t="raw-list"}=e,s=Y(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"BookByDate",format:t},s))}getList(e){var{format:t="raw-list"}=e,s=Y(e,["format"]);return this.network.post(Object.assign({o:"objectList",f:"assetReservationList",format:t},s))}}class ee extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"audience",q:e}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}}class te extends n{getFormattedList(e,t){return this.network.post(Object.assign({o:"objectList",f:"bookmarksList",format:t},e))}addFormattedLink(e,t,s){const n=null!=s?s:"list";return this.network.post({o:"custom",f:"actionAdd",type:"bookmarkLink",targetId:e,targetType:t,format:n})}addBookmark(e,t){return this.network.postCSRF(Object.assign({o:"bookmarks",f:"add"},e))}delete(e){return this.network.postCSRF({o:"bookmarks",f:"delete",bookmarkID:e})}rename(e,t,s){return this.network.postCSRF({o:"bookmarks",f:"rename",bookmarkID:e,bookmarkLabel:t,bookmarkUrl:s})}move(e,t,s){return this.network.postCSRF({o:"bookmarks",f:"move",bookmarkID:e,bookmarkReference:t,bookmarkPosition:s})}}class se extends n{getInfos(e,t){return this.network.post({o:"BusinessNetworking",f:"MarkerInfo",id:e,format:null!=t?t:"raw-little"})}}class ne extends n{get(e,t){return this.network.post({o:"community",f:"getCommunity",idCommunity:e,format:t||"raw-little"})}sendRequest(e,t){return this.network.post({o:"community",f:"sendRequest",message:e,idUserTo:t})}autocomplete(e){return this.network.post({o:"autocomplete",f:"community",q:e}).then((e=>e.result))}}class re extends n{create(e,t,s,n,r){return this.network.post({o:"article",f:"create",type:e,token:t,title:s,dateStart:n,publishTo:r})}getList(e="",t=[],s=[],n=1,r="raw-list"){return this.network.post({o:"objectList",f:"diapazoneQueryList",query:e,filters:t,orders:s,page:n,format:r})}}var ie=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class ae extends n{upload(e){const t=new FormData;return t.append("attrName",e.attrName),e.file?t.append(e.attrName,e.file):e.url&&t.append("url",e.url),t.append("token",e.token),this.network.postFile(t)}uploadMany(e){return ie(this,void 0,void 0,(function*(){return Promise.all(e.map((e=>this.upload(e))))}))}get(e,t){return ie(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"get",idFile:e,format:t})}))}getParent(e,t){return ie(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getParent",idFile:e,format:t})}))}getWithHash(e,t,s){return ie(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getWithHash",idFile:e,hash:t,format:s})}))}duplicate(e,t,s){return ie(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"duplicateFile",idFile:e,title:t,publishTo:s})}))}updateFile(e,t){return ie(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"updateFile",idFile:e,title:t})}))}update(e,t,s){return ie(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"update",idFile:e,type:t,cropDatas:Object.assign(Object.assign({},s),{rotateBeforeCrop:!0}),killSize:s.killSize,format:"raw-little"})}))}deleteFile(e,t,s,n){return ie(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"delete",idFile:e,attrName:t,token:s},n)}))}deleteImage(e,t){return ie(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"deleteImage",id:e,type:t})}))}getDownload(e){return this.network.post({o:"file",f:"getDownload",id:e})}generatePreview(e){return this.network.post({o:"file",f:"generatePreview",id:e})}}class oe extends n{getCategoriesList(e,t){return this.network.post({o:"objectList",f:"faqQueryList",format:null!=e?e:"raw-list",orders:null!=t?t:[{name:"dateCreation",sort:"ASC"}]})}createCategory(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{type:"faq"}),null!=t?t:"raw-view")}updateCategory(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faq",format:null!=t?t:"raw-view"}))}getCategory(e,t){return this.jApi.article.get({idArticle:e,format:null!=t?t:"raw-view"})}deleteCategory(e){return this.jApi.article.delete(e)}checkItem(e,t,s){return this.network.post({o:"faq",f:"checkItem",query:e,page:null!=t?t:1,format:null!=s?s:"raw-list"})}getTaxonomy(){return this.network.post({o:"faq",f:"getFaqTaxonomy"})}getHookProperties(e){return this.network.post({o:"faq",f:"getHookProperties",properties:null!=e?e:["_web"]})}getAccess(){return this.network.post({o:"faq",f:"access"})}createTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-theme"},e),{format:null!=t?t:"raw-view"}))}deleteTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"delete-theme"},e),{format:null!=t?t:"raw-view"}))}updateTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"set-theme"},e),{format:null!=t?t:"raw-view"}))}getEntry(e,t){return this.network.post({o:"faq",f:"get-entry",uri:e,format:null!=t?t:"raw-view"})}deleteEntry(e){return this.jApi.article.delete(e)}createEntry(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{idSpot:["content"],type:"faqItem"}),null!=t?t:"raw-view")}addEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-entry"},e),{format:null!=t?t:"raw-view"}))}updateEntry(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faqItem",format:null!=t?t:"raw-view"}))}moveEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-entry"},e),{format:null!=t?t:"raw-view"}))}moveTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-theme"},e),{format:null!=t?t:"raw-view"}))}}class ce extends n{getBanks(e="list"){return this.network.post({o:"fileBank",f:"getBanks",format:e}).then((e=>e.result))}getFolders(e){return this.network.post({o:"fileBank",f:"getFolders",parentURI:e})}getDocuments(e){return this.network.post({o:"fileBank",f:"getDocuments",parentURI:e})}}class ue extends n{countAction(e,t){return this.network.post({o:"activityLog",f:"log",count:!0,verb:e,uri:t})}useWebVersion(){return this.network.post({o:"global",f:"useWebVersion"})}}var de,le;class pe extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"spot",q:e,idToUri:!1}).then((e=>e.result))}create(e,t){return this.network.post(Object.assign(Object.assign({o:"spot",f:"create"},e),{format:t}))}update(e,t){const{spotBanner:s}=e,n=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s}(e,["spotBanner"]);return this.network.postCSRF(Object.assign(Object.assign({o:"spot",f:"update"},n),{format:t}))}getSpot(e,t){return this.network.post({o:"spot",f:"getSpot",idSpot:e,format:t})}getProperties(e){return this.network.post({o:"spot",f:"getProperties",idSpot:e})}getApplications(){return this.network.post({o:"spot",f:"get-available-widget"})}getCategories(){return this.network.post({o:"spot",f:"get-categories"})}getObjectListJamespotSpotMembers(e,t,s,n=1){return this.network.post({o:"objectListJamespot",f:"SpotMembers",idSpot:e,limit:s,page:n,format:"raw-little",query:t})}list(e){return this.network.post(Object.assign({o:"objectList",f:"jamespotSpotQueryList"},e))}resetNotifications(e){return this.network.post(Object.assign({o:"spot",f:"resetNotifications"},e))}getUserLevelAndRight(e){return this.network.post({o:"spot",f:"getUserLevelAndRight",idSpot:e})}groupRequest(e){return this.network.postCSRF({o:"spot",f:"request",idSpot:e})}groupAddToFavorite(e){return this.network.postCSRF({o:"spot",f:"addToFavorite",idSpot:e})}}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const s of e)t[s]=s;return t},e.getValidEnumValues=t=>{const s=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of s)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return t},e.find=(e,t)=>{for(const s of e)if(t(s))return s},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(de||(de={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(le||(le={}));const me=de.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),he=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return isNaN(e)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(e)?me.array:null===e?me.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?me.promise:"undefined"!=typeof Map&&e instanceof Map?me.map:"undefined"!=typeof Set&&e instanceof Set?me.set:"undefined"!=typeof Date&&e instanceof Date?me.date:me.object;default:return me.unknown}},fe=de.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ge extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},s={_errors:[]},n=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(n);else if("invalid_return_type"===r.code)n(r.returnTypeError);else if("invalid_arguments"===r.code)n(r.argumentsError);else if(0===r.path.length)s._errors.push(t(r));else{let e=s,n=0;for(;n<r.path.length;){const s=r.path[n];n===r.path.length-1?(e[s]=e[s]||{_errors:[]},e[s]._errors.push(t(r))):e[s]=e[s]||{_errors:[]},e=e[s],n++}}};return n(this),s}toString(){return this.message}get message(){return JSON.stringify(this.issues,de.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}ge.create=e=>new ge(e);const ye=(e,t)=>{let s;switch(e.code){case fe.invalid_type:s=e.received===me.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,de.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:s=`Unrecognized key(s) in object: ${de.joinValues(e.keys,", ")}`;break;case fe.invalid_union:s="Invalid input";break;case fe.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${de.joinValues(e.options)}`;break;case fe.invalid_enum_value:s=`Invalid enum value. Expected ${de.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:s="Invalid function arguments";break;case fe.invalid_return_type:s="Invalid function return type";break;case fe.invalid_date:s="Invalid date";break;case fe.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:de.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case fe.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case fe.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case fe.custom:s="Invalid input";break;case fe.invalid_intersection_types:s="Intersection results could not be merged";break;case fe.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:s="Number must be finite";break;default:s=t.defaultError,de.assertNever(e)}return{message:s}};let ve=ye;function _e(){return ve}const be=e=>{const{data:t,path:s,errorMaps:n,issueData:r}=e,i=[...s,...r.path||[]],a={...r,path:i};let o="";const c=n.filter((e=>!!e)).slice().reverse();for(const e of c)o=e(a,{data:t,defaultError:o}).message;return{...r,path:i,message:r.message||o}};function we(e,t){const s=be({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,_e(),ye].filter((e=>!!e))});e.common.issues.push(s)}class ke{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if("aborted"===n.status)return xe;"dirty"===n.status&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const e of t)s.push({key:await e.key,value:await e.value});return ke.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:t,value:r}=n;if("aborted"===t.status)return xe;if("aborted"===r.status)return xe;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!n.alwaysSet||(s[t.value]=r.value)}return{status:e.value,value:s}}}const xe=Object.freeze({status:"aborted"}),je=e=>({status:"dirty",value:e}),Oe=e=>({status:"valid",value:e}),Se=e=>"aborted"===e.status,Ae=e=>"dirty"===e.status,Ce=e=>"valid"===e.status,Te=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Fe;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Fe||(Fe={}));class Re{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ze=(e,t)=>{if(Ce(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ge(e.common.issues);return this._error=t,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:s,required_error:n,description:r}=e;if(t&&(s||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=s?s:t.defaultError},description:r}}class Le{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return he(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:he(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ke,ctx:{common:e.parent.common,data:e.data,parsedType:he(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Te(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:null!==(s=null==t?void 0:t.async)&&void 0!==s&&s,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:he(e)},r=this._parseSync({data:e,path:n.path,parent:n});return Ze(n,r)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:he(e)},n=this._parse({data:e,path:s.path,parent:s}),r=await(Te(n)?n:Promise.resolve(n));return Ze(s,r)}refine(e,t){const s=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const r=e(t),i=()=>n.addIssue({code:fe.custom,...s(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(i(),!1))):!!r||(i(),!1)}))}refinement(e,t){return this._refinement(((s,n)=>!!e(s)||(n.addIssue("function"==typeof t?t(s,n):t),!1)))}_refinement(e){return new wt({schema:this,typeName:Et.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return kt.create(this,this._def)}nullable(){return xt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return st.create(this,this._def)}promise(){return bt.create(this,this._def)}or(e){return it.create([this,e],this._def)}and(e){return ut.create(this,e,this._def)}transform(e){return new wt({...Ee(this._def),schema:this,typeName:Et.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new jt({...Ee(this._def),innerType:this,defaultValue:t,typeName:Et.ZodDefault})}brand(){return new Ct({typeName:Et.ZodBranded,type:this,...Ee(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ot({...Ee(this._def),innerType:this,catchValue:t,typeName:Et.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Tt.create(this,e)}readonly(){return Ft.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pe=/^c[^\s-]{8,}$/i,Ne=/^[a-z][a-z0-9]*$/,Ie=/^[0-9A-HJKMNP-TV-Z]{26}$/,Me=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ue=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let De;const $e=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,qe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class Be extends Le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==me.string){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.string,received:t.parsedType}),xe}const t=new ke;let s;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),we(s,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),we(s,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const n=e.data.length>a.value,r=e.data.length<a.value;(n||r)&&(s=this._getOrReturnCtx(e,s),n?we(s,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&we(s,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)Ue.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"email",code:fe.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)De||(De=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),De.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"emoji",code:fe.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)Me.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"uuid",code:fe.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)Pe.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"cuid",code:fe.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)Ne.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"cuid2",code:fe.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)Ie.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"ulid",code:fe.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(n){s=this._getOrReturnCtx(e,s),we(s,{validation:"url",code:fe.invalid_string,message:a.message}),t.dirty()}else"regex"===a.kind?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{validation:"regex",code:fe.invalid_string,message:a.message}),t.dirty())):"trim"===a.kind?e.data=e.data.trim():"includes"===a.kind?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),we(s,{code:fe.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty()):"toLowerCase"===a.kind?e.data=e.data.toLowerCase():"toUpperCase"===a.kind?e.data=e.data.toUpperCase():"startsWith"===a.kind?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),we(s,{code:fe.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty()):"endsWith"===a.kind?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),we(s,{code:fe.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty()):"datetime"===a.kind?((i=a).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(s=this._getOrReturnCtx(e,s),we(s,{code:fe.invalid_string,validation:"datetime",message:a.message}),t.dirty()):"ip"===a.kind?(n=e.data,("v4"!==(r=a.version)&&r||!$e.test(n))&&("v6"!==r&&r||!qe.test(n))&&(s=this._getOrReturnCtx(e,s),we(s,{validation:"ip",code:fe.invalid_string,message:a.message}),t.dirty())):de.assertNever(a);var n,r,i;return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement((t=>e.test(t)),{validation:t,code:fe.invalid_string,...Fe.errToObj(s)})}_addCheck(e){return new Be({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Fe.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...Fe.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Fe.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Fe.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Fe.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Fe.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Fe.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Fe.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Fe.errToObj(t)})}nonempty(e){return this.min(1,Fe.errToObj(e))}trim(){return new Be({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Be({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Be({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ze(e,t){const s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=s>n?s:n;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}Be.create=e=>{var t;return new Be({checks:[],typeName:Et.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Ee(e)})};class Ve extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==me.number){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.number,received:t.parsedType}),xe}let t;const s=new ke;for(const n of this._def.checks)"int"===n.kind?de.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),we(t,{code:fe.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),we(t,{code:fe.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),we(t,{code:fe.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):"multipleOf"===n.kind?0!==ze(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),we(t,{code:fe.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),we(t,{code:fe.not_finite,message:n.message}),s.dirty()):de.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Fe.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Fe.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Fe.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Fe.toString(t))}setLimit(e,t,s,n){return new Ve({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:Fe.toString(n)}]})}_addCheck(e){return new Ve({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Fe.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Fe.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Fe.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&de.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Ve.create=e=>new Ve({checks:[],typeName:Et.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Ee(e)});class We extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==me.bigint){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.bigint,received:t.parsedType}),xe}let t;const s=new ke;for(const n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),we(t,{code:fe.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),we(t,{code:fe.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),we(t,{code:fe.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):de.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Fe.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Fe.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Fe.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Fe.toString(t))}setLimit(e,t,s,n){return new We({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:Fe.toString(n)}]})}_addCheck(e){return new We({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Fe.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Fe.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}We.create=e=>{var t;return new We({checks:[],typeName:Et.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Ee(e)})};class Je extends Le{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==me.boolean){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.boolean,received:t.parsedType}),xe}return Oe(e.data)}}Je.create=e=>new Je({typeName:Et.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Ee(e)});class Ke extends Le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==me.date){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.date,received:t.parsedType}),xe}if(isNaN(e.data.getTime()))return we(this._getOrReturnCtx(e),{code:fe.invalid_date}),xe;const t=new ke;let s;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),we(s,{code:fe.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),we(s,{code:fe.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):de.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ke({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Fe.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Fe.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Ke.create=e=>new Ke({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Et.ZodDate,...Ee(e)});class Ge extends Le{_parse(e){if(this._getType(e)!==me.symbol){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.symbol,received:t.parsedType}),xe}return Oe(e.data)}}Ge.create=e=>new Ge({typeName:Et.ZodSymbol,...Ee(e)});class He extends Le{_parse(e){if(this._getType(e)!==me.undefined){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.undefined,received:t.parsedType}),xe}return Oe(e.data)}}He.create=e=>new He({typeName:Et.ZodUndefined,...Ee(e)});class Qe extends Le{_parse(e){if(this._getType(e)!==me.null){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.null,received:t.parsedType}),xe}return Oe(e.data)}}Qe.create=e=>new Qe({typeName:Et.ZodNull,...Ee(e)});class Ye extends Le{constructor(){super(...arguments),this._any=!0}_parse(e){return Oe(e.data)}}Ye.create=e=>new Ye({typeName:Et.ZodAny,...Ee(e)});class Xe extends Le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Oe(e.data)}}Xe.create=e=>new Xe({typeName:Et.ZodUnknown,...Ee(e)});class et extends Le{_parse(e){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.never,received:t.parsedType}),xe}}et.create=e=>new et({typeName:Et.ZodNever,...Ee(e)});class tt extends Le{_parse(e){if(this._getType(e)!==me.undefined){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.void,received:t.parsedType}),xe}return Oe(e.data)}}tt.create=e=>new tt({typeName:Et.ZodVoid,...Ee(e)});class st extends Le{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==me.array)return we(t,{code:fe.invalid_type,expected:me.array,received:t.parsedType}),xe;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,r=t.data.length<n.exactLength.value;(e||r)&&(we(t,{code:e?fe.too_big:fe.too_small,minimum:r?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(we(t,{code:fe.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(we(t,{code:fe.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map(((e,s)=>n.type._parseAsync(new Re(t,e,t.path,s))))).then((e=>ke.mergeArray(s,e)));const r=[...t.data].map(((e,s)=>n.type._parseSync(new Re(t,e,t.path,s))));return ke.mergeArray(s,r)}get element(){return this._def.type}min(e,t){return new st({...this._def,minLength:{value:e,message:Fe.toString(t)}})}max(e,t){return new st({...this._def,maxLength:{value:e,message:Fe.toString(t)}})}length(e,t){return new st({...this._def,exactLength:{value:e,message:Fe.toString(t)}})}nonempty(e){return this.min(1,e)}}function nt(e){if(e instanceof rt){const t={};for(const s in e.shape){const n=e.shape[s];t[s]=kt.create(nt(n))}return new rt({...e._def,shape:()=>t})}return e instanceof st?new st({...e._def,type:nt(e.element)}):e instanceof kt?kt.create(nt(e.unwrap())):e instanceof xt?xt.create(nt(e.unwrap())):e instanceof dt?dt.create(e.items.map((e=>nt(e)))):e}st.create=(e,t)=>new st({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Et.ZodArray,...Ee(t)});class rt extends Le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=de.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==me.object){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.object,received:t.parsedType}),xe}const{status:t,ctx:s}=this._processInputParams(e),{shape:n,keys:r}=this._getCached(),i=[];if(!(this._def.catchall instanceof et&&"strip"===this._def.unknownKeys))for(const e in s.data)r.includes(e)||i.push(e);const a=[];for(const e of r){const t=n[e],r=s.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new Re(s,r,s.path,e)),alwaysSet:e in s.data})}if(this._def.catchall instanceof et){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)a.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)i.length>0&&(we(s,{code:fe.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=s.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new Re(s,n,s.path,t)),alwaysSet:t in s.data})}}return s.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const s=await t.key;e.push({key:s,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>ke.mergeObjectSync(t,e))):ke.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return Fe.errToObj,new rt({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,s)=>{var n,r,i,a;const o=null!==(i=null===(r=(n=this._def).errorMap)||void 0===r?void 0:r.call(n,t,s).message)&&void 0!==i?i:s.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=Fe.errToObj(e).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(e){return new rt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Et.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new rt({...this._def,catchall:e})}pick(e){const t={};return de.objectKeys(e).forEach((s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])})),new rt({...this._def,shape:()=>t})}omit(e){const t={};return de.objectKeys(this.shape).forEach((s=>{e[s]||(t[s]=this.shape[s])})),new rt({...this._def,shape:()=>t})}deepPartial(){return nt(this)}partial(e){const t={};return de.objectKeys(this.shape).forEach((s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()})),new rt({...this._def,shape:()=>t})}required(e){const t={};return de.objectKeys(this.shape).forEach((s=>{if(e&&!e[s])t[s]=this.shape[s];else{let e=this.shape[s];for(;e instanceof kt;)e=e._def.innerType;t[s]=e}})),new rt({...this._def,shape:()=>t})}keyof(){return yt(de.objectKeys(this.shape))}}rt.create=(e,t)=>new rt({shape:()=>e,unknownKeys:"strip",catchall:et.create(),typeName:Et.ZodObject,...Ee(t)}),rt.strictCreate=(e,t)=>new rt({shape:()=>e,unknownKeys:"strict",catchall:et.create(),typeName:Et.ZodObject,...Ee(t)}),rt.lazycreate=(e,t)=>new rt({shape:e,unknownKeys:"strip",catchall:et.create(),typeName:Et.ZodObject,...Ee(t)});class it extends Le{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;if(t.common.async)return Promise.all(s.map((async e=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.common.issues.push(...s.ctx.common.issues),s.result;const s=e.map((e=>new ge(e.ctx.common.issues)));return we(t,{code:fe.invalid_union,unionErrors:s}),xe}));{let e;const n=[];for(const r of s){const s={...t,common:{...t.common,issues:[]},parent:null},i=r._parseSync({data:t.data,path:t.path,parent:s});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:s}),s.common.issues.length&&n.push(s.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=n.map((e=>new ge(e)));return we(t,{code:fe.invalid_union,unionErrors:r}),xe}}get options(){return this._def.options}}it.create=(e,t)=>new it({options:e,typeName:Et.ZodUnion,...Ee(t)});const at=e=>e instanceof ft?at(e.schema):e instanceof wt?at(e.innerType()):e instanceof gt?[e.value]:e instanceof vt?e.options:e instanceof _t?Object.keys(e.enum):e instanceof jt?at(e._def.innerType):e instanceof He?[void 0]:e instanceof Qe?[null]:null;class ot extends Le{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==me.object)return we(t,{code:fe.invalid_type,expected:me.object,received:t.parsedType}),xe;const s=this.discriminator,n=t.data[s],r=this.optionsMap.get(n);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(we(t,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const s of t){const t=at(s.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,s)}}return new ot({typeName:Et.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...Ee(s)})}}function ct(e,t){const s=he(e),n=he(t);if(e===t)return{valid:!0,data:e};if(s===me.object&&n===me.object){const s=de.objectKeys(t),n=de.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...t};for(const s of n){const n=ct(e[s],t[s]);if(!n.valid)return{valid:!1};r[s]=n.data}return{valid:!0,data:r}}if(s===me.array&&n===me.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let n=0;n<e.length;n++){const r=ct(e[n],t[n]);if(!r.valid)return{valid:!1};s.push(r.data)}return{valid:!0,data:s}}return s===me.date&&n===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ut extends Le{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(e,n)=>{if(Se(e)||Se(n))return xe;const r=ct(e.value,n.value);return r.valid?((Ae(e)||Ae(n))&&t.dirty(),{status:t.value,value:r.data}):(we(s,{code:fe.invalid_intersection_types}),xe)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ut.create=(e,t,s)=>new ut({left:e,right:t,typeName:Et.ZodIntersection,...Ee(s)});class dt extends Le{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==me.array)return we(s,{code:fe.invalid_type,expected:me.array,received:s.parsedType}),xe;if(s.data.length<this._def.items.length)return we(s,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&s.data.length>this._def.items.length&&(we(s,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new Re(s,e,s.path,t)):null})).filter((e=>!!e));return s.common.async?Promise.all(n).then((e=>ke.mergeArray(t,e))):ke.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new dt({...this._def,rest:e})}}dt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new dt({items:e,typeName:Et.ZodTuple,rest:null,...Ee(t)})};class lt extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==me.object)return we(s,{code:fe.invalid_type,expected:me.object,received:s.parsedType}),xe;const n=[],r=this._def.keyType,i=this._def.valueType;for(const e in s.data)n.push({key:r._parse(new Re(s,e,s.path,e)),value:i._parse(new Re(s,s.data[e],s.path,e))});return s.common.async?ke.mergeObjectAsync(t,n):ke.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return new lt(t instanceof Le?{keyType:e,valueType:t,typeName:Et.ZodRecord,...Ee(s)}:{keyType:Be.create(),valueType:e,typeName:Et.ZodRecord,...Ee(t)})}}class pt extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==me.map)return we(s,{code:fe.invalid_type,expected:me.map,received:s.parsedType}),xe;const n=this._def.keyType,r=this._def.valueType,i=[...s.data.entries()].map((([e,t],i)=>({key:n._parse(new Re(s,e,s.path,[i,"key"])),value:r._parse(new Re(s,t,s.path,[i,"value"]))})));if(s.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const s of i){const n=await s.key,r=await s.value;if("aborted"===n.status||"aborted"===r.status)return xe;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const s of i){const n=s.key,r=s.value;if("aborted"===n.status||"aborted"===r.status)return xe;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}}}pt.create=(e,t,s)=>new pt({valueType:t,keyType:e,typeName:Et.ZodMap,...Ee(s)});class mt extends Le{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==me.set)return we(s,{code:fe.invalid_type,expected:me.set,received:s.parsedType}),xe;const n=this._def;null!==n.minSize&&s.data.size<n.minSize.value&&(we(s,{code:fe.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&s.data.size>n.maxSize.value&&(we(s,{code:fe.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const r=this._def.valueType;function i(e){const s=new Set;for(const n of e){if("aborted"===n.status)return xe;"dirty"===n.status&&t.dirty(),s.add(n.value)}return{status:t.value,value:s}}const a=[...s.data.values()].map(((e,t)=>r._parse(new Re(s,e,s.path,t))));return s.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new mt({...this._def,minSize:{value:e,message:Fe.toString(t)}})}max(e,t){return new mt({...this._def,maxSize:{value:e,message:Fe.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}mt.create=(e,t)=>new mt({valueType:e,minSize:null,maxSize:null,typeName:Et.ZodSet,...Ee(t)});class ht extends Le{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==me.function)return we(t,{code:fe.invalid_type,expected:me.function,received:t.parsedType}),xe;function s(e,s){return be({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_e(),ye].filter((e=>!!e)),issueData:{code:fe.invalid_arguments,argumentsError:s}})}function n(e,s){return be({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_e(),ye].filter((e=>!!e)),issueData:{code:fe.invalid_return_type,returnTypeError:s}})}const r={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof bt){const e=this;return Oe((async function(...t){const a=new ge([]),o=await e._def.args.parseAsync(t,r).catch((e=>{throw a.addIssue(s(t,e)),a})),c=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(c,r).catch((e=>{throw a.addIssue(n(c,e)),a}))}))}{const e=this;return Oe((function(...t){const a=e._def.args.safeParse(t,r);if(!a.success)throw new ge([s(t,a.error)]);const o=Reflect.apply(i,this,a.data),c=e._def.returns.safeParse(o,r);if(!c.success)throw new ge([n(o,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ht({...this._def,args:dt.create(e).rest(Xe.create())})}returns(e){return new ht({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new ht({args:e||dt.create([]).rest(Xe.create()),returns:t||Xe.create(),typeName:Et.ZodFunction,...Ee(s)})}}class ft extends Le{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ft.create=(e,t)=>new ft({getter:e,typeName:Et.ZodLazy,...Ee(t)});class gt extends Le{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return we(t,{received:t.data,code:fe.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}function yt(e,t){return new vt({values:e,typeName:Et.ZodEnum,...Ee(t)})}gt.create=(e,t)=>new gt({value:e,typeName:Et.ZodLiteral,...Ee(t)});class vt extends Le{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),s=this._def.values;return we(t,{expected:de.joinValues(s),received:t.parsedType,code:fe.invalid_type}),xe}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return we(t,{received:t.data,code:fe.invalid_enum_value,options:s}),xe}return Oe(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return vt.create(e)}exclude(e){return vt.create(this.options.filter((t=>!e.includes(t))))}}vt.create=yt;class _t extends Le{_parse(e){const t=de.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==me.string&&s.parsedType!==me.number){const e=de.objectValues(t);return we(s,{expected:de.joinValues(e),received:s.parsedType,code:fe.invalid_type}),xe}if(-1===t.indexOf(e.data)){const e=de.objectValues(t);return we(s,{received:s.data,code:fe.invalid_enum_value,options:e}),xe}return Oe(e.data)}get enum(){return this._def.values}}_t.create=(e,t)=>new _t({values:e,typeName:Et.ZodNativeEnum,...Ee(t)});class bt extends Le{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==me.promise&&!1===t.common.async)return we(t,{code:fe.invalid_type,expected:me.promise,received:t.parsedType}),xe;const s=t.parsedType===me.promise?t.data:Promise.resolve(t.data);return Oe(s.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}bt.create=(e,t)=>new bt({type:e,typeName:Et.ZodPromise,...Ee(t)});class wt extends Le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Et.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{we(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(s.data,r);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const n=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===n.status?xe:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((s=>"aborted"===s.status?xe:("dirty"===s.status&&t.dirty(),e(s.value).then((()=>({status:t.value,value:s.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Ce(e))return e;const i=n.transform(e.value,r);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>Ce(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}de.assertNever(n)}}wt.create=(e,t,s)=>new wt({schema:e,typeName:Et.ZodEffects,effect:t,...Ee(s)}),wt.createWithPreprocess=(e,t,s)=>new wt({schema:t,effect:{type:"preprocess",transform:e},typeName:Et.ZodEffects,...Ee(s)});class kt extends Le{_parse(e){return this._getType(e)===me.undefined?Oe(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kt.create=(e,t)=>new kt({innerType:e,typeName:Et.ZodOptional,...Ee(t)});class xt extends Le{_parse(e){return this._getType(e)===me.null?Oe(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xt.create=(e,t)=>new xt({innerType:e,typeName:Et.ZodNullable,...Ee(t)});class jt extends Le{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===me.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}jt.create=(e,t)=>new jt({innerType:e,typeName:Et.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Ee(t)});class Ot extends Le{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Te(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new ge(s.common.issues)},input:s.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ge(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ot.create=(e,t)=>new Ot({innerType:e,typeName:Et.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Ee(t)});class St extends Le{_parse(e){if(this._getType(e)!==me.nan){const t=this._getOrReturnCtx(e);return we(t,{code:fe.invalid_type,expected:me.nan,received:t.parsedType}),xe}return{status:"valid",value:e.data}}}St.create=e=>new St({typeName:Et.ZodNaN,...Ee(e)});const At=Symbol("zod_brand");class Ct extends Le{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class Tt extends Le{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?xe:"dirty"===e.status?(t.dirty(),je(e.value)):this._def.out._parseAsync({data:e.value,path:s.path,parent:s})})();{const e=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===e.status?xe:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:s.path,parent:s})}}static create(e,t){return new Tt({in:e,out:t,typeName:Et.ZodPipeline})}}class Ft extends Le{_parse(e){const t=this._def.innerType._parse(e);return Ce(t)&&(t.value=Object.freeze(t.value)),t}}Ft.create=(e,t)=>new Ft({innerType:e,typeName:Et.ZodReadonly,...Ee(t)});const Rt=(e,t={},s)=>e?Ye.create().superRefine(((n,r)=>{var i,a;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(a=null!==(i=e.fatal)&&void 0!==i?i:s)||void 0===a||a,c="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...c,fatal:o})}})):Ye.create(),Zt={object:rt.lazycreate};var Et;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Et||(Et={}));const Lt=Be.create,Pt=Ve.create,Nt=St.create,It=We.create,Mt=Je.create,Ut=Ke.create,Dt=Ge.create,$t=He.create,qt=Qe.create,Bt=Ye.create,zt=Xe.create,Vt=et.create,Wt=tt.create,Jt=st.create,Kt=rt.create,Gt=rt.strictCreate,Ht=it.create,Qt=ot.create,Yt=ut.create,Xt=dt.create,es=lt.create,ts=pt.create,ss=mt.create,ns=ht.create,rs=ft.create,is=gt.create,as=vt.create,os=_t.create,cs=bt.create,us=wt.create,ds=kt.create,ls=xt.create,ps=wt.createWithPreprocess,ms=Tt.create,hs={string:e=>Be.create({...e,coerce:!0}),number:e=>Ve.create({...e,coerce:!0}),boolean:e=>Je.create({...e,coerce:!0}),bigint:e=>We.create({...e,coerce:!0}),date:e=>Ke.create({...e,coerce:!0})},fs=xe;var gs,ys=Object.freeze({__proto__:null,defaultErrorMap:ye,setErrorMap:function(e){ve=e},getErrorMap:_e,makeIssue:be,EMPTY_PATH:[],addIssueToContext:we,ParseStatus:ke,INVALID:xe,DIRTY:je,OK:Oe,isAborted:Se,isDirty:Ae,isValid:Ce,isAsync:Te,get util(){return de},get objectUtil(){return le},ZodParsedType:me,getParsedType:he,ZodType:Le,ZodString:Be,ZodNumber:Ve,ZodBigInt:We,ZodBoolean:Je,ZodDate:Ke,ZodSymbol:Ge,ZodUndefined:He,ZodNull:Qe,ZodAny:Ye,ZodUnknown:Xe,ZodNever:et,ZodVoid:tt,ZodArray:st,ZodObject:rt,ZodUnion:it,ZodDiscriminatedUnion:ot,ZodIntersection:ut,ZodTuple:dt,ZodRecord:lt,ZodMap:pt,ZodSet:mt,ZodFunction:ht,ZodLazy:ft,ZodLiteral:gt,ZodEnum:vt,ZodNativeEnum:_t,ZodPromise:bt,ZodEffects:wt,ZodTransformer:wt,ZodOptional:kt,ZodNullable:xt,ZodDefault:jt,ZodCatch:Ot,ZodNaN:St,BRAND:At,ZodBranded:Ct,ZodPipeline:Tt,ZodReadonly:Ft,custom:Rt,Schema:Le,ZodSchema:Le,late:Zt,get ZodFirstPartyTypeKind(){return Et},coerce:hs,any:Bt,array:Jt,bigint:It,boolean:Mt,date:Ut,discriminatedUnion:Qt,effect:us,enum:as,function:ns,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Rt((t=>t instanceof e),t),intersection:Yt,lazy:rs,literal:is,map:ts,nan:Nt,nativeEnum:os,never:Vt,null:qt,nullable:ls,number:Pt,object:Kt,oboolean:()=>Mt().optional(),onumber:()=>Pt().optional(),optional:ds,ostring:()=>Lt().optional(),pipeline:ms,preprocess:ps,promise:cs,record:es,set:ss,strictObject:Gt,string:Lt,symbol:Dt,transformer:us,tuple:Xt,undefined:$t,union:Ht,unknown:zt,void:Wt,NEVER:fs,ZodIssueCode:fe,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:ge});!function(e){e[e.SPOT_MODERATE_IGNORE=0]="SPOT_MODERATE_IGNORE",e[e.SPOT_MODERATE_ACCEPT=1]="SPOT_MODERATE_ACCEPT",e[e.SPOT_MODERATE_PENDING=2]="SPOT_MODERATE_PENDING"}(gs||(gs={}));const vs=ys.object({RF_Constant_levelName:ys.string(),RF_delete:ys.boolean(),RF_editing:ys.boolean(),RF_level:ys.number(),RF_levelName:ys.string(),RF_levelName_Trad:ys.string(),RF_parameters:ys.boolean(),RF_setAdmin:ys.boolean(),RF_spotit:ys.boolean(),RF_spotit_own:ys.boolean()}),_s=e=>vs.safeParse(e).success;class bs extends n{list(e,t,s,n=[{name:"dateCreation",sort:"DESC"}]){return this.jApi.article.list({type:"aseiClearanceTicket",format:"raw-view",limit:t,page:e,orders:n,filters:s})}requestStatus(e,t,s){return this.network.post({o:"asei",f:"setStatus",uri:e,requestedStatus:t,audience:s})}getDedicatedGroups(){return this.network.post({o:"asei",f:"getDedicatedGroups"})}getConfiguration(){return this.network.post({o:"asei",f:"configuration"})}}class ws extends n{tenants(){return this.network.post({o:"drive",f:"getTenants"})}groups(e,t){return this.network.post({o:"drive",f:"getGroups",query:e,filter:t})}sites(){return this.network.post({o:"drive",f:"getSites"})}listAccount(e){return this.network.post({o:"drive",f:"listAccount",service:e})}isAccountLogged(e,t){return this.network.post({o:"drive",f:"isAccountLogged",service:e,id:t})}checkAccountToken(e){return this.network.post({o:"drive",f:"checkAccountToken",service:e})}documents(e,t){return this.network.post({o:"drive",f:"getDocuments",service:e,documentParams:t})}}class ks extends n{GetUnclassifiedFiles(e){var t;return this.network.post({o:"objectListMediaLibrary",f:"GetUnclassifiedFiles",format:e.format,page:null!==(t=e.page)&&void 0!==t?t:1,limit:e.limit,nolimit:e.nolimit})}getAccess(){return this.network.post({o:"mediaLibrary",f:"access"})}getFoldersStatsList(e=[],t=[],s=1){return this.network.post({o:"objectListMediaLibrary",f:"FoldersStatsList",filters:e,orders:t,page:s})}getFilesStatsList(e=[],t=[],s=1){return this.network.post({o:"objectListMediaLibrary",f:"FilesStatsList",filters:e,orders:t,page:s})}getStats(e=[]){return this.network.post({o:"mediaLibrary",f:"moderatorStats",filters:e})}readFolder(e){return this.network.post({o:"mediaLibrary",f:"readFolder",uri:e})}readFile(e){return this.network.post({o:"mediaLibrary",f:"readFile",uri:e})}}class xs extends n{getLogs({dateEnd:e,idLogMax:t}){return this.network.post({o:"jLand",f:"adminLogs",dateEnd:e,idLogMax:t})}getStats({map:e,dateStart:t,dateEnd:s}){return this.network.post({o:"jLand",f:"adminStats",map:e,dateStart:t,dateEnd:s})}getAllMapsAsAdmin(e="raw-list,licenses"){return this.network.post({o:"objectListJLand",f:"jLandList",format:e})}createMap(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"jlandmap"}))}}class js extends n{sendMessage(e,t){return this.network.post({o:"messenger",f:"newMessage",idDiscussion:t,msg:{description:e}})}getOrCreateDiscussion(e,t){const s=e<t?`${e}.${t}`:`${t}.${e}`;return this.network.post({o:"messenger",f:"getDiscussion",idDiscussion:s,type:"messengerUser",idUserTo:t})}}class Os extends n{getConfig(){return this.network.post({o:"search",f:"getConfig"})}proposition({query:e,format:t},s){return this.network.post({o:"search",f:"proposition",query:e,format:t||"little"},s)}searchQuery(e,t){const{keywords:s,category:n,facetCategories:r,filters:i,page:a,limit:o,sort:c,options:u}=e;return this.network.post({o:"search",f:"query",keywords:s,category:n,facetCategories:r,filters:i,page:a,limit:o,sort:c,options:u},t)}getLastQueries(){return this.network.post({o:"search",f:"getLastQueries"})}getAdminConfig(){return this.network.post({o:"search",f:"getAdminConfig"})}setAdminConfig(e){return this.network.post({o:"search",f:"setAdminConfig",config:e})}}var Ss=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(s[n[r]]=e[n[r]])}return s};class As extends n{list(){return this.network.post({o:"taxonomy",f:"list",format:"raw-little"}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}create(e){var{format:t="raw-little"}=e,s=Ss(e,["format"]);return this.network.post(Object.assign({o:"taxonomy",f:"create",format:t},s))}autocomplete(e,t){return this.network.post({o:"autocomplete",f:"taxonomy",q:t,idTaxonomy:e,idToUri:!1})}autocompleteList(e){var{format:t="autocomplete"}=e,s=Ss(e,["format"]);return this.network.post(Object.assign({o:"objectListTaxonomy",f:"concept",format:t},s))}autocompleteHierarchy(e){return this.network.post(Object.assign({o:"objectListTaxonomyHierarchy",f:"concept"},e))}}class Cs extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"user",q:e,idToUri:!1}).then((e=>e.result))}get(e,t="little",s){return this.network.post({o:"user",f:"get",uri:e,format:t},s)}updateImage(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateImage",idFile:e,format:t})}updateBanner(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateBanner",idFile:e,format:t})}updateMail(e,t){return this.network.postCSRF({o:"user",f:"editMail",mail:e,password:t})}userUpdateProfile(e){return this.network.postCSRF(Object.assign({o:"user",f:"updateProfile"},e))}configuration(){return this.network.post({o:"userDirectory",f:"configuration"})}fieldsConfiguration(){return this.network.post({o:"user",f:"fieldsConfiguration"})}userList(e,t){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserList"},e),t)}userQueryList(e){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserQueryList"},e))}userMap(e){return this.network.post(Object.assign({o:"objectListJamespot",f:"userMap"},e))}userBusinessContactQueryList(e){return this.network.post(Object.assign({o:"businessContact",f:"queryList"},e))}userCreateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),s=Object.assign(Object.assign({},t),{type:"businessContactCard",publishTo:"networkPublic/1"});return this.jApi.article.create(s)}userUpdateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),s=Object.assign(Object.assign({},t),{uri:e.uri,publishTo:"networkPublic/1"});return this.jApi.article.update(s)}userDeleteBusinessContact(e){return this.jApi.article.delete(e)}userAddContact(e){return this.network.post({o:"user",f:"addContact",idUser:e})}userRemoveContact(e){return this.network.post({o:"user",f:"removeContact",idUser:e})}signIn(e,t){return this.network.post({o:"user",f:"signIn",mail:e,password:t})}getFields(e,t){return this.network.post({o:"user",f:"getFields",idUser:e,fieldsType:t})}}class Ts extends n{getFiles(e){return this.network.post(Object.assign({o:"onlyOffice",f:"getFiles"},e))}getFile(e,t){return this.network.post({o:"onlyOffice",f:"getFile",idFile:e,hash:t})}getTemplates(e){return this.network.post({o:"onlyOffice",f:"getTemplates"},e)}deleteFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"deleteFile",idFile:e,withParent:t})}createFile(e,t,s){return this.network.postCSRF({o:"onlyOffice",f:"createFile",title:e,type:t,publishTo:s})}updateFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"updateFile",idFile:e,title:t})}createVersion(e){return this.network.post({o:"onlyOffice",f:"createVersion",idFile:e})}setAccessRequest(e,t,s,n){return this.network.postCSRF({o:"onlyOffice",f:"setAccessRequest",uri:e,idUser:t,requestAccessValue:s,requestResponseMessage:n})}getAccessRequest(e,t){return this.network.post({o:"onlyOffice",f:"getAccessRequest",format:"raw-little",uri:e,idUser:t})}askAccess(e,t,s){return this.network.postCSRF({o:"onlyOffice",f:"askAccess",uri:e,askAccess:t,askMessage:s})}}class Fs extends n{createChannel(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"tvDisplayChannel"}))}getChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getChannel"}))}getConfigureChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getConfigureChannel"}))}}class Rs extends n{contentObjectLinks(e){return this.network.post({o:"shared",f:"contentObjectLinks",format:"raw-little",uri:e})}contentSetObjectAccessRule(e,t,s){return this.network.postCSRF({o:"shared",f:"contentSetObjectAccessRule",format:"raw-little",uri:e,rule:t,hash:s})}}var Zs=function(e,t,s,n){return new(s||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class Es extends n{SaveAnimationConfiguration(e){return Zs(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"saveConfiguration",animation:e})}))}DeleteAnimation(){return Zs(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"deleteAnimation"})}))}GetCurrentAnimation(){return Zs(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfiguration"})}))}GetCurrentAnimationApp(){return Zs(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfigurationApp"})}))}ToggleAnimationActive(){return Zs(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"toggleAnimationActive"})}))}GetAnimationActive(){return Zs(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getAnimationActive"})}))}}class Ls extends n{GetStatus(){return e=this,t=void 0,n=function*(){return this.network.post({o:"accessibility",f:"getStatus"})},new((s=void 0)||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}));var e,t,s,n}}class Ps extends n{getObject(e){return this.network.post({o:"object",f:"getObject",uri:e})}setAccess(e,t,s,n){return this.network.post({o:"object",f:"setAccess",uri:e,access:t,message:s,generalAccessRule:n})}getAccess(e){return this.network.post({o:"object",f:"getAccess",uri:e})}getAccessHash(e){return this.network.post({o:"object",f:"getAccessHash",uri:e})}}class Ns extends n{getFileBanks(e){return this.network.post({o:"file-sync",f:"getFileBanks"},e)}saveFileBanks(e){return this.network.post({o:"file-sync",f:"saveFileBanks",fileBanks:e})}getUserQuota(e){return this.network.post({o:"file-sync",f:"getUserQuota"},e)}getAdminSpots(e,t){return this.network.post(Object.assign({o:"objectList",f:"fileSyncAdminSpots"},e),t)}}class Is extends n{getUsers(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"getUsers"},e),{format:null!=t?t:"raw-list"}))}add(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"add"},e),{format:null!=t?t:"raw-little"}))}remove(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"remove"},e),{format:null!=t?t:"raw-little"}))}}class Ms extends n{textEnhancement({text:e,capacity:t}){return this.network.post({o:"jia",f:"textEnhancement",text:e,capacity:t})}}class Us extends n{responseUserList(e,t,s){return this.network.post({o:"widget",f:"responseUserList",uri:e,uniqid:t,page:s})}removeWidget({id:e,type:t,uniqid:s}){return this.network.post({o:"widget",f:"removeWidget",id:e,type:t,uniqid:s})}checkListRespond({id:e,type:t,idUser:s,uniqid:n,index:r}){return this.network.post({o:"widget",f:"checkListRespond",id:e,type:t,uniqid:n,idUser:s,index:r})}updateWidget({id:e,uniqid:t,content:s,title:n,type:r}){return this.network.post({o:"widget",f:"updateWidget",id:e,uniqid:t,content:s,title:n,type:r})}}class Ds{constructor(e){this.version="1.0",this.network=e,this.admin={license:new r(this),store:new i(this),utils:new a(this)},this.accessibility=new Ls(this),this.application=new o(this),this.article=new Q(this),this.asei=new bs(this),this.assetReservation=new X(this),this.audience=new ee(this),this.bookmark=new te(this),this.businessNetworking=new se(this),this.community=new ne(this),this.diapazone=new re(this),this.drive=new ws(this),this.faq=new oe(this),this.file=new ae(this),this.filebank=new ce(this),this.fileSync=new Ns(this),this.global=new ue(this),this.group=new pe(this),this.jia=new Ms(this),this.jland=new xs(this),this.mediaLibrary=new ks(this),this.messenger=new js(this),this.object=new Ps(this),this.search=new Os(this),this.share=new Rs(this),this.socialAction=new Is(this),this.taxonomy=new As(this),this.tvDisplay=new Fs(this),this.user=new Cs(this),this.wedoc=new Ts(this),this.widget=new Us(this),this.animations=new Es(this)}}class $s{getBackendUrl(){return e=this,t=void 0,n=function*(){const e=window.location;return`${e.protocol}//${e.host}`},new((s=void 0)||(s=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function o(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}));var e,t,s,n}fetch(e,t){return window.fetch(e,t)}}const qs=ys.object({create:ys.boolean(),read:ys.boolean(),publish:ys.boolean(),administrate:ys.boolean(),update:ys.boolean(),delete:ys.boolean(),comment:ys.boolean(),member:ys.boolean()}),Bs=e=>qs.safeParse(e).success,zs=ys.string(),Vs=ys.string().nullable(),Ws=ys.number(),Js=ys.string().nullable(),Ks=ys.string().nullable(),Gs=ys.string().nullable(),Hs=ys.number(),Qs=ys.string(),Ys=ys.string(),Xs=ys.union([Hs,Gs,Ks,Js,Qs,Ws,Vs,zs,Ys]),en={ADMIN:9,USER:5,EXTERNAL:3,GUEST:0},tn=ys.lazy((()=>wn.extend({title:ys.string(),_url:ys.string(),level:ys.nativeEnum(en),dateCreation:ys.string(),dateModified:ys.string()}).catchall(Xs))),sn=ys.lazy((()=>tn.schema.extend({active:ys.number()}))),nn=e=>sn.safeParse(e).success,rn=sn,an=e=>rn.safeParse(e).success,on=ys.object({idInType:ys.number(),lat:ys.number(),lng:ys.number()}),cn=e=>on.safeParse(e).success,un=ys.object({title:ys.string(),firstname:ys.string(),lastname:ys.string(),mail:ys.union([ys.string(),ys.undefined()]).optional(),description:ys.string().optional(),dateOfBirth:ys.string().optional(),phoneNumber:ys.string().optional(),language:ys.string().optional(),timeZone:ys.string().optional(),mobileNumber:ys.string().optional(),company:ys.string().optional(),country:ys.string().optional(),department:ys.string().optional(),function:ys.string().optional(),webSite:ys.string().optional(),image:ys.union([ys.string(),ys.undefined()]).optional(),userBanner:ys.union([ys.string(),ys.undefined()]).optional(),field1:ys.string().optional(),field2:ys.string().optional(),field3:ys.string().optional(),field4:ys.string().optional(),field5:ys.string().optional()}),dn=un.required().extend({level:ys.string(),image:ys.string().optional(),businessManagementManager:tn.array().optional(),businessNetworkingUserToCompanySrc:tn.array().optional()}),ln=ys.object({user_field_edit_profil:ys.record(un.keyof(),ys.number()),user_field_editable:ys.record(un.keyof(),ys.number()),user_field_my_page:ys.record(un.keyof(),ys.number()),user_page_mandatory_fields:ys.object({firstname:ys.enum(["0","1"]),lastname:ys.enum(["0","1"]),pseudo:ys.enum(["0","1"])})}),pn=ys.object({name:ys.string(),value:ys.union([ys.string(),ys.record(ys.string(),ys.any())])}),mn=ys.enum(["popover"]),hn=ys.object({values:dn,mobileEditableFields:dn.keyof().array()}),fn=ys.object({mail:ys.union([ys.string(),ys.undefined()]),title:ys.string(),firstname:ys.string(),lastname:ys.string(),phoneNumber:ys.union([ys.string(),ys.undefined()]).optional(),company:ys.union([ys.string(),ys.undefined()]).optional(),function:ys.union([ys.string(),ys.undefined()]).optional(),uri:ys.union([ys.string(),ys.undefined()]).optional(),field1:ys.union([ys.string(),ys.undefined()]).optional(),field2:ys.union([ys.string(),ys.undefined()]).optional(),field3:ys.union([ys.string(),ys.undefined()]).optional(),field4:ys.union([ys.string(),ys.undefined()]).optional(),field5:ys.union([ys.string(),ys.undefined()]).optional()}),gn=ys.object({userDirectoryShow:ys.union([ys.literal(""),ys.literal("1")]),contactDirectoryShow:ys.union([ys.literal("0"),ys.literal("1")]),businessContactShow:ys.boolean(),menu:ys.union([ys.literal("0"),ys.literal("1")]),cardFields:ys.string().array(),tableFields:ys.string().array(),viewFields:ys.string().array(),userGeoloc:ys.boolean().optional(),sort:ys.string(),cnt:ys.number().optional(),filters:ys.object({name:ys.string(),type:ys.string()}).array()}),yn=e=>gn.safeParse(e).success,vn=ys.lazy((()=>kn.extend({dateCreation:ys.string(),dateModified:ys.string(),firstname:ys.string(),lastname:ys.string(),active:ys.number(),mail:ys.string().optional()}))),_n=e=>vn.safeParse(e).success,bn=ys.lazy((()=>kn.extend({id:ys.string(),shortUri:ys.string(),name:ys.string(),label:ys.string(),cssClass:ys.string(),cssColor:ys.string(),class:ys.string(),Pseudo:ys.string(),_values:ys.record(ys.string(),ys.unknown())}))),wn=ys.object({id:ys.number(),mainType:ys.string(),type:ys.string(),uri:ys.string(),dateCreation:ys.string().optional(),dateModified:ys.string().optional().nullable()}),kn=wn.extend({title:ys.string(),_url:ys.string()}),xn=e=>kn.safeParse(e).success,jn=ys.lazy((()=>kn.extend({description:ys.string().optional().nullable(),_user:tn,_right:qs}))),On=e=>jn.safeParse(e).success,Sn=ys.object({attrName:ys.string(),token:ys.string(),file:ys.instanceof(File).nullable().optional(),url:ys.string().optional()}),An=ys.object({width:ys.number(),height:ys.number()}),Cn=ys.object({x:ys.number(),y:ys.number(),w:ys.number(),h:ys.number(),rotation:ys.number(),killSize:ys.boolean().optional()}),Tn=kn.extend({dateCreation:ys.string(),dateModified:ys.string().nullable(),mimetype:ys.string(),path:ys.string().optional(),size:ys.number()}),Fn=e=>Tn.parse(e),Rn=Tn.extend({_extend:ys.object({crop:Cn})}),Zn=ys.object({name:ys.string(),filename:ys.string(),dateModified:ys.string(),mimetype:ys.string()}),En=ys.object({idUser:ys.string(),dateDownload:ys.string(),Pseudo:ys.string(),type:ys.string()}),Ln=e=>ys.object({isActive:ys.boolean()}).and(e),Pn=ys.enum(["drive_microsoft_graph","drive_dropbox","drive_google"]),Nn=Ln(ys.object({drives:ys.record(Pn,ys.boolean())})),In=Ln(ys.object({label:ys.string()})),Mn=Ln(ys.object({orderBy:ys.string(),order:ys.enum(["ASC","DESC"])})),Un=Ln(ys.object({sendAlert:ys.boolean()})),Dn=Ln(ys.object({})),$n=Ln(ys.object({create:ys.boolean(),autorize:ys.array(ys.enum(["message","comment","board","article"]).optional())})),qn=ys.object({DriveHook:Nn,calendarHook:In,FileBankHook:Mn,spotRssFeed:Dn,WidgetHook:$n,AdminAdvancedHook:Un}).partial(),Bn=e=>qn.and(ys.record(ys.string(),ys.any())).parse(e),zn=ys.object({id:ys.number(),idFolder:ys.number().optional(),fileName:ys.string(),nbViews:ys.number(),nbDistinctViews:ys.number(),nbDownloads:ys.number()}),Vn=ys.object({id:ys.number(),folderName:ys.string(),nb:ys.number(),nbDistinct:ys.number()}),Wn=ys.object({nbFolders:ys.number(),nbFiles:ys.number()}),Jn="accept",Kn="deny",Gn=new M(new $s),Hn=new Ds(Gn);window.JamespotUserApi=Hn;const Qn=Hn,Yn=Ds;module.exports=s})();
1
+ (()=>{"use strict";var e,t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{ACCESS_REQUEST_ACCEPT:()=>Is,ACCESS_REQUEST_DENY:()=>Ms,AdminLicenseApi:()=>r,AdminStoreApi:()=>s,AdminUtilsApi:()=>a,Format:()=>Pn,GroupModerateStatus:()=>Yi,JApplicationApi:()=>o,JArticleApi:()=>Q,JAssetReservation:()=>X,JAudienceApi:()=>ee,JBaseApi:()=>n,JBbbApi:()=>te,JBookmarkApi:()=>ie,JBusinessNetworkingApi:()=>ne,JCommunityApi:()=>re,JDiapazoneApi:()=>se,JFaqApi:()=>ce,JFileApi:()=>oe,JFilebankApi:()=>le,JGlobalApi:()=>de,JGroupApi:()=>me,JIAApi:()=>_n,JLandApi:()=>an,JMessengerApi:()=>on,JObjectApi:()=>vn,JSearchApi:()=>cn,JShareApi:()=>hn,JSocialActionApi:()=>wn,JTaxonomyApi:()=>dn,JUserApi:()=>un,JWedocApi:()=>pn,JWidgetApi:()=>kn,JamespotUserApi:()=>xn,JamespotUserApiInstance:()=>Us,Network:()=>M,StudioApplicationStatus:()=>e,TVDisplayApi:()=>mn,UserLevel:()=>Ti,WidgetsName:()=>rr,WindowBrowser:()=>jn,addCommentParamsSchema:()=>ys,api:()=>qs,articleCreationSchema:()=>hs,articleDisplayModeSchema:()=>pr,articleGetConfigSchema:()=>ms,articleListConfigSchema:()=>ps,audienceAutocompleteSchema:()=>Hn,audienceSchema:()=>On,baseArticleSchema:()=>fs,baseAutocompleteSchema:()=>Vn,businessContactSchema:()=>qi,combineFormat:()=>W,combinedWidgetContentSchema:()=>Rr,combinedWidgetTypeSchema:()=>ar,cssBackgroundPositionSchema:()=>Yn,cssBackgroundSizeSchema:()=>Xn,cssTextAlignTypeSchema:()=>Qn,deepEqual:()=>q,default:()=>$s,ensureWidgetApiType:()=>Nr,ensureWidgetArticleAttachmentType:()=>Gr,ensureWidgetArticleButtonType:()=>Mr,ensureWidgetArticleGalleryType:()=>Ur,ensureWidgetArticleImageType:()=>Vr,ensureWidgetArticleSliderType:()=>Hr,ensureWidgetArticleTextType:()=>Wr,ensureWidgetArticleTitleType:()=>qr,ensureWidgetCheckListType:()=>Yr,extensions:()=>x,extractTaxonomiesFromObject:()=>V,extractTaxonomiesFromObjectAndMapProperty:()=>J,extractTaxonomiesFromObjectAndMapUri:()=>G,fileCropConfigSchema:()=>Un,filterSchema:()=>Ln,filterValueSchema:()=>Cn,filtersSchema:()=>En,formatExtensionSchema:()=>In,formatImgUrl:()=>_,formatListSchema:()=>Nn,getArgs:()=>y,getCommentsParamsSchema:()=>gs,getExtensionFromName:()=>O,getFileExtensionFromMimetype:()=>A,getFileFamily:()=>E,getFileFamilyFromName:()=>R,getFormat:()=>b,getFrom:()=>f,getMimetypeFromExtension:()=>S,getMimetypeFromName:()=>T,getSize:()=>v,getTimestamp:()=>g,getUri:()=>h,getUrl:()=>w,groupLittleSchema:()=>en,imageSizeSchema:()=>Dn,inferJInternalDraftView:()=>us,inferWidgetWrapperPropsSchema:()=>dr,jArticleExtendViewSchema:()=>ds,jArticleListSchema:()=>cs,jArticleLittleSchema:()=>os,jArticleViewSchema:()=>ls,jArticleWidgetLittle:()=>mr,jArticleWidgetViewSchema:()=>as,jEnsure:()=>d,jFileLittleCropSchema:()=>Bn,jFileLittleSchema:()=>$n,jFileRenditionSchema:()=>Wn,jHrefSchema:()=>Sn,jObjectAutocompleteSchema:()=>Jn,jObjectBaseSchema:()=>Ji,jObjectListSchema:()=>Hi,jObjectLittleSchema:()=>Gi,jSpotAutocompleteSchema:()=>Kn,jUserAutocompleteSchema:()=>Gn,jUserListSchema:()=>Fi,jUserLittleSchema:()=>Ci,jUserValuesSchema:()=>Ii,jUserViewSchema:()=>Li,legacyAngularJSTypeSchema:()=>ur,mediaLibraryFilesStatsSchema:()=>Ps,mediaLibraryFolderStatsSchema:()=>Zs,mediaLibraryStatsSchema:()=>Ns,mimetypeToExt:()=>j,mimetypes:()=>k,network:()=>Ds,objectTimestamp:()=>C,openingTypeAnchorSchema:()=>kr,openingTypeLinkSchema:()=>_r,openingTypePopupSchema:()=>xr,openingTypeSchema:()=>ir,orderSchema:()=>An,ordersSchema:()=>Tn,padStartTwoDigits:()=>m,prepareGroupForUpdate:()=>K,publicWebinarData:()=>xs,publicWebinarFullnameRequestSchema:()=>ws,publicWebinarGetDateRequestSchema:()=>ks,publicWebinarUrlSchema:()=>_s,removeIfStartsWith:()=>p,replacePropertiesWithTypes:()=>B,resolveFileFamily:()=>N,resolveFileMimetype:()=>Z,resolveFilePath:()=>F,resolveFileUrl:()=>P,rightsSchema:()=>zi,suffixIfDoesNotExist:()=>u,updateCommentParamsSchema:()=>vs,uploadConfigSchema:()=>Mn,userDefaultFieldsTypeSchema:()=>Ni,userDirectoryConfigurationSchema:()=>Bi,userDownloadSchema:()=>zn,userFieldSchema:()=>Di,userFieldsConfigurationTypeSchema:()=>Mi,userFieldsSchema:()=>Ui,userMapModelSchema:()=>Pi,userReadSchema:()=>bs,userValuesSchema:()=>$i,userlevelSpotShema:()=>Xi,validateIsFormatFileLittle:()=>qn,validateIsFormatHookListType:()=>Es,validateIsFormatObjectList:()=>Qi,validateIsFormatObjectLittle:()=>Ki,validateIsFormatRights:()=>Vi,validateIsFormatUserDirectoryConfiguration:()=>Wi,validateIsFormatUserLevelSpot:()=>tn,validateIsFormatUserList:()=>Ri,validateIsFormatUserMapModel:()=>Zi,validateIsFormatUserView:()=>Ei,variantSizeTypeSchema:()=>er,variantTypeSchema:()=>tr,widgetActiveValueSchema:()=>ji,widgetApiContentSchema:()=>br,widgetApiTypeSchema:()=>Zr,widgetArticleAttachmentContentSchema:()=>Ar,widgetArticleAttachmentTypeSchema:()=>Jr,widgetArticleButtonContentSchema:()=>jr,widgetArticleButtonTypeSchema:()=>Ir,widgetArticleCheckListTypeForFrontSchema:()=>ts,widgetArticleGalleryContentSchema:()=>gr,widgetArticleGalleryTypeSchema:()=>Dr,widgetArticleImageContentSchema:()=>Sr,widgetArticleImageTypeSchema:()=>zr,widgetArticleSliderContentSchema:()=>Tr,widgetArticleSliderTypeSchema:()=>Kr,widgetArticleTextContentSchema:()=>vr,widgetArticleTextTypeSchema:()=>Br,widgetArticleTitleContentSchema:()=>yr,widgetArticleTitleTypeSchema:()=>$r,widgetButtonPropsSchema:()=>wr,widgetCheckListContentArrForFrontSchema:()=>Xr,widgetCheckListContentArrSchema:()=>Cr,widgetCheckListContentForFrontSchema:()=>es,widgetCheckListContentSchema:()=>Fr,widgetCheckListTypeSchema:()=>Qr,widgetContentKeysSchema:()=>cr,widgetDatePickerValueSchema:()=>xi,widgetDateValueSchema:()=>_i,widgetDatetimeValueSchema:()=>ki,widgetDefaultProps:()=>Er,widgetDefinitionPropsSchema:()=>is,widgetDisplayModeSchema:()=>fr,widgetEmailValueSchema:()=>Si,widgetExtendedTypeSchema:()=>lr,widgetKeysSchema:()=>sr,widgetLayerSchema:()=>hr,widgetModalPropsSchema:()=>ns,widgetNumberValueSchema:()=>wi,widgetSlideSchema:()=>Or,widgetStatePropsSchema:()=>Lr,widgetTextValueSchema:()=>vi,widgetTextareaValueSchema:()=>bi,widgetTypeKeysSchema:()=>or,widgetUrlValueSchema:()=>Ai,widgetVectorSchema:()=>nr,widgetsRootStateSchema:()=>ss,widgetsStateSchema:()=>rs,widgetsValueSchema:()=>Oi});class n{constructor(e){this.jApi=e,this.network=e.network}}class r extends n{getLicenseUserStatistics(){return this.network.post({o:"licenseManager",f:"userStatistics"})}assignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"assignLicense",uri:e})}unAssignLicense(e){return this.network.postCSRF({o:"licenseManager",f:"unassignLicense",uri:e})}getAssignmentMode(e){return this.network.post({o:"licenseManager",f:"getAssignmentMode",type:e})}setAssignmentMode(e,t){return this.network.postCSRF({o:"licenseManager",f:"setAssignmentMode",value:t,type:e})}assignPossiblesLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"assignPossiblesLicenses",type:e})}unAssignUnusedLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"unassignUnusedLicenses",type:e})}optimizeLicenses(e){return this.network.postCSRF({o:"licenseManager",f:"optimizeLicenses",type:e})}getObjectsWithoutLicense(e,t){return this.network.post({o:"licenseManager",f:"countObjectsWithoutLicense",type:e,filter:t})}getLicensesNotAssigned(e){return this.network.post({o:"licenseManager",f:"countLicensesNotAssigned",type:e})}getLicensesAssigned(e){return this.network.post({o:"licenseManager",f:"getLicensesAssigned",type:e})}}class s extends n{getItem(e){return this.network.post({o:"adminStore",f:"getItem",uri:e})}checkoutBilling(e){return this.network.postCSRF({o:"adminStore",f:"checkoutBilling",uri:e})}checkoutFinalize(e){return this.network.postCSRF({o:"adminStore",f:"checkoutFinalize",uri:e})}}class a extends n{getApps(){return this.network.post({o:"admin",f:"apps"})}}!function(e){e.local="local",e.installed="installed",e.autosaved="autosaved",e.saved="saved"}(e||(e={}));class o extends n{list(){return this.network.post({o:"studio",f:"list"})}get(e,t){return this.network.post({o:"studio",f:"get",idApp:e,status:t})}install(e){return this.network.postCSRF({o:"studio",f:"install",value:e})}suspend(e){return this.network.postCSRF({o:"studio",f:"suspend",idApp:e})}restart(e){return this.network.postCSRF({o:"studio",f:"restart",idApp:e})}save(t,i,n){if(n===e.saved||n===e.autosaved)return this.network.postCSRF({o:"studio",f:"save",idApp:t,value:i,status:n});throw"Invalid status value"}delete(e,t){return i=this,n=void 0,s=function*(){return this.network.postCSRF({o:"studio",f:"delete",idApp:e,status:t}).then((e=>{if(0===e.error)return e.messages;throw e.messages}))},new((r=void 0)||(r=Promise))((function(e,t){function a(e){try{c(s.next(e))}catch(e){t(e)}}function o(e){try{c(s.throw(e))}catch(e){t(e)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(a,o)}c((s=s.apply(i,n||[])).next())}));var i,n,r,s}cssClassList(){return this.network.post({o:"studio",f:"icons"})}}function c(e){const t=e;return t&&"number"==typeof t.id&&"number"==typeof t.targetId}const l={bookmarkLink:c},d={isBookmarkLink:function(e){return"targetId"in e&&!!e.targetId},isBookmarkCustom:function(e){const t=e;return void 0!==t.bookmarkLabel||void 0!==t.bookmarkMeta||void 0!==t.bookmarkUrl},isBookmarkRawList:c,isTVChannelType:function(e,t){return"tvChannelType"in e&&e.tvChannelType===t},objectIsType:function(e,t){return null!=t&&l[e](t)},isStandardApiError:e=>"object"==typeof e&&null!==e&&"error"in e&&"errorMsg"in e&&"messages"in e&&"number"==typeof e.error&&"string"==typeof e.errorMsg&&Array.isArray(e.messages),isAbortApiError:e=>null!==e&&"object"==typeof e&&"error"in e&&"aborted"in e&&-1===e.error&&!0===e.aborted};function u(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function p(e,t){return e&&e.startsWith(t)?e.split("").slice(t.length).join(""):e}function m(e){return e.toString().padStart(2,"0")}function h(e){return"uri"in e&&e.uri?e.uri:`${e.type}/${e.recordId}`}function f(e){return p(u(e.from,"/"),"/")||""}function g(e){return e.timestamp?`?_=${e.timestamp}`:""}function y(e){const t=[];return"timestamp"in e&&e.timestamp&&t.push(`_=${e.timestamp}`),"iconColor"in e&&e.iconColor&&t.push(`color=${e.iconColor}`),t.length?"?"+t.join("&"):""}function v(e,t=2){return"size"in e&&e.size?e.size:"width"in e&&e.width&&"height"in e&&e.height?`${e.width*t}x${e.height*t}`:""}function b(e){return e.format||"png"}function w(e){try{return new URL(e)}catch(e){}try{return new URL(window.location.origin+"/"+p(e,"/"))}catch(e){}}function _(e,t=2){if("url"in e&&e.url){const t=w(e.url);if(t)return"timestamp"in e&&e.timestamp&&!t.searchParams.has("_")&&t.searchParams.append("_",e.timestamp.toString()),t.toString()}return`/${f(e)}${v(e,t)}/${h(e)}.${b(e)}${y(e)}`}const k=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pdf","application/zip","application/illustrator","application/postscript","application/vnd.ms-opentype","application/x-font-ttf","application/octet-stream","audio/mp3","audio/mpeg","font/ttf","font/otf","image/jpeg","image/jpg","image/png","image/gif","image/vnd.adobe.photoshop","image/svg+xml","text/plain","text/csv","video/mp4","video/webm"],x=["docx","xlsx","csv","pptx","pdf","zip","ai","mp3","mpeg","ttf","otf","jpg","jpeg","png","gif","psd","svg","txt","mp4","odt","webm"],j={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.oasis.opendocument.text":"odt","application/pdf":"pdf","application/zip":"zip","application/x-zip-compressed":"zip","application/illustrator":"ai","application/postscript":"ai","audio/mp3":"mp3","audio/mpeg":"mpeg","font/ttf":"ttf","font/otf":"otf","image/jpeg":"jpeg","image/jpg":"jpg","image/png":"png","image/gif":"gif","application/x-font-ttf":"ttf","application/vnd.ms-opentype":"otf","image/vnd.adobe.photoshop":"psd","image/svg+xml":"svg","text/plain":"txt","text/csv":"xlsx","video/mp4":"mp4","video/webm":"mp4"},S=e=>Object.keys(j).find((t=>j[t]===e)),A=e=>{var t;return null!==(t=j[e])&&void 0!==t?t:void 0};function O(e){const t=String(e).split(".").pop();return x.find((e=>e===t))}const T=e=>{var t;const i=O(e);return null!==(t=S(i))&&void 0!==t?t:"application/octet-stream"},C=e=>e?(new Date(e).getTime()/1e3).toFixed(0):void 0,F=(e,t="fitx80")=>{const i=N(e),n=C(e.dateModified);switch(i){default:return;case"video":return`/media/${e.id}.mp4?stream=true`+(n?`&_=${n}`:"");case"audio":return`/media/${e.id}.mp3`+(n?`?_=${n}`:"");case"gif":return _({timestamp:n,size:t,from:"imagecache",uri:e.uri,format:"gif"});case"image":return _({timestamp:n,size:t,from:"imagecache",uri:e.uri})}},R=e=>{const t=O(e);return void 0!==t?E(S(t)):"application"},L=e=>-1!==["image/vnd","image/svg","image/heic"].findIndex((t=>e.startsWith(t)));function E(e){return e&&e.startsWith("folder/")?"folder":null==e||L(e)?"application":e.startsWith("image/gif")?"gif":e.startsWith("image/")?"image":e.startsWith("video/")?"video":e.startsWith("audio/")?"audio":e.startsWith("font/")||e.startsWith("application/x-font-ttf")||e.startsWith("application/vnd.ms-opentype")?"font":e.startsWith("text/")?"text":"application"}const P=(e,t,i="rr")=>"ng"===i?`/ng/file/${e}/${t}`:`/ng/rr/file/${e}/${t}`,Z=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?T(e.title):e.mimetype,N=e=>void 0===e.mimetype||"application/octet-stream"===e.mimetype?R(e.title):E(e.mimetype);var I=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function o(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class M{constructor(e,t="api-front"){this.window=e,this.action=t}static _formatPostOptions(e){const t=e?{body:JSON.stringify(e)}:void 0;return Object.assign({method:"POST",credentials:"same-origin"},t)}getUrl(e,t){return I(this,void 0,void 0,(function*(){const i=yield this.window.getBackendUrl();let n;try{n=new URL(`/${this.action}/${e}/${t}`,i).href}catch(r){n=`${i}/${this.action}/${e}/${t}`}return n}))}getHostname(){return I(this,void 0,void 0,(function*(){const e=(yield this.window.getBackendUrl()).split("//");return e.length>1?e[1]:e[0]}))}fetch(e,t){var{o:i,f:n}=e,r=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}(e,["o","f"]);return I(this,void 0,void 0,(function*(){void 0===t&&(t=null);const e=yield this.getUrl(i,n);return this.window.fetch(e,Object.assign(Object.assign({},M._formatPostOptions(r)),{signal:t}))}))}post(e,t){return this.fetch(e,t).then((e=>e.json())).then((e=>{if(0===e.error)return e;throw{error:e.error,errorMsg:e.errorMsg,messages:e.messages}})).catch((e=>{if(t&&t.aborted)throw{error:-1,aborted:!0};throw e}))}postFile(e){return I(this,void 0,void 0,(function*(){const t=yield this.getUrl("file","create");if(e.append("format","raw-little"),!e.has("token")){const{result:t}=yield this.token();e.append("token",t)}const i=e.get("token");return i&&"string"==typeof i?this.window.fetch(t,{method:"POST",credentials:"same-origin",body:e}).then((e=>e.json())).then((e=>({response:e,token:i}))):Promise.reject("Missing token")}))}postCSRF(e){return this.tokenCSRF().then((t=>this.post(Object.assign(e,{tokenCSRF:t.result}))))}postToken(e){return this.token().then((t=>this.post(Object.assign(e,{token:t.result}))))}maybePostToken(e){return"token"in e&&e.token?this.post(e):this.postToken(e)}token(){return this.post({o:"misc",f:"token"})}tokenCSRF(){return this.post({o:"misc",f:"tokenCSRF"})}}const D=Array.isArray,U=Object.keys,$=Object.prototype.hasOwnProperty;function q(e,t,i){const n=null==i?void 0:i.map((e=>e.split(".")));if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const r=D(e),s=D(t);let a,o,c;if(r&&s){if(o=e.length,o!==t.length)return!1;for(a=o;0!=a--;)if(!q(e[a],t[a],i))return!1;return!0}if(r!==s)return!1;const l=e instanceof Date,d=t instanceof Date;if(l!==d)return!1;if(l&&d)return e.getTime()===t.getTime();const u=e instanceof RegExp,p=t instanceof RegExp;if(u!==p)return!1;if(u&&p)return e.toString()===t.toString();const m=U(e).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e)))));if(o=m.length,o!==U(t).filter((e=>!(null==n?void 0:n.some((t=>1===t.length&&t[0]===e))))).length)return!1;for(a=o;0!=a--;)if(!$.call(t,m[a]))return!1;for(a=o;0!=a--;)if(c=m[a],!("_owner"===c&&e.$$typeof||q(e[c],t[c],null==n?void 0:n.filter((e=>e.length>1&&e[0]===c)).map((e=>e.splice(1).join("."))))))return!1;return!0}return e!=e&&t!=t}function B(e,t){if(Array.isArray(e))return e.map((e=>B(e,t)));if("object"==typeof e&&null!==e){let i={};return Object.keys(e).forEach((n=>{i=Object.assign(Object.assign({},i),{[n]:n&&t.includes(n)?typeof e[n]:B(e[n],t)})})),i}return e}const W=(e,t)=>Array.isArray(t)&&t.length?[e,...t].join(","):e;function z(e){return e.startsWith("tag_")||"tags"===e}function V(e){return Object.fromEntries(Object.entries(e).filter((([e])=>z(e))))}function J(e,t,i){return Object.fromEntries(Object.entries(e).filter((([e])=>z(e))).map((([e,n])=>{const r=Array.isArray(n)?n.map((e=>"object"==typeof e&&e&&t in e?e[t]:e)):n;return[e,i?i(r):r]})))}function G(e){return J(e,"uri")}const K=e=>{var t;let i={};"_errors"in e&&(i._errors=e._errors),"_options"in e&&(i._options=e._options),"title"in e&&(i.title=e.title),"description"in e&&(i.description=e.description),"activity"in e&&(i.activity=e.activity),"image"in e&&(i.image=e.image),"uri"in e&&(i.uri=e.uri),"type"in e&&(i.type=e.type),"edito"in e&&(i.edito=e.edito),"category"in e&&(i.category=e.category.toString()),"commentLevel"in e&&(i.commentLevel=e.commentLevel),"_options"in e&&(null===(t=e._options)||void 0===t?void 0:t.custom_widgets)&&(i.custom_widgets=Array.isArray(e._options.custom_widgets)?{}:e._options.custom_widgets),"displayType"in e&&(i.displayType=e.displayType),"language"in e&&(i.language=e.language),"edit_access"in e&&(i.edit_access=e.edit_access),"lock_mail"in e&&(i.lock_mail=e.lock_mail),"fileSyncEnabled"in e&&(i.fileSyncEnabled=e.fileSyncEnabled),"fileSyncVersioningType"in e&&(i.fileSyncVersioningType=e.fileSyncVersioningType),"fileBankQuota"in e&&(i.fileBankQuota=e.fileBankQuota),"idCommunity"in e&&(i.idCommunity=e.idCommunity),"lastRssExecution"in e&&(i.lastRssExecution=e.lastRssExecution),"mail_comment"in e&&(i.mail_comment=e.mail_comment),"mail_frequency"in e&&(i.mail_frequency=e.mail_frequency),"mail_spotit"in e&&(i.mail_spotit=e.mail_spotit),"mail_subscriber"in e&&(i.mail_subscriber=e.mail_subscriber),"notifyFolder"in e&&(i.notifyFolder=e.notifyFolder),"nounsubscribe"in e&&(i.nounsubscribe=e.nounsubscribe),"privacy"in e&&(i.privacy=e.privacy),"publishFolder"in e&&(i.publishFolder=e.publishFolder),"rss_access"in e&&(i.rss_access=e.rss_access),"rss_feed"in e&&(i.rss_feed=e.rss_feed&&Array.isArray(e.rss_feed)?JSON.stringify(e.rss_feed.map((e=>{var{_user:t}=e,i=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}(e,["_user"]);return Object.assign(Object.assign({},i),{idUser:null==t?void 0:t.id})}))):"[]"),"rss_key"in e&&(i.rss_key=e.rss_key),"spot_right_user"in e&&(i.spot_right_user=e.spot_right_user),"spotBanner"in e&&(i.spotBanner=e.spotBanner),"spotDefaultPublishType"in e&&(i.spotDefaultPublishType=e.spotDefaultPublishType),"user_level_signup"in e&&(i.user_level_signup=e.user_level_signup),"useTeaser"in e&&(i.useTeaser=e.useTeaser),"widgets"in e&&(i.widgets=e.widgets);const n=V(e);if(i=Object.assign(Object.assign({},i),n),H(e,i))return i;throw new Error},H=(e,t)=>{const i=["id","mainType","dateCreation","dateModified","_url","o2apLinksSources"],n=["custom_widgets"],r=Object.keys(e),s=Object.keys(t),a=r.filter((e=>!s.includes(e)&&!i.includes(e))),o=s.filter((e=>!r.includes(e)&&!n.includes(e))),c=[...a.map((e=>"- "+e)),...o.map((e=>"+ "+e))];if(a.length>0||o.length>0)throw new Error(`prepareGroupForUpdate :: Wrong group mapping | Diff : ${JSON.stringify(c)}`);return!0};class Q extends n{list(e){var t,i;return this.network.post(Object.assign(Object.assign({o:"objectList",f:"jamespotArticleQueryList"},e),{format:W(null!==(t=e.format)&&void 0!==t?t:"raw-list",null!==(i=e.formatExtend)&&void 0!==i?i:[])}))}get(e,t){var i;return this.network.post(Object.assign(Object.assign({o:"article",f:"get"},e),{format:W(null!==(i=e.format)&&void 0!==i?i:"raw-view",null==t?void 0:t.formatExtension)}),null==t?void 0:t.signal)}create(e,t){return this.network.maybePostToken(Object.assign({o:"article",f:"create",format:null!=t?t:"raw-list"},e))}update(e){return this.network.post(Object.assign(Object.assign({format:"raw-list"},e),{o:"article",f:"update"}))}delete(e){return this.network.postCSRF({o:"article",f:"delete",idArticle:e})}count(e){return this.network.post({o:"article",f:"count",type:e})}getAttachments(e,t,i){return this.network.post({o:"article",f:"getAttachment",idArticle:e,type:t,format:i})}permalink(e){return this.network.post({o:"article",f:"permalink",permalinkId:e})}saveAsDraft(e,t,i){return this.network.post({o:"article",f:"saveAsDraft",form:e,contentType:t,idDraft:i})}getComments(e,t){var i,n;return this.network.post(Object.assign(Object.assign({o:"article",f:"getComments"},e),{attachments:null!==(i=e.attachment)&&void 0!==i&&i,limits:null!==(n=e.limits)&&void 0!==n?n:{start:0,max:1e4},format:null!=t?t:"raw-little"}))}addComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"addComment"},e),{alertAuthor:Number(e.alertAuthor),sendAlert:Number(e.sendAlert),type:"comment",format:null!=t?t:"raw-little"}))}updateComment(e,t){return this.network.post(Object.assign(Object.assign({o:"article",f:"updateComment"},e),{format:null!=t?t:"raw-little"}))}deleteComment(e){return this.network.postCSRF({o:"comment",f:"delete",idComment:e})}getRead(e){return this.network.post({o:"article",f:"getRead",uri:e})}}var Y=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i};class X extends n{configuration(){return this.network.post({o:"assetReservation",f:"configuration"})}createReservation(e){return this.network.postCSRF(Object.assign({o:"assetReservation",f:"createReservation",format:"raw-list"},e))}getReservations(e){var{format:t="raw-list"}=e,i=Y(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"getReservations",format:t},i))}cancelReservation(e){return this.network.post({o:"assetReservation",f:"cancelReservation",format:"raw-list",idArticle:e})}bookByDate(e){var{format:t="raw-list"}=e,i=Y(e,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"BookByDate",format:t},i))}getList(e){var{format:t="raw-list"}=e,i=Y(e,["format"]);return this.network.post(Object.assign({o:"objectList",f:"assetReservationList",format:t},i))}}class ee extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"audience",q:e}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}}class te extends n{publicWebinarFullname(e){return this.network.post(Object.assign({o:"bigBlueButton",f:"publicWebinarFullname"},e))}getPublicWebinarData(e){return this.network.post(Object.assign({o:"bigBlueButton",f:"getPublicWebinarData"},e))}}class ie extends n{getFormattedList(e,t){return this.network.post(Object.assign({o:"objectList",f:"bookmarksList",format:t},e))}addFormattedLink(e,t,i){const n=null!=i?i:"list";return this.network.post({o:"custom",f:"actionAdd",type:"bookmarkLink",targetId:e,targetType:t,format:n})}addBookmark(e,t){return this.network.postCSRF(Object.assign({o:"bookmarks",f:"add"},e))}delete(e){return this.network.postCSRF({o:"bookmarks",f:"delete",bookmarkID:e})}rename(e,t,i){return this.network.postCSRF({o:"bookmarks",f:"rename",bookmarkID:e,bookmarkLabel:t,bookmarkUrl:i})}move(e,t,i){return this.network.postCSRF({o:"bookmarks",f:"move",bookmarkID:e,bookmarkReference:t,bookmarkPosition:i})}}class ne extends n{getInfos(e,t){return this.network.post({o:"BusinessNetworking",f:"MarkerInfo",id:e,format:null!=t?t:"raw-little"})}}class re extends n{get(e,t){return this.network.post({o:"community",f:"getCommunity",idCommunity:e,format:t||"raw-little"})}sendRequest(e,t){return this.network.post({o:"community",f:"sendRequest",message:e,idUserTo:t})}autocomplete(e){return this.network.post({o:"autocomplete",f:"community",q:e}).then((e=>e.result))}}class se extends n{create(e,t,i,n,r){return this.network.post({o:"article",f:"create",type:e,token:t,title:i,dateStart:n,publishTo:r})}getList(e="",t=[],i=[],n=1,r="raw-list"){return this.network.post({o:"objectList",f:"diapazoneQueryList",query:e,filters:t,orders:i,page:n,format:r})}}var ae=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function o(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class oe extends n{upload(e){const t=new FormData;return t.append("attrName",e.attrName),e.file?t.append(e.attrName,e.file):e.url&&t.append("url",e.url),t.append("token",e.token),this.network.postFile(t)}uploadMany(e){return ae(this,void 0,void 0,(function*(){return Promise.all(e.map((e=>this.upload(e))))}))}get(e,t){return ae(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"get",idFile:e,format:t})}))}getParent(e,t){return ae(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getParent",idFile:e,format:t})}))}getWithHash(e,t,i){return ae(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getWithHash",idFile:e,hash:t,format:i})}))}duplicate(e,t,i){return ae(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"duplicateFile",idFile:e,title:t,publishTo:i})}))}updateFile(e,t){return ae(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"updateFile",idFile:e,title:t})}))}update(e,t,i){return ae(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"update",idFile:e,type:t,cropDatas:Object.assign(Object.assign({},i),{rotateBeforeCrop:!0}),killSize:i.killSize,format:"raw-little"})}))}deleteFile(e,t,i,n){return ae(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"delete",idFile:e,attrName:t,token:i},n)}))}deleteImage(e,t){return ae(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"deleteImage",id:e,type:t})}))}getDownload(e){return this.network.post({o:"file",f:"getDownload",id:e})}generatePreview(e){return this.network.post({o:"file",f:"generatePreview",id:e})}}class ce extends n{getCategoriesList(e,t){return this.network.post({o:"objectList",f:"faqQueryList",format:null!=e?e:"raw-list",orders:null!=t?t:[{name:"dateCreation",sort:"ASC"}]})}createCategory(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{type:"faq"}),null!=t?t:"raw-view")}updateCategory(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faq",format:null!=t?t:"raw-view"}))}getCategory(e,t){return this.jApi.article.get({idArticle:e,format:null!=t?t:"raw-view"})}deleteCategory(e){return this.jApi.article.delete(e)}checkItem(e,t,i){return this.network.post({o:"faq",f:"checkItem",query:e,page:null!=t?t:1,format:null!=i?i:"raw-list"})}getTaxonomy(){return this.network.post({o:"faq",f:"getFaqTaxonomy"})}getHookProperties(e){return this.network.post({o:"faq",f:"getHookProperties",properties:null!=e?e:["_web"]})}getAccess(){return this.network.post({o:"faq",f:"access"})}createTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-theme"},e),{format:null!=t?t:"raw-view"}))}deleteTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"delete-theme"},e),{format:null!=t?t:"raw-view"}))}updateTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"set-theme"},e),{format:null!=t?t:"raw-view"}))}getEntry(e,t){return this.network.post({o:"faq",f:"get-entry",uri:e,format:null!=t?t:"raw-view"})}deleteEntry(e){return this.jApi.article.delete(e)}createEntry(e,t){return this.jApi.article.create(Object.assign(Object.assign({},e),{idSpot:["content"],type:"faqItem"}),null!=t?t:"raw-view")}addEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-entry"},e),{format:null!=t?t:"raw-view"}))}updateEntry(e,t){return this.jApi.article.update(Object.assign(Object.assign({},e),{type:"faqItem",format:null!=t?t:"raw-view"}))}moveEntry(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-entry"},e),{format:null!=t?t:"raw-view"}))}moveTheme(e,t){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-theme"},e),{format:null!=t?t:"raw-view"}))}}class le extends n{getBanks(e="list"){return this.network.post({o:"fileBank",f:"getBanks",format:e}).then((e=>e.result))}getFolders(e){return this.network.post({o:"fileBank",f:"getFolders",parentURI:e})}getDocuments(e){return this.network.post({o:"fileBank",f:"getDocuments",parentURI:e})}}class de extends n{countAction(e,t){return this.network.post({o:"activityLog",f:"log",count:!0,verb:e,uri:t})}useWebVersion(){return this.network.post({o:"global",f:"useWebVersion"})}}var ue,pe;class me extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"spot",q:e,idToUri:!1}).then((e=>e.result))}create(e,t){return this.network.post(Object.assign(Object.assign({o:"spot",f:"create"},e),{format:t}))}update(e,t){const{spotBanner:i}=e,n=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}(e,["spotBanner"]);return this.network.postCSRF(Object.assign(Object.assign({o:"spot",f:"update"},n),{format:t}))}getSpot(e,t){return this.network.post({o:"spot",f:"getSpot",idSpot:e,format:t})}getProperties(e){return this.network.post({o:"spot",f:"getProperties",idSpot:e})}getApplications(){return this.network.post({o:"spot",f:"get-available-widget"})}getCategories(){return this.network.post({o:"spot",f:"get-categories"})}getObjectListJamespotSpotMembers(e,t,i,n=1){return this.network.post({o:"objectListJamespot",f:"SpotMembers",idSpot:e,limit:i,page:n,format:"raw-little",query:t})}list(e){return this.network.post(Object.assign({o:"objectList",f:"jamespotSpotQueryList"},e))}resetNotifications(e){return this.network.post(Object.assign({o:"spot",f:"resetNotifications"},e))}getUserLevelAndRight(e){return this.network.post({o:"spot",f:"getUserLevelAndRight",idSpot:e})}groupRequest(e){return this.network.postCSRF({o:"spot",f:"request",idSpot:e})}groupAddToFavorite(e){return this.network.postCSRF({o:"spot",f:"addToFavorite",idSpot:e})}}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const i of e)t[i]=i;return t},e.getValidEnumValues=t=>{const i=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of i)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t},e.find=(e,t)=>{for(const i of e)if(t(i))return i},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(ue||(ue={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(pe||(pe={}));const he=ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fe=e=>{switch(typeof e){case"undefined":return he.undefined;case"string":return he.string;case"number":return isNaN(e)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(e)?he.array:null===e?he.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?he.promise:"undefined"!=typeof Map&&e instanceof Map?he.map:"undefined"!=typeof Set&&e instanceof Set?he.set:"undefined"!=typeof Date&&e instanceof Date?he.date:he.object;default:return he.unknown}},ge=ue.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ye extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},i={_errors:[]},n=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(n);else if("invalid_return_type"===r.code)n(r.returnTypeError);else if("invalid_arguments"===r.code)n(r.argumentsError);else if(0===r.path.length)i._errors.push(t(r));else{let e=i,n=0;for(;n<r.path.length;){const i=r.path[n];n===r.path.length-1?(e[i]=e[i]||{_errors:[]},e[i]._errors.push(t(r))):e[i]=e[i]||{_errors:[]},e=e[i],n++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,ue.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},i=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:t}}get formErrors(){return this.flatten()}}ye.create=e=>new ye(e);const ve=(e,t)=>{let i;switch(e.code){case ge.invalid_type:i=e.received===he.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(e.expected,ue.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:i=`Unrecognized key(s) in object: ${ue.joinValues(e.keys,", ")}`;break;case ge.invalid_union:i="Invalid input";break;case ge.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${ue.joinValues(e.options)}`;break;case ge.invalid_enum_value:i=`Invalid enum value. Expected ${ue.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:i="Invalid function arguments";break;case ge.invalid_return_type:i="Invalid function return type";break;case ge.invalid_date:i="Invalid date";break;case ge.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(i=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(i=`${i} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?i=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?i=`Invalid input: must end with "${e.validation.endsWith}"`:ue.assertNever(e.validation):i="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case ge.too_small:i="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case ge.too_big:i="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case ge.custom:i="Invalid input";break;case ge.invalid_intersection_types:i="Intersection results could not be merged";break;case ge.not_multiple_of:i=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:i="Number must be finite";break;default:i=t.defaultError,ue.assertNever(e)}return{message:i}};let be=ve;function we(){return be}const _e=e=>{const{data:t,path:i,errorMaps:n,issueData:r}=e,s=[...i,...r.path||[]],a={...r,path:s};let o="";const c=n.filter((e=>!!e)).slice().reverse();for(const e of c)o=e(a,{data:t,defaultError:o}).message;return{...r,path:s,message:r.message||o}};function ke(e,t){const i=_e({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,we(),ve].filter((e=>!!e))});e.common.issues.push(i)}class xe{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const i=[];for(const n of t){if("aborted"===n.status)return je;"dirty"===n.status&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){const i=[];for(const e of t)i.push({key:await e.key,value:await e.value});return xe.mergeObjectSync(e,i)}static mergeObjectSync(e,t){const i={};for(const n of t){const{key:t,value:r}=n;if("aborted"===t.status)return je;if("aborted"===r.status)return je;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!n.alwaysSet||(i[t.value]=r.value)}return{status:e.value,value:i}}}const je=Object.freeze({status:"aborted"}),Se=e=>({status:"dirty",value:e}),Ae=e=>({status:"valid",value:e}),Oe=e=>"aborted"===e.status,Te=e=>"dirty"===e.status,Ce=e=>"valid"===e.status,Fe=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Re;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Re||(Re={}));class Le{constructor(e,t,i,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ee=(e,t)=>{if(Ce(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ye(e.common.issues);return this._error=t,this._error}}};function Pe(e){if(!e)return{};const{errorMap:t,invalid_type_error:i,required_error:n,description:r}=e;if(t&&(i||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=i?i:t.defaultError},description:r}}class Ze{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return fe(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:fe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new xe,ctx:{common:e.parent.common,data:e.data,parsedType:fe(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Fe(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const i=this.safeParse(e,t);if(i.success)return i.data;throw i.error}safeParse(e,t){var i;const n={common:{issues:[],async:null!==(i=null==t?void 0:t.async)&&void 0!==i&&i,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fe(e)},r=this._parseSync({data:e,path:n.path,parent:n});return Ee(n,r)}async parseAsync(e,t){const i=await this.safeParseAsync(e,t);if(i.success)return i.data;throw i.error}async safeParseAsync(e,t){const i={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fe(e)},n=this._parse({data:e,path:i.path,parent:i}),r=await(Fe(n)?n:Promise.resolve(n));return Ee(i,r)}refine(e,t){const i=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const r=e(t),s=()=>n.addIssue({code:ge.custom,...i(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(s(),!1))):!!r||(s(),!1)}))}refinement(e,t){return this._refinement(((i,n)=>!!e(i)||(n.addIssue("function"==typeof t?t(i,n):t),!1)))}_refinement(e){return new kt({schema:this,typeName:Pt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return xt.create(this,this._def)}nullable(){return jt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nt.create(this,this._def)}promise(){return _t.create(this,this._def)}or(e){return at.create([this,e],this._def)}and(e){return dt.create(this,e,this._def)}transform(e){return new kt({...Pe(this._def),schema:this,typeName:Pt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new St({...Pe(this._def),innerType:this,defaultValue:t,typeName:Pt.ZodDefault})}brand(){return new Ct({typeName:Pt.ZodBranded,type:this,...Pe(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new At({...Pe(this._def),innerType:this,catchValue:t,typeName:Pt.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ft.create(this,e)}readonly(){return Rt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ne=/^c[^\s-]{8,}$/i,Ie=/^[a-z][a-z0-9]*$/,Me=/^[0-9A-HJKMNP-TV-Z]{26}$/,De=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ue=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let $e;const qe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Be=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class We extends Ze{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==he.string){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.string,received:t.parsedType}),je}const t=new xe;let i;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const n=e.data.length>a.value,r=e.data.length<a.value;(n||r)&&(i=this._getOrReturnCtx(e,i),n?ke(i,{code:ge.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&ke(i,{code:ge.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)Ue.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"email",code:ge.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)$e||($e=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),$e.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"emoji",code:ge.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)De.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"uuid",code:ge.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)Ne.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"cuid",code:ge.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)Ie.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"cuid2",code:ge.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)Me.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"ulid",code:ge.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(n){i=this._getOrReturnCtx(e,i),ke(i,{validation:"url",code:ge.invalid_string,message:a.message}),t.dirty()}else"regex"===a.kind?(a.regex.lastIndex=0,a.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{validation:"regex",code:ge.invalid_string,message:a.message}),t.dirty())):"trim"===a.kind?e.data=e.data.trim():"includes"===a.kind?e.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty()):"toLowerCase"===a.kind?e.data=e.data.toLowerCase():"toUpperCase"===a.kind?e.data=e.data.toUpperCase():"startsWith"===a.kind?e.data.startsWith(a.value)||(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty()):"endsWith"===a.kind?e.data.endsWith(a.value)||(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty()):"datetime"===a.kind?((s=a).precision?s.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${s.precision}}Z$`):0===s.precision?s.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):s.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.invalid_string,validation:"datetime",message:a.message}),t.dirty()):"ip"===a.kind?(n=e.data,("v4"!==(r=a.version)&&r||!qe.test(n))&&("v6"!==r&&r||!Be.test(n))&&(i=this._getOrReturnCtx(e,i),ke(i,{validation:"ip",code:ge.invalid_string,message:a.message}),t.dirty())):ue.assertNever(a);var n,r,s;return{status:t.value,value:e.data}}_regex(e,t,i){return this.refinement((t=>e.test(t)),{validation:t,code:ge.invalid_string,...Re.errToObj(i)})}_addCheck(e){return new We({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Re.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Re.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Re.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Re.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Re.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Re.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Re.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Re.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...Re.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Re.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Re.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Re.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Re.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Re.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Re.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Re.errToObj(t)})}nonempty(e){return this.min(1,Re.errToObj(e))}trim(){return new We({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new We({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new We({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ze(e,t){const i=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=i>n?i:n;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}We.create=e=>{var t;return new We({checks:[],typeName:Pt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Pe(e)})};class Ve extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==he.number){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.number,received:t.parsedType}),je}let t;const i=new xe;for(const n of this._def.checks)"int"===n.kind?ue.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.invalid_type,expected:"integer",received:"float",message:n.message}),i.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),i.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),i.dirty()):"multipleOf"===n.kind?0!==ze(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.not_finite,message:n.message}),i.dirty()):ue.assertNever(n);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Re.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Re.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Re.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Re.toString(t))}setLimit(e,t,i,n){return new Ve({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:Re.toString(n)}]})}_addCheck(e){return new Ve({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Re.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Re.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Re.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&ue.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const i of this._def.checks){if("finite"===i.kind||"int"===i.kind||"multipleOf"===i.kind)return!0;"min"===i.kind?(null===t||i.value>t)&&(t=i.value):"max"===i.kind&&(null===e||i.value<e)&&(e=i.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Ve.create=e=>new Ve({checks:[],typeName:Pt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Pe(e)});class Je extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==he.bigint){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.bigint,received:t.parsedType}),je}let t;const i=new xe;for(const n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),i.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),i.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),ke(t,{code:ge.not_multiple_of,multipleOf:n.value,message:n.message}),i.dirty()):ue.assertNever(n);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Re.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Re.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Re.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Re.toString(t))}setLimit(e,t,i,n){return new Je({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:i,message:Re.toString(n)}]})}_addCheck(e){return new Je({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Re.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Je.create=e=>{var t;return new Je({checks:[],typeName:Pt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Pe(e)})};class Ge extends Ze{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==he.boolean){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.boolean,received:t.parsedType}),je}return Ae(e.data)}}Ge.create=e=>new Ge({typeName:Pt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Pe(e)});class Ke extends Ze{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==he.date){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.date,received:t.parsedType}),je}if(isNaN(e.data.getTime()))return ke(this._getOrReturnCtx(e),{code:ge.invalid_date}),je;const t=new xe;let i;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(i=this._getOrReturnCtx(e,i),ke(i,{code:ge.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):ue.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ke({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Re.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Re.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Ke.create=e=>new Ke({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Pt.ZodDate,...Pe(e)});class He extends Ze{_parse(e){if(this._getType(e)!==he.symbol){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.symbol,received:t.parsedType}),je}return Ae(e.data)}}He.create=e=>new He({typeName:Pt.ZodSymbol,...Pe(e)});class Qe extends Ze{_parse(e){if(this._getType(e)!==he.undefined){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.undefined,received:t.parsedType}),je}return Ae(e.data)}}Qe.create=e=>new Qe({typeName:Pt.ZodUndefined,...Pe(e)});class Ye extends Ze{_parse(e){if(this._getType(e)!==he.null){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.null,received:t.parsedType}),je}return Ae(e.data)}}Ye.create=e=>new Ye({typeName:Pt.ZodNull,...Pe(e)});class Xe extends Ze{constructor(){super(...arguments),this._any=!0}_parse(e){return Ae(e.data)}}Xe.create=e=>new Xe({typeName:Pt.ZodAny,...Pe(e)});class et extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ae(e.data)}}et.create=e=>new et({typeName:Pt.ZodUnknown,...Pe(e)});class tt extends Ze{_parse(e){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.never,received:t.parsedType}),je}}tt.create=e=>new tt({typeName:Pt.ZodNever,...Pe(e)});class it extends Ze{_parse(e){if(this._getType(e)!==he.undefined){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.void,received:t.parsedType}),je}return Ae(e.data)}}it.create=e=>new it({typeName:Pt.ZodVoid,...Pe(e)});class nt extends Ze{_parse(e){const{ctx:t,status:i}=this._processInputParams(e),n=this._def;if(t.parsedType!==he.array)return ke(t,{code:ge.invalid_type,expected:he.array,received:t.parsedType}),je;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,r=t.data.length<n.exactLength.value;(e||r)&&(ke(t,{code:e?ge.too_big:ge.too_small,minimum:r?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(ke(t,{code:ge.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(ke(t,{code:ge.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),t.common.async)return Promise.all([...t.data].map(((e,i)=>n.type._parseAsync(new Le(t,e,t.path,i))))).then((e=>xe.mergeArray(i,e)));const r=[...t.data].map(((e,i)=>n.type._parseSync(new Le(t,e,t.path,i))));return xe.mergeArray(i,r)}get element(){return this._def.type}min(e,t){return new nt({...this._def,minLength:{value:e,message:Re.toString(t)}})}max(e,t){return new nt({...this._def,maxLength:{value:e,message:Re.toString(t)}})}length(e,t){return new nt({...this._def,exactLength:{value:e,message:Re.toString(t)}})}nonempty(e){return this.min(1,e)}}function rt(e){if(e instanceof st){const t={};for(const i in e.shape){const n=e.shape[i];t[i]=xt.create(rt(n))}return new st({...e._def,shape:()=>t})}return e instanceof nt?new nt({...e._def,type:rt(e.element)}):e instanceof xt?xt.create(rt(e.unwrap())):e instanceof jt?jt.create(rt(e.unwrap())):e instanceof ut?ut.create(e.items.map((e=>rt(e)))):e}nt.create=(e,t)=>new nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Pt.ZodArray,...Pe(t)});class st extends Ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=ue.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==he.object){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.object,received:t.parsedType}),je}const{status:t,ctx:i}=this._processInputParams(e),{shape:n,keys:r}=this._getCached(),s=[];if(!(this._def.catchall instanceof tt&&"strip"===this._def.unknownKeys))for(const e in i.data)r.includes(e)||s.push(e);const a=[];for(const e of r){const t=n[e],r=i.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new Le(i,r,i.path,e)),alwaysSet:e in i.data})}if(this._def.catchall instanceof tt){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of s)a.push({key:{status:"valid",value:e},value:{status:"valid",value:i.data[e]}});else if("strict"===e)s.length>0&&(ke(i,{code:ge.unrecognized_keys,keys:s}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of s){const n=i.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new Le(i,n,i.path,t)),alwaysSet:t in i.data})}}return i.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const i=await t.key;e.push({key:i,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>xe.mergeObjectSync(t,e))):xe.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return Re.errToObj,new st({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,i)=>{var n,r,s,a;const o=null!==(s=null===(r=(n=this._def).errorMap)||void 0===r?void 0:r.call(n,t,i).message)&&void 0!==s?s:i.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=Re.errToObj(e).message)&&void 0!==a?a:o}:{message:o}}}:{}})}strip(){return new st({...this._def,unknownKeys:"strip"})}passthrough(){return new st({...this._def,unknownKeys:"passthrough"})}extend(e){return new st({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new st({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Pt.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new st({...this._def,catchall:e})}pick(e){const t={};return ue.objectKeys(e).forEach((i=>{e[i]&&this.shape[i]&&(t[i]=this.shape[i])})),new st({...this._def,shape:()=>t})}omit(e){const t={};return ue.objectKeys(this.shape).forEach((i=>{e[i]||(t[i]=this.shape[i])})),new st({...this._def,shape:()=>t})}deepPartial(){return rt(this)}partial(e){const t={};return ue.objectKeys(this.shape).forEach((i=>{const n=this.shape[i];e&&!e[i]?t[i]=n:t[i]=n.optional()})),new st({...this._def,shape:()=>t})}required(e){const t={};return ue.objectKeys(this.shape).forEach((i=>{if(e&&!e[i])t[i]=this.shape[i];else{let e=this.shape[i];for(;e instanceof xt;)e=e._def.innerType;t[i]=e}})),new st({...this._def,shape:()=>t})}keyof(){return vt(ue.objectKeys(this.shape))}}st.create=(e,t)=>new st({shape:()=>e,unknownKeys:"strip",catchall:tt.create(),typeName:Pt.ZodObject,...Pe(t)}),st.strictCreate=(e,t)=>new st({shape:()=>e,unknownKeys:"strict",catchall:tt.create(),typeName:Pt.ZodObject,...Pe(t)}),st.lazycreate=(e,t)=>new st({shape:e,unknownKeys:"strip",catchall:tt.create(),typeName:Pt.ZodObject,...Pe(t)});class at extends Ze{_parse(e){const{ctx:t}=this._processInputParams(e),i=this._def.options;if(t.common.async)return Promise.all(i.map((async e=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const i of e)if("dirty"===i.result.status)return t.common.issues.push(...i.ctx.common.issues),i.result;const i=e.map((e=>new ye(e.ctx.common.issues)));return ke(t,{code:ge.invalid_union,unionErrors:i}),je}));{let e;const n=[];for(const r of i){const i={...t,common:{...t.common,issues:[]},parent:null},s=r._parseSync({data:t.data,path:t.path,parent:i});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:i}),i.common.issues.length&&n.push(i.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=n.map((e=>new ye(e)));return ke(t,{code:ge.invalid_union,unionErrors:r}),je}}get options(){return this._def.options}}at.create=(e,t)=>new at({options:e,typeName:Pt.ZodUnion,...Pe(t)});const ot=e=>e instanceof gt?ot(e.schema):e instanceof kt?ot(e.innerType()):e instanceof yt?[e.value]:e instanceof bt?e.options:e instanceof wt?Object.keys(e.enum):e instanceof St?ot(e._def.innerType):e instanceof Qe?[void 0]:e instanceof Ye?[null]:null;class ct extends Ze{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==he.object)return ke(t,{code:ge.invalid_type,expected:he.object,received:t.parsedType}),je;const i=this.discriminator,n=t.data[i],r=this.optionsMap.get(n);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(ke(t,{code:ge.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,i){const n=new Map;for(const i of t){const t=ot(i.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,i)}}return new ct({typeName:Pt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...Pe(i)})}}function lt(e,t){const i=fe(e),n=fe(t);if(e===t)return{valid:!0,data:e};if(i===he.object&&n===he.object){const i=ue.objectKeys(t),n=ue.objectKeys(e).filter((e=>-1!==i.indexOf(e))),r={...e,...t};for(const i of n){const n=lt(e[i],t[i]);if(!n.valid)return{valid:!1};r[i]=n.data}return{valid:!0,data:r}}if(i===he.array&&n===he.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let n=0;n<e.length;n++){const r=lt(e[n],t[n]);if(!r.valid)return{valid:!1};i.push(r.data)}return{valid:!0,data:i}}return i===he.date&&n===he.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class dt extends Ze{_parse(e){const{status:t,ctx:i}=this._processInputParams(e),n=(e,n)=>{if(Oe(e)||Oe(n))return je;const r=lt(e.value,n.value);return r.valid?((Te(e)||Te(n))&&t.dirty(),{status:t.value,value:r.data}):(ke(i,{code:ge.invalid_intersection_types}),je)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}dt.create=(e,t,i)=>new dt({left:e,right:t,typeName:Pt.ZodIntersection,...Pe(i)});class ut extends Ze{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==he.array)return ke(i,{code:ge.invalid_type,expected:he.array,received:i.parsedType}),je;if(i.data.length<this._def.items.length)return ke(i,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&i.data.length>this._def.items.length&&(ke(i,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...i.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new Le(i,e,i.path,t)):null})).filter((e=>!!e));return i.common.async?Promise.all(n).then((e=>xe.mergeArray(t,e))):xe.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ut({...this._def,rest:e})}}ut.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ut({items:e,typeName:Pt.ZodTuple,rest:null,...Pe(t)})};class pt extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==he.object)return ke(i,{code:ge.invalid_type,expected:he.object,received:i.parsedType}),je;const n=[],r=this._def.keyType,s=this._def.valueType;for(const e in i.data)n.push({key:r._parse(new Le(i,e,i.path,e)),value:s._parse(new Le(i,i.data[e],i.path,e))});return i.common.async?xe.mergeObjectAsync(t,n):xe.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,i){return new pt(t instanceof Ze?{keyType:e,valueType:t,typeName:Pt.ZodRecord,...Pe(i)}:{keyType:We.create(),valueType:e,typeName:Pt.ZodRecord,...Pe(t)})}}class mt extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==he.map)return ke(i,{code:ge.invalid_type,expected:he.map,received:i.parsedType}),je;const n=this._def.keyType,r=this._def.valueType,s=[...i.data.entries()].map((([e,t],s)=>({key:n._parse(new Le(i,e,i.path,[s,"key"])),value:r._parse(new Le(i,t,i.path,[s,"value"]))})));if(i.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const i of s){const n=await i.key,r=await i.value;if("aborted"===n.status||"aborted"===r.status)return je;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const i of s){const n=i.key,r=i.value;if("aborted"===n.status||"aborted"===r.status)return je;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}}}mt.create=(e,t,i)=>new mt({valueType:t,keyType:e,typeName:Pt.ZodMap,...Pe(i)});class ht extends Ze{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.parsedType!==he.set)return ke(i,{code:ge.invalid_type,expected:he.set,received:i.parsedType}),je;const n=this._def;null!==n.minSize&&i.data.size<n.minSize.value&&(ke(i,{code:ge.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&i.data.size>n.maxSize.value&&(ke(i,{code:ge.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const r=this._def.valueType;function s(e){const i=new Set;for(const n of e){if("aborted"===n.status)return je;"dirty"===n.status&&t.dirty(),i.add(n.value)}return{status:t.value,value:i}}const a=[...i.data.values()].map(((e,t)=>r._parse(new Le(i,e,i.path,t))));return i.common.async?Promise.all(a).then((e=>s(e))):s(a)}min(e,t){return new ht({...this._def,minSize:{value:e,message:Re.toString(t)}})}max(e,t){return new ht({...this._def,maxSize:{value:e,message:Re.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ht.create=(e,t)=>new ht({valueType:e,minSize:null,maxSize:null,typeName:Pt.ZodSet,...Pe(t)});class ft extends Ze{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==he.function)return ke(t,{code:ge.invalid_type,expected:he.function,received:t.parsedType}),je;function i(e,i){return _e({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,we(),ve].filter((e=>!!e)),issueData:{code:ge.invalid_arguments,argumentsError:i}})}function n(e,i){return _e({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,we(),ve].filter((e=>!!e)),issueData:{code:ge.invalid_return_type,returnTypeError:i}})}const r={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof _t){const e=this;return Ae((async function(...t){const a=new ye([]),o=await e._def.args.parseAsync(t,r).catch((e=>{throw a.addIssue(i(t,e)),a})),c=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(c,r).catch((e=>{throw a.addIssue(n(c,e)),a}))}))}{const e=this;return Ae((function(...t){const a=e._def.args.safeParse(t,r);if(!a.success)throw new ye([i(t,a.error)]);const o=Reflect.apply(s,this,a.data),c=e._def.returns.safeParse(o,r);if(!c.success)throw new ye([n(o,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ft({...this._def,args:ut.create(e).rest(et.create())})}returns(e){return new ft({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,i){return new ft({args:e||ut.create([]).rest(et.create()),returns:t||et.create(),typeName:Pt.ZodFunction,...Pe(i)})}}class gt extends Ze{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}gt.create=(e,t)=>new gt({getter:e,typeName:Pt.ZodLazy,...Pe(t)});class yt extends Ze{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return ke(t,{received:t.data,code:ge.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:e.data}}get value(){return this._def.value}}function vt(e,t){return new bt({values:e,typeName:Pt.ZodEnum,...Pe(t)})}yt.create=(e,t)=>new yt({value:e,typeName:Pt.ZodLiteral,...Pe(t)});class bt extends Ze{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),i=this._def.values;return ke(t,{expected:ue.joinValues(i),received:t.parsedType,code:ge.invalid_type}),je}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),i=this._def.values;return ke(t,{received:t.data,code:ge.invalid_enum_value,options:i}),je}return Ae(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return bt.create(e)}exclude(e){return bt.create(this.options.filter((t=>!e.includes(t))))}}bt.create=vt;class wt extends Ze{_parse(e){const t=ue.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==he.string&&i.parsedType!==he.number){const e=ue.objectValues(t);return ke(i,{expected:ue.joinValues(e),received:i.parsedType,code:ge.invalid_type}),je}if(-1===t.indexOf(e.data)){const e=ue.objectValues(t);return ke(i,{received:i.data,code:ge.invalid_enum_value,options:e}),je}return Ae(e.data)}get enum(){return this._def.values}}wt.create=(e,t)=>new wt({values:e,typeName:Pt.ZodNativeEnum,...Pe(t)});class _t extends Ze{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==he.promise&&!1===t.common.async)return ke(t,{code:ge.invalid_type,expected:he.promise,received:t.parsedType}),je;const i=t.parsedType===he.promise?t.data:Promise.resolve(t.data);return Ae(i.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}_t.create=(e,t)=>new _t({type:e,typeName:Pt.ZodPromise,...Pe(t)});class kt extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:i}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{ke(i,e),e.fatal?t.abort():t.dirty()},get path(){return i.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(i.data,r);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:i.path,parent:i}))):this._def.schema._parseSync({data:e,path:i.path,parent:i})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(i.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===i.common.async){const n=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===n.status?je:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((i=>"aborted"===i.status?je:("dirty"===i.status&&t.dirty(),e(i.value).then((()=>({status:t.value,value:i.value}))))))}if("transform"===n.type){if(!1===i.common.async){const e=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Ce(e))return e;const s=n.transform(e.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then((e=>Ce(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}ue.assertNever(n)}}kt.create=(e,t,i)=>new kt({schema:e,typeName:Pt.ZodEffects,effect:t,...Pe(i)}),kt.createWithPreprocess=(e,t,i)=>new kt({schema:t,effect:{type:"preprocess",transform:e},typeName:Pt.ZodEffects,...Pe(i)});class xt extends Ze{_parse(e){return this._getType(e)===he.undefined?Ae(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xt.create=(e,t)=>new xt({innerType:e,typeName:Pt.ZodOptional,...Pe(t)});class jt extends Ze{_parse(e){return this._getType(e)===he.null?Ae(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}jt.create=(e,t)=>new jt({innerType:e,typeName:Pt.ZodNullable,...Pe(t)});class St extends Ze{_parse(e){const{ctx:t}=this._processInputParams(e);let i=t.data;return t.parsedType===he.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}St.create=(e,t)=>new St({innerType:e,typeName:Pt.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Pe(t)});class At extends Ze{_parse(e){const{ctx:t}=this._processInputParams(e),i={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Fe(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new ye(i.common.issues)},input:i.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ye(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}At.create=(e,t)=>new At({innerType:e,typeName:Pt.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Pe(t)});class Ot extends Ze{_parse(e){if(this._getType(e)!==he.nan){const t=this._getOrReturnCtx(e);return ke(t,{code:ge.invalid_type,expected:he.nan,received:t.parsedType}),je}return{status:"valid",value:e.data}}}Ot.create=e=>new Ot({typeName:Pt.ZodNaN,...Pe(e)});const Tt=Symbol("zod_brand");class Ct extends Ze{_parse(e){const{ctx:t}=this._processInputParams(e),i=t.data;return this._def.type._parse({data:i,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ft extends Ze{_parse(e){const{status:t,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return"aborted"===e.status?je:"dirty"===e.status?(t.dirty(),Se(e.value)):this._def.out._parseAsync({data:e.value,path:i.path,parent:i})})();{const e=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===e.status?je:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:i.path,parent:i})}}static create(e,t){return new Ft({in:e,out:t,typeName:Pt.ZodPipeline})}}class Rt extends Ze{_parse(e){const t=this._def.innerType._parse(e);return Ce(t)&&(t.value=Object.freeze(t.value)),t}}Rt.create=(e,t)=>new Rt({innerType:e,typeName:Pt.ZodReadonly,...Pe(t)});const Lt=(e,t={},i)=>e?Xe.create().superRefine(((n,r)=>{var s,a;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,o=null===(a=null!==(s=e.fatal)&&void 0!==s?s:i)||void 0===a||a,c="string"==typeof e?{message:e}:e;r.addIssue({code:"custom",...c,fatal:o})}})):Xe.create(),Et={object:st.lazycreate};var Pt;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Pt||(Pt={}));const Zt=We.create,Nt=Ve.create,It=Ot.create,Mt=Je.create,Dt=Ge.create,Ut=Ke.create,$t=He.create,qt=Qe.create,Bt=Ye.create,Wt=Xe.create,zt=et.create,Vt=tt.create,Jt=it.create,Gt=nt.create,Kt=st.create,Ht=st.strictCreate,Qt=at.create,Yt=ct.create,Xt=dt.create,ei=ut.create,ti=pt.create,ii=mt.create,ni=ht.create,ri=ft.create,si=gt.create,ai=yt.create,oi=bt.create,ci=wt.create,li=_t.create,di=kt.create,ui=xt.create,pi=jt.create,mi=kt.createWithPreprocess,hi=Ft.create,fi={string:e=>We.create({...e,coerce:!0}),number:e=>Ve.create({...e,coerce:!0}),boolean:e=>Ge.create({...e,coerce:!0}),bigint:e=>Je.create({...e,coerce:!0}),date:e=>Ke.create({...e,coerce:!0})},gi=je;var yi=Object.freeze({__proto__:null,defaultErrorMap:ve,setErrorMap:function(e){be=e},getErrorMap:we,makeIssue:_e,EMPTY_PATH:[],addIssueToContext:ke,ParseStatus:xe,INVALID:je,DIRTY:Se,OK:Ae,isAborted:Oe,isDirty:Te,isValid:Ce,isAsync:Fe,get util(){return ue},get objectUtil(){return pe},ZodParsedType:he,getParsedType:fe,ZodType:Ze,ZodString:We,ZodNumber:Ve,ZodBigInt:Je,ZodBoolean:Ge,ZodDate:Ke,ZodSymbol:He,ZodUndefined:Qe,ZodNull:Ye,ZodAny:Xe,ZodUnknown:et,ZodNever:tt,ZodVoid:it,ZodArray:nt,ZodObject:st,ZodUnion:at,ZodDiscriminatedUnion:ct,ZodIntersection:dt,ZodTuple:ut,ZodRecord:pt,ZodMap:mt,ZodSet:ht,ZodFunction:ft,ZodLazy:gt,ZodLiteral:yt,ZodEnum:bt,ZodNativeEnum:wt,ZodPromise:_t,ZodEffects:kt,ZodTransformer:kt,ZodOptional:xt,ZodNullable:jt,ZodDefault:St,ZodCatch:At,ZodNaN:Ot,BRAND:Tt,ZodBranded:Ct,ZodPipeline:Ft,ZodReadonly:Rt,custom:Lt,Schema:Ze,ZodSchema:Ze,late:Et,get ZodFirstPartyTypeKind(){return Pt},coerce:fi,any:Wt,array:Gt,bigint:Mt,boolean:Dt,date:Ut,discriminatedUnion:Yt,effect:di,enum:oi,function:ri,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>Lt((t=>t instanceof e),t),intersection:Xt,lazy:si,literal:ai,map:ii,nan:It,nativeEnum:ci,never:Vt,null:Bt,nullable:pi,number:Nt,object:Kt,oboolean:()=>Dt().optional(),onumber:()=>Nt().optional(),optional:ui,ostring:()=>Zt().optional(),pipeline:hi,preprocess:mi,promise:li,record:ti,set:ni,strictObject:Ht,string:Zt,symbol:$t,transformer:di,tuple:ei,undefined:qt,union:Qt,unknown:zt,void:Jt,NEVER:gi,ZodIssueCode:ge,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:ye});const vi=yi.string(),bi=yi.string().nullable(),wi=yi.number(),_i=yi.string().nullable(),ki=yi.string().nullable(),xi=yi.string().nullable(),ji=yi.number(),Si=yi.string(),Ai=yi.string(),Oi=yi.union([ji,xi,ki,_i,Si,wi,bi,vi,Ai]),Ti={ADMIN:9,USER:5,EXTERNAL:3,GUEST:0},Ci=yi.lazy((()=>Ji.extend({title:yi.string(),_url:yi.string(),level:yi.nativeEnum(Ti),dateCreation:yi.string(),dateModified:yi.string()}).catchall(Oi))),Fi=yi.lazy((()=>Ci.schema.extend({active:yi.number()}))),Ri=e=>Fi.safeParse(e).success,Li=Fi,Ei=e=>Li.safeParse(e).success,Pi=yi.object({idInType:yi.number(),lat:yi.number(),lng:yi.number()}),Zi=e=>Pi.safeParse(e).success,Ni=yi.object({title:yi.string(),firstname:yi.string(),lastname:yi.string(),mail:yi.union([yi.string(),yi.undefined()]).optional(),description:yi.string().optional(),dateOfBirth:yi.string().optional(),phoneNumber:yi.string().optional(),language:yi.string().optional(),timeZone:yi.string().optional(),mobileNumber:yi.string().optional(),company:yi.string().optional(),country:yi.string().optional(),department:yi.string().optional(),function:yi.string().optional(),webSite:yi.string().optional(),image:yi.union([yi.string(),yi.undefined()]).optional(),userBanner:yi.union([yi.string(),yi.undefined()]).optional(),field1:yi.string().optional(),field2:yi.string().optional(),field3:yi.string().optional(),field4:yi.string().optional(),field5:yi.string().optional()}),Ii=Ni.required().extend({level:yi.string(),image:yi.string().optional(),businessManagementManager:Ci.array().optional(),businessNetworkingUserToCompanySrc:Ci.array().optional()}),Mi=yi.object({user_field_edit_profil:yi.record(Ni.keyof(),yi.number()),user_field_editable:yi.record(Ni.keyof(),yi.number()),user_field_my_page:yi.record(Ni.keyof(),yi.number()),user_page_mandatory_fields:yi.object({firstname:yi.enum(["0","1"]),lastname:yi.enum(["0","1"]),pseudo:yi.enum(["0","1"])})}),Di=yi.object({name:yi.string(),value:yi.union([yi.string(),yi.record(yi.string(),yi.any())])}),Ui=yi.enum(["popover"]),$i=yi.object({values:Ii,mobileEditableFields:Ii.keyof().array()}),qi=yi.object({mail:yi.union([yi.string(),yi.undefined()]),title:yi.string(),firstname:yi.string(),lastname:yi.string(),phoneNumber:yi.union([yi.string(),yi.undefined()]).optional(),company:yi.union([yi.string(),yi.undefined()]).optional(),function:yi.union([yi.string(),yi.undefined()]).optional(),uri:yi.union([yi.string(),yi.undefined()]).optional(),field1:yi.union([yi.string(),yi.undefined()]).optional(),field2:yi.union([yi.string(),yi.undefined()]).optional(),field3:yi.union([yi.string(),yi.undefined()]).optional(),field4:yi.union([yi.string(),yi.undefined()]).optional(),field5:yi.union([yi.string(),yi.undefined()]).optional()}),Bi=yi.object({userDirectoryShow:yi.union([yi.literal(""),yi.literal("1")]),contactDirectoryShow:yi.union([yi.literal("0"),yi.literal("1")]),businessContactShow:yi.boolean(),menu:yi.union([yi.literal("0"),yi.literal("1")]),cardFields:yi.string().array(),tableFields:yi.string().array(),viewFields:yi.string().array(),userGeoloc:yi.boolean().optional(),sort:yi.string(),cnt:yi.number().optional(),filters:yi.object({name:yi.string(),type:yi.string()}).array()}),Wi=e=>Bi.safeParse(e).success,zi=yi.object({create:yi.boolean(),read:yi.boolean(),publish:yi.boolean(),administrate:yi.boolean(),update:yi.boolean(),delete:yi.boolean(),comment:yi.boolean(),member:yi.boolean()}),Vi=e=>zi.safeParse(e).success,Ji=yi.object({id:yi.number(),mainType:yi.string(),type:yi.string(),uri:yi.string(),dateCreation:yi.string().optional(),dateModified:yi.string().optional().nullable()}),Gi=Ji.extend({title:yi.string(),_url:yi.string()}),Ki=e=>Gi.safeParse(e).success,Hi=yi.lazy((()=>Gi.extend({description:yi.string().optional().nullable(),_user:Ci,_right:zi}))),Qi=e=>Hi.safeParse(e).success;var Yi;!function(e){e[e.SPOT_MODERATE_IGNORE=0]="SPOT_MODERATE_IGNORE",e[e.SPOT_MODERATE_ACCEPT=1]="SPOT_MODERATE_ACCEPT",e[e.SPOT_MODERATE_PENDING=2]="SPOT_MODERATE_PENDING"}(Yi||(Yi={}));const Xi=yi.object({RF_Constant_levelName:yi.string(),RF_delete:yi.boolean(),RF_editing:yi.boolean(),RF_level:yi.number(),RF_levelName:yi.string(),RF_levelName_Trad:yi.string(),RF_parameters:yi.boolean(),RF_setAdmin:yi.boolean(),RF_spotit:yi.boolean(),RF_spotit_own:yi.boolean()}),en=Gi.extend({dateCreation:yi.string(),dateModified:yi.string(),category:yi.number(),privacy:yi.number()}),tn=e=>Xi.safeParse(e).success;class nn extends n{list(e,t,i,n=[{name:"dateCreation",sort:"DESC"}]){return this.jApi.article.list({type:"aseiClearanceTicket",format:"raw-view",limit:t,page:e,orders:n,filters:i})}requestStatus(e,t,i){return this.network.post({o:"asei",f:"setStatus",uri:e,requestedStatus:t,audience:i})}getDedicatedGroups(){return this.network.post({o:"asei",f:"getDedicatedGroups"})}getConfiguration(){return this.network.post({o:"asei",f:"configuration"})}}class rn extends n{tenants(){return this.network.post({o:"drive",f:"getTenants"})}groups(e,t){return this.network.post({o:"drive",f:"getGroups",query:e,filter:t})}sites(){return this.network.post({o:"drive",f:"getSites"})}listAccount(e){return this.network.post({o:"drive",f:"listAccount",service:e})}isAccountLogged(e,t){return this.network.post({o:"drive",f:"isAccountLogged",service:e,id:t})}checkAccountToken(e){return this.network.post({o:"drive",f:"checkAccountToken",service:e})}documents(e,t){return this.network.post({o:"drive",f:"getDocuments",service:e,documentParams:t})}}class sn extends n{GetUnclassifiedFiles(e){var t;return this.network.post({o:"objectListMediaLibrary",f:"GetUnclassifiedFiles",format:e.format,page:null!==(t=e.page)&&void 0!==t?t:1,limit:e.limit,nolimit:e.nolimit})}getAccess(){return this.network.post({o:"mediaLibrary",f:"access"})}getFoldersStatsList(e=[],t=[],i=1){return this.network.post({o:"objectListMediaLibrary",f:"FoldersStatsList",filters:e,orders:t,page:i})}getFilesStatsList(e=[],t=[],i=1){return this.network.post({o:"objectListMediaLibrary",f:"FilesStatsList",filters:e,orders:t,page:i})}getStats(){return this.network.post({o:"mediaLibrary",f:"moderatorStats"})}readFolder(e){return this.network.post({o:"mediaLibrary",f:"readFolder",uri:e})}readFile(e){return this.network.post({o:"mediaLibrary",f:"readFile",uri:e})}}class an extends n{getLogs({dateEnd:e,idLogMax:t}){return this.network.post({o:"jLand",f:"adminLogs",dateEnd:e,idLogMax:t})}getStats({map:e,dateStart:t,dateEnd:i}){return this.network.post({o:"jLand",f:"adminStats",map:e,dateStart:t,dateEnd:i})}getAllMapsAsAdmin(e="raw-list,licenses"){return this.network.post({o:"objectListJLand",f:"jLandList",format:e})}createMap(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"jlandmap"}))}}class on extends n{sendMessage(e,t){return this.network.post({o:"messenger",f:"newMessage",idDiscussion:t,msg:{description:e}})}getOrCreateDiscussion(e,t){const i=e<t?`${e}.${t}`:`${t}.${e}`;return this.network.post({o:"messenger",f:"getDiscussion",idDiscussion:i,type:"messengerUser",idUserTo:t})}}class cn extends n{getConfig(){return this.network.post({o:"search",f:"getConfig"})}proposition({query:e,format:t},i){return this.network.post({o:"search",f:"proposition",query:e,format:t||"little"},i)}searchQuery(e,t){const{keywords:i,category:n,facetCategories:r,filters:s,page:a,limit:o,sort:c,options:l,format:d}=e;return this.network.post({o:"search",f:"query",keywords:i,category:n,facetCategories:r,filters:s,page:a,limit:o,sort:c,options:l,format:W(d,null==t?void 0:t.formatExtension)},null==t?void 0:t.signal)}getLastQueries(){return this.network.post({o:"search",f:"getLastQueries"})}getAdminConfig(){return this.network.post({o:"search",f:"getAdminConfig"})}setAdminConfig(e){return this.network.post({o:"search",f:"setAdminConfig",config:e})}}var ln=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i};class dn extends n{list(){return this.network.post({o:"taxonomy",f:"list",format:"raw-little"}).then((e=>{if(Array.isArray(e.result))return e.result;throw"Bad response from backend"}))}create(e){var{format:t="raw-little"}=e,i=ln(e,["format"]);return this.network.post(Object.assign({o:"taxonomy",f:"create",format:t},i))}autocomplete(e,t){return this.network.post({o:"autocomplete",f:"taxonomy",q:t,idTaxonomy:e,idToUri:!1})}autocompleteList(e){var{format:t="autocomplete"}=e,i=ln(e,["format"]);return this.network.post(Object.assign({o:"objectListTaxonomy",f:"concept",format:t},i))}autocompleteHierarchy(e){return this.network.post(Object.assign({o:"objectListTaxonomyHierarchy",f:"concept"},e))}}class un extends n{autocomplete(e){return this.network.post({o:"autocomplete",f:"user",q:e,idToUri:!1}).then((e=>e.result))}get(e,t="little",i){return this.network.post({o:"user",f:"get",uri:e,format:t},i)}updateImage(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateImage",idFile:e,format:t})}updateBanner(e,t="raw-little"){return this.network.postCSRF({o:"user",f:"updateBanner",idFile:e,format:t})}updateMail(e,t){return this.network.postCSRF({o:"user",f:"editMail",mail:e,password:t})}userUpdateProfile(e){return this.network.postCSRF(Object.assign({o:"user",f:"updateProfile"},e))}configuration(){return this.network.post({o:"userDirectory",f:"configuration"})}fieldsConfiguration(){return this.network.post({o:"user",f:"fieldsConfiguration"})}userList(e,t){return this.network.post(Object.assign(Object.assign({o:"objectList",f:"JamespotUserList"},e),{format:W(e.format,null==t?void 0:t.formatExtension)}),null==t?void 0:t.signal)}userQueryList(e,t){return this.network.post(Object.assign(Object.assign({o:"objectList",f:"JamespotUserQueryList"},e),{format:W(e.format,null==t?void 0:t.formatExtension)}))}userMap(e){return this.network.post(Object.assign({o:"objectListJamespot",f:"userMap"},e))}userBusinessContactQueryList(e){return this.network.post(Object.assign({o:"businessContact",f:"queryList"},e))}userCreateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),i=Object.assign(Object.assign({},t),{type:"businessContactCard",publishTo:"networkPublic/1"});return this.jApi.article.create(i)}userUpdateBusinessContact(e){const t=Object.assign(Object.assign({},e),{pseudo:e.title,firstName:e.firstname,lastName:e.lastname,champ1:e.field1,champ2:e.field2,champ3:e.field3,champ4:e.field4,champ5:e.field5}),i=Object.assign(Object.assign({},t),{uri:e.uri,publishTo:"networkPublic/1"});return this.jApi.article.update(i)}userDeleteBusinessContact(e){return this.jApi.article.delete(e)}userAddContact(e){return this.network.post({o:"user",f:"addContact",idUser:e})}userRemoveContact(e){return this.network.post({o:"user",f:"removeContact",idUser:e})}signIn(e,t){return this.network.post({o:"user",f:"signIn",mail:e,password:t})}getFields(e,t){return this.network.post({o:"user",f:"getFields",idUser:e,fieldsType:t})}}class pn extends n{getFiles(e){return this.network.post(Object.assign({o:"onlyOffice",f:"getFiles"},e))}getFile(e,t){return this.network.post({o:"onlyOffice",f:"getFile",idFile:e,hash:t})}getTemplates(e){return this.network.post({o:"onlyOffice",f:"getTemplates"},e)}deleteFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"deleteFile",idFile:e,withParent:t})}createFile(e,t,i){return this.network.postCSRF({o:"onlyOffice",f:"createFile",title:e,type:t,publishTo:i})}updateFile(e,t){return this.network.postCSRF({o:"onlyOffice",f:"updateFile",idFile:e,title:t})}createVersion(e){return this.network.post({o:"onlyOffice",f:"createVersion",idFile:e})}setAccessRequest(e,t,i,n){return this.network.postCSRF({o:"onlyOffice",f:"setAccessRequest",uri:e,idUser:t,requestAccessValue:i,requestResponseMessage:n})}getAccessRequest(e,t){return this.network.post({o:"onlyOffice",f:"getAccessRequest",format:"raw-little",uri:e,idUser:t})}askAccess(e,t,i){return this.network.postCSRF({o:"onlyOffice",f:"askAccess",uri:e,askAccess:t,askMessage:i})}}class mn extends n{createChannel(e,t="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},e),{o:"article",f:"create",format:t,type:"tvDisplayChannel"}))}getChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getChannel"}))}getConfigureChannel(e){return this.network.post(Object.assign(Object.assign({},e),{o:"tvDisplay",f:"getConfigureChannel"}))}}class hn extends n{contentObjectLinks(e){return this.network.post({o:"shared",f:"contentObjectLinks",format:"raw-little",uri:e})}contentSetObjectAccessRule(e,t,i){return this.network.postCSRF({o:"shared",f:"contentSetObjectAccessRule",format:"raw-little",uri:e,rule:t,hash:i})}}var fn=function(e,t,i,n){return new(i||(i=Promise))((function(r,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function o(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}))};class gn extends n{SaveAnimationConfiguration(e){return fn(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"saveConfiguration",animation:e})}))}DeleteAnimation(){return fn(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"deleteAnimation"})}))}GetCurrentAnimation(){return fn(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfiguration"})}))}GetCurrentAnimationApp(){return fn(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getConfigurationApp"})}))}ToggleAnimationActive(){return fn(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"toggleAnimationActive"})}))}GetAnimationActive(){return fn(this,void 0,void 0,(function*(){return this.network.post({o:"animations",f:"getAnimationActive"})}))}}class yn extends n{GetStatus(){return e=this,t=void 0,n=function*(){return this.network.post({o:"accessibility",f:"getStatus"})},new((i=void 0)||(i=Promise))((function(r,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function o(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}));var e,t,i,n}}class vn extends n{getObject(e){return this.network.post({o:"object",f:"getObject",uri:e})}setAccess(e,t,i,n){return this.network.post({o:"object",f:"setAccess",uri:e,access:t,message:i,generalAccessRule:n})}getAccess(e){return this.network.post({o:"object",f:"getAccess",uri:e})}getAccessHash(e){return this.network.post({o:"object",f:"getAccessHash",uri:e})}}class bn extends n{getFileBanks(e){return this.network.post({o:"file-sync",f:"getFileBanks"},e)}saveFileBanks(e){return this.network.post({o:"file-sync",f:"saveFileBanks",fileBanks:e})}getUserQuota(e){return this.network.post({o:"file-sync",f:"getUserQuota"},e)}getAdminSpots(e,t){return this.network.post(Object.assign({o:"objectList",f:"fileSyncAdminSpots"},e),t)}}class wn extends n{getUsers(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"getUsers"},e),{format:null!=t?t:"raw-list"}))}add(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"add"},e),{format:null!=t?t:"raw-little"}))}remove(e,t){return this.network.post(Object.assign(Object.assign({o:"customAction",f:"remove"},e),{format:null!=t?t:"raw-little"}))}}class _n extends n{textEnhancement({text:e,capacity:t}){return this.network.post({o:"jia",f:"textEnhancement",text:e,capacity:t})}}class kn extends n{responseUserList(e,t,i){return this.network.post({o:"widget",f:"responseUserList",uri:e,uniqid:t,page:i})}removeWidget({id:e,type:t,uniqid:i}){return this.network.post({o:"widget",f:"removeWidget",id:e,type:t,uniqid:i})}checkListRespond({id:e,type:t,idUser:i,uniqid:n,index:r}){return this.network.post({o:"widget",f:"checkListRespond",id:e,type:t,uniqid:n,idUser:i,index:r})}updateWidget({id:e,uniqid:t,content:i,title:n,type:r}){return this.network.post({o:"widget",f:"updateWidget",id:e,uniqid:t,content:i,title:n,type:r})}}class xn{constructor(e){this.version="1.0",this.network=e,this.admin={license:new r(this),store:new s(this),utils:new a(this)},this.accessibility=new yn(this),this.application=new o(this),this.article=new Q(this),this.asei=new nn(this),this.assetReservation=new X(this),this.audience=new ee(this),this.bbb=new te(this),this.bookmark=new ie(this),this.businessNetworking=new ne(this),this.community=new re(this),this.diapazone=new se(this),this.drive=new rn(this),this.faq=new ce(this),this.file=new oe(this),this.filebank=new le(this),this.fileSync=new bn(this),this.global=new de(this),this.group=new me(this),this.jia=new _n(this),this.jland=new an(this),this.mediaLibrary=new sn(this),this.messenger=new on(this),this.object=new vn(this),this.search=new cn(this),this.share=new hn(this),this.socialAction=new wn(this),this.taxonomy=new dn(this),this.tvDisplay=new mn(this),this.user=new un(this),this.wedoc=new pn(this),this.widget=new kn(this),this.animations=new gn(this)}}class jn{getBackendUrl(){return e=this,t=void 0,n=function*(){const e=window.location;return`${e.protocol}//${e.host}`},new((i=void 0)||(i=Promise))((function(r,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function o(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,o)}c((n=n.apply(e,t||[])).next())}));var e,t,i,n}fetch(e,t){return window.fetch(e,t)}}const Sn=yi.object({href:yi.string(),target:yi.string()}),An=yi.object({name:yi.string(),sort:yi.union([yi.literal("ASC"),yi.literal("DESC")])}),On=yi.union([Ci,en]),Tn=yi.array(An),Cn=yi.union([yi.boolean(),yi.string(),yi.number(),yi.array(yi.string()),yi.object({srcId:yi.union([yi.number(),yi.string()]),srcType:yi.string()}),yi.object({targetId:yi.union([yi.number(),yi.string()]),targetType:yi.string()}),yi.object({start:yi.string(),end:yi.string()})]),Fn=yi.union([yi.literal("<"),yi.literal(">"),yi.literal("<="),yi.literal(">="),yi.literal("!="),yi.literal("<>"),yi.literal("like"),yi.literal("between"),yi.literal("is"),yi.literal("is not"),yi.literal("in"),yi.literal("link"),yi.literal("match"),yi.literal("equal")]),Rn=yi.union([yi.literal("<"),yi.literal(">"),yi.literal("<="),yi.literal(">="),yi.literal("!="),yi.literal("<>"),yi.literal("+"),yi.literal("-"),yi.literal("like"),yi.literal("between"),yi.literal("is"),yi.literal("is not"),yi.literal("in"),yi.literal("link"),yi.literal("match"),yi.literal("equal")]),Ln=yi.object({name:yi.string(),value:Cn,operator:Fn.optional(),method:Rn.optional(),or:yi.boolean().optional(),isNull:yi.boolean().optional(),isNotNull:yi.boolean().optional()}),En=yi.array(Ln);var Pn;!function(e){e.LITTLE="raw-little",e.LIST="raw-list",e.VIEW="raw-view",e.USER_API="user-api",e.MOBILE="mobile"}(Pn||(Pn={}));const Zn=yi.nativeEnum(Pn).transform((e=>`${e}`)),Nn=yi.union([Zn,yi.undefined()]),In=yi.array(yi.union([yi.literal("bookmark"),yi.literal("contact"),yi.literal("licenses"),yi.literal("quizFieldDefinitions"),yi.literal("quizResponseRecord"),yi.literal("search"),yi.literal("socialEventRecord"),yi.literal("surveyDateRecord")])),Mn=yi.object({attrName:yi.string(),token:yi.string(),file:yi.instanceof(File).nullable().optional(),url:yi.string().optional()}),Dn=yi.object({width:yi.number(),height:yi.number()}),Un=yi.object({x:yi.number(),y:yi.number(),w:yi.number(),h:yi.number(),rotation:yi.number(),killSize:yi.boolean().optional()}),$n=Gi.extend({dateCreation:yi.string(),dateModified:yi.string().nullable(),mimetype:yi.string(),path:yi.string().optional(),size:yi.number()}),qn=e=>$n.parse(e),Bn=$n.extend({_extend:yi.object({crop:Un})}),Wn=yi.object({name:yi.string(),filename:yi.string(),dateModified:yi.string(),mimetype:yi.string()}),zn=yi.object({idUser:yi.string(),dateDownload:yi.string(),Pseudo:yi.string(),type:yi.string()}),Vn=yi.object({id:yi.string(),uri:yi.string(),shortUri:yi.string(),title:yi.string(),name:yi.string(),mainType:yi.string(),type:yi.string(),label:yi.string(),cssClass:yi.string(),cssColor:yi.string(),class:yi.string()}),Jn=Vn.extend({title:yi.string()}),Gn=Jn.extend({Pseudo:yi.string()}),Kn=Jn.extend({idspot:yi.string()}),Hn=yi.union([Jn,Gn,Kn]),Qn=yi.enum(["left","right","center","justify"]),Yn=yi.enum(["top","bottom","center","left","right"]),Xn=yi.enum(["auto","contain","cover"]),er=yi.enum(["sm","md","lg"]),tr=yi.enum(["contained","outlined"]),ir=yi.enum(["link","anchor","popup"]),nr=yi.object({x:yi.number(),y:yi.number()});var rr;!function(e){e.ArticleButton="widget-article-button",e.ArticleGallery="widget-article-gallery",e.ArticleTitle="widget-article-title",e.ArticleText="widget-article-text",e.ArticleImage="widget-article-image",e.ArticleAttachment="widget-article-attachment",e.Api="widget-api",e.ArticleSlider="widget-article-slider",e.CheckList="widget-check-list"}(rr||(rr={}));const sr=yi.nativeEnum(rr),ar=yi.lazy((()=>yi.union([Ir,Dr,$r,Br,zr,Jr,Zr,Kr,Qr]))),or=yi.lazy((()=>yi.object({[rr.ArticleButton]:Ir,[rr.ArticleGallery]:Dr,[rr.ArticleTitle]:$r,[rr.ArticleText]:Br,[rr.ArticleImage]:zr,[rr.ArticleAttachment]:Jr,[rr.Api]:Zr,[rr.ArticleSlider]:Kr,[rr.CheckList]:Qr}))),cr=yi.lazy((()=>yi.object({[rr.ArticleButton]:jr,[rr.ArticleGallery]:gr,[rr.ArticleTitle]:yr,[rr.ArticleText]:vr,[rr.ArticleImage]:Sr,[rr.ArticleAttachment]:Ar,[rr.Api]:br,[rr.ArticleSlider]:Tr,[rr.CheckList]:Fr}))),lr=yi.object({layers:yi.string().array().optional()}),dr=e=>yi.object({title:yi.string(),widget:lr.and(null!=e?e:ar)}),ur=yi.object({css:yi.record(yi.string(),yi.string()).optional(),widgets:dr().array()}),pr=yi.enum(["default","vertical"]),mr=yi.lazy((()=>os.schema.extend({articleWidgets:dr().array(),articleWidgetDisplayMode:pr.nullable().or(yi.undefined())}))),hr=yi.object({uniqid:yi.string(),title:yi.string(),locked:yi.boolean(),visible:yi.boolean(),widgets:dr().array(),position:nr.optional()}),fr=yi.enum(["edit","view","preview"]),gr=yi.object({gap:yi.string().optional(),column:yi.string().optional(),files:$n.array().optional()}),yr=yi.object({text:yi.string().optional(),textAlign:Qn.optional(),heading:yi.string().optional(),color:yi.string().optional(),backgroundColor:yi.string().optional()}),vr=yi.object({text:yi.string().optional(),color:yi.string().optional(),fontSize:yi.string().optional(),lineHeight:yi.string().optional(),linkColor:yi.string().optional()}),br=yi.object({url:yi.string().optional(),keys:yi.array(yi.string()).optional(),order:yi.string().optional(),orderBy:yi.string().optional()}),wr=yi.object({text:yi.string().optional(),color:yi.string().optional(),backgroundColor:yi.string().optional(),borderRadius:yi.string().optional(),fontSize:yi.string().optional(),buttonSize:er.optional(),variant:tr.optional(),url:yi.string().optional(),target:yi.string().optional()}),_r=yi.object({url:yi.string(),target:yi.string()}),kr=yi.object({uniqid:yi.string()}),xr=yi.object({title:yi.string(),widgets:dr().array()}),jr=wr.extend({openingType:ir.optional(),openingTypeLink:_r.optional(),openingTypeAnchor:kr.optional(),openingTypePopup:xr.optional()}),Sr=yi.object({file:$n.optional(),useFilter:yi.boolean().optional()}),Ar=yi.object({files:$n.array().optional(),fileDisplay:yi.enum(["list","gallery"]).optional()}),Or=yi.object({title:yi.string(),text:yi.string(),titleHeading:yi.enum(["h1","h2","h3","h4","h5","h6","p","span"]).optional(),textColor:yi.string().optional(),opacityFilter:yi.number().optional(),opacityColor:yi.string().optional(),file:$n.optional()}),Tr=yi.object({slides:Or.array().optional(),maxWidth:yi.number().optional(),loop:yi.boolean().optional(),useDots:yi.boolean().optional(),startAt:yi.number().optional()}),Cr=yi.object({title:yi.string(),value:yi.boolean().optional(),links:Sn.array().optional(),id:yi.number().optional(),user:yi.object({id:yi.number(),type:yi.literal("user"),mainType:yi.literal("user")}).optional()}),Fr=yi.object({arr:Cr.array().optional()}),Rr=yi.object({widgets:dr().array().optional()}).and(yi.union([vr,Sr,yr,jr,gr,Ar,br,Tr,Fr])),Lr=yi.object({busy:yi.union([yi.boolean(),yi.undefined()]).optional(),loading:yi.union([yi.boolean(),yi.undefined()]).optional(),initialized:yi.union([yi.boolean(),yi.undefined()]).optional(),mounted:yi.union([yi.boolean(),yi.undefined()]).optional(),hover:yi.union([yi.boolean(),yi.undefined()]).optional(),empty:yi.boolean().optional()}),Er=yi.object({width:yi.number().or(yi.undefined()).optional(),inplace:yi.boolean(),isComponentVisible:yi.boolean().optional(),mode:fr,onClick:yi.function().returns(yi.void()).optional(),onChange:yi.function().args(Rr,yi.boolean()).returns(yi.void()),onStateChange:yi.function().args(Lr).returns(yi.void())}),Pr=(e,t)=>t.safeParse(e).success,Zr=yi.object({name:yi.literal(rr.Api),uniqid:yi.string(),content:br}),Nr=e=>Pr(e,Zr),Ir=yi.lazy((()=>yi.object({name:yi.literal(rr.ArticleButton),uniqid:yi.string(),content:jr}))),Mr=e=>Pr(e,Ir),Dr=yi.object({name:yi.literal(rr.ArticleGallery),uniqid:yi.string(),content:gr}),Ur=e=>Pr(e,Dr),$r=yi.object({name:yi.literal(rr.ArticleTitle),uniqid:yi.string(),content:yr}),qr=e=>Pr(e,$r),Br=yi.object({name:yi.literal(rr.ArticleText),uniqid:yi.string(),content:vr}),Wr=e=>Pr(e,Br),zr=yi.object({name:yi.literal(rr.ArticleImage),uniqid:yi.string(),content:Sr}),Vr=e=>Pr(e,zr),Jr=yi.object({name:yi.literal(rr.ArticleAttachment),uniqid:yi.string(),content:Ar}),Gr=e=>Pr(e,Jr),Kr=yi.object({name:yi.literal(rr.ArticleSlider),uniqid:yi.string(),content:Tr}),Hr=e=>Pr(e,Kr),Qr=yi.object({name:yi.literal(rr.CheckList),uniqid:yi.string(),content:Fr.and(ur),title:yi.string()}),Yr=e=>Pr(e,Qr),Xr=yi.object({text:yi.string(),value:yi.boolean().optional(),links:Sn.array().optional(),uri:yi.string().optional(),mimetype:yi.string().optional(),id:yi.number().optional(),user:Ci.optional()}),es=yi.object({arr:Xr.array().optional()}),ts=yi.object({name:yi.literal("widget-check-list"),uniqid:yi.string(),content:es,title:yi.string()}),is=yi.object({label:yi.string(),description:yi.string(),name:sr,img:yi.string(),available:yi.boolean(),panel:yi.object({useWrapper:yi.boolean(),useEditor:yi.boolean(),useWidgets:yi.boolean()})}),ns=yi.object({title:yi.string().optional(),view:yi.any().optional()}),rs=yi.object({token:yi.string().or(yi.undefined()).optional(),ids:yi.record(yi.string(),dr()),layers:yi.record(yi.string(),hr),states:yi.record(yi.string(),Lr),modal:ns.or(yi.undefined()),editableMap:yi.record(yi.string(),yi.object({index:yi.number(),uniqid:yi.string()})),currentEditableIndex:yi.number(),currentEditableWidgetId:yi.string().or(yi.undefined()),widgetObject:yi.record(yi.string(),Gi.partial())}),ss=yi.object({widgets:rs}),as=yi.lazy((()=>mr.schema.extend({articleWidgetsCover:yi.number().or(yi.undefined()),_audience:Hn.array()}))),os=yi.lazy((()=>Gi.extend({dateCreation:yi.string(),dateModified:yi.string()}))),cs=os.schema.extend({description:yi.string().nullable().optional(),_user:Ci,_right:zi,_audience:On.array(),image:Dn.optional(),articleWidgets:dr().array().optional()}),ls=cs.extend({_attachedFiles:$n.array()}),ds=ls.extend({processContext:yi.null(),uiObjectLink:Gi.array().optional()}),us=e=>ls.extend({idDraft:yi.number(),form:e}),ps=yi.object({type:yi.string().optional(),format:Nn.optional(),formatExtend:In.optional(),query:yi.string().optional(),limit:yi.number().optional(),page:yi.number().optional(),orders:Tn.optional(),filters:En.optional()}),ms=yi.object({uri:yi.string().optional(),idArticle:yi.number().optional(),format:Nn.optional()}),hs=yi.object({title:yi.string().optional(),description:yi.string().optional().nullable(),type:yi.string().optional(),publishTo:yi.string().optional(),idSpot:yi.array(yi.string()).optional()}),fs=yi.object({id:yi.number(),type:yi.string(),dateCreation:yi.string(),dateModified:yi.string(),title:yi.string(),uri:yi.string()}),gs=yi.object({attachment:yi.boolean().optional(),idArticle:yi.number(),limits:yi.object({max:yi.number(),start:yi.number()}).optional()}),ys=yi.object({token:yi.string(),content:yi.string(),idArticle:yi.number(),sendAlert:yi.boolean(),alertAuthor:yi.boolean(),widgets:dr().array().optional()}),vs=yi.object({token:yi.string().optional(),description:yi.string().optional(),idComment:yi.number(),widgets:dr().array().optional()}),bs=yi.object({idUser:yi.string(),dateRead:yi.string(),Pseudo:yi.string(),type:yi.string()}),ws=yi.object({token:yi.string(),fullname:yi.string()}),_s=yi.object({redirectUrl:yi.string()}),ks=yi.object({token:yi.string()}),xs=yi.object({dateStart:yi.string(),title:yi.string()}),js=e=>yi.object({isActive:yi.boolean()}).and(e),Ss=yi.enum(["drive_microsoft_graph","drive_dropbox","drive_google"]),As=js(yi.object({drives:yi.record(Ss,yi.boolean())})),Os=js(yi.object({label:yi.string()})),Ts=js(yi.object({orderBy:yi.string(),order:yi.enum(["ASC","DESC"])})),Cs=js(yi.object({sendAlert:yi.boolean()})),Fs=js(yi.object({})),Rs=js(yi.object({create:yi.boolean(),autorize:yi.array(yi.enum(["message","comment","board","article"]).optional())})),Ls=yi.object({DriveHook:As,calendarHook:Os,FileBankHook:Ts,spotRssFeed:Fs,WidgetHook:Rs,AdminAdvancedHook:Cs}).partial(),Es=e=>Ls.and(yi.record(yi.string(),yi.any())).parse(e),Ps=yi.object({id:yi.number(),idFolder:yi.number().optional(),fileName:yi.string(),nbViews:yi.number(),nbDistinctViews:yi.number(),nbDownloads:yi.number()}),Zs=yi.object({id:yi.number(),folderName:yi.string(),nb:yi.number(),nbDistinct:yi.number()}),Ns=yi.object({nbFolders:yi.number(),nbFiles:yi.number()}),Is="accept",Ms="deny",Ds=new M(new jn),Us=new xn(Ds);window.JamespotUserApi=Us;const $s=Us,qs=xn;module.exports=i})();
2
2
  //# sourceMappingURL=jamespot-user-api.js.map